#💻・modding-dev

1 messages · Page 278 of 1

rugged pier
#

gnight everyone

tawny narwhal
#

Gn good fellow

#

cheers for your help

minor furnace
#

you probably should use SMODS.create_card, I just don't

radiant plank
#

thanks yeah i saw that code in card.lua for other jokers but something is trying to index center and it was crashing because of nil

#

guess i should just find the source of the crash instead of using SMODS.create_card

minor furnace
#

what does your current code look like for creating the card?

radiant plank
#

one second ill share it

#

totally written by me and nobody else btw

if #G.consumeables.cards + G.GAME.consumeable_buffer < G.consumeables.config.card_limit then
  G.E_MANAGER:add_event(Event({
    trigger = 'before',
    delay = 0.0,
    func = (function()
      local card = create_card('Tarot', G.consumeables, nil, nil, nil, nil, key, 'double')
      card:add_to_deck()
      G.consumeables:emplace(card)
      G.GAME.consumeable_buffer = 0
      return true
    end
  )}))
#

key is not nil

#

wait i think i might see it, bout to test it

minor furnace
radiant plank
#

yeah im setting that up manually

tawny narwhal
#

Guess whaaaattt

radiant plank
#

found the problem

tawny narwhal
#

yaay

minor furnace
#

what did you get now

tawny narwhal
radiant plank
#

i needed this line before the call to G.E_MANAGER:add_event:

G.GAME.consumeable_buffer = G.GAME.consumeable_buffer + 1
daring fern
tawny narwhal
#

Ya

#

and for the mod ID, I use the prefix right?

#

that's what someone told me earlier

daring fern
tawny narwhal
#

As soon as I play the 20th High card hand

minor furnace
daring fern
tawny narwhal
#
SMODS.Joker {
    key = 'stellar_collapse',
    loc_txt = {
        name = 'Stellar Collapse',
        text = {
            "After {C:attention}#2# High Card{} hands,",
            "collapses into {C:legendary}Singularity{}.",
            "{C:inactive}(Currently {C:attention}#1#{C:inactive} hands played)",
        }
    },
    config = { extra = { high_card_count = 0, high_card_limit = 20 } },
    rarity = 2,
    atlas = 'collapseatlas',
    pos = { x = 0, y = 0 },
    cost = 6,
    loc_vars = function(self, info_queue, card)
        return { vars = { card.ability.extra.high_card_count, card.ability.extra.high_card_limit } }
    end,

    calculate = function(self, card, context)
        if context.before and context.scoring_name == "High Card" and not context.blueprint then
            -- Increment count
            card.ability.extra.high_card_count = card.ability.extra.high_card_count + 1
            
            -- Check if it should transform
            if card.ability.extra.high_card_count >= card.ability.extra.high_card_limit then
                G.E_MANAGER:add_event(Event({
                    trigger = "after",
                    delay = 0.15,
                    func = function()
                        card:set_ability("j_LSingle_singular")
                        play_sound("CollapseBoom")
                        card:juice_up(0.3, 0.3)
                        return true
                    end,
                }))
            end

            -- Normal progress message
            return {
                message = "Collapsing...",
                colour = G.C.ATTENTION,
                card = card
            }
        end
    end
}
minor furnace
#

what is card:set_ability("j_LSingle_singular")

tawny narwhal
#

^^^

#

I was told to use that to make a joker transform into another (kinda like Ghost)

minor furnace
#

huh

#

I've only ever used that function for giving cards enhancements

tawny narwhal
#

Hmm... SO what Would I do for turning it into another joker (i.e. destroying itself and spawning 'singuler')

#

Bruh my keyboard is on the fritz

minor furnace
#

I wasn't saying it didn't work, I just wasn't aware the function did that

tawny narwhal
#

