#💻・modding-dev

1 messages · Page 123 of 1

merry raven
#

I am TRYING to add a new button to the HUD

rough furnace
#

what did you do?

merry raven
#

Lovely patched to add a button

tall wharf
#

adding buttons to other buttons probably won't help much but fair

rough furnace
#

Should probably hook create_UIBox_HUD

merry raven
#

How do I do that

rough furnace
#

however you hook anythng

#

idk how you would wnat to do it

#

but it's where the stuff on the left is defined

merry raven
#

I don't even know what "hooking" is unless it's another way of saying Lovely patching or overriding functions

rough furnace
#

yes

merry raven
#

?

#

My brain is dense as fuck I am not getting you, is it former, latter or both

rough furnace
#

it usually referes to overriding fnctions but it's kinda both

forest hinge
#

surely there's a function for "is this card actually in my deck or am I just hovering it from somewhere else"?

rough furnace
#

SMODS.find_card?

#

unless you mean playing card

forest hinge
#

find card will find any joker with a certain key right? I specifically mean given some card ref determine if it's in my joker slots or shop/collection/etc

#

unless find_card can take a reference instead of a key?

merry raven
#

Ah takes me back to the days of doing CSS

tall wharf
#

don't put relative on parent

#

some shit like that

merry raven
#

Yeah this ain't it

tall wharf
#

idk

storm oar
#

yeah ui stuff is kinda just aaaaaAAAAA

#

especially trying to fit stuff into existing ui

rough furnace
forest hinge
#

very good

#

ship it

tall wharf
#

chat

#

is this how i add custom function to a joker card

livid tapir
#

would it be appropriate to put {C:attention} to Ace and 10?

rough furnace
steep rain
#

Where do I add the description here

livid tapir
# steep rain Where do I add the description here

is that..
uh
i--
here

SMODS.Joker {
    key = 'claimhSolais', -- put the key as whatever you want, simplify it tho
    config = {extra = {x_mult = 3, x_chips = 3}}
    loc_txt = {
        -- this is where the name (the one you see ingame) and the description are
        name = "Claimh Solais",
        text = {
            -- whatever you want to put here as the description (multiple strings to get more lines instead of big horizontal)
        }
-- the rest of it is (seemingly) completely fine so put the rarity, cost, blueprint_compat, etc where you had it originally
    }
}
steep rain
#

yeah but that isnt the format Im using

livid tapir
#

oh ok

#

then you still do the loc_txt thing for the name and text, and the key too

steep rain
#

your code says "SMODS.Joker" when Im doing "local jokerInfo"

steep rain
livid tapir
#

ok
still for the description, name and key you do smth like (with your format in mind)

local jokerInfo = {
    -- imma only put the loc_txt and key and stuff thats important to your question
    key = 'claimhsolais', -- put the key as whatever you want, simplify it tho
    loc_txt = {
        name = "Claimh Solais",
        text = {
            -- the description
        }
    }
}```
tall wharf
#

why does it trigger at the end 😭

#

wrong video

#

do i not gotta use the event queue

steep rain
quaint latch
#

why does this code give me a crash about a card local being nil

        if context.end_of_round and not context.repetition and context.game_over == false and not context.individual then
            -- remove all crowd cards from deck
            for i = 1, #G.hand.cards do
                if (SMODS.has_enhancement(G.hand.cards[i], "m_bi_crowd")) then
                    G.hand.cards[i]:remove()
                end
            end
quaint latch
#

actually, can you verify that both are executed?

#

could be that lua only executes the last appearing calculate func

steep rain
quaint latch
#

just slap a differing debugMessage in both to check if both are actually being executed

iron olive
#

what files are required for a modpack to be recognized by lovely? i have the assets themselves but idk what else would need to be added

steep rain
violet void
#

Hello, can I nest stuff in ['Other']?

If so, how do I access it?

quaint latch
#

theres your problem

#

Put both into the same function

forest hinge
#

I'm trying to do some logic in playing_card_added to the card that's added to the deck, but context.cards is just giving me a table with a single true boolean in it. Am I looking in the wrong field to get the added card?

quaint latch
#

and return both Xchips_mod and Xmult_mod

#

nvm

steep rain
quaint latch
#

Yeah

forest hinge
#

hmm - in context.playing_card_added, when I buy a card from a standard pack, context.cards[1] gives me a real card. When I do it from DNA, it just gives me 'true'

#

could it be because DNA is returning {true} rather than the actual created card??

return {
    message = localize('k_copied_ex'),
    colour = G.C.CHIPS,
    card = self,
    playing_cards_created = {true}
}
tall wharf
dusk shoal
#

why did it do a fucking cartwheel

tall wharf
dusk shoal
#

the joker

#

it cartwheeled

tall wharf
#

oh

#

lmao

#

THAT video

dusk shoal
#

ok i scrolled up

#

thats super complicated

#

but also

#

really funny

steep rain
dusk shoal
#

definitely great early

tall wharf
#

:)

#

i am not done with them

dusk shoal
#

are you making an entire mod of minecraft redstone components

#

cuz thats really funny

tall wharf
#

i am just making what i want to

dusk shoal
#

which just so happens to include a lot of

#

minecraft redstone components

#

i see

steep rain
tall wharf
#

idk why it says 1 still

dusk shoal
#

oh god repeater seems awesome

dusk shoal
#

great consistancy

tall wharf
#

free

#

free x2

violet void
tall wharf
#

please do not mind the art i am a programmer

violet void
#

same

dusk shoal
#

get your friends to do the art

#

ez

#

thats what i do

tall wharf
#

i am that one friend who does art

violet void
#

the art of programming

tall wharf
#

@steep rain do you love kasane teto

steep rain
#

I LOVE HER SO MUCH

steep rain
# violet void whats the code
    if context.joker_main and context.cardarea == G.jokers then
        return {
            message = localize{type='variable',key='a_xmult',vars={card.ability.extra.x_mult}},
            message = localize{type='variable',key='a_chips',vars={card.ability.extra.x_chips}},
            Xmult_mod = card.ability.extra.x_mult, 
            Xchip_mod = card.ability.extra.x_chips, 
        }
    end
end```
tall wharf
#

is this eval_this moment

violet void
#

