#💻・modding-dev

1 messages · Page 345 of 1

glad osprey
#

your just setting the pos and soul pos

#

do atlas = "Ryan"

rare obsidian
#

wdid?

glad osprey
#

forget how to read your own crash logs it seems

#

this is literally the most clear crash log that you can get in balatro modding 😭

frosty lichen
glad osprey
#

yea that looks right

#

if that doesnt work try adding your mod prefix before the atlas key your giving the joker

frosty lichen
#

what does this mean

glad osprey
#

oh wait

#

you put atlas == ryan in the atlas aswell lol

#

right here

#

it should just be in the joker

frosty lichen
glad osprey
#

remove it from the atlas

#

just have SMODS.Atlas {

frosty lichen
stark geode
#

i love leaving easter eggs in code

bold sleet
#

Those are funny.

#

The seeds people use for pseudorandoms

obtuse silo
#

6 DOLLAR SRIMP SPECIAL

thorn pumice
#

are you telling me a shrimp fried this rice

faint yacht
stark geode
thorn pumice
obtuse silo
#

alr guys i got a couple of questions before i head to bed for a joker i'm making

  • how do i make items free in a shop (like they were generated through a joker-generating tag)
  • is there any way to disable rerolls
  • is there a context for entering shop?
glad osprey
#

boost

glad osprey
stark geode
frosty lichen
#

@glad osprey sorry 4 the ping, the code still isn't working do you have any idea why that could be? 😭

glad osprey
#

no lol

frosty lichen
#

oh okay ty regardless

stark geode
#

is that the joker?

frosty lichen
# stark geode what is that

i'm trying to replace the texture of red card with another png but it doesn't seem to work, it just makes the joker into jimbo

brisk rose
#

if you mean all at once

glad osprey
#

yea

#

i am using a drawstep just to be able to draw the shader (deck stuff) but idk how i would go about doing every shader

willow plinth
#

or editions whatever

glad osprey
#

all i can think of is blueprints ability to draw shaders on top of the blueprint shader

brisk rose
brisk rose
urban wasp
brisk rose
urban wasp
#

i can do badge_colour = mythic_gradient, though

#

for a predefined gradient

brisk rose
#

hmm... lemme look at the docs

urban wasp
#

docs just say

badge_colour: Colour of the rarity's badge.

#

i can just put the hex code, i guess

brisk rose
urban wasp
#

i see

brisk rose
#

but I don't know if trance actually changes the values in the tables anyway

urban wasp
#

true

brisk rose
#

I guess it must

urban wasp
#

who cares

#

it's an easter egg now

brisk rose
#

very fair :3

#

wait I take some of that back

#

I was loooking in the wrong place

#

had a brainfart

urban wasp
#

oh?

brisk rose
#

yeah I was being a doofus and looking atr the mod badge

brisk rose
willow plinth
urban wasp
#

the latter

#

without the #

willow plinth
#

yeah just asking him

#

because i made the mistake before

brisk rose
willow plinth
#

oh whoops then maybe i'm completely wrong

brisk rose
# urban wasp

yeah, I actually have no idea why this doesn't work

#

I have a mod with a rarity that uses G.C.Purple

#

and that works afiak

urban wasp
#

i mean, maybe it's because it's specifically calling G.C.Rarity which fucks it up or something?

#

dunno

brisk rose
#

pretty sure printers use the Rare color too

#

and that's what this is

urban wasp
brisk rose
#

Printer from Revo's

urban wasp
#

yeah,

SMODS.Rarity({
    key = "rare2",
    badge_colour = G.C.RARITY[3],
})

works

unborn bay
#

generally vanilla uses indices to indicate rarities so it would make sense for it to just be a normal array

hasty mist
#

bump

brisk rose
#

but I guess it doesn't work in all cases for some reason

verbal hare
#

can someone check this?:

i can send the code in dm and shi for help

analog spoke
#

Does anyone have any ideas for rarity names between Rare and Epic? Curious what other people can come up w here

verbal hare
shut crater
#

anyone have a good starting point for animating jokers?

#

to be specific, I want my joker to switch from a still sprite to an animated sprite under a certain condition

faint yacht
#

...I have a Joker that is animated, but not in the Collection, fwiw?

shut crater
#

anything is a starting point

#

I know literally 0 about animation

#

(in Balatro)

faint yacht
woven stratus
#

[continuing here]

brisk rose
#

so CiaaiK wants ti reskin all Aces, but just the Aces

#

from what I understand

#

And the proper way to do that is deckskin objects, right?

#

This is its first time making a mod

manic rune
#

is this how i patch another mod's code

unborn bay
#

no

manic rune
#

i see

#

-# how then :3

unborn bay
#

'''=[SMODS modid "source/file.lua"]'''

shut crater
manic rune
#

oh, so if reverie's mod id is Reverie, then its like this?

unborn bay
#

yep

#

remove the underscore

#

underscore just denotes you're patching smods itself

manic rune
#

mm icic, thanks

brisk rose
# woven stratus
    key = 'acespades',
    suit = 'Spades',
    loc_text = 'NewAce Spades',
    palettes = {
        {
            key = 'lc',
            ranks = { 'Ace' },
            display_ranks = 'Ace' },
            atlas = 'pfx_newacelc',
            pos_style = 'deck',
            colour = ,
        },
        {
            key = 'hc',
            ranks = { 'Ace' },
            display_ranks = 'Ace' },
            atlas = 'pfx_newacehc',
            pos_style = 'deck',
            colour = ,
        }
    }
}

SMODS.DeckSkin {
    key = 'acehearts',
    suit = 'Hearts',
    loc_text = 'NewAce Hearts',
    palettes = {
        {
            key = 'lc',
            ranks = { 'Ace' },
            display_ranks = 'Ace' },
            atlas = 'pfx_newacelc',
            pos_style = 'deck',
            colour = ,
        },
        {
            key = 'hc',
            ranks = { 'Ace' },
            display_ranks = 'Ace' },
            atlas = 'pfx_newacehc',
            pos_style = 'deck',
            colour = ,
        }
    }
}
SMODS.DeckSkin {
    key = 'aceclubs',
    suit = 'Clubs',
    loc_text = 'NewAce Clubs',
    palettes = {
        {
            key = 'lc',
            ranks = { 'Ace' },
            display_ranks = 'Ace' },
            atlas = 'pfx_newacelc',
            pos_style = 'deck',
            colour = ,
        },
        {
            key = 'hc',
            ranks = { 'Ace' },
            display_ranks = 'Ace' },
            atlas = 'pfx_newacehc',
            pos_style = 'deck',
            colour = ,
        }
    }
}

