#💻・modding-dev

1 messages · Page 252 of 1

manic rune
#

did you stalk me

long urchin
#

how?

turbid maple
#

how are you guys pulling off stack overflows in balatro

long urchin
#

explain it like im 3 years old and have holes in my brain mr ice

hushed field
#

I've not ran into a stack overflow yet either, haha

dull totem
manic rune
#

boom

red flower
#

i have done my fair share of infinite loops

long urchin
#

youre using opera gx

warped marsh
#

btw are spectral tags called? is it tag_spectral?

manic rune
#

i had to additionally close discord to get it going

dull totem
long urchin
#

oh i never said not using opera gx would actually fix the balatro problem

#

i just said using opera gx is the problem

#

:B

manic rune
#

its not that bad...

turbid maple
#

X1.5 Mult for every 1 GB of free RAM you have

manic rune
#

guess im getting X-1.5 Mult then

long urchin
primal robin
#

Whats happening

long urchin
#

it measures how much free ram you have when you open the game, then gives x1.5 mult for each 1gb BELOW that measured number

#

so we can minmax by opening balatro, then opening 15 instances of minecraft at once

turbid maple
#

here's my new joker when you obtain it starts benchmarking your gpu and-

hushed field
# long urchin explain it like im 3 years old and have holes in my brain mr ice

So, you have the key of the joker you're copying, right? That means you can use it to get the definition of the object by using it as a key in SMODS.Centers[//joker_key]]. For example, I might grab the atlas used by a joker by doing local _grabbedatlas = SMODS.Centers["j_jimbo"].atlas
If I want to know it's coordinates on that atlas, I'd do SMODS.Centers["j_jimbo"].pos and store that. If I then want my joker to copy that image for its art, I'd just set the atlas and pos of the joker who's art I wanna change, to the atlas and pos I grabbed

long urchin
manic rune
#

time to work on a boss :3

#

3 phases, shouldnt be too hard

turbid maple
#

are all your blinds bosses

manic rune
#

yeah

turbid maple
#

fear

manic rune
#

all of them will have phases :3

long urchin
modern kindle
hushed field
#

if people keep joking about p2w jokers, I'm going to make it a reality by launching a shitcoin and tying it's xmult to its value

turbid maple
#

real

modern kindle
#

fuck p2w, we go for p2l here

long urchin
hushed field
#

i mean, i'm planning a pump and dump, so I guess that's true

long urchin
#

isnt that like

#

immoral??

thin anchor
next timber
#

people who buy crypto aren't people its fine

long urchin
#

TRVTH NVKE!!!!

hushed field
#

no, not for real, haha, I'm too technologically illiterate to set up a crypto by myself and too chill of a person to want to learn how to do it for a pump and dump 😛

long urchin
hushed field
#

my plan on making money is ofc to make sure that Kino becomes very popular, and then make studios pay me to advertise their movie by adding a joker ❤️

long urchin
#

ok im not saying this should be a perma fix im suggesting it as a debug test

manic rune
modern kindle
thin anchor
#

im very illiterate in lua

long urchin
#

@thin anchor can you put PixelP_Finger.ogg in the base game sounds folder instead of in your mod folder?

turbid maple
#

making a new mod where jokers have to be traded as nfts

hushed field
long urchin
#

i have a feeling it might be checking the base game files instead of your mod's folders

#

might be wrong tho

modern kindle
turbid maple
#

I didn't even know you could return sounds

hushed field
long urchin
#

stongs

hushed field
turbid maple
#

LOL

modern kindle
long urchin
#

wait whered it go i was checking

runic pecan
#

Is the highlighted part in fig.1 correct? (fig.2 for reference)

long urchin
# thin anchor pfft

ah ok then its specifically a problem with the play sound and not the sound file location

thin anchor
#

hmm

turbid maple
#

can you try calling play_sound directly

daring fern
#

How could one make planets effect all hands?

runic pecan
daring fern
manic rune
thin anchor
frosty dock
long urchin
# thin anchor pfft

if it helps any, engine/sound_manager.lua:63 is s.created_on_state = args.state and 197 is elseif request.type == 'restart_music' then RESTART_MUSIC()

thin anchor
#

uhhh

frosty dock
#

also the sound key needs to have your mod prefix

manic rune
#

hiiii aure

#

did you add context.retrigger_joker to context.repetition yet :3

long urchin
thin anchor
daring fern
thin anchor
runic pecan
frosty dock
thin anchor
#

yes

frosty dock
hushed field
long urchin
#

is there a way to do a multiline comment in lua or do i need to add the -- to every line :/

frosty dock
#

--[[ like this ]]

glad osprey
#

--[[
]]

daring fern
long urchin
#

ty

frosty dock
#

so black hole?

runic pecan
frosty dock
#

((joker_to_the_right or {}).mod or {}).id is how i would write that, but sure

daring fern
frosty dock
frosty dock
frosty dock
hushed field
#

does SMODS.poll_rarity return a key or a number?

frosty dock
#

does the path in your SMODS.Sound call match the file name?

frosty dock
#

otherwise it returns the key

hushed field
#

Ah okay, that makes sense. type checking it is then

thin anchor
runic pecan
frosty dock
thin anchor
#

just the .ogg file

frosty dock
#

oh i see

#
SMODS.Sound {
  key = 'Finger',
  path = 'PixelP_Finger.ogg'
}

you should just need this

daring fern
onyx sonnet
#

Aure could you please explain this, i still dont understand what causes this

runic pecan
frosty dock
runic pecan
frosty dock
#

I'm not sure why the whole return table is inside extra but that shouldn't cause issues

thin anchor
#

doesnt make sound
im using the example jokers mod lua file if that helps

manic rune
#

💔

onyx sonnet
frosty dock
#

I'll assume this is on latest?

