#💻・modding-dev

1 messages · Page 157 of 1

frosty dock
#

or only instances where they're being used without smods

rough furnace
#

yes

#

moreso a mod that can be used with only lovely

frosty dock
#

most likely talisman then

rough furnace
#

oh yeah

#

forgor it

gaunt thistle
#

wasn't debugplus originally a lovely mod?

rough furnace
#

It still is

gaunt thistle
#

ya so the answer is easy

rough furnace
#

well talisman might be used more

gaunt thistle
#

well

#

isn't smods the most used lovely mod?

#

smods, then talisman, then debugplus

rough furnace
#

yes

#

probably

edgy reef
#

What afterwards?

viral stream
#

i try this and hasn't really worked out, get a crash, and the desc of the card even shows as Retrigger this card nil additional times instead of 1 so i don't know what's up with that

#

😭

gaunt thistle
wintry solar
#

handy is lovely only right?

sonic cedar
#

so then the cardarea, setting_blind, and blind are there on a different TIMING? like the most obvious timing there is the context, being it's when the blind starts. what i dont get are how to use the objects in the context/timing table. like, can you explain what you mean by using context.blind to access the blind?

viral stream
#

just started with modding yesterday so i also may be stupid

rough furnace
#

theres that saturn mod thats lovely only

#

I've made a couple other lovely only mods noone uses

edgy reef
#

Same

gaunt thistle
#

what does lovely itself count as?

#

it's probably the most downloaded in whatever category it's in

rough furnace
#

it's a library injected mod

gaunt thistle
#

an affront to god

rough furnace
#

which means its probably competing with stuff like bepinx or whatever

viral stream
sonic cedar
#

i was gonna say it's probably like bepinx

edgy reef
edgy reef
rough furnace
#

I have a modifed version of the smods crash handler to work without smods

edgy reef
#

Same

rough furnace
#

wait really?

wintry solar
# sonic cedar so then the `cardarea`, `setting_blind`, and `blind` are there on a different TI...

no they're all the same timing, think of each 'context' as an envelope of information. When you start a new blind it sends this envelope to each calculate function of items that you have, where the envelop contains three other envelopes, one called setting_blind, one called cardarea and one called blind. Your function looks at the outer envelope and decides if it wants to do anything with whats inside

edgy reef
#

Just a coy of SMODS version

#

It may not look like it but I do in fact keep Flower Pot updated and tracking crashes without this is a pain

rough furnace
#

oh yeah I frogot I ported some of the changes for the smods one to not crash without smods

#

so it could be loaded earlier

sonic cedar
wintry solar
#

you don't put anything in the envelopes

#

they're just envelopes of information

sonic cedar
#

so

#

OH

#

OHHHH

#

the stuff that it says it's equal to in the docs is jsut that

#

what it is/represents?

wintry solar
#

yes

gaunt thistle
#

very cool

rough furnace
#

or maybe conf

sonic cedar
# wintry solar yes

and then anything i put inside of the context uses cardarea, etc as the representative? like i wont have to type out G.jokers i can just write context.cardarea

wintry solar
#

you;d use context.cardarea but you wouldn't often need to reference the cardarea specifically

#

As I said before, that's mostly useful to differentiate between being played and held for playing cards

#

but, for example, if you needed to check which blind was being set, you could reference context.blind and find the properties within that

sonic cedar
#

so something like if context.blind == [some blind property here]

#

then i set the reset variable to true if the thing wasnt triggered and that triggers the reset

wintry solar
#

so you could do if context.blind.boss then to only work on boss blinds, for example

sonic cedar
#

ohhh ok ok

wintry solar
#

you can use == but you'd need to specify the property on context.blind too

sonic cedar
#

like boss

#

or does that mean something else

wintry solar
#

boss would ignore small and big blinds

sonic cedar
#

right

wintry solar
#

you'd want something like context.blind.config.blind.key

sonic cedar
#

so let me see here

#
        if context.end_of_round then
            if context.blind.config.blind.key == context.blind.boss then
                
            end
        end

id set it up like this so it triggers at the end of the round?

#

wait i forgot the

frosty dock
#

there's no context.blind in end_of_round

#

you'd replace it with G.GAME.blind here

#

or in any context that isn't setting_blind

wintry brook
#

is there a way to check if a card is showing its front? i tried a bunch of stuff but only stone cards work with this implementation

sonic cedar
tall wharf
#

do i have to manually stop each jokers individually if it has something to do with suits or ranks

viral stream
#

i'm getting this error when trying to make an edition that retriggers the card not sure what i'm doing wrong on this

  calculate = function(self, card, context)
      return {
          message = localize('k_again_ex'),
          repetitions = 1,
      }
  end
frosty dock
#

you'd use the key part to check for a specific blind

sonic cedar
#

ohhhhhhhhhhhhhhhhhhhhhh

#

can i put a variable there? or will i have to like do each boss blind separately

viral stream
#

which context check? joker_main?

frosty dock
wintry brook
viral stream
# wintry solar you need a context check

am i just missing something, i thought it would be context like so

    calculate = function(self, card, context)
        if context.joker_main then
            return {
                message = localize('k_again_ex'),
                repetitions = 1,
                card = self
            }
        end
    end

but this one isn't retriggering it either

sonic cedar
# frosty dock what are you trying to check for?

the joker is supposed to gain chips each time a played hand triggers the boss blind, but if you ever complete a boss blind without triggering the effect at least once it resets the joker's chips. i'm trying to check for certain blinds because obviously certain blinds wont work with this so i need to be able to filter them out of the joker's check

worthy stirrup
#

Where would I begin with making a custom stake

frosty dock
#

the other way is to just chain equality checks with or but that's unreadable

sonic cedar
#

oh wow

#

and would i set this up inside of the end_of_round still?

frosty dock
#

inside whatever other context check you need it in

sonic cedar
#

ok got it

#

thanks you four

#

ill see if i can get it working

wintry solar
atomic edge
#

how do you destroy a joker?

viral stream
# wintry solar you want `context.retrigger_joker_check` iirc

i've tried using that one and it uses the one initial proc still

calculate = function(self, card, context)
      if context.retrigger_joker_check then
          return {
              message = localize('k_again_ex'),
              repetitions = 1,
              card = self
          }
      end
  end

sorry if i'm being stupid just started yesterday

wintry solar
#

oh have you enabled retriggers?

viral stream
#

how would i go about doing that because not as far as i know

