#💻・modding-dev

1 messages · Page 165 of 1

cerulean rose
#

also most languages don't use “do” in their for loop syntax

rough furnace
#

like lua variable = 2 print("bla")

random sleet
#

mandatory do and then is lua weird

marble flint
#

exactly the same as

variable = 2
print("bla")
rough furnace
#

also the same as

variable
=
2
print(
"bla"
)
fallen pelican
#

is this allowed in lua??

cerulean rose
#

real chads write machine code in a hex editor

rough furnace
#

yes

fallen pelican
#

maybe I was harsh on myself by starting with C# for how strict it is in comparison...

rough furnace
#

most languages let you mess with newlines real hard

woeful tundra
#

for card descriptions what do we put to make the text grey? ive tried grey and gray neither seem to work

mystic river
#

inactive

rough furnace
#

iirc it's {C:inactive}

woeful tundra
#

ill give that a shot, thanks!

random sleet
gaunt thistle
#

it's ironic that we provide ways to make injected code "look" nicer since it really doesn't change anything

crisp coral
#

adding a random amount of zwsps into my nice looking lovely patch so nobody can actually patch it

rough furnace
#

regex \s

random sleet
runic pecan
#

Situation: I have two of this tag, and I just entered a boss blind.
Expectation: One of them goes off, the other one stays, and the boss blind is disabled.
Problem in reality: Both of them went off. (But the boss blind is properly disabled)

marble flint
#

two things

#

first, card eval status text is probably not necessary, and you can let yep handle that

#

second, yep adds the function as an event to be called (at least one frame later)

#

we'd try disabling the blind outside of yep and seeing if it causes problems

runic pecan
#

So like this

marble flint
#

mhm

runic pecan
#

Lemme test this rq

marble flint
#

neat tag btw

icy cobalt
#

How can I stop an enhancement showing up on random cards from packs?

wintry solar
#

You can set it’s in_pool return to false

plush cove
#

heya! i'm new to the modding community so this may come off as a stupid question, but what would be the best way I can structure my folders and files so that I can load in jokers from lua files like this rather than having to put it all in my main file?

#

this is what uncommon_jokers.lua currently looks like btw

wintry solar
#

You can just use the standard SMODS.Joker definitions in your split out files

plush cove
#

that works. ty!

#

other people use intellij but I prefer to be rebellious 😎

#

Rider is basically IntelliJ

plush cove
#

i feel so organized despite having done nothing

runic pecan
shell lagoon
#

though maybe consider shrinking your butterfly icon a bit so it doesn’t touch the edges

shell lagoon
plush cove
#

heya, where can I find some documentation for how G.GAME works? i'm trying to figure things out but I'm making no progress

shell lagoon
icy cobalt
#

My enhancements don't seem to be using the atlas properly

faint yacht
#

Made sure that the 2x folder actually has the higher resolution atlas image?

icy cobalt
#

omggg

#

whoopsie

#

TY

runic pecan
#

How do I add this tag into info_queue?

tall wharf
faint yacht
#

runic pecan
frosty dock
#

ty mods

tall wharf
#

center thing i think

#

the thing in G.P_CENTERS

runic pecan
frosty dock
#

G.P_TAGS.tag_modprefix_butterfly

runic pecan
#

Worked!

mortal arrow
#

Hi modders !
I have the project to create a balatro mod but i knwo barely nothing about balatro modding
And im bad at design too
So im asking here if there would be people interested in making it together !
(I would do the code if it wasnt clear x))

quick snow
#

Hi yall, may i know what do you use for joker sprites?

runic pecan
quick snow
runic pecan
wooden badge
#

aseprite is ace

#

well worth the 15 quid (20 bucks)

#

think it might be on a sale

runic pecan
#

Libresprite is free open-source but probably with less func than aseprite I guess.

wooden badge
#

libresprite is a fork of aseprite its just not as well maintained, probably worth buying it and supporting the devs

wintry solar
#

You can get aseprite free too if you build it yourself

quick snow
#

ty guys

cursive glade
#

what is the context for when the Shop first loads?

crisp coral
#

none

prisma loom
#

what the difference in the these values?

#

self ability extra and invis rounds

violet void
# cursive glade what is the `context` for when the Shop first loads?

You might need to create it, this is the lovely patch I used if you want

