#💻・modding-dev

1 messages · Page 387 of 1

maiden phoenix
#

@slow brook This means you have to write your thing under descriptions/Other, and that the key has to be your key but lowercase with '_seal' next to it

slow brook
#

so just key_seal in descriptions/other?

maiden phoenix
#

yes

hard mica
#

i can try putting the draw function as well i guess

#

yeah it not related

dapper sun
#

how do i make a ui element appear bc of my joker? i don't know any jokers that do that,,

hard mica
#

looking at the function more , it seems to be doing 0 + 3 (my set money that needs to return )

#

the crash happens once my seal effect is not on gold seal effect and i try to score the said card with the seal other than gold seal effect

wild escarp
#

Anyone know why this doesn't do anything? I adapted the DNA code from vanillaremade.

calculate = function(self, card, context)
    if context.before and context.cardarea == G.play then
        for k, v in ipairs(context.scoring_hand) do
            if v.seal then 
                G.playing_card = (G.playing_card and G.playing_card + 1) or 1
                local copy_card = copy_card(v, nil, nil, G.playing_card)
                copy_card:add_to_deck()
                G.deck.config.card_limit = G.deck.config.card_limit + 1
                table.insert(G.playing_cards, copy_card)
                G.hand:emplace(copy_card)
                copy_card.states.visible = nil

                G.E_MANAGER:add_event(Event({
                    func = function()
                        copy_card:start_materialize()
                        return true
                    end
                }))
                return {
                    message = localize('k_copied_ex'),
                    colour = G.C.CHIPS,
                    func = function() -- This is for timing purposes, it runs after the message
                        G.E_MANAGER:add_event(Event({
                            func = function()
                                SMODS.calculate_context({ playing_card_added = true, cards = { copy_card } })
                                return true
                            end
                        }))
                    end
                }
            end
        end
    end
end
slow brook
#

how can i give a played card a seal?

daring fern
hard mica
#

mightve found the problem , the elseif statement might be causing the problem

slow brook
#

what do i write inside pseudorandom() ?

dapper sun
#

a key

#

or seed or whatever you wanna call it

#

just a unique enough string

#

i recommend using the joker name

#

or seal name

#

etc

slow brook
#

ill just write prefix_jokername

dapper sun
#

that's what i do

dapper sun
#

yea pretty much

red flower
manic rune
#

you can reference from how run info/settings buttons open the menu, its hard to explain lol

#

but there should be a function like this which you can run from your jokers

dapper sun
#

ty

#

i am actually making an inventory/crafting thing kinda like yggdrasil

#

but connected to a specific joker

manic rune
#

mm i see

#

looking forward to your take on that :p

slow brook
#

i wanted a joker to have a 1/2 to give each played card a frozen seal, but this seems to give a seal to the joker and not the cards, what should i change card:set_seal so it works on cards played and not on the joker?

red flower
#

context.other_card

#

also don't return it

dapper sun
slow brook
# red flower context.other_card

if only it didn't give all the seals at once and actually waited for the animation to end and my joker would shake everytime...

#

tried doing card:juice_up but it only did it once at the start

slow brook
#

I may have forgot the return in the event

charred magnet
#

?

slow brook
slow brook
charred magnet
#

i made a joker

#

it gains 0.15x mult for every face card scored not effected by paradolia

daring fern
charred magnet
#

also do you know how to make packs?

#

like joker packs so one mod can have mulibul joekrs

#

spelling :/

red flower
red flower
charred magnet
#

first one u said

red flower
#

you just put them in one file

charred magnet
#

like all in main

#

.lua

#

or like

red flower
#

yes

charred magnet
#

bc i have a json

slow brook
charred magnet
#

WAIT

red flower
#

you can also have multiple files if you prefer that but it's not mandatory

charred magnet
#

oh ye

#

i get it

#

ty

daring fern
slow brook
#

works :D

manic rune
slow brook
#

how can I add a info queue of my modded seal to a joker?

timid star
#

used what @crisp coral used for their blind descriptions lol hope you're ok with that so i can also give my boss blinds descriptions

manic rune
#

is this blindexpander

timid star
#

idk what myst used but i used it

manic rune
#

yeah blindexpander is a lib mod for adding that

timid star
#

hmm cool

slow brook
dapper sun
midnight coyote
#

how do i grab the key of a joker

#

wait hold on

#

bnvm

#

ignore

red flower
hard mica
#

i dont know how to fix this problem , can anyone help?

dapper sun
red flower
charred magnet
#

@slow brook

#

i need help

#

or someone

manic rune
#

what do you need help with

charred magnet
#

SMODS.Atlas {
key = "HappyJoker",
path = "HappyJoker.png",
px = 71,
py = 95
}

SMODS.Atlas {
key = "GlichedJoker",
path = "GlichedJoker.png",
px = 71,
py = 95
}

SMODS.Joker {
key = "joker2",
loc_txt = {
name = "Happy Joker",
text = {
"Gains {X:mult,C:white}X0.15{} Mult whenever",
"a face card scores, pareidolia does not count",
"{C:inactive}(Currently {X:mult,C:white}X#1#{C:inactive} Mult)"
}
},
loc_vars = function(self, info_queue, center)
return {vars = {center.ability.extra or 1}}
end,
atlas = "HappyJoker",
pos = {x = 0, y = 0},
unlocked = true,
discovered = true,
rarity = 3,
cost = 8,
blueprint_compat = true,
config = {extra = 1},

add_to_deck = function(self, card, from_debuff)
    card.ability.extra = card.ability.extra or 1
end,

calculate = function(self, card, context)
    if context.joker_main and card.ability.extra > 1 then
        return {
            message = "X" .. string.format("%.2f", card.ability.extra),
            Xmult_mod = card.ability.extra,
            colour = G.C.MULT
        }
    end

    if context.individual and context.cardarea == G.play then
        local other = context.other_card
        local id = other and other:get_id()
        if id == 11 or id == 12 or id == 13 then
            card.ability.extra = card.ability.extra + 0.15
            return {
                message = "+X0.15 Mult",
                colour = G.C.MULT,
                card = card
            }
        end
    end
end

}