SMODS.DeckSkin {
    key = 'acediamonds',
    suit = 'Diamonds',
    loc_text = 'NewAce Diamonds',
    palettes = {
        {
            key = 'lc',
            ranks = { 'Ace' },
            display_ranks = 'Ace' },
            atlas = 'pfx_newacelc',
            pos_style = 'deck',
            colour = ,
        },
        {
            key = 'hc',
            ranks = { 'Ace' },
            display_ranks = 'Ace' },
            atlas = 'pfx_newacehc',
            pos_style = 'deck',
            colour = ,
        }
    }
}```
#

so this is most of what you'll need

#

you can change the names keys, they're just placeholds

#

and you need to set up the atlas too

#

and the mod itself

#

I reccomend looking through the smods wiki

woven stratus
#

alright, thank you

brisk rose
brisk rose
brisk rose
spring thistle
#

is there a way to determine where a function is defined globally?

#

or even a variable

#

im getting tired of looking through each lua files in the mods

shut crater
#

open the lovely/dump folder in vscode and shift+F

spring thistle
#

ill look for that

#

is that in the lovely folder?

shut crater
#

or if you're a menace like me you just keep your whole mods folder open and get results from your other installed mods

hasty mist
#

how do i check if a specific boss blind is active in an if function

spring thistle
spring thistle
#

but idk how to get the components

crisp coral
hasty mist
#

yeah i want to check for certain boss blinds and do different things for different blinds

spring thistle
#

tysm

hasty mist
#

is it possible to replace a boss blind with a different one when entering the blind

spring thistle
#

a little switcheroo

paper trout
#

just started trying to make a mod for the first time like an hour ago and i don't know lua, so probably a stupid question, but:

    key = 'air',
    loc_txt = {
        name = 'Air',
        text = {
            'Played cards with',
            '{C:diamonds}Diamond{} suit give {C:blue}+25{}',
            'Chips when scored'
        },
    },
    atlas = 'Jokers',
    pos = {x = 0, y = 0},
    config = {
        extra = {
            chips = 25
        }
    },
    loc_vars = function(self, info_queue, card)
        return {vars = {card.ability.extra.chips}}
    end,
    calculate = function(self,card,context)
        if context.main_scoring and context.cardarea == G.play then
            if context.card:is_suit("Diamonds") then
                return{
                    chip_mod = card.ability.extra.chips
                }
            end
        end
    end
}```
why doesn't this work? it's meant to just give +25 chips when a diamond is scored (everything about the display works, it just does nothing when I play a diamond, but i'm leaving in all the code just cause)
I also had it as context.other_card:is_suit earlier because that's what i saw in a tutorial but that didnt work either so yea
ashen niche
glad osprey
shut crater
paper trout
#

that worked ty

shut crater
#

is there anything in the game that gives -chips

glad osprey
#

not normally no

#

closest is the flint

crisp coral
shut crater
glad osprey
#

-chips should just work tho?

shut crater
#

cause I was thinking about having -chips +upside but I wasn't sure how to handle the case where your chips go negative

glad osprey
#

I think the game just sets chips to 1 or 0 then

ashen niche
#
    key = "Alex",
    path = "Alex.png",
    px = 71,
    py = 95
}

SMODS.Joker {
    key = 'Alex',
    loc_txt = {
        name = 'Alex',
        text = {
            "{C:green}Deletes{} a random",
            "card each hand.",
            "{X:mult,C:white}X#1#{} Mult and",
            "{C:chips}+#2#{} Chips (1-10000)",
            "{C:inactive}(This hand only)"
        }
    },
    config = {},
    rarity = 5,
    cost = 9,
    discovered = true,
    unlocked = true,
    eternal_compat = true,
    blueprint_compat = true,
    atlas = 'Alex',
    -- attempts to randomly remove a card from the deck (BROKEN)
    pos = { x = 0, y = 0 },
    loc_vars = function(self, info_queue, card)
        local mult = card._alex_last_mult or "?"
        local chips = card._alex_last_chips or "?"
        return { vars = { mult, chips } }
    end,
    calculate = function(self, card, context)
        if context.joker_main then
            local deck = G.deck.cards
            local candidates = {}
            for _, c in ipairs(deck) do
                if c ~= card then table.insert(candidates, c) end
            end
            if #candidates > 0 then
                local chosen = pseudorandom_element(candidates)
                G.deck:remove_card(chosen)
                G.E_MANAGER:add_event(Event({
                    trigger = 'immediate',
                    delay = 0.2,
                    func = function()
                        chosen:juice_up()
                        chosen:remove()
                        return true
                    end
                }))
            end

            -- random mult and chips
            local rand_mult = pseudorandom(1, 10000)
            local rand_chips = pseudorandom(1, 10000)
            card._alex_last_mult = rand_mult
            card._alex_last_chips = rand_chips

            return {
                xmult = rand_mult,
                chips = rand_chips
            }
        end
    end,
}
``` wtf is wrong
#

with the remove random card logic

shut crater
#

what does it do now, if anything?

hasty mist
#

shouldn't this work in theory? it just does nothing

manic rune
#

i dont think so, no

shut crater
#

after you're already in the boss blind

manic rune
#

you probably want to hook instead

shut crater
#

if I had to guess

hasty mist
#

wdym

split cairn
#

does anyone know why the XChips is not working properly? the chips are not being multiplied during scoring but the mult is

hasty mist
manic rune
#

hook to the function that runs when you press Select Blind

#

then do the stuff

hasty mist
#

i am not smart enough for this 😭

unborn bay
manic rune
#

either before or after the original code

split cairn
unborn bay
#

just update talisman from the master branch

split cairn
scarlet thorn
#

Anyone know how to get a text field rendering before create_text_input?

brisk rose
#

and make sure to unest it and rename the folder to be just Talisman

naive raptor
#

how do i change the size of a joker, like photograph?

glad osprey
naive raptor
#

oh yeah i forgot you can do that

scarlet thorn
naive raptor
#

i assumed there was a smods implementation but i couldnt find it

scarlet thorn
naive raptor
#

oh i only did one at a time

scarlet thorn
#

half joker is

    display_size = { w = 71, h = 95 * .7 },
    pixel_size = { w = 71, h = 95 * .7 },```

wee joker is ```lua
    display_size = { w = 71 * 0.7, h = 95 * 0.7 },
    pixel_size = { w = 71, h = 95 },```

With this, and vanilla code, you should be able to get photograph
split cairn
naive raptor
#

because nothing happened

hasty mist
#

yeah i dont understand hooking at all this doesnt make any sense to me

naive raptor
#

also im not trying to get the same size i just wanted to get that effect

scarlet thorn
scarlet thorn
shut crater
hasty mist
naive raptor
#

its still not having any effect

scarlet thorn
#
function og_func(arg1)
  return arg1+5
end

local old_og_func = og_func
function og_func(arg1)
  if arg1 < 0 then return nil end
  return old_og_func(arg1)
end

