#đŸ’»ăƒ»modding-dev

1 messages · Page 421 of 1

gentle rain
#

well im very lost on how to create a value in a save in the first place

sonic cedar
#

well I mean for me in my main file I have
G.PROFILES[G.SETTINGS.profile].variable = variable or 0

gentle rain
#

ohhhhh that makes a lot of sense

sonic cedar
#

👍

digital pier
#

so first time coder here

#

what the hell am i meant to do

#

i know all the other things just not the coding

gentle rain
#

@digital pier

digital pier
#

thanks :)

willow nimbus
#

bumping

sonic cedar
#

I didn’t even know that was a thing

digital pier
#

ok so i got all the resources, how do i open my .lua file (srry if i'm being annoying i just have alot of ideas rn)

gentle rain
#

cardsauce has a config that changes the background, you can reference that

digital pier
#

ok thx vros!!!!!! :)

willow nimbus
gentle rain
willow nimbus
#

oh i see

#

thanks

gentle rain
frigid cargo
#

is there a code that can randomize a number between 2 numbers and all the values between it? cause i tried psuedorandom for 0.5 and 2 but for some reason it only gives 0.5, 1.5, and 2.5 so i wanted to know if theres any way to make it so its numbers literally between 0.5 and 2

sturdy compass
keen totem
#

cause that matters

#

usually id just opt for getting a value between 5 and 20 then dividing it by 10

#

so its 0.1 increments

frigid cargo
#

ah

frigid cargo
#

ill try what you said

digital pier
hybrid shadow
#

bump

frigid cargo
sturdy compass
sonic cedar
#

there is no escape

sturdy compass
#

LMAO

sonic cedar
#

MWAHAHAHAHAH

faint yacht
#

Technically there is always escape.

sturdy compass
#

Don't tell them that

faint yacht
#

At that point, though, you're buried.

modern kindle
sonic cedar
#

The big red one?

modern kindle
#

There was a big red one?

#

I hit the big black button

sonic cedar
#

there was a black one?

modern kindle
sonic cedar
#

It was a good run

modern kindle
hybrid shadow
sonic cedar
#

me when someone unbinds esc so I have to dust off my mouse

modern kindle
#

Quick guys open console and type unbind all it gives you a cool skin

hybrid shadow
#

me when someone unbinds esc (i play on controller):

willow nimbus
#

idk if this is described in the documentation anywhere but is there a function that runs when i open a run

#

like hitting the continue button

sonic cedar
#

OH RIGHT I CAME TO ASK AN ACTUAL QUESRION 😭

sonic cedar
#

(Unrelated)

okay so calculate_context has 2 parameters, the second being return_table

what is that

willow nimbus
#

i didnt know it existed

hybrid shadow
hybrid shadow
vale glen
#

Y'know how you have return {mult = whatever} sometimes in code

#

It's that

sonic cedar
#

ok but what’s the usage of it in

#

the parameter

vale glen
#

If ya wanna access code from within the calculated context, in the function you called SMODS.calculate_context() in

#

Just like how you'd want return {mult = whatever} to change the mult outside of the calculated context

digital pier
#

so i wanna make a joker that changes stone cards to give 250 chips instead of 50 how do i do that

#

or atleast what do i reference

vale glen
#

Look into SMODS's wiki, the Calculate Functions page should help

digital pier
#

thank

vale glen
#

Searching this channel for keywords related to your goal can help too

sonic cedar
willow nimbus
sonic cedar
sonic cedar
#

ok

subtle merlin
#

How can you find if you win the round on your last hand?

sonic cedar
sonic cedar
vale glen
#

Haven't worked with retrigger things before, so dunno much about it

sonic cedar
#

no thats the thing

#

It’s not supposed to retrigger at all

#

but the custom context is getting called twice any time I use it

#

but only in scoring

vale glen
#

Ah, what is your code?

sonic cedar
#

incoming

vale glen
#

Wondering if it's one of the ones where you just add and context.main_eval to the condition and it'll be fine

sonic cedar
#

I tried that it didn’t work

vale glen
#

Mkay, so it's a different context then

sonic cedar
#

I can put it back in though

vale glen
#

Nah, let's describe what you want your card to do, then show the code

sonic cedar
#

so instead of 2-> 20

#

it's 2 -> 200

digital pier
#

ok wait can i open two main.lua;s at the same time

sonic cedar
#

if you want

brittle tide
#

Is it possible to code this?

vale glen
sonic cedar
frigid cargo
#

How do I reference what enhancements do or smth like that. For example, i wanna say foil card do smth in the context and I wanna put what foil does. How do I implement that?

sonic cedar
#

Come again

vale glen
gentle rain
#

this function should decide if the currently viewed deck in the new run menu is playable. if the name of the deck is b_joey_honkifex then it shouldn't be selectable, yet it is. it works fine with locked decks, but is unable to check if this has a certain name. im really lost

frigid cargo
vale glen
gentle rain
sonic cedar
#

The enhancement

gentle rain
sonic cedar
#

the cat,,,

vale glen
digital pier
#

holy shit i'm actually having fun learning this

vale glen
digital pier
#

i thought this was gnna be hell on earth to figure out but

frigid cargo
sonic cedar
#

I give her 5 minutes

frigid cargo
#

ok thanks

subtle merlin
#

How does one find the current hand count? Bc hands_remaining doesn't work but it's all i found

subtle merlin
vale glen
sonic cedar
#

it’s this one

digital pier
#

i'm dumb for atleast like 19 hours of the day

subtle merlin
subtle merlin
sonic cedar
#

is that a challenge do_not_say_that_again

subtle merlin
#

Yes >:3

sonic cedar
#

try 25

subtle merlin
#

You can't be awake 25 hours unless you drink 5 "5-hour-energy"s

subtle merlin
vale glen
#

yay

vale glen
sonic cedar
#

I don’t know which one it i—the gain block

#

on it

vale glen
#

Because rn that code feels too complicated for what Axy thinks you want to do, but you might have good reason for writing it that way

lament agate
#

how do you use randomized text for loc txt