sonic cedar
viral stream
atomic edge
#
    key = 'sock_and_buskin2',
    loc_txt = {
        name = 'Sock and Buskin',
        text = {
            "Retrigger all",
            "played {C:attention}face{} cards"
        }
    },
    config = { extra = { repetitions = 1 } },
    rarity = 2,
    atlas = 'ModdedVanilla',
    pos = { x = 4, y = 0 },
    cost = 6,
    calculate = function(self, card, context)
        -- Checks that the current cardarea is G.play, or the cards that have been played, then checks to see if it's time to check for repetition.
        -- The "not context.repetition_only" is there to keep it separate from seals.
        if context.cardarea == G.play and context.repetition and not context.repetition_only then
            -- context.other_card is something that's used when either context.individual or context.repetition is true
            -- It is each card 1 by 1, but in other cases, you'd need to iterate over the scoring hand to check which cards are there.
            if context.other_card:is_face() then
                return {
                    message = 'Again!',
                    repetitions = card.ability.extra.repetitions,
                    -- The card the repetitions are applying to is context.other_card
                    card = context.other_card
                }
            end
        end
    end
}```
sonic cedar
ionic timber
#

hey, sorry if this is a dumb question as I'm not the best dev around and just got into balatro modding today, but is there a function or API call to just prevent scoring from happening ? (for example when you play a card that is debuffed or trigger a blind boss that prevent you from scoring points)

sonic cedar
mellow marsh
#

where would i go to report a steamodded bug? i think i found an issue with how it implements negative playing cards that should probably be fixed

wintry solar
#

what's the issue

mellow marsh
#

gonna test it a bit more before i actually report it but i believe you get a permanent hand size increase if you turn a negative card into a negative card, via death

#

you definitely get a permanent hand size increase from Something. i encountered this during a run, and that's my best guess for what the cause was

viral stream
viral stream
atomic edge
wintry solar
#

I dont see where it's gone on the wiki

autumn geode
#

sorry to bother you but could I make use of your exodia code in my mod (another exodia how innovative, lol)

sonic cedar
#

are we fr right now

autumn geode
#

you need a second =

#

also you dont need to do that at all

#

just if ScoreReset then

sonic cedar
#

ohhh right = for assignment

autumn geode
#

yee if you are comparing then its ==

sonic cedar
#

anyone know what are we using since eval_this is deprecated?

cerulean rose
#

calculate_effect

sonic cedar
#

k thanks

autumn geode
#

thanks man appreciate it

#

oh quick one has it changed how we access the name of the joker now away from center.key because its crashing thinking center is nil @cerulean rose

cerulean rose
#

what does your code look like?

#

works fine for me

wooden badge
#

Anyone willing to help me out with this quick one? What's the easiest way to check if the G.jokers.cardsarray changes size (i.e. adding or removing a joker) - it feels like the answer is super easy and i'm being plum stupid

autumn geode
autumn geode
cerulean rose
wooden badge
#

sure but sell doesn't include destruction and purchase doesn't include random generation

#

or does it?

cerulean rose
#

it doesn't

wooden badge
#

no didn't think so

autumn geode
#

oh shit right

wooden badge
#

How would one do it under ANY circumstance

autumn geode
wooden badge
#

i feel like storing the array size and then comparing is something but that is fixed to only when calculate can be called right?

#

for example, taking a joker from a buffoon pack

autumn geode
#

you can do the one that is called every frame

wooden badge
#

that doesn't trigger calculate?

autumn geode
#

i think its just update?

wooden badge
#

oh fug

#

i forgot about that one

#

as in a context? or is it a whole 'nother function block

iron iron
#

so how do i make a texture pack exactly

autumn geode
wooden badge
#

ah and dt i assume is delta time

autumn geode
#

yeah

wooden badge
#

like how often it updates

autumn geode
#

well so if you want to seperate it from frames dt is difference between frames

#

so if you want to do it for example each second

faint yacht
#

Executes every frame.

autumn geode
#

but for you yeah each frame seems good

wooden badge
#

yeah what are the units of dt

#

just for info

#

like putting 1

#

1 what

autumn geode
#

1 second

wooden badge
#

second?

#

ok sick

autumn geode
#

afaik

#

thats the common practice anyway

wooden badge
#

so balatro running at 60fps esentially has dt default value at (1/60)

cerulean rose
autumn geode
#

oh right

wooden badge
#

just a debug/speed thing?

cerulean rose
#

to count real time

wooden badge
#

oh ok

faint yacht
#

G.TIMERS.REAL

tight thistle
#

is there a way to create custom colors to be used in the mod?

cerulean rose
#

yes

faint yacht
#

Just need more exact "contexts" to collect. 🐶

iron iron
restive bronze
#

How can I make a joker set the chips/mult to a value? I want to make a joker that moves part of the chips to mult

faint yacht
#

I have a Joker that "swaps" the values of the two around, but you could adapt it to what you need exactly.

restive bronze
#

ok thanks

tight thistle
gaunt thistle
#

Lilim have you been figuring things out?

tight thistle
#

regarding what?

gaunt thistle
#

With the weird event queue issues you were having.

tight thistle
#

yes! thanks to a bit of help we diagnosed the problem and i managed to come up with a solution for it

gaunt thistle
#

yay!!! that's great

tight thistle
wintry solar
faint yacht
#

¯_(ツ)_/¯

wintry solar
#

prints true then false when theres a matching card wtf game

#

oh I am big noob lul

faint yacht
#

...oddly enough, works well enough. Though I should probably swap to G.STATE comparisons.

autumn geode
woeful tundra
#

when we use add_joker to give a joker at the stat of a run, what do we put as the string for the joker? I thought it would be the key for the joker, but that doesnt seem to be the case...

#

trying to give myself one of my own custom jokers

autumn geode
#

Make sure you prefix your key with j_PREFIX where prefix is the mod prefix you outlined

#

So like j_mymod_myjoker

woeful tundra
#

is the prefix set in the steammodded header?

autumn geode
#

Yeah

sonic cedar
#

i have returned much later with a dilemma
why isnt this working at all? it isn't even printing

if context.debuffed_hand then
            if G.GAME.blind.triggered then
                card.ability.extra.chips = card.ability.extra.chips + card.ability.extra.chip_gain
                ScoreReset = false
                return {
                    message = 'Silver!',
                    colour = G.C.CHIPS,
                    card = card
                }
            end
        end
        if context.end_of_round then
            local blind_keys = {
                bl_window = true,
                bl_head = true,
                bl_club = true,
                bl_goad = true,
                bl_plant = true,
                bl_tooth = true,
                bl_pillar = true,
                bl_flint = true,
                bl_eye = true,
                bl_mouth = true,
                bl_psychic = true,
                bl_arm = true,
                bl_ox = true,
                bl_final_leaf = true
            }  
            if blind_keys[G.GAME.blind.config.blind.key] then
                if ScoreReset then
                    print(ScoreReset)
                    return {
                        message = 'Oops!',
                        card = card
                    }
                end  
            else
                print(ScoreReset)
                return {
                    message = 'Greedy!',
                    card = card
                }
            end
            ScoreReset = false
        end
    end
}
native cargo
#

Wouldn't sendDebugMessage() be better to use than print?

sonic cedar
#

let me

#

try that

native cargo
#

I'm not entirely sure though

wintry solar
#

nah print is ifne

native cargo
#

Okay, then I defintely was having a function not run when I tried it. I wasn't entirely sure if print would output to the console or if love hijacks the print command.

sonic cedar
#

well if print is fine ill leave it

#

but it still just wont give chips

#

let alone reset it

wintry solar
#

you don't ahve anything here to give chips

native cargo
#

Maybe you're function isn't being called.

sonic cedar
wintry solar
#

oh you mean gain chips

sonic cedar
#

yessorry

wintry solar
#

I don't think you need the triggered check

sonic cedar
#

wait really?

#

but then how will it know if the boss blind was triggered?

wintry solar
#

because debuffed_hand will only be called when it is triggered

sonic cedar
#

oh my god yoiure right

#

fixed stuff up gonna see if it works now

#

actually wait what about the prints

#

why dont those show up in anything?

ionic timber
#

hey, it seems that for some reason I never manage to execute any code in context.main_scoring , it is actually supposed to trigger when playing a hand, right ? (and also, does it work in a deck/SMODS.back ?)
Also, I've been wondering how to flag the played hand as debuffed ? I know that G.GAME.blind.debuff_hand() exist but it doesn't seem to work, or I misunderstood it's usage (seems to exist to return true if the current hand is debuffed) anyway, any help is greatly appreciated

tall wharf
ionic timber
#

nah not really, it's just that my deck's gimmick is that I can only play one hand type and any other one should be debuffed , so I guess not

merry raven
#

What's the difference between context.after and not context.before?

woeful tundra
#
                {
                    message = "+2",
                    colour = G.C.yellow,
                    card = joker
                }```  how do I make the joker shake and display the message, this currently has the message above the card, and no shake
foggy carbon
#

do you guys consider selling an Egg to be "consuming" a food joker?

foggy carbon
foggy carbon
sonic cedar
#

good question

foggy carbon
#

lag

cyan dune
#

Wow, a pocket 7

sonic cedar
tall wharf
#

i think i should add custom sleeves for my mod

sonic cedar
#

real?

tall wharf
#

letter deck sleeve

