#💻・modding-dev

1 messages · Page 228 of 1

wintry solar
#

of course

zealous glen
#

I found the implementation casting it to blue a bit weird

latent portal
#

and when the variable is greater i return that

zealous glen
#

Since it should work the same for Brainstorm

#

But Brainstorm uses red IIRC

chrome widget
#

Deep cut reference to our server but changing Jimbo quotes is fun

wintry solar
#

I don't think it matters what the default colour is

chrome widget
#

Also I need to use save states for debugging purposes more often

zealous glen
#

I assume so

wintry solar
#

blueprint compat is purely a UI value

zealous glen
#

That's why I assumed so

chrome widget
#

Oh does blueprint compat not also prevent a blueprint context from being fired?

zealous glen
#

no

#

You have to manually code it

#

Which makes sense for multi-part effects that are partially compatible

wintry solar
#

we should probably make it an actual functional value though

zealous glen
#

@wintry solar by the way do you know what's the correct way to debuff and recalc debuff on cards now?

latent portal
#

would this work?

    create_card = function (self, card, i)
        local epicsigmajimbotable = {
            spawntarot = {
                set = "Tarot",
                weight = 1
            },
            spawnplanet = {
                set = "Planet",
                weight = 1,
            },
            spawnjoker = {
                set = "Joker",
                weight = 1
            }
        }
        local jimbotableweight = 0
        local randomnumber = pseudorandom(pseudoseed("haimynameisJIM"))
        for i = 1, #epicsigmajimbotable do
            if randomnumber > jimbotableweight + i.weight then
                jimbotableweight = jimbotableweight + i.weight
            else
                return SMODS.create_card({
                    set = i.set,
                    area = G.pack_cards
                })
            end
        end
    end,```
wintry solar
#

I do not

unkempt thicket
#

How could i make a new type for ante instead of round.

red flower
latent portal
#

where

red flower
#

all the is

hard flume
#

Is it even possible for Ranks and/or suits to even have unique function?

red flower
#

i.weight and i.set

hard flume
#

Oh cool. How would I go about doing that?

scarlet spire
#

ough it works

hushed field
#

ooh, that's a fun addition. Does every card just have a limited amount of uses?

scarlet spire
#

it doesn't turn the cards you play into garbage, just a random 1-2 cards in your deck whenever a hand is played

simple mural
scarlet spire
#

yeah, you can destroy them with tarots or various jokers

latent portal
#

WELP

#

anyone know why THAT happened

chrome widget
#

Not me adding if context.blueprint then return end to every single joker

red flower
ivory coral
#

hi chat, need some help getting this damned joker to work
im trying to destroy the cards contained within card.ability.extra.die (they are added correctly and stuff, just the destroying is difficult rn) after scoring is done, but this damn context.destroying_card and :start_dissolve are driving me up the wall after trying to wrangle it for ages now, how do i do this correctly?

        if context.before then
            card.ability.extra.count = 0
            card.ability.extra.die = {}
            for k, v in ipairs(context.full_hand) do
                if not table_contains(context.scoring_hand, v) then
                    card.ability.extra.die[#card.ability.extra.die+1] = v
                    card.ability.extra.count = card.ability.extra.count + 1
                end
            end
        elseif context.repetition and context.cardarea == G.play then
            local triggers = card.ability.extra.basetrig*card.ability.extra.count
            return {
                repetitions = triggers,
                message = localize('k_again_ex'),
                card = card
            }
        elseif context.destroying_card and not context.blueprint then
            if table_contains(card.ability.extra.die, context.destroying_card) then
                return { remove = true }
            end
        end
    end```
