#💻・modding-dev

1 messages · Page 187 of 1

zealous glen
#

Yes

solar eagle
#

You can't, stone cards have no rank

foggy carbon
#

Stone cards explicitly say they have no rank or suit. Not that they have a rank of 0. It's the same reason five stone cards isn't a Flush

solar eagle
#

they exist outside of a rank

zealous glen
#

It's for flavor: an alchemist mixing different ingredients

#

to make a brew

wintry solar
#

makes sense

zealous glen
tepid crow
#

@solar eagle @foggy carbon
It contains 2 cards that have a rank

solar eagle
foggy carbon
#

but that rank is the same

tepid crow
#

Ergo, 2 ranks

tepid crow
#

Joker never said they have to be different

solar eagle
#

I read it as saying so

#

you can also just add "different"

foggy carbon
#

^

zealous glen
# tepid crow Ergo, 2 ranks

As I said, I think most people would interpret it as the ranks needing to be different (as in, the set of ranks) and this is evidence my prediction is correct ;P

solar eagle
#

2 different ranks and 2 different suits

tepid crow
#

Yeah, and I'm saying the effect would be clearer if it said "different"

solar eagle
#

that way it's extra clear

zealous glen
wintry solar
#

I read it as different, just wasnt sure whether a card could provide for both suits and ranks as you selected 5 cards 🤣

grim remnant
#

how could we make it so the game randomly selects a seal (either in vanilla or any added in mods) for use in a command like this, replacing "Red"?

                trigger = "after",
                delay = 0.1,
                func = function()
                    if highlighted then
                        highlighted:set_seal("Red") --placeholder for right now, will replace it with call for random seal soon
                    end
                    return true
                end,
            }))```
zealous glen
#

I think if people interpret otherwise they're being a bit unreasonable

tepid crow
#

Vanilla text uses the word "single" or "matching" for poker hand descriptions (if the fandom is to be believed)

zealous glen
solar eagle
#

same or different rank, same suit (implied different?)

tepid crow
#

Well the fandom isnt a copy paste then

#

But yeah, uses the word "same"

normal crest
#

Yeah if you wanted to be as explicit as possible you'd either say "different" or "unique" on your joker

#

but writing descriptions is really hard

#

and making them fit nicely is also hard

wintry solar
#

I think those descriptions encourage the use of different

solar eagle
tepid crow
#

My point was just that there's room for confusion, even though you should know the answer if you think about it for a couple of seconds

grim remnant
#

well, we inserted that wrong... ;P
highlighted:set_seal(SMODS.poll_seal( guaranteed = true) ) --placeholder for right now, will replace it with call for random seal soon

zealous glen
solar eagle
#

speaking of which, should this be uncommon or rare? and does the description make sense

zealous glen
#

also different ranks, hence two (or more) ranks

solar eagle
#

this is justified better

normal crest
#

for every $3 gained is a bit vague

solar eagle
#

yeah i wasnt sure how to phrase it well

#

"every $3 gained from the sale"?

normal crest
#

i was thinking of something along the lines of "for every $3 of sell value it had"

#

but that's a bit long

solar eagle
#

that will be easier

zealous glen
#

I think it's fine

#

I'd remove "Joker"

solar eagle
#

TRUE

normal crest
#

yeah if you remove joker you can fit what I said

chrome widget
zealous glen
#

I still think it's fine with just "gained"

normal crest
#

it's vague tho, $3 gained when, yeah it's clear to us it's from selling the egg, but it could cause confusion

solar eagle
#

now i just gotta justify the text

orchid thunder
#

How can I make card count as all ranks for joker effects

tepid crow
normal crest
tepid crow
#

Are you close to the char limit?

tepid crow
normal crest
#

is there any other joker that mentions sell value

solar eagle
#

i dont think so

normal crest
#

oh dagger

#

yeah that one is not colored lol

spring lantern
#

and swash

normal crest
#

swashbuckler and dagger have it not colored

solar eagle
#

thank you localthunk

normal crest
#

egg and gift card do

solar eagle
#

consistency my beloved

normal crest
#

I vote for it to be colored

solar eagle
#

I think with dagger it highlights double instead

tepid crow
#

I mean you should just emphasize the words that are important, not what has been emphasized by other jokers

zealous glen
spring lantern
#

i guess it has to do with whether or not it's the main mechanic?

solar eagle
#

Yea

zealous glen
#

But I don't even think 3 is very relevant because 2

spring lantern
#

so like swash and dagger are +mult, gift card and egg are just money makers

solar eagle
#

Ill leave it unhighlighted since the $3 is the more important bit

solid surge
#

how do i make a joker that functions off of hands and discards (like mystic with the +15 mult for no discards, or dusk for retriggering all cards on last hand)

wintry solar
#

gift card does as well

solar eagle
grim remnant
zealous glen
#

Not without toil and a lot of work

orchid thunder
zealous glen
#

and it wouldn't be compatible with most things

zealous glen
wintry solar
tepid crow
orchid thunder
#

Can I make it count as every rank for everything but pokerhands?

zealous glen
#

This idea. Now they're Face cards and have all suits

solar eagle
#

this is much more visually pleasing

#

im not sure if this should be uncommon or rare

orchid thunder
solar eagle
#

same for this

orchid thunder
#

Well time to throw that idea out

#

IL go tell the bad news

zealous glen
wintry solar
#

I think I'd swap those rarities

zealous glen
#

Formatting, clarity, brevity, consistency, etc. all go into wording with different weights

#

The current wording scores highly in all, and I think adding "different" detracts more from the other scores than it adds to clarity

orchid thunder
#

Could I possibly make cards cycle though all ranks when scoring

sonic cedar
#

can someone explain how the Sound thing works? the code i have doesn’t seem to play any sounds at all

zealous glen
#

It depends what you mean by that

foggy carbon
#

apparently, even if you are replacing only one suit, you still need to include the entire deck image. It's working now

zealous glen
#

Did you use the Deck Skin Template?

foggy carbon
#

I used the vanilla game's assets, then edited the image, and copied the lua from another deck skin mod

zealous glen
#

which mod

wintry solar
sonic cedar
tepid crow
foggy carbon
zealous glen
wintry solar
#

yeah you're using the automatic message which already has a sound

#

if you want a custom sound you need a custom message

sonic cedar
#

ohhhhhh
thanks eremel

chrome widget
#

I seem to have managed to get an approximate screen position by doing this?

local scale = G.TILESCALE * G.TILESIZE * G.CANV_SCALE
local x_pos = ((center.VT.x + center.VT.w / 2) + (center.VT.w * center.VT.scale / 2)) * scale
local y_pos = ((center.VT.y + center.VT.h / 2) + (center.VT.h * center.VT.scale / 2)) * scale
local start_pos = {
    x = x_pos,
    y = y_pos,
}```
which is something vaguely close to the transformations the game applies to sprites before drawing them to scale them with the other aspect stuff
grim remnant
#

question! is there an SMODS.poll_seal(args) equivalent for editions?

wintry solar
#

yes and no

#

it's poll_edition() but doesn't have a table because it just uses the base game function

zealous glen
orchid thunder
#

The fact that all ranks is not possible is shit

tepid crow
#

Well it is possible

zealous glen
#

Well you're welcome to code it in and make a PR

tepid crow
#