sonic cedar
#

make it a fridge

#

with letter magnets

sonic cedar
tall wharf
sonic cedar
tall wharf
sonic cedar
#

like uh

#

let me just

#

ok so here's the sleeve right

tall wharf
#

so just a fridge?

sonic cedar
tall wharf
#

ah ok

sonic cedar
#

is this good idea

#

cause im just spitballing

tall wharf
#

i already have deck design

sonic cedar
#

wait did you mean

#

card sleeves

#

i thought you meant like the deck sleeve

#

like each card has its own sleeve?

tall wharf
#

i already have the deck back texture designed

sonic cedar
#

so then what do you mean by sleeve?

#

or do you literally mean you havent added it yet

foggy carbon
# sonic cedar card sleeves

card sleeves is the name of a mod that allows you to combine two decks' powers, by applying a sleeve based on one deck to another deck

sonic cedar
#

i know this
i own it--
i get it now

#

i may be stupid

native cargo
#

Is there documentation on the Balatro -> Lovely -> SMODS -> MOD Lifecycle? I'm wondering when our code gets injected and when certain things are ran.

tall wharf
#

anyway

#

if anyone wants to do cross mod content feel free to tell me

#

fuck it im making people spell pokemon names

foggy carbon
native cargo
#

Alright that much I was figuring. I was wondering how overriding methods in your code worked and what not. I've downloaded quite a few mods to see how things were being done, and other than the fact quite a few of them used 0.98 SMODS code, which made learning how to use the version 1 a little painful. I don't fully understand why we're not using lovely to just patch the code instead of overwriting certain methods. I'm not sure if it was bad practice or bad for the system, etc.

tight thistle
modern kindle
#

with how the game is scoring things left to right, is it possible for me to have the scoring iterate left to right, then retrigger them in right to left?

tall wharf
#

so i guess i am not original huh

nova finch
#

I'm trying to make a joker that triggers for a random suit each round like castle and ancient joker
I have code for it that's heavily copied off of ancient joker and it works but I don't want it to use ancient joker's randomization
however when I try to make the suit var its own variable it crashes and says it's a nil value

tall wharf
modern kindle
ivory coral
#

hi chat, how do i go about making a joker that retriggers other jokers? i tried copying some code from a joker that retriggers played cards but it doesnt work (does nothing), heres what ive got atm

    calculate = function(self, card, context)
        --[[ doesn't work, bruh
        if context.repetition and context.joker_main then
            return {
                repetitions = card.ability.extra.repetitions,
                message = localize('k_again_ex'),
                card = card
            }
        end
        ]]```
i also tried pasting in some code from another mod but that just made it crash sadly
mystic river
#

joker repetitions need to be enabled in your mod, for one thing

ivory coral
#

how do i go about doing that

faint yacht
#
SMODS.current_mod.optional_features = function()
    return {
        retrigger_joker = true
    }
end
mystic river
#

it also happens in context.retrigger_joker_check, not context.repetition

ivory coral
tall wharf
#

do you like this art

mystic river
#

graphic design is my passion

last sentinel
#

Anyone have any ideas as to why, when i split a lua file of multiple new challenges into seperate lua files for each challenge, now only one of them shows up in the menu?

native cargo
#

It has that certain je ne sais quoi

faint yacht
last sentinel
#

ahh duhdoy

faint yacht
#

SMODS.load_file("file.lua")()

tall wharf
#

grafik desing passion

sonic cedar
tall wharf
#

I'm working on custom boss blinds

ivory coral
# mystic river it also happens in context.retrigger_joker_check, not context.repetition

ok ive made this (and enabled joker reps) but it still doesnt do anything, am i still missing something

    calculate = function(self, card, context)
        if context.joker_main and context.retrigger_joker_check and context.other_card ~= card then
            return {
                repetitions = card.ability.extra.repetitions,
                message = localize('k_again_ex'),
                card = card
            }
        end
    end```
at least it doesnt crash though which is a good sign
sonic cedar
tall wharf
#

you can already try a beta version if you want

sonic cedar
#

noted noted

#

i mean it's late now so my brain isnt functional enough for balatro but

#

ill keep it in mind

tall wharf
merry raven
#

G.play.cards accounts for both played but unscored and scored cards right?

wooden nexus
tall wharf
wooden nexus
#

2/4

tall wharf
#

why are you adding a new suit

wooden nexus
#

because it's for a specific deck

wooden nexus
last sentinel
# faint yacht `SMODS.load_file("file.lua")()`

Stillll seem to be having the same issue...

    SMODS.load_file("Copycat.lua")()
    SMODS.load_file("Golden_Bite.lua")()
    SMODS.load_file("Mod_Madness.lua")()
    SMODS.load_file("Stargazer.lua")()
    SMODS.load_file("Cost_of_Business.lua")()
    SMODS.load_file("Wild_Side.lua")()

    SMODS.init_localization()
end

and then i removed the smods.init.etr from the other lua files... still just Copycat that shows up in the challenges list

wooden nexus
#

well ain't that a bit annoying

#

If you had them @ replied before, why do it again? lol

ivory coral
# faint yacht ```lua SMODS.current_mod.optional_features = function() return { ret...

as it happens its your mod im currently dissecting to try and make this work, any ideas on why card.ability.extra.retriggers in if context.retrigger_joker_check and not context.retrigger_joker and context.other_card ~= card then if card.ability.extra.retriggers < 1 then card.ability.extra.retriggers = 1 end return { message = localize('k_again_ex'), repetitions = card.ability.extra.repetitions, card = card, } end would be nil?
at least thats what i think the crash log is saying ("attempt to compare nil with number")

lethal mural
#

how would i make a joker destroy a random card

#

i know how to destroy a selected card but not a random one

faint yacht
faint yacht
lethal mural
#

so i want to have it when the round starts destroy 1 random card in hand and gain 5 mult

foggy carbon
#

(I assume Ali means whether you want it to be a random card from the played hand, from the deck, etc.)

faint yacht
#

Well, you can pick a random card currently held by local rndcard = pseudorandom_element(G.hand.cards, pseudoseed('optionalseedhere'))... then rndcard:start_dissolve(). Though, at beginning of a round... that's context.first_hand_drawn.

lethal mural
#

ok so i had it mostly right i think

#

i had context.full_hand instead of G.hand.cards and it did not like that

faint yacht
#

What about wrapping that card destruction in an event?

lethal mural
#

nop

faint yacht
#

Does it crash right after selecting the blind or when the hand is fully drawn?

lethal mural
#

right after selecting the blind

#

it seems the issue is that its trying to remove a card before the card even exists

tacit flicker
ivory coral
native cargo
#

I was able to get somethings working... until I wasn't. Working on "sacrificing" cards. I have the methods hooked up but the buttons are behind the card. How should I go apart fixing it?

wooden nexus
faint yacht
faint yacht
tall wharf
#

fixed my mod ❤️

#

i fucked up punctuations

ivory coral
tall wharf
wooden nexus
#

They're playing cards

faint yacht
tall wharf
lethal mural
#

ok so

#

uh

#

i got it to remove a card but for some reason it removes a card EVERY FRAME and crashes when it hits 0

wooden nexus
tall wharf
#

cursed

ivory coral
lethal mural
#

wait

#

i see the problem

#

i forgot the return statement

#

ok now it should work i think

#

basically i just looked at how Certificate adds a card and reinterpreted it for card removal instead

#

IT WORKS

tall wharf
lethal mural
#

trying to be balanced

ivory coral
# faint yacht That'd explain it. The check is for `config = { extra = { retriggers = 1 } }`.