latent portal
#
create_card = function (self, card, i)
        local epicsigmajimbotable = {
            spawntarot = {
                set = "Tarot",
                weight = 1
            },
            spawnplanet = {
                set = "Planet",
                weight = 1,
            }
        }
        print ("your epic fortnite table has" .. #epicsigmajimbotable .. "entries in it milord")
        local jimbotableweight = 0
        local randomnumber = pseudorandom(pseudoseed("haimynameisJIM"), 0, #epicsigmajimbotable)
        for i = 1, #epicsigmajimbotable do
            if randomnumber > jimbotableweight + epicsigmajimbotable[i].weight then
                jimbotableweight = jimbotableweight + epicsigmajimbotable[i].weight
            else
                return SMODS.create_card({
                    set = epicsigmajimbotable[i].set,
                    area = G.pack_cards
                })
            end
        end
    end,```
#

@red flower here

red flower
#

oh yeah sorry i didnt notice because it's hard to read code on mobile lol
if your table has named entries you need to use pairs()

#

in this case i actually would delete the names from the table, you don't need them

latent portal
#

fair

#

wait but

#

the way i set up my table

#

weight doesnt really do anything

red flower
#

i thought it was a test case

latent portal
#

because the max size of the number is based on table LENGTH and not total table weight

#

well yeah it is a test case but

#

i wanna make sure it works

red flower
#

the problem is that table[i] doesn't exist if the fields are named

unkempt thicket
#

Where are the temporary values for tags reset?

frosty dock
red flower
sturdy compass
ivory coral
#

so i just want to destroy everything in it

wintry solar
#

use context.destroy_card instead

red flower
#

also I think you need to enable the unscored feature for that? is that right?

ivory coral
wintry solar
#

destroying is only on scored cards

zealous glen
#

I thought unscored support had been added

#

just going off short commit messages

wintry solar
#

it has

latent portal
#

hey @red flower it still crashes

ivory coral
red flower
latent portal
#
    create_card = function (self, card, i)
        local epicsigmajimbotable = {
            {
                set = "Tarot",
                weight = 1
            },
            {
                set = "Planet",
                weight = 1,
            },
            {
                set = "Joker",
                weight = 0.3
            }
        }
        print ("your epic fortnite table has " .. #epicsigmajimbotable .. " entries in it milord")
        local totaltableweight = 0
        for i = 1, #epicsigmajimbotable do
            totaltableweight = totaltableweight + epicsigmajimbotable[i].weight
        end
        print ("and it has a total weight of " .. totaltableweight)
        local jimbotableweight = 0
        local randomnumber = pseudorandom(pseudoseed("haimynameisJIM"), 0, #epicsigmajimbotable)
        for i = 1, #epicsigmajimbotable do
            if randomnumber >= jimbotableweight + epicsigmajimbotable[i].weight then
                jimbotableweight = jimbotableweight + epicsigmajimbotable[i].weight
            else
                return SMODS.create_card({
                    set = epicsigmajimbotable[i].set,
                    area = G.pack_cards
                })
            end
        end
    end,
#

it keeps saying that t is nil

#

why is that

ivory coral
#

one more thing though, is there a way to add a message over the destroyed cards while they're being destroyed
do i just add a message inside the return{} next to remove = true?

steady smelt
#

is there a way to add tarots that are rarer than other tarots? replacing a certain percentage of tarots would also work for my purposes for this

#

^ same with spectrals and planets, i assume they'd work the same though

ivory coral
#

im not familiar with that one

red flower
#

yeah if you return a message it's on the joker i think, just return message_card = the destroyed card

latent portal
#

hey N

#

figure anything out?

#

im scratching my head here

red flower
#

nope no idea

#

you need to put the weight sum in the pseudorandom but i dont think its the problem

latent portal
#

yeah i did that but i rolled it back so i could show you

#

WAIT

#

when i hover over i

#

it says its a redefined variable

#

does that mean anything

#

HOLY SHIT

#

I FIXED IT

#

HOLY FUUUUCK

#

I CHANGED I TO V AND IT WORKED

tall apex
#

congrats omg!!! :3

tall apex
latent portal
#

and it crashed again

#

WHY

#

WHY DID IT CRASH

#

?????????

red flower
#

it sensed your happiness

old bane
#

what is ur crash screen btw

latent portal
#

OH

#

im dumb

old bane
#

oh

#

?

latent portal
#

i have to reset the locals back to 0

#

right ?

#

?

#

at the end of the thingy thing

red flower
#

no they're locals they're destroyed after the function ends

latent portal
#

sighhh

old bane
#

i assume you're creating a card somewhere with SMODS.create_card, you need to pass in a table for it to work

latent portal
#

i am

old bane
#

this is how you create the table

red flower
#

oh maybe it never hits the else

old bane
#

yeah cause your else statement is the one that returns the table you need

red flower
#

create_card calls smods.create_card with the result so if you don't return anything it might do smods.create_card(nil)

latent portal
#

but

#

it's saying t is nil

#

oh wait

#

pg

#

pff

#

im dumb

#

the thing that goes in parentheses IS t

#

right?

old bane
#

yes

latent portal
#

but how is that even possible?

red flower
#

no, that part is correct

old bane
#

if ur not returning anything it defaults to nil i think

latent portal
#

so wait

#

hold on

#

let's say

#

i have a table of total weight 3

#

if i generate a random number between 0 and 3

#

then it can never be higher than the total weight of the table

#

so what gives

zealous glen
#

That's not usually how you'd use the weights

unkempt thicket
#

Where are the temporary values for tags reset?

zealous glen
#

Usually you compute the ratio of each item's weight to the total weight

#

Then compute the running sum of weights until it's higher than the generated number

latent portal
#

thats

#

what i did

#

isnt it

zealous glen
#

idk

latent portal
#

.

red flower
#

you did the opposite but it should work too

#

unless you're generating the number wrong

red flower
hard flume
#

How do I go about making it so a rank has a card lose value each time it's played?

latent portal
#

im gonna send my code one more time

#
create_card = function (self, card, i)
        local epicsigmajimbotable = {
            {
                set = "Tarot",
                weight = 1
            },
            {
                set = "Planet",
                weight = 1,
            },
            {
                set = "Joker",
                weight = 0.3
            }
        }
        print ("your epic fortnite table has " .. #epicsigmajimbotable .. " entries in it milord")
        local totaltableweight = 0
        for v in pairs(epicsigmajimbotable) do
            totaltableweight = totaltableweight + epicsigmajimbotable[v].weight
        end
        print ("and it has a total weight of " .. totaltableweight)
        local jimbotableweight = 0
        local randomnumber = pseudorandom(pseudoseed("haimynameisJIM"), 0, totaltableweight)
        for v in pairs(epicsigmajimbotable) do
            if randomnumber >= jimbotableweight + epicsigmajimbotable[v].weight then
                jimbotableweight = jimbotableweight + epicsigmajimbotable[v].weight
            else
                return SMODS.create_card({
                    set = epicsigmajimbotable[v].set,
                    area = G.pack_cards
                })
            end
        end
    end,```
#

is there anything blatantly wrong here

red flower
#

yes

#

use i, v in ipairs(

latent portal
#

oh

#

why

#

what is i doing

red flower
#

because it's an indexed list

#

also even if you're using pairs it gives you a tuple

latent portal
#

oh

#

thats shit

#

thanks

red flower
latent portal
#

why does it say i is a redefined local though

red flower
latent portal
#

.

#

ooooooohhh

#

that

#

actually makes a lot of sense

#

would it be ok if i did for _, v in ipairs since i isnt used

red flower
#

yeah

latent portal
#

i give tf up

red flower
#

did u replace the other for

green mica
#

I have a question about SMODS. You know how when you use create_card it doesn't actually emplace it in the card area and it just ends up like... on the screen and you can just drag it around wherever? Is there like a way to check for a card like that somehow, like does it actually exist in a way that it can be referenced?

latent portal
red flower
latent portal
#
create_card = function (self, card, i)
        local epicsigmajimbotable = {
            {
                set = "Tarot",
                weight = 1
            },
            {
                set = "Planet",
                weight = 1,
            },
            {
                set = "Joker",
                weight = 0.3
            }
        }
        print ("your epic fortnite table has " .. #epicsigmajimbotable .. " entries in it milord")
        local totaltableweight = 0
        for _, v in ipairs(epicsigmajimbotable) do
            totaltableweight = totaltableweight + v.weight
        end
        print ("and it has a total weight of " .. totaltableweight)
        local jimbotableweight = 0
        local randomnumber = pseudorandom(pseudoseed("haimynameisJIM"), 0, totaltableweight)
        for _, v in ipairs(epicsigmajimbotable) do
            if randomnumber >= jimbotableweight + v.weight then
                jimbotableweight = jimbotableweight + v.weight
            else
                return SMODS.create_card({
                    set = v.set,
                    area = G.pack_cards
                })
            end
        end
    end,```
#

WHY doesnt this work

frosty dock
green mica
#

I see!

#

Yeah I know about add_card I'm trying to do something funky

unkempt thicket
#

Where are the temporary values for tags reset?

frosty dock
green mica
#

Yeah, I'm also aware of that, I've decided not to think about that problem just yet lol

frosty dock
#

fair enough haha

latent portal
frosty dock
#

if you're the one creating the free cards, your best bet should be to store the cards somewhere yourself

edgy reef
#

create_card always expect a return value

#

From here it looks like there's a chance the function returns nothing

frosty dock
#

that looks about right

red flower
#

lol

latent portal
#

what cards did you get

#

it worked for me

#

but only once

red flower
#

planets and jokers

latent portal
#

okay so its not a card type issue

red flower
#

you might need a default return

merry raven
#

How would I go about implementing rescoring
Like after when the scoring ends, scoring will commence another time

#

Looked up chats and saw stuff about SMODS.score_card but there are a lot of ways to use it so I'm confused

frosty dock
#

SMODS.calculate_main_scoring is a full scoring loop, you can look at how it's implemented

merry raven
#

Gotcha

#

Damn practically no one used it according to this server's chats

old bane
#

how would i use create_replace_sound so that a sound only replaces the standard balatro bgm once during a specific state of the game every time that state happens

red flower
#

which it probably shouldnt be

zealous glen
#

If you want, say, a 50/50 chance, then the intervals x < 0.5 and 0.5 <= x <= 1 have the same size

#

so you only need to check all but the last option

red flower
latent portal
#

w h a t

zealous glen
#

or maybe the issue is elsewhere XP

red flower
#

it's rounding 2.3 up to 3

latent portal
#

is #list not an integer

#

oh

green mica
latent portal
#

so no decimal weights

green mica
#

hahaha

latent portal
#

got it

green mica
#

awesome

hard flume
#

I might have to ditch the idea I had :(

latent portal
#

okay

#

i got it

#

and THAT

#

WAS THE EASY PART

#

now i have to do the HARD PART

#

which is all the MINIGAME BULLSHIT i wanna do

red flower
#

good luck

old bane
#

how do i have a sound play once, overriding the background music, then have it resume the background music once it's done playing? I wanna have a victory theme but I don't want it to keep looping >_<

hard flume
#

I really don't know how to have my rank change values, so I'm just gonna have it as a solid 9 for now

old bane
#

you can read these messages for why

hard flume
unkempt thicket
red flower
#

i love discards

novel violet
#

waiter waiter, more discards please!

hard flume
#

I'll just do some unique Jokers for my rank instead.

merry raven
# frosty dock SMODS.calculate_main_scoring is a full scoring loop, you can look at how it's im...

I did find something like this across different mods on GitHub

for _, v in ipairs(context.scoring_hand) do
                                SMODS.calculate_main_scoring({cardarea = v, full_hand = G.play.cards, scoring_hand = scoring_hand, scoring_name = text, poker_hands = poker_hands}, v == G.play and scoring_hand or nil)
                            end

Is this one of the proper ways of using it? Still not sure where I should use this since I'm getting the error attempt to call field 'calculate_main_scoring' (a nil value)

wintry swallow
#

i want to make a custom joker but i dont know how to code, is there any tutorial out there?

hard flume
old bane
old bane
#

i feel like we should have a pin for these resources just so people have a good place to get started

hard flume
old bane
#

but i feel like it would be more like an enhancement than anything

#

because if you just do an actual rank I think it'll lose value once and then it'll be like an Ace or a King

hard flume
#

Fair but. It's the Cat Rank. Cats have 9 lives.

old bane
#

true

hard flume
#

It's fine though, I'm not too upset about it.

unkempt thicket
hard flume
#

It's just something that would've been neat

simple mural
#

I tried this joker, if you try to play the same cards with a joker from the start, by 6 ante from one card it will be about $20

old bane
tall apex
#

80k should be balanced

old bane
#

you'd discard your entire deck

tall apex
unkempt thicket
#

Its only when you get a certain tag, then it stops between every action just to add more discards

hard flume
old bane
#

hmm dk

#

maybe it'd be possible to target it through G.playing_cards, since that's your entire deck?

simple mural
old bane
#

-50 billion hands

simple mural
#

And instant loss

kind hedge
#

Working out well

merry raven
#

I really like that The Board joker

kind hedge
latent portal
#

question real quick

#

is there a way to spawn jimbo and make him talk

simple mural
#

I have an idea for someone to implement.
Infinity Balatro.
There are no blinds, instead there is a progress bar for which you get money.
The store is accessible at any time, it is updated every 5 rounds or for money.
The first 5 rounds (According to the number of points for the first 5 blinds) there is no debuff, then every 5 rounds a random debuff as with the boss blind.
The deck is also restored every 5 rounds.

latent portal
simple mural
hard flume
simple mural
#

Gn

red flower
#

the idea sounds fun actually

kind hedge
simple mural
#

And also u can try find mods that work with editions, for study

kind hedge
#

Shall get to work then, thank you

old bane
kind hedge
#

will look into making it check each area

gray quartz
scarlet spire
#

opening and closing the deck is not supposed to add a permanent event to the event queue... right

#

I thought this was an issue with my custom deck but this seems to just, happen?

latent portal
#

okay so

#

looking into it

#

i have discovered the function Card_Character:init

#

which takes 5 args

#

x position, y position, width, height, and "config"

#

there's also Card_Character:move(dt), which makes him move to a specified location

#

Card_Character:add_button, which... adds a button

#

presumably

steady smelt
#

is there a way to find what card would have been generated from create_card while hooking into it?

latent portal
#

not sure

#

you might need to patch it

steady smelt
#

would just running a proxy create_card within the hook and checking the value of that card be the same seed-wise?

#

obviously avoiding loops

#

though, idek if i should try to keep seed rng intact considering it's probably different anyways

tame breach
#

Hey there, pretty much copied what golden card does, but want to destroy the face cards instead of turning them to gold, I tried searching and code-diving but what I attempted to piece together doesn't explain much, how would one even destroy a card?

#

  calculate = function(self, card, context)
    if context.cardarea == G.jokers and context.before and not context.blueprint then
    local faces = {}
    for k, v in ipairs(context.scoring_hand) do
        if v:is_face() then 
            faces[#faces+1] = v
            v:set_ability(G.P_CENTERS.m_gold, nil, true)
            G.E_MANAGER:add_event(Event({
                func = function()
                    v:juice_up()
                    return true
                end
            })) 
        end
    end
    if #faces > 0 then 
        return {
            message = "Harvested!",
            colour = G.C.PURPLE,
            card = card,
            destroying_card = card
        }
    end
  end
end
#

Is there really no simple replacement for

To destroy cards?

red flower
green mica
red flower
#

oh that's cool

steady smelt
#

would create_card(_type, area, legendary, _rarity, skip_materialize, soulable, forced_key, key_append).key get the key of the created card? or is there another way to do that

tame breach
scarlet thorn
#

Havent touched modding in 1-2 months, and when I did, it was with old-calc. Are there any differences with old/new calc apis, and are there any resources available that lists them?

red flower
tame breach
#

Oh! Thank you!

scarlet spire
#

never done a deck with a calculate function, why would this be crashing?

red flower
#

also you might want to save the created card in a local beforehand

steady smelt
#

true

red flower
#

it probably expects a table

tame breach
scarlet spire
#

ah right

red flower
steady smelt
scarlet thorn
steady smelt
#

get the key of a randomly generated card with those input parameters without actually creating the card, basically simulating opening a pack

#

currently it gets the key right but it also creates the card and just puts it on the screen

red flower
#

for what reason?

latent portal
#

FUUCK YEAH

plush cove
#

gomer

latent portal
#

gomer

#

thats not gomer actually

#

i made him to test spawning Jimbo and having him say custom lines

steady smelt
red flower
#

no, i mean why are you trying to get the key

#

there are simpler ways

#

but it depends on what you want to accomplish

steady smelt
#

effectively i want to get the key of every tarot card generated and use it to replace certain tarots with certain other ones

red flower
#

oh so you want to change the tarots in the pool?

steady smelt
#

yeah but with weights and letting me change it with jokers etc, by hooking into create_card

red flower
#

i recommend hooking get_current_pool instead

steady smelt
#

why?

merry raven
#

Do contexts not work when I'm overriding a function

red flower
# steady smelt why?

that does the key thing that you want, it gives you the current pool and you can replace the list

#

you would still need to hook create_card to change the area if you want other sets so tho so maybe it's not much better

steady smelt
#

yeah i don't think that's super useful for what i'm trying to do

#

is there a way to modify a card after its creation rather than before? because hooking into create_card modifies it before it's created

#

and i want the RNG of tarots to stay the same with my stuff applied after the fact

red flower
#

I wouldn't hook create_card, i would patch it

steady smelt
#

ok what does that do and how do i do it

rapid stag
#

still looking for any help on either this or my undiscovered legendary joker description issue

red flower
merry raven
#

Nvm

latent portal
#

hey N

#

quick question

red flower
#

yeah

latent portal
#

how would i go about making something happen whenever a booster pack of a certain type is opened

#

without the help of a joker

red flower
#

hmm hook SMODS.calculate_context?

steady smelt
red flower
#

you would check center here

#

you can change it there and then change the area depending of what you're changing it with

scarlet spire
#

what do I set pools: to in order to remove that card from all pools? just false?

#

I want an enhancement to never show up naturally in booster packs, via spectral cards, etc

red flower
#

you mean in_pool?

tame breach
#

Is there a way to resize jokers in runtime? Like make a joker change scale at the end of an ante/scoring round?
Changing display_size/pixel_size doesn't seem to work

scarlet spire
#

or, yeah that I guess, got mixed up with the enhancements page having a parameter called pool

red flower
#

yeah just make a function that returns false

latent portal
#

hey

#

do you guys know the func that runs whenever the game has to open a booster pack

red flower
#

pasted the wrong one lol

#

this one

steady smelt
#

it doesn't seem to do anything but idk what i did wrong

red flower
#

i think the pattern has to be only one line

steady smelt
#

can it still look for multiple lines? or do i have to do before center = G.P_CENTERS[center]?

red flower
#

i would do the second option
i think you need to use regex for multiple lines but I'm not sure

latent portal
#

question

steady smelt
#

this also does nothing

latent portal
#

which area is the area where booster pack cards are displayed?

#

G.GAME.somethinsomethin_hand.cards, yea?

steady smelt
#

is it not just G.pack_cards?

latent portal
#

im not sure

red flower
steady smelt
#

well it does nothing for me

red flower
#

check the lovely/dump to see if the code is there and check if you have lovely updated

steady smelt
#

i don't know what the first part means and i set this up days ago so i'd be surprised if it wasn't up to date but i also don't know how to check that

red flower
#

inside your mods folder there's a lovely folder

steady smelt
#

it's unchanged there

red flower
#

when you open the game what version of lovely does the console say at the top

steady smelt
#

it says
1.0.1o-FULL
1.0.0~ALPHA-1426c-STEAMODDED

#

oh wait console

#

thought that said screen

#

0.7.1

red flower
#

no yeah that should work

#

hmm are you putting the patch in a lovely.toml?

steady smelt
#

what should i be doing to initialize the patches? again haven't done this before

steady smelt
#

this is the whole thing

red flower
#

is it in the root of your mod's folder?

steady smelt
#

yup

red flower
#

idk then lol

#

literally the same code works for me

#

oh

plush cove
red flower
#

im stupid

steady smelt
#

me too

#

ok now i just have to figure out how to actually add what i want to

#

i can make a global function in my mod then use it in the patch right?

red flower
#

yeah

steady smelt
#

pog ok i got it working this is way easier than mixins

ionic verge
#

quick question which do you think would be harder to obtain
three pairs or a five card straight

manic rune
#

straight

distant grove
#

Hi bepis

manic rune
#

hi peak :D

ionic verge
#

ok cool, thats what i was thinking

#

so whats the pre-prefix thingy for PokerHand keys?
(not the one you set up in your mod the one thats 'j' for jokers and such)

lyric wadi
#

hey chat sorry for like parroting the same thing over and over

lyric wadi
#

but like i cant find anywhere else in this server where someone has given a solution

ionic verge
#

whatcha got?

lyric wadi
#

i know that mult card not multing was a commonish bug cuz i've found a couple of posts reporting it

#

but i don't see any fix

ionic verge
#

uh

#

yeah uh
i dont got anything

lyric wadi
#

i have a joker which changes the suit of the cards in your hand

ionic verge
#

that sounds very esoteric

lyric wadi
#

but any mult card that get converted this way no longer give mult

ionic verge
#

thats
weird

lyric wadi
#

EVEN if you apply the mult enhancement AFTER the suit conversion

ionic verge
#

can you post the code?

#

i may not be able to help but someone else might

lyric wadi
ionic verge
#

yeah i personally dont got anything

#

youre in the right place to ask though so likely someone does got something for ya

red flower
lyric wadi
#

0301a

red flower
#

update

#

that's a bug in that specific version

lyric wadi
#

damn

ionic verge
#

what does the first letter of a key need to be for a poker hand?

#

cus its not h or p

red flower
#

have you tried without one

ionic verge
#

not yet

#

i just presumed that it needed that bc thats what all the other keys need

red flower
#

not always

#

idk about pokerhands specifically tho

lyric wadi
#

how do i update it

#

do i have to manually install from the hub

#

cuz i just used the mod manager to install

red flower
#

yeah probably

ionic verge
steady smelt
#

does in_pool work for tarots? putting in_pool = false doesn't work

or does it have to be a function that just returns false?

red flower
#

a function yes

latent portal
#

hey n

#

do you mind if i ask you for input on something

red flower
#

i was about to go to bed so it depends on how quick that is

latent portal
#

so

#

i tried to do a hook for Card:open

#

and its telling me that self is nil

#

but i dont use self anywhere

plush cove
#

show your code

ionic verge
#

how would i return a three pair in this?

#

(making six card hands)

latent portal
#
local jimbos_special_sauce = Card.open
function Card:open()
    local ret = jimbos_special_sauce()
    if self.ability.kind == "jimbo" then
        G.E_MANAGER:add_event(Event({
            trigger = 'after',
            delay = 2,
            blocking = true,
            func = (function()
                G.E_MANAGER:add_event(Event({
                    trigger = 'before',
                    delay = 4,
                    func = (function()
                        local Jimbo = Card_Character({x = 9.9, y = 2})
                        Jimbo:add_speech_bubble("cherrysmod_shuffle" ..math.random(1, 6), nil, {quip = true})
                        Jimbo:say_stuff(6)
                        return true
                    end)
                }))

            end)
        }))
    end
    return ret
end```
#

oh thats self literally 4 lines in

#

fuck

plush cove
#

change

function Card:open()```
to

Card.open = function(self)```

manic rune
#

good evening everyone

plush cove
#

and then change

jimbos_special_sauce()```
to
```lua
jimbos_special_sauce(self)```
manic rune
#

-# what do you mean by special sauce

plush cove
red flower
#

Card: is just syntax sugar for passing self

#

it works the same with hooks

latent portal
plush cove
latent portal
#

what you told me to

plush cove
#

show it again

latent portal
#
local jimbos_special_sauce = Card.open
Card.open = function(self)
    local ret = jimbos_special_sauce(self)
    if self.ability.kind == "jimbo" then
        G.E_MANAGER:add_event(Event({
            trigger = 'after',
            delay = 2,
            blocking = true,
            func = (function()
                G.E_MANAGER:add_event(Event({
                    trigger = 'before',
                    delay = 4,
                    func = (function()
                        local Jimbo = Card_Character({x = 9.9, y = 2})
                        Jimbo:add_speech_bubble("cherrysmod_shuffle" ..math.random(1, 6), nil, {quip = true})
                        Jimbo:say_stuff(6)
                        return true
                    end)
                }))

            end)
        }))
    end
    return ret
end```
#

oh what

#

wait

#

its working but its not doing none of the shit i told it to

red flower
#

i think you're missing return true in one of the events

latent portal
#

no its because self.ability.kind isnt jimbo

#

for some reason

plush cove
latent portal
#

when i replaced that with 1 == 1 it just froze

red flower
tardy wind
#

Anyone’s got good examples of custom consumeables ? Bonus point for custom sets as well

red flower
turbid maple
#

never kill yourself!!!!!

tardy wind
turbid maple
#

okay now how do I force ui nodes to be stretched out

red flower
#

minw

turbid maple
#

would i set that to the width of the parent node

turbid maple
hard flume
#

I really want to find a way to get Cats to give a gradually decreasing amount of chips cuz I had a banger joker idea but it requires cats to function in a specific way. If I can't get it to work, I might just scrap cats all together

tardy wind
turbid maple
#

yes

tardy wind
#

what does it allow to do over loc_text and normal localization

turbid maple
#

localize is the function found in balatros'd deepest guts that actually handles variables and sometimes sets up UI nodes because why not

latent portal
#

also whats the hand zone that the game uses when ur selecting a card from a pack

red flower
#

G.pack_cards

#

or do you mean like the tarot hand area

latent portal
#

yea

#

the little spot where the cards show up

#

and u can select one

red flower
red flower
sturdy compass
#

Nah I thought G.pack_cards was right

red flower
#

that's for the cards in the booster

#

not the playing cards

latent portal
#

no yeah i want the cards in the booster

sturdy compass
#

lol

latent portal
#

the part where the planet cards show up when you open them for example

#

i want that

red flower
#

yeah G.pack_cards lol

latent portal
#

well um

#

thats not

#

working

lucid owl
#

i'm trying to make a joker with a very specific sprite size (i didn't do the art), what am i doing wrong? (it should theoretically look square, like how photograph does)

red flower
#

G.pack_cards.cards?

sturdy compass
latent portal
#

im trying to flip the pack cards over

#

and then shuffle them

latent portal
sturdy compass
#

Whaat's your code

latent portal
#

discord nitro is restricting me.

#

ill post it in halves

#
local jimbos_special_sauce = Card.open
Card.open = function(self)
    local ret = jimbos_special_sauce(self)
    if self.config.center.kind == "jimbo" then
        G.E_MANAGER:add_event(Event({
            trigger = 'before',
            delay = 2,
            blocking = true,
            func = (function()
                G.E_MANAGER:add_event(Event({
                    trigger = 'before',
                    delay = 0.1,
                    func = (function()
                        local Jimbo = Card_Character({x = 9.9, y = 2})
                        Jimbo:add_speech_bubble("cherrysmod_shuffle" ..math.random(1, 6), nil, {quip = true})
                        Jimbo:say_stuff(6)
                        return true
                    end)
                }))
                for _, v in pairs(G.pack_cards.cards) do
                    G.E_MANAGER:add_event(Event({ trigger = 'after', delay = 3, func = (function()
                        v:flip()
                        play_sound("card1")
                    return true end)
                    }))
                end```
#
                local pitch = 0.5
                local delay = 1.5
                local extra_loops = 3
                G.E_MANAGER:add_event(Event({
                    trigger = after,
                    delay = 0.7,
                    func = (function()
                        ::jump::
                        if pitch ~= 1 then
                            G.E_MANAGER:add_event(Event({trigger = "before", delay = delay, func = (function()
                                G.pack_cards:shuffle('aajk'); play_sound('cardSlide1', pitch); return true 
                            end)}))
                            pitch = pitch + 0.1
                            delay = delay - 0.1
                            goto jump
                        end
                        ::justsomemore::
                        if extra_loops ~= 0 then
                            G.E_MANAGER:add_event(Event({trigger = "before", delay = delay, func = (function()
                                G.pack_cards:shuffle('aajk'); play_sound('cardSlide1', pitch); return true
                            end)}))
                            extra_loops = extra_loops - 1
                            goto justsomemore
                        end
                        return true end)
                    }))
            return true end)
        }))
    end
end```
turbid maple
#

yippee!!!!

latent portal
#

anything glaringly obviously wrong here?

sturdy compass
#

No not off the top of my head

latent portal
#

okay so

#

it MIGHT

#

MIGHT

#

have something to do with the game trying to process the ipairs statement before the cards actually ENTER G.pack_cards

#

is there a way to delay this whole bit of code somehow?

green mica
latent portal
#

how though

#

how would i go about doing such a thing

red flower
#

i mean literally changing the "trigger" to "after"

#

instead of before

ionic verge
#

shit uhhh wrong reply

ionic verge
latent portal
latent portal
sturdy compass
sullen fern
#

so uh, why is a skin mod crashing someone else’s game when it’s not crashing mine

latent portal
#

Want me to send my code again just in case?

sturdy compass
#

Yeah since you've made your changes I could take a fresh look

sullen fern
latent portal
#
local jimbos_special_sauce = Card.open
Card.open = function(self)
    local ret = jimbos_special_sauce(self)
    if self.config.center.kind == "jimbo" then
        G.E_MANAGER:add_event(Event({
            trigger = 'before',
            delay = 2,
            blocking = true,
            func = (function()
                G.E_MANAGER:add_event(Event({
                    trigger = 'before',
                    delay = 0.1,
                    func = (function()
                        local Jimbo = Card_Character({x = 9.9, y = 2})
                        Jimbo:add_speech_bubble("cherrysmod_shuffle" ..math.random(1, 6), nil, {quip = true})
                        Jimbo:say_stuff(6)
                        return true
                    end)
                }))
                G.E_MANAGER:add_event(Event({
                    trigger = 'after',
                    delay = 1.6,
                    func = (function()
                        for _, v in pairs(G.pack_cards) do
                            G.E_MANAGER:add_event(Event({ trigger = 'after', delay = 3, func = (function()
                                v:flip()
                                play_sound("card1")
                                return true
                            end)
                            }))
                        end
                    return true end)
                }))```
#
                local pitch = 0.5
                local delay = 1.5
                local extra_loops = 3
                G.E_MANAGER:add_event(Event({
                    trigger = after,
                    delay = 0.7,
                    func = (function()
                        ::jump::
                        if pitch ~= 1 then
                            G.E_MANAGER:add_event(Event({trigger = "before", delay = delay, func = (function()
                                G.pack_cards:shuffle('aajk'); play_sound('cardSlide1', pitch); return true 
                            end)}))
                            pitch = pitch + 0.1
                            delay = delay - 0.1
                            goto jump
                        end
                        ::justsomemore::
                        if extra_loops ~= 0 then
                            G.E_MANAGER:add_event(Event({trigger = "before", delay = delay, func = (function()
                                G.pack_cards:shuffle('aajk'); play_sound('cardSlide1', pitch); return true
                            end)}))
                            extra_loops = extra_loops - 1
                            goto justsomemore
                        end
                        return true end)
                    }))
            return true end)
        }))
    end
end```
sturdy compass
#

and what step exactly is it freezing at?

latent portal
#

at the pairs bit

sturdy compass
#

how confusing

#

I'm assuming you've tried doing this with context.opening_booster before the hook?

latent portal
#

not sure how to get context from a function that doesn't use it

lucid owl
latent portal
#

are you suggesting i need to hook INTO context.opening_booster??

lucid owl
#

ignore the fact that they're all giving zero money

sturdy compass
#

Oh right this isn't a joker, hm

latent portal
#

hey

#

what's the full name of context?

#

SMODS.context or something?

sturdy compass
#

I am realizing I will be very unhelpful with this and I apologize in advance lol

latent portal
#

it's ok im unhelpful with a lot of things

sturdy compass
#

gang

turbid maple
#

somewhat approached what i want

latent portal
#

kills you

plush cove
latent portal
turbid maple
#

now I'm digging for source of the white description box because I have no need for that if anyone does please let me know digging through UI code vexes me

latent portal
#

welp

#

im going to bed

#

whoever can make that bit of code work before tomorrow gets 1 dollar from my paypal /srs

tall wharf
#

how do i even

latent portal
#

youre a magician

#

a literal coding magician

#

ive seen what you can do

#

this has got to be child's play

tall wharf
#

my letters stickers are not being scaled if i use card.T.x = card.T.x * scale

solar eagle
#

how do you draw a joker how legendaries are, with two layers?

sturdy compass
#

Kinda. Two different sprites are needed, the base and the "soul" (the part that floats above the base)

solar eagle
#

yeah i have that

#

im just not sure how to indicate it in the joker code

sturdy compass
#

use the "soul_pos" attribute. It takes coordinates just like "pos" and uses the same atlas

solar eagle
#

ooh ok

#

wonder why that isnt on the wiki

#

thank you!

sturdy compass
#

np

steady smelt
sturdy compass
#

Yep!

steady smelt
#

and i assume hologram does the same thing

sturdy compass
#

Indeed it does

steady smelt
#

oh i guess undiscovered consumables do that too right?

sturdy compass
#

Also yep

steady smelt
#

speaking of, how would i go about giving specific consumables a different undiscovered sprite?

#

or would i have to patch that

#

not a new type of consumable, just like a new tarot that i want to have a different undiscovered sprite

tall wharf
#

@sturdy compass do you have any idea why my shit doesn't scale

sturdy compass
tall wharf
sturdy compass
#

wtfart

tall wharf
#

i want to scale properly

sturdy compass
#

I'm so bad at UI stuff so I have no clue 😭

tall wharf
#

using the T.scale fucks up the juice

#

which is why I've been avoiding it

sturdy compass
#

NOT THE JUICE CRY

tall wharf
steady smelt
#

i gotta set up a github sometime

sturdy compass
#

definitely if you're making a mod. Makes hosting releases that much easier

steady smelt
#

yeah i'm still way way prerelease but def gotta sometime

sturdy compass
#

Even for pre-release, it just keeps the code safe in case something catastrophic happens. You just never know

steady smelt
#

true

tardy wind
#

at least use git locally

#

you can have a remote later

#

and history is preserved

chrome widget
#

is card name just under card.name? Or is it part of the config?

steady smelt
plain apex
#

is there an easy way for a joker to check if jokers you have are vanilla?

sturdy compass
gilded narwhal
#

i hate programming

#

i love when a steamodded update forces me to rewrite a bunch of shit

#

sorry

#

i need help

#

so i'm trying to make it so that this joker just gives me a discard at the end of every round

#

like lemme just paste the code

#

okay or not

#

so this code is what handles the discards and hands i get at the end of every round

#

there's this code that adds two to the end of round discards if you didn't discard this round

#

both of those are in the calculate function for the deck

#

here's the code for the drunkard that's supposed to just add 1 to the end of round boss discards

#

but it's really weird

#

because like

#

if no discard on boss: 2 discards from not discarding and 1 discard from drunkard = +3 discards, this works

#

if discard on boss: 1 discard from drunkard = +1 discards, but this doesn't work, it just doesn't do anything

#

so my theory is that the take_ownership stuff being in the apply function for the deck makes it so it doesn't get added to the calculate stuff properly

#

sorry for text wall i just needed to vent some frustration

runic pecan
#

I need reword suggestion.

#

Also, does eternal_compat only affect how they appear in shop, or would it be impossible to apply Eternal on a joker if its eternal_compat is false?

chrome widget
#

Hmm

#

Learning yet more things about lua

#

Im assuming that, by default, a Card's children sprites arent ordered (since they're named keys), so the order in which they're drawn is effectively random based on backend stuff

iron iron
#

im trying to make this card convert all fours into an enhanement (like midas mask)

#

is the code right?

stray warren
#

context.other_card doesn't refer to a card in the scoring hand, because you are in context.cardarea == G.jokers

#

context.other_card is used with context.individual and context.repetition and you are excluding those above

iron iron
#

ohhhh

stray warren
#

I would try if context.cardarea == G.play and context.before and context.individual and not context.blueprint

iron iron
#

thats why it crashed

stray warren
#

also if you use the code I provided, remove the loop over context.scoring_hand

#

and change v:set_ability and v:juice_up to context.other_card:set_ability and context.other_card:juice_up

runic pecan
iron iron
#

didnt see score requirement

#

if i were to be honest this seems a little complex

faint plank
scarlet spire
#

ooh i've been thinking about making some jokers that do that

#

though never looked into how to actually detect when you're on fire

plush cove
#

not counting the score you already have from previous hands

steady smelt
#

can you put custom consumables in the same collection category as, say, tarot cards?

iron iron
#

"if you score more than the blind requirement in one hand" is prob better wording

steep bronze
#

Do you know any practical way to make a new suit?

rough furnace
#

SMODS.Suit

simple mural
#

I have an idea for a hardcore mod of vanilla Balatro.
Each joker loses some of its parameters with each hand played.
Each joker has a chance to be destroyed after a hand is played and it increases with each hand played.
Each played card loses some of its parameters and also always has a chance to be destroyed and it increases with each hand played. vedalUUH

simple mural
#

All you need is a vanilla joker key table and the key of what you're going to check.

plain apex
#

so id need to get the id of like all 150 jokers?

simple mural
#

Usually jokers are from mods of format "j_mod_joker", and vanilla ones are of format "j_joker"

simple mural
#

Or someone has already made such a table

plain apex
#

if someone has that please share i do NOT want to look for all 150 ids just to make 1 joker suggestion lmao

simple mural
#

And you don't even need a table of 150 jokers

simple mural
plain apex
#

not exactly sure how to check for that but i'll certainly try something with that

wintry solar
#

you should be able to check if the joker has joker.config.center.mod iirc

tall wharf
#

why does it do this 😭

prisma loom
#

how to "exclude" certain tags from poll_tag ?

tall wharf
#

if anyone knows what the hell is going on please tell me thank you

halcyon osprey
#

Okay so, I dont really know how to work the blueprint parameters at all

#

first one is for the message to pop under the blueprint when it makes a burger

and the second one is for the burger itself, i want the blueprints to actually score, and say Nom as a message. (the basic blueprint compact stuff does work with things, but for these two cards its a lil buggy. the burger one, the first blueprints scores, and nothing else does and then the burger will say eaten! for the amount of blueprints)

wintry solar
#

dont use calc_effect unless you know what you're doing

halcyon osprey
#

ellaborate?

tepid crow
# halcyon osprey ellaborate?

I think Eremel is trying to say that in 99% of usecases, SMODS.calculate_effect doesn't need to be used and returning a table works?

wintry solar
#

there's absolutely no need to use it here, and that's probably why blueprint is being weird

tepid crow
#

also there are assumptions that your joker will return a table on trigger

#

which might be the thing fucking with blueprint yeah

wintry solar
#

because it doesn't return anything blueprint doesn't think it has done anything

halcyon osprey
#

oh ive been using calc_effect for my message stuff since it seemed more simple from what ive been told 😭

tepid crow
#

in my experience, it's usually the other way around haha

#

you can just

return {
  message = "Burger",
  colour = G.C.DARK_EDITION
}
halcyon osprey
#

oki lemme see how that goes

#

but then the burger itself is a lil weird with blueprint

wintry solar
#

you need to add not context.blueprint to any parts you don't want to be replicated

halcyon osprey
#

so like, how would that look? i was the scoring to be on all, but the text Eaten to just be on the burger, and then Nom for the blueprints (because its funny) but like rn the scoring is messed up where it scores only once with a blueprint and nothing elseincluding the joker itself actually scores

wintry solar
#

well you're setting a flag that it's been scored and not allowing it to be scored more than once

#

your flag is entirely useless here apart from disallowing blueprint behaviours

tall wharf
#

is there not a context.blueprint

wintry solar
#

if you wanted a different message on the blueprints, you could do

if context.after and context.blueprint then
  return { message crap here }
end
if context.after and not context.blueprint then
  return { eaten message crap here}
end```
tall wharf
#

for when you want something to not activate on blueprint you just do not context.blueprint

#

oh it also happens on seals 😭

#

wtfff

zealous glen
#

If the issue is Orbital Tag, Paperback has a fix

foggy carbon
wintry solar
tall wharf
#

i think calling set_sprite might just work

#

was fuckin around with the area and when i press 2 it looks proper

wintry solar
#

it might work too if you apply the letters after you've scaled the cards

tall wharf
#

it actually does work

wintry solar
#

nice

#

you should use the straight card area imo

foggy carbon
#

do you plan to keep the red seals on the cards?

tall wharf
#

straight card area?

#

like type?

halcyon osprey
#

okay so the message in the middle i want it to display the Number, and it cases a crash.

in the past i had it say +1 +1 +1, but i would prefer it to say 1 2 3

wintry solar
#

yeah, it'll be type = joker iirc

tall wharf
#

ah

prisma loom
#

right?

#

it's a niche thing but still

wintry solar
#

poll_tag is a vanilla function right?

tall wharf
halcyon osprey
prisma loom
wintry solar
#

actually I don't think poll_tag is a thing

prisma loom
#

yeah

wintry solar
#

I don't remember what the function is called

#

get_next_tag or something like that iirc

prisma loom
prisma loom
wintry solar
#

why would you ask for help using a function that you've created?

#

I have no idea what these functions do

tall wharf
#

i love null cards

prisma loom
#

And if there's a function for it

#

There's add_tag

#

But can I make it exclude certain tags?

#

Instead of creating a custom table of tags

#

So, I could maintain mod compat with modded tags

halcyon osprey
#

i just want the variable number to be listed 😭

tall wharf
#

oh btw how do i lock cards so that they can't move

#

pinned pins it to the left

#

and it actually reversed my name 😭

red flower
#

pin them in the opposite order?

tall wharf
#

i mean i could yeah

#

i guess I'm patching

steep bronze
frosty dock
#

it needs to be a string

halcyon osprey
#

oooh

zealous glen
prisma loom
zealous glen
prisma loom
zealous glen
strong jacinth
raw geyser
#

Can you reroll a boss blind during it?

strong jacinth
#

Probably

strong jacinth
wintry solar
#

Your tab definition function doesn’t have anything in?

strong jacinth
#

Does it need to have anytihng?

#

I recall N saying it can be empty

wintry solar
#

I don’t see how you could tell it to load something that doesn’t exist

strong jacinth
#

But its the button thats crashing im pretty sure, but what can i put there just for testing

halcyon osprey
#

i went of the DNA code for this, but what my issue is, is that Its copying only one type of card instead of copying each. like if i play a flush of 5, 4, 3, 2 and A. i would get 5 4's

i tried making a variable to count up but it does it only once (hence the 4, instead of 5)

#

how would i make it count up for scored cards?

#

well played cards even

#

well i just made it able to go from 5 to 4, but then it stays 4 because i moved the +1 lmao

tall wharf
strong jacinth
tall wharf
#

yes

#

do not ask me for support however

strong jacinth
#

y

tall wharf
#

because that is my decision

#

just

#

i can help

#

but i do not guarantee support

strong jacinth
#

Ohh, makes sence

#

sense*?

halcyon osprey
#

is there like a G variable for general scoring card position or something?

tall wharf
halcyon osprey
#

lemme try

halcyon osprey
strong jacinth
#

How did you create the cards area

halcyon osprey
#

dna

tall wharf
#

????????

halcyon osprey
#

what im mainly wanting is for it for each individual card to add one to the handplace variable but it seems it only does that once ver full hand

halcyon osprey
manic rune
#

you are my sunshine

tall wharf
#

@manic rune...

manic rune
#

helo

tall wharf
strong jacinth
#

That looks sick

manic rune
#

it looks cool, but is there nothing else going on? :(

strong jacinth
#

Btw how did yoiu craete the card area

#

Aiko, add the smodsgradient

zealous glen
#

@wintry solar what if I want to use Blueprint effect but keep the original message colour?

manic rune
strong jacinth
#

-# What specifically

tall wharf
zealous glen
strong jacinth
#

Both, i have an G.UIT.O node

#

Just wondering how i put a card area

halcyon osprey
#

well i put it back to what it was but then its only doing the handplace + 1 only once

strong jacinth
runic pecan
#

What makes a food joker... a food joker?

halcyon osprey
#

holy shit i got it to work woah!!

#

and it crashed after the first hand lmao

zealous glen
zealous glen
quartz ravine
strong jacinth
runic pecan
tall wharf
#

DEVELOPMENT RESUMES TOMORROW

halcyon osprey
zealous glen
#

Food Jokers expire

#

Cosmos’ Snowman is a Food Joker balatrojoker

quartz ravine
# halcyon osprey

Hey Ocemu, you should add a check like this

if context.other_card and context.other_card:is...

tall wharf
#

YESYEYSEYES

quartz ravine
#

Need to do it in that order too. First be sure that the item you are checking exists before you check it's properties

quartz ravine
runic pecan
quartz ravine
#

aiko yori what though? Reminds me of hana yori dango

zealous glen
quartz ravine
runic pecan
dire palm
#

How can I get two different interactive variables in my Joker description?

rain slate
#

are there any guides for setting up a development environment for Balatro mods?

halcyon osprey
#

Okay i got it fully working now :D

rain slate
#

or like a github repo

halcyon osprey
#

just had to move the context.after outside the context.individual

quartz ravine
#

Or you might say nil null-safety

dire palm
frosty dock
#

it only crashes if you try to use vars without any existing

quartz ravine
#

return { vars = { card.ability.handsTillReady, card.ability.multBounty } }

quartz ravine
frosty dock
#

i do wish there was some kind of optional chaining built into lua

quartz ravine
#

Another joker finished!

frosty dock
rain slate
#

alright I'll check this out

strong jacinth
tall wharf
frosty dock
#

as for dev environment, i recommend having your full mods folder open in vs code or similar so that the LSP has access to definitions from steamodded

frosty dock
tall wharf
#

at least i got the thing working

#

(dont mind multiplayer error)

#

(my uni blocked balala multi)

rain slate
#

oh it's Lua that's interesting

zealous glen
rain slate
#

I thought Balatro would've been made with Unity (just had a feeling) but that makes sense since I've never seen the Unity intro when opening the game

tall wharf
#

😭

#

not all Unity games have that intro

rain slate
#

true

#

but many do

tall wharf
#

you can disable it now i believe

rough basin
#

is there any way to access the cards in the tarot area the same way you can access the jokers?

rain slate
#

ohh I didn't actually know that

#

thought you had to pay

wintry solar
astral girder
#

So I was looking at the texture files, (just recently started modding) wth is the weird looking deck next to plasma?

strong jacinth
#

Any mods that use a simple card area

latent portal
rain slate
#

if you've been at it for 2 days, probably

frosty dock
#

you'd want to iterate G.pack_cards.cards

quartz ravine
#

I felt like Tens weren't getting a lot of love in box, so I decided to think about something...and I love progressive chip growth cards. Then I remembered someone with a connection with 'TEN', Akuma from street fighter

From there it was thinking about how to make it fit an animal theme

strong jacinth
#

Yo aure

#

hru?

frosty dock
#

I'm doing good, ty

strong jacinth
#

Any new stuff you're working on?

frosty dock
#

blind calculation mostly

strong jacinth
#

Sounds fun (Hopefully)

#

Btw is card area documented?

frosty dock
frosty dock
strong jacinth
frosty dock
#

i'm sure it can be added eventually but it's not a priority to document base game code

frosty dock
timid star
#

how do i detect when a player is currently in a blind?

#

for a consumable i mean

strong jacinth
red flower
#

joyousspring 🙂

strong jacinth
#

That are simple

red flower
#

😦

strong jacinth
red flower
strong jacinth
#

This scary math stuff...

frosty dock
#

... what's a simple card area

#

that's just size and positioning

strong jacinth
#

What config does G.UIT.O need

zealous glen
#

Not exactly what’s happening here tho

hardy viper
strong jacinth
#

Would { object = nodes = {} work?

hardy viper
#

no

#

a Node is like a card, cardarea, any moveable, etc

strong jacinth
dire palm
#

So, I know how to add the description of stuff like stone card and such next to my joker description. But how can I add a custom description next to my joker description?

latent portal
zealous glen
frosty dock
#

then you're not in a booster pack

#

it's the area that you select cards from in a booster pack

#

so there's no need for it to exist when one isn't being opened

latent portal
#

well how do i get it to hook properly then

#

do i need to hook a context??

wintry solar
#

wha are you trying to do?

frosty dock
#

something something events inside events? 🤔

latent portal
#

im trying to:

  • detect when a certain type of pack is opened (done)
  • spawn jimbo and have him say a custom quip (done)
  • flip over selectable cards and shuffle them (NOT done)
latent portal
#

i tried events inside events

wintry solar
#

show code

latent portal
#

functions inside events

#
local jimbos_special_sauce = Card.open
Card.open = function(self)
    local ret = jimbos_special_sauce(self)
    if self.config.center.kind == "jimbo" then
        G.E_MANAGER:add_event(Event({
            trigger = 'before',
            delay = 0,
            blocking = true,
            func = (function()
                G.E_MANAGER:add_event(Event({
                    trigger = 'before',
                    delay = 5,
                    func = (function()
                        local Jimbo = Card_Character({x = 9.9, y = 2})
                        Jimbo:add_speech_bubble("cherrysmod_shuffle" ..math.random(1, 6), nil, {quip = true})
                        Jimbo:say_stuff(6)
                        return true
                    end)
                }))
                G.E_MANAGER:add_event(Event({
                    trigger = 'after',
                    delay = 0,
                    func = (function()
                        for _, v in pairs(G.pack_cards.cards) do
                            G.E_MANAGER:add_event(Event({ trigger = 'after', delay = 0.5, func = (function()
                                v:flip()
                                play_sound("card1")
                                return true
                            end)
                            }))
                        end
                    return true end)
                }))```
#
                local pitch = 0.5
                local delay = 1.5
                local extra_loops = 3
                G.E_MANAGER:add_event(Event({
                    trigger = after,
                    delay = 0.7,
                    func = (function()
                        ::jump::
                        if pitch ~= 1 then
                            G.E_MANAGER:add_event(Event({trigger = "before", delay = delay, func = (function()
                                G.pack_cards:shuffle('aajk'); play_sound('cardSlide1', pitch); return true 
                            end)}))
                            pitch = pitch + 0.1
                            delay = delay - 0.1
                            goto jump
                        end
                        ::justsomemore::
                        if extra_loops ~= 0 then
                            G.E_MANAGER:add_event(Event({trigger = "before", delay = delay, func = (function()
                                G.pack_cards:shuffle('aajk'); play_sound('cardSlide1', pitch); return true
                            end)}))
                            extra_loops = extra_loops - 1
                            goto justsomemore
                        end
                        return true end)
                    }))
            return true end)
        }))
    end
    return ret
end```
#

i had to send it in 2 messages because its too long

frosty dock
#

you can send as file but sure

latent portal
#

oh right thats a thing

frosty dock
latent portal
frosty dock
#

maybe having cards debuff everything wasn't a good idea lmao

latent portal
#

aure do you have any idea how to hook calculate.open_booster?

#

it could work

zealous glen
#

Small Blind, Big Blind, Boss Blind, Packs

frosty dock
#

this works with a debuff context that takes advantage of can_calculate

#

I'm removing the can_calculate checks from functions called in eval_card as it prevents this kind of thing from working properly

zealous glen
#

can_calculate has an argument to ignore the debuff state

bleak bone
#

joker idea:

starts and stays insanely strong, but has a chance to end the run every time it triggers

frosty dock
#

it calls can_calculate itself (conditionally with ignoring debuffs now), but the functions it calls were calling it again

bleak bone
#

recursive calling which would cause the game to lock up

frosty dock
#

which is not needed and just prevents debuffed cards from being calculated when they should, so I'm removing those checks

zealous glen
rapid stag
#

still looking for help with either this UI issue or my undiscovered custom legendary joker description issue cirBlech

zealous glen
#

The point is that if a card becomes debuffed or is destroyed mid scoring

#

It stops being considered afterwards

#

The boolean value to ignore the debuff state should allow effects that can change it to proc

#

Unless the card for example has been destroyed

tall wharf
#

😭

rapid stag
#

is there a difference between creating a custom joker via SMODS.Joker**()** and SMODS.Joker**{}**? cirDerp

tall wharf
#

no?

rapid stag
#

ok, making sure that that wasn't the culprit for my description issue

zealous glen
#

Lua handles foo{…} as foo({…})

rapid stag
#

i see

frosty dock
#

the point is I'm passing a flag to ignore debuffs by context, and not all of these functions receive context

zealous glen
dire palm
#

How do I make a custom tooltip for my Joker?

zealous glen
#

As I said, if there’s a sequence of different effects applying, can_calculate should be used before trying to apply. Outside of Events, I think this should be handled automatically