#💻・modding-dev

1 messages · Page 169 of 1

frosty dock
#

(also I highly recommend you use a real code editor)

graceful magnet
#

so like so

graceful magnet
graceful magnet
frosty dock
#

no

novel dagger
#

How do you do grey text in card descriptions

graceful magnet
frosty dock
dark kite
#

forgive me if im dumb as a rock but is there ways to make random rolls not overlap? say like, lucky card chances can overlap in their activation, but i want something to activate x OR activate y

frosty dock
frosty dock
cerulean rose
#

or you could use context.other_card:get_chip_bonus() like a reasonable person

frosty dock
graceful magnet
cerulean rose
#

yup

dark kite
#

ahh that makes sense

#

forgot theres such a thing as elseif for some reason

frosty dock
#

but fair

graceful magnet
#

if it accounts for base value, Bonus, and Hiker, all I want it to do

cerulean rose
#

cus i think of that as not being part of the chips scored by the card

frosty dock
cerulean rose
#

foil scores in a separate step

#

hiker bonus scores in the same step as base chips

frosty dock
#

or an enhancement that adds chips in main scoring calculation if you want something more comparable to bonus cards

cerulean rose
#

balatro_Balatro is weird man

frosty dock
cerulean rose
#

someone should make a 🅱️ joker

graceful magnet
#

for what I want, get_chip_bonus() seems like the right call

runic quiver
#

small update on that: the crash definitely comes from Saturn, it crashes when i sell a perkeo-affected card or just by starting a blind with one in hand. idk why though, so i just removed saturn sadly. going to sleep now but can maybe investigate tomorrow if someone knows his way around

wintry solar
#

supported now as select_card = {CardSet = 'area', CardSet = 'area'}, e.g. select_card = {Weapon = 'weapons', Tarot = 'consumeable'}

maiden river
#

huge

#

thanks 🙏🏿

wintry solar
runic quiver
#

you sure do know your way around lua lol. i might try to learn exactly what happens one day or so

#

thanks a lot, i'll try fixing that tomorrow

#

thanks so much anyway

rapid trail
#
SMODS.Joker {
  key = 'ethereal_j',
  loc_txt = {
    name = 'Ethereal Joker',
    text = {
      "Each played Planet Card gives",
      "a Tarot Card"
    }
  },
  rarity = 1,
  atlas = 'vopjs',
  pos = {x = 1, y = 0 },
  cost = 6,
  loc_vars = function(self, info_queue, card)
  end,
  calculate = function(self, card, context)
    if context.using_consumeable then
      if context.consumeable.ability.set == 'Planet' then
        local card = copy_card(pseudorandom_element('Tarot', G.consumeables, pseudoseed('ethereal_j')), nil)
        card:add_to_deck()
        G.consumeables:emplace(card)
      end
    end
  end
}

Y'all know what's wrong with this? The game runs fine now until I try to open a planet booster, then crashes saying something about randomseed errors

iron iron
#

@novel dagger

#

sorry eremel didnt mean to ping you

glad osprey
sullen fern
#

how would i impliment something like this

glad osprey
#

steal the code from stencil ?

timid parrot
#

Isn’t that just stencil?

solar eagle
glad osprey
glad osprey
solar eagle
#

its YOU

glad osprey
#

ITS you

timid parrot
crisp coral
#

Despite everything, it's still you.

solar eagle
#

im just here to figure out if you can make a boss blind manually trigger the debuff sound and visual effect

timid parrot
#

To me it just looks like stencil but with 1.5X instead of 1X

sullen fern
#

see, i changed it!

glad osprey
timid parrot
#

Or wait

#

My brain

glad osprey
#

very clever

timid parrot
#

Either way yeah just rip off stencil

sullen fern
#

so basically it would just be “1.5x mult for every negative joker”

timid parrot
#

More unique

#

Then you can adjust the numbers as you see fit

#

And the rarity cuz that definitely isn’t common lol

sullen fern
#

i didnt bother to change the rarity on balaui

#

i use balaui to conceptualize jokers sometimes

timid parrot
#

Ah makes sense

sullen fern
#

anyways, two more jokers from me

solar eagle
#

dont stone cards mostly do that anyway?

#

well, kinda - they flag as having no suit not any suit

timid parrot
#

I take it the Casino Night Zone is not recursive?

sullen fern
#

no

#

it’s not

#

because that would be broken!

timid parrot
#

It would be but the thought experiment is funny

glad osprey
#

might wanna add "excluding Casino Night Zone" to its description

timid parrot
#

Enabling rock flushes is actually an interesting concept

sullen fern
#

oh yeah i’m referring to these jokers i made

#

all sega genesis themed

wintry swallow
#

what does arranging child notes vertically mean

#

are children of column node supposed to align as A B C or
A
B
C

solar eagle
#

where is the splash handling code??

#

im trying to replicate how it makes all cards score but i dont know Where it does things

sullen fern
#

whats fun about making balatro mods is making descriptions for jokers and delaying the inevitable

scarlet spire
#

