#💻・modding-dev

1 messages · Page 51 of 1

crisp coral
#

haven't done anything with backs, but can't you hook to the end of start_run?

tepid crow
#

my option a?

mellow sable
#

I think I have that in the enhanced deck code

frosty dock
#

pretty sure random with seeds is possible in apply, see erratic deck

tepid crow
#

erratic has a special case in Game:start_run lol

frosty dock
#

oh it does?

tepid crow
#

it's like

Game:start_run()
  ...
  back:apply()
  generate_seed()
  if self.GAME.starting_params.erratic_suits_and_ranks then
    ...

fixed*

tepid crow
frosty dock
#

maybe it's best to change that order then

tepid crow
#

yeah my option b which is why I brought it up

mellow sable
#

it uses its own seed tho so it’s fine

eager pawn
#

fellas, i need help. i'm currently adding jokers to a mod i'm making and when i load the jokers, everything works except the soul sprite (i'm only working on legendaries atm). this is the part of the code that loads the jokers (i just took it from the RiskOfJokers mod and modified it a tiny bit lol), it just doesn't recognises the soul_pos part i think

frosty dock
#

why would you make a new mod on steamodded 0.9.8?

#

please don't

crisp coral
#

0.9.8 code takes me back lol

eager pawn
#

it's on steamodded 1.0.0 (i think) don't worry

tepid crow
#

but you're using 0.9.8 calls/methods

frosty dock
#

then use 1.0.0 APIs

#

seriously, don't put yourself through that

eager pawn
#

so i gotta rewrite this

#

alright

tepid crow
frosty dock
#

yeah ofc

bright abyss
#

how would i insert new cards and stuff into the game?

frosty dock
#

by using steamodded-?

brisk pond
#

guys do I need to save my global variables in G or in G.GAME?

bright abyss
#

sorry if im asking too many quetion

frosty dock
#

there's plenty of mods out there you can take as examples

#

some are also included with steamodded

frosty dock
#

run-specific data belongs in G.GAME

brisk pond
#

okok

#

thanks aure we love you

frosty dock
brisk pond
#

what do you think of making a table GlobalVars = {...} with all my global variables (run-specific) and then modifying back_apply_to_run to include G.GAME.mymodsname = GlobalVars?

frosty dock
#

sounds like a bad idea because modifying the values in G.GAME will also modify the global table

#

and the changes will stick when you start another run

#

so you're better off constructing the table directly in back:apply_to_run

brisk pond
#

got it

#

thanks ❤

zealous glen
#

A few mods do it

#

But not as you described

#

Just adding a custom table to G.GAME

#

Oh wait I’m repeating what Aure said

#

Because I misread what you said

frosty dock
#

launched the PR

#

this should be the end of jank with bigger hands

#

please do break it

tepid crow
# frosty dock yeah ofc

btw, can I only "move" a codeblock by doing it like this?

[patch1]
target = "game.lua"
pattern = '''<codeblock>'''
position = "at"
payload = ''
[patch2]
target = "game.lua"
pattern = '''<move-to>'''
position = "after"
payload = '''<codeblock>'''
frosty dock
tepid crow
#

yeah alright

hushed cradle
#

i tried removing the card h_popup when you hover over it

#

and now they dont get removed

#

they just stay

#

its like the opposite of what i was trying to do

edgy reef
tepid crow
#

loc_txt should be closed a whole lot earlier

brisk pond
#

oh i see it now

sand rune
#

Quick one, are mod changes hot reloaded/reloadable or do we just nuke and restart?

edgy reef
#

Lua reloading was thanos snapped

sand rune
#

;C

#

insert gone reduced to atoms meme

tepid crow
#

the reloading wasn't helpful for almost all the mods so it was removed yeah

sand rune
#

ah that makes sense then welp gotta get my alt f4 game up xD

tepid crow
#

I think wilson was working on the exe restarting?

frosty dock
#

disabling or enabling some mod should restart the game for you as of now

primal robin
#

Mods do a lot of overriding so soft-restart is basically impossible

tepid crow
#

it uh... just exits for me

frosty dock
#

ugh

#

it does

#

@rough furnace what's up with that..

brisk pond
#

can you change the name of a joker mid-run?

rough furnace
tepid crow
#

windows 10

brisk pond
wintry solar
#

what does you loc_vars look like?

rough furnace
# tepid crow windows 10

Hmm it should work. I'm at work now but in about an hour or two, I should be available to help debug?

brisk pond
wintry solar
#

you can return a key = 'key' as well and change it accordingly

#

whhere the key is the reference to the localization table

brisk pond
#

ohhh okok

rough furnace
#

Also as a sanity check, does the restart work for anyone else on Windows? It worked for me but I was testing using Linux and wine

brisk pond
#

didn't know that was possible

rough furnace
#

I akos have a fairly unusual setup

wintry solar
#

return {key = (card.ability.extra.uses_left > 1 and self.key or self.key..'_single')} this is the balloon example

primal robin
#

Does It also works for blinds?

sand rune
#

For 1.0 SteamModded will this work the way I think it will work:

if context.cardarea == G.jokers then
        local chips, mult = GREED.evaluate_greed(G.GAME.dollars, card.config.greed)
        return {
            message = localize{type='variable',key='a_mult',vars={self.ability.mult}},
            mult = mult,
            chips = chips,
        }
    end

i.e when playing it will calculate and assign the mult etc

lament fjord
#

Okay so I'm running Balatro entirely through a native-Linux setup (the exe it came in is intact)

#

Holy cow that's some speed

#

It's telling me that it's getting 500+ fps if I don't framelimit it

brisk pond
#

don't look at set_ability, I already fixed it

frosty dock
#

last I checked you can't pass a set through loc_vars, it needs to be in the set of the original card

#

maybe it makes sense to add that

frosty dock
#

should work if you move it to Joker though

frosty dock
frosty dock
brisk pond
#

kk

sand rune
frosty dock
#

fr fr

sand rune
#

are there any API docs on 1.x atm, or perhaps a point to the source so I can read, mainly joker/deck related

tepid crow
#

oh the return { key = 'key' } is even mentioned in there, neat

sand rune
#

and what they do etc

#

and why for the joker calculate it returns mult_mod instead of just mult as per the source code in card.lua e.g 🙂

frosty dock
#

end_calculate_context specifically is deprecated, we just didn't really noticed that context.joker_main exists

#

the calculation stack in general is spaghetti code

sand rune
#

so is which syntax is the best to use right now

SMOD.Joker:new()
SMOD.Joker{}
frosty dock
#

first of all, SMODS, not SMOD

#

second, SMODS.Joker:new() is 0.9.8 syntax, don't bother with it

sand rune
#

yeah i sped typed and copied pasta'd ... dont trust macros xD

frosty dock
#

disregard all of the pages on the wiki that are not numbered

frosty dock
brisk pond
#
card.config.center.pos = {x = card.ability.extra.Rank - 1, y = card.config.center.pos.y}
card:set_sprites(card.config.center)

is this not a reliable way to change sprite?

sand rune
#

Right , so i can use that! And one more question, dor deck calculations what can I use ?

#

And if you guys need help updating docs, be happy to help contribute once I get some more understanding 😉

brisk pond
#

inside the wiki

frosty dock
#

I mostly just need to get myself to do it, been ironing out bugs and adding features more than anything lately

sand rune
brisk pond
#

that is too explained in that part

sand rune
#

thanks 😄

frosty dock
tepid crow
sand rune
frosty dock
brisk pond
frosty dock
#

card.children has the Sprite objects

sand rune
frosty dock
#

me getting tired of explaining "doesn't work" never helps in resolving the issue

brisk pond
#

you are right

#

the sprite remains the same

#

even when I call spriteCalc inside the calculate function

sand rune
#

So does that mean for using joker_main it would be

if SMODS.joker_main_context(ctx) then
  -- some main code here
end
-- or

ctx.joker_main = function (ctx)
-- code here
end
brisk pond
#
calculate = function(self,card,context)
        if context.discard then
            card.ability.extra.Rank = card.ability.extra.Rank + 1
        end
        UTIL.spriteCalc(card)
    end,```
brisk pond
brisk pond
#

in this case you do

calculate = function(self,card,context)
  if context.joker_main then
    -- code here
  end
end,
brisk pond
#

no inner calc is needed

sand rune
#

ah yeah like that, figured after I saw the discard example 🙂

sand rune
wintry solar
#

@brisk pond what does your atlas look like?

wintry solar
#

does it work if you put the set position line directly in calculate?

brisk pond
#

no

#

context for who joined now the conversation

sand rune
brisk pond
wintry solar
#

how are you testing cerlo?

brisk pond
#

i add the joker and discard cards

#

the rank changes because loc_txt changes

#

so Rank is not the problem

wintry solar
#

does card.config.center.pos.y exist?

sand rune
#

is there a rough expl on how the events work in game

brisk pond
sand rune
wintry solar
#

this is the actual order

unkempt thicket
#

how much does blueprint cost?

sand rune
frosty dock
tepid crow
unkempt thicket
wintry solar
edgy reef
#

This is cooking.

bright abyss
#

neat :)

mellow sable
#

awesome

brisk pond
brisk pond
compact idol
#

okay slight design problem: if I have a consumable type that creates a new card type (biome), what should the consumable type be called? I've been using CBiome in development but that doesn't feel like it would work with an actual release

brisk pond
#

maybe just a Tarot?

#

it feels like a waste to create a new consumable type for just a card

compact idol
#

the consumables will also level up the biome if the biome they would create is already active, which is why I didn't want to just put the biomes themselves in the packs, but thats a good point

hushed cradle
#

i cant seem to emplace multiple cards to these card areas

#

it shows the tilt as if it was the last card in the area

#

which makes it seem like there should be more

wintry solar
#

what does your area definition look like?

hushed cradle
#
  args = args or {}
  args._type = args._type or 'Back'
  args.col = args.col or 5
  args.row = args.row or 2
  args.specific_center = args.specific_center or nil
  local deck_tables = {}
  local cards_per_page = args.col*args.row
  local current_center = 0
  local deck_limit = 10

  S.card_display = {}

for i = 1, args.row do
    local row = {n=G.UIT.R, config={align = "cm", padding = 0.07, no_fill = true}, nodes={}}
    for j = 1, args.col do
      S.card_display[#S.card_display+1] = CardArea(
        G.ROOM.T.x + 0.2*G.ROOM.T.w/args.row,G.ROOM.T.h,
        G.CARD_W,
        0.95*G.CARD_H, 
        {card_limit = deck_limit, type = 'title', highlight_limit = 0, collection = false})
      table.insert(row.nodes, 
      {n=G.UIT.C, config={align = "cm", padding = 0, no_fill = true}, nodes={
        {n=G.UIT.O, config={colour = G.C.CLEAR, object = S.card_display[#S.card_display]}}
      }}
      )
    end
    table.insert(deck_tables, row)
  end

  if args.specific_center then
    local center = args.specific_center
    local card = Card(S.card_display[1].T.x + S.card_display[1].T.w/args.row, S.card_display[1].T.y, G.CARD_W, G.CARD_H, nil, center)
    S.card_display[1]:emplace(card)
    return {
      {n=G.UIT.R, config={align = "cm", r = 0.1, colour = G.C.CLEAR, emboss = 0.05}, nodes=deck_tables},
    }
  end

  for i = 1, #S.card_display do
    current_center = current_center + 1
    local center = G.P_CENTER_POOLS[args._type][current_center + (S.current_page*(args.row*args.col))]
    if not center then break end
    local card = Card(S.card_display[i].T.x + S.card_display[i].T.w/args.row, S.card_display[i].T.y, G.CARD_W, G.CARD_H, G.P_CARDS.empty, center)
    card.tilt_var = {mx = 0, my = 0, dx = 0, dy = 0, amt = 0}
    card.ambient_tilt = 0
    card.s_stats = true
    card.s_deck = true
    for j = 1, deck_limit do
      S.card_display[i]:emplace(card, 'front')
    end
  end
  
  local t = {
    {n=G.UIT.R, config={align = "cm", r = 0.1, colour = G.C.CLEAR, emboss = 0.05}, nodes=deck_tables}, 
    (cards_per_page < #G.P_CENTER_POOLS[args._type]) and {n=G.UIT.R, config={align = "cm",}, nodes = s_create_page_cycle_options({_type = args._type, colour = lighten(G.C.GREEN, 0.03), _type = args._type, row = args.row, col = args.col, button_func = 'deckview_page_cycle'})}
    or nil
  }
  return t
end```
tepid crow
#

you should really use

```lua
btw

wintry solar
#

could be to do with them being title type perhaps?

hushed cradle
#

ive tried all the different types

wintry solar
#

you can use type = deck

hushed cradle
#

and none of them seem to work

#

but then the sprite isnt right

tepid crow
#

"right"?

hushed cradle
#

i cant seem to change it either

wintry solar
#

card.children.back:set_role({major = card, role_type = 'Glued', draw_major = card})

#

and

hushed cradle
#

ill try that

wintry solar
#

card.children.back = Sprite(card.T.x, card.T.y, card.T.w, card.T.h, G.ASSET_ATLAS[G.P_CENTER_POOLS.Back[count].atlas], G.P_CENTER_POOLS.Back[count].pos)

#

this is what I use

hushed cradle
#

thanks

#

i had the second bit in my code at some point cos you sent that

#

but not the first bit lol

wintry solar
#

yeah I found the first bit later on

#

it keeps them in the right place

hushed cradle
#

well the sprites are correct now

#

but greyed out

tepid crow
#

interesting, that's normally what happens to all the "non-top" cards

#

never figured out where/why/how it applies the darkened effect though

hushed cradle
#

is there a way i can emplace a card at the top

#

in the game code it says if its deck it always goes to the front

#

but surely i dont want that if its greying them out

wintry solar
#

do you just want one card?

hushed cradle
#

no a few of them

#

can i just append it to the cardarea.cards?

tepid crow
hushed cradle
#

oh

tepid crow
#

it might have something to do with the decksize but I'm kinda just taking a shot in the dark here

hushed cradle
#

ill try up it

#

so with 1 it works

#

but if i add more it doesnt

tepid crow
#

wait what? what'd you change?

hushed cradle
#

i feel like thats just the same problem as before

#

the card limit to 1

tepid crow
#

yeah okay so it is doing something with the card limit

tepid crow
hushed cradle
#

well if i have it show multiple cards it doesnt work

#

it only shows 1

#

just like before it would only show 1

#

even if i emplaced like 10

tepid crow
#

ah

wintry solar
#

are you creating 10 cards, or just emplacing the same one 10 times

hushed cradle
#

oh

#

does that matter

#

its the same card

tepid crow
#

... yes

hushed cradle
#

fuck

#

that would be why

#

im an idiot

tepid crow
#

let me rephrase - I'd be surprised if it didn't matter

hushed cradle
#

now that i think about it yeah that makes sense

#

its all the same card lol

wintry solar
#

I'm just imagining someone in real life slamming the same card repeatedly into the table and wondering why the pile doesn't get bigger 🤣

hushed cradle
#

lmao

#

yeah it works now ofc

#

thank you guys for all the help

tepid crow
#

also is it just me or does the plasma deck look like it has only 1 card

hushed cradle
#

its because i was hovering over that one i think

tepid crow
#

ah yeah, it does appear to be a bit bigger so that would make sense

hushed cradle
#

managed to get the ui fixed too

#

that was a pain

long gust
#

guys. i just updated my cryptid mod and there's a problem: there is a syntax error, in the lovely. in function/common_events.lua
line 1144 is saying it needs a } to close out line 1126

#

i put it there and it still says line 1144 needs a } to close out line 1126. there's only one { in line 1126. what is going on

wintry solar
#

can you send the error screen?

long gust
#

looks like this

#

transcription because the image was too blurry:
Error

Syntax error: functions/common_events.lua:1144: '}' expected (to close '{' at line 1126) near 'play_sound'

Traceback

[love "callbacks.lua"]:228: in function 'handler'
[C]: at 0x7ffbef9a2fa0
[C]: in function 'require'
main.lua:23: in main chunk
[C]: in function 'require'
[C]: in function 'xpcall'
[C]: in function 'xpcall'

tepid crow
#

(aka copied and replaced over old cryptid files)

long gust
#

...yeah

tepid crow
#

yeah apparently you shouldn't do that haha

#

just nuke the whole mods folder and redownload it I guess

unkempt thicket
#

I am trying to make a joker like blueprint, I feel like this code should be working but other_joker keeps returning nil.

dawn oar
#

Would anyone know where to change the number of booster packs in the shop
If that's even possible

dim nimbus
#

Is there a way to make an enhancement not count as suit or rank like a stone card?

dawn oar
#

Look at how stone does it in card.lua
function card:is_suit

#

You'd have to shove whatever enhancement you don't want counting as a suit there and doing the same thing to it as stone cards

#

Also if that doesn't work for ranks idk what to tell you I only know about suits because I tried fucking with smeared joker once upon a time

frosty dock
#

you need card there

unkempt thicket
placid frigate
#

hey. i downloaded Lovley and Steammodded, on the github guide it says to but the Steammidded folder in the Mods directory but not what to do with Lovley (version.dll) file. where do i put it or is it a later step?

limpid flint
#

Put it where balatro.exe exists

wintry solar
dim nimbus
#

oh definitely, i know very very little about lua so some help would be greatly appreciated!

#

at the core im trying to make a card that gives +4 mult when held in hand and x1.25 mult when scored

wintry solar
#

That’s definitely possible! Have you got anything set up so far?

dim nimbus
#

as in somewhere in the modding discussion? no not yet, though I guess I could make one

wintry solar
#

No in your code 😂

dim nimbus
#

oh! i have it at the point where the card shows up in the enhancement card section

#

also the description seems to be broken

wintry solar
#

Oh cool that’s good, can you send a screenshot of the code?

dim nimbus
#
SMODS.Enhancement { -- Ofuda Card
    key = 'ofuda',
    atlas = 'snyo_enhancementatlas',
    pos = {x=0, y=0},
    config = { x_mult = 1.25, mult = 4},
    loc_text = {
        name = 'Ofuda Card',
        text = {'{X:mult,C:white} X#1# {} Mult when scored',
            '+#1# Mult when held in hand.',
            'Does not count for rank or suit,'}
        },
        loc_vars = function(self, info_queue)
            return { vars = {self.config.x_mult, self.config.mult,}}
        end
    }
wintry solar
#

and what's wrong with the description?

dim nimbus
#

totally doesnt display

wintry solar
#

oh your loc_vars needs to be outside the loc_txt

#

it's also loc_txt not loc_text

#

in terms of making it actually score, here are the two enhancements I have made right now. You might need to set the mult to be inside extra in your config, I don't remember off the top of my head how the no rank/suit cards re handled internally when scored.

SMODS.Enhancement({
    key = "postcard",
    loc_txt = {
        name = "Post Card",
        text = {
            "{C:chips}+#1#{} chips for every",
            "{C:attention}card{} held in hand"
        }
    },
    atlas = "new_enhance",
    pos = {x = 0, y = 0},
    config = {hand_chips = 10},
    loc_vars = function(self)
        return {
            vars = { self.config.hand_chips }
        }
    end,
    calculate = function(self, center, context, effect)
        if context.cardarea == G.play then
            local chips_return = 0
            for _, card in pairs(G.hand.cards) do
                chips_return = chips_return + center.ability.hand_chips
            end
            sendDebugMessage("Hand Chips: "..center.ability.hand_chips.." Cards in hand: "..chips_return/center.ability.hand_chips, "Enhancement Effect")
            SMODS.eval_this(center, {
                chip_mod = chips_return,
                message = localize({type = 'variable', key = 'a_chips', vars = {chips_return}})
            })
        end
    end
})


SMODS.Enhancement({
    key = "ore",
    loc_txt = {
        name = "Ore Card",
        text = {
            "{C:mult}+#1#{} Mult",
            "no rank or suit"
        }
    },
    atlas = "new_enhance",
    pos = {x = 1, y = 1},
    no_rank = true,
    no_suit = true,
    replace_base_card = true,
    always_scores = true,
    config = {mult = 10},
    loc_vars = function(self)
        return {
            vars = { self.config.mult }
        }
    end
})```
#

you'll need a calculate function to handle the scoring whilst held in hand, but the no-rank to always_scores lines should handle the played condition for you

zealous glen
#

Are all contexts already supported?

dim nimbus
#

already looking much better! need to tweak it though, of course

#

Is there any way to summon this card in game using the debug menu?

limpid flint
#

hold tab, press 3

languid mirage
#

dont need to hold tab for that

#

tab only shows keybinds

#

just pressing 3 does the job

limpid flint
#

But I need to hold it for some reason

languid mirage
#

¯_(ツ)_/¯

limpid flint
#

Anyway

dim nimbus
#

and spectrals or tarots

languid mirage
wintry solar
#

Press W on a card to cycle through

wintry solar
dim nimbus
wintry solar
wintry solar
dim nimbus
#

yeah, just installed it

#

log says to use backslash to open the console but nothing opens

#

not even the base game debug options work

wintry solar
#

How did you get debug to work before?

dim nimbus
#

something about enabling a setting in the controller section of the game

wintry solar
#

Try verifying your game files

dim nimbus
#

ah, apparently it was uh. unverified i guess?

#

there we go, much better!

#

yeah the cards are a little finnicky right now, but that'll get ironed out

#

thank you so much!

languid mirage
#

verifying game files makes sure that changes you did to the source code in balatro.exe reset to normal

#

because lovely patches rely on the source code being same for everyone

primal robin
#

How can I make transition for UIBox offset change?

zealous glen
zealous glen
wintry solar
#

Oh yeah I forgot I’d turned them on 😂

#

I started work on the chip tower idea, just need to adjust how it aligns and it should look okay

languid mirage
#

what does quick start do

#

and does it need to stay when you go to select stake menu

limpid flint
#

Probably not

languid mirage
#

but that's pretty cool

limpid flint
#

Love how the decks lay in a grid like we are actually picking from a vender

wintry solar
#

Well this is extendable so things like card sleeve can add their own page, so I’ll leave quick start on them all

#

Maybe it can just say play instead

crisp coral
#

is info_queue in playing cards broken?

zealous glen
#

If all the information was already there to start with, it could be just “play”

crisp coral
#

nvm something else broke and idk what

#

fuck you whoever added the regex breaking

wintry solar
zealous glen
crisp coral
#

true

verbal surge
crisp coral
#

04b03

verbal surge
#

sweet

crisp coral
#

the updated sound api makes the base game songs loop incorrectly

#

unless i'm late by a few commits uhh

#

no i'm not

frosty dock
#

I- what?

zealous glen
#

Game’s cursed

#

That’s the rational explanation

frosty dock
#

why the frick would it do that

hallow forge
#

@frosty dock i recoded get_straight() and modified get_X_same() to check the special playing card for functions instead of only checking it's rank

frosty dock
#

we were discussing how to make get_straight work with multi-rank cards some time back in #1209564621644505158 and didn't really come up with anything of use, so I'm curious

unreal venture
#

do boosters and seals have in_pool functionality in smods? i'm seeing a booster pack appear in the shop when i know it should be disabled

hallow forge
frosty dock
#

sounds good, ty

frosty dock
teal estuary
#

would you use SMODS.Center if you wanted to create a new type of card?

hallow forge
#

Yes

teal estuary
#

cool, ty

hallow forge
#

You could reference the Contracts mod if you need extra help

teal estuary
#

oooh, interesting - i'll take a look at it

brisk pond
#

@frosty dock steamodded update idea:
when you check for repetitions in seals, instead of getting true o false, you get an integer. This way you can easily mod a seal that does 2,3,4.. retriggers without changing the code for the basic red seal

#

what you think?

wintry solar
#

they already work like that?

frosty dock
#

yeah that's already how it works

crisp coral
#

hm the specialist music broke

#

the base game music does stop but nothing plays

#
local sound = SMODS.Sound({
        key = k,
        path = v..".ogg",
        pitch = 1,
        volume = 0.9,
        no_sync = true,
    })
    if k == "arcadespecialist" then
        sound.select_music_track = function()
            if config.no_music then return false end
            return (G.GAME and G.GAME.blind and G.GAME.blind.boss)
            --[[if lobc_isaac and lobc_isaac.states.drag.is then
                return true
            end
            return false]]
        end
    end

the code in question

#

oh wait. god fucking damnit it has to have music doesn't it

brisk pond
crisp coral
#

the specialist music is also 15 seconds long

edgy reef
#

I did notice that

frosty dock
#

oh I think I get it better now

#

for me it looped like 20-30 seconds before it should

#

it loops through all music sources and restarts as soon as any one is not playing, which causes issues with different lengths

#

it's also inefficient, it should just check if the current track is still playing

#

I hate that, that's such a nasty bug

pseudo hazel
#

Hey, I'm new to modding and I'm looking to learn how I would replace vanilla audio files. I am currently using SteamModded 0.9.8 to run mods.

Currently I have my files organized as:

Mod Folder

mod.lua

assets

audio

audioFile.ogg

In this case, I'm trying to replace generic1.ogg with the new sound. Any help would be greatly appreciated!

zealous glen
#

If you update to 1.0 they have added a Sound API

#

Although as just seen it seems to still be haunted

crisp coral
#

non music shouldn't be affected

pseudo hazel
#

So it should be possible to change the non-music audio for custom files in SteamModded 0.9.8?

fallen tendon
#

Just use 1.0.0

#

Its 10 times easier

pseudo hazel
#

Just installed 1.0.0

zealous glen
pseudo hazel
#

Yeah I guess the ghosts of Balatro modding past are going to haunt me now 💀

#

Currently looking through the docs for any info on the Sound API

frosty dock
#

I've been holding off on them because there were some major changes left to do

#

they're done now so I should be getting the docs up soon

pseudo hazel
#

:D

zealous glen
#

The Sound API downloads a small Jimbo to your computer who must learn to parrot new sounds to its Steamodded ringmasters

lament fjord
#

Most of the stuff that accumulates after a game in Balatro seems to be tables without metatables, time to keep digging

#

Is there a convenient lua library to display hierarchical data?

maiden phoenix
#

Was this always a thing? Not sure why it adds a 0.

mellow sable
rain imp
wintry solar
#

I think it auto shortens 1.5 though

mellow sable
#

Steamodded number formatting

mellow sable
maiden phoenix
wintry solar
#

I have never noticed this, huh

maiden phoenix
#

If you check Roffle's video from 2 days ago it doesn't have the 0

zealous glen
#

I blame the gnomes from the zeroth dimension

frosty dock
#

what the code was doing is checking all possible music sources for if they've stopped, even if they're not the currently played music

mellow sable
mellow sable
#

Or is there a way to accomplish something similar?

frosty dock
#

the approach there is completely unnecessary actually, checking the current track for if it's still running is good enough

mellow sable
#

It matters though if music tracks lengths are a few frames apart but you want sync

#

Which I imagine is the case with Cryptid

frosty dock
#

that shouldn't be too hard to add

mellow sable
#

The way I’d want it for Cryptid is for the syncing to include all the custom music tracks but not Jimball’s music

#

Or the ULTRAKILL loops when/if they get added

frosty dock
#

what the syncing actually does it it's playing all music tracks in parallel on volume 0

#

the exact length doesn't end up mattering that much with how I've changed it, it'll just restart whenever the current track is finished

maiden phoenix
frosty dock
#

default is always sync, a value of false means never sync, a table means sync the keys that are present in it

#

that would also happen to support using a function, like setmetatable({}, { __index = function() ... end })

maiden phoenix
#

@languid mirage Your last merge branch causes a "0" to be added onto config values. From the first glance this merge was supposed to be only money related no?

languid mirage
#

nope, not just money related

frosty dock
maiden phoenix
#

I see, however why does it add a 0 to say 1.5? To me it doesn't seem like it needs formatting

#

Sadly I can't properly check your commit rn

languid mirage
#

ah, I know why

#

because it's <10

rain imp
#

@frosty dock Found an issue with mod disabling system, don't see this issue opened on Git for it but will ask here first
After disabling the mod in the game and restarting, it still reads the localisation files while ignoring everything else. Removing the mod from the folder fixes the issue. Here's demo feat. ma boy Vagabond
Pic. 1 - mod is removed from the folder, vanilla texture and loc
Pic. 2 - mod is in the folder and enabled, modded texture and loc
Pic. 3 - mod is in the folder and disabled, vanilla texture but modded loc
Localisation is called out by these functions in SMODS.INIT (I don't remember from where I snatched them)

    local lang_path = balatrea.path..'localization/en-us.lua'
    local function patch_lang()
        if G.LANG.key == "en-us" and love.filesystem.exists(lang_path) then
            G.localization = assert(loadstring(love.filesystem.read(lang_path)))()
            init_localization()
        end
    end
    
    patch_lang()
    
    local set_language_ref = Game.set_language
    function Game:set_language()
        set_language_ref(self)
        patch_lang()
    end
    ```
languid mirage
#

it's in a patch to number_format or format_number whatever

maiden phoenix
#

Was it a mistake or intentioned?

languid mirage
#

it's an unintended consequence

maiden phoenix
#

Oh

languid mirage
#

not a mistake

#

well

#

it should be easy to replace trailing zeroes? tho probably want to make sure that trailing dot gets removed too

maiden phoenix
#

Would be nice

indigo zephyr
#

i want to make a mod that changes the colour of the "clubs" text on cards, jokers, and consumables, like what bunco does (but without all of buncos actual additions)
how complex would this be?

frosty dock
#

1.0.0 loads localization automatically, it may be possible I forgot to exclude disabled mods from that

#

anyways thanks for the report

rain imp
#

Gotta remake it for the latest when I find out how

dawn oar
#

I've never modified invisible joker but it's crashing now
Is this just a rare vanilla crash or

languid mirage
#

G.jokers is not a thing in collection

#

if you're in the main menu

dawn oar
#

Wasn't on the main menu
It crashed when I sold it

languid mirage
#

ah jokers isnt a global

#

you have error in your code

#

¯_(ツ)_/¯

dawn oar
#

Wonderful

zealous glen
#

That feeling when no Jokers

dawn oar
#

Where the fuck did that go wrong

zealous glen
#

If only there was a crash log to tell us how

languid mirage
dawn oar
#

No

#

This is unga bunga cave man mod
Open balatro.exe and change file

#

I'm currently downloading older versions and seeing what happens
Although I guess I should've started with vanilla eh

#

Works in vanilla
Amazing.

wintry solar
#

I can’t believe people would choose to try and modify thunks code when the apis have been created 🤷‍♂️

dawn oar
#

I didn't know about the existence of the modloaders when I started
I kinda just opened the file and saw that it was all lua laying there and said fuck it good enough

#

How long would it take to remake the mod in an actual api

#

Also all I want to do is change stuff in vanilla so I'm not sure a modloader would even be super necessary in the first place

zealous glen
#

Probably faster than rewriting it when an update overwrites the edits 🤔

wooden nexus
#

Anyone know how to use DynaTexf in Steamodded text?

#

Trying to get this

#

How the two pair is there

glass scaffold
#

How do I make a Joker display custom text when triggered?

wintry solar
#

From experimenting, I’m pretty sure dynatext is for text that either changes periodically or for text that does the jiggle

#

@wooden nexus

glass scaffold
wintry solar
glass scaffold
#

Yeah, I copy-pasted that in my code and crash.mp3

wooden nexus
#

I'm trying to implement it

wintry solar
#

Oh I thought you’d mocked that image up, is that what you have in game?

wooden nexus
#

No

#

That's the image from old Balatro

#

I want to implement it into current which acts different

#

With Smods

wintry solar
#

And you want the hand name to do the jiggley wave?

wooden nexus
#

The other part

#

The change periodically

#

I want it to look and see what most played hand is and load it there where "Two Pair" is and then in () have how many times one has played that hand

wintry solar
#

That’s not what dynatext is for

#

You can do that with just a regular text node using a reference table

wooden nexus
#

oh wait

#

yeah i need the jiggle too

#

i just noticed it has it

wintry solar
#

Oh you can do ref tables in dyna text, hold on

#

DynaText({string = {{ref_table = stats_table, ref_value = most_played}}) should do the job I think

#

Assuming you have tables set up that store the information

#

I’m not entirely sure if you can also have the same object draw the counter

#

I imagine the answer is yes, but I haven’t really tried to do a lot with DunaText yet

wooden nexus
#

Also idk anything about table stuff and all that

#

I'm just trying to replicate the deck is all

wintry solar
#

Uhhh

#

I’m pretty sure it needs to be used in actual ui creation

#

I don’t think it works in loc_txt

wooden nexus
#

That's fine I can ignore the dynatext if needed

#

is it possible for me to load the table info in normal text?

#

or should I just keep that line out?

#

I got the code working at least

wintry solar
#

I would assume back definitions work like everything else, so it’s possible

wooden nexus
#

I’ll figure it out later then

wintry solar
#

Oh in fact you can do the jiggle in loc_txt too

#

I am dumb

#

I use it in my own mod 😂

sand rune
#

Can you split out the mod into different files? I keep getting a file could not be found error as it seems to be looking in the install dir rather than the relative dir

maiden phoenix
#

Huh...

#

If somehow you reach below $-100 this "," shows up

languid mirage
#

😭

orchid thunder
#

how do i mod

brisk pond
#

steamodded is the most used Balatro modloader

#

download it and read the wiki

orchid thunder
#

k

#

how do i make a mod file 😐

#

nvm got it

unkempt thicket
#

how do you apply a shader on a modded consumable type, like spectrals?

edgy reef
#

If you inject into Card:draw or hook it + provide correct args you can.

#

Speaking of which, why isn't there a SMODS.Center function for draw?

unkempt thicket
tepid crow
#

do card_drawref(self, layer)

unkempt thicket
tepid crow
#

Also, does anyone know why stuff is getting printed/drawn to the top-left corner?
I've seen messages about it before but I can't find them anymore

edgy reef
#

It's from UI that gets created but has nowhere to go iirc.

tepid crow
#

it did start appearing once I started using generate_ui yes...

#

oh it's because I need to pass something better than {} for full_UI_table

#

okay fun

#

thanks flowwey

hushed cradle
#

got a problem and was wondering if anyone can help

#
self.FILE_MANAGER = {
        THREAD = love.thread.newThread('file_manager.lua'),
        CHANNEL = love.thread.getChannel('file_request')
    }```
#

the code is in a file called main

#

in the same place as the file_manager.lua

#

ive tried moving it about, and also being more specific with the path

#

but even C:/blah blah didnt work

#

wait

#

no way i misspelt manager

#

that cant be it

#

nope still doesnt work

hushed cradle
#

for anyone with a problem like this in the future

#
local file_manager = nativefs.read(self.MOD_PATH .. 'main/file_manager.lua')
    self.FILE_MANAGER = {
        THREAD = love.thread.newThread(file_manager),
        CHANNEL = love.thread.getChannel('file_request'),
    }```
#

that works

#

but because balatro doesnt use nativefs itself

#

the file reading/writing is really restricted

#

shame cos threads seem cool

placid frigate
#

on the tutorial it says --- BADGE_COLOR: 123456 or --- BADGE_COLOUR: ABCDEF what does badge color mean?

crisp coral
#

hex code

#

of the badge that is shown on your cards

lament fjord
#

There's probably some way to lovely patch Balatro so it doesn't pull the original file for the sound thread, but a patched file

gaunt thistle
#

If it's loaded via loadbuffer then yes, but there are some weird instances where files aren't loaded via that method.

#

cough cough localization

frosty dock
olive shoal
#

i dont remember where i heard this i think its a lovely quirk

#

i might just be wrong

sand rune
maiden phoenix
glass scaffold
#

How exactly do I need to implement this into my custom Blind?

boss: Marks this Blind as a Boss Blind and specifies on which Antes it can appear ({ min = 1, max = 10 }).

crisp coral
#

boss = {min = 1, max = 10}

#

change min to the minimum ante required, max does nothing

glass scaffold
#

It was literally word for word. Thanks, overthinking brain.

#

Do I need to pass the SMODS.Atlas with a custom Blind or will the atlas parameter in SMODS.Blind take care of that?

frosty dock
#

the atlas param takes care of it, you just put the same string you put as the key of your Atlas

glass scaffold
#

Oh sick

#

Thanks

glass scaffold
#

Aaaand we're back to crashing.

Looks like the atlas param isn't carrying its own weight.

#

Wait a sec, does the atlas need the .png extension?

frosty dock
#

that means the atlas key you put into the blind doesn't have a valid atlas object associated with it

#

can you show me the definitions for both the atlas and the blind?

glass scaffold
#
    name = 'The Soul Train', -- If you don't know what a "Soul Train" is, look it up on UrbanDictionary.
    text = {'Your run ends here. (10x Base Mult)'},
    dollars = 7,
    mult = 10,
    boss = {min = 1, max = 777},
    pos = {x = 0, y = 0},
    atlas = "SoulTrainBlindChip.png",
    discovered = true```
#

Here's what it is now.

frosty dock
#

that's the blind

#

what about the atlas?

#

oh i see I misunderstood your question 💀

#

you do need an SMODS.Atlas object

#

but you don't pass that object through to the blind, you just take its key

glass scaffold
#

So this would work?

Nope, still crashes when attempting to render.

#

What am I doing wrong? Still getting the "attempt to index field 'atlas' [a nil value]" error

crisp coral
#

blind atlas is slightly different

#
SMODS.Atlas({ 
    key = "LobotomyCorp_Blind", 
    atlas_table = "ANIMATION_ATLAS", 
    path = "LobotomyCorp_blind.png", 
    px = 34, 
    py = 34,
    frames = 21,
})
glass scaffold
frosty dock
#

there's no choice there

#

blind chips are animated, so they're treated that way

glass scaffold
#

Thanks local thunk

frosty dock
#

as for the description and stuff, your name and text need to go in a loc_txt table

frosty dock
#

static blinds chips would just be too plain

glass scaffold
#

Yep, still crashing.

    key = "SoulTrainBlindChip", 
    atlas_table = "ANIMATION_ATLAS", 
    path = "SoulTrainBlindChip.png", 
    px = 34, 
    py = 34,
    frames = 1
})

