#💻・modding-dev

1 messages · Page 486 of 1

molten relic
#

owh

#

works

wintry solar
#

What does your printing code look like?

hidden notch
#

if I remove lusty joker it also goes "post_trigger" => "other_joker", shouldn't that also be reversed?
The functionality of the joker is currently removed, it really just outputs when it gets triggered;

SMODS.Joker {
    key = "jokebra",
    name = "SEMBY_jokebra",
    loc_txt = {
        name = "Jokebra",
        text = {
            "Gives {C:attention}twice{} the amount of {C:chips}Chips{} that",
            "the {C:attention}Joker{} to the left gives as {C:mult}Mult{}",
            "{C:inactive,s:0.8}Inspired by Buffoonery!{}"
        }
    },
    atlas = "SEMBY_jokers",
    pos = { x = 6, y = 1 },
    blueprint_compat = true,
    rarity = 2,
    cost = 6,
    calculate = function(self, card, context)
        if context.individual and context.cardarea == G.play then
            print("individual")
        end
        if context.other_joker then
            print("other_joker")
        end
        if context.post_trigger and context.cardarea == G.jokers then
            print("post_trigger")
        end
    end
}
wintry solar
#

So the post trigger is from the lusty joker effects which you aren’t printing

#

You’re just printing when your joker sees these contexts

hidden notch
#

yes, I am
i expecteded the individual to go before the post_trigger

#

i expect other_joker before post_trigger too?

#

yet in all cases post_trigger comes first

wintry solar
#

No, the order goes lusty individual, this post trigger, this individual, etc

#

You don’t have any way of printing the lusty contexts here

red flower
#

yeah works for me fine, it gets the lusty post trigger and then the joker's individual trigger

hidden notch
#

If my joker is on the left side and lusty is on the right it also works as I would expect it to

wintry solar
#

Yes, because you’re not printing everything

#

You’re only printing the contexts that yourjoker sees

red flower
#

the joker gets individual first in that case

wintry solar
#

So you can switch out the post trigger for effectively a lusty trigger

hidden notch
#

Okay

#

Now i get it

#

Okay yeah I get it fully now, thanks 😅

wintry solar
#

They are definitely after other triggers though, so just do what you need to do! 😂

wheat jewel
#

Like this?

red flower
#

no, that's the code that does it

#

you would need to patch it

wheat jewel
#

ohh a lovelypatch

#

gotcha

#

question is how do i make a patch for it since i don't really know where to get started on patches

#

imma try to find any documentation to see how

red flower
frigid cargo
#

Whats the difference between math.random and pseudorandom?

red flower
#

pseudorandom accounts for the run seed

frigid cargo
#

Ah, so its set on a seed?

red flower
#

yeah it makes the seed from the run seed + the seed you gave it

frigid cargo
#

Oh ok thanks

wheat jewel
red flower
#

yes, you would change those

wheat jewel
frigid cargo
#

Is there a way to be able to pick a number between 2 and 5 while decimals are also included?

red flower
#

pseudorandom("seed")*4 + 1

#

im bad at math so i might be wrong

wheat jewel
# red flower yes, you would change those

sorry if this is a dumb question, but if i wanna lower the sticker addition rate, do i increase the decimal value since the if statement checks if the poll for each sticker type is greater than a specific value

red flower
#

yes

frigid cargo
#

I still am confused by pseudorandom cause people use it in different ways

red flower
#

pseudorandom("seed")*3 + 2 there

frigid cargo
#

Oh ok thanks

wheat jewel
# red flower yes

I changed the statements of the payload for each patch assuming those are what will patch the original line of code in pattern, if i wanna make this patch work when purchasing a voucher, what should i do?

red flower
frigid cargo
red flower
#

no, it's an individual seed for the effect

frigid cargo
#

Oh

wheat jewel
red flower
#

the games uses the run seed + individual seed so multiple effects can have separate randomization

frigid cargo
#

Ohhhh i think im starting to understand

red flower
frigid cargo
#
G.P_BLINDS.bl_btct_GlitchBlind.mult = pseudorandom(“seed”)*3 + 2
end

Will that work? Cause im just tryna make the blind mult random between 2 and 5

red flower
#

no idea haha

frigid cargo
#

Haha

#

Ill just make the tester try it out lol, if not then ill just use math.random

red flower
#

nah the number part is correct

wintry solar
#

Where are you putting the line?

frigid cargo
wheat jewel
red flower
#

I would do (G.GAME.sizimod_eternal_rate or 0.7) so you don't have to initialize it

wheat jewel
#

i think i get it

merry raven
#

Are there any mods that implement custom cardareas that display cards in a window of sorts, I wanna reference them
I'm making a custom edition where discarding cards would go into it instead of the deck

tepid crow
#

like the vanilla consumables? or more like the vanilla deck view?

merry raven
#

Looked through the chat history for an example
Like this

#

This but on an edition on a playing card

red flower
#

for your case you would store those in a cardarea and then make another cardarea when displaying where you would copy the cards over (because cardareas destroy all cards when destroyed so you dont want to show the original)

merry raven
#

Hmm gotcha

red flower
#

i also have the banishing mechanic that does that but for any kind of card

#

but it displays it in a separate menu

hidden notch
# wintry solar So you can switch out the post trigger for effectively a lusty trigger

Well, there seems to be one thing I still don't understand...
Jokers in Order: Lusty Joker, "My Joker". I play a single Hearts-Card.
If "My Joker" has "post_trigger" which outputs the Mult-Variable; if context.post_trigger and context.cardarea == G.jokers then print(mult) end
Shouldn't it print "4" now? (High Card Base 1 + Lusty Joker Mult 3)

red flower
#

what does it do

hidden notch
#

Well, I print before which is 1, then it prints 1 again for/after lusty and then 4 for/after itself

red flower
#

from what I understand from the code, the trigger and the post trigger are evaluated after the post_trigger context so the mult won't update until after post_trigger
but maybe I'm wrong

hidden notch
#

Well, that would explain it thinkxel

wintry solar
#