is there a context for when a poker hand gets upgraded? there's a context for consumables being used that I could filter for planet cards only, but that ignores other methods of upgrading hands, i'd imagine (unless it doesn't?)

scarlet spire
#

constellation triggers specifically on planet cards, though

solar eagle
#

ahh i see what you mean

#

i dont believe there's one by default

paper zealot
#

Any good/best practices for cross-mod compatibility? If i were wanting to hook into a function for Trance, is it as simple as something like this?

local g_funcs_set_Trance_font = G.FUNCS.set_Trance_font
function G.FUNCS.set_Trance_font(...)
    local ret = {g_funcs_set_Trance_font(...)}
    SystemClock.reset_clock_ui()
    return unpack(ret)
end

Any other checks or compatibility notes required?

glad osprey
crisp coral
#

or you'd be calling nil

solar eagle
#

card.lua and game.lua but i searched for 'Splash' and found nothing??

#

i assume its where the code that handles which cards get scored and which dont are but i have No iDea where that is

crisp coral
#

Splash is in... functions/common_events.lua i think?

glad osprey
#

idk if that helps or not but i found smth

crisp coral
#

that function is for setting variables inside the description

glad osprey
#

ah

solar eagle
solar eagle
#

im not seeing it, or its not referenced by name

crisp coral
#

i omor

#

it's in one of those functions files

glad osprey
#

FOUND IT

#

@solar eagle functions/state_events

crisp coral
#

close enough

glad osprey
#

now way itsd abbier from mindstorm

upper ibex
#

i want to make a joker that retriggers all luck based effects

how would i go about coding that?

like in the sense that
when something like a lucky card is played
and it rolls the 1 in 5 and 1 in 15 odds
i want it to make the lucky card roll those odds a second time

or for example a heart card is played and i also have bloodstone
and it rolls that 1 in 2 to give that x1.5 mult
i want it to do it again

solar eagle
#

aha so this will be a lovely patch

solar eagle
glad osprey
#

dam

solar eagle
#

the way probability in the game works, you call pseudorandom and it spits out a number between 0 and 1

glad osprey
#

so

#

just

solar eagle
#

you divide G.GAME.probabilities.normal by your 1 in N chance

#

then if pseudorandom is in that range, you hit the probability

#

what you'd probably want to do is hook pseudorandom? im not sure

glad osprey
#

question does lua not have select statements

solar eagle
#

select statements?

glad osprey
#

match

wintry swallow
#

no switch case

glad osprey
#

like

#

dam

#

that explains these

solar eagle
#

yea its annoying

#

me when probability

crisp coral
#

if it works it works

wintry swallow
#

itd still be solved with oop tbh

crisp coral
#

whats this for

plush cove
solar eagle
plush cove
solar eagle
#

lucky cards on steroids basically

scarlet spire
#

this context occurs after a card has been played, and means removing it from the deck for the rest of the blind, right? it's a bit vague

crisp coral
#

(Canio, etc.)

upper ibex
crisp coral
#

the context you're looking for is destroying_cards

glad osprey
#

also random question, are spectral cards based on anything

wintry swallow
#

nah

glad osprey
#

like how tarot cars are actual tarot cards

solar eagle
glad osprey
#

ok cool

#

time to make an evil strength spectral card

solar eagle
wintry swallow
#

i feel like one of these is wrong

glad osprey
# solar eagle

yes except it makes sense since that isnt a tarot card

scarlet spire
crisp coral
solar eagle
glad osprey
#

urgh i like really wanna make a mod but ive got zero ideas

glad osprey
crisp coral
solar eagle
glad osprey
#

peak

scarlet spire
#

I see, thanks

plush cove
wintry swallow
# crisp coral neither is wrong

money colored box has 2 rows but is in column mode, in the other image container is in column mode but has 3 columns, what am i missing?

solar eagle
plush cove
glad osprey
#

testosterone converts any card to a king (including jack bcus thats the third gender)

crisp coral
glad osprey
#

pueberty blockers for jack

mystic river
#

ah yes, the three genders

wintry swallow
scarlet spire
crisp coral
plush cove
#

for the transgenderism tarot cards, would the card have the "Transgender" enhancement and have its background become the pride flag

solar eagle
#

it turns all your cards into gold cards

scarlet spire
#

is hooking not in the documentation?

solar eagle
#

hooking is part of lovely not steamodded

scarlet spire
#

ahh okay

untold pilot
#

whats the context i use to run code when a specific hand type is played?

#

im making yaoi/yuri cards that reset when a straight is played

twilit cargo
gaunt thistle
tepid crow
west wing
#

I have a weird problem. I sent my friend a stripped template folder to give them a quickstart with making their own mod. Neither this nor a changed version of this template show up in their Mods list, but both show up in my Mods list.

Both mods are set up the exact same way in the exact same place (that being, with the rest of our mods). What are we missing?

gaunt thistle
#

100% refer to the link Larswijin shared

small moon
#

Friend is making a mod, and this is her calculate function rn, what's weird is the game just crashed saying "other_card is nil"

calculate = function (self, card, context)
    if context.cardarea == G.play and context.individual then
        if pseudorandom('wah_nurture') < G.GAME.probabilities.normal/15 then
            G.E_MANAGER:add_event(Event({func = (function() context.other_card:set_seal("Red", nil, true); return true end)}))
            return {
                message = "EWNIAH",
                colour = G.C.GREEN,
                card = card
            }
        end
    end
end
normal crest
#

by the time the event runs context could have been modified and you can't guarantee it'll be there

#

you should store the value of context.other_card in a local variable outside the event and use it instead inside the event

hollow zenith
#

Hihi! Im working on a Spanish Suits texture pack but i cant get it to show up in the game its self. I mean- the game starts up and the mod its self shows up in the mods area but the textures just dont show up? Im trying to figure out if its the code of the .lua file or something else

Anybody having the same problem?

edit: this has been solved!

cerulean rose
orchid thunder
#

Anyone?

stiff locust
#

mentioned

west wing
cerulean rose
#

make sure they don't have their folders double nested

#

ex. Mods/Cryptid/Cryptid/…

plush cove
west wing
#

Waiter, there's Cryptid in my Cryptid

plush cove
#

hmm yes the cryptid is made out of cryptid

vocal verge
#

quite cryptid

halcyon torrent
cerulean rose
#

cry_icon(cry_icon())

west wing
halcyon torrent
#

hi :3

vocal verge
#

as cryptic as bigfoot hitting the griddy

west wing
cerulean rose
#

are you both using the same version of steammodded?

west wing
#

"min_version": "1.0.0~ALPHA-1030e"
Mine is 1122a

halcyon torrent
untold pilot
#

is there a way to separate purchase price from sell price and set them to independent values?

cerulean rose
#

latest version is 1409a

west wing
cerulean rose
#

it absolutely does

untold pilot
#

i guess ill look at that

west wing
#

the minimum version is less than either of our versions and it works for my version. i'll tell them to boost the min version for their files but we have a bunch of other mods that are perfectly functional

cerulean rose
#

mod metadata handling might've changed idk

solar eagle
#

for this section on SMODS.Consumable, would i set the parameters as

  soul_rate = 0.005
}```
?
#

or is soul_rate something else

solar eagle
#

how would you display an info_queue for a seal? like how you can do info_queue[#info_queue + 1] = G.P_CENTERS.m_enhancement for enhancements

#

oh its just part of "Other" ok

west wing
scarlet spire
#

how can I prevent a playing card from being debuffed via a seal/enhancement/whatever?

normal crest
vocal verge
#

truthy and falsy

scarlet spire
#

truthy and falsy...

vocal verge
#

sounds liek some cocomelon shit

void pecan
normal crest
normal crest
manic rune
#

im new to booster packs so idk what im actually doing here, the green particles r there at all times + flashing weirdly, and also that "ERROR" on top of Choose 2, how do i fix all of them?

cerulean rose
#

for the particles, make sure to set skip_materialize = true

#

also kind should be a string value

#

it acts as a key for booster pack types

manic rune
#

ah, i see

#

so it would be smt like this?

cerulean rose
#

nope, that would put it in the same pool as the standard arcana packs

manic rune
#

huh, so the kind should be different from them?

cerulean rose
#

yeah

manic rune
#

alright, thanks, though i have an additional question now, how would you use "kind"?

cerulean rose
#

when spawning a booster pack

manic rune
#

oof, didnt seem to fix it

south folio
#

trying to make a joker that behaves like DNA but for face cards (Played face cards are copied twice to Hand when hand size is 1) having problems where it doesn't wanna copy the card to the deck

runic pecan
#

Would it be equivalent if I move this to the calculation function instead?
Like, does every possible case of changes in consumeable slot run through calculate_joker?

cerulean rose
solar eagle
#

on a consumable, is this structure correct to give this card a 7.1% chance to spawn?

cerulean rose
#

yeah

solar eagle
#

perfect ty

manic rune
runic pecan
#

Was experimenting with patches but wow, this is new to me. Like, very new.

cursive glade
#

What's the global variable for the count of how many times a specific hand was played this run?

cerulean rose
#

check supernova ctrlv

manic rune
#

thanks ;D the particles r gone now, though how do i change this "ERROR" part?

cursive glade
south folio
cerulean rose
#

copied cards is never updated

south folio
#

copied cards is never updated?

cerulean rose
south folio
#

:(

cerulean rose
cerulean rose
south folio
#

O

#

no but actually what does it mean

manic rune
scarlet spire
#

how can I detect if a card is changing in some way (i.e. a card is being used to change the seal, enhancement, etc)?

cerulean rose
#

hook Card:set_seal

scarlet spire
#

I have a seal that applies prevent_debuff to a card, but I can't figure out a clean way to remove it once the seal is gone, so it's just never debuffable again

#

ah

#

actually, figured out a safer way to do it that doesn't go around applying semi-permanent anti debuffing to cards

timid star
#

how do i make it so that card_eval_status_text trigger immediately instead of it waiting for the round to end?

#

i am struggling to figure out how it might work like activating per card animation just like how returning a message works

#

unless im using the event manager wrong

normal crest
#

What's your code

timid star
#

trying to make it show the process of chips being changed and then mult

#

but the events always end at the very end of the scoring animation

normal crest
#

you should be able to just return multiple effects and replace the message

#
return {
  chips = whatever,
  mult = whatever,
  chip_message = "whatever",
  mult_message = "whatever",
}

as a random example

normal crest
#

assuming you're using a recent version of steamodded yes

#

it will replace the default chips message

timid star
#

yeah i had to update my steamodded from the version cryptid uses to the recent one

normal crest
#

then that should work

#

as a replacement for all your code in joker main

#

actually it's "chip_message" without the s

timid star
#

also what's the boolean arg for the second value on set_ability for

normal crest
#

and whatever you return there will be evaluated on each card

#

i'm not sure why you're using pre_joker

timid star
solar eagle
#

is it possible to lovely patch steamodded code?

timid star
#

yep it's a table, i figured it out

normal crest
#

if you want to make a card show a message at any point in time you can always do
SMODS.calculate_effect({ message = "whatever" }, card)

#

and you can add instant = true to that table if needed

timid star
#

yeah i'll try that, along with another joker to see if it helps

frosty dock
timid star
#

i don't think the numbers look right

normal crest
#

can you send the entire calculate function

normal crest
timid star
#

yeah isn't it adding the numbers again?

normal crest
#

when returning effects they are applied automatically to the hand, so you shouldn't need to set hand_chips or mult before

timid star
#

i can just set those to 0 when calculating so it returns the exact numbers

void pecan
#

mmmmmm what did I do

timid star
#

wait have to tweak it a bit more

normal crest
#

i mean sure, that works, but I was more thinking like

local chips = mod_chips(hand_chips * blah blah)
local mult = mod_mult(mult + chips)

return {
  chips = chips,
  mult = mult,
  blah blah
}
normal crest
normal crest
#

to each their own i guess

#

if it works it works

timid star
#

i mean well it works like that

timid star
#

same with mult

normal crest
#

yeah you'd have to multiply by card.ability.extra.xchip - 1 instead

timid star
#

though. xchips work i think?

normal crest
#

either way

#

if it works it works

timid star
#

true

#

just have to fix the card wiping thing

bold sleet
#

Hello, question: Is there a way to get the enhancements, editions and stuff from any given card?

timid star
normal crest
#

check not context.repetition

normal crest
wicked spire
#

I'm trying to make a Joker with the description of:

Gains +1 Mult for each card scored, resets at end of round.
(Currently +0 Mult)
I have it in game and the description is right, but the Mult doesn't increase when I score a card. Is anyone able to help me see what I'm doing wrong?

SMODS.Joker {
    key = "my_joker",
    loc_txt = {
        name = "My Joker",
        text = {
            "Gains {C:mult}+#2#{} Mult for",
            "each card scored,",
            "resets at end of round.",
            "{C:inactive}(Currently {C:mult}+#1#{C:inactive} Mult)"
        }
    },
    config = { extra = { mult = 0, mult_gain = 1 } },
    cost = 5,
    rarity = 1,
    blueprint_compat = true,
    perishable_compat = true,
    eternal_compat = true,

    atlas = "MyMod",
    pos = { x = 1, y = 0 },
    
    loc_vars = function(self, info_queue, card)
        return {
            vars = {
                card.ability.extra.mult,
                card.ability.extra.mult_gain
            }
        }
    end,
    
    calculate = function(self, card, context)
        -- When a card is scored, upgrade joker
        if context.main_scoring and context.cardarea == G.play and not context.blueprint then
            card.ability.extra.mult = card.ability.extra.mult + card.ability.extra.mult_gain
            return {
                card = card,
                colour = G.C.MULT,
                message = localize("k_upgrade_ex")
            }
        end
        
        -- When joker is triggered, add mult
        if context.joker_main then
            return {
                message = localize {
                    type = "variable",
                    key = "a_mult",
                    vars = {
                        card.ability.extra.mult
                    }
                },
                mult_mod = card.ability.extra.mult
            }
        end

        -- At end of round, reset mult
        if context.end_of_round and context.cardarea == G.jokers then
            card.ability.extra.mult = 0
            return {
                card = card,
                colour = G.C.MULT,
                message = localize("k_reset")
            }
        end
    end
}
manic rune
timid star
normal crest
#

you should replace it with context.individual to run on every scored card

scarlet spire
#

I'm applying shaders to seals, and the 'voucher' shader works fine for giving a shiny effect, but isn't nearly as visually strong as what appears on the gold seal?
apparently, looking at the code, the gold seal does just use 'voucher', even though there's a separate 'gold_seal' shader in the files? and attempting to use gold_seal just crashes my game

wicked spire
normal crest
wicked spire
#

oh true good catch thanks, so that would just be ```lua
if context.end_of_round and context.cardarea == G.jokers and not context.blueprint then
-- (...)