[[patches]]
[patches.pattern]
target = "game.lua"
pattern = '''
                end
            }))
          G.STATE_COMPLETE = true
'''
position = "after"
payload = '''
    SMODS.calculate_context({entering_shop = true})
'''
match_indent = true```
prisma loom
#

but what the other one is responsible for?

wintry solar
violet void
#

that was my only issue and I added a check for my jokers

wintry solar
#

it calculates it through all the calculation areas

cursive glade
violet void
wintry solar
#

no

#

if you're worried about intefering with other mods just prefix your context variables

long sun
#

:D

prisma loom
#

how do I define it via config?

#

or its some sort of constant?

#

If I understand it correctly, this part of the code adds +1 to the counter at the end of the round

#

until it reaches the same value as self.ability.extra

#

then it starts jiggling

#

and becomes active

long sun
#

thoughts on this proposed ability for Candle?
(Uncommon): When Blind is selected, if you have any Tarot cards, destroy one and gain X0.2 Mult

#

unsure on wording but you get the gist

wintry solar
violet void
long sun
#

hokai ^^

#

thanks! :D

dense vector
long sun
#

:D

#

i'd love to make a dedicated BFDI joker set :D

#

oohoohooh i tell ya what

dense vector
#

Or have it be based around different Object Shows

long sun
#

so candle, right

violet void
#

Barnham has priority 👀

long sun
#

her ability is tarot cards, because she's spiritual and also purple

#

sooooo. we have an orbular blue character too.

#

:>

long sun
violet void
#

I was joking but it would be fire if you did 🔥

prisma loom
#

but it crashes the game when I hover over the joker

wintry solar
#

no

#

not at all

prisma loom
#

not correct you mean?

violet void
#

context.end_of_round is inside context.selling_self

prisma loom
violet void
#

also end_of_round doesnt need individual for that i think

#

or it will trigger multiple times

prisma loom
wintry solar
#

1 - you use self.X... all over the place which is incorrect, needs to be card.X..., and update loc_vars deifiniton to card from center
2 - it also references X.ability.extra which is an entire table and cannot be displayed in a string
3 - you refer to many values in an ability table that don't exist, it will crash everytime you try and compare any of these
4 - your context.end_of_round is nested within the selling self check, and should be tagged with context.end_of_round and context.main_eval
5 - your selling self context uses an event an manual methods for some reason?

#

is this your first joker?

violet void
prisma loom
#

I just rely on in game card.lua

wintry solar
#

I'd still recommend reading this and taking time to understnad what you're doing, look at other code that is functional and try and understand it

GitHub

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

#

don't rely on vanilla items, they work differently

runic pecan
#

What does this E do?

wintry solar
#

if you need some examples of code that is functional, you can take a look at my work on ortalab and I'm happy to talk you through any of the stuff in there in DMs if you need some more help understanding

wintry solar
frosty dock
#

people really can't read

prisma loom
wintry solar
#

it has examples of everything other than seals, and I try to keep the code relatively clean for other people to look at and learn from

long sun
#

*grumbe* the goo

fickle mango
#

How would I make the Jim sound effect play when the message pops up instead of happening immediately as the cards are being scored?

#

I just realized I didn't include play_sound("bpch_jim") in the code just imagine its there

broken cliff
#

Did anyone ever do a mod where the jokers are like math functions, js asking if anyone did that before

fickle mango
dense vector
#

Not even Jimbo

#

Just Jim

fickle mango
#

Yes

#

I originally had it be 1 in 25 but that's too low a chance

broken cliff
# fickle mango

.miJ would decrease ur mult but will try to increase it 1 in 25 chance

#

Smh

nocturne garnet
# fickle mango

1 in 100 chance to die when you reach Ante (multiple of 8)

broken cliff
fickle mango
fickle mango
#

It seems the 0.5x mult effect doesn't seem to work. Is there a way to directly read from and modify the mult value?

dire palm
#

Working on my first ever mod on this game. Now to figure out how to actually make the effect real.

fickle mango
crisp coral
karmic arch
karmic arch
fickle mango
dire palm
old bane
fickle mango
#

Even using xmult instead of xmult_mod, it doesn't seem to be working and I have no idea why. The mult should be 1 in this case

wintry solar
#

Can you screenshot the code?

fickle mango
#

I just realized I might (emphasis on might) know exactly what's wrong after giving the Steamodded API a cursory skim

wintry solar
#

And what do you want to happen?

fickle mango
#

Multiply the mult value of the played hand by 0.5, halving it

wintry solar
#

With a custom message and sound?

fickle mango
#

Already got the message and sound in, it's just the 0.5x that doesn't work

#

card.ability.extra.evilmult is 0.5 for reference

wintry solar
#

The only thing that looks wrong is that event in your return

#

It just needs to be sound = ‘key’

fickle mango
#

that's what's confusing me as well 'cause like, shouldn't it just work?

maybe it's because i'm on an old version of steamodded though

violet void
fickle mango
wintry solar
#

You shouldn’t be developing on old versions

fickle mango
night pagoda
#

I'm modifying G.P_CENTERS.m_glass.config.Xmult to change xmult value of the glass cards, but for some reason, the change only applies visually - scored glass cards still do only 2x mult, any ideas?

broken cliff
#

xmult

fickle mango
#

i'm using normal mult for when it doesnt hit

broken cliff
broken cliff
broken cliff
night pagoda
#

It is where the default xmult value is stored

broken cliff
#

i think centers refers to GUI perhaps

#

unless im wrong

frosty dock
#

nah you're on the wrong track there

fickle mango
frosty dock
#

sounds more like the center is updated but the card itself isn't? not sure why enhancements would use the center's config though

night pagoda
#

I do also update all cards in the deck

frosty dock
#

🤔

night pagoda
#

(I also modify the chance but it seems to work fine)

frosty dock
#

will have a look later then

frosty dock
#

there's some weirdness like that iirc

night pagoda
#

I'll try

#

nope

#

still x2

#

and the description xmult doesn't change now

frosty dock
#

maybe it's config.x_mult and ability.Xmult? I'll have a look later

broken cliff
#

might be config

wind turtle
#

how would I check if the current hand is a certain hand?

wind turtle
#

yeah

#

i'm trying to make a card that detects if the current hand is a three of a kind

broken cliff
#

u can do next(context.poker_hands[poker_hand]) where poker hand is ur hand

#

quote from examples jokers included in smods example mods
"The 'next()' part makes sure it goes over every option in the table, which the table is context.poker_hands."

#

"context.poker_hands contains every valid hand type in a played hand."

wind turtle
#

so what poker_hand would i put in for three of a kind?

#

is it just threeofakind?

broken cliff
#

ig u should try "Three of a kind" first

#

and then Three_of_a_kind

#

Three of a Kind*

frosty dock
#

"Three of a Kind"

wind turtle
#

so now how would i go about destroying cards used in scoring?

faint yacht
#

return { remove = true } for marking cards for destruction.

wind turtle
#

how would i destroy multiple cards doing that?

#

i'm trying to make it so if you play a three of a kind it destroys all the cards scored

faint yacht
#

That's automatically done for each card iirc.

wintry solar
#

As long as you use the destroying context it is yeah

haughty wraith
#

hello

wind turtle
#

so it'd be something like
if context.destroying then (for loop for the cards in scored hand) return { remove = true} end end ?

haughty wraith
#

how can i install mods, i dont have nothing and the tutorials dont have the proper links

broken cliff
wind turtle
#

what

#

there

haughty wraith
#

tyyyy!!

wind turtle
#

after scoring

sonic cedar
#

how would i give a joker its own ability?
trying to have it gain chips whenever you lose mult

sonic cedar
#

yeah

broken cliff
#

u will have to modify the calculate function and check for current contexts

#

im not sure how to check if u lose mult

sonic cedar
#

i see thanks

broken cliff
#

it happens when all cards are scored

smoky talon
#

I'm trying to make a joker that gives 3 of a specific consumable but am having trouble due to the pool limit, which i havent figured out how to bypass. I tried adapting perkeo's code instead, but i cant find a way to have it target a specific card to copy instead of a random one. If anyone has advice on either way of doing it, i would really appreciate it

#

i replaced the perkeo code with what i had originally, but i can bring it back if you need to see it

broken cliff
#

from perkeo 2(example jokers) code

wintry solar
smoky talon
#

the negative part works fine

wind turtle
#

this is what i'm trying to make

wintry solar
faint yacht
broken cliff
wintry solar
#

In the destruction context ofc

junior pine
#

is there anyway to run code every frame with steammodded, or do I have to use Lovely for that? I have tried using an always false G.E_MANAGER but it stops running after I click in game

wintry solar
#

What do you need to run every frame?

smoky talon
#

it crashes when i change it to e negative

broken cliff
#

could u send the error message

junior pine
broken cliff
smoky talon
broken cliff
wintry solar
#

Can probably hook Game:update()

smoky talon
#

i tried just replacing the negative with 'e_negative' and i also tried using exactly what perkeo had

wintry solar
#

Don’t use the weird table part, just a string as the first argument

foggy carbon
#

what do I do when the game crashes on startup from memory issues again? I downloaded fresh Smods, cleared the Lovely crash log, uninstalled and reinstalled the game, and it's still crashing

broken cliff
wintry solar
#

But the other way you had is okay, it’s just ugly

wind turtle
#

so how do I mark a card for destruction?

foggy carbon
broken cliff
smoky talon
#

it works now but it still doesnt fix my problem with the pool not allowing more than 1 to be spawned at once

broken cliff
maiden river
#

is there a way for my consumable button to be out here with the normal consumables instead of them all being behind this larger button

broken cliff
#

or theres not enough space for them

smoky talon
#

it spawns 1 negative one, a negative version of the other one in the consumable category, and a negative jimbo

maiden river
broken cliff
smoky talon
#

yep

#

ill ssend a pic

wintry solar
#

It’s like the 7th? in vanilla create card

#

Or use SMODS.create_card

foggy carbon
smoky talon
broken cliff
#

can u debuff a playing card

wind turtle
#

how do i get the text effect Perkeo has on "Negative"?

broken cliff
wintry solar
wind turtle
#

how do i get that color

wintry solar
wind turtle
broken cliff
#

is it possible to debuff ALL playing hands, if so how

wind turtle
#

this gonna go hard asf 🔥

broken cliff
#

like where playing cards are stored, even

broken cliff
#

wouldnt it create like exponentiating jokers

wind turtle
broken cliff
#

from 1 to 2 to 4

#

to 8 to 16

#

to 32

wind turtle
#

also how can i actually do that

#

like how do I make a negative joker

foggy carbon
analog pilot
hardy viper
broken cliff
haughty wraith
#

i installed cryptic mod, talisman mod and handy mod, the cryptic and talisman mod works perfectly, but the handy doesnt do anything, it shows the mod is installed but nothing

foggy carbon
broken cliff
broken cliff
#

from 1 to 2048

haughty wraith
broken cliff
#

mods tab

broken cliff
#

so like 3-4 antes and u have 2k mult

#

4k mult, 8k mult

#

that is, until ur game crashes

wind turtle
#

anyways how do i create a joker with an edition

haughty wraith
#

doesnt show anything, it seems that it was installed correctly but doesnt do anything

broken cliff
#

they could be missing or smth

#

or click on the handy mod

haughty wraith
#

ok

broken cliff
#

to see what it even has to offer

haughty wraith
#

it creates shortcuts

#

but i do a command for a short cut and nothing

heady summit
#

wich is the mod that ramdomize everithing?

haughty wraith
heady summit
#

i mean the one that everithing is ramdom

broken cliff
# wind turtle anyways how do i create a joker with an edition

local card = smod.create_card(table)
the table is this

This function replaces create_card. It provides a cleaner interface to the same functionality. The argument to this function should always be a table. The following fields are supported:
set - The card type to be generated, e.g. 'Joker', 'Tarot', 'Spectral'
area - The card area this will be emplaced into, e.g. G.jokers, G.consumeables. Default values are determined based on set.
legendary - Set this to true to generate a card of Legendary rarity.
rarity - If this is specified, skip rarity polling and use this instead of a chance roll between 0 and 1.
    Under vanilla conditions, values up to 0.7 indicate Common rarity, values above 0.7 and up to 0.95 indicate Uncommon rarity, and values above 0.95 indicate Rare rarity.
skip_materialize - If this is true, a start_materialize animation will not be shown.
soulable - If this is true, hidden Soul-type cards are allowed to replace the generated card. Usually, this is the case for cards generated for booster packs.
key - If this is specified, generate a card with the given key instead of the random one.
key_append - An additional RNG seeding string. This should be used to put different sources of card generation on different queues.
no_edition - If this is true, the generated card is guaranteed to have no randomly generated edition.
edition, enhancement, seal - Applies the specified modifier to the card.
stickers - This should be an array of sticker keys. Applies all specified stickers to the card.
analog pilot
#

it’s a part of cryptid if we’re talking about the same thing

broken cliff
foggy carbon
heady summit
broken cliff
broken cliff
haughty wraith
analog pilot
heady summit
#

yes and jokers ....

broken cliff
#

did u follow these steps

Install lovely by following instructions in repository page. Make sure your antivirus is not removing it;
Download latest release of mod by selecting an archive named Handy-[version].zip;
Put HandyBalatro folder from archive into game's Mods folder (can be found in %appdata%/Balatro/Mods);
Start a game. If all done correctly, new button should appear in options menu;
analog pilot
#

jokers are cards

#

that’s a part of the cryptid mod

broken cliff
heady summit
#

tyall

analog pilot
#

misprint deck

analog pilot
broken cliff
#

whats the code

wind turtle
#

just lua if context.setting_blind then SMODS.create_card({key = "virus", edition = "negative"}) return end

hardy viper
#

you need prefixes in the key

broken cliff
#

e_negative i think

hardy viper
#

edition you don't

heady summit
#

ehhm

haughty wraith
wind turtle
#

so j_lbm_virus

heady summit
#

one more thing xd

hardy viper
heady summit
#

could any1 send me cryptid

haughty wraith
hardy viper
broken cliff
wind turtle
#

so it's failing set_edition

#

so i will try e_negative

hardy viper
wind turtle
#

hey wait i can just check perkeo

wintry solar
#

Yeah editions need keys

haughty wraith
wind turtle
#

nevermind

hardy viper
wintry solar
#

Yes it does

hardy viper
#

oh wait

#

im thinking of the actual card.edition

#

nvm

haughty wraith
#

should i uninstall new or old

wind turtle
#

uh okay

broken cliff
#

if u want cryptid uninstall new(-main)

wind turtle
#

it spawned it, but it's not constrained to the joker area

wintry solar
#

Uninstall old if you are developing mods

broken cliff
#

into the joker space

wind turtle
wintry solar
broken cliff
#

oh right wait

sonic cedar
#

what would i use to pull the number for total mult being scored? the one thats shown in here

broken cliff
wind turtle
wintry solar
#

It’s a global value

haughty wraith
sonic cedar
wind turtle
#

and it is Truly working

broken cliff
#

is there a way to get all playing cards

wintry solar
#

G.playing_cards

broken cliff
#

and do i use smods.debuff_card to debuff them?

#

or does it apply to jokers only?

haughty wraith
#

nothing, i cant solve it

wintry solar
#

What’s debuffing them?

lucid owl
#

this joker retriggers all jokers, how do i avoid things like cavendish's extinct check?

hardy viper
#

i don't believe cavendish extinction gets retriggered?

broken cliff
lucid owl
#

also if possible, how could i avoid retriggering jokers that aren't compatible with blueprint?

broken cliff
#

since they have different contexts

haughty wraith
#

solve it !!!!

lucid owl
haughty wraith
#

thanks for the quick respond

wintry solar
#

This will retriggers every joker effect

broken cliff
#

the cavendish uses end_of_round check

#

it does +15 mult in a differnt context

lucid owl
broken cliff
broken cliff
wintry solar
wintry solar
broken cliff
#

ill check later

heady summit
#

i think is cryptid error

#

but i dnt know why

broken cliff
#

like in the middle of the game?

heady summit
#

when i start a run

#

its may bcs of smod version?

broken cliff
#

is it old-calc

wintry solar
#

It’s old calc cryptid

heady summit
#

ill try it

broken cliff
#

send the mods tab

heady summit
broken cliff
#

no as in ingame

#

ALSO

#

ITS supposed to be Cryptid

#

not cryptid-main

heady summit
#

ok

#

wait

#

im in game

broken cliff
#

it better not be nested

heady summit
#

thanks guys

#

i think it also was talisman that i had an outdated

sonic cedar
#

if im printchecking a variable, which console is the check being sent to? (for context i am using print())

lucid owl
#

this only copies a single joker, i assume it's a fault of mine but how can i make this copy every joker?

stiff locust
#

how do I make context.end_of_round not trigger like 8 times again

tepid crow
wintry solar
stiff locust
#

is that a bettercalc thing

#

i'm still on old

wintry solar
wind turtle
#

ok back to this issue: how do I destroy all cards used in scoring?

wintry solar
nocturne garnet
stiff locust
#

i've been waiting for cryptid to move to better calc

wintry solar
#

Like over a month

#

Continuing to develop on old calc makes no sense

nocturne garnet
#

old woman

wintry solar
#

Cryptid should just stop being so slow

tepid crow
stiff locust
#

well damn

#

i'm gonna have to update so many mods

sonic cedar
#

do i leave it there

#

?

wintry solar
#

No set it to the lowest

sonic cedar
tepid crow
wintry solar
stiff locust
#

really thought the transition would take longer

junior pine
#

is there a reference for G.GAME ?

lucid owl
stiff locust
#

like it took a good few months to get everyone from 0.9.8 steamodded to 1.0.0 didnt it

broken cliff
#

is it possible to join 2 strings together

broken cliff
#

to get smth like X3 mult wow

stiff locust
#

"text" .. "text2" will make "texttext2"

wintry solar
broken cliff
#

do i do that after the localize operation

wind turtle
wintry solar
#

Why don’t you just use the Xmult localization

broken cliff
#

Why Complain

sonic cedar
wind turtle
broken cliff
#

well yh

tepid crow
wind turtle
broken cliff
tepid crow
stiff locust
#

now I get to fix that bug where cryptid's refactor removes all my fusion sprites

wintry solar
stiff locust
#

god what the fuck is even going on with that

wintry solar
#

Here’s a hint Marie

wind turtle
#

anyways how does one destroy all cards used in scoring

wintry solar
#

Uninstall cryptid

#

Problem solved

sonic cedar
wintry solar
stiff locust
#

i feel like I should solve the problem considering i have crossmod content with it

sonic cedar
wind turtle
# broken cliff

i saw that, but that code looks like it only works for one card

#

i need to destroy all cards used in scoring

wintry solar
#

It passes every card in turn

wind turtle
#

ah

#

gotcha, thanks

sonic cedar
wintry solar
#

So you can evaluate each card independently

broken cliff
#

full_cards is the played cards I think

wind turtle
#

so do i just destroy_card = card and return { remove = true }?

wintry solar
#
if context.destroying_card then
  return {
    remove = true
  }
end```
sonic cedar
wintry solar
#

