#šŸ’»ćƒ»modding-dev

1 messages Ā· Page 235 of 1

hard flume
#

Is my understanding

quartz ravine
#

this is because i want specific "rare"

lost fern
#

I saw people saying SMODS.calculate_effect is just an easier way to add chips and stuff without having to specify a message etc tho?

#

So how do I send a chip style message?

tardy wind
#

i actually didnt understand how/where SMODS.calculate_effect has to be defined

lost fern
#

as opposed to "UPGRADE!" and mult

zealous glen
lost fern
#

Im trying to do that too

lost fern
#

And its an edition so it applies to both jokers and cards

lost fern
#

so this should work?

tardy wind
#

minus a few syntax errors, yes

lost fern
#

ignore the commas I fixed them :p

versed swan
#

quick question, what's the difference between self and card in joker calculation again?

tardy wind
#

also the first chips =

tardy wind
versed swan
#

thank you

tardy wind
#

i wouldnt use self unless you know what u doing

#

card is usually enough

#

(plus context)

lost fern
#

annoyingly the popup only displays the bonus properly when in hand, not in deck

hard flume
zealous glen
quartz ravine
#

What is wrong with this thing, something looks weird to me

hard flume
#

Does anyone know how to change the music and background when you have a certain Joker?

tardy wind
hard flume
#

Yeah. I've seen it done before

tardy wind
#

add_to_deck function in joker def, and code to play music

quartz ravine
lost fern
#

IT WORKING thx :)
-# not the display in the deck screen but thats fine for now

lost fern
hard flume
tardy wind
#

actually ortalabs aint got something like that, but i'll probably go with the second option for now because its simpler to implement.. and I can reuse atlases and all that

smoky talon
#

how would i apply an effect to the screen, like making it go black?

zealous glen
#

That take effect the next hand you play

#

of a poker hand type

crimson marlin
#

does ANYONE know how to modify blinds

smoky talon
#

im trying to make a joker that makes the screen go black for 15 seconds and plays a blackout sound

lost fern
zealous glen
zealous glen
lost fern
#

also while Im here, is there another way of storing variables or smthng? The playing card's edition's bonus chips dont display in the deck view (should have "currently 5")

smoky talon
#

i was trying to find the root that makes the ui but its not any of these

zealous glen
#

that's like the layer you want to work on

tardy wind
quartz ravine
zealous glen
zealous glen
#

but again

#

if they're one time effects

#

Ortalab has their Zodiacs

#

which are like Tags AFAIK

rapid stag
#

how do you add new tabs to your mod's config menu cirThink

is it really possible to just go SMODS.current_mod.[tab_name]_tab = function() return { n = G.UIT.ROOT } end

red flower
rapid stag
#

ahhh cirDerp cirISee

tardy wind
solar eagle
#

can you lovely patch another mod - e.g. an smods util function?

solar eagle
#

can't figure out what to tell lovely for the filepath

quartz ravine
#

hi guys, somehow my Resetting text is appearing Under a scroed card, and not under the joker itself. I have fixed this before but I forgot how I fixed it.

zealous glen
red flower
tardy wind
#

oop

zealous glen
# tardy wind oop

if you want to activate it, there's a few comments in the main file and one comment in a lovely patch

tardy wind
formal parrot
#

Hey

#

I’m asking how can i make the joker description dynamically change every round

#

Like all of it

zealous glen
tardy wind
formal parrot
#

Can it be a string tho

tardy wind
#

just a string

#

Essentially

#

loc_vars

formal parrot
#

Hmmm i’ll tru that

tardy wind
#

you have 1 variable

zealous glen
#

Yes but then you can't add color effects

#

and you can change the number of lines

#

AFAIK

formal parrot
zealous glen
#

main_end gives you more control

formal parrot
zealous glen
solar eagle
zealous glen
formal parrot
#

Alr got it

#

Thanks

zealous glen
#

I can show the code too if you want

formal parrot
#

I’d love to

#

i was shy to ask

zealous glen
# formal parrot Ofc

so in loc_vars you return main_end = foo(card) where foo computes the nodes dynamically and has access to the card itself as an argument

formal parrot
#

I have 2 beaincells

sullen fern
#

all i really need to do is impliment the custom hands

zealous glen
# formal parrot The code pwease

Here's a short example

local _generate_main_end = function(card)
    if not misc.is_in_your_collection(card) then
        local add_node = function(nodes, text, colour)
            nodes[#nodes + 1] = {
                n = G.UIT.T,
                config = {
                    text = text,
                    colour = colour,
                    scale = 0.3
                }
            }
        end

        local nodes_ = {}

        add_node(nodes_, '(Currently ', G.C.UI.TEXT_INACTIVE)
        add_node(nodes_, tostring(card.ability.extra.blinds_defeated), G.C.FILTER)
        add_node(nodes_, '/', G.C.UI.TEXT_INACTIVE)
        add_node(nodes_, tostring(card.ability.extra.blinds_to_defeat), G.C.FILTER)
        add_node(nodes_, ')', G.C.UI.TEXT_INACTIVE)

        --sendDebugMessage(tprint(nodes_))

        return {{
            n = G.UIT.C,
            config = {
                align = "bm",
                padding = 0.02
            },
            nodes = {{
                n = G.UIT.R,
                config = {
                    align = "cm"
                },
                nodes = nodes_
            }}
        }}
    end
end
formal parrot
#

I’m a visual learner

sullen fern
#

satan and marle

#

satan buffs common suits while marle buffs rare suits

#

maybe extra chips per suit

formal parrot
#

Thanks i think i got it

zealous glen
#

here I only use one row

formal parrot
sullen fern
#

