#💻・modding-dev

1 messages · Page 313 of 1

wintry solar
#

What’s the effect?

sonic cedar
#

For some reason my sticker's applying to a card a joker generates? Like I give it to 8 Ball and the sticker applies to the consumable it makes. How do I make it not do that? Also does the same thing when I copy playing cards in my hand with Debug, each one gets the sticker despite the original not having one

runic pecan
#

I need help.

#

It copies Xmult joker, though.

broken rivet
#

how would i debug a blind? i need a way to just set myself to ante 8 and force it to appear since it's a finisher

sonic cedar
#

just go to ante 8 and reroll the boss

broken rivet
#

oh

zealous glen
#

hovering over

#

The Blind

sonic cedar
#

oh true spawn

broken rivet
#

ah

sonic cedar
#

i forget that's not just cards

timid star
sonic cedar
#

holy shit 900n1

timid star
#

ya

broken rivet
#

or is there some shortcut for that in general

sonic cedar
#

you can reload atlases but youd reload the game to reload mods

zealous glen
sonic cedar
#

or alt +f5

broken rivet
#

ah

willow plinth
#

vibe coding in balatro modding is really brainrot, don't try it guys

timid star
willow plinth
#

27 prompts deep and still crashing, lil bro will get insulted by me in a minute

#

i might actually have to learn lua :/

timid star
#

is that being fed to ai

shell timber
#

...

#

you're the person who forked a bunch of mods?

willow plinth
#

yes, why?

#

trying to make a pack, but rn i just play around with balatrobot and can't get it to run

brisk rose
#

People will be pissy about most things ai related here. My take is just it won't get you far

willow plinth
#

i'm making fun of it

brisk rose
#

Fair enough. I'm fine with ai and in my limited modding projects I do use it to automate menial tasks like writing the mod list in my Readme for my modpack. I'm really just rambling nonsense ngl

formal parrot
broken rivet
#

well i found a bunch of other issues so far
firstly this is debuffing jokers as well as playing cards, but it's only meant to target playing cards. i'm guessing is_suit() still works on jokers for some reason
the intended effect is it only leaving one suit not debuffed, and changing which one isn't debuffed each hand. currently it isn't changing which suit is spared from the effect, and as i said also targeting jokers

local playableSuit = "Spades"