old_og_func(5) -- returns 10
old_og_func(-1) -- returns 4
og_func(5) -- returns 10
og_func(-1) -- returns nil```
scarlet thorn
naive raptor
shut crater
# hasty mist i'm currently trying to replace a boss blind with a different one upon entering,...

hooking goes like this:

local target_function_ref = target_function
target_function = function(e)
    do my code here first
    return target_function_ref(e)
end

you grab a copy of the function you want to hook
you make your own function that replaces it
your function does a little code
then it calls that copy that you made earlier so that the original function still gets called
(usually you also return the result of whatever comes out of the function)

naive raptor
glad osprey
hasty mist
scarlet thorn
#

You gotta add that, if youre going to compare the keys

hasty mist
#

oh i see

scarlet thorn
shut crater
scarlet thorn
#

you can 100% do it well with a calc function

shut crater
#

^ or someone else that knows what they're talking about answers with a better solution

hasty mist
#

what should i do instead then?

hasty mist
#

added the bl_ prefix and it still seems to do nothing

scarlet thorn
scarlet thorn
naive raptor
#

ok how the hell do i pair vouchers

brisk rose
hasty mist
#

is it before or after the mod prefix

scarlet thorn
hasty mist
#

this should work then?

scarlet thorn
hasty mist
#

oh it does work now

#

thank you

#

i wasn't aware of the prefix

scarlet thorn
#

though, then again

scarlet thorn
#

nevermind. if the if is ever true, its instantly changed to a different blind

brisk rose
#

sorry if i did a bad

heady siren
#

Mention

brisk rose
#

oh you don't like random mentions

#

duly noted

heady siren
#

Just don't expect them

brisk rose
#

ah, fair, I don't expect them either, but I personally like them. makes me feel relevent

daring fern
heady siren
#

And people don't usually mention me for like, any reason, it feels weird for people to be mentioning me when I'm not directly involved in the conversation

woven stratus
#

what does [SMODS _ "src/loader.lua"]:571: [SMODS cici_fancy_aces "main.lua"]:34: unexpected symbol near '}' mean?
(relevant snippet of code)

    key = 'acespades',
    suit = 'Spades',
    loc_text = 'Fancy Ace of Spades',
    palettes = {
        {
            key = 'lc',
            ranks = { 'Ace' },
            display_ranks = 'Ace' },
            atlas = 'fancyLC',
            pos = { x = 1, y = 1 },
        },
        {
            key = 'hc',
            ranks = { 'Ace' },
            display_ranks = 'Ace' },
            atlas = 'fancyHC',
            pos = { x = 1, y = 1 },
        }
    } -- line 34
}```
weak gate
#

how to make this Rename button appear on the left side, hmm

brisk rose
heady siren
hasty mist
#

is there a way to make an else function trigger if any of the previously stated if functions don't trigger

scarlet thorn
hasty mist
#

or

#

hold on am i misunderstanding lua

scarlet thorn
#

if cond1 then
elseif cond2 then
else
end```
hasty mist
#

yeah but

scarlet thorn
#

code 1 and cond2 must be false for else to hit

hasty mist
#

can i have it run after multiple if functions

#

instead of just one

#

so

#

if none of those trigger

scarlet thorn
#
if cond1 then
  if cond2 then

  end
end```?
hasty mist
#

i think i understant ty

woven stratus
ashen niche
#

in my lua file, i wanted to make the mult random and the chips random when using this joker, but the random value is always .32 not in the range of (1-10000) additionally it does not change hte random value after each round can sm1 help a fella out

scarlet thorn
heady siren
ashen niche
heady siren
#

You use pseudorandom('identifier') and it always give you a number from 0 to 1, so do
math.ceil(pseudorandom('identifier') * 10000)

#

And it's a Balatro specific thing, not lua itself

woven stratus
daring fern
heady siren
heady siren
ashen niche
heady siren
ashen niche
#

thats a lil too much owrk

heady siren
#

Why is it a problem for you to use it?

ashen niche
#

work*

daring fern
heady siren
#

If changing one tiny bit of code is too much work for you, you probably shouldn't make a mod, being honest

ashen niche
naive raptor
#

how do i make a dynamic name for a joker? i want the name to change every time you hover over it

hasty mist
#

why doesn't this work?

#

the first part works fine, but the else doesn't

#

wait actually

naive raptor
#

can i just put

loc_txt = {
  name = card.abilty.extra.name
}
naive raptor
#

worth a shot

hasty mist
#

i think ik whats wrong

unborn bay
#

is the thingy a custom boss blind

#

if so

#

prefix

naive raptor
#

idk if this will work

hasty mist
naive raptor
#

can i call loc_txt in the calculate function?

hasty mist
# hasty mist why doesn't this work?

the intended effect is to replace the clock with the trick (which works) but if it's any other boss blind, replace it with a big blind (which doesn't work, and i know why but i need to figure out how to code it)

daring fern
hasty mist
#

can i add conditions after "else"?

brisk rose
hasty mist
#

oh i see

#

how do i check if the current blind is a boss blind

woven stratus
hasty mist
#

is it just G.GAME.blind.boss?

daring fern
hasty mist
#

thank you!

spring thistle
#

im trying to get the card to signal that its effects are being triggered, but I don't see anything happening. what is wrong? I have reduced motion off so the juice_up would work, but idk why i dont see anything

loc_vars = function(self, info_queue, card)
        return { vars = { card.ability.extra.dollars, card.ability.extra.increase_per_hand} }
    end,
    
    calculate = function(self, card, context)
        -- Tests if context.joker_main == true.
        -- joker_main is a SMODS specific thing, and is where the effects of jokers that just give +stuff in the joker area area triggered, like Joker giving +Mult, Cavendish giving XMult, and Bull giving +Chips.
        if context.joker_main then
            -- Tells the joker what to do. In this case, it pulls the value of mult from the config, and tells the joker to use that variable as the "mult_mod".
            G.E_MANAGER:add_event(Event({
                trigger = "after",
            delay = 0.4,
                func = function()
                    card:juice_up(0.3, 0.5)
                    play_sound("tarot1")
                    
                    return true
                end,
            }))
          
            card.ability.extra.dollars = card.ability.extra.dollars + card.ability.extra.increase_per_hand
           
            return {p_dollars = card.ability.extra.dollars}
            
        end
    end
}


hasty mist
#

alright, this just hard crashes the game, what did i do wrong here

spring thistle
#

was there an error message?

woven stratus
hasty mist
heady siren
# woven stratus

You don't put in a pos, you put in a pos_style, which can be 'deck' if you have all cards from 2-Ace, or 'collab' if you only have face cards

woven stratus
#

ok

naive raptor
#

how do i modify joker slots?

daring fern
hasty mist
#

the first part of the if works just fine, but the elseif crashes with no error

spring thistle
#

we are winning

naive raptor
#

might have made a slight oopsie in my code

spring thistle
#

you are in the future

naive raptor
#

lmao

spring thistle
#

welp

naive raptor
#

that's hilarious

spring thistle
#

good morning/night

naive raptor
#

night ig

woven stratus
naive raptor
hoary crown
#

how do i fix this

brisk rose
brisk rose
hoary crown
#

