#💻・modding-dev

1 messages · Page 293 of 1

manic rune
#

go through G.jokers.cards and check their .config.center.key?

red flower
#

iterate through G.jokers.cards? or do you want to find a specific one

manic rune
#

beautiful

#

now time to see where the progress bar in the loading menu is

formal parrot
#

Is this solitaire ?

manic rune
#

no its clearly yugioh

formal parrot
#

No yu gi oh is more horizontal

stark geode
red flower
manic rune
#

i wonder whats this for

red flower
#

table length

reef belfry
manic rune
#

isnt it the same as #table

red flower
#

that doesnt work with non-arrays i dont think

manic rune
#

oh

formal parrot
shell timber
#

yeah #table only works with arrays

manic rune
#

what r the odds of the progress bar being conveniently placed in ui_definition

#

andddd nope, not in there

#

found it

#

shouldve thought of checking game.lua first

#

...probably best that i read love.graphics documentation somewhere first

hushed field
manic rune
manic rune
rich geyser
#

I'm trying to modify the hand size with a tarot card, but I can't find the hand size function anywhere on the documentation, so can someone tell me what is it?

manic rune
hushed field
# manic rune this one

oooh, that's really digging into just straight up love2d features, huh. I'm gonna ask you a shitton of questions once You've figured out how to make it work 😛

manic rune
#

theres no ui function made for this sadly

#

do NOT bet on me when it comes to ui, i will probably forget everything when i got it working 😭

#

shouldnt be that hard tho

#

what could possibly go wrong

hushed field
#

hahaha. I was looking into using sliders for progress bars but it wasn't very successful to set up. I wanted a progress bar on the bottom of cards for timing related things

manic rune
#

-# when i got it working, i should probably make an UI function to make progress bars easier somehow

hushed field
#

I don't care who it is, whenever I see someone do cool ui stuff I'm going to try and make them think the best thing to do is make all their features an smods pr that makes ui a million times easier for me, haha

manic rune
manic rune
tall wharf
#

can't record vid

#

but you can drag the whole pile

manic rune
#

aiko can you add ultrakill to balatro

tall wharf
#

problem is that it all gets combined for some reason when i drag

#

it all got bunched up into a single pile

#

@paper zealot 😭

spring lantern
#

hey is there a way to add badges to a modded deck? there's no create_badges function available in SMODS.Back but it still shows the mod badge in-game so there's gotta be a method to add your own badges regardless right

tall wharf
#

i can finally finish a game of this

#

feature complete

zealous glen
pale venture
#

Is there a way to remove/hide a custom suit from the customize deck page? Or change the cards displayed to something other than the face cards?

zealous glen
#

I think so

modern kindle
#

I fell back asleep so good schmorning part 2

tall wharf
#

i added solitaire in balatro for real

chrome widget
#

Morning dilly

modern kindle
#

Hi winter :D

chrome widget
#

:3

modern kindle
#

How is your Saturday

chrome widget
#

Eating leftover Chinese food, being hot, and getting ready to do more mod work

modern kindle
#

Hot as in attractive or hot in temperature

#

Cause ur smokin

#

😎

chrome widget
#

Attractive lmao, it's not super warm yet where I live

modern kindle
#

Lmao

chrome widget
#

I am attractive all times of year, which is why I wear skirts in the middle of winter despite many, many people suggesting it might be colder than wearing pants

modern kindle
#

I remember when I was younger I didn't often care to bundle unless it was unusually cold

#

These days I haven't really had much of a winter

#

I think it snowed only a handful of times here in Chicago, and nothin serious either

chrome widget
#

The one time I went to Chicago the "windy city" thing really was true so it was unnecessarily chilled in summer because of constant wind

unkempt thicket
#

How can i use SMODS.Gradient for UI?

modern kindle
#

Come here again we can meet up :D
Lmao
But yea it's usually got some good breeze around here and I'm all for it

chrome widget
#

Unfortunately I don't have much reason to go to Chicago most times 😔

placid star
#

can anyone see an error in my code? my game crashes on selling my joker

chrome widget
#

I went there for a bowling tournament years ago

tall wharf
#

im cooked...

modern kindle
#

I'm really good at bowling if the objective is to do very poorly

chrome widget
hushed field
#

I was a semi-pro bowler as a kid until my bowling club burned down. I haven't bowled a day in my life since...

chrome widget
#

c_[modprefix]_nanamitool

placid star
modern kindle
placid star
chrome widget
#

I used to be a nationally competitive youth bowler until I left high school, then I stopped and had no real reason to continue

modern kindle
#

I've only been bowling twice in my life so I am not very good

Billiards however
I have a shot

hushed field
#

The only thing I think I'd have a shot at is a drinking competition

modern kindle
#

At the peak of my alcoholism era I could probably beat you..

#

These days not so much

hushed field
#

Is there not a single claymation movie in Kino yet? 🤔

chrome widget
#

The most objectively terrifying fact about me was that I was a jock in high school

modern kindle
modern kindle
#

I can't currently imagine the jock winter though

hushed field
#

I do not, though I'll definitely add it at some point. I wanna make Oogie Boogie a boss blind as well

modern kindle
#

I only saw nightmare before Christmas for the first time last year

#

I liked it

hushed field
#

Ren has been telling me to add Kubo and the Two Strings as well, but I wanna find a mechanical angle for music-themed things first

modern kindle
#

I mean shoot if you'd get into music themed things the sound of music, singing in the rain, Mary poppins

#

Fiddler on the roof was good too

hushed field
#

Sound of music is in, Singing in the rain I scrapped because the effect wasn't fun enough to warrant it being in, and Mary Poppins I haven't seen yet so I only have vague notions of what that one is about, haha. Sound of Music is one of the more complicated jokers in the mod, for sure

modern kindle
#

This is large and in charge

zealous glen
#

Maybe scale it by card size

modern kindle
#

Hi again vic

zealous glen
zealous glen
modern kindle
#

:)

zealous glen
modern kindle
#

My friends would mostly disagree but I am glad you think so :D

#

Oh while I'm here have we figured out a way to move specifically infoqueues but nit the main description yet

hushed field
#

I should figure out if there are more flavour-gaps. I don't think I have a good angle on what to do with most sports movies.

#

