#💻・modding-dev

1 messages · Page 552 of 1

red cradle
#

I would do this

pastel kernel
#

Man

#

Fine

#

I’m getting rid of the upgradable doublemoney

red cradle
#

oh

#

idk about that

pastel kernel
#

You can multiply your money by a specific value is what I’m getting at.

wispy falcon
#

bump

pastel kernel
#

Not just x2

red cradle
#

ease_dollars(math.min(card.ability.immutable.moneymultceiling, G.GAME.dollars * (mult - 1)))

pastel kernel
#

mult must be doublemoney?

red cradle
red cradle
pastel kernel
#

doublemoney is a Config variable btw

red cradle
#

so, just replace it

grim remnant
#

sorry to nag, i still have. no idea how to start on this. ^^;

pastel kernel
#

"5. Removes the stickers of all your jokers.",

#

this is the next random ability of neo metal sonic

#

yes, he has 1 in 8 random effects on trigger

red cradle
#

How to check joker for having sticker?

pastel kernel
#

For k, v in pairs(G.jokers)?

slim ferry
#

i think you can check for individual stickers

#

idk how you check for stickers in general though

red cradle
manic rune
pastel kernel
#

Ok

#

How do I remove all stickers tho

#

That’s like his next ability

red cradle
pastel kernel
#

His ability is to remove ALL stickers of the jokers

ocean sinew
red cradle
pastel kernel
ocean sinew
#

G.jokers.cards is just number indexes

slim ferry
# red cradle modded stickers...

i looked at entropy and what it does is:
loop over SMODS.Sticker.obj_table
then for another loop inside that loop going over a cardarea

ocean sinew
#

so ipairs is better

#

It'll save you 10^-200 seconds of performance

slim ferry
#

thats for counting every sticker that is

pastel kernel
#

Does debuff also count as a sticker?

red cradle
slim ferry
#

no

pastel kernel
#

Oh.

red cradle
#

oh

pastel kernel
#

Would’ve been fun to have a joker that gets rid of all debuffs

red cradle
#

i understand

slim ferry
#

though i assume you just want to check stickers of a single joker

pastel kernel
#

All of them actually

slim ferry
#

okay

pastel kernel
#

The original idea by auzzy was to make all jokers eternal but that would probably be detrimental

slim ferry
#

entropy does this for counting stickers
just replace G.I.CARD with G.jokers.cards

slim ferry
#

i mean

#

you did that

slim ferry
lofty elm
#

Does anyone know if there's a way to have localization text only appear conditionally? I can make it not appear but it's on it's own line so it leaves a big empty space which I'd like to avoid

red cradle
lofty elm
#

ty!

wispy falcon
red flower
pastel kernel
#
if randomeffect == 5 then
                for k, v ipairs(G.jokers.cards) do
                local total = 0
                for i, v in pairs(SMODS.Sticker_obj_table) do
                    for i2, v2 in pairs(G.jokers.cards) do
                        if v2.ability and v2.ability[i] then
                            total = total + 1
                        end
                    end
                end
                return total
            end
#

it's 12:28 AM.

slim ferry
#

why are you doing 2 loops over G.jokers.cards

pastel kernel
#

oh for the love of

#
if randomeffect == 5 then
                local total = 0
                for i, v in pairs(SMODS.Sticker_obj_table) do
                    for i2, v2 in pairs(G.jokers.cards) do
                        if v2.ability and v2.ability[i] then
                            total = total + 1
                        end
                    end
                end
                return total
            end
#

there

slim ferry
#

yeah

pastel kernel
#

the next listed ability is this apparently.

-- Squares all of your current chips and mult (Triggers After Scoring).
#

this was just proposed to me

#

idk what they mean by squaring AFTER scoring

red cradle
pastel kernel
red cradle
#

. not _

#

between Sticker and obj

pastel kernel
#

Ok

#

saw it

#

next ability -- Gains 1.5XMult if a Soul is used, or a Legendary joker is to Neo Metal Sonic's right.

vast bridge
#

How to modify vanilla tarot card?

frosty rampart
ocean sinew
#

probably

pastel kernel
#

They told me it squares my chips and mult AFTER ALL OTHER jokers stop scoring

#

1 AM, and I have class at 7

frosty rampart
#
  1. sleep
  2. read the documentation, this is a pretty simple question to answer
pastel kernel
#

I swear if it’s context.after_scoring

frosty rampart
#

actually my bad, if you want it to affect score i think context.final_scoring_step is better. and that's not documented yet i don't think
(context.after is a thing but it might be too late in the process)

red flower
frosty rampart
#

oh it is documented
mixed it up with initial_scoring_step then

slim ferry
#

will nothing bad happen if i call a function outside a context check, but that function does have a context check inside itself?

red flower
#

i do that often when i want to do the same on multiple cards

slim ferry
#

alr

pastel kernel
#

creates 7 negative perishable jokers.

if randomeffect == 8 then
                for i = 1, card.ability.immutable.rnpjokers do
                    local neojokers = pseudorandom_element(G.P_CENTER_POOLS.Joker, pseudoseed('neo2')).key
                    SMODS.add_card({ key = neojokers, edition = 'e_negative', stickers = {"perishable"} })
                end
            end
#

Random too

lofty elm
#

Anyone know how to check if a card is a joker? as in
if context.buying_card then
if card.??

cursive gazelle
#

I forgot

red flower
#

context.card.ability.set == "Joker"

cursive gazelle
#

I’m stupid i was thinking of both

lofty elm
#

oh cool ty

#

yall are actually so helpful you wouldn't belive

#

maybe I'm kinda taking advantage of yall and not doing enough research tho lol

pastel kernel
#

I will bookmark this

red flower
lofty elm
#

damn, I looked through it for a bit but I didn't ctrl f well enough ig

pastel kernel
#

I’m gonna go to bed

crystal perch
#

i would like to make a joker which treats enhanced cards as wild cards, but i want to write it in a way that doesn't result in it infinitely looping due to context.check_enhancement

pastel kernel
#

It’s already late

red flower
#

tbh the wiki is kinda hard to navigate

lofty elm
#

yeaaaah

red flower
crystal perch
#

would i use that instead of check_enhancement or in tandem with it, because this code i currently have doesn't work

if context.check_enhancement and context.other_card.ability.set == "Enhanced" then
    return {
        m_wild = true
    }
end
red flower
#

together

#

i dont remember if it was other_card for that context tho let me check

crystal perch
#

it was

red flower
#

then idk

crystal perch
#

oh silly me, i hadn't saved

#

this works

slim ferry
#

can i put additional sets into the descriptions in my localization file? i have a set of things i want to use for info_queues and i would like to keep them seperated for organization purposes

red flower
#

they wont show up by default, i think you need to do some stuff for other sets to be parsed properly

primal robin
#

You can put as much stuff as you want

frosty rampart
#

you can add extra blank lines and comments :3

slim ferry
#

fair

red flower
#

I just have them in descriptions.Other because i can't be bothered and use the --#region plugin to separate them in vscode

primal robin
#

I'm just adding them in descriptions and then make lines manually trash

red flower
#

i also have my loc files separated so that helps

primal robin
#

I guess it's not the best way to localize stuff but hey, it's working

cursive gazelle
#

For the sake of nothing

#

I just like ui

primal robin
#

Depends on what you have in mind

cursive gazelle
#

Nothing.

primal robin
#

Because I'm already working on this

cursive gazelle
#

Oh neat

primal robin
#