they effect every suit of a specific rarity

zealous glen
sullen fern
#

i devised a system in order to balance out my mod a bit

#

there's 6 common suits which always appear in your deck

#

and there's 6 rare ones that only appear in standard packs

zealous glen
zealous glen
sullen fern
#

not really

#

i wanted to avoid cluttering the deck

#

by having 12 whole new suits in the deck by default

#

anyways, current joker lineup

#

oh my god, nasu grave is there

#

sadly i don't have any bomb puyo cards yet šŸ’”

crimson marlin
#

How do you change blind types šŸ™ im trying to modify small/big blinds to be boss blinds

tardy wind
zealous glen
glad osprey
#

how would i force the game to draw 2 cards

#

when a certain card is played

zealous glen
#

either with an Event or patches

limber blaze
glad osprey
limber blaze
#

no misprint compat its immutable

#

other cards in this mod do have compat though

tardy wind
#

@zealous glen you were right, ortalabs has literally what I need

glad osprey
#

...no the og misprint

limber blaze
#

idk what that means then

glad osprey
#

you can use it to see the top card of the deck

hard flume
tardy wind
limber blaze
#

not a joker

tardy wind
#

not a joker ?

#

broken

#

oh its consumable

limber blaze
#

yes

tardy wind
#

not that broken

#

very nice

limber blaze
#

i think it would actually be more broken if it was a joker since this is only for one blind

zealous glen
#

Another Homestuck mod hit Balatro

modern kindle
#

jokes on you, it was always homestuck

zealous glen
#

I’m not sure it’s even good

limber blaze
#

i dont think its broken but comparitively having it always happen is more powerful than for one blind

zealous glen
#

It does make the game harder to play a bit

hard flume
#

I finished Women for Balatro, now I'm adding Worlds.

limber blaze
#

i think this is unintended

zealous glen
#

You heard it no more Women for Balatro. Carrot finished them

zealous glen
#

I did think of an Atomic Edition but it sounded too silly to me

#

Maybe that is your calling

limber blaze
#

they arent meant to be this small i just cant read

zealous glen
manic rune
#

šŸ’”

limber blaze
#

not real because i cant do anything wrong

zealous glen
sullen fern
#

i think i know why it crashed

zealous glen
#

It’s inevitable this will happen

crimson marlin
limber blaze
#

theres not really a solution to this anyway other than moving it but putting it anywhere reasonable is probably gonna conflict with something

sullen fern
#

apparently args is a nil value?

zealous glen
#

People have suggested a CardArea API to handle this kind of screen space conflict

sullen fern
#

its teling me to check line 13

manic rune
glad osprey
#

I still need help :>

zealous glen
#

They don’t get to own that screen space just because their mod came first

limber blaze
#

i cant really do anything about this other than not have this effect cause where else am i really meant to put it i am not going to change everything just because another mod thought to put something there first

hard flume
zealous glen
sullen fern
zealous glen
#

The oldest one I can recall displays the cards shrunk on top of the deck

#

Three of them

sullen fern
#

i'm attempting to use sigil

zealous glen
#

Horizontally

hard flume
zealous glen
#

I think in Jokers you can just put the cards in the tooltip

sullen fern
#

i try to use sigil and the game crashes because args is a nil value apparently

scarlet spire
#

how can I change the score required to beat a blind, while the blind is active?

zealous glen
limber blaze
manic rune
#

id personally go with the approach of showing the first card exactly on top of the deck, and if you hover on it then the other card pops out
-# like a flip phone, think of it that way

but this is your mod, so you do you

zealous glen
#

High Card mod had a new menu tab

#

In the deck menu

#

To see the whole deck

#

In order

sullen fern
limber blaze
#

idk the deck menu is the only other place id move it but me personally id never use this effect if i had to go to the deck menu every time

manic rune
#

its just a little nitpick about mod conflicts, you really shouldn't be troubled around that too much

hard flume
#

Idk where to put world cards tbh

zealous glen
limber blaze
#

i dont play with it so its not a real mod

red flower
#

Joker idea: If Talisman is installed, turns all numbers into tables

scarlet spire
hard flume
zealous glen
#

Not Champion’s Belt

#

Champion

zealous glen
sullen fern
#

args if they were a nil value

sonic cedar
#

about to leave but does anyone know how legendary jokers render?

solar eagle
sonic cedar
#

yeag

solar eagle
#

they have two attributes

#

pos = { x = 0, y = 0},

#

is the background

#

soul_pos = { x = 0, y = 1 },
for example

#

is the thing that renders above

sonic cedar
#

oh is it

#

that easy

solar eagle
#

yeah

#

and

charred halo
#

I have a joker that creates a copy of itself every time a boss blind is beaten, but it always just copies itself infintely. Is there some stupid obvious oversight im missing

solar eagle
#

they render multilayer

sullen fern
#

so why exactly is it saying that args is nil?

sonic cedar
#