Maybe I should make that the first custom seal, and have it be a seal that retriggers like red seal, but can be incremented somehow. So that I have a concept for 'training' that isn't fully overlapping the general buffing of playing cards

modern kindle
#

You could incorporate an aspect like perishable, just make it so after the tally ends that's when the training is over

#

As opposed to when it's debuffed

shut crater
#

Hi there, just starting my first mod. I'm trying to understand contexts and the calculate function, and I see a lot of detail about different contexts but doesn't really explain cardarea, could someone help me understand how cardarea works?

#

Is it like the location of the card whose calculate function is being run?

hushed field
# shut crater Is it like the location of the card whose calculate function is being run?

Nope, but close! It's the location of the card who's being evaluated, which may trigger a calculate function. In context.individual, for example, each individual card is being checked, both in the played hand, and held in hand. So you specify the cardarea to make sure it doesn't trigger on cards held in hand for example. Or to not trigger on cards in play. Or probably, more realistic, you specify something like context.cardarea == G.play to only do something if it's a card that's in play and being scored

tall wharf
#

????

#

this should be enuf

shut crater
#

or like how often is calculate called cause it seems like the answer is A Lot

red flower
#

a lot

shut crater
#

and every single card has a calculate function, not just jokers?

red flower
#

yes, also blinds and decks and you can enable cards in deck to also have them for example

#

(not all vanilla objects have those tho or they have just 1 big calculate)

hushed field
#

Yes!

chrome widget
#

Oh yeah I'm having an issue that I want to run by some people

#

Do Root UI nodes organize nodes in a row?

hushed field
shut crater
#

that's a pretty good idea

#

where will that log be?

red flower
#

In the lovely console or you can install DebugPlus to show it on screen

red flower
chrome widget
#

I'm just getting some weird results with a UI box where things using column nodes are organizng child nodes in rows instead of columns, and trying to parent them under a column node results in no change in behavior

tall wharf
#

:3

red flower
chrome widget
#

So this is what it results in visually right now

#

The first two text nodes are parented under row nodes

#

And then each of the Stored/Available nodes are under column nodes

zealous glen
# tall wharf

I said to make the displacement proportional to the card size

#

I don’t know what unit 0.5 is in

tall wharf
#

ah

#

well

red flower
zealous glen
#

Text inside a column still organizes in a row IIRC

zealous glen
#

Well usually it only has a single text node

zealous glen
#

Stake chips

chrome widget
#

