#💻・modding-dev

1 messages · Page 482 of 1

lunar silo
#

if face_cards >= 5 then G.GAME.dollar.buffer = 1.5 return { G.GAME.dollars = (G.GAME.dollars) * G.GAME.dollar.buffer, func = function() G.E_MANAGER:add_event(Event({ func = function() G.GAME.dollar_buffer = 1 return true end })) } end } end

#

this is only part of the code but

tight hull
#

(im curious)

lunar silo
#

why is it telling me that i need to close the { in 'return {'?

scarlet imp
#

probably just one set of `

lunar silo
tight hull
tight hull
modern kindle
#

we are fwends now @sonic cedar smeele

sonic cedar
#

i saw hwarhar

lunar silo
#

test test test

tight hull
daring fern
tight hull
#

whoops

scarlet imp
#

I tried SMODS.change_base(card, nil, pseudorandom_element(SMODS.Ranks)) and still no cigar

daring fern
modern kindle
sonic cedar
tight hull
red flower
modern kindle
#

ive commented on tomas profile smeele

tight hull
#

the key is the key for the joker I want to spawn yes?

sonic cedar
modern kindle
red flower
daring fern
tight hull
tight hull
sonic cedar
lunar silo
modern kindle
# tight hull "a few" mhm

lmfao it helps a good bit of them are from gmod, when you run servers and build strong communities you get comments

tight hull
#

or whatever its called

sonic cedar
#

final 3 of the spreadsheet,,,

sonic cedar
tight hull
scarlet imp
tight hull
lunar silo
#

WAIT

#

I'M SUPPOSED TO PRESS SHIFT

#

test

tight hull
#

huh

sonic cedar
lunar silo
sonic cedar
vestal magnet
#

thanks
i need it to like also trigger a message AFTER this that says the last roll was unlucky or smth

sonic cedar
#

hold

modern kindle
#

what should i hold

lunar silo
modern kindle
#

im fresh out of on

sonic cedar
#

shit really

#

hold up instead

modern kindle
#

oh sweet ive got one more up

sonic cedar
daring fern
lunar silo
tight hull
#

but this one shows up when the boss blind is selected

sonic cedar
lunar silo
#

i only know po3

tight hull
lunar silo
#

and that the main color of the game is orange

modern kindle
#

whats po3

lunar silo
tight hull
# daring fern Code?
    key = 'rbdj',
    loc_txt = {
        name = 'Return By Death',
        text = {
            "{X:mult,C:white} X#1# {} Mult",
        }
    },
    blueprint_compat = true,
    rarity = 4,
    cost = 20,
    pos = { x = 0, y = 1 },
    config = { extra = { xmult = 1, xmult_gain = 1 } },
    loc_vars = function(self, info_queue, card)
        return { vars = { card.ability.extra.xmult_gain, card.ability.extra.xmult } }
    end,
    calculate = function(self, card, context)
        if context.joker_main then 
            return { xmult = 1 + (G.GAME.deaths or 0) }
        end
        if context.setting_blind and context.blind.boss then
            SMODS.add_card({key = "j_rbd_mr_bones"})
        end
    end,
}```
sonic cedar
tight hull
modern kindle
daring fern
sonic cedar
modern kindle
#

LMAO

sonic cedar
#

did not predict the belly laugh

tight hull
daring fern
#

And it would be from the mod it is from.

modern kindle
#

i love saying some game idk about is like mario or some other thing

#

another favorite is to say its similar to wii sports

tight hull
#

thank you

modern kindle
#

something is such a nice fella

tight hull
sonic cedar
#

are you a nice fella or a fice nella

modern kindle
#

im a

tight hull
modern kindle
#

not me im the biggest hater

sonic cedar
#

no me

modern kindle
#

no me

sonic cedar
#

nuh uh

modern kindle
tight hull
sonic cedar
tight hull
#

you seem like a nice guy

modern kindle
# tight hull wdym

if u check my message history im a big meanie to every single person in here

red flower
#

that is true

tight hull
#

(I might be blind tho)

sonic cedar
#

dilly you can redeem yourself rn

normal crest
#

be evil

modern kindle
#

i can never be redeemed

sonic cedar
red flower
#

what the hell

modern kindle
sonic cedar
#

that's not very evil of you

red flower
#

thank you dilly

normal crest
#

oh well, now you have to play it

#

have fun N

modern kindle
#

cats are notoriously evil

normal crest
#

we'll see you in 4 hours

modern kindle
#

therefore that was evil

tight hull
sonic cedar
#

i wish you could reply to steam comments

brittle yacht
#

sup gang im back

sonic cedar
#

you were gone

#

?

normal crest
#

hello peanutz 9874

modern kindle
#

i commented something super mean on tomas account too

tight hull
brittle yacht
#

is there a way to make a custom playing card

#

like numbered

tight hull
normal crest
sonic cedar
modern kindle
#

toma doesnt have a wishlist i must explode

sonic cedar
#

what

#

yes i do

#

oh do i not have it

#

oops

normal crest
#

keep it private

tight hull
normal crest
#

make him explode

red flower
#

i see it

lunar silo
#

it's the third time i'm asking for help (this is only a part of the code)

                G.GAME.dollar.buffer = 1.5
                return {
                    G.GAME.dollars = (G.GAME.dollars) * G.GAME.dollar.buffer,
                    func = function()
                        G.E_MANAGER:add_event(Event({
                            func = function()
                                G.GAME.dollar_buffer = 1
                                return true
                            end
                        }))
                    } 
            end
                }
            end```
red flower
lunar silo
#

where is the tab on the antepenultimate line

sonic cedar
#

hey i know her

modern kindle
sonic cedar
# red flower

i really dont have a single ace attorney outside of the og collection im gonna shrivel

modern kindle
#

i was able toa ccess it through games though

lunar silo
red flower
#

i dont have the recent collections but i also played them all on the ds

modern kindle
#

are they epic on ds

lunar silo
#

specifically the one in 'return {'

modern kindle
#

i have a dslite

red flower
#

i think they look better on DS

#

i dont like the HD look

sonic cedar
#

they were really faithful with it

modern kindle
#

icic
i need tos tart collecting handheld games, but they are so expensive

red flower
#

also i cant be a good person like dilly sadly

modern kindle
#

pokemon especially

sonic cedar
sonic cedar
daring fern
modern kindle
red flower
sonic cedar
#

gdi dilly

modern kindle
red flower
#

the same game too lmao

modern kindle
#

insane

vestal magnet
#

i have a joker that subtracts chips every card. how do i make a custom popup that is slightly different from the original "+ something" chips

red flower
sonic cedar
lunar silo
modern kindle
tight hull
modern kindle
#

it should still let u accept

sonic cedar
#

vis bug we're fine

modern kindle
#

awsum

#

now i just need srock

daring fern
vestal magnet
#

щл

#

ok

modern kindle
#

but he eludes me

sonic cedar
#

another game to add to the pile of "get better processor"

#

wait i did

#

what am i doing

modern kindle
#

i need a better gpu soon

sonic cedar
#

i got too used to the 4 i forgot i literally squared it

modern kindle
#

my 2080ti needs an upgrade, such as a 4090ti

tight hull
#

nvm

sonic cedar
modern kindle
#

perchance

#

what state u in

#

im in IL

red flower
#

do not dox toma in the balatro modding chat

modern kindle
#

a state isnt a dox smh

#

ive leaked im in chicago like a bazillion times

#

lets all grab a pizza

red flower
#

ok

modern kindle
#

ill buy u a pizza and then we can go to a barcade i know

#

wait are you 21 or more

sonic cedar
#

that's all the way over there...

red flower
#

i am more

modern kindle
#

i cant gfive u alcohol unless 21 or more

#

awesome

red flower
#

i dont drink tho sorry

sonic cedar
modern kindle
#

the barcade is cool cause they have game themed drinks

tight hull
#

what is it like to live in the US?

modern kindle
#

my friends and i got the triforce

sonic cedar
modern kindle
#

its a mixed bag, good and bad parts like anywhere

gaunt thistle
#

yeah

tight hull
gaunt thistle
#

can't complain but also absolutely can

lunar silo
#

'unexpected symbol near '}''

modern kindle
#

its far from the worst and far from the absolute best, anyone who says its either extreme lies to themselves

sonic cedar
#

someone keeps adding coal to the trail mix bag

gaunt thistle
#

yeah

#

but there's also a reason why we moved out of the country haha

lunar silo
modern kindle
#

id love to move to Poland as thats where my family is from, but ive got alot of ties here

red flower
tight hull
modern kindle
#

so for now i settle on vacations

brittle yacht
#

how do i use group_name strings in loc_text for SMODS.Booster?

daring fern
# lunar silo what is this supposed to mean?
if face_cards >= 5 then
    G.GAME.dollar.buffer = 1.5
    return {
        dollars = (-G.GAME.dollars)+((G.GAME.dollars) * G.GAME.dollar.buffer),
        func = function()
            G.E_MANAGER:add_event(Event({
                func = function()
                    G.GAME.dollar_buffer = 1
                    return true
                end
            }))
        end
    }
end
lunar silo
molten relic
#

@scarlet imp i hope your still alive

modern kindle
molten relic
#

how did you do your halo of flies?

tight hull
scarlet imp
tight hull
molten relic
brittle yacht
chrome widget
# tight hull what is it like to live in the US?

I understand why anyone would want to leave, but by being a part of the imperial core, it's inherently a more privileged existence. So it's not terrible depending on your marginalized status and where you live

stiff locust
#

is there a way to make a custom info_queue appear on a condition

brittle yacht
modern kindle
# tight hull ofc, im a proud Pole

hell yea
i was over there for about a month and a half for a summer
went all over
was at warsaw, krakow, tarnow, gdynia, malbork, and a bunch of other places lmao

gaunt thistle
#

I'm extremely privileged to have grown up in the us so I try not to complain too much. it's just an exhausting place to live

molten relic
scarlet imp
red flower
stiff locust
tight hull
brittle yacht
gaunt thistle
#

we had an opportunity to move to the Nordics earlier this year so we got out if there

stiff locust
#

great thanks

gaunt thistle
#

imho

modern kindle
tight hull
modern kindle
#

plus id have to convince my very american gf to go to a palce like poland lmao

chrome widget
#

Unfortunately the "best" places to live also have the highest housing costs due to a variety of factors, so there's an upward barrier to entry to be in places with better opportunities and services

scarlet imp
molten relic
#

oh oki

red flower
#

i have decided to not live in a place, i am becoming an incorporeal being

modern kindle
#

i also have concerns regarding ym vet status here, being a vet in the US means i ahve good US perks, but i do fear how little my veteran status will matter in other nations

chrome widget
#

You can find cheaper living elsewhere... but at the cost of a general reduction in social services, public transportation, available jobs, and community support due to the nature of U.S. politics

sonic cedar
scarlet imp
red flower
sonic cedar
brittle yacht
#

is the easiest way to generate a booster pack with pools?

gaunt thistle
brittle yacht
molten relic
#

(halo of flies)

tight hull
scarlet imp
#

I just do this for the fun of it at the end of the day

molten relic
brittle yacht
# red flower yes

so how to make pools, SMODS.ObjectType docs arent helping super well

chrome widget
#

SMODS.ObjectType is a pool, which is something the docs kinda obfuscate I feel

brittle yacht
#

oh

#

im still confuzzled though

chrome widget
#

You create a new object type and add a bunch of keys for cards to automatically be added to the pool

sonic cedar
chrome widget
#

Hello!!!!!!!!

sonic cedar
chrome widget
#

Damn why do people keep referring to me in royal or divine terms. Like it's cool and hot but ?

sonic cedar
#

vibes

chrome widget
#

Real

stiff locust
#

how do I put a variable in info queue again
i could've sworn i've done this before somewhere but i can't remember where it was or how I did it

scarlet imp
#

info_queue[#info_queue + 1] = { set = "yourset", key = "yourkey" }

stiff locust
#

no but i need a variable from the joker to be in the info queue

faint yacht
#
info_queue[#info_queue + 1] = {key = "toga_kartjokerlist", set = 'Other', vars = { card.ability.extra.add_shop, card.ability.extra.add_shop*8 } }
stiff locust
#

ahhhh right

#

vars table

#

gotcha

molten relic
tight hull
#

how do I make the joker description say the current xmult?

molten relic
#

you have a lot of variables that i dont

sonic cedar
molten relic
#

ill do a different effect

scarlet imp
sonic cedar
#

🤑

#

back in business catsmirk

#

spreadsheet first

scarlet imp
# molten relic ill do a different effect
if context.setting_blind and not context.blueprint and G.GAME.blind.boss then
  if SMODS.pseudorandom_probability(card, "halo_of_flies", 1, card.ability.extra.odds) then
      return {
          func = function()
              G.E_MANAGER:add_event(Event({
                  func = function()
                      G.E_MANAGER:add_event(Event({
                          func = function()
                              G.GAME.blind:disable()
                              play_sound("timpani")
                              delay(0.4)
                              return true
                          end
                      }))
                      SMODS.calculate_effect({ message = localize("ph_boss_disabled")}, card)
                      return true
                  end
              }))
          end
      }
  end
end

this is really the only necessary part

#

for the calculate

molten relic
#

aha

#

ok

faint yacht
#

...maybe?

sonic cedar
#

Fear that wasnt directed toward me was it

brittle yacht
#

ight bye gang

#

im getting off for the day

scarlet imp
#

bye sinkhole

brittle yacht
#

made great progress thanks to yall

#

🙂

sonic cedar
#

bye peanut

#

np

brittle yacht
#

youve earned a token of appreciation

scarlet imp
#

thanks to yourself, you wrote the code my guy

lunar silo
#

ok so

scarlet imp
#

don't discredit that

lunar silo
#

the game doesn't crash on start

#

BUT it crashes when it's quota is reached

sonic cedar
#

did we react at the same time

sonic cedar
scarlet imp
#

I need to focus lol, I think I've written like 3 lines in the last hour

daring fern
sonic cedar
#

shit youre right

scarlet imp
#

I have arbitrary deadlines I need to meet to feel productive

daring fern
tight hull
#

how?

daring fern
scarlet imp
lunar silo
#

but if it's really necessary i'll just censor the personal information

sonic cedar
glass scaffold
molten relic
tight hull
tight hull
glass scaffold
sonic cedar
scarlet imp
tight hull
lunar silo
glass scaffold
sonic cedar
tight hull
tight hull
sonic cedar
#

you can turn it off in settings

#

OK MODDING
MAKE FILE
DO CODE

daring fern
tight hull
#

my eyes hurt bcs of how clean this game look now

scarlet imp
#

❓ should be a banned emote

tight hull
scarlet imp
#

makes my skin crawl

sonic cedar
#

good

#

fear it

scarlet imp
sonic cedar
#

GJKSDGLJ

tight hull
#

why is it black in the first place tho

sonic cedar
molten relic
#

im having too much problems with the code

#

is says that pseudorandom_probability is a nil value

#

if SMODS.pseudorandom_probability(card, "halo_of_flies", 1, card.ability.extra.odds) then

lunar silo
# daring fern Code?
SMODS.Joker{ --Headless Joker
    name = "Headless Joker",
    key = "headlessjoker",
    config = {
        extra = {
            Face_Cards_Discarded = 0,
            currentmoney = 0
        }
    },
    loc_txt = {
        ['name'] = 'Headless Joker',
        ['text'] = {
            [1] = 'If {C:attention}5{} or more {C:attention}face cards{} are discarded at the same time, {X:money,C:white}$x1.5{}.'
        }
    },
    pos = {
        x = 7,
        y = 0
    },
    cost = 10,
    rarity = 3,
    blueprint_compat = true,
    eternal_compat = true,
    unlocked = true,
    discovered = true,
    atlas = 'CustomJokers',

    loc_vars = function(self, info_queue, card)
        return {vars = {}}
    end,

    calculate = function(self, card, context)
        if context.discard and context.other_card == context.full_hand[#context.full_hand] then
            local face_cards = 0
            for _, discarded_card in ipairs(context.full_hand) do
                if discarded_card:is_face() then face_cards = face_cards + 1 end
            end
            if face_cards >= 5 then
                  G.GAME.dollar.buffer = 1.5
                  return {
                      dollars = (-G.GAME.dollars)+((G.GAME.dollars) * G.GAME.dollar.buffer),
                      func = function()
                          G.E_MANAGER:add_event(Event({
                              func = function()
                                  G.GAME.dollar_buffer = 1
                                  return true
                              end
                          }))
                      end
                  }
              end
        end
    end
}```
daring fern
red flower
#