#

description

#

like

#

misprint

sturdy compass
sonic cedar
# vale glen Because rn that code feels too complicated for what Axy *thinks* you want to do,...
INFO - [G] Table:
main_eval: true
chudhit: true
cardarea: Table:
  T: Table:
    h: 2.6136585365854
    x: 4.7573170731707
    y: 0
    r: 0
    +2 more values.

  layered_parallax: Table:
    x: 0
    y: 0

  created_on_pause: false
  children: Table:
    area_uibox: Table:
      T: table: 0x0206cf681dd8
      +35 more values.


  NEW_ALIGNMENT: false
  highlighted: Table:

  cards: Table:
    1: Table:
      T: table: 0x0206e75e3c58
      +67 more values.


  +27 more values.


INFO - [G] Table:
main_eval: true
chudhit: true
cardarea: Table:
  T: Table:
    h: 2.6136585365854
    x: 4.7573170731707
    y: 0
    r: 0
    +2 more values.

  layered_parallax: Table:
    x: 0
    y: 0

  created_on_pause: false
  children: Table:
    area_uibox: Table:
      T: table: 0x0206cf681dd8
      +35 more values.


  NEW_ALIGNMENT: false
  highlighted: Table:

  cards: Table:
    1: Table:
      T: table: 0x0206e75e3c58
      +67 more values.


  +27 more values.


INFO - [G] Table:
main_eval: true
chudhit: true
cardarea: Table:
  T: Table:
    h: 2.6136585365854
    x: 4.7573170731707
    y: 0
    r: 0
    +2 more values.

  layered_parallax: Table:
    x: 0
    y: 0

  created_on_pause: false
  children: Table:
    area_uibox: Table:
      T: table: 0x0206cf681dd8
      +35 more values.


  NEW_ALIGNMENT: false
  highlighted: Table:

  cards: Table:
    1: Table:
      T: table: 0x0206e75e3c58
      +67 more values.


  +27 more values.

#

the print of course printed twice

#

w

vale glen
sonic cedar
#

why are there 3

vale glen
#

Being silly

sturdy compass
#

tru dat

sonic cedar
#

truth nado

vale glen
#

Hehe, of course the Abby from Mindwave reacts to that xD

sturdy compass
lament agate
#

let me be queer

#

vanillaremade misprint contains NOTHING

sonic cedar
#

where are you AT 😭

sturdy compass
#

loc_vars, not the localization file

vale glen
sturdy compass
#

I wish more people know putting <> around links suppresses embeds

vale glen
#

Oh, do we want to suppress embeds

#

Axy knows about that, just didn't bother with it

sonic cedar
#

i am actually incredibly aware i just dont

lament agate
#

man, i just wanted to add that text alongside with normal text:<

#

is it not possible?

gentle rain
#

got a blue screen

#

do i get an award

sonic cedar
#

no

sturdy compass
#

no

lament agate
#

fuck my life

#

gruhhhhhhhhhhhhhh

sonic cedar
#

grug

vale glen
sonic cedar
#

astra you legend

sturdy compass
#

Blue screen is usually a result of a bad lovely patch

sturdy compass
sonic cedar
sturdy compass
#

LOL

lament agate
#

fuck misprint

#

imma try something else

#

do i look like i know what a jpeg is

sonic cedar
#

you look like you collect polaroids

lament agate
#

im cooking

vale glen
gentle rain
#
  • Im the original Starwalker
lament agate
sturdy compass
sonic cedar
vale glen
#

Hm. Is it possible that one of those definitions is being set to true when you don't want it to, for the card you're currently working on?

lament agate
gentle rain
#

HELL YES

sturdy compass
#

banger

hybrid shadow
#

baller

sonic cedar
gentle rain
vale glen
#

What does a lucky card do again?

sonic cedar
#

1 in 5 for 20 mult, 1 in 15 for 20 bucks

lament agate
#

should i use the deltarune font tho

#

it looks off

vale glen
#

Hmmm. Let's try print(inspect(context)) next, inside of your code block.

#

Then look at the two prints side by side.

sonic cedar
#

got it

sturdy compass
#

Reminder that individual goes off during end_of_round as well

vale glen
#

Axy hasn't worked with that context at all, so am unfamiliar with it.

sturdy compass
#

pain

lament agate
#

the config is a bit sloppy i think

sonic cedar
lament agate
#

yes you

vale glen
#

Yunli noises

sturdy compass
#

Toma goes off the deep end

sonic cedar
#

goes?

sturdy compass
#

went*

sonic cedar
lament agate
#

oh it shows

#

alright good enough

#

now i need to make it to play a sound when bought

sonic cedar
#

i mean surely right

#




#

The first high card

sturdy compass
#

I just took a look at my own joker that checks for lucky triggers and doesn't double trigger and I have not context.after for some reason? I wonder if that's helping

sonic cedar
vale glen
#

Still waiting on the print inspect

sonic cedar
#

Oh right mb

sturdy compass
#

I don't know why I have that tbh but it could be worth trying

sonic cedar
#
INFO - [G] main_eval: true
chudhit: true
cardarea: table

INFO - [G] main_eval: true
chudhit: true
cardarea: table

INFO - [G] main_eval: true
chudhit: true
cardarea: table
#

three

vale glen
#

Hm, so looking at context doesn't help tell them apart

sonic cedar
#

gonna try the after thing

vale glen
#

Am suspecting it's because you called SMODS.calculate_context{chudhit = true} for every different card, even though Axy would have named them differently, or added more things rather than just chudhit = true in there to give more information.

#

Maybe that's not the case, but it's hard to rule out atm.

sturdy compass
sonic cedar
#

yeah lmao

#

surely

sonic cedar
sturdy compass
#

surely

sonic cedar
#

eternal pain that I did all that and it triggered on the first lucky card

#

funniest shit all day but eternal pain

vale glen
#

Is it only triggering once now?

sonic cedar
#

i have to reboot the game first

sturdy compass
#

ouchie

sonic cedar
#

(This will not stop me from doing it again)

vale glen
#