Okay let me get my bearings here, the main issue is the Available/Stored nodes, so let me outline what it's currently doing:

  - Row
    - Text ("REFRIGERATOR STORAGE")
  - Row
    - TEXT ("STORED JOKERS N/N")
  - Column
    - Column
      - Text
      - Row
        - Column
          - Row
            - Text ("ACTION")
          - Row
            - Object (Cardarea)
  - Row
    - Column
      - Text ("Close")```
#

So the issue is the two sequential column nodes in the tree?

shut crater
#

is it possible to add a consumable that is neither Tarot nor Spectral? or should I just make it a Spectral card

#

I'm trying to create a joker that has a chance to spawn a specific custom consumable

chrome widget
#

You can create new consumable types

red flower
chrome widget
#

Okay yes, that works (barring weird height issues)

#

I also want to be able to center the title if possible

red flower
#

you can probably give the row node over it a minw

chrome widget
#

Yeah yeah I need help with UI shit 😔

#

There's a reason I avoided ui programming at my last job

modern kindle
#

no its just my name so i had to point it out

#

:b

chrome widget
#

Ye I just had to give it a placeholder atlas since I use individual ones in my mod

#

I usually just name them dilly_[something]

modern kindle
#

ye no worries

#

you are my ui goddess so i dont care what u do

chrome widget
#

Okay I will give you that I am good at certain shit but organizing UI is not one of them. Gender affirming to be called goddess tho

modern kindle
#

:D

#

youre better than i am at all of this so i simply value you

#

i do my best

unkempt thicket
#

I've been working with UI recently as well; does anyone know the G.C.color versions for SMODS.Gradient.

hushed field
#

I pray to the Ui goddesses, hoping for the random adjustment I made to offsets to actually work out

chrome widget
#

UI Goddess: "no"

shut crater
#

I've found myself here, is there a property I can change here to prevent my consumable type from having a collections menu?

#

can I just make create_UIBox_your_collection nil or something

tall wharf
#

idk

#

you can kinda tell that it's like stacked together

#

and when you release it it does this

unkempt thicket
chrome widget
#

Hmm yeah, setting a minw to the row nodes does not appear to be centering the items in the box

tall wharf
#

oh

#

uh

#

i think might know why it feels weird

#

the card is on the bottom layer lmao

#

so it is shown BEHIND the UI

zealous glen
#

Ported the Red Hand to 1.0. (Credits to Gappie for the soul sprite art)

stark geode
#

anyone know what the context for a destroyed card is

#

like when a card dies

zealous glen
red flower
zealous glen
stark geode
#

jimbo

zealous glen
stark geode
#

welp

zealous glen
#

check out how Paperback or Betmma do it, maybe

zealous glen
tall wharf
#

still no clue

#

but the gameplay works

zealous glen
tall wharf
#

no

#

idk what you meant by that eier

tall wharf
#

no

#

like which part of the code

tall wharf
hushed field
zealous glen
zealous glen
stark geode
#

wheres the page that tells me how to kidnap jonklers

sturdy compass
spring lantern
#

i can't find the part of the game's code that handles glass cards breaking

zealous glen
spring lantern
#

i don't know where the fuck it is i'm checking every corner of the lovely dump

sturdy compass
#

It's in state_events

spring lantern
#

i need the part where the game decides whether or not a glass card breaks

stark geode
#

playing card destroyed

#

then check its enhacnment for glass

zealous glen
sturdy compass
#

It does

zealous glen
#

easier to check the dump

spring lantern
#

i'm chgecking the dump

red flower
tall wharf
chrome widget
#

If I store a cardarea in a joker's extra table, will its value be serialized on saving? I'm attempting to do just this, but upon load, it's telling me stored_jokers is nil

hushed field
runic pecan
#

Is there a smods wiki for unlock_condition?

hushed field
chrome widget
#

I assume this is some underlying thing about values and references?

stark geode
#

but all it has is release info

zealous glen
zealous glen
stark geode
zealous glen
#

try one of Kino's UFO Jokers

chrome widget
#

So what's the most effective way to break down saving a card within another card?

#

Just copy the entire ability table? Will that serialize?

zealous glen
spring lantern
# red flower

this part of the code is gone in my version of smods

#

which i updated today

chrome widget
#

I'm doing a thing for Dilly. The Joker is a fridge that stored food items

#

When it stores them, it removes them from regular play

hushed field
zealous glen
chrome widget
#

I've done this

red flower
chrome widget
#

I'm attempting to save a cardarea as part of the extra table

#

Seemingly doesn't work

zealous glen
#

Can't you just save the key to the CardArea

hushed field
zealous glen
#

then you access it later

#

the CardArea already saves automatically

stark geode
chrome widget
#

Main issue is that I need the state of the food jokers at the time, they all have scaling values

hushed field
zealous glen
#

Joker values are saved

#

That's how you can reload a run

chrome widget
#

Are they saved if the jokers are in an arbitrary cardarea?

red flower
#

i think all card areas under G are saved

chrome widget
#

So then that provides another issue I suppose

hushed field
#

Yeah, if it's not under the G, it becomes an issue

stark geode
#

i meant the smods take owership

zealous glen
#

you can just put it in G

chrome widget
#

I guess I can set the arbitrary cardareas to be G.fridge_jokers_[nodeID]?

spring lantern
#

okay so i guess the version of smods in the mod index is out of date for whatever fucking reason 😭

zealous glen
#

no

hushed field
#

Winter, I'd check Kino's abduction code as well, tbh. I have this mechanic basically implemented, except I don't render the cardarea visually, but that's the easiest part

zealous glen
#

set it to G.YOURMODKEY_fridge_jokers_[nodeID]

chrome widget
#

I don't render them visually either yeah

zealous glen
#

I have a CardArea that's currently only rendered for debug purposes

hushed field
#

Not even when the fridge is opened?

zealous glen
#

you can see it here

tall wharf
#

:(

chrome widget
#

No, I create individual cardareas for each display card and render a copy of the card instead

stark geode
#

i dont think this ubduction is what i need

hushed field
#

The biggest question is whether cards in the fridge need to mechanically exist, or whether their values should just be stored. In the second scenario, you don't actually need to have a continuous card area

stark geode
#

i need to do smods take ownership

zealous glen
hushed field
#

Because you can store card objects on a joker, and that will be saved properly, iirc

spring lantern
chrome widget
#

The reason it's best to have them mechanically exist is because it also processes the joker calculations for stored jokers since the're removed from G.jokers

spring lantern
#

oop mb

chrome widget
#

I'd have to create and assign new jokers each time I wanted to do that otherwise

red flower
#

like while they're stored?

modern kindle
#

Yea, the idea is the fridge doubles the values of each stored food card

chrome widget
#

Yeah. Stored jokers

  • don't expire
  • don't count against your joker count
  • still calculate as normal
red flower
#

oh then you need to patch those areas into the smods calculation stuff

chrome widget
#

Fairly certain I don't

#

Why not just access all the cards from the fridge joker and pass in all calculations it receives to them?

#

It receives the same contexts that they would

zealous glen
#

Then it doesn't work automatically

#

without the Fridge

red flower
#

you can do that but it's more complicated than what i just said lol

zealous glen
#

but if the Fridge is meant to Blueprint them that's another story

chrome widget
#

Patching is inherently less stable

hushed field
#

It technically works with vanilla jokers. Would break anything position dependant that other mods might add 🤔

chrome widget
#

Any changes in SMODS code requires the patch to be fixed, and the code is less isolated

hushed field
#

Patching in a new cardarea has a specifically marked target in the smods code

zealous glen
#

Blueprinting also soves the issue of them expiring to be fair

red flower
#

patching calculation areas is built into smods, they provide a comment for you to target

#

so it doesn't break on updates

zealous glen
chrome widget
#

Patching also doesn't account for an arbitary number of new, arbitrary card areas, resulting from duplicate fridges

red flower
#

thats true but do you need an area for each?

hushed field
#

Don't make individual card areas per fridge. Just mark which jokers are in which fridge in a general area

zealous glen
#

I think that's not a good solution

#

Because cards cease to exist between loads

#

So any references become nil

red flower
#

"mark" not store

zealous glen
#

I thought that meant getting a pointer

#

which would point to nothing

hushed field
#

I tried to do basically what you're proposing for Kino's alien Abduction mechanic, by having each abductor create a card area stored on the joker, but it proved to be a real struggle to get it to work properly with loading and manipulating the cards in the cardarea

zealous glen
#

Anyways, just creating a CardArea and outsourcing the process by Blueprinting should be enough

hushed field
#

If the fridge displays fake cards, I do think you can technically solve this by storing the cards in a table on the joker, not even in a cardarea, and calculate the stored cards

chrome widget
#

But if cards don't serialize correctly, then it would make loading/reloading a pain

hushed field
#

Someone else has that mechanic working, iirc, but I'm not sure who it was. Let me check

chrome widget
#

IMO it sounds like the play here is to just create a cardarea per joker, with a unique ID for the node, and then just use/access it as usual. Although I can patch a new collective fridge cardarea, that would make the code for the fridge less portable, and probably introduce unexpected bugs. A unique cardarea in the global table would (afaik) serialize the cards within as expected, and also leave the result of calculation up to the fridge joker, which is the goal

chrome widget
#

Rather than them just being calculated as normal cards

zealous glen
#

because afaik they do so

chrome widget
#

So far attempting to serialize just a cardarea has resulted in pain

zealous glen
#

don't do it manually

#

let the game do it

chrome widget
#

I am

hushed field
#

Kàeda had a card store cards as just values, and I think the values are able to be manipulated

zealous glen
#

I do this in a lovely patch and my permanently scaling Zodiacs work well

self.ca_vic_zodiac = CardArea(
        G.TILE_W - 6*G.CARD_W - 2.95, -1.1*G.jokers.T.h,
        G.jokers.T.w, G.jokers.T.h,
        { type = "joker", card_limit = 12, highlighted_limit = 0 }
    )
#

where I'm pretty sure self is G

stark geode
#

so is there a way to add a custom context

zealous glen
#

yes

red flower
#

is there a way to remove a context

#

i dont like setting_blind

stark geode
zealous glen
#

what do you mean

stark geode
#

so i kidnapped gros michel

red flower
#

you can ignore the modprefix but i would advise not to

stark geode
#

and im giving it a context for when it dies

red flower
#

no

zealous glen
#

source: N' made it up

red flower
#

true

zealous glen
#

source: I made it up that N' made it up

stark geode
#

fuck

red flower
#

its like vibe coding

stark geode
#

time to go read smods code

modern kindle
#

Source:

zealous glen
#

I've heard that yesterday for the first time

red flower
stark geode
#

so like this

red flower
#

yes

zealous glen
tall wharf
#

how do i put certain cards above others 😭

zealous glen
red flower
tall wharf
#

it looks off

stark geode
#

wait it worked

#

WWWWWWWWWWW

tall wharf
#

wwww

red flower
#

wwww

stark geode
#

i was able to avoid patches yet again

zealous glen
chrome widget
#

Hmm

#

Creating a new cardarea on load results in an issue because the card on reload is the string MANUAL_REPLACE

#

So saving cards directly on the joker like you suggested Victin also doesn't work as you might expect

stark geode
zealous glen
#

I suggested creating a CardArea in G

stark geode
#

wait i forgot the .extra part

hushed field
chrome widget
#

I'm trying a couple other things, now doing the global thing like you suggested

lucid owl
#

where's a card's suit stored? is it .base.suit or something similar?

hushed field
lucid owl
hushed field
lucid owl
#

i'm using SMODS.change_base() but just need to access the suit of the card

tall wharf
#

so close

narrow iron
#

what would be the best way to change the scoring requirements for blinds? i just need to change the scoring for all blinds by a set multiplier

lucid owl
#

well i might just make those not work with this card

tall wharf
lucid owl
#

but i'll still need to access the suit of the card

hushed field
#

I think base.suit would work, but there might be a more official smods way to get it that's slipping my mind currently

lucid owl
#

alright, thank you!

hushed field
#

You can also check to see how SMODS.change_base() is implemented, because the place where it changes the suit, is also where you'd grab it from

stark geode
tall wharf
#

@red flower @zealous glen

paper zealot
#

10/10 game, can't believe nobody's thought of this before

tall wharf
#

todo:
add double click feature...

chrome widget
#

Hmm, storing the cardarea in the global table results in one of those "not instantiated on load" errors

tall wharf
#

i am not looking forward to that that's for sure

lucid owl
#

how can you check a card's seal?

stark geode
hushed field
chrome widget
#

That one seems strange. Because even the SMODS patching route would involve the globaly stored card area being serialized and deserialized in advance, no?

zealous glen
zealous glen
#

now go to sleep

stark geode
#

smods should add a joker destroyed context

chrome widget
#

I had to add one myself yeah

zealous glen
#

can anyone make sense of this

paper zealot
# tall wharf todo: add double click feature...

You should also consider extending and using a child "class" of Card (make SolitaireCard or whatever) for these minigames, to avoid having to add more hooks to very expensive and frequently-called functions like Card:drag. Since Card:drag is called multiple times per-frame on whatever you're dragging and all its child nodes, it adds up real fast

zealous glen
stark geode
zealous glen
stark geode
#

and my soultuion is not the bes one lol

chrome widget
#

If you want I could add a PR for various things, like my created/destroyed contexts and my insert cardarea at specified index changes

stark geode
zealous glen
chrome widget
#

Oh?

#

Well that would be lovely to replace my joker created one

zealous glen
#

You can use it

#

It's on the wiki

stark geode
#

but added to deck no worker on jimbos

zealous glen
zealous glen
#

I would maybe make a HyperCard class

tall wharf
#

i am not that smart but

zealous glen
#

A HyperCard is a "card and (nothing or hypercard)"

zealous glen
#

Because unless I put it wrong on Desmos it shouldn't work

strong jacinth
zealous glen
#

that's how you access crafting mode

red flower
#

im assuming

strong jacinth
#

Ooh, I forgot about that

paper zealot
# tall wharf YES

Also also, not sure if you've mentioned it earlier, but usually in Solitaire you draw 3 cards at a time from the reserve pile, where yours is drawing every card. Yours is a lot easier, is that a deliberate choice?

tall wharf
#

i can set it to 3

#

i picked 1 because it's easier

zealous glen
tall wharf
#

I'm sorry I'm just not that smart

zealous glen
#

v_v

shut crater
#

can someone walk me through the SMODS.add_card() function? I'm passing in the key of the consumable I want to create and add to the consumables area, but I get this error

#

is there some registration step I'm missing on my consumable?

tall wharf
zealous glen
tall wharf
zealous glen
shut crater
zealous glen
narrow iron
#

c for consumable, then the mod prefix you set in your metadata file, then the key for the card

red flower
#

im starting to have regions within regions in my loc file lol

strong jacinth
tall wharf
strong jacinth
zealous glen
#

actually I did add some vertical movement but I think you can ignore that

#

I'm trying to figure out how ease_num works so that I can time the vertical movement

unkempt thicket
#

Booster reroll button

strong jacinth
tall wharf
strong jacinth
#

And how do you pay with chips

tall wharf
#

try changing the numbers to some random value and see if the changes are reflected

paper zealot
# zealous glen

That plot looks wrong. There shouldn't be a discontinuity because (4*0.5^3) == (1 - ((-2 * 0.5 + 2)^3) / 2) == 0.5

zealous glen
#

which numbers though

unkempt thicket
tall wharf
#

actually

#

what

strong jacinth
zealous glen
#

that was my reaction to it too

strong jacinth
#

But did you hook/patch the next round and the reroll button?

tall wharf
#

-2² = -4

#

lol

zealous glen
#

This looks a bit better so I wonder if this is what I was trying to do

lucid owl
#

how do you get a card's edition?

tall wharf
#

is it not just card.edition

lucid owl
#

it might be lol

zealous glen
#

I'm gonna try rewriting it

#

Isn't (-1 % 2) - 1 just 0?

stark geode
#

commited to a project, feeling good

zealous glen
#

(x/2 - 1 % 2) - 1 should then be the same as (x/2 % 2)

sturdy compass
zealous glen
#

I figured out what I was doing wrong in Desmos

shut crater
narrow iron
#

okay, are you defining the name and description somewhere?

shut crater
#

sorry for all the (probably trivial) questions

narrow iron
#

nah its fine

zealous glen
#

are you defining the name and description in the localization file with the wrong or correct keys

shut crater
#

I do not have a localization file, I will go look into that

chrome widget
#

Okay now I just have to figure out how to avoid memory leaks here

#

Everything else works

narrow iron
#

when i changed the colors of the name on this card it added extra spacing between the words, how could I counteract the extra space?

modern kindle
faint yacht
#

Does func in the return table require a return true?

narrow iron
#

yes

#

wait which return table?

chrome widget
#

Does anyone know how to specify that a card is being removed/added to the deck specifically because the game is being exited or loaded?

faint yacht
chrome widget
#

remove_from_deck runs when you exit to the main menu, for example. I need to know how to avoid running some code in that case

narrow iron
#

and i defined the colors earlier in the file

chrome widget
#

I need the joker to clear the cardarea it's using from the global table if and only if it's regularly removed from the deck. If I remove the card area universally, it'll mean the cardarea won't be loaded upon reloading the game even though the joker will

zealous glen
faint yacht
#

fwiw, I use the if G.STAGE == G.STAGES.RUN and not G.screenwipe check to ensure that something happens only during active gameplay.

chrome widget
#

That'll work!!

zealous glen
#

I think {C:…}Gender {C:…}Swap {C:…}Potion should look better

#

not sure

narrow iron
#

the gap is still there

zealous glen
zealous glen
#

also try writing the name without spaces

narrow iron
#

its in my localization file

#

i just added custom colors

#

it acts the exact same as {C:attention} or {C:mult} would

#

just a different color

zealous glen
#

That's not what I asked

#

I don't think colored names are supported in vanilla

#

Maybe SMODS added it

narrow iron
#

ohh

#

yea i didnt change anything to add colored names

zealous glen
spark pumice
#

👋 I don't really know how to do... any of this? I know it's possible to check when a boss blind is, and I know it's possible to add negative to a random joker, but is it possible to make Jokers Eternal?

narrow iron
#

it did reduce the gap, now its slightly smaller than a normal space but it works for me

next timber
#

how would I make a joker that selects a random rank, but every copy of the joker has the same rank? i want to make a joker that clones itself but if you play the randomly selected rank it destroys all of them

narrow iron
spark pumice
#

Okay, thanks!

narrow iron
#

otherwise just read it

next timber
#

i mean i want it to change every blind selected but thats a start

zealous glen
#

Check the Castle example in the example mods

next timber
#

do all copies of castle you have use the same suit?

scarlet spire
#

just curious since i've been messing around with custom consumable types before, but is there default smods behavior for, instead of making a new "consumable types" submenu, just slotting the new consumable type in and adjusting the layout slightly if there's only one new type in the mod? (like this visual mockup i've made?)

#

there's totally room for it, so it surprised me that smods instantly resorts to throwing them all into a sub-menu even when there's only one new type

zealous glen
scarlet spire
#

well yeah if there's more than 1 new type, then it's time for the submenu

#

I'm just wondering how easy it would be to have a special condition for only one new consumable type that more neatly fits it into the menu, since the submenu is a bit of a pain for quick navigation

zealous glen
#

I reckon they opted for consistency and just always put it behind a submenu

wintry solar
#

I think it's better to have a consistent ui rather than one that changes depending on installs

#

and looking at this, I have no idea why the blinds button is twice the size of the others

scarlet spire
#

oh you know what, blinds is bigger so it matches the height of the left column

#

but then there's the "other" button now, which unbalances it once again

narrow iron
#

i have a joker with a chance to destroy cards after a hand is played, but when the cards are destroyed there are empty spaces left in the deck

scarlet spire
#

but, that's just how I see it

zealous glen
narrow iron
#

what function is that?

zealous glen
#

Not a function

#

Context

#

It's in the wiki

scarlet spire
#

it's a bit unintuitive at first, but you're going to want to use the context.destroy_card context, which triggers for every card in the played hand (iirc?)
if you then return { remove = true } for any of these cards, those cards are destroyed correctly without leaving ghosts

zealous glen
#

It's important to note that the most likely reason for ghost/invisible cards is due to event timing and lost references

scarlet spire
#

so the simplest calculate function involving this would be:

calculate = function(self, card, context)
        if context.destroy_card and context.cardarea == G.play then
            return { remove = true }
        end
    end```