this is not a released feature yet so you need smods dev

molten relic
#

the newest one probably?

#

owh

scarlet imp
#

make sure you're on the probability branch. Otherwise, instead of the probability function, use:
G.GAME.probabilities_normal / card.ability.extra.odds < pseudorandom("halo_of_flies)

scarlet imp
#

what he said

#

mb

tight hull
thick drift
#

brother, you need to a seperate drive

tight hull
molten relic
modern kindle
scarlet imp
#

just flip the < to a > I'm pretty sure

tight hull
daring fern
molten relic
modern kindle
molten relic
modern kindle
daring fern
tight hull
#

whats ur internet speed btw?

scarlet imp
tight hull
#

how to I put a value of an variable into ""

red flower
#

or wdym

modern kindle
tight hull
tight hull
red flower
#

symmetrical

chrome widget
#

Yeah that upload speed is bonkers

thick drift
#

I need a little bit of help. I've been trying to run this bit of code and it keeps crashing the game whenever the odds proc. I suspect I'm using the function create_card wrong - the error message says that I'm failing to pass the consumable type and it's handling it as a nil
use = function(self, card, area, copier) for i = 1, card.ability.extra.num_rewards do if pseudorandom('pot') < G.GAME.probabilities.normal / self.config.extra.b_odds then local new_card = SMODS.create_card({ 'RupeeConsumableType', G.consumeables, false, 0.0, false, false, key = 'b_rupee'}) new_card:add_to_deck() G.consumeables:emplace(new_card) elseif pseudorandom('pot') < G.GAME.probabilities.normal / self.config.extra.g_odds then local new_card = SMODS.create_card({ 'RupeeConsumableType', G.consumeables, false, 0.0, false, false, key = 'g_rupee'}) new_card:add_to_deck() G.consumeables:emplace(new_card) end endend

tight hull
red flower
sonic cedar
#

can info queues be dynamic like
like the queue changes on a button press

tight hull
red flower
molten relic
#

@scarlet imp is there any way to know if it works without having to test a billion times?

sonic cedar
red flower
tight hull
scarlet imp
red flower
scarlet imp
scarlet imp
#

You can add print statements to help with debugging if you need, thats usually what I do

molten relic
tight hull
chrome widget
#

why do I have to manually remake the entire HUD for the gradient chanes to take effect. I am going to scream

scarlet imp
molten relic
#

oki

modern kindle
tight hull
sonic cedar
tight hull
#

I dont have cables in my house

tight hull
tight hull
#

when its supposed to show x4

red flower
red flower
sonic cedar
tight hull
#

this?

red flower
#

yes

#

replace the second value with that

tight hull
#

ok

red flower
#

the 1 + G.GAME.deaths thing

tight hull
#

im not sure if its supposed to look like that

#

but I dont think so

red flower
tight hull
#
    key = 'rbdj',
    loc_txt = {
        name = 'Return By Death',
        text = {
            "Gain {X:mult,C:white} X#1# {} Mult",
            "everytime Mr. Bones is used",
            "Base {X:mult,C:white} X#1# {} Mult",
            "{C:inactive}(Currently {X:mult,C:white}X#2#{C:inactive} Mult)"
        }
    },
    blueprint_compat = true,
    rarity = 4,
    cost = 20,
    pos = { x = 0, y = 1 },
    config = { extra = { xmult = 1, xmult_gain = 1 } },
    loc_vars = function(self, info_queue, card)
        return { vars = { card.ability.extra.xmult_gain, { xmult = 1 + (G.GAME.deaths or 0) } } }
    end,
    calculate = function(self, card, context)
        if context.joker_main then 
            return { xmult = 1 + (G.GAME.deaths or 0) }
        end
        if context.setting_blind and context.blind.boss then
            SMODS.add_card({key = "j_mr_bones"})
        end
    end,
}```
red flower
#

it should be vars = { card.ability.extra.xmult_gain, 1 + (G.GAME.deaths or 0) }

tight hull
#

okok

#

Thank you

molten relic
#

how do you make the little legendary art thing

#

where something hovers over something

daring fern
molten relic
#

how would i use that?

tight hull
#

soul_pos = { x = 1, y = 1 }

#

change the 1 to where the soul is located on ur spiritesheet

molten relic
#

so i have a pos section and a soul_pos section

#

okay

tight hull
#

yes

molten relic
#

easy

vast nymph
#

I'm trying to understand how to make a joker similar to Midas mask, but the vanilla remade code has a bunch of functions that I don't understand yet (this is my first mod attempt) is there a place where I can read on those specific functions more?
I've been looking through the smods wiki but I can't find it...

red flower
#

most of the time, no. there's no much documentation on vanilla code

#

you can ask here

molten relic
#

he'd know

#

ask him

tight hull
red flower
#

well i dont encourage people to ask me specifically there are many people who know haha

scarlet imp
#

he's a contributor, it's a community effort

molten relic
vast nymph
#

Oh wow okay

molten relic
red flower
tight hull
scarlet imp
red flower
#

probably

vast nymph
#

I would basically be asking "how do I do all of it" so that's why i was asking if there is more documentation

sonic cedar
#

unrelated but does anyone know the ui values (like the w or maxw) for the bottom of the card?
doin a bottom button instead of a side one

molten relic
sonic cedar
# red flower elaborate?

want the button to be at maximum (in case other mods do this) the width of the card, because i'm putting the button at the bottom of it instead of on the right of it

scarlet imp
#

like the "Redeem" button for Vouchers

sonic cedar
sonic cedar
red flower
#

yeah

sonic cedar
#

sick

lunar silo
#

help, game is still crashing, now it's a table

red flower
tight hull
#

what was the jokers size in 2x?

lunar silo
daring fern
#

How does one check if a file at a certain path exists?

scarlet imp
#

it's a simple fix, really

tight hull
mild grove
#

I'm trying to make the game load a custom sound and also have the sound play randomly

lunar silo
#

the size of a 2x joker?

tight hull
#

yea

lunar silo
#

142x190

mild grove
lunar silo
#

also i prefer 1x more

tight hull
scarlet imp
tight hull
red flower
thick drift
# vast nymph I would basically be asking "how do I do all of it" so that's why i was asking i...

Honestly, if you're looking to copy or closely mimic something already done in the base game, you can often get away with copying bits of pieces of code in card.lua (decompile the balatro.exe with 7-zip to view this). That's how I got consumables to add money (copied hermit) and made a joker that decays like seltzer. It's not a replacement for documentation, but we got no documentation for vanilla stuff anyways (worst part is it isn't commented either, but it is what it is).

scarlet imp
red flower
lunar silo
#

you know quantify from cryptid?

lunar silo
mild grove
#

no\

#

I don't know anything crytid

scarlet imp
#

jk idc

tight hull
#

HOW (it stole a png from another mod...)

#

how do you even do that

scarlet imp
#

wrong atlas maybe

daring fern
#

This seems to work now:

tight hull
#

what if I only have 1 joker in the atlas, can It just be the size of the joker or do I need to do smt else

red flower
#

yes

tight hull
#

the position of the first joker in the atlas is 0, 0?

stiff locust
#

is there a way to draw a specific card from the deck

#

by joker effect just on command

modern kindle
vast night
#

Hi guys :D
How do i restart the game when a toggle has been changed in the config?

molten relic
tight hull
scarlet imp
#

alt F5 is the fastest way to restart

vast night
#

and it would be a nice touch

stiff locust
#

i need to find a use for this

vast night
# red flower

thats not the hard part. i just cant find out how to attach a function to a button

#

and run it whwen exiting config

vast night
red flower
lunar silo
red flower
scarlet imp
#

Alright bye guys, I’ll probably be back later but I gotta go to work

vast night
lunar silo
red flower
vast night
vast night
#

but define to_number as a function if talisman is not enabled

daring fern
vast night
lunar silo
daring fern
vast night
#

oooh

#

to_big()?

vast night
red flower
vast night
urban wasp
#

this is triggering no matter if waldo is owned or not, for some reason

if (context.joker_main and SMODS.find_card("j_crp_waldo")) or context.forcetrigger then
    return {
        emult = lenient_bignum(card.ability.extra.emult),
        emult_message = {
            message = "^" .. number_format(lenient_bignum(card.ability.extra.emult)) .. " Mult",
            colour = G.C.DARK_EDITION,
            sound = "talisman_emult"
        }
    }
end
stiff locust
vast night
#

or idfk

stiff locust
#

check if the length of that table is 1 or higher

urban wasp
tight hull
#

why doesnt my atlas work?

    key = "RBDMod",
    path = "RBD-sheet.png",
    px = 71,
    py = 95
}```
red flower
stiff locust
#