But I allow you to try to make smth

cursive gazelle
#

Yeppiee

slim ferry
cursive gazelle
#

Yes

final jewel
#

what is the full key for booster pack ?

grim remnant
#

it was not this, it broke literally on the line of trying to call smeared_check.

    function SMODS.smeared_check(card, suit)
        if ((card.base.suit == 'Hearts' or card.base.suit == 'Spades') and (suit == 'Hearts' or suit == 'Spades')) then
            return true
        end
        return false
    end
}```
crystal perch
vast bridge
#

Why it still doesn't convert card into wild suit?

crystal perch
#

so, for example p_mod_card_pack

final jewel
slim ferry
#

is there a way to prevent a card from getting flipped?

crystal perch
#

in the 2nd pic

vernal path
#

oh shoot wait, i just realized
tazzan, are you tinydeskdemo ?

crystal perch
#

yeah i'm an admin in the tf2 blender server

vernal path
#

how's it been? I left quite a while ago

red flower
#

are you ok

#

you dont seem to be

crystal perch
vast bridge
#

Lovers doesn't select 2 cards and doesn't convert them to wild suit

crystal perch
#

oh i see

#

it's mod_conv not suit_conv

slim ferry
#

its a suit though

#

so it is suit_conv here

vast bridge
#

But I want to make it suit

crystal perch
#

i just realised that's a new suit

vast bridge
#

I can apply changes while in game, right?

crystal perch
#

no

#

you have to restart

grim remnant
# grim remnant it was not this, it broke literally on the line of trying to call `smeared_check...

trying another approach and it's similarly breaking on the very first line. what exactly am i missing here...?

function Card:is_suit(suit, bypass_debuff, flush_calc)
    local ret = card_is_suit_ref(self, suit, bypass_debuff, flush_calc)
    if not ret and not SMODS.has_no_suit(self) and next(SMODS.find_card("j_modprefix_key")) then
        if ((card.base.suit == 'Hearts' or card.base.suit == 'Spades') and (suit == 'Hearts' or suit == 'Spades')) then
            return true
        else return ret
        end
    return ret
end```
crystal perch
#

did you mean to write SMODS.find_card("j_modprefix_key")

#

instead of your joker

#

let's say my mod prefix is "mymod" and my joker's key is "myjoker", you would write SMODS.find_card("j_mymod_myjoker")

grim remnant
vast bridge
#

What is wrong??? It still doesn't do anything (not even extends selection limit)

crystal perch
#

what's the code look like now

grim remnant
unborn bay
#

oh there's your problem

crystal perch
#

why are you else returning ret

slim ferry
unborn bay
#

FUCK

slim ferry
#

teehee

crystal perch
#

lol

grim remnant
#

ah. trying that now

primal robin
#

Haya spotted

grim remnant
#

it did NOT like me going into checkered deck and selecting 5 cards from there.

faint yacht
#

self.base.suit

red cradle
#

Can i be able to select more than 1 joker in joker slots?

grim remnant
faint yacht
#

Remove if not ret?

frail parcel
#

why doesnt this work?

slim ferry
#

is prevent_debuff a thing that can be returned in context.debuff_card? i couldve sworn i saw it somewhere but the docs dont have anything on it

crystal perch
grim remnant
# faint yacht Remove `if not ret`?

that worked! pretty much the only thing is, with Smeared, it should logically start treating. All. as flushes. (technically modded suits would disagree but shhhh)

foggy ginkgo
#

Ofc Ali would know how to do a heart and spades count as the same suit

grim remnant
red cradle
#

(((

grim remnant
#

but that's beside the point

#

(also i think there's already an isaac mod sdfglkjh)

faint yacht
grim remnant
#

i did try this for "with smeared, just treat anything non-suited (stone) as flush" but it didn't work

function Card:is_suit(suit, bypass_debuff, flush_calc)
    local ret = card_is_suit_ref(self, suit, bypass_debuff, flush_calc)
    if not SMODS.has_no_suit(self) and next(SMODS.find_card("j_stla_sacredHeart")) then
        if ((self.base.suit == 'Hearts' or self.base.suit == 'Spades') and (suit == 'Hearts' or suit == 'Spades')) then
            return true
        end
    else if not SMODS.has_no_suit(self) and next(SMODS.find_card("j_stla_sacredHeart")) and next(SMODS.find_card("Smeared Joker")) then
        return true
        end
    return ret
    end
end```
foggy ginkgo
#

Yeah I saw

#

It's uh

#

Very interesting :3

#

I half understand it so

slim ferry
#

where does localization go into? i want to check if a specific localization key exists, which i need to do because im generating an info_queue from a for loop where not everything is guaranteed to have a description

harsh belfry
slim ferry
harsh belfry
#

it has a bit more than that lol

red cradle
#

Is it too op?

slim ferry
#

ah ok

harsh belfry
#

its the same structure as the loc lua file

slim ferry
# red cradle Is it too op?

it seems fine, but i feel like selected could be a bit much. ectoplasm is random and has a downside thats usually much worse

red cradle
grim remnant
hybrid shadow
#

what is the context for when the played hand is a 4oak

red cradle
red cradle
red flower
red flower
red cradle
#

fair

hybrid shadow
#

thx n

grim remnant
#

hmm. what're we missing here?? (as, no, the change to j_smeared wasn't it)

function Card:is_suit(suit, bypass_debuff, flush_calc)
    local ret = card_is_suit_ref(self, suit, bypass_debuff, flush_calc)
    if not SMODS.has_no_suit(self) and next(SMODS.find_card("j_stla_sacredHeart")) then
        if ((self.base.suit == 'Hearts' or self.base.suit == 'Spades') and (suit == 'Hearts' or suit == 'Spades')) then
            return true
        end
    else if not SMODS.has_no_suit(self) and next(SMODS.find_card("j_stla_sacredHeart")) and next(SMODS.find_card("j_smeared")) then
        return true
        end
    return ret
    end