SMODS.Joker {
key = "gliched",
loc_txt = {
name = "Gliched",
text = {
"Each card held in hand",
"gives {X:mult,C:white}X3{} Mult",
"{C:inactive}(Currently {X:mult,C:white}X#1#{C:inactive} Mult)"
}
},
loc_vars = function(self, info_queue, center)
local hand_size = #G.hand.cards
local mult_value = 1
for i = 1, hand_size do
mult_value = mult_value * 3
end
return {vars = {mult_value}}
end,
atlas = "GlichedJoker",
pos = {x = 0, y = 0},
unlocked = true,
discovered = true,
rarity = 3,
cost = 8,
blueprint_compat = true,
config = {},

calculate = function(self, card, context)
    if context.other_joker then
        local hand_size = #G.hand.cards
        if hand_size > 0 then
            local mult_value = 1
            for i = 1, hand_size do
                mult_value = mult_value * 3
            end
            return {
                message = "X" .. mult_value,
                Xmult_mod = mult_value,
                colour = G.C.MULT
            }
        end
    end
end

}

#

why wont this work

manic rune
#

can you put it in ``` ```

#

:3

charred magnet
#

k

#
    key = "HappyJoker",
    path = "HappyJoker.png",
    px = 71,
    py = 95
}

SMODS.Atlas {
    key = "GlichedJoker",
    path = "GlichedJoker.png", 
    px = 71,
    py = 95
}

SMODS.Joker {
    key = "joker2",
    loc_txt = {
        name = "Happy Joker",
        text = {
            "Gains {X:mult,C:white}X0.15{} Mult whenever",
            "a face card scores, pareidolia does not count",
            "{C:inactive}(Currently {X:mult,C:white}X#1#{C:inactive} Mult)"
        }
    },
    loc_vars = function(self, info_queue, center)
        return {vars = {center.ability.extra or 1}}
    end,
    atlas = "HappyJoker",
    pos = {x = 0, y = 0},
    unlocked = true,
    discovered = true,
    rarity = 3,
    cost = 8,
    blueprint_compat = true,
    config = {extra = 1},

    add_to_deck = function(self, card, from_debuff)
        card.ability.extra = card.ability.extra or 1
    end,

    calculate = function(self, card, context)
        if context.joker_main and card.ability.extra > 1 then
            return {
                message = "X" .. string.format("%.2f", card.ability.extra),
                Xmult_mod = card.ability.extra,
                colour = G.C.MULT
            }
        end

        if context.individual and context.cardarea == G.play then
            local other = context.other_card
            local id = other and other:get_id()
            if id == 11 or id == 12 or id == 13 then
                card.ability.extra = card.ability.extra + 0.15
                return {
                    message = "+X0.15 Mult",
                    colour = G.C.MULT,
                    card = card
                }
            end
        end
    end
}

SMODS.Joker {
    key = "gliched",
    loc_txt = {
        name = "Gliched",
        text = {
            "Each card held in hand",
            "gives {X:mult,C:white}X3{} Mult",
            "{C:inactive}(Currently {X:mult,C:white}X#1#{C:inactive} Mult)"
        }
    },
    loc_vars = function(self, info_queue, center)
        local hand_size = #G.hand.cards
        local mult_value = 1
        for i = 1, hand_size do
            mult_value = mult_value * 3
        end
        return {vars = {mult_value}}
    end,
    atlas = "GlichedJoker",
    pos = {x = 0, y = 0},
    unlocked = true,
    discovered = true,
    rarity = 3,
    cost = 8,
    blueprint_compat = true,
    config = {},
    
    calculate = function(self, card, context)
        if context.other_joker then
            local hand_size = #G.hand.cards
            if hand_size > 0 then
                local mult_value = 1
                for i = 1, hand_size do
                    mult_value = mult_value * 3
                end
                return {
                    message = "X" .. mult_value,
                    Xmult_mod = mult_value,
                    colour = G.C.MULT
                }
            end
        end
    end
}

manic rune
#

also, which part doesnt work

charred magnet
#

uhm idk it crashs when i load my thing up idk how to make 2 jokers

#

so thats what im trying to do

manic rune
#

whats the crash log

charred magnet
#

some very long thing

manic rune
#

send it here

#

crash logs are very useful, because they can tell you what part of your code is wrong

charred magnet
manic rune
#

mm i see

slow brook
#

you can also send a screenshot btw

charred magnet
manic rune
#

this file doesnt exist

charred magnet
#

:3

#

oop

charred magnet
#

what about now

manic rune
#

same thing, GlichedJoker.png doesnt exist

charred magnet
#

argh

charred magnet
#

uhm

hard mica
#

please help

manic rune
#

what line is that

charred magnet
manic rune
#

you

#

this, right?

charred magnet
#

idk

manic rune
#

you need nil checks

#

wdym you dont know 😭

charred magnet
manic rune
#

check line 76 in main.lua of your mod

charred magnet
#

local hand_size = #G.hand.cards

snow vale
#

how can i create my own joker cards? (my own mod)

charred magnet
#

thats what i did

snow vale
#

ah

#

ok

manic rune
# charred magnet and i do this how?

there are times when G.hand.cards might not exist, especially when you are not in a run, you want to do something like:

local hand_size = 1
if G.hand and G.hand.cards then
  hand_size = #G.hand.cards
end
...
charred magnet
#

me no comperhend

slow brook
#

you will at some point

charred magnet
#

where tho

manic rune
#

sob

charred magnet
#

...

slow brook
manic rune
#

replace this line with that

charred magnet
#

oh ok

slow brook
#

can a seal have its own color to LOC_COLOURS created? just like how SMODS.Rarity or ConsumableType add one

charred magnet
#

worded

dapper sun
#

where can i find the collection ui table?

slow brook
#

can a seal even have a G.C color as it's badge_colour?