void pecan
#

nvm its the json

normal crest
void pecan
#

{
    "id": "gambling",
    "name": "Gambling",
    "version": "1.0.0",
    "description": "Adds a 50% chance for a tarot card to either turn all Jokers into Poly or destroy them.",
    "author": "Hallowed",
    "main": "main.lua"
}
#

I have 0 idea on metadata files, so don't judge if this is wrong

normal crest
#

you're missing a lot of information, and it's main_file not main

normal crest
foggy carbon
#

while in the middle of defining a table, can I do something like this if I want two attributes to be the same?

  var1 = {
    -- definition of big table
  },
  var2 = var1
}```
#

doesn't look like it

wintry swallow
normal crest
#

I don't see why you'd need to do that

normal crest
manic rune
wintry swallow
#

i didnt open this issue

#

true though

manic rune
#

meta trash bag 🗣️

void pecan
#

I feel very dumb for not knowing my errors

I'm very sorry if this is easy 😭

plush cove
normal crest
void pecan
normal crest
#

to what

void pecan
normal crest
#

if your game is crashing that's a sign your code broke smt

normal crest
#

so your mod is running

void pecan
#

I'm looking through API to do it step by step what I want to do, maybe that will help

scarlet spire
frosty dock
wintry swallow
#

true

#

wish it was more wikipedia like

scarlet spire
#

is there an always_scores = true but for seals instead of enhancements?

#

or do I have to make that myself

frosty dock
#

and I'm not gonna look through the wiki to search for it

wintry swallow
#

lemme find it

frosty dock
wintry swallow
#

shots fired at wilson i suppose

void pecan
#

im getting an error idk how to fix 😭
I may be new to this

wintry swallow
scarlet spire
frosty dock
normal crest
void pecan
frosty dock
void pecan
#

and PLEASE judge as I have little idea on what i'm doing

#

local tarotCard = SMODS.Consumable({
    key = "tarot_card_joker_effect",
    loc_txt = {
        title = "Balance",
        description = "50% chance to turn every joker polychrome, 50% chance every joker is destroyed"
    },
    image = "Tarot.png",
    rarity = "common",
    unlocked = true,
    discovered = true
})

tarotCard.in_pool = function(self, args)
    return true, { allow_duplicates = true }
end

local rarityCommon = SMODS.Rarity({
    key = "common",
    loc_txt = { name = "Common" },
    pools = {
        ["Consumable"] = { rate = 1.0 }
    },
    badge_colour = {0.5, 0.5, 0.5},
    default_weight = 10
})


tarotCard.use = function(self, card, area, copier)
    if math.random() < 0.5 then
        local jokers = SMODS.GetAllObjectsOfType("SMODS.Joker") or {}
        for _, joker in ipairs(jokers) do
            joker:set_sprites(card, "polychrome_sprite")
        end
    else
        local jokers = SMODS.GetAllObjectsOfType("SMODS.Joker") or {}
        for _, joker in ipairs(jokers) do
            joker:remove_from_deck(false)
        end
    end
end

frosty dock
#

my guess is you have a consumable with a set that doesn't correspond to any valid pool

maiden phoenix
frosty dock
#

i correct, no set at all

normal crest
#

pretty good guess

void pecan
frosty dock
#

no, you never reach that function

normal crest
normal crest
frosty dock
#

set = 'Tarot'

#

assuming it should be a tarot

void pecan
frosty dock
#

also I have some questions

void pecan
frosty dock
#

a lot of what you're doing just isn't how steamodded works

normal crest
#

i'd love to see what you used to base your code in

void pecan
frosty dock
#

e.g. image = "Tarot.png", is not used (or referenced anywhere I know of) to specify the spritesheet of a card

normal crest
#

chatgpt?

frosty dock
#

SMODS.GetAllObjectsOfType just doesn't exist

frosty dock
void pecan
#

so like half lol

frosty dock
#

joker:set_sprites(card, "polychrome_sprite") also isn't how that works in the slightest

#

it's not how you make a card polychrome, and it's not the right arguments to Card:set_sprites either

frosty dock
void pecan
void pecan
frosty dock
#

in fact polychrome doesn't even have a sprite

void pecan
#

I just can't find what I need to find on the API, Idk how to look for what I need

void pecan
frosty dock
#

start by looking through the docs

GitHub

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

maiden phoenix
#

Gonna tell people to use nonexisting SMODS function balatrojoker

frosty dock
#

also does your tarot really need a rarity? Thonk

#

seems like it would break a lot of things unless you give all other tarots rarities too

maiden phoenix
#

Mod cross compat gonna be hell unless you're somehow able to give them a default rarity

void pecan
edgy reef
#

But idk that would work cleanly, and I still have god knows how much more to annotate.

frosty dock
#

uh

#

the simplest solution i can think of is this

#

introduce a default bool to rarities and assume only one rarity for an object type has it

#

then just use that when there's no rarity

#

maybe that's a bit backwards and the object types should have a default rarity instead

scarlet spire
#

hm, I'm seeing the function for always_scores in the smods code, but I'm not entirely sure what i'd need to do in the hook in order to make it seal compatible

void pecan
#

I looked through a lot of this, I may have missed it but how do I modify jokers? As in making them holo or poly?

I didn't see much in Jokers, Edition, Rank, and others

frosty dock
frosty dock
#

you sent that just as i pasted the link in smh

void pecan
frosty dock
void pecan
#

to check if it works, do I litterly just have to to go in the game and pray I see it 😭

wintry solar
#

Nah just ship it and hope it works

normal crest
#

They probably meant see in collection

frosty dock
#

ion think so

nocturne garnet
frosty dock
#

that doesn't confirm if it works, it just confirms if it's there

south folio
#

eyea

#
SMODS.Joker{
    key = 'j_calibri',
    loc_txt = {
        name = 'Calibri',
        text = {
            'Played {C:attention}face cards{}',
            'are copied {C:attention}twice{} to Hand when hand size is 1',
        },
    },
    atlas = 'Jokers',
    rarity = 3,
    cost = 3,
    unlocked = true,
    discovered = true,
    blueprint_compat = false,
    eternal_compat = true,
    perishable_compat = true,
    loc_vars = function(self, info_queue, card)
        return {}
    end,
    pos = {x = 1, y = 1},
    
    calculate = function(self, card, context)
        if context.after and context.played_cards and #G.hand.cards == 1 then
            local copied_cards = {}

            for _, v in ipairs(context.played_cards) do
                if v:is_face() then 
                    for i = 1, 2 do
                        local _card = copy_card(v, nil, nil, G.playing_card)
                    return
                        G.hand:emplace(_card)  
                        _card.states.visible = true

                        G.E_MANAGER:add_event(Event({
                            func = function()
                                _card:start_materialize()
                                return true
                            end
                        })) 

                        table.insert(copied_cards, _card)
                    end
                end
            end

            if #copied_cards > 0 then
                return {
                    message = localize('k_copied_ex'),
                    colour = G.C.CHIPS,
                    card = self,
                    playing_cards_created = copied_cards
                }
            end
        end
    end
}```
south folio
frosty dock
#