end```
faint yacht
#

<@&1133519078540185692>

bold sleet
#

<@&1133519078540185692>

exotic hedge
#

Boowomp

#

Just came FRESH outta class and saw that

foggy ginkgo
#

Yum

grim remnant
#

man we missed it

faint yacht
foggy ginkgo
#

We balalaling with this one

grim remnant
#

what's that deck skin, those aces look sweet :o

grim remnant
faint yacht
#

Yeh.

grim remnant
faint yacht
foggy ginkgo
#

High card...

fluid nebula
#

gonna attempt to mod balatro more

#

last time went awfully so i'm abandoning that joker concept

faint yacht
#

...huh.

#

@tall wharf

tall wharf
#

wha happened

faint yacht
#

Something do be wacky.

if flush_calc then
    if not SMODS.has_no_suit(self) then
        local smearcheck, heartyspadescheck = SMODS.smeared_check(self, suit), togabalatro.heartyspadescheck(self, suit)
        if smearcheck and heartyspadescheck then
            if togabalatro.config.DoMoreLogging then sendInfoMessage("Hearty Spades + Smeared Joker flush pass.", "TOGAPack") end
            return true
        elseif heartyspadescheck and not smearcheck then
            if togabalatro.config.DoMoreLogging then sendInfoMessage("Hearty Spades flush pass.", "TOGAPack") end
            return true
        end
    end
    return issuitref(self, suit, bypass_debuff, flush_calc)
else
    if self.debuff and not bypass_debuff then return end
    if not SMODS.has_no_suit(self) then
        local smearcheck, heartyspadescheck = SMODS.smeared_check(self, suit), togabalatro.heartyspadescheck(self, suit)
        if smearcheck and heartyspadescheck then
            if togabalatro.config.DoMoreLogging then sendInfoMessage("Hearty Spades + Smeared Joker pass.", "TOGAPack") end
            return true
        elseif heartyspadescheck and not smearcheck then
            if togabalatro.config.DoMoreLogging then sendInfoMessage("Hearty Spades pass.", "TOGAPack") end
            return true
        end
    end
    return issuitref(self, suit, bypass_debuff, flush_calc)
end

togabalatro.heartyspadescheck = function(card, suit)
    if not next(SMODS.find_card('j_toga_heartyspades')) then
        return false
    end

    if (card.base.suit == 'Hearts' or card.base.suit == 'Spades') and (suit == 'Hearts' or suit == 'Spades') then
        return true
    end
    return false
end
foggy ginkgo
#

That's some pretty solid evidence

slim ferry
#

would returning stay_flipped = false in context.stay_flipped stop a card from being drawn face down?

tall wharf
#

no lcue tbh

faint yacht
#

Reverting mostly back to my original code...

tall wharf
#

i don't think it's my fault but 😭

foggy ginkgo
#

Aiko

faint yacht
#

Yeah, such is not your fault, just mine being wacky, but I specifically wanted to test it with Pure cards.

#

Old code it is, with a minor tweak.

final jewel
#

Im getting this crash while I try to implement a voucher that add 1 choice in my custom pack

faint yacht
#

Is the G.GAME.giga table even initialized?

final jewel
slim ferry
#

capitalization

faint yacht
#

That's a completely different table.

slim ferry
#

Giga exists, not giga

final jewel
#

ooooooh

slim ferry
#

also yeah

final jewel
#

im dumb

slim ferry
#

different table

#

G.GAME.giga doesnt exist

faint yacht
#

G.GAME.giga and giga would be different tables and located in different spots.

final jewel
#

So its G.GAME.Giga

slim ferry
#

well that doesnt exist unless you create it

faint yacht
#
redeem = function(self, vouchers)
  G.GAME.giga = G.GAME.giga or {}
  G.GAME.giga.vouchers = G.GAME.giga.vouchers or {}
  G.GAME.giga.vouchers.newMenu = (G.GAME.giga.vouchers.newMenu or 0) + vouchers.ability.extra.choice
end
broken rivet
#

G.GAME i'm pretty sure has all data about the current run

faint yacht
#

It does, yes.

slim ferry
#

also

final jewel
slim ferry
#

G.GAME doesnt like storing tables afaik

#

at least not tables that arent usually there

#

so if you create a table in it i dont think itll save with the run

faint yacht
#

It should.

slim ferry
#

i remember hearing it didnt

harsh belfry
#

table stuff just explodes if you try storing stuff like Cards

frosty dock
#

it's not tables that are problematic

#

Objects are

harsh belfry
faint yacht
#

This is after reopening the run, but also making sure save_run() was called.

slim ferry
#

well yeah

#

i knew regular variables were fine

frosty dock
#

which includes cards, sprites and everything else the game has a class for

faint yacht
frosty dock
#

also obviously functions don't work either

#

anything you want saved in G.GAME has to be serializable

broken rivet
#

isn't G.GAME.blind a thing

red flower
#

yes

harsh belfry
fluid nebula
#

makin joker art

frosty dock
tall wharf
#

you cannot save functions inside G.GAME

slim ferry
#

well why would you save functions there

frosty dock
faint yacht
tall wharf
#

sorry

broken rivet
tall wharf
harsh belfry
foggy ginkgo
#

WHYYY

final jewel
primal robin
#

gottem

slim ferry
red flower
#

that's what blinds do

final jewel
tall wharf
#

G.GAME.blind.config.blind

faint yacht
#

Alternatively...

SMODS.current_mod.reset_game_globals = function(run_start)
  if run_start then
    G.GAME.giga = {}
    G.GAME.giga.vouchers = {}
  end
end
red flower
#

now there's G.GAME.blind.effect :3

faint yacht
#

boind

red flower
faint yacht
broken rivet
#

my mod nerfs chicot so certain blinds require log_10(score) > 0.5*log_10(blind requirement) before being disabled and i'm probably gonna apply that change to some blinds in other mods
mostly so he isn't deadweight but you still have to like. actually fucking interact with the blind

#

idk if using base 10 logarithms is really fitting for balatro but eh

final jewel
#

@faint yacht thx soo much all is working like I want

sonic cedar
#

what's the difference between context.blueprint and context.blueprint_card?

faint yacht
#

context.blueprint_card is the copying card.

sonic cedar
#

like its the one copying?

faint yacht
#

Yeh.

#

context.blueprint is for checking for blueprint effect overall.

sonic cedar
#

cause im trying to figure out why this isnt triggering destruction

#

and i feel like it's something obvious but then at the same time it could be something really obscure

#

or a bug
i hope its not a bug

#

ok nvm it's not about blueprint at all ill figure it out

frosty dock
#

that... should work fine

sonic cedar
frosty dock
#

can i see it not working :jimbo_spin:

sonic cedar
#

when im back at my computer but it’s literally just

Discards hand
Cards get discarded
cards do not get destroyed

wispy falcon
#

Is there a way to change the scale of the soul on a card?

slim ferry
#

is SMODS.calculate_effect completely identical to returning in terms of functionality?

sonic cedar
#

wait that actually could be the reason

frosty dock
#

does trading card work

sonic cedar
#

yes it works fine
also aure look at ts 🥀

unborn smelt
#

stupid question:
is it possible to add a joker to the consumables pool?

sonic cedar
#

it was in fact the incredibly obvious answer

frosty dock
#

k then something's not being loaded right

sonic cedar
#

its the wrong key

frosty dock
#

amazing

sonic cedar
frosty dock
hidden notch
#

Holy Maccheroni TippShocked
First of all... Many MANY Thanks for sharing! FlowireBigLove
And Second of all...... Yeah, I think I'm gonna go with your API-Mod lewxen_Teary_Laugh
I did not realize, how much work that simple lookin' feature brings lewxen_cry lewxen_Teary_Laugh

frosty dock
# frosty dock no

returning can pass state out such as removing cards or debuffing/undebuffing hands and cards among other things

slim ferry
#

i see

unborn smelt
#

pools = {
['tjr_pool_mischief'] = true,
['G.P_CENTER_POOLS.Tarot'] = true,
['G.P_CENTER_POOLS.Spectral'] = true,
},

this does not work so my joker shows up in tarot and spectral packs, right?

frosty dock
#

Tarot = true

#

none of that other stuff

unborn smelt
#

just
pools={Tarot=true}

chrome widget
# hidden notch Holy Maccheroni <:TippShocked:1251599107479437463> First of all... Many MANY Tha...

If you want to use the API mod, then it has a function ArrowAPI.credits.add_credits(mod, args) to register strings for credits in a central location.

I usually call this in the main file, and it looks smth like this:

ArrowAPI.credits.add_credits(SMODS.current_mod, {
    ['gote'] = "BarrierTrio/Gote",
    ['cejai'] = "SagaciousCejai",
    ['eremel'] = "Eremel",
    ['keku'] = "Keku",
    ['guff'] = "GuffNFluff",
    ['wario'] = "MightyKingWario",
    ['rerun'] = "KawaiiRerun",
    ['vivi'] = "Vivian Giacobbi",
    ['gameboy'] = "Sir. Gameboy",
    ['chvsau'] = "chvsau",
    ['dolos'] = "Dolos",
    ['stup'] = 'Stupisms',
    ['reda'] = 'Redastrin',
    ['araki'] = 'Hirohiko Araki',
    ['luckyland'] = 'Lucky Land Communications',
})

Afterwards, you can just set the artist property on the item and it'll do all relevant crediting including hover tooltips and this deck menu thing, which also supports Galdur via hover code

frosty dock
#

well add whatever else

#

but no G.P_CENTER_POOLS and whatever

#

that's not part of the pool key, it's just where the table of pools is

#

else you'd be addressing G.P_CENTER_POOLS['G.P_CENTER_POOLS.Tarot']

unborn smelt
#

makes sense

#

thank you

chrome widget
#

Maybe ill add something to programmatically make a mod credits tab when you call this function but I can't guarantee it. Would help so that fewer people have to fiddle with UI

wispy falcon
frosty dock
# wispy falcon bump2

yes but I'm not in a clear enough state of mind to tell you how to make it look right

hidden notch
chrome widget
#

Feel free to use its other features too!! Unfortunately since it's not officially released it is not properly documented, though most of the API functions have docstrings at least

wispy falcon
robust marsh
#

can i make a joker take no space without a negative edition

sonic cedar
frosty dock
chrome widget
#

Some features include

  • loading helper functions
  • universal art crediting
  • generic extra blind effects
  • custom challenge description options
  • pseudorandom prediction
  • boss blind background gradient support
  • easy consumable selection limit modification
  • various helper functions for vanilla stuff
  • support for two custom consumable types, Stands and VHS Tapes (both previously used by Cardsauce)
sonic cedar
#

how would i check if a discarded hand is currently being iterated through the last card in said hand?

frosty dock
#

which reminds me that you can define soul_pos.draw instead of patching that step

ocean sinew
#

otherwise if just setting config doesnt work you can do

red flower
#

you can put card_limit in the joker now but i just tested it and it's kinda janky haha

frosty dock
#

yay jank

chrome widget
#

Put it in the config

red flower
#

eremel made it so most objects can have card_limit in the config to act like negative

#

i dont think this is intended tho

robust marsh
frosty dock
#

make sure to also reverse it in remove_from_deck if you do

robust marsh
#

yupyup

#

thank you :)

sonic cedar
#

duh

chrome widget
frosty dock
sonic cedar
sonic cedar
chrome widget
#

Surprisingly it doesn't feel like it. Some of those are pretty small features. Love to expand it though

sonic cedar
frosty dock
chrome widget
#

I mostly wanted to fill in stuff that is either A) hard to do or B) requires overwriting vanilla code and so is safer for people to get from a unified source to reduce mod conflicts

#

The extra blind stuff was Hard. The consumable limit stuff required a lot of overwrites because of Vanilla Jank

red flower
#

we love apis we need more of those

frosty dock
#

i mean feel free to PR stuff to smods that you think is useful to have from a unified source

chrome widget
#

Most of the stuff in my API here is stuff I would reasonably consider to be not vanilla enough features for SMODS IMO

frosty dock
red flower
#

I just need someone to finally make a mod manager that handles dependencies

chrome widget
#

That said I'm sure I could technically simplify the consumable limit stuff if I just overwrite card.ability.consumable with an actual deep copy instead of a shallow reference, but for some reason I didn't do that. Can't remember why I chose not to

frosty dock
frosty dock
chrome widget
#

Cause smth the API also does (only in English now because I am Sadly Monolingual) is add support for automatically updating relevant consumables' loc texts to plural conjugation if the select limit changes

frosty dock
#

that's hard to do well for the general case

chrome widget
#

I.E. chariot goes from saying "change 1 card in hand into a steel card" to "change up to 2 cards in hand into steel cards"

#

Yeah

chrome widget
#

Plus I'd also need to vary by language depending on how they treat conjugation, or if they consider zero to conjugate like a plural like English does or not

#

Regardless it's a useful feature and can be iterated on

frail parcel
#

is there a list of vanilla joker keys?

red river
#

hey, question- how can i detect if a joker has been obtained during shops? (including stuff like judgement, etc)

#

jinx

frosty dock
frosty dock
#

that works too

red flower
red river
#

it works for purchased jokers but not judgement cards

#

also it doesn't work on buffoon packs

red flower
#

oh i thought you were saying just in the shop by any means

#

what's the intended effect you need?

red river
#

i'm trying to make a joker that re-opens a skipped boosterpack, once per shop. the re-opening part is done, i'm trying to figure out how to make it specifically work in shops

frosty dock
#

i don't think there really is a way to tell if a pack is being opened in the shop or not without setting such a flag yourself

red river
#

for edge cases when you get this joker outside of shop, i want it to not shake until you are in a shop

red flower
#

maybe it would be easier to do the opposite and check that the joker is not added during a blind in add_to_deck using not G.GAME.blind.in_blind but idk how your current logic looks like

red river
#

yeah maybe. but then i'll need to take skips into account

minor magnet
#

any idea why my code aint working?

red flower
compact valve
#

how do I make a github for my mod

red flower
red river
minor magnet
red flower
#

check the release notes

red flower
red flower
red river
#

oh right, i forgot about that function

#

it works! thank you!

minor magnet
wispy falcon
#

N', do you know how to scale the soul of a card?

red flower
red flower
#

well not the soul_pos one

#

i would maybe look at hologram in vanillaremade

next timber
#

is there a context that comes after context.destroy_card and gives access to (whats left of) the played hand?

#

probably just context.after honestly but might as well check

wispy falcon
red flower
wispy falcon
# red flower i would maybe look at hologram in vanillaremade

What does the 'hologram' stand for?

        x = 5, y = 1,
        draw = function(card, scale_mod, rotate_mod)
            card.hover_tilt = card.hover_tilt * 1.5
            card.children.floating_sprite:draw_shader('hologram', nil, card.ARGS.send_to_shader, nil,
                card.children.center, 2 * scale_mod, 2 * rotate_mod)
            card.hover_tilt = card.hover_tilt / 1.5
        end
    },```