runic pecan
# daring fern Voucher.
    if context.using_consumeable then
        if context.consumeable.ability.set == 'Planet' then
            update_hand_text({sound = 'button', volume = 0.7, pitch = 0.8, delay = 0.3}, {handname=localize('k_all_hands'),chips = '...', mult = '...', level=''})
            G.E_MANAGER:add_event(Event({trigger = 'after', delay = 0.2, func = function()
                play_sound('tarot1')
                context.consumeable:juice_up(0.8, 0.5)
                G.TAROT_INTERRUPT_PULSE = true
                return true end }))
            update_hand_text({delay = 0}, {mult = '+', StatusText = true})
            G.E_MANAGER:add_event(Event({trigger = 'after', delay = 0.9, func = function()
                play_sound('tarot1')
                context.consumeable:juice_up(0.8, 0.5)
                return true end }))
            update_hand_text({delay = 0}, {chips = '+', StatusText = true})
            G.E_MANAGER:add_event(Event({trigger = 'after', delay = 0.9, func = function()
                play_sound('tarot1')
                context.consumeable:juice_up(0.8, 0.5)
                G.TAROT_INTERRUPT_PULSE = nil
                return true end }))
            update_hand_text({sound = 'button', volume = 0.7, pitch = 0.9, delay = 0}, {level='+1'})
            delay(1.3)
            for k, v in pairs(G.GAME.hands) do
                level_up_hand(context.consumeable, k, true)
            end
            update_hand_text({sound = 'button', volume = 0.7, pitch = 1.1, delay = 0}, {mult = 0, chips = 0, handname = '', level = ''})
        end
    end
end```
limber latch
#

is there a resource somewhere on how to get started making a mod

long urchin
#

This should tell me each variable per round, right? like first round is the first variable, second round is the second variable, third round is the third variable

    calculate = function(self,card,context)
        if context.before and context.cardarea == G.jokers then
            i = 1
            if i = 1 then
                debug(card.ability.extra.jkey)
                i = i+1
            elseif i = 2 then
                debug(card.ability.extra.jatlas)
                i = i+1
            elseif i >= 3 then
                debug(card.ability.extra.jpos)
                i = 1
            end
        end
    end```
long urchin
frosty dock
#

what is debug

limber latch
#

ty

long urchin
# frosty dock what is `debug`

custom function i made for debugging

function debug(txt)
    attention_text({
        text = txt,
        scale = 1.3, 
        hold = 1.4,
        major = aura_card,
        backdrop_colour = G.C.RARITY[4],
        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
    })
end```
frosty dock
#

i recommend choosing a different name

long urchin
#

why :?

frosty dock
#

there's already a global debug

long urchin
#

oh

frosty dock
#

you'd be breaking anything using the debug library

long urchin
#

that may get in the way

frosty dock
#

other than that your if statements are incorrect

long urchin
#

there we go, ctrl+f changed all debugs to have my mod prefix

frosty dock
#

you're using single =

long urchin
#

i always forget the second one

onyx sonnet
frosty dock
#

just tried this and it worked just fine for me

strong jacinth
#

How would i make so that all packs/vouchers/cards can appear in all card areas in the shop?

onyx sonnet
#

can you try applying perma mult?

#

and see if you get it too?

daring fern
strong jacinth
long urchin
#

im just imagining the amount of packs lmao

#

wait, i just realized

#

is this like, for a deck?

onyx sonnet
frosty dock
#

you don't happen to have this on?

long urchin
runic pecan
onyx sonnet
#

oh

#

no aure the issue is another

#

i disabled the upgrade message when making that video just because i found it mildly annoying

strong jacinth
onyx sonnet
#

the issue was the scaling of the perm mult

strong jacinth
#

But I'll make a deck that starts off with that voucher

frosty dock
#

that much is expected

onyx sonnet
#

how so?

frosty dock
#

you're scaling it as the cards are already scoring

#

that's too late, joker effects happen after the bonus chips/mult apply

#

if you want it to apply to the same scoring cycle, you need to do it earlier

long urchin
#

lemme check that

onyx sonnet
#

context.check_enhancement?

frosty dock
#

... no?

#

most scaling that should affect the current hand's score happens in context.before

onyx sonnet
#

alrighty

#

thank you

runic pecan
strong jacinth
long urchin
#

oh that

daring fern
long urchin
#

doesnt seem the most balanced lmao but lemme figure this out

long urchin
runic pecan
runic pecan
long urchin
runic pecan
strong jacinth
red flower
long urchin
#

there it is

runic pecan
# daring fern How?

Before:for k, v in pairs(G.GAME.hands) do level_up_hand(context.consumeable, k, true) endAfter:for k, v in pairs(G.GAME.hands) do if context.consumeable.center.config.hand_type ~= k then level_up_hand(context.consumeable, k, true) end end

edgy mountain
#

anyone can help me find out why my localization suddenly broke? it only returns 'Error' instead of tthe actual message

strong jacinth
long urchin
#

and change it how you see fit for modifications

#

but i do wanna write down my initial idea

#

is there a guide for making custom decks?

runic pecan
strong jacinth
# long urchin yeah then youll wanna just copy the code from cryptid's equilibrium deck

I guess its this?

local gp = get_pack
        function get_pack(k, t)
            if G.GAME.modifiers.cry_equilibrium then
                if not P_CRY_ITEMS then
                    P_CRY_ITEMS = {}
                    local valid_pools = { "Joker", "Consumeables", "Voucher", "Booster" }
                    for _, id in ipairs(valid_pools) do
                        for k, v in pairs(G.P_CENTER_POOLS[id]) do
                            if not Cryptid.no(v, "doe", k) then
                                P_CRY_ITEMS[#P_CRY_ITEMS + 1] = v.key
                            end
                        end
                    end
                    for k, v in pairs(G.P_CARDS) do
                        if not Cryptid.no(v, "doe", k) then
                            P_CRY_ITEMS[#P_CRY_ITEMS + 1] = v.key
                        end
                    end
                end
                return G.P_CENTERS[pseudorandom_element(
                    P_CRY_ITEMS,
                    pseudoseed("cry_equipackbrium" .. G.GAME.round_resets.ante)
                )]
            end
            return gp(k, t)
        end
#

But man, what is happening?

hardy viper
#

average cryptid code

edgy mountain
hardy viper
#

some would say it's... cryptic

edgy mountain
#

things that arent jokers, decks, enhancements, etc

#

the full thing

lament agate
#

is there a function that randomize things

long urchin
#

theres pseudorandom but i dont understand its api

runic pecan
lament agate
edgy mountain
runic pecan
long urchin
#

but its the random function balatro uses thats influenced by the seed

manic rune
runic pecan
long urchin
#

does anyone know how to make custom decks? i cant find the documentation on it in the smods wiki

daring fern
long urchin
#

just a list of commands, its not an explanation like the rest of the wiki pages lmao

lament agate
long urchin
#

i saw this when looking up deck in the smods github but clicking on it takes me nowhere

runic pecan
long urchin
#

ah ok

#

well yes i have

#

im pretty sure the smods.back is like, general commands for everything listed under the smods.center area of the wiki but i skimmed so idk

#

i just read the parts that are relevant to me in that moment

red flower
#

no, SMODS.Back is a custom deck

long urchin
#

ah

native zinc
#

how doth challenges display

red flower
native zinc
#

do i have to add something to display it

red flower
#

i dont think so, just defining it should add it

native zinc
#

hm

long urchin
#

whys it so sparse unlike the other pages

red flower
native zinc
red flower
#

do assert(SMODS.load_file('challenges.lua'))()

native zinc
#

ah thanks

#

what a silly function

#

ayyyy

#

uh oh

manic rune
native zinc
#

i did that at random yes

thin anchor
#

crashes saying the sound doesnt exist

native zinc
#

wait

#

oh it is not

#

hm

#

well that explains it

runic pecan
thin anchor
runic pecan
thin anchor
#

urrrrrrrgggg

runic pecan
thin anchor
runic pecan
# thin anchor

Um... I believe someone already told you it's assets not resources so... yeah...

thin anchor
#

it says... in the error... its "resources"....

#

ok sure

gleaming zealot
#

hai modding-dev

thin anchor
next timber
#

how do i make an edition randomize its x mult on apply?

#

basically just how do i access the edition values from on_apply

long urchin
#

Only peak deck sprites over here

#

This is the placeholder I just made lol

runic pecan
frosty dock
runic pecan
thin anchor
frosty dock
#

where's the main lua file

#

and the json metadata

#

inside Jokers?

thin anchor
#

yes

frosty dock
#

then Jokers is the root dir of your mod

#

and it'll look for Jokers/assets

runic pecan
#

Now that's a TIL.

thin anchor
#

🪦

frosty dock
#

how is it supposed to know that you consider the parent folder to be the root?

thin anchor
#

err

runic pecan
warped marsh
#
                local this_card = context.scoring_hand[i]
                if this_card.config.center_key ~= 'm_stone' then
                    if not SMODS.has_enhancement(this_card, 'e_polychrome') then
                        this_card:set_ability(G.P_CENTERS.e_polychrome, nil, true)
                    end
                end
            end ```