no

brisk rose
#

but it doesn't crash without your mod?

hoary crown
#

its my boss blind

brisk rose
#

hmm... somehow you're making a variable you didn't create nil when it shouldn't be

#

specifically a table I think? because index

hoary crown
#

idk if this summons a table

paper trout
#

i just made this enhancement and it technically works but it just creates the random number at startup and then sets the mult for all glimmering cards in the future to that, which i think is a level of jank balatro does Not need yet
is there an easy way to make it set the random number just whenever the card is created/enhancement is applied?

    key = 'glimmering',
    config = {
        extra = {
            mult = math.random(1, 10)
        }
    },
    loc_vars = function(self, info_queue, card)
        return {vars = {card.ability.extra.mult}}
    end,
    atlas = 'Misc',
    pos = {x = 0, y = 0},
    loc_txt = {
        name = 'Glimmering',
        text = {
            '{C:red}+#1#{} Mult',
            '{C:inactive}(Random +1 to +10){}'
        }
    },
    calculate = function(self,card,context)
        if context.main_scoring and context.cardarea == G.play then
            return{
                mult_mod = card.ability.extra.mult
            }
        end
    end
}```
unborn bay
#

well yeah that's what it does

#

config is the initial state of the card's ability table

#

also you shouldn't really use math.random here anyway

paper trout
#

oh is it on_apply?

scarlet thorn
#

Anyone know why create_text_input hides text in surrounding nodes until you click on it?

glad osprey
#

@daring fern are you gonna actually interact or just leave reactions

ashen niche
#

wht is the function to end the run

hasty mist
ashen niche
#

nah gameover

#

like losx

#

loss*

brisk rose
#

he just.. likes to lurk and react I guess, lol

hardy viper
# scarlet thorn

from my experience with text inputs this is because they are Suck and Not Good and Work Not

scarlet thorn
# ashen niche nah gameover

Debug plus implementation:

G.FUNCS.DT_lose_game = function() if G.STAGE == G.STAGES.RUN then G.STATE = G.STATES.GAME_OVER; G.STATE_COMPLETE = false end end```
scarlet thorn
#

The only place I can find text infront of one is the Galdur menu

hasty mist
#

why doesnt this work?

scarlet thorn
hasty mist
#

wait

#

wow im stupid

#

ah

#

it still doesnt work

woven stratus
woven stratus
#

so now i have to figure out why my mod makes it freak out

hoary crown
#

WHAT IS THE C1 VALUE IN BLINDS!!!!!!!!!

rough furnace
hoary crown
rough furnace
#

Assuming its this function

scarlet thorn
# scarlet thorn

Hey wilson, have you ever had any issues like this with create_text_input?

rough furnace
rough furnace
#

but I do know it's buggy

scarlet thorn
#

damn.

#

The text appears fine if the node is after the text input

#

but not if its before.

hasty mist
#

this is really driving me insane, this code seems completely straightforward to me, i cant tell why its not working

woven stratus
hoary crown
rough furnace
#

ok

scarlet thorn
hoary crown
scarlet thorn
#

What are the values that you are setting it's colors too?

hoary crown
#

thought it would have some default

formal grove
#

is this the proper place to ask for help trying to install mods?

#

i keep getting a crash error installing lovely or something

formal grove
#

ty

woven stratus
scarlet thorn
hoary crown
hasty mist
#

is there a way to use an atlas from another mod, but set the atlas to something else if that mod isn't installed?

paper trout
#

how do i set a card enhancement? i noticed the base game does stuff like v:set_ability(G.P_CENTERS.m_gold, nil, true) but whenever I try that I just get card.lua:262: attempt to index local 'center' (a nil value)

orchid thunder
#

how can i get the size of the game window

paper trout
orchid thunder
#

i want to make a sprite that scales to the size of the game window

manic rune
#

how do i detect whenever a message in sent in debugplus' console

daring fern
orchid thunder
#

like what is the number it returns in

manic rune
daring fern
orchid thunder
#

oh ok

manic rune
shut crater
#

can someone help me understand why this patch is not working?

#

this is my first time patching SMODS

digital niche
#

this should create a joker with the key "j_mills_monster" right?

manic rune
#

does triple " work? 🤔

shut crater
#

that's how I've done all my other patches

#

I'll play around with different quotes

daring fern
tall wharf
digital niche
shut crater
tall wharf
#

does it

shut crater
#

well for one thing it makes the negative chips positive

tall wharf
#

i think it's funny

#

but like i get it's

#

not intended

daring fern
orchid thunder
#

the top part

brisk rose
daring fern
manic rune
#

if the exponential isnt a whole number, does it cause the negative chips to become an imaginary number or something

#

-# sorry if i sound dumb, i havent studied till that part yet ❤️ or i mightve forgotten

brisk rose
#

I didn't think?

manic rune
brisk rose
#

I meant to get a real number

shut crater
#

improves mod compatibility

brisk rose
#

it's because it's taking a root technically

shut crater
#

I'd still like to know how to patch SMODS though lol

brisk rose
#

and it's a negative

#

so i

#

I thiiink

orchid thunder
manic rune
#

play around with the numbers lol

orchid thunder
#

i dont think he understands

daring fern
orchid thunder
#

im trying to make the width and hight of the sprite() to be the size of the screen

daring fern
orchid thunder
#

it does but i dont think balatro goes off those numbers

hasty mist
#

is there a way to make a blind never appear naturally?

scarlet thorn
#

To solve my issue with create_text_input, I had to add a G.OVERLAY_MENU:get_UIE_by_ID("ID").UIBox:recalculate() where ID is the id of the text field.

willow plinth
#

sorry for the ping cheese person, but did you ever find an answer to this?

scarlet thorn
hasty mist
scarlet thorn
hoary crown
scarlet thorn
#

in_pool(self) -> bool
For implementing advanced restrictions on when a Blind may appear in a run. This puts boss.min and boss.max restrictions out of effect.
Unless ignore_showdown_check is set, this function will not be evaluated in the following cases:
A showdown Boss Blind should appear, but this Blind is a regular Boss Blind.
A regular Boss Blind should appear, but this Blind is a showdown Boss Blind.

hasty mist
#

i just want it to not be in the pool at all

scarlet thorn
scarlet thorn
hasty mist
#

i see, ty!

queen scroll
scarlet thorn
# hoary crown

Did you ever give your blind colours? Cause Im pretty sure the error is that its trying to mix colors that dont exist.

scarlet thorn
#

boss_colour = XX

woven stratus
#

this deckskin is going to be the death of me

hoary crown
#

same error.

scarlet thorn
#

start of game?

orchid thunder
#

i realy dont know how localthunk got this render scale

hoary crown
woven stratus
scarlet thorn
#

for card_w

orchid thunder
#

like i have no idea what "1" is size wise in this game

scarlet thorn
hoary crown
orchid thunder
#

yeah so how do i get W and H of the screen in the misterious unit called THAT

