#💻・modding-dev

1 messages · Page 269 of 1

glad osprey
#

that was after the shop

normal crest
#

But idk where it's defined

humble girder
#

yeah so uh

glad osprey
#

the blinds stayed for some reason

#

i have no clue how to remove them

normal crest
#

And I don't have access to the source rn

humble girder
#
        local gfts = G.FUNCS.toggle_shop
        G.FUNCS.toggle_shop = function(e)
            gfts(e)
            if G.GAME.USING_RUN then
                G.E_MANAGER:add_event(Event({
                    trigger = "after",
                    delay = 0.5,
                    func = function()
                        G.GAME.USING_RUN = false
                        G.GAME.USING_CODE = false
                        return true
                    end,
                }))
                local hand_count = #G.cry_runarea.cards
                for i = 1, hand_count do
                    draw_card(G.cry_runarea, G.hand, i * 100 / hand_count, "up", true)
                end
                G.E_MANAGER:add_event(Event({
                    trigger = "after",
                    delay = 0.5,
                    func = function()
                        G.cry_runarea:remove()
                        G.cry_runarea = nil
                        G.STATE = G.STATES.SELECTING_HAND
                        return true
                    end,
                }))
            end
        end
glad osprey
#

tried that too

humble girder
#

this bit looks like it's handling getting back from shop into run

#

and also

#
[[patches]]
[patches.pattern]
target = "game.lua"
pattern = '''ease_background_colour_blind(G.STATES.SHOP)'''
position = "at"
payload = '''if not G.GAME.USING_RUN then ease_background_colour_blind(G.STATES.SHOP) end'''
match_indent = true

[[patches]]
[patches.pattern]
target = "game.lua"
pattern = '''if self.STATE == self.STATES.SELECTING_HAND then'''
position = "before"
payload = '''if G.GAME.USING_RUN then self.STATE = self.STATES.SHOP end'''
match_indent = true

these two patches look relevant, but didn't really look into what they patch into

glad osprey
#

top one just stops the bg from fading into the shops bg

humble girder
#

yeah the second one is more interesting

onyx sonnet
#

bump

glad osprey
#

i think its jsut so that the cards you get in packs and stuff are the same as the ones you hold?????

humble girder
#

not sure what this one is about

# Run - don't clear shop
[[patches]]
[patches.pattern]
target = "game.lua"
pattern = '''if self.shop then self.shop:remove(); self.shop = nil end'''
position = "at"
payload = '''if self.shop and not G.GAME.USING_CODE then self.shop:remove(); self.shop = nil end'''
match_indent = true
glad osprey
#

i think i just have to find out how the game removes the blind selection

humble girder
#

can't be, apparently they're literally preventing you from opening packs
--Run - don't open packs in shop

glad osprey
#

ive done it before what

humble girder
#

might be on an old af cryptid

#

i mean you don't really need to remove the blind selection

glad osprey
#

it duplicates itself so either i remove the old one or stop the new one

humble girder
#

that's not what you should be focusing on, it's about the leave shop button doing a state transition into blind selection by default that needs to be patched to go back into play instead if your conditions are met

#

cause i'm pretty sure blind selection is a state

#

from cryptidless smods:

G.FUNCS.toggle_shop = function(e)
    stop_use()
    G.CONTROLLER.locks.toggle_shop = true
    if G.shop then 
      SMODS.calculate_context({ending_shop = true})
      G.E_MANAGER:add_event(Event({
        trigger = 'immediate',
        func = function()
          G.shop.alignment.offset.y = G.ROOM.T.y + 29
          G.SHOP_SIGN.alignment.offset.y = -15
          return true
        end
      })) 
      G.E_MANAGER:add_event(Event({
        trigger = 'after',
        delay = 0.5,
        func = function()
          G.shop:remove()
          G.shop = nil
          G.SHOP_SIGN:remove()
          G.SHOP_SIGN = nil
          G.STATE_COMPLETE = false
          G.STATE = G.STATES.BLIND_SELECT
          G.CONTROLLER.locks.toggle_shop = nil
          return true
        end
      }))
    end
  end
#

pretty sure you just need to patch this line:
G.STATE = G.STATES.BLIND_SELECT
with something to conditionally go back into whatever state you came from

humble girder
#

functions/button_callbacks

#

but i mean just find in folder for G.FUNCS.toggle_shop

glad osprey
#

and then when skipping a blind it will open a shop

uncut grail
humble girder
#

so hold on, what exactly is the issue, is the blind select in the background never going away when you're going into the shop?

#

oh

glad osprey
#

yes

#

thats precisely the issue lol

humble girder
#

okay let me look at what the blind select button does then

glad osprey
#

i think ive found a solution

#

maybe

humble girder
#
          trigger = 'immediate',
          func = function()
            ease_round(1)
            inc_career_stat('c_rounds', 1)
            if _DEMO then
              G.SETTINGS.DEMO_ROUNDS = (G.SETTINGS.DEMO_ROUNDS or 0) + 1
              inc_steam_stat('demo_rounds')
              G:save_settings()
            end
            G.GAME.round_resets.blind = e.config.ref_table
            G.GAME.round_resets.blind_states[G.GAME.blind_on_deck] = 'Current'
            G.blind_select:remove()
            G.blind_prompt_box:remove()
            G.blind_select = nil
            delay(0.2)
            return true
        end}))```
#

i literally think it's just this

G.blind_prompt_box:remove()
G.blind_select = nil```
dull flume
#

Anyone can help with making custom poker hand. I want to make poker hand which will be plays when hand contains one 5 and one 2 with same suit. I read steamodded wiki and watched examples but I still dont understand

glad osprey
narrow iron
#

how can i add a card to a pool that isnt the pool of an objectType?

humble girder
#

progressish

onyx sonnet
#

how do people add the compatibility popup to joker descriptions?

red flower
#

like blueprint?

onyx sonnet
red flower
#

you use main_end in loc_vars

#

this is what blueprint does

onyx sonnet
red flower
normal crest
#

the blueprint one is more complex cus it's not just a line of text

#

it has a background and stuff

onyx sonnet
uncut grail
#

how would i make the number actually change in the description for a scaling joker

glad osprey
#

#1#

#