red flower
#

the shader

#

soul_pos normally uses 'dissolve'

wispy falcon
#

So if I replace 'hologram' with 'dissolve', I could test it in game?

#

Wait, no. I get an error 😅

willow scroll
#

@N how do i specify background color documentation doesnt mention it

willow scroll
wispy falcon
red flower
#

i would recommend checking the vanilla examples in the repo

willow scroll
#

hooray

wispy falcon
#

Does anyone know what the different 'nil' parameters are for in card.children.floating_sprite:draw_shader('dissolve', nil, nil, nil, card.children.center, 5 * scale_mod, 1.5 * rotate_mod)?

wispy falcon
red flower
#

look for Sprite:draw_shader

#

i think they're for the shadow and the parameters to send to the shader

willow scroll
wispy falcon
red flower
#

no, in the code

wispy falcon
#

What code?

willow scroll
#

the source code of the game

wispy falcon
#

I take it ms, mr, mx and my stand for scale, rotation, x-position and y-position?

red flower
#

yes

next timber
#

how do you add delay to the end of an event again

faint yacht
#

delay(x)

high verge
#

Syntax errors will be the death of me.

chrome token
#

is there a way to make a joker eternal but still sellable? or ig just any way of preventing a card to be destroyed but still be allowed to be sold

cursive gazelle
cursive gazelle
high verge
high verge
#