#

this isnt how you set polychrome right?

#

would it be set_edition?

runic pecan
warped marsh
#

ahh

thin anchor
#

should the files look something like this?

#

it crashes with the same error

runic pecan
#

Wait, really!?

thin anchor
#

i believe so

#

lemme check again

runic pecan
#

Did you start a new run, or continued a previous run? (Might not be the issue, but start a new one just in case)

thin anchor
#

continued

#

new run:

warped marsh
#

where is your sound?

#

i pretty sure you have to define your prefix

agile thistle
thin anchor
maiden river
agile thistle
#

i believe you're supposed to use SMODS.Path

#

and then use assets in that

thin anchor
#

"pixelp_finger"

frosty dock
#

I ask to see the sound definition and the json file again

thin anchor
runic pecan
thin anchor
#

hmmm

frosty dock
thin anchor
#

uh

maiden river
frosty dock
#

it gets added automatically

thin anchor
#

i thought it would help

frosty dock
#

you're probably double prefixed now

#

remove the prefix from the key only

warped marsh
#
                local this_card = context.scoring_hand[i]
                this_card:set_edition(G.P_CENTERS.m_polychrome, nil, true)
            end
    
            delay(0.3)```
for some reason its not turing the card into polychrome :)
thin anchor
#

new error @frosty dock

frosty dock
edgy mountain
#

also i tried

#

it just broke at some point

maiden river
#

I see

ruby delta
#

Anyone good at coding could help to create a really good touch screen mobile controls mod like Balatro mobile but much better if it's possible (I know there is a mod called Mobilelikedragging but it's not the only thing I want plus it's buggy) and you will be asking a reason why I need this it's because I play touch on portable mini laptop

runic pecan
thin anchor
#

im just wondering what it means because i didnt touch the atlas

frosty dock
#

are you doing anything with the atlas

thin anchor
#

no

frosty dock
#

then remove it

runic pecan
warped marsh
#

is there a way to add a Polchrome name to your Joker?

thin anchor
long urchin
#

whatd i do wrong? :(

SMODS.Back{
    key = 'booster_deck',
    loc_text = {
        name = 'Collectable Deck',
        text = {
            '{C:}Booster packs{} show up instead of',
            'cards in the shop,',
            '{C:}Reroll{} cost is double.'
        }
    },
    atlas = 'dick',
    pos = { x = 0, y = 0 },
    config = {
        reroll_cost = 10
    }
}```
thin anchor
#

well i do need the atlas for the jokers i believe, im not sure

long urchin
long urchin
runic pecan
long urchin
# warped marsh hmm okay

mainly cuz youll have to like somehow take hold of polychrome's code in order to add the information that would let you change the joker's loc_txt and afaik you can only take ownership of jokers

#

on top of that youll have to design up a polychrome attribute for the text

warped marsh
#

hmmm, im just trying to change it now in general

#

and its just not working

#

these colours grrr

long urchin
#

yeah joker names are notably hard to change with text attributes

#

but i know @sonic cedar got it to work once using {C:inactive}

warped marsh
#