Just a pain, and mod incompatibility is high

orchid thunder
#

With compatability

grim remnant
wintry solar
#

well 2 problems

#
  1. you need the arguments for the function
#
  1. you're using it in set seal
tepid crow
#

You're... Setting an edition by using set seal?

grim remnant
#

Ah

#

we see the typo we have created, WHOOPS

normal crest
#

how difficult would it be to make it replace the sound of the default message if specified

grim remnant
#

okay, not like that, clearly.
highlighted:set_edition(poll_edition{guaranteed = true})

normal crest
#

Or are you representing all 4 of you

grim remnant
tepid crow
#

I had the same question actually

wintry solar
normal crest
#

it takes 5 different arguments

orchid thunder
#

What does suit do that rank cant?

tepid crow
#

is_suit

#

as opposed to get_rank

solar eagle
#

is there a way to check if cards can currently be highlighted/selected?

#

cause i know this can happen either during a blind

#

or when opening a tarot/spectral pack

normal crest
#

I see that it has a field called "under_overlay" so maybe it's that

#

but no idea

solar eagle
#

actually i think i can test something

#

you can check for #G.hand.cards

#

if its >0, you can select cards in your hand

sturdy compass
#

Heyo, I'm probably gonna start the process of breaking up my horribly large main.lua into smaller files for maintainability, but I have no clue where to start with that. Anyone have any pointers?

grim remnant
#

looking at poll_edition and its calls in vanilla, we're honestly wondering if it'd be easier to like. Make a custom function, at this point. what we want is like "take every edition in the game, and select one at random with even odds for each. argument for "do you want negative included in this".

solar eagle
#

then you make a folder src in ur main mod folder and dump lua files there

wintry solar
#

why would you recreate a function that already exists @grim remnant

solar eagle
#

Found it in a mod and it works

normal crest
#

which could potentially cause issues depending on how you structured it

solar eagle
#

Yea

zealous glen
#

joker_name is just so the messages I'm printing display a "name" instead of a key

solar eagle
#

I havent run into any though

normal crest
#

and will show items in different order for other people if they have a different order

#

in the collection I mean

orchid thunder
#

I'm guessing you can't return multiple values

solar eagle
#

my system is to have one lua file for each type of object

#

that way order is always the same

normal crest
#

that will work but your file will get really big, which if it's fine with you go ahead

sonic cedar
sturdy compass
#

I wanna go even further and make a file for each object (as opposed to object type) so not sure how that would work out for me

normal crest
wintry solar
sonic cedar
#

i see i see

grim remnant
red flower
normal crest
unkempt thicket
#

G.GAME.dollars is considered a table now, so how would i do this if G.GAME.dollars > number then ?

wintry solar
#

I wouldn't recommend it though

grim remnant
#

wait, is there already a SMODS.poll_edition, or are we misinterpreting?? that... wasn't on the doc.

frosty dock
wintry solar
#

no

#

it's just poll_edition

#

like I told you

grim remnant
#

ah

solar eagle
#

it's lovely patched i assume

frosty dock
#

if you don't care for that, you only need to to_big the number

normal crest
wintry solar
#

it's just completely rewritten because the game already had a poll function for editions, it didn't for enhancements and seals which is why they're SMODS.poll_...

wintry solar
#

you have removed your chips and mult values now though

#

you need to add them back in with chip_mod and mult_mod

sonic cedar
#

because its a custom message right

wintry solar
#

yeah

sonic cedar
#

nice

grim remnant
#

guess that makes sense. only question is what exactly do we set the "key" of poll_edition to. we assume mods, no_neg, guaranteed is true, false, true, right?

normal crest
#

set it to nil i'd assume

orchid thunder
#

I almost just asked a stupid question

normal crest
#

nil or false

#

same thing

wintry solar
#

it's documented here

normal crest
#

actually, I misunderstood, the key is your randomization seed

sturdy compass
orchid thunder
#

Returning a value stops the function correct

normal crest
#

yes

sturdy compass
#

got it

orchid thunder
#

Damn

normal crest
#

I was replying to SMG

sturdy compass
#

oh lmao

orchid thunder
#

Trying to find a workaround to all ranks

normal crest
#

what are you trying to do?

orchid thunder
#

Have a card be all ranks

#

I was thinking returning all rank values

#

But you can't do that

normal crest
#

that will be really difficult because usually cards ingame check for :get_id which returns a single number

orchid thunder
#

Yeah

#

And returning a table can't happen because obvious resons

normal crest
#

you'd need a lot of patching to accomplish that

orchid thunder
#

I'll and I'm trying to think how

#

Ihave to somehow turn all numbers into all numbers

hushed field
normal crest
#

Oh yes crash reports are really useful if each object is a different file

sturdy compass
#

yep, that's exactly why I'm doing this lol

normal crest
#

are you having trouble with it?

sturdy compass
#

7k+ LOC has gotten horrendous to debug

#

nearly 8k lol

sand roost
#

Is there a way to just summon one specific vanilla joker with a modded one

a la "on activate, create Joker"

normal crest
hushed field
#

Part of what I really like about it is that it makes it quite easy to set up WIP jokers and keep them separate, and easily load them in and out

#

It does make me wonder if the order value each joker has is just entirely arbitrary

normal crest
grim remnant
#

more-or-less functional, but the odds aren't all even yet. how best to go about that?
highlighted:set_edition(poll_edition(nil, nil, true, true))

orchid thunder
normal crest
#

Ideally SMODS would do that tbh

red flower
#

make your mod popular enough so that people want to add compat, that's how talisman does it

orchid thunder
#

Better Calc 2.0 adding that as the function making everyone change it

normal crest
#

Yeah that'd be ideal imo

#

Steamodded is still in alpha so the API is subject to change

sonic cedar
zealous glen
#

@orchid thunder People were discussing multi ranks in the Github again today

#

I have mentioned it before, but I think it's worth releasing an incomplete version of the feature

#

Because I think the main setback is computing Straights efficiently

#

I suspect it's a kind of cursed problem

wintry solar
#

changing how ranks are acquired would break almost every mod

#

oh is_rank wouldn't actaully

#

nvm

normal crest
#

would it tho? you wouldn't get rid of get_id

zealous glen
normal crest
#

I can see how straight calculation can be a problem tho

grim remnant
#

for poll_edition(options_), how can we make it so it just. sets every weight it grabbed to be equal? SMODS.Edition's doc is a bit unclear in this regard.

normal crest
#

poll_edition automatically weighs each edition

pulsar flower
#

if there's a list of all editions available through smods you could probably just pseudorandom_element it

normal crest
#

SMODS.Editions I'd assume

pulsar flower
#

don't think so

normal crest
wintry solar
#

not from me

zealous glen
#

@frosty dock the people yearn for multi ranks

wintry solar
#

SMODS.Editions should also work fyi

normal crest
#

it's nil

zealous glen
#

I recommend polling Editions with the built-in

normal crest
#

they want to make everything an equal chance

wintry solar
#

oh right, editions don't use a buffer like everything else

zealous glen
normal crest
#

Why not

frosty dock
normal crest
#

If it's what they want

pulsar flower
#

is there a way to reliably trigger a certain effect when a card changes enhancement with quantum enhancements enabled? it seems like it triggers at times when it shouldn't (probably bc of how quantum enhancements work internally?)