which just destroys all scored cards
wintry solar
#

you can make that simpler btw

zealous glen
wintry solar
#

context.destroying_card is unique to played cards

scarlet spire
#

ah, yeah I suppose so

narrow iron
#

so this works now?

scarlet spire
#

the wiki lists it alongside a G.play check

narrow iron
wintry solar
#

like wheat said

wintry solar
scarlet spire
narrow iron
#

okay thanks

#

yep works now

sullen fern
#

it's not animating...

zealous glen
# sullen fern it's not animating...

I'm not sure animated Jokers are supported. I know people have done them, but they were sensitive/prone to crashing. That is, using only vanilla tools. MathIsFun had a homecooked solution. There was also a SMODS PR to add official support for them

#

is your pfp the Foster's Home for Imaginary Friends' character?

modern kindle
#

damn i havent thought about fosters in awhile

zealous glen
#

this is bloo now:

zealous glen
#

it's all Card

sullen fern
#

so no animated consumables???

zealous glen
#

not yet anyways

shrewd cobalt
#

Might be a problem with my formatting, but I'm trying to make a joker that debuffs face cards and adds mult based on the amount of face cards in deck,

Tallying the face cards work, but when I add the line to debuff it too, only the debuff line seems to work, why is that?

frosty dock
#

once the cards are debuffed, they're no longer considered face cards