I'm trying to decide whether or not I wanna split up the malverk texture options in my mod for a little more customizability.

#

Currently I have it in two, one for the cards/enhancers/seals and another for the jokers

wintry solar
#

you should put them all in one

high verge
#

Yeah that's what I originally had

chrome token
high verge
#

Any chance we'll be getting the documentation for setting up stuff like sleeves through malverk? I'd love to get that set up on there so it can be toggled on and off as well.

cursive gazelle
#

Dope

#

Can i see ?

chrome token
wintry solar
cursive gazelle
high verge
#

Oh I was just debating on it for customization purposes. I like giving people options.

wintry solar
high verge
#

I didn't know you could add a config to a texture pack as well

#

That's beautiful.

wintry solar
#

it does it by default

high verge
#

By default?

#

Mine doesn't have that.

#

Oh it only shows if you apply it

wintry solar
#

yeah you don't need to customise packs that aren't applied

#

that's because you haven't defined localization for the alttexture objects

high verge
#

Yeah let's get that all nice and setup.

#

I'm guessing they go under the definitions?

wintry solar
#

it should be explained somewhere on the github iirc

high verge
#

Found it

#

Descriptions alt texture

#

Hmm, I must still be doing it wrong it's still giving an error...

#
        alt_texture={
            hbp_enhancersHELLUVA = {'Test'},
            hbp_jokersHELLUVA = {'Test2'},
            hbp_tarotsHELLUVA = {'Test3'},
            hbp_sealHELLUVA = {'Seals'},
        },
}```
#

This is within the appropriate spot under return

grim remnant
#

is it possible to make an effect happen everytime a joker or playing card rolls for a random effect (or like. i guess what would i have to hook into to do that.)

real night
#

how do you do "when game over"

#

like how do i trigger

#

a thing

#

when the game is over

high verge
#

Okay so now ironically how would I remove an option from the config. As part of my mod it replaces the names of the tarot cards. Unless there's a way to trigger something else based on malverk options I'd prefer to disable the config option for tarots.

grim remnant
#

also, for some reason, this card's anim borked at some point. i feel like SOME of this is tied to the juice_up call before giving the seal???

gilded blaze
#

set_seal method is put on an event queue by default (used for playing cards created from standard packs)

#

the same action for consumables doesn't do that; it triggers immediately

willow scroll
#

how can i check if a given joker is compatible with a sticker (aka where can i read a givens joker eternal_compat/perishable_compat)?

#

because the vanilla stickers instead of the should_apply function just have a boolean of the same name?

grim remnant
willow scroll
#

give the juice up animation event more delay (when the seal setting is set first)?

#

actually thats not really a solution one moment

azure laurel
#

hey why does my new suits have this tiny black border?

willow scroll
glass blade
#

I tried to run balatro mod manager, but it seems there's some file that isn't localised in a .dll file

high verge
#

How can I change the order of the config menu options for a malverk texture pack?

high verge
#

Yeah 😄

glass blade
high verge
#

xD

grim remnant
#

i'm also having an issue where playing cards in booster packs count for my one joker that cares for adding enhancements/seals/editions for whatever reason. (and also one i made that uses the same setting_seal effect). weirdly, the big one procs twice when the one that only wants seals procs once? uh. how can i fix that.
if ((context.setting_ability and context.old and not context.unchanged and G.P_CENTERS[context.new].set == "Enhanced") or context.setting_seal or context.setting_edition) and not context.other_card.stla_from_copy and not context.blueprint then

wild escarp
#

How difficult would it be to implement the ability to pull cards, such as the code cards from cryptid?

ocean sinew
#

copy from cryptid

grim remnant
# grim remnant i'm also having an issue where playing cards in booster packs count for my one j...

still looking for pointers on how to be like "not in a shop" for this. if it helps, this is the code for setting_seal for those that missed that:

function Card:set_seal(_seal, silent, immediate)
    local ret = set_seal_ref(self, _seal, silent, immediate)
    if self.ability.set ~= "Joker" then --this is such a hacky solution and probably breaks cryptid a tiny bit since you can actually seal jokers in that mod. too bad!
        SMODS.calculate_context({setting_seal = true, other_card = self})
    end
    return ret
end```
wet crag
dim rune
#

Hi, I had a mod idea but I'm a beginner at coding, and I never modded a game before, is there a place where I can find the basics for modding Balatro ? (I've heard about a toolkit for adding jokers but that's not what I wanna do)

red flower
dim rune
#

Oh thanks, I didn't think about checking that chat since after reading #📜・modding-rules I assumed it was not for discussing mod creation 😅

wild escarp
red flower
idle ivy
#

hello, i´m new in discord (and my englsih is very bad, probably i use the translator)

#

I started doing it, but I'm suffering from a lack of content on the internet

#

layman's question: if I ask for a script, can you make it for me or at least the base?

harsh belfry
#

how do i either:
put an inline hex code into loc
or
add an arbitrary colour to whatever table the localization entries access

grim remnant
idle ivy
gilded goblet
#

I think people can help you write something, they are not going to do it all for you

idle ivy
#

ok, sorry if that sounded a little rude

gilded goblet
#

It wasn't rude, just letting you know

idle ivy
#

So, I was trying to make a joker that gives money when the blind ends according to the selling value of all the wild cards, but I don't know how to do it

#

How would I make it identify the jokers I have and their selling value?

viral ember
#

I'm stupid woops

sage crater
#

how tf do you use jokerforge lol

dim rune
#