zealous glen
grim remnant
zealous glen
#

So not in a pool and/or with 0 weight

normal crest
#

It's also up to the mod's developer whether to take that into account if they want IMO

zealous glen
frosty dock
wintry solar
#

making editions have a get_current_pool function is something I have planned to do for a while

zealous glen
#

I think if a modder made an Edition with a weight of 0, that is never in any pool, there's a reason

#

AKA me with Disenhancements and auxiliary Jokers

normal crest
#

you could also argue that, for example, you can make a really good joker that can give those exclusive editions regardless

zealous glen
#

They're exclusive because the game crashes otherwise

#

for example

#

In my case, Disenhancements are Enhancements with negative effects, so getting one is a downside

#

and auxiliary Jokers only exist to make other effects work, so having them around might do nothing at best or crash at worst

#

-# well, maybe they could end up working if the implementation is sufficiently robust, but they're not expected to

grim remnant
#

uh, can we at least get an answer for how to automatically weight everything to 1 for rn and figure out cross-mod edge-cases later?

normal crest
#

if your edition can crash when being set from an unexpected context then that's another issue

zealous glen
#

if another mod violates them, that's on the other mod

wintry solar
#

or applied to certain types of cards

grim remnant
#

we feel like trying to figure out cross-mod edge cases of "oh, do NOT use this mod's specific edition, that crashes things" is kinda losing the forest for the trees. we just want this to stop giving so many foils. ^^;

frosty dock
wintry solar
#

if you blanket apply random editions irrespective of how the designer of them made them, the crashes are on you

zealous glen
normal crest
#

Fair enough

frosty dock
#
  1. idk but I won't be the one to implement it without figuring out straights first
normal crest
zealous glen
#

Actually, I had this for Enhancements

#
local function select_random_enhancement_by_weight(func, key, default)
    local function func_(v)
        return true
    end
    local func__ = func or func_

    local available_enhancements = get_current_pool("Enhanced")
    local options_ = {}
    for k, v in ipairs(available_enhancements) do
        if func__(v) then
            options_[#options_ + 1] = v
        end
    end
    if not #options_ or #options_ == 0 then
        options_[1] = default or 'm_bonus'
    end

    return SMODS.poll_enhancement {
        key = key,
        guaranteed = true,
        options = options_
    }
end
#

IIRC you could ask for it to ignore weights

#

but I'm building the pool manually

unkempt thicket
grim remnant
zealous glen
frosty dock
normal crest
#

SMODS doesn't have poll_edition

edgy reef
grim remnant
#

have already tried SMODS.poll_edition and it doesn't exist. at least not yet but that is so wildly out of my jurisdiction

edgy reef
#

Cause it's poll_edition, an override of a vanilla function

zealous glen
#

It's on the wiki

wintry solar
#

even if SMODS.poll_edition did exist it would just be a wrapper for poll_edition

#

which is probably worht doing for consistency's sake

zealous glen
zealous glen
zealous glen
#

Maybe they don't have an Edition pool, so just do the latter

normal crest
#

i didn't return it there but you get the point

zealous glen
zealous glen
grim remnant
#

we mean, the goal is to include modded ones too if they exist.

zealous glen
#

The example in the wiki handles them

normal crest
#

They do not want them to be weighed!

zealous glen
normal crest
#

The wiki says doing that just includes them and respects weights

wintry solar
#

there is literally an example in the wiki of them being balanced

zealous glen
zealous glen
normal crest
#

Oh I see :P

#

My bad

wintry solar
#

you just add a table of options with custom weights ezpz

#

-# you can actually do it in any of the poll functions

normal crest
#

But that still wouldn't do what they want no?

zealous glen
grim remnant
#

we mean, is there a way to include modded editions in that automatically, too?

normal crest
#

They want modded editions to be included

wintry solar
#

they just need to build the options table

normal crest
#

So loop through G.P_CENTER_POOLS.Edition

#

and cehck if their weight is > 0 or if they have an in_pool function

#

and exclude e_base

wintry solar
#

it'd be weight > 0 or tagged as in_shop

zealous glen
#

since apparently neither get_current_pool('Editions') nor SMODS.Editions would help

#

unless I'm wrong about the former

wintry solar
#

editions don't have a pool return

#

it'd be G.P_CENTER_POOLS.Edition

#

like srock said

grim remnant
#

well this is currently doing. Nothing at all.

                trigger = "after",
                delay = 0.1,
                func = function()
                    if highlighted then
                        highlighted:set_edition(poll_edition(pseudorandom('acePentacles'), nil, true, true,
                        {
                            e_foil = 1,
                            e_holo = 1,
                            e_polychrome = 1
                            -- add modded editions somewhere
                        }))
                    end
                    return true
                end,
            }))```
#

we haven't added the for loop for modded editions yet but we mean. the fact that the table seemingly gives nothing at all kinda takes priority here we feel

unkempt thicket
#

I got an error of to big returning as nil, is this right usage?

grim remnant
#

(also probably set the pseudorandom wrong tbf but given it worked just before adding this table idk what to make of that)

red flower
graceful magnet
#

if I wanted to make a Blueprint-like card, where would I want to put this stuff?

candid willow
#

is there a way to make my VSCode detect smods for debugging?

wintry solar
#

that would be because the wiki example isn't actually correct 🙃

#
poll_edition(pseudorandom('acePentacles'), nil, true, true,
                        {
                            {name = 'e_foil', weight = 1,},
                            {name = 'e_holo', weight = 1,},
                            {name = 'e_polychrome', weight = 1,}
                            -- add modded editions somewhere
                        })
zealous glen
grim remnant
#

Oopsi

sand roost
#

tfw making a mod

unkempt thicket
grim remnant
#

for whatever reason it's not giving foils? which. no idea why that is

zealous glen
grim remnant
#

OKAY NO ACTUALLY WE WERE JUST HAVING IMMENSE UNLUCK

red flower
normal crest
#

thanks

grim remnant
#

alright. uh. now how do we for loop through all the modded editions (that aren't weight = 0) so we can insert them into the table with weight = 1.

zealous glen
#

the wiki says how to get the weight IIRC

grim remnant
#

like, for i = 1, #G.P_CENTER_POOLS.Edition do???

#

(this doesn't check for if weight is > 0 but w/e i'm just trying to figure out the syntax. god we hate for loops)

sonic cedar
#

is there a way to link my github-uploaded version of the mod to balatro? or will i have to do what i was doing before? (duplicating the changed mod files and uploading those) asking because it gets tedious, and i wish i could push what i just updated the code to github without having to just copy over the local files (for standpoint context im using github desktop)

normal crest
#

any reason you're not using your mod folder in Mods as your local repo

sonic cedar
#

....because i didnt know i could do that...

#

and im guessing that it'll do exactly that?

normal crest
#

yep

#

you should clone your repo in your mods folder and you're pretty much good to go

ivory coral
#

hey chat, im making a playing card texture pack and the pack itself works fine it seems but specifically when i go to customize cards and select it the game crashes

[SMODS _ "src/utils.lua"]:1071 attempt to index local 'rank' (a nil value)```
Also the code after defining the variables
```SMODS.Atlas{  
    key = atlas_key..'_lc',
    px = 71,
    py = 95,
    path = atlas_path,
    prefix_config = {key = false},
}

if atlas_path_hc then
    SMODS.Atlas{  
        key = atlas_key..'_hc',
        px = 71,
        py = 95,
        path = atlas_path_hc,
        prefix_config = {key = false},
    }
end

for _, suit in ipairs(suits) do
    SMODS.DeckSkin{
        key = suit.."_skin",
        suit = suit:gsub("^%l", string.upper),
        ranks = ranks,
        lc_atlas = atlas_key..'_lc',
        hc_atlas = (atlas_path_hc and atlas_key..'_hc') or atlas_key..'_lc',
        loc_txt = {
            ['en-us'] = description
        },
        posStyle = 'deck'
    }
end```
sonic cedar
normal crest
#