zealous glen
#

doesn't this tally them first?

shrewd cobalt
#

ohhhh, alrighty then

limber blaze
zealous glen
modern kindle
#

you cantr eat me eating the jimball what the freak

zealous glen
#

there's no way a victin bee should be able to eat dilly while dilly is eating the jimball fly

#

the victin bee does it anyways

placid star
#

can SMODS.Rarity use shop_rate or is it something else?

stark geode
#

Is there a way to tell what blind has been selected in the blind selected context

reef belfry
#

G.GAME.blind:get_type() == "Blind Type"?

chrome widget
#

Is there a way to decouple the rotation of a uibox to its parent?

#

I've managed to be able to manually apply the x and y positions, but for whatever reason I can't seem to get the rotation to become independent of the parent

placid star
#

is there a way to tell what the current ante is and what the current round is?

red flower
#

G.GAME.round
G.GAME.round_resets.ante

unkempt thicket
narrow iron
#

whats the proper way to set the edition in SMODS.add_card?

faint yacht
#

e_nagative?

red flower
#

like that but without the brackets

#

also yeah negative

narrow iron
zealous glen
#

Maybe you can try to just apply the inverse rotation though

chrome widget
#

The weirdness is just that I'm not really getting anything when it comes to trying to manually set the rotation myself