That sounds correct

#

But you should have access to the return table from the initial trigger

hidden notch
#

Oh the "other_ret"?
That might be a good idea think_a

lament agate
#

is perma_xmult a thing

red flower
#

yes

#

perma_x_mult

modern kindle
#

i hate you n i was just pasting it

wintry solar
#

I hate that underscore

rotund sable
#

Should've read the docs👀

modern kindle
#

never read docs

#

always ask here instead

#

so they can tell you to read the docs

red flower
#

if you read the docs first you dont get to look at aures cat while someone yells at you

bitter portal
#

So i had an idea for a mod... is there a way to/support for creating completley custom objects?

modern kindle
#

thats what im sayin

#

doesnt bepis do some recipe stuff

#

has that crafting thing

red flower
bitter portal
modern kindle
lament agate
#

game said something about vars not being right, isnt this good already

tepid crow
red flower
lament agate
#

literally the same thing and it worked

#

fuck

#

how did it not screenshot it

#

what the fuck

bitter portal
#

do Centers already come with calculate and loc_vars?

lament agate
red flower
lament agate
red flower
#

you're missing the vars for the #1# then

lament agate
#

but i already have it in loc_vars

red flower
#

set = "Other", key = "tldf", vars = { 121321 }

#

also please use your modprefix on this

lament agate
#

tngt_tldf?

red flower
#

yes

lament agate
#

sure

red flower
#

if i make a "manually" entry it will break it for example

lament agate
#

bru

lament agate
red flower
#

whatever the number is, yes

#

it's a table tho

lament agate
red flower
#

vars = { 1 }

lament agate
lament agate
#

it says X1

#

but in my config

#

its X2.5

red flower
#

...

#

nxkoo..

lament agate
#

y

#

yeah?..

red flower
#

put 2.5 instead of 1 then

lament agate
#

...

#

put me out of my misery

#

pretty please

#

ITS AN OFFER

#

you're not going to make it tonight

#

either way

#

thanks

faint yacht
#

-# uh.

lament agate
#

anyways

#

should be good now

#

this is the wrong screenshot

#

again

#

you're the first one methink

#

no one really used headless balatro

red flower
#

ive seen other people say they would do that but never seen it done

#

both

lament agate
#

rust

red flower
#

i was looking for that haha
someone also made a discord bot but they got kicked out of the modding channels lol

red flower
# lament agate why tho

the mods discussed it and said that it was either porting, which is not allowed, or not modding the game so it doesn't belong in modding

lament agate
#

either way

#

how do you grab a pool again

red flower
#

wdym grab a pool

lament agate
#

like, if the player has this joker thats in this pool

#

for example

#

Food

#

i already have the pool set

red flower
#

you want to see if a joker is in a pool?

lament agate
#

yes

red flower
#

(joker.config.center.pools or {}).objecttypekey

lament agate
#

here's the description

#

"Every Food Jokers held has 1 in 4 chance to disable boss blind's ability"

#

ill figure out the ability

#

i just need to figure out the pool thing

red flower
#

if (joker.config.center.pools or {}).food then

lament agate
#

thanks

#

case sensitive?

red flower
#

yes

bitter portal
#

I at the very least want them to show up here in the collections page but I have no idea how to do that

red flower
#

cardsleeves does that

#

dunno how

midnight coyote
#

how do i get the current upcoming boss blind

modern kindle
normal crest
bitter portal
normal crest
#

if you don't need the functionality of a consumable then extend center

midnight coyote
final jewel
#

Why do my enhancement do not show the card like the card has the value but its not show

red flower
normal crest
#

As for youe issue, maybe SMODS is checking that replace_base_card is nil and isn't considering that it's false, just a guess

#

Wait no

#

It's gotta be the overrides_base_rank one right? Never worked with that one

red flower
#

I thought of that but the docs don't say anything about it removing the sprite

normal crest
#

The docs....

final jewel
normal crest
#

Try removing it and see if it brings back the rank sprite

normal crest
wintry solar
#

Your false return from in pool should handle that anyway

bitter portal
final jewel
red flower
bitter portal
#

How do I create a new global card area like the hand, jokers, and consumables? I need somewhere to store ingredient cards that the player gets

red flower
#

you basically want to store it in G so it saves

lament agate
#

how do you hook into mod badges

tawdry oriole
#

how do i know if a joker is debuffed?

red flower
#

joker.debuff

wind steppe
#

how would i check if a joker is in a specific objecttype

red flower
lament agate
red flower
#

for what

#

your mod? other mods? a specific object?

lament agate
#

my mod badges

bitter portal
#

oh uh crap how do i make a new pool
is it just G.P_CENTER_POOLS['Ingredients'] = {}?

tawdry oriole
#

is there a way to modify another joker's config using context.other_joker?

daring fern
red flower
red flower
tawdry oriole
lament agate
red flower
lament agate
red flower
tawdry oriole
red flower
#

that's a bit hard because not every value on a card is saved by default

tawdry oriole
#

right

#

how would i access a joker's config values with other_joker though

#

that could be the very least

red flower
#

context.other_joker.ability

tawdry oriole
#

oh that's quite simple

#

thanks

primal robin
#

Wait, when creating booster packs with SMODS you can leave kind?

#

Really? water

red flower
#

kind doesn't seem to be mandatory, no

primal robin
#

It's joeover

faint yacht
#

It's useful for other mods to reference should they want to spawn your Booster Packs and such.

lament agate
#

ghhhh

primal robin
#

That's... a big problem

tight hull
red flower
red flower
lament agate
red flower
#

i wasnt on my pc at the time

red flower
lament agate
#

rn

lament agate
red flower
#

make a group and add no one

lament agate
#

mf that's groupchat

#

but thanks

red flower
#

and what's the difference

lament agate
#

solid argument

primal robin
#

So for SMODS each booster pack is individual

lament agate
#

well i have this either way

lament agate
tight hull
#

I dont promise it will work tho

lament agate
#

ah well, N said it was supposed to be in a hook but they dont know that

#