replace 1 with the index of the number in the loc_vars or wherever it is

uncut grail
#

oh, cool! thanks!

bronze ocean
#

Hello!! I was playing around and ended up making a modded deck similar to Ace in the Hole, but with a random card (so not always Aces)

I wanted to see how to add the config tab, but the mods that do have them are HUGE. Is there a simpler example?

normal crest
bronze ocean
#

I did not! I was mostly just playing around with Ace in the hole but it just went crazy from there tbh - thanks a bunch!

#

I just realized everything I did is deprecated lmao

#

How do you create a deck if not with the deprecated function thingy?

narrow iron
#

im trying to get a consumable i made to say "Nope!", ive gotten it to make the text using attention_text(), but its displaying it in the top left corner, how could i get it to display on the card im making?

last sentinel
#

Is there a function i need to call after start_dissolve to fully remove a playing card from the deck? Realizing now that dissolve is just the visual

narrow iron
#

ik card:remove() will delete the card

last sentinel
#

classy, simple... i like it

onyx sonnet
#

theres also a context for removing cards in blinds

zealous glen
#

what did I do

narrow iron
#

did you use create_card instead of add_card ?

last sentinel
zealous glen
#

except all I did was add a print

#

nothing should've broken like this

onyx sonnet
last sentinel
#

discarded cards with gold enhancement are destroyed, I already have all the logic in context.discard and context.other_card.config.center.key == "m_gold". Was previously just running context.other_card:dissolve but that just visually removes the card from the deck

uncut grail
#

how would i get the eternal tag hint near the description?

#

don't think its in G.P_CENTERS

zealous glen
onyx sonnet
uncut grail
onyx sonnet
#

you might need to add an extra check for context.destroying_card maybe i dont mess with card destruction all that much

#

but this code block should be somewhat similar to your final product

last sentinel
#

I'll look into it, thanks

last sentinel
#

Is SMODS.has_enhancement better than context.other_card.config.center.key for any reason?

zealous glen
#

Smeared exists but Smranked doesn't

#

SMODS has quantum enhancements functioning

#

so mods can make use of it

onyx sonnet
#

it also looks prettier if thats of any worth

last sentinel
#

that is of the most worth

onyx sonnet
zealous glen
#

New Blind

opal holly
#

can i assign multiple ids to a certain card, like 6s may be treated as 6s and 9s for example

zealous glen
#

no

opal holly
#

ah

#

aight gotta rework an idea

unkempt thicket
#

basically, switching ranks instead of multiple

onyx sonnet
unkempt thicket
zealous glen
glad osprey
unkempt thicket
zealous glen
zealous glen
#

@formal parrot ?

zealous glen
narrow iron
#

that doesnt work for some reason

#

let me try again rq

zealous glen
#

Maybe it doesn't work

unkempt thicket
# narrow iron im trying to get a consumable i made to say "Nope!", ive gotten it to make the t...

I do this for that effect G.E_MANAGER:add_event(Event({trigger = 'after', delay = 0.4, func = function() attention_text({ text = localize('k_nope_ex'), scale = 1.3, hold = 1.4, major = card, backdrop_colour = G.C.GREY, align = (G.STATE == G.STATES.TAROT_PACK or G.STATE == G.STATES.SPECTRAL_PACK) and 'tm' or 'cm', offset = {x = 0, y = (G.STATE == G.STATES.TAROT_PACK or G.STATE == G.STATES.SPECTRAL_PACK) and -0.2 or 0}, silent = true }) G.E_MANAGER:add_event(Event({trigger = 'after', delay = 0.06*G.SETTINGS.GAMESPEED, blockable = false, blocking = false, func = function() play_sound('tarot2', 0.76, 0.4);return true end})) play_sound('tarot2', 1, 0.4) card:juice_up(0.3, 0.5) return true end }))

narrow iron
#

ik it works for jokers

zealous glen
#

ye

narrow iron
#

but it seems to be different for consumables

zealous glen
#

Showdown Boss Blind idea:

+X0.5 Blind size per $1 of sell value above $10

uncut grail
#

cooked

#

may need some diffrent colors for the sprite though, would appreciate some suggestions

zealous glen
#

can't you shorten it to "played without"

#

<@&1133519078540185692>

uncut grail
#

boop de doop mods

unkempt thicket
#

🔫

#

<@&1133519078540185692>

uncut grail
#

nice

#

we won

limber kraken
#

bang bang

glad osprey
zealous glen
glad osprey
#

how would one make an editions shader so that it just is all one colour and it is different shades of said colour

formal parrot
zealous glen
zealous glen
glad osprey
#

that does not mean shit to me

zealous glen
#

but suggestion is to look at colors according to human perception

#

and hueshift them to the same hue in the perceptual space

glad osprey
#

no like how would i program that

#

bcus i have no clue how to make a shader

zealous glen
zealous glen
glad osprey
#

oh shit

#

yea

stray dagger
glad osprey
#

?

ruby delta
#

I was thinking that someone could create a mod that adds a virtual keyboard input button. For example, if a mod requires keys like F2 or TAB, we could have a button on the screen for touch users.
For instance, the Brainstorm mod needs the Z and X buttons, as well as the 1, 2, 3, 4, and 5 buttons. In this mod, Z+1 adds a save, and X+1 loads a save.

stray dagger
#

im trying to get to the chat

minor furnace
#

is there a limit to the number of sprites you can load from a single atlas?

stray dagger
#

its stuck in suggested

ruby delta
#

Go to Channels & Roles

stray dagger
#

i figgured it out

#

dont worry

ruby delta
#

Great

onyx sonnet
zealous glen
onyx sonnet
#

simple strong effect, it should scale just about the same rate as red card

#

maybe more if you really dont want/cant have enhanced cards

minor furnace
#

it should be within the limits

zealous glen
#

maybe you used the wrong coordinates

minor furnace
#

this should be right
pos = {x = 1, y = 6},

ruby delta
zealous glen
zealous glen
minor furnace
onyx sonnet
minor furnace
#

double-checked the spelling and everything

ruby delta
onyx sonnet
#

its def possible, but you will be driven mad by how UI works in this game

zealous glen
ruby delta
minor furnace
next timber
#

the word they exists my man

minor furnace
#