yeah i dont think i care enough to be honest

#

to like

#

figure it out

thin anchor
#

brink of insanity

sonic cedar
#

what huh hi who

long urchin
#

hey toma

warped marsh
#

hi

sonic cedar
#

whats the thing

long urchin
#

theyre trying to apply text attributes to joker names

#

and ik youve done that before so i tagged you

sonic cedar
#

oh yeah i can show that

#

can you send what you have so far? @warped marsh

warped marsh
#

oh legit nothing so far

sonic cedar
#

oh ok

warped marsh
#

ive been playing around with the colours you know

#

trying to get to work to begin with

sonic cedar
#

you got a localization file?

warped marsh
#

no i dont

sonic cedar
#

you uh

you should start with that

warped marsh
#

okay

#

o7

sonic cedar
#

o7

warped marsh
#

localization.json or lua

sonic cedar
#

lua

#

name it default or en-us (assuming you’re using english)

warped marsh
#

wait sorry so i create a folder for localization

#

and then i make a file called default.lua

sonic cedar
#

yep!

#

that’ll be your default localization check, hence the name

warped marsh
#

okie

#

got it

sonic cedar
#

do you alr know how to set up a localization?

tall wharf
#

hi

warped marsh
#

i have never done it

#

hello

tall wharf
#

you make en-us.lua

sonic cedar
#

hi aiko

#

did they change default

tall wharf
#

in localizations folder

warped marsh
#

okay ill make en-us.lua then

tall wharf
#

i don't have default

warped marsh
#

all this for a silly colour change

warped marsh
#

frick my big chungus life

long urchin
#

but dick

#

hehe

tall wharf
#

big big chungus big chungus big chungus

warped marsh
#

lowkey miss 2018 sometimes (im lying)

manic rune
#

i miss when i wasnt in high school

#

my life is genuinely so miserable now :3

warped marsh
#

it only gets worse in uni!!

sonic cedar
tall wharf
sonic cedar
sonic cedar
#

think of it as a fallback

long urchin
#

how do i modify reroll cost with a deck

warped marsh
long urchin
#