This might destroy unscored cards I don’t remember

sonic cedar
cursive glade
#

cant contact a table into a string. need to stringify, or extract the data from the table you want to concat.

wintry solar
sonic cedar
#

i do

wintry solar
#

Then mult will be a table

sonic cedar
#

ohhhh cause the scoring buff

broken cliff
#

mult a table
Wild

#

i mean OmegaNum prob uses couple numbers

#

due to limitations

wintry solar
#

Join the anti talisman club!

broken cliff
#

cant express much data with 1 number Tho

sonic cedar
broken cliff
#

Especially With

#

Arbitrary binary limitations

wintry solar
#

Pffft big numbers who cares

broken cliff
#

saw A guy reach 38th anti

#

and couldnt beat it with naneinf

sonic cedar
#

game just cheating at that point

stiff locust
#

yeah ante 39 overflows the score which is why talisman exists

sonic cedar
broken cliff
#

prob table.concat

#

i think taht might be an option

#

if it even exsits

stiff locust
#

is the latest main branch of smods newcalc

broken cliff
#

Idk im too familiar with

Roblox Studio lua

wintry solar
stiff locust
#

okay well i'm getting a crash on startup already

wintry solar
#

A crash on start up?

broken cliff
#

how do i Rig the game to get my Jokers instantly

