#💻・modding-dev

1 messages · Page 484 of 1

pastel kernel
#

This replaces what again? (I’m restarting my computer, it fucked up trying to load vs code.)

manic rune
#
        if context.individual and context.cardarea == G.play then
            card.ability.extra.stockpile = card.ability.extra.stockpile * 2
            local total_xmult = card.ability.extra.stockpile * card.ability.extra.xmult
            if context.other_card == context.scoring_hand[#context.scoring_hand] then
                card:juice_up(0.5, 0.5)
                play_sound('holo1', 1, 0.5)
                return {
                    xmult = total_xmult
brittle yacht
#

alr so how does the create card function work? docs doesnt help much

red flower
#

i recommend looking at vanillaremade :3

#

but you should be able to return { set = "set key", area = G.pack_cards }

red flower
#

idk how to be more clear than that haha

brittle yacht
#

ill go look at vremade

lament agate
#

who made JoyousSpring again

modern kindle
#

N

lament agate
#

who

modern kindle
#

nice Guy Thomas

lament agate
#

what's his username

red flower
#

N

lament agate
#

NOW THAT I GOT YOUR ATTENTION WITHOUT PINGING

red flower
#

for that im not helping u

lament agate
#

does your mod mess with the background vortex?

brittle yacht
lament agate
harsh bobcat
#

How does one add a joker to the bar up top.
So like how booster packs do not like mod one in just to clarufy.

lament agate
modern kindle
#

i also mess witht he background vortex smiley face
but i do mine in a not great way

red flower
red flower
lament agate
#

thanks doc

red flower
#

it has a comment that i stole it from cryptid

lament agate
#

stealing from cryptid is like pirating a triple a company app

brittle yacht
#

so to create a custom set, i would do an objecttype?

red flower
#

yes

brittle yacht
#

mmk

#

do ObjectTypes still need an atlas for key?

red flower
#

wdym

lament agate
#

wait

brittle yacht
#

would ObjectTypes need an altas?

lament agate
# brittle yacht do ObjectTypes still need an atlas for key?
SMODS.ObjectType({
    key = "Food",
    default = "j_reserved_parking",
    cards = {},
    inject = function(self)
        SMODS.ObjectType.inject(self)
        -- insert base game food jokers
        self:inject_card(G.P_CENTERS.j_gros_michel)
        self:inject_card(G.P_CENTERS.j_egg)
        self:inject_card(G.P_CENTERS.j_ice_cream)
        self:inject_card(G.P_CENTERS.j_cavendish)
        self:inject_card(G.P_CENTERS.j_turtle_bean)
        self:inject_card(G.P_CENTERS.j_diet_cola)
        self:inject_card(G.P_CENTERS.j_popcorn)
        self:inject_card(G.P_CENTERS.j_ramen)
        self:inject_card(G.P_CENTERS.j_selzer)
    end,
})
brittle yacht
#

i wouldnt think so

#

cuase theres no picture

#

yeah

#

thats what i thought

faint yacht
#

-# Reserved Parking as food, lol-

brittle yacht
#

alr thanks

pastel kernel
#

Is there already a way to make it so that you can see during scripting which syntax works and which one does not?

lament agate
#

who would skip pavement as a dessert

pastel kernel
#

Like

#

It’ll highlight the syntax if it’s right or wrong

pastel kernel
red flower
#

if using vs code, look up lua in the extensions and install the one by sumneko

#

if not using vscode, then do

harsh bobcat
#

What function do I use to add a joker? I tris SMODS.create_card(){} but it doesn't seem to have a value to specify a card.

brittle yacht
#

im dumb

harsh bobcat
red flower
brittle yacht
#

is adding key_append optional for a booster?

red flower
#

yes

brittle yacht
#

ight bet

harsh bobcat
#

Yeah I clicked that but I didn't see the line

#

thanks though

harsh bobcat
brittle yacht
#

so if my set in the booster was "sillyjoker", would the area be G.sillyjoker?

red flower
brittle yacht
tight hull
#

bump

brittle yacht
#
    key = 'sillyboosternormal',
    loc_txt = {
        name = 'Silly Booster',
        config = { extra = 2, choose = 1 },
        text = { 
            'Choose 1 of up to 3 Silly Joker cards!'
        }
    },
    atlas = 'sillybooster1',
    pos = {x = 0, y = 0},
    weight = 1,
    cost = 3
    loc_vars = function(self, info_queue, card)
            local cfg = (card and card.ability) or self.config
            return {
            vars = { cfg.choose, cfg.extra },
            key = self.key:sub(1, -3),        }
    end,
    ease_background_colour = function(self)
        ease_background_colour_blind(G.STATES.BUFFOON_PACK)
    end,
    create_card = function(self, card, i)
        return { set = "sillyjoker", area = G.pack_cards, skip_materialize = true, soulable = true, }
    end,

}```
line 95 is "SMODS.Booster{"
red flower
#

hmm no that probably wont work

#

save the gradient to a local and use it

brittle yacht
#

line 108 is "loc_vars"

red flower
brittle yacht
#
    key = 'sillyboosternormal',
    config = { extra = 2, choose = 1 },
    loc_txt = {
        name = 'Silly Booster',
        text = { 
            'Choose 1 of up to 3 Silly Joker cards!'
        }
    },
    atlas = 'sillybooster1',
    pos = {x = 0, y = 0},
    weight = 1,
    cost = 3,
    loc_vars = function(self, info_queue, card)
            local cfg = (card and card.ability) or self.config
            return {
            vars = { cfg.choose, cfg.extra },
            key = self.key:sub(1, -3),        }
    end,
    ease_background_colour = function(self)
        ease_background_colour_blind(G.STATES.BUFFOON_PACK)
    end,
    create_card = function(self, card, i)
        return { set = "sillyjoker", area = G.pack_cards, skip_materialize = true, soulable = false }
    end,

}
brittle yacht
lament agate
#

attempt to compare number with string

#

besides the obvious

#

what does this mean

brittle yacht
#

?

red flower
lament agate
brittle yacht
#

what???

lament agate
#

and

#

SMODS tangent "imrocksolidrnouuugh.lua"]:2309: attempt to compare number with string

Additional Context:

brittle yacht
#

oh

red flower
brittle yacht
#

"a nil value?"

modern kindle
#

is there a command i could do in debug to make all non visible hands visible

red flower
#

eval for _, v in ipairs(G.GAME.hands) do v.visible = true end

#

probably

modern kindle
#

that sure did say nil

#

lmao

brittle yacht
#

vro what 😭 🙏

#
    key = 'sillyboosternormal',
    path = 'sugarseed.png',
    px = 71,
    py = 95
    }

SMODS.Booster{
    key = "sillyboosternormal",
    weight = 1,
    cost = 4,
    pos = { x = 0, y = 8 },
    config = { extra = 2, choose = 1 },
    loc_vars = function(self, info_queue, card)
        local cfg = (card and card.ability) or self.config
        return {
            vars = { cfg.choose, cfg.extra },
            key = self.key:sub(1, -3),
        }
    end,
    ease_background_colour = function(self)
        ease_background_colour_blind(G.STATES.BUFFOON_PACK)
    end,
    create_card = function(self, card, i)
        return { set = "sillyjoker", area = G.pack_cards, skip_materialize = true, soulable = false }
    end,
}

-- ObjectTypes
    SMODS.ObjectType({
    key = 'sillyjoker',
    cards = {},
    inject = function(self)
        SMODS.ObjectType.inject(self)
        self:inject_card(G.P_CENTERS.j_silly_sugarapple1)
    end,
})
red flower
modern kindle
#

awsum thanks bestie westie

tight hull
modern kindle
#

damn why do i got 3 pages of hands so far

red flower
brittle yacht
red flower
#

is that the correct key

brittle yacht
#

i might have figured it out

#

hold on

#

well it wasnt the right key and i fixed it but it still gives me this

red flower
#

it's complaining about a b_zodiac

brittle yacht
#

what in the world is a b_zodiac

red flower
#

dunno

brittle yacht
#

vro im so confuzzled...

wintry solar
#

Are you trying to create a card somewhere?

brittle yacht
#

well its a booster pack

wintry solar
#

It does this when it ends up with UNAVAILABLE as the key

brittle yacht
#

what

#
    key = 'sillyboosternormal',
    weight = 1,
    cost = 4,
    pos = { x = 0, y = 8 },
    config = { extra = 2, choose = 1 },
    loc_vars = function(self, info_queue, card)
        local cfg = (card and card.ability) or self.config
        return {
            vars = { cfg.choose, cfg.extra },
            key = self.key:sub(1, -3),
        }
    end,
    ease_background_colour = function(self)
        ease_background_colour_blind(G.STATES.BUFFOON_PACK)
    end,
    create_card = function(self, card, i)
        return { set = "sillyjoker", area = G.pack_cards, skip_materialize = true, soulable = false }
    end,
}
wintry solar
#

Where are creating that set?

brittle yacht
#
    SMODS.ObjectType{
    key = 'sillyjoker',
    cards = {},
    inject = function(self)
        SMODS.ObjectType.inject(self)
        self:inject_card(G.P_CENTERS.j_silly_sugarapple)
    end,
}
wintry solar
#

I think your object type isn’t actually getting any cards in it then

brittle yacht
#

do i have to put it in cards = {},

wintry solar
#

Maybe? I haven’t had any experience using object types

brittle yacht
#

sorry im new to this

#

hmm

molten relic
#

maybe refer to the steamodded guide? or did you do that already

brittle yacht
#

i tried

#

hold on a sec

#

I FIXED IT

#

WE ARE GOOD GANG

tight hull
#

i mean for the virable to read in .json

pastel kernel
#

how do you make this synergize with pareidolia? (and maximized if possible)

        -- Check for 4 Aces or 4 Face cards
        if context.before then
            local ace_count = 0
            local face_count = 0
            for _, playing_card in ipairs(context.scoring_hand) do
                local card_id = playing_card:get_id()
                if card_id == 14 then
                    ace_count = ace_count + 1
                elseif card_id == 11 or card_id == 12 or card_id == 13 then
                    face_count = face_count + 1
                end
            end
            if ace_count >= 4 or face_count >= 4 then
                card.ability.extra.xmult = card.ability.extra.xmult + card.ability.extra.xmult_mod
                return {
                    message = "Boost!",
                    colour = G.C.MULT,
                    card = card
                }
            end
        end
sullen brook
#

Question for clarification (code nabbed from VanillaRemade)

In this example, loc_vars is the name of the function, correct? Or is that pointing elsewhere?

red flower
red flower
nocturne garnet
red flower
daring fern
harsh bobcat
#

I can't find the context for a card being discarded. I want the card to be destroyed when discarding it while it has this enhancement

harsh bobcat
#

right

nocturne garnet
harsh bobcat
harsh bobcat
red flower
daring fern
#

Also update doesn't have context

harsh bobcat
#

so just calculate?

#

no

#

right?

red flower
harsh bobcat
#

Yeah does make sence i suppose

sonic cedar
#

Morning, moddingdev!
can a button's click detection behavior be reversed?
As in while the Object is unclicked the button is visible, but isn't visible while the object IS clicked.

tight hull
red flower
red flower
tight hull
red flower
#

yes

molten relic
#
    key = "poisoned",
    atlas = 'custom_enhancements',
    pos = { 
        x = 0, 
        y = 0 
    },
    config = { 
        extra = { 
            mult = 1, 
            mult_mod = 1 
        }
    },
    loc_txt = {
        ['name'] = "Poisoned",
        ['text'] = {
            "This card gains +#2# {C:red}Mult{}",
            "when scored"
        }
    },
    loc_vars = { vars = { card.ability.extra.mult, card.ability.extra.mult_mod } }
    end,
    calculate = function(self, card, context)
        if context.individual and context.cardarea == G.play and not context.other_card.debuff then
            card.ability.extra.mult = card.ability.extra.mult + card.ability.extra.mult_mod
                return {
                    message = localize('k_upgrade_ex'),
                    colour = G.C.MULT
                end
            end
        end
    end,
}```
#

would this work?

daring fern
molten relic
#

owh

sonic cedar
molten relic
#

can you help me fix it?

daring fern
molten relic
#

oh ok

red flower
daring fern
molten relic
#

owh

mild grove
#

Am i doing this right? Trying to get the customsound to load

sonic cedar
daring fern
molten relic
# daring fern No.

btw, a crash log states that i should already close the SMODS.Enhancement{ by the end, at loc_vars

sonic cedar
daring fern
mild grove
molten relic
#

oh my god did i forget that

modern kindle
daring fern
modern kindle
#

so i heard

molten relic
#

man

sonic cedar
modern kindle
#

nah no need to get up

mild grove
sonic cedar
red flower
sonic cedar
#

are you serious

#

im about to format the hell out of my overrides file then

red flower
#

yeah hooks don't need order because they're already defined

sonic cedar
#

thats so grea

#

t

red flower
#

unless you specifically need two hooks of the same function to run in a specific order

molten relic
#

i thought you could use atlas

daring fern
molten relic
#

then whats going wrong

#
SMODS.Enhancement {
    key = "poisoned",
    atlas = 'custom_enhancements',
    pos = { 
        x = 0, 
        y = 0 
    },```
daring fern
molten relic
#

oooo

#

i called it custom_enhancers

#

classic typo

tight hull
harsh bobcat
#

How do I add an enhancement to a random card in the deck/hand?

scarlet imp
#

you could use pseudorandom_element to choose a random card from the deck or from the hand

mild grove
scarlet imp
#

for the hand, you could do G.hand.cards to access the cards in hand, but I forget how to get the cards from the deck

modern kindle
#

i think id have to shoot myself if thats what i heard entering a blind

harsh bobcat
mild grove
scarlet imp
#

pseudorandom_element(G.hand.cards)
pseudorandom_element selects a random element from a table, and G.hand.cards is a table

brittle yacht
#

does not need fixing

scarlet imp
mild grove
#

had no clue a single goose could lock my game

scarlet imp
#

I think it's perfect, the birb just trolls you

#

run over

sonic cedar
#

that goose's throat is doomed

harsh bobcat
lament agate
#

@zealous glen

brittle yacht
#

trying to make a joker that has a 50/50 chance to give yuor either X2 mult or -5 mult, how would i do this?

sonic cedar
#

you really did ping him at modding dev

lament agate
#

god damnit

#

im not finished

#
soul_pos = {
    x = 3,
    y = 1,
    draw = function(card, scale_mod, rotate_mod)
        local anim_timer = ((G.TIMERS.REAL/4) % 1)
        local growth_phase = anim_timer < 0.9
        local scale_ease = growth_phase and 
            (anim_timer < 0.5 and 2*(anim_timer/0.9)^2 or 1 - 2*(1 - (anim_timer/0.9))^2) or 0
        local min_scale = 0.2  
        local max_scale = 1.5  
        local current_scale = min_scale + (max_scale - min_scale) * scale_ease
        local rotation = current_scale * 0.15 * math.sin(anim_timer * 2 * math.pi)
        local y_offset = -0.2 * current_scale
        card.children.vic_floating_sprite:draw_shader('dissolve', 0, nil, nil, card.children.center,
            current_scale, rotation, nil, y_offset, nil, 0.6)
        card.children.vic_floating_sprite:draw_shader('dissolve', nil, nil, nil, card.children.center,
            current_scale, rotation, nil, y_offset, nil, 0.6)

        card.children.floating_sprite:draw_shader('dissolve', 0, nil, nil, card.children.center, 
            current_scale, rotation, nil, y_offset, nil, 0.6)
        card.children.floating_sprite:draw_shader('dissolve', nil, nil, nil, card.children.center,
            current_scale, rotation, nil, y_offset, nil, 0.6)
    end
    },
modern kindle
#

vic my goat

lament agate
#

so the card children

zealous glen
lament agate
#

i already set all of the things

modern kindle
#

what poppin vic

lament agate
#

except the child

#

im confused

zealous glen
zealous glen
modern kindle
#

trying to get this fuck ass edition to work how i want to but hooking and making it happen is straight up not happening

lament agate
zealous glen
#

I can’t read that

lament agate
#

ghhhhh

zealous glen
#

Describe it to me via interpretative dance

#

Or take a screenshot

#

Or just use words

lament agate
#

💃

#

🕺

lament agate
scarlet imp
#

where "key" is the edition's key

zealous glen
modern kindle
# zealous glen What’s the Edition

basically once the edition applies its meant to give a secondary bonus different each time it scores
i had asked something before how to do it and he gave me a suggestion but i shrimply cannot figure it out which was hooking smods.calculate_context and checking post trigger for values it has

the idea is the edition will let the card score once, then it scored 'again' with a value up to 150% bonus

ie, if its cavendish it will score once for x3, and then a second time it will score again anywhere from x1 to x4.5 immediately after

zealous glen
#

That excerpt you posted just draws an existing child

modern kindle
#

it lets you score up to 150% of its value

zealous glen
#

Also

#

How many layers does your sprite have?

scarlet imp
#

so the complete thing would be

local _card = pseudorandom_element(G.hand.cards)
_card:set_edition("e_key", true

try that

lament agate
lament agate
#

the soul and the card

zealous glen
#

Just refer to the existing soul sprite

harsh bobcat
lament agate
zealous glen
scarlet imp
#

it would be _card:set_ability then

pastel kernel
#

so this apparently counts every single card in the deck.

        if context.end_of_round then
            card.ability.extra.stockpile_return = card.ability.extra.stockpile_return + card.ability.extra.stockpile_add
            return {
                message = "+" .. card.ability.extra.stockpile_return .. "Stockpile!",
                colour = G.C.DARK_EDITION,
                card = card
lament agate
zealous glen
#

Not the Card.children.vic_…

lament agate
# zealous glen Well, the sprite is `Card.children.floating_sprite`, so you only need to manipul...
        card.children.vic_floating_sprite:draw_shader('dissolve', 0, nil, nil, card.children.center,
            current_scale, rotation, nil, y_offset, nil, 0.6)
        card.children.vic_floating_sprite:draw_shader('dissolve', nil, nil, nil, card.children.center,
            current_scale, rotation, nil, y_offset, nil, 0.6)

        card.children.floating_sprite:draw_shader('dissolve', 0, nil, nil, card.children.center, 
            current_scale, rotation, nil, y_offset, nil, 0.6)
        card.children.floating_sprite:draw_shader('dissolve', nil, nil, nil, card.children.center,
            current_scale, rotation, nil, y_offset, nil, 0.6)
#

so i just

#

get rid of vics?

#

aight

#
soul_pos = {
    x = 3,
    y = 1,
    draw = function(card, scale_mod, rotate_mod)
        local anim_timer = ((G.TIMERS.REAL/4) % 1)
        local growth_phase = anim_timer < 0.9
        local scale_ease = growth_phase and 
            (anim_timer < 0.5 and 2*(anim_timer/0.9)^2 or 1 - 2*(1 - (anim_timer/0.9))^2) or 0
        local min_scale = 0.2  
        local max_scale = 1.5  
        local current_scale = min_scale + (max_scale - min_scale) * scale_ease
        local rotation = current_scale * 0.15 * math.sin(anim_timer * 2 * math.pi)
        local y_offset = -0.2 * current_scale
        card.children.floating_sprite:draw_shader('dissolve', 0, nil, nil, card.children.center, 
            current_scale, rotation, nil, y_offset, nil, 0.6)
        card.children.floating_sprite:draw_shader('dissolve', nil, nil, nil, card.children.center,
            current_scale, rotation, nil, y_offset, nil, 0.6)
    end
    },
tight hull
#

asking once again, maybe this time there is someone that knows, can I somehow link SMODS.Gradient to (mod)badge_colour?

lament agate
#

@zealous glen should be good now?

brittle yacht
#

trying to make a joker that has a 50/50 chance to give you either X2 mult or -5 mult, how would i do this?

zealous glen
zealous glen
zealous glen
modern kindle
scarlet imp
brittle yacht
#

oop

#

ok

scarlet imp
#

something like that should work

brittle yacht
#

lemme see

scarlet imp
#

as long as you are on the probability branch of SMODS

lament agate
#

@zealous glen it worked!!

#

thank you

zealous glen
#

As I said, I gave up on a similar effect

#

It’s have retriggered a card with X% efficiency

brittle yacht
zealous glen
#

Like Critical Hits

modern kindle
#

we fight for our lives, i dmed winter cause shes very smart on that stuff to see if she would be willing

brittle yacht
scarlet imp
#

actually hang on, do you want it to be a 50/50 regardless of probability Jokers or no?

modern kindle
#

my next plan is to figure out how to properly add a health bar to one joker but alas that also proves difficult for me

tight hull
#

sorry for the ping but are patches useful in this case?

brittle yacht
mild grove
#

Ima add a en-us.lua so i can have some more control for my custom content

scarlet imp
#

ok, the code I gave you would always pick the xmult if you have oops all 6's
if you want to do random always, you should hardcode the random chance

#

pseudorandom("seed") < 1 / 2 or something like that

brittle yacht
#

so where would i put that?

#

sorry im a bit new to this stuff

scarlet imp
#

in the place of pseudorandom_probability

zealous glen
red flower
modern kindle
#

i was lookin at ccreate progress bar as well as corobos alloy mod

#

bepis unfortunately does not remember how create progress bar works so i need to dive in and figure it out eventually

scarlet imp
#

I was gonna suggest Corobo's mod but they have it for the player

#

not for a Joker

manic rune
#

:3

modern kindle
#

lmfao

modern kindle
brittle yacht
#
    key = 'EVIL',
    loc_txt = {
        name = '{C:hearts}EVIL{} Joker',
        text = {
            '{X:mult,C:white}X#1#{} Mult or {C:mult}-5{} Mult'
        }
    },
    atlas = 'sugar',
    pos = {x = 0, y = 0},
    rarity = 2,
    cost = 4,
    config = { extra = { odds = 2, mult = -5, x_mult = 2 } },

    if context.joker_main then
        if pseudorandom("seed") < 1 / 2(card, "seed", 1, card.ability.extra.odds) then
            return {
                x_mult = card.ability.extra.x_mult
               }
        else
            return {
                mult = card.ability.extra.mult
            }
        end
    end
}```
modern kindle
#

ok bro

manic rune
brittle yacht
#

im so stupid

manic rune
#

lmao

scarlet imp
manic rune
#

did it not, show you a red line there though?

tight hull
modern kindle
#

what the heck is wrong with ui

manic rune
#

oh what the hell is that 2(card, "seed", 1, card.ability.extra.odds)

tight hull
modern kindle
#

lmfao

scarlet imp
brittle yacht
#

my crash report doesnt like line 68, which is if context.joker_main then

brittle yacht
scarlet imp
#

make sure you have a calculate function lol

#

rn its just sitting there

brittle yacht
#

GOOD LORD IM AN IDIOT

scarlet imp
#

its all good man

brittle yacht
#

bro what 😭

#

line 80?

#
    key = 'EVIL',
    loc_txt = {
        name = '{C:hearts}EVIL{} Joker',
        text = {
            '{X:mult,C:white}X#1#{} Mult or {C:mult}-5{} Mult'
        }
    },
    atlas = 'sugar',
    pos = {x = 0, y = 0},
    rarity = 2,
    cost = 4,
    config = { extra = { odds = 2, mult = -5, x_mult = 2 } },
    
    calculate = function(self, card, context)
    if context.joker_main then
        if pseudorandom("seed") < 1 / 2 then
            return {
                x_mult = card.ability.extra.x_mult
               }
        else
            return {
                mult = card.ability.extra.mult
            }
        end
    end
}
#

line 80 is the last one bro 😭

scarlet imp
#

you need to end calculate too

brittle yacht
#

GAH

#

GET OUT OF MY HEAD...

scarlet imp
#

just a question, what IDE do you use

brittle yacht
#

ide?

scarlet imp
#

like what software do you code in

brittle yacht
#

uh

#

notepad... laughatthisuser

#

im deadahh special

modern kindle
#

i need you to use some vscode with the lua extension

scarlet imp
#

there's other people here that use notepad, but yeah I'd recommend you use to VSC so that it can catch that kind of stuff for you

brittle yacht
#

ight mb

#

ill get there

#
    key = 'EVIL',
    loc_txt = {
        name = '{C:hearts}EVIL{} Joker',
        text = {
            '{X:mult,C:white}X#1#{} Mult or {C:mult}-5{} Mult'
        }
    },
    atlas = 'sugar',
    pos = {x = 0, y = 0},
    rarity = 2,
    cost = 4,
    config = { extra = { odds = 2, mult = -5, x_mult = 2 } },
    
    calculate = function(self, card, context)
        if context.joker_main then
            if pseudorandom("seed") < 1 / 2 then
                return {
                    x_mult = card.ability.extra.x_mult
                   }
            else
                return {
                    mult = card.ability.extra.mult
                }
            end
        end
    end
}```
is this good
scarlet imp
#

should be 👍 although I would recommend playing a high card with this, would it result in negative mult?

#

since high card normally starts with 1

brittle yacht
#

probably

scarlet imp
#

funny

brittle yacht
#

real

#

alright so i got one more thing

#

the description

scarlet imp
#

is it buggin

brittle yacht
#

in game says "Xnil Mult or -5 Mult"

ancient mango
#

how do i change the textures of the playing cards(or all the textures actually) in smods

scarlet imp
#

you're missing a loc_vars function and some of your colors are wrong I think

brittle yacht
#

nah the colors are right

ancient mango
scarlet imp
brittle yacht
#

think i got it now

#
    key = 'EVIL',
    loc_txt = {
        name = '{C:hearts}EVIL{} Joker',
        text = {
            '{X:mult,C:white}X#1#{} Mult or {C:mult}-5{} Mult'
        }
    },
    atlas = 'sugar',
    pos = {x = 0, y = 0},
    rarity = 2,
    cost = 4,
    config = { extra = { odds = 2, mult = -5, x_mult = 2 } },
    loc_vars = function(self,info_queue,center)
        return {vars = {center.ability.extra.x_mult}}
    end,

    calculate = function(self, card, context)
        if context.joker_main then
            if pseudorandom("seed") < 1 / 2 then
                return {
                    x_mult = card.ability.extra.x_mult
                    message = 'X' .. card.ability.extra.x_mult,
                    colour = G.C.MULT

                   }
            else
                return {
                    mult = card.ability.extra.mult
                    message = .. card.ability.extra.mult,
                    colour = G.C.MULT

                }
            end
        end
    end
}```
#

i added message

#

plus the loc_vars

scarlet imp
#

change center to card in loc_vars

#

the arguments

brittle yacht
#

still the same error

#

its about the messages

ancient mango
brittle yacht
#

line 74

#

and line 76

daring fern
scarlet imp
#

the message should appear automatically if all you want it to say is +mult or Xmult

brittle yacht
#

oh mb

scarlet imp
#

try it without first

brittle yacht
#

ok well

ancient mango
brittle yacht
#

the game didnt crash

#

it doesnt say Xnil

daring fern
ancient mango
#

how?

brittle yacht
#

alr thank you it works

#

now i spend an hour making a sprite!

#

probably more like 5 min

daring fern
ancient mango
ancient mango
ancient mango
#

...or the playstack logo

#

like i want to change ALL of theses textures

red flower
ancient mango
#

thx

brittle yacht
#

@scarlet imp i think it might be a bit unbalanced guys...

ancient mango
#

wait is it based on the yahimod evil edition?

brittle yacht
#

HOWD YOU KNOW

#

i nerfed it to -3 mult btw

scarlet imp
#

I think its fine, you just got pretty unlucky

#

99% of gamblers quit before their big win, you know

ancient mango
brittle yacht
brittle yacht
tight hull
scarlet imp
brittle yacht
scarlet imp
#

it'll have its use I bet

ancient mango
#

these my mods

brittle yacht
#

real]