we love it here

ruby delta
zealous glen
#

It's part of scrabble

onyx sonnet
glad osprey
#

the humble red card:

ruby delta
onyx sonnet
#

if you're interested in learning how it works you should ask them, but i think it might be too big for a first project

zealous glen
onyx sonnet
#

skip to 14 seconds to see the keyboard

#

but most of their stuff is worth checking out, its very creative

zealous glen
#

skip to 14 seconds to feel like a Victorian child eating a tablet with social media installed in it

ruby delta
next timber
#

shader tomfoolery

glad osprey
#

anyone got a good rgb to hsv code for the shaders

glad osprey
#

?

zealous glen
sonic cedar
brazen tusk
#

creature feature, featuring the creature

glad osprey
minor furnace
#

can you put vars inside the name field of loc_txt?

zealous glen
#

No

minor furnace
#

darn

sonic cedar
minor furnace
sonic cedar
#

so you want a dynamic name huh

zealous glen
minor furnace
#

thanks 🙏

zealous glen
#

Example

minor furnace
#

I'm making a joker that updates its name as you upgrade it

heady siren
#

Would there be a way to make Vampire not clear a certain enhancement? Without just like, stealing the Vampire code and shoving in if enhancement then don't

narrow iron
#

is there anyone here familiar with attention_text() that could help me out with using it?

zealous glen
heady siren
#

Actually... what if I just give the enhanced card the vampired variable when it's spawned?

#

If a card is already vampired then Vampire will ignore it

onyx sonnet
#

Possibly? That might be a value the game is constantly setting tho

#

You should try it out, it sounds like it could work

heady siren
#

This is the only place it tries to set the vampired tag, and it only sets it if vampired isn't already set

glad osprey
heady siren
onyx sonnet
#

Huge

heady siren
#

Now I just need to figure out how to prevent them from being set to enhancements using Tarot cards

#

I might just make them check to see if they're selected alongside a Tarot card and make them destroy themselves

onyx sonnet
zealous glen
#

Cryptid has decks that only allow one Enhancement to exist I think

heady siren
#

The destroying method works, and I kinda like that it does, the enhancement is meant to destroy the card once it's played, discarded, or at the end of the round, so it makes sense that trying to change the card would also destroy it

open aspen
#

how can i stop an enhancement from showing up in standard packs

#

nvm

heady siren
#

weight = 0, that's how I did it

open aspen
#

i forgot im gonna remove it

zealous glen
#

how can I stop an enhancement from showing up in my thoughts? I keep forgetting I'm gonna remove it
balatrojoker

maiden phoenix
heady siren
#

How would I override the loc_txt table after the card has been initialized? I want a card to have a different description when it's in the shop vs when it's in your jokers

minor furnace
#

apparently, there is no context for after the deck's final scoring step occurs

normal crest
heady siren
#

The description itself already has variables and stuff inside of it

normal crest
#

return { key = in_shop and 'key_when_shop' or 'key_when_not_shop', vars = { ... } }

minor furnace
normal crest
heavy hare
#

where could i find the position variables for the side menu? i see the table layout for a lot of the elements but is there an easy way to shift the menu over to the left some more?

heady siren
#

There's a SMODS.process_loc_text function but it doesn't seem to actually work

normal crest
#

just use a localization file

heady siren
#

I don't know how to set up localization

minor furnace
#

Apparently no jokers natively use the context.final_scoring_step

normal crest
#

Mods/your mod name/localization/en-us.lua

heady siren
normal crest
#

In that file do something like

return {
  descriptions = {
    Joker = {
      j_yourmodid_yourjokerkey = ... -- the stuff you usually put in loc txt
    }
  }
}

Then you can just remove your loc_txt in the joker

heady siren
#

How would I differentiate between in shop and not in shop?

normal crest
#

in your loc_vars check if card.area == G.shop_jokers

heady siren
#

And where do I put that?

#

That's what I'm asking

rugged pier
#

I want to retrigger only lucky cards in this function:

calculate = function(self, card, context)
        if context.repetition and context.cardarea == G.play then    
            for k, v in ipairs(context.scoring_hand) do
                if SMODS.has_enhancement(v, 'm_lucky') then
                    return {
                        message = 'Again!',
                        repetitions = 1,
                    }
                end
            end
        end
    end

But currently this is retriggering every scored card if lucky card is being scored, whats my error?

normal crest
#

in your loc_vars function

normal crest
#

Yeah, you don't need the or part now that I think about it

glad osprey
#

what am i doing wrong here

#

the chips arent chipsing

normal crest
#

use a calculate function

glad osprey
#

can i do that on editions?

normal crest
#

yes

dusk night
#

for mod dev purposes, i'm not very familiar with lua but is there some way to get a debugger or shell inside a running instance of balatro with a mod?

glad osprey
#

debug plus

dusk night
#

is that another mod?

normal crest
glad osprey
#

yes

dusk night
#

and you can use that to evaluate lua or print variables or similar?

glad osprey
#

yes

heady siren
#

Though after removing if self then to the remove_from_deck function so it doesn't get nil it doesn't reset when you remove the joker

normal crest
#

you should put your entire logic in loc_vars

#

not modify loc_vars

heady siren
#

Alrighty

buoyant merlin
#

How could an extra line be added to card tooltips like how Hiker or Enhancements do?

normal crest
# heady siren Alrighty

for example

loc_vars = function(self, info_queue, card)
  if card.area == G.shop_jokers then
    return {
      key = 'shop_key'
    }
  else
    -- info_queue stuff
    -- here the key will default to the key of the joker already
    return {
      vars = {} -- your vars
    }
  end
end

something like this, adapt it to whatever you need

zealous glen
#

universe is now massless

heady siren
normal crest
#

that works too

#

you can skip the key when it's not _shop cus it defaults to the key of the joker

primal robin
#

How to convert taliman's big number to regular number?

normal crest
#

use to_number

primal robin
#

ok

normal crest
#

make sure to define it if it doesn't exist

primal robin
#

Man adding Talisman compat for Saturn such a pain

#

Like this?

to_number = to_number or function(x)
  return x
end
#

Cool

heady siren
#

So return the key for if it's in a shop and return the variables for if it's in jokers?

normal crest
#