i've had that issue before and Iii think that's how i fixed it

urban wasp
lunar silo
#

the mod uses ^mult in a joker

stiff locust
#

the # operator is length

red flower
#

you forgot eval

vast night
stiff locust
#

debugplus you have to use eval

urban wasp
#

ah

stiff locust
#

also don't you need to use print

vast night
stiff locust
#

nnoted

urban wasp
#

what the freak

#

do the thing

stiff locust
#

do eval print(#SMODS.find_card("j_crp_waldo"))

daring fern
vast night
vast night
stiff locust
#

oh

#

i always put print out of habit

urban wasp
candid grotto
#

guys, anyone knows how balatro runs on nintendo switch?

urban wasp
#

including when scoring

daring fern
vast night
red flower
vast night
#

you cant mod it :)

#

-# afaik

candid grotto
vast night
daring fern
molten relic
#

actually just coding a guaranteed mr bones rn

thick drift
lunar silo
#

i might have found out

vast night
urban wasp
molten relic
daring fern
urban wasp
#

no

#

but it still triggers

vast night
vast night
daring fern
vast night
#

i am too dumb

molten relic
#

well im developing the joker

#

lol

lunar silo
#

the reason why the game is crashing might be because like

daring fern
urban wasp
#

ah

#

okay i'll try