first, if you're afraid of breaking something make a backup of your already functional repo somewhere else

sonic cedar
#

done

normal crest
#

since you're using github desktop you can click on file at the top left and select clone repository

#

at the bottom pick the path for it

#

should just be Balatro/Mods

#

and all the stuff before it ofc

sonic cedar
#

the path being the ba-yeah

normal crest
#

and make sure to clone the right repo

#

and that's pretty much it

sonic cedar
#

which would just be the one im editing right

candid willow
solar eagle
candid willow
normal crest
candid willow
#

my bad

sonic cedar
normal crest
#

then you're done after you cloned it into your mods folder

#

now you just work on that local repo

stoic sedge
#

hey real fast is there any code for getting the current ante level, to check and see if a certian ante has been reached for a example.

ivory coral
normal crest
#

what is r

frosty dock
ivory coral
normal crest
#

it's "2", "3" etc

#

for the number ones

frosty dock
#

yeah that is indeed malformed, the numbered ranks just have a string of that number as key

ivory coral
#

ah darn
i copied it over from another mod so i thought that couldnt be it

sonic cedar
normal crest
#

glad to help

grim remnant
#

every single time we've tried to write a for loop has been wrought with friction and this is no exception.

ivory coral
minor furnace
#

so it's entering the conditionals correctly, but the sprite is not being set properly, nor is the extra.suit field being set

        print(card.base.suit)
        if card.ability[self.key] then
            if card.base.suit == "Hearts" then
                card.ability[self.key].extra.suit = "Heart"
                card:set_sprite_pos({x = 3, y = 5})
            elseif card.base.suit == "Clubs" then
                card.childrenability[self.key].extra.suit = "Club"
                card:set_sprite_pos({x = 4, y = 5})
            elseif card.base.suit == "Diamonds" then
                card.ability[self.key].extra.suit = "Diamond"
                card:set_sprite_pos({x = 5, y = 5})
            elseif card.base.suit == "Spades" then
                card.ability[self.key].extra.suit = "Spade"
                card:set_sprite_pos({x = 6, y = 5})
            end
        end
    end```
#

I have a sneaking suspicion I'm using the wrong function

normal crest
zealous glen
frosty dock
normal crest
#

should also check for in_pool

unkempt thicket
normal crest
zealous glen
#

otherwise you could just do get_current_pool

normal crest
#

it's a center isn't it? I thought all centers had it

frosty dock
normal crest
#

well the wiki doesn't mention in_pool

ivory coral
frosty dock
#

in_pool is global to all objects that work with pools

normal crest
#

and poll_edition doesn't even take into account the existence of in_pool

minor furnace
zealous glen
#

How do I include the info box for a Sticker in an info_queue?

normal crest
#

this is how I did it, lol

grim remnant
#

alright, how did it screw up this time

zealous glen
frosty dock
#

yeah maybe i should have thought of allowing sticker objects to be passed directly into info_queue

normal crest
frosty dock
#

that never happened when the other objects got that support

normal crest
#

this is just a function that returns the object to be inserted to info_queue

#

needed cus our stickers apply their config table to the cards

frosty dock
#

i mean it's more or less what we made generate_card_ui do for sticker badges too

#

but really it should be made possible to just pass the sticker in and handle it on the other end

zealous glen
zealous glen
normal crest
#

checking if the sticker has a loc_vars field defined

zealous glen
normal crest
#

then there are no variables to send to the localization, so it's useless

zealous glen
#

so you only need the set and the key

normal crest
#

yeah I guess I should've started with that

#

I assumed you had config in your card that you watned to show

zealous glen
#

none

#

okay the sticker works but not the edition

#

How do I add an Edition to the queue?

normal crest
#

G.P_CENTERS.e_foil should do it

zealous glen
#

oh not ….Edition.…

normal crest
#

No no, that was for the pools

zealous glen
#

wait

#

I did P_CENTER_POOLS

neat plover
#

meet the waterfall

zealous glen
#

Almost there

#

How do I display the Playing Card Negative Edition tooltip

#

instead of the Joker Negative Edition tooltip?

minor furnace
#

I cannot for the life of me figure out what the correct way to set the sprite on the fly is

    key = "omnirank",
    atlas = "New_Enhance",
    pos = {x = 3, y = 5},
    loc_txt={
        name="Omnirank Card",
        text = {
            "Can be used",
            "as any rank",
            "for #1# suit"
        }
    },
    config = {
        extra = {suit = nil}
    },
    replace_base_card = true,
    loc_vars = function(self, info_queue, center)
        if center.ability[self.key] then
            return {vars = {center.ability[self.key].extra.suit}}
        else
            return {vars = {nil}}
        end
    end,
    set_sprites = function(self, card, front)
        print(card.base.suit)
        if card.ability[self.key] then
            print("test")
            if card.base.suit == "Hearts" then
                print("test")
                card.ability[self.key].extra.suit = "Heart"
                card:set_sprite_pos({x = 3, y = 5})
            elseif card.base.suit == "Clubs" then
                card.childrenability[self.key].extra.suit = "Club"
                card:set_sprite_pos({x = 4, y = 5})
            elseif card.base.suit == "Diamonds" then
                card.ability[self.key].extra.suit = "Diamond"
                card:set_sprite_pos({x = 5, y = 5})
            elseif card.base.suit == "Spades" then
                card.ability[self.key].extra.suit = "Spade"
                card:set_sprite_pos({x = 6, y = 5})
            end
        end
    end
}```
#

but clearly this isn't it

zealous glen
#

not sure what you're using self for so it's unclear

zealous glen
normal crest
graceful magnet
#

how do I get the current scored chips and mult?

zealous glen
#

Seems like there should be a better way tho

grim remnant
#

absolutely stuck. yes we looked up for loops. yes we looked up local variables. yes we stared at them really, really hard. no it did not help.

minor furnace
normal crest
orchid thunder
#

I'm still sad I can't do all ranks

#

Without massive incompatibility

zealous glen
#

if you're not gonna do it, at least show interest

zealous glen
#

it's usually something like card.config.center.key

#

I don't remember the specifics

minor furnace
normal crest
#

@minor furnace that [self.key] thing was only for that sticker where you needed to apply config to the card

#

Enhancements apply their config automatically in card.ability

minor furnace
#

ah

unkempt thicket
#

my game crashes when this is called, is there a fix?

unkempt thicket
#

there wasn't any the game closed

zealous glen
rough furnace
#

I'm thinking message should not be a table

normal crest
zealous glen
grim remnant
#

tried moving local editions being defined and got a different, still game-crashing error on using the consumable.

zealous glen
#

Finally, Up Your Sleeve has tooltips