SMODS.Blind{
    key = "SoulTrain",
    loc_txt = {
        name = 'The Soul Train', -- If you don't know what a "Soul Train" is, look it up on UrbanDictionary.
        text = {'Your run ends here. (10x Base Mult)'}
    },
    dollars = 7,
    mult = 10,
    boss = {min = 1, max = 777},
    pos = {x = 0, y = 0},
    discovered = true
}```
frosty dock
glass scaffold
frosty dock
#

oh

#

you need a boss colour

#

why did I not make that required 💀

hallow forge
glass scaffold
#

It's a flat 10x Base blind.

hallow forge
#

so harder violet vessel?

glass scaffold
#

It plays off the definition of "Soul Train" (Referencing an ambulance that is blocked by a train, leading to be considered a sign by a higher power that their time was up.)

glass scaffold
#

Ante 1 ALONE is 3,000 Chips

hallow forge
#

i know

glass scaffold
#

Well, almost there.

maiden phoenix
#

Shouldn't align = "cm" center this node? c and m stand for "center" and "middle" no?

languid mirage
#

they do indeed stand for center and middle

maiden phoenix
#

Is it because I don't specify an align for the parent node that it doesn't center or I missed something?

crisp coral
#

yeah try centering the parent node

glass scaffold
hallow forge
#

scale the sprite down to 34x34

#

also this blind is kinds unfair

maiden phoenix
glass scaffold
glass scaffold
hallow forge
#

2x should be 68x68

glass scaffold
crisp coral
#

yes

glass scaffold
#

Somehow, my Jokers & hands have won that 10x blind 100% of the time.

#

That's actual luck.

unkempt thicket
#

This context of destroying a card is not being called when a card is destroyed with this seal, is there a reason why this isn't working?

#

the create consumable function works, I tested it and just context.destoying_card doesn't

glass scaffold
hallow forge
#

weird

glass scaffold
#

nvm, Krita didn't save the dimensions properly.

maiden phoenix
#

calculate_seal only consider discards for purple seal, you'll have to lovely inject your own method or override the function.

#

Wait Im saying shit

#

Is the context used for calculate_seal the same as for joker?

unkempt thicket
maiden phoenix
#

Ah there we go, calculate_seal is called on eval play and discards

#

Sorry deleting the pics, I think i'm breaking a modding rule

unkempt thicket
#

why does the same destroying card context work for cryptid?

maiden phoenix
#

Do they have a seal that triggers on destroyed card?

unkempt thicket
#

yes

maiden phoenix
#

Maybe they injected calculate_seal somewhere

languid mirage
maiden phoenix
#

If you show source code and explain how it works, does it relate to rule 2 or 3?

languid mirage
#

how do u break rule 2 if youre in modding channel

maiden phoenix
#

Yea i'm just being you rn

#

stupid

#

Hope they still understood what was wrong without the pics

unkempt thicket
#

cryptid seal destroys on play, so it makes sense why it won't work just destroying it

glass scaffold
#

I'm almost crying from this, thank you everyone

glass scaffold
hallow forge
#

r u just making blinds worse than vanilla ones?

glass scaffold
#

Nah, when I eventually get enough experience with SMODS and Lua, I'll whip up something better.

#

But thank you all for helping make this blind.

#

(even if it sucks)

crisp coral
hallow forge
#

Lavender Loop:

glass scaffold
#

And to explain the design choice:

"The soul train stops emergency vehicles from reaching someone who a higher power decided shouldn't make it"

Soul Train blind: 8x Base

#

I'll make it a Showdown Boss Blind, that way it'll only pop up on Ante 8

crisp coral
#

violet vessel:

brisk quartz
#

i hope that wasn't a ping

crisp coral
#

wasn't

brisk quartz
#

ok good

zealous glen
#

I made Bell into a Boss Blind

#

I tweaked it to only force select Face cards but I think it would be fine as the original Cerulean Bell

brisk quartz
#

you know what would be funny

#

a 1,000,000x blind

glass scaffold
#

Blind name: "The Final Nail"
Description: "RIP to your run bozo"

brisk quartz
#

the luchador in question

tranquil panther
#

"skill issue"

brisk quartz
#

wouldn't it be funny if luchador didn't work

crisp coral
#

the literally any endgame build in question

brisk quartz
#

then again obscure overshoot solos all of them

#

wait. ante 39 boss idea
indigo infinity

glass scaffold
#

Sounds terrifying

Go on

zealous glen
#

Xω Blind size

brisk quartz
#

X3.372e306 blind size

glass scaffold
#

I would RQ on the spot.

brisk quartz
#

(you need 3.23e616 to beat this blind)

#

which is 1.79e308^2

glass scaffold
#

btw how does the Showdown param work?

brisk quartz
#

in other terms, nightmarishly large blind

crisp coral
#

used for ante 8 bosses, or showdown bosses

#

and whoever call them finisher blinds are objectively incorrect

glass scaffold
#

Right, I want to get my custom blind to have a chance to pop up on Ante 8.

crisp coral
#

oh yeah that too

glass scaffold
#

And having the boss min set to 8 didn't seem to work.

crisp coral
#

showdown = true also puts it in the showdown pool

glass scaffold
#

alright, put it in.

#

Now let's see if I get it

#

Yeah, nope.

#

Rerolled the blind 10+ times, no Soul Train

frosty dock
#

iirc it needs to be in boss

glass scaffold
#

Possible, may not show in the docs

frosty dock
#

best to check how vanilla blinds do it in source

#

though I'm on updating docs currently, so I'll keep that in mind

zealous glen
#

Yeah the requirement comes from vanilla

glass scaffold
#

It works

zealous glen
#

Not SMODS

glass scaffold
#

Putting showdown = true puts it in the Showdown pool

zealous glen
#

It makes sense it wouldn’t be in SMODS docs because it’s not SMODS doing it

frosty dock
#

I should still add it

frosty dock
#

chat what's this

zealous glen
#

un chat !

languid mirage
#

if these are static, why do they need : 🤔

frosty dock
#

or read them

#

technically I could hardcode them using SMODS.Sound instead of self, but subclasses

orchid thunder
#

what do i use to make a mod rn im useing a notepad Xd

languid mirage
#

I'm using vscode

glass scaffold
#

VSCode is goated for Lua

orchid thunder
#

ok is it paid?

#

or free

glass scaffold
#

Free

#

And has Extensions

orchid thunder
#

ok il go look at it

glass scaffold
#

Syntax Highlighting is a definite perk.

gaunt thistle
#

chat 👀👀

orchid thunder
#

good because im trying to make a mod and ive never heard of lua before so i hope it also helps a little

glass scaffold
crisp coral
#

hey meth what's up

frosty dock
crisp coral
gaunt thistle
#

🌝

#

wow that's cursed compared to how it looks on android

#

@glass scaffold chat 👀👀👀

gaunt thistle
crisp coral
#

the fuck

frosty dock
crisp coral
#

because discord is stupid and svg does not embed

gaunt thistle
#

how goes the moddings chat

#

I've been away for a month because of vacation and a move

frosty dock
gaunt thistle
#

so I'm totally out of the loop rn

brisk quartz
#

oh modded is getting bigger than ever

crisp coral
#

(thanks to cryptid)

frosty dock
#

we've just been waiting on lovely beta7 🤡

#

xd

brisk quartz
#

cant wait for jens almanac

frosty dock
#

same

#

got to watch a bit of a sneak peek earlier, it's absolute insanity

crisp coral
#

balatro incremental

frosty dock
#

ante 5 million

brisk quartz
#

also the numbers start to go funky

zealous glen
#

Me who only makes mods but doesn’t play:

gaunt thistle
#

we're skipping b7

crisp coral
#

yeah fuck b7

#

i prefer b8 anyway

gaunt thistle
#

we're skipping b8

crisp coral
#

damn

languid mirage
frosty dock
#

dam

languid mirage
#

uhhh my textures broke

fallen tendon
languid mirage
#

yeah

long gust
#

edition: glitched. no wait that's already

fallen tendon
#

It looks like astral but you put it in a deep fryer

#

I assume it scales the grid size based on brightness

languid mirage
#

lightness but yes

fallen tendon
#

I would say it should also make the purple parts darker cuz rn theres only a difference between white and everything else

#

Unless you look really close everything else is the same shade of purple

limpid flint
#

That is nonexistent

mellow sable
frosty dock
#

oh nvm it's just because i still have morespeeds

unkempt thicket
#

is there a way for me to add onto this function?

#

also what is the context for the cards in hand when scoring, like the scoring cards are in a list called scoring_hand

unkempt thicket
frosty dock
frosty dock
unkempt thicket
frosty dock
#

that's just splash?

unkempt thicket
#

well the non-scoring ones in hand

frosty dock
#

ah

#

well in-hand cards don't have a "scoring" state, they just score if they have a way to

#

you can tell them to in context.individual with context.cardarea being G.hand

unkempt thicket
restive osprey
#

Anyone have any devtools to recommend for a beginner?

wintry solar
unkempt thicket
#

just apply the cards in hand to scoring cards, make the cards in hand score

rigid moss
#

Hi guys, do you know how to check which jokers from G.jokers is selected/clicked on? Like in this case how to check that Jolly Joker is selected?

wintry solar
unkempt thicket
wintry solar
#

It’d be a lot harder to do those, but in theory it’s possible

#

I wonder if it’s easier to patch the evaluate stack with checks for your joker

unkempt thicket
#

i'll try to get the cards in hand highlighted and chips score first

wintry solar
#

For chip scoring I think you just need a SMODS.eval_this in that check you have

zealous glen
#

I mean there is a scoring step for cards in hand

#

It’s what Steel cards use

#

Also Baron IIRC

unkempt thicket
#

also is there a fuction to deselect cards?

maiden phoenix
#

Pretty sure that question was asked before but I can't find it, what do you do to avoid setting a tooltip duplicate? Like if a Joker is negative and explains what negative means already.

unkempt thicket
wintry solar
edgy reef
#

I’m wondering those should be color coded 🤔

#

Unlikely to be a SMODS suggestion but it would be good QoL for these scenarios

wooden nexus
#

Flowwey, how the heck did you get Ortalab the way it does? I tried editing it and got a black screen in-game lol

#

I'm sure it's me

wintry solar
#

Yeah I’m not sure whether we should just dump out duplicate info queue items or not

fallen tendon
#

I think yeah

edgy reef
#

I’d say no, since decks like Misprint have a reason to show you current.

fallen tendon
#

Theres literally no poimt im having them

edgy reef
#

Base game stuff probably, but that’s more due to already knowing what the effect does so they’d serve no purpose.

#

Just displaying current is more efficient.

#

Although trying to check for if it’s duplicate reference to the effect vs. displaying effect + effect reference would be difficult.

wintry solar
#

When would there ever be a need for 2?

zealous glen
unkempt thicket
#

This is triggering every card in hand many times, is there a way to stop it after one (one loop though hand)?

zealous glen
#

Just do the current card

wintry solar
#

Oh yeah context individual is called on each card

zealous glen
#

As I said

#

This is what Baron does

unkempt thicket
#

then how do you get the current index of the selected card?

zealous glen
#

I don’t know what you mean

#

Anyways, just look at the game’s code

#

Usually it’s context.other_card to get the current card

unkempt thicket
wintry solar
#

This is the context that is relevant

wooden nexus
#

New poll for Ortalab

tepid crow
#

is there a good overview on how to implement number-compatibility for talisman somewhere?
or is it just the to_big function?

mellow sable
#

I really need to add that to the wiki or readme or something

tepid crow
#

my method right now is just pressing play and seeing if anything crashes but that doesn't seem very... scientific

mellow sable
#

You could try searching for score variables in the relevant mod code (both for hand levels and current/blind score) and then seeing where you use comparisons

tepid crow
#

.chips and .mult?

glass scaffold
#

debuff = {hand = {['High Card'], ['Pair'], ['Two Pair'], ['Three of a Kind'], ['Straight'], ['Full House'], ['Four of a Kind']} = true} gives the crash in the image.

Any ideas on how to fix?

austere schooner
#

don't need the []s

hallow forge
#

what's the = true supposed to do?

glass scaffold
hallow forge
#

you did not copy that correctly

#

and you need an = true for each one

austere schooner
#

You've got to do = true for each one individually, so

debuff = {hand = {
['High Card'] = true,
['Pair'] = true,
...
}}
glass scaffold
#

Thanks

#

And it crashes when I select a card now.

#

How do I fix that?

gaunt thistle
#

I am requesting someone with more time than myself to create a "check if lovely needs an update" mod

crisp coral
#

i don't know shit about https sorry

rough furnace
#

I don't think http works on macos

#

but otherwise it shouldn't be too bad

#

I don't think

#

anyways the reason I came here

#

does anyone have a config page crash course or smth?

#

mostly just waht are the functions to help and what do values do?

gaunt thistle
#

virgin https vs chat http

crisp coral
#

for the config page, it needs to be a function that returns ui nodes

#

something like this

rough furnace
#

right I copied something already, but more like how do I add a button, or a text box, etc

crisp coral
#

save your SMODS.current_mod.config to a local var and use ref_table and ref_value in your nodes to change it

#

oh

#

for buttons, add a button = "function_name" to the config of your n = G.UIT.C node and it will call G.FUNCS.function_name when pressed

rough furnace
#

I'm not using SMODS config library

#

cause I need to support loading and saving config when SMODS isn't loaded

crisp coral
#

for checkboxes, use create_toggle function

rough furnace
#

unless it can make a config I handle the saving or loading of

rough furnace
crisp coral
#

hell yeah

rough furnace
#

Also that additions tab needs a better check

#

All I add is an atlas for the mod icon

placid frigate
#

after getting the file header in the .lua file and i showing up on the mods directory what do i do next for creating a Joker?

edgy reef
#

Previously it just checked if any object was registered since there wasn't a direct way made to check if the button should exist or not, but one was made afterwards.

rough furnace
#

OK good

willow quiver
#

Just pulled latest smod 1.0, does M to reload not work anymore?

crisp coral
#

no

#

it's broken as hell and it's removed

glass scaffold
#

Oh yeah

This is peak Balatro modding

#

recalc_debuff = function(self, card, from_blind) return card:is_suit('Clubs') or card:is_suit('Spades') end

This doesn't keep the cards debuffed the whole way through. What can I do to make it work?

crisp coral
#

custom sounds played using play_sound don't respect the volume parameter anymore

frosty dock
glass scaffold
#

so the line should be recalc_debuff = function(self, card, from_blind) return card:is_suit('Clubs', true) or card:is_suit('Spades', true)?

glass scaffold
#

Thanks

dim nimbus
#

I'm trying to get an enhanced card to trigger in hand but I just can't seem to get it to work, I'm very inexperienced with lua so excuse me if this is a slightly dumb question

SMODS.Enhancement { -- Ofuda Card
    key = 'ofuda',
    atlas = 'snyo_enhancementatlas',
    pos = {x=0, y=0},
    config = { x_mult = 1.25, extra = {mult = 4} },
    loc_txt = {
        name = 'Ofuda Card',
        text = {'{X:mult,C:white} X#1# {} Mult when scored',
            '{C:mult}+#2#{} Mult when held in hand.',
            'no rank or suit.'}
        },
        no_rank = true,
        no_suit = true,
        replace_base_card = true,
        always_scores = true,
        loc_vars = function(self, info_queue)
            return { vars = {self.config.x_mult, self.config.extra.mult}}
        end,
        calculate = function(self, card, context)        
            if context.cardarea == G.hand then
                local hmult = self.config.extra.mult
                return hmult
            end
        end
    }
glass scaffold
dim nimbus
#

it's not giving an error but the cards aren't giving mult in hand

glass scaffold
#

Wait, do we even have a SMODS.Enhancement?

#

I thought it would be SMODS.Edition

dim nimbus
#

nope it's an enhancement, works all the same

glass scaffold
#

I can't find SMODS.Enhancement. Can you link it to me?

wintry solar
languid mirage
#

and SMODS.Enhancement does exist

#

not sure where are you trying to search

#

it might not be up on wiki

glass scaffold
#

It's not on the wiki.

languid mirage
#

and there isnt an example mod for it yet

dim nimbus
#

the wiki is laking in documentation in general though, so its not surprising

languid mirage
#

still work in progress

#

¯_(ツ)_/¯

#

only a few people who can edit it anyways

dim nimbus
#

lot of the modding scene for this game is in its early stages

#

who knows where itll be in a year

dim nimbus
wintry solar
#

Like every other calculate iirc

#

Although maybe the actual values need to be done in the function, I don’t quite remember

#

But it’s potentially something like return { h_mult = card.ability.extra.mult }

dim nimbus
#

ahhhh, h_mult
i was looking at the base game source code and wasnt sure if the h_mult on the shoot the moon joker would be the same with steammodded

#

hmmmmm still seems to not work

wintry solar
#

Might be that you have to adjust the values in the actual function then

dim nimbus
#

doesn't work either

wintry solar
#

What’s the code look like?

dim nimbus
#
        calculate = function(self, card, context)        
            if context.cardarea == G.hand then
                return {
                    h_mult = 4,
                }
            end
        end
#

doing it again but adding

card = self

to it too

#

still nothing

wintry solar
#

You can use SMODS.eval_this or do it by hand

dim nimbus
#

oh like change the function parameters? it might not be self card context?

#

ill do that hold on

#

hmmmmmm

wintry solar
#

No don’t return anything

dim nimbus
#

wait what?

wintry solar
#

The eval this will add your values to the mult for you

crisp coral
#

aren't enhancements completely different

wintry solar
#

I don’t remember if enhancement returns are actually collected

crisp coral
#

just add h_mult = 4 outside

#

wait no

#

config = {h_mult = 4}

dim nimbus
#

okay so h_mult is not an extra?

crisp coral
#

no

wintry solar
#

I don’t think that will matter

dim nimbus
#

ay got it!

#

way simpler than i thought lmao

wintry solar
#

Huh

crisp coral
#

i've had to go through all that to implement Amplified

#

so you're welcome

dim nimbus
#

oh youre the one making the lobcorp mod arent you?

wintry solar
#

But this one has different effects when played or held

zealous glen
#

The h is for hand/held

dim nimbus
#

yeah

#

must be built-in functionality lol

wintry solar
#

Oh of course it’d be h_xmult

crisp coral
crisp coral
dim nimbus
#

my friend likes the isaac you put in your mod

crisp coral
#

LOL

zealous glen
dim nimbus
#

i find it funny because im working on a game-specific balatro mod (a touhou themed one, in my case)

zealous glen
#

-# (They don’t know I’m the Victin)

bitter sand
#

hello i would need some help

i'm trying to make a blind that makes a random card per played hand not scoring

(something like that)

#
press_play = function(self)
        
        G.E_MANAGER:add_event(Event({func = function()
            if #G.play.cards > 1 then
                if G.GAME.blind then G.GAME.blind:wiggle() end
                local unselected_card = G.play.cards[math.random(#G.play.cards)]
                G.play:remove_from_highlighted(unselected_card, true)
            end
        return true end }))
    end,
#

this is the code i already have but it doesn't work

languid mirage
#

there's similar blind in cryptid

bitter sand
#

really ? didn't know 'cause i never played cryptid

languid mirage
#

lemme see

bitter sand
#

okay

languid mirage
#

this one

#

might not be exactly what you want, but I think you should be able to find that example somewhat useful

bitter sand
#

it sounds like something i'm searching for so

#

(mine isn't a finisher tho but that's not important)

brisk pond
#

guys I need to display the 'Negative' description for a joker
info_queue[#info_queue + 1] = {key = 'e_negative', set = 'Edition', vars = {1}}
is this the right one?

wintry solar
#

you should be able to do G.P_CENTERS['e_negative']

brisk pond
#

thanks ❤️

sand rune
#

Quick question, is there a way to split a mod into multiple files? Seems like the regular require is targetting the actual balatro install loc

frosty dock
sand rune
#

and I assume they load in order?

frosty dock
#

why would it be out of order?

#

that's not how code works