trying isn't going to hurt anybody either way

tight hull
#

idk how to do hooks...

lament agate
tight hull
#

I dont think it will work without (it doesnt rn)

lament agate
#

@red flower which function do you usually hook for something that has to be loaded from the get go/beginning

red flower
#

Game:main_menu?

lament agate
#

maybe ill hook into that

red flower
#

it worked for me without a hook

#

SMODS.current_mod.badge_colour = gradient

tight hull
lament agate
#

your global might be different

wintry solar
tight hull
red flower
#

no, that part leave it as is

tight hull
#

okok

red flower
#

just change gradient for your gradient

primal robin
#

To determine is it a spectral, arcana... you know

tight hull
primal robin
#

If kind is optional, how can I determine is booster pack a code pack, for example? I need manually check for every key which matches code boosters?

red flower
#

i mean if the modder is good they would include the kind

#

if not then you shouldn't bother and just put it in an "other" category imo

primal robin
wintry solar
#

I mean does kind ever actually get used by vanilla code? I’m only browsing on my mobile copy but I don’t see it being used anywhere

primal robin
red flower
#

I don't think so

#

get_pack is never called with _type

primal robin
#

Disappointment

wintry solar
#

It just always adds every pack to the pool its polling

primal robin
#

Oh well

#

I need somehow group boosters by their logic

#

I see they have group_name thing

#

So I'm using it as fallback

wintry solar
#

I think boosters of the same type would share a group_key

#

At least mine do

primal robin
#

I'll use it too then

tight hull
red flower
#

where did you write the line

tight hull
#

the SMODS.current_mod.badge_colour = color_change is on top of the file in the main file and the gradient is below it

red flower
#

well that's the issue then

#

the gradient doesn't exist until you make it

tight hull
#

the gradient should be above?

red flower
#

yes

tight hull
#

It works!

#

Thnx N'

lament agate
#

i can finally give my playerbase a seizure

modern kindle
#

hi besties

#

my edition is now working delightfully

tight hull
still sierra
#

How easy is it to edit the displayed values in the score? (Round Score, Chips, Mult, and then the score of the currently played hand)
Had an idea for a mod but I can't find much documentation on changing/editing these values

wind steppe
#

why does this crash my game

modern kindle
wintry solar
modern kindle
still sierra
#

My idea was to add the Cookie Clicker style scaling to the score, so for example instead of showing as "1.160e68" it'll show as "160 Vigintillion"

#

Which in my opinion is more interesting

modern kindle
#

how big is dat number

#

i cant count higher than like 1

still sierra
#

okay so imagine 1

modern kindle
#

thats massive

still sierra
#

and then imagine it 160 vigintillion times

red flower
#

for that i would maybe override the number_format function

modern kindle
#

N bestie i got a query for u

red flower
#

shoot

modern kindle
#

playing cards are set default right

red flower
#

yes or enhanced

modern kindle
#

would i need to bother noting enhanced for preventing an edition from being applied if i have default? or should i include both

red flower
#

you should, a playing card can be either one of those

modern kindle
#

gotcha okay, thank you

sonic cedar
#

good afternoon modding dev

still sierra
#

I assumed it was part of the Balatro decomp but I can't find it

sonic cedar
# still sierra Sorry very new to Balatro modding, how would I do this? ^_^;
Klei Entertainment Forums

In LUA, it is a very important concept to understand that everything is a variable and all variables may be edited in runtime. This includes functions. With modding other peoples' LUA files, like Klei's basegame code, you may find yourself wanting to run your code before or after the original fun...

still sierra
#

Not the place I thought I'd be finding my LUA documentation but it works LOL

#

Tysm 🩷keyiitHeart

iron burrow
#

Okay I just fixed a bug in my balatro bot that has been plaguing me for WEEKS. Turns out, the game does not make a purchase (update the shop state) and update the gold counter in the same frame. They are subsequent actions in the game loop.

Just had to share this somewhere

sonic cedar
#

went to bed instead of trying to fix this yesterday as you know, but clicking the button gives this crash

#

oh my god wait cant you call a draw function in soul_pos

#

i feel like i saw something about that or maybe im misremembering

lament agate
sonic cedar
lament agate
#

i learned it from victin

sonic cedar
#

please

#

🧎‍♀️ educate this lost soul

lament agate
sonic cedar
#

where can i look

lament agate
#

alpha branch

#

red hand

sonic cedar
lament agate
#

go my child

sonic cedar
#

that was incredibly specific thank you

lament agate
sonic cedar
#

HUH

#

oh my god it is... i didnt even realize i was looking at it

#

ok well

#

hrm

rotund sable
#

ok i don't recommend putting a print statement into the mod_probability context

umbral zodiac
#

where can i find the calculate function for a specific joker (ingame)

umbral zodiac
#

ingame

#

i want to find the function itself ingame via the key/center so i can mess with it, not just where it is in the files

sonic cedar
#

function
ingame

#

can you elaborate on what you mean by in game

umbral zodiac
#

ideally, setting an old variable to the current calculate function and then setting its calculate function to the calculate function of another joker

red flower
#

G.P_CENTERS.j_modprefix_key.calculate

umbral zodiac
#

oh its only for modded that makes more sense

#

i was trying that but only on vanilla jokers

red flower
#

vanilla dont have it unless theyre take ownership of of

sonic cedar
#

no wonder i didnt get what you meant

shell timber
#

solution: ban all vanilla content and use vanilla remade

primal robin
sonic cedar
zealous glen
sonic cedar
zealous glen
#

Just because it’s been done

sonic cedar
#

yeah,,, i just didnt wanna have to add basegame sprites to the atlas

#

but if i GOTTA

sonic cedar
#

was directed to your red hand earlier, which is why i asked you in the first place
but im new to this sort of thing, so i dont fully get it 😭

rotund sable
#

is there a way of getting the base_numerator and base_denominator in the context.pseudorandom_result?

bitter portal
#

what went wrong...

red flower
#

but i havent looked at the code in 100% detail