red flower
dapper sun
#

that's not what i was asking

#

i was asking where i can find it in the code so i can reference it for my own ui menu

red flower
#

and what did i say wrong

dapper sun
#

ohhh i misunderstood ur answer mb

slow brook
daring fern
slow brook
red flower
#

is it in LOC_COLOURS or in G.C tho

north stone
#

hey im brand new to modding balatro, how can i check if all joker slots are full?

slow brook
#

it works when I do {C:pvz_frozencolor}text{}, but doesn't here

red flower
north stone
#

thanks

red flower
high sinew
north stone
#

also does anyone know any visual studio code plugins can i install to make writing lua easier

slow brook
red flower
north stone
#

alright thanks

red flower
#

also add smods to your workspace

daring fern
#

And the lovely dump.

high sinew
#

this is how i do mine very effiecent way to set up colors this way

#

ceate a table for all ur colors

red flower
slow brook
# high sinew

I wanted mine to be a gradient changing between colors, or is a seal not able to have it's badge a gradient

north stone
red flower
#

file > add to workspace > open the smods folder and the lovely folder in your mods

#

you might need to enable indexing i think it doesn't work first time for some people

north stone
#

thaks

slow brook
red flower
#

oh yeah forgot they're not defined first
SMODS.Gradients.prefix_key?

slow brook
red flower
#

instead

slow brook
red flower
#

does it crash?

high sinew
red flower
slow brook
#

wait it does now

slow brook
red flower
#

i open my whole mods folder instead

#

i dont know if that makes a difference

north stone
#

oh that helped thank you

slow brook
#

oh my god everything is so clear now there's no yellow lines everywhere and it auto completes everything I feel like I've met god himself

north stone
#

lmao

#

are there any docs for steammodded?

north stone
#

tysm

high sinew
#

just curious if possible if I wanna suit imma make to count for any hearts trigger is there a way to do that?

red flower
#

hook card:is_suit

high sinew
#

ok like build an if then for if is_suit('new_suit') then is_suit('Hearts')?

#

not the full logic hopefully u get what i mean

placid star
#

how can you get the overall run seed mid game?

daring fern
manic rune
#

G.GAME.pseudorandom.seed?

dapper sun
#

why aren't the 2 black box thingies being listed horizontally despite me using G.UIT.R?

manic rune
#

yeah, what smtcom

daring fern
#

I had this?

red flower
dapper sun
#

ty

red flower
#

that might cause the stuff inside to be vertical

#

but you need to alternate between C and R

dapper sun
#

ah ok

keen totem
#

gotta love forgetting to do the most basic thing ever

#

at least itll work now

sleek siren
#

How can I get a list of what consumables I have?

slow brook
#

what size is a seal in vanilla?

hushed field
#

Trying to set up some sprite manipulation. I assume I've forgotten to properly set a value somewhere, but I'm not sure yet why setColor would throw a fit

daring fern
hushed field
daring fern
sleek siren
#

Thank you!! ^^

hushed field
keen totem
#

is there a list of all of the style tags i can do to text anywhere?

north stone
#

how do i give myself a specific consumable

daring fern
bleak crane
#

thoughts on the design ? :3 still trying to figure out what it should do

daring fern
zealous glen
bleak crane
#

actually i have an idea

keen totem
native zinc
#

who wants to be crossmodded by Boring vanilla+ mod

bleak crane
#

how would i unflip-over cards

keen totem
#

or selling

elfin stratus
#

guys

north stone
elfin stratus
#

how do i check for cards held in hand?

hushed field
red flower
elfin stratus
#

thanks

north stone
abstract umbra
#

hey, how do I add animations to a joker? I tried looking at the Jimball code but couldn't find anything and the mod for the Aura mod but don't understand what it's doing

slow brook
abstract umbra
#

Yeah

slow brook
#

idk

abstract umbra
#

Ah

hushed field
#

I think Jimball does it by changing the atlas coordinates every few frames

abstract umbra
#

i know but I couldn't find the code that does that

#

i tried searching through a bunch of the files but found nothing that looked like it would do anything with visuals. Maybe i just missed it

native zinc
#

jimball... my nemesis in Computationally Annoying

bleak crane
#

how do i check if a glass card breaks?
i wanna make a joker that does something when a glass card breaks

native zinc
#

take ownership

hushed field
#

there's no central place where all the jimball related code happens

#

and a lot of it is hard coded in

abstract umbra
#

ah, okay

hushed field
#

I think currently, with DrawStep, there's a lot easier ways to set it up, but I'm not sure how I'd personally set it up, as I haven't tried to animate any sprites yet

keen totem
#

what context does Blackboard score in?

#

im making another type of joker that scales depending on the cards in your hand

hushed field
#

I'd check VanillaRemade's blackboard and see what context it uses

keen totem
#

whats vanillaremade

#

well i mean like where is it

daring fern
manic rune
#