ok im still getting the same crash

    calculate = function(self, card, context)
        if context.retrigger_joker_check and not context.retrigger_joker and context.other_card ~= card then
            if card.ability.extra.retriggers < 1 then card.ability.extra.retriggers = 1 end
            return {
                message = localize('k_again_ex'),
                repetitions = card.ability.extra.retriggers,
                card = card,
            }
        end
    end```
its still trying to compare nil with number
slender island
#

Is there a console so i can test out my mods?

lethal mural
#

DebugPlus

slender island
#

Thanks

tall wharf
#

yea debugplus

tall wharf
#

yea

#

i found out that each card has its own instance of stuff

ivory coral
foggy carbon
foggy carbon
#

do you have a dictionary built into your mod?

tall wharf
#

i can add any words I want to it

tepid crow
tall wharf
tepid crow
#

wooo

tall wharf
#

my mod should be compatible with cryptid

#

i tried to make my patches to be not invasive as possible

#

man i love being creative

merry raven
#

Where can I find Jimbo's particles?

rough furnace
#

they are defined in card_character.lua I belive

merry raven
#

Wonder if I could slap it on one of my playing cards

#

Found this

#

Can Editions or Enhancements take in draw = function(self, card, layer)

ionic verge
#

would this be the way to have a probability that could increase based off of odds_mult?

#

cool thx

slender island
#

Why does mobile modding us forbidden?

ionic verge
#

any ideas?

#

(for context, i have this line always setting the second joker to negative)

merry raven
ionic verge
#

yep

#

was really fun to work out

faint yacht
#

One frame.

tall wharf
#

that dog is so me

#

jk

tight thistle
#

hello! i have a question, as usual
when a card has an event attached to it, is there a way for that event to call for another card to do something, or are events exclusively tied to the card they come from?

faint yacht
#

You should be able to call other cards.

foggy carbon
#

where is the documentation about take_ownership? I'm trying to take control of Ramen to fix the bug I found (and I did leave a comment in #1237805810533531650 about it), but when I write the calculate function it keeps telling me things do not exist when they work perfectly fine for jokers I flat out created.

tight thistle
faint yacht
#

If event is spawned from calculate of a Joker and what not and context.other_card exists, you can reference it.

tight thistle
#

how would i specify the card that i want to be used in the event?

#

(also assuming that context.other_card is used in the same place that card: would be?)

faint yacht
#

As long as it points to a valid card from where the event is added, a local variable within the event or outside of it could reference the desired card. If context is available to the event at time of addition, when context.other_card becomes a valid card reference, that can be used too.

tight thistle
#

sorry, im a little slow so i want to make sure i understand everything, so at the very start of the event, i define another card

faint yacht
#

As long as you're not overriding the original reference.

tight thistle
#

the original reference?

faint yacht
#

Is this for destruction of a card or something?

tight thistle
#

i want to try to add speech boxes to a second card, then the card is destroyed, yes

faint yacht
#

So the "source" card and the "target" card.

tight thistle
#

yeah! what i want to happen is
ive coded the "source" card to stop the event queue and play a series of speech boxes
when all those speech boxes are over, i want the "target" card to also play a set of speech bubbles before destroying itself

faint yacht
#

As long as you provide the "pointer" to the respective cards when creating said events, be it a local of something or context.other_card or w/e, you should be fine.

tight thistle
#

how would i go about using a local or context.other_card? apologies for making you explain everything

faint yacht
#
calculate = function(self, card, context)
  -- card, context.other_card is valid here.
  local sourcecard, targetcard = card, context.other_card
  -- sourcecard and targetcard are also valid after this point, referencing the original card and context.other_card respectively
end,
tight thistle
#

right, so would this then call for the "Erlking" card?

faint yacht
#

There can be duplicates of that Joker, keep that in mind.

tight thistle
#

oh shit yeah

faint yacht
#

You can iterate over the held Jokers to find the exact one you need by iterating over G.jokers.cards and then storing the desired Joker "card" into a variable elsewhere, like an another local, but before the "event" code.

tall wharf
#

why type 0

#

wait my question doesn't make sense

#

why does it show o when i type 0

faint yacht
tall wharf
tight thistle
faint yacht
#

More of "referencing" the cards in said events. The same iteration could be done for finding the exact j_jcbb_heathcliff Joker card, but you should use a different local for it.

tight thistle
#

right, so that the whole event only happens once instead of applying to, in theory, every single copy of heathcliff you have, yeah?

faint yacht
#

To the exact pair of Erlking and Heathcliff Jokers, respectively.

tight thistle
#

yeah! yeah thats perfect

faint yacht
#

I barely use events myself anyway, but what Lua knowledge I do have tells me that it should happen like so. 🦐

native cargo
#

Figured the bug out, apparently the sizing was wrong, UI Modding is kinda hard :/

tall wharf
#

oh gosh

tall wharf
native cargo
#

Lmao, I have an obsession with Cthulhu Mythos lmao. I can see how the blurry screenshot makes it sorta look like that at a glance

tall wharf
tight thistle
faint yacht
#

card, context.other_card are pointers. So is sourcecard in the other example when it is set to a Joker.

tight thistle
#

ah, cause i tried this but it doesnt seem to be working, so i think im doing something wrong here

faint yacht
#

You're not showing the full "context" of where the event is created.

tight thistle
#

oh sorry, do you need to see the full code?

faint yacht
#

Best to show the full context, yeah.

tight thistle
faint yacht
#

Which Joker is this being called from?

tall wharf
#

I guess I am testing UI in config now

tight thistle
faint yacht
#

...not that I can really do much beyond this point, I barely know much about event ordering and such. 🫠

tight thistle
#

thats fine, no need to push yourself! i greatly appreciate the help youve given me up until this point

merry raven
#
draw = function(self, card, layer)
        local voidParticles = {}
        for i = 1, 2 do
            voidParticles[i] = Particles(1, 1, 0, 0, {
                timer = 0.05,
                scale = 0.3 * i,
                initialize = true,
                lifespan = 1,
                speed = 4 * i,
                attach = self,
                padding = -1,
                colours = {G.C.WHITE, lighten(G.C.PURPLE, 0.1)},
                fill = true,
            })
        end
        G.E_MANAGER:add_event(Event({
            trigger = 'after',
            delay = 0.1,
            func = function ()
                for i = 1, #voidParticles do
                    voidParticles[i].fade_alpha = 0
                    voidParticles[i]:fade(0.3, 1)
                end
                return true
            end
        }))
    end

Trying to make a particle effect emitting from a special Edition, but attach = self is giving me issues, the error is attempt to index field "major" (a nil value)

Omitting it will just make the card itself and the particles spawn on the top left corner of the screen, any insights?

foggy carbon
#

how would I get a joker to make an exact copy of itself

stray warren
#

I'd imagine just look at what Invisible Joker does and go from there

maiden phoenix
#

If you want an exact copy, you should check invis joker like OW said, especially copy_card

woeful tundra
#

finally finished my first joker with art! Im not the best when it comes to art lol

wintry brook
merry raven
# wintry brook The attach is where the particles spawn, attached to a specific center. So attac...

I managed to figure it out but there are too many particles, what parameters are there to:

  • reduce the frequency to be as sparse as Jimbo's particles
  • move the particles behind the card
  • properly clean up particles so that it doesn't lag the game over time

This is my current iteration:

draw = function(self, card, layer)
        local voidParticles = {}
        for i = 1, 2 do
            local particle = Particles(card.T.x, card.T.y, card.T.w, card.T.h, {
                timer = 0.3,
                scale = 0.3,
                initialize = true,
                lifespan = 2,
                speed = 1.2,
                attach = card,
                padding = -1,
                colours = {G.C.WHITE, lighten(G.C.PURPLE, 0.1)},
                fill = true,
                max = 10
            })
            voidParticles[i] = particle
        end
        
        G.E_MANAGER:add_event(Event({
            trigger = 'after',
            delay = 0.1,
            func = function ()
                for i = 1, #voidParticles do
                    voidParticles[i].fade_alpha = 0
                    voidParticles[i]:fade(0.3, 1)
                end
                return true
            end
        }))
    end
wintry brook
#

since you put it in the draw function it’s making new particles every frame

#

I’d recommend making particles once when the card is given the edition, but I’m not sure if the game would remove them at some point

merry raven
#

I see

#

Oh and it's uber delayed as well, it seems like there's a limit on how long these particles can be emitted before disappearing entirely

merry raven
random sleet
#

by doing it once and leaving it

merry raven
#

I see

#

Hang on lemme figure it out

#

That kinda makes sense because if I switch the Edition with the particles away, the particles will still remain

wintry solar
#

You have to remove particles as well iirc

merry raven
#

I'm using this

G.E_MANAGER:add_event(Event({
            trigger = 'after',
            delay = 0.1,
            func = function ()
                for i = 1, #voidParticles do
                    voidParticles[i].fade_alpha = 0
                    voidParticles[i]:fade(0.3, 1)
                end
                return true
            end
        }))

But not sure if it's actually removing particles in the backend

#

And also wouldn't that mean that particles would be rendered differently between viewing it in Collections vs obtaining it through Booster Packs

wintry brook
#

particles automatically remove themself when their scale goes below 0

#

but the particle spawner itself never goes away i dont think

#

unless you call remove on it

merry raven
#

Hm

#

Sort of at an impasse here

merry raven
wintry brook
#

i have this to make a card look like its bleeding, it is continuous but i remove them myself after a couple seconds

#

its in the update function and it makes 1 particle spawner

merry raven
#

I see

#

Where is it defined, calculate function or something?

wintry brook
#

i havent tested if it works properly with anything other than being the in the hand

wintry brook
#

since its part of an enhancement

merry raven
#

Alright I'll give it a go

wintry brook
#

probably not the best implementation but i dont think balatro has a start function like unity does

merry raven
#

Is the removal defined anywhere?

wintry brook
#

the card that made the card bleed runs fade then remove on the card's particles

merry raven
#

alrighty then

#

Hmm doesn't seem to render any particles in the holding hand, but does so in collections (although it does keep ramping up)

wintry brook
#

you have to set card.config.particles to something or else it will keep making them

#

you could set it to true after all the particles are made

merry raven
#

Ayy cheers but it's a bit shite
The pattern doesn't move when rotating the card, only the shininess
Also it just seems to fade out over time to become a flat purple

tall wharf
#

😭

#

the spinny gone wtf

merry raven
# wintry brook you have to set card.config.particles to something or else it will keep making t...
config = {
        particles = false,
    },
....
update = function(self, card, layer)
        if not self.config.particles then
            voidParticles = {}
            for i = 1, 2 do
                voidParticles[i] = Particles(0, 0, 0, 0, {
                    timer = 0.015,
                    max = 1,
                    scale = 0.3 * i,
                    initialize = true,
                    lifespan = 1,
                    speed = 1 * i,
                    attach = card,
                    padding = -1,
                    colours = {G.C.WHITE, lighten(G.C.PURPLE, 0.1)},
                    fill = true,
                })
                voidParticles[i].fade_alpha = 0
                voidParticles[i]:fade(0.3, 1)
            end
            self.config.particles = true
        end
    end

Like this? If so, the particles aren't spawning at all, not in collections nor in hand (although it is spawned with the debug tool instead of legitimately obtaining it)

wintry brook
#

i think max = 1 would only make 1 particle spawn

#

also, running fade will permanently make the particles invisible

snow valve
#

How do you set a joker to bounce in alert like DNA, trading card, or an invisible joker that's ready to sell?

#

Is that code handled in the ui files?

merry raven
#

juice_card_until(card, eval, true)

wintry brook
#

you'd use juice_card_until

#

where eval is a function that when it returns true, it stops juicing the card

merry raven
#

Oh hey it worked!
But a small nitpick, how do you set the particles to be at the back of the card

#

And a couple more problems

  • It doesn't render when it's in the holding hand, regardless of how I obtained this Edition
  • It does render in Collections, but only the first time I opened it, after that the particles stop rendering, I assume that it's because I flipped the particles to true and then left it there without resetting it

@wintry brook Any insights on the first two issues?

snow valve
#

Thanks!

slender island
#

WHY THE FUCK IS THERE 2 SAME JOKERS

wintry brook
merry raven
#

What's the context for checking whether the card is visible or not

wintry brook
#

z-ordering stuff isnt native to love2d i remember, so im not sure how to put it behind the card

wintry brook
#

im not sure how exactly it works so it may be finnicky but it seems to do the trick for the most part

merry raven
#

gotcha

#

But oof kinda a shame that we can't configure z-ordering, I wonder how they rendered Jimbo to place the particles behind him

#

My theory is that it rendered the particles first before the actual Jimbo card

wintry brook
#

ive been trying to figure that out myself, i think the game just makes sprites in order of when they should be rendered. so stuff in the back first then stuff on top later

#

i know there is a drawhash, but i feel like we may be over complicating things if we edit the draw hash manually lol

merry raven
#

Oh man

#

I don't even know what drawhashes are

foggy carbon
#

how do I delay an event?

What I want to do is have my joker destroy itself, then RNG either destroy one of your other jokers to clone itself back into existence with double the old xMult, or buff another joker. I'm currently working on the first scenario, and right now, the clone appears even before the original joker destroys itself.

wintry solar
#

I don’t think jimbos particles are attached to the jumbo card

#

There’s like a dummy object behind it from what I can tell

wintry brook
merry raven
wintry solar
#

At least that’s how I understand what you screenshot

merry raven
#

Also using a particle boolean is also kinda iffy, once it's set to true, any other times of seeing that card with particles again, the particles won't render

Like if I open my Collections on the first startup, sure it will render, but any other time like opening it up the second time or more, or subsequently going into gameplay to get the card, the particles don't spawn

#

All I have currently hmm

wintry brook
#

it works for me because if the particles ever get destroyed, self.config.particles gets set to nil

#

but since you have multiple sets of particles you may need to do that a little differently

merry raven
wintry brook
#

i set the variable itself to the particles, which means if the particles are ever destroyed or whatever they're attached to is destroyed, the variable sets itself to nil

tall wharf
#

wtf how do i

merry raven
#

Mmm I'll try it out later, thanks

crisp coral
crisp coral
#

that sounds wrong

tall wharf
#

😭

wintry brook
merry raven
wintry brook
#

children.particles instead

#

works the exact same, just more proper

merry raven
#

Aight

crisp coral
tall wharf
#
        card.children.center:draw_shader('tint', 0, card.ARGS.send_to_shader)
#

i might've fucked up

#
SMODS.Shader{
    key = "tint",
    path = "tint.fs",
}
crisp coral
#

wait what version of balatro again

#

😭

tall wharf
#

the what 😭

crisp coral
#

why is it 1.0.0b-DEVELOPMENT

tall wharf
#

😭 idk maybe it's the debug mod

crisp coral
#

Saturn moment????

tall wharf
#

anyhow idk if i loaded the shader correctly

#

i am not drawing from edition

#

i am drawing from card:draw

crisp coral
#

shrug

modern kindle
#

im trying to make it so if a king or queen is destroyed then it creates a copy of itself but i seem to be running into a crash here, am i dong something particularly wrong? edit; im stoopid, forgor mod prefix 💀

foggy carbon
#

testing extreme conditions

frosty dock
#

whoops I pinged

#

🥴

crisp coral
#

according to our legally binding contract, the entire smods organization is now mine because aure pinged me

modern kindle
#

what will you do with this newfound power

frosty dock
#

when did I sign that 🤔

crisp coral
#

real contract right here

frosty dock
#

totally real

#

Aure is my legal name btw

fallen pelican
#

I got my first joker working 💜 💜

crisp coral
frosty dock
#

not acting like my legal name isn't public information

tall wharf
wintry solar
#

your shader code is wrong with this error

tall wharf
#

at least it's not trying to index nil

wintry solar
#

the index nil was because you missed your mod prefix off the shader name

tall wharf
#

oh wtf

#

i thought it did not need that

crisp coral
#

💥

merry raven
#

Once you're done with fixing it I want to see your shader lmao

tall wharf
#

i just need a tint shader so i can have wordle letter fx

last sentinel
#

If im using load_file to navigate into a folder is it just SMODS.load_file('folder/file.lua')() yes it is

tall wharf
#

is this how i pass data to the shader?

iron iron
#

how do i add a new language into the game

#

are there any mods that do this currently?

sudden meadow
#

If I wanted to add another tab here, after challenges, how could I do so?

#

I want to add a new game mode, but I don't really like how VitualizedMultiplayer mod did it

woeful tundra
#

how do we get rid o0f a joker, like the banans that expire? im trying start_dissolve, but it keeps crashing

vagrant niche
#

Hey guys I would like to get into modding the game, where can I find documentation?

woeful tundra
vagrant niche
#

tybalatroheart

sudden meadow
woeful tundra
#

Im trying to make one of mine expire, but when it goes to remove the joker it crashes

#

I dont need to take ownersdhip, just used the bananas as an example

#

figured it out, I was trying card.start_dissolve(nil, true) but its supposed to be card:start_dissolve(nil,true)

sudden meadow
#

yeah you can also do card.start_dissolve(self, nil, true)

#

the : just puts self for you

merry raven
# crisp coral dont attach particles to config 😭 attach it to children
update = function(self, card, layer)
        if card.states.visible and not card.children.particles then
            voidParticles = {}
            for i = 1, 3 do
                voidParticles[i] = Particles(1, 1, 0, 0, {
                    timer = 0.03,
                    scale = 0.3,
                    speed = 1.2,
                    lifespan = 2,
                    attach = card,
                    colours = {G.C.PURPLE, lighten(G.C.PURPLE, 0.15), darken(G.C.PURPLE, 0.2)},
                    fill = true
                })
            end
        end
    end

So is it like this? config is currently empty

crisp coral
#

uhhh no

merry raven
#

Ogh

crisp coral
#

why do you want 3 sets of particles anyway

merry raven
#

3 colours

crisp coral
#
update = function(self, card, layer)
        if card.states.visible and not card.children.particles then
            card.children.particles = Particles(1, 1, 0, 0, {
                    timer = 0.03,
                    scale = 0.3,
                    speed = 1.2,
                    lifespan = 2,
                    attach = card,
                    colours = {G.C.PURPLE, lighten(G.C.PURPLE, 0.15), darken(G.C.PURPLE, 0.2)},
                    fill = true
                })
        end
end
merry raven
#

At least, it's how Gnar Gooba did it

crisp coral
#

colours already lets you use multiple colors

merry raven
#

Hmmm it is nicely rendered in Collections, but not in gameplay

#

But granted, the Edition was spawned using the debug mod

tall wharf
#

oh god wtf

crisp coral
#

if you do eval dp.hovered.states.visible what does it say

tall wharf
#

oh my god fuck off

merry raven
#

You need to add tint somewhere in your vec4 effect function, even if it's useless

merry raven
# tall wharf oh my god fuck off

Here's how I did mine:
float energy = pow(void_pattern + waves, 2.0) * voidwalker.x;
Replace voidwalker with your shader's name

merry raven
tall wharf
#

@merry raven i think i outsmarted it

merry raven
#

guh

#

Aight time to see how the shader looks

tall wharf
#

man i just want to tint card green when the letter is correct 😭

crisp coral
#

actually do editions even call update func

#

@merry raven use on_apply and on_load 😭

merry raven
#

Ogh

crisp coral
#

and :remove in on_remove

merry raven
#

Where do I put those? Are they a part of the Particles function

crisp coral
#

no, SMODS.Edition

#

hi aure's cat

merry raven
#

Oooooooooooooooooh

#

Hang on

crisp coral
#

on_apply doesnt return

#

and you can probably outright remove the if statement

merry raven
#

Oh right it returns void

#

And for on_remove I use card.children.particles:remove()?

crisp coral
#

i believe so

merry raven
#

Yippee

crisp coral
#

yahoo

merry raven
#

How crazy can I go with particles

crisp coral
#

and now:

  • copy that to on_load
  • change particles to another unique variable name incase multiple mods use it
crisp coral
merry raven
#

Does it have uhhh

modern kindle
#

gonna need about 1k more particles on screen man

merry raven
#

Particle spread direction

#

This effect spreads out in all directions, but what if I want to make one that's just like a waterfall

tall wharf
#

@merry raven ykw

#

i give up

#

good bye shader

merry raven
#

Aw

merry raven
# crisp coral idts

How much hell would I get myself into if I were to look into the roots of particle movement rendering

woeful tundra
#

is there a way to make the gtame play a custom sound when it plays the other joker effects, like when it shakes? have it setu how I thought it would work, but it plays the sound right when the cards are played instead, but the joker shakes at the expected time

crisp coral
#

i'd advise against it

merry raven
#

Man

crisp coral
woeful tundra
#

that worked! thank you!

random sleet
# merry raven Yippee

id love to do a similar effect, if it's fine with you would i be able to peruse your code for this in full? :3?

merry raven
#

The swirl or the particles

random sleet
#

the particles

merry raven
# random sleet the particles
SMODS.Edition({
    key = "voidwalker",
    shader = "voidwalker",
    loc_txt = {
        name = "Voidwalker",
        label = "Voidwalker",
        text = {
            "Nothing yet!"
        }
    },
    disable_shadow = false,
    disable_base_shader = false,
    on_apply = function(card)
        card.children.particles_voidwalker = Particles(1, 1, 0, 0, {
            timer = 0.03,
            scale = 0.3,
            speed = 1.2,
            lifespan = 2,
            attach = card,
            colours = {G.C.PURPLE, lighten(G.C.PURPLE, 0.15), darken(G.C.PURPLE, 0.2)},
            fill = true
        })
    end,
    on_load = function(card)
        card.children.particles_voidwalker = Particles(1, 1, 0, 0, {
            timer = 0.03,
            scale = 0.3,
            speed = 1.2,
            lifespan = 2,
            attach = card,
            colours = {G.C.PURPLE, lighten(G.C.PURPLE, 0.15), darken(G.C.PURPLE, 0.2)},
            fill = true
        })
    end,
    on_remove = function(card)
        card.children.particles_voidwalker:remove()
    end,
    discovered = true,
    unlocked = true,
    config = {},
    in_shop = true,
    weight = 3,
    apply_to_float = true,
    loc_vars = function(self)
        return { vars = {} }
    end
})
random sleet
#

bet

merry raven
#

Replace voidwalker with your own particle name, just to be safe so that it doesn't conflict with other mods

random sleet
#

card particles!

#

cardicles!

merry raven
#

I think you can slap it on any card type, Jokers, Enhancements, Editions, etc

random sleet
#

yea thats what i was thinkin

crisp coral
#

particles are super fun to mess* around with

random sleet
#

this looks expansible

merry raven
#

I only wish for proper particle direction

random sleet
#

they just kinda aimlessly drift by default right

merry raven
#

Yeah

#

Like Jimbo's particles

random sleet
#

yeeeeeer

merry raven
#

But also another one that I wish it has is z-ordering

random sleet
#

oh yeah its forced on top eh

tall wharf
#

fuck the shader

merry raven
#

Rn the particles render on top of the card instead of beneath it, the way to mitigate it is probably through a very convoluted way

tall wharf
#

im doing this

merry raven
crisp coral
#

nay

merry raven
#

:(

solar eagle
#

all cards in deck is G.deck.cards right?

tall wharf
#

ye i think

solar eagle
#

damn maybe ive fucked up my blind in_pool

tall wharf
#

how do i add condition to the ui nodes

#

is it even possible without patching the whole thing out

frosty dock
merry raven
# crisp coral nay

Hang on, the draw function for Editions, what's the layer parameter for? In the game's source code, there are layers for the card itself and the card's shadow, maybe I can somehow... cram the particles in between them?

frosty dock
#

G.deck has only the cards in your deck pile, that's the ones you haven't drawn yet

solar eagle
#

ahh

frosty dock
#

G.playing_cards is a list of all cards in your full deck

frosty dock
tall wharf
#

oh right

#

thanks for the hint

merry raven
#

WAIT

#

I think I somehow figured out how to render particle effects behind cards??

tall wharf
#

why does jimbo look so funny with this effect

merry raven
#

Grape jimbo

wild patrol
#

is it possible to select a joker to copy?

#

as like a tarot ability

#

instead of being random

wintry solar
#

I think changing which part of G.I the particles go in would affect the z ordering

#

It’s hard coded right now but could easily be adjusted to take a variable too

merry raven
#

Where do I find this G.I

viral mesa
wintry solar
#

This bit in particular

#

I believe you could change it to a different one and it would be layered differently

merry raven
#

So I need to find a way to change G.I.MOVEABLE? Is it an int? Or something?

wintry solar
#

Just patch this line in particular to be something like table.insert(config.layer or G.I.MOVEABLE, self)

#

Then in the particle definition you should be able to do layer = G.I.whateverthekeyisIdontremember

#

Maybe NODE?

merry raven
#

Patching adds lines of code doesn't it, how do I replace a line with a patch

merry raven
wintry solar
#

Set the type of patch to at rather than before/after

wild patrol
#

is there an smod equivalent to copy_card? @frosty dock

runic pecan
#

Can I put eval_card(G.jokers.cards[i], {cardarea = G.jokers, remove_playing_cards = true, removed = {context.other_card,}}) after context.other_card:start_dissolve(nil, true) in my joker's calculate function in order to tell other jokers "Hey, I just destroyed this card, um, in case anyone wants to know." since "Played cards that did not score" isn't a case vanilla game has prepared to add into context.removed?

tall wharf
frosty dock
wild patrol
#

Wanted to make a joker card that can just copy another

frosty dock
frosty dock
wild patrol
#

cause I doubt it's just copy_card(set = G.jokers.cards, key_append = 'randomteleport')

frosty dock
wintry solar
merry raven
#

Oh I keep forgetting that it's not after

wild patrol
wintry solar
#

That’s not how to use copy card

merry raven
wild patrol
merry raven
#

The key is voidwalker for the Edition, fm_voidwalker with prefix

frosty dock
#

it just takes a card as input

#

like G.jokers.cards[1]

frosty dock
#

or pseudorandom_element(G.jokers.cards, pseudoseed('bleh'))

wintry solar
#

You can also add a 2nd card to copy it on to if needed

wild patrol
#

so I would basically have to rip this line from the vanilla game and rework it?

            local card = copy_card(chosen_joker, nil, nil, nil, chosen_joker.edition and chosen_joker.edition.negative)
            card:start_materialize()
            card:add_to_deck()
            if card.edition and card.edition.negative then
                card:set_edition(nil, true)
            end
            G.jokers:emplace(card)
            return true end }))```