there is no such thing as context.played_cards

nocturne garnet
south folio
#

im fucking stupid

nocturne garnet
#

most useful joker of all time

frosty dock
#

also G.hand is cards held in hand

wintry solar
#

I wish discord didn’t format code blocks like shit on mobile

frosty dock
#

not played cards

normal crest
#

What a pain to read

frosty dock
#

also what the return doing

frosty dock
south folio
#

I just kinda. copied the dna joker

scarlet spire
#

I thought i've seen it with syntax highlighting before

wintry solar
#

At least it doesn’t wrap every line though

frosty dock
#

you're just returning in the middle of the function-?

wintry solar
#

It’s two screens long on my phone 😭

scarlet spire
#

ah you have to specify

#

I see

south folio
void pecan
frosty dock
#

just make sure it isn't nested

normal crest
#

Or rather programming itself

frosty dock
south folio
#

fair fair

void pecan
south folio
#

sorry guys

normal crest
scarlet spire
# frosty dock no but you can hook SMODS.always_scores to add it

would you mind helping me with this? I'm still quite new to balatro modding (and lua, though i've learned a lot the past few days) so while I know what hooking is, I have no idea what i'd actually need to change about the function to make it compatible with seals

wintry solar
normal crest
#

That is nesting indeed

wintry solar
#