#

But I can do it with x and y pos

#

Not really sure why they're treated differently

zealous glen
#

Are you doing T.r or VT.r?

chrome widget
#

both

zealous glen
#

Is this for a soul sprite

chrome widget
#

No, it's for the UI for this fridge card

red flower
#

jumbo jokerdisplay

chrome widget
#

I suppose maybe it just is that 0 rotation is the inherited one

next timber
#

im trying to use G.playing_cards in a blind's in_pool function, but it's giving me an error that it's nil?

zealous glen
chrome widget
#

I need the storage menu not to rotate

#

Makes the UI really hard to interact with

red flower
chrome widget
#

The best I can get is setting the r_bond to weak, but it still nudges a little bit when you move the card

red flower
#

isnt it just better to not make the uibox a child of the card

chrome widget
#

it is

#

if it's not a child of the card it's inherently more work to store it somewhere else

red flower
#

i just store a million things directly in G

next timber
#

which sucks because i do in fact have a deck where the condition is met immediately

#

oh hang on its not always ante 1?? it might just be the first run of the session??

#

its late i dont wanna deal with this im going to bed

red flower
#

lol

chrome widget
#

Hmm is there a way to manually hide the joker description box...

#

there is! Card:remove_ui()

#

Which is not used very much in vanilla

placid star
#

okay so does anyone know any weird bugs with pixel smoothing? this is my jonklers with 2x assets (and yes my 2x asset file is double the size of the 1x)

sullen fern
#

doodel

reef belfry
#

The second coming of strangepencil

placid star
placid star
sullen fern
#

how do i make a consumable play sound when used

#

this is for the command scrolls by the way

#

i want them to play the command on the scroll

#

eg. you use the march of mobility and it plays "pata pata pata pon"

#

i also want a little popup to appear saying the specfic drum being played

#

i know its possible but like how do i do it

#

i know how to play a sound.

#

and i know how to make a message appear.

#

but can i do it both at the same time

#

i mean i probably can

red flower
#

tiny text

#

i need to figure out how to expand the description

stark geode
#

The more I learn about how this game works the more interesting it is

sturdy compass
#

REAL!!!!!

glass scaffold
#

How (un)balanced is this draft?

mellow sierra
#

either lower the rarity or change the odds imo

buoyant shard
#

How do I make a joker always have the eternal sticker? Kind of like cube from cryptid, but I can't find it in its code

glass scaffold
glad osprey
#

how make sleeve that turns all playing cards six

mellow sierra
glass scaffold
mellow sierra
#

up to you honestly also consider it with oops all 6! @glass scaffold

mellow sierra
glass scaffold
mellow sierra
#

make stuff thats YOU find fun to play and im sure

#

other people will like it

#

havent tried the cryptid mod but yeah

#

u catch my drift

red sail
#

hello, i recently finished making a recolor for the suits in the game. could anyone help inform me on how i might change the text color for suits to match my recolor, like the ones on jokers?

reef belfry
#

Whats a good rarity name for something thats a better legendary but has a niche downside

glad osprey
#

gold bcus its valuable but brittle

#

crystal bcus like that but not

analog pilot
#

gold on the outside but is not entirely clean or perfect within

stark geode
#

how do i use smods create card to create a playing card

glad osprey
#

no

stark geode
#

im guessing i have to use the vanilla create card thing

glad osprey
#

yes

stark geode
#

cool

lucid owl
#

how could i add a consumable type to arcana packs? as in, there's a chance of them showing up like how omen globe works?

stark geode
#

how does the create card thing work

glad osprey
#

i am an idiot

glad osprey
stark geode
storm wharf
#

does anyone know where in the source code i can view the calculations for the jokers?

stark geode
#

im working my way through it now

stark geode
#

reading the sorce code be takin a minute

storm wharf
#

i'm going straight to the source code

stark geode
#

gl hf

glad osprey
stark geode
#

what even is a card center

glad osprey
#

everything thats movable

stark geode
#

oh good

#

nice to know im not even in the half of it

signal slate
#

I'm in pain again
How does someone make a custom rarity
Like I know this part:
SMODS.Rarity({
key = "Test",
loc_txt = {},
badge_colour = HEX("FFFFFF"),
default_weight = 0.003,
pools = { ["Joker"] = true },
get_weight = function(self, weight, object_type)
end,
})
But the function for that rarity is making my mind blank out
I also asked people in #⚙・modding-general

glad osprey
#

when i hook something the code gets run after the og function right?

red flower
#

it gets run when you call the reference

#

it can be before after or in the middle

glad osprey
#

ah sweet

stark geode
chrome widget
#

is copy_table a nested copy?

chrome widget
#

I.E. does it copy to the full depth of the table or is there a limit?

stark geode
#

and im creating the card properly

red flower
red flower
manic rune
#

mmm

#

after like

#

an hour of reading through love graphics, i think im ready

red flower
#

for what

manic rune
#

progress bar

#

:3

quartz ravine
#

Hey guys, when you make your own legendary card, will it automatically spawn via the soul card?

How do other people normally handle legendary cards that are added via a mod?

I was debating on whether just making it be rare because it is quite powerful

red flower
#

the answer to the first question is yes

red flower
#

shes breaking

manic rune
#

from what im seeing

#

i think i need to run this through Update

tall wharf
#

my baguette

manic rune
#

since it just immediately clears when i render the bar

#

hm

#

well surely it cant affect performance that much

quartz ravine
#

I’m getting close to releasing my mod, and now I’m getting the dreaded end of project slump

red flower
#