How do I get the game to run a function on startup? (Looked through steamodded's entire documentation, haven't found what I was looking for, and most mods I looked at don't do it because they just add stuff with stuff like SMODS.Edition, SMODS.Consumable etc)

sage crater
#

I'm trying to just to on ante completion, 1 in 8 chance for +1 joker slot and it's confusing me

dim rune
#

Isn't there a general case such as an init function? PikaLul

red flower
#

there are a couple

dim rune
#

What I basically want to do is run a few functions on the game's base jokers

red flower
#

like the vanilla ones?

dim rune
#

Yeah

red flower
#

then you dont need a function

#

just do it in the main file

#

I would recommend using take_ownership if you want to modify them tho

dim rune
#

Oh, so I run that bit of code out of a function?

red flower
#

yeah

#

modded stuff will not all be loaded however

dim rune
#

I never really used lua so idk what is or isn't possible, and I assumed that wasn't sobs

#

Well for now I want it to work on vanilla Balatro

#

Once it does maybe I'll try to adapt it to modded jokers

red flower
#

To answer your question there's no SMODS api for that, you need to hook one of the game's/SMODS' start up functions

dim rune
#

Thanks

grim remnant
#

hmm. trying to make a satellite-esque joker but for Emult and i have no clue how to set up the variable. in loc_vars, it can track planets_used just fine, but obviously when it comes time to actual calculation, it crashes.

(what's more, i need to try to figure out how, exactly, to add that if config.showOrigin then t.key = self.key..'_source' end line in so i can have my "showOrigins" text work properly, but since the loc_vars section has no t table for the variables... hmm.)

daring fern
grim remnant
#

did see that much, though fixing it didn't do much in...well, fixing it.

daring fern
final jewel
#

ok I made my voucher works earlier today with Ali but I didn't see that the game crash when I open my pack without the voucher

grim remnant
daring fern
dim rune
#

This is probably a dumb question but I want to be sure I'm not doing stupid stuff, the different sets ("Joker", "Consumable", etc) include both vanilla and modded cards, right?

dim rune
#

Thanks

final jewel
#

My guess is that I need a condition to check if I have the voucher but idk how to do that 🤣

grim remnant
#

we have no clue what the heck the problem is here yet get the feeling it's probably staring me in the face and i'm just too tired to even fathom it

#

okay, at least saw sometihng in vanillaremade, but... again, confusing syntax

next karma
#

trying to figure out to make a cards chip go up the less discards there are

wild escarp
#

How can I get the current chips and mult of a poker hand?

final jewel
#

do you know how to fix it

sonic cedar
#

rq how to check current hand size

#

nvm just remembered carry on

faint yacht
# final jewel do you know how to fix it

+ (G.GAME.giga and G.GAME.giga.vouchers and G.GAME.giga.vouchers.newMenu or 0) and similiar for the other one in patch to check if the table and entry exist, otherwise, use 0.

final jewel
#

Ok ok thx you're the Goat

grim remnant
red flower
#

same

final jewel
#

I just don't understand ?!?!?

foggy ginkgo
#

Huh

red flower
#

im laughing so hard

frozen turret
#

Can someone guide me in the right direction please

#

I made a text mod a while ago that works perfectly

#

I want to now change in game textures to go along with that

#

Is the process for installing new textures the same as installing the new text

red flower
frozen turret
red flower
#

why

frozen turret
#

I have this so far

frozen turret
red flower
#

and?

frozen turret
#

Life is harder

red flower
#

how

#

mods work on mac just the same

frozen turret
#

So is the image I sent above wrong?

red flower
#

yes

frozen turret
#

Ok

dim rune
frozen turret
grim remnant
# faint yacht One excess `end`?

it was like that in the original function from VanillaRemade i'm basing this off. removing it just makes it crash faster, at the start of loc_vars, rather than in calculation.

red flower
grim remnant
#

we'll need to cycle back to loc_vars to un-comment the thing that changes the localization to the _source version later, but for now we're trying to get this functioning, and it's currently borked on line 455.

frozen turret
next karma
#

anyone have an idea on how to make a card give more chips when you discard a hand?

daring fern
#

How would one make clicks register twice?

daring fern
umbral lichen
#

trying to make a joker that retriggers a random joker if the played hand contains a pair, does anyone know a way to do this

#

i have some code that i made and then had an ai help but it still doesnt retrigger anything

grim remnant
lofty elm
daring fern
lofty elm
#

oh, im just goin off what the wiki says

#

sorry lol maybe i shouldnt be tryna help ppl yet

#

btw do you know how to find things like a jokers sell value

daring fern
lofty elm
#

tyy

grim remnant
daring fern
grim remnant
#

ah, that'd do it. only things now would be that one commented line in loc_vars, as right now, it isn't properly appending _source to the actual localization if config.showOrigin is on. and maybe making it so every time a new planet card is used, the joker has a juice_up anim, but i'm taking this one step at a time here

#

...yes it does??? it's, part of my mod

#

if it detects that config, it should instead of checking the ordinary localization (like j_stla_theAliens), it instead uses the localization for j_stla_theAliens_source)

#

...then how the heck have i been calling it on basically every other joker?

#

...like, this isn't a rhetorical question, how does this work if config.showOrigin doesn't exist, because config doesn't exist.

#

...changing it to that causes the config menu to immediately crash the game. no, the solution isn't to make it SMODS.stla.config, that errors out much the same.

#

...like this?????

#

which yeah the global variable is "config" and not "SMODS.current_mod" but like. is this not what this is doing?

#

like, i'm not about to find-and-replace all instances of the "config" global variable into direct calls for SMODS.current_mod unless it turns out that that is absolutely mandatory. that feels a bit excessive.

daring fern
high verge
#

How does one define a new sprite in an atlas for use in other places? I am trying to pull an image from a new atlas image for use in quips.

high verge
#

As the image used when a quip is shown.

daring fern
high verge
#

I know how to do the quip part but I'm not sure how to define the new sprite keys.

grim remnant
#

do you mean the message?

#

(message being the little diamond-and-text thing)

high verge
#

No. I'm trying to define the image.

grim remnant
#

nope <-- this would be a message, for instance

daring fern
high verge
#

Yes.

high verge
daring fern
# high verge Yes.

Then you would have to patch where it creates that card and change its sprite to that.

grim remnant
obtuse wraith
versed swan
#

How do you grab all cardareas?

daring fern
high verge
daring fern
versed swan
#

thank you

daring fern
high verge
#

Asmodeus refers to c_sun

high verge
daring fern
high verge
#

I'm a bit confused, are you referring to a different thing?

grim remnant
high verge
#

I didn't need to add any patches to change it to c_chariot.

high verge
#

You don't need a patch to show a different image there. I just need to learn how say c_chariot is defined.

high verge
#

Then how am I doing it without a patch..?

daring fern
high verge
#

How do I define a center then

daring fern
high verge
#

Is sprite a different thing?

daring fern
high verge
#

Then forget about sprites.

#

How do I define a new center?

daring fern
high verge
# high verge

I want one of these floating heads to show up when I do a quip

daring fern
high verge
#

Alright then how do I patch?

#

Last time we tried to do a patch it didn't work.

thick drift
#

So, I made a bit of code to prevent Ectoplasm from targeting a group of jokers I created (potion jokers). It's a modified version of what was implemented in the VanillaRemade. For some reason, it seems to only say that the card can be used when the leftmost joker either: 1) is not a potion joker, or 2) it has no edition applied to it. Any ideas on how I can fix this?

    can_use = function (self, card)
        local editionless_jokers = SMODS.Edition:get_edition_cards(G.jokers, true)
        local no_potion = {}
        local flag = false
        for _, j in ipairs(editionless_jokers) do
            for _, k in ipairs(POTIONS) do
                if j.config.center_key == k then
                    flag = true
                    break
                end
            end
            if not flag then
                no_potion[#no_potion+1] = j
                flag = false
            end
        end
        return next(no_potion)
    end
})```
daring fern
grim remnant
# grim remnant it still does the anim even if it's a planet card that's previously been played....

no, the solution to making this only happen when it's a new planet was not, in fact, to put the return {message = yaddayadda} into the for loop. (at least, not in the way i did it. i feel like this is close to working, but um. Yeah I'm Missing Something Here Clearly ;P)

        for k, v in pairs(G.GAME.consumeable_usage) do
            if v.set == 'Planet' then planets_used = planets_used + 1 end
            card.ability.extra.Emult = ((planets_used * card.ability.extra.scaler) + card.ability.extra.base)
            return {message = localize('k_upgrade_ex')}
        end```
daring fern
grim remnant
#

now it's not doing the upgrade anim at all... weird.

thick drift
#

is this supposed to work like Satellite?

grim remnant
#

yeah, it's like satellite

#

every time a unique planet card is used, it scales. the scaling part works, but the problem is. giving it actual feedback that "yeah it's upgraded"

#

atm you kinda just have to Know it does that.

daring fern
thick drift
#

it might be a case that by the time the consumable is being inspected, it's already been added to the table

grim remnant
thick drift
#

try setting v.count > 1

cyan lagoon
#

heya, how can i stop this from juicing when there's nothing to retrigger?

daring fern
cyan lagoon
#

and it's gonna juice both the card and the joker, right?

cyan lagoon
#

nope. the text is on the joker now

cyan lagoon
#

and just juice the joker

daring fern
cyan lagoon
#

alright

#

yup, there it is. thank you