You use Alt+F5 to reboot the game, yes?

zinc violet
#

ok i have a problem

game works normally but does not detect the joker

sonic cedar
#

Ofc

zinc violet
#

I tried to do something using joker banana code but it still doesn't detect it.

sonic cedar
sturdy compass
sonic cedar
#
INFO - [G] main_eval: true
chudhit: true
cardarea: table

INFO - [G] main_eval: true
chudhit: true
cardarea: table

INFO - [G] main_eval: true
chudhit: true
cardarea: table

INFO - [G] main_eval: true
chudhit: true
cardarea: table
#

FOUR

sturdy compass
#

?????????????????????????????????????????

sonic cedar
#

it's not like i triggered the mult and the money

#

it's JUST

#

the MULT

zinc violet
#

like

#

boss blind score/3

sonic cedar
#

Wdym it doesn’t detect the joker though

vale glen
#

Like, not find in collection, not find the mod, not trigger when held while in game...

sonic cedar
zinc violet
#

oh

vale glen
sonic cedar
#

Thats where setting_blind comes in no?

#

since it’s for the start of a blind?

vale glen
#

Ah, was thinking you were replacing the entire statement, not just part of it

#

Oops

sonic cedar
#

yeah just the boss thing the guy had cause that was a finicky way to do it

sonic cedar
vale glen
zinc violet
sturdy compass
sonic cedar
#

banana

zinc violet
sturdy compass
#

Ok. I ask because I wanted to see if it was a mod problem or a joker problem lol

vale glen
#

Sounds like a mod problem atm

sturdy compass
#

Do you have a metadata file

zinc violet
#

I don't think so

sturdy compass
zinc violet
#

oh

#

yes, yes I keep it

sturdy compass
#

This is crucial for your mod getting detected by Steamodded

vale glen
# sonic cedar FOUR

Anyways yeah... Axy personally wouldn't use chudhit for every different thing you want to do. This pattern makes debugging harder, as you're seeing now. Using different names like chudhit_bloodstone or chudhit_hallucination would make things easier to trace.

zinc violet
#

oh, no, the mod detects it, what it doesn't detect is a joker I just made.

sturdy compass
sonic cedar
sage crater
#

in a code block or file, please

sturdy compass
sage crater
#

that would be why haha

zinc violet
#

oh

#

wait

#

thats not

vale glen
sturdy compass
#

Both of your jokers have the key joker2

#

That makes one override the other

zinc violet
#

ou

sage crater
#

also I recommend removing this and creating a .json file

sage crater
zinc violet
sage crater
sturdy compass
#

whatever you see fit

zinc violet
#

ooooooo

sage crater
#

personally, I recommend a key that is close to the name

sturdy compass
#

generic names like 'joker2' or 'joker3' will bite you in the long run

zinc violet
#

I'm going to see if it works

sage crater
#

for funky mode, funkyMode is good
for Oh Banana! ohBanana is probably good

vale glen
#

Hm... wondering how this talk about having non-generic keys is different from the talk about not using the same context name for different things.

sturdy compass
#

it is lol

zinc violet
#

oooook its works

#

thanks for your help

#

very thanks

sonic cedar
sturdy compass
#

Imagine each joker had their own joker_main context

#

that would get hairy

sonic cedar
#

I would end it

#

correction

#

My laptop would explode

zinc violet
#

the joker failed successfully, I guess

sonic cedar
sturdy compass
zinc violet
#

I will try another boss blind

sonic cedar
vale glen
# sonic cedar yes actually (last one is an ownership)

Right, but these aren't just joker_main, they're for when different cards trigger like bloodstone, cavendish, Space Joker, and so on. At the moment, there's no added stuff in the context table to differentiate them, like having {chudhit = true, bloodstone = true} or something.

sonic cedar
#

CARD

zinc violet
#

okkkkkk

#

works quite well, a bit unpredictable at the first try, but fine.

sonic cedar
vale glen
#

Ah

sturdy compass
#

For sure

sonic cedar
#

hence why 4 of them (the screenshots) are just patches

#

wof wouldve been one but i had already taken ownership for an unlock so

#

just use it again lmao

vale glen
#

So it wants to happen regardless of which card activates, and could activate for multiple of them, huh...

sonic cedar
#

yeah it just calls the context in appropriate circumstance

#

yet for some reason when it comes to scoring

#

ONLY scoring

vale glen
#

Okay, that explains that pattern then

sonic cedar
#

it triggers multiple times

#

well

#

more than it does already

sturdy compass
#

I wonder if you calling the context in the middle of the card scoring is causing it? maybe instead of calling the context you just do the scaling within that conditional instead

#

It'd be functionally the same

sonic cedar
#

deviation from lucky cat it is

vale glen
#

Hmmmm

sonic cedar
vale glen
#

Knowing which patch is being triggered would be helpful for debugging, here... Bleh

sturdy compass
#

Just don't call it during your lucky conditional. Just do the same scaling you do as if it were chudhit

sonic cedar
#

I see

#

Let’s see

#

surely

vale glen
#

Will it be five now

sonic cedar
#

no

#

it’ll WORK FINALLY FINALLY FINALLY FINALLY

vale glen
#

yayyyy

sonic cedar
#

Im trying. To get the money to trigger

sturdy compass
#

I big brained it

sonic cedar
#

now to recheck with literally everything else because I’m paranoid ThumbsUp0

#

another two notes to add to my credits
.

vale glen
#

Hm, so what was the change in the end?

#

Trying to understand why that worked, and why the previous one didn't work.

sonic cedar
#

just dont call the context

#

use the gain directly instead

vale glen
#

Like, in terms of lines of code

#

So we can just look at them side by side

sonic cedar
vale glen
#

Ah

sonic cedar
#

astra why do you have 5 notes

#

stop being helpful

vale glen
#

Didn't you want that context to be true in that case, though?

sturdy compass
#

:)

sonic cedar
#

and put it in the conditional

#

instead of calling it to do that

#

im guessing cause it was in the same joker

#

instead of external

#

gdi astra you already have a chud credit