merry raven
#

Guhh I'm still very confused

#

Where do I put this G.I.NODE, the patch or my Edition with the particles

wintry solar
#

Oh, where 😂 it’s in the particle table

tall wharf
frosty dock
#

that's just because the same expects blinds to have a name for some reason, so smods autofills name with the key

#

it's not generally true that this is the key

tall wharf
#

ah alright

#

so i just do blind.key

merry raven
frosty dock
#

G.GAME.blind.config.blind.key

tall wharf
#

oh

#

thanks yet again

violet void
#

I need a little help here in having my custom collection tab show a card type I created

But in image 3 I'm unsure about what to put in the red rectangles (I took the code from smods override which defaults to the first picture)

Does anyone happen to have any suggestion

frosty dock
merry raven
#

Ooooooooooh

violet void
frosty dock
#

Also can't use use the smods collection util thingy for this

merry raven
#

Just cram in G.I.NODE like this?

frosty dock
#

wait nvm

merry raven
#

Oh wait

#

I forgot layers

frosty dock
#

if this is like tags, that's different

wintry solar
#

I don’t think they’re like tags from memory

violet void
#

The original

frosty dock
#

I'm confused why it'd be based on the tag collection function then

violet void
#

Because you said I could make use of these 🥹

frosty dock
#

Tag collection UI is the odd one out