can you put that text between ```

#

but anyways, you cant use a return for two messages
-# or I think so

tall wharf
#

SMODS.eval_this

#

i think that's what u do

random sleet
#

i love eval_this.png

steep rain
#

okay but where do I put the SMODS.eval.this

#

what part of my code do I put it in

tall wharf
#
            SMODS.eval_this(card, {
              -- the mult thing
            })
wintry swallow
#

how would you force skip an opened pack without being able to hit the skip button

dusk shoal
#

if you wanna learn that you might have to tear open balatro’s code and see how packs themselves function

storm oar
#

what does eval_this even do anyway?

frosty dock
#

allows you to evaluate multiple effect in the same context
-# better calc 2.0 makes it redundant in part since you can always pass multiple effects like you can in context.individual

#

may still need to be used if you want multiple custom messages though

wintry swallow
#

i keep having a recurring but that causes immense lag and the inability to skip opened packs so i was curious

wintry solar
#

You can do multiple messages in better calc too assuming they relate to other modifiers

violet void
#

If I want to add a new color for formatting I would need to hook these 2 functions right?

#

to use it like {G:newcolor}{}

wintry solar
#

For formatting text descriptions?

violet void
#

yes

#

tried this but it crashes

wintry solar
#

You can do G.ARGS.LOC_COLOURS[‘nameofcolour’] = HEX(‘code’) too

#

Which should work, it might need a rogue loc colour call somewhere though I don’t remember

bold sleet
#

jelp the thing is not doing the thing (halve blind's chip requirements)

frosty dock
#

== true moment

#

also that warning is bs

bold sleet
#

ah

#

why it not worky?

#

(the Test message actually prints)

wintry solar
#

It might be working just not updating the display

bold sleet
#

ah

#

Guess I'll check.

#

is there a way to update the display?

tall wharf
bold sleet
#

wtf is that?

tall wharf
bold sleet
#

trigillion jokers

#

idk

tall wharf
bold sleet
#

I haven't worked with UIs at all

wintry solar
#

Yeah

#

I think you can just rip the update function

bold sleet
#

And plug my funny values if needed

violet void
merry raven
#

Added a new UIBox that can be accessed from a button, but for some reason I can only click it once, after closing it I can't open it anymore unless I play a hand, discard or start a new run

Any insights?

#

I'll provide code if needed, but it's a bit long

wintry solar
#

If you DM me the code I’ll take a look this afternoon for you

merry raven
#

Alrighty then

wet sand
#

i have a ui issue (seems to be a common theme tonight) where i have a consumable that increases the ante and the numbers on most places don't visually update

zealous glen
#

As the displayed value isn’t the stored value

#

There’s probably some update or recalculate or whatever function that does it easily

wet sand
#

i fixed this ui (this ui is updated on the spot, i was just missing a value in my code)

crisp coral
merry raven
#

Fuck. I have it

#

It's one_press

crisp coral
#

rip

merry raven
#

I just directly copied Run Info's UIBox

wet sand
dry merlin
#

What mod can I download to have essentially a sandbox mode/creative mode?
To give myself specific jokers or consumables to test things, whether vanilla cards or modded

wet sand
#

debugplus enables the built in debug mode (and adds a few more features), you can press tab to view the hotkeys

dry merlin
#

Awesome thank you

zealous glen
#

I remember messing with that UI but it was to add a tooltip to it

wet sand
#

it doesnt update when all the other screens do

runic pecan
#

At what point should I make a thread for the mod I'm making right now?

maiden phoenix
#

People do one even for concepting so anytime

tepid crow
#

Yeah it's up to you. Some people start a thread when they have no art or code, only a concept. Some people do it when close to completion, and others do it when their v1 is ready.

willow bluff
#

Hola! alguien que hable español por aquí?

storm oar
willow bluff
#

sorry

quaint kettle
tall wharf
#

who needs balancing

frigid jetty
#

Did something change in the latest steamodded update? The enhancement I made now returns this error

crisp coral
#

yes

#

a lot

frigid jetty
#

Ah dang

wintry solar
#

Enhancement calculation now works like any other calculation

frigid jetty
#

Ok it works now, but now it evaluates the card multiple times for some reason

wintry solar
#

What context are you using?

frigid jetty
wintry solar
#

Use if context.cardarea == G.play and context.main_scoring then

frigid jetty
#

ah, gotcha

cunning quartz
#

Does anyone know of a way to destory a non scoring playing card before anything happens

#

So lets say a 22 88 K 2 pair, the king gets destroyed before anything happens

frigid jetty
weary jungle
#

im trying to upgrade the next played poker hand before scoring, where would i patch?

frosty dock
#

wdym the next played..?

weary jungle
#

like you use the consumable (its a consumable) then the next played hand is upgraded

#

i already have a global to know when to upgrade, and one that stores the upgrade, but im not sure where id patch

wet sand
#

i want to add a seal to my mod but theres already like 4 mods that add some sort of spectral seal NOOOOOOOOOOOOO

bold sleet
#

Hello, quick question: Do consumables have this calculate = function() -- stuff end thing? And if they do, when is it triggered?

frosty dock
#

but with better calc 2.0 they get all joker contexts

weary jungle
frosty dock
#

i.e. keep the consumable when used but make it unable to be used again, then activate its effect and destroy it in context.before

bold sleet
#

idk tbh

frosty dock
#

new steamodded feature

bold sleet
#

I need this to trigger uh... as often as possible.

#

Or at least before any card scores.

frosty dock
#

what do you want exactly?

weary jungle
#

so i can use contexts in my consumable?

wet sand
# weary jungle what does the seal do?

i mean most spectral seals work like blue seal and only trigger if its in hand at end of round. i think for mine i would put it on scoring and make it forcefully add a spectral card, destroying a random (non-negative) consumable if you dont have an open slot

bold sleet
weary jungle
frosty dock
frosty dock
wet sand
weary jungle
#

destroy the card?

#

that the seal is on like azure seal from cryptid

wet sand
#

maybe

#

maybe something like glass where it has a chance to be destroyed

weary jungle
#

im just gonna do my mod without new calc if most mods dont support it

#

nvm i really want contexts

wintry solar
#

they only dont support it because its new

#

and its only mods that do editions/enhancements/any talisman dependencies that won't work without changes

weary jungle
#

what are some examples of things that would need to be changed?

wintry solar
#

oh also any mods that inject into evaluate play or eval card

viscid bough
#

How can i recreate the blueprint/brainstorm ability in my own joker?

wintry solar
#

BUT OTHER THAN THAT they should be okay

weary jungle
wintry solar
#

any calculations

weary jungle
#

im not sure what thaat means

#

like anything that for example gives mult?

#
    --glass
    key = "SturdyGlass",
    atlas = "Tatatro",
    pos = {x = 5, y = 2},
    unlocked = true,
    discovered = true,
    loc_vars = function(self, info_queue, card)
        return {vars = {G.GAME.probabilities.normal, (card and card.ability.extra.DbfChance) or 5}, key = (card and card.config.center.key) or "m_TGTM_SturdyGlass"}
    end,
    config = {
        extra = {DbfChance = 5},
        x_mult = 2
    },
    calculate = function(self, card, context, effect)
        if context.cardarea == G.play and not context.repetition then
            if pseudorandom(pseudoseed("SturdyGlassDebf")) < G.GAME.probabilities.normal/card.ability.extra.DbfChance then
                effect.x_mult = 1
            else
                effect.x_mult = 2
            end
        end
    end

}``` is this ok?
wintry solar
#

no

frosty dock
#

here the context needs changing

wintry solar
#

that won't work

merry raven
wintry solar
#

the effect jank is gone

frosty dock
#

and it uses return values now

merry raven
#

I didn't think it was THIS SOON

teal estuary
#

i can finally copper my cards!!!! yipeee!!!!