sturdy compass
solemn hamlet
#

how do you download mods on mac

vale glen
#

Right, but now if you have any other card that wants to activate when any chudhit is true, it won't work with the way you've set this up

#

Hmmm

sturdy compass
#

That's not true

#

She kept the chudhit conditional too

#

It's just the lucky card edge case that was screwing with things

vale glen
#

Ah, she did? Dun see it in the first picture

sturdy compass
#

cuz it cropped

sonic cedar
#

?

vale glen
#

Oh

sonic cedar
#

not trying to break the whole thing 😭

sonic cedar
sturdy compass
#

Ah hell nah

vale glen
#

Hm, so this code would have the mult gain and return it in the joker main context. And the card also prints out "triggered joker", and the appropriate message.

sonic cedar
sonic cedar
#

oops

serene granite
#

ahh i am getting the thing where the jokers are being created from my consumable but its just like, over the game. like i can move them but they arent scoring anything. how do i fix this

vale glen
#

Does the print happen only once, actually?

sonic cedar
#

i know that thinking face anywhere hi somecom

sonic cedar
#

but now it's doing the NORMAL double triggering that instead of fixing i did a work around by using the square root of 10 as my xmult gain

serene granite
#

emplace? sry im rly new to this

#

i saw something about g.jokers? i think

sonic cedar
#

actually no you dont even have to

vale glen
serene granite
#

add card

sonic cedar
#

is it like judgement? cause if it is, use add_card

#

oh

serene granite
#

yeah its like judgement

sturdy compass
#

Is it SMODS.add_card tho

sonic cedar
#

TRUE

serene granite
#

no it wasnt

#

is that why ?

sonic cedar
#

oof

#

yes

vale glen
#

Using SMODS when possible is preferred

serene granite
#

ohh ok

vale glen
#

...Forgot that vanilla has an add card function too

serene granite
#

ok let me see if this works better then !

vale glen
sonic cedar
#

I can finally rest


vale glen
#

Apologies for not being helpful this time.

sonic cedar
#

Cough cough it’s 3 am cough

vale glen
#

Good time to code

sonic cedar
sturdy compass
#

Don’t be too hard on yourself

vale glen
#

ouh

#

Axy is in the credits now? EmptyStare

#

Was thinking you just had multiple entries for Astra

sonic cedar
#

Both are true

vale glen
sonic cedar
#

Greed has consumed him

vale glen
#

Well um, thank you for feeling Axy was helpful

sonic cedar
#

Thank you for being helpful

sturdy compass
sonic cedar
#

HELP

vale glen
#

xD

sonic cedar
#

i forgot revo hi revo

vale glen
#

Huh... Axy felt like since they couldn't solve the problem, and was stuck on what chudhit was intended to do for most of this time, that they weren't helpful. But somehow we were considered to have helped.

sturdy compass
#

Revo the goat

sonic cedar
#

has done NOTHING and made it anyway what a prodigy

sturdy compass
#

Fr

vale glen
#

yay

sonic cedar
#

i would not have known it was four triggers

vale glen
#

Oh, yay

sonic cedar
#

he's here too ig

vale glen
#

Pft, it's not that bad haha

sturdy compass
#

LMAO

#

But yeah could be way worse

sonic cedar
#

yandev

vale glen
#

Yandev's code could be performant on specific hardware actually, even though it looks bad

sonic cedar
#

yeah a toshiba microwave

sturdy compass
sonic cedar
vale glen
#

Surely, we can code Balatro on a microwave

#

The fire is the food burning

#

Because your chips and mult set the cook time

sonic cedar
#

my DINNER 😭

#

"hold on man im getting naneinf"

vale glen
#

xD

sonic cedar
#

burning down the house trying to play balatro on a microwave

sturdy compass
#

HA

sonic cedar
sturdy compass
#

That’s not my discord tag 😭

sonic cedar
#

it was when i PUT it damn you

#

fickle fool

sturdy compass
#

Blame Marathon

#

Genuinely

sonic cedar
#

is that a joker

sturdy compass
#

Game

sonic cedar
#

ohhhh the game marathon

#

i may be stupid

sturdy compass
#

I signed up for the closed beta (that I didn’t get in) and early on it didn’t allow usernames with underscores at the end lol

sonic cedar
#

laaame

sturdy compass
#

They fixed it but after I speedran signing up lol

sonic cedar
sturdy compass
#

Thank

sonic cedar
#

OH RIGHT

vale glen
#

Wondering what you wrote for Axy now Sherethink

sonic cedar
#

i didnt send it omg

#

i took the ss

sonic cedar
sturdy compass
#

Bet

#

Jsyk I helped N with VanillaRemade so I think I’ve earned the right to stand with him

vale glen
#

Ijiraq transformation sounds cool

#

Like a gundam

#

or a magical girl

#

or a magical gundam girl

sonic cedar
#

it’s actually a cryptid that steals kids but sure

subtle merlin
vale glen
#

waow

#

đŸ–šïž

sonic cedar
#

you

vale glen
sonic cedar
#

i saw you earlier somecom here's yours

vale glen
#

Seems like the Chud Joker is being reworked a lot xD

sonic cedar
#

not anymore!!!!! because he's DONE

#

effect wise

sturdy compass
#

Man

sonic cedar
#

still need to sp-was that a sticker astra

sturdy compass
#

It was the breaking handcuffs image lol

sonic cedar
sturdy compass
#

Why is yours mirrored 😭

sonic cedar
#

so it can look at my pfp

sturdy compass
#

Surely

sonic cedar
#

i have one of gumi

sturdy compass
#

Who

sonic cedar
#

idfk that's just her name

sturdy compass
#

The vocaloid?

sonic cedar
#

yeah

sturdy compass
#

Lmao

sonic cedar
#

it only took 83 (active) days...

sturdy compass
#

Insanity

#

Once the last Maximus card arts come in I’m gonna get a day count

sonic cedar
#

there is now only one behemoth keeping this release from releasing

sturdy compass
#

Oh boy

sonic cedar
#