return {
    name = "af_final_wand",
    key = "final_wand",
    
    atlas = "chips_atlas",
    pos = {x = 0, y = 0},

    dollars = 8,
    boss = {
        min = 8,
        max = 10, -- does nothing
        showdown = true
    },
    boss_color = HEX("E34234"),
    discovered = true,

    -- stole this from castle lol
    drawn_to_hand = function(self)
        playableSuit = "Spades"

        -- find valid cards to target
        local validCards = {}
        for _, v in ipairs(G.playing_cards) do
            if v.ability.effect ~= "Stone Card" then
                validCards[#validCards+1] = v
            end
        end

        -- set the suit if valid targets exist
        if #validCards >= 1 then
            playableSuit = pseudorandom_element(validCards, pseudoseed("vermillion_wand")).base.suit
        end
    end,

    recalc_debuff = function(self, card, from_blind)
        return not card:is_suit(playableSuit, true)
    end
}
sonic cedar
#

does anyone know where i can find every pool?

willow plinth
brisk rose
#

I do have no shame however and if an ai could suddenly write competent smmoded code, you bet I'd jump right on that

#

And finally release mods of my own, lol

willow plinth
#

yeah but the main reddit demographic would still hate it lmao

#

anyways

red flower
#

i love reddit

willow plinth
#

i think i'll start a new balatro automation project, no one seems to have up-to-date balatrobot running, at least on mac, and gcbot seems outdated as well

brisk rose
red flower
#

i love echo chambers, i think my opinions are the best honestly

willow plinth
#

did already, thanks

brisk rose
willow plinth
#

i just learned a real programming language (javascript with seven million transpiler between me and the customer) instead of yucky lua

lucid owl
#

my bad, seemed like you were one of surprisingly many people here who try to code an entire mod with only chatgpt and zero experience otherwise

wintry solar
broken rivet
red flower
willow plinth
sonic cedar
dapper sun
#

how do i get a joker's edition?

limber blaze
#

card.edition.key

rugged pier
limber blaze
#

is the edition key

dapper sun
#

ty

lucid owl
#

"why doesn't chatgpt have the entirety of smods documentation in its data set :( i don't want to have to learn everything"

limber blaze
#

python sucks just as much as lua and js

red flower
#

yeah but it sucks in a way i like

shell timber
#

lua sucks in particular just because it's 1 indexed

broken rivet
#

i'm at least used to lua's weirdness

rugged pier
runic pecan
#

I mean there are pros and cons in different languages.

sonic cedar
limber blaze
#

atleast luas weirdness is novel and unique, python and javascript are just kinda bad

rugged pier
#

i will not have python slander happen on my watch

limber blaze
#

jsfuck is the one good thing you can do with javascript

shell timber
#

True...

timid star
#

i grew up on lua because i grew up on roblox studio and fnf knowledge 900ugglyy

brisk rose
red flower
lucid owl
limber blaze
#

tables and metatables are so uniquely funny but like weird wacky type casting is just a thing that always happens with non strict typing

broken rivet
#

can i actually get help though

limber blaze
#

but its pure javascript shenanigans

rugged pier
shell timber
#

basically via arcane wizardry you can write any js program using just the characters []()!+

limber blaze
lucid owl
#

i've used copilot as a problem solving tool, like, twice, but it feels legit evil to try and use it to code anything major

wintry solar
# sonic cedar sure thing!

I haven’t done a whole lot of sticker work but I’m pretty sure the apply function needs to have some sort of condition in it otherwise it will be applied to everything

limber blaze
#

i have never really used ai for anything before

lucid owl
#

i will make my work myself, thank you very much

limber blaze
#

basically i am like better than everyone else

shell timber
#

e.g. ![] == false, +[] == 0, +(+(+!+[]+(!+[]+[])[!+[]+!+[]+!+[]]+[+!+[]]+[+[]]+[+[]]+[+[]]) == +("1e100") == Infinity

rugged pier
#

i use it for like algorithm creation if anything

brisk rose
#

I use ai for labor saving like turning a list of github links into my modpack's readme

timid star
#

i don't really get access to powerful ai in particular so i just never use ai for ideas

#

that and im lazy

lucid owl
#

it's good for automating tedious stuff and logic testing without opening the game but i never use it otherwise

shell timber
broken rivet
#

hold on

lucid owl
#

i wouldn't really feel like i "made a mod" when chatgpt did most of it

limber blaze
#

having to do menial tasks is my penance for writing shitty code so i dont even use ai for labor saving

rugged pier
lucid owl
#

and at that point it feels like it's going against the thesis of modding and programming in general

rugged pier
#

like sure i get to play it but...its not mine

shell timber
#

ok actually like a week ago i asked an ai about my mod and it continuously lied to me about what the joker did so that's. something

brisk rose
limber blaze
#

its not really your mod unless you lose your mind over one hyperspecific bug that has the dumbest possible fix

shell timber
#

True...

brisk rose
red flower
#

never had a bug in my code cant relate

limber blaze
#

case in point:

rugged pier
lucid owl
timid star
#

spend like half the day on one problem only to find a solution that was right infront of you

shell timber
#

ok so this is crashing in mix_colours? which is odd

brisk rose
#

I see the concepting as the creativity in modding and the coding as the grunt work

#

Which probably shows I was never meant up me a programmer

rugged pier
lucid owl
#

the coding is the entire fun of it imo

rugged pier
#

same lol

broken rivet
lucid owl
#

or at least a very big part of it

limber blaze
#

i enjoy all parts of it other than shaders and music/sfx cause i suck at those

shell timber
#

oh that probably might be an issue?

brisk rose
#

I... despise mathematics, which is strange for someone who always wanted to be a programmer growing up

shell timber
#

idk i've never touched smods.blind

rugged pier
#

a different hell

sonic cedar
timid star
limber blaze
#

i just have someone to do shaders for me anyway

broken rivet
willow plinth
#

coding ai won't evolve anyways as long as the only new training material is either regurgitated ai slop or hidden in discord servers - stackoverflow is dead

lucid owl
#

i've also just been left with a bad taste in my mouth by ai in general seeing as how its current "pushed use" by every company ever is to replace human artists and workers because capitalism, so i'm just not really a fan in most use cases

willow plinth
brisk rose
#

Imo

limber blaze
#

i just trial and error everything via reading source code

#

never fails

shell timber
lucid owl
timid star
brisk rose
#

I'm anti-ip in general

wintry solar
# sonic cedar i didnt see your reply it got drowned out lmfao will this work? (is there a pla...

ah I see how they work now, you'll need this function to be true when you want it to apply, oir you can write your own

should_apply = function(self, card, center, area, bypass_roll)
            if
                ( not self.sets or self.sets[center.set or {}]) and
                (
                    center[self.key..'_compat'] or -- explicit marker
                    (
                        center[self.key..'_compat'] == nil and
                        ((self.default_compat and not self.compat_exceptions[center.key]) or -- default yes with no exception
                        (not self.default_compat and self.compat_exceptions[center.key]))
                    ) -- default no with exception
                ) and
                (not self.needs_enable_flag or G.GAME.modifiers['enable_'..self.key])
            then
                self.last_roll = pseudorandom((area == G.pack_cards and 'packssj' or 'shopssj')..self.key..G.GAME.round_resets.ante)
                return (bypass_roll ~= nil) and bypass_roll or self.last_roll > (1-self.rate)
            end
        end,
shell timber
#

i dont know

limber blaze
#

hex is case insensitive

broken rivet
dapper sun
#

card.edition doesn't exist apparently

limber blaze
#

btw i know the issue

#

its colour not color

broken rivet
#

😭

shell timber
#

oh lmao

limber blaze
brisk rose
rugged pier
wintry solar
limber blaze
rugged pier
sonic cedar
willow plinth
shell timber
#

oh yeah technically morefluff's en_us localisation is incorrect because they're called colour cards

#

but I Cannot Be Bothered Fixing It

dapper sun
limber blaze
#

meh america isnt real anyway

willow plinth
#

also a point lol

wintry solar
rugged pier
#

one follows the other

limber blaze
willow plinth
#

companies will exploit us, with or without AI

dapper sun
#

weird i did a tprint and i see it

lucid owl
rugged pier
#

i mean the whole studio ghibli thing too lol

#

"makes art more accessible"

rugged pier
#

my brother in christ you are destroying art

brisk rose
limber blaze
#

either way people using it is contributing to the image that its unilaterally good and people want more of it which is always going to lead to more companies using it for evil

rugged pier
limber blaze
#

theres not really a good seperation with some things

lucid owl
brisk rose
#

I don't think genies can be stuffed back into bottles. It's really as simple as that. It's here, it's morally gray and we need to live with it as a society

willow plinth
#

while the details and the magnitude of AI might be different, this is just capitalism like it was always, companies will make money at every cost

limber blaze
#

we can definitely do something about it we just probably wont fully

#

acting like its unstoppable so people should just use it is exactly why it might be unstoppable

#

its the same mindset as "well one vote wouldnt make a difference" so then no one votes and it makes a difference

sonic cedar
brisk rose
#

I do believe that's a fundentally luddite philopshy. As much as that might make me look like an 'ai bro'

#

Whatever the fuck that's supposed to be

willow plinth
#

ai cringe lil bro

#

(sorry my zoomer self said that)

brisk rose
#

I'm probably older than you, lol. I'm 26

lucid owl
#

not to get all radical but... capitalism bad

dapper sun
#

aaand it turns out it was some weird event behaviour for the 2nd time today

brisk rose
lucid owl
#

yeah. i said it

willow plinth
willow plinth
limber blaze
#

I'm gonna be 20 this year I'm so young

lucid owl
willow plinth
lucid owl
brisk rose
#

You'll still feel like that at our age

#

Dw

limber blaze
#

so they support it because they actually believe it can happen

limber blaze
#

which is not true

#

you get there by sheer luck you may as well literally buy lottery tickets

brisk rose
#

I'm lucky to be a thousandaire being on ssdi

#

And I'd lose my money if I have two of them... thousands that is

#

Poverty trap ftw

willow plinth
lucid owl
#

guys it's okay just trust me it'll work this time just one more ruling class guys it's great just one more recession and it'll work i swear

limber blaze
#

just make me supreme queen leader of earth already smh

willow plinth
#

my only hope is the tiktok generation, they all seem more lefty and i'm all for it

red flower
#

all commerce will be done by balatro modding. the most jokers the more capital (<-- biased)

limber blaze
#

time to for loop joker generation

lucid owl
rugged pier
#

how to implement tarrifs in balatro? /s

lucid owl
#

when will localthunk implement marxist economic philosophy into balatro?

limber blaze
#

when will thunk add raised fist 2

willow plinth
#

durak in balatro would be actually dope though

broken rivet
#

besides the boss color crash

#

(that's fixed now)

sonic cedar
#

remember when modding-dev was about mod development

willow plinth
#

no?

lucid owl
#

nah, never

limber blaze
#

this is about modding

#

im adding all of this to entropy

rugged pier
red flower
broken rivet
#

ah

sonic cedar
broken rivet
sonic cedar
#

oh i see

broken rivet
#

that just included jokers

#

i didn't know how to check if something was a playing card before

sonic cedar
#

then yeah do n''s thing he's goated

broken rivet
#

i have lua experience from the minecraft figura mod, literally coded a physics engine in that lol

#

a very basic one but still

runic pecan
#

For some reason the first line (green) doesn't copy retriggering effect, but the secong line does.
Is this a smods bug or have I done something wrong elsewhere?

sonic cedar
#

so i still use the set thing then?

#

or are you talking about above it

wintry solar
#

I think you need the above bit too

sonic cedar
#

i seee

#

thanks!

narrow iron
#

is there anywhere other than G.UIDEF.card_focus_ui in functions/UI_definitions that can set the buttons that appear on a card?

#

im trying to get the buttons to work properly on cards that appear in the custom cardArea i made, and based on that function there shouldnt be any buttons on the cards at all, but it still has a use button for some reason

#

neither of these are true

broken rivet
#

yeah recalc_debuff isn't getting run i think

#

that seems to be the issue

sturdy compass
#

The biggest thing I'm confused about for your code is that it's all a return table and not an SMODS.Blind

shell timber
#

i'd assume that it gets passed to SMODS.Blind eventually

broken rivet
#

ok yeah not even directly running recalc_debuff works

#

current code

-- Designed to work like how Castle selects its suit, only being able to choose cards from your deck.

return {
    name = "af_final_wand",
    key = "final_wand",
    
    atlas = "chips_atlas",
    pos = {x = 0, y = 0},

    dollars = 8,
    boss = {
        min = 8,
        max = 10, -- does nothing
        showdown = true
    },
    boss_colour = HEX("E34234"), -- canada caused my game to crash!!!! /j
    discovered = true,
    playable_suit = "Spades",

    -- stole this from castle lol
    drawn_to_hand = function(self)
        sendDebugMessage("Drawn")
        self.playable_suit = "Spades"

        -- find valid cards to target
        local validCards = {}
        for _, v in ipairs(G.playing_cards) do
            if v.ability.effect ~= "Stone Card" then
                validCards[#validCards+1] = v
            end
        end

        -- set the suit if valid targets exist
        if #validCards >= 1 then
            self.playable_suit = pseudorandom_element(validCards, pseudoseed("vermillion_wand")).base.suit
            sendDebugMessage("Switched to " .. self.playable_suit)
        end

        for _, v in ipairs(G.playing_cards) do
            self:recalc_debuff(v)
        end
    end,

    recalc_debuff = function(self, card, from_blind)
        return (card.ability.set == "Enhanced" or card.ability.set == "Default") and not card:is_suit(self.playable_suit, true, true)
    end
}
red flower
#

i dont know anything about blinds but you can try using the new blind calculate with context.debuff_card maybe

broken rivet
#

oh?

sturdy compass
#

Oh yeah that might work

broken rivet
#

i don't see that method in the docs

sturdy compass
#

Cuz it isn't

broken rivet
#

😭

red flower
#

you need to return { debuff = true } it seems

broken rivet
#

since it's not in the docs

sturdy compass
#

It's basically the exact same as a Joker calculate function

red flower
broken rivet
#

oh

sonic cedar
#

better ss

narrow iron
#

what determines the position of a button on a card? / how do i move a button?

chrome widget
#

The UI tree in the create_shop_card_ui() function

willow plinth
broken rivet
# red flower you need to `return { debuff = true }` it seems

well that crashed my game

return {
    name = "af_final_wand",
    key = "final_wand",
    
    atlas = "chips_atlas",
    pos = {x = 0, y = 0},

    dollars = 8,
    boss = {
        min = 8,
        max = 10, -- does nothing
        showdown = true
    },
    boss_colour = HEX("E34234"), -- canada caused my game to crash!!!! /j
    discovered = true,
    playable_suit = "Spades",

    -- stole this from castle lol
    drawn_to_hand = function(self)
        sendDebugMessage("Drawn")
        self.playable_suit = "Spades"

        -- find valid cards to target
        local validCards = {}
        for _, v in ipairs(G.playing_cards) do
            if v.ability.effect ~= "Stone Card" then
                validCards[#validCards+1] = v
            end
        end

        -- set the suit if valid targets exist
        if #validCards >= 1 then
            self.playable_suit = pseudorandom_element(validCards, pseudoseed("vermillion_wand")).base.suit
            sendDebugMessage("Switched to " .. self.playable_suit)
        end

        --[[for _, v in ipairs(G.playing_cards) do
            self:recalc_debuff(v)
        end]]
    end,

    calculate = function(self, card, context)
        if context.debuff_card then
            return {
                debuff = (card.ability.set == "Enhanced" or card.ability.set == "Default") and not card:is_suit(self.playable_suit, true, true)
            }
        end
    end
}
#

now ability is nil i guess

red flower
broken rivet
red flower
#

context.debuff_card is the card you need to check, card is the blind

broken rivet
#

OH

#

confusing variable names i guess

gusty iron
#

I had a fun idea for a joker

The ability changes depending in what day of the week it is

#

So on monday its really bad (mondays are aaaaa)

But on Friday and saturday its really good

faint yacht
#

...so, same Joker, but with Garfield on Mondays, Sonic on Fridays & Dexter's Dad & Car for Saturdays?

broken rivet
gusty iron
#

Its ability fully depends on the day of the week

#

Would that be cool and innovative

limber blaze
#

as long as all the abilities are roughly equal in strength it should be cool

#

you want to avoid it being more favourable to mess with your system clock though

red flower
broken rivet
#

in-game the same suits stay debuffed

red flower
#

do the messages in drawn_to_hand work?

broken rivet
#

yes, that's how i know it's changing internally

red flower
#

hmm no idea

sturdy compass
broken rivet
# sturdy compass Are you un-debuffing the cards
calculate = function(self, blind, context)
        if context.debuff_card then
            return {
                debuff = (context.debuff_card.ability.set == "Enhanced" or context.debuff_card.ability.set == "Default") and not context.debuff_card:is_suit(self.playable_suit, true, true)
            }
        end
    end
#

this is currently responsible for debuffing them

#

actually i wonder if the debuff is interfering with the ability

#

the check that's meant to detect if something's a playing card

red flower
#

it shouldnt because that context is also used to undebuff cards

#

but if it does its an smods bug

broken rivet
#

ah

#

interestingly enough it does appear to have updated if i enter the blind again

narrow iron
#

when i emplace a card into the custom cardArea i made the button alignment breaks for some reason

broken rivet
narrow iron
#

this is what im using to make my card area, there is a lot of other code to try and make this work but i probably shouldnt send it all lol

#

its mostly based on the implementation of abilities in betmma's mods

red flower
#

im mostly interested in the button part

#

or is it just a vanilla thing

narrow iron
#
# remove use button from biome cards
[[patches]]
[patches.pattern]
target = "functions/UI_definitions.lua"
pattern = '''
  if card.ability.consumeable then
    if (card.area == G.pack_cards and G.pack_cards) then
'''
position = "at"
payload = '''
  if card.ability.consumeable and card.ability.set ~= 'biome' then
    if (card.area == G.pack_cards and G.pack_cards) then
'''
match_indent = true

# add sell buttons to biome cards
[[patches]]
[patches.pattern]
target = "functions/UI_definitions.lua"
pattern = '''
            {n=G.UIT.T, config={ref_table = card, ref_value = 'sell_cost_label',colour = G.C.WHITE, scale = 0.55, shadow = true}}
          }}
        }}
      }},
    }}
  end
'''
position = "after"
payload = '''
  if card.area and card.area.config.type == 'terraria_biome' then
    sell = {n=G.UIT.C, config={align = "cr"}, nodes={
      {n=G.UIT.C, config={ref_table = card, align = "cr",padding = 0.1, r=0.08, minw = 1.25, hover = true, shadow = true, colour = G.C.UI.BACKGROUND_INACTIVE, one_press = true, button = 'sell_card', func = 'can_sell_card'}, nodes={
        {n=G.UIT.B, config = {w=0.1,h=0.6}},
        {n=G.UIT.C, config={align = "tm"}, nodes={
          {n=G.UIT.R, config={align = "cm", maxw = 1.25}, nodes={
            {n=G.UIT.T, config={text = localize('b_sell'),colour = G.C.UI.TEXT_LIGHT, scale = 0.4, shadow = true}}
          }},
          {n=G.UIT.R, config={align = "cm"}, nodes={
            {n=G.UIT.T, config={text = localize('$'),colour = G.C.WHITE, scale = 0.4, shadow = true}},
            {n=G.UIT.T, config={ref_table = card, ref_value = 'sell_cost_label',colour = G.C.WHITE, scale = 0.55, shadow = true}}
          }}
        }}
      }},
    }}
  end
'''
match_indent = false
narrow iron
#

its works perfectly fine when its in a consumable slot

red flower
#

It's because G.consumeables has it's own logic for buttons

narrow iron
#

ahhh

gusty iron
red flower
#

i can send my code where i do that if you want but its somewhat complicated by this point haha

hollow marsh
#

Is it possible to totally change the main menu background to a different animation or even like a video

gusty iron
narrow iron
red flower
gusty iron
red flower
#

i would need to see the code to understand what that means lol

gusty iron
#

it pulls it from here, and puts it into the ability

red flower
red flower
gusty iron
#

oh

red flower
#

you need to either: set up a localization file and return a new key in loc_vars for each day OR use main_end and make a UI table

#

(or do a complicated set up with variable colors but i dont recommend that)

gusty iron
#

ill just

#

have no formatting

#

itll look odd and i think that would be funny

#

This is cool

narrow iron
red flower
#

use_button is all the buttons

narrow iron
#

oh

#

thank you!

broken rivet
gusty iron
#

okay so, in a joker, how would i access the current mult and chips?

faint yacht
#

Chips and mult scored so far by the hand?

#

hand_chips and mult are globals.

ruby delta
#

Can anyone help me in turning Toml lovely patches into Smods

narrow iron
#

that mostly depends on what the patch is doing

rich dragon
#

how do i edit a joker's description with debug+? is it even possible?

#

i know how to edit the values (ex hanging chad = 10 retriggers)

rough furnace
#

Its the same as the name but its called text instead of name

#

And it's a list of strings instead of a string

broken rivet
#

how would i get the chips value of a playing card

#

trying to do this as a hand is being played

sonic cedar
#

will this work? like make the sticker only joker-applicable, so if a card (like 8 ball) creates a consumable then the consumable wont have the sticker?

old bane
#

how do i check if i beat a boss blind

bright axle
#

what editors you use?

narrow iron
#

consumables can have a calculate function right?

bright axle
#

how you set up a localization config for jokers mods?

proud moon
#

fun fact, when typing In text code"

#

you can use ``lua to make it lua colored

faint yacht
#
[ There are many supported languages in such. ]
proud moon
#

i had no idea until yesterday lol

proud moon
zealous glen
#
# EAT
 *THIS*
 * JOKER
proud moon
#

yummers

tall wharf
#

we eating good tonight

bright axle
proud moon
#

none actually, i use a c# one because i like how it colors things, i just use an ai to check my syntax instead of an extension

#

i also just havent found an lua one i like

bright axle
#

ok

#

makes sense

#

how you set up a localization config for jokers mods?

proud moon
#

to be fair, i started using lua 5 days or so ago, so im not the best to respond to your question, but i didnt see anyone else respond

proud moon
bright axle
#

i seen te template but i think it is for controls

placid star
#

erm guys does context.selling_self work?

proud moon
narrow iron
#

obv with the code you actually want to use put into there

dreamy thunder
placid star
narrow iron
#

ah okay

#

yea that wont help there

dreamy thunder
narrow iron
#

i meant the solution i gave

dreamy thunder
#

i corrected myself

#

i mean

#

not corrected

proud moon
#

the wiki says yea

tall wharf
#

is it possible for blinds to throw hands using calculate function

#

this is what i wanna do

zealous glen
#

Can't you throw hands the usual way?

limber blaze
#

you should use debuff_hand

#

as a function in the blinds definition

tall wharf
#

the debuff hand doesn't have arguments for cards in hand

limber blaze
tall wharf
#

so I'm asking if there's a better way to do it

limber blaze
#

i dont think theres any other way to do this

#

other than manually checking G.hand.cards

tall wharf
#

do i also need to check game state

limber blaze
#

i think you just need to make sure that the blind isnt disabled

tall wharf
#

oh about that i wanted to make it so that you can't disable it either way

zealous glen
narrow iron
#

for some reason the calculate function in the card i made isnt running

zealous glen
#

G.hand

narrow iron
#

this isnt ever running

zealous glen
#

you don't need to access everything via the context

limber blaze
#

just make sure to use :is_face so you instantly lose if you have eternal pareidolia

narrow iron
#

oh, will cards still calculate if they arent in a vanilla cardArea?

#

if not, how can i make them calculate in the modded cardArea too?

limber blaze
#

i mean yeah thats the point

tall wharf
#

these won't appear until ante 9 anyway

zealous glen
narrow iron
#

how do i do that

zealous glen
# narrow iron how do i do that

something like:


# Zodiac calculation
[[patches]]
[patches.pattern]
target = '=[SMODS _ "src/utils.lua"]'
match_indent = true
position = 'before'
pattern = '-- TARGET: add your own CardAreas for joker evaluation'
payload = '''
if not VIC_ALPHA_RELEASE then
    local vic_joker_idx = 0
    for k, v in ipairs(t) do
        vic_joker_idx = vic_joker_idx + 1
        if v == G.jokers then
        break
        end
    end
    table.insert(t, vic_joker_idx, G.ca_vic_zodiac)
end
'''

narrow iron
#

oh thats what the target comments mean

zealous glen
#

I'm searching the table to choose exactly when my CardArea is calculated

narrow iron
#

G.ca_vic_zodiac is your CardArea right?

zealous glen
#

Yes

narrow iron
#

that fixed my issue!

#

thanks

steady smelt
#

how do you check if high constrast is on or not?

zealous glen
steady smelt
#

does that work for smods too? since it splits it into separate high constrast settings per suit?

zealous glen
#

smods does what now

steady smelt
#

yeah there's still the toggle in settings but there's also a toggle per suit in customize deck

#

unless i'm just crazy

narrow iron
#

yea

#

its there

placid star
#

deadass wtf, this code adds 17 AT THE END OF EVERY ROUND TO heldfor

zealous glen
#

so I have no idea

zealous glen
#

And maybe there's repetitions at the end of round

lucid owl
narrow iron
#

what does the "Mipmap level" do?

zealous glen
#

So you need to check for more context

lucid owl
#

even just a blank return

zealous glen
#

I don't think we should care about it

dapper sun
#

how do i change a joker's atlas position depending on a config variable?

placid star
narrow iron
#

uhh, this is deleting every card held in hand when i play a hand

#

oh nvm

#

im returning true no matter what

zealous glen
zealous glen
dapper sun
#

bunco's tape?

zealous glen
#

yes

#

bunco's tape

#

the tape from bunco

#

idk the name

#

I just know it's a tape

placid star
zealous glen
dapper sun
zealous glen
dapper sun
#

it has each joker as its own png

bright axle
#

has sombody localized a mod before?

zealous glen
#

someone has

bright axle
#

is bcs i have a localization/"lang".lua and the joker has a blank name and desk onn avery lang "lang" is the lang code

zealous glen
#

what's the localization file looking like

bright axle
#
return {
    descriptions = {
        Joker = {
            cdv_cosmic_devourer = {
                name = 'Cosmic Devourer',
                text = {"{C:legendary}Legendary{} Joker", "When leaving shop, {C:red}consume{} random Joker",
                        "Gain {C:mult}+#1#{} Mult and {C:chips}+#1#{} Chips",
                        "Create {C:dark_edition}Negative{} copy of", "consumed Joker {C:inactive}(Excludes self)"}
            }
        }
    },
    misc = {
        labels = {
            k_cosmic_feast = "Devoured {C:attention}#1#!",
            a_cosmic_power = "+#1# Mult, +#2# Chips"
        }
    }
}

zealous glen
wind steppe
#

does anyone know how to make the amount of chips this joker gains a variable?

SMODS.Joker{
    key = 'Blue Card',
    loc_txt = {
        name = 'Blue Card',
        text = {
            'This Joker gains {C:blue}+10{} Chips',
            'when any {C:attention}Booster Pack{} is opened.',
            '{C:inactive}(Currently {}{C:blue}+#1#{} {C:inactive}Chips){}'
        }
    },
    atlas = 'Jokers',
    pos = {x = 0, y = 0},
    config = { extra = {
        chips = 0
    }
    },
    rarity = 1,
    blueprint_compat = true,
    loc_vars = function(self,info_queue,card)
        return {vars = {card.ability.extra.chips}}
    end,
    calculate = function(self,card,context)
        if context.open_booster and not context.blueprint then 
            card.ability.extra.chips = card.ability.extra.chips + 10 -- TODO: find out how to make the  chips it scales by a variable
            return {
                message = 'Upgrade!',
                colour = G.C.BLUE
            }
        elseif context.joker_main then
            return {
                chips = card.ability.extra.chips
            }
        end
    end
}
zealous glen
#

j_PREFIX_JOKERNAME

bright axle
#

ok

#

thx

limber blaze
zealous glen
limber blaze
#

then you refer to it the same as extra.chips

vernal path
#

I'm doing some bug testing- how does one log something to the console?

wind steppe
limber blaze
vernal path
wind steppe
limber blaze
#

youll want to return multiple vars

#

{ vars = {card.ability.extra.chip_add, card.ability.extra.chips}}

#

#1# will always refer to the first one here then #2# the second etc

#

so if you dont return enough vars it defaults to nil

pliant totem
#

Can anyone tell me how I would display a message on a joker from the "add_to_deck" function? My first thought was to just send {message = "insert message"} in the return statement just like you would at the end of the calculate function, but that isn't doing anything. Figured it out, I used SMODS.calculate_effect({effects}, card)

narrow iron
#

whats the proper way to use context.repetition?

proud moon
#

The rep context has examples displayed in the smod example jokers in the sock and buskin section

midnight coyote
#

how do i make a card debuff itself

bright axle
#

how can i localize the name and desc of a mod?

faint yacht
#

SMODS.debuff_card(card, true, card)

midnight coyote
#

can i replace card with self in this instance

#

or must i use card

#

wait

#

stupiud question

#

n vm

rugged pier
#

how do you change them btw? i get the flip thing but is it like flip -> destroy -> create? dont they have their own animations too

narrow iron
#

whats gone wrong here?

broken rivet
narrow iron
#

nope that works

#

i think SMODS.has_enhancement is getting a nil value somehow

broken rivet
#

oh

narrow iron
#

but im just giving it context.other_card at times when context.other_card shouldnt be nil

broken rivet
#

yea

#

i'm not experienced enough to give much advice here

rugged pier
old bane
#

i think in context.destroying_card, context.destroy_card is its version of context.other_card

rugged pier
#

in the calculate function, can you use self to change the key and atlas of a joker ?

#

or is it just card.key

old bane
rugged pier
#

well there goes that idea

#

ill just have to destroy and create then

old bane
#

there's an example of like

#

someone changing the sprite

#

but i don't remember who did it

#

i'd say look at like

rugged pier
#

i want to change like everything about the joker

#

after a few rounds

old bane
#

oh look at cryptid's double sided then

rugged pier
#

oh sick

#

tysm

old bane
#

ofc

red flower
rugged pier
#

so if you had a showman and bought the same joker in the next round, then it would transform one round after original

#

so just one of them i suppose?

red flower
#

ok if it's just an instance at a time you can do joker:set_ability("j_modprefix_otherkey")

rugged pier
#

oh sick and that chages everything about the joker? loc_vars, calculate, sprite, etc

red flower
#

yeah, it makes it into the other joker

rugged pier
#

this is awesome

#

youre the goat

red flower
#

but keeps editions and stickers i think

rugged pier
#

that should be fine since the joker its changing into cannot be bought

#

its an upgrade

red flower
#

with "i think" i mean i dont know if it keeps anything else, i know it keeps that

rugged pier
#

so the stickers should remain

#

makes sense, thank you

broken rivet
#

is it possible to track the number of hands played in an ante

rugged pier
#

like so?

red flower
#

yeah

rugged pier
#

awesome

red flower
#

remember that end_of_round runs multiple times

rugged pier
#

okay yeah it does...

#

now why would it do that

#

does context.setting_blind do that too?

steady smelt
#

so does smods just fully make the high contrast setting in options not do anything at all in favor of the individual suit toggles in the customize deck menu? that's what it seems like but i can't quite tell

sonic cedar
#

do any of you know any mod incompatibilities that would cause this error?
[SMODS _ "src/overrides.lua"]:1669: attempt to index local '_center' (a nil value)

line 1669:
for key, _ in pairs(deck.wins_by_key or {}) do

sonic cedar
#

basil,,,,,,,,,,,,,,,,,,,,

midnight coyote
#

im just getting back into the groove of my mod lol

#

took a fat break

sonic cedar
#

was it you who pinged me i think it got lost in the chat

midnight coyote
#

idk

rugged pier
#

😅

sonic cedar
#

ohhhhh hey

rugged pier
#

halo

sonic cedar
#

well what happened (i cannot find it for the life of me)

rugged pier
#

no worries, i was wondering if you achieved this by doing this
card:flip()
card:set_ability('j_csmr_ladymistborn')

sonic cedar
#

yeah

#

its an event

rugged pier
#

do you do it within context.end of round ? because when i try to do the same a. it runs that particular context multiple times, b. it stays flipped for a long time before flipping back in the middle of the cashout screen

sonic cedar
# rugged pier no worries, i was wondering if you achieved this by doing this card:flip() card:...
    G.E_MANAGER:add_event(Event({
        trigger = "after",
        delay = 0.15,
        func = function()
            card:flip()
            return true
        end,
    }))
    G.E_MANAGER:add_event(Event({
        trigger = "after",
        delay = 0.15,
        func = function()
            card:set_ability(G.P_CENTERS["j_yourmodid_yourjoker"])
            play_sound("card1")
            card:juice_up(0.3, 0.3)
            return true
        end,
    }))
    G.E_MANAGER:add_event(Event({
        trigger = "after",
        delay = 0.15,
        func = function()
            card:flip()
            return true
        end,
    }))
rugged pier
#

what context dod you use for it

sonic cedar
#

whatever context i want it to occur in

rugged pier
#

right because i learnt today context.end_of_round runs multiple times so i was wondering if this would make it flip unlip multiple times if i were to define it within that

#

but i suppose once the ability is changed, it wouldnt happen?

sonic cedar
#

i actually need to see if ive done it in end_of_round before

#

iiii have not

rugged pier
#

ah i see

#

so in the video what context was it?

sonic cedar
#

in the what

#

oh MY video

#

well thats golden joker

#

so

rugged pier
#

here

#

ah

sonic cedar
#

it's in calc_dollar_bonus

rugged pier
#

i see okay that makes sense

hasty mist
#

i'm trying to write a function using a mathematical formula, is this correct?

rugged pier
#

you did it so its not connected to the round stages but rather the joker itself

rugged pier
#

ah

#

makes sense

hasty mist
#

also, is there a way to perform arithmetic on your score after the ChipsXMult operation?

#

ive been looking into multiple ideas but im a bit stumped

#

since literally nobody has done this before to my knowledge

hybrid fiber
#

Hey chat

im trying to make what i thought was a simple mod, but has quickly proven troublesome.

i want all stickers except gold (including no sticker) to show up as red x's and gold stickers to show up as green checkmarks. The issue arisies from me not super understanding how to get this to work with malverk.

I looked at similar mods and found the less intrusive sticker mod, but that isnt malverk compatible and i would like my mod to be

any help/resources is greatly appreciated!

I can also share my current code if wanted

red flower
rustic swallow
#

how do you check if a specific poker had is played (not if it contains it)

sonic cedar
faint yacht
#

context.scoring_name?

hasty mist
#

is there a list of every "context" and what they do anywhere

faint yacht
rugged pier
#
calculate = function(self, card, context)
        if context.before and context.cardarea == G.play then
            print('step one')
            for k, v in ipairs(context.scoring_hand) do
                print('i am in loop')
                if v:is_preservation() and not SMODS.has_enhancement(v, 'm_glass') then
                    print('this is preservation card')
                    if pseudorandom('lady_mistborn') < G.GAME.probabilities.normal/card.ability.extra.odds then
                        print('being glassed')
                        v:juice_up()
                        v:set_ability(G.P_CENTERS.m_glass, nil, true)
                        SMODS.calculate_effect({message = 'Glassed!'}, card)
                    else
                        print('not being glassed')
                        SMODS.calculate_effect({message = localize('k_nope_ex')}, card)
                    end
                end
            end
        end
    end

what am i doing wrong here, im getting no prints in my game

#

like even print('step one') this isnt happening

daring fern
rugged pier
#

documentation wrong?

faint yacht
#

-# This is for a Joker, Enhancement or what?

rugged pier
#

joker

faint yacht
#

Then use G.jokers.

rugged pier
#

huh

#

in what case would you use G.play?

daring fern
rugged pier
#

i see...

sonic cedar
#

np!

hasty mist
#

what have i done wrong here? i'm trying to take the additive factorial of the round score after the ChipsXMult operation

pliant totem
#

What area/table are cards in when you open them in a booster pack while they are waiting for the player to make a selection?

#

I tried G.hand.cards, but that wasn't it

faint yacht
#

G.pack.cards

daring fern
pliant totem
#

ty

faint yacht
#

-# I am not immune to getting things close, but still wrong.

hasty mist
#

crashes when playing a hand with "attempt to call a table value"

limber blaze
#

missing a *

#

inbetween the two two_bigs()

hasty mist
#

ah i see

#

i havent mastered syntax yet

#

i think i've gotten the context wrong lmao

#

it's performing the operation, but only before playing a hand

#

for some reason

#

literally the opposite of what the documentation says

#

Does anyone know what the context is for right when a hand is finished playing/after the ChipsXMult operation?

#

so, after all the scoring?

#

as you can see, it's modifying the round score, but only before scoring

#

i want it to work after scoring

red flower
#

everything you do in calculate runs before scoring, the steps apply for what you return in calculate

lament agate
#

im a bit lost in here, am i doing it right

hasty mist
red flower
#

an event probably

hasty mist
#

hm

steady smelt
#

anyone have experience with drawing an extra layer on top of cards with an enhancement? i thought i had it working by just setting a sprite and using draw_shader('dissolve', ...) but it doesn't show up with certain editions for some reason (any besides foil

rapid stag
#

question, what happens if two different mods try to take_ownership() the same thing, for different purposes?

for instance, mod A wants to alter... uhhhhh... let's say certificate? to adjust it to account for some custom seal it adds (even though this is a bad example and you'd probably do that by hooking poll_seal(), bur there's probably some kind of mod functionality that requires a take_ownership() to properly accommodate it, idk) and mod B wants to alter it to redefine its loc_vars to make it have a main_end for whatever reason - maybe smth like predicting the card and seal it'll create, idk not that great an example, but yeah

what happens? do those two things conflict or what

daring fern
rapid stag
proud moon
#

ok, i want to make a joker only show up when a mult card is enhanced in the deck, like how luckycat and glass joker work. where would i go about writing that? i know it cant go in the joker function, would i need to make a new function at the end or is there an easy way to just use the one the game uses?

faint yacht
#

Use the in_pool function. If return true, the Joker will appear in the Joker pool. If return false, it will not.

steady smelt
#

don't do that, jokers have a function specifically for that

#

set enhancement_gate = 'm_mult' in your joker definition

#

same place you define rarity cost etc

faint yacht
#

-# Ah, another undocumented feature.

steady smelt
#

but for stuff other than specifically enhancement requirements yeah the in_pool function works

hasty mist
#

i'm not sure how to use events to make this work

red flower
hasty mist
proud moon
red flower
#

im not sure if the ease event gets blocked tho

hasty mist
#

hm

red flower
#

if not then you want to do

G.E_MANAGER:add_event(Event({
    func = function() 
        -- your effect
        return true
    end,
}))
hasty mist
#

alright i'll try this

wind steppe
#

does anyone know how i could make a joker that only activates once per shop? (also I'd like the description to change depending on whether it's active or inactive)

hasty mist
#

where is the syntax error here im so lost

gilded narwhal
#

hey guys is there an inherant way to change the spawn rate of specific sets of consumables without using something like soul_rate?

#

I have my own set of planet cards that kind of clog up the planet pool for other modded planets, so I want to make all planet cards that aren't in my mod or vanilla 3x more likely to appear to balance that out

blissful lance
#

Hello, I'm really new to modding and I'm trying to make a tarot which enhances a card, but I cant find a function like "set_edition" for enhancement, am I missing something ?

red flower
#

also don't check for the context inside the event do it outside

hasty mist
#

oh i think i see

red flower
#

oh and inside calculate lol

hasty mist
#

this is so weird lmao

steady smelt
# blissful lance Hello, I'm really new to modding and I'm trying to make a tarot which enhances a...

enhancement conversion tarots are built in, set effect = "Enhance" and config = { mod_conv = key, max_highlighted = # }

and if you want to be consistent add it to the info_queue to make it the enhancement's description show up on the side by adding info_queue[#info_queue+1] = G.P_CENTERS[self.config.mod_conv] in the loc_vars function

-# dm me if you need more help this is a probably a lot if you're new

blissful lance
red flower
hasty mist
#

is this right?

#

oh wait

#

yeah

#

that seems right

#

doesn't seem to be doing anything ingame though

red flower
#

is it the same as before

hasty mist
#

wdym

red flower
#

like, is it not working or is it doing the same thing as it was before?

hasty mist
#

it's doing nothing

#

actually

#

let me double check

red flower
#

oh you might need to manually update the text if you do it after scoring

#

G.GAME.blind.chip_text = number_format(G.GAME.blind.chips)

steady smelt
#

i haven't done any personally that trigger on/after the final scoring step so i don't know for sure but the ones i have done I always have return the chips/mult value so i assume you'd need to do that after calculating it no?

hasty mist
#

i cant even tell what its doing at this point

steady smelt
#

i think you're just setting your round score chips value which does nothing because it's immediately overwritten by the actual scoring bit

#

one sec lemme try

red flower
#

maybe you need to use after yeah

hasty mist
#

wdym

red flower
#

like you might need context.after

#

instead

hasty mist
#

ah

#

right

red flower
hasty mist
#

wait i think it works already hold on

#

this seems correct

scarlet thorn
red flower
#

ive never heard of that lmao

#

wait no

#

isnt that for the poker hand

clear eagle
#

I wanted to develop a mod; anyone have any suggestions where to start?

scarlet thorn
#

used 42 times compared to setting G.GAME.blind.chip_text manually being only used once, and thats defining the ui

faint yacht
red flower
faint yacht
#

also oops.

hasty mist
hasty mist
#

unless i misunderstood you

scarlet thorn
red flower
#

not the poker hand text

scarlet thorn
#

Grey or blue

red flower
#

grey

scarlet thorn
#

G.GAME.chips

#

not chip_text

red flower
#

every time im helping someone you come in the middle of the conversation and give solutions confidently without understanding the context lmao

hasty mist
#

ive already achieved the desired effect lol

hexed stump
#

Does anyone know what file contexts are defined in?

hasty mist
#

tysm for the help

hexed stump
#

be it vanilla or smods

red flower
#

look for SMODS.calculate_context

hexed stump
#

I've not had much luck tracking down what I'm looking for w/ that but I'll give it another go

red flower
#

what are you looking for?

scarlet thorn
red flower
hasty mist
hexed stump
#

trying to figure out if I can grab where the card is coming from so my stuff stops getting affected on the way to play and when they're discarded/exit play

red flower
#

it should have to_area and from_area

hexed stump
#

okay cool that's what I thought

#

I swear I tried that before and it didn't work

#

okay, it does seem to tentatively work! maybe I just missed something last time

hybrid fiber
#

im trying to modify joker stickers without modifing the stake icons, but right now this is doing the opposite-- can anyone give suggestions?

--- MOD_NAME: simple stickers
--- MOD_ID: hazel-sticker-adjuster
--- MOD_AUTHOR: [hazel410]
--- MOD_DESCRIPTION: turns gold sticker into checkmark, and everything else to red 
X
--- PREFIX: stiadj
--- VERSION: 1.0.0
--- DEPENDENCIES: [malverk]

AltTexture({
    key = 'sticker',
    set = 'Stake',
    path = 'stickers.png',
    loc_txt = {
        name = 'simple stickers!'
    }, 
    original_sheet = true
})

AltTexture({
    key = 'sticker',
    set = 'Stickers',
    path = 'stickers_stickers.png',
    loc_txt = {
        name = 'simple stickers!'
    },
  stickers = true,
    original_sheet = true
})

TexturePack{
    key = 'hazel-sticker-adjuster',
    textures = {
        'stiadj_sticker',
    },
    loc_txt = {
        name = 'simple stickers',
        text = {
            'simplifies the stickers',
        }
    }
}```
wind steppe
#

Does anyone know why this crashes?

SMODS.Joker{ -- Orange Card implementation
    key = 'Orange Card',
    loc_txt = {
        name = 'Orange Card',
        text = {
            'This Joker gains {X:mult,C:white}+X#1#{} Mult',
            'when any {C:attention}Booster Pack{} is skipped.',
            '{C:red}Works once per shop{}',
            '{C:inactive}(Currently {}{X:mult,C:white}+X#2#{} {C:inactive}Mult and #3#){}'
        }
    },
    atlas = 'Jokers',
    pos = {x = 1, y = 0},
    config = { extra = {
        xmult_gain = 0.1,
        xmult = 1,
        is_active = true,
        active_msg = "Active"
    }
    },
    rarity = 1,
    blueprint_compat = true,
    loc_vars = function(self,info_queue,card)
        return {vars = {card.ability.extra.xmult_gain, card.ability.extra.xmult, card.ability.extra.active_msg}}
    end,
    calculate = function(self,card,context)
        if context.skipping_booster and not context.blueprint and card.ability.extra.is_active then
            card.ability.extra.is_active = false,
            card.ability.extra.active_msg = "Inactive",
            card.ability.extra.xmult = card.ability.extra.xmult + card.ability.extra.xmult_gain
            return {
                message = 'Upgrade!',
                colour = G.C.ATTENTION
            }
        elseif context.ending_shop then
            if not card.ability.extra.is_active then
                card.ability.extra.is_active = true,
                card.ability.extra.active_msg = "Active"
                return {
                    message = 'Reactivated!',
                    colour = G.C.ATTENTION
                }
        elseif context.joker_main then
            return {
                xmult = card.ability.extra.xmult
            }
        end
    end
}
red flower
#

whats the crash log?

hexed stump
gilded narwhal
#

guys how does telescope work

#

I can't find the code for it

red flower
gilded narwhal
#

oh i was using the wrong pluralization for telescope when I was searching lmao

wind steppe
red flower
hasty mist
#

i love being evil

rustic swallow
#

how do you detect the amount of cards played in a hand

sturdy compass
#

#G.play.cards

#

if you just want scored cards it'd be #context.scoring_hand

lucid owl
#

trying to get the number of unique ranks in the player's hand, why is this still crashing from G.hand.cards being nil when hovered over? how do i cover for if it's nil (just returning a 0 instead)?

red flower
#

check for just G.hand instead

lucid owl
#

weird, alright

red flower
#

G.hand is nil if you are outside of a game so if you do G.hand.cards you're indexing a nil value

lucid owl
#

works now, ty!

sonic cedar
steady smelt
#

i am going insane why doesn't this drawstep render when the card has an edition

coral flume
#

If Im trying to grab a random, suit and rank should I just use the same functions as Idol? or must I make my own function

runic pecan
#

bump

rugged pier
#

how exactly do quantum enhancements work?

#

this is the only reference in documentation

#

I know they let you use any enhancement without actually applying the enhancement itself but how would you use it

#

^unless im mistaken on how they actually work

stiff locust
#

does anyone know where i could find legendary backgrounds without the nameplates

stiff locust
#

thanks

reef belfry
#

does context.full_hand take unscored cards too

stiff locust
#

idk about context.full_hand

crisp coral
#

yes

stiff locust
#

how do I add a playing card to the deck

crisp coral
#

certificate/marble joker

stiff locust
#

both of those are random cards

#

i need to add a specific card

crisp coral
#

then modify that card idk

shut crater
#

does anyone know how to modify the layering of objects? A cardarea I created is sitting on top of a joker so I can't click or move the joker

#

the answer was card.children

reef belfry
#

jarvis, how do you use context.modify_scoring_hand

stiff locust
#

how do i grab a card's suit

#

i don't wanna check it against another suit i wanna save it as a value

#

so is_suit("Hearts") doesn't work here

daring fern
stiff locust
#

oh god what the hell do I do if a card has no suit

#

it shouldn't because this is happening at the very very start of a run

#

ii'll just make it default to clubs because i like that suit

native zinc
#

has anyone noticed gluttonous joker is spelled wrong in its id

#

i was breaking my mind for like a good 10 minutes because of this

stiff locust
#

yeah

#

canio is also spelled wrong in there

#

as j_caino

native zinc
#

impressive

daring fern
stiff locust
#

everyone knows about consumeables

native zinc
#

consumeables pissed me off a lot

stiff locust
#

yeah i have no idea how to make a playing card

#

it's crashing attempt to index P what the fuck is P

#

oh my god

daring fern
stiff locust
#

yes

#

yes I did

#

I've done this so often

#

this is the exact opposite of what I wanted.

reef belfry
#

3

stiff locust
#

i'm trying to add more face cards

#

??????

#

why did it remove one of the jacks

#

why are there two extra 5s

#

IT'S RANDOM

#

WHY IS IT RANDOM

tepid crow
#

Magic ✨

stiff locust
#

erratic deck called

#

it wants its job back

#

fuck man

#

im changing my approach

#

fuck adding playing cards this shit dumb as hell

steady smelt
#

why does applying the negative then the negative_shine shaders to a sprite seem to make it way way more shiny than actual negative cards? comparing directly side by side

stiff locust
#

alright how do I change card ranks then

#

surely that will be easier

#

SMODS.change_base(value, nil, "11") isn't working

#

value is an existing card it doesn't crash

#

it just doesn't do anything

reef belfry
#

dont you have to assert it

#

assert(SMODS.change_base(value, nil, "11"))

stiff locust
#

I used to assert it but removing the assert made it work for jokers

reef belfry
#

rah.. idk

daring fern
stiff locust
#

assert is my mortal enemy

#

anyway how do I make ts work

reef belfry
#

hmm

daring fern
stiff locust
#

this doesn't make sense to me

#

i'm stupid

rugged pier
#
calculate = function(self, card, context)
        if context.final_scoring_step and context.cardarea == G.jokers and G.GAME.current_round.hands_played == 0 then
            if #context.full_hand == 2 then
                print('only 2')
                card.ability.extra.destroy = true
            end
        end
        if context.destroy_card and card.ability.extra.destroy then
            for k, v in ipairs(context.full_hand) do
                print('destroying')
                G.E_MANAGER:add_event(Event({
                    trigger = 'after',
                    delay = 0.1,
                    func = function()
                        v:start_dissolve()
                        return true
                    end,
                    blocking = true
                }))
                return {
                    remove = true
                }
            end
            card.ability.extra.destroy = false
        end
    end

help how am i deleting the whole deck here - point is to destroy 2 cards if first played hand had only 2 cards

coral flume
#

Anyone know whats going wrong here?

daring fern
#

remove = true already does that.

rugged pier
#

ah

rugged pier
daring fern
# rugged pier ah

You should be doing ```lua
if context.destroy_card and context.cardarea == G.play and #context.full_hand == 2 then
return {remove = true}
end

rugged pier
daring fern
rugged pier
#

yeah

#

ah okay so it only needs a sepcification when im not removing the whole hand

#

it doesnt care about those held in hands or joker area

#

awesome

#

thanks this works

reef belfry
#

well that doesnt seem right

coral flume
coral flume
#

Creates a [Tarot] when played hand contains a [Rank] and a [Suit]

rugged pier
daring fern
rugged pier
#

awesome ty

daring fern
coral flume
#

Still aint working, maybe I messed up to hook

#

Its using some of example jimbos code for hooks

daring fern
coral flume
tall wharf
#

chat am i cooking

tall wharf
#

i azm stupid

shut crater
#

ok I thought I knew what I was doing but I'm still running into issues. Does anyone know things about card draw order?

#

currently: joker has a child cardarea, cards in cardarea draw on top of joker
goal: joker draws on top of cardarea

tall wharf
#

i hope to god this works

digital niche
#

what is the context for cards held in hand?

daring fern
digital niche
#

tyty!

wintry solar
#

It does depend on what you’re wanting them to do though

digital niche
#

just a enhancement that gives $6 when held in hand

#

like steel joker but gives $6 dollars

wintry solar
#

After scoring or during scoring?

digital niche
#

after scoring

wintry solar
#

context.after and context.cardarea == G.hand

digital niche
#

tyy!

tall wharf
#

is that it

digital niche
tall wharf
digital niche
#

i think you should make

vars = {ch = 1, mult = 1} instead of just vars = {1, 1}

#

but ive never messed with debuff or blind so im not sure

#

ive only messed with enhancements and some jokers so far

zealous glen
#

I think as is it should work

#

But I haven’t used collection localization variables

#

I just imagine they have the same syntax

zealous glen
#

It is better coding practice but the way Blinds are implemented it’s more like jank IMO

digital niche
#

what is the context for enhancements giving ppoints when held? like during scoring, like the steel card make

#

i forgor

#

and i lost the code that already had it

tall wharf
#

You are not safe.

willow plinth
#

no? why

tall wharf
#

what is this cursed logo

zealous glen
tall wharf
#

no

willow plinth
digital niche
#

why is it saying nil?

daring fern
digital niche
daring fern
digital niche
#

oh nvm its h_x_mult when it should be just x_mult

willow plinth
# digital niche

glad you found your issue, but a monospaced font could help you identifying problems faster btw

willow plinth
#

a font where every character has the same width

willow plinth
digital niche
#

ooh gotcha gotcha, ty!

willow plinth
#

it seems like just another preference thing but trust me

digital niche
#

how do i make it so a card only is removed after it is fully scored?

#

i have a card that after 3 uses is destroyed, but as soon as it is used the last time it is destroyed before scored

digital niche
daring fern
digital niche
#

but then how will the game know that it have to destroy after 0 uses?

digital niche
#

i think ill just catch some sleep and try again tomorrow, its already 5:34AM and i dont sleep since 11AM from yesterday

#

im too eepy to figure out how to do things

#

gngn

rustic swallow
#

how do you make a joker that bases its values from joker slots like joker stencil

digital niche
digital niche
digital niche
hasty mist
#

what do i put in loc_vars to make this show up properly?

daring fern
tall wharf
hasty mist
#

whoops

#

right

worn jacinth
hasty mist
#

i also think i've formatted these wrong too

worn jacinth
hasty mist
#

specifically the #1# part and the +(score) part

worn jacinth
#

Balatro font 💀

tall wharf
#

😭

shell timber
#

how do you use inter mod patching?

tall wharf
shell timber
#

oh yeah i figured that out

hard needle
#

what would the loc_vars function for the fortune teller look like

hard needle
gusty peak
#

Function that returns { vars = { card.ability.extra.<variable for mult gain>, card.ability.extra.<current mult variable> }}

shell timber
#

this was annoying to add but now colour cards have jokerdisplay support

hard needle
daring fern
#

It's all in card.lua

hard needle
#

how can i change the required score of the current blind?

desert ore
#

how should I word/format this? should I say "evenly divisible?" should I highlight Total? do I even need the word total?

daring fern
hard needle
#

balatro doesn't refer to money as "$$$" i think, as you see with wraith

desert ore
#

ok so the reason I have it not as 5 or 0, is that I might change the divisor to another number

hard needle
desert ore
#

if I determine 5 is too annoying to get consistently

hard needle
#

X3 Mult if hand is played with $5 or less xD

#

vagabond but mult fr

hard needle
desert ore
#

forgot about wraith

#

oh there's also ox isn't there

#

ok yeah money works then

hard needle
red flower
tall wharf
desert ore
#

I mean that just can't happen in vanilla right, and I wouldn't have any like that in my mod

tall wharf
#

people put a bunch of small mods together

#

i know one of my boss blind does it

desert ore
#

hmm

#

I don't know how it functions atm

#

with decimals

tall wharf