tight hull
#

how do I check if the joker slots are full?

#

a bit like riff-raff

brittle yacht
#

i literally only have yahimod, debugplus, mymod, and a couple of custom customize deck mod options

scarlet imp
#

you should totally download @scarlet imp 's mod

scarlet imp
#

jk it's WIP and probably will be for like a year bc of how much I wanna add

modern kindle
tight hull
scarlet imp
#

yes
no

modern kindle
#

is ues

Iirc means if I remember correctly

#

What

#

The '#' is code yes

#

Fuckin discord formatting man

#

Hate it

sullen brook
#

If I have a config array item for a deck, how do I set a variable to a numerical value based off the number of items in that array?

startingjokers = {'j_name', 'j_name'}

lament agate
#
soul_pos = {
    x = 3,
    y = 1,
    
    set_sprites = function(self, card, front)
        if self.discovered or card.bypass_discovery_center then
            card.children.floating_sprite = Sprite(card.T.x, card.T.y, card.T.w, card.T.h,
                G.ASSET_ATLAS[card.config.center.atlas], {
                    x = 3,
                    y = 1 
                })
            card.children.floating_sprite.role.draw_major = card
            card.children.floating_sprite.states.hover.can = false
            card.children.floating_sprite.states.click.can = false
        end
    end,

    draw = function(card, scale_mod, rotate_mod)
        if not (card.hovered and card.states.hover) or not card.children.floating_sprite then 
            if card.children.floating_sprite then
                card.children.floating_sprite:draw_shader('dissolve', nil, nil, nil, card.children.center, 
                    0.2, 0, nil, 0, nil, 0.6)
            end
            return 
        end
        local anim_timer = ((G.TIMERS.REAL/2) % 1)
        local growth_phase = anim_timer < 0.9
        local scale_ease = growth_phase and 
            (anim_timer < 0.5 and 2*(anim_timer/0.9)^2 or 1 - 2*(1 - (anim_timer/0.9))^2) or
            0
        local min_scale = 0.1
        local max_scale = 1.5
        local current_scale = min_scale + (max_scale - min_scale) * scale_ease
        local rotation = current_scale * 0.15 * math.sin(anim_timer * 2 * math.pi)
        local y_offset = -0.2 * current_scale
        card.children.floating_sprite:draw_shader('dissolve', nil, nil, nil, card.children.center, 
            current_scale, rotation, nil, y_offset, nil, 0.6)
    end
},
#