sonic cedar
zealous glen
sonic cedar
# zealous glen What are you trying to do

so i want this toggle button i have on the card to switch the sprite of the joker between my modded one and the basegame's, for that visual information of the actual effect of the button yk

zealous glen
#

Although I can see why you’d want to use the vanilla atlas

sonic cedar
#

yeah cause it's

there already lmfao

zealous glen
#

I have another solution though

sonic cedar
#

im listening

zealous glen
#

Add another sprite layer

sonic cedar
#

uh huh

#

😄

#

i... still dont know how to do that

sonic cedar
modern kindle
#

hi vic

sonic cedar
#

hi dilly

modern kindle
#

hi toma

sonic cedar
#

hi vic

modern kindle
#

hi dilly

sonic cedar
#

h..hi toma?

modern kindle
#

lmfao

sonic cedar
#

lmao

zealous glen
sonic cedar
zealous glen
zealous glen
sonic cedar
#

oh no

modern kindle
#

oop

#

wron video

#

thats the right one

zealous glen
modern kindle
#

lmfao

zealous glen
#

The shaders were cool

sonic cedar
#

it was very funny

modern kindle
#

i like the one on p[laying card, but the problem is you cant tell wtf the card is

#

so i need to see if its poss to have the same shader display diff on playing cards than joker

sonic cedar
#

hmm yes... 2 and 3 quarters of diamondclubs...

modern kindle
#

cause on joker i think it looks dope

zealous glen
modern kindle
#

looks to be from my calculations

zealous glen
#

It looked like 235% instead of 135%

modern kindle
#

100% of oneself is 100%
meaning 100% of 15 would be another 15

sonic cedar
modern kindle
#

which equals 30

zealous glen
#

Because adding 135% on top of 100% makes 235%

modern kindle
#

adds the bonus

#

meaning adding 100% would be the other 15

#

adding 50% would add 7.5 mult

#

equalling 22.5

bitter portal
zealous glen
modern kindle
#

well this aint balatro its dilatro :b

zealous glen
#

Don’t you mean :d

sonic cedar
#

bilatro

zealous glen
#

I thought it was :dilatro not :balatro

modern kindle
#

i could consume you in one sitting

sonic cedar
modern kindle
#

but yea overall im satisfied with the edition, for player feedback instead of stating the % ill probably have it say the actual number so they dont ahve to look at mult

sonic cedar
#

was about to walk my dog and saw lightning flash in my peripheral......

modern kindle
#

tell the lightning to go away

sonic cedar
#

i did

#

it responded with thunder

modern kindle
#

yea sorry that was me

sonic cedar
#

dude

#

wtf!

modern kindle
#

i caught a whiff of you from here, real stinker

#

made me have to intervene

sonic cedar
#

had to have been the garbage, i jsut showered

modern kindle
#

likely story bub....

vague crest
#

im looking into cross mod compatibility with a joker from celeste card collection that works via lovely patches (climbing gear) can anyone link some useful resources for learning patching and stuff? the issue is they both affect discarding and mine does it the loudest 🤭

#

might not be the biggest issue in the world but its the kind of thing where if i saw the other joker id take it because it sounds like in theory itd be a fun combo

#

ack i also gotta do all the probability stuff today

modern kindle
#

it made me explode into 7 pieces so be warned

sonic cedar
#

can confirm as the eighth piece

zealous glen
zealous glen
#

I think it was a red herring for me not to jump to that suggestion

modern kindle
#

it was a plan i had eventually, but im mostly just glad it works before anything

#

so thats my happiness rn, any little things are easy work

zealous glen
zealous glen
modern kindle
#

ice was a great deal of help there

#

his powerchange got me on the right track

#

but then i had to make my own set of changes and shit

#

so i am very grateful for his help

vague crest
vague crest
#

i mean anything that would work for this

#

i can just look in the smods files and see if i find something, i was also proabbly gonna dig through vanilla remade at some point

red flower
#

vanillaremade doesnt have patches, if thats what you mean

zealous glen
#

-# You said the trigger word

vague crest
#

that is what i meant i do not really know what im doing here 🙏

red flower
#

i would just look at the smods patches, yeah

#

why did victin not get a heart react

zealous glen
#

They consider me not deserving of love

vague crest
#

NOOOO

zealous glen
#

And they’re in l-l-lesbians with you N’

vague crest
#

not true at all i value all the members of the balatro discord EQUALLY

pure salmon
#

is there a way to make a suit give base mult instead of base chips?

red flower
zealous glen
#

But some members are more equal than others

zealous glen
zealous glen
pure salmon
red flower
pure salmon
#

these?

vague crest
#

this is unrelated but i have a function which resets a rank at the end of round and im trying to make it so it only does it once, what needs to be changed to make this one specifically only reset then?

red flower
vague crest
#

like specifically when the run starts

red flower
zealous glen
#

I’m not sure what you’re asking but take a look at Castle in the example mods or remade

bitter portal
sonic cedar
#

@zealous glen

#

am i understanding this or do i actually need to do something with those strings for them to work

zealous glen
#

Wait this is set_sprites

#

That’s the right place

sonic cedar
#

what's the underlayer thing

zealous glen
sonic cedar
zealous glen
#

Because you can manually draw extra soul sprite layers on top in whichever order

oblique wyvern
#

I can't find a list of all the context flags, did someone compile one somewhere or could at least tell me where it is in the source code?

zealous glen
neat leaf
#

I have a very simple mod I'm working on, how would I go about allowing my mod to be "reloaded" while the game is running, after modifying one of the files? I don't want to have to restart Balatro every time I make a tiny change.

frigid cargo
#

Is there a way to check how much money was earned overall in a run?

zealous glen
sonic cedar
#

uh huh

zealous glen
#

Try searching for underlayer

#

It’s a small file

sonic cedar
#

im in the file

zealous glen
#

That file exists to avoid SMODS double-drawing sprites in new layers

#

Because SMODS automatically draw children

sonic cedar
#

does a /lib/ui file get auto loaded or no

zealous glen
#

I don’t think it needs to be separate

#

I just wanted to keep them together

sonic cedar
#

yeah im the same way

#

ok so do i just put the 0 and 1 in the ignore key booleans

tight hull
#

when you do gradient, whats the diffrence between 'trig' and 'linear'? (bcs I cant see one)

zealous glen
sonic cedar
zealous glen
#

I don’t understand the question 😭

sonic cedar
#

is that what id put in there 😭

zealous glen
#

You’re writing to a table of table keys to ignore

#

So you put the same key there

#

Idk how SMODS uses it but any truthy value inside should work

sonic cedar
#

okidoke

#

then all that's left is to test ig

foggy ginkgo
#

Keep getting crashes and I don't know why

#

Trying to figure out Yahimod code from the effects that appear on the screen

sonic cedar
sonic cedar
sonic cedar
zealous glen
zealous glen
#

Try seeing how I did it for Heartbreak in the dev version

sonic cedar
#

right

#

we ran out of budgets for carpet so winter youll
have to walk on these instead
🚗🚗🚗🚗

chrome widget
zealous glen
#

Something something enemy Stand user so she must only step on red

chrome widget
#

The implementation looks like this

    self[i] = start_colour[i] + partial_timer*(end_colour[i]-start_colour[i])
elseif self.interpolation == 'trig' then
    self[i] = start_colour[i] + 0.5*(1-math.cos(partial_timer*math.pi))*(end_colour[i]-start_colour[i])
end```
zealous glen
chrome widget
#

Visually, trig is more varied

sonic cedar
#

dev

zealous glen
# sonic cedar dev

The name of the file might be different, see if you can find it by searching “heartbreak”

zealous glen
# sonic cedar erm

Sometimes when I make an experimental Joker it gets a descriptive key, like the first two here

zealous glen
#

Maybe I didn’t let me check

neat leaf
#

What exactly does SMODS.load_file do that'd make me prefer it over using require?

chrome widget
modern kindle
#

who needs a game to load anyway

#

back in my day we would play outside

#

drink from a water hose

#

climb uphill both ways

sonic cedar
foggy ginkgo
#

At first this part was crashing but I think someone told me to do G.effectmanager = {} so I did

modern kindle
sonic cedar
#

uh oh

zealous glen
#

It's there now

sonic cedar
#

VIC 😭

zealous glen
#

on its own branch

#

because you might need to see it in-game

zealous glen
#

Not shaders

#

Edition shaders specifically

chrome widget
#

Extra sprites?

zealous glen
chrome widget
#

Yeah in a few cases

scarlet imp
#

does VSC have a feature where if you rewrite a method signature it can find all the usages for you and rewrite them, like PyCharm or IntelliJ does?

chrome widget
#

I have this one draw function I had to implement because the extra sprite is an animated film scroll

    -- manually draw editions here
    if not card.config.center.discovered and (G.OVERLAY_MENU or G.STAGE == G.STAGES.MAIN_MENU) then
        return
    end

    if not (card.children.thnks_underlay and card.children.thnks_overlay) then
        return
    end

    if card.edition and not card.delay_edition then
        for k, v in pairs(G.P_CENTER_POOLS.Edition) do
            if card.edition[v.key:sub(3)] and v.shader then
                if type(v.draw) == 'function' then
                    card.children.thnks_underlay:draw(card, layer)
                else
                    -- because foil is transparent unlike the other edition shaders
                    if v.key:sub(3) == 'foil' then
                        card.children.thnks_underlay:draw_shader('dissolve')
                    end
                    card.children.thnks_underlay:draw_shader(v.shader, nil, card.ARGS.send_to_shader)
                end
            end
        end
    else 
        card.children.thnks_underlay:draw_shader('dissolve')
    end
    card.children.thnks_overlay:draw_shader('dissolve')
end```
zealous glen
chrome widget
#

Yeah, it calls a draw method if the edition has one in the middle there

hearty crane
#

nvm he dod spent money

chrome widget
#

However it should probably implement the should_draw_base_shader thing because it just manually draws the base shader for foil instead

#

(I didn't know that was a thing when I wrote this and haven't gone back to it)

zealous glen
modern kindle
#

i dont know that most things are a thing 🙃

#

vic hates me

#

see its right there

#

all in the pudding

frigid cargo
chrome widget
frigid cargo
scarlet imp
chrome widget
scarlet imp
#

danm

chrome widget
zealous glen
frigid cargo
modern kindle
sonic cedar
zealous glen
chrome widget
#

It's basically

function ease_dollars(mod, instant)
    local ret = ref_ease_dollars(mod, instant)

    if mod > 0 then
        G.GAME.dollars_this_run = G.GAME.dollars_this_run + mod
    end
end```
zealous glen
modern kindle
chrome widget
#

However you'll also probably want to declare G.GAME.dollars_this_run initially in an implementation of SMODS.reset_game_globals() so you don't have to check for nil each time. You can find that on the SMODS docs.

sonic cedar
zealous glen
zealous glen
polar stratus
#

does anyone know how to upload to the Balatro Moddiing Manager

modern kindle
sonic cedar
#

...ill fix the y value though

modern kindle
#

smh id have never guessed that reference if you gave me 37 guesses and an eclair

zealous glen
sonic cedar
#

ignoring the fact that i cant read an atlas for my life why isnt it lining up with the card...

#

oh my god is it only going where i stop dragging the card

zealous glen
#

That's what UI was supposed to fix

#

Maybe you didn't do it correctly then

sonic cedar
#

oh no

vague crest
#

trying to set up a card that messes with probabilities with the new smods tech, i had it working fine before but im struggling to get the new stuff working, can anyone see what went wrong?

zealous glen
#

-# also did you see Heartbreak in-game

sonic cedar
wintry solar
vague crest
#

ah is that all it is

sonic cedar
zealous glen
vague crest
#

ok wait what would be the correct way to format this then? removing the context definitely does not work i just get a crash

subtle urchin
#

hey! im trying to test learning modding and in order to see vanilla jokers I extracted the files but idk which .lua file does have the code for jokers, anyone knows? thx

rotund sable
#

Are y'all unironically using the balatro font in vscode?😭

sonic cedar
sonic cedar
vague crest
#

waiut

#

wait is that right

#

might be game.lua

scarlet imp
vague crest
#

that also

scarlet imp
#

and it's organized better than the source code too

vague crest
#

vanillaremade is sooo nice

modern kindle
subtle urchin
zealous glen
zealous glen
subtle urchin
sonic cedar
zealous glen
subtle urchin
#

perfect, thanks!!!

zealous glen
scarlet imp
#

this is a really good resource if you want to look at how cards work

sonic cedar
modern kindle
#

what if i want to see how you work

zealous glen
subtle urchin
vague crest
sonic cedar
# zealous glen Giving me ^q^ vibes

so i took off the tostring and it just showed no soul sprite
so i took off the string part and left them without quotes and now i get the ability crash

NOW im gonna put the tostring back but add it to the ui thing too...unless that wont work

oblique wyvern
#

I can't seem to find a context flag for when blind is selected or start of round, any help?

oblique wyvern
#

that was fast, thanks a lot

sonic cedar
#

i was here lmao, np

#

overcome with the random urge to eat a danish
...test first

zealous glen
oblique wyvern
#

is there a collection of specifically food jokers anywhere in game or do I need to make a list of them myself

zealous glen
#

But since you didn’t disable the automatic draw correctly

sonic cedar
zealous glen
#

You didn’t notice it

sonic cedar
oblique wyvern
sonic cedar
red flower
#

Cryptid has one tho

wind steppe
#

how would i spawn any joker from a specific mod?

zealous glen
# oblique wyvern wdym?

You asked two questions with an “or” so I tried to answer in the clearest way possible

#

Which for most people I reckon would be answering each question individually

oblique wyvern
#

oh I understood that as a list existing in a superposition

zealous glen
#

Instead of interpreting it as a logical “or”

red flower
zealous glen
oblique wyvern
#

to spawn a card do I need its name or a backend key because I can't find the keys for the jokers

red flower
#

the key

#

i usually look for them in the localization files

formal parrot
red flower
#

it's low key high key

zealous glen
oblique wyvern
#

can I just get from a generous individual a line of code that spawns idk showman

formal parrot
#

Just checking

zealous glen
oblique wyvern
#

I know that's his id now

#

but how would I spawn him specifically

red flower
#

SMODS.add_card { key = "j_ring_master" }

oblique wyvern
#

ok thanks

vague crest
#

does anyone know why this line of code isnt triggering? it's supposed to give increased probability for one hand after playing a single ace and it DOES but it never goes back down

red flower
#

because you're returning in the previous condition

sonic cedar
zealous glen
#

The sprite should always be created

sonic cedar
oblique wyvern
red flower
#

yes im sure

#

if the only argument is a table or a string you can skip the ()

neat leaf
#

Getting the following message whenever I mouse-over the config icon in the Mods list for my mod: INFO - [G] Could not find key for center: { refresh_movement= "true", }

oblique wyvern
#

alright thanks

neat leaf
#

I have never made a mod with configuration ability before.

zealous glen
#

Just don’t draw it

oblique wyvern
#
    calculate = function(self,card,context)
        local foodJokers = {"j_cavendish", "j_gros_michel", "j_selzer", "j_popcorn", "j_ice_cream", "j_turtle_bean", "j_ramen", "j_egg", "j_diet_cola"}
        if context.setting_blind then
            SMODS.add_card {key = foodJokers[math.random(#foodJokers)]}
        end
    end
#

so would that do what I think it'd do?

sonic cedar
neat leaf
#

Oh wait, that's happening whenever I mouseover any mod config.

zealous glen
sonic cedar
zealous glen
#

I don’t as gonna stop there

sleek nova
#

is there a context for upgrading any hand

oblique wyvern
#

also how would I kill this specific joker

oblique wyvern
neat leaf
#

Wait, this is a Cryptid issue, moving the conversation there.

red flower
oblique wyvern
sonic cedar
red flower
zealous glen
snow breach
#

Intent: Swap all enhancements, seals and additions of two selected playing cards.

Outcome: None, literally nothing

sleek nova
zealous glen
#

For the soul sprite

oblique wyvern
zealous glen
#

And just add a check somewhere

oblique wyvern
#

idk barely anything about the modding api and am just making a goofy idea a friend thought of
(grandma, when blind is selected make a food joker and 1/2 chance to become mr bones)

sonic cedar
red flower
modern kindle
#

my mac

zealous glen
red flower
sonic cedar
modern kindle
#

yea well im a hippo crip

bitter portal
snow breach
red flower
snow breach
red flower
#

you're trying to iterate over a single card

vague crest
red flower
#
if true then
    return -- returns from the function
end

if true then -- it will never reach this
    -- stuff
end
vague crest
#

huh ok i wouldve assumed it wouldnt matter since the only thing connecting them is the calculate function

oblique wyvern
red flower
#

depends on the effect you want to achieve

vague crest
#

they are meant to be two different functions, one turns it on and one turns it off

#

im also running into an issue with the remove_from_deck function but im dealing with that ❇️ after ❇️

red flower
vague crest
#

true

#

removing the returns just makes these not do anything, what would the process be instead?

red flower
#

what's the goal? also you don't need to divide the probability to turn it off

vague crest
#

oh wait what

red flower
#

in fact, it just halves the probability if you do that

vague crest
#

ok LMAO so what would the new method be to disable it after the hands left counter reaches 0

red flower
#

just don't return the multiplication

vague crest
#

oh wow ok

red flower
#

the new context multiplies the values every time it is called so you just turn it off by not modifying them

vague crest
#

ohh thats literally so much nicer

#

big fan of this

snow breach
#

Alright, I know the bottom half is wrong. What do I set it to?

normal crest
#

you're setting the stuff of card not card1 or card2

snow breach
#

You are so right

#

I've been coding for like 7 hourss oh my god

#

It still crashes TwT

normal crest
#

is the crash something along the lines of "trying to index string"

snow breach
#

No

vague crest
#

got it working!! tyty

normal crest
#

Oh

normal crest
red flower
#

you don't want get_enhancements because you dont want quantum stuff shenanigans

snow breach
#

Alright

normal crest
#

you can still use get_enhancements just use next on it

red flower
#

card1.config.center should work

normal crest
#

yeah just do what N says

snow breach
#

That... Almost worked.

#

The seal didn't transfer. And the car became the consumable.

#

Originally like this (ignore the numbers)

red flower
#

you probably wrote card.config.center which would be the consumable

snow breach
#

I sure did!

#

What about the seal?

red flower
#

for the seal it should be without the .key

snow breach
#

YES! Thank y'all so much!! Blush

brittle yacht
#

sup gang

#

new joker im making

#

js trying to get it to give you $3 at the end of a blind, during the cash-out part, plus it should play a custom song in the shop? how to do this?

red flower
#

first part is with calc_dollar_bonus

brittle yacht
#

k

red flower
#

second is with smods.sound which idk anything about

brittle yacht
#

lol

sonic cedar
sleek nova
#

im trying to make so you get a tarot card for the specific hand you discard so im looking on burnt joker but i dont know the check for the type of hand you discard

#

is it G.FUNCS.get_poker_hand_info(G.hand.highlighted)???

red flower
#

yes

sleek nova
#

ah i see

snow breach
#

Can someone please explain to me what G_E_MANAGER is and why I would ever wanna use it?

#

And how to use it, I guess.

brittle yacht
#

this doesnt work, i assume?

    loc_vars = function(self, info_queue, card)
            return { vars = { calc_dollar_bonus } }
    end,
    calculate = function(self, card, context)
        if context.end_of_round and context.game_over == false and context.main_eval and not context.blueprint then
            calc_dollar_bonus```
red flower
red flower
#

pls see the docs

sleek nova
#

where the hell is the code for blue seal

#

i dont want to look through 900 mentions of blueprint

red flower
#

Card:get_end_of_round_effects in card.lua

#

also i recommend vanillaremade if you just want the implementation

hidden sable
#

damn you beat me to it i was gonna add something like that

#

welp time to make your mod a requirement

brittle yacht
#

getiing a bug here

#
    key = 'spambot',
    loc_txt = {
        name = '{C:purple}Spam{}{C:money}bot{}',
        text = {
            'Earn {C:money}3 Kromer{} at the end of a blind'
        }
    },
    atlas = 'spambot',
    pos = {x = 0, y = 0},
    rarity = 2,
    cost = 6,
    config =  config = { extra = { dollar = 3 } },
    loc_vars = function(self, info_queue, card)
        return { vars = { card.ability.extra.dollars } }
    end,
    calc_dollar_bonus = function(self, card)
        return card.ability.extra.dollars
    end
}
#