stiff locust
#

it was cryptid's fault

broken cliff
#

want to test them

broken cliff
#

In action

broken cliff
stiff locust
#

holy shit you can SWITCH PROFILE

#

WITHOUT CRASHING NOW

#

how long has that been a thing

#

i feel like smods has literally done that for its entire lifespan

wintry solar
#

That has always been a thing?

wind turtle
#

got the green guy card working

stiff locust
tepid crow
stiff locust
#

i've had that issue forever and idk it just stopped happening on new calc

wintry solar
stiff locust
#

i guess i'll test all my jokers while i'm here

#

make sure everything works on new calc

#

crashed on loading into a run I know exactly what the crash is don't I

junior pine
stiff locust
#

well that's just great

frosty dock
stiff locust
#

i got this crash when.... selling Splash? i didn't even know that was possible

stiff locust
#

debugging 🔥

stiff locust
frosty dock
#

sounded like you didn't lmao

stiff locust
#

i solved the run startup crash it's a fusionjokers talisman thing

hardy viper
#

average fusion jokers

stiff locust
#

but now i'm crashing when selling jokers

#

so /shrug

solar eagle
#

how does one set an icon for your mod? like how cryptid does

stiff locust
#

yeah no idea what makes this line crash

maiden river
#

two things:

  1. I made a pack, but these green particles are sticking around
  2. Using the cards doesn't do anything