normal crest
#

try (e.weight and e.weight > 0)

foggy carbon
#

does temporary correctly destroy a card that was played?

grim remnant
#

finally, it works more-or-less as intended. thank goodness.

unkempt thicket
red flower
normal crest
#

message should be a string

unkempt thicket
#

the table works in other places, but i'll try

#

still crashes

graceful magnet
#

remove the {}

unkempt thicket
#

oh or did you mean

foggy carbon
#

fun

graceful magnet
#

so I have this, but it's not triggering

wintry solar
graceful magnet
wintry solar
#

yup

rancid charm
#

finished the art for my first custom joker, courier joker 🙂

unkempt thicket
#

yea, it still crashes. I think it's because it's getting the length of an empty table?

graceful magnet
wintry solar
#

oh remove the cardarea check

#

assuming this is a joker?

graceful magnet
#

yes

unkempt thicket
red flower
rough furnace
unkempt thicket
red flower
#

where are you returning that

unkempt thicket
#

calulate fuction in a joker

red flower
#

may i see it?

unkempt thicket
graceful magnet
red flower
#

there might be an invalid character in the string

unkempt thicket
wintry solar
#

What’s the full message?

unkempt thicket
#

so what charaters are invald in these quotes You can’t stop the bridge between our worlds from coming, but it would be fun to watch you try!, At the end of the day, it’s just chaos, chaos, chaos!, You can run, but I’ll still be in your nightmares! (not sure if the last two have any)

wintry solar
#

I would guess at the apostrophe being a funny one

unkempt thicket
#

that would make sense the ones i know that work dont have those

#

wait one of them do, but no comas i'll try comas first

languid bay
#

Trying to use G.localization.descriptions.Mod[id] for my mod metadata but I'm not sure how to go about it, not familiar with how localization stuff works.

unkempt thicket
#

yea, lol. also it was apostrophe

graceful magnet
languid bay
wintry solar
graceful magnet
#

yep okay adding some update_hand_texts worked

foggy carbon
red flower
sturdy compass
sonic cedar
#

added an .ogg file to a folder in my workspace through my file manager, but it's not popping up?

foggy carbon
# red flower

When I played Master Duel she was my pet. And a friend said in response to this, "Edgy anime boy with smol frilly cute girl, checks out"

sonic cedar
rough furnace
#

¯_(ツ)_/¯

#

you sure you got the right folder

sonic cedar
#

i just set it up not long ago

#

it's the same one

#

the lua file

#

and then where i am

#

FIXED it it just

#

wasnt updating for some reason

#

so i jsut did it again

#

(like thrice)

obtuse silo
#

so what's the method to destroy cards?

midnight heath
sonic cedar
sonic cedar
midnight heath
wintry solar
sonic cedar
sonic cedar
wintry solar
#

does the sound definitely work

#

like outside of this event

sonic cedar
#

i mean it SHOULD

#

the file wasnt corrupted

wintry solar
#

do eval play_sound('hpfx_gulp') in the debugplus console

sonic cedar
#

ok

sonic cedar
#

about that

wintry solar
#

well that's why it doesnt work 🤣

sonic cedar
#

OK WELL HOLD ON

#

wait does

#

the key have to match the

#

file name

#

cause it doesnt..

wintry solar
#

no

#

it'll add your mod prefix on to that though

sonic cedar
#

ohhhh

#

so i just need to put the path

#

k

minor furnace
#

I've been at it trying to set a sprite for like 5 hours and have not gotten any closer to figuring out how the function is supposed to work

sonic cedar
#

youve gotta be kidding me

wintry solar
#

prefix my friend

#

whatever is in the key of the sound, you need to add your modprefix to it when you call it in your return

sonic cedar
#

ok but the mod prefix is hpfx

#

and so i labeled it hpfx_gulp

wintry solar
#

don't add it yourself

#

just do key = 'gulp'

sonic cedar
#

but that worked fine for the other two

#

like i did it here and these two work

wintry solar
#

huh

sonic cedar
#

wait is it a context thing

#

cause these two are used in scoring

wintry solar
#

no

sonic cedar
#

ourgh

minor furnace
sonic cedar
#

those look cool

minor furnace
#

Thanks! I decided to go very silly with this concept lol

#

essentially, they will be able to act as any rank

sonic cedar
#

wait a second....

#

there's two of you

languid rune
#

Currently working on a twitch integrated mod that uses follow / sub counts to give you Chips and Mult. does ANYONE know of a good / legit Twitch lib for lua? Otherwise I'm gonna have to make a seperate app to feed the values into the mod 😮

sonic cedar
minor furnace
#

about the sprite thing?

#

or the card concept

#

oop

sonic cedar
#

but thats a shot in the dark

minor furnace
# minor furnace about the sprite thing?

this is the real part I need help with. I feel comfortable in my ability to patch the hand function and the effects of the jokers this impacts, it's literally just the sprite that's causing me grief

wintry solar
#

how are you planning on patching the hand function?

minor furnace
#

I was basically going to have it iterate through every possible rank for each of the cards of this type in the hand, and then select the highest resulting hand

wintry solar
#

good luck 🙃

minor furnace
#

conceptually, it's simple. In practice, we'll see how bad it is when I look at the function

#

I imagine looking at how it handles wild cards will give me some sort of insight

wintry solar
#

not really

minor furnace
#

well

#

I'll cross that bridge when I get there, I guess

#

would love to solve the visual issue first though

#

do you know what function I would even use to set the sprite like that?

sonic cedar
obtuse silo
#

huh???

sonic cedar
sturdy compass
#

alr I'm running into this error after installing Talisman and changing my injections to handle it. It definitely has to to with the following patch, but the why is what's getting me, as a very similar (almost identical) check worked just fine before I started trying to handle Talisman

minor furnace
#

instead of editing evaluate_poker_hand() function directly

#

oh wait

#

oh no

#

I think I might need to write a recursive function because I don't know how many of these cards will be in the hand

sonic cedar
#

does anyone know how to item weight so this doesnt happen

or is it just because i debugged her in

sturdy compass
#

It’s cuz u debugged

sonic cedar
#

ok phew

merry raven
#

I'm making a Joker where it will split a played High Card or Pair into equal pairs but with half the ranks
But I do want to destroy the original card before it gets split and I'm not sure where to place the card destruction line, the playCard:start_dissolve() you see there is creating ghost cards

old bane
near elm
#

anyone know if its possible to detect if a specific joker (photograph, for example) is in your joker area

sturdy compass
old bane
#

wait so it's like context.individual and i can just use context.other_card?

sturdy compass
merry raven
#

I do want the animation but I need to fix the ghost cards issue

sturdy compass
#

np

wintry solar
#

I haven’t tested it but I don’t see why it wouldn’t work

normal crest
sonic cedar
orchid thunder
#

what is the scored card tan;e?

#

table*

graceful magnet
#

so the upper if statement works currently, but the bottom one doesn't, what's up with that?

sonic cedar
#

the sfx i mean

merry raven
graceful magnet
weak gate
#

Is there a way to skip the splash screens? Could speed up mod prototyping...

rough furnace
#

if you have DebugPlus pressing (ctrl +) l instantly loads into the game and (ctrl +) b instantly starts a new run

#

also the l keybind can be used for some basic save scumming as it works in a run

weak gate
#