@zealous glen

scarlet imp
tight hull
zealous glen
lament agate
#

both unhovered and hovered

sullen brook
zealous glen
lament agate
#

theres 4

scarlet imp
zealous glen
#

That has three clauses

#

Comment them out

lament agate
# zealous glen The first one
if self.discovered or card.bypass_discovery_center then
            card.children.floating_sprite = Sprite(card.T.x, card.T.y, card.T.w, card.T.h,
                G.ASSET_ATLAS[card.config.center.atlas], {
                    x = 3,
                    y = 1 
                })
            card.children.floating_sprite.role.draw_major = card
            card.children.floating_sprite.states.hover.can = false
            card.children.floating_sprite.states.click.can = false
        end
#

this?

zealous glen
knotty compass
#

random question how do you make a card overwrite chip value and give specified amount on an enhancement like the stone card?

lament agate
zealous glen
zealous glen
lament agate
#

set_sprites ifs

lament agate
knotty compass
sullen brook
knotty orchid
#

Hey! Im trying to make a joker that triggers if no other joker has activated that hand. Any context or G.Game for this?

zealous glen
zealous glen
#

I’m talking about the code that moves it

lament agate
#
if not (card.hovered and card.states.hover) or not card.children.floating_sprite then 
            if card.children.floating_sprite then
                card.children.floating_sprite:draw_shader('dissolve', nil, nil, nil, card.children.center, 
                    0.2, 0, nil, 0, nil, 0.6)
            end
            return 
        end