#

yeah it's good now just needed to add "next"

stiff locust
#

i still prefer the # method

vast night
red flower
#

theyre the same, technically next is a bit more performant but it doesnt matter

obtuse canopy
#

Quick question, should i specify atlas = ‘…’ in SMODS.joker {}

red flower
#

if you want a custom atlas, yes

sonic cedar
#

what did i miss oh god

lunar silo
#

talisman might not have functionality for $x

obtuse canopy
#

Ah alr, was wondering why vanilla atlas had none

vast night
lunar silo
#

like

vast night
lunar silo
#

headless joker is a $x joker

red flower
sonic cedar
stiff locust
#

so is there any way i can draw a specific card from the deck

stiff locust
#

not draw UI

#

draw from deck into hand

red flower
stiff locust
#

i want the card to move from G.playing.cards to G.hand.cards

#

without fucking everything up

vast night
#

i've found smtn in talismans code tho you may try that?

sonic cedar
molten relic
#

how do i make a custom "saved by extra life" text when getting saved by it?

#

(see mr bones as example)

vast night
#

cryptid

red flower
vast night
#
return {
  message = 'text'
}
stiff locust
#

i did this complicated ass lovely patch to do that

red flower
#

😭

stiff locust
#

what do you mean I can just do it like this

red flower
#