three patches
this guy has three patches
and NONE OF THEM WORK FOR THE LOVE OF
(they patch properly they just dont do anything 😭)

sturdy compass
#

What exactly is he meant to do

serene granite
#

whats it called in balatro when it does that little splash text effect? like the NOPE or the EXTINCT effect. i want to find it in steam modded guides but idk what to look for

sonic cedar
#

youre not gonna believe this

sturdy compass
#

message

sonic cedar
#

STOP LMFAO

serene granite
#

its called message?

sturdy compass
sonic cedar
sturdy compass
serene granite
#

ok thanks!

sturdy compass
sonic cedar
#

oh right it was you

sturdy compass
#

I will eventually â„ąïž

#

I’m so bad at playing new games

sonic cedar
#

but yeah h-

#

should i not tell you then it's spoilers

sturdy compass
#

Nah I’ll probably forget

sonic cedar
#

ok well postgame spoilers

subtle merlin
sturdy compass
#

I haven’t played it

#

Lmao

subtle merlin
#

but you rushed to the closed beta

sturdy compass
#

Yeah

#

And I didn’t get in

sonic cedar
# sturdy compass Nah I’ll probably forget

but yeah he disguises himself as a joker at the start of each ante and if you trigger the joker it'll turn into him
also if you get the joker he disguises as it'll apply the priceless sticker to itself

#

in which you cannot sell it

sturdy compass
#

Interesting

#

And what are the problems then? That doesn’t sound too bad

sonic cedar
#

there are special exceptions for some jokers
exceptions as in "i have a funny twist on the effect"

sonic cedar
#

as you saw in the ss

#

he doesnt pick the fake costumes

#

he uses the basegame sprites 😭

#

the exceptions arent finished because we're trying to get the actual automated system (a fodder joker) running

#

and one i havent even begun on

#

it went from the sticker being on literally everything

#

if it was a card, it was priceless

#

to uh

#

nothing it just

#

wont

#

appear

#

at all?

sturdy compass
#

Bruh

sonic cedar
#

hence "we suppressed it too much"

sturdy compass
#

Lmao

#

So how are you checking for the other card?

sonic cedar
#

id hit up delirium more often but he's doing his own thing rn im not tryna cramp

sonic cedar
sturdy compass
#

“If you get the joker he disguises as it’ll apply the priceless sticker to itself”

sonic cedar
#

oh you mean how does the game know it's a coostume?

#

costume?

sturdy compass
#

How I’m interpreting this is if you acquire the joker the Ijiraq is disguised as, the Ijiraq gets the sticker. Is that correct?

sonic cedar
#

the costume he’s wearing does so you can’t just sell him

#

Once the transformation happens he loses it

sturdy compass
#

The costume gets the sticker?

#

Huh

sonic cedar
#

the costume

vale glen
#

Hm... How would Axy approach this... So it would "disguise" itself by setting its atlas and position to the target joker, along with any soul positions. If another joker (in the card areas with calculated jokers) contains the target joker, apply sticker?

sturdy compass
#

Ok yeah I’m very lost lmfao

#

No need to explain further

sonic cedar
#

this is costume say hi

sturdy compass
#

Ah ok this is making a bit more sense now

sonic cedar
#

see it's not THAT bad (it's that bad)

sturdy compass
#

I didn’t realize costume was technically its own joker

sonic cedar
#

yeah just dont load it in the collection ever

zenith sage
#

whats the lua syntax to check if a card is in a table

#

for instance if table destroy contains context.destroy_card

#

where destroy contains several cards to be destroyed

#

like .contains

zenith sage
#

for _, card in destroyed, if card == context.destroy_card?

sonic cedar
#
function table(table, card)
  for i = 1, #table do
    if (table[i] == card) then
      return true
    end
  end
  return false
end
#

should be self explanatory but lmk

#

actually dont lmk omg it's almost 4 am

vale glen
#

heh

#

Yeah, let's talk later then xD

sonic cedar
#

why did i let you people keep me here good NIGHT

#

cant even say tmr

#

im already there

zenith sage
#

        elseif #destroyed > 0 then
            if context.destroy_card and context.cardarea == G.play then
                for i = 1, #destroyed do
                    if (context.destroy_card == destroyed[i]) then
                        return {
                            message = 'Electrocuted!',
                            colour = G.C.RED,
                            remove = true
                        }
                    end
                end
            end
        end
#

seems like that should do it

subtle merlin
#

I was hoping to make a joker without asking a question here but that'll have to be later ig
how do I check the currently played hand type?

hasty mist
#

why in the world is this displaying as 400

daring fern
hasty mist
#

nothing out of the ordinary

vale glen
# sonic cedar

Ohhh, this makes sense now that Axy's read the code. Interesting that you copied the card's description text too, Axy thought you'd just change the atlas sprites. It's a nice idea to apply the sticker while setting the ability, Axy doesn't know enough about set_ability to know why that's preferred over using add_to_deck. Could the sticker be removed in a calculate function, by removing the sticker if the appropriate boolean is false? That seems inefficient, and might not work if you have a valid reason to apply the priceless sticker when the costume is removed. Would have to experiment with the Joker and try random things to see if it works.

#

No need to reply rn, feel free to ping when you're awake and such

subtle merlin
#

(ik for a fact i used the right hand bc the right hand is always full house for rn)

daring fern
subtle merlin
#

Im more tired than i thought, i fixed it and am checking now

#

It worked!

#

ty

zenith sage
#

after destroying some cards it removes them from the full deck but not from the like, deck counter? and still tries to draw them

#

and the deck says like 52/48 and draws empty spaces

#

also is there a better way to remove a playing card than start_dissolve

manic rune
#

check context.destroy_card

#

theres SMODS.destroy_cards too

zenith sage
#

how does SMODS.destroy_cards work

manic rune
#

never used it before :3

zenith sage
#

fair enough

manic rune
hasty mist
#

i am so lost

daring fern
#

I have Joker Hands themselves working perfectly, now I just need to figure out this.

daring fern
hasty mist
#

this genuinely doesnt make sense to me

#

it literally says 150