Oh, DebugPlus is kind of a requirement for much modding, too. Thank you for making it!

rough furnace
#

no problem

#

but you can thank thunk for those keybinds

minor furnace
gusty sequoia
#

So I made a joker that retriggers 7s 7 times but it doesn't do the wiggle thing, how would I make it wiggle?

high stag
minor furnace
#

real

#

the only reason I don't want to do it that way is that it'll clutter up the enhancements page

#

and be slightly less convenient to code around

scarlet spire
#

not even entirely sure how I'd implement this in a safe manner, any ideas?

gusty sequoia
minor furnace
#

it's ugly, but it works

                        G.hand.highlighted[i]:set_ability("m_reverse_heart_omnirank")
                    elseif G.hand.highlighted[i].base.suit == "Clubs" then
                        G.hand.highlighted[i]:set_ability("m_reverse_clubs_omnirank")
                    elseif G.hand.highlighted[i].base.suit == "Diamonds" then
                        G.hand.highlighted[i]:set_ability("m_reverse_diamond_omnirank")
                    elseif G.hand.highlighted[i].base.suit == "Spades" then
                        G.hand.highlighted[i]:set_ability("m_reverse_spade_omnirank")
                    end````
rough furnace
scarlet spire
#

I'm mainly worried about it clashing with gaining consumable slots through other means, like vouchers

rough furnace
gloomy rain
#

new to this, my joker won't appear. why?

rough furnace
#

not sure but you might need a rarity set

#

idk what it defaults to

edgy reef
#

common

rough furnace
#

actually the rarity should default to common

#

yeah I was able to get mine in the shop with no rarity set

gloomy rain
#

mb, I accidently said shop

minor furnace
gloomy rain
#

the game doesn't accept it as a mod in the mods tab

sturdy compass
#

Is anyone who's currently in chat confident in their Talisman knowledge?

rough furnace
gloomy rain
#

It just isn't there, only the mods I regularly use show up

rough furnace
#

do you have a header or json metadata?

gloomy rain
#

most of that is inside jokes

rough furnace
#

sanity check theres no space after the --- STEAMODDED HEADER

gloomy rain
#

there wasn't any spaces

rough furnace
#

whats the logs look like?

grim remnant
#

how can we make can_use on a consumable be just. Always. trying to make a hermit/temperance-esque consumable here

gloomy rain
rough furnace
#

yeah or the log file in Mods > lovely > log

gloomy rain
#

booting it just now:INFO - [♥] Lovely 0.7.1
INFO - [♥] Game directory is at "C:\Program Files (x86)\Steam\steamapps\common\Balatro"
INFO - [♥] Writing logs to "C:\Users\phony\AppData\Roaming\Balatro\Mods\lovely\log"
INFO - [♥] Using mod directory at "C:\Users\phony\AppData\Roaming\Balatro\Mods"
INFO - [♥] Found .lovelyignore in 'Multiplayer-beta-0.1.7.9', skipping it.
WARN - [♥] Unknown key patches.47.?.match_indent found in patch file at "C:\Users\phony\AppData\Roaming\Balatro\Mods\smods-old-calc\lovely\fixes.toml", ignoring it
INFO - [♥] Cleaning up dumps directory at "C:\Users\phony\AppData\Roaming\Balatro\Mods\lovely\dump"
INFO - [♥] Initialization complete in 95ms
INFO - [♥] Applied 1 patch to 'conf.lua'
INFO - [♥] Applied 23 patches to 'main.lua'
INFO - [♥] Applied 12 patches to 'engine/controller.lua'
INFO - [♥] Applied 11 patches to 'back.lua'
INFO - [♥] Applied 5 patches to 'tag.lua'
INFO - [♥] Applied 1 patch to 'engine/moveable.lua'
INFO - [♥] Applied 2 patches to 'engine/sprite.lua'
INFO - [♥] Applied 2 patches to 'engine/animatedsprite.lua'
INFO - [♥] Applied 41 patches to 'functions/misc_functions.lua'
INFO - [♥] Applied 29 patches to 'game.lua'
INFO - [♥] Applied 3 patches to 'globals.lua'
INFO - [♥] Applied 3 patches to 'engine/ui.lua'
INFO - [♥] Applied 75 patches to 'functions/UI_definitions.lua'
WARN - [♥] Pattern 'end\n end\n\n }) end\n' on target 'functions/state_events.lua' for pattern patch from smods-old-calc\lovely\back.toml resulted in no matches
INFO - [♥] Applied 58 patches to 'functions/state_events.lua'
WARN - [♥] Regex '(?<indent>[\t ]*)if G\.F_NO_ACHIEVEMENTS then return end\n\n[\s\S]{4}--\|FROM LOCAL SETTINGS FILE' on target 'functions/common_events.lua' for regex patch from smods-old-calc\lovely\achievements.toml resulted in no matches

rough furnace
#

there should be more after that

gloomy rain
#

oh

lucid owl
#

why is this seemingly unreachable?

gloomy rain
lucid owl
#

"test" is never printing

rough furnace
# gloomy rain

INFO - [G] 2025-02-20 23:07:51 :: WARN :: Loader :: Mod file main.lua is missing required header component: author
Your author is malformed

#

needs [] brackets around it

gloomy rain
#

oh

high stag
#

okay so I'm making a deck that destroys a card then adds a card every hand

I cant make it actually delete the card, so I get 53/52 in the deck

how do i get this fixed? I've already tried putting

     return {
          remove = true,
     }
end```

like, everywhere
gloomy rain
lucid owl
rough furnace
#

try printing context

lucid owl
grim remnant
#

we're fairly confident that we set the for loop up right, but we cannot tell where the heck our syntax error is??

gloomy rain
#

Now i am getting the error "Failed to collect file data for Atlas total_Jokers"

`SMODS.Atlas{
key = 'Jokers',
path = 'Jokers.png',
px = 71,
py = 95
}

SMODS.Joker{
key = 'piggy_bank',
loc_txt = {
name = 'Piggy Bank',
text = {
'Earn {C:money}$1{} at end of round',
'for every {C:attention}face{} card',
'that gets destroyed'
}
},
atlas = 'Jokers',
pos = {x = 0, y = 0}
}


------------MOD CODE END----------------------`

rough furnace
limber mist
#

Uhg why th does the createtextinput function count zeros as Os???

#

It's very frustrating to work with

#

Are there any common fixes for this?

lucid owl
rough furnace
#

see what it has for it's values

#

maybe do inspect(context) if it's too big

grim remnant
#

okay, we figured out the for loop (🎉💥🎊), the only issue is uh. The instant cash gain didn't work for whatever reason. how do we give Instant Money?

        calc_dollar_bonus = function(self, card)
            local bonus = card.ability.extra.money
            if bonus > 0 then return bonus
            end
        end
    end```
normal crest
normal crest
#

For example ease_dollars(5) gives $5

limber mist
normal crest
#

calc_dollar_bonus is for money that gets added to the end of round screen

lucid owl
#

can't you also return { dollars = (amount) }?

grim remnant
normal crest
lucid owl
normal crest
#

could be wrong

limber mist
high stag
lucid owl
# rough furnace try printing context

fixed lol - might be my stupidest modding moment. i set the calculate function's params to self, context, card instead of self, card, context... so every single time i tried referencing context it thought i meant this card 😭