it is somewhat new

stiff locust
#

fucks sake

sonic cedar
#

marie,,

stiff locust
#

i need to update that now

#

the old implementation was really scuffed

vast night
#

imma just not answer anymore since i am sometimes just saying dumb sheesh lmao

#

next smods release when

molten relic
red flower
quick kraken
#

How does create_card work?

red flower
red flower
sonic cedar
#

i found the button

quick kraken
#

the vanilla one, I need to be able to create a random joker from a specific thematic set that has its own SMODS.ObjectType

modern kindle
#

What target am I wappin

red flower
quick kraken
#

SMODS.add_card({set = "objectypekey"})?

primal robin
#

This functions doesn't support silent argument for editions and other things, that's a bummer I think

red flower
sonic cedar
modern kindle
primal robin
#

Not really interested in SMODS development

sonic cedar
modern kindle
#

Nop I see no s

sonic cedar
#

his big ass head is in the way

molten relic
#

in what lua file?

#

just the en-us.lua?

quick kraken
red flower
molten relic
#

ok

quick kraken
#

Actually I forgot that I need the spawned item to be a rare joker

sonic cedar
#

ok but why is it up there if i definitely said bm

that looks a whole lot like tr

red flower
#

you can add rarity = "Rare" but idk how that works with objecttypes