daring fern
hasty mist
#

yes

#

that was the first thing i checked

zenith sage
hasty mist
#

rewrote the whole joker, seems to work now

daring fern
zenith sage
#

yeah but like

#

what does that mean

frigid cargo
#

anyone know the name of code for the negative cards? (not jokers or consumables)

#

ill try thanks

placid star
#

is it possible to call a function of another card in another card? for example calling hermit to be used 5 times in another consumable

faint yacht
#

Vanilla cards do not really have a specific function of their own to call. For modded consumables, you can reference the .use function of the center.

#

Better off just duplicating what you need.

tardy juniper
#

how can i get the values for the current and max count of hands/discards?

hollow coyote
#

Hey ! I'm pixel art artist RogueLeaderArt and I also happen to be quite passionate by balatro So feel free to reach out if you need some help designing some jokers for you mods ! All I request in return is just a mention in the credits balatrojoker

(Attached, a quick example of the kind of stuff I can do !)

plain gazelle
subtle merlin
#

Is there a way to check if the most recent discarded cards are a specific enhancement and then draw them back to the hand if so?

#

I tried draw_card(G.discard, G.hand, 90, 'up', nil, discarded_card) to no avail so im asking here
-# im not goint to make the same mistake thrice, discarded_card was established earlier in the function

subtle merlin
#

I need to go to sleep, i'll ask more tomorrow

real topaz
#

is there a way to instantly win with a card if i have a certain joker?

plain gazelle
#

I want to make steel cards count as gold cards and vice versa as a side effect for my Joker, so I looked at Smeared Joker's black magic hook and made this which obviously doesn't work at all and crashes the game

what do I do and how do I check for enhancements ike "card.base.suit" does?

real topaz
hollow coyote
red flower
#

(i dont have an example with me on how to use them)

onyx sonnet
#

Is there a way to remove a joker from the pool through a calculate function?

narrow wraith
#

how do i make my own mod

red flower
plain gazelle
lament agate
#
    loc_vars = function(self, info_queue, card)
            return { vars = { card.ability.extra.dollars } }
        end,
        calculate = function(self, card, context)
            if (context.joker_main) then
                local hand = G.GAME.current_round.current_hand
                local hand_score = get_numeric(hand.chips) * get_numeric(hand.mult)
                local blind = get_numeric(G.GAME.blind.chips)
                print("hand_score:", hand_score, "blind:", blind)
                if hand_score >= blind then
                    ease_dollars(card.ability.extra.dollars)
                    return {
                        message = "$" .. card.ability.extra.dollars,
                        colour = G.C.MONEY,
                    }
                else
                    G.GAME.chips = math.huge
                    return {
                        message = "WRONG!",
                        mult = - math.huge,
                        colour = G.C.DARK_EDITION,
                    }
                end
            end
        end,
    }

is this right?

#

context :If your scoring hand catches on fire, gives 25$
otherwise, set your score to false infinite.

#

the otherwise is 1 in 6 chance

long sun
#

how do you get unseeded randomness?

red flower
#

math.random()

long sun
#

thanks :D

primal robin
hard mica
#

how can i make my own planet card?

manic rune
#

omg nxkoo and missing number voice reveal

lament agate
#

shh

daring fern
normal crest
#

Is there a context that enhancements held in hand can use to do something when a card scores

#

Or stickers too

hard mica
daring fern
plain gazelle
#

finally uploaded my first modđŸ„ł

red flower
#

i should add planets to vanillaremade those seem easy to copy paste

red flower
lament agate
#

or am i missing something

#

context :If your scoring hand catches on fire, gives 25$
otherwise, set your score to false infinite.
the otherwise is 1 in 6 chance

red flower
#

well there are a couple of things i would have done differently

lament agate
red flower
#

idk

#

did you try it

lament agate
#

good idea actually

#

hold on

#

well i mean it does work

#

but idk if the false inf one works or not

#

or do i forgot to putt probabilities in it?

red flower
#

i dont see the probabilities in the code

lament agate
#

oh yeah, the "otherwise" was "1 in 6 chances"

#

how do i make it work then

red flower
#

elseif pseudorandom("seed") < G.GAME.probabilities.normal / 6 then

lament agate
#

thanks

#

hold on

red flower
#

yes

lament agate
#

alright

#

also ths right?

lament agate
red flower
#

well idk what get_numeric is

lament agate
#

fuck hold on

#

god this is too elaborate to code

red flower
#

this is what i would have done


calculate = function(self, card, context)
    if context.final_scoring_step then
        local hand_score = hand_chips * mult
        if hand_score >= G.GAME.blind.chips then
            return {
                dollars = card.ability.extra.dollars
            }
        elseif pseudorandom("seed") < G.GAME.probabilities.normal / 6 then
            G.GAME.chips = math.huge
            return {
                message = "WRONG!",
                mult = - math.huge,
                colour = G.C.DARK_EDITION,
            }
        end
    end
end,
#

idk if the second return works

lament agate
#

imma try something else first

#

and if it srill doesnt work

#

imma try and tweak the thing you send

viral ember
#

I kept hearing about a way to change base Balatro code?

red flower
#

lovely patching?

viral ember
#

is that what it's called?

red flower
viral ember
#

Ah

#

thanks!

hybrid shadow
#

bunp

daring fern
red flower
#

context.pre_discard and context.full_hand for the discarded hand

hard mica
red flower
hybrid shadow
#

do i have to do the statements for them separately or can i make it an or inside the for statement (and if so how would i do that, am i able to just make it like for k, v in pairs(context.full_hand or (context.pre_discard and context.full_hand))?)

red flower
#

depends on what you want to do

#

for k, v in pairs((context.before or context.pre_discard) and context.full_hand or {}) would work

lament agate
#

wait is it possible to have a joker that has a different description when they appear in the shop

red flower
#

yes

lament agate
#

hwo

red flower
#

do you want it to be different only in the shop? boosters as well? the collection too?

lament agate
#

make it booster and shop only

red flower
#