thick drift
#

did my suggestion for the planet stuff work?

daring fern
high verge
#

Got distracted. Learned about card seals.

#

Why not.

robust marsh
#

I'm trying to make it so my consumable grants a selection between 2 jokers under a certain condition, maybe as a separate UI? I'm not expecting this handed to me on a silver platter but I was wondering if anyone knows a mod that has this functionality.

unborn smelt
#

but its probably easier to create a booster for your needs that you can get from your consumable, I think

robust marsh
#

that's actually a lot smarter than what I had in mind

#

ty

high verge
#

Alright now I have some pretty stickers seals

#

How do I make a joker never spawn? Just found a jank way create a sprite

robust marsh
daring fern
high verge
#

Thanks I was about to bang my head against trying to make a custom rarity of 0.0 xD

#

So using this I'll just make a handful of fake jokers, no collection them, and set them to not spawn.

#

Them boom easy peasy "sprites" for the quips

robust marsh
#

would anyone know how do something like the fool but for jokers? I just want it to record a highlighted joker's key when used and that's all it has to do

daring fern
high verge
#

Ignore the helluva particles let's goooo.

civic talon
#

hey, apologies if this is bothersome, but i'm experiencing a problem that i believe requires a specifically made mod to fix. the game keeps on crashing without producing an error screen when it tries to save my game (after i play a hand, after i reroll, etc.) which is probably due to the fact that i have 2500 double tags and my save file is over 150kb. i already looked around to see if there was a mod that could help reduce the save file size, and the only one i found didn't optimize double tags at all, meaning it didn't fix the problem. please let me know if you can help me out here.

civic talon
#

i already tried that, and as mentioned it didn’t help

daring fern
civic talon
#

bummer

#

well, thanks for trying to help

analog raft
high verge
# analog raft :D

I still don't know how to actually make them do anything but that's for later ❤️

#

I got distracted by the thing I was originally doing

high verge
#

In jank we trust

robust marsh
#

what's the equivelent of G.jokers.highlighted for jokers in the shop?

daring fern
robust marsh
#

ty

light canyon
#

My mod doesn't work

rotund sable
#

Ok

light canyon
#

Ok

robust marsh
light canyon
#

How

robust marsh
#

What doesn't work?

light canyon
robust marsh
daring fern
#

How does one do card_eval_status_text but with a position instead of a card?

light canyon
vast bridge
#

How key for vanilla tarots should look like?
c_lovers or lovers?

rotund sable
# light canyon Ok

-# if you don't describe the issue nobody will help, what are we supposed to do with the information that your mod (you can't be more generic) doesn't work

wispy falcon
#

How do I add a little window next to a card/description?

rotund sable
wispy falcon
rotund sable
#

info_queue in loc_vars then

daring fern
wispy falcon
rotund sable
#

Yeah

#

It should work

wispy falcon
#

Okay and how do I make custom ones? Like where do I write them?

rotund sable
#

There's also this way

rotund sable
wispy falcon
rotund sable
#

I think you would need an entry in the localisation files for that

willow scroll
#

(green seal is an example key here)

#

something a la this

wispy falcon
#

Okay, thank y'all

willow scroll
#

though it doesnt have to go into descriptions/Other if the thing youre putting into the info queue already has an existing description, then you just call that key iirc

frail parcel
#

how do i increase amount of shop slots?

wispy falcon
willow scroll
wispy falcon
#

The whole file?

willow scroll
#

just the important part

wispy falcon
#

I have idea_credits = { name = "{C:green}Idea:", text = { "{C:purple}TheDogVT (Twitch)" }, },