not sure why

rotund sable
#

What bug

#

Error? Doesn't work?

brittle yacht
#

yeah

rotund sable
#

...

brittle yacht
#

ill send the crash

rotund sable
brittle yacht
#

how did i do that

rotund sable
#

¯_(ツ)_/¯

brittle yacht
#

while ur here

rotund sable
#

👀

brittle yacht
#

do you know how to replace shop music?

rotund sable
#

uhhh

#

never touched music

brittle yacht
#
    key = "music_spamton", 
    path = "music_spamton.ogg",
    pitch = 1,
    volume = 0.7,
    select_music_track = function()
        if jokerExists("j_silly_spambot") and string.len(G.GAME.blind.name) > 0 then
            return true end
    end,
})```
this is what i have, i assume i just need to replace the ```G.GAME.blind.name``` with something else
thorn furnace
#

Is it possible to have a cardarea of cardareas

sonic cedar
red flower
#

well maybe you can

thorn furnace
# red flower no, why?

Was thinking about making a card type where you can drag it onto a Joker to give it certain attributes

#

à la how it looks in Solitaire
Except you'd still be able to rearrange the jokers like normal

red flower
#

you can have a cardarea as a child of the joker

zealous glen
red flower
#

that's something I want to do but I've never figured out how to make it look nice

#

i still don't understand how z ordering works in this game

thorn furnace
#

I really wanna continue modding but my feeble brain can't take much more of Balatro's UI

sonic cedar
thorn furnace
red flower
#

i feel you

#

i need to make new UI for my mod too

thorn furnace
#

I really heavily debated reprogramming it from the ground up in Unity with a custom rendering engine but I'm pretty sure that's not allowed for like five different reasons

red flower
#

yeah

brittle yacht
#

anybody know how to replace shop music

brittle yacht
thorn furnace
#

Is it worthwhile to search through the thousands of lines of UI code and do the UI from scratch

zealous glen
pure salmon
pure salmon
#

np

#

sorry for the wait

brittle yacht
#

ur good

plain palm
brittle yacht
red flower
#

close

pure salmon
#

rats

ivory coral
#

is there a way to get a decks base joker slot limit? like how painted/black deck has 4/6 joker slots by default

red flower
#

next(SMODS.find_card("j_modprefix_key"))

brittle yacht
brittle yacht
red flower
#

what i just sent

pure salmon
#

oh is it find_card? mb

brittle yacht
#

oh

#

bfefuewbfubewfbsad

red flower
#

you need the next too

red flower
#

it might not exist for decks that dont replace it

sonic cedar
# zealous glen inside the draw function as I said

sorry I wasn’t home hi
ok so
I set soul pos to a table

in the table I put the draw function

in the draw function I check if the toggle is true

and then if it is true… do I do a card.children remove thing?

ivory coral
brittle yacht
#
    key = 'spambot',
    loc_txt = {
        name = '{C:purple}Spam{}{C:money}bot{}',
        text = {
            'Earn {C:money}3 Kromer{} at the end of a blind'
        }
    },
    atlas = 'spambot',
    pos = {x = 0, y = 0},
    rarity = 2,
    cost = 6,
    config = { extra = { dollar = 3 } },
    loc_vars = function(self, info_queue, card)
        return { vars = { card.ability.extra.dollars } }
    end,
    calc_dollar_bonus = function(self, card)
        return card.ability.extra.dollars
    end
}

this doesnt give me 3 bonus dollars like its supposed to, did i do something wrongggg

red flower
#

yes, you named it dollar but you're using dollars

brittle yacht
#

easy fix, mb

#

thanks

zealous glen
#

You just draw or not draw

sonic cedar
ivory coral
# red flower G.GAME.starting_params.joker_slots

trying to set a config value to (G.GAME and G.GAME.starting_params.joker_slots) makes it equal to nil for some reason
i put G.GAME and before it because otherwise it crashed on startup because G.GAME didnt exist yet i assume

red flower
#

yeah none of that exists at the time you make a config

formal quest
#

How do I get the amount of hands remaining?

red flower
neat leaf
#

So, I tried using Better Tags with Cryptid (namely, my mission to generate the greatest Cat Tag the world has ever seen), but that mod seemed to break Cat Tags entirely. I did manage to fix it.

ivory coral
formal quest
#

How do I get the current score and required score?

ivory coral
red flower
autumn brook
#

is there any G.STATE for boss blinds?

red flower
#

G.GAME.blind.boss?

bitter portal
autumn brook
red flower
#

lua is case sensitive

autumn brook
red flower
#

also it's not a state

autumn brook
#

oh

red flower
#

if G.GAME.blind.boss is true then you're currently in a boss blind

sonic cedar
autumn brook
red flower
#

granted idk much about sounds

red flower
#

yeah

sonic cedar
wind steppe
#

add_tag(Tag("tag_para_foodtag")) line 747

red flower
#

can i see the code for the tag

thick drift
#

quick question about pseudorandom, it returns a value between 0 and 1, correct?

sonic cedar
#

if you want it to

red flower
#

with only the seed, yes

wind steppe
# red flower can i see the code for the tag
SMODS.Tag{
    atlas = 'Tags',
    pos = {x = 0, y = 0},
    key = 'foodtag',
    apply = function(self, tag, context)
        if context.type == "new_blind_choice" then
            tag:yep('+', G.C.PURPLE,function() 
                local card = Card(G.play.T.x + G.play.T.w/2 - G.CARD_W*1.27/2,
                G.play.T.y + G.play.T.h/2-G.CARD_H*1.27/2, G.CARD_W*1.27, G.CARD_H*1.27, G.P_CARDS.empty, G.P_CENTERS['p_para_foodpack'], {bypass_discovery_center = true, bypass_discovery_ui = true})
                card.cost = 0
                card.from_tag = true
                G.FUNCS.use_card({config = {ref_table = card}})
                card:start_materialize()
                return true
            end)
            tag.triggered = true
            return true
        end
    end,
    loc_vars = function(self, info_queue, card)
        info_queue[#info_queue+1] = G.P_CENTERS.p_para_foodpack
    end,
    in_pool = function(self, args)
        return false
    end
}
red flower
#

hmmm no idea

autumn brook
# red flower yeah

The game stopped crashing when trying to access the menu, but it stills plays the music from G.GAME and G.GAME.round_resets.ante

#

for my understanding it should work, but it doesn't

red flower
#

what is it doing now? i don't understand

autumn brook
red flower
#

oh, i think you need to give it a higher (?) priority

#

but like i said i don't know much about sounds

#

try adding and 1 or false at the end

autumn brook
red flower
#

yes

normal crest
#

well A and X or false means, if A is a truthy value, the entire line will evaluate to X, otherwise to false

#

I'm surprised your music plays with a priority of 0 tho

autumn brook
#

if it works it works

brittle yacht
#

are you able to make joker's atlas asset a gif

unborn bay
#

no

thick drift
autumn brook
brittle yacht
#

how do i make this code instead of shop be for regular blinds

#
    vol = 1,
    pitch = 1,
    key = "music_spamton1",
    path = "music_spamton1.ogg",
    select_music_track = function()
        return (next(SMODS.find_card("j_silly_spambot")) and G.shop and not G.shop.REMOVED and 11) or false
    end,
})```
#

