#💻・modding-dev

1 messages · Page 301 of 1

tall apex
#

gotcha!! thanks a bunch <3

analog spoke
#

ahh, okey

long urchin
#

@wintry solar i messaged you btw

tall apex
#

and i dont put the second half in the return right?

modern kindle
#

you dont need my print or anything no, just the sprite related stuff really

scarlet thorn
#

I've done this before. I'm pretty sure you can just do card.pos

tall apex
#

oh i meant the sprite related stuff

scarlet thorn
#

Not at home to be able to look at the code rn though

modern kindle
thin anchor
#

ok so this destroys every card in hand
-# issue

modern kindle
# tall apex oh i meant the sprite related stuff

ive just got it thrown in my calc and thats it, mine is oriented around money so i just do this

        -- **Instantly trigger Neglected state if money reaches 0**
        if to_big(G.GAME.dollars) <= to_big(0) and not card.ability.extra.debuffed then
            card.ability.extra.debuffed = true -- Mark as permanently debuffed
            card:set_debuff(true)             -- Apply debuff immediately
            card.sell_cost = to_big(0)        -- Set sell value to $0

            -- Change texture instantly to Neglected version
            local desiredx, desiredy = 1, 1 -- sets new points of atlas for new texture on neglection.
            if card.children and card.children.center then
                card.children.center:set_sprite_pos({ x = desiredx, y = desiredy })
            else
                print("Error: Unable to update Tamagotchi sprite.")
            end

            return {
                message = "Neglected! Tamagotchi stops growing!{}",
            }
        end
cursive sentinel
#

i dont have a context.individual

wintry solar
scarlet thorn
daring fern
thin anchor
#

so confusing

thin anchor
glad osprey
#

question what are ways yall have seen credits shows (ie cryptids badges with the changing text)

thin anchor
#

ok it works
its crazy how "ing" can make such a difference

tall apex
wintry solar
#

It’s just a different flag, it’s not that crazy

thin anchor
#

hm

scarlet thorn
scarlet thorn
thin anchor
#

i see

glad osprey
modern kindle
glad osprey
#

tis why I'm asking

scarlet thorn
tall apex
glad osprey
#

ah

tall apex
#

the else is triggering when its not context.joker_main im hoping.,,

scarlet thorn
# tall apex

You're missing an end in the joker_main statement

wintry solar
tall apex
scarlet thorn
tall apex
thin anchor
#

is there a documentation on all of the animations? (like flip, dissolve, shatter, etc)

scarlet thorn
#

I mean if the code works it works, but it looks like the if statement right before the return doesn't end

tall apex
#

shouldn't it end after the else?

wintry solar
#

You need an end after the return

scarlet thorn
thin anchor
#

k

wintry solar
#

You should wrap the set sprites inside events too

tall apex
wintry solar
#

Otherwise it will change back and forth instantly

tall apex
zealous glen
tall apex
wintry solar
scarlet thorn
# tall apex

With the line that you have selected, tou need to have an end somewhere for that. Whether that be right before or after the return depends on how you want it to work

zealous glen
#

Idk what they’re trying to do to comment on the logic

wintry solar
#

No it’s just a syntax error, it’s pretty clear how the code is supposed to be if you actually read the conditions

tall apex
#

what about this?

scarlet thorn
#

Actually

#

The way you have it, everything in the code is inside the context.jokermain

#

No. There is an ending bracket

tall apex
#

so this then

scarlet thorn
tall apex
#

oh yipee!!!

crystal perch
#

basically every if should have an end

tall apex
#

right, i was nesting the if statements oops

scarlet thorn
tall apex
#

i hope this works, i have an essay to write.,,

thin anchor
#

how would i play the dissolve animation to all played cards?

scarlet thorn
daring fern
scarlet thorn
tall apex
#

hey it works besides the fact i got the x's mixed up!!

#

for some reason the sound isn't triggering anymore tho

scarlet thorn
#

Wait I'm pretty sure dissolve removes them itself

scarlet thorn
#

I'd show it off, but I'm on mobile rn

limber blaze
#

how do i setup localisation for seals because the way ive seen other mods doing it just doesnt work

scarlet thorn
daring fern
scarlet thorn
#

It will automatically add it, unless you specify it not to (which you didnt)

limber blaze
#

im pretty sure i tried that and it showed up blank still but let me test

wintry solar
#

If it’s there it won’t add it again fyi

hushed field
scarlet thorn
#

You may also need to add s_ to the localization

minor furnace
#

seals don't have a letter prefix

limber blaze
#

the localisation doesnt show up with or without the entr_ prefix in the key, with or without _seal at the end of the loc key and with or withou s_ at the start of the loc key

daring fern
limber blaze
#

in Other

scarlet thorn
wintry solar
#

iirc seals are modprefix_key_seal

limber blaze
#

yes i tried that

scarlet thorn
#

It needs to be in descriptions.Other

limber blaze
#

it is

#

i just said that it is

minor furnace
#

this is why I don't use localization and just put the description directly into the smods object

limber blaze
#

the seal key rn is crimson and the localisation key is entr_crimson_seal

#

unless the mod prefix is not automatically prepended like it isnt for stickers but im pretty sure i tested that also

scarlet thorn
#

Alogn with misc.labels

limber blaze
#

well the labels work

#

it shows up in the image

wintry solar
#

You must have something set up wrong, the key is definitely correct

scarlet thorn
#

Maybe the extra label definition under desc.other is breaking it? I don't use loc files, and all my knowledge is from helping someone yesterday.

limber blaze
#

idk how i would have something setup wrong since theres no loc_txt in the seals definition and it works fine for every other thing including stickers

tall apex
#