i run jokerdisplay in update it's ok

tall wharf
#

😭😭😭😭

manic rune
#

ooops

#

o o op s

rose dragon
manic rune
#

i mightve

#

fucked up the game horribly

#

like, straight up split the game in half

#

thats certainly something

tall wharf
#

it's actually getting annoying

manic rune
#

maybe i should just

#

stick to the uis already provided by balatro instead

#

🥀

#

im scared of accidentally creating multiple dimensions in my balatro

reef belfry
#

Making a series of jokers that use an affection system akin to that of a dating game
Should I
A. Change the values on the joker based on how high/low the affection is
B. Evolve that joker when it reaches max lowest/highest affection
C. Mix both
D. This idea sucks i hate you

manic rune
#

??? 😭

#

its past april fools already

reef belfry
#

Im serious...

manic rune
#

😭

#

probably C

#

would be interesting to see how it would be implemented

red flower
#

i think C is good

manic rune
#

hmm

#

can i use the func provided in an UI's config to change its size?

#

or would i still need to use update

red flower
#

you should be able to change the UI on the fly but you're getting into hard UI territory so idk

manic rune
#

🥀 dang

#

guess im on my own for this one

#

lets see if i come out in one piece

normal crest
#

LGTM!

lilac tapir
#

Not super familiar with modding balatro yet
what's the context to detect a hand level up?
i want to detect all hands leveling up except two pair

manic rune
#

...it actually wasnt that bad

#

i got it working immediately

red flower
manic rune
#

:p

lilac tapir
manic rune
#

it updates whenever ref_value changes, so its pretty nice

red flower
lilac tapir
#

ic

brisk pond
#

Oops! The game crashed:
Syntax error: card.lua:5457: 'end' expected (to close 'function' at line 875) near '<eof>'

Additional Context:
Balatro Version: 1.0.1n-FULL
Modded Version: 1.0.0~BETA-0404a-STEAMODDED
LÖVE Version: 11.5.0
Lovely Version: 0.7.1
Platform: Windows

Stack Traceback

(3) C function 'function: 0x2132cf38'
(4) global C function 'require'
(5) main chunk of file 'main.lua' at line 888
(6) global C function 'require'
(7) LÖVE function at file 'boot.lua:323' (best guess)
Local variables:
c = table: 0x2132a5a8 {identity:false, version:11.5, accelerometerjoystick:true, modules:table: 0x2132a5f8, gammacorrect:false, title:Balatro, externalstorage:false (more...)}
openedconsole = boolean: false
confok = boolean: true
conferr = nil
(8) global C function 'xpcall'
(9) LÖVE function at file 'boot.lua:362' (best guess)
Local variables:
result = boolean: true
(10) global C function 'xpcall'
(11) LÖVE function at file 'boot.lua:377' (best guess)
Local variables:
func = Lua function '(LÖVE Function)' (defined at line 355 of chunk [love "boot.lua"])
inerror = boolean: true
deferErrhand = Lua function '(LÖVE Function)' (defined at line 348 of chunk [love "boot.lua"])
earlyinit = Lua function '(LÖVE Function)' (defined at line 355 of chunk [love "boot.lua"])

modern kindle
manic rune
#

new mechanic my jokers use

brisk pond
manic rune
#

some attacks will build up a BREAK bar on a playing card

manic rune
#

i will try to pr this thing after i polished it lol

#

not sure if its up to smod's standards though

modern kindle
#

i dont even know what id want a progress bar for

#

i think itd be neat to display cards becoming active

manic rune
#

well it would find quite a few niche uses

reef belfry
#

One of them wouldve probably been past me

manic rune
normal crest
#

Or is that the blind's

manic rune
#

yuppp

lucid owl
#

how could i add a consumable type to arcana packs? as in, there's a chance of them showing up like how omen globe works? i tried a patch in the same way omen globe does it and it does nothing

manic rune
#

decided to go an extre mile for break characters

#

else i think they wouldnt be too unique compared to the current characters :p

normal crest
manic rune
#

my current concept for it rn is that currently, some characters have attacks which target cards already, right?

so my idea is: "attacking" a card with a break character will increases its break bar

#

and when it reaches max, do some unique stuff

#
  • debuffs the card for current ante
lucid owl
normal crest
#

Oh, so the card actually breaks

manic rune
#

mhm

normal crest
#

I thought it was the card's progress towards breaking the boss

manic rune
#

nop :p

#

where im going with this is that i want break chars to be more on the strategic side, you would need to figure out what cards you want to break

#

so you wouldnt go straight for your best cards immediately

#

but at the same time, mindlessly using bad cards will cause your deck to be flooded with debuffed cards later on

#

i think it would be fun

lucid owl
normal crest
lucid owl
normal crest
#

Yes, when making patches always look at the lovely dump

#

One to look for what line you want to modify, since steamodded patches may modify it before you

#

Two to see if it actually applied properly

daring fern
#

Propel.

lucid owl
normal crest
#

So what I assume is happening is that your card is immediately being overwritten by a spectral or tarot

lucid owl
#

ohh, that makes sense

#

how could i fix that?

edgy reef
#

So patching the Card:open function will do nothing.

tall wharf
#

should i add spider solitaire next

lucid owl
#

so i should patch the SMODS rework instead?

edgy reef
#

You can hook the create_card function and take ownership.

lucid owl
#

seems like this is where smods changed it

lucid owl
edgy reef
manic rune
#

hmmm

#

should i add an args option to create_progress_bar

lucid owl
#

lol alright, how would one patch an smods file

manic rune
#

that changes the color of the bar if ref_value reaches max?

#

or is it unnecessary :p

daring fern
#

How could I put a badge for each unique seal on a card?

glass scaffold
#

Is there a way to use a texture larger than 71 x 95 for a Joker?

lucid owl
#

lua logic isn't my forte

#

nevermind, i got it!

daring fern
manic rune
#

hmm

#

how do i use detailed_tooltip

#

not sure why this is wrong

gentle rain
#

would having an ipairs within an ipairs like this make the function not work?

manic rune
#

suits['1']?

gentle rain
#

currently trying to make flower pot type effect with suits other than the standard 4

gentle rain
manic rune
#

well

#

v no longer refers to a card

gentle rain
#

hmmm

manic rune
gentle rain
#

