#💻・modding-dev

1 messages · Page 238 of 1

manic rune
#

thats how xmult looks

hushed field
#

Lack of spacing is important there btw

manic rune
#

mhm

hasty thicket
#

which part?

manic rune
#

or is it supposed to give +mult

hasty thicket
#

X

#

multiplicative

manic rune
#

i see

#

add a C:white in there then

hasty thicket
#

so 2 * 10 = 20 not 12

manic rune
#

and also, space it

#

i think inside the {X:mult...} {}, spaces are completely ignored

#

so you gotta space outside

#

{X:mult,C:white}X#1X{} Mult

#

probably that

hasty thicket
#
 '{C:mult}D+#1#{}Mult','{C:chips}+#2#{}Chips'```
manic rune
#

:3 whats that D doing there

hasty thicket
#

idk

#

i was following a tutorial

#

1s

#

lmao i hate typos

manic rune
#

it doesnt really do anything asides from coloring the D red

#

also, you need spacing there

hasty thicket
#
            '{C:mult}+#1#{}Mult','{C:chips}+#2#{}Chips'```
manic rune
#

{C:mult}+#1#{} Mult

hasty thicket
#

yeah

#

i did that

manic rune
#

i see, your code didnt show it :3

hasty thicket
#

so something else might be the issue as well

manic rune
#
print("hi")
--also, you need to add lua at this part
hasty thicket
#

for X mult I just added an X, Instead of changing the values

manic rune
#

..whats the issue

red flower
#

.extra.Xmult

manic rune
#

oh wait

#

I THOUGHT THAT WAS THE LOCALIZATION FILE 😭

hasty thicket
#

it is Xmult

#

WAIT

#

I SEE WHAT YOU MEAN

#

im readindg a diff line

#

time to test

manic rune
#

i completely focused on how the joker looked like instead

#

sorry

#

❤️

hasty thicket
#

OKAY

#

it works

#

now i have another visual issue

#

it has the normal marks of + 10 +10 instead of the red block of X10

manic rune
#

...thats because you have + instead of X

hasty thicket
#

i assumed that, so if I just change the + to an x it'll work?

manic rune
#

change this to "X"

#

and also

hasty thicket
#

k

manic rune
#

change the text color to white

#

remember the spacing

hasty thicket
manic rune
#

no no

#

{X:mult,C:white}

#

X represents the background of the text

#

C represents the color of the text

hasty thicket
#

okay

manic rune
#

s represents the size

hasty thicket
#

lua '{C:mult,X:white}X#1# {}Mult','{C:chips,X:white}X#2# {}Chips'

#

bro lua aint working me LOL

#
'{C:mult,X:white}X#1# {}Mult','{C:chips,X:white}X#2# {}Chips' 
#

nvm

manic rune
hasty thicket
#

figured it out

manic rune
#

nice

hasty thicket
#

How do I fix the X in X mult

red flower
#

{X:mult,C:white}

rain slate
#

X is the border/background thingy and C is just the text

hasty thicket
#

ty

#

done

#

two jokers officialy done ) fin terms of coding

rain slate
#