#

comments out this?

zealous glen
#

The first if at least

lament agate
scarlet imp
#

but I've also never made a deck before

zealous glen
lament agate
#

aghh

#

finee

zealous glen
#

You didn’t comment out the end 😭

lament agate
#

oh

#

my bad

lament agate
inner cobalt
#

this should work as a .json script to make it show up in the mods list right?

#

(its my first time coding anything so I'm really bad at it)

mild grove
#

I'm trying to get the info from the en-us.lua to tag joker as a way to cut down on code in my joker files.

Here's an example from the VanillaRemade joker

zealous glen
zealous glen
sturdy compass
inner cobalt
#

nope

sturdy compass
#

Is the file name the same as the folder it’s in?

inner cobalt
#

(I'm stupid I don't know what you mean)

sturdy compass
#

For example, if your mod’s folder is called “your_mod”, you should have the json named “your_mod.json”

wintry solar
#

That shouldn’t make a difference

inner cobalt
#

let me try it anyway

wintry solar
#

-# it won’t make a difference at all it doesn’t matter what thet file is called

inner cobalt
#

yeo

#

yep*

fallow breach
#

anyone know how when using context.before, i get my joker's effect to proc after the cards are raised instead of before (e.g. vampire)

inner cobalt
#

didn't do anything

fallow breach
#

when vampire (left) does it, it runs its effect after the cards are raised, and also juices the cards and displays a message all at the same time

#

when mine (right) does it, the suits change as soon as the hand is played, with the message and juice happening after the cards are raised like with vampire

inner cobalt
#

This should work but it doesn't

#

@lament agate do you know why this doesn't work?

sturdy compass
inner cobalt
#

like it just doesn't appear here

gaunt thistle
sturdy compass
#

Idk if it’s a huge deal but dependencies is misspelled

inner cobalt
#

it is

#

oh it is

sturdy compass
#

And conflicts should be plural

#

Again idk if that’s what’s doing it but def worth fixing

inner cobalt
#

nope didn't work

sturdy compass
#

You are saving your files right

inner cobalt
#

?

sturdy compass
#

ctrl + s while the file is opened

inner cobalt
#

holy shit

#

I'm an idiot

sturdy compass
#

😭

inner cobalt
#

thank you so much

sturdy compass
#

Tbf you did say you’re new to this whole thing

inner cobalt
#

correct

sturdy compass
#

Best get into the habit of it now lol

#

ctrl + s spamming my beloved

inner cobalt
#

lol

scarlet imp
#

yeah frl

#

type anything -> ctrl+s true combo

sturdy compass
#

Anyways, getting your mod to load in my eyes officially makes you a dev, so welcome to the hobby

lament agate
#

spamming it until they filed a cease and desist letter

tepid crow
#

you guys' editors don't save the file every other second?

#

I think I had to enable vscode to auto-save when window was unfocussed

scarlet imp
#

I hate autosaves, that's just a me thing I think though

sturdy compass
scarlet imp
#

I want FULL CONTROL

tight hull
#

I just didnt know such a thing existed

tepid crow
scarlet imp
#

that's why you save

#

if you're looking for a logical explanation I don't have one

#

just a pet peeve ig

sturdy compass
#

I personally don’t want things getting saved that I don’t want saved. It’s a weird mental thing but that’s how I roll

tepid crow
#

Yeah I'm making the pc do it for me instead of me having to press it manually

#

interesting

scarlet imp
inner cobalt
#

whenever I try to load in balatro with the joker I made this pops up

viral ember
#

is there an easy way to get the final round score?

hallow slate
#

How do I add new colors for tooltips and stuff

#

I forgor...

inner cobalt
viral ember
#

where is Jokers.png located?

tight hull
#

could you send the assets folder?

inner cobalt
#

hold on

#

turns out

#

I'm an idiot

tight hull
inner cobalt
#

and put .png

#

so it was jokers.png.png

foggy ginkgo
#

Is there a context.card.cost for vouchers

viral ember
#

how would I get this value?

pure salmon
#

is there a context before context.before but after context.press_play?

#

i want to destroy the leftmost played card between those two

red flower
viral ember
#

thank you NH'

red flower
#

and a couple of other blind ones

sturdy compass
# inner cobalt

You don’t need the Steamodded header anymore since you’re using .json metadata

inner cobalt
#

oh

sturdy compass
#

You have much to learn (and we’ll help!!)

tepid crow
sturdy compass
scarlet imp
sturdy compass
#

You know what would really tell you how far you’ve come?

Not having it anymore tr

scarlet imp
#

On release

#

it goes

sturdy compass
#

Bet

ashen adder
tight hull
ashen adder
sturdy compass
#

What the fuck 😭

tight hull
#

i forbid you

#

or smth

umbral zodiac
sturdy compass
#

I’m revoking your IDE priviledges

ashen adder
#

you have'nt seen nothing yet... that's just the beginning

tight hull
#

oh no...

sturdy compass
#

Uh oh

tight hull
scarlet imp
#

is there a way I can find out what booster pack I'm in if all I have to work with is G.STATE

primal robin
foggy ginkgo
rotund sable
sturdy compass
ashen adder
#

actually i wasted an entire yesterday trying to understand how to do this and today figured it out in like 20 mins lol

ashen adder
sturdy compass
#

You’re trying to do this in the RUN??????

ashen adder
#

yeah i want it to be a joker ability

sturdy compass
#

😭

sturdy compass
#

You people scare me sometimes

ashen adder
#

god forbid people have fun 🫠

sturdy compass
#

It’s not like we’re telling you to stop

tight hull
ashen adder
#

im kinda of a noobie

tight hull
ashen adder
#

that guy*

scarlet imp
#

is there documentation for states added to G.STATES by SMODS?

wintry solar
scarlet imp
#

yeah I have that but I just want to do a bit more research

#

bc if possible I would like to know what kind of pack I'm in, like a Tarot pack specifically for example

wintry solar
#

Yeah that global should be the pack object

scarlet imp
#

so check G.STATES.SMODS_BOOSTER_OPENED.config.center.key?

#

or something like that?

bold sleet
#

Hey every. Does anyone happen to know where the code to make the title screen do stuff is? I am looking to add a 'thing' to the title screen, similar to how Cryptid or Multiplayer does it.

red flower
wintry solar
scarlet imp
#

thanks guys

red flower
#

<@&1133519078540185692>

scarlet imp
#

thanks mods

bold sleet
#

that was fast

#

@smods

bold sleet
#

ah

molten relic
#
SMODS.Atlas({
    key = "CustomJokers", 
    path = "CustomJokers.png", 
    px = 71,
    py = 95, 
    atlas_table = "ASSET_ATLAS"
}):register()```\
#

apparently something is wrong with this

red flower
#

why

bold sleet
#
SMODS.Atlas{
    key = "CustomJokers", 
    path = "CustomJokers.png", 
    px = 71,
    py = 95, 
    atlas_table = "ASSET_ATLAS"
}

Maybe? That's how most people register their atlases.

molten relic
#

ill grab the crash log

brittle yacht
#

trying to make a joker that destroys itself when bought

#

this should be pretty easy right?

molten relic
#

just use add_to_deck right

scarlet imp
#

yeah and then use SMODS.load_file("filepath") in your main file

molten relic
#

is this towards me?

#

so do i just do zat

scarlet imp
#

that's how I load all my files lol

ashen adder
molten relic
#

ok let us see maboi

ashen adder
#

are you readu guys?

#

my high contrast cards broke for some reason lmao

#

anyway

brittle yacht
#

is there even a context for buying?

#

or am i js dumb

molten relic
#

where do i put SMODS.load_file("filepath")

brittle yacht
#

nvm im dumb

scarlet imp
molten relic
#

in the code for where its needed?

#

or before?

scarlet imp
brittle yacht
#

context.buying_card

red flower
#

use add_to_deck

scarlet imp
#

oh shit that context exists

#

that's wild

brittle yacht
modern kindle
#

Im gonna start removing random contexts
Good luck fellas

molten relic
red flower
molten relic
ashen adder
#

wait

brittle yacht
#

turn it into a mp44444

ashen adder
#

yea

#

ok

brittle yacht
#

or .mov

ashen adder
#

one moment

modern kindle
#

Mp4 more like mp snore

scarlet imp
#

sorry I should have asked that first

molten relic
#

the atlas is in main.lua

red flower
modern kindle
#

I cant buy myself

scarlet imp
#

sorry I though it was in a separate file

brittle yacht
#
        if context.buying_card then
        {
            cardarea = G.jokers,
            buying_card = true
            card = self
        }
``` heres what i have so far im too stupid to figure out where the ```add_to_deck``` would go and how many indents in
molten relic
#

i have this rn

#
SMODS.Atlas({
    key = "CustomJokers", 
    path = "CustomJokers.png", 
    px = 71,
    py = 95, 
    atlas_table = "ASSET_ATLAS"
}):register()

 SMODS.load_file("C:\Program Files (x86)\Steam\steamapps\common\Balatro\Balatro.exe\resources\textures\1x\custom_enhancers")```
#

at the start of the file

red flower
tight hull
#

isnt assert better to do?

foggy ginkgo
#

Anyone know the context.card.cost but for vouchers

scarlet imp
#

i don't think you need to register the atlas or load the images

modern kindle
#

Im not familiar with the :register
Is that something we do?

red flower
ashen adder
molten relic
brittle yacht
red flower
#

check if the file is correct

brittle yacht
scarlet imp
tight hull
foggy ginkgo
ashen adder
#

I KNOW GUYS

tight hull
ashen adder
#

just wanted to showhow it would look in a run

molten relic
#
SMODS.Atlas({
    key = "CustomJokers", 
    path = "CustomJokers.png", 
    px = 71,
    py = 95, 
    atlas_table = "ASSET_ATLAS"


SMODS.Enhancement {
    key = "poisoned",
    atlas = 'custom_enhancers.png',```
#

i use a different atlas right after this

#

is that a problem mayhaps

brittle yacht
# red flower yes

so it should look like this?
if add_to_deck = function(self, card, from_debuff)

ashen adder
#

this isn't even it's final form yet btw

wintry solar
red flower
molten relic
brittle yacht
red flower
#

i link the line 😭

brittle yacht
#

mb

foggy ginkgo
#

Wanted a joker that changes the background

ashen adder
molten relic
#
SMODS.Atlas({
    key = "CustomJokers",  
    px = 71,
    py = 95, 
    atlas_table = "ASSET_ATLAS"
)}```
#

help

#

this incorrect?

ashen adder
#

It's not that hard to do tho btw

brittle yacht
ashen adder
#

just kinda funky

red flower
foggy ginkgo
#

Immediately

ashen adder
foggy ginkgo
#

I also need to know context.card.cost for vouchers but ig that can wait

molten relic
ashen adder
#

how do you paste code in discord

red flower
foggy ginkgo
#

Context.card.cost isn't working for vouchers or boosters so

foggy ginkgo
red flower
molten relic
ashen adder
#

test

#

k

red flower
foggy ginkgo
#
        if card.ability.extra.slycooper_remaining == 0 and context.buying_card and context.card.cost > 0 then
            card.ability.extra.slycooper_remaining = 1
            context.card.cost = 0
            return { message = "SNATCH!", colour = G.C.RED }
        end
sonic cedar
#

forgot im still hooking ui at the end of the day no wonder i want this world to burn

foggy ginkgo
#

I did this but vouchers and boosters don't come free

molten relic
#
    key = "poisoned",
    atlas = 'custom_enhancers',
    pos = { 
        x = 0, 
        y = 0 
    },
    config = { 
        extra = { 
            mult = 1, 
            mult_mod = 1 
        }
    },
    loc_txt = {
        ['name'] = "Poisoned",
        ['text'] = {
            "This card gains +#2# {C:red}Mult{}",
            "when scored"
        }
    },```\
red flower
#

yeah buying card doesn't work with boosters (or vouchers im pretty sure)

foggy ginkgo
#

😔

red flower
#

for boosters there's open_booster

molten relic
red flower
#

for vouchers idk

foggy ginkgo
#

Yeah that's the problem I have

red flower
molten relic
#

do i have to make another atlas?

red flower
#

yes

molten relic
#

:(

wintry solar
#

Dont vouchers trigger buying card?

#

I genuinely don’t remember 😂

sonic cedar
#
  1. does changing buy to toggle here create a new thing or will that break something
  2. card highlight uses the ui box thing, do i move the one i have hooked into use_and_sell buttons to the Card.highlight hook and that's the UIBox, or is it something else?
foggy ginkgo
#

I'm so dumb

ashen adder
#

so on add i used

        G.SPLASH_BACK:remove()
        G.SPLASH_BACK = nil
        G.SPLASH_BACK = Sprite(0, 0, 23, 13, G.ASSET_ATLAS["nanu_smartbg"], {x = 0, y = 0})
        G.SPLASH_BACK:set_alignment({
            major = G.ROOM_ATTACH,
            type = 'cm',
            offset = {x=0,y=0}
        })

and on remove

        G.SPLASH_BACK:remove()
        G.SPLASH_BACK = nil
        G.SPLASH_BACK = Sprite(-30, -6, G.ROOM.T.w+60, G.ROOM.T.h+12, G.ASSET_ATLAS["ui_1"], {x = 2, y = 0})
        G.SPLASH_BACK:set_alignment({
            major = G.play,
            type = 'cm',
            bond = 'Strong',
            offset = {x=0,y=0}
        })
        G.SPLASH_BACK:define_draw_steps({{
        shader = 'background',
        send = {
            {name = 'time', ref_table = G.TIMERS, ref_value = 'REAL_SHADER'},
            {name = 'spin_time', ref_table = G.TIMERS, ref_value = 'BACKGROUND'},
            {name = 'colour_1', ref_table = G.C.BACKGROUND, ref_value = 'C'},
            {name = 'colour_2', ref_table = G.C.BACKGROUND, ref_value = 'L'},
            {name = 'colour_3', ref_table = G.C.BACKGROUND, ref_value = 'D'},
            {name = 'contrast', ref_table = G.C.BACKGROUND, ref_value = 'contrast'},
            {name = 'spin_amount', ref_table = G.ARGS.spin, ref_value = 'amount'}
        }}})

which is just copypaste from vanilla code
don't know if this remove nil code is necessary but whatevs
And if anyone's wondering:
Yes, that's how you add / change a custom image background
or that's how i did anyway mb there's a smarter way to do this but who knows 🫠

foggy ginkgo
#

I should put buying_booster and buying_voucher

ashen adder
#

wait why is there no hihglight

#

well whatever ig

foggy ginkgo
#

I'll figure out this gibberish later

ashen adder
molten relic
#

finally it works

ashen adder
#

you can just copypaste this but just change the img source

#

i think it'll work

brittle yacht
#

if i want to add a custom sound, where would i put it in my folders

molten relic
#

Balatro.exe/resources/sounds i think

ashen adder
#

although if you wanna do that to the start menu u'll prob have to hook

brittle yacht
wintry wren
#

So I'm just trying to understand how jokers work before I even begin trying to code my own.

can someone possibly explain what the code in the red and blue boxes do and how they actually work?

molten relic
#

i put it in balatro.exe using 7zip

foggy ginkgo
#

Where do I put it

red flower
modern kindle
ashen adder
# foggy ginkgo Ah

well if you wanna do what i did, in your joker def, otherwise you'll probably have to figure that out in your know, for the main menu u can again prob just hook

#

*on your own

foggy ginkgo
#

Gulp

#

Do you mayhaps have a GitHub or nah

ashen adder
#

uhhhhhh i maybe will upload it in the future, although i kinda dont want share my github soooooo......

#

mayhbe maybe

modern kindle
#

what, you got some scary things on there

pure salmon
#

why does this permadebuff cards

ashen adder
foggy ginkgo
#

I'll wait

#

Nvm

#

I will fuck it we ball

tight hull
modern kindle
ashen adder
#

maybe i'll make another github acc or gitlab acc actually since i dont have one rn

#

yea

#

yea i know

red flower
foggy ginkgo
#

It's okay mate

modern kindle
ashen adder
#

the mod's not even remotely finished anyway so....

brittle yacht
#

alr whats wrong with my code...


SMODS.Joker{
    key = 'shyt',
    loc_txt = {
        name = 'Fine Shyt',
        text = {
            '*random screaming noise*'
        }
    },
    atlas = 'shyt',
    pos = {x = 0, y = 0},
    rarity = 1,
    cost = 0,

    add_to_deck = function(self, card, from_debuff)
        SMODS.destroy_cards(card)
        sound= "silly_scream",
    end
}
#

crash report said something on line 118

#

bottom line

red flower
#

sound= line is wrong

modern kindle
brittle yacht
#

done

modern kindle
#

im just a chill guy

tight hull
sullen brook
#

So if this ends the game in game over...
G.STATE = G.STATES.GAME_OVER
G.STATE_COMPLETE = false

...how does one trigger a Game Won?

brittle yacht
modern kindle
# tight hull I see

you should never fear any buffoon on the internet my friend, most of it is all talk and no action

brittle yacht
#
    key = 'shyt',
    path = 'evil.png',
    px = 71,
    py = 95
    }

SMODS.Sound({key = "scream", path = "scream.ogg",})

SMODS.Joker{
    key = 'shyt',
    loc_txt = {
        name = 'Fine Shyt',
        text = {
            '*random screaming noise*'
        }
    },
    atlas = 'shyt',
    pos = {x = 0, y = 0},
    rarity = 1,
    cost = 0,

    add_to_deck = function(self, card, from_debuff)
        SMODS.destroy_cards(card)
        sound = 'silly_scream',
    end
}
brittle yacht
scarlet imp
red flower
brittle yacht
#

how fix

sonic cedar
ashen adder
red flower
modern kindle
modern kindle
scarlet imp
#

I can use G.STATES.SMODS_BOOSTER_OPENED to see there there is a booster open, but not what kind it is

red flower
modern kindle
#

N i just ate some cobra bites

red flower
#

some what

modern kindle
#

cobra bites

#

bacon wrapped jalapeno poppers

red flower
#

im sorry for you

modern kindle
#

lmfao

brittle yacht
#
    key = 'shyt',
    path = 'evil.png',
    px = 71,
    py = 95
    }