#

everything else (except blinds obviously) is standardized

violet void
#

Mine is neither a Joker nor a Consumable

merry raven
wintry solar
#

Probably not, it probably just doesn’t work

merry raven
#

Aw

wintry solar
#

You could try setting attach = card.children.back

#

That might work?

frosty dock
#

it just needs to be a center

violet void
frosty dock
#
create_UIBox_your_collection_jokers = function() 
    return SMODS.card_collection_UIBox(G.P_CENTER_POOLS.Joker, {5,5,5}, {
        no_materialize = true, 
        modify_card = function(card, center) card.sticker = get_joker_win_sticker(center) end,
        h_mod = 0.95,
    })
end

for instance this is the code for the joker collection

wild patrol
#
              if G.STATE == G.STATES.SMODS_BOOSTER_OPENED then
                copy_card(G.jokers.cards, nil, nil, nil, 'randomteleport')
                card:start_materialize()
                card:add_to_deck()
                G.jokers:emplace(card)
              elseif G.STATE == G.STATES.PLAY_TAROT then
                copy_card(G.jokers.cards, nil, nil, nil, 'randomteleport')
                card:start_materialize()
                card:add_to_deck()
                G.jokers:emplace(card)```
frosty dock
violet void
frosty dock
wild patrol
#

sadcat yes

frosty dock
#

local _card = copy_card(G.jokers.cards[1]) (with materializing, emplacing etc.) copies the leftmost joker for example

wild patrol
#

oh wait I think i see what ur saying now

frosty dock
#

I can't break it down further, really

wild patrol
#

so 2 would be the second joker

#

and so on?

frosty dock
#

mhm

#

or you can use pseudorandom_element to get a random joker to copy

wild patrol
#

I might have to use random

#

unless it's possible to manually select one

merry raven
#

I think I managed to almost figure it out? But it just duplicated my particles, BUT there are some that appeared behind the card

Any insights on how I should proceed? @wintry solar

wintry solar
violet void
merry raven
#

Said duplication: some particles have a second copy trailing behind it

wintry solar
#

It’ll be drawing them twice now

frosty dock
#

I'm saying you can use the util on anything that can belong to a card

merry raven
#

Yeah I just need to find a way to remove the top layer of particles

frosty dock
#

whether it be a conventional center or not

crisp coral
tall wharf
wild patrol
tall wharf
#
[[patches]]
[patches.pattern]
target = "functions/UI_definitions.lua"
pattern = """        {n=G.UIT.R, config={align = "cm",padding = 0.15}, nodes={"""
position = "at"
payload = """
        {n=G.UIT.R, config={align = "cm",padding = 0.15}, nodes = (G.GAME.current_round.advanced_blind) and THOUGHT_BOSS_BLIND or {
"""
overwrite = true
match_indent = true

THOUGHT_BOSS_BLIND = {
    n = G.UIT.B, config = {
        w = 2,
        h = 0.6,
        padding = 0.1,
    }
}
wild patrol
#

I have a joker card I can just drag where ever I want to

crisp coral
merry raven
crisp coral
#

card.children.particles.draw

#

also turn off pings

#

Please

merry raven
#

Oh gotcha

wild patrol
#
              if G.STATE == G.STATES.SMODS_BOOSTER_OPENED then
                local _card = copy_card(G.jokers.cards[1])
                card:start_materialize()
                G.jokers:emplace(card)
              elseif G.STATE == G.STATES.PLAY_TAROT then
                local _card = copy_card(G.jokers.cards[1])
                card:start_materialize()
                G.jokers:emplace(card)
        end```