hoary crown
#

fixed it.

scarlet thorn
scarlet thorn
hoary crown
orchid thunder
queen scroll
#

@willow plinth sorry are you on mac or windows?

#

if you aren't on mac i might not be able to help you

scarlet thorn
#

lmao

#

the jokers slot in the shop's width is set to math.min(G.GAME.shop.joker_max*1.02*G.CARD_W,4.08*G.CARD_W)

#

which is probably the least odd

#

4.08 is 4x1.02

brisk rose
queen scroll
#

what? no...

brisk rose
#

Pffft

#

Also he is on Mac I'm p sure

queen scroll
#

ok good

#

all my game files and stuff are half a year out of date now 😭

gaunt thistle
#

not good enough to have a patched exe

#

old enough

queen scroll
#

oh yes, you were the one that helped me with this right?

gaunt thistle
#

uhhh

queen scroll
#

i don't really remember

gaunt thistle
#

like 6 months ago or more recently

queen scroll
#

i've been inactive for like a year lol

gaunt thistle
#

do you have lovely? you might actually have a 0.98 smods patched exe

queen scroll
#

oh wait yeah i think so. should i send it here?

manic rune
#

hy cheese

gaunt thistle
#

no need, it's just pretty rare nowadays for someone to have a patched exe

#

welcome back, we've grown a lot

queen scroll
#

i would think so

#

one question, has localthunk added any sort of modding support in the time i've been gone?

gaunt thistle
#

nope! lovely and smods is the way to go nowadays

queen scroll
#

thought so

faint yacht
queen scroll
#

i guess it makes sense since modding is already so well established

gaunt thistle
#

first party iOS mods could never be a thing anyways

queen scroll
# brisk rose Wait you're alive?

to actually answer, i've just had a really intense period of time with school stuff and mental health, and the last thing i remember was getting burnout trying to keep my mod up to date

#

thx guys!

gaunt thistle
#

I vaguely remember you from ages ago, glad you've come back ❤️

#

things have changed a lot

queen scroll
#

i'm really surprised people remember me at all

gaunt thistle
#

it's the profile picture methinks

#

what were you working on before your hiatus?

cobalt surge
#

Hello chat

queen scroll
#

the full release of steamodded was around the corner, and i was trying to port all my code across

gaunt thistle
#

ah yeah, right, just around the corner

digital niche
#

what do i use to make like 2 layers in a card? like legendary cards?

gaunt thistle
queen scroll
#

omg don't tell me

digital niche
hasty mist
#

ofc!

faint yacht
#

We yearn for the corner reaching.

hasty mist
marble flint
#

chicot enjoyers in shambles

hasty mist
#

LOL

#

whoops

manic rune
#

this is supposed to prevent the joker from spawning with an edition, right?

willow plinth
#

i changed my sh to this:

#!/bin/bash
gamename="Balatro"
defaultpath="/Users/$USER/Library/Application Support/Steam/steamapps/common/$gamename"

export DYLD_INSERT_LIBRARIES=liblovely.dylib

cd "$defaultpath"
./$gamename.app/Contents/MacOS/love --fused "$defaultpath/Balatro.app/Contents/Resources/Balatro/"

and everything works but the game has the wrong save directory

#

like even though it's fused it still takes '/Users/nnmrts/Library/Application Support/LOVE/Balatro'

willow plinth
#

yo gifs are back???

faint yacht
willow plinth
#

oh that is manually uploaded

hasty mist
lucid owl
#

any ideas on how to shuffle played/discarded cards back into the deck?

faint yacht
digital niche
hasty mist
#

i'm not sure how to do that, ik what you mean though

digital niche
#

oh, tyty!

hasty mist
#

maybe try looking at gateway's code in cryptid?

#

it does the same thing

manic rune
#

sewer

digital niche
hasty mist
#

mhm!

queen scroll
#

@willow plinth i just realised i did end up having to just build the project and couldn't run it directly from the source code, i had two seperate versions with steamodded and just vanilla. super sorry i can't help

willow plinth
#

all gucci

queen scroll
#

it may be possible nowadays but you'll have to ask someone else

lucid owl
# digital niche how do i makee the second layer go poioioioioing like soul card?

the way i did it is a bit archaic but somewhat simple - first off, remove soul_pos from your card entirely!
then, you need to define this function... somewhere (replace c_fmod_soully with your card key and { x = 2, y = 2 } with the pos to the soul)

local set_spritesref = Card.set_sprites
function Card:set_sprites(_center, _front)
    set_spritesref(self, _center, _front)
    if _center and _center.name == "c_fmod_soully" then
        self.children.floating_sprite = Sprite(
            self.T.x,
            self.T.y,
            self.T.w,
            self.T.h,
            G.ASSET_ATLAS[_center.atlas or _center.set],
            { x = 2, y = 2 }
        )
        self.children.floating_sprite.role.draw_major = self
        self.children.floating_sprite.states.hover.can = false
        self.children.floating_sprite.states.click.can = false
    end
end
lucid owl
# lucid owl the way i did it is a bit archaic but somewhat simple - first off, remove `soul_...

then, add this to your card's file, changing values as you see fit (i honestly just changed them randomly until i liked the effect enough)

SMODS.DrawStep({
    key = "floating_sprite",
    order = 59,
    func = function(self)
        if self.ability.name == "c_fmod_soully" and (self.config.center.discovered or self.bypass_discovery_center) then
            local scale_mod = 0.05 + 0.05*math.sin(1.8*G.TIMERS.REAL) + 0.03*math.sin((G.TIMERS.REAL - math.floor(G.TIMERS.REAL))*math.pi*11)*(1 - (G.TIMERS.REAL - math.floor(G.TIMERS.REAL)))^3
            local rotate_mod = 0.1*math.sin(1.219*G.TIMERS.REAL) + 0.07*math.sin((G.TIMERS.REAL)*math.pi*5)*(1 - (G.TIMERS.REAL - math.floor(G.TIMERS.REAL)))^2

            self.children.floating_sprite.role.draw_major = self
            self.children.floating_sprite:draw_shader('dissolve',0, nil, nil, self.children.center,scale_mod, rotate_mod,nil, 0.1 + 0.03*math.sin(1.8*G.TIMERS.REAL),nil, 0.6)
            self.children.floating_sprite:draw_shader('dissolve', nil, nil, nil, self.children.center, scale_mod, rotate_mod)
        end
    end
})
hasty mist
#

my god this is uhh

lucid owl
# digital niche tytyy!

ofc! it should work perfectly, just mess around with those numbers and it'll have different visuals

hasty mist
#

very large

#

there has to be a better way to do that

digital niche
lucid owl
hasty mist
#

how does gateway do it?

lucid owl
lucid owl
#

lol

hasty mist
#

oh god

digital niche
lucid owl
#

the second codeblock will go in whatever file holds your consumable, but separate from any other code

lucid owl
digital niche
#

thoughtt it was a function for the consumable