I mean it works the way you have it, just that specifying the key is not necessary when you're gonna put the same key of the joker

normal crest
hushed field
rugged pier
rugged pier
rugged pier
#

omg it worked

normal crest
#

ya, you can skip the message too, it's done by default

rugged pier
#

awesome thank you both :)

normal crest
#

better to skip it too cus it's localized properly by default

rugged pier
#

that makes sense

thin anchor
heady siren
#

Squeeshed Joker

dusk night
#

OH HELL YES

#

debugplus is perfect

#

it should be pinned in this channel

minor furnace
#

so, I've been using card.children.center:set_sprite_pos({x = 0, y = 5}) to change the base sprite of a card, but is there a way to do this with the soul sprite instead?

crisp coral
#

card.children.floating_sprite

#

make sure it's not nil

minor furnace
#

awesome, thanks!

normal crest
#

yw

minor furnace
#

it worked! 🙏

dusk night
#

srsly, does anyone have pin permissions?

normal crest
#

the mods

#

but i doubt they'll pin a specific mod here

dusk night
#

well, that's the sort of mod you would pin

#

and i did look there before asking

heavy hare
dusk night
#

unfortunately doesn't seem possible to paste in debugplus console 😦

normal crest
#

you definitely can paste

dusk night
#

well C-v doesn't work for me

#

oh ffs

#

nm

normal crest
#

I can't copy stuff from debugplus

#

but you can copy before and paste in

glad osprey
#

how do i allow for selecting multiple consumables at once

chrome widget
#

Huh, I'm trying to hook an SMODS ui function but it's seemingly not letting me

#

Oh wait no I see. that's specifically for the mod additions

small moon
last sentinel
#

Is there a conventional way to use pseudorandom for simple "1 out of 7 odds" events? seems like most mods just use math.random but that ruins seeded runs no?

#

obv couls use just {true, false, false, false, false...} as the pool but wanted to know if there was a more conventional way of doing it

hushed field
#

I haven't seen a mod use math.random, honestly

#

Pseudorandom can work exactly for that, no? Or am I misunderstanding what you need it to do?

last sentinel
#

I've only seen it used for a random item from a table not for "1 in 7 odds", but maybe im mistaken

manic rune
#

pseudorandom("what") < 1/7

last sentinel
#

oh dam aight

#

ty

manic rune
#

np

hushed field
#

Ah yeah, pseudorandom_element and pseudorandom are different functions indeed

thin anchor
#

is this correct?

manic rune
#

looks right

thin anchor
#

the joker_main doesnt do anything...

manic rune
#

is card.ability.extra.chips above 0

thin anchor
#

yes

#

it increases whenever a square is played

tepid crow
#

isn't it because your intendentation is fucked?

thin anchor
#

uhhhh blueprint

manic rune
#

wait

#

oh i see why

tepid crow
#

fix the indentation and you'll see the issue

manic rune
#

if context.joker_main is inside context.individual block

#

💔

#

this is why you make sure your indentation is fixed before working on anything else chat

#

code easier to read = easier to fix

thin anchor
#

o

#

ok yeah it works now i am such an idiot

toxic rain
#

Which the exception of python I don’t think any programming language cares about indentation when it comes to executing the code so it’s better to do whatever is most readable

modern kindle
toxic rain
#

Well I’m not the one debugging the thing so I don’t give a rats ass

turbid maple
#

setting up an automatic formatter is the best thing ive ever done

west mason
#

i still need help with this, been trying to make it work all day and im going insane dread

toxic rain
turbid maple
#

nvim

toxic rain
#

Ooh that’s cool

turbid maple
#

not that the choice of editor matters formatters are cool

manic rune
modern kindle
manic rune
chrome wadi
#

would this be the right channel to ask for help with an error?

manic rune
#

mhm

#

if its about ur mod

chrome wadi
#

its not

manic rune
chrome wadi
#

but this is the only active modding channel

turbid maple
#

I don't know what editor you use but there's probably a plugin that autoformats lua code

modern kindle
#

you can also just

#

in vscode

manic rune
#

wha

#

😭

#

the only uncommon keybind i know of is Ctrl + K -> Ctrl+ 0

warped marsh
#

Best keybinds, I don’t know how people go their day with using arrow keys or mouse

thin anchor
manic rune
#

im so lonely :3

thin anchor
#

awe...

#

wanna be friends? ^_^

manic rune
#

sure :3

#

music and bg color works

hollow seal
#

can sm1 maybe help me in modding chat?

wary skiff
#

Multiple phase Blinds? interesting...

manic rune
#

anyone knows where the code for the particles floating in the screen is?

gleaming summit
#

I have a joker that does an effect when a card is sold, how do I make it not check for itself?
I tried like this but it doesn't work

wary skiff
#

Can I use vanilla faster scaling in challenges, or would I have to implement it from scratch?

tall wharf
#

😭

manic rune
#

aka checking whether the card being sold is itself

celest aspen
#

I watched the youtube tutorial for creating a joker and they use in_pool Is that necessary for getting my joker(s) to show up in the game naturally in the shop?

gleaming summit
red flower
manic rune
#

if context.selling_card and context.selling_card ~= card then

gleaming summit
#

I think I tried that but let me double check

red flower
manic rune
#

N', did u check out how my blind looks like now

#

:3

red flower
#

let me see

red flower
gleaming summit
red flower
manic rune
#

thats the next boss im adding

#

its kinda weird how SMODS.Blind doesnt support custom bg color for showdown blinds specifically

red flower
manic rune
#

boss_color is completely ignored if its a showdown blind, since it shoves into your face the balatro color-themed background instead

#

💔

red flower
#

time for lovely patches 🙂

manic rune
#

nah

#

hooks r fine :3

gleaming summit
# red flower what's it supposed to do exactly?