Everything is nested wooooo

void pecan
#

I see, it might be nested

#

possibly

normal crest
#

Maybe you need another nested Mods folder, surely that'll fix it

frosty dock
void pecan
frosty dock
#

then you could put always_scores = true into a seal's config and this function will mark it as always scoring

#

the more "hardcoded" way would be to check for your seal directly

scarlet spire
#

I see, thank you very much

normal crest
scarlet spire
#

it would be nice if functionality was more universal between seals, enhancements, and editions, but obviously way easier said than done

frosty dock
#

we're a good step closer to that with better calc

wintry solar
#

I can see always scoring being a property of all 3

scarlet spire
#

ooh, that's nice to hear

frosty dock
frosty dock
wintry solar
#

True

scarlet spire
#

sometimes I forget about stickers

wintry solar
#

I wasn’t really sure how should apply worked either when briefly looking at it last night

#

It has a lot of arguments 😂

frosty dock
#

i wish lua had clean optional chaining

#

imagine G.P_CENTERS[card.edition?.key]?.always_scores

normal crest
#

won't you get nil in the index there if it has no edition

#

Idk if that's a problem in lua

wintry swallow
#

it has a 3mb compiler chill

frosty dock
#

pretty sure that's fine so long as I don't try to assign to it

normal crest
#

odd

void pecan
#

just tell me what i did wrong ATP

local tarotCard = SMODS.Consumable({
    key = "tarot_card_joker_effect",
    set = 'Tarot',
    loc_txt = {
        title = "Balance",
        description = "50% chance to turn every joker polychrome, 50% chance every joker is destroyed"
    },
    unlocked = true,
    discovered = true
})```

If you need more tell me
normal crest
#

Change title to name

#

Description to text

frosty dock
frosty dock
void pecan
# frosty dock

so I make my thing

loc_txt = {
name = 'Balance',
text = { '50% chance to turn every joker polychrome, 50% chance every joker is destroyed'}
}

normal crest
#

You will have a very long line but yes

void pecan
fallen pelican
#

split the lines in the description as
"line 1",
"line 2",
"line 3"

frosty dock
void pecan
#

yeah, but that wouldn't change my issue 😭

normal crest
#

Putting what is 5 lines ingame into one line of code just feels extremely wrong

normal crest
void pecan
frosty dock
#

it's already more than a full page at normal scale

normal crest
frosty dock
#

-# not sure who left this outdated info here, that's no longer in use for anything

void pecan
# normal crest What's your Entire code

not much changed, there WILL be errors


local tarotCard = SMODS.Consumable({
    key = "tarot_card_joker_effect",
    set = 'Tarot',
    loc_txt = {
        name = 'Balance',
        text = {"50% chance joker will turn polychrome", "50% chance every joker is destroyed"}
    },
    unlocked = true,
    discovered = true
})

tarotCard.in_pool = function(self, args)
    return true, { allow_duplicates = true }
end


--ignore this I WILL READ THE DOCS
tarotCard.use = function(self, card, area, copier)
    local jokers = SMODS.GetAllObjectsOfType("SMODS.Joker") or {}

    if #jokers == 0 then
        SMODS.DisplayMessage("No jokers available.")
        return
    end

    if math.random() < 0.5 then
        for _, joker in ipairs(jokers) do
            joker:set_edition("polychrome", true, false)
        end
        SMODS.DisplayMessage("All jokers are now polychrome!")
    else
        for _, joker in ipairs(jokers) do
            joker:remove_from_deck(false)
        end
        SMODS.DisplayMessage("All jokers have been destroyed!")
    end
end

frosty dock
#

why are the functions outside the constructor 🤔

wintry solar
#

Probably using cryptid as a reference 🙃

normal crest
#

no, it was chatgpt

#

Look at that use function

wintry solar
#

Oh god really

void pecan
frosty dock
wintry solar
#

Huh I thought it did, maybe I am misremembering

#

Something definitely does

void pecan
#

Pushing aside the horrid chatgpt code, what do I need to manually fix to get it registering properly 😭

south folio
#

oh yeah i was also using chatgpt-

frosty dock
normal crest
wintry swallow
#

what are units in ui size? is it relative?

normal crest
void pecan
#
local tarotCard = SMODS.Consumable({
    key = "tarot_card_joker_effect",
    set = 'Tarot',
    loc_txt = {
        name = 'Balance',
        text = {"50% chance joker will turn polychrome", "50% chance every joker is destroyed"}
    },
    unlocked = true,
    discovered = true
})

thats all of the code I am using

normal crest
#

What version of steamodded are you using

#

It says at the top right while ingame

void pecan
normal crest
#

honestly I've no idea

void pecan
#

ima sleep and figure out tomorrow, thank you guys for a bunch of help TThappy

(I have no idea how im going to figure it out)

normal crest
#

Maybe change the key to something else

#

What's your mod prefix in the json

void pecan
normal crest
#

that should be fine

void pecan
normal crest
#

No

void pecan
#

alr good

#
{
    "id": "gambling",
    "name": "Gambling",
    "author": ["Hallowed"],
    "description": "adds stuff",
    "prefix": "hola",
    "main_file": "main.lua",
    "priority": 0,
    "badge_colour": "FF230B",
    "badge_text_colour": "FF230A",
    "version": "1.0.0",
    "dependencies": []
}
#

this is my json

normal crest
#

Idk everything looks fine

#

did you try changing the key of the consumable to something else

#

I doubt it'll do anything but I'm out of ideas

#

also I assume you got rid of the nestsd Mods foldrr right

void pecan
#

and changing it didnt help

normal crest
#

And I assume you've restarted your game since changing it

void pecan
#

wait huh??

I changed set to "spectral", why is it tarot?

normal crest
#

have you been saving your changes

void pecan
#

maybe i'm editing the wrong main.lua somehow

wintry solar
#

Are you editing a different file?

normal crest
#

probably

plush cove
void pecan
#

I somehow DUPED the folder then edited the wrong one........

void pecan
#

nowwww how do I change the image?

#

(only spectral for test)

#

im going to... read the docs

#

I need help sadHamster

#

is it "set_sprites(self, card, front)"

normal crest
#

no

#

what sprite do u want it to be

void pecan
normal crest
#

you need to make an atlas

void pecan
normal crest
#

An atlas from read the docs

normal crest
#

Thank you

#

Gifs are broken for me on phone

#

i couldn't send it

void pecan
#

ima sleep and do this tomorrow

frosty dock
#

didn't you already say that like half an hour ago

void pecan
#

buts its 3:00am now so the spooky monsters will get me if I don't sleep

runic pecan
#

Which one looks better?
OK, right side it is.

prisma loom
#

How hard it'll be to implement these? And just in general how complicated it is to add new seals?

violet void
#

Adding seals is fairly easy
Green seal doesnt look complicated (can peek at hook's code), but black seal does look interesting

wintry solar
#

They’re both fairly straightforward

prisma loom
#

can u link it?

runic pecan
runic quiver
runic pecan
south folio
#
calculate = function(self, card, context)
        if context.before and context.cardarea == G.play and #G.hand.cards == 1 then
            G.E_MANAGER:add_event(Event({
                func = function()
                    local copied_cards = {}
                        for _, scoring_hand in ipairs(context.scoring_hand) do
                            if scoring_hand:is_face() then 
                                for i = 1, 2 do
                                    local _card = copy_card(played_card, nil, nil, G.hand)
                                    G.consumeables:emplace(card)
                                    card:add_to_deck()
                                return true
                            end
                        })) 

                    end
                end
            end
        end
    end```