@pure salmon i know you know how to do this probably

#

how to do for regular blinds
and
a seperate one for boss blinds

sonic cedar
ivory coral
#

im trying to patch Card:load and Card:set_sprites to make a joker have certain dimensions (like half joker) but for some reason its not doing anything? i copied the way its done for half/photo/square and replaced the name with my jokers key but it doesnt work idk why
heres what im patching in respectively (before the part for half joker but the whole code is pretty long)

if self.config.center.name == 'j_osquo_ext_backgroundcheck' then
    self.T.h = H*scale/1.5*scale
    self.T.w = W*scale
end
if _center.name == 'j_osquo_ext_backgroundcheck' and (_center.discovered or self.bypass_discovery_center) then 
    self.children.center.scale.y = self.children.center.scale.y/1.5
end

its only 1.5 for testing ill change it to a more normal value once its actually working

unborn bay
ivory coral
#

omg thank you
every time i try to do something like this it just turns out theres already a thing for that lol
i should just read the docs more

red flower
#

this is also done in vanillaremade :3 :3

long sun
#

stuck on a problem ^^;

#

code:

local game_start_run_ref = Game.start_run

function Game:start_run(args)
  game_start_run_ref(self, args)
  local existing_ranks = {}
  for i, j in pairs(G.playing_cards) do
    local is_valid = true
    for _, rank in ipairs(existing_ranks) do
      if j:get_id() == rank then is_valid = false end
    end
    if is_valid then existing_ranks[#existing_ranks + 1] = j:get_id() end
  end
  G.GAME.phanta_initial_ranks = existing_ranks
end```
#

this is causing a crash for someone

#

namely: if j:get_id() == rank then is_valid = false end

#

as it says it's indexing a boolean value

#

ideas? ;u;

daring fern
long sun
#

will give it a go

#

it's weird, as it works on my machine

ivory coral
long sun
#

yep

daring fern