SMODS.Sound({key = "scream", path = "scream.ogg",})

SMODS.Joker{
    key = 'shyt',
    loc_txt = {
        name = 'Fine Shyt',
        text = {
            '*random screaming noise*'
        }
    },
    atlas = 'shyt',
    pos = {x = 0, y = 0},
    rarity = 1,
    cost = 0,

    add_to_deck = function(self, card, from_debuff)
        SMODS.destroy_cards(card)
        play_sound('silly_scream', 1, 1),
    end
}
red flower
#

that sounds good tho

modern kindle
#

dont be sad, get glad

red flower
brittle yacht
#

nvm i fixed it

red flower
#

pls use vscode with the lua extension

modern kindle
#

on my hands and knees begging for vscode

brittle yacht
#

ill get it later

modern kindle
#

it will always be later

#

must do it now

sullen brook
red flower
#

im not that mean but im always thinking about making it a personal rule to not reply to syntax errors haha

sonic cedar
modern kindle
#

what if you do it and see what happens

sonic cedar
#

i dont know what it IS 😭

molten relic
#

how do i make a joker add an enhancement to a scored card?

#

im looking at some tarots and confused

red flower
#

midas mask?

molten relic
#

oh yeah

#

lol

#

i was looking for a joker that did something similiar 😭