#

just wonderin, is this any better?

scarlet spire
#

though that's the wrong one, for the green seal, you'd wanna take a look at the code for the serpent boss blind I think

runic pecan
#

Series of train wreck

violet void
#

with draw_from_deck_to_hand

runic quiver
#

small question about that. did you find where in the code was the problem?? i'm trying to fix it but it's not easy for me

bold sleet
#

hello again. Is there a way to check if a card is negative?

wintry solar
frosty dock
runic quiver
violet void
#

If Im making a joker that converts to next/previous suit, what would be the correct list to reference if I want to account for custom suits

#

this one doesnt seem to be correctly ordered

wintry swallow
#

i dont think suits are ordered

violet void
#

Isnt this the order?

#

There is even a mod that changes it

frosty dock
#

SMODS.Suit.obj_buffer is what you need, possibly in reverse

wintry solar
bold sleet
#

how do i do the set_edition thing for custom editions? All of them work except for the last one

bold sleet
#

nevermind, I am a bit stupid.

#

the other dev named the edition 'Polished' instead of 'polished'. It is fixed now.

runic quiver
wintry solar
#

I haven’t changed it as I don’t use Saturn

runic quiver
#

ah, i thought you knew how to fix it

#

sorry

wintry swallow
#

in the ui code, is there a heuristic for how long 1 is? is it a multiple of pixels or something?

runic pecan
#

Which format looks better?

wintry swallow
#

right cuz its 1 line shorter

wintry solar
#

The break shouldn’t be between the number and the counter

#

But the left is better imo

#

Unsure on the need for a reminder of what is odd or even too

wintry swallow
#

how else am i supposed to know what 7 is

runic pecan
wintry solar
#

Yes

#

Let me grab code example

#

Oh hang on all my custom tooltips use a custom function

#

I’m pretty sure if you just do {set = ‘Set’, key = ‘key’} it’ll pull it from the relevant place in your loc table

runic pecan
wintry solar
#

Are you using a localization file?

runic pecan
#

Currently no. Am looking for a temporary solution.
I do understand that putting it in localization files is the long term solution though, just haven't bothered to set them up yet.

wintry solar
#

need to use process_loc_txt then

runic pecan
#

As in, info_queue[#info_queue+1]={process_loc_txt={}}?

wintry solar
#

no no, the function

runic pecan
#
end```Like this?
wintry solar
#

no

#

its a function that adds stuff to the loc tables

#

I dont remember how to use it though becuase loc files are infinitely better

#

and have been the standard use for months

runic pecan
#

OK, loc files it is, then.

runic quiver
#

ok i fixed the saturn thingy, just used the old-calc version of smod

#

that worked for some reason

primal robin
#

Because better-calc is "breaking change" which leads to bugs if not modify mod

wintry solar
#

this is more of an issue with saturn doing something really weird

runic pecan
#

Umm...

wintry swallow
#

why is it 22

runic pecan
runic pecan
wintry swallow
#

but its an even number 😭

runic pecan
wintry solar
#

might need a specific_vars arg, I dont remember

violet void
prisma loom
#

What is Badge Color?

broken cliff
#

color of the seal perhaps

wintry solar
#

its the colour of the badge

prisma loom
#

would it affect png I use?

broken cliff
#

hm

prisma loom
#

this is from baladrone mod

#

what is that cs keeper thingy?

wintry solar
#

the little bubble on the tooltip that tells you the name of the seal

#

it has nothing to do with your image

prisma loom
#

understood

runic pecan
#

How do I simplify this with SMODS utility functions?

runic pecan
violet void
merry raven
prisma loom
#

this mb?

#

so I came down to this but I have no idea where to look for the function which forces the card to score

#

Splash Joker?

runic pecan
merry raven
#

Oh so they're pairing both flip and juice_up?

wintry solar
violet void
# merry raven What did you use to create that more dynamic flipping animation? `card:flip()` d...

I use this utils

cs_utils.flip_cards({target})
cs_utils.unflip_cards({target})

-- Uses game Flip Cards logic
function cs_utils.flip_cards(table, trigger, delay)
    for i=1, #table do
        local percent = 1.15 - (i-0.999)/(#table-0.998)*0.3
        G.E_MANAGER:add_event(Event({trigger = trigger,delay = delay,func = function() table[i]:flip();play_sound('card1', percent);table[i]:juice_up(0.3, 0.3);return true end }))
    end
end

-- Uses game Unflip Cards logic
function cs_utils.unflip_cards(table, trigger, delay)
    for i=1, #table do
        local percent = 0.85 + (i-0.999)/(#table-0.998)*0.3
        G.E_MANAGER:add_event(Event({trigger = trigger,delay = delay,func = function() table[i]:flip();play_sound('tarot2', percent, 0.6);table[i]:juice_up(0.3, 0.3);return true end }))
    end
end```
prisma loom
#

btw I havent found any code related to Splash Joker

#

wtf

random sleet
#

splash doesn't have a calculate function

#

its just hardcoded into how hand scoring is determined

prisma loom
#

where should I look then?

random sleet
#

in the game's source code, and get ready to do a lovely patch

prisma loom
#

?

#

what is lovely patch?

#

and also I thought I alredy was looking into the source code

violet void
#

the .toml files inject code in specific parts of the game's code (In lovely folder in baladrone if you're still referencing that)