ok so i tested it, and the top line is only adding mult and not doing the other two things :(

#

i think i need a break this hurts my head

scarlet thorn
limber blaze
#

you want me to just post the whole thing?

scarlet thorn
limber blaze
scarlet thorn
#

So it is doing it, just undoing it instantly

next timber
#

why is this giving me an error saying that ability is nil?

tall apex
scarlet thorn
minor furnace
tall apex
#

idk why it would be instant the editions stuff happens after.,,

minor furnace
#

because I do this

tall apex
#

rn i have this

scarlet thorn
tall apex
#

so can i have it in the return?

scarlet thorn
#

using an event is better

tall apex
#

idk how events work so ig im not doing this today

#

bcos i got shiet to do unfortunately

scarlet thorn
next timber
#

no i tired that and it didnt work

#

this is how troubadour does it

#

oh wait im a bit stupid for a different reason

#

im setting hand size instead of hand count

#

i am dum

minor furnace
next timber
#

ok so now why is THIS telling me ability is nil?

minor furnace
#

use card not self

next timber
#

oh yeah

tall apex
minor furnace
#

godspeed

#

and good luck with that essay

tall apex
#

Tyty :3

south lintel
#

how do I properly format the info box? I want it to display the stats of another joker

dapper sun
#

i can't find jolly joker's effect in card.lua

hushed field
#

the hand type and suit mult jokers are collectively gathered under their effect types

#

instead of their name

dapper sun
#

ty

scarlet thorn
south lintel
manic rune
#

did i cook

dapper sun
#

yes

south lintel
#

you cooked

manic rune
#

i will probably need to rework my other jokers at this pace, im familarizing with this pixel art stuff a bit too fast

#

this was the previous joker i made a week ago 😭

scarlet thorn
#

Asian fan?

manic rune
#

mhm

#

i think the design is fine, just that the background is too bland

primal shoal
#

"uh hello"

modern kindle
plain apex
primal shoal
lament agate
#

what do you type in debugplus to change the Ante to a specific one

plain apex
primal shoal
plain apex
#

when i did that i was trying to create them lol

primal shoal
#
 if context.individual and context.cardarea == G.play then 
                if  self.safe then
                    for _, card_in_play in ipairs(G.play.cards) do
                        card_in_play.ability.perma_mult = card_in_play.ability.perma_mult or 0
                        card_in_play.ability.perma_mult = card_in_play.ability.perma_mult + card.ability.extra.mult
                    end
                else
                    G.E_MANAGER:add_event(Event({
                        trigger = 'after',
                        delay = 0.4,
                        blockable = false,
                        func = function()
                            for _, card_in_play in ipairs(G.play.cards) do
                                G.play:remove_card(card_in_play)
                                card_in_play:remove()
                                card_in_play = nil
                            end
                            return true;
                        end
                    }))
                end
            end    

take a look if you want

daring fern
plain apex
#

heres a tarot i did that destroys cards if that helps

SMODS.Consumable{
    key = 'Midas',
    set = 'Tarot',
    atlas = 'Jokers',
    pos = {x = 4, y = 21},
    loc_txt = {
        name = 'Midas Touch',
        text = {
            'Select up to {C:attention}#1#{} cards and destroy them',
            'Earn {C:money}$#2#{} for each card destroyed'
        }
    },
    config = {
        extra = {
            cards = 3, -- configurable value (default to 3 cards)
            money_per_card = 2, -- $2 per card destroyed
        },
    },
    loc_vars = function(self, info_queue, center)
        if center and center.ability and center.ability.extra then
            return {vars = {center.ability.extra.cards, center.ability.extra.money_per_card}} 
        end
        return {vars = {}}
    end,
    can_use = function(self, card)
        return G and G.hand and G.hand.highlighted and card.ability and card.ability.extra and 
            card.ability.extra.cards and #G.hand.highlighted > 0 and #G.hand.highlighted <= card.ability.extra.cards
    end,
    use = function(self, card, area, copier)
        -- Remove the selected cards in hand with redundancy
        if G and G.hand and G.hand.highlighted then
            local money_earned = 0

            for _, selected_card in ipairs(G.hand.highlighted) do
                selected_card:start_dissolve() -- Ensures visual effect of removal

                -- Ensure jokers properly process the removed card
                if selected_card.playing_card then
                    for j = 1, #G.jokers.cards do
                        eval_card(G.jokers.cards[j], {
                            cardarea = G.jokers,
                            remove_playing_cards = true,
                            removed = {selected_card}
                        })
                    end
                end

                -- Add money for each destroyed card
                money_earned = money_earned + (card.ability.extra.money_per_card or 0)
            end

            -- Use ease_dollars to add the money earned
            if money_earned > 0 then
                ease_dollars(money_earned)
                G.GAME.dollar_buffer = (G.GAME.dollar_buffer or 0) + money_earned
                G.E_MANAGER:add_event(Event({func = (function() 
                    G.GAME.dollar_buffer = 0
                    return true
                end)}))
            end
        end
    end,
}
#

anyway im trying to make a blind that ignores enhancements, editions, and seals ive got removing and restoring editions and seals but haven't got enhancements and its restoring them too early

SMODS.Blind {
    loc_txt = {
        name = 'The Truth',
        text = { 'Ignores all seals, enhancements, and editions for cards' }
    },
    key = 'Truth',
    name = 'The Truth',
    config = {},
    boss = { min = 1, max = 10, hardcore = true },
    boss_colour = HEX("7f7373"),
    atlas = "BlindChips",
    pos = { x = 0, y = 2 },
    dollars = 5,

    press_play = function(self)
        -- Store the original values before making changes
        G.E_MANAGER:add_event(Event({
            func = function()
                for _, card in ipairs(G.play.cards) do
                    -- Save original values (to restore after scoring)
                    card._truth_backup = {
                        seal = card.seal,
                        edition = card.edition,
                        
                    }

                    -- Wipe them
                    if card.ability then
                        card.seal = nil
                        card.edition = nil
                    end
                end
                return true
            end
        }))

        -- After scoring, restore original values
        G.E_MANAGER:add_event(Event({
            func = function()
                for _, card in ipairs(G.play.cards) do
                    -- Restore the original values
                    if card._truth_backup then
                        card.seal = card._truth_backup.seal
                        card.edition = card._truth_backup.edition
                        
                    end
                end
                return true
            end
        }))
        return true
    end
}
#

how to get card enhancement for this?

wintry solar
#

I think it would be cleaner if you just told the calculation code not to run in that blind

plain apex
#

how to do that?

glad osprey
#

question why does the showman glitch work

#

like what flags get fucked with to make it work

wintry solar
#

I think you should just be able to hook the relevant functions and not run the original during your blind

thin anchor
#

is this correct?

primal shoal
#
 .dissolve()
``` maybe idk
glad osprey
#

:start_dissolve()

red flower
thin anchor
wintry solar
#

Destroying cards will automatically do that

red flower
#

remove should play the animation already

primal shoal
#

wait ".remove()" is all you need to destroy a card?

glad osprey
#

no

#

destroying card context

#

or :start_dissolve iirc

plain apex
red flower
primal shoal
#

ic

thin anchor
primal shoal
daring fern
primal shoal
thin anchor
#

i want that

primal shoal
#

can't select them and the texture is f*cked

primal shoal
thin anchor
#

yay

manic rune
#

accidental breakthrough in shitposting

#

congratulations, berry

primal shoal
#

thx

thin anchor
#

i love giant cards

#

just fucked up cards in general

#

i love em

shell timber
#

Tall Joker
+44 Mult

#

uncommon? rare?

plain apex
manic rune
#

😭

#

vr balala

glad osprey
plain apex
#

made the deck scared

thin anchor
plain apex
#

or the time i made the deck radioactive and it just constantly emitted green particles

plain apex
#

you could play with that one but the deck would just emit green particles forever

primal shoal
#

is this any good and if so what rarity would it be?

plain apex
#

so if you play a flush thats like 10 mult?

daring fern
plain apex
#

OH

#

thats interesting

#

id say like uncommon probably?

long urchin
#

how do i set up a joker file system?

glad osprey
long urchin
#

like, where each joker is in a separate file under a folder that the main.lua pulls from

#

i tried to just copy Neato Jokers but it gave me an error

glad osprey
#

I would not reccomend having each joker in it's own file

#

imo that seems very inefficient

long urchin
#

its a group made mod so its best if each joker has its own file so that we can work independently of eachother

modern kindle
long urchin
glad osprey
hushed field
#

I would recommend having each joker in it's own file. But it's something up for your organizational preferences. But I really prefer the each joker as a separate file approach both for testing and the way it's friendly towards merges

modern kindle
#

ive got about 50 jokers and already its a emss to go through one file for each

long urchin
modern kindle
#

if i split it up itd be way easier

hardy viper
#

i know cryptid doesn't do that

glad osprey
#

it does have different files for stuff but not 1 file for each joker

hushed field
#

What's your current set up? Really, the way to read them is just a loop over the list of files. Or you can do what Kino does, which is what Ortalab does because I stole it from Eremel's Ortalab code, and have the joker keys in a specific file, so you can easily add and remove them without moving the files

long urchin
#

not for jokers individually but it separates the code based on type

primal shoal
#

doesn't effect me much me

modern kindle
plain apex
modern kindle
#

plus i have jokers who reference other jokers which makes ctrl f not take me directly to the same shit

hushed field
modern kindle
#

thats true, split screen my beloved

primal shoal
#

nah i want to see all the blank space in full

hushed field
#

But it's honestly just personal preference, whatever way you go about it. I don't think there's any performance related arguments to make for either one. I've got 250 jokers, and that's a lot of files, but it's quite helpful in navigating everything for me. I'm sure ctrl f would also do, but I use Vsc's search for referencing other code, anyway. The best thing about it, for me, is honestly just that it tells me exactly which joker is the cause of a crash

#

@long urchin what's your current loading code?

long urchin
# hushed field What's your current set up? Really, the way to read them is just a loop over the...

main.lua:```lua
-- atlas definitions
SMODS.Atlas {
key = "roffers",
path = "Jokers.png",
px = 71,
py = 95,
}

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

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

-- load common util funcs
assert(SMODS.load_file("globals.lua"))()

-- load all individual cards
local subdir = "cards"
local cards = NFS.getDirectoryItems(SMODS.current_mod.path .. subdir)
for _, filename in pairs(cards) do
assert(SMODS.load_file(subdir .. "/" .. filename))()
end

--favorite card calc
local igo = Game.init_game_object
function Game:init_game_object()
local ret = igo(self)
ret.current_round.most_played_card_amount = 0
return ret
end

function SMODS.current_mod.reset_game_globals(run_start)
if not run_start and G.playing_cards then
for _, c in pairs(G.playing_cards) do
if c.base.times_played > G.GAME.current_round.most_played_card_amount then
G.GAME.current_round.most_played_card_amount = c.base.times_played
end
end
if G.GAME.current_round.most_played_card_amount > 0 then
for _, c in pairs(G.playing_cards) do
if c.base.times_played == G.GAME.current_round.most_played_card_amount then
c:add_sticker('roff_favorite', true)
elseif c.ability.roff_favorite then
c.ability.roff_favorite = false
end
end
end
end
end

SMODS.current_mod.description_loc_vars = function()
return { background_colour = G.C.CLEAR, text_colour = G.C.WHITE, scale = 1.2 }
end```

plain apex
#

it'd make updating it on github take longer tho cause theres a limit on how many files you can upload at once right?

primal shoal
#

ooh github backups for every joker does sound nice though

hushed field
#

I think it's like 2 gigs at which a free git repo starts throwing up issues, and you're really not likely to reach that due to your code

long urchin
rapid stag
#

bump

hushed field
#

also, I don't think there's a file count limit on git when you commit something

#

I've had free repos with projects that had 5000+ files and not have it be an issue

long urchin
#

scam

#

dont click

plain apex
#

damn we got scammers in here lol

hushed field
primal shoal
#

i mean i separate my types of additions at least

hushed field
# long urchin

it sounds like your code is reading in metadata files.

long urchin
#

how do i fix that

minor magnet
#

how to make context.end_of_round trigger only once in g.deck?

long urchin
#

i have holes in my brain

hushed field
#

I have no clue how that popped in there, but just add a check to see if the string ends in .lua

minor magnet
#

if not, just delete that file

primal shoal
long urchin
hushed field
#

I checked the file type out, deleting the file can't work, it's a file mac systems create in a folder while it's open.

minor magnet
hushed field
#

You'll wanna be safe and check for .lua regardless, because this crash could also be something a user can recreate, then

minor magnet
#

no ok jk

#

it's an issue with the loader

#

it's trying to load non-lua files when it shouldn't

hushed field
#

just split the string at the . and check if the final 3 chars in the string are 'lua'

plain apex
next timber
#

how do i get the chips and mult any given hand should gain when upgraded? or is that just stored in the planets and i gotta do it myself

long urchin
hushed field
hushed field
long urchin
crisp coral
long urchin
long urchin
crisp coral
minor magnet
next timber
crisp coral
#

main_eval is favored over not repetition

plain apex
hushed field
#

I mean, I'm no star at github, but check out the desktop client. It'll not have you upload the files by hand onto the website, and it gives you good access to the simple version management features

minor magnet
crisp coral
#

i suppose, i have no experience working with decks

hushed field
plain apex
#

i've made 2 decks but they are just decks that start you with a joker and then play absolutely normally

hushed field
# long urchin yeah this

also, Kino's file loading isn't super neat (I do keep single files for consumables and other types, and I don't automatically load in helper files yet, or iterate through item types), but the code I copied from Ortalab for loading jokers by string has been a great change. Allows me to re-order the jokers in the collection however I want, and also disable any jokers by just commenting out their key from the file https://github.com/icyethics/Kino/blob/main/Kino.lua

GitHub

a balatro mod for movie dorks. Contribute to icyethics/Kino development by creating an account on GitHub.

long urchin
hushed field
long urchin
#

ah

hushed field
#

string should be filename, and it should be an if statement inside your for loop

long urchin
#

ok so

#

weird situation

#

it got one

#

the other two are from a different mod

#

there should be 16 jokers here

#

wait i think i may know

#

its cuz that file is called DVD.lua, its checking the 4th character specifically for that string and thats the only file that has character 4 beyond as .lua

graceful magnet
#

how do you, make multiple badges, because this errors

primal shoal
#

programming more programming it always more programming

daring fern
graceful magnet
daring fern
graceful magnet
thin anchor
#

how would i make a card always have a sticker?

#

like
a joker always has the eternal sticker

faint yacht
#

Could always force it on via update.

primal shoal
#

if not sticker
give sticker
end

thin anchor
#

i see

cursive sentinel
#
                        card:add_to_deck()
                        G.consumeables:emplace(card)
                        G.GAME.consumeable_buffer = 0

                    return{
                        message = 'Death',
                        colour = G.C.PURPLE,
                        card = card
                    }```

i have how but i would like to add a delay on the first part so it happens at the same time as the return, any clue how?
minor furnace
#

put it inside of an event, probably

wintry solar
#

It’s ezpz

long urchin
#

how do i do that

wintry solar
cursive sentinel
#
if King == true and Queen == true and Jack == true then
                if #G.consumeables.cards + G.GAME.consumeable_buffer < G.consumeables.config.card_limit then
                    G.E_MANAGER:add_event(Event({
                        trigger = 'after',
                        delay = 0.8,
                        func = (function()
                            G.GAME.consumeable_buffer = G.GAME.consumeable_buffer + 1
                            local card = create_card (nil, G.consumeables, nil, nil, nil, nil, 'c_death', 'sup')
                            card:add_to_deck()
                            G.consumeables:emplace(card)
                            G.GAME.consumeable_buffer = 0
                            return true
                        end)
                    }))
                    
                    return{
                        message = 'Death',
                        colour = G.C.PURPLE,
                        card = card
                    }
                end
            end
primal shoal
#

are you king, queen, and jack vars defined

cursive sentinel
#

yes, they're not the issue

primal shoal
#

try putting prints in places and check if it actually getting to where you think it is

cursive sentinel
#

when it's not in an event, it works, although the death tarot card is created when hand is played, but then the effect of the return procs after the hand is secured and put into discard pile

#

thats why i tried adding it into an event

#

so i could control a common delay (although im not sure itd work either, was from an answer of a previous message of mine advising me to do it)

primal shoal
#

"end)" the extra bracket?

cursive sentinel
#

the ) is for the ( of the opening of the function

#

there is no syntax error or the game would crash (as it did before i added it)

#

or they render invalid the event although i have no enough knowledge to detect it

primal shoal
#

again go though it and print every step and check where it going wrong

cursive sentinel
#

i dont know how it would help me as i already know the problem is my event, and i dont understand events to start with

#

i know the problem is the event, bcs before putting it into an event as is, it worked, and with the event it doesn't, because i dont know how to make a functional event to start with and i don't understand the documentation

primal shoal
#
 
G.E_MANAGER:add_event(Event({trigger = 'after',delay = 0.1,func = function()
                -- caluations and changes
                end
return true end }))
``` i have mind set up like this
zealous glen
#

Has anyone else made a Tag that applies multiple times?

cursive sentinel
dense adder
#

does soul_pos not work on enhancements?

next timber
#

what do we think of this planet

primal shoal
#

design could be more exotic ig

next timber
#

unfortunately i am not an artist this was my best attempt

primal shoal
#

yeah i feel you there

zealous glen
next timber
#

the gibberish in the card is in fact a real conscript i am currently teaching myself how to read/write

#

its never too late to pivot to obelisk

zealous glen
#

Never buy Obelisk

dense adder
#

the biggest flaw gameplay wise is that it would rarely be taken, most people and builds are based on specific hands, and the least played hand can be any of them which could be highcard or flush straight, so too much of a risk to use unless you don't have any other choice, unless obelisk build
in theory its a great add but needs better variability, maybe levels up 2nd or 3rd most played hand a few times.

ruby delta
#

Can anyone check if they know how I can fix this real quick

Oops! The game crashed:
[SMODS _ "src/utils.lua"]:303: bad argument #1 to 'pairs' (table expected, got nil)

zealous glen
#

You need to figure out what passed a bad argument to that function

thin anchor
marsh radish
#

nice mod by breeze

ruby delta
marsh radish
#

he should add a timer to count how many time did your run last

#

like a timer

glass scaffold
glass scaffold
thin anchor
#

wheaties

dense adder
#

oh no that was just an idea, only go with one of those options, thats way too powerful, just keep game balance in mind and what would be weak

next timber
#

i mean i could make it upgrade by 3,2,1 levels, that seems pretty fair assuming you dont get it early game, i can probably make it not show up until you have a hand youve played a lot or smth

thin anchor
#

just a silly thought but
maybe you could upgrade the least (or 2nd (or 3rd)) played hand by how many times you used the planet

dense adder
#

oh thats good

next timber
#

update 2 least used hands by their amount of uses?

#

that seems balancedish idk

thin anchor
#

yeah maybe

dense adder
#

maybe make it degrading, where the more you use it the less you get so it will either uprgrade your lowest played, 2nd most, or 3rd most, but it goes from 6 and lowers by 1 each time used until it stops at 1

thin anchor
next timber
#

i dont wanna mess with the art too much because avalon is a preestablished fictional planet made by not me

#

lol

thin anchor
#

i was just half-jokering

#

lmao

next timber
#

lol

thin anchor
#

wait i typed jokering
balatro brainrot i didnt mean to type that

next timber
#

lmao

scarlet thorn
next timber
#

lmao

#

yes i agree

peak obsidian
#

graphic is a placeholder

next timber
#

but the effect is still a wip so

next timber
scarlet thorn
#

I think just drop the 3rd least

dense adder
next timber
#

yeah its neat

#

ok. upgrade least used by 5, upgrade second least used by 3
is that fair

#

im getting so many conflicting suggestions

thin anchor
gilded goblet
next timber
gilded goblet
thin anchor
#

lol

runic pecan
#

Just came up a stupid way to detect if you have any chance joker:

  1. Save G.GAME.probability.normal to a local variable;
  2. Set G.GAME.probability.normal to a very particular and peculiar value;
  3. for _,J in ipairs(G.jokers.cards) do
    3a. Get the return table from J's loc_vars function;
    3b. Check if vars of the returned table contains a very particular and peculiar value;
  4. Set G.GAME.probability.normal back to its original value.
    ...Yes, I'm asking for a better method. Please help.
next timber
#

alternatively, dothat method but just check if the jokers values change when you change probability.normal

peak obsidian
scarlet thorn
dense adder
#

does anyone know how to get those black bars to show up over the card for enhancements, as soul_pos does not function with enhancements

runic pecan
next timber
dense adder
#

lmao, the REDACTED enhancment

next timber
dense adder
#

yeah i thought about doing so.. wait that actually better for what it does

runic pecan
next timber
#

true

zealous glen
scarlet thorn
#

Or well

zealous glen
dense adder
#

yeah im having trouble with that bit, not finding any documentation for set_sprites

scarlet thorn
#

Have a 1d table with a list of joker keys that you consider to be a chance joker. @runic pecan. Include any jokers from mods you want to support too

#

What mods do you have installed? NVM you said on joker

scarlet thorn
#

Show the code for your joker

scarlet thorn
runic pecan
#

What in the F did your joker do?

modern kindle
#

is there a reliable way i could go about making a tarot card that grabs the levels from the most played hand and the second most played hand
then divides the number by 2 and applies those levels and values normally to a hand?

as an example, you have full house which has 50 levels
you use tarot card, it sees you have 10 levels in 4 of a kind

it then divides the 50 levels of full house by 2 (25) and add those 25 to 4 of a kind while setting full house back down to 1 (including its chips and mult, while adding the respective chips and mult to 4 of a kind)

scarlet thorn
modern kindle
#

assist me great vic

ruby delta
zealous glen
terse marsh
#

how can i get the context for a hand after its scoring

#

im trying to recreate a joker similar to flower pot but only with 3 hand colors

runic pecan
scarlet thorn
runic pecan
modern kindle
#

my main bottleneck has appeared to be in restoring the values properly

runic pecan
modern kindle
#

sure so

#

do*

#

my mod is compat with and without talisman

#

which, has been a menace

#

as a showcase (ignore the text and the cryptid palceholder)

it does remove the levels visually, but the chips remain instead of resetting to their default values, or increasing for the respective hand it went to

limber blaze
dense adder
#

shit, what is good recording software there is no words to describe this issue, i got set_sprite working a bit

modern kindle
limber blaze
peak obsidian
#

new clockwork deck graphic, pretty proud of how this came out

terse marsh
#

ik im asking lots of dumb questions but how can i get the length of the hand played so i can iterate thru it lol

#

any tips on what im doing wrong

rapid stag
#

bump

terse marsh
#

keep getting the error for the for loop for the suits

#

but im not too sure what to replace the context.scoring_hand with

tired silo
#

anyone know how I can programmatically move a joker left/right in the order? Can't find it in the game code

runic pecan
terse marsh
#

well im asking about iterating through the hand

broken rivet
#

is there documentation of smod anywhere

limber blaze
#

# is the length operator in lua which gets the length of whatever table you put after it

terse marsh
#

thank you

rapid stag
broken rivet
limber blaze
#

yeah it can be weird but itll be fine for scoring hand

#

but you can just do for i, v in pairs(table) in this context anyway

minor furnace
dense adder
#

shit video didnt work let me do that again

#
        card.children.floating_sprite_vic_belt = Sprite(card.T.x, card.T.y, card.T.w, card.T.h,
                G.ASSET_ATLAS[card.config.center.atlas], {
                    x = 5,
                    y = 0
                })
              
        card.children.floating_sprite_vic_belt.role.draw_major = card
        card.children.floating_sprite_vic_belt.states.hover.can = false
        card.children.floating_sprite_vic_belt.states.click.can = false
broken rivet
tired silo
#

To move jokers left/right do I just iterate through G.jokers.cards and change their order?

terse marsh
#

even when i play a hand with 3 suits it isnt scoring my guess is im doing something wrong in the second for loop is there some lua syntax im fuckng up

terse marsh
#

im not super familiar w lua lol

limber blaze
glass scaffold
terse marsh
#

me too LOL

thick panther
#

Is there an easy way to add a full suit (2 - Ace) to a deck?

open aspen
#

is there a default prefix for consumables like there is for jokers

#

eg how the key for a joker if using debugplus for example, would be "j_modprefix_jokername"

zealous glen
#

Yes

open aspen
#

is it c_

#

i assume it would be c_

thick panther
#

How would I create a Playing Card using SMODS.create_card?

dense adder
#

Anyone familiar with set_sprites help me understand why the sprite will be set in the last place it was dragged to and not centered on the card

        card.children.redacted = Sprite(card.T.x, card.T.y, card.T.w, card.T.h,
                G.ASSET_ATLAS[card.config.center.atlas], {
                    x = 5,
                    y = 0
                })
        
        --card.children.redacted.role.draw_major = card
        --card.children.redacted.role.role_type = 'Glued'
        card.children.redacted.states.drag.can = false
        card.children.redacted.states.hover.can = true
        card.children.redacted.states.click.can = false
    end```
thick panther
zealous glen
#

create_playing_card

chrome widget
#

What's the most effective way to force a UI box to render below another if you can't guarantee the order they're created in?

red flower
#

in the one that has to go above

chrome widget
#

Hmm, can I set to force one to go below?

red flower
#

never tried it

chrome widget
#

I'm creating something that's supposed to tuck behind the shop UI, and I don't want to risk redefining the shop UI because doing so would result in a reroll of the items in it

#

I could patch it, but I try to make patches a last resort

terse marsh
#

Joker still wont score and im not too sure why

coral oasis
#

So I've never modded a game before, but I had an idea for a joker and I'm not even sure how to go about making it. Basically it'll be like madness, but for food jokers only. I called it Hungry joker. Instead of a base Xmult added every time it destroys a joker it would take the value the food joker currently has. When the food gets sold, or in this case eaten it would be added to the Hungry joker. For example you could sell popcorn, ramen and ice cream, and it could have values such as: +16 mult, X1.29 mult, and +65 chips. I would probably exclude things like bean because that could get ridiculous. Any points on where I should start, or if that's even possible?

long urchin
#

how do i update the pos value in a context

coral oasis
#

Might tweak it for balancing, so it can only "eat" a food joker once an ante or something, I'm not sure yet.

modern kindle
#

hi winter :D

high sinew
#

My imaging is acting up in my mod does the file for my joker look right? i gave one ex of how I am doing it for files

wintry solar
#

has anyone tried modifying the colours used in start_dissolve? My testing doesn't appear to be doing anything

red flower
wintry solar
#

yeah they just stay as the default

#

materialize works fine though 🤔

red flower
scarlet thorn
wintry solar
scarlet thorn
scarlet thorn
scarlet thorn
wintry solar
#

yes I know how it works...

#

I'm just saying it doesn't

scarlet thorn
wintry solar
#

it doesn't matter what colours I pass

#

it always plays the default

red flower
wintry solar
#

weird

scarlet thorn
#

Works for me too.

#

Show how you're calling it

scarlet thorn
high sinew
#

i figured it out

#

quick question how do i have a joker not be able to show up in shop if its an upgrade of another joker like cavendish?

scarlet thorn
red flower
#

i hate that it goes out the screen u.u

zealous glen
modern kindle
zealous glen
#

and by try I mean ping aure because they did it for collection Jokers IIRC

red flower
#

it's easy based on the card's position but i have to figure out how to do it based on the description box's position

#

and also make it look nice because i think on the top, bottom and right side would look ugly

wintry solar
#

🤯 I don't understand

red flower
#

cursed

high sinew
#

ok ber

wintry solar
#

it jsut... ignores my arguments

scarlet thorn
#

It could be the case that one of them redefine the function in their own files

#

Ive had that issue with cryptid

wintry solar
#

none of them touch start dissolve, please stop acting like I don't know what I'm doing

#

I can still make this work without this though 🥳

scarlet thorn
#

My other 2 messages are not only for you to read, anyone who looks here and maybe searches for their issue of start_dissolve will see them, and know that those issues can occure.

modern kindle
#

even if they were just for him, something working immediately for 2 others and not himself would imply an error regarding his setup alone

rapid stag
#

bump

wintry solar
scarlet thorn
#

context.card.base has some playing card specific values

#

Could also check what the card's area is

high sinew
#

the joker displays the mult twice first from calulation and in red saying "+5 Mult" then again in gold "+5 Mult" why is that?

scarlet thorn
high sinew
#

yea they get replaced by jokers

#

but the jokers are displaying mult twice

scarlet thorn
#

is the joker count correct? like the X/5

#

Ive had issues in the past where I "removed" a joker but all it did was delete the rendering, so it was still being calculated

high sinew
#

yea the count for all joker is currently right but i just dont want when triggered to show up twice

#

its showing up two times rn

wintry solar
scarlet thorn
#

Oh yea, mult has a message of itself. No need for your own, unless you want to replace the default one

red flower
high sinew
modern kindle
gleaming zealot
red flower
modern kindle
maiden phoenix
thin anchor
#

where is the deck code located

#

nevermind found it

hard flume
#

I'm thinking of picking this up again

#

Just need to think of new mechanics I can focus on

cinder light
#

Hey, um how would I change the probability for just one thing, say I want a joker to add better chance for lucky cards to trigger and only that

scarlet thorn
#

Like say, patch this to replace G.GAME.probabilities.normal with your own variable

cinder light
#

alright, just curious then, what file is that in the 7zip

wintry solar
#

@zealous glen I think you were someone who was interested in this beign bundled

scarlet thorn
#

Oh.

#

Card.lua

#

Line 1317

#

For mult, its the same file, line 1228

red flower
hard flume
#

Should I work on Jokers for the Bells and Whistles suits? Or should I add Card Genders first?

formal parrot
#

Bells ? Suit

#

🥖

wintry solar
cinder light
scarlet thorn
red flower
#

cursed right aligned infotip

scarlet thorn
thin anchor
#

god dammit

scarlet thorn
thin anchor
#

so true

cinder light
scarlet thorn
#

I think i might've formatted my file, and the line numbers are all outta wack

cinder light
#

im trying to change the probabilities of glass cards breaking, can I do that with something similar to this?

thin anchor
#

how would i convert a joker's rarity to a value

wintry solar
red flower
#

ohh that looks nicer yeah

dense adder
# dense adder ``` set_sprites = function(self, card, front) card.children.floating_...

does anyone know how to make sure that the set_sprites stays in the same position as the main card
heres my most up to date code

    set_sprites = function(self, card, front)
          pos = get_front_spriteinfo(card)
          card.children.redacted = Sprite(card.T.x, card.T.y, card.T.w, card.T.h, card.T.r,
                  G.ASSET_ATLAS[card.config.center.atlas], {
                      x = 5,
                      y = 0
                  },pos) or card.set
          
          card.children.redacted.role.draw_major = card
          card.children.redacted.states.drag.can = false
          card.children.redacted.states.hover.can = false
          card.children.redacted.states.click.can = false
          
          return
    end
scarlet thorn
thin anchor
#

oh

#

just need to figure out how to get their values

daring fern
thin anchor
#

ok

zealous glen
high sinew
#

trying to figure out how to do exponential mult

rn it displays +0 for total mult should be 100 and then it squares it but ERROR shows whe calcs but doesnt crash

high sinew
#

i do

#

is that the way?

formal parrot
high sinew
#

ok bet

thin anchor
#

never made a deck before so im confused

#

would i replace card with deck?

tired silo
#

How do I get an unique ID for a joker? I see card has get_id() but that doesn't seem to be unique

zealous glen
#

I think you'd need to make one

sullen fern
#

how do i specifically make it do only modded seals

high sinew
#

@daring fern does this look right for how I wrote the tailsman code? i have it impleted now for game but seems its not applying still

daring fern
sullen fern
tired silo
zealous glen
tired silo
#

yea

#

is it just card.key?

daring fern
zealous glen
#

It's not unique per instance of a card but it's unique for all of the same Joker

sullen fern
zealous glen
tired silo
sullen fern
thin anchor
zealous glen
tired silo
daring fern
sullen fern
#

i see.

zealous glen
#

You can create a card given a key, and you can count how many cards have a given key

tired silo
zealous glen
#

Yes

tired silo
#

Cool. Happen to know the syntax for that? I appreicate all the help btw

sullen fern
zealous glen
#

I think there's some argument to localize that would return the name associated with a given key in the current localization

#

I'm not sure which

sullen fern
#

because if i know how to make a card create only modded objects then i can do it for other desired object types like jokers and consumables

high sinew
daring fern
high sinew
#

when carolina reaper activates card literally says ERROR

red flower
high sinew
#

game doesnt crash

limber blaze
tired silo
#

(only need this function for jokers)

zealous glen
tired silo
#

ah okay

sullen fern
daring fern
tired silo
zealous glen
neat plover
#

anyone know why this shit aint workie?
effect should be: When buying a Joker leaves no empty Joker Slots, this Joker gains x0.25 Mult.

sullen fern
sullen fern
daring fern
sullen fern
#

hm

#

would that be an if statement thing or

runic pecan
#

Why is this sticker not sticking?

sullen fern
formal parrot
sullen fern
#

thank you, i made it in emo maker 2000

tired silo
#

card.ID is unique even for duplicate cards/jokers?

sullen fern
daring fern
sullen fern
#

what kind of loop would it be

glad osprey
#

how do I allow a card to show up again like showman does

faint yacht
#

In in_pool, return true, { allow_duplicates = true }.

sullen fern
#

my code btw

glad osprey
#

like

#

make other cards do that

high sinew
thin anchor
#

is this right for a deck?

faint yacht
sullen fern
thin anchor
red flower
#

F

rapid stag
#

i don't think pseudorandom() exists yet at that point in runtime cirBlech i was wondering why it wasn't proccing and tried printing a pseudorandom() result to no effect

red flower
#

im pretty sure it should exist at that point

thin anchor
#

double stonk

rapid stag
#

wait

#

it did it way later

#

what

red flower
#

is the pattern unique

rapid stag
#

no. it gets 2 matches

red flower
#

you might need to change the pattern then or change times to 2

rapid stag
#

well without the check for the pseudorandom value, it does it just fine. the pseudorandom check seems to be the weird point

#

wait no, it does it at the right time, i just wasn't paying attention cirDerp

sullen fern
rapid stag
#

i am just astronomically unlucky with it it seems

red flower
#

i have failed many 1 in 4s while testing lol

slate bison
#

anyone have the link for the steammodded documentation talking about changing text colour in game?

#

or where is it in the documentation

rapid stag
#

what kind of text? like in loc_txt?

#

{s:1,C:white} type stuff?

thin anchor
#

is this right for a deck? trying to make it so it gives money based on the rarities of all your jokers

red flower
slate bison
#

exactlyyy

#

thank u

chrome widget
#

Is there a way to edit the draw layer of an existing UI element?

#

I'm trying to parse the UI code because I need to bring the shop UI front one layer, but it seems there's some nesting here I don't understand

#

Attempting to set my own UI to -1 or such doesn't seem to draw it behind the shop

red flower
# sullen fern still need an answer to this

i dont know if this works because im not on my pc but i would try

local choices = {}
for k, v in pairs(G.P_SEALS) do
    if v.mod then
        choices[#choices+1] = v.key
    end
end
local random_seal = pseudorandom_element(choices, pseudoseed("seed"))
sullen fern
#

where would i put it

red flower
#

just before conv_card and then use random_seal inside set_seal

sullen fern
#

i see

#

can you give a little pointer to where exactly you're talking about

red flower
#

you can do it anywhere inside the for loop before the second event

sullen fern
#

ah, i see

wintry solar
scarlet spire
#

oh?? default implementation for +selection limit?

#

weird question. can it go below 5

faint yacht
#

Should.

sullen fern
#

so like this

wintry solar
#

yeah, hand limit is capped at 1 and discard at 0

sullen fern
#

i forgot to reply to the message, fuck

red flower
scarlet spire
#

discarding 0 cards...

sullen fern
scarlet spire
#

I assume the discard button being frozen if you manage to discard 0 cards is fixed in that case, then

scarlet spire
tall apex
tall apex
reef belfry
#

Discard a chicot to draw a raised fist

faint yacht
thin anchor
#

so like this

sullen fern
#

behold.

faint yacht
thin anchor
#

thanks

sullen fern
scarlet spire
# wintry solar what does this mean

I've encountered scenarios in my own mod where, if the discard_cards_from_highlighted function is called with no selected cards, it freezes up and never lets you discard for that round again because there's no built-in case for that (for obvious reasons)

sullen fern
#

this but like, enhancments and editions

scarlet spire
#

unless the discard button is completely disabled when you set the discard cap to 0, in which case this doesn't matter at all

wintry solar
#

but yes, the buttons are disabled if the cap is 0

scarlet spire
# wintry solar the game has a check to see if you have cards highlighted built in, you must hav...

in this case the discard button was doing it, I was just deselecting specific cards before the function was called but after the button was pressed (which works fine outside of this case)
I think the issue is that the function seemingly sets a bunch of UI stuff, but if the check for highlighted cards fails, the function never resets those values iirc, it only does so if you have highlighted cards and the check is successful

paper zealot
# chrome widget Attempting to set my own UI to -1 or such doesn't seem to draw it behind the sho...

I believe UI is rendered per-frame according to the the contents of the G.I table, in the following order:

  • G.I.NODE
  • G.I.MOVEABLE
  • G.I.UIBOX
  • G.I.CARDAREA
  • G.I.CARD
  • G.I.UI_BOX
  • G.I.ALERT
  • G.I.POPUP
    You can control which "layer" your UI element gets put into by setting config.instance_type to a string of the table you want it to be placed within when it's created, by
config = {
    instance_type = 'ALERT'
}
```To change the rendering order of a UI Element *after* it's been created, you'd have to remove it from the relevant `G.I` table and re-add it to another one, which would be messy and potentially require you to deal with some weird edge cases
thin anchor
wintry solar
#

interestingly, the discard pile has a limit of 500 and stops you discarding if its full

faint yacht
#

The apply shouldn't be there at all.

thin anchor
#

oh

wintry solar
#

the cardarea check is also redundant

red flower
sullen fern
#

does conv_card work for editions and and enhancements too

scarlet spire
thin anchor
#

i believe this is correct

sullen fern
thin anchor
#

ok no it isnt

wintry solar
#

UI layering is difficult

sullen fern
faint yacht
red flower
tall apex
# chrome widget Ugh damn

winter i have a very ambitious idea if you wanna help me commit balatrocities and wanna help me learn to code :3

paper zealot
# chrome widget Ugh damn

There are also some sneaky tricks you can pull. If you set self.attention_text to any string on a UIBox element, it's rendered last within that layer - you could try putting your custom UI on the same layer as the shop, then setting attention_text on the shop HUD as needed?

tall apex
#

i asked keku but they didn't know what to do besides pointing me in the direction of hooks

chrome widget
#

Gimme a second to show my fundamental problem. It's functionally really minor and it annoys me that the skills required to fix it are so big

sullen fern
red flower
sullen fern
#

so it would be this then

red flower
#

also pls format the code : (

thin anchor
chrome widget
#

Here's the issue. I have a UI area in addition to the shop that is currently created during the voucher redeem screen, which means that it must be created after a shop already exists, and therefore layers overtop the shop. But the actual definition of it (and indeed the regular code for loading the shop) involves it appearing behind the so it looks like a little drawer

#

The main reason it's such an issue is because unlike all the other shop areas, this one persists across shops, so I have to do some weirder stuff than the rest of the UI which is always destroyed and then recreated with new cards

paper zealot
chrome widget
#

So it's probably easier to just create it as usual with the shop and keep it invisible until I need it, but I'm already running into issues with serialization of a new cardarea for save/load that it's displaying because it doesn't work like any of the regular cardareas in the game in that regard

red flower
sullen fern
sullen fern
red flower
thin anchor
#

i am going insane

sullen fern
red flower
red flower
sullen fern
#

alright.

paper zealot
chrome widget
#

Probably, yeah. It's not a super complex UI

faint yacht
# thin anchor

Is the money being given tied to end of a round or something?

red flower
#

people play with jokerdisplay which creates 5 UIboxes per joker it's fine

sullen fern
#

why can't i use it

paper zealot
chrome widget
#

Lemme see.....4

sullen fern
chrome widget
#
    definition = G.UIDEF.morshu_save(),
    config = {align='tmi', instance_type = 'NODE', offset = {x=7.3,y=G.ROOM.T.y+10}, major = G.hand, bond = 'Weak'}
}```
#

Just like this?

paper zealot
thin anchor
#

is this right

sullen fern
#

nope i still can't use it

rapid stag
chrome widget
#

We're in business

red flower
chrome widget
#

Now I just have to figure out why the game is being annoying and failing to recreate the UI on reload

sullen fern
thin anchor
chrome widget
#

Yep yep, that's the gag

#

It allows you to save a card that persists to the next shop

thin anchor
#

ha. ha.

chrome widget
#

You come back when you're a little
mmmmmmmmm
richer

rapid stag
sullen fern
thin anchor
#

what does this mean

high sinew
rapid stag
#

ok so an event wrapper in the return table func is the closest to the correct timing i can get it, but for some reason it's 1 late cirLost i don't understand how the event queue is achieving this.

sullen fern
rapid stag
tall apex
#

so um, i wanted to ask, do people occasionally use llms to help them code? my college gives me access to one and idk if i should try to learn lua with it

proud moon
sturdy compass
#

As for generating code, not really

tall apex
wintry solar
proud moon
rapid stag
# wintry solar What is this supposed to do?

essentially - if the joker being copied is going to put the return message on the card ala hiker, do not override the return message target or colour and juice_up() the joker on the message timing instead
but as you can see in the clip, it's 1 event late in the queue for some reason

stark geode
#

Time to setup my balatro modding computer

#

Because my other one died

tall apex
stark geode
#

Arch Linux go brrr

tall apex
#

.,,,, don't ask how complex one of my jokers is

tall apex
proud moon
tall apex
stark geode
#

Doesn't help that the other laptop I was using to make Bali mods was my school pc but it died and I cant get my old trick to work that got lovely running on my new one

tall apex
#

im a little shitter and i like mario 64 sue me

stark geode
#

The screen died

tall apex
#

it'd also be cool if the mult carried over between runs, since mario 64 uses save files you can preserve that data

stark geode
#

Now I'm setting up a Linux shit box to go back to making mods

tall apex
#

i hope

#

..,,, anyways im gonna make a joker that gives -4 mult

sturdy compass
wintry solar
proud moon
rapid stag
stark geode
#

I think I overpaid lol

sturdy compass
#

Holy shitbox lmao

proud moon
stark geode
tall apex
sturdy compass
#

A potato sounds better 😭

stark geode
#

Hopefully arch can give it all the horsepower it needs

proud moon
tall apex
#

my silly knows no bounds, i will become an expert lua coder for the bit

stark geode
#

Lua is so wierd

glad osprey
#

balareo

sturdy compass
#

batro

stark geode
#

As someone whos first language was python

tall apex
wintry solar
tall apex
sturdy compass
stark geode
#

Joker poker balala

tall apex
glad osprey
sturdy compass
#

Oh shit

stark geode
stark geode
sturdy compass
stark geode
#

-# I know nothing about jojos

glad osprey
#

no you are perkeo

#

i am chicot

tall apex
#

im cleo c:

rapid stag
tall apex
# stark geode A rival stand user???

ERM ACTUALLY ITS AN ENEMY STAND USER??? RIVALRY IS CHILDIKSH AND STAND USERS FACE A VERY REAL LIFE OR DEATH SCENEREO WHEN APPROACHED BY AN OPPONETNT

proud moon
rapid stag
tall apex
wintry solar
#

Just the calculate function

sturdy compass
stark geode
rapid stag
tall apex
#

-# sorry im deleting that i dont wanna overshadow nope's code

#

-# but funny cat flop

wintry solar
#

The individual context should default messages onto the playing cards

rapid stag
#

without card =, the message defaults onto the joker.

#

but yes, message_card was my panacea, thanks cirComfy

#

and then of course, i just put that all in an extra table to prevent blueprint/brainstorm overriding the colour. very cool

wintry solar
#

If you are bothered about the colour, sure

glass scaffold
sullen fern
wind steppe
#

does anyone know how to implement a booster pack?

#

steamodded documentation isn't saying much about how to put things in it

rapid stag
red flower
#

it should be A then B

rapid stag
#

that was my thinking too cirBox

red flower
#

i have a system in my mod that just appends a bunch of extras together and it works like that

rapid stag
#

you can nest extras...?

red flower
#

yes

rapid stag
#

oh my god

unborn bay
#

nesting extra tables is very useful

#

and that reminds me i need to account for that somehow while making my own extra nesting system

rapid stag
#

so how does balatro parse the return table then?
does it look through the table at everything but the extra, then recursively calls whatever handles the return table with the extra?

red flower
unborn bay
#

please 🙏

red flower
#

the only thing this doesn't account for is returning something like true because I don't care about vanilla jokers

manic rune
#

after 2 weeks i only got 6 jokers done

#

🥀

unborn bay
# unborn bay and that reminds me i need to account for that somehow while making my own extra...

currently all it does it this, with the input being a list of effect return tables

-- Recursively create an extra table for each returned effect table
function PTASaka.recursive_extra(table_return_table, index)
    local ret = table_return_table[index]
    if index <= #table_return_table then
        --local extra = PTASaka.get_extra_table_for_ret(ret, ret.extra)
        ret.extra = PTASaka.recursive_extra(table_return_table, index + 1)
    end
    --if ret ~= nil and index == 1 then print(ret) end
    return ret
end
#

the commented out line before setting ret.extra was my feeble attempt at handling existing extra tables (and failed)

rapid stag
#

anyway, did anyone prescribe nightmares

unborn bay
#

why is she negative 😭

pulsar gull
#

hi, i have kinda little experience with coding and im trying to make a joker mod, does someone have an idea how do i make my joker activate every time the score gain alternates between chips and mult?

sullen fern
#

why do you NOT want to be used

crisp coral
#

have you given it a can_use?

sullen fern
#

like, this is the code.

crisp coral
#

you haven't given it a can_use

sullen fern
#

but cherry on top can be used and it doesn't have a can_use

crisp coral
#

que

sullen fern
#

i based the code for cherry on top off of this alabell card and even this can be used without a can_use

crisp coral
#

shrug, i dont know much about consumables

sullen fern
#

this is pissing me off...

scarlet thorn
#

The bare minimum it can be is

can_use = function() return true end
sullen fern
#

two of the seal-based consumables i made did not require it

sullen fern
scarlet thorn
sullen fern
#

like. where?

#

okay but like

scarlet thorn
#

notice how theres 2 ends.

crisp coral
#

😭 you have 2 ends and no commas

sullen fern
#

ah, i see the issue.

#

and yet.

hasty mist
#

how do you replicate blueprint-type functionality

sullen fern
#

notice how cherry on top isn't usable yet, because i haven't selected any cards

#

when i select a card, it becomes usable

#

and it becomes unusable again when i select more than 2

#

and again, the game crashes when i try to use it.

#

note that i'm specifically trying to call modded enhancements

slate bison
#

hey anyone what would be the game context for checking a player is using a tarot card?

slate bison
sturdy compass
sturdy compass
#

u got it

tepid rock
#

does anyone know why it is mad at me and how to fix it? says it cant find the ifs

runic pecan
runic pecan
tepid rock
# runic pecan First of all, I would merge the fisrt two `for` loop into ```for i,J in ipairs(G...
calculate = function(self, card, context)
        for i,J in ipairs(G.jokers.cards) do
            if J == card then
                my_pos = i
            else
                jokers[#jokers+1] = J
            end
        end
            if context.setting_blind and not card.getting_sliced then
                if #jokers > 0 then 
                    if my_pos and G.jokers.cards[my_pos+1] and not card.getting_sliced and not G.jokers.cards[my_pos+1].ability.eternal and not G.jokers.cards[my_pos+1].getting_sliced then 
                        if #G.jokers.cards <= G.jokers.config.card_limit then 

                            local sliced_card = G.jokers.cards[my_pos+1]
                            local left_card = G.jokers.cards[my_pos-1]
                                sliced_card.getting_sliced = true
                                G.GAME.joker_buffer = G.GAME.joker_buffer - 1
                                G.E_MANAGER:add_event(Event({func = function()
                                card_eval_status_text(context.blueprint_card or self, 'extra', nil, nil, nil, {message = localize('k_duplicated_ex')})
                                left_card:add_to_deck()
                                G.jokers:emplace(card)
                                
                        else
                            card_eval_status_text(context.blueprint_card or self, 'extra', nil, nil, nil, {message = localize('k_no_room_ex')})
                        end
                else
                    card_eval_status_text(context.blueprint_card or self, 'extra', nil, nil, nil, {message = localize('k_no_other_jokers')})
                end
            end
        end
    end
end
end
    end

like this?

tall wharf
#

chat are we cooking

tepid rock
#

whats the second last one?

runic pecan
tall wharf
tepid rock
#

I love it, I would either make it less rare or buff ashes

tepid rock
#

and i am scared to remove it

runic pecan