merry raven
#

Oh god if I update my Steamodded now is everything going to break

weary jungle
#

let me check the wiki..

#

ok the wiki is outdated

wintry solar
#

yeah we've not updated the wiki yet

merry raven
#

Wait so the effect parameter is just gone?

wintry solar
#

yup

merry raven
#
calculate = function(self, card, context, effect)
        if context.cardarea == G.play and not context.repetition then
            effect.x_mult = 3
            card_eval_status_text(card, 'extra', nil, nil, nil, {
                message = "Unblinded!",
                sound = "fm_blind",
                colour = G.C.BLUE
            })
        end
    end

One of my examples, what should I replace it with then

#

Remove effect from the function parameters
And replace all instances of effect. to what?

dreamy thunder
#

how do i change enhancements of cards? i cant figure it out

teal estuary
#

so can enhancements use all contexts? (obviously not joker-specific ones, but you get my point)

wintry solar
#
return {
  xmult = 3,
  message = 'Unblinded!',
  sound = 'fm_blind',
  colour = G.C.BLUE
}```
#

that shoud replicate that

#

oh and the context to if context.cardarea == G.play and context.main_scoring then

dreamy thunder
teal estuary
merry raven
#

Like this?

calculate = function(self, card, context, effect)
        if context.cardarea == G.play and context.main_scoring then
            return {
                xmult = 3,
                message = 'Unblinded!',
                sound = 'fm_blind',
                colour = G.C.BLUE
            }
        end
    end
dreamy thunder
#

i tried to find it

wintry solar
#

yeah that should work

dreamy thunder
teal estuary
merry raven
#

haha yeah

#

But Enhancements with no calculate function should just be fine right?

SMODS.Enhancement {
    key = "circling_fish",
    loc_txt = {
        name = "Circling Fish",
        text = {
            "....."
        }
    },
    atlas = 'Enhancements',
    no_rank = true,
    no_suit = true,
    always_scores = true,
    in_pool = function(self)
        return false
    end,
    overrides_base_rank = true,
    replace_base_card = true,
    pos = {x=6, y=1}
}
wintry solar
#

yeah they should be fine

dreamy thunder
#

or im just blind

merry raven
#

I am not going to enjoy fixing all the bigger Enhancements

teal estuary
#

im 99% sure tarots are in card.lua

dreamy thunder
#

i mean nothing shows up when i search justice

weary jungle
#
            if pseudorandom(pseudoseed("SturdyGlassDebf")) < G.GAME.probabilities.normal/card.ability.extra.DbfChance then
                local x_multtt = 1
            else
                local x_multtt = 2
            end

            return {
                xmult = x_multtt
            }
        end``` is this now good?
wintry solar
#

yeah that'll work

wintry solar
dreamy thunder
weary jungle
#

how do i fix editions? do i put the return in connfig?

weary jungle
#

this sets the ability of all the selected cards to glass

#

i belive

dreamy thunder
#

lemme try

wintry solar
#

editions should also use a calculate now

merry raven
merry raven
#

Alrighty then

weary jungle
#

wait.. do all consumables use a calculate now???

merry raven
#

And the calculate function actually uses a return function now, so all effects and parameters are dumped in there?

#

Forget my question it was stupidly worded but
Anything with effect.xxxxx and card_eval_status_text parameters are now combined into a return function?

cunning quartz
#

Anyone know why card:start_dissolve() creates a ghost card but shatter() doesnt?
and if theres a correct way to use start_dissolve?

frosty dock
#

but calculate can be used for anything a joker can do

wintry solar
# weary jungle how do i fix editions? do i put the return in connfig?

there are 5 main contexts for editions now, though you can use any of them. You should probably use a combination of (context.cardarea == G.play and context.main_scoring) for scored cards, (context.cardarea == G.hand and context.main_scoring) for held card effects, ~~ context.joker_main for joker effects~~, context.pre_joker for effects before the joker itself triggers, and context.post_joker for effects after the joker triggers

merry raven
#

Anything else belonging into the return function? Maybe card.ability.extra.xxxx?

wintry solar
#

no that modifies the values in your card

merry raven
#

Righto

wintry solar
#

the return table basically adds it all to what effect referenced before

merry raven
#

Here's a slightly more complex example:

calculate = function(self, card, context, effect)
        if context.cardarea == G.hand and not context.before and not context.end_of_round 
           and card.ability.extra.hands_seen < 1 then
            card.ability.extra.hands_seen = card.ability.extra.hands_seen + 1
            card_eval_status_text(card, 'extra', nil, nil, nil, {
                message = "Amplified!",
                sound = "fm_amplified",
                colour = G.C.BLUE
            })
        end
        if context.cardarea == G.play and not context.repetition then
            if card.ability.extra.hands_seen > 0 then
                effect.mult = 15
                card.ability.extra.hands_seen = 0
            end
        end
     end

So I replace:

  • not context.repetition with context.main_scoring
  • card_eval_status_text with a return function with those parameters in it
  • replace effect.mult with a second return function under if card.ability.extra.hands_seen > 0 then, inside it is mult = 15 only?
frosty dock
#

-# what is a return function

wintry solar
#

yeah that should work perfectly

merry raven
#

Alright alright not too bad

#

Anywhere effects goes, return{} replaces it

frosty dock
#

if you have multiple things you're putting in effects in the same context, ofc these go in the same return table

#

but yes

merry raven
#

yeah I get that, like this one

if context.cardarea == G.play and not context.repetition then
            effect.x_mult = 3
            card_eval_status_text(card, 'extra', nil, nil, nil, {
                message = "Unblinded!",
                sound = "fm_blind",
                colour = G.C.BLUE
            })
        end
frosty dock
#

and make sure it goes at the end of each block

weary jungle
#

So my ""implementation"" of post round effects are not nessesary?

merry raven
#

2 conditions under the same context

frosty dock
viscid bough
#

Does anyone know how to recreate the blueprint/brainstorm effect in a custom joker?

wintry solar
merry raven
frosty dock
merry raven
#

So that's a yes?

frosty dock
#

if that's what you mean, then yes

merry raven
#

Aight cool

#

I want to minimize as much headache as possible

frosty dock
#

actually I think it's simply an error in lua to put statements after a return

wintry solar
#

yeah it just crashes

merry raven
#

Ah

#
if context.cardarea == G.play and not context.repetition then
            if card.ability.extra.rank_increase > 0 then
                local original_rank = card.base.id - card.ability.extra.rank_increase
                local suit_prefix = string.sub(card.base.suit, 1, 1)..'_'
                local rank_suffix = original_rank < 10 and tostring(original_rank)
                    or original_rank == 10 and 'T'
                    or original_rank == 11 and 'J'
                    or original_rank == 12 and 'Q'
                    or original_rank == 13 and 'K'
                    or 'A'

                card:set_base(G.P_CARDS[suit_prefix..rank_suffix])
                card.ability.extra.rank_increase = 0
                card.ability.extra.last_hand_number = -1
                card_eval_status_text(card, 'extra', nil, nil, nil, {message = "Reset!"})
            end
        end