r there any people that helped with vanilla remade? (asides from N' themselves ofc)

manic rune
#

mm

#

i will figure out everyone

north stone
#

how do i make one specific word in the description of a joker a different colour?

daring fern
manic rune
#

i think it makes sense to credit everyone

hushed field
abstract umbra
#

how does drawstep work? The smods wiki documentation is a bit lacking in how it works/what it does

manic rune
#

hopefully this is all

slow brook
#

what? every single other sound works and they are in the same folder

manic rune
slow brook
#

PvZJokers/assets/sounds

red flower
manic rune
#

what did i do 😭

manic rune
north stone
#

ty

slow brook
slow brook
red flower
manic rune
#

oh

#

i was basing on the image somethingcom sent

red flower
#

@sturdy compass @marble flint

manic rune
#

wha

red flower
#

(sorry for ping)

manic rune
#

OH

#

I TYPED BAZER AND NOT BAKER

#

saldmsa

slow brook
manic rune
#

and astra sent me to astrap too

#

sob

#

yeah im dumb, sorry

sturdy compass
#

LMAOOOOOOO

hushed field
manic rune
#

IM TERRIBLY SORRY

slow brook
#

shouldn't set_seal also use the sound of the seal at the same time?

manic rune
#

😭

slow brook
# daring fern Yes?

then why doesn't it play for every card, but instead plays e.g. 4 at once after the hand plays

keen totem
#

do scaling jokers scale before or after they score?

keen totem
#

alr

shut crater
#

Just a guess, but it sounds like probably set_seal uses an event, so you're queueing an event in an event

shut crater
slow brook
daring fern
slow brook
#

yeah but without the event it sets all the seals at once before even counting the hand

daring fern
keen totem
#

what do if i scale and score using joker_main?
would i make two ( if context.joker_main's ) or two calculate functions?

slow brook
keen totem
#

if the message is part of returning, wouldnt i need two functions to output two messages?

hushed field
#

the calculate function is ran every single time, from top to bottom. If you have the same context multiple times, whichever is higheri n the code will run first, and if there's a return, the other one will not ever be reached

slow brook
hushed field
keen totem
#

so if i wanted to scale, output a scaling message, then score, and output a scoring message, do i need two calculate functions?

daring fern
slow brook
marble flint
hushed field
#

do seals not always get set in an event? I do think Cryptid might run an event before the set_seal event that plays a sound, but I assumed that sound was for whatever card is used

slow brook
manic rune
#

though if you dont want to, then i can definitely remove it whenever you want

bleak crane
bleak crane
#

i dont know what that means

#

oh wait

#

nvm

slow brook
daring fern
slow brook
#

damn so that's also because of me putting it in an event

manic rune
#

just to be sure, this makes it so a dummy calculate for m_stone will be added if no mods take ownership of that, right?

daring fern
manic rune
#

that makes more sense, yeah

#

thanks

bleak crane
daring fern
slow brook
#

does anyone know what modded joker adds seals to played cards?

manic rune
#

.shattered can be used by more than just glass cards

#

some mods may use it for their modded enhancements

slow brook
bleak crane
#

ogh

#

how would i even fix that

daring fern
red flower
#

hmm smods already takes ownership of glass, so it could add a card.glass_trigger like with lucky

#

ive seen this question about glass breaking multiple times this month

daring fern
red flower
#

it's in smods game objects

#

or whatever that file is called

daring fern
violet oasis
#

I'm trying to make it so when a specific joker expires, it adds the Tarot Merchant voucher to the run. I have the joker expiring correctly, but I'm not sure how to do the voucher part.

Does anyone know how I can achieve that? I tried looking up how decks do it, but it wasn't clear to me

daring fern
slow brook
violet oasis
elfin stratus
#

okay i give up, can someone give me an example on making something similar to baron?

#

i cant get it to work

manic rune
#

vanillaremade probably has the answer to where my dad is

daring fern
elfin stratus
keen totem
#

how do i get the suit of a card

daring fern
violet oasis
#

Thanks for the help!

daring fern
violet oasis
#

What do you mean?

daring fern
violet oasis
#

Hold on, let me try it with a different voucher so I can see if it's not just visual

#

Yeah, you're right. The voucher shows up on the "Vouchers redeemed this run" screen, but it doesn't really have any effect

#

Sorry about that

snow vale
#

how to make +mult color for descriptions?

daring fern
snow vale
#

oh ok

#

ty

#

what do i do

daring fern
snow vale
#

i didnt touch the hollow knight one

#

but i made one by myself

#

ig it's wrongly

#

this is my mod's assets

#

how big did it had to be?

daring fern
snow vale
#

1x

#

(the 2x is exactly the same but 2x size)

daring fern
snow vale
#

the tutorial didnt tell me anything 😭

elfin stratus
daring fern
snow vale
#

eh

#

how do i see it 😔

daring fern
snow vale
daring fern
# snow vale

Are you sure the files not called jokers.png.png?

snow vale
#

i think yes

#

my pc is goofy ahh

pure salmon
#

if i have an enhancement wooden and my mod prefix is gb what would that enhancement's key be

snow vale
#

ok imma try now

manic rune
#

m_gb_wooden?

pure salmon
#

got it

#

i had it flipped mb

manic rune
#

thats rude :(

snow vale
manic rune
#

i will get you next time somethingcom

snow vale
#

wait

#

found the error

errant karma
snow vale
#

how do i unlock a locked card (to test)?

manic rune
#

debugplus

snow vale
#

got it

daring fern
#

For Something's

errant karma
#

mk

snow vale
#

oh nvm

manic rune
#

hold tab

snow vale
#

nvm

errant karma
daring fern
errant karma
#

not showing up in the malverk menu

keen totem
#

how do i change a joker's local variable (like for scaling)

daring fern
snow vale
#

erm why wont it show any number

daring fern
keen totem
snow vale
daring fern
daring fern
snow vale
#

in both?

#

or just that one

daring fern
outer basalt
#

the dang card still isnt moving 😭
I wrote this code to try and get it to move up/down one slot
jokerslot being where the card you want to move currently is

keen totem
# daring fern Code?
loc_vars = function(self,info_queue,card)
        return {vars = {card.ability.extra.Xmult}}
    end,
    calculate = function(self,card,context) -- idk why it indented here (on discord), but i dont feel like fixing it
        return {
            card = card,
            card.ability.extra.Xmult = 0,
            Xmult_mod = card.ability.extra.Xmult,
            message = "X" .. card.ability.extra.Xmult .. " Mult",
            colour = G.C.MULT
        }
    end
daring fern
elfin stratus
#

does this look balanced?

errant karma
snow vale
snow vale
#

nope not working

daring fern
snow vale
daring fern
errant karma
#

i think i'm still doing something wrong but i dont know what im doing wrong

snow vale
#

🤑

daring fern
snow vale
#

nope

red flower
snow vale
#

also this is the code

keen totem
#

how do i get a reference to the player's dollar count

#

i found somewhere that said one way, then that way crashed

daring fern
daring fern
keen totem
#

yes

daring fern
outer basalt
keen totem
daring fern
red flower
keen totem
daring fern
keen totem
#

how would i go about getting the amount of digits in a talisman number

snow vale
#

IT WORKS NOW!! (yay)

keen totem
#

are you supposed to put all of your jokers into one png or can you use seperate ones?

slow brook
#

what is the difference between misc.labels. rarity and misc.dictionary rarity? when is one used and when the second?

bleak crane
#

how would i make a deck that turns all cards in deck into steel cards?

keen totem
snow vale
#

guys new card!!

keen totem
#

well both use my first jokers sprite rn

#

so idk whats going on there

daring fern
high sinew
#

Im trying to have the table in first pic see if jokers highlighted have strings in sweet. I still am unable to use it meaning its not reading the strings correctly anyone know?

snow vale
slow brook
#

how do i set a joker's rarity a modded one i added? because prefix_key doesn't work

snow vale
#

how can i make so a card checks if there is any face card played?

#

(this card)

keen totem
#

G.play.cards is the table to check
theres prob something called :isFace() too

#

just loop thru that and check

snow vale
#

okk

red flower
#

you don't need to repeat it after 4 minutes
you can loop through context.scoring_card/full_hand and check playing_card:is_face()

bleak crane
#

2 new decks :3

outer basalt
errant karma
#

i am incredibly confused
malverk just WONT SHOW my pack 😭

snow vale
#

that happened to me too lol

#

so i just installed premade packs and added em like normal mods

errant karma
#

no but i actually have no idea why its not showing mine

#

everything looks fine

snow vale
#

neither :( sry

#

how do i fix this???

high sinew
#

use other_card instead of playing

red flower
#
  1. context.full_hand is an attribute in specific contexts, but you want a general context check beforehand like context.joker_main, check the docs
  2. full_hand is a list of cards played, full_hand.playing_card doesn't mean anything
snow vale
#

what i want is that if there is no face cards it gives mult

red flower
#

for that you would do a for loop until you encounter a face card and then set a flag to true, if the flag is true then you don't give mult

#

I don't know how to explain it better without coding it myself

snow vale
#

mhm imma try

high sinew
#

if context.individual and context.cardarea == G.play and context.other_card:is_face() then

red flower
snow vale
#

what do i add after context.scoring_hand?

daring fern
wind steppe
#

with localization files: how do i set the text at the bottom of a booster pack? (above "Choose 1")

red flower
snow vale
#

thanks

daring fern
high sinew
daring fern
daring fern
modern kindle
#

You guys are awesome

thorn flame
#

anyone know of a simpler way i can isolate the parts (3oak, pair) of a full house?

keen totem
wind steppe
#

i have a sticker that gives +1 joker slot, but i can't obtain a joker with said sticker if my joker slots are full. how do i fix this?

high sinew
#

im not sure why but this isnt working were only when certain jokers in sweet u can use anyone know?

wind steppe
#

relevant code:

Card.remove_from_deck = function(self, card, from_debuff)
     if self.ability.para_negativesticker and (not self.area or not G.pack_cards or (self.area ~= G.pack_cards)) and G.jokers ~= nil then
         G.jokers.config.card_limit = G.jokers.config.card_limit - 1
    end
    return para_card_removal_old(self, card, from_debuff)
end
Card.add_to_deck = function(self, card, from_debuff)
     if self.ability.para_negativesticker then
         G.jokers.config.card_limit = G.jokers.config.card_limit + 1
    end
    return para_card_addition_old(self, card, from_debuff)
end
wind steppe
#
SMODS.Sticker{
    key = 'negativesticker',
    sets = {Joker = true},
    rate = 0,
    atlas = 'Stickers',
    pos = { x = 0, y = 0 },
    should_apply = false,
    badge_colour = G.C.DARK_EDITION,
}
thorn flame
#

im thinking while i mow the lawn

keen totem
#

go through the cards you want to check and find which has 2 and which has 3 of the instance

thorn flame
#

counting tye cards is

#

yeah

#

i was hoping i wouldnt have to do that

keen totem
#

lets say you have a table {5, 5, 5, 4, 4}

#

go and get the first value

#

then loop thru for the first that isnt that value

wind steppe
#

(for vanillaremade at least)

keen totem
#

then one of the table library's functions will tell you how many of that value are in said table

red flower
#

yeah editions are hardcoded to check

daring fern
keen totem
red flower
placid silo
#

where card is the card the seal is attached to?

wind steppe
placid silo
#

oop sticker, huh?

wind steppe
#

not an edition

placid silo
#

uhhh

wind steppe
daring fern
red flower
snow vale
#

how can i make multiple jokers? making another SMODS.Joker{}?

placid silo
#

I think the card_limit variable might still be able to be set within the sticker code as long as you can get access to the card the sticker is on, unless you want to just apply negative to the card itself?

wind steppe
snow vale
#

okk

errant karma
#

please can someone help with a malverk texture pack im making im going insane
it just wont load

red flower
snow vale
#

what's the color name for chances? (the green)

daring fern
placid silo
spice wadi
wind steppe
#

believe it or not a decent amount of the balatro colors are just called colors

wind steppe
# red flower G.FUNCS.check_for_buy_space

why doesn't this hook work?

local para_buyspace_check_old = G.FUNCS.check_for_buy_space
G.FUNCS.check_for_buy_space = function(card)
    return card.ability.para_negativesticker or para_buyspace_check_old(card)
end
#

(i would assume this is also called for booster packs?)

wheat pulsar
#

hi, sorry why the label of my consumible mark as error?

wind steppe
#

or ig the localization file if you have one

wheat pulsar
snow vale
#

how can i use different atlas for 2 different jokers?

red flower
wind steppe
snow vale
#

a

#

ok

#

let's commit unoptimizement

wind steppe
#

you really shouldn't be using an atlas for one joker only though

errant karma
#

malverk

spice wadi
#

you should probably send your code too

errant karma
#

true hold on

daring fern
#

How does one skip the animation and sound when creating a card?

errant karma
wind steppe
daring fern
wind steppe
#

for SMODS.create_card

daring fern
wind steppe
# red flower i think for that it's G.FUNCS.can_select_card

well this crashes when i try to select a card in a booster pack

local para_cardselect_check_old = G.FUNCS.can_select_card
G.FUNCS.can_select_card = function(e)
    return card.ability.para_negativesticker or para_cardselect_check_old(card)
end
red flower
wind steppe
#

hold on i just realized i only changed e in one spot

hard mica
#

im having a problem where im trying to score a card that has my modded seal on it but it crashes if the seal isnt on the gold seal effect which is weird (my modded seal is basically copies other seal effects and randomizes every round) , the gold seal itself works but if the seal effect is anything other than the gold effect and i try to score that card it crashes and shows this error message

red flower
#

What if you return 0

thorn flame
hard mica
#

the error goes to this function that basically Gives money when a card with this seal is played and im not sure waht casues the problem

snow vale
#

how do i change a card's rarity?

hard mica
red flower
red flower
#

context.poker_hands contains a list of all the poker hands contained in a hand

#

and every list contains all the cards that form the hands

snow vale
#

how do i change a card's rarity??

daring fern
hard mica
#

idk what to do to fix it anymore

snow vale
daring fern
daring fern
snow vale
#

sth like this?

hard mica
pure salmon
#

why does this fire twice when the card is bought?

hard mica
#

but the get_p_dollars function doesnt like the way im doing it

#

if i remove the if statement it worksish

daring fern
red flower
wind steppe
red flower
outer basalt
spice wadi
# snow vale sth like this?

not sure if that works, but what defo works is using numbers
like
rarity = 1 would be common for example, 2 is uncommmon, etc

snow vale
pure salmon
snow vale
#

how can i check my jokers? (with script obv)

pure salmon
#

is there a hidden context.buying_self and the docs are just trolling

red flower
wind steppe
# red flower local card = e.config.ref_table
local para_cardselect_check_old = G.FUNCS.can_select_card
G.FUNCS.can_select_card = function(e)
    local card = e.config.ref_table
    if e.ability.para_negativesticker then -- Crashes on this line when I try to select a card in a pack
        e.config.colour = G.C.GREEN
        e.config.button = 'use_card'
    else
        para_cardselect_check_old(e)
    end
end
pure salmon
red flower
#

the docs are made from the vanilla code point of view which is somewhat confusing

pure salmon
#

oh. oops

red flower
spice wadi
wind steppe
#

that makes sense in hindsight

red flower
#

you still want e.config

#

because that's the button

snow vale
red flower
#

hmm not sure then

#

never worked with seals

spice wadi
snow vale
#

(the card is joker btw)

rain atlas
#

got a crash and trying to just chatGPT a fix lmao, and it seems to deduce that the issue is a bug in "card.lua" which if i'm looking at right is vannila code?

wind steppe
#

show us the crash

rain atlas
#

it's not my mod but i don't think it's (being handpreview) updated anymore

wind steppe
#

handpreview is probably causing the crash

#

line 331?

wheat pulsar
#

im looking in the localization of the vanilla remade, where is the "tarot_cards" called in the code?

wind steppe
#

negatives arent common enough

snow vale
#

ill buff it then!

#

x4

wind steppe
#

(unless ur playing cryptid)

rain atlas
wind steppe
snow vale
#

:((

#

but if u have

wind steppe
#

maybe give something like "negatives are x3 more likely to spawn" as well

snow vale
#

not bad idea

wind steppe
#

does handpreview add anything or is it qol?

#

if its the latter just remove it

rain atlas
#

and it's littearlly the only mod i want atm lmao

#

i'm trying to play vannila basically atm

wind steppe
#

boring

#

at least get a vanilla+ mod

spice wadi
rain atlas
#

well i tried modded but i've only been able to get a single run where i won, i've faced game ending crashes where i can't progress otherwise

wind steppe
rain atlas
#

yep

#

and i sue BMM

#

use*

wind steppe
#

what mods were you using? cryptid has a habit of doing that

rain atlas
#

cryptid, kino, HP, etropy, cardsauce, card sleeve

wind steppe
#

install talisman

#

cryptid needs it

rain atlas
#

i mean yea i had that

hard mica
sweet onyx
#

When I use if context.after then ... end my Joker just doesn't ever trigger, does anyone know why

spice wadi
#

not sure

wind steppe
spice wadi
#

misclick?

rain atlas
#

i guess i'm just gonna play full vannila if even a gods damn QOL mod is gonna crash me

rain atlas
#

man i'm used to playing minecraft mod packs with hundreds of mods that don't crash this easy

spice wadi
#

also how can i add smth to check if my card gets triggered as a blueprint effect? do i have to hook SMODS.blueprint_effect or is there an easier way

sweet onyx
# daring fern Code?
        if context.after and context.cardarea == G.play then
            print("\n Joker was triggered \n")

            if #G.jokers.cards == 1 and G.jokers.cards[1].config.center.key == card.config.center.key then
                return {}
            end

            -- if SMODS.seeing_double_check(context.scoring_hand, 'Hearts') and SMODS.seeing_double_check(context.scoring_hand, 'Diamonds') and SMODS.seeing_double_check(context.scoring_hand, 'Clubs') then                
                local jokers = {}
                for i=1, #G.jokers.cards do
                    if G.jokers.cards[i] ~= card then
                        jokers[#jokers + 1] = G.jokers.cards[i]
                    end
                end
                

                if #jokers > 0 then
                    local chosen = pseudorandom_element(jokers, pseudoseed('seed'))
                    local copied = copy_card(chosen, nil, nil, nil, nil)

                    copied:set_edition('e_negative', true) 
                    copied:add_to_deck()
                    G.jokers:emplace(copied)

                    return { message = localize('k_duplicated_ex') }
                end
            --- end
        end
#

(I added the print for debugging, ignore it)

daring fern
sweet onyx
#

Alright

#

Why?

#

Its what it says to do on the wiki

daring fern
#

So context.cardarea would never be G.play

sweet onyx
#

Oh

#

The effect seems to be triggering before any playing cards are scored?

#

context.after isnt supposed to do that, right?

wind steppe
#

how do i define a category of cards only if i don't have another mod installed?

#

i want to imitate the cryptid food jokers

daring fern
sweet onyx
zealous glen
vagrant cedar
#

Is someone able to help me fix my code from forever ago?

#

I haven't done any modding for months and I've forgotten practically everything

#

I have a card set up to be a "1 in 5 chance to create a negative copy of random owned joker when any joker is triggered"

#

I'm trying to change that to take out the 1 in 5 chance, and instead be when shop is ended

#

So basically just Perkeo for Jokers

wind steppe
#

send us the code

vagrant cedar
#

you want file hold on

wind steppe
#

put your code like this:
```lua
-- Your code here!

#
itll format better like this
vagrant cedar
#

I just put it in a lua file instead

#

I already changed the description to say what it should do now

#

It's the code itself that needs changed

wind steppe
#

get rid of the pseudorandom bit

vagrant cedar
#

which one

#

Don't I need one of them to stay for the randomly chosen joker?

wind steppe
vagrant cedar
#

do I leave the local eligible jokers part?

wind steppe
#

yeah

#

and then replace ```lua
if context.retrigger_joker_check and not context.retrigger_joker and context.other_card ~= self then

#

with ```lua
if context.ending_shop then

#

so the joker triggers at the right time

vagrant cedar
wind steppe
#

also this is literally just speculo from cryptid

#

and thats an exotic

vagrant cedar
#

Oh I need to take the odds out of the config

vagrant cedar
wind steppe
#

wait actually this is more broken than speculo

#

it can copy itself

vagrant cedar
#

Wait it shouldn't be able to

#

It wasn't able to as the 1 in 5

wind steppe
#

i dont see anything stopping it from doing so?

#

maybe im missing something though

#

if you want to show us where the line that stops it is instead of just question mark reacting thatd be lovely

wheat pulsar
#

hi, i made it, but i want to learn how the key of the consumable "connect" with this values in the localize file?

wind steppe
spice wadi
hard mica
#

i got a question , how can i make a tip next to the seal description telling the seal effect description like blue seals description showing next to Jonkle seal description

thorn flame
wheat pulsar
thorn flame
#

what i want to do is if the played hand is a full house, convert the rank of the pair into the rank of the 3oak

wheat pulsar
daring fern
thorn flame
#

jokers that like separate the parts of the played hand

wheat pulsar
wind steppe
#

how do i define a category of jokers only if another mod isn't installed?

#

i want to imitate cryptid's food joker category

#

but still work with cryptid if its there

daring fern
hard mica
#

like make it show next to the my modded seal desc

wind steppe
daring fern
wheat pulsar
daring fern
wheat pulsar
hard mica
daring fern
errant karma
#

is there a malverk wiki?

hard mica
daring fern
# errant karma is there a malverk wiki?
Modded Balatro Wiki

Malverk is a texture pack manager developed by Eremel_. It was first released on October 29, 2024.
Malverk adds a new UI in the menu that allows seamless management of installed Malverk-compatible texture packs. It also provides an API to add Malverk compatibility for custom textures.
See Category:Malverk-Compatible Texture Packs for supported t...

errant karma
pure salmon
#

how would i give a card back the negative shader?

wind steppe
#

question
is there a way to instantly trigger a run loss?

wind steppe
#

how would i do that?

daring fern
umbral zodiac
#

whats the context for when a card is being destroyed

#

i might be silly in the head

daring fern
sleek siren
#

Is there a way I can have a separate font for some text?

daring fern
#

Yes, but not easily.

pure salmon
pure salmon
#

i would. rather not have to look at cryptid code

#

let me check how shaders apply to consumables

daring fern
daring fern
sleek siren
#

thank you! ^^

pure salmon
daring fern
pure salmon
#

i cannot read any of this code wtf

prime stone
#

is there a way I can refer to the joker say the message, currently because of context.indivudal it's activated playing cards that's showing the message ```lua
if context.cardarea == G.play and context.individual and context.other_card:get_id() == 7 then
G.hand:change_size(card.ability.extra.hand_size_mod)
card.ability.extra.hand_size_gained = card.ability.extra.hand_size_gained + card.ability.extra.hand_size_mod

        return {
            card = card,
            message = "+#1# Hand Size"
        }
    end
red flower
hoary frost
#

Maybe it's better if I ask in this channel instead. Is there a map for Trance's Color variables? I'm trying to modify the CODE palette to have dark hover tooltips, but there's a few bits that I can't find.

wind steppe
#

why does this code that i took from cardsauce crash when it's in my mod

local function inject(self)
    for k, v in pairs(G.foodjokers) do
        if G.P_CENTERS[k] or SMODS.Centers[k] then
            local center = G.P_CENTERS[k] or SMODS.Centers[k]
            if not table.contains(self, center) then -- crash on this line
                self:inject_card(center)
            end
        end
    end
end
daring fern
wind steppe
#

what do i need to do to make it work?

daring fern
copper shell
#

hello I was redirected here, does anyone have a mod that increases performance?
edit: i have since been re redirected away from here

hoary frost
#

So like, yeah, in Trance's palette, BACKGROUND_DARK and TEXT_DARK are the main hover tooltip bg/text. But an't find the card header or the sidebar stuff for edition/eternal/perishable status.

wind steppe
#

does anybody know how debugplus makes you lose? im trying to make a joker that does the same thing

hard mica
#

any way of getting a spectral pack faster or easier cause im trying to test my spectral card

errant karma
#

what does it want from me

prime stone
errant karma
#

there is no [

hard mica
wintry solar
sweet onyx
#

How do I change the color of the text under a Joker's rarity that says like the mod name

pure salmon
sweet onyx
#

?

pure salmon
#

badge_colour and badge_text_colour

sweet onyx
#

What file is this

pure salmon
#

your mod .json

sweet onyx
#

Oh

errant karma
#

i require assistance
this game confuses me

sweet onyx
wind steppe
errant karma
wind steppe
#

also indent text to the same level as name

sweet onyx
wind steppe
modern kindle
#

i draw my code in the ocean

errant karma
hard mica
#

im a bit confused on why this error appears

sweet onyx
modern kindle
#

damn, you have an arm?

wind steppe
#

i had to build that mountain from scratch with nothing but my teeth

merry grove
#

hi

sweet onyx
daring fern
wind steppe
sweet onyx
hard mica
pure salmon
#

does anyone know how to give a deck a shader

#

i beg

daring fern
#

@pure salmon

errant karma
#

ok but seriously is this correct
because THE GAME WANTS ME TO CLOSE A SQUARE BRACKET THAT WAS STARTED HERE

merry grove
#

im a bit confused, if anyone could help

pure salmon
# daring fern

so i have to add galdur as a dependency for this to work?

unborn bay
#

no

#

galdur is just there to specifically apply the shader to the galdur preview

#

and it only applies if galdur is present

pure salmon
#

oh okay

outer basalt
#

what does this even mean

sweet onyx
#

How do I add an icon to my mod in the mods tab, because right now its the default icon (the uncommon tag)

snow vale
#

how do i check if it's negative joker?

hard mica
#

i got a semi problem with my seal , if i got 2 cards with the jonkle seal , they both reroll to the same seal effect but i want each have a different effect n stuff, this is how im doing the randomizing rn

daring fern
snow vale
#

ty

daring fern
errant karma
#

tryna make a malverk thing but the game keeps crashing whenever i hover over it

snow vale
#

how do i do so the xmult works?

daring fern
sweet onyx
hard mica
snow vale
daring fern
snow vale
#

.

#

:(

#

then?

daring fern
# snow vale then?
if context.other_joker and context.other_joker.edition and context.other_joker.edition.negative then
    return {x_mult = 4}
end
wind steppe
#

does anyone know how debugplus makes you lose a run? can't seem to find it in the files

north stone
#

how would i go about making a joker that has xmult that increases depending on how many of that same joker you have?

errant karma
#

please tell me its possible to change the order of things in the collection

old bane
#

i think it just depends on the order you load the cards in, though those are vanilla cards so idk if you can change the order of those

errant karma
#

:(

#

why are they not just in the order of what scores the most..

old bane
#

cause order of the planets irl

wind steppe
#

balatro fans dont know irl

snow vale
#

how can i make a joker that doubles negative cards chances to spawn?

errant karma
#

oh yeah im an idiot

wind steppe
#

how would i make a joker that makes you lose at the end of a round?

snow vale
wind steppe
snow vale
#

then

wind steppe
#

its for comedy

#

also im not going to SAY that it kills you

old bane
wind steppe
#

just imply it

zealous glen
#

this is the part where he kills you

snow vale
wind steppe
#

(he being a piece of pineapple btw)

wind steppe
#

maybe someone can use that well

old bane
snow vale
wind steppe
snow vale
slow brook
#

can regular cards juice_up?

old bane
#

yes

slow brook
#

can multiple cards juice up at once?

old bane
#

yes

snow vale
#

how to check if a playing card is flipped?

red flower
#

card.facing == "back"

snow vale
#

a

#

simplier than what i thought

red flower
#

sorry lowercase

slow brook
#

is there something stronger than juice up? like it bounces cards or something

maiden phoenix
#

Have you tried setting juice_up to high values?

snow vale
#

also how can i check my non-played cards, the ones that are on my hand?

slow brook
maiden phoenix
#

I think only the first one needs to be big

slow brook
snow vale
#

didnt work?

red flower
maiden phoenix
#

Damnit N

red flower
#

:p

maiden phoenix
#

lmao

red flower
snow vale
#

oh

#

i understood

slow brook
#

what's the difference between scoring_hand and joker_main

red flower
#

joker_main is the context where main joker scoring happens

scoring_hand is a property of many contexts that holds the scoring_hand

hard mica
snow vale
#

they should pin those important things tbh

red flower
#

this is all in the docs

snow vale
#

i still suck at this it would be helpful

#

well yeah

slow brook
#

i can't really do context.full_hand:juice_up() right, i have to juice up one card at a time

#

I want to do a joker that does a juice_up for every card on screen basically

red flower
#

yes

slow brook
#

I just got an idea but don't think it's possible at all, can I make a joker that detects any cards/jokers that juice up, and gets a buff because of that?

red flower
#

you can hook juice_up

wind steppe
#

how would i make an achievement that triggers when a specific joker does a specific effect? its my joker if that helps

north stone
#

why is the i not showing up in game

wind steppe
#

when is check_for_unlock called?

wind steppe
red flower
north stone
wind steppe
north stone
red flower
#

idk look it up

north stone
#

looks like this in game

#

wait i figured it out

#

dw

#

how do i set the odds for my card?

wind steppe
#

i have a joker that triggers a run loss if you beat a blind with it. how would i create an achievement that you get when this joker makes you lose the run? (shouldn't trigger if you have the joker but lost due to lack of score)

spice wadi
#

then youd do smth like this for a luck based calculation

#

time for my problem now

maiden phoenix
spice wadi
#

actually nvm i think ik a solution to my problem

north stone
daring fern
north stone
maiden phoenix
#

G.GAME.probabilities doesn't exist in loc_vars if you check for your joker in your collection while not in a run

north stone
#

im copying off the docs

#

oh so how do i fix that

maiden phoenix
#

Do G.GAME and G.GAME.probabilities.normal...

north stone
slow brook
#

i feel like my brain overclocks when i try to understand hooking, it seems so easy but my brain just doesn't want to get it

maiden phoenix
#

No, G.GAME and G.GAME.probabilities...

north stone
#

ohh thanks

maiden phoenix
#

if it doesn't work, try adding .. "" after "normal" and before the ","