is this a "use ... instead of args" moment or no (i'm too new)

zealous glen
zealous glen
sullen fern
#

is that i try to use sigil

#

and then

#

args a nil value

charred halo
# zealous glen How does it copy itself

lua

            G.E_MANAGER:add_event(Event({
                trigger = "before",
                delay = 0.0,
                func = function()
                    local new_card = create_card('powercreep', G.jokers, nil, nil, nil, nil, 'j_pow_powercreep') 
                    new_card:set_edition({ negative = true }, true)
                    new_card:add_to_deck()
                    G.jokers:emplace(new_card)
                end
            }))
        end```
zealous glen
#

Use ```

#

Now put lua at the beginning and a line skip

solar eagle
zealous glen
#

```lua
code
```

charred halo
#

oh lol

#
 calculate = function(self, card, context)
        if context.joker_main then
            return {
                card = card,
                Xmult_mod = card.ability.extra.Xmult,
                message = 'X' .. card.ability.extra.Xmult,
                colour = G.C.MULT
            }
        end
        if G.GAME.blind.boss and G.GAME.chips / G.GAME.blind.chips >= 1.50 then -- Combined condition
            G.E_MANAGER:add_event(Event({
                trigger = "before",
                delay = 0.0,
                func = function()
                    local new_card = create_card('powercreep', G.jokers, nil, nil, nil, nil, 'j_pow_powercreep')
                    new_card:set_edition({ negative = true }, true)
                    new_card:add_to_deck()
                    G.jokers:emplace(new_card)
                end
            }))
        end
    end,
sullen fern
#

why the fuck does it not work with sigil?

zealous glen
#

it triggers on every context

zealous glen
sullen fern
#

i keep looking at this and i'm like "how would this cause a crash when sigil is used"

primal robin
#

Damn, this descriptions feels bad

charred halo
sullen fern
#

because the crash message specifically points out args

zealous glen
#

you'll have more success trying to print it and going back the chain of function calls until you find the issue

sullen fern
#

printing it?

#

what do you mean by that

zealous glen
#

the easiest way is probably via sendDebugMessage

charred halo
#

add debug prints after problem child lines to see where the code fails

tardy wind
#

printing is the best debug process

#

fuck unit tests

#

or whatever they call it today

#

test driven development

sullen fern
#

[SMODS puyomod "suits/suits.lua"]:13: attempt to index local 'args' (a nil value)

zealous glen
#

i mean if it's crashing the game you need to print before

#

and if you don't understand what's being printed, again, go back the function call chain

sullen fern
#

i mean, doesn't the crash log tell me what line is causing the problem?

zealous glen
#

not necessarily

#

It can crash at that line, but the source of the issue can come earlier

sullen fern
#

well before it was telling me to check line 13

#

is it because args is like

#

not doing anything

zealous glen
#

If args is nil, then the issue is either that you shouldn't expect it to not be not nil, or that something is misassigning it nil

#

on the latter case, the issue isn't with that line, but earlier

#

on the former case, the issue is with that line, because you coded something incorrectly

sullen fern
#

i don't see any earlier place where something would go wrong

zealous glen
#

make sure you understand why rare_suits is called, what arguments are passed to it, and what those arguments can be

sullen fern
#

this ONLY HAPPENS WHEWN IN UYYSE SIUGIL

sullen fern
#

sorry i'm tyring to stay calm buit i JUST CANT

#

THUS SHIT IS PISSIBNG ME OFF

zealous glen
#

go do something else to calm down then come back later

#

getting stressed won't help, but a clear mind will

sullen fern
#

but i want this problem resolved NOW

#

i'm STUBBORN

tardy wind
#

eat a snickers

#

then come back to it

sonic cedar
#

duuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuude

zealous glen
#

isaac

sonic cedar
#

yes

sullen fern
#

all it really seems to be doing is flooding my console with "What!?"

zealous glen
#

another isaac mod

sonic cedar
sullen fern
zealous glen
sonic cedar
#

im NOT doing allat

zealous glen
sullen fern
#

like what

#

LIKE WHAT

#

WHAT SHOULD I PRINT

zealous glen
#

args

sonic cedar
#

lmfao

sullen fern
#

soryy

#

my rage is not doing me any favors

zealous glen
#

as I said

sonic cedar
#

hell yeah

sullen fern
#

it prints args directly before the return function

#

still don't get how this is meant to help me

#

at all\

sullen fern
#

an absurd amount of times

#

it's never that easy, is it.

#

it should just work. i should have code, and it should just work with EVERYTHING

#

but nooooooooooo, apparently args is a nil value

#

dude. fuck

#

i'm getting a bit...

#

fuckkkk

#

am i getting lightheaded???

#

why??????

#

this shouldn't be making me THIS mad

modern kindle
#

i would recommend stepping away for a bit if its actively infuriating you to the point of lightheadedness

sullen fern
#

i would really like at least some guidance after this

sullen fern
#

balatro is playing me like a fiddle.

scarlet spire
#

I know loc_vars in blinds is limited, but what's incorrect here? the #1# in the desc always displays as 'nil', even though the blind logic itself works and confirms the value being passed does exist

#

i'm also tired so I might be missing the obvious

faint plank
#

hear me out

rapid stag
#

@wintry solar is it possible for me to replace JUST the soul graphic in malverk without supplying a replacement for the base card itself?

like, say

  key = '[myPrefix]_Soul',
  set = 'Spectral',
  path = [myAssetPath],
  [...etc]
  soul_keys = {
    'c_soul'
  },
  loc_txt = {
    name = 'Soul'
  }
})

or would that not work/is not supported cirBox

formal parrot
#

How do yall come up with these ideas

rapid stag
faint plank
#

i just have an idea and pray someone else didnt already do it

smoky talon
#

how do i play custom sound effects?

wintry solar
hard flume
#

Hihi :)

#

Does anyone have a guide for making UI on hand?

sullen fern
#

i think i have sufficently cleared my mind

#

for now at least

#

now back to the grind

ivory coral
#

hey lads
im trying to hook into Card:apply_to_run to add a new voucher but for some reason this is returning the error card.lua:260: attempt to index local 'center' (a nil value) when i buy the voucher
im not sure whats going wrong with it since center is clearly the paramater of the function is it not