What about something like this, are the only changes I have to do are to turn card_eval_status_text into a return function and replace not context.repetition?

Sorry for asking basically the same questions I just need to really, really make sure lmao

dreamy thunder
#

can i make jokers have a use function?

merry raven
#

card functions, etc, do they go in there?

wintry solar
#

anything on card stays the same

frosty dock
#

this falls apart horribly with any custom suits or ranks

merry raven
#

Yeah,,,,

#

I can't really take account for all mods that exists or will be made

frosty dock
#

well steamodded has APIs for this and custom suits/ranks aren't all that rare

#

-# well ranks are

#

speaking of

#

i should provide util functions to increase/decrease a card's rank

quaint latch
#

why does this not remove the cards like i want to :(

        if context.end_of_round and context.game_over == false then
            -- remove all crowd cards from deck
            for i = 1, #G.deck.cards do
                if (SMODS.has_enhancement(G.deck.cards[i], "m_bi_crowd")) then
                    G.deck.cards[i]:remove()
                end
            end
        end
frosty dock
#

G.deck.cards[i]:start_dissolve()

quaint latch
#

wait whats the difference

#

i mean, thank you so much but how

merry raven
#

It has an animation and I don't know if remove actually exists

#

And also proper card destruction handling

quaint latch
#

it does

dreamy thunder
frosty dock
dreamy thunder
#

wdym?

frosty dock
#

jokers don't have a use button that allows you to use them

#

if you make them have one, they can indeed have a use function

dreamy thunder
#

how can i make them have the button though

frosty dock
#

you'd need to lovely patch into G.UIDEF.use_and_sell_buttons

merry raven
#

And that in itself is a can of worms

quaint latch
#

but this works excellently

#

no playing or discarding when this card is selected :D

merry raven
#

How did you figure that out
I was trying to do that for days but ended up scrapping the idea

frosty dock
#

it has only cards in your literal deck pile, i.e. ones you haven't drawn

quaint latch
quaint latch
frosty dock
#

G.playing_cards has all of your playing cards

merry raven
#

I dunno if there is a special flag or identifier to denote that the card is cloned

frosty dock
quaint latch
#

it had to be added to deck though to add it to hand

#

still applies?

#
                    local _card = copy_card(context.full_hand[1], nil)
                    _card:set_ability(G.P_CENTERS.m_bi_crowd, nil, true)
                    _card:add_to_deck()
                    G.deck.config.card_limit = G.deck.config.card_limit + 1
                    table.insert(G.playing_cards, _card)
                    G.hand:emplace(_card)
                    _card:start_materialize()
frosty dock
#

add_to_deck doesn't add the card to your deck

quaint latch
#

?????

frosty dock
#

it just evaluates effect that happen when you obtain the card

quaint latch
#

thats a goober move

#

I see, that makes sense

frosty dock
#

the card was never in G.deck

#

assuming it can't get there (or to the discard pile), you'd just need to go through G.hand.cards

wet sand
#

reposting this now that maybe more people are around who can help, how do i update this screen (referring to the "Choose your next Blind" screen) to have the correct values

quaint latch
#

okay this works beautifully

#

YE IT DOES

#

Thank you so much john

frosty dock
frosty dock
#

it would seem the current version doesn't destroy the cards at end of round if the joker is currently debuffed, and the cards are permanent if the joker were to get destroyed during a round (and is the last one you have)

quaint latch
#

Thats a really really good point actually

#

I didnt consider those scenarios

#

if debuffed, it should just not give a multiplier

violet void
quaint latch
#

if destroyed, id say destroy cards and draw new ones just like when you sell the joker

violet void
frosty dock
quaint latch
#

the steamodded wiki isnt particularly vocal about it, does it cause the calculate function to not run when a joker is debuffed?

frosty dock
#

indeed no calculation occurs on debuffed jokers

quaint latch
#

how would i add logic to that in that case

#

is there some on_destroy callback?

frosty dock
#

remove_from_deck is also called when a joker gets debuffed (and add_to_deck when rebuffed) with an extra argument indicating this is from a debuff

wintry solar
quaint latch
#

right so the callback is remove_from_Deck(is_debuff)

quaint latch
#

ahh

#

okay so this might be a dumb idea but what if i manually call the calculate function with my own context for the cause

frosty dock
#

uh why

quaint latch
#

i dont see the context in the parameters and i'm unsure on how to detect selling in that case

#

i tend to overcomplicate things when i have no point to go from

maiden phoenix
#

Theres a context for selling, check Campfire

quaint latch
#

yeah but not in remove_from_deck judging from johns screenshot

#

for calculate theres context.selling_self

maiden phoenix
#

Sorry if you got this asked 100 times but what effect are you trying to do?

quaint latch
#

Trying to fix a few edge cases that john brought to my attention

maiden phoenix
#

What your joker does?

quaint latch
#

for every hand you play in a round, it spawns one Crowd card. Each crowd card adds +2 mult plus one additional mult for every crowd card on hand. It also blocks the card slot as it cant be discarded or played

#

Selling the joker removes all crowd cards and immediately draws an equal amount of new cards from deck

maiden phoenix
#

What if its removed during shop?

quaint latch
#

nothing happens, you get your money and thats that

violet void
quaint latch
#

All crowd cards are removed from your hand after each round anyway

dry merlin
#

is it possible to add a new color for an addedk_xyz_ex value?
for example, add a new k_xyz_ex value that says something else and have the little square be purple?

wintry solar
#

oh you want it before hadn evaluation

weary jungle
#

wwhat contexts do consumables have?

quaint latch
#

I'll just failsafe it for now

quaint latch
tidal ice
frosty dock
tidal ice
#

oh like that

frosty dock
#

now it's all contexts that jokers also have

weary jungle
#

so before is real?

frosty dock
tidal ice
#

oh

weary jungle
#

also, how do i use the juice_card_until function

quaint latch
#

yea ill settle on a failsafe to remove all enhanced cards and reset variables when debuffed

#

what could go wrong TrollGlad

tidal ice
weary jungle
#

OH MY GOD!!! i can finnally remove the randdom joker i made!!!!

frosty dock
#

once the function no longer returned true (or you exit the run), it will stop juicing the card

quaint latch
#

speaking of, is it a bit too resource heavy to iterate over every highlighted hand every frame

frosty dock
#

yes

wintry solar
#

whats the reason for it?

frosty dock
#

there's probably a better way

quaint latch
#

disabling the play/discard button

#

with this absolute monstrosity


# Helper
[[patches]]
[patches.pattern]
target = 'functions/button_callbacks.lua'
pattern = 'G.FUNCS.can_discard = function(e)'
position = 'before'
match_indent = true
payload = '''
    G.FUNCS.has_crowd = function()
        if #G.hand.highlighted > 0 then
            for i = 1, #G.hand.highlighted do
                if SMODS.has_enhancement(G.hand.highlighted[i], "m_bi_crowd") then
                    return true
                end
            end
        end
        return false
    end
'''

# Crowded Discard Disable
[[patches]]
[patches.pattern]
target = 'functions/button_callbacks.lua'
pattern = '''
    if G.GAME.current_round.discards_left <= 0 or #G.hand.highlighted <= 0 then 
        e.config.colour = G.C.UI.BACKGROUND_INACTIVE
        e.config.button = nil
'''
position = 'after'
match_indent = true
payload = '''
    elseif G.FUNCS.has_crowd() then
        e.config.colour = G.C.UI.BACKGROUND_INACTIVE
        e.config.button = nil
'''
wintry solar
#

can't you hook into add_to_highlighted and remove?

#

or at least add a flag in those functions

quaint latch
weary jungle
#

just emplace the playing cards to G.jokers and then they cant be discarded egg

quaint latch
#

nuh uh

#

they are supposed to take a standard card slot away

#

can someone give me a quick rundown of hooks blobcatfearful

weary jungle
#

you create a refrence of the original function, then you override the function, making sure to execute the original function, profit

wintry solar
#
local hook = functionnamehere
function functionnamehere(original, args)
  -- insert code before here
  local ret = hook(original, args)
  -- insert code after here
  return ret
end
#

very basic skeleton here

#

so you can add your own code either to the beginning or the end of the original function without modifying it

#

for your case, I'd create a global count of the card in the highlighted hand, raise it in add_to_highlighted and lower it in remove_from_highlighted, then in your initial lovely patches you can just do if globalCounter then bla bla bla

quaint latch
#

that already helps so much thank you :D

weary jungle
#

could you lovely patch other mods?

weary jungle
frosty dock
#

if you build lovely from source or wait for 0.7.0 (which should hopefully come this week), this is possible

weary jungle
#

funny

frosty dock
wintry solar
#

I think you should be able to hook calculate_context too, right?

dry merlin
faint yacht
#

No, you just add the colour variable.

frosty dock
wet sand
#

the k_xyz_ex variables are literally just text. you just need to return the colour variable with your message

quaint latch
#

where do i put the hook though

faint yacht
#

i.e.

{
  message = "PURPLE GUY",
  colour = G.C.PURPLE
}
dry merlin
wintry solar
wet sand
#

yeah

quaint latch
#

anywhere?

#

👁️

wintry solar
#

not inside something else 😆

quaint latch
#

ofc hahah

wet sand
#

i think technically its anywhere that has a global context but yeah basically

quaint latch
#

Alrighty

#

something like this or am i dum

#

my head is friend basically at this point

#

wait

#

set the wrong value but otherwise

wintry solar
#

it needs to +/- not set

#

otherwise if you select 2 then deselect 1 it'll let you play

quaint latch
#

ohhhhh

#

thats smart true true

wintry solar
#

so G.bi_crowded_highlighted = (G.bi_crowded_highlighted or 0) + 1

quaint latch
#

got it :D

wintry solar
#

also in your case, you can condense the last two lines to just return hook(...)

#

and the original args bit and function names will need correcting

#

I think they're CardArea:add_to_highlighted, which would mean you'd need to check if self == G.hand too

quaint latch
#

uuuuuuhhhhhh

#

ill just continue later hahaha

tall wharf
#

rebalance?

frosty dock
wet sand
#
return {
    message = "This can literally say whatever you want",
    colour = G.C.PURPLE
}```
dry merlin
wet sand
#

look at my message directly above yours

#

this does exactly what you want

dry merlin
#

oh okay

tall wharf
#

do you guys think the PICKAXES are too overpowered

wet sand
#

diamond pickaxe maybe? but netherite seems pretty fine actually

wintry solar
#

that is a huge amount of chips

tall wharf
#

maybe 100

dry merlin
#

got confused cuz the formatting is a little different, but awesome thanks

tall wharf
#

let's pretend it has fortune

#

actually

#

which one is more preferrable

stiff locust
#

enchanted edition when

zealous glen
#

Silk Touch adds every Boss you defeat to your deck, so when you draw them you fight them again

#

No bonus hands tho

tall wharf
#

i mean

#

it's no longer called Aikoyori's Jokers

#

so i can add literally anything in it

zealous glen
#

I’d have thought it’s the other way around

#

If your mod isn’t named after yourself then you can’t add to it

winged nest
# tall wharf

can you make a bedrock edition toggle which solely disables QC

tall wharf
#

😭

zealous glen
#

It’s not aikoyori’s it’s now Bob’s

tall wharf
#

some guy's shenanigans

wooden nexus
#

Lovely question

#

If i put postion to "at" for the patch, does it replace?

zealous glen
#

It overwrites yes

wooden nexus
#

ok

#

I think i found how i can lovely patch the names so i can use whatever i want for the name of a playing card

#

I'm gonna test it out in a minute

quaint latch
#

I don't get the hook :(
It replaces it sure but I can't seem to get my logic to work

zealous glen
#

That’s a patch not a hook

#

Oh my bad

#

There’s a hook in the second image

quaint latch
#

Yeee

zealous glen
quaint latch
#

Wdym

zealous glen
#

what’s bi crowded

quaint latch
#

Should be, it's the original function in hooking right below there and it matches

#

a custom enhancement

quaint latch
zealous glen
wintry solar
#

it's not formatted correctly

#

replace add_to_highlighted with CardArea.add_to_highlighted

quaint latch
#

Elaborate

wintry solar
#

the function is stored within the object CardArea

#

so when you try and replace it by just using add_to_highlighted, it doesn't exist

zealous glen
#

@quaint latch is it something like this

fallen tendon
#

How might i go about changing the background shader?

quaint latch
worthy stirrup
#

How can I get a list of what jokers are being held?

worthy stirrup
#

G.jokers and not G.joker.cards?

fallen tendon
#

Well G.jokers.cards actually

#

Yeah

worthy stirrup
#

I tried that last time and the game kept crashing

fallen tendon
#

You might have to check if G.jokers exists beforehand

worthy stirrup
#

I had to concat it to make it a string so I could Tprint it

fallen tendon
#

Uhhhh

worthy stirrup
#

It’s been a while since I used Lua so I am quite rusty

quaint latch
fallen tendon
#

Most people just use print(inspect(table))

worthy stirrup
#

Oh, that sound so much easier

fallen tendon
#

So you can substitute table with G.jokers.cards

worthy stirrup
#

I’ll definitely try that as soon as I can

#

Thank you

fallen tendon
sudden dew
#

Is there a scoring context for whenever playing cards are destroyed? (i.e. would be triggered by glass card shattering or by trading card)

#

Tried cards_destroyed but doesn't seem to be working

quaint latch
wintry solar
#

put hook(self, card, silent) and change the . in the function line to a :

south girder
#

are there any mods that I can look at for an example of changing existing decks? I'm wanting to change Black Deck to start with the +4 Mult Joker already equipped

zealous glen
#

Or rather

#

Caino

south girder
#

I fiddled around with the source code to have it start with the Hieroglyph voucher as a substitute, and it works, but the localization's a bit weird

wooden nexus
#

-Heirogypth hand every round

hardy viper
#

-heiruryhth hand every round

south girder
# zealous glen Probably wrong loc_vars

I put this line in line 59 of back.lua (where the Black Deck is)
elseif name_to_check == 'Black Deck' then loc_args = {effect_config.joker_slot, localize{type = 'name_text', key = 'v_hieroglyph', set = 'Voucher'}}

wooden nexus
#

Ugh, why is this not working?

#

Trying to patch out the name of a card

zealous glen
wooden nexus
#

Name of a playing card

#
[[patches]]
[patches.regex]
target = 'functions/common_events.lua'
pattern = '''elseif specific_vars.playing_card then'''
position = 'at'
match_indent = true
payload = '''
elseif (specific_vars.playing_card and (_c.name ~= 'Stone Card') and  (_c.suit == 'Others')) then
    full_UI_table.name = {}
    localize{type = 'other', key = 'playing_card2', set = 'Other', nodes = full_UI_table.name, vars = {localize(specific_vars.value, 'ranks'), colours = {specific_vars.colour}}}
    full_UI_table.name = full_UI_table.name[1]

elseif specific_vars.playing_card then
'''```
zealous glen
wooden nexus
#

Unless I'm supposed to lovely patch in the freaking localization

zealous glen
#

When assembling the tooltip

wooden nexus
#

Hm?

zealous glen
#

@wooden nexus for the Credits

#

I have various weird strings then I identify which one is which to replace the name with Credits and some other string for the body

sudden dew
# zealous glen See Canio

Yeah, canio checks for context.cards_destroyed, but that flag never seems to be true in my joker's scoring method

wooden nexus
#

I just wanna remove the "of Others" from my "Others" suit

quaint latch
violet void
wooden nexus
#

screw it, I'm gonna lovely patch it into localization to see if it that works

sudden dew
# zealous glen How are you testing

I just have this right now as my scoring method:

calculate = function(self, card, context)
if card.debuff then return end
if context.cards_destroyed then
print("worked")
end
end

I've verified that it's getting called

zealous glen
#

Well you shouldn’t

#

But it’s bugged right now

wooden nexus
#

Which is why I'm patching the localization until then

zealous glen
#

@frosty dock 🥺 fix pls

tall wharf
#

the "Not Allowed!" boss blind alert also isn't localised

#

that's just vanilla game tho

wooden nexus
#

wtf, it's still not working, am i just doing the wrong function or something

#

I was trying to edit the generate_card_ui function for now

sudden dew
frosty dock
#

neither is it if my concern

#

smods supports localization files which is all you should need

weak brook
#

is there any like... documentation on talisman? im curious as to the fine details of what it provides beyond "bigger numbers" and how I might make mods compatible with it

frosty dock
#

I'll add something into steamodded to take care of names for playing cards though

zealous glen
#

As we talked a few days ago

frosty dock
tepid crow
zealous glen
#

I guess but I do use that so

frosty dock
#

then don't

zealous glen
frosty dock
#

its being replaced by a metadata field to choose which lang to use as default

wooden nexus
#

then is function generate_card_ui not the function i want to edit playing cards for now?

weak brook
#

im kinda curious as to whether that ability could be balanced properly

tepid crow
#

yeah talisman adds x_chips

weak brook
#

outside of a cryptid enviornment

#

it seems like a very cool thing

wintry solar
#

x_chips is functionally the same as x_mult apart from 2 specific situations

tepid crow
#

I mean, it's just x_mult most of the time

frosty dock
#

xchips is just worse xmult

#

in the sense that it makes +chips worth less

weak brook
#

wouldnt it just work like mult in that you get +chips first then x_chips

#

how is it different with that 🤔

wooden nexus
#

generate_card_ui HAS to be the function I need because there's nothing that uses the localization of playing_card... lemme try something again

frosty dock
#

say you have a foil joker that you really want to put last

weak brook
#

oh so like a foil joker that happened to be like an xmult

#

hm yeah

wooden nexus
#
[patches.regex]
target = 'functions/common_events.lua'
pattern = '''elseif specific_vars.playing_card then'''
position = 'at'
payload = '''
elseif (specific_vars.playing_card and (_c.name ~= 'Stone Card') and  (_c.suit == 'a_other')) then
    full_UI_table.name = {}
    localize{type = 'other', key = 'bazinga', set = 'Other', nodes = full_UI_table.name, vars = {localize(specific_vars.value, 'ranks'), colours = {specific_vars.colour}}}
    full_UI_table.name = full_UI_table.name[1]

elseif specific_vars.playing_card then
'''

Strange. I even tried making it a random word to try and make it that

#

unless it's not _c.suit

wintry solar
#

its better game design to only have a multiplier on one of the values imo

weak brook
#

yeah im not sold on the idea of it but im kinda hitting the wall of inspiration for ability ideas i suppose so i was just like "ooh shiny new ability" at the possibility of xchips

tall wharf
#

i have a stupid idea

tepid crow
#

@weak brook
(only when doing comparisons btw)

#

^ for talisman compat

weak brook
#

thing im wondering with the compat is like'

#

what if someone doesnt want to use talisman

wooden nexus
#

Welp, i'm hitting my head off a brick wall, I don't get it

weak brook
#

is there a fallback

zealous glen
tepid crow
#

that's the second part

then define to_big if it isn’t defined

frosty dock
weak brook
#

ah gotcha

frosty dock
#

you just set it to return its argument as-is

weak brook
#

i see i see

#

thanks

tepid crow
#

you might want to try to find a mod with talisman compat (but no dependency) to see what they do exactly

tall wharf
#

i will turn balatro into something more kid friendly

weak brook
#

yeah i imagine a mod like uh, bunco or something is compat

tall wharf
#

(education)

teal estuary
worthy stirrup
#

how can i check if G.jokers.cards exists before calling for it?

SMODS.Keybind{
    key = 'CheckJokers',
    key_pressed = 'm',

    action = function(self)
      if G.jokers.cards then
        print(insepct(G.jokers.cards))
      end
    end,
}
teal estuary
# weak brook wdym by that

sumamtion is adding every number in sequence, essentially factorial but additive instead of multiplicative

tepid crow
teal estuary
#

so &4 chips is 10 chips in total, since 4+3+2+1 = 10

livid tapir
teal estuary
#

that

weak brook
#

eh not really something i think would fit in cardsauce thats a bit needlessly complicated no offense

#

like i may as just like have it be +10

sudden dew
tall wharf
teal estuary
#

im mainly using it for scaling jokers or jokers that can change their inherent values (see raised fist)

tall wharf
#

someone make this real

worthy stirrup
#

im crashing whenever i press M

sudden dew
worthy stirrup
#

let me grab it rq

weak brook
tall wharf
#

😭

weak brook
#

localthunk will add this clueless

livid tapir
worthy stirrup
#

oh, it only crashes on the main menu

livid tapir
# tall wharf 😭

i mean all you gotta do is change every single card texture to GROS MICHEL!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

worthy stirrup
#

which makes sense

sudden dew
worthy stirrup
#

how helpful...

livid tapir
#

oh

#

so it is actually gros michel

crisp elbow
#

Didn’t somebody do this already

#

It was myst

weak brook
#

myst the goat

zealous glen
#

I mean thunk did it too

worthy stirrup
#

Okay, if i want to check for a joker's existance, should i be checking its Alias or Name

zealous glen
#

Key

worthy stirrup
#

Okay, thanks

sudden dew
#

@frosty dock , 90% sure custom jokers never have their calculate method called with context.cards_destroyed set. context.removing_playing_cards gets set instead, which isn't something I ever see in vanilla code 🤔

hardy viper
#

@eremel_

#

guh

#

where is my ping discord

#

@wintry solar

frosty dock
#

context.cards_destroyed was never real, I don't think

#

the base game pretends to use it for canio and glass joker but it's never called anywhere

viscid bough
#

which looks better, left or right? or some other variation?

#

(these are supposed to be weird fishes)

frosty dock
#

left

violet void
wooden nexus
viscid bough
#

I had a secondary idea that would be sorta like monolith, where it reset when you play a flush

livid tapir
viscid bough
#

Also this counts for all flush hands: flush, straight flush, flush house, flush five

livid tapir
#

AAAAAAAAAAAAAAA

tall wharf
#

my head

#

gobnw

#

i am dead

wooden nexus
#

hm?

wooden nexus
#

Why the ping then?

tall wharf
wooden nexus
#

I don't see it

#

That's Shinku

#

I know this is old art but still

wintry solar
frosty dock
zealous glen
tall wharf
viscid bough
#

How can i delete a joker when a certain thing happens?

tall wharf
viscid bough
livid tapir
tall wharf
livid tapir
#

ah ok
so ig its good right

wooden nexus
wet sand
#

should the stone cards get a random suit + rank when you break them?

wintry solar
#

They already have a suit and rank underneath

candid epoch
dreamy thunder
#

it used to work

candid epoch
#

func = Lua function '?' (defined at line 906 of chunk main.lua)
inerror = boolean: true
deferErrhand = Lua function '(LÖVE Function)' (defined at line 348 of chunk [love "boot.lua"])
earlyinit = Lua function '(LÖVE Function)' (defined at line 355 of chunk [love "boot.lua"])

something out of here is wrong

tall wharf
candid epoch
#

._.

tall wharf
dreamy thunder
candid epoch
#

also anyone has bit of simple mods? so i can invesitage code and make my own with bits

wintry solar
livid tapir
#

btw whats that Retrigger API for, i assume retriggering stuff (which i need for my joker)

rough furnace
candid epoch
#

also what the hell is an atlas

dreamy thunder
#
          return { vars = { card.ability.extra.chips, card.ability.extra.mult } }
        end,
        calculate = function(self, card, context)
            if context.other_card:get_id() >= 2 and context.other_card:get_id() <= 9 then
              return {
                chips = card.ability.extra.chips,
                mult = card.ability.extra.mult,
                card = card.other_card
              }
            end``` 

this is the code which causes the error but i dont know what it is
dreamy thunder
livid tapir
candid epoch
livid tapir
#

other card is dead

wintry solar
dreamy thunder
#

it used to work 2 days ago

wintry solar
#

This will never have worked

dreamy thunder
#

let me see if i can find old versions of my code

#

oh yh mb

#

i removed something on accident

candid epoch
#

i will try to add marbles into the game

dreamy thunder
#

gl

humble girder
#

is there a faster way to reload my mod than literally restarting the game

rough furnace
candid epoch
#

also is adding "joker" into sprite is really neccesary?

quaint latch
#

Heyyyy! Would anyone be up to test my joker for bugs (play a few rounds with it) :D
From my limited testing it seems to work fine but I wanna make sure it's field tested

https://github.com/SammCheese/BS-Insanity

candid epoch
#

pov: trying to draw a marble without talent

humble girder
wet sand
#

how would i draw a "soul" on top of a joker without it also drawing a shadow

#

i can set a soul_pos just fine but the shadow makes the card look really messy lol

dreamy thunder
#

where can i find all the color codes

#

for descriptions

noble frigate
#

hey guys - messing around with some mod dev

#

how should I include smods for my lsp?

noble frigate
#

oh this is gonna be good

#

its like c with no lsp or internet, just manpages, and every time your code errors out you delete it

rough furnace
#

you might be able to get away with just cloning yhe smods repo somewhere your lsp is aware of and if you pray hard it might work

dark kite
#

ok chat how do i override joker effects, looking to make smeared joker work for custom suits

rough furnace
#

you can take ownership but I belive smeared doesn't actually have it's effected tied to itself

elder vapor
#

its in Card:is_suit() iirc

tall wharf
dark kite
#

hmm

#

so then i would need to check if smeared joker is in play and then edit it from there?

noble frigate
rough furnace
livid tapir
#

how do i figure out if played hand contains 2 specific ranks

dark kite
#

id assume you would want to look at Flower Pot

#

as it checks for all 4 ranks

wet sand
#

those are suits

wet sand
#

loop through the played hand and check get_id() on cards i think?

dark kite
#

time to figure out how to edit funtions

rough furnace
#

lovely patch or hooking

dark kite
#

you see you assume i know what im doing at all

hardy viper
#

what if instead of lovely patches we used ```lua
local pattern = "function c(b)"
local replace = "function c(b, d)"

local function hook(line)
local filename = debug.getinfo(2).short_src
local file = NFS.read(filename)
local repl = string.gsub(file, pattern, replace)
NFS.write(filename, repl)
end

debug.sethook(hook, "l")

rough furnace
#

wouldn't work for the games files

hardy viper
noble frigate
#

lsp works

tall wharf
#

how do i properly destroy card in hand

noble frigate
#

im so cool /s

noble frigate
tall wharf
#

silly

rough furnace
noble frigate
#

(im on mac rn i cant decomp the file)

rough furnace
rough furnace
hardy viper
noble frigate
#

if anyone here is curious how i did it

noble frigate
rough furnace
#

rename it

noble frigate
#

i tried

hardy viper
rough furnace
#

or use the temrinal

noble frigate
noble frigate
livid tapir
#
SMODS.Joker {
    key = 'jjj',
    loc_txt = {
        name = "J. J. Joker",
        text = {
            "Retrigger entire hand",
            "if played hand contains",
            "an {C:attention}Ace{} and a {C:attention}10{}"
        }
    },
    rarity = 2,
    atlas = 'atlas',
    pos = {x=3,y=0},
    cost = 7,
    calculate = function(self, card, context)
        if context.joker_main then
            local has_ace = false
            local has_ten = false

            for _, card in ipairs(G.hand.cards) do
                if context.card:get_id() == 1 then
                    has_ace = true
                elseif context.card:get_id() == 10 then
                    has_ten = true
                end

                if has_ace and has_ten then
                    break
                end
            end
            local result = {}

            if has_ace and has_ten then
                for _, card in ipairs(G.hand.cards) do
                    table.insert(result, {
                        message = localize('k_again_ex'),
                        repetitions = 1,
                        card = card
                    })
                end
            end
        end
    end
}

guys i dont think my balatro likes it when i have 5 j j jokers and i play a hand with an ace and a 10

rough furnace
#

did you use the right file?

hardy viper
noble frigate
rough furnace
#

thats the executable

#

not the game file

noble frigate
#

am i cooked

#

which one is the game file 😭

rough furnace
#

it should be game.love

#

or maybe Balatro.love

hardy viper
#

oh wait

#

mac build

#

yeah

noble frigate
#

oh hey

hardy viper
#

obviously it's not gonna be a fucking exe am i silly

rough furnace
#

I mean it is on windows

hardy viper
#

this isn't windows

rough furnace
#

but mac has folders for it's apps by default

#

so it's just stick it in a folder

noble frigate
#

works

#

now time to see if lsp

rough furnace
#

(do G.GAME)

#

see what is has

noble frigate
#

lemme add it

rough furnace
#

I should figure out text completion on nvim

#

I just migrated over and been writing code manually for a while

hardy viper
#

what are you referring to when you say "lsp" btw

#

luals?

rough furnace
hardy viper
#

or is it some ide i don't know

#

ah

#

so luals

rough furnace
#

probably

#

but it's a generic term for any language

noble frigate
#

gg

#

(ignore the deprecated def on the bottom im working on that)

rough furnace
#

I have yet to figure out what the STOP_USE is for

#

I'

noble frigate
#

(i do not know how to do jokers)

rough furnace
#

ve seen it in a few places

hardy viper
#

my luals is really terrible in terms of performance for some reason

#

it might be that it looks at non-lua files for some reason or some weird shit

#

it's usually useless anyways so it's fine

livid tapir
noble frigate
#

this is new

rough furnace
#

did you move the Balatro.love?

noble frigate
#

yeah lol

dark kite
#

Balatro Minus Balatro

tall wharf
noble frigate
dark kite
#

houuughhh i dont wanna learn how to edit functions i dont wannaaaa

livid tapir
dark kite
#

i just want smeared joker to work with custom suits 😭

hardy viper
livid tapir
tall wharf
noble frigate
tall wharf
#

true

elder vapor
hardy viper
#

first you do the thing then you do the other thing

#

simple

rough furnace
tall wharf
#

hook is simple

noble frigate
#

first step

#

second step

#

fourth step

#

seventh step

#

floor

hardy viper
#

how does he just do that

tall wharf
#

i read about it a while back

#

they are professionals basically

hardy viper
#

mainly the forcing a fucking sharks jaw shut that's what im confused about

tall wharf
#

oh

#

the shark got hypnotized basically

dark kite
#

nose is weak point

hardy viper
#

so he squeezed the nose

#

looks accurate yeah

#

why's nobody squeezing my nose

tall wharf
#

why no chips 😭

#

did i fuck it up

hardy viper
#

probably wrong key for adding chips

tall wharf
#

ok

#

ill try a new run

noble frigate
#

what's the context.cardarea for checking played cards (checking if each card is a different suit in a 4 card hand)

tall wharf
#

what the what

#

?????????

dark kite
#
function is_suit(Card:is_suit, suit, bypass_debuff, flush_calc)
    if next(find_joker('Smeared Joker')) and (self.base.suit == 'Hearts' or self.base.suit == 'Diamonds' or self.base.suit == 'Stars') == (suit == 'Hearts' or suit == 'Diamonds' or suit == 'Stars') then
        return true
    end
  local ret = hook(Card:is_suit, suit, bypass_debuff, flush_calc)
  return ret
end``` why do i have a gut feeling that i didnt do this right at all
elder vapor
#
function Card:is_suit(bypass_debuff, flush_calc)
    if next(find_joker('Smeared Joker')) and (self.base.suit == 'Hearts' or self.base.suit == 'Diamonds' or self.base.suit == 'Stars') == (suit == 'Hearts' or suit == 'Diamonds' or suit == 'Stars') then
        return true
    end
  return Cardis_suit(self, bypass_debuff, flush_calc)
end```
dark kite
#

it works perfectly thank you i love you forever

#

it also really helps that i have some sort of template/basis to branch off of

elder vapor
#

this is what i did for wild card functionality on my hook

#

screenshot is weird because i'm on my phone

tall wharf
kind vale
#

hello gang are we allowed to put wip screenshots in this channel or is that somewhere else

elder vapor
#

you can

#

if you have a thread for your mod you can post it there as well

kind vale
#

I havent published it yet so I dont think I do

#

Hi yall! I'm a LEGO youtuber and I used to make minecraft texture packs, so this idea kind of fell into my lap. I'm LEGO-fying balatro, my aim is to change as much as Im able into lego, sound effects, animated blinds, all the deck backs and everything in between. been working on this since just before christmas, making great progress. heres some of my favorite things so far

worthy stirrup
#

Does SMOD have anything for Code Completion or the little menu that drops down that shows you available options

noble frigate
worthy stirrup
#

I saw and I was hoping there was like a public version

#

How’d you do it because I honestly can’t tell lol

dark kite
#

ok those legos are peak

noble frigate
#

agreed i fkin love the lego

noble frigate
#
{
  "workspace.library": ["../smods", "../../BalatroGameSource"],
}
tall wharf
#

chat

noble frigate
#

obviously the paths will be diff but yk

#

itll just work after that

kind vale
#

if anyone knows why my seals arent working that would be so helpful. I think I just havent got the reference path correct, because the centers work

livid tapir
#

is sixsuits broken or did i fuck up my mod so badly that its interfering 😭

worthy stirrup
tall wharf
#

do you need any extension

noble frigate
#

just lua lsp

#

it works on nvim for me

livid tapir
#

oh i just realized i fucked up
i put SMODS.Joker = { when making my joker
my dumbass

tall wharf
#

😭

#

neovim

edgy reef
#

Completely forgot that lua lsp works for vscode lmao

noble frigate
#

lmfao yeah lsp is

#

something

noble frigate
sturdy compass
#

I’m seeing double (hello other Astra)

noble frigate
#

aanyways this is my first attempt at making a joker does this are have the work or na


joker.calculate = function(self, context)
  -- if played hand has 4 cards
  if context.cardarea == G.play and #context.scoring_hand == 4 then
    -- and each card has a different suit
    local suits = {}
    for _, card in ipairs(context.scoring_hand) do
      suits[card.suit] = true
    end
    if #suits == 4 then
      -- then multiply the score by 4
      context.score = context.score * 4
    end
  end
end

noble frigate
sturdy compass
#

Lmao

tall wharf
#

there we go

noble frigate
#

dear god there's more of me

livid tapir
#

omg i want to draw a hand of specific cards

noble frigate
#

QUICK CALL THE SCP FOUNDATION

tall wharf
#

for VS Code you need this

sturdy compass
tall wharf
#

ok no really why is my chips not addin

#

:<

sturdy compass