#

couldnt find it

#

thank

modern kindle
#

unfortunately that was not free, you now owe N 1 silver coin
as his manager i get a single bronze coin as well

molten relic
rotund sable
#

If we owed a penny to N' for every time he helped us he would probably be a millionaire

molten relic
#

more so

#

gazillionaire

sonic cedar
#

then i currently owe n 14 cents

modern kindle
#

i have paid N back already smiley face

#

i should start using toma for help now

molten relic
#

gulp

#
    return { 
        vars = { (G.GAME and G.GAME.probabilities.normal or 1), card.ability.extra.odds, info_queue[#info_queue + 1] = G.P_CENTERS.poisoned } }
    end,```
#

what is they talkin aboot

tight hull
#

this doesnt look too good

molten relic
#

oh i made an error

tight hull
#

but what do I know

molten relic
#

still the same error tho

#

and N' apparently doesnt help with syntax errors

#

😭

red flower
#

remove the =

#

after vars

#

and the info_queue thing too

molten relic
#

oh ok

red flower
#

i recommend looking at vanilalremade for how loc_vars is set up

molten relic
#

i thought i knew that

#

i always have the = and the info_queue

modern kindle
#

peaknilla repeaked

red flower
molten relic
#

exact same error

molten relic
red flower
#

again, it's easier if you check an example

molten relic
#

i am

#

im checking Midas

#

but that one doesnt even have return { vars = {

red flower
#

check another example

#

there are 150 of them

molten relic
brittle yacht
#

js testing my jokers and tarot card

molten relic
#

evil joker?

brittle yacht
#

yup

#

sugar apple: 30min
evil joker: 1hr
fine shyt: 10min
sugar apple seed: 30min

brittle yacht
brittle yacht
molten relic
#

what does evil joker do

brittle yacht
#

its a 50/50

molten relic
#

so pretty good or just kinda annoying

brittle yacht
#

yea

modern kindle
#

but why not x50 mult or deletes your save

tight hull
wintry solar
#

who fancies a new smods release?

red flower
#

me

modern kindle
#

how different is it from latest dev

stiff locust
#

is it going to add calc dollar bonus to decks

wintry solar
#

it won't be any different to latest dev that's the point of releases

stiff locust
#

oh right

modern kindle
#

see thats my silly little point

we here in dev already got whats there :b

chrome widget
#

Me

molten relic
#

what is G.P_CENTERS? i dont know where to look for it in steamodded huide (if its even there)

modern kindle
#

(i say this as i finally updated to latest dev today after not for like a month)

wintry solar
#

yes but with a release you can add it as a dependency and not make people angry

chrome widget
#

Correct

stiff locust
modern kindle
#

huh i should actually change the dependency at some point

stiff locust
#

i'm simplifying but a center is like the origin of an object

#

every time an object is made it is created from the center?

molten relic
#

oh

#

isnt that just like the same for every card?

stiff locust
#

well no

#

you can search it by key to find centers for things

molten relic
#

where do i search?

stiff locust
#

like you can check if card.config.center == G.P_CENTERS.m_lucky to check for lucky card enhancement

molten relic
#

ohh

#

but

stiff locust
#

there's other ways to do that

molten relic
#

how would i make a new center

stiff locust
#

well that's just making a new object

#

so go make a new object

molten relic
#

uhh

#

idk how to do that

#

but i could prob find it

stiff locust
#

well figure it out cause this is OOP

brittle yacht
#

hear me out, SUPER EVIL Joker

molten relic
stiff locust
#

object oriented programming

modern kindle
#

super evil joker deletes random files in the balatro directory

brittle yacht
molten relic
#

is an object just like for example a new joker? or something seperate

stiff locust
brittle yacht
modern kindle
molten relic
stiff locust
#

well then get good

molten relic
#

did i misspell it

#

i didnt

#

whar??

stiff locust
#

you spelled tried wrong

brittle yacht
stiff locust
#

anyway how do I remove an enhancement

molten relic
#

check vampire

stiff locust
#

i don't wanna

#

i'm too lazy to pull up the code right now

molten relic
#

does an enhancement count as an object?

stiff locust
#

yeah

molten relic
#

well then why DOESN'T IT WORK

#

OAIHGFWEOHAWEFD

modern kindle
red flower
stiff locust
#

n how do i clear enhancements 🙏

daring fern
molten relic
red flower
#

here is fine

molten relic
#

ok