prisma loom
#

I use baladrone as a example

#

to see the structre of modded seal

violet void
#

it also does lovely patches

shell geyser
#

hii i am trying to make a joker similar to mr bones that saves u one time before destroying itself but can't get it to remove itself

prisma loom
random sleet
#

yeah but if you wanna do anything like splash you're gonna probably need to

violet void
prisma loom
#

Also where did you guys learn so much in depth stuff about Balatro modding?

violet void
random sleet
#

actually wait it might be possible to do some jank

#

so SMODS enhancements have an always_scores property

prisma loom
random sleet
#

you might be able to do something very roundabout to trigger this from a seal

#

but i doubt it's easy, straightforward, or sane

wintry solar
#

You just need to do table.insert(scoring_hand, card)

violet void
wintry solar
#

It’s very easy

prisma loom
prisma loom
random sleet
prisma loom
#

I doubt

wintry solar
#

I just know how the scoring works

prisma loom
#

I bet this guy's smart smh

random sleet
#

i believe i am known to be a charlatan and a fool in these parts

#

i reflect my role

wintry solar
#

I rewrote the scoring last month so I understand it pretty well

random sleet
#

im sorry

prisma loom
#

The elder has spoken

manic rune
#

is thereeeee x_chips?

wintry solar
#

I just know how to do a lot of stuff because I’ve done a lot of stuff/written a lot of stuff for smods

violet void
wintry solar
#

General programming wise of course, but that doesn’t help for the specifics oh balatro

wintry solar
#

It might miss a couple of effects

#

There’s a more thorough way of doing it but this should work well enough

violet void
manic rune
#

where in balatro's source code can i find the code for "card_eval_status_text" function?

faint yacht
#

common_events.lua

prisma loom
#

Is this how you add custom seals?

#

its just neither seal or its respective spectral card show up

#

did I miss something?

violet void
#

I think

prisma loom
#

how do I import them?

violet void
#

this is how I did it for my seals at least

-- List all seals files here
local seal_files = {
    "lift_seal",
    "rank_seal",
}```
```lua
for i = 1, #seal_files do
    NFS.load(SMODS.current_mod.path .. "/seals/" .. seal_files[i] .. ".lua")()
end
manic rune
#

does this patch work? (it adds x_chips)

violet void
manic rune
violet void
#

I think so but I havent used it personally

prisma loom
#

and crashes when I hover over it

tepid crow
#

no more need for mods to implement it

violet void
manic rune
violet void
manic rune
#

nice

tepid crow
#

just have a minimum smods version

prisma loom
#

@violet void

tepid crow
# prisma loom

no idea why this is happening but it is pretty funny ngl

prisma loom
#

My assets

violet void
prisma loom
#

?

violet void
#

in seal_files you need to put the name of the files, and your file is called "blk_seal" not "black"

also youre importing consumables while looping the seal files

violet void
#

".." is string concatenation

tepid crow
#

If I had a nickel for every time someone misinterpreted an automatic import script, I'd have two nickels. Which isn't a lot, but it's weird that it happened twice

wintry solar
#

This is a bad import script

tepid crow
#

the second load should be outside the for loop

violet void
tepid crow
#

also you should fix that indentation

prisma loom
violet void
#

I took it from cardsauce

wintry solar
#

Use SMODS.load_file

violet void
prisma loom
#

(from ortalab)

wintry solar
#

They should be wrapped with assert too

prisma loom
#

Oh i see

#

Sry

wintry solar
#

for k, v in pairs(Ortalab.load_table) do
    if v then assert(SMODS.load_file('objects/'..k..'.lua'))() end
end
tepid crow
#

I'm personally also a fan of just auto-loading every lua file in a given directory but I understand if some people don't want that

wintry solar
#

That’s for a table where keys are either equal to true or false

prisma loom
#

should I use prefix of my mod?

tepid crow
#

this is what I use

local subdir = "cards"
local cards = NFS.getDirectoryItems(SMODS.current_mod.path .. subdir)
for _, filename in pairs(cards) do
    assert(SMODS.load_file(subdir .. "/" .. filename))()
end
violet void
#

what would be the downside

wintry solar
#

Can’t toggle things

prisma loom
violet void
wintry solar
prisma loom
#

counts something iirc

#

I watched lua tutorials like 3 years ago

violet void
#

this worked for me

for i = 1, #seal_files do
    if seal_files[i] then assert(SMODS.load_file('seals/'.. seal_files[i] ..'.lua'))() end
end```
prisma loom
#

my game crashes

#

cuz of this

prisma loom
#

I dont understand what Im doing wrong :(

runic pecan
#

If I flip a scoring card, does that prevent it from scoring?

prisma loom
#

straight up

violet void
# prisma loom I dont understand what Im doing wrong :(

It should be like this

-- List all seals files here
local seal_files = {
    "lift_seal",
    "rank_seal",
}```