gloomy rain
lucid owl
#

god i was so convinced my entire structure had somehow fucked up

gloomy rain
foggy carbon
#

is there a way to detect if the player is using a specific deck skin?

nova finch
#

im trying to make a joker that has a chance to give money if hte first hand is a single stone card and then destroys the card, but the code i have just does nothing. anyone that knows what's going on?

#

oh oops

#

i did G.GAME.probabilities instead of G.GAME.probabilities.normal

normal crest
#

I think it would have crashed if that was the issue

nova finch
#

yeah i just wanted to make sure that was fixed

#

it still doesn't do anything

normal crest
#

I don't think context.before has a context.other_card, ever

#

so that's why it doesn't

nova finch
#

oh ok

normal crest
#

you can access the other card by doing context.full_hand[1]

#

Since you guarantee that there is only one

nova finch
#

thanks

normal crest
#

and I don't think your removing part of the code will run

#

or rather, do anything

#

for destroying cards you want to use the context.destroy_card context

nova finch
#

how do i use that? i tried a couple things with it a bit ago but i didn't understand how to use it

normal crest
#

in context.destroy_card you can return { remove = true } and the card will be destroyed after scoring is finished

#

much like how glass cards break

nova finch
#

oh ok

#

that's easy

normal crest
#

you will want to do smt like if context.destroy_card and context.cardarea == G.play

minor furnace
scarlet spire
#

is there not a context for entering the shop? there is for ending the shop and rerolling the shop

normal crest
#

there isn't

#

sadly

minor furnace
#

oof

scarlet spire
#

why not...

normal crest
#

I can provide you with a lovely patch I made for it if you want

scarlet spire
#

oh that would be nice to have

minor furnace
high stag
#

wouldn't end_of_round do that? or is that before the payout section

scarlet spire
#

that's before payout

high stag
#

dang

scarlet spire
#

I specifically wanna do stuff to the shop items themselves

high stag
#

when do the "free X joker in shop" tags trigger

normal crest
#
[manifest]
version = "1.0.0"
dump_lua = true
priority = 0

# Before any of these values are modified we store them for later use
[[patches]]
[patches.pattern]
target = "game.lua"
pattern = "if not shop_exists then"
position = "before"
match_indent = true
payload = '''
local paperback_load_jokers = G.load_shop_jokers
local paperback_load_vouchers = G.load_shop_vouchers
local paperback_load_boosters = G.load_shop_booster
'''

# After the shop is created, trigger a new context for entering shop, which
# includes information about what items were created
[[patches]]
[patches.pattern]
target = "game.lua"
pattern = "G.CONTROLLER:snap_to({node = G.shop:get_UIE_by_ID('next_round_button')})"
position = "before"
match_indent = true
payload = '''
SMODS.calculate_context({
  paperback = {
    entering_shop = true,
    create_jokers = not paperback_load_jokers,
    create_vouchers = not paperback_load_vouchers,
    create_boosters = not paperback_load_boosters
  }
})
'''

change it however you feel like it, paperback is the mod id and is used a lot to prevent any conflicts

#

the create_x variables mean "was X just spawned in the shop (true) or was it loaded from the save file (false)"

normal crest
high stag
#

rip

foggy carbon
#

should probably create a tooltip for digital roots

minor furnace
#

Zero Escape mention???

scarlet spire
high stag
#

oh god, roots

foggy carbon
normal crest
scarlet spire
#

ah I see

minor furnace
foggy carbon
#

there are 999 spoilers on the cards ||the Queen is the q door, and the 5 card does have an upside-down Kanny behind Junpei||

minor furnace
#

thank you for spoiler tagging I actually have not played the games yet 💀 I do plan to though

foggy carbon
#

I chose clubs because high contrast is a similar blue to the LEDs on the bracelets

minor furnace
#

Now I'm thinking, surely there's gotta be a Danganronpa mod

#

surely

high stag
#

I'm gonna lose it

foggy carbon
#

?

minor furnace
#

buy 52, get 1 free

spice oriole
#

is this the right place to figure out why i can't get the brainstorm mod to work?

foggy carbon
high stag
#

I have the context.destroy_card, I have the remove = true, this is like endlessly rerolling the shop for that 1 Joker you're desperate for

normal crest
#

but what's your issue exactly?

normal crest
#

are you making a custom deck?

spice oriole
#

not toally sure? i have the lovely injector installed, i have the most current version of steam modded, and the brainstorm mod loads. However every time i hit ctl a for the mod too reroll it crashes immediately

#

where would be the right channel for advice?

normal crest
#

could you send a screenshot of the crash?

high stag
# normal crest are you making a custom deck?

yeah 😔 I'm frankensteining the grim/incantation/etc code trying to get it to do something right
It makes the card just fine, it even "destroys" the card from the played hand, it just also leaves a void card in the deck, hence 53/52

normal crest
#

yeah that's the problem with manually destroying cards like that

#

Also you don't have to add a check for the name of your deck

high stag
#

there a function I'm supposed to be running instead?

spice oriole
normal crest
#

in reality all you need to destroy cards is

#
if context.destroy_card then
  return { remove = true } 
end
#

that will destroy every single card

#

that should be your entire calculate function to start with

#

then you can start filtering cards out

normal crest
#

and hope someone else can help you out

spice oriole
#

aight, thank you

minor furnace
#

I really need to get in the habit of looking at the dump files any time I want to write a patch

#

and not the base game files

normal crest
#

i agree

minor furnace
#

you agree that I need to do that?

normal crest
#

yes

minor furnace
#

yeah

vestal ore
#

1v1 boss blind no discards legendaries only

minor furnace
#

I am in luck, it appears that get_poker_hands_info() remains untouched

high stag
vestal ore
#

yea

minor furnace
#

leet final destination is a crazy concept

foggy carbon
#

that's Melee FD specifically, isn't it

minor furnace
#

I think so

#

I've only played Melee like once, I started on Brawl

high stag
#

Melee's the 1v1 no items fox only final destination game

graceful magnet
#

why is it when I try to do the Blue Seal effect, I get this error?

vestal ore
minor furnace
#

Genuinely Ultimate is the best game in the series

normal crest
high stag
#

progress has been made, I have created an infinite loop of nothing but printing checks mikudab

foggy carbon
minor furnace
vestal ore
minor furnace
#

I'm still very happy with the state of the game though

#

and they gave us the funny plant gang so all is right in the world

vestal ore
#

imma pawanha

#

from da amazon

foggy carbon
cunning barn
#

honestly i think ultimate still had a lot of missed potential character-wise

vestal ore
scarlet spire
high stag
cunning barn
#

genuinely newcomers-wise i think ultimate is one of the worst

minor furnace
foggy carbon
cunning barn
#

they fumbled so fucking hard

normal crest
cunning barn
#

90% of the DLC was fucking swords

#

but this is unrelated to current discussion i will step away

vestal ore
scarlet spire
#

ah

normal crest
#

also you should've gotten rid of the paperback thing in the context

minor furnace
cunning barn
#

and was anyone else?

foggy carbon
#

Sora

minor furnace
#

uhhh

cunning barn
#

sora sucked

normal crest
# scarlet spire ah

Pro tip, set v.ability.couponed = true and then call set_cost, they will all be free

minor furnace
#