wintry solar
#

why do you have two conditionals like that?

violet void
crisp coral
#

why card and not _card...?

merry raven
#

Oh yeah, Eremel, can I DM you for a spot of help on figuring out the particle system
We're real close to a solution

wintry solar
#

yeah sure

runic pecan
wintry solar
#

what context are you destroying cards in?

wild patrol
wintry solar
violet void
runic pecan
tall wharf
#

ah finally

runic pecan
#

Holy molly that's a beeg number

tall wharf
wintry solar
wild patrol
#

so far this is everything i've added into the yugioh mod

tall wharf
#

too small :(

runic pecan
wintry solar
#

okay? and that stops you from using the standard way because?

runic pecan
#

Because players played those cards instead of, you know, discarded them.
And vanilla method only allow me to destroy scored cards.

wintry solar
#

oh sorry not discard

#

context.destroy_card

cursive glade
#

Did a search through chat history but couldn't find a clear answer.
I decided to try my hand at learning lua, and I love Balatro, so modding it seemd like a good way to learn.
I'm new to SMODS, and while the documentation on github is fairly comprehensive, it's unclear how to do what I want.
TL;DR: How do I detect when a blind is skipped, and when a boss is defeated?

frosty dock
wild patrol
#

i saw

#

like right after I sent that I realized it

#

lol

runic pecan
frosty dock
cursive glade
#

Ah, must have missed that. Thank you 👍

frosty dock
#

context.end_of_round and context.game_over == false

#

game_over is nil most of the time, so this makes for a unique context while not game_over doesn't

#

Alternatively use main_eval if you don't care about the value of game_over

violet void
crisp coral
#

i'm fairly certain main_eval doesnt work

cursive glade
#

Awesome! Thanks. Wasn't expecting such a quick and concise answer. Possibly the friendliest modding chat I've ever been in 😄

frosty dock
crisp coral
#

oh it works now

#

i die

violet void
#

I've found cardsleeve doing this

my card type should never be "locked" but only undiscovered (so I switched it to check for discovered instead)

#

but with the locked property

frosty dock
#

that's to retroactively handle unlock all

#

which steamodded should soon handle automatically

violet void
#

but per se this check should be correct no?

frosty dock
#

yes, but the card will only take the discovered state on the center into account when making the sprite

tight thistle
violet void
#

I suppose it has to be something with my Center type not having its own undiscovered sprite?

But it has the floating circle so im a bit confused

vital rapids
#

"pos = { x = 2, y = 3}"
This means x = 2(px)
And y = 3(py)
Yes?

violet void
#

its the position in the spritesheet

vital rapids
#

Yeah i mean like

#

Okay like in cryptid code for the reeboot code card it says
Pos = ( x = 2, y = 0)

#

And he defined px as 71 and py as 95

elder vapor
#

oh wait

#

pos = { x = 2, y = 3} means x = 3(px) and y = 4(py)

frosty dock
violet void
frosty dock
#

SMODS.UndiscoveredSprite:

vital rapids
#

Meaning the position is 2 of x

#

Yes?

frosty dock
#

think of the atlas as a 2D grid of sprites

#

x=0,y=0 is the top leftmost sprite

violet void
frosty dock
#

x=0,y=1 is the one below that, etc

frosty dock
tall wharf
#

mr John s mods why is my ui not being updated after i changed a variable

frosty dock
tall wharf
#

do i need to recalculate the ui

frosty dock
#

you need to recalculate or use something more dynamic, i.e. using object nodes

tall wharf
#

makes sense

primal robin
#

Is somewhere a place where I can read about difference between old-calc and better-calc?

vital rapids
crude imp
#

anyone have any idea how to set add_joker edition to only negative or polychrome??

violet void
tall wharf
#

i feel my mental health improving already

#

(i went up and am getting food after hours of staring at the code all day)

violet void
#

the set did not work

#

I probably need to give the center a custom type to use this

frosty dock
#

key = 'Alignment' doesn't work?

vital rapids
#

So if i have px ad 64 and py as 94
x = 1 and y = 0 would have the (x = 65, y = 0) to (x = 129, y = 94) as the area where the sprite is yes?

#

Just making sure

violet void
tall wharf
#

alright

violet void
#

they keep appearing with their discovered sprite plus that floating circle

violet void
vital rapids
#

2 pixel space between each card

tall wharf
#

it doesn't update the text 🥲

violet void
vital rapids
#

So when I'm defining px and py am i setting it as the bottom right corner of the card or do i include one pixel of space for each axis

#

Final question

elder vapor
#

have 1 pixel of dead space around the card

#

so the atlas is 71x95 but the card is 69x93

frosty dock
#

this is to prevent pixel bleeding^

fathom verge
#

Hey newbie here, I made a quick joker that I am trying to get to just show up in the collections and Im not sure what ive done wrong. this is what i currently have

#

its in the correct mods location, should balatro/steamodded auto recognize it

violet void
vital rapids
#

Final question

frosty dock
#

and the atlas path should include the file extension

#

'palps_card.png' for example

fathom verge
ionic timber
#

Hi, is there any way to debuff the played hand easily ? if so , in what context should I put it in and how exactly do I call it ?

elder vapor
#

oh i didn't see john smods msg

foggy carbon
#

how do I make a joker twitch without giving a message

crisp coral
#

card:juice_up()

vital rapids
ionic timber
vital rapids
#

Okay so lets say i wanted a card to give you one legendary joker

#

Nvm scapping the idea

tall wharf
crisp coral
cursive glade
#

Is there a way to make a custom deck start with a specific joker?

tall wharf
vital rapids
#

Welp i cant even get the mod to load

modern kindle
tall wharf
vital rapids
#

mine

tall wharf
#

😭

#

i feel that

crisp coral
vital rapids
#

this is all i need for now yes?

ionic timber
vital rapids
#

also what exactly am i supposed to have in lovely.toml

modern kindle
runic pecan
#

I thought G.P_SEALS.Purple would work... 🤔

ionic timber
modern kindle
#

I just obsess over silly things and this caught my interest
I'm very much still a wee baby compared to some of the people here, but it's been a fun journey

#

If you have some questions regarding jokers later on feel free to dm :)