frosty dock
solar eagle
#

got it ty!

stiff locust
#

i should get the full log

primal robin
#

i.e. goto "Handy-v1.3.0b" folder, you'll find "HandyBalatro" folder inside. This is a mod which you should put in Mods

daring crag
#

I'm trying to mod a joker as an experiment, how would I make a joker that creates a copy of itself when sold or destroyed? (I do once again apologise if this is the wrong channel)

sonic cedar
#

if a joker has some of its effects compatible with blueprint, but not all, would you still mark it as blueprint compatible?

#

wait im stupid runner exists

foggy carbon
foggy carbon
frosty dock
#

when my fish contains a strush

wooden badge
sonic cedar
#

i already had it i was just stupid but thank you both

lucid owl
#

the {effecttable} is from something someone else said about using this but i think i misunderstood a placeholder for an actual usable thing lol

sonic cedar
#

i do want to know if there's a context for checking when the total mult value changes? that way i can assign a value to the postloss variable equal to that current mult (what i have so far)

ionic verge
#

if selectedjoker is a random joker i selected, this would be the way to put that joker's name into my description, right?

marble flint
sonic cedar
marble flint
#

something like

local original_function = foo
function foo(...)
  original_function(...)
  do_something_else_when_foo_is_called(...)
end
ionic verge
rugged star
#

how do i make the joker being evaluated juice up with the message on the joker instead of on the playing card during context.individual?

marble flint
# sonic cedar so like

it'll need to looke like this:

local raw_mod_mult = mod_mult
function mod_mult(new_mult)
    local ret = raw_mod_mult(new_mult)
    -- Do stuff with the new mult value here
    return ret
end
marble flint
rugged star
#

i tried that but the message is still on the playing card

#

sorry, should've mentioned that i tried that

marble flint
#

all good

rugged star
#

the joker does juice up if i do that, but the message is still on the playing card

marble flint
#

idk then

lucid owl
daring stratus
#

Does anyone know if theres a way to make square joker not be square anymore?

violet void
#

Is there a way to get the score of the hand played through context without lovely patching?

rugged star
timid parrot
# foggy carbon

Does that make straights 5 oak cuz if so that’s extremely powerful

lucid owl
#

then for the entire hand you can do hand_chips * mult

violet void
timid parrot
#

Wow

lucid owl
#

so if you have it defined, you can remove that definition since mult is always equal to the hand played's mult

violet void
#

It does not appear to be a global variable

foggy carbon
# timid parrot Wow

I feel it's not that much of a problem? Building for consistent straights is difficult due to it requiring five specific ranks. So mostly, it just expands the possible number of playable hands.

I made it an Uncommon because Four Fingers and Shortcut are both Uncommon, and this feels most similar to those conceptually. Should I make it Rare?

lucid owl
#

what's the full code?

sonic cedar
violet void
lucid owl
timid parrot
wind turtle
violet void
# lucid owl lol of course

If I want to change hand_chips and mult before it does the multiplication I suppose I need to lovely patch

wind turtle
#

and if it works it works

lucid owl
lucid owl
#

who's that on the left lol

violet void
#

right?

#

if you mean on the right its a new card type I made

lucid owl
#

right* my bad LMAO

daring stratus
#

Is there anything stopping me from disabling / removing square joker and then creating a new identical joker that doesnt have the weird sizing so that I can make it look like a regular joker (also the same for photo), this is probably a bad idea but I cant think of another way to do it.

jagged sun
#

is there anything within context.destroying_card that can get me a reference to the triggering joker? i'm trying to get a joker to display a message while destroying cards and a reference to self crashes the game, card just references the destroying card

frosty dock
#

card is the joker

#

assuming you have a joker destroying a card

#