i tried using the api reroll voucher used and it broke :(

warped marsh
#

so we arent flooding the chat?

#

omg threads!

#

i forgot about feature

long urchin
maiden river
#

hello, devs
I have a custom cardarea, but when you try to take a card and the area's full, it shows the "no space" text on the consumable area
is there a way to change that (probably a lovely patch)

minor furnace
#

attempting to make a booster pack, it keeps crashing at this part in the localize() function

    loc_target = G.localization.descriptions[(args.set or args.node.config.center.set)][args.key or args.node.config.center.key]
  end```
#

this is the pack declaration

    key = "zodic_1",
    set = "Booster",
    atals = "zodiac_booster",
    pos = {x = 0, y = 0},
    loc_txt = {
        name = "Zodaic Pack",
        description = {
            "Choose {C:attention}#1#{} of up to",
            "{C:attention}#2#{C:zodiac} Zodiac{} cards to",
            "be used immediately",
        }
    },
    cost = 4,
    weight = 1,
    draw_hand = true,
    config = {extra = 3, choose = 1},
    loc_vars = function(self, info_queue, center)
        return {vars = {center.ability.choose, center.ability.extra}}
    end,
    create_card = function (self, card, i) 
        return create_card("Zodiac", G.pack_cards, nil, nil, true, true, nil, "pack")
    end
}```
red flower
maiden river
#

thanks!

#

we love hooks

red flower
daring fern
#

Does anybody know how to do this?

subtle mason
#

How do I get a specific booster pack?
Something like booster == "JumboMegaPack

red flower
#

what do you mean by get, what are you trying to do?

zealous glen
#

What do you mean

minor furnace
onyx sonnet
#

do any of you have a joker that gives playing cards permanent mult when scored?

subtle mason
errant fulcrum
#
            if context.other_card:get_id() == card.ability.extra.white then
            for k, card in ipairs(context.scoring_hand) do
                assert(SMODS.change_base(card, nil, 9))
                end
            end
        end```
Is this syntax not correct?
minor furnace
#

now I just need to figure out why my atlas isn't working lol

red flower
turbid maple
#

oh look zoodia- oh wrong mod

subtle mason
tall wharf
#

omg void hello

#

ALSO ZODIAC PACK RAAAGRH

#

EVERY TIME I SEE SOMETHING RELATED TO ZODIAC

red flower
#

i love drident

long urchin
minor furnace
#

surely this should work
atals = "Zodiac_Booster", pos = {x = 0, y = 0},

    key = "Zodiac_Booster",
    path = "reverse_boosters.png",
    px = 71,
    py = 95
}```
minor furnace
sonic cedar
#

you spelled it

#

wrong

minor furnace
#

AHHHH

maiden river
#

can you send a screenshot

long urchin
#

its slightly different cuz attempts to debug it to no avail

minor furnace
red flower
open aspen
#

for balatro playing cards, how do enhancement textures work? i ask because if i look at wild cards they obscure the suit like so

onyx sonnet
open aspen
#

also i just realized they dont obscure the suit

#

so never mind my question

onyx sonnet
#

other than that it seems fine?

minor furnace
#

Ahhhh

long urchin
open aspen
#

i can see the spade still lol

minor furnace
#

why am I incapable of typing today

#

spelling is hard

#

apparently

onyx sonnet
#

itis hard

minor furnace
#

it shouldn't be, I know how these words are supposed to be spelled

onyx sonnet
#

i spent an hour troubleshooting a joker of mine because i mispelled one of the optional smods features

#

so it just wasnt enabled

red flower
maiden river
#

it's probably something you have to do with an event in apply, yeah

open aspen
#

is there any example mods that have enhancements?

maiden river
#

mine 😎

subtle mason
maiden river
#

oh wait those are editions

#

I cen never get it right 💀

open aspen
#

yea that seemed to focus on the shaders behind editions

#

i think

maiden river
#

true

#

but making an actual edition really isn't hard at all

open aspen
#

see the thing is

minor furnace
#

we are so back

open aspen
#

i am super unfamiliar and intimidated by how modding works with lua/balatro

minor furnace
#

now let's see if they actually work

maiden river
#

oh I see

open aspen
#

im more used to modding frameworks like tmodloader

#

and this is very different

#

to me

red flower
modern kindle
red flower
#

and what's the crash

maiden river
#

well you can actually look at my mod to see a really simple edition
I can send it in here rq

subtle mason
maiden river
#

this is the effect, btw

#

with the terrible shader 😭

#

I'll pay aiko 200 RaeBucks to make a better one

modern kindle
#

Green

red flower
maiden river
#

Green

onyx sonnet
#

greeb

maiden river
open aspen
#

wait thats still an edition though

limber blaze
subtle mason
maiden river
open aspen
#

just instead of a shader i assume it will be atlas stuff

maiden river
#

yeah

red flower
long urchin
#

how would i make the reroll price increase by 2 instead of 1?

tall wharf
#

hi n

red flower
#

hi aiko

subtle mason
tall wharf
onyx sonnet
maiden river
#

big

manic rune
#

:3

#

good morning everyone

modern kindle
#

bepis my goat

manic rune
#

hi dilly

modern kindle
manic rune
#

what do you think of the boss blind

red flower
onyx sonnet
#

it's pretty neat from what little ive seen

manic rune
#

-# just realized i fucked up the wording for boost deployment a bit

turbid maple
red flower
modern kindle
maiden river
maiden river
#

I just added 3 vouchers and it's caused me extreme stress

#

all because of a typo that I didn't detect until yesterday

manic rune
#

if a boss has too many passives

#

i may consider adding pages for that too

#

:3

#

i am the page man

red flower
#

i need to add pages for the ability transfer thing i think

#

or toggleable tooltips maybe

onyx sonnet
manic rune
#

r we reaching the point where pages for descriptions are common now

#

💔

red flower
#

balatro needs more screen space

limber blaze
#

just dont have actual descriptions do what tboi does where its just a flavor text instead

manic rune
#

"Good luck" the flavor text

maiden river
#

oh btw raevyn Pro Tip:
if you have a custom card area you can set view_deck = true when you're making it to make it show up on the sides instead of the top
so if you're a yapmaster like me you don't have to worry about the textboxes clipping out of the top of the screen 😭

manic rune
#

and its just you trying to figure out wtf the boss blind does

long urchin
#

why do neither G.GAME.current_round.reroll_cost_increase = 2 modify the reroll cost increase? >:(

SMODS.Back{
    key = 'booster_deck',
    loc_txt = {
        name = 'Collectable Deck',
        text = {
            '{C:}Booster packs{} show up',
            'instead of cards',
            'in the shop,',
            '{C:}Reroll{} cost is double.'
        }
    },
    atlas = 'dick',
    pos = { x = 0, y = 0 },
    config = {},
    apply = function(self)
        G.GAME.starting_params.reroll_cost = 10
        G.GAME.current_round.reroll_cost_increase = 2
    end,
    calculate = function(self,card,context)
        if context.reroll_shop then
            G.GAME.current_round.reroll_cost_increase = 2
        end
    end
}```
manic rune
#

dick

long urchin
#

are you gonna say that every time?/silly

manic rune
#

:3

pale venture
#

Does anyone know how to use draw_card to randomly arrange cards or just shuffle the deck? I was trying to use it to move cards from G.hand to G.deck and they just go to the bottom.

maiden river
#

localization people: where do you put the text for the booster pack after you've opened it in the localization files?

manic rune
#

i saw it before

brazen notch
#

G.deck:shuffle()

manic rune
#

☝️²

red flower
limber blaze
#

still goes in misc.dictionary though

manic rune
#

why hasn't anyone reported about my relic pack showing "ERROR" too, i wonder

red flower
#

yeah

maiden river
subtle mason
#

@red flower got the error functions/misc_functions.lua:195: attempt to index global 'booster

pale venture
red flower
maiden river
#

the smods localization wiki update is going to go insane

#

whenever that drops

red flower
#

this is in the booster section

limber blaze
#

i usually just try reference the localisation of something else thats doing a similar type of thing as me

brazen notch
red flower
manic rune
pale venture
manic rune
#

-# genshin mod dev, fyi

maiden river
# red flower

true
but (this is the same way I felt about learning about the "dump_loc" key in the metadata) it should really be in the localization docs, with everything else

#

but that's just me

red flower
#

you can PR the wiki ❤️

subtle mason
# red flower

aaa its probably G.config.center.key == "p_boosterkey"
I'll try it after I finish eating

red flower
#

why would it be G

maiden river
subtle mason
#

or smods

red flower
#

G is the global table for the game, you want the booster card

onyx sonnet
#

@tall wharf i think you should add a short shake effect to the jokers that lilac lasso doesnt select to be debuffed

tall wharf
#

sure

#

later tho

subtle mason
tall wharf
onyx sonnet
#

i use this in a lovely patch so idk if its different in joker calcs

self.config.center.kind == 'Arcana'```
#

theres probably a context for opening booster packs

#

which lets you read this

red flower
#

yeah, they're not doing a joker they're modifying the code directly from what i understood

onyx sonnet
#

information provided within the open_booster context

if context.open_booster then
{
    cardarea = G.jokers, -- G.hand, (G.deck and G.discard optionally enabled)
    open_booster = true,
    card = self -- the booster pack being opened
}```
gentle valley
#

excuse me but if i wanted to learn how to mod balatro where would i start thanks in advance

runic pecan
#

Is the highlighted expression correct?

onyx sonnet
#

wah.....

red flower
next timber
#

progress is being made

#

the nefarious greenbo

tall wharf
maiden river
#

well you're doing better than my green

next timber
#

i still do not know how to make it clip the low parts and overflow for the high parts

maiden river
#

it's kinda tough since I need to emulate shaders from a different game

#

but I have cool concepts for the enhancements

next timber
#

i tried adding time and it did this??

#

nope

#

thats the same image

#

hang on it keeps doing htis

#

why does adding time make it do this??

#

surely adding time should just make it animate??

daring fern
#

How does one check if a card in hand is being scored?

red flower
#

where are you checking?

daring fern
#

In G.hand.

red flower
#

no, like what are you trying to do? also cards played is G.play

thin anchor
#

all i did was add a sound and this happened

red flower
#

i saw aure tell you to delete the atlas but maybe you were actually using it?

daring fern
red flower
daring fern
thin anchor
red flower
thin anchor
#

well no...

#

i will, hold on

red flower
thin anchor
#

removed it, still crashes

red flower
worthy stirrup
#

The card isnt crashing but it never appears debuffed

red flower
#

try add_to_deck instead of set_ability

thin anchor
worthy stirrup
#

well, im also having it appear debuffed in the collection

red flower
#

well that might be it

worthy stirrup
#

unless the collection also calls for adding to deck

red flower
#

i dont think so

unkempt thicket
#

where is the UI for deck preview stored?

worthy stirrup
#

i found this in the core.lua

---@field set_debuff? fun(card: Card|table): boolean|string? Allows controlling when a card is debuffed or not. Return "prevent_debuff" to force a card to be undebuffable.

thin anchor
#

im wondering how this atlas issue even happened

worthy stirrup
#

could i call for card:set_debuffed(true)

red flower
#

set_debuff, yes
i don't think that's different from the other one but you can try

worthy stirrup
#

hm, didnt seem to work

red flower
worthy stirrup
#

is there something thats called for whenever the card appears

maiden river
#

using vouchers with full-sized card sprites is so goofy

open aspen
#

what is this comment referring to? can i set cardarea to G.hand to access cards held in hand? eg to have something happen with an enhancement before cards are played?

worthy stirrup
#

ill put this here incase anyone wants to help me instnatly debuff a card

red flower
open aspen
#

By the way, for context.before, is it after the hand is played but before the scoring begins?

maiden river
#

yeah

worthy stirrup
maiden river
#

😭 uh oh

open aspen
#

because i wanted to make an enhancement that moves to the next card over before the hand is played

#

so

#

thats a bit tough now

runic pecan
#

Last time I checked there's no context for "when drawn to hand", should I make a patch for that?

open aspen
#

there is i think

#

well

#

im also new

#

so im not sure if that applies when a card is drawn and you have the calculate function in an enhancement on that card

#

but theres definitely a context for that on the api page

rapid stag
#

how could i use loc_parse_string to allow me to use {X[colour]} in both joker names and the return message of calculate() and have it show up with that highlight in those conditions?

runic pecan
open aspen
#

ooh

open aspen
#

and that could help you calculate how many cards were drawn

#

(that ofc wouldnt address edge cases like drawing the first hand when entering a blind but ig in that case u can just check how many cards are in hand. i cant think of other edge cases)

#

as a workaround at least

daring fern
#

Is this doable?

open aspen
#

eg handsize before was 7, i discarded 5 cards (but its serpent so i only draw 3), so my hand size will now be 5 after discarding. so i can do 7-5 = 2, then do 5-2 = 3 cards drawn

errant fulcrum
#

How do I make it so that the cards only start scoring after they flip?

        if context.individual and context.cardarea == G.play and context.scoring_name == 'Pair' then
            for i=1, #context.scoring_hand do
                local percent = 1.15 - (i-0.999)/(#context.scoring_hand-0.998)*0.3
                G.E_MANAGER:add_event(Event({trigger = 'after',delay = 0.15,func = function() context.scoring_hand[i]:flip();play_sound('card1', percent);context.scoring_hand[i]:juice_up(0.3, 0.3);return true end }))
            end
            delay(0.2)
            local _rank = pseudorandom_element({'6','9'}, pseudoseed('yin'))
            for i=1, #context.scoring_hand do
                G.E_MANAGER:add_event(Event({func = function()
                    local card = context.scoring_hand[i]
                    local suit_prefix = string.sub(card.base.suit, 1, 1)..'_'
                    local rank_suffix =_rank
                    card:set_base(G.P_CARDS[suit_prefix..rank_suffix])
                return true end }))
                end
        end
open aspen
#

lets say i wanted to make a mod. what is the minimum assets/code required to have it show up with steammodded. doesnt have to add anything but just like a base skeleton for a mod

#

cause like i cant even figure that out atm 😭

runic pecan
maiden river
open aspen
#

nothing has to be in the file at all?

#

the main fle

#

file*

maiden river
#

don't think so

open aspen
#

i closed outta the tab but it seemed like some mods had like their mod id at the top of the main file in some code

#

like an init thing looking

#

and other mods didnt so i was really confused

#

Ill try that then

maiden river
open aspen
#

coolio

#

ty

maiden river
#

no problem

open aspen
#

what about mods that separate their code into multiple files?

#

eg a file for enhancements and one for editions etc

errant fulcrum
long urchin
#

how do i change whats in the shop?

open aspen
#

do i have to have a main file to pull all those together or will steamodded just pick it up

long urchin
#

like, say i want to modify the jokers that can appear in the G.shop_jokers area

maiden river
long urchin
#

how can i change the list of items that can appear

runic pecan
open aspen
long urchin
#

im making a custom deck that replaces all of the rerollable shop cards (jokers, tarots, and planets) with booster packs

#

but then to balance it, rerolls are doubled. Ive fully figured out that part, now i just need to get boosters into the shop_jokers area

next timber
#

ok my shader's going well but i have no clue how to fix the cutoff, or the fact that you can see into the texture below it

next timber
#

??

zealous glen
#

Well not quite

#

But you don’t want to go past 0 and 1

runic pecan
#

So according to what I found in lovely/dump.lua, context.hand_drawn is a table of drawn cards, but on SMODS wiki it only says they are true.
At least one of them need update, it seems.

zealous glen
#

Otherwise you get the other textures in the atlas

next timber
#

its kinda hard to have a wavy effect without some peaks being lower than others

#

im still just annoyed that the wavy shader image in the docs isnt one of the shaders in the example mod

#

that would solve All of my problems

wintry solar
next timber
#

ill send the function in a minute hang on

#

ive just realised the laminated shader miight actually be what im looking for so im tryna test it out

zealous glen
next timber
#

ok nvm laminated was NOT what i wanted

zealous glen
#

or just wavefy the square directly

next timber
#

hang on discords being a bitch

next timber
#

freakbo

#

basically, makes a sine wave using the x and the current time, then uses that to stretch the texture accordingly along that column

zealous glen
#

add more sines

next timber
#

wha

#

i dont see how that helps my issue

next timber
#

how exactly does a more wobbly line solve the cutoff issue

zealous glen
#

but I see I misread what you were saying

#

What was the cutoff issue again?

next timber
#

put into a crude jspaint drawing this is my issue

#

it cuts off at the borders of where the normal jokers are, and has bits of the next texture down

zealous glen
#

Avoiding drawing other Jokers is easy

minor furnace
#

why does context.end_of_round trigger twice again?

zealous glen
#

As I said before

#

limit yourself to the area of the Joker

minor furnace
zealous glen
#

which should be around 0 and 1

zealous glen
minor furnace
#

I tried adding an and context.individual and it didn't proc

#

so maybe I need a different context

zealous glen
#

if it's for a Seal

#

I think Cards only calculate on themselves

minor furnace
#

hmmm

strong jacinth
#

Bump

zealous glen
#

I think the wiki says how to limit yourself to triggering once

minor furnace
#

I'll check the wiki again

wintry solar
#

If it’s a seal it’s context.olaying_card_end_of_round iirc

zealous glen
#

olaying

next timber
#

olaying

open aspen
#

main file needed yes, but do you need to specifically load other files?

minor furnace
open aspen
#

ah nvm i figured out how they did it

open aspen
#

they do load it but have a util file that lets them quickly load stuff

#

so it doesnt ever explicitly say load_file("enhancementName.lua") but rather calls a function that loads all files in a folder

#

coolio

neat plover
#

anyone got a deck making tutorial

open aspen
gentle rain
#

hope u get it working!!!

gentle rain
neat plover
#

...

wintry solar
fresh swallow
#

Chat, I may be cooking

#

Balatro irl going to be crazy

edgy mountain
#

anyway to make sure the event completes the dissolve before ending?

#

currently it is looping before the card is destroyed and sometimes selects a dissolving card to be dissolved again

open aspen
#

is there a guide for how an atlas should be set up?

tall wharf
#

are you going to use lcd panels

open aspen
#

is it possible to make a new type of "addition" for cards. Like a fourth thing that isnt a seal/edition/enhancement

or bar that, a way to have an edition/enhancement not conflict with other enhancements

tall wharf
edgy mountain
#

problem is, the loop is finishing before the dissolve

tall wharf
#

what's the whole effect

edgy mountain
#

so it has a chance to pick the same card again

tall wharf
#

is this in joker calculate

edgy mountain
tall wharf
#

does it destroy all the cards in hand

edgy mountain
tall wharf
#

so

#

3 cards in hand

edgy mountain
#

in its current state sometimes it selects the same card multiple times and ends up deleting only 2 or 1

rapid stag
#

...what's the simplest way to set my mod's modicon in the steamodded mod menu?

tall wharf
#

and increase i for each card destroyed

#

store destroyed cards in a table

edgy mountain
tall wharf
#

check if card in table of destroyed

#

idk that's what i would do

fresh swallow
open aspen
#

its not really jank, maybe not the best way to do it tho necessarily

#

like thats the brute force method yea ig

edgy mountain
#

i wanted to just delay the end of the event untill dissolve was done

open aspen
#

im a brute force kinda programmer anyways

modern kindle
fresh swallow
tall wharf
#

like i see holes

gentle rain
fresh swallow
gentle rain
#

peam

open aspen
fresh swallow
tall wharf
#

crazy

fresh swallow
#

And a moving reader head under the play surface

rapid stag
fresh swallow
#

Cheaper than having a ton of nfc reader

tall wharf
modern kindle
#

How low have you gotten the price to so far?

tall wharf
#

DEVELOPMENT TOMORROW

#

RAAARHH

fresh swallow
#

Also here is some early testing for the nfc stuff

open aspen
tall wharf
#

actually

#

sick

open aspen
#

everything can be kept flat then

#

or like on a flat playing surface

fresh swallow
#

I want to make it cheap. Just in case I can make it into a product

tall wharf
#

imagine actual casinos having nfc reader for cards

open aspen
#

dont they?

#

or like maybe not nfc

#

but they have some kind of readers no?

tall wharf
#

i don't mean credit card

open aspen
#

ik

open aspen
fresh swallow
fresh swallow
#

I have access to some machinery that will let me do custom circuit boards

#

So that should be fun

next timber
#

ok ive been making (slow) progress on the shader, but why does the bottom edge look janky? idk how to describe it but its like, almost jagged looking

zealous glen
next timber
rapid stag
fresh swallow
next timber
#

i know im gonna be tryna get my hands on one if you do decide to do a limited run

rapid stag
#

does anyone know how to change a joker's loc_txt.text on the fly? cirDerp
i'm looking into working with the functionality of being able to actively change the description

fresh swallow
#

After that, if we went through with it, I would most likely do a kick starter to try getting enough funds to mass manufacture them.

next timber
#

and feed the entire line of text into the loc_vars

#

if its not your joker idk

zealous glen
fresh swallow
#

There is one touch I really want to do for the final project.

#

I want the game board to have a layer of green felt over it

#

Like a card game table

zealous glen
#

Example:

rapid stag
glad crane
#

Ah yes - I do love a good nil in nil chance to gain a nil mult (also no clue why its nil values)

zealous glen
next timber
zealous glen
#

local misc = NFS.load(SMODS.current_mod.path .. "/misc_functions.lua")()

local _generate_main_end = function(card)
    if not misc.is_in_your_collection(card) then
        local add_node = function(nodes, text, colour)
            nodes[#nodes + 1] = {
                n = G.UIT.T,
                config = {
                    text = text,
                    colour = colour,
                    scale = 0.3
                }
            }
        end

        local nodes_ = {}

        add_node(nodes_, '(Currently ', G.C.UI.TEXT_INACTIVE)
        add_node(nodes_, tostring(card.ability.extra.blinds_defeated), G.C.FILTER)
        add_node(nodes_, '/', G.C.UI.TEXT_INACTIVE)
        add_node(nodes_, tostring(card.ability.extra.blinds_to_defeat), G.C.FILTER)
        add_node(nodes_, ')', G.C.UI.TEXT_INACTIVE)

        return {{
            n = G.UIT.C,
            config = {
                align = "bm",
                padding = 0.02
            },
            nodes = {{
                n = G.UIT.R,
                config = {
                    align = "cm"
                },
                nodes = nodes_
            }}
        }}
    end
end
zealous glen
open aspen
#

i really suck at modding this game lmao what have i done wrong

zealous glen
#

actually wait that one still uses NFS.load lol

open aspen
#

simple mistakes

#

ty

next timber
daring fern
#

How does one make a certain probability of an object to always trigger when a joker is present?

next timber
#

now is there a way to make the shader get cut off at the edges of the joker, or am i just gonna have to adapt to that size

#

god i wish there was a way to print values in a shader

sonic cedar
#

so i think i set up the scoring itself correctly, but how does stone joker's card counting work? does anyone know?

red flower
open aspen
#

is there an easy way to spawn in cards? i made an enhancement and want to see it in game but I realize i dont have a way of actually obtaining it?

sonic cedar
#

debugplus

#

q to cycle editions iirc

red flower
#

no, it does it every frame lol
but you can put it in the same context you need it and in loc_vars for the description

next timber
#

ok so i fucked up the shader somehow

sonic cedar
red flower
#

yea

sonic cedar
#
loc_vars = function (self, info_queue, card)
        return{vars = {card.ability.extra.chips, card.ability.extra.chips*(card.ability.stone_tally or 0), card.area and card.area == G.jokers and "...?" or ""}}
    end,
red flower
#

you want to do something like this

loc_vars = function(self, info_queue, card)
    local stone_tally = 0
    for k, v in pairs(G.playing_cards) do
        if SMODS.has_enhancement(v, 'm_stone') then stone_tally = stone_tally + 1 end
    end
    return { vars = { card.ability.extra.chips, card.ability.extra.chips * (stone_tally or 0), card.area and card.area == G.jokers and "...?" or "" } }
end
sonic cedar
#

ohhhhhhhhhhhhhhhhhhhhhhhhhhhhh

#

i thought the k, v would go somewhere else

#

ok ok cool

tall apex
#

Bweh

sonic cedar
open aspen
#

another simple bug that my brain isnt figuring out, why is the bracket not closed? it looks closed to me

next timber
# next timber ok so i fucked up the shader somehow

i think this is because i'm using texture_coords which apparently changes depending on where in the texture atlas you are, funnnn
is there any equivelant i can use that's always on a scale of 0 to 1 and not dependent on where the texture is in the atlas?

#

oh wait modulo exists

daring fern
#

How could one make the operator be exponential instead of multiplicative?

open aspen
#

missing comma

mystic river
open aspen
#

yea i noticed just now whoopsies

#

i should probably stop asking questions that i immediately realize the solution to

mystic river
#

to be fair missing commas are stupidly easy to overlook
also blah blah rubber duck etc

sonic cedar
sonic cedar
rancid bridge
#

hi
i am stupid and don't know anything about lua, yet i'm still trying to mod balatro
how would i make a joker self destruct upon getting debuffed and make it add +1 ante

next timber
#

THEY SHREDDED M FUCKING JIMBO

strong jacinth
#

Bump
-# PLEASE IM DESPERATE

sonic cedar
#

-# THAT WASNT A BIT??

ruby delta
#

Can anyone help me see why this is happening when I am using the prism mod, when I press the double card

strong jacinth
sonic cedar
#

-# yes 😭

rancid bridge
strong jacinth
#

-# what do you mean by "that wasnt a bit"

ruby delta
strong jacinth
#

-# What

sonic cedar
red flower
ruby delta
runic pecan
#

Does a playing card drawn facing down still get featured as context.other_card?

strong jacinth
strong jacinth
#

-# This is the button

sonic cedar
strong jacinth
#

-# The offset = {x = 1, y = 0}, is what is making it run away

tall wharf
#

omagah

#

thank u aure for blind calculate function

sullen fern
#

my own mod is now crashing the game on startup.

manic rune
#

i wish i were a bird

sullen fern
strong jacinth
sullen fern
#

it's fucked that my mod just, doesn't work at all anymore

tall wharf
manic rune
#

talisman

manic rune
sullen fern
daring fern
thin anchor
next timber
#

istg im gonna go crazy trying to write this shader, i have no fucking clue what the variables actually look like because i cant debug print them

maiden river
#

are you using debugplus's watch shader

next timber
#

thats. a thing?

maiden river
#

yeah

#

it's just watch shader [shader path]

#

you have to use watch stop afterward tho

sullen fern
strong jacinth
#

Cryptid*

daring fern
sullen fern
#

why is it just now shitting itself

next timber
strong jacinth
#

Or functionality

maiden river
daring fern
strong jacinth
#

I think you will have to patch for both 😕

next timber
tall wharf
sullen fern
tall wharf
#

you can only encounter the boss when you are on negative ante

sullen fern
#

i don't fucking understand. why are you NOT working

#

you used to work, but not anymore???

#

for some absolutely braindead reason

maiden river
thin anchor
next timber
#

ah

gleaming zealot
#

baaaaaa

#

🐑

sullen fern
#

if anyhting

#

this is, genuinely fucked

next timber
#

ok so watch shader isnt gonna work out

#

its showing the original card underneath it

zealous glen
strong jacinth