gain sell value when any other joker is sold (rn it just checks for any card to be sold but I'll add the joker check later)
I'd like it not to count itself towards the "any joker is sold" becuase it looks confusing when playing

manic rune
#

i love hooks ❤️

red flower
manic rune
#

and you know what, its also weird how particles arent saved

#

like wtf is this

#

"MANUAL_REPLACE" my ass 😭

#

had to hook that to start_run too, basically recreating the particles every time ghh

red flower
gleaming summit
#

oh

manic rune
#

mmm

#

might as well work on cocolia while im on this

#

then release both boss blinds at the same time :3

red flower
#

🔥

manic rune
#

luckily the instrumental and vocal tracks are of the same duration

#

so i can use sync for this one

#

lets see if i can do the fight justice

gleaming summit
red flower
#

can you post the full crash log please

gleaming summit
#

sure gimme a sec

chrome widget
#

I need to figure out how to make different objects in the same consumable type have different shop appearance rates

#

Does anyone have any experience doing something similar?

gleaming summit
#

line 320 would be

faint yacht
#

Remove the self argument.

red flower
gleaming summit
#

I mean I tried it
it worked just like before when it had self
didn't crash but it still counted itself

normal crest
#

i'd say update steamodded just in case

faint yacht
#

The calculate for that addition appears to only lead to 2 args.

normal crest
#

and if it keeps happening send your full object

manic rune
#

one blind of mine is already like 350+ lines

#

should i

#

be concerned

#

😭

normal crest
#

only if you can't keep up with it

manic rune
#

i think my mod officially reaches 10k lines now

#

after 1 month of constantly working on it

#

:3

#

yipee

red flower
#

my localization file has like 3500 lines now

manic rune
#

jesus

#

i mean, you do have like a gazillion jokers

#

:broken

red flower
#

yeah

manic rune
#

i only have 22 so far

red flower
#

I have 209 :3

manic rune
#

my localization file is only 900 lines rn

gaunt thistle
manic rune
red flower
#

I just wrote like 50 more

glad osprey
#

how do i do this

manic rune
gleaming summit
red flower
glad osprey
#

ok how do i change that in a way that doesnt end up making it happen infinitely

normal crest
manic rune
# glad osprey how do i do this
if #G.playing_cards >= 60 or #G.playing_cards <= 20 then
  if not (some var to check, making sure that it doesnt increase the limit everytime) then
    (some var to check, making sure that it doesnt increase the limit everytime) = true
    G.jokers.config.card_limit = G.jokers.config.card_limit + 1
  end 
else
  if (some var to check, making sure that it doesnt increase the limit everytime) then
    (some var to check, making sure that it doesnt increase the limit everytime) = false
    G.jokers.config.card_limit = G.jokers.config.card_limit -1 
  end 
end

smt like that?

#

i forgot if its playing_cards or playing_card

gleaming summit
gleaming summit
red flower
manic rune
#

doesnt jonkler's calculate always have self, card and context in calculate

normal crest
red flower
manic rune
#

example mods should include localization too smh...

red flower
#

you can PR it 🙂

manic rune
#

im not confident in my coding skills enough to actually do a PR :3

normal crest
manic rune
#

confix

#

😭

glad osprey
#

shhhhhhhhhh

gleaming summit
manic rune
#

is that

red flower
#

more like cocoolia because shes cool

normal crest
#

she's not cool

manic rune
#

wildfire hits so hard im on my knee every time

normal crest
#

cocooln'tia

manic rune
#

🧎‍♂️

red flower
#

oh wow we're not respecting women over here

manic rune
#

😭

normal crest
#

not this specific person, naur

glad osprey
manic rune
#

why is she wide

#

💔

manic rune
red flower
manic rune
#

DLA

#

a

#

yeah

#

remove_from_deck

#

💔

#

paste this entire stuff in remove_from_deck

glad osprey
#

love it when SMODS documentation isnt correct

normal crest
#

that looks like the edition docs

glad osprey
#

it is

red flower
manic rune
#

wait

normal crest
#

remove_from_deck is not on an edition i'm pretty sure

manic rune
#

its edition?

glad osprey
manic rune
#

ok wait i think i gotta change my jokers

#

😭

#

thats concerning

#

edition does have calculate

glad osprey
#

not in the docs

manic rune
#

i guess you use on_remove for editions instead

glad osprey
#

thats what i did

narrow iron
#

where can i access the number of boosters in the shop?

glad osprey
#

it didnt work

manic rune
#

false alarm ❤️

tall wharf
#

what

manic rune
tall wharf
#

we have false alarm in this server?

manic rune
#

oh yeah, maybe check context.selling_card or smt in calculate?

normal crest
manic rune
#

you should probably keep on_remove though

normal crest
manic rune
#

it just doesnt run for when the card is being destroyed/sold, i think

normal crest
#

worst case scenario you might have to hook Card.remove

manic rune
#

hm

#

is there a context for when a joker isremoved from G.jokers

normal crest
#

nop

manic rune
#

:3

#

damn

#

yeah i think hooking to Card.remove might be the cleanest solution here

glad osprey
#

tf is card.remove

normal crest
#

i think it pretty self explanatory

red flower
normal crest
#

removes the card

glad osprey
#

i have never seen this before

manic rune
#

can we have the opposite of this please

#

💔

narrow iron
#

ig more specifically how could i change the number of boosters in the shop?

red flower
narrow iron
#

oh thats simple

#

thx

manic rune
#

i actually wonder why context.card_removed or something hasnt been added yet

normal crest
#

wish we knew

manic rune
#

...wait wait wait

#

you are telling me

#

cocolia, the supreme guardian of belobog, the embodiment of ice aura

#

shares the same VA as Corin???

#

😭

#

what

glad osprey
#

who wants to tell me how i fucked up this time

normal crest
#

Card not card

#

And make sure to check if self.edition and self.edition.type ... cus the card might not have an edition

manic rune
#

isnt it edition.key

glad osprey
#

either works

manic rune
#

huh

normal crest
#

you can also do edition.e_modprefix_key

#

Or maybe without the e_

manic rune
#

didnt know theres a lot of ways to refer to an edition

minor furnace
#

how might one change the displayed name of a Joker?

manic rune
#

wait wtf

#

why does cocolia have such weird dmg res

#

😭

minor furnace
manic rune
#

no like

#

look at this

rugged pier
#

how does the localization file know which description is for which joker?

manic rune
#

this is svarog's, its consistent

manic rune
rugged pier
normal crest
#

What's an example

manic rune
#

mine works that way, i dunno

rugged pier
red flower
#

it's always j_modpefix_key

rugged pier
#

ohhhh

red flower
#

(for jokers)

normal crest
#

pefix

minor furnace
#

yeah smods will add those prefixis for most things

manic rune
#

pefix, bepis, all the same

#

:3

rugged pier
#

gotcha okay that makes sense now

#

cause i spent the last 30 mins scrolling through every mod i had installed and had no clue

#

how it connected

red flower
normal crest
#

you'll have to make a different localization entry for the one with a different name

#

or directly make your own generate_ui

manic rune
#

like,
-20% Ice, -20% Quantum or some shit

#

ghh

minor furnace
#

I want it to be literally identical in every way and the only thing that changes is the display name

red flower
manic rune
#

:3

normal crest
rugged pier
#

this wouldnt work right?

manic rune
#

it wouldnt

rugged pier
#

because of the extra "_"

normal crest
rugged pier
#

gotcha

#

okay let me try

red flower
#

i think smods ignores the prefix even if you put it there

manic rune
#

im gonna work on that later, since that means i will have to rework jokers' description pages a bit too

#

actually, how do i do that

#

:3

#

i forgot

onyx sonnet
tall wharf
#

wergogkwerhplwe

red flower
normal crest
manic rune
rugged pier
#

got it to work, thanks guys!

normal crest
#

yw

manic rune
#

:3

normal crest
#

then hook

#

like a pirate

manic rune
#

true

#

🪝

#

we love hooks around here

#

what r patches...

manic rune
#

thanks :D

normal crest
#

patches are cool

manic rune
#

false

#

i hate patches

#

the bane of my existence

#

i will NOT touch them

normal crest
#

why not

manic rune
#

they look ugly

normal crest
#

patches are literally just

red flower
#

almost all my patches are UI related

normal crest
#

"hey there is this line of code I want to add code after/before"

onyx sonnet
#

All my patches are really simple

manic rune
#

yeah, but...

gray files

onyx sonnet
#

"hey you have this voucher, increment this variable by exactly 1"

red flower
#

get toml highlight

normal crest
#

get toml highlight

manic rune
#

oh

#

wait

#

yeah nvm i dont think i hate them as much now

normal crest
#

always try to avoid using at

tall wharf
manic rune
#

not using it rn tho

#

the plugin i downloaded makes comments highlighted sometimes 💔

red flower
#

my favorite patch

manic rune
red flower
#

gradients are automatically added to loc colours now which is cool

manic rune
#

oo

manic rune
#

my primary issue with patches was that its usually the cause of crashes

#

i like patches which prevent crashes though

red flower
#

i mean i wouldn't advice copying that one it's probably something dumb I'm doing with one of my card areas

manic rune
#

am i not using your card area code though

normal crest
#

that is not actually a card area

#

but is returned from SMODS.get_card_areas

paper zealot
normal crest
#

and is a string

red flower
#

but why doesn't it crash normally tho

manic rune
normal crest
#

cus it depends on the optional feature being toggled

#

at least that's what happened to me

manic rune
#

if i use {C:hsr_wind}, it should work now right?

normal crest
#

some other mod was using it

red flower
#

i dont have it toggled and i dont have other mods :3
also im pretty sure the log said it was because my card area didnt have a cards field when exiting a run for some reason

manic rune
#

also, im trademarking "hsr" as my mod prefix, sorry future balatro hsr modders

manic rune
#

nice

#

simpler than i thought it would be

red flower
#

my localization file is full of joy_ (not joy from me i hate writing descriptions)

manic rune
#

joy

normal crest
#

i love writing descriptions

manic rune
#

me 2

#

my mod is the embodiment of "please read", after all

red flower
#

my players dont read my cards so why bother

manic rune
#

yeah i saw that 😭

normal crest
#

it's not about other people

#

it's for me

manic rune
#

maybe just add "This card has effects" to descriptions from now on

#

❤️

normal crest
#

i get dopamine from a well written description

#

and you know maybe one or two people will actually read it properly once

red flower
#

i like the description writing part i hate the color coding

manic rune
#

im still glad that some people figured out how qingque works through her description

red flower
#

i also have to write like 50 at a time so it doesn't help

manic rune
#

:3

normal crest
#

I write without colors first

#

Then put colors on the important words

manic rune
#

i just put text without colors in, then it auto-colors everything for me

#

its convenient

red flower
#

i use a lot of colors

manic rune
#

actually, i can just do this right

tall wharf
red flower
#

im so proud about ability transfers theyre so cool

manic rune
red flower
#

ask yugipedia

#

or maybe that one i copied from the icon i dont remember

manic rune
#

:3

normal crest
#

I vote C = "something" instead of ["C"] = "something"

#

Same with ["Wind"] and ["Suit"]

manic rune
#

i mean, you can just do that

#

idk why im writing it like this instead :3

tall wharf
#

454561564

normal crest
#

Ya I am voting on your code

manic rune
#

true

#

im not changing though, sorry

red flower
#

i am voting against your code

normal crest
#

Me too

bronze ocean
#

Hello, all! Today in a break from work I spiraled and begun modifying a deck mod but I've hit a wall regarding custom deck creation and the mod config menu

I'm not entirely sure what I'm doing + I don't know much lua so I'm a bit lost

I have a modified version of "Ace in the hole" (which makes you begin the game with 4 aces, one of each suit). Right now, my modified version makes it so the card type is random every time you play. You can also set how many cards to begin with of each suit, and also a boolean to get a spectral pack after each boss blind (just for fun I guess)

However, I'd like to change these settings from the config menu in the mod screen itself - but the Deck API seems to be deprecated, an I'm not really sure how to connect it with this menu. I've managed to make it appear based on this: https://github.com/Steamodded/smods/wiki/Mod-functions#modconfig_tab

But I can't for the life of me understand how to actually connect that to the mod itself. Plus I need a drop-down selector, or some sort of text input so you can pick the card type (2-9, T, J, Q, K, A). The rest would be just a number input and a boolean.

Can anyone point me where I can read more about this? the git says to "see 'Building a UI' page" but I can't find it either 😅

GitHub

A Balatro Modding Framework. Contribute to Steamodded/smods development by creating an account on GitHub.

red flower
manic rune
normal crest
rugged pier
#

what does this crash message mean?

normal crest
#

it means you passed a string to ipairs

#

instead of a table

rugged pier
#

the problem is

#

i didnt even use that function

normal crest
#

Tho that doesn't look like your files, so you probably messed up the type of some argument

red flower
#

what's your code

bronze ocean
manic rune
#

...what happened to imaginary?? 😭

minor furnace
#

the documentation for how to actually use generate_ui to modify descriptions is rather sparse

normal crest
rugged pier
# red flower what's your code
SMODS.Joker {
    key = 'spook',
    atlas = 'scadrial',
    pos = { x = 0, y = 0 }, -- TBD after new art
    rarity = 1,
    cost = 4,
    unlocked = true,
    discovered = true,
    blueprint_compat = false,
    config = { extra = { rounds = 8 } },
    loc_vars = function(self, info_queue, card)
        return {
            vars = { 
                card.ability.extra.rounds 
            } 
        }
    end,

}

this is my new joker

normal crest
#

looks like the default text color

manic rune
#

accidentally uppercased that

#

:3

#

silly me

#

-# maybe thats foreshadowing welt's fate in the upcoming versions

red flower
# minor furnace the documentation for how to actually *use* generate_ui to modify descriptions i...

it's the ugliest part of my mod's code but you can look at it for pointers (all jokers have generate_ui point to this function) https://github.com/nh6574/JoyousSpring/blob/1b08302dd479967067c04d7c18a7ed5fe3aef684/src/card_ui.lua#L221

GitHub

Yu-Gi-Oh! Mod for Balatro. Contribute to nh6574/JoyousSpring development by creating an account on GitHub.

manic rune
#

gotta darken wind and imaginary guh

rugged pier
#
--Function to check if Aces, 2s, 4,s and 8s appear in played hand/discard
function Card:is_preservation()
    local id = self:get_id()
    if id == 14 or id == 2 or id == 4 or id == 8 then
        return true
    end
end

local mod_path = "" .. SMODS.current_mod.path
local function load_folder(folder)
    local files = NFS.getDirectoryItems(mod_path .. folder)
    for i, file in ipairs(files) do
        SMODS.load_file(folder .. "/" .. file)()
    end
end

load_folder('src/joker')

this is my main file that loads in those jokers

manic rune
#

how do i use darken()

#

nah, more like, what does the second input mean

minor furnace
manic rune
#

does this make it 20% darker?

red flower
manic rune
#

uh

red flower
manic rune
#

oh

#

thats not percentage 💔

#

it would be 20 if thats the case

red flower
#

well you know what i mean

manic rune
#

that is NOT percent 💔

red flower
#

localthunk is on my side once again

manic rune
#

imaginary still looks shit

#

its probably the color itself, not the darken then

rugged pier
manic rune
#

its actually hard getting a decent yellow color

#

without it fading into the white background

#

😭

#

ok maybe thats it

lethal ridge
#

how do i blacklist cards

#

when i create random cards

#
local randomsets = {'Joker'}

for i, v in pairs(SMODS.ConsumableTypes) do
    table.insert(randomsets, i)
end

functions Starry.random_add_card(blacklist)
    SMODS.add_card({
        set = randomsets[math.random(1, #randomsets)]
    })
end
rugged pier
manic rune
#

🤷‍♂️

lethal ridge
#

use gradient

bronze ocean
#

which table should be referenced for the mod's config? I tried SMODS.current_mod.config but it's being set as nil?

normal crest
#

SMODS.current_mod only refers to your mod during the loading stage

#

so you should store it somewhere or use SMODS.Mods.yourmodid.config

rugged pier
#

how do you arrange mods in your mods settings? like is there a way to order them?

red flower
#

i think they're sorted by mods with a config first and then loading order

rugged pier
#

hmm i tried just putting my mods' priority at -160000 from being originally at 0

#

didnt change position

red flower
#

is it after mods with a cogwheel

rugged pier
#

yeah

red flower
#

then it's what i said

rugged pier
#

oh like when you say config you mean they have a setting to apply not a config file in the mod

#

gotcha

#

okay that makes sense, thank you

red flower
#

i mean those have a file in the mod called config.lua

#

but yes

minor furnace
red flower
#

if you need to change the name you just need the second line

minor furnace
#

just the full_UI_table.name bit?

red flower
#

yes

#

full_UI_table.name = localize { type = 'name', set = "Joker", key = "your_key", nodes = {} }

manic rune
#

why is it showing yellow here

#

theres

#

nothing

minor furnace
red flower
#

localize takes the name from your localization file and makes the UI for it

#

(you also need to call SMODS.Center.generate_ui or the rest of the description won't show up)

minor furnace
#

ah, well I don't have localization file

manic rune
#

nvm, its just my vsc being slow and fucked up

#

:3

#

is this what coding on a bad pc feels like

red flower
minor furnace
#

is there not just a quick and dirty version that lets me set the text manually?

manic rune
#

element color changes now

red flower
manic rune
#

-# still waiting for hide_badge to properly work :3

minor furnace
#

or, I guess this method only works with a localization file

bronze ocean
#

This should work in my head, but it's crashing when trying to figure out the width. Automatically setting the width also doesn't fix it. The idea is to have a slider to go from 1 to 14 to select which card rank to use and It works (ish) but I want to display the selected rank in real time. Any ideas?

                local rank = "Rank: "
                if SMODS.Mods.AllOfOne.config.only_one_rank_all_of_one == 1 then
                    rank = rank .. "Random"
                elseif SMODS.Mods.AllOfOne.config.only_one_rank_all_of_one == 11 then
                    rank = rank .. "Jack"
                elseif SMODS.Mods.AllOfOne.config.only_one_rank_all_of_one == 12 then
                    rank = rank .. "Queen"
                elseif SMODS.Mods.AllOfOne.config.only_one_rank_all_of_one == 13 then
                    rank = rank .. "King"
                elseif SMODS.Mods.AllOfOne.config.only_one_rank_all_of_one == 14 then
                    rank = rank .. "Ace"
                else
                    rank = rank .. SMODS.Mods.AllOfOne.config.only_one_rank_all_of_one
                end
                return rank
            end , ref_table = SMODS.Mods.AllOfOne.config, ref_value = "only_one_rank_all_of_one"}),```
red flower
minor furnace
red flower
#

never used tprint, does it have a depth limit?

minor furnace
#

I don't think it does, but if it does its depth limit is higher than a regular print

gilded blaze
#

I've tried so many ways to parse custom locked description

minor furnace
#

I'm just surprised there isn't just an easy way to say name = "text" and be done with it quickly

red flower
#

just make a localization file lol

#

you don't even need to move everything there

gilded blaze
#

it's not that simple

minor furnace
#

all right, time to figure out localization files

gilded blaze
#

this doesn't crash at least

#

but nothing is shown

red flower
#

i have my own fields in the localization because im built different

minor furnace
#

I lied, I do have a localization file, default.lua

#

that I used for the tooltip for my Daily Double Joker

gilded blaze
#

I tried to study smods' loc overrides

#

still confused about it

red flower
#

you need to return key in locked_loc_vars doesn't seem that complicated

gilded blaze
#

already

red flower
#

and what's the problem

gilded blaze
red flower
#

isn't it unlock instead of unlock_parsed

narrow iron
#

how can i add the eternal description to a card with info_queue?

gilded blaze
#

it's been there the whole time

#

unlock works but I forgor to provide locked_loc_vars

red flower
narrow iron
#

yep that works

#

thx

wary skiff
#

I can't completely ban planet cards, can I?

red flower
#

from where

wary skiff
#

Challenges

#

I put down all the appropriate IDs, but Pluto seems to love showing up still

manic rune
#

i

#

forgot to give yanqing 25% atk when he has soulsteel sync

#

😭

red flower
manic rune
minor furnace
#

so something like this then?

        Other={
            sword_0 = {
                name = "Goddess Sword"
            },```

```full_UI_table.name = localize { type = 'name', set = "Other", key = "sword_" .. math.min(card.ability.extra.level, 4), nodes = {} }
SMODS.Center.generate_ui(self, info_queue, card, desc_nodes, specific_vars, full_UI_table)```
wary skiff
#

Packs are all banned, just the shop

red flower
#

yeah you might need a patch for that probably

wary skiff
#

what is patching, anyways?

manic rune
#

just to be sure, this resets your hands back to max hands right?

manic rune
#

basically: injecting your own code to a file

minor furnace
red flower
#

you need to modify create_card_for_shop most likely and remove the planet check

wary skiff
#

I'm assuming that Pluto still forcibly appears as a failsafe for cards that happen to have blue seal

red flower
#

no, I think it crashes

#

or the card appears anyway

#

one of the two

minor furnace
wary skiff
#

I ended up beating a blind with a flush in that challenge and a blue seal card created a Pluto card

red flower
minor furnace
#

it just doesn't change

#

no crash

red flower
wary skiff
#

it's most likely done to prevent a crash, if anything

red flower
wary skiff
#

Still an issue though since the crux of one of my challenges is relying on Tarots, Spectrals, and eternal Abstract and Madness jokers to beat the blinds without any forms of hand scaling

red flower
#

weird, I don't see anything wrong

red flower
minor furnace
red flower
#

maybe!

minor furnace
#

I'll try it at least

wary skiff
red flower
#

probably not lol

manic rune
red flower
# red flower probably not lol

I don't have the code with me rn but if you search "Blue" in the game's code there's a part where it checks which planet corresponds to the current hand and creates the card

manic rune
#

.

#

wait

#

why does the music sound so weird

manic rune
#

its probably the pitch, how do i set it to normal?

minor furnace
#

I guess it doesn't recognize it as valid if it doesn't also have a text field

#

thanks for the help! definitely would not have gotten there on my own lol

red flower
#

yw

#

now to sleep..

manic rune
#

nvm

manic rune
#

its the speed

#

gn N' :3

#

we thank you for your services

#

🫡

red flower
#

❤️

tall wharf
#

@manic rune you're stuck with me now

manic rune
#

wha

#

:3

#

whatchu mean by that

tall wharf
#

:3

#

I'm the 98%

manic rune
#

💔

#

@tall wharf

bronze ocean
#

ignore the hedious green

#

I can now die happy I should be asleep

manic rune
#

why green

#

of all colors you couldve chosen.

#

💔

bronze ocean
manic rune
#

im forever questioning your privilege to design uis

bronze ocean
#

someone quick give me a color I cannot be trusted

manic rune
#

😭 wtf

#

JUST USE RED MAN

#

💔

bronze ocean
manic rune
#

do you specifically hate red or something

tall wharf
#

nvm

manic rune
#

G.C.aikoyori

tall wharf
#

true

bronze ocean
manic rune
#

make it rainbow

#

❤️

bronze ocean
#

wait you can?

tall wharf
#

please make the background not that colour

manic rune
#

you gotta make your own gradient for that one

bronze ocean
tall wharf
#

look at this happy config menu

bronze ocean
#

is that comic sans

tall wharf
#

no

#

how dare you insult my font

bronze ocean
#

WHY IS MY UI SO ASS, I'VE ONLY BEEN PLAYING AROUND FOR 2 HOURS I SHOULD BE A GOD BY NOW

manic rune
#

comic sans is underrated

#

smh

tall wharf
#

2 hours?

#

that's like baby

manic rune
#

true

tall wharf
#

watch this

bronze ocean
#

can we exchange brains for a bit I wanna see smt

tall wharf
manic rune
#

have

#

i have

#

no cool ui stuff to show

#

💔

#

maybe except the description pages

bronze ocean
manic rune
#

but thats not impressive anymore

tall wharf
bronze ocean
#

Ok so where's the make_background_pretty helper function?

tall wharf
bronze ocean
#

fuck it we ball it's good enough I have work in a few hours

bronze ocean
# tall wharf shit bg tbh

I have 0 idea on how to change it I didn't even put a bg node and I'm not willing (atm) to look up how to unshitify it

tall wharf
bronze ocean
#

I am the single user of this mod nobody will know

bronze ocean
tall wharf
#

please end the development now

bronze ocean
#

you've given me unholy powers that I am in no way qualified of using for good

paper zealot
#

G.C.CLEAR also works if you just want to hide the background

bronze ocean
#

why hide it

#

ok quick question where can I change the value in G.C?

#

this is gonna be very funny I think