#💻・modding-dev

1 messages · Page 120 of 1

royal ridge
#

where is it coming from

tidal edge
royal ridge
#

so there's nothing in the value 🤔

#

um

wet sand
#

yooo i figured it out

#

now to make sure it works with other card types

tidal edge
long sun
#

NIIIICE :D

tidal edge
#

im pretty sure it'll be fine

cerulean rose
#

if you want it to always hit the same rank as mail-in rebate then yeah

tidal edge
#

oh

#

im sure noones gonna notice]

long sun
#

does context.buying_card trigger when buying the joker it's attached to?

#

otherwise, i need a way of doing a calculation when it's instantiated

cerulean rose
#

check the other center methods

long sun
#

hmm, none seem relevant

royal ridge
# tidal edge im sure noones gonna notice]
local rcc = reset_castle_card
function reset_castle_card()
    rcc()
    G.GAME.current_round.shuffle_card.rank = 'Ace'
    local valid_shuffle_cards = {}
    for k, v in ipairs(G.playing_cards) do
        if v.ability.effect ~= 'Stone Card' then
            if not SMODS.has_no_rank(v) then
                valid_shuffle_cards[#valid_shuffle_cards+1] = v
            end
        end
    end
    if valid_shuffle_cards[1] then 
        local shuffle_card = pseudorandom_element(valid_shuffle_cards, pseudoseed('shuffle'..G.GAME.round_resets.ante))
        G.GAME.current_round.shuffle_card.rank = shuffle_card.base.value
        G.GAME.current_round.shuffle_card.id = shuffle_card.base.id
    end
end

shamelessly copied from mail in rebate but here's a hook that gives you a specified shuffle card
also mail in rebate doesn't have a specified fallback id? that seems like a funny oversight

frosty dock
#

reset_game_globals:

long sun
#

so i've tried set_ability, but that doesn't seem to work

royal ridge
long sun
#

i could run it every frame? that'd be pretty inefficient though

#

but it'd work?

royal ridge
#

anyway

tepid crow
long sun
#

ya, but spawning the joker doesn't work

cold grotto
#

i was creating a replica of steel joker with smods to test a particular function, but when compared to the vanilla steel joker, it always seemed to be 1 steel tally/card behind, is there a reason for this behaviour?

long sun
#

oooh i think i see my issue

#

trying something

tepid crow
long sun
#

exactly

#

so it doesn't trigger that

#

hmm, my attempted fix didn't work. here's one that i held in my save

#

and here's one i just spawned

cerulean rose
#

if you're trying to do a calculation when it's instantiated, be aware that jokers can appear through other means (such as Judgement)

tepid crow
#

well that can easily be solved, the issue is I'm not sure it's the "proper" way of doing it

wet sand
cerulean rose
#

who would ever use multiple mods at the same time?!?!?! /j

wet sand
#

most of them arent destructive but i do have to overwrite Card:get_chip_mult() like almost entirely

faint yacht
tepid crow
cold grotto
#

doesn't seemt o update at the same time

cerulean rose
tepid crow
#

"the smods version"? 🤔

cold grotto
#

i just copied the code of steel joker into the calculate function in a smods mod

tepid crow
#

sounds like it's not in the loc_vars

cold grotto
#

its in it

#

maybe i formatted incorrectly

tepid crow
long sun
wet sand
#

could be context issues too, since code in balatro's card.lua is so spread out lol

#

you couldve just missed something when copying steel joker

cold grotto
#

trueee

cerulean rose
# long sun hokai, trying! can i see how you did that?
function lassCount()
    local queens = 0
    for k, v in ipairs(G.playing_cards or {}) do
        if v:is_suit("Clubs") and v.base.id == 12 then
            queens = queens + 1
        end
    end
    return queens
end
SMODS.Joker({
    key = "lass",
    config = { xmult_per_queen = 1 },
    loc_vars = function(self, info_queue, card)
        return {
            vars = { card and card.ability.xmult_per_queen or self.config.xmult_per_queen,
                math.max(lassCount() * (card and card.ability.xmult_per_queen or self.config.xmult_per_queen), 1) }
        }
    end,
    rarity = 3,
    pos = { x = 1, y = 0 },
    atlas = "jokers",
    cost = 7,
    blueprint_compat = true,
    calculate = function(self, card, context)
        if context.joker_main and lassCount() * card.ability.xmult_per_queen > 1 then
            return {
                message = localize({ type = "variable", key = "a_xmult", vars = { math.max(lassCount() * card.ability.xmult_per_queen, 1) } }),
                Xmult_mod = math.max(lassCount() * card.ability.xmult_per_queen, 1),
            }
        end
    end,
})
cold grotto
faint yacht
#

I definitely use update for one of my Jokers to animate it.

long sun
#

ooh okay!

#

lemme try something like that

tepid crow
# long sun hokai, trying! can i see how you did that?

my version if you're interested

function count_wild_cards()
    local wild_card_counter = 0
    if G.playing_cards then
        for _, v in pairs(G.playing_cards) do
            if SMODS.has_enhancement(v, 'm_wild') then
                wild_card_counter = wild_card_counter + 1
            end
        end
        return wild_card_counter
    end
    return 0
end

SMODS.Joker {
    key = "wildcardcharlie",
    loc_vars = function(self, info_queue, card)
        return { vars = {card.ability.extra.hand_gain,
                         card.ability.extra.discard_loss,
                         card.ability.extra.wild_card_ratio,
                         count_wild_cards()}}
    end,
    calculate = function(self, card, context)
        if context.setting_blind and not (context.blueprint_card or self).getting_sliced then
            local wild_card_counter = count_wild_cards()
            if wild_card_counter > 0 then
                ...
            end
        end
    end
}
wet sand
wintry swallow
#

is it a good idea to annotate my lovely patches with where they act on, so future modders reading my code will have an easier time of it

cerulean rose
#

ctrl+f

tepid crow
#

if you're talking about the # Card#start_dissolve card.lua:L2130 stuff then yeah I 100% suggest keeping that

wintry swallow
wet sand
#

ctrl+f is messy and annoying lol

cerulean rose
#

yes i agree

teal estuary
#

hey quick question, what could cause that to happen with a joker that destroys itself?

cerulean rose
#

The Toot

wintry swallow
#

i wonder why match_indent isn't optional in lovely patches

#

it is very annoying to have to set it to true every single patch

teal estuary
wintry swallow
#

just make it optional and default to true

wet sand
#

its very funny to me that its an option at all

cerulean rose
#

what do they think this is, pyhton

teal estuary
cerulean rose
#

maybe try not playing 56 thousand pop sounds

teal estuary
#

it shouldnt play the pop sound 56 thousand times

#

it should do it.. once

tepid crow
#

not sure if I recommend doing that though

teal estuary
#

-# oh dear god i forgot to put a repetition check on my deletion code

teal estuary
cerulean rose
#

could delete other stuff

quaint latch
tepid crow
quaint latch
#

m

wet sand
teal estuary
#

would it stop the "cash out" event queue? this happened as i won the blind, and a joker died

tepid crow
cerulean rose
#

probably

teal estuary
#

this is what my screen has been for a while 😭

#

hrm

cerulean rose
teal estuary
#

i'll try, but OBS might cause my computer to explode

cerulean rose
#

dont worry, you have 56 thousand chances to get it right

teal estuary
tepid crow
teal estuary
#

it sounds like a fucking woodpecker oml 😭

wet sand
teal estuary
#

fucking discord

tepid crow
#

lol

tepid crow
teal estuary
#

-# its crazy what happens when you dont have a GPU

cerulean rose
#

incredible

teal estuary
#

this was the only joker i forgot a repetition check on

#

every other single one that deletes itself has a repetition check

wet sand
cerulean rose
sick sparrow
teal estuary
#

i presume reloading will just set me back to 56k events right

sick sparrow
cerulean rose
#

yea

wet sand
#

my creation is complete. i have created 7-Up:trademark: joker

teal estuary
#

peak

sick sparrow
cerulean rose
#

oh hey diet speculo

stiff locust
wet sand
#

i had this idea at like 3am one day im mostly just putting a bunch of random ideas into a mod. also 7up is a real brand

stiff locust
#

what actually

#

i thought it was from GTA

wet sand
#

yea its a soda

stiff locust
#

well i know that much

#

but I thought it was from GTA

long sun
#

hmm, my code still doesn't work.

#
calculate = function(self, card, context)

    if context.joker_main then
      if card.ability.extra.current_x_mult > 1 then
        return {
          message = localize { type = 'variable', key = 'a_xmult', vars = { card.ability.extra.current_x_mult } },
          Xmult_mod = card.ability.extra.current_x_mult
        }
      end
    end

      if count_tarots() ~= card.ability.extra.tarots and not context.blueprint
      then
        card.ability.extra.tarots = count_tarots()
        card.ability.extra.current_x_mult = 1 + (card.ability.extra.x_mult * card.ability.extra.tarots)
          card_eval_status_text(
                  card,
                  "extra",
                  nil,
                  nil,
                  nil,
                  { message = localize({ type = "variable", key = "a_xmult", vars = { card.ability.extra.current_x_mult } }) }
                )
        end
      end

  end```
#

same reason

#

new function:

function count_tarots()
  local tarot_counter = 0
  if context.selling_card then
    tarot_counter = -1
  end
    if G.consumeables.cards then
      for i = 1, #G.consumeables.cards, 1
      do
        if G.consumeables.cards[i].ability.set == "Tarot" then
          tarot_counter = tarot_counter + 1
        end
      end
        return tarot_counter
    end
    return 0
end```
stiff locust
#

that return should be at the bottom
can't you not execute code after a return?

#

what's with this card eval status text stuff at the bottom

#

what are you trying to do with this joker

stiff locust
#

i see it should be adding an amount of xmult based on the number of tarots

long sun
#

hihi!

#

so this card's ability is
Gives X0.75 Mult for each Tarot card in your consumable area

stiff locust
#

that's kinda busted i'd lower it to X0.25 or X0.2 but that's a balance thing not a code thing

cerulean rose
long sun
#

that's tiny

stiff locust
long sun
#

you can hold at max 3 without negatives

teal estuary
long sun
#

also it's rare

stiff locust
#

it's also rare and has been nerfed already to not count boss blinds

long sun
cerulean rose
#

eternal is NOT A DOWNSIDE

long sun
#

selling a tarot decreases it

wet sand
#

max of like 3.25X or something right

long sun
#

mhm

royal ridge
long sun
#

and it also hogs your consumable slots

wintry swallow
#

it is time to play with the boss spawning logic

stiff locust
teal estuary
#

0.75X * 3 = 2.25X

cold grotto
wintry swallow
#

i have played with almost every other part of this game so far. let's touch that why don't we

stiff locust
#

it's always been rare

long sun
#

ya so X3.25, since it starts with 1 base

teal estuary
#

and if its not gaining? yeah seems fine

cerulean rose
#
Balatro Wiki

Madness is an uncommon multiplicative Mult Joker that fuels itself with the sacrifice of other Jokers. At the start of every Small and Big Blind, it gains X0.5 Mult and destroys another Joker at...

teal estuary
stiff locust
#

what

teal estuary
#

okay, not so bad

long sun
#

^^

teal estuary
#

i thought it scaled 😭

stiff locust
#

i swear to god that thing was rare

wintry swallow
#

madness is uncommon

#

code says so

zealous glen
#

I wonder if that was a balance change

teal estuary
#

doesn’t feel like an uncommon but yeah fair

long sun
#

anyway so

stiff locust
#

your code really made it look like a scaling joker

#

i'm gonna simplify this for you

long sun
#

the bug i've encountered is the joker not updating when spawned

royal ridge
#

madness has been uncommon since 1.0.0

long sun
#

i can't testify about it when it's bought, since it's hard to test that

#

but spawning it doesn't keep it in the loop

cold grotto
#

you could use add to deck to do that

#

i think

cerulean rose
#

guys I HAVE A PROBLEM NOW

royal ridge
#

don't cards like that use an update function

#

like steel joker

long sun
#

i tried that, i can try it again?

cerulean rose
stiff locust
#
calculate line goes here
card.ability.extra.xmult = 0
if context.joker_main then
card.ability.extra.xmult = (count_tarots() * card.ability.extra.increase
if card.ability.extra.xmult > 0 then
  return {
    message = localize { type = 'variable', key = 'a_xmult', vars = { card.ability.extra.current_x_mult } },
    Xmult_mod = card.ability.extra.current_x_mult,
    card = card
        }
  end
end
end

I might have the wrong number of ends here? but this should work.

#

and I didn't name the values properly, idk which is which

#

i'm not really sure what all the extra code was for

royal ridge
#

probably smarter

long sun
stiff locust
#

why not

long sun
#

i want it to keep tabs on it, so it can display its current value

cerulean rose
long sun
#

setting it to 0 destroys that

royal ridge
cerulean rose
#

yeah

stiff locust
royal ridge
wintry solar
#

I mean it does technically scale

cerulean rose
#

my code works, just plug your function please

stiff locust
#

can't you count how many tarots you have in your consumable slots

long sun
cold grotto
stiff locust
#

i mean manually

long sun
#

?

stiff locust
#

idk if i'll get shouted at for telling you to hook the update function for it

cerulean rose
long sun
royal ridge
stiff locust
#

no?

long sun
#

it would

royal ridge
#

oh yeah right

long sun
#

but then i can't display the message easily

long sun
#

ah wait no it wouldn't =w=

#

checking

royal ridge
wintry solar
#

Ghost what exactly are you trying to do? I am late to this conversation

cerulean rose
#

give xmult per held tarot card

long sun
#

right, that seems good

#

not quite what i wanna do but

long sun
#

i'll paste my code in its entirety, hold on

wintry solar
#

sure

long sun
#
function count_tarots()
  local tarot_counter = 0
  if context.selling_card then
    tarot_counter = -1
  end
    if G.consumeables.cards then
      for i = 1, #G.consumeables.cards, 1
      do
        if G.consumeables.cards[i].ability.set == "Tarot" then
          tarot_counter = tarot_counter + 1
        end
      end
        return tarot_counter
    end
    return 0
end

SMODS.Joker {
  key = 'ghostjoker',
  loc_txt = {
    name = 'Ghost Joker',
    text = {
      "Gives {X:mult,C:white}X#1#{} Mult for",
      "each {C:tarot}Tarot{} card in",
      "your {C:attention}consumable{} area",
      "{C:inactive}(Currently {X:mult,C:white}X#2#{C:inactive} Mult)"
    }
  },
  config = { extra = { x_mult = 0.75, current_x_mult = 1, tarots = -1 } },
  rarity = 3,
  atlas = 'Phanta',
  pos = { x = 0, y = 0 },
  cost = 8,
  loc_vars = function(self, info_queue, card)
    return { vars = { card.ability.extra.x_mult, card.ability.extra.current_x_mult, card.ability.extra.tarots } }
  end,
  calculate = function(self, card, context)

    if context.joker_main then
      if card.ability.extra.current_x_mult > 1 then
        return {
          message = localize { type = 'variable', key = 'a_xmult', vars = { card.ability.extra.current_x_mult } },
          Xmult_mod = card.ability.extra.current_x_mult
        }
      end
    end

      if count_tarots() ~= card.ability.extra.tarots and not context.blueprint
      then
        card.ability.extra.tarots = count_tarots()
        card.ability.extra.current_x_mult = 1 + (card.ability.extra.x_mult * card.ability.extra.tarots)
          card_eval_status_text(
                  card,
                  "extra",
                  nil,
                  nil,
                  nil,
                  { message = localize({ type = "variable", key = "a_xmult", vars = { card.ability.extra.current_x_mult } }) }
                )
        end
      end

  end
}```
#

barely fits on discord lol

wintry solar
#

okay, do you have other things that need to count tarot cards?

long sun
#

the rogue value i gave tarots isn't too important

long sun
#

not right now, anyway

wintry solar
#

okay, gimme 2 mins to rewrite this for you then

long sun
#

might add a few later, this pack is ghost themed :D

#

hokai

royal ridge
#

eremel carry

long sun
#

i didn't think this one joker would have so much discussion around its implementation lol

#

would be awesome if Balatro had a function for when the list of consumables changes

wintry solar
#

this should work

long sun
#

lemme see

#

what does pairs() do?

wintry solar
#

wait hang on

long sun
#

okie

wintry solar
#
function count_tarots()
  local tarot_counter = 0
  if G.consumeables.cards then
    for _, card in pairs(G.consumeables.cards) do
      if card.ability.set == "Tarot" then
        tarot_counter = tarot_counter + 1
      end
    end
  end
  return tarot_counter
end

SMODS.Joker {
  key = 'ghostjoker',
  loc_txt = {
    name = 'Ghost Joker',
    text = {
      "Gives {X:mult,C:white}X#1#{} Mult for",
      "each {C:tarot}Tarot{} card in",
      "your {C:attention}consumable{} area",
      "{C:inactive}(Currently {X:mult,C:white}X#2#{C:inactive} Mult)"
    }
  },
  config = { extra = { x_mult = 0.75, base_x_mult = 1} },
  rarity = 3,
  atlas = 'Phanta',
  pos = { x = 0, y = 0 },
  cost = 8,
  loc_vars = function(self, info_queue, card)
    return { vars = { card.ability.extra.x_mult, card.ability.extra.x_mult + (count_tarots() * card.ability.extra.base_x_mult) } }
  end,
  calculate = function(self, card, context)

    if context.joker_main then
      if count_tarots() then
        return {
          message = localize { type = 'variable', key = 'a_xmult', vars = { card.ability.extra.x_mult + (count_tarots() * card.ability.extra.base_x_mult) } },
          Xmult_mod = card.ability.extra.x_mult + (count_tarots() * card.ability.extra.base_x_mult)
        }
      end
    end
  end
}
#

that's better

#

pairs just iterates over a table

rancid perch
#

would this be useful for modders? made a small thing that lets you test enhancements + seals on decks. i coudl easily port it over to photoshop or other tools if better

long sun
#

ah kay :D

rancid perch
#

only thing missing RN are the FOJ stuff

wet sand
#

could be cool

rancid perch
#

lpus idk if im using the X2 or X1 ones as a bsae lemme check

long sun
#

hmm, but now it won't display a message when it changes

#

lemme attempt to add that

rancid perch
#

yeah those are the x1 ones

#

i need to remake it fro the x2

#

wouldnt be hard just

cerulean rose
wintry solar
long sun
#

i feel like it should though

wintry solar
#

No other jokers like that would display a message

long sun
#

i know Constellation does? not sure about Steel

#

i mean, sure, i can remove it

wintry swallow
#

hahahaha yes

wintry solar
#

constellation is specifically about using cards and gaining something though

cerulean rose
long sun
#

fairfair

wintry solar
#

yours is just a passive counting effect, like stencil

long sun
#

well, okay

rancid perch
#

nvm im wrong its the x2 one

long sun
#

oh yeah, Stencil doesn't!

cerulean rose
long sun
#

ya you're right it shouldn't have one then

wintry solar
#

digital, what are you trying to do?

long sun
#

hmm. game crashed immediately after loading the shop

#

the perpetrator is if context.selling_card then

wintry solar
#

code?

long sun
#
function count_tarots()
  local tarot_counter = 0
  if context.selling_card then
    tarot_counter = -1
  end
    if G.consumeables.cards then
      for _, card in pairs(G.consumeables.cards) do
        if G.consumeables.cards[i].ability.set == "Tarot" then
          tarot_counter = tarot_counter + 1
        end
      end
    end
    return tarot_counter
end```
wintry solar
#

yeah get rid of that shit at the top

long sun
#

but that'll break it

wintry solar
#

no it wont

long sun
#

well i can try

#

this time it's if G.consumeables.cards[i].ability.set == "Tarot" then

wintry solar
#

that's not the code I sent you

long sun
#

oh, eek. i missed that line

#

lemme check everything again

#

okay seems good

#

bingo, that works! thank you so much!! :D

#

sorry for indirectly causing a fuss in here btw ^^

merry raven
#
G.E_MANAGER:add_event(Event({trigger = 'after', delay = 0.4, func = function()
                attention_text({
                    text = "Pair Unlocked",
                    scale = 1.3, 
                    hold = 1.4,
                    major = used_tarot,
                    backdrop_colour = G.C.SECONDARY_SET.Tarot,
                    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
                    })
            return true end }))

I just directly copied code from the source code to make this message play when a certain hand is scored, what does major do, what's the difference between align and offset, and what does silent do?

My goal is to align the message in the top left corner to be in the middle of the screen

wintry solar
#

major should reference what it aligns to

rancid perch
#

Is there any other format useful i should convert this to

wintry solar
#

I think you probably want G.play as the major here

rancid perch
#

since i know some dont use photoshop

merry raven
#

Like to export the sprite sheet to use for a mod?

cerulean rose
rancid perch
#

no differnt editors

#

since some use lie GIMP or whater one dragokill uses

merry raven
#

Also @wintry solar unfortunately in_pool = false doesn't keep Enhancements out of Standard Packs

SMODS.Enhancement {
    key = "twin_headed_snake",
    loc_txt = {
        name = "Twin-Headed Snake",
        text = {
            "{X:dark_edition,C:white}WISH{}",
            "A wish to be understood and known."
        }
    },
    atlas = 'Enhancements',
    no_rank = true,
    no_suit = true,
    always_scores = true,
    in_pool = false,
    overrides_base_rank = true,
    replace_base_card = true,
    pos = {x=8, y=0}
}
merry raven
wintry solar
rancid perch
#

do those use differnt formats jit?

#

idk what youd convert them into

merry raven
#

I just convert them into pngs

merry raven
rancid perch
#

fair but this is setup in layers for testin

wintry solar
#
in_pool = function(self)
  return false
end```
cerulean rose
merry raven
cerulean rose
#

right now i have this

local hook3 = Card.calculate_joker
function Card:calculate_joker(context)
    local ret, trig = hook3(self, context)
    if G.GAME.blind.name == "bl_pencil_arrow" and (ret or trig) and not context.post_trigger then
        SMODS.debuff_card(self, true, "bl_pencil_arrow")
        G.GAME.blind.debuffs = G.GAME.blind.debuffs or {}
        table.insert(G.GAME.blind.debuffs, self)
        SMODS.recalc_debuff(self)
    end
    return ret, trig
end

local hook4 = eval_card
function eval_card(card, context)
    local ret = hook4(card, context)
    if G.GAME.blind.name == "bl_pencil_arrow" and ret and not context.post_trigger and not context.repetition_only and not context.discard and not context.pre_discard and not ret.jokers then 
        SMODS.debuff_card(card, true, "bl_pencil_arrow")
        G.GAME.blind.debuffs = G.GAME.blind.debuffs or {}
        table.insert(G.GAME.blind.debuffs, card)
        SMODS.recalc_debuff(card)
    end
    return ret
end

local hook5 = G.FUNCS.evaluate_play
G.FUNCS.evaluate_play = function(e)
    local ret = hook5(e)
    for k, v in ipairs(G.GAME.blind.debuffs or {}) do
        SMODS.debuff_card(v, false, "bl_pencil_arrow")
        SMODS.recalc_debuff(v)
    end
    G.GAME.blind.debuffs = nil
    return ret
end
long sun
#

hooyah!!

cerulean rose
plain apex
#

this is successfully drawing 2 cards but if it gets randomized via glitched or anything else it will display properly but not draw the randomized value

SMODS.Consumable{
    key = 'LTMLaunchPad', -- key
    set = 'LTMConsumableType', -- the set of the card
    atlas = 'Jokers', -- atlas
    pos = {x = 1, y = 4}, -- position in atlas
    loc_txt = {
        name = 'Launch Pad', -- name of the consumable
        text = { 
            'Draw {C:attention}#1#{} additional cards'
        }
    },
    config = {
        extra = {
            cards = 2, -- configurable value (number of cards to draw)
        }
    },
    loc_vars = function(self, info_queue, center)
        if center and center.ability and center.ability.extra then
            return {vars = {center.ability.extra.cards}} 
        end
        return {vars = {}}
    end,
    can_use = function(self, card)
        if G and G.hand and G.hand.highlighted then
            if #G.hand.highlighted >= 0 and #G.hand.highlighted <= self.config.extra.cards then
                return true
            end
        end
        return false
    end,
    use = function(self, card, area, copier)
        if G and G.hand then
            -- Use the Launch Pad to draw extra cards
            G.FUNCS.draw_from_deck_to_hand(self.config.extra.cards)
        end
    end,
}
normal crest
#

Because you're using self instead of card

cerulean rose
#

the classic blunder

long sun
#

how does this ability sound, for P5 Joker?
Gains +2 Mult per hand played that is not your most played poker hand

#

too strong, too weak?

long sun
#

no

wintry swallow
#

then rephrase as "[...] hand played that is not your most played poker hand"

long sun
#

fair, thanks :D

#

hmm, it feels a bit weak. what about +3?

#

that feels about on-par with other Uncommons to me

#

ah, thinking about Flash Card, maybe +2 is fine

#

if you have a lot of hands, it could easily surpass Flash Card

#

okay, i'm happy with that :D

fallen tendon
#

I wonder if it would be possible to replace the background shader

nocturne garnet
long sun
#

that was easier than expected! (though, i did reference Jimball's code)

crisp coral
#

OBELISK SUPPORT LFG

wintry swallow
nocturne garnet
long sun
#

quite so ^^

mystic river
long sun
#

ooh ya i had one more idea

#

Rosary Beads: Retrigger all played Wild cards

wintry swallow
long sun
#

SOB

#

per scribed: via writing?

#

shrug

wintry swallow
#

my challenge modifier's ID spells it correctly lmao

#

the source is... very interesting at times

normal crest
#

I think in game.lua there are a couple comments saying "REMOVE THIS"

wet sand
#

shoutouts to the top of challenges.lua that just has a test challenge with a bunch of random shit in it

wintry swallow
#

yeah it's great

#

i'm trying to make the XXX will appear as the boss blind of Ante Y text coloured based on what blind it is prescribing

#

e.g. violet vessel is purple, amber acorn is orange, verdant leaf is green etc etc

#

all other boss blinds would just show as the usual {C:attention}

#

i just think that'd be a nice touch

#

...and i think i know exactly how to do it, and it involves a metatable.

wet sand
wintry swallow
#

oh i have a challenge that starts you with a card that is otherwise banned

#

"Escort Mission"

#

you gotta bring jimbo through ante 9, and if he gets sold or destroyed future blinds will become much harder

#

(the ID of the penalty modifier is a misnomer, a holdover from an earlier version, it's not 2x it's 1.7x)

wintry solar
#

What level of scaling is standard in the challenge?

wintry swallow
#

HOLY FUCK IT WORKS

wintry swallow
#

all challenges that do not explicitly say "required score scales faster" are white stake scaling

nocturne garnet
#

😨

#

this challenge is impossible

wintry swallow
#

YOU DO NOT WANT TO KNOW HOW THIS SHIT WORKS

rare bobcat
#

The hook is rough when you skip the first 2 blinds

wintry swallow
#

hey that's the debug challenge

#

what i did was make the text colour change based on which blind it is

#

fucking context-sensitive localisation colour tag

rare bobcat
#

I understand what all the code is doing for the most part but I don’t think I could do this off of memory. I need to reference the YouTube tutorial I saw

wintry swallow
#

this does BULLSHIT

#

that is what it does

#

i'm using a hidden locvar to essentially "smuggle" the blind's ID into the localisation system

#

all this for some colours.

rare bobcat
#

Do the bosses actually appearing work?

wintry swallow
#

yes!

#

that's actually a system from vanilla

#

just unused in vanilla

wintry solar
wintry swallow
#

4 joker slots

#

it's hard!

#

playtesters have told me the balancing was actually too harsh on 2x

tidal edge
wintry swallow
#

fun fact

#

the colouring on that text

#

took me 2x longer to implement than the effect of the modifier

#

that is one modifier

#

whose colour changes based on what parameters are passed into it

tidal edge
wintry swallow
#

yes!

#

due to the way challenge text works, each modifier's colouring is defined in the localisation table

#

i got around this by defining a custom colour tag whose meaning changes depending on what arguments are passed into the string

tidal edge
#

sorry

wintry swallow
#

i'm using modifier to refer to custom rules

#

you know

#

like "you do not receive interest at the end of a blind" etc

tidal edge
#

oh makes sense

#

what mod is this for btw

#

or is it unreleased

wintry swallow
#

as of yet unreleased

#

but has a thread

night pagoda
#

I have a couple of effects that debuff Jokers, but if I somehow un-debuff them and debuff them again, they will stack their effects (happens with troubadour, merry andy, etc.) - any idea how I could avoid that?

I use G.GAME.blind:debuff_card for debuffing, and mod.content.set_debuff(card) for determining the outcome

zealous glen
night pagoda
#

How do I check that?

zealous glen
#

Idk try to print it

#

Maybe with a hook

faint yacht
#

add and remove to_deck?

zealous glen
#

Yes

night pagoda
#

I didn't understand what are you reffering to, where those methods are?

zealous glen
night pagoda
#

So in the Jokers

zealous glen
#

applying the effect twice might mean you add the Jokers back to the deck twice

#

I guess trying to print will tell you how many function calls there are even if this isn’t the issue

night pagoda
#

Maybe I still do not understand what are you trying to say but I'm talking about vanilla jokers, not custom ones

zealous glen
#

Most methods in SMODS.Joker come from vanilla

night pagoda
#

I know, but it feels like I'd need to take ownership of the vanilla jokers from that information

zealous glen
#

As I said you can just hook the method

#

Although the specific information might not be important, you could still learn how many function calls there are

#

Calling add_to_deck twice when buffing them might be the issue

night pagoda
#

I'm still very confused, oof
So you're suggesting that I hook the general function of adding the joker to deck while checking for the debuff, but there's no arguments to check to begin with, as mod.content.set_debuff(card) returns bool value

zealous glen
#

Not sure how that function is relevant

#

You want to check the arguments received by add_to_deck

#

so the argument and return of the other function isn’t relevant at the moment

quaint latch
#

I finally managed to spawn a standard card with a custom enhancement 🙏

zealous glen
#

@night pagoda

local card_add_to_deck_ref = Card.add_to_deck
Card:add_to_deck = function(from_debuff)
    sendDebugMessage(tostring(from_debuf))
    return card_add_to_deck_ref(from_debuff)
end
night pagoda
#

yup, already checking (but with lovely)

zealous glen
#

and same here

night pagoda
#

so far from_debuff is true for the add_to_deck

zealous glen
#

but does it print the correct number of times?

night pagoda
#

yes, only one time

zealous glen
#

It should be once per joker per buff

night pagoda
#

same with removing

muted timber
#

WHY 😭

night pagoda
#

only one time, and true

shell tangle
# muted timber WHY 😭

You're missing colour = G.C.whatever in the config, you can probably do a colour = G.C.CLEAR if needed.

zealous glen
#

did you hook or did you patch it?

night pagoda
#

did lovely patch

zealous glen
#

Try with a hook

#

If the function isn't being called twice I wonder if there's like a copy of it like in Steamodded or something

muted timber
zealous glen
#

I wonder if it should be colour = { colour = { R, G, B, A } }

#

maybe not

night pagoda
wintry solar
muted timber
zealous glen
#

Or do you have a mod that does?

night pagoda
#

it'd be SMODS.current_mod.set_debuff(card)

night pagoda
zealous glen
# night pagoda Nope

How about trying to hook set_debuff then? To count how many times it's called?

night pagoda
#

Let me check without the take_ownership

zealous glen
night pagoda
#

I removed the take ownership and it doesn't act weird now

zealous glen
#

Maybe it's not calling add_to_deck twice, but for like Troubador maybe it's accidentally changing the table

#

Since Steamodded and vanilla use slightly different representations, I'm wondering if by taking ownership it's changing how the function is called and it ends up changing a variable in the wrong table

#

or changing it twice but calling different functions

#

@night pagoda does your mod have a lower or higher priority than Steamodded?

night pagoda
#

I remember that when I was first implementing the thing it also had the exact same bug, but I didn't have any take_ownership before so it confused me greatly now

zealous glen
#

It should be a number in your config

#

Maybe it's optional

night pagoda
#

Seems like it

#

Only have the lovely priority setting but that's not it

zealous glen
#

I'm just wondering if the priority would make the print appear different

#

Because when you take ownership Steamodded might copy the object but into its own structure

#

So it may or may not copy the print

sonic cedar
#

how would i combine these 2 messages into 1?

message = localize{type = 'variable', key = 'a_mult', vars = {card.ability.extra.mult}}```
```lua
message = localize{type = 'variable', key = 'a_chips', vars = {card.ability.extra.chips}}```
obviously i cant keep them separate since they use the same variable
zealous glen
#

You don't 🤔

#

Do two messages

long sun
#

say hello to the Crescent! brainstorming abilities, and thinking of Creates a Tarot card when a Planet card is sold (Must have room)

night pagoda
sonic cedar
zealous glen
zealous glen
sonic cedar
#

so if i just said

        if context.joker_main then
            return{
                chip_mod = card.ability.extra.chips,
                mult_mod = card.ability.extra.mult,
                message = localize{type = 'variable', key = 'a_chips', vars = {card.ability.extra.chips}},
                message = localize{type = 'variable', key = 'a_mult', vars = {card.ability.extra.mult}} 
            }     
        end

thatd be fine

zealous glen
#

no

sonic cedar
#

i see

#

do i reformat it then? or is it just an ordering issue

night pagoda
zealous glen
night pagoda
#

yes, I printed the entire joker table with debugplus

night pagoda
zealous glen
night pagoda
#

you can see by the line 4171 that I changed atlas

zealous glen
#

unless there's a hidden one somewhere that isn't displayed

solid surge
#

tryna figure out two things here:

  1. how would i get this to actually work? i tested it with the provided test numbers (an Ace (14) and 2) and it doesnt give Xmult when they're scored
  2. how would i add more than 2 cards to the function pool?
cinder elk
zealous glen
night pagoda
#

I recall having this bug even before taking ownership, so I feel like it might be some other thing

solid surge
teal estuary
night pagoda
#

I can try doing like a test modded joker that is supposed to work like troubadour but isn't from vanilla

teal estuary
#

same for mult, and chips when in a return

zealous glen
#

not always consistent

teal estuary
#

is anything in smods consistent /s

solid surge
teal estuary
#

your id code is only checking for aces, or 2’s

solid surge
#

yea

#

im doing that as a test

teal estuary
#

-# also try xmult_mod, its case sensitive

#

-# i just cant remember

shell tangle
solid surge
#

ok ima try both and get back to this

shell tangle
#

It's not SMODS, it's certified thunk programming.

zealous glen
solid surge
teal estuary
#

im not at my computer right now, so i cant grab my code so gimme a second

zealous glen
#

Photograph uses x_mult

solid surge
#

but is it placed somewhere else in its code or no

#

because i feel as if somethings misplaced or typed wrong

teal estuary
#

it looks fine to me

teal estuary
#

thunk moment

shell tangle
#

Try card = card, just in case, probably not it, though.

teal estuary
#

but yeah its definitely Xmult_mod, its what i use

teal estuary
zealous glen
#

try this return (but self should be card)

#

well, and the variable should be whatever you variable is naturally

teal estuary
#

im trying to find an actual example in my mod that has Xmult, that doesnt use joker_main

sudden dew
#

Is there an API method for centers that gets called when they're rearranged in a card area? Not seeing anything in the docs, but it seems like something I'd expect to exist already

zealous glen
#

I have one but I haven't ported it, it seems

#

I don't think Steamodded is that advanced no

teal estuary
solid surge
#

ok so the methods given kinda worked, but it produced a less than acceptable result

shell tangle
faint yacht
#

x_mult = card.ability.extra.Xmult

zealous glen
#

you used extra instead of extra.whatever

shell tangle
#

Check that extra = {Xmult = 3} or whatever number and not extra = {Xmult = {3}}.

solid surge
#

oop- nvm its working now

#

thanks guys

dreamy thunder
#

why does the game crash when i hover over the joker which i gave a custom rarity?

sudden dew
#

Any recommendations on how to ensure I get a new joker in a run to test it?

teal estuary
dreamy thunder
teal estuary
sudden dew
#

Had no idea balatro had a debug menu

dreamy thunder
dreamy thunder
teal estuary
#

you should use debugplus though

dreamy thunder
#

i wish i could

teal estuary
#

i mean jeg

sudden dew
#

Is debugplus a mod?

dreamy thunder
#

ye

teal estuary
#

yeah

dreamy thunder
#

if you cant get it working though you can use the balatro version

teal estuary
#

i didnt even know it had its own debug menu

dreamy thunder
sudden dew
#

By wilsonthewolf? Want to make sure I have the right git repo

teal estuary
#

mhm

teal estuary
#

-# it might be useful to send the crash

dreamy thunder
#

oh sorry

teal estuary
#

all good

dreamy thunder
#

idk how to add rarities so im trying some stuff

frosty dock
#

like, over 2 months

dreamy thunder
#

oh

#

i dont know any version higher

frosty dock
#

wdym

#

how did you first install it and was it after October 31st?

dreamy thunder
#

i went to the github page

#

oh tyh its old

#

dang

#

i never checked if it got any updates

frosty dock
#

the answer to the question if steamodded got an update is almost always yes

rough furnace
#

except that one week

frosty dock
#

we don't talk about that one week

dreamy thunder
#

k

#

i downloaded it

#

still getting the same error

rare bobcat
#

I just thought of an idea

#

Guillotine: if it’s the first hand of the round, destroy any played face cards, +10 mult per card destroyed

#

Not only is it good canio synergy, it can be used with pareidolia for deck thinning

dreamy thunder
#

could anyone help me with custom rarities ?

#

i dunno anything about em

sudden dew
#

Looking at the list of commands given by the help command in debugplus, I'm not seeing anything that would spawn in a joker. What am I missing?

#

Or do I just have to evaluate some code that populates it

violet void
sudden dew
#

Oh hell yeah

#

Thank you

violet void
brisk rose
solid surge
#

it does partially work when i swap out chip_mod or Xchips with chips, but i want it to act as an actual chip multiplier

wheat kayak
wet sand
#

can i get a sanity check

for k, v in pairs(G.GAME.hands) do
  v.played = 0
  v.played_this_round = 0
end```
does this reset the stats of every played hand
#

i cant wrap my head around pairs for some reason

dreamy thunder
frosty dock
#

pairs iterates over all key-value pairs in a table, that's really all it does

dreamy thunder
#
    key = 'wip', 
    loc_txt = { 
        name = 'Wip', 
    },
    badge_colour = '808080',
    pools = {
        ["Joker"] = true,
    },
}```
violet void
#

Is there a function like is_suit but for ranks?

I had in mind a joker that made 6s and 9s be the same rank

hardy viper
#

not exactly

#

only get_id()

#

you could always make both act as 9s

#

but you couldn't make them both 6s and 9s

violet void
#

Which would make them both odd and even

#

Hmm might be more complicated than I thought
-# or I would need to take ownership of said jokers

pseudo badge
#

quick question im going about making a custom deck texture and found a templates for the cards themselves but is there any for all the consumables?

crimson fern
#

hey gang my game keeps crashing and giving me this message

#

Oops! The game crashed:
main.lua:1841: stack overflow

Additional Context:
Balatro Version: 1.0.1n-FULL
Modded Version: 1.0.0~ALPHA-1304a-STEAMODDED
LÖVE Version: 11.5.0
Lovely Version: 0.6.0
Steamodded Mods:
1: Aurinko by jenwalter666 [ID: aurinko, Priority: 9.9e+301, Version: 0.4.7]
2: Cryptid by MathIsFun_, Cryptid and Balatro Discords [ID: Cryptid, Priority: 1e+299, Version: 0.5.3a, Uses Lovely]
3: Loop by jenwalter666 [ID: loop, Priority: -9999999999, Version: 0.1.1]
4: Talisman by MathIsFun_, Mathguy24, jenwalter666, cg-223 [ID: Talisman, Version: 2.0.3~dev, Uses Lovely]
Break Infinity: omeganum
5: Incantation by jenwalter666, MathIsFun_ [ID: incantation, Priority: 9e+301, Version: 0.5.4]
6: Jen's Library by jenwalter666 [ID: JenLib, Version: 0.2.2]
7: Nopeus by jenwalter666, stupxd [ID: nopeus, Version: 2.2.0]
Lovely Mods:

Stack Traceback

(3) global C function 'error'
(4) Lua field 'update' at file 'main.lua:1841'
Local variables:
dt = number: 0.0524234
success = boolean: false
msg = string: "stack overflow"
(5) Lua function '?' at file 'main.lua:931' (best guess)
(6) global C function 'xpcall'
(7) LÖVE function at file 'boot.lua:377' (best guess)
Local variables:
func = Lua function '?' (defined at line 902 of chunk main.lua)
inerror = boolean: true
deferErrhand = Lua function '(LÖVE Function)' (defined at line 348 of chunk [love "boot.lua"])
earlyinit = Lua function '(LÖVE Function)' (defined at line 355 of chunk [love "boot.lua"])

#

idk why it pasted like that sorry

crimson fern
#

i did and it crashed again

#

@frosty dock

frosty dock
crimson fern
frosty dock
crimson fern
#

then what? im a little new to this stuff sorry

#

oh

frosty dock
#

(don't mind the branch not being main there, that's me messing with stuff)

mellow sable
#

how is refactor already 69 commits behind main 😭

wintry swallow
#

modding is very fun at times

blissful dagger
#

Did you ever find an answer to this? I too am trying to figure out how to do this and can't find anything

wintry swallow
#

you have no idea the amount of work the "all X blinds are Y" took to implement

#

the game doesn't actually have the words "boss blind" anywhere on their own so these are custom localisation keys

zealous glen
#

I think doing it without the UI would be easy

wintry swallow
#

it is

zealous glen
#

But integrating the UI and making sure nothing else breaks sounds hard

#

I have multi-blind Boss Blinds already thanks to L Corp

wintry swallow
#

okay so you see this text

#

well there's already something notable here, in the colour key ns_blind which is entirely custom

zealous glen
#

I've done custom colors too

wintry swallow
#

but like this is part of the logic for choosing what to display here

#

nonono

#

ns_blind isn't JUST a custom colour

#

ns_blind is a context-sensitive custom colour

#

the colour of the text changes based upon which blind it's referring to, all other blinds get the default attention colour, but finisher blinds get their colour

zealous glen
#

Couldn't you use the same control as Castle to control both color and context

wintry swallow
#

so blue for cerulean, green for verdant violet for vessel etc

zealous glen
#

Maybe not the exact same control since that one might be hardcoded for suit colors

wintry swallow
#

it almost definitely is

zealous glen
#

But it's context-sensitive too

wintry swallow
#

no piece of text in the vanilla game does context-sensitive colouring for blinds

zealous glen
#

But I think the harder part of the UI would be replacing the selection boxes

#

and the logic around them

wintry swallow
#

maybe

#

but yes uh context-sensitive colouring aside

#

i manually pull the blind name out of localisation

#

and poke around by hand in the locvars for the string

open bone
#

Hey, quick hook-related question, sorry to bother-

So I'm still doin' that "get money for overkilling" voucher, and I thought of just adding onto the function that creates/check the flames already, which is the flames handler

So I have this, but with this active, it actually doesn't show the flames and I'm not quite sure why? I'm guessing it has something to do with fucking up the hook itself 😩 otherwise, it works as I intend to- just without the flames showing up anymore, which, y'know, isn't ideal

#

(ignore the "overkillactivate()" bit, i tried adding it but it just make the game crash)

wintry swallow
#

oh that's an old style of hook

#

i would heavily recommend using lovely hooks rather than straight lua

#

it lets you inject code into the original function

zealous glen
#

I recommend Lua hooks

#

Avoiding lovely is better

open bone
zealous glen
wintry swallow
#

lovely hooks are plenty good please use them

zealous glen
#

Lovely hooks are good when Lua hooks won't work

wintry swallow
#

but yeah uh

#

let me have a look at the relevant function

open bone
#

😭 Yeah I'm not sure what to do now fhdjsk

zealous glen
wintry swallow
#

looks like that function is responsible for just updating the flame effect

#

it's a graphics routine

#

you shouldn't be relying on it for gameplay logic

#

check at the end of the round, yeah

zealous glen
#

Try end_round

#

in state_events

open bone
#

So I replace the flame handler function in this stuff with end_round instead?

zealous glen
#

I suggest looking at end_round and seeing where you'd like your code to go

#

Then hooking or patching as appropriate

open bone
#

Think2S right

wintry solar
#

do you have a file for every patch you're doing?

wintry swallow
#

there's around 2 or 3 in each file

#

but broadly yes

#

this is MUCH easier on my brain than one giant lovely.toml file

zealous glen
#

one file for each type of change

wintry solar
wintry swallow
#

this mod does touch almost all of base balatro's gameplay features so there are a lot of patches

zealous glen
#

@wintry swallow how to replace the UI selection elements without breaking the game anyways

wintry swallow
#

because my challenges remix vanilla balatro in some way each

wintry swallow
#

i'm not doing that

zealous glen
#

I meant the Blind selection elements

#

You replace Small and Big with Boss Blinds

wintry swallow
#

yes i am also not touching that

#

you can just

wintry solar
#

don't you just change what the blind is?

wintry swallow
#

set round_resets.blinds

wintry solar
#

and then it draws the ui for you

wintry swallow
#
[manifest]
version = "1.0.0"
priority = 0

# Game#start_run
[[patches]]
[patches.pattern]
target = "game.lua"
pattern = "self.GAME.selected_back:apply_to_run()"
position = "after"
payload = '''
self.GAME.modifiers.blind_forced = {}
'''
match_indent = true

# Game#start_run
[[patches]]
[patches.pattern]
target = "game.lua"
pattern = "self.GAME.joker_rate = 0"
position = "after"
payload = '''
elseif v.id == 'nsc_force_blinds' then
    self.GAME.modifiers.blind_forced[v.class] = v.blind
'''
match_indent = true

# Game#start_run
[[patches]]
[patches.pattern]
target = "game.lua"
pattern = "self.GAME.round_resets.hands = self.GAME.starting_params.hands"
position = "before"
payload = '''
self.GAME.round_resets.blind_choices = {
    Small = self.GAME.modifiers.blind_forced.Small or 'bl_small',
    Big = self.GAME.modifiers.blind_forced.Big or 'bl_big'
}
'''
match_indent = true

# get_new_boss
[[patches]]
[patches.pattern]
target = 'functions/common_events.lua'
pattern = 'if G.FORCE_BOSS then return G.FORCE_BOSS end' # No, we're not using this.
position = 'after'
payload = '''
if G.GAME.modifiers.blind_forced.Boss then return G.GAME.modifiers.blind_forced.Boss end
'''
match_indent = true
#

that's all my blind patches

zealous glen
#

I thought it would break if you fought an unexpected Blind at the wrong time

wintry swallow
#

it does not!

#

self.GAME.round_resets.blind_choices has the info

#

the game still counts the first two blinds as small and big respectively, even if they are not actually bl_small and bl_big

#

so you will only ante up after beating the third

zealous glen
#

Ah but wait

#

You also do this at the start of the game right

wintry solar
#

have you tried reloading mid blind?

wintry swallow
#

reloading? like

wintry solar
#

I've noticed that it restarts the ante and ahvent got round to fixing it yet

wintry swallow
#

a save?

wintry solar
#

yeah

wintry swallow
#

uh nevermind

#

nevermind don't listen to me

#

it DOES break if you do this, i need further patching to make it not do that

#

...should've seen that coming

wintry solar
#

nah it's weird jank coding in vanilla

#

I just havent had the time to investigate it properly

zealous glen
wintry swallow
#

yes

#

it is set in Game#start_run as the comments say

zealous glen
#

Yeah I was thinking of stapling it onto other effects

#

Which means it would need to update the UI at an arbitrary timing

wintry swallow
#

i like making it explicit

#

then again i am doing challenges

#

anyway uh here's the logic for anteing up

#

right now this just checks "is the blind a boss blind"

#

now

#

i could fix this one of two ways

zealous glen
#

Like a Joker that changes the Small and Big Blinds to Boss Blinds

wintry swallow
# wintry swallow i could fix this one of two ways
  • implementing it properly to check if you've just beaten the third blind of an ante, and only ante up then

  • or the extremely lazy and stupid way which is that when the challenge is active, we only ante up if you've just beaten a showdown blind

zealous glen
wintry swallow
#

skips?

zealous glen
#

Doesn't that count as defeated?

#

If not, skipped or defeated

wintry solar
#

it just needs to check if the final one has been defeated

zealous glen
#

If you know which one is the final one yeah

wintry swallow
#

oh god this SUCKS i hate this codebase

wintry solar
#

yeah they're called small big and boss in the table iirc

zealous glen
wintry solar
#

I would imagine that the last element would always be the final blind

zealous glen
#

Aren't they indexed by non-integer key?

#

How do you order them?

wintry swallow
#

WELL THE GAME'S GOTTA ORDER EM SOMEHOW NOW DOESNT IT

sick sparrow
#

how to make the card that changes the name?

wintry swallow
#

so the solution ehre is to stare at the code until something starts making sense

zealous glen
#

but again

wintry swallow
#

a h a .

#

i see now. naruhodo ne. okay this is probably it

#

just?? check if G.GAME.round_resets.blind_states.Boss == 'Defeated' and pray

zealous glen
#

you can do ```lua
for k, v in pairs(table) do
if not (v.defeated or v.skipped) then
return
end
end
ante_up()

#

I think this is more scalable

wintry swallow
#

the problem is that there is no such table that gives you that information

#

well

sick sparrow
wintry swallow
#

outside of blind_states

zealous glen
#

There is though, I think

#

I thought there was a table with each blind in the ante

wintry swallow
#

that gets set late

wintry solar
wintry swallow
#

like, after we've already figured out if to ante up or not

frosty dock
wintry swallow
#

not useful

wintry solar
#

the problem isn't ante'ing up though

wintry solar
#

it's restarting the ante on a reload right?

zealous glen
wintry swallow
#

it is not useful

#

please listen to me

sick sparrow
#

how to make the card that changes the name?

wintry swallow
#

the problem IS that we're anteing up whenever ANY boss blind is defeated

wintry solar
#

oh I see

wintry swallow
#

including notably not the third one of the ante

zealous glen
#

instead of checking if the blind is a boss

wintry solar
#

thats a different problem to mine

zealous glen
wintry swallow
#

wait what the fuck i'm fucking dumb

#

just check if Small == "Defeated" and Big == "Defeated"

#

...except

#

no

zealous glen
#

@sick sparrow would need a hook to replace the name with a DynaText object depending on what you mean

wintry swallow
#

that uh still doesn't work

frosty dock
#

well, if neither are "Upcoming"

zealous glen
frosty dock
#

i.e. they're both defeated or skipped

wintry swallow
#

the game never actually sets Small and Big to defeated, because they are not small or big blinds

frosty dock
#

-# or hidden but whatever

wintry solar
#

it sets it to current too

frosty dock
#

... right

wintry solar
wintry swallow
#

okay let me see here

zealous glen
wintry solar
#

wait no why is boss current

wintry swallow
#

hjahahahahahaha

#

that's not right

frosty dock
#

this seems like you would just want to make your own counter

wintry swallow
#

yeah definitely

frosty dock
#

that resets when you ante up

zealous glen
#

Possible states

wintry swallow
#

me when both the boss and big blinds are current at the same time

frosty dock
#

and increments when you defeat or skip a blind

sick sparrow
zealous glen
wintry solar
#

you could just check if big blind is either defeated or skipped

frosty dock
#

-# but why is it current

wintry swallow
#

the game is not counting the big blind as the big blind because it's not a big blind

#

it's a boss blind

#

blind_states is unreliable here!!!!

#

that's what i've been trying to say this entire time

frosty dock
#

you have two options

sick sparrow
frosty dock
#

fix the blind_states, or make your own counter

wintry swallow
#

and fixing blind_states requires keeping a counter anyway, BUT would ultimately be more robust

wintry solar
#

ah yeah my boss gets set to current using ortalab small/big blinds

frosty dock
zealous glen
#

Maybe see when blind_on_deck is updated and updated the tracker there

topaz sun
#

guys i need help

#

how do I copy an enhancement from a card to another without using copy_card?

zealous glen
sick sparrow
topaz sun
sick sparrow
#

create_card('Consumables', G.consumables,nil,nil,nil,nil, "c_eris") is this correct?

#

whoops

frosty dock
#

(you can return different keys with loc_vars, but that implies making localization entries for every random combination of letters in the name)

topaz sun
sick sparrow
frosty dock
#

vanilla create_card mentioned

frosty dock
#

it's actually G.consumeables

#

because thunk

split creek
#

Trying to create the tooltip for a normal celestial pack, anyone know what I'm doing wrong?

  info_queue[#info_queue + 1] = { set = "Booster", key = "p_celestial_normal_1", specific_vars = { 1, 3 } }
  return { vars = {} }
end```
frosty dock
sick sparrow
frosty dock
#

oh you still need to emplace it into the cardarea

sick sparrow
frosty dock
#

(though there's a util function that does all of this for you and provides a better interface)

frosty dock
#
local card = SMODS.add_card {
  area = G.consumeables,
  key = 'c_eris',
  stickers = { 'eternal' },
}
wintry solar
#

maybe we should throw a G.consumables = G.consumeables in

wintry swallow
#

lol holy shit please

frosty dock
#

lmao

faint yacht
#

...uh, that's a weird offset.

night pagoda
#

Am I doing debuffing right if this happens?

frosty dock
wintry swallow
#

boss-blinds-on-any-blind now work completely perfectly

frosty dock
night pagoda
#

oof, so I have to deal with it?

wintry swallow
frosty dock
#

it's this issue basically

wintry swallow
#

quitting out and reloading works

wintry solar
#

give patch pls

wintry swallow
#

here patch

night pagoda
wintry swallow
#

NOTE: SKIPS DO NOT WORK YET

#

but for defeating blinds, this works

#

oh wait hold on this isn't the full patch

night pagoda
#

now I think about it, maybe it's exactly from that time

#

the bug report I mean

frosty dock
#

I get why this is bad, but it would still mean changing vanilla behavior

#

which we don't really like to have as part of steamodded

worthy anchor
#

Are there any good sources for people who wanna learn modding?

night pagoda
#

could have smods config

#

I already kinda want some config for existing smods features

#

such as rebinding the M key to something else

frosty dock
#

the game's code itself is largely undocumented, you kind of just have to read into it

frosty dock
wintry solar
#

[ best restart key

wintry swallow
#

match_indent REALLY needs to be optional holy shit

#

i have lost so much time to it

#

there's little reason to use a value that ISN'T true so why doesn't it default to true

night pagoda
#

ah wait I'm stupid, there's already smods config

frosty dock
#

I agree it should be optional and default to true

wintry solar
#

I wish it worked off the line with the least indents

#

or at least an option

sick sparrow
#

how to convert played cards into wild cards?

frosty dock
#

check midas mask code

sick sparrow
wintry swallow
#

check it outttttttt

#

violet vessel upcoming

#

as it should be

frosty dock
#

-# modders these days can't deal with vanilla code anymore

wintry swallow
#

yeah this patch is good

frosty dock
#

-# we've done too much abstraction team

wintry swallow
wintry solar
#

smods code is so much easier to read than vanilla code

wintry swallow
wintry solar
#

I don't blame people

sick sparrow
#

how to convert played cards into wild cards?

wintry swallow
#

please like idk write my name somewhere in your mod if you use this

wintry solar
#

I'll take a look at it and see what Ineed to do

#

my situation is slightly different but this will be helpful

wintry swallow
#

you're good

frosty dock
#

in my view that applies mostly to joker calculation

wintry swallow
wintry swallow
#

not everyone necessarily uh, wants to rewrite a core game system just to make a challenge possible to implement

frosty dock
#

you tell me

#

implementing custom suits required none of that actually

wintry swallow
#

yup this patch works in all situations

#

just tested it on red deck by quitting mid game and reloading after skipping one blind

worthy anchor
#

What's the best way to read the game's source code?

wintry swallow
#

and i still ante'd up at the end like i should

frosty dock
wintry solar
#

oh aure, speaking of blinds, I was wondering if it made sense to modify SMODS.Blind to allow for custom small and big blinds

frosty dock
wintry swallow
#

you hit the exact bug i wrote that patch to fix

wintry solar
#

yes which is why implementing it into smods properly would be a good idea

forest hinge
#

i'm trying to override the steel card tallying logic of steel joker with take_ownership. I overwrite the update method, my custom tally calculates correctly as expected, but then when scoring actually happens it seems to be using the original tallying behavior. Any sense of why this would happen? Does take_ownership not stop the base functionality from happening?

sick sparrow
#

how to create entire tarot deck into G.consumeables?

cerulean rose
#

wdym

sick sparrow
wintry solar
cerulean rose
#

you'd have to list each one manually

forest hinge
#

I did, for debugging purposes, but I figured that shouldn't be necessary, right? I just need to change the value of card.ability.steel_tally and then the original calculate should be fine right?

cerulean rose
#

unless you mean create a copy of every tarot card

#

do you want modded tarot cards to appear too?

sick sparrow
#

but we don't know if the card's internal name has underscore of them

#

only 0~21 (base tarot cards)

cerulean rose
#

then you have to add each one individually

wintry solar
#

uhh yeah I guess the original calculate should be fine

wintry swallow
#

my mod currently is more lovely patch than challenge

stiff locust
wintry swallow
#

this is day 3 of me developing uh

#

anything relating to balatro

sick sparrow
stiff locust
#

my modded tarot :(

cerulean rose
stiff locust
#

oh, right

wintry solar
stiff locust
#

showman exists

wintry solar
#

what exactly are you changing?

forest hinge
#

I'm trying to override card.ability.steel_tally

cerulean rose
#

where is that set?

forest hinge
#

if there's no way to stop original update from happening, I guess I could add a new field to steel joker called modded_steel_tally and make a new calculate function that uses that to bypass the base steel tally?

#

feels messy, but I guess it'd work

wintry solar
#

why do you need to do it in update?

#

just do the entire thing in calculate

forest hinge
#

that's where steel joker does its tally, so I figure that's where I should be doing mine

wintry solar
#

you don't need to count the number every frame

forest hinge
#

don't I? since it's displayed when you hover steel joker

wintry solar
#

no

#

just in calculate and loc vars

forest hinge
#

unless calculate is also called when you hover

cerulean rose
sick sparrow
faint yacht
#

7zip on main executable.

frosty dock
#

tfym without the source code

wintry swallow
#

the neat thing about balatro is that you can just have the source code

forest hinge
#

I do feel a bit uneasy when doing things a different way from vanilla, but I guess it's fair to say that balatro's code is only so good

fallen tendon
wintry swallow
#

please do not feel uneasy about doing things differently from vanilla, vanilla's codebase is uh

frosty dock
#

vanilla is not the gold standard

wintry swallow
#

how do i put it

#

"less than ideal"

stiff locust
#

balatro's code was made for the purposes thunk needed it for

wintry swallow
#

please look at how much shit i had to do to get a boss blind to behave when it wasn't in the boss slot

frosty dock
#

there's a reason we've established different standards in steamodded for certain things

fallen tendon