should this
-- Normal progress message return { message = "Collapsing...", colour = G.C.ATTENTION, card = card
be nested in an else? (I should really learn lua better IK)

daring fern
tawny narwhal
#

Well thats fine, since once it transforms it'll be a different joker

minor furnace
#

and also, did you start a new run before testing this

daring fern
tawny narwhal
#

yessir

#

Maybe me trying to trigger = 'after' is doing something funky?

minor furnace
#

idk

#

there's also the chance that trying to change a joker within itself causes some weird pointer issues

#

but I couldn't tell you

#

nope, I put it in one of my own jokers and it worked

#

although I didn't do it as part of the event manager

tawny narwhal
#

Could I see that?

minor furnace
#

works in the event manager too

#

this is all I have in the calculate function

        if context.end_of_round then
            G.E_MANAGER:add_event(Event({
                trigger = "after",
                delay = 0.15,
                func = function()
                    card:set_ability("j_reverse_rekoj")
                    card:juice_up(0.3, 0.3)
                    return true
                end,
            }))
            return {message = "test", colour = G.C.ATTENTION, card = card}
        end
    end```
tawny narwhal
#

WAIT

#

IT WORKED I THINK

minor furnace
#

did you perhaps

tawny narwhal
#

JUST THE SOUND DIDN'T WORK

minor furnace
#

did you forget to start a new run the last time you tested it before the sound error?

plush cove
#

question

so for a while I've had a system where I put all my special mod variables into their own table, so that I don't accidentally create a "unique_jokers" table that overlaps another mod

is this a good practice or would I be better off just changing it to be more like on the right

tawny narwhal
plush cove
native zinc
#

programmer art is insane

minor furnace
#

tonight's mod was brought to you by the letter 'B'

tawny narwhal
#

NOOO

#

It crashed again

#

why......

plush cove
#

is there even any performance difference at all?

tawny narwhal
#

WAIT

#

NO

#

IT CAN'T BE

#

Is it because the card it's trying to turn into was undiscovered

minor furnace
plush cove
#

i'm just referring to it like this

tawny narwhal
minor furnace
#

Emperor can create undiscovered tarots

minor furnace
#

as a rule of thumb

tawny narwhal
#

okay

#

working again

#

just sound I needc help with

#

how do I specify the file location

#

I'm looking at the SMODS sound page

#

And I'm goofy

#

nvm

tawny narwhal
#

Okay... IDK what I've done wrong

#

I've specified the key and the path for my sounds

#

But it keeps crashing with the same error as before

lament agate
tawny narwhal
#

In the files?

lament agate
#

yes

tawny narwhal
lament agate
#

is it .ogg or is it .wav

tawny narwhal
#

.ogg

wintry solar
#

Show the code where you’re trying to use it

tawny narwhal
#
calculate = function(self, card, context)
        if context.before and context.scoring_name == "High Card" and not context.blueprint then
            -- Increment count
            card.ability.extra.high_card_count = card.ability.extra.high_card_count + 1
            
            play_sound('Stellar_Upgrade', 1, 0.7)

            -- Check if it should transform
            if card.ability.extra.high_card_count >= card.ability.extra.high_card_limit then
                G.E_MANAGER:add_event(Event({
                    trigger = "after",
                    delay = 0.15,
                    func = function()
                        card:set_ability("j_LSingle_singular")
                        play_sound('Stellar_Transform', 1, 0.7)
                        card:juice_up(0.3, 0.3)
                        return true
                    end,
                }))
            end

            -- Normal progress message
            return {
                message = "Collapsing...",
                colour = G.C.ATTENTION,
                card = card
            }
        end
    end
}
#

I intially had the upgrade sound in the return, but I just tried moving it out to see if that'd change it

wintry solar
#

You need your mod prefix on the sound key

tawny narwhal
#

oh fr?

#

I knew it'd be something goofy like that

#

cheers broiski

stray warren
#

Is there a scoring_hand cardarea to check for scoring cards? I can't remember

wintry solar
#

G.play

stray warren
#

That's all the cards though, right? I just want the ones that actually score

wintry solar
#

Nope it’s just scoring cards

#

Unscored cards have context.cardarea == “unscored”

stray warren
#

Ah, I was using G.hand.highlighted. Forgot to change it 🤦‍♂️

#

Ok actually, that brings me to my next question. How do I check for the scoring cards when they are played in a blind? This code doesn't seem to be working. It's supposed to add the scored ranks to a table, but I don't think the cards are actually in G.play at the point that press_play runs:

  press_play = function(self)
    for k, v in pairs(G.play.cards) do
      if not SMODS.has_no_rank(v) then
        G.GAME.blind.config.blind.ranks_played[v:get_id()] = true
      end
    end
  end,

  -- Debuff ranks registered in ranks_played when a hand is drawn
  drawn_to_hand = function(self)
    for k, v in pairs(G.playing_cards) do
      if not SMODS.has_no_rank(v) then
        if G.GAME.blind.config.blind.ranks_played[v:get_id()] then
          v:set_debuff(true)
        end
      end
    end
  end,

  -- Set the ranks_played table to an empty table for if the boss shows back up
  defeat = function(self)
    G.GAME.blind.config.blind.ranks_played = {}
  end,
}
wintry solar
#

I believe you can use the new blind calculate functions to do this

stray warren
#

Oh that's a thing? I didn't see it on the Wiki. That sounds like what I need

#

tbf I was only looking in the Blind section

#

Uh, is the calculate function just calculate for a blind with the same parameters and contexts as other objects?

gray apex
#

Made multiple Shortcuts stack

stray warren
native zinc
iron iron
#

i beleve thats a thing?

#

ik theres one that makes bp compatible with almost everything

tawny narwhal
#

Hey guys, last thing. My joker plays a sound when a high card is played, and also has a sound for when it transforms into another joker. Problem is, when the 20th High card hand is played, both sounds play, and I only want the transform sound. any tips?

#

here is the code

 calculate = function(self, card, context)
        if context.before and context.scoring_name == "High Card" and not context.blueprint then
            -- Increment count
            card.ability.extra.high_card_count = card.ability.extra.high_card_count + 1

            -- Check if it should transform
            if card.ability.extra.high_card_count >= card.ability.extra.high_card_limit then
                G.E_MANAGER:add_event(Event({
                    trigger = "after",
                    delay = 0.15,
                    sound ='LSingle_StellarTransform',
                    func = function()
                        card:set_ability("j_LSingle_singular")
                        card:juice_up(0.3, 0.3)
                        return true
                    end,
                }))
            end

            -- Normal progress message
            return {
                message = "Collapsing...",
                sound = 'LSingle_StellarUpgrade',
                colour = G.C.ATTENTION,
                card = card
            }
        end
    end
}
daring fern
tawny narwhal
#

Okay, the upgrade sound doens't play anymore, but the upgrade sound doesn't play either. Not sure why.

#

NVM, fixxed

hard flume
#

Bells & Whistles

untold saddle
#

can i change the ingame currency ($) with an image?

primal robin
#

JangSchna Good luck

desert ore
#

Are there any mods that have a functionality added that allow multiple different enhancements on a single card? If it's a lot of custom I might just keep the idea on the backburner

daring fern
desert ore
#

Oh shit, sweet. For editions or enhancements too?

hushed field
#

what's your specific idea, btw?

desert ore
#

Just a joker that allows "quantum enhancements" as you called it for Aces

#

Or not you

#

But Somethingcom

hushed field
#

quantum enhancements allow for jokers to have effects like 'all stone cards count as copper cards'. It also works for ranks and suits, but you have to be prepared to deal with some jank, as you can't check for rank or suit the normal way in the check enhancement context for quantum enhancements

fading kestrel
#

Is there a mod that makes this mess of jokers easier to sort through?

limber blaze
humble girder
desert ore
#

Jank is to be expected

limber blaze
#

stone wild cards are just wild cards with 50 chips makes sense to me

humble girder
desert ore
#

But like what I was think is like, stacking enhancements and stuff like that. So like if you use a devil on a glass card, it becomes a gold card and a glass card, rather than converting

hushed field
#

damn, they're learning. they're shilling their mod now 😛

desert ore
#

And you could stack another

hushed field
#

You'd have to implement a custom system for that, I reckon. It's an interesting idea, but I suspect it'd be quite some refactoring code

desert ore
#

Hmm. Well maybe once I know a little more I'll throw my hat at it. Thanks for the help guys

#

Wait a minute that would be a nightmare visually, enhancements are a custom png not a layer thing

#

Yeah maybe this is too much of a pipe dream

gentle rain
desert ore
#

Wait a min I'm just talkin out my ass, ah well whatever I need sleep

next timber
#

is there a way to make a seal that prevents flipping by boss blinds?

worthy stirrup
#

Im trying to make it so my joker copies to the left and not the right, but it still says its compat with the one on the right.

#

heres the jokers code

humble girder
next timber
#

👍

worthy stirrup
humble girder
#

if G.jokers.cards[i] == self then self is a center

#

if G.jokers.cards[i] == card then

#

similarly other_joker ~= card

manic rune
#

good morning everyone

humble girder
#
      card.ability.name = "Blueprint"
      return {
          vars = {card.ability.name == "Blueprint"},
          main_end = main_end
      }
  end,```
this is probably every kind of wrong
hard flume
#

Hi :3

worthy stirrup
#

that works like normal blueprint

manic rune
#

hi 🥕

humble girder
#

first of all

#

you set your card's ability name to blueprint

#

that will trigger all the vanilla code

#

to consider your card a blueprint

manic rune
#

can i ask what main_end does?

#

i never used it before

humble girder
#

no fucking clue

worthy stirrup
#

oh

#

i dont know but it just doesnt work without it

humble girder
#

also you set your card ability name to blueprint and then set vars to a comparison for the same value

#

which is literally just true

worthy stirrup
#

the main_end btw

humble girder
#

there is no case in which vars = {card.ability.name == "Blueprint"}, isn't equivalent to vars = {true}

#

which makes me think there's a lot of copy pasting going on here that you don't understand the purpose of

daring fern
# worthy stirrup Im trying to make it so my joker copies to the left and not the right, but it st...

I'm pretty sure this is what you are looking for ```lua
loc_vars = function(self,info_queue,card)
card.ability.blueprint_compat_ui = card.ability.blueprint_compat_ui or ''; card.ability.blueprint_compat_check = nil
return {
main_end = (card.area and card.area == G.jokers) and {
{n=G.UIT.C, config={align = "bm", minh = 0.4}, nodes={
{n=G.UIT.C, config={ref_table = card, align = "m", colour = G.C.JOKER_GREY, r = 0.05, padding = 0.06, func = 'blueprint_compat'}, nodes={
{n=G.UIT.T, config={ref_table = card.ability, ref_value = 'blueprint_compat_ui',colour = G.C.UI.TEXT_LIGHT, scale = 0.32*0.8}},
}}
}}
} or nil
}
end,

humble girder
#

oh interesting

#

so main_end adds a set of extra ui nodes to the end of the uibox

manic rune
#

ohhh

#

that sounds useful

hushed field
crisp coral
#

then where is main_middle

humble girder
#

interesting, i might abuse this

hard flume
#

How do I make it so that only a certain suit can have a certain rank? Is that even possible?

worthy stirrup
hard flume
worthy stirrup
#

I think i have the code set up right

humble girder
#

you don't

#

your code is very far from correct

#

you're still checking for self in update instead of card

worthy stirrup
#

oh right

#

fuck

humble girder
#

second, there are two incompatibles in your box which makes me think that you're still somehow tripping vanilla code

manic rune
#

ive been making blinds, and i wonder if theres an equivalent to card.ability to store data that can be used and isn't reset whenever you re-enter the run?

manic rune
#

.

#

:3

daring fern
# worthy stirrup

Update should be like this. ```lua
update = function(self, card, context)
local other_joker = nil
if G.STAGE == G.STAGES.RUN then
for i = 1, #G.jokers.cards do
if G.jokers.cards[i] == card then other_joker = G.jokers.cards[i-1] end
end
if other_joker and other_joker ~= self and other_joker.config.center.blueprint_compat then
card.ability.blueprint_compat = 'compatible'
else
card.ability.blueprint_compat = 'incompatible'
end
end
end

humble girder
#

you missed a self

#

it's orange

manic rune
#

i could've swore i used that but it still resets, thanks

daring fern
humble girder
#

other_joker ~= self

#

that check is pointless by the way

manic rune
humble girder
#

but it's still checking a card against a center

hushed field
#

Actually. No vanilla blind stores information. I'm doing it by setting current.round variables for kino, atm

manic rune
#

-# fuck

humble girder
#

that's incorrect though Ice

hushed field
#

wait, is it?

#

That's good to know

humble girder
#

G.GAME.blind is your intended "card" for the current blind

#

look at stuff like fish, which store their state vars in self (which in vanilla is G.GAME.blind)

worthy stirrup
#

there still is two for some reason, even i dont see me calling for any of blueprints needs

manic rune
#

i tried storing into self.config before

humble girder
#

of course it kinda starts breaking apart if you want multiple blinds active at the same time

worthy stirrup
hushed field
#

I think I've misinterpreted Aiko, then. They're using the debuff table to store information, and that it didn't save/load properly

humble girder
worthy stirrup
#

I think i should edit

            card.ability.blueprint_compat = 'compatible'
        else
            card.ability.blueprint_compat = 'incompatible'
        end
manic rune
#

im sorry 💔

worthy stirrup
#

but idk what to edit but it gives me the vibe sometghings wrong

hard flume
#

(As in, whether I should do hooks or patches or none at all(

humble girder
#

sudden idea: blueprint update() could be eliminated if joker reordering evaluated a context (event driven rather than looping the array of jokers for every blueprint you own)

hushed field
#

Hmm, fish doesn't have any variables it needs to store right?

humble girder
#

it does

#

when a hand is drawn you can't differentiate in a vanilla blind between cards drawn as a result of a discard and cards drawn as a result of a hand played

#

so fish stores a prepped flag every time you play a hand to signal that cards drawn until the next discard are supposed to be drawn face down

hushed field
#

yes, but that's unflagged the moment the cards are drawn, no?

humble girder
#

it's not persistent state i guess

#

okay then look at crimson heart

#

same thing

hushed field
#

And no saves can happen during that state, so it never needs to save it's state

humble girder
#

saved into G.GAME.blind

#

and it needs to save/load the joker that is being debuffed to function correctly

#

yes, being debuffed is an attribute of the joker but crimson heart needs to understand which joker is being debuffed as it cannot pick the same one twice in arow

hushed field
#

Crimson Heart doesn't store the debuffed card, no? I though it flagged a card as debuffed on the card object, and then checks if there is currently a card being debuffed by it

humble girder
#

it does

#

it absolutely stores it

#

listen i had to reimplement every vanilla blind as an SMODS.Blind in baliatro, i know exactly how much state is being stored

hushed field
#

haha, I believe you, no worries, I'm just not sure how it saves it then? Is it just because the data that you tie directly to the object gets saved?

humble girder
#

everything under G.GAME is being saved

#

simple as that really

#

saving a run saves the G.GAME table and every cardarea under G

manic rune
#

is it for ur uhh deal with the devil or smt

hushed field
#

I've been operating under a very wrong understanding of the save system then! God, that's good to have someone correct me on

humble girder
manic rune
#

im glad i learned something from asking a dumb question :3

humble girder
#

it is for the deal with the devil

crisp coral
#

save system is wack

manic rune
#

true

#

i still gotta figure out how sounds work

#

ghhh

humble girder
#

i also had to hook every blind hook

manic rune
#

dear god

hushed field
#

I thought it reset instances of each object based on their configs, and only saved specific data, but I guess it makes sense that it can save then. Do you know if the save system interacts strangely with tables, then? Because for my custom blinds, I stored information in the debuff table, which didn't seem to save

humble girder
#

try baliatro sometimes this year (perhaps today)

crisp coral
#

naww the baliatro promotions

#

i'm losing so hard in this selfpromo game

manic rune
#

i need to put my mod's name in my nickname again

mental nacelle
#

i managed to do this (i cant figure out how to get blinds to reset from the second boss and not the first)

manic rune
#

there we go

humble girder
manic rune
#

fused all the four names together

crisp coral
#

the most I've done is putting L Corp. Myst as my nickname once

manic rune
#

that helps a lot

hushed field
manic rune
#

every single project moon agent in existence when they hear a game got a pm-related mod:

crisp coral
lament agate
#

how do you edit the logo appearing on the main menu

humble girder
#

this is what is being saved

#

oh hold on

#

you're onto something

crisp coral
#

onto what

humble girder
#

Blind:save() is very conservatively implemented

mental nacelle
humble girder
#

okay i take back everything @hushed field i'm stupid lol

#

but also this does raise an interesting question

#

i might contribute some blind state saving to SMODS to sort it

crisp coral
#

there's a function that checks for Blind type

#

hook to it

humble girder
#

i actually think there might be vanilla blind bugs hidden here if i looked deeper

crisp coral
manic rune
#

blud said that and never specified the question 💔

humble girder
#

seems like most of the blind data actually ends up being saved in card abilities

manic rune
#

but also

hushed field
#

Hahaha, good to know. I have no clue how the save system works so if you tell me something does save, I'll assume I've just implemented things wrong 😋

manic rune
#

does that mean theres no consistent way to save stuff for a blind rn?

#

unless through G.GAME, but that probably requires everything to be reset whenever you face the blind again

humble girder
#

so here's the thing right

crisp coral
#

mhm

manic rune
#

-# god damn it

hushed field
#

Easiest solve is just add the base info onto the blind, and have it create a table for it in G.GAME.current_round that it'll alter and check

crisp coral
humble girder
#

the best thing you can do is you can do like G.GAME[G.GAME.blind.config.blind.key] = {my_state_var1 = 'foo'}

#

store it in a keyed table under G.GAME

manic rune
#

i have no clue where the save funcs in question would be :3

humble girder
#

it is guaranteed to save

manic rune
#

ah

#

hm

crisp coral
#

Blind:save and Blind:load

humble girder
#

just make sure you hook set_blind to reset that table

manic rune
#

-# oh fuck that exists?

humble girder
#

much simpler than overriding Blind:save and Blind:load imo

crisp coral
#

girl

manic rune
#

man

hushed field
#

Oh, that brings up a question on my end, what's the logic between what is stored in G.GAME[x] vs G.GAME.current_round[x]?

humble girder
#

current_round is reset every round

#

G.GAME is not

manic rune
#

wouldnt G.GAME.current_round be more convenient in this case?

humble girder
#

technically yes

manic rune
#

since theres no need to reset stuff afterwards in set_blind

humble girder
#

sort of

#

it is for vanilla use cases

manic rune
#

boy

humble girder
#

i'll absolutely hate you when i have to patch around it for deals with the devil but you can do it

manic rune
#

;3

crisp coral
#

well however you save your blinds you can't really save specific cards

manic rune
#

i guess i will do your approach then, i will try my best to avoid conflicting other mods

crisp coral
#

you still need flags on the cards instead

manic rune
#

damn

#

i havent look into flags yet

crisp coral
#

just set stuff in card.ability

humble girder
#

card.ability is saved as-is

#

it's saved so as-is that if a function ends up in card.ability the game crashes on save

hushed field
manic rune
#

ohhhh

#

icic

humble girder
crisp coral
#

it might only be resetting specific keys

manic rune
#

i already did that, but i thought flags r a different concept

humble girder
#

as most things in balatro, it's not cleanly reset

#

it's literally resetting each key one by one 🙂

hushed field
#

Ofc hahaha

crisp coral
#

swag

manic rune
#

wha

#

💔

crisp coral
#

balatro is a if it works it works game

humble girder
#

so you'd still need reset logic bepis

manic rune
#

i wonder why "core" is dark

humble girder
#

cry_ dansgame

manic rune
#

:3

manic rune
#

this should do the work righte

humble girder
#

yes

tall wharf
#

fuck

#

I've accidentally ordered

#

something from the store that i already left lmao

manic rune
#

nice

tall wharf
#

WDYM NICE

#

oh lmao

#

I'm stupid

#

I'm in dev

humble girder
#

nice

manic rune
#

nice

mental nacelle
reef belfry
#

Im suffering the consequences of making a detailed joker again

wintry solar
#

All the vanilla blind stuff is very hard coded iirc

#

I might do a blind update for smods to allow for a lot more options

manic rune
raw geyser
#

How do you add a custom drawstep?

wintry solar
#

Just put what would have been in the draw function in it

humble girder
#

baliatro already adds a bunch of extra triggers for blinds so you can do more

#

i wanted to contribute that to SMODS too

#

but i'm waiting for aure to knock out blind contexts and so i can understand what he's refactoring there

hushed field
#

are blinds receiving even more contexts than the last update gave 'm?

manic rune
#

so far blind calculate has been very friendly to beginners like me

humble girder
#

idk are they just done?

#

maybe i have missed that they're just done

manic rune
hushed field
#

yeah I meant calc support generally

manic rune
#

oh yeah, baliame, how does context.modify_scoring_hand work?

#

its not documented so idk how to get it workin

humble girder
#

i assume whatever calcs we have right now correspond with the blind functionality (recalc_debuff, set_blind, press_play, etc.)

#

so we're probably not getting more calcs unless we get more blind hooks

#

i do intend to add more blind hooks

manic rune
#

man, i sure love undocumented features

humble girder
#

actually

#

i do have a sort of an idea

manic rune
#

go on, im listening

humble girder
#

it runs on each G.play card, and you can return {add_to_hand = true/false, remove_from_hand = true/false} to make that card storing/not scoring

#

but it seems like it only runs on cards in play so you can't do fun stuff like i did with splatter

#

-# try baliatro on the next day ending with 'y'

manic rune
#

mmmm

humble girder
#

quite possibly one of the strongest jokers in my set

manic rune
#

it is

#

scoring 10 cards at most is insane lol

#

and i imagine those scored cards in hand also function as cards in hand?

#

like, steel cards would still work

humble girder
#

yes, those cards are both scored and held in hand

manic rune
#

jesus

humble girder
#

not as big of an advantage as it sounds

manic rune
#

gold ticket would go crazy

humble girder
#

it's an upgraded joker, it's quite hard to force specific upgraded jokers

manic rune
#

upgraded jokers??

#

:3 i shpuld really check out your mod

humble girder
#

it's a postcard effect

#

upgrades a compatible joker

#

inspired by bazaar, tbh

#

only common jokers have upgrade paths though

wintry solar
#

Yeah I think it only runs on cards you play

#

It’s easy to add cards in hand to scoring though

humble girder
#

some of them are just strong

manic rune
humble girder
#

some of them can really go off the rails

manic rune
gray apex
#

Was testing a new Joker, and... guessed the 1 in a 1000 chance first try...
(The min and max update dynamically based on your guesses)

manic rune
#

cavendish broke

humble girder
manic rune
#

baliame, i thought my gacha code broke too

#

like, i got the 0.3% twice in a row

#

but turned out its just the seed i got is cracked as hell

hushed field
#

I've had a 1/4 chance trigger 16 times in a row during testing, and spent too much time bugfixing something that wasn't broken

manic rune
#

💔

humble girder
#

okay so

#

maybe lua's rng implementation just sucks ass

manic rune
#

you always have insane luck when you are playtesting your mod

wintry solar
#

# Polydactyly
[[patches]]
[patches.pattern]
target = 'functions/state_events.lua'
match_indent = true
position = 'before'
pattern = '''
-- TARGET: adding to hand effects
'''
payload = '''
local ortalab_poly_jokers = SMODS.find_card('j_ortalab_polydactyly')
if next(ortalab_poly_jokers) and (next(poker_hands['Straight']) or next(poker_hands['Flush'])) then
    for i=1, ortalab_poly_jokers[1].ability.extra.cards do
        table.insert(final_scoring_hand, G.hand.cards[i])
    end
    SMODS.calculate_effect({message = localize('ortalab_polydactyly')}, ortalab_poly_jokers[1])
end
'''

This is the patch I have that does it in ortalab

manic rune
#

awww, we need a patch for that? 💔

wintry swallow
#

Does anyone know a mod that can choose jokers before starting a game? I want to use it for testing several jokers at once

humble girder
#
[[patches]]
[patches.pattern]
target = "functions/state_events.lua"
pattern = '-- TARGET: adding to hand effects'
position = 'after'
payload = '''
local extra_cards = 0
for i, joker in ipairs(G.jokers.cards) do
    if not joker.debuff and joker.config.center.additional_scoring_cards and type(joker.config.center.additional_scoring_cards) == 'function' then
        extra_cards = extra_cards + joker.config.center:additional_scoring_cards(joker)
    end
end

extra_cards = math.min(extra_cards, #G.hand.cards)

for i = 1, extra_cards do
    table.insert(final_scoring_hand, G.hand.cards[i])
end
'''
match_indent = true```

generic additional_scoring_cards center implementation
manic rune
#

use debug plus

#

it allows you to spawn anything

humble girder
#

also lmao i remember i marked this experimental and then it just worked perfectly first try

#

i felt like the game might have something to say about G.hand cards scoring, nope, it's all okay

gray apex
#

Ah, yeah code was bugged

humble girder
#

called it

gray apex
#

It only needed one digit in the correct spot

#

Funny it happened thrice tho lmao

daring fern
#

How does one make it so something only triggers once no matter how many copys of the joker there are?

wintry solar
#

Yeah, cards that are “scored” dont actually care where they are

#

It means making hand cards score is remarkably easy

plush cove
# plush cove
poll_question_text

which one

victor_answer_votes

6

total_votes

6

victor_answer_id

1

victor_answer_text

specific table

rain slate
#

like G.GAME.your_joker_triggered and then like ```lua
if not G.GAME.your_joker_triggered and other_conditions then
G.GAME.your_joker_triggered = true
-- do the stuff
end

native zinc
#

one full page yall

hushed field
#

Good job!

#

Oh no wait sorry

#

Bood Bob!

native zinc
#

B B B B B bb b

rancid bridge
native zinc
#

alas there are actually 17 jokers but two of them are on Commented for the Forseeable Future because they're blueprints and dont work with retriggers

hushed field
#

I need to figure out how I want the synergy messages to work 🤔 the current system is super annoying.

#

As I'm typing this I'm realizing I can just limit it to one message per joker and just have it display an xN thing behind it

#

Oh ugh I also still need to do the config UI change because I have too many config options at this point

native zinc
#

i need to make a markdown list of jokers asp

#

might as well do it now

hushed field
#

Markdown?

#

For the readme on your git?

native zinc
#

yeah\

#

alternatively i make a google sheets or something

normal crest
#

Or put your mod in the wiki

hushed field
#

I think oinite just added a localization parses, so it really is dead easy to add your stuff to the wiki now

normal crest
#

Oh? How does that work

stiff locust
#

i need a sanity check does anyone know how to change the rank of a card

normal crest
#

SMODS.change_base

stiff locust
#

is that supposed to crash

normal crest
#

What's the crash?

stiff locust
#

assertion failed

#

card2 exists i made sure of it

hushed field
normal crest
#

Unless card2 isn't a playing card

stiff locust
#

card2 should be a playing card
for index, card2 in ipairs(context.full_hand) do
tis defined here

normal crest
#

It looks like change_base returns the card, and in your case the card is somehow nil

#

But not before it tries to change the rank

#

So I'm not sure what's going on

stiff locust
#

removing the assert makes it work

#

i don't know why the assert was there

normal crest
#

That's odd

native zinc
#

assert for other.card

#

and debugging

manic rune
#

almost 1k lines now, yipee

rain slate
# stiff locust i need a sanity check does anyone know how to change the rank of a card

I just referenced the strength code to make a utility function that does it for me (argument is a number from 2-14) ```lua
function Card:set_rank(new_rank)
local suit_prefix = string.sub(self.base.suit, 1, 1)..'_'
local rank_suffix = new_rank

if rank_suffix < 10 then rank_suffix = tostring(rank_suffix)
elseif rank_suffix == 10 then rank_suffix = 'T'
elseif rank_suffix == 11 then rank_suffix = 'J'
elseif rank_suffix == 12 then rank_suffix = 'Q'
elseif rank_suffix == 13 then rank_suffix = 'K'
elseif rank_suffix == 14 then rank_suffix = 'A'
end

self:set_base(G.P_CARDS[suit_prefix..rank_suffix])

end

manic rune
#

it doesnt affect anything but

#

this part is not that necessary

rain slate
#

ik

manic rune
#

i just noticed that

rain slate
#

I think for some reason the ten has like a letter

manic rune
#

does balatro not like "10" and use T instead

#

:3

#

wtf

rain slate
#

that was just in the strength code

manic rune
#

💔

rain slate
manic rune
native zinc
#

because

zealous glen
#

Has anyone here added a custom context with automatic calculation

native zinc
#

D_9
D_10
D_J
D_Q
D_K
D_A

manic rune
#

i mean, i guess its to make it consistent

rain slate
#

the horror

native zinc
#

i bet with 100% certainty that either localthunk wanted a nice list or it actually matters in some horrid spaghetti code

#

ig also explain why ace is id 14

#

its to make it higher than kings

#

i think 1 is stone cards?

#

¯_(ツ)_/¯

rain slate
manic rune
#

nop

native zinc
#

stone cards are just nothing

#

nvrm ind

rain slate
#

stone cards are actually funny

#

cuz they have a suit and rank

zealous glen
rain slate
#

it just doesn't get used

native zinc
#

ig there's straight up no id 1

native zinc
rain slate
#

well

#

in regular circumstances

zealous glen
#

Stone Cards are negative

native zinc
#

oh

#

clever

#

but still no id 1?

zealous glen
#

@rain slate This (although that version shouldn’t have any animations anyways)

#

I tried to fix it and add an animation (when I tied it to a Joker) but I got nothing

zealous glen
#

Although I’m not sure if that’s a vanilla bug or a SMODS bug

#

I could only find reports of it in modded versions of the game

native zinc
#

just tested did not work

#

idk

zealous glen
#

Tested what

native zinc
#

i just converted a straight into stones with tower

zealous glen
#

No not like that

#

Stones have random negative IDs

native zinc
#

i assume the bug is doing something with the id

#

oh interestingly bad idea

zealous glen
#

But if those IDs are sequential they could be Straights I think

native zinc
#

painful

zealous glen
#

Interesting

native zinc
#

it doesnt go below zero

manic rune
native zinc
#

it's effectively just +4 hands/discards with a tossup on whether you actually get hands or discards

humble girder
#

i mean technically burglar turns 3 discards into 3 hands and it's a common

manic rune
#

thats an uncommon

humble girder
#

this is somewhat more flexible but at the end of the day it's an economy joker on par with golden joker

manic rune
#

not a common 😭

humble girder
#

right, uncommon, w/e

manic rune
#

and thats exactly my point

this seems better than burglar by a long (?) i forgot the idiom

native zinc
#

ig i can just knock it down to +2/+1

humble girder
#

here's my counter argument

#

having +1 hand is one of the weakest stats in the entire game

manic rune
#

i will assume that playing 1 hand -> +1 discard, using 1 discard -> +1 hand
can you imagine how broken that would be if this hits High Card

humble girder
#

not many jokers scale well off of hands played, the value of a leftover hand is $1

#

lmao mail-in rebate already effectively breaks the game without any other joker

humble girder
#

to-do list hitting high card is a 1 in 10 and otherwise it's wasting a joker slot for the most part

manic rune
#

play 1 card, +$4
discard 1 card to get another +1 hand

repeat until you go through your entire deck, then win the round

native zinc
#

play 1 hand -> +1 discard -1 hand

humble girder
#

and even if you high-roll it, to-do list converts $1 into $4 which is on par with a gold seal

native zinc
#

use 1 discard -> +1 hand -1 discard

#

effectively +1 hand -2 discards

humble girder
#

i'm sorry bepis but you're way off on the balance of this card, it's actually really weak for an uncommon

manic rune
#

i could also argue that it goes really well with hanging chad + lucky cards/cards with gold seal too

#

theres nothing keeping you from just playing your entire deck

humble girder
#

there is a lot that keeps you from playing your entire deck

humble girder
#

with this joker playing 1 hand costs you 2 hands

manic rune
#

wait

#

OHHHHHH

humble girder
#

yes

#

use your brain pls

manic rune
#

i thought it meant playing a hand gives you a discard, and vice versa

native zinc
#

even when i have 9 hands here in reality i really have 5 if i dont discard further

manic rune
#

if its playing a hand -> reduces 1 hand, increases 1 discard then yeah, ig its fine

native zinc
#

i am on blue deck

#

that is a bad image

#

imagine 8 hands instead and 4 hands in reality if i dont discard further

humble girder
#

i actually think this is really weak for an uncommon

#

i can't think of a use-case

manic rune
#

true

#

i had the wrong impression 💔

humble girder
#

other than cashing in on hands

#

it's pretty good with green deck is about it

native zinc
#

my current use for this joker is uhhh ... fishing for royal flush and failing once in every 15 blinds

manic rune
#

💔

#

nahhhh

manic rune
#

im never taking that honestly

#

😭

manic rune
zealous glen
#

I’m just making a joke at the image

manic rune
#

:3

#

nah

#

i wont let you disrespect the joker...

humble girder
#

to do list more like to il etpaper

native zinc
#

unironically i cant believe that the joker named "Balancing Act" is the only joker that ive posted here that has a balance discussion spawn from it

manic rune
#

i mean

#

its truly a balancing art we are engaging in here

zealous glen
manic rune
#

pis off

#

💔

humble girder
#

i honestly find it funny that we'd ever bring up a joker as bad as to do list in a conversation about balance when mail-in rebate exists

manic rune
#

-# that was a joke, please dontt ake it seriously eofam

zealous glen
#

Actually no that’s not how I wrote it

#

him i guess off*

manic rune
#

potential joker

humble girder
#

thinking

#

thinking really hard

#

still thinking

#

thinking

#

...nope.

zealous glen
#

thunking

manic rune
#

:( i will protect this joker even when im killed for it

#

my potential boy WILL get a W

native zinc
#

on white stake too. im a good player trus t me

#

death by 100 dollars and 50% of the required blind score

humble girder
#

1 in 10 (12?) to hit a "good" hand, and you gain $3 per extra hand played effectively, to do list is actual garbage and someone is doing cryptid levels of broken shit for it to have a measurable effect on balance

normal crest
#

you just gain 2 dollars per hand played

#

if you hit the right hand

humble girder
#

$3, but yes

#

(it's $4 at base value)

normal crest
#

Oh I thought it was 3

humble girder
#

i''ve already accounted for losing $1 because you played a hand

normal crest
#

It's not terrible IF you actually hit a good hand

native zinc
#

i hit rebate more often when i throw it in haphazardly as a negative and accidentally play the right hand without looking at it

normal crest
#

More money is always a good thing

humble girder
#

the only good hand is high card, maybe an argument can be made for pair

#

at best it's a 1 in 6

manic rune
#

i have an idea: i want my jokers to have effects that are outside scoring purposes too, but at the same time, i dont want to abuse the page mechanic too much:

do you think its a good idea to convert this description to something else when you are not in a blind, and converts it back when you are? but at the same time, it will make it so you dont actually know its scoring effects outside blinds, so maybe its not a solution

humble girder
#

in that round you earn, let's say you have burglar, $21 extra. mail-in rebate with 4 discards is effortlessly $10 per round played

native zinc
#

i've unironically forgotten about the discard and hand tags

manic rune
#

...eh, i will just add another description page for that one

native zinc
#

wtf does Balancing Act do to them

#

uh

humble girder
#

not much

gray apex
humble girder
#

skipping a blind is literally never a good play (except maybe a select few tags in ante 1)

#

you never need to worry about discard/hand tag balance

manic rune
#

i have the repeat loop to make sure that it will loop back to 2 if it overshoots

normal crest
manic rune
#

but is that the best way to do that

#

im unfamiliar with math.(stuff)

normal crest
#

and you do have more hands than discards to start with without any other jokers

manic rune
#

so maybe theres something to optimize it?

humble girder
native zinc
#

oh i was wondering why i didnt get any discards for my hand, i literally am out of juice and need to discard

#

impressive

normal crest
#

they're both heavily affected by rng so I think they're pretty similar

manic rune
#

i feel like how balanced a joker is should be based on whether if you find it in a shop, do you want to buy it or not

i personally usually buy to-do list when it appears for e-con, not sure about others' opinion on that though

native zinc
#

i would buy a lot more things over to do list

humble girder
native zinc
#

unironically i would buy golden over to do list

humble girder
#

^

#

same

manic rune
#

fair, its more consistent

humble girder
#

golden joker is far more reliable

manic rune
#

but UNSEEDED balatro runs dont give you the option to just freely choose what joker you will pick, i still think to-do list is a solid option for e-con

humble girder
#

to-do list risks being money negative

#

it may be the correct play to not even buy it

native zinc
#

to do list is awful for its cost imo

#

usually i try to get a lot of interest before even buying anything

humble girder
#

i'd buy golden joker before ante 3 but not to do list

manic rune
#

doubt it, dont you get to see the hand to-do list is choosing before buying it?

if the hand is what you are looking for, you can buy it, play that hand, and sell it, isnt that a profit in which case

native zinc
#

most of the time it really doesnt do that

#

and okay to do list is like 4 dollars

#

no shenanigans i have 4 hands 3 discards

modern kindle
#

Good schmorning chat

native zinc
#

to do list basically gives 3 dollars profit due to hands

manic rune
#

yeah but if it hits a good hand (high card, pairs)

in the next blind, you can get a considerable amount of money

normal crest
native zinc
#

it's like 5 dollars profit

#

high card it would be 8

hushed field
#

i have to be missing something incredibly fucking obvious. This joker checks how many pairs you have in hand, then gives 50 chips for each. Except #_ranks is always empty.

humble girder
brazen tusk
#

for those who wonder if stickers can go on other cards, yes

humble girder
#

i'm sorry, you can't close the gap with whatever RNG arguments you have

hushed field
#

(I know that there's a neater way to write the check if the item exists, but I thought I'd gotten the syntax wrong, so resorted to this, to find it that wasn't the issue)

humble girder
#

to do list on average does nothing for several rounds while mail in rebate generates money for investing resources that otherwise don't generate money

normal crest
#

evaluate_poker_hand i believe

#

or smt like that

manic rune
#

nop

-3 = -$3 at payout
3 high cards/pairs = $12, if you havent reached the max limit of uhhhhh forgot the term ($5 = +1$), its $14
=> $10

and nothing's preventing u from just not buying it when it hits a bad hand anyways, so u can just ignore it when it hits a bad hand in shop, and buy it when it hits a good one

hushed field
native zinc
#

you lose all 4 hands from playing the three high cards

manic rune
#

right, so its $10

native zinc
#

so it's 11 - 4 = 7 dollars

#

.

normal crest
#

so if you have 4 2s it'd only be one pair

humble girder
normal crest
#

and it definitely works with cards held in hand

hushed field
#

my code, I think, should to. But if you have a 2,2,3,3,5,5,K you'd be holding in hand, would it return the fact that there are 3 separate pairs in hand present?

manic rune
hushed field
#

ah, great

#

I'll use that than

normal crest
#

You can look at pocket pair in paperback as a reference

native zinc
manic rune
#

2

hushed field
#

still, baffled by why that array doesn't store anything. I feel like I was going crazy, checking that. I must be missing some super simple lua syntax, somewhere

manic rune
native zinc
#

you lose the $4 by buying it

hushed field
#

Thanks, srockw! I'll solve it that way

native zinc
#

so that's $8

#

which is 1 dollar interest

manic rune
#

you also gain $2 from selling it though 🤔

native zinc
#

ah pain

#

you lose $4 from buying it, you lose $4 from hand money, you gain $12 if its highcard, gain $1 interest, gain $2 sell

normal crest
#

you should've used pairs

zealous glen
native zinc
#

that's $7 profit

manic rune
#

again - its $2 interest

native zinc
#

so you sell it during the blind

manic rune
#

you are gaining $12 from doing the high card

#

that is already after losing money from buying

zealous glen
native zinc
#

is that assuming that my winning hand is also high card

#

wh

manic rune
#

oh, true

native zinc
#

it's $12 not $16

manic rune
#

its still hitting the $2 interest mark if you are selling it after using the 3 hands though

humble girder
#

can we please say out loud that to-do list is a terrible joker that has one super meh highroll which is so bad you'd still be better off economically finding a hermit and it's literally not worth discussing it from a balance perspective

manic rune
#

.......................

native zinc
#

yeah that's a lot of work

#

oh hey nice

manic rune
#

i

normal crest
#

I'd say to-do list is not as bad as you make it sound

manic rune
#

was testing a blind

native zinc
#

it's always the mod testing runs

manic rune
#

💔

#

THIS IS THE SECOND ONE I GOT TODAY

#

AT ANTE 1

#

💔

normal crest
#

Sure there are better options, but that doesn't mean it's worthless

zealous glen
manic rune
#

of course its him

#

what the fuck

hushed field
native zinc
#

also to do list sucks for the nontrivial reason that if you play a secret hand it gets added to the pool iirc

#

which does lower the chances if you have those kinds of builds

#

yeah okay it does do that

#

why .

zealous glen
#

what do you mean

manic rune
#

why would you use to-do list when you reached a point when you unlocked a secret hand though, thats the question

native zinc
#

true

turbid maple
#

I don't like to-do list that much but I think it's acceptable

manic rune
#

im so frustrated over this

#

💔

native zinc
#

i think the worst econ joker is

#

matador

humble girder
#

but think about the HIGHROLLS

#

with the MATADOR

#

when you land it right before a suit debuffing blind omg

tawny narwhal
native zinc
#

sobbing

#

i should nerf this at some point in hindsight

manic rune
#

ehhhhhh

#

not worth nerfing

native zinc
#

lets go gambling with the J 10 9 8 7

manic rune
#

its already as inconsistent as it is, 1 in 10 for just $10 💔

#

you could argue that oops all 6s increases the chances of which, but lucky cards exist

native zinc
#

think. of the oops potentia

tawny narwhal
native zinc
#

aww youve already thought of the oops potential

humble girder
native zinc
#

idk i think i've done decentish with balancing

humble girder
#

it's basically business card

#

it's $1 per card played for 4 not that good ranks

#

vs business card being $1 per card played for 3 good ranks

native zinc
#

just that i end up picking this and get like 15 dollars in one hand in some round and go "waoh..."

#

it is much better on abandoned

humble girder
#

yeah but you expect larger dry spells than with business card so shrug

manic rune
#

do we like the idea of unique small/big blinds chat

humble girder
#

not below gold stake lol

native zinc
#

dang most of these jokers are really less/more consistent X

manic rune
#

honestly

#

thats fine

native zinc
#

thanks ben for obelisk 2

humble girder
#

obelisk is a very good joker though

manic rune
#

its a very fragile enemy in hsr, but i think it would be fun to encounter fodder enemies every once in a while for small blinds

hushed field
#

bepis, develop my biome system for me so that you can have persistent effects in the blind that work as the fodder enemies

manic rune
#

biome what

hushed field
native zinc
#

i have yet to use this guy in any meaningful capacity

#

the deal of all time

normal crest
hushed field
#

I wanna set up a biome system that adds modifiers to antes, as a separate mod from kino, though

humble girder
#

implement them as out of pool blinds

#

and steal my pact code

normal crest
#

might be the CRT effect

native zinc
#

yeah its way too small

#

its bc im not on fullscreen

manic rune
#

you can just make flavor text inactive so that it wont look off even when its big

hushed field
#

once I actually start on that mod I'll definitely check your pact code, baliame, haha

native zinc
#

they're more readable in full

manic rune
#

im kinda

next timber
manic rune
#

planning on doing smt similiar to that

#

but i havent thought about modifiers to antes themselves though

humble girder
manic rune
#

so maybe our ideas are not the same :3

next timber
#

theres no way 1x game speed is actually this slow wtf

manic rune
#

what function does it run when a new run is started

hushed field
manic rune
#

definitely not :start_run(), since that runs when you re-enter an already existing run too

humble girder
#

i'm hooking, not patching

#

it's extra stuff added at the end of normal blind stuff

normal crest
#

just add a check for not saveTable if you're patching

humble girder
#

start_run, not saveTable, yeah

manic rune
#

-# oh

#

:3 im dumb, thanks

next timber
#

ok so it seems that when using G.GAME.dollars in calculate, it uses whatever value the money was at when scoring began. Is there any way to pull the current value of G.GAME.dollars?

normal crest
#

using an event

next timber
#

no other way?

native zinc
#

nada

humble girder
#

there's a dollar buffer somewhere

#

don't remember where

#

that ease_dollars writes

#

i think

next timber
#

ideally i need this calculate to return a mult thats calculated using the current dollars value

zealous glen
normal crest
#

hmm

native zinc
#

dan g...

normal crest
#

if you can't make it work with the dollar buffer baliame mentioned you might have to SMODS.calculate_effect

next timber
#

ok now time to find the buffer ig

normal crest
#

common_events.lua probably

zealous glen
#

Also the buffer doesn’t get updated automatically

normal crest
#

ease_dollars sounds like a common event to me

zealous glen
#

So if a mod adds effects that change the amount of money during scoring

#

It doesn’t necessarily update the buffer

manic rune
#

this should work then, right?

zealous glen
#

The modder needs to buffer it

manic rune
#

it should run only once when a new run is started

normal crest
#

saveTable is not defined there

manic rune
#

crap, what am i supposed to check

normal crest
#

this what game does

manic rune
#

hmmm

#

so args.savetext, right?

zealous glen
#

Also each Ante

hushed field
manic rune
#

oh

#

i gotta check the utility page then

zealous glen
#

Check out the Castle example

#

In example mods

normal crest
#

that's called kinda in the middle of the start_run function tho

#

if you want smt to happen after everything you'll still want to hook

zealous glen
quartz ravine
#

Hi dudes, I cannot figure out this context window

If played hand is Flush, give +3 mult for each card

zealous glen
#

Check out how Bunco or my mod do it

manic rune
#

not the background color, just uhh

something i want to set to G.GAME when a new run starts

humble girder
next timber
#

ok no ease_dollars just does G.GAME.dollars = G.GAME.dollars + mod so idk

normal crest
next timber
#

waut nvm

zealous glen
#

It doesn’t automatically update the buffer

next timber
#

it adds that to the event queue

zealous glen
#

The buffer needs to be updated manually

next timber
#

shiiiiiit

hushed field
normal crest
#

you'd just check if run_start then

hushed field
#

there's Kino and Jokersets still in my event queue first, haha

manic rune
#

hmmmmmmmmmmmmmm

zealous glen
next timber
#

it doesnt look like there is a buffer for money it just adds the change to the event queue. thats. funn

manic rune
manic rune
zealous glen
#

Check out cards that add money during scoring or that use the value of money during scoring

zealous glen
manic rune
#

yeah thats what i meant

humble girder
minor furnace
#

anybody know what cardarea the collection pages use?

zealous glen
#

They use collection cardareas

minor furnace
#

that would make sense

zealous glen
manic rune
#

is itttt this or SMODS.current_mod.reset_game_globals = function()..?

#

or are they the same

#

:3

next timber
#

it looks like vagabond just checks G.GAME.dollars

manic rune
#

i think thats just a lack of lua knowledge on my side, honestly

normal crest
humble girder
normal crest
#

just it has castle logic inside

hushed field
# humble girder i mean okay technically you can implement it as cards instead, it all depends on...

I think blinds can do whatever jokers can, but not the other way around, currently, so blinds would definitely be the way to go. My current idea, which I haven't thought through much, was to set it up as a new object type that is channeled by the blind objects, similar to the set up I'm using for Spellcasting in Kino. Probably wouldn't be that simple to convert that, though, as these effects would be passive, and spellcasting is active

humble girder
#

i don't think blinds get contexts, or is that what aure did in blind calcs?

hushed field
hushed field
#

they can do it, I assume, but not as easily

humble girder
#

by default jokers don't act on debuff_hand and recalc_debuff

#

they could but both require patching

next timber
zealous glen
hushed field
#

I might start to mess around with it sooner rather than later, just because I'm considering making the showdown blinds for Kino ones that also do things during the small and big blind

normal crest
zealous glen
#

Notably it's not the only buffer in the game

humble girder
#

that figures out if a card should be considered debuffed, but that's a bad pattern here

#

since the game during recalc_debuff asks the blind if it thinks a card should be debuffed, so the pattern would be to also ask the jokers

#

not have the card report it's debuffed based on what jokers you have

#

or i guess can_calculate() could call back to jokers which would be incredibly expensive since you're trading an O(1) cache (card.debuff) for an O(n) live check

manic rune
zealous glen
#

I considered passing the context to can_calculate

manic rune
#

it works :3

zealous glen
#

So that it itself could calculate on the card

normal crest
minor furnace
#

how would I check if the collection is currently open?

manic rune
#

is it possible to add a button to this area

normal crest
#

but that might only be the case if there are cards visible

#

i'm not entirely sure

manic rune
#

i can probably attach a button to that

normal crest
#

maybe create_UIBox_blind_choice in ui_definitions.lua

manic rune
#

gotcha, i will check that :3

#

thanks

quartz ravine
#

Attempt to use a nil value at self.extra.odds

I will never remember that this is nil in calc for smods. I should just remap self = card

hushed field
#

Every time I think I'm ready to push the new updates, I discover something I still need to do

minor furnace
normal crest
#

oop

#

maybe check the length of it?

minor furnace
#

different approach, is there a way to tell what cardarea a card is currently in?

#

from the card itself

normal crest
#

card.area

minor furnace
#

that will probably work

quartz ravine
#

hi guys, I feel like this is just too weak or slow. How would you improve this card?

#

I think if Trousers gains +2 mult per pair, then this should gain +5 mult

brazen tusk
#

really cute art btw

#

i love chocobos

tall wharf
#

i think

quartz ravine
#

here is like half of the jokers, just to share

brazen tusk
#

those all look great!

digital niche
#

im so slow i just realized that "atlas" isnt a madeup word for codding used in balatro its an actual word

#

its just a resolution variable basically

lyric blade
#

So guys, I have a little problem. It's not really important, it does what I want, but not the way I want it.
This piece of code for a joker retriggers a lucky card until it gets lucky (Gives either the mult or the money). And, it works! But the strange thing is:

  • It first does the card eval status text as many times as it will retrigger BEFORE the card gets even scored
  • The retriggers are ... inverted? The first score of the card is lucky, while all the following scores are not

This makes it all look very very strange, so... does somebody have an idea of what I am doing wrong? Or how to optimize it? Like it's ok, but just very strange. Especially the first problem is pretty uncomfortable. Maybe I should put the card_eval_status_text somewhere else?

hushed field
lyric blade
brazen tusk
#

what we think of this effect? disintegration would be a status or something that destroys the card in the alotted time, 3 hands might be too quick but idk
-# (also art is WIP)

runic pecan
#

How do I call the "Foo" pool table if I hypothetically followed this part of smods wiki?
My guess is G.P_CENTER_POOLS.Foo but I want to make sure before proceed.

digital niche
#

where in the balatro archives are the tarot cards?

hushed field
brazen tusk
lyric blade
minor furnace
#

what if instead of figuring out why the sprite is wrong before the card has been discovered, I just make it discovered by default to bypass the issue

brazen tusk
lyric blade
brazen tusk
#

depends how i end up getting it to function but im thinking of just applying a perishable sticker instead

lyric blade
#

I see

brazen tusk
#

which would work on eternal jokers

digital niche
#

when making an edition, where do i say what it does?

lyric blade
digital niche
#

tyty

#

editions is either the joker ones or the card enhancements or is there a different thing for enhancements that im not seeing?

digital niche
# brazen tusk editions

no yeah ik, just wondering if in the code there is a difference because i didnt find a "SMODS.enhancement" part in the example part

digital niche
lyric blade
#

There exists a SMODS.Enhancement