function Card:apply_to_run(center)
    local center_table = {
        name = center and center.name or self and self.ability.name,
        extra = center and center.config.extra or self and self.ability.extra
    }
    if center_table.name == 'Booster Feast' then
        G.E_MANAGER:add_event(Event({func = function()
        change_booster_shop_size(1)
        return true end }))
    end
    return _apply_to_run(center)
end```
sullen fern
#

sounds like a load of hoopla to me

#

this is the current code btw

rapid stag
# wintry solar I don't think that would work

how do i replace the soul card then, because in base, the card is split across two different assets; the shared tarots/planets/spectrals graphic and the decks/enhancers graphic - do i have to do something like

  key = '[myPrefix]_Soul',
  set = 'Spectral',
  path = [myAssetPath],
  keys = {
    'c_soul'
  },
  soul_keys = {
    'c_soul'
  },
  loc_txt = {
    name = 'Soul Card'
  }
})```
and the asset has the base graphic and soul graphic in sequence? like this
smoky talon
#

the code keeps looking for the sound in resources/sounds, but i didnt tell it to do that and all my other music is in assets/sounds

hard flume
#

My main issue with UI is that I don't know how to put cards in there.

sullen fern
#

and this specific code has a problem when trying to use sigil

smoky talon
sullen fern
#

uh, it crashes

#

apparently because args is nil

#

which shouldn't be the case becaus i have no idea why args is being treated as nil

scarlet spire
sullen fern
#

my mistake

#

can you really blame me though

#

i don't know how to print values

#

so like

#

how do i print args as a value

#

since none of yall actually told me how

#

you guys should've TOLD ME

#

then all of this would have been prevented

scarlet spire
#

it should just be args, without quotes

sullen fern
#

wait that's unrelated

#

accidentally put a `

#

in one of the earlier lines

sullen fern
#

well great

solar eagle
#

how would i go about replacing the main menu png? that says "BAL TRO"

#

i dont want to just have people swap the file inplace if possible

sullen fern
scarlet spire
#

i've never used sendDebugMessage before, only print() which requires the console to be enabled

#

do you have debug mode/console enabled? i.e. do you see the console in-game

sullen fern
#

not this?

scarlet spire
#

nope, that's the lovely console

sullen fern
#

well it still prints there

scarlet spire
#

if you do print()?

sullen fern
#

yeah

#

im using print now

scarlet spire
#

alright then do print(args)

potent topaz
#

idk if this is the right chat but i cant get lovley to start it keeps crashing

sullen fern
#

that's exactly what i did

#

during the intro animation it was printing all this

quartz ravine
#

oh yeah, finally getting a bit of a glitter effec for my secret rare cards!

sullen fern
hard flume
#

How do I go about making my UI a card area?

#

I'm trying to get world cards to only show up there

edgy reef
sullen fern
edgy reef
#

if args and args.whatev then

sullen fern
#

or is that wrong

red flower
#

return not args or not args.initial_deck

sullen fern
#

that fixed it!

red flower
sullen fern
#

but now, all of the rare suits are in the deck again

#

which i don't want

#

i'm going in circles man...

#

the sigil problem is fixed but the rare suits are in the main deck again

red flower
#

thats weird..

#

can i see the code again

sullen fern
potent topaz
#

Can someone help me with the lovely mod it keeps crashing as i start it (sorry if this the wrong chat)

red flower
#

there should be anothernot

sullen fern
#

ohhhh

#

i see

potent topaz
#

alr

sullen fern
#

there we go

potent topaz
#

1 sec

sullen fern
#

it just works.

red flower
#

yay

sullen fern
#

it JUST works.

potent topaz
sullen fern
#

now, i need to deal with you two.

#

satan and marle.

#

satan buffs common cards while marle buffs rare cards

#

ignore that i said cards

#

i meant to say suits

potent topaz
#

@red flower someone else looked at it and we figured it out

sullen fern
#

and these jokers too but that's for later

ivory coral
#

hello chat
ive made this patch to try and change Game:update_shop(dt) so that instead of only making 2 booster packs in the shop it makes G.GAME.shop.osquo_ext_booster_max of them instead, but with this it still only makes 2 packs
ive tried using eval to check the variables and G.GAME.shop.osquo_ext_booster_max - #G.shop_booster.cards is equal to 1 so it should still make another pack when i set it to 3 but it doesnt for some reason, am i missing something?

[patches.pattern]
target = 'game.lua'
match_indent = true
position = 'at'
pattern = '''
                                    else
                                        for i = 1, 2 do
'''
payload = '''
                                    else
                                        for i = 1, G.GAME.shop.osquo_ext_booster_max - #G.shop_booster.cards do
'''```
the code im targeting is in `game.lua` in the aforementioned `Game:update_shop(dt)` around the part that does booster packs if you need to look there
potent topaz
#

k

red flower
ivory coral
solar eagle
#

what exactly does to_big do?

red flower
sullen fern
#

they exist but don't have unique effects yet

red flower
solar eagle
#

i see

#

how would i extract the parts of it?

ivory coral
solar eagle
#

or, wait

sullen fern
#

so yeah.

solar eagle
#

i'd just want to

#

to_number

red flower
hard flume
#

hell fucking yeah. now all i need to do is figure out how to get world cards within it

manic rune
#

how do i change a card's suit?

sullen fern
red flower
manic rune
#

lovely, thanks

red flower
#

no, it's a steamodded feature not lovely

manic rune
#