if you want something to happen upon a card being destroyed, that's context.remove_playing_cards and has no information on the source of destruction

jagged sun
jagged sun
normal crest
#

what's your code

jagged sun
frosty dock
#

you don't need card = card though afaik

normal crest
#

so like { mult = 4 } as an example

lucid owl
normal crest
#

call calculate_joker on every joker, store the result and pass that result to calculate_effect

#

also in your code you're not assigning context.blueprint_card which could lead to issues

violet void
marble flint
#

yeah, it does

#

especially if "average" mean arithmetic mean

#

actually, geometric mean might be more appropriate for how balatro scales?

violet void
#

the score couldnt possibly be negative

#

this is the calculation

dreamy thunder
#

how to check how many times a specific consumable was used that run?

valid ice
#

Question, I downloaded this mod that replaces the amongus deck skin with a custom one. I'm trying to make it standalone, but while it's showing up in the list, the cards appear blank. I created a lua file, based on the lua files for existing deck skin mods. https://pastebin.com/X791YAZe

violet void
dreamy thunder
#

yeah

violet void
# dreamy thunder yeah

You can probably create a variable for it

local igo = Game.init_game_object
Game.init_game_object = function(self)
    local ret = igo(self)

    ret.consumable_uses = 0
    return ret
end```

then you call it using `G.GAME.consumable_uses`
dreamy thunder
#

aight thanks

violet void
#

thats a hook btw

dreamy thunder
#

got it working, thanks again

stiff locust
#

how do I grab the position of a joker

#

like which spot it's in on the joker slots

normal crest
#

Loop through G.jokers.cards and find the index of your joker

nocturne ravine
#

Hi, brand new to this, having a lot of trouble finding info online
Attempting to add a new joker to the game, how would I go about reading the current hand type being played?

#

Like, if I wanted to check if the current played hand is a flush, for example?

random sleet
#

context.scoring_name i think is the name of the hand

wintry solar
wintry solar
royal carbon
#

How do I go about preserving a variable from one context to another? I'm trying to check if a hand contains a straight and do some stuff if it does, but the variable is getting set to false again. Here's my current code

  local straightcheck = false
  if context.before and not context.blueprint then
    if next(context.poker_hands['Straight']) then
    straightcheck = true
    end
end
if straightcheck```
rough furnace
#

the vairable is local to that call

#

you propbably want to store it in your card.ability somewhere

#

or on G.GAME if all instances of your joker share it

royal carbon
orchid thunder
#

What part of balatros code makes it apply the sprite for seals

frosty dock
#

Card:draw

lucid owl
#

what could be causing this to crash when a hand is played, with the error attempt to index local 'effect' (a nil value) ? seemingly calculate_effect is the problem but i'm unsure

stiff locust
#

did not get it fixed and no i'm not hooking that

#

one of my mods might be? idk

spark remnant
#

silly question, how can I get how many time tarot cards have been used?

wintry solar
normal crest
#

Also you're looping twice unnecessarily

#

Also you should set blueprint_card

#

Also you should do the blueprint check balatro does to prevent infinite copying

stray warren
main mica
#

in what order are smods mods loaded?

random sleet
#

"yeet"

main mica
#

hm?

random sleet
#

more seriously there's a priority system

#

and then mods at the same priority are loaded alphabetically (?)

main mica
#

awesome, thanksies ^^

frosty dock
hardy viper
#

nfs is undefined there isn't it

#

i guess it's just love2d

high stag
#

is there a way to check to see if the current hand's score is the highest score of the current run?

frosty dock
random sleet
rough furnace
#

its possible platform depenedant

random sleet
#

omw to rename thac again explicitly so it loads wrong on linux

rough furnace
#

just use priorities

random sleet
#

im going to cause problems

#

on purpose

#