```lua
for i = 1, #seal_files do
    if seal_files[i] then assert(SMODS.load_file('seals/'.. seal_files[i] ..'.lua'))() end
end
prisma loom
prisma loom
violet void
prisma loom
#

yes

violet void
#

and did you set the name and desc of the seal correctly

prisma loom
#

jokers work without it

violet void
#

you should probably do that

prisma loom
#

in localization file

wintry solar
violet void
prisma loom
violet void
#

Is your seal file still like this?

#

If so, just "prefix_black_seal"

prisma loom
runic pecan
#

Rare or Uncommon?

tepid crow
#

rare

prisma loom
#

ic ic

prisma loom
tepid crow
violet void
#

your mod's prefix

tepid crow
#

maybe uncommon works better than I thought

prisma loom
violet void
prisma loom
#

Sorry guys for bothering you too much I'm primarily an artist and have nothing to do with coding, just got into it while I had time on vacation

pallid jay
#

Is there a way to give yourself a specific achievement for steam?
I have completed the requirements of an achievement, and a bug is preventing it from triggering.

errant lance
frosty dock
spring lantern
#

the newest addition to my jimbo collection

pallid jay
frosty dock
prisma loom
#

but still crashes the game unfortunately

#

+adjusted directory

worthy stirrup
#

how can i check how many negatives the player is holding

sturdy compass
#

I'm trying to make a Boss Blind that randomly disables 1/4 of the full deck. Anyone have any ideas as to why none of the cards are getting disabled?

sturdy compass
worthy stirrup
#

also how do the legendary jokers do the two art thing

worthy stirrup
sturdy compass
worthy stirrup
#

they took their souls? /j

sturdy compass
#

that's what the soul_pos variable in the config is

worthy stirrup
#

ohhh

#

does the soul art have to be below it or is soul_pos where the soul art is

#

or where it will be on the card

#

if that makes sense

sturdy compass
#

soul_pos is where it is on the spritesheet

vocal verge
#

same as atlas x/y, right?

#

cause it basically is atlas x/y

sturdy compass
#

yep

worthy stirrup
#

okay

#

thanks

sturdy compass
#

Keep in mind though it must be in the same atlas as the base card since you can't change it for the soul specifically

fallen pelican
#

trying to make a joker that does basically the same thing as the boss blind that discards your cards. I got the cards highlighted to discard but I'm not seeing G.FUNCS.discard_cards_from_highlighted fire up to actually discard them here:

        local any_selected = nil

        if context.before and not context.blueprint then
            G.E_MANAGER:add_event(Event({ func = function()
                
                for i = 1, #G.hand.cards do
                    if G.hand.cards[i] then
                        G.hand:add_to_highlighted(G.hand.cards[i], true)
                        any_selected = true
                        play_sound('card1', 1)
                    end
                end
                if any_selected then
                    G.FUNCS.discard_cards_from_highlighted(nil, true)
                end
                return true
            end }))
        end
vocal verge
#

ngl, it makes total sense that hologram uses a shader for the hologram effect and the card is just super boringly gray

fallen pelican
#

also... is the card selection limit simply a variable I can change? would be helpful if it is

vocal verge
fallen pelican
#

not sure if declaring it anywhere above changes anything

#

okay it's technically better for it to exist within the event

timid parrot
sturdy compass
#

I saw mention of that on the docs but nothing in the API methods section. How would I define that?

timid parrot
#

Same as set_blind I believe, just with a different name and parameters list

#

Unless smods has changed some stuff

sturdy compass
#

alr thank you

wicked spire
#

What's the best way to iterate and test a mod? Right now I've just been pushing changes to GitHub, downloading the ZIP, then unzipping it into the Mods folder, but that process takes a while and means I have to redownload it for each test.

timid parrot
#

I just put the github project in my mods folder

sturdy compass
#

^

timid parrot
#

works like a charm

lucid owl
violet void
wicked spire
violet void
#

phew

wicked spire
violet void
#

ctrl + s then open the game

#

cant get faster than that

timid parrot
#

tbh it's been a while since I've used the git console

#

but I think so?

wicked spire
#

Tbh I prefer non-console, I'm just not sure how else to do it

timid parrot
#

oh just move your project into the mods folder

violet void
#

yeah, I have my visual studio project in the mods folder so I just do ctrl + s to save and open the game to test the changes

wicked spire
#

but it's on GitHub remotely so I don't have it stored locally

timid parrot
#

ahhhh

#

you're gonna need git clone

wicked spire
#

Might consider getting the desktop version in the future, for now though I did git clone and it worked perfectly. Thank you guys

foggy carbon
#

is there a way to detect ending a booster pack, even by "chose the card limit so it automatically closed", not just skipped?

tepid crow
#

doesn't sound like a context that currently would exist, mostly because in 99% of cases the "on open booster pack" context is sufficient

#

you could add your own though

wintry solar
#

I dont remember if I buuilt it into smods or ortalab 🤔

foggy carbon
sturdy compass
tepid crow
shell geyser
#

hey does anybody know how to make a joker delete itself (like mr.bones) ? tried this but didn't succeed

shell geyser
#

thank u so much

hollow zenith
#

How would i go about coding only face cards? i have one mod i got from nexus to mess around with(the deltarune one thats supposed to only change the face cards of the heart K,Q,J).
This is the code i used to replace ALL player cards, but it (not so surprisingly) doesnt work for a mod that only changes specific cards.
Does anybody have the code that DOES work for that?

violet void
frosty dock
south folio
#
    if context.before and context.cardarea == G.play and #G.hand.cards == 1 then
        for _, scoring_card in ipairs(context.scoring_hand or {}) do
            if scoring_card:is_face() then
                local success, err = pcall(function()
                    for i = 1, 2 do
                        local _card = copy_card(scoring_card, nil, nil, G.hand)
                        _card:add_to_deck()
                        G.hand:emplace(_card)
                        _card.states.visible = true
                        _card:reset()
                        G.E_MANAGER:add_event(Event({
                            func = function()
                                _card:start_materialize()
                                return true
                            end
                        }))
                    end
                end)
            end
        end
    end```

After having a personal breakdown and asking chatgpt multiple times can anyone pretty please help me with why this doesn't copy the card
frosty dock
#

that mod from nexus is really really old

frosty dock
violet void
hollow zenith
frosty dock
frosty dock
south folio
#

before?

shell geyser
south folio
frosty dock
hollow zenith
frosty dock
#

under what conditions

south folio
frosty dock
#

that's the cards held in hand

#

not the played cards

shell geyser
south folio
shell geyser
#

thx !!

frosty dock
#

context.scoring_hand

south folio
#

right, I forgot

frosty dock
#

you need to stop mindlessly copying things you see and from ChatGPT and actually learn some coding SKULL

south folio
#

honestly I just felt shy asking y'all so much ;-;

frosty dock
#

there's no need to be

south folio
#

do I check the like.

frosty dock
#

if the alternative is ChatGPT 💀

south folio
#

#context.scoring_hand == 1?

#

instead of G.hand?

frosty dock
#

that's assuming you don't mind there being extra unscored cards

#

else check #context.full_hand == 1

south folio
#

hm, aight let's see

#

did not work

edgy reef
novel dagger
#

Balatro modders finally find something worse than copying the source code

south folio
#

I'm trying ok

teal estuary
#

theres nothing wrong with trying, but theres no reason to ever trust what an AI says balatrojoker

teal estuary
#

raisedcateyebrow
-# i cant tell if thats agreeing or disgareeing with me, im stupid

fallen pelican
#

I think AI is so much worse here knowing chatgpt doesnt know what balatro or smods code looks like

teal estuary
#

yeah literally

#

theres just not enough data to scrape to get a """"good"""" response

novel dagger
#

All I've gotten from Googling is popular Balatro mods

dense vector
#

I was talking about the AI shit that Google was doing

fallen pelican
#

tbf here you can only peek at the smods docs or other ppls mods

novel dagger
#

Oh lmao

wintry solar
#

looking at popular, well written mods is probably the best place to start if you look at them alongside smods documentation

teal estuary
#

fr fr

wintry solar
#

and then just asking questions here when you get stuck

gusty sequoia
#

What do I write to just get the name and description thing to show? :(

wintry solar
#

there are plenty of us who know what we're doing and are happy to help

fallen pelican
#

yeah I solved the problem I posted a while ago by just looking around

teal estuary
gusty sequoia
#

Yeah that

#

I'm just trying to make a joker that gives 1 chip, to test & learn

teal estuary
#

hold on, let me whip out my old dusty balatro mods

#

oh, hold on then