:(

#

sad...

hard flume
sullen fern
ivory coral
red flower
#

yeah, I use it for a tag too

sullen fern
#

i'd also need to make a tooltip for common puyo and rare puyo cards

#

they'll just tell you what puyos are rare and common

#

making a tooltip is easy, right?

hard flume
#

How would I go about having World Cards appear in their special area? Just so I know for the morning

red flower
ivory coral
red flower
red flower
sullen fern
#

or can i just bake it into the card

hard flume
red flower
ivory coral
red flower
red flower
red flower
sullen fern
hard flume
#

I have a custom object type that all World Cards are automatically added into. Can I use that instead of each individual card key?

red flower
red flower
sullen fern
#

i want it to be like "puyo_RedPuyos, puyo_GreenPuyos"

#

like each suit is shown

ivory coral
# red flower yeah

also i'm not familair with this calculate_context thing how do i actually use this
in a voucher specifically but also generally

sullen fern
#

with the color and everything

red flower
#

except the joyousspring thing obviously

manic rune
red flower
manic rune
#

:3

sullen fern
#

in the description

red flower
#

i dont really undestand what exactly you want to do

sullen fern
#

like how the suit shows on a suit joker

red flower
sullen fern
red flower
#

i think you need to type it

ivory coral
red flower
#

it does I'm pretty sure

manic rune
modern kindle
red flower
sullen fern
red flower
#

šŸ™‚

modern kindle
manic rune
modern kindle
#

straight to the sun

ivory coral
#

youre telling me theres been a thing that does the thing im trying to do this whole time

red flower
#

sorry i completely forgot about it lmao

ivory coral
#

omg thats why it didnt work when i patched it because SMODS already has a thing for it

sullen fern
manic rune
ivory coral
#

dangit i shouldve checked SMODS code

sullen fern
red flower
#

you can still put colors in the descriptions using {C: and stuff

indigo loom
#

hi

#

i just start using steamodded

sullen fern
indigo loom
#

and i got stuck while looking through documentation, where can i get help?

red flower
#

here

manic rune
#

my friend fucking ddos'ed the online compiler website im using

#

šŸ’€

indigo loom
#

okay

red flower
#

lmao

indigo loom
#

im reading over this part

sullen fern
#

so where do i put my tooltip

red flower
#

loc_vars

red flower
indigo loom
#

and i cannot for the life of me figure out what i've misunderstood

red flower
#

what's the crash log

indigo loom
sullen fern
red flower
ivory coral
# red flower sorry i completely forgot about it lmao

alright so its very nearly function
only problem now is that when you first redeem the voucher it doesnt change the shop to reflect the new size
not sure why but it might be because redeeming a voucher doesnt count as G.STATES.SHOP which the function checks for
is there a way around this

indigo loom
ivory coral
wintry solar
#

redeem should be fine

#

you want to add a booster slot right?

ivory coral
red flower
sullen fern
#

formatting.

hard flume
#

Half way done with adding Worlds :)

ivory coral
# wintry solar redeem should be fine

right now i have

        G.E_MANAGER:add_event(Event({func = function()
            SMODS.change_booster_limit(card.ability.extra.bonus)
            shop:recalculate()
            return true end }))
    end,```
sullen fern
#

now to add the actual effect

#

which is chips when a specific suit rarity is scored

wintry solar
#

you only need the change booster limit line, you can delete the rest of it

hard flume
ivory coral
#

no wait i dont have shop:recalculate thats a holdover nvm

indigo loom
#

sorry, i just didnt consider it would make a difference lol

red flower
#

config values stay the same on reload so if you change that it'll likely crash

indigo loom
#

ahhhh

#

okay that makes sense

sullen fern
#

so what would i do in order to have chips happen when a specfic set of suits is played

indigo loom
#

thank youuu

ivory coral
hard flume
sullen fern
#

i would have to make actual groupings for the suits so that i can call them

red flower
wintry solar
hard flume
ivory coral
hard flume
sullen fern
#

or would that not work

red flower
hard flume
#

OK bet

manic rune
#

is this it

#

or is it Four Of A Kind

sullen fern
#

ii really should create like

#

grouping of suits

#

so i can easily call them

#

so i don't have to do them all seperately

#

i'm saying this again

#

can i just create a group of suits

manic rune
#

hm

#

how do i tell the game to check if its exactly four of a kind

#

rn it works for all poker hands including four of a kind

sullen fern
#

becuase suits are a part of local vars

#

so if i'm like

wintry solar
sullen fern
manic rune
#

this is currently my code :3

wintry solar
#

I'll fix it properly in smods too

#

but that'll work for now

manic rune
scarlet spire
#

i've got a bit of a confusing wording problem to deal with...
so basically, The Ox, when in the collection, just says (Most played poker hand) in place of the hand, when it really refers to the most played poker hand as of the last boss blind, but that doesn't really matter
I have a new boss blind that increases the blind size if your money is below the amount you had at the end of the last boss, but the collection text for this is waaay too long, because I can't do the same trick the ox does in terms of shortening it

#

any ideas on how to phrase this in a way that cuts it down

manic rune
sullen fern
wintry solar
#

oh that was a lot easier than I thought it would be

#

@ivory coral it's patched in latest smods to work properly now

ivory coral
wintry solar
#

yeah

ivory coral
#

oh cool thanks

sullen fern
#

first i have to figure out how to make the joker score chips for a specific set of suit

#

i know showdown has a joker like that

#

color splash i think?

#

yeah, i don't understand this.

#

can someone like, help me with this?

#

i haven't done anything like this before

#

like, scoring chips when specific suits are scored

paper zealot
#

My pampered sensitive eyes cannot handle the purity that is blinding light-mode un-highlighted code

solar eagle
#

where is start_dissolve defined?

#

aha found it

latent portal
#

chat

#

peak?

solar eagle
#

hmm

#

how would i create a new context?

#

specifically for when a card is copied

red flower
#

SMODS.calculate_context({you_context_name = true, copied_card = card}) then you can access it with context.you_context_name and context.copied_card

solar eagle
#

oooo handy

#

i was looking at the function but wasnt quite sure how it worked

manic rune
#

@red flower :3

sturdy compass
manic rune
#

hard to proc consistently but i think X4 Mult whenever a card is scored makes it worth the gamble

#

:3

earnest stratus
#

Hello folks, I've been learning Lua and would like to start looking around the source code to get a better idea of how the game is built so I can develop my own mod. Since I'm fairly new to this, would anyone be kind enough to explain to me how I can access/view the source code?

chrome widget
#

Use a file unzipper like 7zip or Winrar on your Balatro executable, and the source code is right there

earnest stratus
#

Awesome, thank you!

chrome widget
#

What would be the most effective way to make a voucher effect that gives you a tag on boss blind defeat like anaglyph?

#

The decks use trigger effects/contexts in SMODS, but afaik vouchers don't have anything similar?

#

Would I basically just define vouchers as a cardarea so that I can evaluate them like other cards?4

#

Oh well, they are a cardarea already, I assume

#

Just not normally touched by SMODS.calculate_context()

rapid stag
#

...what? i click my new tab and get this error.

contents of the right image is going into SMODS.current_mod.extra_tabs

paper zealot
rapid stag
#

ohhhh cirDerp forgot about that

#

my toggles suddenly stopped working? the only thing i can think of that's different is that this might be the first time i've used one since i refactored the config ui into its own lua file. these toggles worked before - but now it's just not liking it?

#

i didn't change anything about the toggle code

#

other than that i moved the whole ui code

paper zealot
#

How are the callbacks defined? They might be pointing to a function that isn't in the current scope

#

They might need to be in the G.FUNCS global namespace, or preferably defined as members of your mod table if they're not already

rapid stag
#

in the create_toggle({}) call,

ref_value = [the associated item in config.lua],
callback = CirnoMod.callback_[ref_value]Toggle```
#

for each toggle

paper zealot
rapid stag
tepid crow
#

is your callback function doing anything in particular btw? I don't think I normally give my toggles one

rapid stag
#

the only place it's defined or referenced is in the create_toggle

paper zealot
#

Oh, you haven't actually defined that function? You can probably remove it then

rapid stag
#

well that fixes the crash, thanks cirComfy i'm probably not gonna need the callback for anything anyway

paper zealot
#

Yet again, i'm not surprised that it didn't work, but i'm surprised that it ever worked in the first place

rapid stag
#

i guess it just forgot to crash until now cirDerp

#

a certified localthunk moment

gilded blaze
#

is this the correct way to check for joker's rarity

tall wharf
rapid stag
#

no matter how many spaces i put, it doesn't do the spaces.

tall wharf
#

sorry i just woke up

#

lol

tall wharf
#

it just doesn't

rapid stag
tepid crow
#

yeah it's weird lol

tall wharf
#

new deck today

rapid stag
#

is there maybe a whitespace character i could use instead cirThink trick it into doing what'll effectively be a space
or is there only a limited characterset that the game's font or whatever is happening internally recognises?

tepid crow
#

oh right found it

#

it happens in the loc_parse_string at functions/misc_functions:1634

gilded blaze
rapid stag
tepid crow
latent portal
#

i need help

gilded blaze
#

I tried to use a while loop

latent portal
#

im trying to create a card in G.consumables, but whenever i do it just. creates over it.

#

not in it.

#

and i have a completely useless draggable card.

gilded blaze
#

so, something like this

#

ok my code is so jank

tall wharf
#

G.consumeables moment?

latent portal
#

omg aikoyori hiii!

tall wharf
#

hiii

#

I'm cooked

latent portal
#

do u know what went wrong?

tall wharf
#

i have class in an hour and a half

#

I'm still in my pyjamas

tepid crow
#

nice

latent portal
#

aw

#

well an hour and a half is a while

tall wharf
#

it's ok it's online class

latent portal
#

im jealous

tall wharf
#

still think I'm cooked

gilded blaze
#

😭

latent portal
tepid crow
#

yeeee

tall wharf
#

yeah

#

we love documented functions

gilded blaze
#

I tried to use a while loop and got stuck in an infinite loop
I could not tell what's wrong with envious_roulette

fickle stag
#

I HATE MULTITHREADING !!!!

tall wharf
latent portal
#

oh my god i changed one word and it worked instantly

fickle stag
#

was looking at balatro multiplayer’s networking code i’m going to blow up!

fickle stag
#

meowning

#

i’m not sure how lovely works with imports? i tried installing a json package w luarocks but it doesn’t find it

tall wharf
#

"just add multithreading to Minecraft it ain't that hard"

tepid crow
#

people who have never programmed anything complicated in their life be like

gilded blaze
tall wharf
#

true and real

latent portal
tall wharf
latent portal
#

collab moment?

gilded blaze
#

I'm just using common sense wording from vanilla

tall wharf
#

i have an edition that makes the card trigger twice but the values are halved

fickle stag
#

so what’s the

#

difference

#

oh

gilded blaze
gilded blaze
#

giving twice of X1 Mult is really nothing

fickle stag
#

create half a tarot card

tall wharf
#

here's my space oddity challenge

#

it's more like a what if

gilded blaze
tall wharf
tepid crow
#

sliced is a pretty cool edition (?) btw

tall wharf
#

it is an edition yeah

rapid stag
tall wharf
#

free X0.25

#

could be useful for the Height

gilded blaze
#

how do I fix envious_roulette 😭

tall wharf
rapid stag
#

{X:inactive} is not the same colour as {C:inactive}?

tall wharf
minor furnace
# tall wharf

something about this being 1 in 2 instead of 2 in 4 hurts my soul

gilded blaze
gilded blaze
#

I'm now asking for defects in envious_roulette

#

😭

tall wharf
#

what does that do

gilded blaze
#

chance to destroy at end of round

minor furnace
gilded blaze
#

deck effect that applies to all owned jokers

tall wharf
#

wait no

#

that's just jokers moment

manic rune
minor furnace
tall wharf
gilded blaze
#

always return 0, causing an infinite loop

tall wharf
#

probabilities are unaffected

versed swan
#

How do you do joker retriggers? I don't know if I didnt check docs close enough but couldnt find anything on the matter

manic rune
#

-# maybe

sonic cedar
#

last one of these for a bit, i'll share some that have special conditions to trigger other than "joker did thing do transform oog oog"

but this one shows off functional not-zany and the ijiraq ingame

tall apex
minor furnace
tall wharf
tall wharf
minor furnace
gilded blaze
manic rune
tall wharf
tall wharf
#

oops all sixes doesn't take effect on run menu

#

that's why it still says 1 in 2

gilded blaze
#

{odds_uncommon = 20, odds_rare = 15, odd_legendary = 10}

minor furnace
tall wharf
#

IT HALVES THE ODDS

#

NOT THE PROBABILITIES NORMAL

#

WAAAAAA

minor furnace
#

ah

gilded blaze
#

halving the odds = doubling the probability

minor furnace
#

I see now

gilded blaze
#

imagine

sonic cedar
#

youre flipping one coin instead of 2

tall wharf
#

(it's still on GitHub)

manic rune
#

if you really intend on using while loops for this one, put a var outside it like local stop = false, then set it to true when roll returns 1 (aka while not stop do), relying on G.jokers.cards seems really unreliable

gilded blaze
#

Bloodstone: played cards with Hearts suit give X0.75 Mult

sonic cedar
minor furnace
sonic cedar
tall wharf
#

the numerator is usually from game variable

gilded blaze
#

G.GAME.probabilities.normal

minor furnace
#

I am aware of this

#

I've used it in my own modding

gilded blaze
#

so it's the wording that causes confusion

manic rune
sonic cedar
tall wharf
#

values are halved if possible

minor furnace
#

you could just as easily feed G.GAME.probabilities.normal/2 to the loc_vars and use it in the calculations

tall wharf
#

i don't know how to word it

gilded blaze
#

that's the culprit I see

tall apex
#

Goodnight balatro bozos

manic rune
#

orr wait, can you show me the entire code

tall apex
manic rune
#

i have a really vague idea on how the code looks like rn šŸ’€

minor furnace
tall wharf
#

my wordings are crazy

manic rune
#

this is what lack of sleep + tests do to you

#

šŸ’”

tall wharf
#

-# (i don't know English)

gilded blaze
minor furnace
sonic cedar
manic rune
manic rune
#

:3

minor furnace
tall wharf
#

in case you're confused

gilded blaze
manic rune
#

i see

minor furnace
#

very interesting Joker concept though

tall wharf
minor furnace
#

there is no freedom šŸ˜”

tall wharf
#

ado reference

minor furnace
#

wait what was the ado reference

tall wharf
#

freedom

sonic cedar
minor furnace
#

ah. see I am a fake fan, who only knows usseewa

tall wharf
#

i went to her concert once...

minor furnace
#

and the One Piece Red songs

manic rune
#

actually, in the middle ground

#

probably stop at about 2-3 jokers

tall wharf
#

if all else fail just destroy a random one

gilded blaze
#

since i = i + roll doesn't work, it's an infinite loop

minor furnace
#

I had freinds that went to an Ado concert in Chicago? I think is where it was

gilded blaze
#

and I don't think envious_roulette works either

manic rune
#

yeah but is it supposed to destroy more than one joker here?

gilded blaze
#

each joker, depending on its rarity, rolls a Gros Michel-like logic

vast fractal
#

is there a SMOD.Blind code example since my brain cant fully understand what's in the documentation

manic rune
#

yeah no the logic is definitely wrong here

gilded blaze
#

I see

manic rune
#

what you are doing is increasing i by 1 everytime a joker is destroyed, i suppose?

minor furnace
#

One day I will complete my multi-wave finisher blind...

gilded blaze
tall wharf
#

guys

#

i just found my own bug

#

THE NATURE DEBUFFS ALL CONSUMABLES

minor furnace
tall wharf
#

NO

#

THAT'S NOT WHAT THE NATURE IS SUPPOSED TO DO

manic rune
#

:3

tall wharf
#

IT IS SUPPOSED TO GIVE X0.5 MULT PER FACE CARDS IN HAND AND AT PLAY

minor furnace
#

???

#

how

#

how does it turn from that into that

manic rune
#

yeah uh your code is confusing as hell, doesn't help with the fact that im on my phone too

tall wharf
#

I FORGOT TO REMOVE SET BLIND

manic rune
#

šŸ’”

tall wharf
#

I COPIED THIS SHIT RIGHT FROM EXPIRY

minor furnace
#

based

tall wharf
#

oh anyway jsyk

minor furnace
#

btw did any of y'all see this post on reddit? because there is a demon inside me that makes me want to implement it

manic rune
#

passing your problems to aiko or someone else, sorry :(

minor furnace
tall wharf
minor furnace
#

this is exactly the level of insane I love to see

tall wharf
#

but not start new run

manic rune
#

im never touching yt again

#

;3

minor furnace
#

imagine getting this card inside of a sub-run where you already had it

#

and surely the sub-runs count towards completion?

#

I need to stop before I actually try to do this

manic rune
#

would it be funny if i made a mod which turns all text into binary

gilded blaze
#

at least that's what I intend it to

#

but i = i + roll doesn't work, envious_roulette doesn't destroy jokers

minor furnace
#

oh no what if I made a joker that does something different depending on the current day of the week

#

or a Joker that specifically only does something on Leap Day

gilded blaze
#

Leap Joker (Common)

X29 Mult if triggered on Feb 29th
otherwise +4 Mult

minor furnace
#

I think I should do this

#

Tomorrowā„¢ļø

gilded blaze
#

changed to for loop and removed i = i + roll

#

it worked, but destroyed every joker šŸ’€

#

so envious_roulette works

#

the only problem is i = i + roll

#

and iterations too

turbid maple
minor furnace
#

speedrun challenge

#

I think it's more cursed that high contrast isn't on though

fickle stag
#

how do I hook functions? for example run my own when a shop is entered, and when in the playing stage, selecting blind etc

turbid maple
#

lua is like a house made of playdoh and you can just overwrite functions by redefining it

paper zealot
fickle stag
#

thanks!!

#

damn u can just do anything

tall wharf
#

hello

fickle stag
#

hewwo

tall wharf
paper zealot
# fickle stag damn u can just do anything

You can, which is very powerful, but there are no safety checks.
Make sure you're not breaking anything in your mod or in other's mods by hooking important functions incorrectly

turbid maple
#

no i'm planning on removing hands/discards as a resource

tall wharf
#

I'll go somewhere today maybe

#

i just wish

turbid maple
#

nice washing machine

paper zealot
tall wharf
#

me when i forgot to return the original value

fickle stag
#

im just getting info then running %orig

#

hopefully it wont be hard ;;;;;; idk

fickle stag
tall wharf
turbid maple
#

me when I brainfart and call the hooking function inside the hooking function and create an infinite loop

fickle stag
turbid maple
#

where are you that you have easy access to japanese washing machine games im jealous

tall wharf
fickle stag
#

the closest one to me is a 30 min drive

turbid maple
#

damn trying to find an arcade that doesn't suck ass around murica is impossible

#

lucky you

tall wharf
#

i only started playing 13 recently

#

i mean I'm not even that good

tall wharf
#

a few months

#

they are trying to get maimai to the US

vast fractal
scarlet spire
#

alright im gonna try to figure this out one more time before I either wait for blinds to get calculate functions, or figure out how to patch it in

#

is there a way to have a blind debuff all consumables?

fickle stag
paper zealot
#

Pretty much. I'd also rename update for clarity, and return the result of the original function. Just for the sake of mod compatibility if other mods also hook update to return a value:

local game_update_ref = Game.update
function Game:update(dt)
  local ret = game_update_ref(self, dt)
  -- things and such
  return ret
end
fickle stag
#

oh wait other mods can access my variables too?

#

wtf hahah okay

#

thanks !!!

paper zealot
#

Lua is a little scary like that. Everything is global by default, local limits their scope. Gotta be careful with what you're introducing into the global namespace

fickle stag
#

got it :D

paper zealot
#

With great power comes great responsibility - some dead guy

tall wharf
#

i have class

#

wah

#

:<

#

ordering mcds again today

fickle stag
#

is there a way for me to like use ctrl click to view definitions in balatro src

#

like it's just syntax highlighting in vsc

tall wharf
#

i think you'll have to like

#

put stuff in lua things

#

normally i just look in the source code myself

fickle stag
#

ah

tall wharf
#

also

#

yeah put the whole mods folder in workspace

#

steamodded has lsp thing

paper zealot
#

Should do the trick

#

Along with the Lua extension, though its not always great at resolving more complex relationships

fickle stag
#

mfw forgot to install lua lsp

fickle stag
sonic cedar
#

stealing this trick for tmr

scarlet spire
#

trying to patch in a game variable that suppresses the creation of consumables really just leads to create_card returning nil which is a scary thing that should never happen

#

because things that use create_card and then do something to that created card are not nil checking, and probably didn't need to until I came along

tall wharf
#

im not a bot

gleaming zealot
#

happy pi day nerds

#

🄧

tall wharf
#

happy pi day silly

opal spade
#

why are there so many special days in march

tall wharf
#

MAR10 was mario day

lavish lake
vast fractal
#

is there a way to trigger a blind after before the final scoring step?

scarlet spire
#

probably once calculate functions are added to blinds

#

I believe you'd have to patch this in currently

#

press_play only activates pre-scoring

vast fractal
#

thank you
omg peak pain again 😭

scarlet spire
#

i'm in it too, one of my blinds is currently extremely evil because it scrambles suits of played cards before scoring, so any hands relating to suit are completely ruined

versed swan
#

I'm trying to make a Joker retrigger the right-most Joker, but it's not working; how do I do it?

calculate = function(self, card, context)
    if context.retrigger_joker_check and not context.retrigger_joker and context.other_card ~= self then
        if context.other_card == G.jokers.cards[#G.jokers.cards] then
            return {
                message = "Again!",
                repetitions = 1,
                card = card
            }
        end
    end
end,
vast fractal
#

my dumb ahh brain cant figure how to make it work)

daring fern
#

How could one make a joker multiply all values of another joker by a certain amount?

hushed field
#

if you wanna be able to reset them, store them on the multiplied joker, and then check if ability.extra is a table or a value. if it's a value, multiply that value, if it's a table, go through the table and multiply every number

#

this will multiple generally every value, though, which will definitely mess with some jokers in unexpected ways

zealous glen
fickle stag
#

what's the function run when hands are played / discarded? i can't find it in the src qwq

vast fractal