quick kraken
#

Does this version of the function have that or do I have to make another object type?

red flower
#

you can do that in the function but idk if you need to add something to the objecttype to respect rarity

sonic cedar
#

at least it works

quick kraken
#

Also where do I place an invisible joker-like juice card until function?

red flower
#

wherever you want it to start

quick kraken
#

right

candid grotto
red flower
#

I think they were just refering to the fact that the rules say you can't mod on switch

lunar silo
#

also

#

i remembered to say it but

#

i read the talisman notice

#

but what exactly do i do?

quick kraken
#

What talisman notice?

lunar silo
#

i know i have to do something with to_big()

rotund sable
#

what characters can be used in a mod prefix? any?

lunar silo
vast nymph
#

the enhancement I added works like it's supposed to, how do I add the text with the enhancement info?

candid grotto
sonic cedar
#

progress......

vast night
lunar silo
#

and it has to be unique

red flower
lunar silo
sonic cedar
vast nymph
#

not the name of the enhancement

rotund sable
lunar silo
candid grotto
rotund sable
vast nymph
#

my bad lol

rotund sable
#

isn't it just text tho?

#

in loc_txt

vestal magnet
#

ok so i'm making a joker that adds xmult for each debuffed card "scored" (counts as a part of the played hand) during boss blind. was looking things up and nothing seems to work so far. i know that debuffed cards don't call in the calculate function or smth. any useful info

rotund sable
red flower
stark viper
#

Hi yall, I'm working on a Balatro mod that's my first venture into programming. I have a card that functions similarly to the non-custom suits version of the Pride Flag Joker from Paperback (Gains mult for each unique suit in scoring hand). I've noticed that Paperback has a function that checks for the number of unique scoring suits, and I'm wondering what the ethics are as far as simply copying the function exactly into my program. I feel like it's icky that i'm just copying the code exactly with very minimal changes (mostly cosmetic, to refer to my mod instead of Paperback), but maybe those feelings are unfounded.

vast nymph
# rotund sable yup

oh ok thanks, also what is making the (currently x1) text reactive to change?

rotund sable
red flower
rotund sable
quick kraken
#
if context.end_of_round and not context.blueprint then
            card.ability.invis_rounds = card.ability.invis_rounds + 1
            if card.ability.invis_rounds == card.ability.total_rounds then 
                local eval = function(card) return not card.REMOVED end
                juice_card_until(card, eval, true)
                return {
                    message = "Active!",
                    colour = G.C.MONEY
                }
            elseif card.ability.invis_rounds < card.ability.total_rounds then
                return {
                    message = card.ability.invis_rounds .. "/" .. card.ability.total_rounds,
                    colour = G.C.MONEY
                }
            end
        end

placid star
quick kraken
red flower
quick kraken
#

I need it to start at 2 rounds just like invis

#

I thought I copied invis's code

red flower
#

wait no i know the issue

#

youre missing context.main_eval

sonic cedar
primal robin
#

Does enhancements, seals support weight?

sonic cedar
#

so close

red flower
#

dunno for seals lemme check

lunar silo
#

also

primal robin
#

Don't see weight values in enhancement object

lunar silo
#

what do i do for the table to stop breaking?

#

i know it has to do with the to_big() function

#

but there is no money comparation in the function

#

there is only money arithmetic

red flower
#

both use weight

primal robin
#

I see, default is 5

red flower
rotund sable
red flower
#

not name == "E" is false

#

name ~= "E" is what you want

rotund sable
#

i feel stupid now

lunar silo
rotund sable
#

ty N'

#

i would be nowhere without you

red flower
# lunar silo yes

thats the issue, try doing ease_dollars(something) instead

else, ask in the cryptid discord

lunar silo
#

ok

primal robin
# red flower

Oh my god, basically smth similar to edition calculation junk

#

Except of no negative check

errant fulcrum
#