As much as I love Kingdom Hearts, I do not enjoy playing Sora in Smash

foggy carbon
#

I would've preferred Roxas but recognize Sora was always gonna be first

scarlet spire
high stag
#

still salty about the sora reveal trailer

normal crest
#

(just learned that btw) Lol

cunning barn
#

such a lame predictable final character. pretending to push boundaries while picking the safest character in existence

vestal ore
#

sora should not have been last. if anything it should have been steve and have the order swapped around

minor furnace
#

predictable doesn't necessarily mean bad

cunning barn
#

it is very telling to me that the only playable indie rep in smash is minecraft, which is literally the least indie "indie" game of all time

minor furnace
#

do not get me started on steve 💀

gusty sequoia
#

Is there a better way of making a joker do something every hand other than making it check if played hand contains a high card?

sonic cedar
#

oh my god sora haters CatGuh

minor furnace
#

I'm a Sora defender

gusty sequoia
normal crest
#

but it sounds like what you want is if context.joker_main

minor furnace
#

I was writing a function for my omnirank cards, once upon a time here

gusty sequoia
# sonic cedar wait come again

I made a joker that upgrades/does something every hand by making it do the thing of "if played hand contains a high card" and I wanted to know if that was the only way or if there were better ways

gusty sequoia
normal crest
#

can also do context.before and context.main_eval or replace before with after

#

if you want it to happen before/after the hand is scored

foggy carbon
#

anywho, I'll ask again, if there's a way to detect if the player is using a specific deck skin

normal crest
#

for example, runner in the base game uses context.before (to upgrade)

gusty sequoia
minor furnace
#

but I have to imagine there's a field for it somewhere

gusty sequoia
#

I should probably make it do the buffing itself after it does the giving the mult part tbh

hallow slate
#

How come my code repeats twice?

gusty sequoia
#

The way I balanced it is by making it steal some of your money each time it buffs itself

gusty sequoia
hallow slate
#
        if context.individual and context.cardarea == G.play and context.other_card.seal then
            if pseudoseed('rgmc_chickenpox') > (G.GAME.probabilities.normal * card.ability.extra.chance) / card.ability.extra.denom then
                local temp_hand, finished = {}, false
                for i = 1, #G.hand.cards do temp_hand[#temp_hand + 1] = G.hand.cards[i] end
                pseudoshuffle(temp_hand, pseudoseed('rgmc_chickenpox'))
                for i = 1, #temp_hand do
                    if temp_hand[i] ~= context.other_card and temp_hand[i].seal == nil then
                        temp_hand[i]:set_seal(context.other_card.seal, true, true)
                        G.E_MANAGER:add_event(Event({trigger = 'immediate', func = function()
                            play_sound('tarot2', 0.76, 0.4)
                            temp_hand[i]:juice_up(0.5, 0.7)
                        return true end }))
                        break
                    end
                end
            end
        end
    end```
gusty sequoia
#

That I am not sure I'm qualified to answer tbh

normal crest
#

looks like it's stored there

#

in G.SETTINGS.CUSTOM_DECK

hallow slate
#

It's the joker calculate code that calculates twice for some reason

normal crest
#

and each suit has its own skin

minor furnace
vestal ore
normal crest
normal crest
#

the mod

hallow slate
#

Ohhhh

foggy carbon
#

there we go

faint yacht
#

Am I safe to directly affect card_limit instead of using the :change_size() functions? scholar

scarlet spire
#

well, that can't be good

#

I guess booster packs don't work with :juice_up?

faint yacht
#

...even booster packs sometimes are a card. You just need to point to the right one.

scarlet spire
faint yacht
#

At least, that's what I think. 🍞

foggy carbon
#

which version of Lua is Balatro written in (namely, can I do a % operator?)

plush cove
#

lua 5.1

foggy carbon
#

so barely able to do % lol

scarlet spire
#

% works in my experience

#

odd todd and even steven use it to find if a card is odd/even, and I used similar functionality for one of my own jokers

minor furnace
#

I fear I have cooked (currently untested)

    if next(current_hand["Flush Five"]) then return current_hand
    elseif next(best_hand["Flush Five"]) then return best_hand
    elseif next(current_hand["Flush House"]) then return current_hand
    elseif next(best_hand["Flush House"]) then return best_hand
    elseif next(current_hand["Five of a Kind"]) then return current_hand
    elseif next(best_hand["Five of a Kind"]) then return best_hand
    elseif next(current_hand["Straight Flush"]) then return current_hand
    elseif next(best_hand["Straight Flush"]) then return best_hand
    elseif next(current_hand["Four of a Kind"]) then return current_hand
    elseif next(best_hand["Four of a Kind"]) then return best_hand
    elseif next(current_hand["Full House"]) then return current_hand
    elseif next(best_hand["Full House"]) then return best_hand
    elseif next(current_hand["Flush"]) then return current_hand
    elseif next(best_hand["Flush"]) then return best_hand
    elseif next(current_hand["Straight"]) then return current_hand
    elseif next(best_hand["Straight"]) then return best_hand
    elseif next(current_hand["Three of a Kind"]) then return current_hand
    elseif next(best_hand["Three of a Kind"]) then return best_hand
    elseif next(current_hand["Two Pair"]) then return current_hand
    elseif next(best_hand["Two Pair"]) then return best_hand
    elseif next(current_hand["Pair"]) then return current_hand
    elseif next(best_hand["Pair"]) then return best_hand
    elseif next(current_hand["High Card"]) then return current_hand
    elseif next(best_hand["High Card"]) then return best_hand
    end
end```
normal crest
#

What the Frick

#

Can't you just compare mult and chips

normal crest
#

Also clearly poker hands are sorted already ingame

#

The run info menu has them sorted

#

So you just need to find a way to access that order

scarlet spire
#

i've done worse to get this guy working

normal crest
#

I presume it's comparing base mult and base chips tho

minor furnace
#

there is 100% a better way to do this, but I needed to compare the outputs of two different calls to evaluate_poker_hand()

manic rune
sonic cedar
manic rune
#

it doesnt work like that lol

normal crest
#

Of the hand

scarlet spire
#

black hole is excluded as it's technically a spectral card

normal crest
#

Hands are stored in G.GAME.hands

manic rune
#

basically, if you upgrade a full house, it will upgrade high card, pairs, two pairs, three of a kind i suppose?

foggy carbon
scarlet spire
#

yeah that's about right

foggy carbon
#

sounds like you took the same concept in a different direction

manic rune
#

would it crash if u use a planet card from another mod 😭

scarlet spire
#

no it would just only upgrade high card

minor furnace
#

I needed to compare two of these things against each other

scarlet spire
#

since all hands contain high card

#

but the list is pre-programmed

normal crest
manic rune
#

i see

scarlet spire
#

I just made sure as a fallback to always upgrade high card anyways

foggy carbon
#

how does it handle the triple-hand planets from Cryptid?

scarlet spire
#

absolutely no idea!

#

it could explode

#

or just give massive upgrades

marble flint
normal crest
#

Add skip button to balatro

minor furnace
scarlet spire
#

skip turn (zero benefit)

manic rune
#

at that point, you should probably hard-code so that it will only work for certain planet cards 😭

scarlet spire
#

there's zero way it crashes, it will just always fall back to high card so it retains at least some functionality

sonic cedar
normal crest
#

:P