#💻・modding-dev

1 messages · Page 422 of 1

daring fern
#

I think I've seen a mod that rerolls booster packs.

echo aurora
modern kindle
#

I have one that adds a reroll button to the actual booster pack
But not that rerolls the packs in the shop

vale glen
#

Although it does feel like Some is doing that on purpose, so eh

modern kindle
#

I think something is one of the more helpful people in here alongside N

#

That reminds me though, did you ever get assistance on your question something

#

Ui wise

daring fern
modern kindle
#

N bestie you were or are here help out something

red flower
#

something has really difficult problems 😭

long sun
red flower
#

most UI stuff to me is like "i know how i would start but idk how to do it"

long sun
#

it works fine on my end, what went wrong?

daring fern
long sun
#

ah i see

#

i'll shoot that over, in case anything is immediately obvious

#

(also, i just renamed it, so that's not the problem)

floral narwhal
#

yes i wanna add new tab and idk can use smods or i have to code with lovely

floral narwhal
#

every 6 blinds, one time

#

after shop

red flower
#

like a post-shop shop?

marble flint
# long sun

are you using the waxed variable anywhere in your shader code?

#

if not, it gets automatically removed

long sun
#

it contains:

vec4 effect( vec4 colour, Image texture, vec2 texture_coords, vec2 screen_coords )
{
    vec4 tex = Texel( texture, texture_coords);
    vec2 uv = (((texture_coords)*(image_details)) - texture_details.xy*texture_details.ba)/texture_details.ba;

    tex.rgb = tex.rgb * 0.25 + vec3(0.75, 0.6, 0.4 + waxed.x - waxed.x); // Making sure the waxed variable isn't optimised out. I love this game. :)
    tex.a *= 0.35;

    return dissolve_mask(tex * colour, texture_coords, uv);
}```
floral narwhal
marble flint
#

yeah that + - does in fact get optimized out

long sun
#

ah -u-

red flower
modern kindle
long sun
#

how would i fix this? would i change it to + waxed.x*0.00001?

floral narwhal
vale glen
#

Oh, making an entirely new shop? That sounds cool

#

No idea how that code even works

#

Can load jokers into an existing shop fine, buhlike

marble flint
long sun
#

awesome sauce, thanks :D

vast night
#

Hi again! I just wanted to know how i can replace a joker by another one (with a speccific edtition)
(If possible make it the joker to the right of the calculatin joker

lament agate
#

there's only like 1 person in here that knows how shaders work, we're doomed

daring fern
daring fern
vast night
floral narwhal
daring fern
floral narwhal
#

so what can i do?

vale glen
regal ether
vale glen
#

Reading how the vanilla code does it might help

regal ether
#

yea

vale glen
#

...please don't feed the vanilla code into an LLM

vast night
# daring fern Yes.

another small question. im looking at dagger from vanillaremade. what does "getting_sliced" stand for?

floral narwhal
#

ok ill try them. Thanks!

daring fern
vast night
daring fern
vast night
#

i mean getting'_sliced

regal ether
#

if u kill a joker before it calculates it wont calculate

vale glen
#

Huh... Am curious about how slicing differs from being debuffed, like if that affects brainstorm calcs or anything

vast night
#

i dont get it but ill copy it anyways lol

red flower
vast night
#

thanks!

#

(just needed to llook a lil further lmfao)

red flower
vale glen
#

Ah, so it's a matter of intent rather than function, thanks!

vast night
#

so i think i am doing something wrong again. i've modified the code of ceremonical dagger from vanillaremade, but for some reason when selecting a blind, the "to infect" joker, now repeatedly creates a new event and starts the juice animation (i believe?)


    calculate = function(self, card, context)
        if context.setting_blind and not context.blueprint then
            local my_pos = nil
            for i = 1, #G.jokers.cards do
                if G.jokers.cards[i] == card then
                    my_pos = i
                    break
                end
            end
            if my_pos and G.jokers.cards[my_pos + 1] and not G.jokers.cards[my_pos + 1].ability.eternal and not G.jokers.cards[my_pos + 1].getting_sliced then
                local infect_card = G.jokers.cards[my_pos + 1]
                G.E_MANAGER:add_event(Event({
                    func = function()
                        infect_card:set_ability('j_reddit_contagious_laughter')
                        infect_card:set_edition('e_negative')
                    end
                }))
                return {
                    message = "Infected!"
                }
            end
        end
end,
#

the joker gets replaced but the event queue fills up

red flower
#

my message just doesnt want to send lmao

vast night
#

oop

red flower
#

youre missing the return true in the event

vast night
#

oooooh

#

bruh

#

lemme look

#

just return empty?

red flower
#

return true

vale glen
#

If you want to return a message in that event, could use an SMODS.calculate_effect function. Not sure if that's a recommended way to do it though.

#

Then after calling that function with your desired message on the desired card, you can write return true to exit the function.

daring fern
red flower
#

depends on the timing you want

vale glen
#

Hm... If you didn't want that timing when queued in an event, what would be an alternative method of returning the message on the target card?

hollow snow
#

do you need to do anything to make your joker appear on shop? or does it have the chance based on the rarity?

red flower
#

no, yes

#

as long as it's not legendary of course

hollow snow
#

ok, thanks

vale glen
sturdy compass
#

Hello dev chat

vale glen
sturdy compass
#

Bruh

#

<@&1133519078540185692> get this guy

modern kindle
#

<@&1133519078540185692> kill him

karmic creek
#

ok

modern kindle
#

Thanks bestie

exotic hedge
#

a/wsfbwaaf

sturdy compass
#

Danke

karmic creek
#

almost had him

vale glen
#

xD

karmic creek
#

fast and furious you never even had your car dot gif @exotic hedge

exotic hedge
#

its a competition between all of us lol

modern kindle
#

Whoever gets the next snipe in here gets the mcdonalds happy meal

#

May the best mod win

sturdy compass
#

Who has the biggest kill count is the question of the day

exotic hedge
#

am i confused

modern kindle
karmic creek
#

we can't send gifs but i'm referencing a specific gif

modern kindle
#

Quick Mr mod turn on gifs

sturdy compass
#

Even mods bend to the gif ban 😭

karmic creek
#

some things are beyond even my power

modern kindle
#

Would you do it for a scooby snack

wintry solar
hollow snow
#

what would be the structure of create_card? idk how lua arguments work

daring fern
peak obsidian
#

honestly a joker that makes another's operators act as one higher sounds pretty dope

sturdy crescent
#

i have this joker that debuffs a random joker when blind is selected, it debuffs the card completely fine and whatever, but i dont see any message when it happens

red flower
#

looks correct to me

#

do you have talisman?

sturdy crescent
#

i do but it isn't enabled

red flower
#

hmm no idea then

high sinew
#

Out of curiosity if yo unwanted to add a tool tip to jokers how could you with tool tip ui?

serene granite
#

excuse me, is there a way to make it so my new consumables and jokers do not appear in the shop?

should i be using "weight"?
i want them to only appear in my booster packs not in the shop at all, any advice?

red flower
#

return false in in_pool

daring fern
serene granite
#

ooo ok so if i add this it wont put itself into the pool of shoppable objects?

high sinew
pure salmon
serene granite
#

oo ok thats good to know

karmic sand
#

idk if this is a dumb question or not but how would I go about adding mult value to a joker if I sell another specific joker(s)

#

im very new to development cry_2

daring fern
sturdy compass
#

You'd wanna check for context.selling_card and if context.card == your card value

viral ember
#

Is there a way to hide suits by default? I'm added a custom suit but I only want it to appear from my spectral card

pulsar furnace
#

what does next() do?

red flower
pulsar furnace
#

oh ok

quick scarab
frigid cargo
#

what does soul_set do?

red flower
#

soul_set for The Soul would be Tarot and Planet for Black Hole

#

for example

frigid cargo
#

ah ok

#

which code would i add to make the consumeable be the regular rarity?

red flower
#

consumables dont have rarities

frigid cargo
#

dang, cause if i removed soul_set then the consumable doesnt popup in the spectral deck

coarse plank
#

How do I get the chips of cards played/discard? Trying to make this joker.

regal ether
#

thats fire

coarse plank
#

yes, how would I find those variables?

daring fern
daring fern
coarse plank
#

guessing its the same for mult?

daring fern
coarse plank
coarse plank
daring fern
daring fern
serene granite
#

soo i created an object type for my consumable cards, and now i am trying to make my booster pack use that object type to pull from it but it doesnt seem to be working, is there a way to fix that

viral ember
frigid cargo
#

whats the code to make spectral cards popup in spectral packs like normal?

daring fern
frigid cargo
serene granite
#

how do i send the code more compact so its not spam

daring fern
serene granite
#
local go_fish_rods_obj_type = SMODS.ObjectType {
    object_type = "FishingRodConsumableType", -- must match category
    key = "GO_FISH_RODS",
    default = "FishingRod8",
    cards = {
        ["FishingRod2"] = true,
        ["FishingRod3"] = true,
        ["FishingRod4"] = true,
        ["FishingRod5"] = true,
        ["FishingRod6"] = true,
        ["FishingRod7"] = true,
        ["FishingRod8"] = true,
        ["FishingRod9"] = true,
        ["FishingRod10"] = true,
        ["FishingRod11"] = true,
        ["FishingRod12"] = true,
        ["FishingRod13"] = true,
        ["FishingRod14"] = true
    }
}

SMODS.Booster{
    name = "Go Fish Pack",
    key = "go_fish_pack",
    atlas = "Jokers",
    pos = {x = 1, y = 1},
    weight = 2,
    cost = 5,
    group_key = "go_fish_pack_group",
    config = {extra = 3, choose = 1, name = "Go Fish Pack"},
    discovered = false,
    loc_vars = function(self, info_queue, card)
        return {
            vars = {
                choose = card.ability.choose,
                extra = card.ability.extra
            }
        }
    end,
    ease_background_colour = function(self)
        return G.C.BLUE
    end,
    create_card = function(self, card)
        return create_card('GO_FISH_RODS', G.pack_cards, nil, nil, nil, nil, nil, 'go_fish')
    end,
    
    kind = 'GoFishBoostPack'
}


#

did it work

serene granite
daring fern
knotty compass
#

hey question! so im trying to make a joker that makes all clubs be treated as wild cards, and i wonder if thats possible? like not just as any suit, but also to interact with jokers that look for wild cards

serene granite
daring fern
knotty compass
daring fern
knotty compass
daring fern
#
SMODS.current_mod.optional_features = function()
    return {
        quantum_enhancements = true
    }
end
knotty compass
#

do i put it in main lua file?

coarse plank
daring fern
knotty compass
#

gotcha

daring fern
#

Also you should be doing context.other_card:get_chip_bonus()

wise turtle
#

what do I do to get the number of the current Ante

daring fern
wise turtle
#

awesome thanks

knotty compass
daring fern
coarse plank
hasty mist
#

is there a way to force additional cards to be drawn to your hand

#

ignoring hand size

daring fern
daring fern
wintry solar
hasty mist
#

after a hand is played

#

so like the hook but with drawing instead of discarding

daring fern
wintry solar
#

you can use context.drawing_cards and return cards_to_draw = total_number

frigid cargo
#
    pos = {x=0, y= 0},
    order = 99,
    atlas = "atlas_batrocities_consumeables_corrupt",
    unlocked = true,
    cost = 4,
    hidden = true,

        config = {
        max_highlighted = 1,
    },
    loc_vars = function(self, info_queue, card)
        info_queue[#info_queue + 1] = {key = 'batrocity_negative_card', set = 'Other', vars = {}}
        return {vars = {(card.ability or self.config).max_highlighted}}
    end,
    
    use = function(self, card, area, copier)
        G.E_MANAGER:add_event(Event({
            trigger = 'after',
            delay = 0.4,
            func = function()
                local negative_chance = (pseudorandom("atlas_batrocities_consumeables_corrupt",1, 2))
                local corrupt_card = G.hand.highlighted[1]
                if (negative_chance == 1) then 
                    corrupt_card:set_edition("e_negative")
                    card:juice_up(0.3, 0.5)
                end
                return true
            end
        }))
    end,
}
)

does anyone have any idea as to why it wont pop up it spectral packs?

daring fern
#

How does one add a new hand sorting option?

frigid cargo
#

thanks

sage crater
#

is it possible to code this without too much hassle?
(and how would I go about doing it)

knotty compass
daring fern
#

Does it replicate multiple jokers?

sonic cedar
#

i mean if you want to experiment with him, he's in the playtesting branch on the github

sage crater
knotty compass
sage crater
daring fern
sage crater
sage crater
hasty mist
#

how do you check hand size

daring fern
daring fern
# knotty compass here ^^

It seems that is_suit checks for SMODS.has_any_suit which calls context.check_enhancement which causes an infinite loop, so replace that with context.other_card.base.suit == "Clubs"

knotty compass
#

alright! gonna try it!

sage crater
daring fern
knotty compass
daring fern
knotty compass
hasty mist
#

what did i do wrong here?

red flower
#

if you arent

#

not commit, release sorry

hasty mist
#

is latest commit fine too

#

i almost never get mods from releases

red flower
wintry solar
#

use context.amount instead of G.hand.config.card_limit

hasty mist
#

huh

hasty mist
daring fern
wintry solar
#

you've named your calculate function blind instead of card

red flower
#

this server would be really annoying with a star board lol

hasty mist
#

lmao

sonic cedar
#

make it a pointboard

hasty mist
#

all of my shameful code fails would be on there 😭

subtle merlin
#

How do i draw a card that was just discarded? Ive been trying with Card:draw() but it doesnt seem to be working

modern kindle
#

I wonder what the most common answer is in all of this server

sonic cedar
#

5 separate instances of "start a new run"

#

actually

knotty compass
sonic cedar
daring fern
modern kindle
subtle merlin
#

How would i, then?

modern kindle
sonic cedar
#

i was still getting it lmao

daring fern
gusty hemlock
#

Is anyone here able to help me with this? I've been searching for answers for a while and I cant find anything. Not using steammodded.

sage crater
hasty mist
#

i love coding without really knowing how lua works

#

i made 30 jokers!

keen totem
#

whats the thing for making a UI toggle thing

#

like the n = G.UIT. part

#

is it G.UIT.O?

gusty hemlock
gusty iron
#

how do i make a shader?

sage crater
#

I really wish balatro was coded in gdscript, python, java, or even c# 😔

hasty mist
#

im honestly glad its lua

daring fern
sage crater
keen totem
#

something

hasty mist
#

the current joker im working on is already 700 lines of code long basil_uneasy

wintry solar
#

lua is a pretty straight forward language

keen totem
#

can you please stop putting thinking on people being confused

#

people can be confused

gusty hemlock
#

LOL

primal robin
hasty mist
#

🤔board when

hybrid shadow
sage crater
# hasty mist im honestly glad its lua

it's definitely nice for newcomers to learn to mod, but I'd rather the beginner language just be python because it just feels better to learn first

Lua is so unique compared to any other language I've seen/learned and I feel like it'll long-term lead to bad habits for any people who are interested in coding when their first language was lua

primal robin
#

Board? Wdym?

hasty mist
#

i honestly should use lua extension im just stubborn

sage crater
#

for instance, lua is indexed at 1 in some cases and 0 in others... no other language is like that

hasty mist
#

for some reason its aesthetically unpleasing to me

hybrid shadow
gusty hemlock
#

am i the only one who just decompiled the game and is modding it that way? Are all you guys using steammodded and other tools?

modern kindle
wintry solar
sage crater
hasty mist
#

currently i'm learning two languages, lua and rust (though im not very far in rust)

sage crater
wintry solar
#

which when you actually think logically about finding an item in a list, it's a lot more intuitive for someone who isn't already aware of coding standards

wise turtle
#

how do you add seals to jokers in a preset back

sage crater
red flower
#

that's a balatro thing

sage crater
#

unless that's a love2d/balatro only thing

wintry solar
#

that's not a lua thing

sage crater
wintry solar
#

that's a thunk thing

sage crater
#

based thunk

#

indexing at 0 is the way

modern kindle
hasty mist
#

its like comparing english to cantonese

sage crater
#

wait no, that's assembly

hasty mist
#

rust is very low level

#

not as low level as asm though

keen totem
#

i genuinely hate the docs for UI in SMODS

#

its like the most complicated thing with a bunch of args

sage crater
#

the wiki does need some attention ngl

keen totem
#

and theyre like "actually you should figure it out yourself"

#

fuck off

#

teach me how to make a toggle

#

at least say the damn args for it

hasty mist
#

we STILL dont have docs for blueprint_effect 😭

wintry solar
#

we do

#

they're just not public

#

🙃

hybrid shadow
#

is there a reason for that

sage crater
#

they hate us

wintry solar
#

documenting contexts is a boring job that I keep putting off

hasty mist
#

fair

wintry solar
#

here's blueprint effect though

hasty mist
#

blueprint_effect is extremely helpful (wish i knew how to use it without a pesky return statement though)

#

i was able to make the code for old blueprint in cryptid 4 times shorter using blueprint_effect instead of the janky bullshit it was using before

sage crater
#

refactoring code is fun

keen totem
#
SMODS.current_mod.config_tab = function()
    return {
        n = G.UIT.ROOT,
        config = { align = "cm" },
        nodes = {
            {n = G.UIT.C,
            config = { align = "cm" },
            nodes = {
                {n = G.UIT.T,
                config = { align = "cm", text = "Jokes", colour = G.C.MONEY, scale = 1 },
                nodes = {
                    create_toggle({id = "score_toggle",
                        label = "Joke Jokers",
                        ref_table = "?",
                        ref_value = "?",
                        callback = "?"
                    })
                }}
            }}
        }
    }
end

am i doing this right at all?

hasty mist
#

and god knows cryptid needs it

wintry solar
#

but yeah, finding motivation to write docs is hard because when I have time I'd rather do some actual coding, and also then when you do write docs it seems that people either a) don't read them and ask questions that are answered in them, or b) complain that they aren't "good enough"

hasty mist
#

fair

keen totem
#

something

#

you do NOT

#

need to react

#

or say anything

wintry solar
#

I think a lot of people think that docs should be a tutorial/guide

keen totem
#

if you dont know

wise turtle
#

can you add seals to cards when adding them to a back

hybrid shadow
hybrid shadow
red flower
wise turtle
pulsar furnace
#

How do I create an unlockable back? I've tried, but it doesn't work.

keen totem
#

i just dont like that the docs are like the only place you can find info on how do to stuff minus just looking at other mods code

wintry solar
#

that's not a reason to complain about them though

keen totem
#

yea

daring fern
keen totem
#

its more of a '"we should have something else" thing rather than the docs being bad

sage crater
wintry solar
#

like it's perfectly valid to want a guide to how to do stuff, but that's not what documentation is for, someone just needs to have the motivation to write a guied

hybrid shadow
wintry solar
#

I have a vague outline for a creating jokers guide that I want to write, but I have a lot of other stuff that I like to do with my spare time

wise turtle
daring fern
keen totem
#

the issue is that i also dont know what ref_table, ref_value, and callback even are

red flower
# keen totem

i dont think you can have children in a T node but idk

hybrid shadow
#

i think the main difference between my final playable beta and the actual release for my mod is that the actual release is gonna have comments everywhere saying what everything does

keen totem
#

yea the toggle should replace the T node

red flower
keen totem
#

so would ref_table be the thing in the config.lua file?

keen totem
red flower
keen totem
#

and then look at how the base game does it

knotty compass
red flower
daring fern
keen totem
#
return {
    ["jokes"] = false
}

so if this is my config file, whats the reftable and refvalue?

daring fern
#

Some don't use SMODS.has_enhancement

red flower
#

ref_value would be "jokes"

keen totem
#

ah i see

wintry solar
#

honestly my best advice for wanting to do UI is to look at a mod that has well written UI

keen totem
#

or ID i mean

hasty mist
#

i dread writing ui code

knotty compass
keen totem
#

for toggles, do you really need a callback?

#

cause the place that needs the toggle can just check it there right?

plush depot
#

time to work on my mod again after a 2 day break

wintry solar
#

iirc you need a callback to actually update the value, it doesn't do it by default

#

I haven't written actual ui in a while though

keen totem
#

im assuming thats not true

wintry solar
#

there's definitely one ui element that needs the callback, it might be option slider

sonic cedar
# wintry solar

wow that's really useful! let me go and save its place in the wiki so i dont forget! isaac_grin

pulsar furnace
#

How do I add text?

red flower
keen totem
#

so it IS your mods key

#

but it doesnt need to be

red flower
#

yes

sonic cedar
plush depot
#

use this but replace the text with whatever you want it to say

sonic cedar
sonic cedar
plush depot
#

oh

hybrid shadow
#

alr, i have a conundrum
i have two stickers that don't do well if set on cards mid-blind
would it be better to make a separate pseudorandom element for the sticker randomization that only runs if the consumeable is used mid-blind, or just try and exclude the stickers from being applied if the consumeable is used mid-blind

plush depot
#

sticker or seal

hybrid shadow
plush depot
#

ah

#

then idk

gusty iron
#

can someone help me with this?

hybrid shadow
#

alternatively i could possibly figure out a way to make it so the consumeable only works outside of blinds but that isnt much fun tbh

daring fern
hybrid shadow
keen totem
#

do toggles just return a boolean

gusty iron
hybrid shadow
gusty iron
#

and heres my edition definition

SMODS.Edition {
    key = "chromatic",
    shader = "chromatic", 
    config = {
        chips = 20,
        mult = 15,
        x_mult = 3
    },
    loc_txt = {
        name = "Chromatic",
    label = "Chromatic",
        text = {"For every trigger,", "{X:mult,C:white}X1.25{} Mult"}
    },
    in_shop = true,
    weight = 5,
    extra_cost = 3,
    apply_to_float = true,
    disable_shadow = false,
    disable_base_shader = false,
    get_weight = function(self)
        return G.GAME.edition_rate * self.weight
    end,
    in_pool = function(self, args)

        return true
    end,
}
plush depot
#

rate the textures 🔥 🐴 (enhancements)

daring fern
modern kindle
#

So good job

plush depot
#

yay

#

my mod is called colorful cards so they need to be color if you want them to look like color for color color

hybrid shadow
# daring fern Why wouldn't that work during a blind?

because the only way it really works is to add/subtract the size/card limit when its added/taken away from the hand

if its added mid blind it doesnt count as being drawn but it can still count as being played/discarded which makes it do the subtracting part

gusty iron
modern kindle
plush depot
#

im starting with 6 for now

#

until im satisfied with how they work

modern kindle
#

This is fair

hybrid shadow
modern kindle
gusty iron
daring fern
plush depot
modern kindle
#

Yes

plush depot
#

lol

hybrid shadow
gusty iron
sonic cedar
gusty iron
#

OH FIRE I FIXED IT

hybrid shadow
keen totem
#

why does this have a weird blue background?

gusty iron
keen totem
sonic cedar
gusty iron
#

which just trigger after

daring fern
keen totem
#

ah

#

so it can be retriggered?

gusty iron
#

yeah

plush depot
#

get that on hanging chad and thats like x2.5 mult

hybrid shadow
gusty iron
keen totem
#

just put (retriggerable)

keen totem
#

if several people have to ask what it means

#

its clearly not clear

daring fern
keen totem
#

saying its retriggerable makes more sense

#

a lot of people probably dont even know that editions arent already retriggerable

daring fern
sonic cedar
hybrid shadow
#

whats the context for when inside of a blind

sonic cedar
daring fern
keen totem
#

that wouldnt be a context

#

since its a constant thing

sonic cedar
#

it would not

plush depot
#

which looks the best? one card from every suit

hybrid shadow
sonic cedar
#

remember it's not a context

hybrid shadow
keen totem
#

red makes hearts nearly invisible

gusty iron
#

it works!!! :D

keen totem
#

orange on diamonds would look cool

plush depot
sonic cedar
plush depot
#

i think i will make red lighter then lol

#

why did i make it so like bright

keen totem
#

why does it still have this ugly disgusting despicable blue background

#
SMODS.current_mod.config_tab = function()
    return {
        n = G.UIT.ROOT,
        config = { align = "cm", no_fill = true },
        nodes = {
            {n = G.UIT.C,
            config = { align = "cm", no_fill = true },
            nodes = {
                create_toggle({id = "jokejokers",
                    label = "Joke Jokers (restart game after changing)",
                    ref_table = CGNik.config,
                    ref_value = "jokes"
                })
            }}
        }
    }
end
#

(how do i add config to a toggle)

plush depot
#

much better

#

right guys

keen totem
#

sure

plush depot
#

i mean better than this

hybrid shadow
#

uh okay the apply function fucked something up and now the stickers wont actually appear on the cards

plush depot
#

uh oh

#

let me check my code for my sticker

daring fern
#

Why does this both not delete the playing cards, but also not put the jokers in the deck view?

hybrid shadow
plush depot
#

this dosent have the actual thing that makes it work but it has the basics

#

dont mind the config

#

but it works fine to make it appear

hybrid shadow
hybrid shadow
plush depot
#

huh

hybrid shadow
#

they used to show up and now they dont actually get applied

wintry solar
subtle merlin
#

I'm almost done with this joker, but i have two issues: one is that it can be discarded and regained multiple times, the other is something i don't even understand (both are shown in the video) and I can't figure out how to fix either of them

long sun
#

hiya! just double-checking, is Card:has_edition a thing? is it SMODS.has_edition(card)? just has_edition(card)?

daring fern
#

It's card.edition and card.edition.key == "e_modprefix_key"

long sun
#

cheers ^^

daring fern
#

The only reason SMODS.has_enhancement exists is because of quantum enhancements.

long sun
#

gotcha

#

is that value nil, or is it e_base, if it doesn't have one?

daring fern
long sun
#

tytyty

sage crater
sonic cedar
sage crater
#

ah, got it

plush depot
#

Rouge joker - gains +3 mult for every red enhanced card scored (havent coded it just textured)

hybrid shadow
#

for some reason adding this to my sticker code no longer applies the sticker just the effect

daring fern
gusty iron
#

how would i retrigger multiple jokers?

plush depot
gusty iron
#

would i use an extra = {} table?

daring fern
daring fern
long sun
#

what would i put in localize(), if i want something from misc.labels?

gusty iron
long sun
#

cheers ^^

wise turtle
#

can you play sfx when you lose based on if you own a certain joker

wise turtle
#

whats the context when you lose

daring fern
wise turtle
#

yeah

serene granite
#

heyy i was wondering if there is a way to change what some of the built in buttons do? I am trying to make it so skipping on my custom booster pack makes it so the player loses 5 dollars but im not sure where to start to change that

daring fern
serene granite
#

any advice ?

daring fern
serene granite
#

oo ok ill look through that, do you remember which booster pac does it ?

serene granite
#

thanks!

gusty iron
#

WHY DOES THIS LOOK CURSED

wintry solar
#

is this shader finished?

gusty iron
#

yeah

daring fern
wintry solar
#

it doesn't look very chromatic

daring fern
gusty iron
gusty iron
daring fern
#

Because if you didn't it should say X1.25 Mult when triggered

wintry solar
#

chromatic means it's dominated by one colour, whilst this looks grey, which is an absence of colour

#

if it's supposed to be chrome, I'd name it chromium or something

brisk tree
#

does anyone know how to make a joker that makes a rank of card be considered as another rank?
I'm checking the pareidolia joker code and I'm a bit confused

hybrid shadow
gusty iron
daring fern
gusty iron
brisk tree
daring fern
brisk tree
#

That's a shame it seems, thanks for the help though

gusty iron
#

would it be possible to make something count as 2 suits

gusty iron
#

fire

subtle merlin
#

Fixed whatever the fuck the second issue was, but the redo flag still isn't working

daring fern
shell harness
#

Not sure if this is the right place to ask, but how do I make a deck?

chrome widget
daring fern
subtle merlin
daring fern
subtle merlin
#

it still crashes

karmic sand
#

@daring fern Do you mind if I DM you rq? It's relating to the thing I mentioned earlier I'm just really shy about asking about things in public cry_2

sonic cedar
umbral zodiac
#

whats the variable for how much money hands/discards earn at end of round

#

nvm found it

chrome widget
#

I was just tasked with making it cycle through all the names it uses

vale plinth
#

how do you add this to a joker?

subtle merlin
vale plinth
#

thanks

subtle merlin
#

yw

umbral zodiac
shell harness
#

ok i have the json file but its not showing up in my mods list am i missing something

#

?

wild escarp
#

Is there a context I can check for increasing ante?

modern kindle
sonic cedar
#

Thats a function though

wild escarp
#

ah, I want to check when the ante is changing.

sonic cedar
#

context.end_of_round and context.main_eval and G.GAME.blind.boss

#

It’s like 3

chrome widget
modern kindle
shell harness
#

me when my mod doesnt show up

gusty iron
#

how would i change a card's sprite via code?

daring fern
chrome widget
#

When gf have to leave :(

shell harness
#

(im probably missing a single file idk)

modern kindle
#

We was sad but life must happen sadly

sonic cedar
chrome widget
#

What key and pos you use are dependent on the sprite

subtle merlin
gusty iron
chrome widget
#

Yeah

#

I have all my modded atlases set up to have their defaults be 0,0, though if you're trying to get the art of a specific card, I'd grab it from card.config.center.pos

modern kindle
#

this was my quirky ah ah way of doing it for a card that changes sprites depending on what happens

gusty iron
#

lowkey wasnt hard okay fire

chrome widget
#

Oh it's like a health indicator

#

That's cool!!

shell harness
#

why is my mod not appearing in my mod list

sonic cedar
hollow snow
gusty iron
sonic cedar
#

hello fellow mindwave enjoyer

shell harness
gusty iron
#

the friend i made the joker for is addicted to mindwave

shell harness
nova cedar
#

credit to @ fredleon for the art on this

#

been cooking up some stuff

hard flume
#

Hi chat!

#

Guess who's getting back into modding?

sonic cedar
hollow snow
shell harness
#

okay well theres a good sign i guess

#

its loading the lua file

sonic cedar
#

send your main lua

shell harness
#

its literally just 1234

#

thats the entire file

sonic cedar
#

w

#

Why

shell harness
#

YOOOO

sonic cedar
#

hi

shell harness
#

:yippee:

sonic cedar
#

bro just had to reload

shell harness
#

idk what i did wrong ngl

#

ok its programming time

plush depot
#

hi

hard flume
#

My stickers aren't appearing and I don't know why

shell harness
#

so that answers that question...

gusty iron
#

decided to test more procedural sprites

modern kindle
#

how can i select whatever the current profile is without hardcoding it?

currently im trying to make it so theres a card that summons your most played joker (then other cards) and i can make it work fine with just setting it like G.PROFILES[1].joker_usage
but i want it to work for whichever is the profile currently selected and just doing G.PROFILES didnt prduce the results i wanted

chrome widget
#

How does it access profile in set_consumeable_usage()?

plush depot
#

this is sigma

gusty iron
modern kindle
chrome widget
#

No just mean that's my first thought of an example of how it would choose the current profile

#

I'm not at my computer right now though

#

Hmmm wait a minute

#

Cardsauce codebase help me

#

It's G.PROFILES[G.SETTINGS.profile]

modern kindle
#

wait i did get it working actually

#

yers tghats what i did

#

lmao

#

thank u bestie

chrome widget
subtle merlin
#

What is the value for the discards that you have left? G.game.discards?

silver sapphire
#

Hi Guys im new to modding balatro but not new to modding games I was just wondering if anyone had tips to get started or a guide I dont wanna do to much probably just add a couple jokers

subtle merlin
silver sapphire
subtle merlin
subtle merlin
modern kindle
#

for hands its the same but hands_left iirc

shell harness
#

well it has a texture now... i guess?
not quite the correct texture but it's a start

plush depot
#

rate the jokers (they all obtain +3 mult for every card with their specified color enhancment is scored)

subtle merlin
plush depot
modern kindle
#

not settup_blind

plush depot
#

uh not exactly?

#

i mean yeah those are the only colors rn so they look like that

#

also since green joker already exists i made their names french so instead of green joker its vert joker and instead of red joker its rouge joker

subtle merlin
shell harness
plush depot
#

lol

#

wait

#

seven human?

shell harness
#

undertale reference

plush depot
#

o

#

never played

unborn bay
#

i question how have you never played undertale ever

upbeat bronze
#

like its a dollar, play it

#

😭

karmic sand
#

if I want a sound to play when I sell a joker how would I do that (I have a joker that is buffed when specific jokers are sold)

brisk tree
#

How do I properly run functions for a played card in an event, cause this just gives me an error (Says the game is trying to index a nil value or something similar)

shell harness
plush depot
#

i dont have enough

#

its tough out here bro

shell harness
#

anyway

#

how do i apply a texture to something (i would like to be able to see the deck)

chrome widget
#

I was looking other directions in 2015 lmao

modern kindle
#

where were u looking

chrome widget
#

Uhhhh

#

I was probably playing Monster Hunter 4 Ultimate more than was healthy

shell harness
#

me when i uh

#

??

chrome widget
#

Also I was reading RWBY fanfic every night for hours

shell harness
#

how do texture

karmic sand
#

have you created an atlas for your textures?

shell harness
#

no idea

karmic sand
#

that's probably a no then lol

#

this should explain it

shell harness
#

im looking at it

#

i might be a bit stupid ngl

plush depot
#

dont mind why the effect dosent match the name its placehilder

#

nvm got it

manic rune
#

outside of the event do smt like local c = context.other_card, then change context.other_card in the event to c

shell harness
#

still cant figure it out

manic rune
#

theres a tutorial video telling you how to set up your atlas

shell harness
#

where

manic rune
#

somewhere on the top

outer basalt
#

oh joy time to fix the white line above one of my jokers

manic rune
#

white line?

outer basalt
manic rune
#

oof

tight notch
#

how do I make sure that my joker works with blueprint?

brisk tree
manic rune
#

oh, but also

outer basalt
#

and now: to not fix the white line above the card because I am lazy

manic rune
manic rune
brisk tree
#

Is there any place where I could check all variables or available functions that I could use for something like the "G" class?

manic rune
#

balatro source code

brisk tree
#

You know the file where it's stored?

vast night
#

Hey quick question: Is there a way i can make a custom playing card only appear in the main menu like the balatro multiplayer mod does it (but the seecond card being another texture and not being able to show up in the decks)

brisk tree
#

I was searching through the exe a while back

manic rune
#

"G" in is touched by a lot of files

#

so theres really no specific ones

brisk tree
#

I see I see

#

Also thanks a lot for helping me, I appreciate it

manic rune
#

mhm

manic rune
outer basalt
#

hwo would i make a card effect 1 probablility specifically

#

like. if I wanted it to make glass cards break 3/4 times instead of 1/4

tight notch
manic rune
#

mhm

#

most people ask how to do the opposite lol

manic rune
outer basalt
#

if only blueprint compat automatically made it and not context.blueprint

manic rune
#

oh, you can try using take_ownership i think

#

lemme take a look

outer basalt
#

it would likely function but idk if it would break anything else

#

I'd like to keep it functional with Oops! tho which this method wouldnt do

manic rune
#

hmm

#

oh u can try reducing card.ability.extra of glass cards by half

outer basalt
#

true

#

the actual card im trying to do this on is 1/16 tho

#

and it would go to 8/16

manic rune
#

is this your card

outer basalt
#

my enhancement ya

#

its basically glass for chips but a little weaker and breaks less often lol

manic rune
#

i see

outer basalt
#

BUT it breaks on triggers not at end of hand

manic rune
#

id probably hard code it so it accounts for something more than just G.GAME.probability.normal

#

thats the easiest way i can think of without messing other stuffs

outer basalt
#

hard code oops?

manic rune
#

oh, no, your enhancement

outer basalt
#

OH lol

#

I can maybe add in Oops! compat myself lol

#

since it would just be a simple instabreak with both cards

manic rune
#

mhm, good luck :p

outer basalt
#

ty

#

CardComplex was the perfect name for this mod why am i making the jokers so complex LMAO

umbral zodiac
#

vouchers use the same calculate contexts as jokers right

sturdy compass
#

yes

chrome widget
#

Yep

umbral zodiac
#

cool thanks

#

time to copy my own code then

outer basalt
umbral zodiac
#

lmao probably

outer basalt
#

im having. ideas over here

umbral zodiac
#

lol, even

#

it also means you could probably put jokers in your voucher slots and theyd be fine maybe

sage crater
#

am I able to do an if/else statement in the localization files?

And if not, how do I change the local text when I have a localization file?

pure salmon
outer basalt
#

would they just. hop out of the vouchers slot????

#

now im not just having ideas im having ✨ HYPOTHESISES ✨

umbral zodiac
#

technically you could make the text change via loc vars which are empty if non-applicable

#

idk about other ways to do it however

vast night
sage crater
#

can I do an if/else return thing?

vast night
#

you wanna remove the lines if there are no data?

manic rune
#

wait is this a playing card or a joker

umbral zodiac
sage crater
sour stirrup
#

idea: using a wild card with it's real suit in a flush of its kind gives this joker gives this joker some more amout of mult idk
idea: a joker/voucher that makes all consumables that have randomly selected card requiresments (ex. replica, incantation, grim, unstable's conferment) turn to SELECTED cards instead
idea: cards that select a certain rank or suit choose a RANDOM rank or suit each round

manic rune
#

if its the former then probably take reference from how balatro itself does it lol

vast night
chrome widget
manic rune
#

yeah you can just set in_pool for the enhancement with that texture to false lol

pure salmon
upbeat bronze
#

Im trying to think of all of the possible effect triggers and responses for vanilla-like jokers

#

Am i missing any big effect timing things?

Possible effect bases:

  • When leaving the shop
  • When entering a blind
  • When using a consumable
  • When selling a Joker
  • When playing a hand
  • When discarding
  • When buying from the shop
  • When a card is destroyed
  • When rerolling the shop
  • When another Joker triggers
  • When opening a Booster Pack
  • When skipping a Booster Pack
  • When the round ends
vast night
upbeat bronze
#

lol

umbral zodiac
#

what is the format the game looks for in an info_queue? trying to add my own custom set of them to a voucher which has a ton of different effects based on the deck youre playing

chrome widget
#

You can either use a center, or use a table that looks for a specific key

pure salmon
#

didn't you miss When the round ends? that's a big one

upbeat bronze
#

Cause like that page is nice and helpful but when thinking of joker effect concepts its annoying to scroll thru paragraphs of info that isnt fully useful in the context

#

Oh yeah

pure salmon
#

When a boss blind is defeated is used on Campfire, and there's a completely unique alternate context for this for Anaglyph Deck for some reason

umbral zodiac
vast night
pure salmon
chrome widget
#

You should put your text in a localization file under "other" and then look for it like this:
info_queue[#info_queue] = {key = "key", set = "Other", vars = { } }

#

This allows you to give a name and description for a custom one

#

I don't think there's a way to give it plain text

#

It expects some kind of table

upbeat bronze
umbral zodiac
#

me needing to add a localization file just for this because i have no intention to localize my mod since i am but one person🥀

chrome widget
#

Loc files aren't really useful for other language support

#

They're more flexible in a lot of ways

outer basalt
umbral zodiac
#

me localizing my mod into broken spanish becasue thats the only non english language i """"speak""""

outer basalt
#

lord

#

mine would be some french and spanish but like. the french is good but only for the lore bits

tight notch
#

how would i make a joker that replaces certain tags?

chrome widget
#

Depends on what you mean. Tags are pretty nonstandard compared to other objects in terms of how their effects are calculated and how they're drawn

tight notch
#

whenever an edition tag appears replace it with a negative tag

vast night
chrome widget
#

Oh you mean it replaces one tag with another

vast night
#

i want it to be just in the main menu tho

#

not deck

tight notch
#

Yeah

manic rune
#

you have to do extra stuff for it to be in deck 😭

vast night
#

i just want it to be a custom texture lmfao

#

sry

manic rune
#

id make an enhancement with the texture you want, set in_pool to return false and just not touch it at all

then check whatever code that adds that card, add another one and put the enhancement on it

#

thats my approach 🤔

outer basalt
#

it will still appear in cryptids equilibrium deck

manic rune
#

theres something you need to set for that

#

i forgot

#

no_doe?

chrome widget
#

Yeah

outer basalt
#

shrugs

manic rune
#

yeah its annoying when that happens

outer basalt
#

i just know from experience that they will pop up LMAO

manic rune
#

my entire mod's skill tree spawned in the shop once 😭

outer basalt
#

😭

#

"All my mods cards are unobtainable without use of debug pl- whAT HAVE YOU DONE"

manic rune
#

🔥

#

we truly love cryptid

outer basalt
tight notch
#

one of my favorite mod

#

*mods

manic rune
#

yggdrasil is one of my fav mods too

#

not biased at all, wink wink

unborn bay
#

wtf!

chrome widget
#

I'll be honest, I'm not sure I understand the appeal of cryptid, but godspeed

outer basalt
#

CardComplex 🔛🔝

tight notch
#

waluigi is probably one of the best non exotics in cryptid

#

imo

#

i've never lost a run with waluigi

manic rune
#

i like wario more

#

insane econ

outer basalt
tight notch
#

also perkeo and pointer is so op

chrome widget
# tight notch bump

Unfortunately im not at my computer so I can't look at the vanilla code to know where tags are stored

manic rune
tight notch
#

you can just make more perkeo and then get more

manic rune
#

-# wait is that the function's name

outer basalt
#

. remind me one day to make a list of all hookable functions

tight notch
#

even if i could hook it how would i check what the tag is

#

and then replace it

manic rune
#

enhancement, if you want to make a shader then edition

#

create_tag has an arg that includes the key of the created tag or smt, no?

outer basalt
frigid cargo
#

whats the size for booster packs? just the same 71x95?

manic rune
#

its either the tag's center or key

vast night
manic rune
#

no dont, just add another card to there

tight notch
#

i don't know the function or it's paramaters so this is new to me

vast night
manic rune
#

arent you trying to add another card

#

not completely change the one card added by balatro

vast night
manic rune
#

yes, dont touch ANYTHING the base card is using then

vast night
#

and iit uses this

    local title_card = create_card("Base", G.title_top, nil, nil, nil, nil)
    -- title_card:set_base(G.P_CARDS["C_A"], true)
    title_card:set_ability('m_reddit_mmc')
#

oooh

#

huh?

#

what pool do i set it to

outer basalt
manic rune
#

do you have the enhancement set up

vast night
vast night
#

its

#

m_reddit_mmc

manic rune
#

i see

#

you arent overriding the title card already in game, right

#

if you arent then the code above should be right, i think

vast night
#

how could i remove the baes

manic rune
#

what do you mean by that

vast night
#

a playing card gets overlaid

manic rune
#

i see

#

one sec

vast night
#

thanks for your time lol

sturdy compass
#

The fabled Reddit of Diamonds

manic rune
#

did you set this to true in your SMODS.Enhancement

manic rune
vast night
#

andd like i see in the docs i should also enable "overrides_base_rank"

manic rune
#

-# i didnt notice enhancements dont have in_pool, oops

shell harness
#

how do i add cards to the starting deck

manic rune
#

oh wait it does

#

neglect whatever i said above there, i think that person is dumb

shell harness
#

anyone

manic rune
# shell harness how do i add cards to the starting deck

if the function itself then you can check how jokers that add playing cards to deck work,

SMODS.Joker {
    key = "certificate",
    unlocked = false,
    blueprint_compat = true,
    rarity = 2,
    cost = 6,
    pos = { x = 8, y = 8 },
    calculate = function(self, card, context)
        if context.first_hand_drawn then
            local _card = create_playing_card({
                front = pseudorandom_element(G.P_CARDS, pseudoseed('vremade_certificate')),
                center = G.P_CENTERS.c_base
            }, G.discard, true, nil, { G.C.SECONDARY_SET.Enhanced }, true)
            _card:set_seal(SMODS.poll_seal({ guaranteed = true, type_key = 'vremade_certificate_seal' }))
            return {
                func = function()
                    -- This is for retrigger purposes, Jokers need to return something to retrigger
                    -- You can also do this outside the return and `return nil, true` instead
                    G.E_MANAGER:add_event(Event({
                        func = function()
                            G.hand:emplace(_card)
                            _card:start_materialize()
                            G.GAME.blind:debuff_card(_card)
                            G.hand:sort()
                            if context.blueprint_card then
                                context.blueprint_card:juice_up()
                            else
                                card:juice_up()
                            end
                            return true
                        end
                    }))
                    SMODS.calculate_context({ playing_card_added = true, cards = { _card } })
                end
            }
        end
    end,
    check_for_unlock = function(self, args) -- equivalent to `unlock_condition = { type = 'double_gold' }`
        return args.type == 'double_gold'
    end
}
untold vigil
#

Any idea why this error ocurrs?

sturdy compass
untold vigil
sturdy compass
#

That is much easier said than done

tight notch
#

try updating cryptid

untold vigil
#

after disabling the cryptid

untold vigil
sturdy compass
#

wtf is cac

tight notch
untold vigil
tight notch
#

what mod pack?

sturdy compass
untold vigil
tight notch
#

idk then

#

i would play polterworx if it wasn't polterworx

sturdy compass
#

lmfao

tight notch
#

you can download the source code from github and update it like that

#

and update steamodded and talisman while you can

untold vigil
#

And aiyokoris

tight notch
#

try updating then disabling polterworx and see if it doesn't crash

coarse plank
#

How do I check whenever any chance based effect triggers and conversaly whenever one doesnt

velvet forum
#

how do I fix the attempt to compare number with table bug that Talisman causes?

sonic cedar
#
G.E_MANAGER:add_event(Event({
        trigger = "after",
        delay = 0.15,
        func = function()
            card:flip()
            return true
        end,
    }))
    G.E_MANAGER:add_event(Event({
        trigger = "after",
        delay = 0.15,
        func = function()
            card:set_ability(G.P_CENTERS["j_hpfx_ijiraq"])
            play_sound("card1")
            card:juice_up(0.3, 0.3)
            return true
        end,
    }))
    G.E_MANAGER:add_event(Event({
        trigger = "after",
        delay = 0.15,
        func = function()
            card:flip()
            return true
        end,
    }))

why does this flip face down twice? does card:flip() work differently now?

tight notch
#

what mods do you have

#

ik that yahimod has this issue

tight notch
#

and if you are using yahimod downgrade to 2.0 and don't use any twitch jokers

velvet forum
#
Steamodded Mods:
    1: Galdur by Eremel_ [ID: galdur, Priority: -10000, Version: 1.2, Uses Lovely]
    2: Talisman by MathIsFun_, Mathguy24, jenwalter666, cg-223 [ID: Talisman, Version: 2.2.0a, Uses Lovely]
        Break Infinity: omeganum
    3: DebugPlus by WilsontheWolf [ID: DebugPlus, Version: 1.4.1, Uses Lovely]
    4: Nopeus by jenwalter666, stupxd [ID: nopeus, Version: 2.2.5, Uses Lovely]
    5: Handy by SleepyG11 [ID: Handy, Version: 1.4.1a, Uses Lovely]
    6: Jen's Library by jenwalter666 [ID: JenLib, Version: 0.4.0]
    7: Cartomancer by stupxd aka stupid [ID: cartomancer, Priority: 69, Version: 4.13, Uses Lovely]
    8: Jokes of a Feather by Doctor Ducko, Chilli, Hydrop0x [ID: JokesOfAFeather, Version: 1.0.0, Uses Lovely]
Lovely Mods:

it was my own

velvet forum
sonic cedar
tight notch
#

oh mb

sonic cedar
tight notch
#

just trying to help

sonic cedar
#

youre good lmao

velvet forum
sonic cedar
#

example

shell harness
tight notch