in loc_vars return { key = card.area and (card.area == G.shop_jokers or card.area == G.pack_cards) and "j_modprefix_altkey" or nil }

lament agate
red flower
#

a loc file

#

replace j_modprefix_altkey for the key

lament agate
#

OHHH OKAY i understand it now

#

@red flower ?

red flower
#

no

#

you need a localization file

lament agate
#

en-us.txt ?

red flower
#

.lua

lament agate
#

right

#

what do i put in the loc?

red flower
#

you would do j_mvan_original = { name = "name", text = {"desc"} } like you would a normal joker

lament agate
#

gotcha

red flower
#

does that mean it works or it doesnt

lament agate
#

not the shop one

red flower
#

can i see the code

lament agate
#

i will also join was the shop

lament agate
red flower
#

you shouldnt have two returns

#

but thats not the issue, can i see the loc file?

lament agate
red flower
#

in needs to be in descriptions = { Joker = {

lament agate
#

gold on

#

ohhhh

#

okay i see now

red flower
red flower
#

yes

#

no

lament agate
#

pardon

red flower
#

descriptions

lament agate
#

oh

#

done

#

thank you for helping me btw @red flower

#

@red flower gruhhhhh

viral ember
#

why does it have 2 keys and 2 loc_txts?

lament agate
viral ember
#

woah discord bugged out

viral ember
lament agate
#

oh trippin

red flower
lament agate
red flower
#

try just key = "j_mvan_original" to see if it works at all

red flower
#

loc_vars

faint yacht
#

key = self.key doesn't work?

red flower
#

what would that do

faint yacht
#

Just use the original key.

red flower
#

oh ok then thats the problem

lament agate
#

do something ref

#

whats wrong

faint yacht
lament agate
red flower
#

you can do or nil

pure salmon
#

how can i have a boss blind detect unscored cards? i assume context.full_hand and context.scoring_hand don't exist

faint yacht
#

...wouldn't key = nil break it?

red flower
#

it's the same as not returning a key

faint yacht
hybrid shadow
red flower
lament agate
#

whats seems to be the issue here

red flower
#

the key doesn't seem to work at all for some reason

#

try key = "j_joker"?

lament agate
#

this mod is a curse to begin with

lament agate
red flower
#

also are you saving

#

i feel like your files dont save

lament agate
#

i press Ctrl + S every 2 seconds

hybrid shadow
#

this is for some reason not only working at the wrong time (for some reason whenever the first hand is drawn it looks through the deck?), but also adding/subtracting more times than intended

lament agate
#

HRUHHHHHHHHHHHHHHHH

red flower
#

ur mod is cursed sorry

lament agate
#

god damnit

long sun
#

do music tracks have priorities? mine isn't playing

#

(might be an issue with my context though)

#
SMODS.Sound({
  vol = 1,
  pitch = 1,
  key = "polargeist_music",
  path = "phanta_polargeist.ogg",
  select_music_track = function()
    if #SMODS.find_card('j_phanta_normalface') > 0 then
      return true
    end
    return false
  end
})```
hybrid shadow
red flower
# hybrid shadow yes

i dont know what the first issue is but the second is because each card with the sticker is doing the code for all other cards witht the sticker

daring fern
#

Try putting return 1e6

red flower
long sun
#

👍

hybrid shadow
lament agate
red flower
red flower
lament agate
#

forget this

#

imma scrap that

#

ill keep the line and the loc folder just in case it works tomorrow

red flower
#

yes

hybrid shadow
red flower
#

no

#

for that you would need more complex logic

pure salmon
red flower
#

(depending on the context)

pure salmon
#

which context would you need to call it in to do effects on individual cards?

red flower
#

context.individual?

hybrid shadow
#

do booster packs technically discard cards at the end of them? (asking so it doesnt fuck up my code)

lament agate
#

hey, can you detect player's least played hand for a description?

#

or is it not possible

red flower
#

yeah just do obelisk in reverse

#

you will get a lot of ties tho

hybrid shadow
modern kindle
#

You could set it to have at least 1 play which would help the 0 tie

lament agate
modern kindle
#

Multiple lowest played hands

lament agate
#

ohhhh

modern kindle
#

If 9 hands are played 0 times thats 9 hands that are lowest played

lament agate
#

not possible then

modern kindle
#

Setting it to a limit of being played at least 1x imo is the wave

#

Because then its less likely to be a huge tie

pure salmon
#

i'd break the ties by having the lowest poker hand win

modern kindle
#

Just have a check to see each hand that was played at least one time

pure salmon
#

i.e. if it's between pair, 3oak and 4oak, choose pair

lament agate
#

here's my plan:

i want the title to have their least played hand
but i want the description to be a random hand

#

like obelisk and todo at the same time

#

i guess this is right?

#

ignore the config

lament agate
modern kindle
#

Basically I'm gonna send it 30 times a day

red flower
#

i stole it from aiko

lament agate
#

jk

red flower
#

balatro modding guide but it just teaches you how to add prints everywhere to debug

modern kindle
paper zealot
red flower
#

im literally listening to bill wurtz rn

modern kindle
#

I will always think anything made like that is bill wurtz

lament agate
#

does this work đŸ„ș

red flower
lament agate
#

im deleting my IDE

zenith sage
#

im struggling

#

i want this to delete some cards and put an enhancement on the rest but i just cant figure out the right context order

#

    calculate = function(self, card, context)
        local charged = {}
        local eletrocuted = {}
        if context.destroy_card and context.cardarea == G.play and not context.blueprint then
            for _, scored_card in ipairs(context.scoring_hand) do
                if scored_card:is_suit('Hearts') then
                    if pseudorandom('defibrillator') < G.GAME.probabilities.normal / card.ability.extra.odds then
                        eletrocuted[#eletrocuted + 1] = scored_card
                    end
                end
            end
            if #eletrocuted > 0 then
                for i = 1, #eletrocuted do
                    print(i)
                    print(eletrocuted[i])
                    if context.destroy_card == eletrocuted[i] then
                        eletrocuted[i]:remove_from_deck()
                        eletrocuted[i]:start_dissolve()
                        -- SMODS.destroy_cards(eletrocuted[i])
                    end
                end
                return {
                    message = 'Electrocuted!',
                    colour = G.C.RED
                }
            end
        elseif context.before and context.main_eval and not context.blueprint then
            for _, scored_card in ipairs(context.scoring_hand) do
                if scored_card:is_suit('Hearts') then
                    charged[#charged + 1] = scored_card
                    scored_card:set_ability('m_nycto_charged', nil, true)
                    G.E_MANAGER:add_event(Event({
                        func = function()
                            scored_card:juice_up()
                            return true
                        end
                    }))
                end
            end
            if #charged > 0 then
                return {
                    message = 'Charged!',
                    colour = G.C.BLUE
                }
            end
        end
    end
modern kindle
zenith sage
#

because there is no context.destroy_card in context.before and context.main_eval and not context.blueprint

red flower
#

destroy_card happens almost at the end

zenith sage
#

but there is no electrocuted outside that for loop

red flower
#

you need to reverse the logic, first mark the cards for destruction and transforms the rest, then destroy

zenith sage
#

thats what i tried

#

but it seems like that table disappears

#

outside the scope or something

red flower
#

it does, you need to mark it on the card

zenith sage
#

oh how do you do that

red flower
#

each context is a different call to calculate so local variables disappear

red flower
zenith sage
#

so first go through the context.before and mark whichever ones dont get transformed, then at context.destroy remove all marked cards

#

bless

#

2 more questions, quick ones

#

    calculate = function(self, card, context)
        local charged = {}
        local eletrocuted = {}
        if context.before and context.main_eval and not context.blueprint then
            for _, scored_card in ipairs(context.scoring_hand) do
                if scored_card:is_suit('Hearts') then
                    if pseudorandom('defibrillator') < G.GAME.probabilities.normal / card.ability.extra.odds then
                        scored_card.nycto_marked = true
                    else
                        charged[#charged + 1] = scored_card
                        scored_card:set_ability('m_nycto_charged', nil, true)
                        G.E_MANAGER:add_event(Event({
                            func = function()
                                scored_card:juice_up()
                                return true
                            end
                        }))
                    end
                end
            end
            if #charged > 0 then
                return {
                    message = 'Charged!',
                    colour = G.C.BLUE
                }
            end
        elseif context.destroy_card and context.cardarea == G.play and not context.blueprint then
            for _, scored_card in ipairs(context.scoring_hand) do
                if scored_card.nycto_marked and context.destroy_card == scored_card then
                    card:start_dissolve()
                    eletrocuted[#eletrocuted + 1] = scored_card
                end
            end
            if #eletrocuted > 0 then
                return {
                    message = 'Electrocuted!',
                    colour = G.C.RED
                }
            end
        end
    end
#

is start_dissolve okay here or should i be using some other method

#

like SMODS.destroy_cards or whatnot

red flower
#

neither

#

you want to destroy the played card right?

zenith sage
#

yeah

red flower
#

you need to return { remove = true } for each

#

you dont use a loop

zenith sage
#

so for every played heart card in main.eval, 1 in 10 chance to mark it, then later during context.destroy_card, return { remove = true } for each marked card

red flower
#

yes

#

sidenote i should test if context.before and context.main_eval makes sense or remove it from vanillaremade haha

pulsar furnace
#

I don't understand how to use get_weight()

wintry solar
pulsar furnace
#

changing a rarity weight, that's what it's used for, right?

peak obsidian
#

i wish there was a doc about smods.font cause like idk what im doing wrong can somebody give me a hand here

red flower
#

that should work

#

whats your smods ver

peak obsidian
red flower
#

hmm

lament agate
#

load file maybe?

stiff quiver
#

hi, i made this code to double a joker's number values, but instead of that its changing its ability to give xmult, what 's wrong with it? lua for key, effect in pairs(G.jokers.cards[card.ability.extra.sel_joker].ability) do if type(effect) == "number" then effect = effect + effect G.jokers.cards[card.ability.extra.sel_joker].ability[key] = effect end end for key, effect in pairs(G.jokers.cards[card.ability.extra.sel_joker].ability.extra) do if type(effect) == "number" then effect = effect + effect G.jokers.cards[card.ability.extra.sel_joker].ability.extra[key] = effect end end

cursive gazelle
#

is there any shader tutorial

#

im not familiar with f# in creating shaders

daring fern
hollow turtle
#

Is there any way to see if the hand being discarded is a pair?

hollow turtle
daring fern
daring heron
#

Honestly just elaborate in general, “yes” doesnt help anyone

hollow turtle
#

Thanks a lot

pulsar furnace
#

how do i make it work 😔

red flower
#

G.GAME.selected_back.config.center.key iirc

red flower
#

where is this

pulsar furnace
red flower
#

selected_back.effect.center.key?

modern kindle
# daring heron Honestly just elaborate in general, “yes” doesnt help anyone

If a question is not elaborated then an answer doesn't need to be
Its like when people ask 'is x possible'
Yes, it is
When people decide to say 'hey, if this possible, and if it is how would I go about it?' Then they can get themselves a valid answer
Just asking a simple question leads to the perception getting a yes would lead them to look at other documentation or other mods as examples

echo aurora
#

Is there a way to reroll booster packs?

red flower
#

i just dont reply tho

vale glen
#

Followup questions do exist, and would reasonably be expected

#

A simple "yes" discourages that sort of ask

red flower
#

follow up questions have the same problems as asking to ask

modern kindle
#

Yea there's no point in asking a question just to ask it

vale glen
#

They do slow things down, but just a simple yes can feel aggravating too

floral narwhal
#

how can i make new tab like shop or selecting blind?

vale glen
#

Like, yes, do you need any help with that?

red flower
vale glen
#

Mmh, although Axy stays silent if we're not sure how to do a thing

red flower
#

same, i do think replying with just yes is often rude

modern kindle
modern kindle
echo aurora
#

Like in the shop when you press reroll, it also rerolls the booster packs.

pulsar furnace
#

is there a way to make like shop discount?