Can anyone explain why this crashes my game when I use it?

    set = "Spectral",
    name = "Test Sigil",
    key = "testsigil",
    config = {
        -- How many cards can be selected.
        max_highlighted = 3,
        -- the key of the seal to change to
        extra = 'red',
    },
    loc_vars = function(self, info_queue, card)
        -- Handle creating a tooltip with seal args.
        info_queue[#info_queue+1] = G.P_SEALS[(card.ability or self.config).extra]
        -- Description vars
        return {vars = {(card.ability or self.config).max_highlighted}}
    end,
    loc_txt = {
        name = 'Test Sigil',
        text = {
            "Select up to {C:attention}#1#{} cards to",
            "apply {C:attention}Test Sigil{}"
        }
    },
    cost = 4,
    atlas = "Sigils",
    discovered = true,
    pos = {x = 5, y = 2},
    use = function(self, card, area, copier)
        for i = 1, math.min(#G.hand.highlighted, card.ability.max_highlighted) do
            G.E_MANAGER:add_event(Event({func = function()
                play_sound('tarot1')
                card:juice_up(0.3, 0.5)
                return true end }))
            
            G.E_MANAGER:add_event(Event({trigger = 'after',delay = 0.1,func = function()
                G.hand.highlighted[i]:set_seal(card.ability.extra, nil, true)
                return true end }))
            
            delay(0.5)
        end
        G.E_MANAGER:add_event(Event({trigger = 'after', delay = 0.2,func = function() G.hand:unhighlight_all(); return true end }))
    end
}```
red flower
#

not without the crash

vast nymph
#

i know it's {C:something}{} but what do i write for this color?

red flower
#

attention

errant fulcrum
vast nymph
#

thanks!

red flower
errant fulcrum
#

The line referenced is code for an add_to_deck function but this just sets a seal

wintry solar
primal robin
#

Sorry, I need to do calculations for my tabs!

wintry solar
#

I’m sure you’d rather they’re all the same than each use some different method

primal robin
#

I'm already thinking about this

#

But I need also strandartize this for vanilla too

vast nymph
red flower
primal robin
#

I'll try of course

chrome widget
#

I think I've finally escaped my UI color hell

wintry solar
quick kraken
#

@red flower SMODS.add_card is only adding the default card of the set

primal robin
#

I know trash

quick kraken
#

What I need is something that adds a random one

red flower
#

or the cards are not injected properly rather

chrome widget
red flower
#

ohhh looks nice

chrome widget
#

There's a minor issue with that flicker in the background which is the result of ease_value trying to act on the color while the reference is set to a gradient object and I'm trying to tie tht up

#

Otherwise it works pretty good (barring save states, which screw with it)

quick kraken
#

@red flower wouldn't it be like this?

red flower
#

it might need to be defined first

quick kraken
#

Hold on

sonic cedar
#

i hate ui i hate it

#

WHY are you down there

noble schooner
sturdy compass
noble schooner
quick kraken
sonic cedar
#

...im hooking into use and sell... instead of card focus button....

primal robin
red flower
# quick kraken

maybe the problem is that it's defined after the jokers
otherwise idk

quick kraken
#

It's defined long before

red flower
#

do you have debugplus

quick kraken
#

Yes that's how I figured out it only gives me the default

red flower
#

do eval G.P_CENTER_POOLS.personajoker

#

not smods

#

there

unborn bay
#

i was about to say that

#

fym SMODS.P_CENTER_POOLS

#

😭

red flower
#

im distracted watching anime

primal robin
sonic musk
#

😈

placid star
#

does anyone know the func when starting a run :p

quick kraken
#

Also the set I'm worried about is rarepersonas

#

Oh wait I think I might know why

red flower
daring fern
quick kraken
quick kraken
red flower
#

no idea haha

stark viper
#

so i've created a function in a separate file, but if I understand the crash log correctly, it won't call it because the global variable is nil?

red flower
#

do you have a LRG = {} somewhere?

stark viper
#

nope, that'd be it lol

#

i figured it was something like that since even in the separate file, LRG is undefined

#

got it

#

thanks!

quick kraken
red flower
#

yes?

quick kraken
#

Every Persona Joker has this in_pool

red flower
#

ah yeah that's probably it

quick kraken
#

So what should I add to this to make it so that the selling a joker context is an additional condition of this?

red flower
#

you can add or (args and args.source == "personajoker") and then in add_card add key_append = "personajoker"
(or whatever string you want)

red flower
#

yes

quick kraken
#

What does that do?

red flower
#

it checks if the source of add_card is the one with your key_append

#

you can do that to bypass in_pool when trying to add them manually

quick kraken
#

I think the better suitable string is something like "fromtwins"

#

Cause the joker that spawns a Rare Persona joker after 2 rounds is The Twins

placid star
#

is this how i correctly hook into Game:start_run

lunar silo
#

sorry for late message but

#

IT WORKED

#

thank you so much n'

#

i was going to ask you to fix blank joker as well but i felt like it'd overcharge you with tasks

#

so maybe later

red flower
#

also i have so many start_run hooks haha

#

<@&1133519078540185692>

stiff locust
#

what

red flower
#

what

stiff locust
#

why did you ping mods what happened

#

i was tabbed out for like 5 seconds

red flower
#

i was showing them my start run hooks

#

(it was a nsfw bot)

stiff locust
#

understood

#

efficient start run hooks near you

modern kindle
#

N can you bring me some food im too lazy to depart the confines of my bed

harsh bobcat
#

I poked around with mu lang file now it says this when I start the game:

hybrid shadow
#

the "grown potato" thing

#

is it a message

harsh bobcat
#

It is when i upgrades each round

hybrid shadow
#

it goes in the dictionary

harsh bobcat
daring fern
stiff locust
#

i've had this issue before but i don't know how to solve it

for loop is simply not running

#

trying to do for index, value in ipairs(SuperContains) do
where SuperContains is a table made up of 13 other tables

red flower
#

does it run if you use pairs

zealous peak
#

I'm making a joker and want it to play SFX, basically

#

how

red flower
zealous peak
#

thanks

stiff locust
stark viper
stiff locust
#

SuperContains is already indexed (i think that's what this means?)

daring fern
red flower
stiff locust
#

i'm not doing any lovely patches here no

red flower
#

then that's not a problem with the loop

stiff locust
#

i just changed ipairs to pairs and got that crash when running the function containing the loop

red flower
#

it's something else

unborn bay
stiff locust
unborn bay
#

just put the elements normally like an array :V

stiff locust
#

and i thought ipairs would order them randomly

#

heard that somewhere

unborn bay
#

ipairs STOPS when it encounters a nil value

#

compared to pairs where it would just find the next non nil value instead

#

can we see the full code

stiff locust
#

uhhhhhh

#

it's gonna need some extra context first

#

(still getting the same crash either way now idk what i changed to cause this)

red flower
#

yeah that just seems unrelated to the loop
maybe the loop works now but the code inside doesn't

stiff locust
#

joker content mod where almost every joker has rank specific effects

#

except you can change the rank that their effects trigger on with other cards

#

i'm trying to make it work with a strength-like tarot that increases the mentioned card ranks by 1

#
Rankmagic_ContainsMod = function(_contains, _powerbool, _set)
    local _mypos = 0
    local _newindex = 0
    print("mypos and newindex set to 0")
    if _powerbool == true and _set == false then
        print("Power mode checked")
        for index, value in ipairs(SuperContains) do
            print("loop")
            if _contains[1] == value[1] then
                print("joker's contains table value 1 matches found value 1 of ", SuperContains[index][1])
                _mypos = SuperContains[index][1] + 1
                print("incremented by 1 to ", _mypos)
            end
        end
        if _mypos == 13 then
            print("Existing value is an ace! Wrapping around to 2")
            _newindex = 2
        else
            print("Existing value is not an ace. Value incremented to ", (_mypos + 1))
            _newindex = _mypos + 1
        end
        print("Returning Supercontains index ", _newindex)
        print(tprint(SuperContains[tostring(_newindex)]))
        return SuperContains[tostring(_newindex)]
    end
    if _powerbool == false and _set == true then
        return SuperContains[tostring(_set)]
    end
end

the _set stuff is for when i use this function for things that aren't the power tarot and i need to set the card ranks to be a specific number
the input is _contains and that is a table of 4 values
{"14", "Ace", "n", boolean}
14 is the raw rank of the card for get_id, Ace is the display name, n is so I can have it say "An Ace" or "A 2" so it's gramatically correct in descriptions, and the boolean changes to true after the card rank has been changed at least 1 time so an info queue pops up that tells you that the card ranks were changed

#

i put those values in card.ability.contains inside the jokers

#

so they store the ranks they use there and access them later (i haven't coded it to work with effects that target multiple ranks yet)

#

and this is run by the power tarot to increment the values

#

by 1 wrapping around like strength

#

i'm not sure if this is going to be anywhere near as cool as I think it is

#

you know it might have something to do with me removing the string names for the ranks and then using tostring on the table calls hold on

#

there's a lot going on here

#

that worked

#

i fixed it

#

it's incrementing by 2 but it's actually incrementing so it's fine

#

explaining how my code works leads me to a solution once again

#

it now only crashes if the contains rank is an ace

#

that's better at least

#

but i put print statements in it so i can look at the lovely log to see what went wrong

#

and I immediately know what happened

vast nymph
#

I tried to start making my joker by just taking midas code and changing everything i thought was relevant to my new enhancement's key, but it crashed and I have no idea where to go from here...

#

needless to say i don't understand much yet

red flower
#

m_[your mod's prefix]_slobber

vast nymph
#

ohhhh okay, the midas code was just m_gold so i thought it didnt need that part

#

why was it like that in the vremade code?

red flower
#

for vanilla stuff you don't need the prefix

vast nymph
#

gotcha

sonic cedar
#

are there any good ui people here rn im gonna lose my mind

zealous peak
#

I have the file as the exact name

#

emergencyfrog.ogg

red flower
#

that's not the exact name

zealous peak
#

I meant zvsmod sry

#

zvsmod_emergencyfrog.ogg

red flower
#

is it in assets/sounds/

modern kindle
zealous peak
#

wait nvm it is

sonic cedar
zealous peak
#

sry

red flower
#

do not ask me i read the code and do not know :3

red flower
# zealous peak sry

no idea then
make sure it's not something like it being called name.ogg.ogg

zealous peak
#

here's the code: duplicates itslef and plays the sound

sonic cedar
red flower
#

im watching anime

modern kindle
daring fern
sonic cedar
#

somecom.

sonic cedar
red flower
hybrid shadow
#

dot com 515

modern kindle
sleek cliff
red flower
#

does she look like shes winning

red flower
#

im watching one anime per year since anime was a thing

modern kindle
red flower
#

lupin was 1971

sleek cliff
red flower
#

1

sleek cliff
#

Hell yeah

rare phoenix
#

how do i make a joker always spawn with an eternal sticker?

#

i couldn't find any documentation for it

red flower
modern kindle
#

Ive only seen
Jojo up to part 5
Cowboy bebop
Evangelion
And like, arcane and edgerunners if those count
I dont watch much media

sleek cliff
#

Part 1 is how Hayao Miyazaki started his director career, but I shan't say anything more because this isn't the chat for it

sonic cedar
#

where are you GOING

sleek cliff