right now I have this code (it's a patch) in SMODS utils.lua ```lua
if scoring_hand and SMODS.has_enhancement(card, 'm_glass') and card:can_calculate() then
local odds = card.ability.extra or G.P_CENTERS.m_glass.config.extra
local fragile = false

for k = 1, #G.jokers.cards do
local key = G.jokers.cards[k].config.center.key
if key == 'j_tecci_joker_tempered' then
odds = odds * G.jokers.cards[k].ability.extra
elseif key == 'j_tecci_joker_fragile' then
fragile = true
break
end
end

if fragile or pseudorandom('glass') < G.GAME.probabilities.normal/odds then
destroyed = true
end
end

verbal wyvern
#

Someone screenshotted all the colors the other day and I saved the image if you need @hasty thicket

hasty thicket
#

i am 10000%

#

stealing this and copying it

rain slate
verbal wyvern
#

You dont need to copy any if it

hasty thicket
#

its easier to copy bc my wifi bad for references

verbal wyvern
#

Fair fair

#

I saved it to my phone gallery js so I can look on it easily

rain slate
#

you can find that function in lovely's functions/misc_functions.lua

#

globals.lua is also good to look at, a lot of things (like the colors used in that function) are initialized there

verbal wyvern
#

I would definitely recommend extracting the base game files if you havent yet too

vocal cedar
#

@verbal wyvern

verbal wyvern
#

😭

#

Are you just doing this to all Jokers

#

The Mog pack..

minor furnace
#

the Chad Egg

verbal wyvern
#

Hanging Egg..

hasty thicket
#
function loc_colour(_c,_default)
    G.ARGS.LOC_COLOURS = G.ARGS.LOCS_COLOURS or {
        red = G.C.RED,
        mult = G.C.MULT,
        blue = G.C.BLUE,
        chips = G.C.CHIPS,
        green = G.C.GREEN,
        money = G.C.MONEY,
        gold = G.C.GOLD,
        attention = G.C.FILTER,
        purple = G.C.PURPLE,
        white = G.C.WHITE,
        inactive = G.C.UI.TEXT_INACTIVE,
        spades = G.C.SUITS.SPADES,
        hearts = G.C.SUITS.HEARTS,
        clubs = G.C.SUITS.CLUBS,
        diamonds = G.C.SUITS.DIAMONDS,
        tarot = G.C.SECONDARY_SET.TAROT,
        planet = G.C.SECONDARY_SET.PLANET,
        spectral = G.C.SECONDARY_SET.SPECTRAL,
        edition = G.C.EDITION,
        dark_edition = G.C.DARK_EDITION,
        legendary = G.C.RARITY[4]
        enhanced = G.C.SECONDARY_SET.ENHANCED,
    }
        for _, v in ipairs(SMODS.Rarity.obj_buffer) do 
            G.ARGS.LOC_COLOURS[v:lower()] = G.C.RARITY[v]
        end
        for _, v in ipairs(SMODS.ConsumableType.ctype_buffer) do 
            G.ARGS.LOC_COLOURS[v:lower()] = G.C.SECONDARY_SET[v]
        end
        for _, v in ipairs(SMODS.Suit.obj_buffer) do 
            G.ARGS.LOC_COLOURS[v:lower()] = G.C.SUITS[v]
        end
    return G.ARGS.LOC_COLOURS[_c] or _default or G.C.UI.TEXT_DARK
    end
end
#

done

#

🙂

rain slate
hasty thicket
rain slate
#

I'm also hoping you didn't like actually just copy the function into your code but like just wrote it down as a note

verbal wyvern
#

Id just keep it in a txt document on your desktop tbh

#

Easily accessible and not in mod folder

hasty thicket
#

lol

rain slate
#

I just open the entire mods folder when developing

#

so I can easily look at SMODS and lovely code

modern kindle
#

im already in a workspace when working on mods, so it wouldnt be unreasonable to leave it within the mod imo

hasty thicket
#

i just havea mod folder called balatro extras for mods

rain slate
vocal cedar
#

its goin down

verbal wyvern
verbal wyvern
vocal cedar
#

redid the ENTIRE localization and renamed every instance of Joker into Jerker Jonker Jorker or Jonker

#

most are joker

vocal cedar
vocal cedar
vocal cedar
verbal wyvern
#

Bro replied to me thrice

#

But yeah that sounds crazy for a Jorker 😭

topaz sun
#

Does anyone know how the game handles the dark_edition color to change like it does?

#

It shifts between two colors, but where are those colors defined?

red flower
#

this is in update

topaz sun
frosty dock
#

SMODS.Gradient just needs you to provide the endpoint colors

bold sleet
#

sh*t

#

wrong channel mb

#

dofajsdofjaosefpawef

vast fractal
#

[inside of joker code]
is m_molten fine if I reference my custom enhancement or its should be m_modprefix_molten?

vast fractal
#

thank you

topaz sun
frosty dock
#

it doesn't get added into loc_colour by default

#

it's pretty simple to add it though

#
loc_colour('') -- initializes args in case they're not there yet
G.ARGS.LOC_COLOURS.my_gradient = SMODS.Gradients.modprefix_key
topaz sun
#

I see. Real simple implementation, then. And here I was making lovely patches and whatnot. I shoulda read the wiki lol. Thanks!

unkempt thicket
#

How do i get cards that mime can trigger in hand?

minor furnace
#

aight, time to figure out how to add extra booster packs to shops

red flower
minor furnace
#

this is indeed what I found

gaunt phoenix
#

How could I level up the played hand ? Can't find anything :c (pls ping me if you answer)

strong jacinth
#

Uhh, anyone?

red flower
#

what's area?

vast fractal
#

im losing my braincells here 😭

error part is on v:set_ability

im trying to convert the card's enhancement into their "melted" version

manic rune
#

arent you supposed to put a key there

#

not the whole P_CENTERS thingy

red flower
#

no that's correct

manic rune
#

oh

#

-# wait really?

#

i think my mod uses set_ability with keys though

red flower
#

maybe both are correct idk

manic rune
#

oh wait nvm my function uses keys because the code handles it

#

:3

#

silly me

vast fractal
manic rune
manic rune
vast fractal
crimson marlin
manic rune
#

how is that even possible

#

😭

#

thats some ridiculous scaling

manic rune
#

does the enhancement load in game

vast fractal
#

my god

manic rune
#

oh

#

LOL

vast fractal
#

😭

manic rune
#

you only sent the molten one so i didnt know 😭

#

oh but also

#

can i ask why you put this inside a table?

vast fractal
#

stress from trying to fix the bug

#

i forgor

manic rune
#

oh its fine

#

if it works then its fine lol

#

i was just curious why you used a table instead of just "HA"

gaunt phoenix
#

I would like to level up the played hand every 3 hands, and I coded that. The problem is when it should level up, it makes the game crash

#

I took the space joker's code, but it seems like I misunderstood something

wintry solar
#

just return level_up = true

manic rune
#

i think card = self is wrong

#

should be card = card

wintry solar
#

-# you never need to return card = anything anymore

manic rune
#

-# i mean, its useful if you want the message to show on other cards ig :3

quartz ravine
#

Just sharing these two new jokers!

tardy wind
red flower
#

it's sad that this doesn't work

rain slate
#

is there some return effect or something that you can use in context.final_scoring_step to like set the chips and mult to specific values?

quartz ravine
#

the left Joker gives you random gold seals at a low hit rate. The right joker will make Unplayed Gold Seals trigger for xMult

rain slate
gaunt phoenix
quartz ravine
#

My artist says thank you @tardy wind @red flower

gaunt phoenix
gaunt phoenix
rain slate
lucid owl
#

do pixel_size or display_size work with sizes greater than the default joker size? i'm trying to add a joker with a 76x76 sprite (not my art) but just can't seem to get it to work (or am i just using it wrong?)

frosty dock
zealous glen
zealous glen
frosty dock
zealous glen
#

The duplicated sprite floats in the middle of the CardArea and gets transported to the Joker while I'm holding it, but then stays in place when I let the Joker go. Any help?

frosty dock
#

maybe you don't need the pixel_size, or you need to adjust it for the atlas size

lucid owl
#

hmm, okay

zealous glen
lucid owl
#

the sprite is 78x78 (1px border) and the actual area i want to use is 76x76

zealous glen
lucid owl
frosty dock
#

not sure

#

but i know cryptid has had an issue like this before

unkempt thicket
#

How do you iterate the suits in game?

lucid owl
zealous glen
frosty dock
minor furnace
#

can you feed something directly to the info_queue without calling the center of something else?

#

I mean I assume you can and I just need to figure out how to structure it

frosty dock
#

that something being just a generic description?

red flower
minor furnace
#

yeah

frosty dock
#

you can make a localization entry in Other and put something like { set = 'Other', key = 'the_key' } into your info_queue

faint yacht
minor furnace
frosty dock
#

if your description needs variables, you can pass those as vars within that table

red flower
#

yoooo

zealous glen
quartz ravine
#

Hey John, I would like to apply a shader on a new booster pack I made. is there a method exposed in Smods to do this?

zealous glen
frosty dock
#

yeah I think you can just use a draw function to do that

frosty dock
quartz ravine
#

Is that listed under utility functions? Thanks I will go look

zealous glen
#

-# Although I think it should still be called, maybe as can_calculate(true)

frosty dock
#

eval_card checks context.ignore_debuff

#

if it's set, it uses can_calculate(true)

tall wharf
#

❤️

#

what the fuck am i cooking

frosty dock
#

currently, only context.debuff_card uses this, but of course other calculations can use it too

quartz ravine
#

Is there an examlpe of how ot use DrawStep. I couldn't figure it out from the docs

zealous glen
#

just a draw function

tall wharf
frosty dock
tall wharf
#

omg

tall wharf
zealous glen
tall wharf
#

thank you mr jonathan "aurelius7309" steamodded

frosty dock
#

any context that has this property set will ignore debuffs

#

by calling can_calculate(true) in eval_card instead of can_calcuate()

minor furnace
frosty dock
minor furnace
#

it appears I have failed step 0: having a localization file

quartz ravine
tall wharf
#

you put the draw function inside SMODS.Booster

modern kindle
tall wharf
#

hey aure what's new in steamodded this week

#

in other news how are you doing

minor furnace
#

time to check the wiki to figure out how localization files work

frosty dock
tall wharf
#

OMG

#

holy shit

frosty dock
#

in other news I'm about to have dinner

manic rune
#

wait

#

calculation... for blinds???

tall wharf
#

what are u gonna eat

manic rune
#

is this real

tall wharf
#

my dreams

#

oh my lord

#

@manic rune you know what that means

#

fish

manic rune
#

:3

strong jacinth
manic rune
#

diabolical² blinds please

strong jacinth
tall wharf
modern kindle
zealous glen
tall wharf
#

(fun fact this was the second bowl i ordered for the photo)

red flower
modern kindle
#

I'm gonna be making some wings tonight, bought 10 pounds of em

tall wharf
#

(don't worry it did not go to waste i ate both)

#

(large sized)

strong jacinth
vast fractal
#

what is the default value for no enhancement since v.config.card == G.P_CENTERS.c_base is false when i played a default card

red flower
quartz ravine
#

Thanks!

#

Do jokers have a 'before draw' method? I have one joker which I woudl always like to have a specific edition applied to it

manic rune
red flower
strong jacinth
zealous glen
tall wharf
#

so true

manic rune
#

shouldnt it be like, beating 10 challenge first...

tall wharf
#

no it should unlock alongside the challenge actually

manic rune
#

oh

tall wharf
#

meow

zealous glen
#

:3

manic rune
#

:3

#

welp, now this just seems bland

vast fractal
#

conversion is not working now for some reason 😭

frosty dock
#

v.config.center.key == 'm_steel' is correct

#

v.config.card relates to the playing card prototype

minor furnace
#

aight this is what I'm working with now

#

and I pray this is correct

manic rune
#

-# what the fuck

strong jacinth
manic rune
#

shouldnt this be {X:chips,C:white}X2{} Chips

frosty dock
vast fractal
minor furnace
strong jacinth
manic rune
#

true, true

#

good luck on getting it running :3

frosty dock
minor furnace
frosty dock
#

at least depending on the type of area, which you have not specified

strong jacinth
frosty dock
#

I'm actually not sure what the default is there

frosty dock
strong jacinth
#

The card area?

frosty dock
#

what about it

#

a title card area with not cards has no visuals to display

#

but again you haven't specified a type

strong jacinth
#

Whats this card areas type?

manic rune
#

G.consumeables?

#

:3

minor furnace
#

we are so back

strong jacinth
glad osprey
#

how do i hide the decks name when it isnt unlocked

frosty dock
manic rune
#

oh

red flower
frosty dock
#

thank you N'

manic rune
#

i dunno then, i have class tmr (yes, even in sunday), so im a bit frustrated rn :3

strong jacinth
minor furnace
manic rune
red flower
manic rune
#

-# wheres the joker reference in the art.

#

why does the art look like a fnaf minigame, actually

#

😭

zealous glen
#

also I have fixed Brazilian Miku and improved Champion's Belt

manic rune
#

and is it a strat to get daily double in a run, then turn off the game until its the exact day you want

#

:3

#

like, hear me out

formal parrot
manic rune
#

play a round on Monday

minor furnace
manic rune
#

then leave the game until its Tuesday/Wednesday for shop

modern kindle
#

The week is a 's' sandwich

manic rune
#

if you are using a planet card? wait until Thursday

tall wharf
#

:(

formal parrot
manic rune
#

if you want to beat the blinds? wait until Saturday or Sunday

glad osprey
manic rune
#

:3

manic rune
#

thats lame

formal parrot
#

LMFAOOOOOO

manic rune
#

put in some effort man

glad osprey
#

balatro.

minor furnace
glad osprey
#

ah gotcha

formal parrot
#

Bro dropped the egg

manic rune
zealous glen
manic rune
#

🤔

manic rune
zealous glen
#

in Catholic tradition anyways

minor furnace
# manic rune thats lame

the calculation uses os.date() so I mean people can play it however they want. I just thought the idea was hilarious

glad osprey
#

also playing it crashes the game lmao

manic rune
#

its monday over here

zealous glen
# manic rune actually?

as I just said, it's Catholic tradition. God created the world in six days then rested on the seventh

quartz ravine
#

LUA why can't you just do this

manic rune
#

-# yes i know you cant read it, but trust me im not gaslighting :3

zealous glen
manic rune
zealous glen
#

not in Brazil tho

modern kindle
manic rune
#

i will play your mod like how it should be played

#

:3

formal parrot
#

WAKE ME UP

minor furnace
#

I could make it lock in to the effect of the day that you picked it up on, but I think the possibility of it being able to change is funny

formal parrot
#

WAKE ME UP INSIDE

manic rune
#

what if i optimize the run as well as possible with that joker

#

until i beat ante 8

#

:3

strong jacinth
#

How would i create a list in lua? (Or vector in c++ terms)

manic rune
#

-# aka more than 8 weeks

manic rune
zealous glen
strong jacinth
#

Its called table i believe

wintry solar
zealous glen
minor furnace
manic rune
minor furnace
#

so you have to do something that changes the context to update its effect

zealous glen
zealous glen
manic rune
#

yes

glad osprey
zealous glen
minor furnace
#

is this legal? {X:#3#,C:white}

glad osprey
#

like the regular deck

zealous glen
#

or main_end?

zealous glen
glad osprey
manic rune
minor furnace
#

cool

manic rune
#

use V instead

minor furnace
#

right

frosty dock
#

{B:1,C:white}

zealous glen
frosty dock
#

V is for text color

manic rune
#

o

#

B is V but for background?

zealous glen
frosty dock
#

nah I made that up

#

you can use it though

#

I put it into smods after making it up

manic rune
#

what the hell 😭

#

-# thats cool tho ngl

manic rune
# zealous glen also any suggestions for Miku

uhhhhhh, what if its something like what Neato Jokers do (retrigger 2 and 7 or something two tiems), but instead its for black suits? :3

my brain ran out of idea juice already, sorry :(

unkempt thicket
#

Where are the keys to in-game suits stored

tall wharf
#

best modder of all time

manic rune
#

goes to:

tall wharf
#

fake it until you make it

#

i love working with UI

manic rune
#

@fake it until you make it congrats!

zealous glen
frosty dock
manic rune
tall wharf
#

...

#

i wanted to do that

manic rune
#

:3

#

LOL

zealous glen
tall wharf
#

i actually do

zealous glen
#

so I can screenshot it

unkempt thicket
zealous glen
#

but I'm not sure how to do it

#

I think I can make it a mod and hide it in the configs of that mod

manic rune
#

but i could be wrong

#

im not that proficient with lua myself lol

minor furnace
#

what if I just said "no" to color

manic rune
#

💔

zealous glen
#

That's still a color

manic rune
#

yeah

zealous glen
#

make it transparent

frosty dock
zealous glen
#

so the user can see the inside of their monitor

frosty dock
#

SMODS.Suits is not a numeric array

strong jacinth
#

How do i change size?

tall wharf
#

what the fuck is this function name dawg

frosty dock
formal parrot
formal parrot
#

Me fr

#

Bonana

red flower
tall wharf
#

sure

minor furnace
#

but X2 per remaining hand feels too weak

tall wharf
red flower
#

❤️ its called sharing

formal parrot
glad osprey
#

if i wanted to store the number of times something haoppened would i just use a loc_var for that?

tall wharf
minor furnace
formal parrot
hard flume
formal parrot
#

Make it give mult based on hands remaining

#

Xmult

#

Sounds good

#

Shoot the solar system

minor furnace
#

I want the effect to be money-related though 🤔

formal parrot
#

Hmmmm

minor furnace
#

and it's gotta be X2 something thematically

hard flume
#

Money equal to 2x current hour

formal parrot
#

For every 50 dollar spent gain 1xmult

#

I think it’s grape

#

Maybe lower the money

#

Overspending

#

Lol

#

Yeah i think it’s balanced like that

minor furnace
#

this is the thing in question

formal parrot
#

That way you need to spend to get mult but you need to stack to get double interest

formal parrot
#

I thought its another joker

minor furnace
#

it's this joker lmao

formal parrot
#

My bad dawg

minor furnace
#

all good 🫡

formal parrot
#

I think you need a bit of coloring in the effect

minor furnace
#

I'm getting there...

formal parrot
#

It looks cool tho i love the idea

minor furnace
#

Thanks!

#

and yeah I'll do the formatting eventually, once I get the last effect sorted out

formal parrot
#

Do you have other jokers made ?

#

I’d love to take inspiration from you

#

If you don’t mind

minor furnace
#

yeah I have a full page of them made so far

formal parrot
#

Can i see ?

minor furnace
#

Most of them are related to the new enhancements that the tarot cards give

formal parrot
#

That’s so cool i love the idea

#

Maybe i should code my own enhancement

#

I never thought of that

tall wharf
formal parrot
#

Like your mod wasn’t hard enough

tall wharf
formal parrot
#

ONG THIS GUY IS MAKING DARK SOULS BALATRO

minor furnace
next timber
#

in a seal calculate function, remove_playing_cards context, how do i make sure the card being destroyed is the one running the function? right now when any card is destroyed all of the cards in hand with the seal duplicate

formal parrot
#

Imagine rpg balatro

minor furnace
#

I have added funny color to description 🫡

formal parrot
#

I wish you can add colors to the joker’s name

#

Steamodded add this future please

frosty dock
#

pretty sure you actually can do that

#

it just doesn't work with tooltip names

wintry solar
#

Yeah I think coloured names in the main tooltip are supported in vanilla by default

formal parrot
#

DAMN

glad osprey
#

why this crash

formal parrot
#

I’m using this

glad osprey
dim lynx
#

But is x chips not equivalent to x mult

minor furnace
#

hmm well this resulted in a nil error on attempting to index field 'colours'
{B:3,C:white}

glad osprey
dim lynx
#

I’ve always thought this when someone shows x chips

glad osprey
#

shhhhhhhhhhhhhhhhhhhhhhhhhhhhh

dim lynx
remote sequoia
#

It'd technically be different in the case of Plasma deck.

minor furnace
dim lynx
#

Good points thanks

#

I never thought of plasma deck.

minor furnace
minor furnace
#

well it doesn't crash anymore so I know the formatting's right, but it doesn't display the color either...
return {vars = {os.date("%A"), effect, colours = {color}}}

remote sequoia
#

What's the best way to add a sound to a vanilla joker effect triggering? I've tried take_ownership of its calculate function with a copy of the original logic but it's returning twice for some reason (weirldy enough only return is twice. If I put the sound in the return, it plays twice, if I do it as play_sound before the return, only plays the once).

SMODS.Joker:take_ownership('j_trading',{
        calculate = function(self, card, context)
            if card.ability.name == 'Trading Card' and not context.blueprint and 
            G.GAME.current_round.discards_used <= 0 and type(context.full_hand) == 'table' and #context.full_hand == 1 then
                play_sound('Spongebobatro_buymorecards')
                ease_dollars(card.ability.extra)
                return {
                    message = localize('$')..card.ability.extra,
                    colour = G.C.MONEY,
                    delay = 0.45, 
                    remove = true,
                    card = card,
                    --sound = 'Spongebobatro_buymorecards'
                }
            end
        end,
    },
    true)```
#

Actually, it can't just be returning twice, since it's giving me the $3 twice too, come to think of it.

frosty dock
#

if so that's the third colour variable

edgy mountain
#

Any way to prevent a consumable type from creating a new button on the collections page?

minor furnace
#

nvm, changing it to 1 crashes it

#

I assume I should just be feeding it the string I would be putting there normally?

lucid owl
#

really perplexed by this one... the joker is supposed to halve its mult at the end of every round, but for some reason it's halving for itself and every unplayed card?? every unplayed card is dividing it twice

modern kindle
#

well, the memory sure was burning at least

scarlet spire
#

do consumables support setting their weight to make them rarer, or is that only a property of consumable rarities and hidden/soul mode?

remote sequoia
#

Don't suppose that'd help in my case too? I did check, commenting out tge money give makes it not happen at all, so it's not the vanilla effect still applying.

lucid owl
wintry solar
minor furnace
#

this crashes 🤔
{B:1,C:white}

return {vars = {os.date("%A"), effect, colours = {color}}}

#

wait I may be stupid

worthy sierra
#

Does anyone know what are the internal variable names for all the different card enhancements?

remote sequoia
minor furnace
remote sequoia
#

Which, hey, I don't mind $6 from trading card, but, not looking to make my joker reskin pack a "balance mod" :p

minor furnace
wintry solar
#

I'm pretty sure that would just work

glad osprey
#

whats the card area for cards held in hand

minor furnace
#

G.hand

strong jacinth
formal parrot
#

To store swords

strong jacinth
#

To store chemicals

glad osprey
formal parrot
strong jacinth
#

Sadly no

formal parrot
#

Breaking balatro (breaking bad reference)

strong jacinth
#

How would I make some space between two card areas?

glad osprey
#

omg im so dense

worthy sierra
#

Having trouble getting this card counting function... functional. Am I missing anything obvious here? The message will not run even when three 7's are played. (Turning off the function check in calculate does play the message so the issue is with this helper function)

    local result = 0
    for i = 1, #context.scoring_hand do
        if context.scoring_hand[i].base.value == countedRank then
            result = result + 1
        end
    end
    return result
end

...

calculate = function(self, card, context)
        if context.joker_main then
            if countEnhancedRankInHand(context, 7) >= 3 then 
                return {message = 'Active!'}
            end 
        end
glad osprey
#

i was checking if the event was a hand being played and i was checking args.hand instead of args.type 😭

minor furnace
#

I think these are the values I need to be using?

remote sequoia
next timber
wintry solar
#

they're almost all in here

hard flume
#

How do I check if a card has a specific enhancement? I want a Joker to buff itself when my custom enhancement plays

scarlet spire
#

SMODS.has_enhancement(card, key)

minor furnace
next timber
#

what does the primary colour of a consumabletype do? the secondary colour changes the badge colour and the colour of the button in the collectables menu, but im not seeing the primary colour anywhere

glad osprey
#

how evil is this

next timber
#

lmao

#

i love it

minor furnace
glad osprey
#

no

next timber
#

(sorry to be grammar police but in this case it'd be "losing" not "loosing")

glad osprey
#

ty

#

my gramer bad :3

next timber
#

lol

scarlet spire
hard flume
#

how do i apply an enhancement?

chrome widget
#

In doing 15 losses, you have about a 65% chance you'll unlock it. You're gonna do that naturally just trying to finish higher stakes, and you can even farm it if you want

bold sleet
#

Hello, good people. This is a bit of a bold question, but does anyone know where is the main menu created? Like, in the files, what lines of code create the main menu? The buttons and the logo is what I am looking for, mainly.

glad osprey
small moon
dense vector
small moon
# bold sleet pweaxe maybe?

Look for the text "COLLECTION" in the en_us localization file and find the ID used in the code. Should be somewhere in UI_definitions.lua

unkempt thicket
#

Where is the enhancements in cards stored? (like card.ability or card.config something)

small moon
#

Ok time for a question of my own
I'm making a seal that "eats" (destroys) Stone Cards in the played hand before they get scored. However, said Stone Cards still get scored, and then return to the deck in a half existant state, where they don't show up in the deck overview but still get drawn as invisible cards. How do I get them fully destroyed before they get calculated? This is my calculate function:

calculate = function (self, card, context)

    -- Ensure the card has a current Seal Seal value
    if card.ability["boingular_seal_current"] == nil then
        card.ability["boingular_seal_current"] = 0
    end

    -- Before the hand is scored
    if context.before then

        -- Check for any stone cards in the deck
        local ret = true
        local stone_cards = {}
        for i=1, #G.play.cards do
            local card = G.play.cards[i]
            if card.ability.effect == "Stone Card" then
                ret = false
                stone_cards[#stone_cards+1] = card
            end
        end
        if ret then
            return
        end
    
        -- Check if this Seal is going to eat a Stone Card this hand
        local eating = false
    
        -- Loop through the stone cards, dissolve them, and add to this Seal's mult
        for i=1, #stone_cards do
            local stone_card = stone_cards[i]
            if not stone_card.eaten then
                card.ability["boingular_seal_current"] = card.ability["boingular_seal_current"] + 1
                stone_card.eaten = true
                stone_card:start_dissolve()
                eating = true
            end
        end
    
        -- If the Seal is eating a Stone Card, say "Yummm! :3"
        if eating then
            return {
                message = "Yummm! :3",
                colour = G.C.UI.TEXT_INACTIVE
            }
        end
    
    end
    
    -- When the card is played 
    if context.main_scoring and context.cardarea == G.play then
        return {
            mult = self.config.base ^ card.ability["boingular_seal_current"]
        }
    end

end
frosty dock
small moon
#

I'm mostly looking at this part of my code, during context.before:

-- Loop through the stone cards, dissolve them, and add to this Seal's mult
for i=1, #stone_cards do
    local stone_card = stone_cards[i]
    if not stone_card.eaten then
        card.ability["boingular_seal_current"] = card.ability["boingular_seal_current"] + 1
        stone_card.eaten = true
        stone_card:start_dissolve()
        eating = true
    end
end
scarlet spire
#

is my only solution for making a tarot or planet card rarer to just enable hidden like the soul does?

strong jacinth
#

How would I make some space between two card areas?

frosty dock
strong jacinth
unkempt thicket
#

how do i get the config of an enhancement is it card.ability.effect.config or?

strong jacinth
#

And in my case, the surrounding nodes are the card areas right?

#

<@&1133519078540185692>

pulsar flower
#

strong jacinth
#

For yall, dont click on this

frosty dock
wintry solar
#

man auto formatted ui code is cursed as fuck

strong jacinth
#

yeas

frosty dock
#

I'm not sure object nodes can have padding

#

if this doesn't work, put a row node with minimum dimensions between the two object nodes

strong jacinth
tawdry coyote
#

Hey, I'm a bit new to making mods for Balatro, and I'm struggling on making a joker that destroys the joker to the left side of it, and whenever it does it gains $5 in value. would anyone have tips for this? (Besides looking at the source code, I've tried and failed)

frosty dock
glad osprey
#

the fuck did i do

chrome widget
#

Is it possible to play two sounds at once using a calculate return table?

#

I.E. one on the effect on a playing card, and one on the joker that causes the effect?

strong jacinth
#

I hatreu i

glad osprey
strong jacinth
strong jacinth
frosty dock
#

ugh try making it a column instead

red flower
strong jacinth
#

👍

frosty dock
glad osprey
#

THE FUCK

strong jacinth
frosty dock
#

task failed successfully

red flower
glad osprey
#

also as it turns out there is not a check_for_unlock for losing a run

wintry solar
#

there is a box node

frosty dock
#

box nodes 😭

glad osprey
#

whats a function thats called when a run is lost

violet oasis
#

Hey y'all! I've been developing a texture pack for a while and today I decided to migrate from Steammodded to Malverk. I managed to get most things working except the following:

  • Locked and undiscovered items (like jokers and vouchers)
  • Card skins
  • Other minor stuff, such as the default joker that shows in the center of the screen up when you start the game

Is there any way to make them work with Malverk or should I keep those as a "separate" mod using the Steammodded format?

#

Talking about these mostly

wintry solar
#

currently not

#

its planned for when I have some time to do it

violet oasis
#

Understandable, thanks for the answer!

wintry solar
#

the card skins I recommend using SMODS.DeckSkin, and the launch joker is created before malverk kicks in

lucid owl
#

is checking if a card doesn't have an edition as simple as doing something like and not v.edition?

frosty dock
#

yes

wintry solar
#

-# unless you have that scuffed saturn build

strong jacinth
#

How would i put that big area under?

frosty dock
#

by having a column node that has a row node with the top areas and another row node with the bottom area

violet oasis
hard flume
#

this code shpuld owrk right?

chrome widget
hard flume
frosty dock
#

also wtf is that formatting

#
  • everything you have in return tables doesn't belong there
hard flume
#

Oh

glad osprey
zealous glen
frosty dock
#

return tables in calculate functions are only for things like scoring effects

strong jacinth
frosty dock
glad osprey
#

how do i check the date

frosty dock
#

you might want to move that out one set of brackets

strong jacinth
#

Like where specificlly?

frosty dock
strong jacinth
#

I hate UI code

wintry solar
#

the way you set it out isn't helping

strong jacinth
#

What do you mean

frosty dock
#

your code is indentation hell

strong jacinth
#

How should it look like?

unkempt thicket
#

Where is the config for enhancements stored? How can i get them from the card its on?

strong jacinth
wintry solar
#

this is how I write UI code

glad osprey
wintry solar
glad osprey
#

i am going to make you draw all of your purple seals exclusively on the waters

lucid owl
#

the e_negative edition is obviously for jokers, but what's the key for the negative playing card edition?

red flower
#

e_negative_playing_card

lucid owl
#

awesome, thanks i somehow didn't find that lol

remote sequoia
glad osprey
frosty dock
lucid owl
strong jacinth
wintry solar
#

that looks so much better

strong jacinth
#

-# and did i format it right?

wintry solar
#

you miss a set of brackets around the area3 object node

#

-# and if it was on a new line you'd see a bit better

#

I tend to start a new line for each set of nodes, unless it's only going to contain a single node (either text or object generally)

tall wharf
tall wharf
wintry solar
strong jacinth
small moon
glad osprey
#

anyone know how i could score exactly 69 chips

tall wharf
#

23 x 3?

strong jacinth
wintry solar
#

I can't be more specific than that

strong jacinth
#

Ohh, you meant around the node, i read it wrong.

#

How do i create a lua table?

zealous glen
#

{}

strong jacinth
#

so local bbb = {}?

#

With a card area, how do i set so there isnt a card limit?

#

(Of the joker type)

red flower
#

you mean the text at the bottom?

strong jacinth
#

yes

red flower
#

i dont think you can without hooking or patching things, but i might be wrong

hard flume
#

i fixed most of it, but now im getting an "assertion failed" error

strong jacinth
#

How do i position this button correctly

next timber
#

in the remove_playing_cards context, how do i check if the card running the function is the one being destroyed?

glad osprey
#

how do i check if a deck is unlocked

frosty dock
hard flume
#

Oh okay

small moon
#

How do I only get the cards that will be scored in debuff_hand?

strong jacinth
small moon
tall wharf
hard flume
#

It works now!!! Thanks yall

strong jacinth
glacial bloom
#

As someone who wants to begin coding, would making my own mod be a good way to learn? Starting by making something simple and small

red flower
#

anything you find fun is a good way to learn

glacial bloom
#

Thank you!

tall wharf
#

hey n

red flower
#

hey

tall wharf
#

im evil

red flower
#

untrue

tall wharf
#

check this out

red flower
#

so this is an only boosters challenge

tall wharf
#

basically

#

no

#

u can still buy and use

#

it's also on red stake

red flower
#

sounds hard

tall wharf
#

i mean

hard flume
#

Yayay I'm so happy I got the Yume Reference Cards working. Now, how would I go about making them only appear when their respective world is active... Hmm...

tall wharf
#

can't have shit

glad osprey
agile thistle
tall wharf
strong jacinth
agile thistle
tall wharf
#

i have made it so i can define a hardcore challenge the same as how i would define a normal challenge with Steamodded

next timber
#

so whats the difference between a normal challenge and a hardcore one anyway

tall wharf
#

hardcore one is harder™️

#

and it has a different deck

next timber
#

awesome

tall wharf
#

look i even made it real

next timber
#

i wonder if there are any mods that make boss blinds permenant for every blind after

#

so by ante 8 youre dealing with 8 debuffs

tall wharf
#

die

#

you die

next timber
#

lmao

tall wharf
#

by ante 8 you die

next timber
#

yeah that checks out

tall wharf
#

so Obsidian Orb?

#

checks out

next timber
#

then you get verdant leaf and you have to sell a joker every single ante afterwards

glad osprey
next timber
#

ooh

#

good idea

glad osprey
#

man if only someone i knew was making a mod specifically for decks

vale lake
#

what's the easiest way to give consumable cards different weights?

glad osprey
strong jacinth
next timber
#

in the remove_playing_cards calcuate context, how do i check if the card running the calculate function is the one being destroyed?

wintry solar
#

you don't

#

you use the destroying context

chrome widget
#

When I use the standard localize() function, such as for card effect messages, am I able to use multiple lines of text? Or is that not supported outside a proper UI box?

wintry solar
#

oh I suppose you mean when something else destroys the card right?

next timber
#

just in general when the card is destroyed

#

its a seal that triggers on card destroy

wintry solar
#

check whether the card is within the table then

next timber
#

sorry, which table?

#

wait no i think i got it

glad osprey
#

fym the parenthesis is right there

frosty dock
#

G.PROFILES[1]

glad osprey
#

yea no i realized that the moment i sent it lmao

#

how do i get the percentage of collection

wintry arch
next timber
wintry arch
#

last one of these four cards i need to implement is the devil's bedposts

next timber
#

ok FINALLY i got the revive seal working. now i just need to. texture the card that gives it to you. funnn

#

this would be so much easier if libresprite let you trace reference images

glad osprey
wintry arch
#

im thinking of changing how this joker works, actually.
instead of giving +1 hand size as a permanent buff, i might attach the +1 hand size buff to the joker itself. so it's like a juggler that gives up to +3 instead but you need to prime it

earnest stratus
#

For building atlasdeck do those sprites have the same 1x and 2x dimensions as jokers?

glad osprey
#

remove_from_deck iirc

glad osprey
small moon
#

How do I get just the scoring cards? The cards variable is all played cards, scoring or not

tardy wind
#

and for an added bonus, its in the context

small moon
#

There's no context in debuff_hand

glad osprey
#

scoring_hand maybe?

tardy wind
#

context.scoring_hand holds all played card object

small moon
glad osprey
#

ooooooh

small moon
#

I'm looking through hand[handname] to try to find how to get the cards from there

#

If it's possible

glad osprey
#

whats the difference between hand and handname

small moon
#

hand is a table and handname is a string

glad osprey
#

hand is a table of what?

tardy wind
small moon
tardy wind
#

so every card held

small moon
glad osprey
#

in that case how are hands defined?

glad osprey
small moon
glad osprey
#

ah

wintry solar
#

no

#

you can't use start_dissolve during scoring phases

plush cove
#

question

so I have a Joker that, if you sell it, it creates the last Joker that was sold or destroyed, and this is how I save info on what the last Joker was

are both of these hooks necessary or can I just keep the cardarea one?

earnest stratus
#

Can anyone help me understand why I'm getting this error on launch?

panicked at crates/lovely-core/src/lib.rs:364:25:
Failed to parse patch file at "C:\\Users\\Windows\\AppData\\Roaming\\Balatro\\Mods\\Disco\'s Vanilla+\\lovely.toml":
TOML parse error at line 1, column 1
  |
1 |
  | ^
missing field `manifest````

my lovely.toml has [manifest] on line 1 so I'm not sure what I'm missing
plush cove
#

send a screenshot

#

of the toml file

earnest stratus
plush cove
#

That's not how modding works

#

For Manifest in the toml you just want to have
[manifest] version = "1.0.0" dump_lua = true priority = 5
and you want to have your mod metadata in a separate .json file

#

And you don't do it using [script] entrypoint

#

It's all in the json

small moon
earnest stratus
wintry solar
#

what's the exact effect you're trying to do?

plush cove
small moon
# wintry solar what's the exact effect you're trying to do?

I have a Seal that consumes any Stone Cards in the played hand when played along with them, so a hand that has a High Card with the Seal and a Stone Card should destroy the Stone Card and not count it when playing, and then give a buff to the Seal. The issue is since I'm trying to destroy a card during context.before it's creating ghost cards as I'm destroying cards outside of the correct context.

wintry solar
#

hmmm, destroying other cards based on a cards modifiers isn't supported by default, you'd need to do some lovely patching to allow for that

unkempt thicket
#

Any idea why this doesn't work?

earnest stratus
#

Still crashing on launch with same error, TOML parse error at line 1 column 1

faint yacht
#

Injector version?

earnest stratus
#

0.7.1

slender cape
#

does anyone know how to take ownership of seals? this code doesnt seem to work

    SMODS.Atlas({ key = 'Enhancers_owc', path = "Enhancers.png", px = 71, py = 95 })
    SMODS.Seal:take_ownership('blue_seal', { atlas = 'Enhancers_owc' })
earnest stratus
#

nvm I figured it out

#

psych the mod was disabled then when I tried to activate it I got the same error lol

north brook
#

Hey, I asked this yesterday. Any chance I could get some help on it?

latent portal
#

Chat

#

I need some feedback

#

Is this too OP?

cyan dune
#

Oh, sorry, I've got it slightly wrong- you only need soul_rate.

brisk basin
#

is there any way to change the suit of all cards in the played hand when they're returning into deck?

#

every way i tried makes the change visually almost before even scoring the cards, even if the suit its detected as the former one

stiff locust
#

bump

sturdy compass
stiff locust
#

that doesn't exactly narrow it down

#

just started doing this when i was testing consumables

sturdy compass
#

more specifically the Pearl Drone joker

rapid stag
#

so i just had an idea for a joker - but i want to know if it's possible to say, interpose any sequence of events with a fake loading screen of variable length?

the idea i have in mind is a "sonic '06" joker, with the description of { "{X:mult,C:white}X3{} mult", "{C:mult}:)" }. and from the moment they buy it, it just randomly puts fake loading screens of random lengths (anywhere from 20 to 240 seconds) between actions (i'm thinking shop rerolls, opening boosters, exiting the shop, starting a round, ending a round, selling jokers - but most importantly, always when buying this joker)

with the idea being that i want the reaction of "...so it's just X3 mult? what's the downside?" hits buy, immediate 30-second loading screen "oh."

#

-# i am a sane and mentally sound person that can reasonably be trusted with mod design & development

stiff locust
sturdy compass
#

honestly all the important bits are at the very bottom of the log lol

sturdy compass
#

But it looks like a flaw in its remove_from_deck function or smthn

#

I don't know anything about this mod tho so I have no idea what it's actually trying to do here

stiff locust
#

right now it should be giving +1 consumable slot

#

the remove_from_deck reverts the extra slot and that's it

#
remove_from_deck = function(self, card, from_debuff)
        G.consumeables.config.card_limit = G.consumeables.config.card_limit - card.ability.extra.slots
    end,
formal parrot
#

What the fuck

#

Man

#

I’m not a cake

sturdy compass
#

It's definitely the pearl drone joker tho

stiff locust
#

removing that joker's code does stop the crash

problem is that I want the joker to exist

sturdy compass
#

well duh

stiff locust
#

removing its set_ability or add_to_deck or remove_from_deck or calculate functions do not stop the crash

#

removed all individually and removed them all and it still happened

#

oh ffs

north brook
stiff locust
#

I think i know what I did now

#

the rarity is a string

#

it's supposed to be an integer

sturdy compass
#

ew no github for the mod

stiff locust
#

oh my god that was it

stiff locust
sturdy compass
#

splatro

#

I was gonna check the code for it lol

stiff locust
#

there is a github for it though

#

the code for this joker isn't on there yet

#

i'm working on an update right now

#

anyway I fixed it, the rarity was a string

#

instead of an integer

#

i'm a dumbass

stiff locust
slender cape
#

im making a texture pack

stiff locust
#

doesn't malverk have a system for it

slender cape
#

idk what that is but steamodded has worked for everything so far

sturdy compass
rapid stag
#

or to my UI issue
-# or my custom legendary joker undiscovered description issue?

stiff locust
#

for managing texture packs

slender cape
sturdy compass
#

Hell yeah. Glad I could help

hard flume
#

Does anyone know how to make it so my own cards only spawn when this other card is in play?

next timber
#

is there a way to make an edition that can only appear on my custom consumable type?

hard flume
sturdy compass
#

Here's an example for basically what you're trying to do that I just so happened to have on hand lol

latent portal
sturdy compass
next timber
#

sounds pretty good

#

i like it

hard flume
cyan dune
# north brook Where would I add that to the lua file, specifically? And am I able to add this ...

I'm pretty certain you can use SMODS.Consumable:take_ownership to add this to the cards as an auxiliary mod. Like so:

SMODS.Consumable:take_ownership( 'modprefix_consumablekey', {
  soul_rate = 0.5 -- Or whatever other value you want to put here
})

Replace the modprefix with the prefix specified in that mod's json (or their Steamodded header), and the consumablekey with the key of that consumable in that mod's code. Your own mod's badge will be added to that consumable by doing this- I'm not entirely sure how you can remove that, but it won't affect anything.

woven merlin
#

i have no idea what 'T' is

latent portal
woven merlin
#

i am trying to use SMODS.create_card and it just... wont work

sturdy compass
woven merlin
#

use = function(self, card, area, copier)
SMODS.create_card({set = 'Joker', key = 'j_lode_Lodestone', stickers = 'eternal', no_edition = true, area = 'G.jokers'})
end

hard flume
sturdy compass
#

I did indeed whoops

#

Lotta people asking stuff rn 😭

hard flume
#

I knew that, though. I had it appear in my custom booster, but I don't want them to appear in the shop or the jimbo booster.

sturdy compass
#

Oh only in the boosters. Hmm that's a tough one. Probably some patch shenannigannery could work but I'm not exactly sure what

hard flume
#

Hmm, it's not that big of a deal. I'll just have them appear very rarely for now.

#

Would I need to patch to guarantee a certain booster after a boss blind?

rapid stag
#

@wintry solar do you know ~~what purpose these graphics serve? (in the spectrals/tarots/planets asset)

and if they do have any purpose,~~ whether or not they have associated keys in malverk cirBox

i imagine they don't atm

glad osprey
#

rather those are just the background

rapid stag
glad osprey
#

... it isn't tho

rapid stag
#

oh is this in front of the locked graphic?

glad osprey
#

I said undiscovered not locked

rapid stag
#

ohhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh

glad osprey
#

there is no locked graphic

north brook
rapid stag
glad osprey
#

probably in case there ended up being consumables which are locked

rapid stag
#

ahhh

glad osprey
#

but considering there aren't any of those in the base game it goes unused for now

cyan dune
frosty dock
cyan dune
#

Oh, that's nice

north brook
cyan dune
#

Yeah, that's right

frosty dock
#

yep

#

for the full key, there is also a c_ in front for consumables, but you don't need to provide it to take_ownership

north brook
#

And for soul_rate specifically, it's a safe assumption that all consumables start at 1?

thorn ridge
#

Is there a doc or guide to get started with modding?