i could use a local variable to set the card's base suit before the second i, v

#

wait then i wouldnt even need the second

reef belfry
#

Ehhhhhh

manic rune
#

you know you can just change the "i,v" part right

gentle rain
#

oh you can?

manic rune
#

i,v are just names

gentle rain
#

no clue you could

manic rune
#

you can change it to anything you want

#
for index,value
for _,value
for _,card

etc

manic rune
manic rune
#

i actually dont know why its wrong

#

or i assume the value isnt the same at all?

paper zealot
gentle rain
manic rune
manic rune
#

i tried changing "title" with "name", didnt seem to work either

#

pretty sure its just how i set the value thats wrong now

paper zealot
# manic rune

Oh, detailed_tooltip is suited to cards.

  function create_UIBox_detailed_tooltip(_center)
    local full_UI_table = {
        main = {},
        info = {},
        type = {},
        name = 'done',
        badges = badges or {}
    }
    local desc = generate_card_ui(_center, full_UI_table, nil, _center.set, nil)
    return {n=G.UIT.ROOT, config={align = "cm", colour = G.C.CLEAR}, nodes={
      {n=G.UIT.R, config={align = "cm", colour = lighten(G.C.JOKER_GREY, 0.5), r = 0.1, padding = 0.05, emboss = 0.05}, nodes={
        info_tip_from_rows(desc.info[1], desc.info[1].name),
      }}
    }}
  end

Check generate_card_ui for how it'll be interpreted

manic rune
#

ack

#

the wiki said its similar to tooltip so i thought its set up the same 🥀

paper zealot
#

Try providing detailed_tooltip.set and detailed_tooltip.key to pull it from the localization files

#

It eventually ends up at

full_UI_table.name = localize{type = 'name', set = _c.set, key = _c.key, nodes = full_UI_table.name}
``` where `_c` is `detailed_tooltip`
manic rune
#

ah

#

icic

paper zealot
#

(not sure if SMODS changes all this)

#

Alternatively instead of using detailed_tooltip you can provide an entirely custom UI to h_popup

lucid owl
#

is there an easy way to put a voucher next to existing ones in the collection? (for third levels of vouchers like how cryptid does it)

manic rune
#

i remember set can be nil, but im not sure if thats true

#

:p

reef belfry
#

Theoretically can you make a consumable start a blind that isnt in the actual blind line up of the ante

#

Basically that one cryptid code consumable but instead of a shop its a blind

rapid stag
#

what's a simple and efficient way of incrementing across letters of the alphabet? cirThink

rapid stag
#

if 1 = A, 2 = B, 3 = C and so on,

if var = 'A'
var = var + 1 would be 'B'

tall wharf
#

i have a function for this 😭😭😭😭

rapid stag
#

ooh

crisp coral
#

python ord()

daring fern
rapid stag
#

or if that is just the best way to do that

lucid owl
gentle rain
#

code that was given to me to add a tooltip to a card, which ended up not working

manic rune
#

this is some fucking diabolical starting code template, what

#

???

#

😭

manic rune
ocean niche
#

How do I check if the current blind is a boss blind, im using steamodded

daring fern
manic rune
#
loc_vars = function(self,info_queue,card)
  info_queue[#info_queue + 1] =...
end
gentle rain
#

ah!

#

it was from one of the cardsauce devs

#

and their code is formatted weeeird

#

ty though!

manic rune
#

wait shit

ocean niche
manic rune
#

fucked up the order

#

there :3

ocean niche
gentle rain
reef belfry
#

Oh right i should probably add tooltips to my stuff

gentle rain
#

also its kinda funny to me how localthunk coded flower pot

lilac tapir
#

forwarding this here

daring fern
# lilac tapir

Try update_hand_text({sound = 'button', volume = 0.7, pitch = 1.1, delay = 0}, {mult = 0, chips = 0, handname = '', level = ''})

sturdy compass
#

I was boutta say. The text isn't being updated back to neutral

lilac tapir
#

ye this is the second card im making so i know next to nothing lol

modern kindle
#

i was also gonna say the sme thing something did

#

lmao

old bane
#

so this probably was something unused in vanilla

lilac tapir
#

also i guess the fact its two pair isnt appearing either

old bane
#

but i love it

modern kindle
#

whats meant to be unused

lilac tapir
gentle rain
old bane
gentle rain
modern kindle
#

i cant recall for the life of me though

gentle rain
#

well yeah, it exists in code but not in any actual cards

modern kindle
#

well thats the thing, i couldve sworn i saw it in a card

but its possible i just read the code and imagined it in a dream

ocean niche
gentle rain
paper zealot
rapid stag
#

oooh

ocean niche
gentle rain
# ocean niche where does it need too be

you should be using it somewhere like here, where you establish the context in which an effect triggers. for context, this triggers at the end of the round while a variable is less than another variable

old bane
modern kindle
gentle rain
#

only jokers and green deck affect the cash out screen

gentle rain
tall wharf
#

@manic rune

tall wharf
heavy hare
#

would anyone know why these UIBoxes have the grey-ish border around them?

#
        local uiDef = UIBox{definition=
            {n=G.UIT.ROOT, config={align = "cm"}, nodes={
            {n=G.UIT.O, config={maxh=0.5,minw=2,object = sprite,align = "cm"}
            }}}, config={align="cm"}
        }
        sprite_node = {n=G.UIT.C, config={align = "cm",},nodes={
        {n=G.UIT.O, config={id='tracker_'..type,align = "cm", object=uiDef}
        }}}
#

that's the function that makes each "sprite_node", which is a UIBox

#

ideally i'm trying to make them completely transparent

ocean niche
#

anyone know how too make text slightly float

manic rune
tall wharf
#

it's not even noon yet

manic rune
#

:3

tall wharf
manic rune
gentle rain
ocean niche
vital forge
#

I try to add lovely, steamodded. Then use balatro-mobile-maker to port to ios. Có ai có thể giúp tôi sửa lỗi này không?

manic rune
#

thats a weird looking pc

heavy hare
manic rune
heavy hare
#

it didn't work but i'm still looking on how to change the color

manic rune
#

try adding that in all nodes :3

#

see which one works lol

rapid stag
#

hey, can anyone else confirm whether or not attempting to add to wild card's info_queue has weird and unexpected results?

tall wharf