in the Other = {} part of descriptions and info_queue[#info_queue+1] = localize('idea_credits') in the loc_vars of the joker

willow scroll
#

Other itself is inside descriptions = {}, right?

wispy falcon
#

Yes

willow scroll
#

and the default lua file is correctly placed, right?

wispy falcon
#

Well, all things in my localization file work so yes

willow scroll
#

then i dont know 😔 sorry but i gtg to work

#

gl with the problem

wispy falcon
#

It's okay, thank you anyways :3

daring fern
wispy falcon
daring fern
wispy falcon
daring fern
crimson dune
#

I am currently trying to decouple my mod from being dependent on Cryptid, but I have trouble with one of my Jokers; the mult/chip bonus is not saving at all whenever a hand level is levelled up afterwards and reverts to the usual hand mult and chips for that level. This is supposed to be a slightly weaker but more specific and scalable version of Universium, but for planet cards held in hand. This is part of my existing code responsible for levelling up:

function exponentLevelExtra(hand,exponent,v,instant)
    --print("g")
    if not instant and (not Talisman or not  Talisman.config_file.disable_anims) then
        update_hand_text(
            { sound = "button", volume = 0.7, pitch = 0.8, delay = 0.3 },
            {
                handname = localize(hand, 'poker_hands'),
                chips = G.GAME.hands[hand].chips,
                mult = G.GAME.hands[hand].mult,
                level = G.GAME.hands[hand].level
            }
        )
    end
    G.GAME.hands[hand].mult = G.GAME.hands[hand].mult*exponent
    G.GAME.hands[hand].chips = G.GAME.hands[hand].chips*exponent
    if not instant and (not Talisman or not Talisman.config_file.disable_anims) then
        delay(0.1)
        update_hand_text({delay = 0}, {mult = G.GAME.hands[hand].mult, StatusText = true})
        G.E_MANAGER:add_event(Event({
            trigger = "after",
            func = function()
                play_sound("multhit2")
                v:juice_up(0.8, 0.5)
                return true
            end,
        }))
        delay(0.1)
        update_hand_text({delay = 0}, {chips = G.GAME.hands[hand].chips, StatusText = true})
        G.E_MANAGER:add_event(Event({
            trigger = "after",
            func = function()
                play_sound("xchips")
                v:juice_up(0.8, 0.5)
                return true
            end,
        }))
    end
end

Any ways for hand levelups to save existing mult/chip bonuses?

daring fern
#

But it would still return 'ERROR'

stiff quiver
#

can I set animation atlases to jokers? I assume I can

red flower
#

nope

#

you need to animate manually

daring fern
crimson dune
#

I'll try that

stiff quiver
red flower
#

you need to code the animation yourself

cursive gazelle
#

<@&1133519078540185692>

#

I recommend using code since no one wants dependency to play their mod

agile path
#

good morning chat

cursive gazelle
#

Morning

agile path
#

while i was sleeping, i had a dream where i was playing with my lgbt mod

#

and came up with an idea

cursive gazelle
agile path
#

is it possible to make a scalling joker that does the following

cursive gazelle
#

I give up on understanding lovely patches

red flower
agile path
#

starts at 0 chips
playing specific hands upgrades it
playing other hands downgrade it
at reaching a certain amount of chips, it doesn't scale up anymore but it remains at a certain level

cursive gazelle
#

I can’t find anything

red flower
#

there's faq for it in the vanillaremade wiki too

agile path
#

i think i can do it

#

it's just a bunch of ifs and elses no?

red flower
#

that's most of programming yes haha

agile path
#

i can look at the code of the scaling blahaj i made

agile path
#

can i also add a custom variable to it?
playing x hands levels variable by 1, playing y hands downgrades variable by 1
once variable reaches a certain level, it doesn't scale down or up but remains there

manic rune
#

is it possible to change the color of a node thats already in an UIBox

red flower
#

the easiest is with a func but you can also find the node and change the colour in the config

agile path
#

i was also watching some tutorials on how to code in lua, so i can get better too

agile path
#

y'all proud

manic rune
#

it didnt change though 3:

red flower
#

ui is hard

manic rune
#

ghhh

#

i need to highlight the button somehow

#

😭

cursive gazelle
#

Redesigning handy rn and the amount of code is insane

wintry solar
manic rune
#

mm

narrow merlin
#

How would I have the balatro music change when you have 1 hand?

red flower
#

i dont remember the exact variable for hand left

narrow merlin
red flower
#

which part is the problem

narrow merlin
#

Idk

#

Idek how to start the code

red flower
narrow merlin
#

Mmkaeee

robust marsh
#
   can_use = function(self, card)
    ensure_CSData()
    if G.GAME.CSData.sroundkeeper >= 8 and #G.jokers.highlighted > 0 then
        for _, j in ipairs(G.jokers.highlighted) do
            if j.config and j.config.center and j.config.center.key ~= "j_tdec_dried_joker" then
                return true
            end
        end
    end
    return false
end
    use = function(self, card, area, copier)
        ensure_CSData()
        for _, j in ipairs(G.jokers.highlighted) do
            if j.config and j.config.center and j.config.center.key ~= "j_tdec_dried_joker" then
                G.GAME.CSData.sketched_joker_key = j.config.center.key
                G.E_MANAGER:add_event(Event({
                    func = function()
                        card:juice_up()
                        G.GAME.CSData.sroundkeeper = 0
                        G.GAME.CSData.sketchrecordactive = true
                        G.GAME.CSData.messagesketch = false
                        return true
                    end
                }))
            end
        end
    end,

I don't exactly know how to make it so you can also record the key of a highlighted shop joker. I've tried using G.shop_jokers.highlighted but I have no clue how to handle it. I'm genuinely clueless please help

red flower
#

G.shop_jokers.highlighted[1] and G.shop_jokers.highlighted[1].config.center_key ?

vast bridge
#

How to make card return to hand after scoring?

wintry solar
#

anyone know what the value is that controls the speed up of animations when scoring?

wispy falcon
#

How do I make it, so that an enhancement only activates, when the card with it is played?

agile path
#
    key = "pride_parade1",
    atlas = 'pride_parade',
    pos = { x = 0, y = 0 },
    rarity = 2,
    discovered = true,
    blueprint_compat = true,
    eternal_compat = true,
    cost = 5,
    config = { extra = { chips = 0, chips_gain = 5 }, },
    loc_vars = function(self, info_queue, card)
        return { vars = {card.ability.extra.chips} }
    end,

by starters, would this work?

cursive gazelle
#

Your SMODS.Joker is open

agile path
#

i know this, i just copied the code wrong

cursive gazelle
#

And try to fix your syntax

#

Idk if it’s because i’m on phone

#

But the lines don’t line up

#

If you’re coding on vscode there’s a lua extension that helps a lot

#

Maybe try installing it

cursive gazelle
#

A vscode extension

#

For lua

#

Debugging

cursive gazelle
#

Do you mean a custom enhancement or all including gold / steel

#

<@&1133519078540185692>

narrow merlin
wispy falcon
#

<@&1133519078540185692>

cursive gazelle
#

Elon musk wants to give me money

#

What a kind guy

karmic creek
#

yeet

wispy falcon
cursive gazelle
#

And edit it

manic rune
#

anyone knows wheres the code that adds the outlines on buttons when ur using controllers 🤔

#

i tried using recalculate for changing the color of the button but it doesnt work sadly

frigid elm
#

im just guessin tho

narrow merlin
frigid elm
agile path
cursive gazelle
#

That’s not too much actually 😭

agile path
#

for someone who never coded in lua, it's monumental lol

next timber
#

i tried putting delay(1.0) at the end of an event to make it hold at the end before doing anything, but that did nothing, and i tried increasing the delay variable of the event, but that made the start longer. how do i make it hold on the end longer? do i have to start an empty event with a long delay?

agile path
#

my point is, i already know these things

#

i just never made a chip joker, so i am not very familiar with it

cursive gazelle
#

It’s just chips instead of mult

#

Literally the same

agile path
#

but is chips_gain valid?

robust marsh
cursive gazelle
agile path
#

so... goes in loc_var

cursive gazelle
#

You can name it anything if it’s in your config

#

As long as you use it properly

#

Loc_vars returns the variables to be displayed in loc_txt

narrow merlin
red flower
#

check if hands left is 1, check how the vanilla jokers do it

agile path
#

@cursive gazelle

    key = "pride_parade1",
    atlas = 'pride_parade',
    pos = { x = 0, y = 0 },
    rarity = 2,
    discovered = true,
    blueprint_compat = true,
    eternal_compat = true,
    cost = 5,
    config = { extra = { chips = 0}, },
    loc_vars = function(self, info_queue, card)
        return { vars = {card.ability.extra.chips} }
    end,
        
            
    calculate = function(self, card, context)
        if context.before and (context.scoring_name == "Pair") and not context.blueprint  then
            card.ability.extra.chips = card.ability.extra.chips + 4
            return{
            message = localize("+4!"),
            colour = G.C.BLUE,
            }
        end
        if context.joker_main then
            return {
                chips = card.ability.extra.chips
            }
        end
    end
}
manic rune
#

uhhhhhhhhhhhhh

#

uiboxes can be juiced up right

cursive gazelle
#

You need to fire a flag to SMODS.music to replace background music i think

#

Or can you call it in joker code ?

#

Idk

cursive gazelle
frigid elm
#

I'm guessing they're asking if hover ui can be juiced up like jokers

daring fern
cursive gazelle
#

Idk about the localize tho

manic rune
agile path
manic rune
#

i was wondering if i can just call :juice_up()

agile path
#

plus, this is from a different joker, so the localize in that joker works well

frigid elm
cursive gazelle
manic rune
#

since i dont see function UIBox:juice_up

cursive gazelle
frigid elm
manic rune
#

doesnt really seem like theres any that would juice up the uibox

frigid elm
#

are UIBoxes defined as Centers tho or?

wintry solar
#

you can just call :juice_up on them bepis

red cradle
#

where is Tarot?

manic rune
#

:3 i see

cursive gazelle
#

Bepis you need to show me how that looks like

frigid elm
#

same here\

cursive gazelle
red cradle
#

oh

#

i see

#

)

cursive gazelle
#

Yes

narrow merlin
red cradle
frigid elm
cursive gazelle
#

They know how to style they just typed a ) instead of }

frigid elm
#

whenever i wanna do certain colors i just cv from it

#

oh

manic rune
#

.

#

oh

#

its UIElement, not UIBox

#

fml

frigid elm
# red cradle silly me)

tbh coding in lua is kinda confusing like

theres functions that are typed like localise{} but also use the standard ease_dollars()

cursive gazelle
red flower
# narrow merlin How does this look?

good, 2 things: the return should be [condition] and 1000000 or false or something like that, you need to return a big number
the key should also contain the word "music" in it

#

<@&1133519078540185692>

manic rune
#

<@&1133519078540185692>

#

wait how do i get to a specific node from an UIBox 🤔

red flower
red flower
manic rune
#

ic

#

thank

narrow merlin
red flower
cursive gazelle
#

Just change the value until you’re satisfied

narrow merlin
red flower
#

yeah

narrow merlin
#

Yay!

next timber
red flower
#

you might need to check if youre in a run tho i dont remember

narrow merlin
#

Imma check it soon