atomic edge
#

how do you check if there is spaces in joker area?

ionic timber
#

well 10 of those 12 are trying to understand what I'm doing but it's fun

ionic timber
worthy stirrup
#

How could I make my own stake that only adds rental jokers

tepid crow
wintry solar
#

Is this latest smods build?

tepid crow
#

that's the only thing I can think of too ^

wintry solar
#

You had to do funny things to get seal info queues before a recent change

tepid crow
#

yeah works perfectly fine on 1326a

worthy stirrup
#

so, on the stakes wiki, theres this. If i want to only use the Black Stake and Gold stake, would i list these under applied_stakes

applied_stakes: An array of keys of stakes that should also be applied when this stake is active. This is evaluated recursively to include all stakes applied by applied stakes, so you usually don't need to specify multiple stakes here.
wintry solar
#

Gold stake will apply all the other stakes

tepid crow
worthy stirrup
#

i know, but i only want the effects of gold stake without the others

ionic timber
#

thing is , for example, context.main_scoring doesn't seem to work

tepid crow
atomic edge
#

yea i figured it out but thanks

worthy stirrup
wintry solar
worthy stirrup
#

Yes

#

I want Black, Orange, and Gold stakes but without the other one's effects

wintry solar
#

You’ll probably just have to make them your own stakes effect then

worthy stirrup
#

fair

#

ill see if i can find what balatro does

vital rapids
tepid crow
#

is that a localization file?

runic pecan
tepid crow
worthy stirrup
#

okay, if i want to only have it use White Stake as the applied_stakesm what do i feed it, because if im reading it correctly, it seems to give gold/the highest stake

wintry solar
#

Why do you need it to apply white stake?

worthy stirrup
#

im assuming it applies everything if not fed anything, no?