lucid owl
lucid owl
#

i should have been more clear about that, mb

hoary crown
#

why is my boss blind animation too fast

lucid owl
lucid owl
#

and just fiddle with any of the various numbers in the second codeblock to change speed, size modulaton, etc

brisk rose
lucid owl
#

(i don't actually know what the different numbers do, i just kinda did shit until it looked alright)

brisk rose
#

If you stuck to that decision

digital niche
#

its workingg! tyty!

lucid owl
#

that could be fun

lucid owl
brisk rose
#

(I hate swipe typing sometimes. How did 'just' become 'busy')

dapper sun
#

i'm trying to add a custom colour card, but it crashes the game when the round counter's supposed to go up

SMODS.Consumable {
    object_type = "Consumable",
    set = "Colour",
    name = "col_ellepink",
    key = "ellepink",
    pos = { x = 1, y = 2 },
    config = {
        val = 0,
        partial_rounds = 0,
        upgrade_rounds = 3,
    },
    loc_txt = {
        name = "ellepink.",
        text = {
            "Converts a random card in",
            "hand to a {C:attention}Slimed Card{} for every",
            "{C:attention}#4#{} rounds this has been held",
            "{C:inactive}(Currently {C:attention}#1#{C:inactive}, {}[{C:attention}#2#{C:inactive}#3#{}]{C:inactive})"
        },
  },
    cost = 4,
    atlas = "consumables",
    unlocked = true,
    discovered = true,
    display_size = { w = 71, h = 87 },
    pixel_size = { w = 71, h = 87 },
    can_use = function(self, card)
        return #G.hand.cards > 1
    end,
    use = function(self, card, area, copier)
        local rng_seed = "colours_ellepink"
        local blacklist = {}
        for i = 1, card.ability.val do
            local temp_pool = {}
            for k, v in pairs(G.hand.cards) do
                if not v.config.center_key == "m_elle_slimed" and not blacklist[v] then
                    table.insert(temp_pool, v)
                end
            end
            local over = false
            if #temp_pool == 0 then
                break
            end
            local eligible_card = pseudorandom_element(temp_pool, pseudoseed(rng_seed))
            blacklist[eligible_card] = true
            G.E_MANAGER:add_event(Event({trigger = 'after',delay = 0.15,func = function() eligible_card:flip();play_sound('card1', 1);eligible_card:juice_up(0.3, 0.3);return true end }))
            G.E_MANAGER:add_event(Event({trigger = 'after',delay = 0.4,func = function() eligible_card:flip();play_sound('tarot2', percent);eligible_card:set_ability(G.P_CENTERS.m_elle_slimed, nil, true);return true end }))
            card:juice_up(0.3, 0.5)
        end
        delay(0.6)
    end,
    loc_vars = function(self, info_queue, card)
        local val, max = progressbar(card.ability.partial_rounds, card.ability.upgrade_rounds)
        return { vars = {card.ability.val, val, max, card.ability.upgrade_rounds} }
    end
}```
#

-# (most code was copied from orange)

hasty mist
#

where are the colors for each vanilla boss blind stored?

hasty mist
#

ty

willow plinth
digital niche
#

ok so i can make new consumables but can i make like a different page in collections for enhancements? i have a special type of enhancement that i wanted to have in a different page

glad osprey
#

there are four stages of crashes
stage 1: basic gray screen
stage 2: game closes without any crash screen
stage 3: blue screen (you fucked up)
stage 4: original love2d crash screen (what the fuck did you do)

hasty mist
#

i have never seen 3 or 4

rough furnace
glad osprey
#

I've only ever seen stage 4 once and that was someone else's game

queen scroll
rough furnace
#

stage 4 used to happen in almost every instance you see the blue crash now

hasty mist
#

i wanna see what stage 3 and 4 look like

digital niche
#

btw just to keep here in case someeone else needs something similar, i just did

 if SMODS.has_enhancement(G.hand.highlighted[1], 'm_mult') and
    SMODS.has_enhancement(G.hand.highlighted[2], 'm_bonus')
    or
    SMODS.has_enhancement(G.hand.highlighted[1], 'm_bonus') and
    SMODS.has_enhancement(G.hand.highlighted[2], 'm_mult') then
glad osprey
#

and stage 4 is what you see when a normal love2d project crashes

rough furnace
#

stage 4 happens if you have a syntax error in main.lua (or conf.lua)

#

Stage 3 happens if it crashes before colours are initalized

#

(usually syntax errors in other files)

#

I could have made it the same colour as the normal crash but I figured it would be nice so you know it crashed real early

gaunt thistle
#

I've gotten the "instant crash because of segfault" screen a couple of times

rough furnace
#

stage 2 I want to fix

gaunt thistle
#

I didn't know that there were different stages. that's interesting

glad osprey
#

I'm pretty sure stage 2 is just the game wanting you to touch grass

glad osprey
rough furnace
#

theres also the lovely panic stage

gaunt thistle
#

stage 0?

glad osprey
#

but there are different types of crashes

gaunt thistle
#

or is that stage 1

hasty mist
#

theres also the cryptid crash card

rough furnace
#

the love handler shows up before the crash handler can load (it's injected in the begnnning of main.lua so barely ever)
The blue one is just a fallback for when the colours couldn't be got

#

the insta close is usually a stack overflow but I'm not sure why

faint yacht
#

So when we customizing the love.errorhandler crash screen?

gaunt thistle
glad osprey
#

adding the Argyle Deck to the error screen

rough furnace
hasty mist
#

I've gotten stack overflow with an error message before

rough furnace
gaunt thistle
#

I wonder if it happens with luajit2

rough furnace
#

it does

#

I had a replicatable case but I can't remeber whati t was now

hasty mist
#

when i get a crash without a message it's usually because I've created an infinite loop (like when i had a blueprint and leftwards blueprint target eachother)

glad osprey
#

it may just be a hardware thing

rough furnace
#

no it's not machine dependant

#

it's a bug in either the crash ahndler or some lua weridness

gaunt thistle
#

so it's not because of the 2gb object limit

rough furnace
#

no

#

I don't think so

gaunt thistle
#

we all hate the 2gb object limit

sturdy compass
#

stank

gusty iron
#

FOR MY EXIT 8 FANS

glad osprey
gusty iron
glad osprey
#

oh ok

rough furnace
#

oh I found the replicatable test case

#

eval function _G.live_test() _G.live_test() end then press space

gusty iron
#

would it be possible to change a joker's loc_text from a joker

hasty mist
#

wdym

gaunt thistle
rough furnace
#

yes

glad osprey
gusty iron
# hasty mist wdym

an idea for an anomaly i had was it obfuscates a joker's description, would that be possible?

gaunt thistle
#

you could profile the game with valgrind

hasty mist
#

I'm not sure

gaunt thistle
#

otherwise a debugger is a good bet

#

I bet it's allocator instability

rough furnace
#

valgrind doesn't seem to like me

gaunt thistle
#

I've had trouble with it too haha

gusty iron
#

i think i have an idea

gaunt thistle
#

I just use x64dbg

gusty iron
#

how do i get the jokers again

rough furnace
#

oh actually I think it just slows down lovely a ton

gusty iron
#

its G.GAME.Jokers right

rough furnace
#

it's not exsiting with a non-0 status

gaunt thistle
#

same it's similar to gamepass

rough furnace
#

I think its an issue with some lua code

gaunt thistle
#

game dies, 0 exit code

#

yeah

rough furnace
#

not sure if it's ours or love's

gaunt thistle
#

it could be luajit too

#

each recurse gets a new stack frame, right?

rough furnace
#

somehow doubt it

gaunt thistle
#

or is it tail call optimized

rough furnace
#

if i remove the smods error handler it does print this ```
INFO - [G] Error: [string "DebugPlus Eval"]:1: stack overflow
stack traceback:
[love "boot.lua"]:352: in function <[love "boot.lua"]:348>
[string "DebugPlus Eval"]: in function 'live_test'
[string "DebugPlus Eval"]:1: in function 'live_test'
[string "DebugPlus Eval"]:1: in function 'live_test'
[string "DebugPlus Eval"]:1: in function 'live_test'
[string "DebugPlus Eval"]:1: in function 'live_test'
[string "DebugPlus Eval"]:1: in function 'live_test'
[string "DebugPlus Eval"]:1: in function 'live_test'
[string "DebugPlus Eval"]:1: in function 'live_test'
...
engine/controller.lua:909: in function 'key_press_update'
engine/controller.lua:244: in function 'update'
game.lua:2691: in function 'gameUpdateRef'
[SMODS _ "src/ui.lua"]:84: in function 'upd'
main.lua:1897: in function 'update'
main.lua:999: in function 'oldupd'
main.lua:1930: in function 'update'
main.lua:938: in function main.lua:909
[C]: in function 'xpcall'

#

but still silently closes

#

not sure if I removed it the wrong way\

gaunt thistle
#

maybe it's love2d explicitly handling stack overflow errors?

rough furnace
#

this should be pcallable

gaunt thistle
#

it gets it, emirt a debug message, and then exirs

rough furnace
#

I think it is

#

which is why I made it in live_test

gaunt thistle
#

I'll need to look through love2d and see what other kinds of crashes it handles. it's made debugging the gamepass version really hard haha

rough furnace
#

it should be catachable

gusty iron
rough furnace
#

anyways ```
==250342==
==250342== HEAP SUMMARY:
==250342== in use at exit: 108,737,512 bytes in 47,560 blocks
==250342== total heap usage: 3,755,310 allocs, 3,707,750 frees, 1,341,094,282 bytes allocated
==250342==
==250342== LEAK SUMMARY:
==250342== definitely lost: 1,844,385 bytes in 74 blocks
==250342== indirectly lost: 368 bytes in 4 blocks
==250342== possibly lost: 10,473 bytes in 59 blocks
==250342== still reachable: 106,882,286 bytes in 47,423 blocks
==250342== of which reachable via heuristic:
==250342== newarray : 220,672 bytes in 84 blocks
==250342== suppressed: 0 bytes in 0 blocks
==250342== Rerun with --leak-check=full to see details of leaked memory
==250342==
==250342== For lists of detected and suppressed errors, rerun with: -s
==250342== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
4:54 shorty@Shorty-Laptop:~/projects/DebugPlus:master *>

gaunt thistle
#

seems pretty normal? idk how to really read that when I'm this sleep deprived

rough furnace
#

I think so

#

I think it's Lua code

faint yacht
rough furnace
#

Yeah

#

Oh I misunderstood that message I replied to there

#

However that colour changing mod does change the crash screen colours

faint yacht
#

Was not speaking of colors changing, but something about adding custom text?

gusty iron
#

is there anyway to change the name of a blind via code?

cobalt surge
gusty iron
cobalt surge
#

Idk i just translated stuff before hence why i know

#

Its a line in the localization file

#

For each language

#

Hope that helps

rough furnace
vocal cedar
#

How does take_ownership work on enhancements?

like if i wanted to rework wild cards with a "take ownership" do i have to program everything from scratch with them? or can i just change the "calculate" function and they will keep their name etc

rough furnace
#

They inherit all old values you font change

vocal cedar
#

oh nice so if i say

#

wanted wilds to have a 1 in 2 chance of retriggering all i would need to do is just provide a calculate function and change the loc text?

opal spade
#

yes

#

calc function, change the loc texts + loc vars to show the accurate chances

native zinc
#

how doth one remove hands and it not go negative

#

(with multiple of the same joker)

crisp coral
#

use events

daring fern
native zinc
#

i see

native zinc
thorn pumice
#

good morning Modding Dev

vocal cedar
#

hey also is there a way to stop things from being debuffed ever

#

like "wild cards cannot be debuffed by boss blinds" type shit

#

or would i have to go into the actual boss blinds and work on that

opal spade
vocal cedar
#

hmm, in documentation?

opal spade
#

ye

vocal cedar
#

hmm, okay

#

excellent info, its possible

#

time to scavenge

#

masn

#

i cannot find it

#

anyone have experince with smods.debuffs?

#

wait

#

we good

thorn flame
#

is there a way for a joker to check what stake youre on

daring fern
thorn flame
#

or something like stone joker except it only appears if you have an eternal joker

#

hmm

#

ill see

#

thanks

vocal cedar
#

you guys can see what im trying to do here yeah

#

im trying to prevent debuffs if a card is a wild card

#

but im calling debuff_card wrong

#

not sure how to actually read this in

daring fern
vocal cedar
#

or where it should go tbh

vocal cedar
#

hmm, i havent yet, not sure where exactly to look

#

let me paruze

daring fern
thorn flame
#

would this work?

vocal cedar
#

havent played around with hooks yet :wince: how do those work

vocal cedar
#

stakes set those as im aware

thorn flame
#

yeah jic a mod does it

vocal cedar
#

the fire effect, when you one shot a blind

#

where is that coded

#

or

#

more in line. what game object checks your played hands score?

manic rune
vocal cedar
#

i figured it out thankfully nw

manic rune
#

oh lol

#

this is what i did :p

vocal cedar
#

it was answered before

#

oh man

#

well

vocal cedar
# vocal cedar

this is literally all that was required 💀 you cooked tho

daring fern
vocal cedar
#

oh fr? this isnt really my code so not sure how far it reaches

manic rune
vocal cedar
#

you did dx tarots right

manic rune
#

uh

#

nop

vocal cedar
#

oh hmm

#

someone else out there has an upgraded lovers

#

that makes wild cards that cant be debuffed

#

but regular ones can?

#

its funky

vocal cedar
manic rune
#

🤔 thats actually not so hard, the upgraded lovers can put a flag on the cards, which the code will see to ignore debuffs

vocal cedar
#

yep

manic rune
vocal cedar
#

i might need to check but i think this should also work

#

def not as in depth as your solution

#

im gonna test as many boss blinds as possible i guess

iron iron
#

whats the default for blueprint compat if i dont set it

dense crescent
vocal cedar
#

besides

#

we good

#

they do infact be working

vocal cedar
#

like if your score is 230,000k but your last hand scored you like 200,000 of that

#

how can i check that 200K value

#

cause C.chips is set to 230K rn

#

im trying to check if you one shot the blind

manic rune
#

hand_chips * mult, i guess?

#

nah wait

#

nvm idk, some mods replace * with ^, some others add new variables like POW to be calculated too so thats definitely not the best way

vocal cedar
#

is it G.GAME.hand_chips

#

it is

bold sleet
#

Hello, question: Is there a way to make so the info queue of any given card is not recursive?

vocal cedar
#

wonderfull thanks fellas

vocal cedar
bold sleet
#

-# probably gonna look generate_card_ui

#

-# again

bold sleet
#

...and how do?

dense crescent
daring fern
vocal cedar
#

its really not liking that if statement...

bold sleet
#

I have this. (the key is the key of the joker itself).
I assume it crashes because it tries to generate the info_queue of the same joker, which in term generates the info_queue of the same joker and so on...

daring fern
#

And mult

vocal cedar
#

lol?

#

wild lol

dense crescent
vocal cedar
#

gocha

#

awesome thank you guys

#

let me cekc this

daring fern
bold sleet
#

That's not the problem

daring fern
bold sleet
#

The problem is that it works, but because of that, it tries to generate the info_queue again because the joker has also the info_queue entry.

#

Let me explain.

daring fern
bold sleet
#

idk, the fool, for example

bold sleet
bold sleet
bold sleet
#

Thus, when hovering over the fool, it generates BOTH 'elements', and not just the devil description.

#

I need something that does just that. Adds the entry to info_queue but not subsequently whatever you added might have in its info_queue.

daring fern
dense crescent
bold sleet
#

checking

bold sleet
#

nope

daring fern
#

{key = "j_fg_test", set = "Joker"} should grab the localization for the joker and show it, but not get the other info queues?

bold sleet
#

Game freezes because it seems to repeatedly generate (and add) new entries to the info queue

crisp coral
#

if not card.fake_card then

bold sleet
#

Literally at the very end of the file.

#

~line 2740

crisp coral
bold sleet
vocal cedar
#

rq yall know how to get rid of that "+5 chips"

its not even scoring the 5 chips it just says 5 chips lol

bold sleet
#

holdon

bold sleet
vocal cedar
#

like i said its not even doing the shit

bold sleet
#

Knowing how it applied retroactively.

daring fern
bold sleet
#

azaming

#

then idk

#

info_queue[#info_queue + 1] = G.P_CENTERS[this_joker_key] did not work

daring fern
bold sleet
#

ikik

#

I say that's what I WAS trying to do/.

#

Before I came here to ask.

stiff locust
#

this is the ssecond time i'm being pinged for this

#

yeah yeah i get it anti tsunami

#

i have no doubt it will happen more times

maiden phoenix
#

Want to be pinged a third time?

bold sleet
#

Now more questions: Is there a way to use this function without nuking the target card's previos values?

#

-# i.e. I just want to add a line to loc_vars

bold sleet
#
SMODS.Joker:take_ownership('joker_key',
  {
    loc_vars = function (self,info_queue,card)
      -- my own bs code
    end
      -- Somehow keep here the card's original code
  },
  true
)
#

idk

daring fern
bold sleet
#

^ dumb idiot brain right here

daring fern
bold sleet
#

As far as I know, that function nukes what was previously there and replaces it with the new bs you tell it.

#

In that case, it would just noke loc_vars completely.

daring fern
bold sleet
#

But I kind of want to keep every card's original loc_vars

#

I just want to add A single line of code.

daring fern
bold sleet
#

no fucking idea how to patch

cyan lagoon
#

what is the enhancement version of set_seal?

bold sleet
#

Probably just set = "Tarot" | "Planet" | "Spectral" | custom by your mod

#

If I am getting it right.

daring fern
cyan lagoon
#

it works the same way right?

daring fern
cyan lagoon
#

ok, but how do i work poll_enhancement in there?

daring fern
cyan lagoon
#

aight, thanks

hushed arrow
#

is this the correct way to load mod files? I have no idea

brisk rose
daring fern
brisk rose
#

yeah.... they don't

#

wait...

#

I didn't read it

hushed arrow
brisk rose
#

what does that even mean?

daring fern
brisk rose
#

why is it all the same?

brisk rose
#

but I'm talking out of my ass again

crisp coral
#

it's for smods to load the main file of mods

topaz tiger
#

is it possible to get multiple shaders to appear on a card, mind you i have no idea what im doing but this is my code it doesnt error but nothing happens, and im betting i should use drawstep or smth but have no clue onhow to do that

hushed arrow
dense crescent
brisk rose
#

not just where it uses its own function

daring fern
hushed arrow
#

alright so what do I have to do to load all my mod files?

brisk rose
#

pretty sure

dense crescent
broken shadow
#

is there an easy way for me do read balatros code so i can get an understanding of how jokers and stuff work

dense crescent
#

like lua loadfile() result

crisp coral
#

add brackets to the end to run the function yeah

#

SMODS.load_file(path)()

hushed arrow
brisk rose
#

lole it'd just be "xyz.lua" if it's in the main folder

#

or "/src/xyz.lua" if it's in a folder called src

#

the leading / might not work in lua, idk

#

i'm used to writing it in linux

hushed arrow
brisk rose
#

so SMODS.load_file("BalatroTweaks.lua")()

hushed arrow
#

I think that caused my game to crash

daring fern
brisk rose
#

itself

#

you put the main file in your json metadata

#

there's a field that asks what the main file of the mod is

#

that's where you put "BalatroTweaks.lua"

#

And in BalatroTweaks.lua you load everything else

subtle hawk
#

My ass thought that :add_to_deck() would return cards to the current deck but it actually moves them to the full deck. Is there an intented way to move cards to the current deck?

brisk rose
#

and it's fine if that's all the file is

hushed arrow
#

oh yeah. I did not have that json file

daring fern
brisk rose
daring fern
subtle hawk
brisk rose
#

it's redundant and will break things

#

question, does your metadata file have to be titled [id].json, or will it just pull from whatever json is in the root?

#

I guess it won't even know the id without reading the json

#

so the filename can't matter?

subtle hawk
#

My metadata file is named... ||metadata||

hushed arrow
brisk rose
#

and removing the header

hushed arrow
#

yay it works now thanks

#

I had to put it though, it didnt work without

brisk rose
#

it's what myst said so I just repeated it

crisp coral
#

i don't assert

hushed arrow
#

what's asserting?

daring fern
#

It's usually to know if something didn't load right.