(i also have no idea how that'd even be done so)

smoky talon
#

how do i make the consumable spawning ignore the pool limit so that it spawns all 3 instead of just 1 and 2 jimbos?

primal robin
#

That's definitely a progress

spark remnant
#

follow up, how do I set a loc_var with a default value?

marble flint
#

if you need a loc_var, the function must return it

spark remnant
#

how do I get the text var to not say "+nil"

marble flint
#

well, you could do ... or 0 when generating it

spark remnant
main mica
spark remnant
#

here, when no tarot has been used it says +nil chips

SMODS.Joker {
    key = 'joker',
    loc_txt = {
        name = 'parking',
        text = {
            '+10 chips per tarot card used this run',
            '{C:inactive}(Currently {C:chips}+#1#{C:inactive} Chips)',
        }
    },

    atlas = 'Jokers',
    rarity = 2,
    cost = 7,
    unlocked = true,
    discovered = true,
    blueprint_compat = true ,
    eternal_compat = true ,
    perishable_compat = true ,
    pos = {x = 0, y = 0 } , 
    config = {
        extra = {}
    },

    loc_vars = function(self, info_queue, card)
        return { vars = { card.ability.extra.chips } }
    end,

    calculate = function(self, card, context)
        if context.using_consumeable then
            if (context.consumeable.ability.set == "Tarot") then
                card.ability.extra.chips = G.GAME.consumeable_usage_total.tarot * 10
            end
        end
        if context.joker_main and G.GAME.consumeable_usage_total and G.GAME.consumeable_usage_total.tarot > 0 then
            card.ability.extra.chips = G.GAME.consumeable_usage_total.tarot * 10
            return {
                chips = card.ability.extra.chips
            }
        end
    end
}
stray warren
#

You need to do 'or 0'

#

So that if it is nil, it defaults to 0

marble flint
#

that or add chips = 0 in config.extra

main mica
#

yup, you didn't set card.ability.extra.chips

high stag
#

So I'm trying to make a Joker that adds x0.25 mult whenever you play the highest hand of the run, and removes x0.25 mult when you dont.

I'm pretty sure I found the code to gather the highest score of the run (G.GAME.current_round.high_scores.hand)Y

and based on the example Runner in the steamModded wiki section, the next( ) is used to gather the current values of hands (such as the playd hand being a Straight), I just need to know what value is the current hand's score

#

wait no, the next() is for searching through a table to ensure that the Runner can also grab straight flushes, I just need to use the context. section there

spark remnant
hallow slate
#

How do I get the rank of a card and get the next rank (as if I was doing the strength card)?

normal crest
#

card.base.value to get the rank of the card as text, like "Ace" or "King", card:get_id() to get the ID of it

#

to get the next one you can do SMODS.Ranks["Ace"].next[1]

wooden nexus
#

WIP for mod

crisp coral
hardy viper
#

fore

high stag
#

Hey what's the Context for like, when the score has been finalized on a round?

nova finch
#

if a variable is a list of values, how would i make a if statement that checks if a different variable is set to any one value in the list?

nova finch
high stag
#

not exactly, I'm trying to get the score of each hand, not the full round, I mispoke

#

so like, if I play a High Card, after it applies the jokers, the card values, multiplies the chips and the mult, the number that is calced then is what I'm looking to find

smoky talon
#

how do i place a specific consumable in the consumables slot? based on everything i know this should work, but it just picks a random one from the category instead

high stag
#

there, the 5,776, that is the number I wanna check

fringe ember
#

Did we ever figure out the solution to this error?

#

...or not

#

i think the error was popping because i had a github repo in the same folder

#

for some reason

smoky talon
#

nobody who can help any of us is online lol

fringe ember
#

lol

#

yeah removing the repo folder worked

smoky talon
#

ive been trying to figure out this dang consumable thing all day but nobody has been on here to help, and im starting to go insane

#

idk why it isnt working, the odeshould beright but im probably missing onesmall line somewhere

runic pecan
fringe ember
#

We can hotload mods right? Just by reloading the game through the console?

fringe ember
#

answer is yes, but answer is also i don't know why it's tripping like this

#
calculate = function(self, card, context)
        if context.cardarea == G.play and context.is_suit("Hearts") and context.is_face() then

            return {
            mult_mod = card.ability.extra.mult,

            message = localize { type = 'variable', key = 'a_mult', vars = { card.ability.extra.mult } }
            }
        
        end
    end```
#

relevant part of code

#

python brain is really not liking lua rn

runic pecan
fringe ember
#

no parenthesis?

runic pecan
#

context.other_card:is_suit('Heart')

high stag
# runic pecan

okay then that's not the issue, thank you. I must be grabbing the wrong value instead then.

smoky talon
#

the code if you need it

#

maybe the consumable tag is wrong?

#

its supposed to be c for consumable at the start right?

fringe ember
#

giving the attempt to index field 'other_card' [a nil value] error now

nova finch
#

how do I make a joker that retriggers only a certain set of jokers?

#

I've been trying a couple things with self.ability.name but that crashes

versed swan
#

Does anyone know the eval code for discovering everything? (debug)

runic pecan
lucid owl
#

scratch that, misspoke

fringe ember
#
if context.cardarea == G.play and context.other_card.is_suit('Heart') and context.other_card.is_face() then

            return {
            mult_mod = card.ability.extra.mult,

            message = localize { type = 'variable', key = 'a_mult', vars = { card.ability.extra.mult } }
            }
        
        end```
lucid owl
#

if i were to iterate through every joker, i could do something like this

for i,v in ipairs(G.jokers.cards) do
    if v.ability.name == 'Blueprint' or v.ability.name == 'Joker' then
        (do something)
    end
end
fringe ember
#

it didn't work then

#

wait a sec

runic pecan
#

✅:context.other_card:is_suit('Heart')
❌:context.other_card.is_suit('Heart')

versed swan
fringe ember
runic pecan
# fringe ember

✅:context.other_card:is_face()
❌:context.other_card.is_face()

fringe ember
#

the colon isn't the issue here

lucid owl
runic pecan
fringe ember
#

mmm, it's still giving me the error

with

if context.cardarea == G.play and context.other_card:is_suit("Hearts") and context.other_card:is_face(true) then```
smoky talon
#

@runic pecan the code you gave me crashes my game when choosing the bling and triggering it. Maybe the tag that calls the specific consumable is wrong?

runic pecan
runic pecan
smoky talon
#

yep

runic pecan
#

and "est" is the consumeable's key?

fringe ember
#

the one time i needed a heart face and i draw none

smoky talon
nova finch
#

does context.other_joker check when a different joker triggers or just when the joker itself isn't doing anything

smoky talon
#

just sending these to make sure i dont miss anything

fringe ember
#

that was what it was missing

#

thanks

runic pecan
smoky talon
#

what part? the entire mod code?

fringe ember
#

ok one more thing from me before i slip away.

would i change card.ability.extra.mult to card.ability.x_mult in the code if i want it to be x2 mult instead of +2 mult?

runic pecan
smoky talon
#

here

#

im sure its messy and there's stuff that doesnt need to be in there, im just trying to make it work first

runic pecan
# smoky talon

Try SMODS.add_card({ set = "Drugs", key = 'c_gcbm_est', area = G.consumeables, edition = 'e_negative' }) ?

smoky talon
#

alright (dont question why i added drugs to balatro)

#

no dice

fringe ember
smoky talon
#

im gonna add crack, ill add weed if i think of a good effect for it

runic pecan
smoky talon
#

dang

normal crest
# smoky talon

use SMODS.change_base(card, suit, rank), where suit is, for example 'Hearts' and rank 'Ace' instead

#

you can get the rank as a string from card.base.value

smoky talon
#

my current method works fine, im not looking to change it and risk breaking it just like the spawning

#

the spawning the card with the joker is what im worried about right now

#

if i can figure that out ill come back and clean up the rank conversions

normal crest
#

so what's your spawning card code

smoky talon
#

Riv helped me change it to this a few minutes ago, crashes my game when i try to choose a blind though

normal crest
#

what's your consumabletype look like

smoky talon
normal crest
#

what happens if you just pass the key to add_card

#

and nothing else

runic pecan
normal crest
#

that's just not true

weak gate
#

How do I make a custom sticker? (the code parts)

smoky talon
#

so waht am i supposed to do then?

normal crest
smoky talon
#

i dont understand what you mean by taht, sorry

normal crest
#

SMODS.add_card { key = 'c_gcbm_est' }

smoky talon
#

replace it all with just that?

normal crest
#

yes

runic pecan
#

To see if this would work

smoky talon
normal crest
#

can you send the entire crash log

smoky talon
runic pecan
#

I think I found what was trying to index your "center"

smoky talon
#

so what do we do about t

normal crest
#

since you have debugplus, try opening the console with / ingame and type eval G.P_CENTERS.c_gcbm_est

weak gate
runic pecan
smoky talon
#

riv called it

#

its nil

normal crest
#

So your consumable code is not being executed, or your prefix is not gcbm

runic pecan
#

I suspect it's something other than c before _gcbm_est?

smoky talon
#

it should be gcbm

#

i would be inclined to believe that, i just dont know what it would be

normal crest
#

are you defining your consumable type before making your consumable

smoky talon
#

i sent you all the consumable type code

marble flint
normal crest
marble flint
#

gcbm != GCBM

smoky talon
#

its before any info on specific consumables

runic pecan
smoky talon
#

so mod id and prefix need to be the same?

#

yes

normal crest
#

ingame do eval SMODS.ConsumableTypes.Drugs

runic pecan
normal crest
#

they're using a header, which is old but should still work

normal crest
#

so presumably they do not have a json file

smoky talon
#

correct

#

i just downloaded a joker mod example and have been building off of it, so thats why some of it may be out of date

normal crest
#

and just to clarify, you see your consumable ingame

#

and you've tested it

smoky talon
#

yep

#

it works fine

#

and i can spawn the category, just not the specific omne

#

\i can spawn one of the two i currently have, jusrt cant choose

runic pecan
#

So it's just that spawning it causes issue

smoky talon
#

yep

#

everything else works fine

normal crest
#

Do you see the 'est' card in the collection

smoky talon
#

except the animation but im less worried about that now

#

yep

#

dont ask lol, its a collab mod and my friend came up with it

runic pecan
#

But is your SMODS.ConsumeableType loaded before SMODS.Consumeable is though?

runic pecan
lucid owl
smoky talon
#

dang mine is better though bc its a consumable

marble flint
smoky talon
#

yeah its peak

lucid owl
smoky talon
#

i havent done the art yet, just placeholders for now

smoky talon
#

but do you have...

normal crest
# smoky talon yep

Okay open your collection and type eval G.your_collection[1].cards[3].config.center.key replace the 3 with whatever index your estrogen card is

lucid owl
#

this is supposed to copy the ability of all jokers - and it works, except for cards involving repetitions (see video) - how could i fix this? blueprint works basically the exact same way as my code, but copies cards entirely correctly

smoky talon
#

how do i find what inded it is

normal crest
#

from left to right, starting at 1

smoky talon
#

aight

#

thats what i assumed

#

WAIT

#

are there just extra spaces

#

no way

#

if thats it imma crash out

normal crest
#

I see, so in your header you have spaces after 'gcbm'

marble flint
normal crest
smoky talon
rough furnace
#

just pairs doesn't

smoky talon
#

howwdo i do that

normal crest
normal crest
#

oh I know

smoky talon
#

ill makke the json and see if that fixes irt

normal crest
#

if you're using debug plus and loaded a save file

smoky talon
#

after i make the json do i delete the header

normal crest
#

then the previous cards will have the prefix with spaces

smoky talon
#

ahhh

smoky talon
#

IT WORKS

#

FINALLY

#

THANMK YOU SO MUYCH

lucid owl
marble flint
weak gate
#

Is there a mod that adds a simple sticker out there? The wiki is not clear enough imo

normal crest
smoky talon
#

im gonna make the json now

#

what do i call the json file btw?

normal crest
#

anything

smoky talon
#

alright

marble flint
normal crest
#

yeah I just realized, that'd only fix the message appearing during calculation time

#

but for repetitions it uses the return value

runic pecan
normal crest
#

try your joker with a card that gives chips or mult

smoky talon
#

it is lol but i cant belive it sti;;

lucid owl
#

the only problem is seemingly ones with repetitions? though i can't be 100% sure

normal crest
#

what you can do is take into account if the return table of the other joker has the repetition key

#

then add it to your own table and sum up the repetitions of all of them

#

and then return that

#

but that only really accounts for repetitions

lucid owl
#

oh, so save repetitions for the final values?

normal crest
#

yeah i think that'll work

#

you could also make it show all the messages consecutively which would be very funny

#

but yeah you can only return one message

marble flint
lucid owl
#

putting it in an event makes it score the mult/chips after the hand was already scored, effectively making the card useless lol

marble flint
lucid owl
#

i think the problem with the text is that it's getting the return text, but not the repetitions and all that

smoky talon
#

it didnt like the json

#

im gonna stick to the header for now bc it works and theres no need to change it

fringe ember
lucid owl
#

man this is annoying

smoky talon
#

now that i can spawn cards properly i can make my costco joker that makes 5 big booms

lucid owl
#

cause if i put all the return values in a table, if they happen after the rest of the flow they can be kinda useless

fringe ember
lucid owl
#

for example saving a hanging chad repetition would do nothing since it doesn't have the first card to score, or at the least could add a very diminishing amount to setups wioth the first card

smoky talon
#

BOOM! BNOOM! BOOM! BOOM! BOOM!

runic pecan
#

How do I apply a new sprite to a vanilla enhancement like stone cards?

lucid owl
normal crest
#

i did notice you're missing a check for 'context.no_blueprint' tho, dunno how relevant that is to your current issue

lucid owl
normal crest
#

smods has that

lucid owl
normal crest
#

yeah it'd kinda look like this, you need the optional thing at the top somewhere

lucid owl
#

isretrigger_joker_check specifically for jokers with retriggers or would i need to check by name?

normal crest
#

no no, retrigger_joker_check is what smods uses to collect repetitions for jokers