#đŸ’»ăƒ»modding-dev

1 messages · Page 310 of 1

long sun
#

if you do it last, it's irrelevant

#

but with other Jokers, it can do some crazy things :>

manic rune
#

you cant really make it go in order, sadly

#

lua stuff

long sun
#

random it is, then ^^

limber blaze
#

it's retroactive anyway so adding mult and chips after acts like the rotation only just happened after you added

#

since I got too lazy to make it otherwise

daring fern
manic rune
#

...is a.order a thing?

timid star
#

for the life of me i can't seem to make talisman evals work

manic rune
#

if it is then i think so, yeah

manic rune
timid star
#

sound effects and everything happen but

manic rune
#

ohdamn those

timid star
#

the mult just does not change

daring fern
manic rune
#

ohhhhhhhhhhhhhhhh

timid star
#

what does talisman want from me

manic rune
#

yeah, order definitely works then

runic pecan
#

bump

timid star
manic rune
#

have you tried to see if it works or not

timid star
#

why is returning mult and mult_mod different

#

why is it like this

manic rune
#

mult_mod makes you add your own message

#

mult doesnt

#

in your case, i think u can just use emult

timid star
#

hmph

manic rune
#

actually, one sec

#

i wonder if its emult_message and not just message?

wintry solar
#

It’s just emult = number

#

Nothing else required

manic rune
#

true, but do u use emult_message if u use Emult_mod?

wintry solar
#

No

manic rune
#

a bit curious, since i wonder why they couldnt just use "message" instead

#

huh

#

ok thanks for acknowledging my dumb curiosity :3

wintry solar
#

That’s for overriding specifically the emult message

#

So you could still have multiple return values with custom messages

timid star
#

is my copy of talisman wrong somehow

wintry solar
#

Probably

timid star
#

the mult doesn't get changed at all

#

emult, Emult, Emult_mod all dont work

#

this is frustrating, where can i get the latest copy of talisman

timid star
manic rune
#

weird

wintry solar
timid star
#

yeah

#

it was the talisman build

#

how did that happen

#

might have been that i had an outdated talisman as i updated smods

manic rune
#

have they fixed the "amt > 0" crash yet

timid star
#

hopefully it doesn't break anything else

runic pecan
#

bump

manic rune
#

mmm, what is the effect of the sticker?

wintry solar
#

You could probably use context.remove_playing_cards

runic pecan
long sun
#

hiya! what do i add to this condition to only check for Celestial packs?
if G.shop and G.booster_pack then

hardy ibex
#

which conditions should i use to trigger this effect?

runic pecan
daring fern
long sun
#

booster_pack_meteors completes, so i'll try that :D

cursive sentinel
#

i have a joker that increments each time a certain rank is played within a hand, and procs when X cards of this ranks have been played in the hand, although i cant get to have the feedback happen at the moment it reads the card that incremented it above the threshold, any idea?

daring fern
#

How could one draw a sleeve on a card?

glad osprey
#

what does this mean

limber blaze
glad osprey
#

what

cursive sentinel
#

trigonometry joker i assume?

limber blaze
#

complex numbers

#

it does nothing since the rotations apply retroactively so adding afterwards also rotates that

#

exp mult for example here would be the same as unrotating doing the exp mult then re-rotating

#

xmult is the only one that would actually work non-retroactively here

#

since (1 * 2) rotated is the same as 1 rotated * 2

#

its not immutable btw so the angle can change

timid star
#

math jumpscare

#

you aren't on the real plane anymore

limber blaze
#

because it works retroactively and the angles are the same but in opposite directions it turns out that it fully cancels out

#

and the number is the same as if you didnt have the joker

hardy ibex
timid star
limber blaze
#

yes thats the point

timid star
#

lol

#

makes it seem cool

limber blaze
#

they stack if you have more than 1 btw

shell timber
#

oh yeah, jen stopped using github for almanac because instead of actually using git he manually deleted and reuploaded each asset when he made changes

#

which is interesting

#

oh fuck reply ping i am dead

#

my apologies

limber blaze
#

lol wtf i didnt know that

timid star
#

thinking on how to make a third layer in the card sprite to move differently

#

thought id found a way but it does nothing

limber blaze
#

cryptid has examples of this but i might be able to explain the rough process of it

glad osprey
limber blaze
#

since entropy does a few things related that are manual

#

but you basically just make a second floating_sprite in the cards children and then manually draw it using draw_steps

timid star
#

and just as you say

#

i figured it out

#

i was looking at cryptid code but

#

i was using front instead of a custom other floating sprite

#

thanks for clarifying

#

time to tweak some numbers i dont understand

daring fern
#

How does one trigger effects on playing cards without jokers or consumables or seals or a certain deck present or vouchers redeemed?

timid star
#

a voucher that is claimed for the exact purpose of being an invisible joker

hard needle
#

how do you check if a card has an enhancement. not a specific one. kinda like card.edition

timid star
daring fern
wintry solar
daring fern
hard needle
#
set_blind = function (self)
        for _, card in ipairs(G.deck.cards) do
            print(card)
            if #SMODS.get_enhancements(card) > 0 then 
                card:set_debuff(true)
            end
        end
    end

even with enhanced cards #SMODS.get_enhancements(card) returns 0? not sure what i am doing wrong here

daring fern
hard needle
daring fern
hard needle
# daring fern You could check if `card.ability.set == "Enhanced"`

that seemed to work but it isn't debuffing 😅 its printing "I should be debuffed" though

set_blind = function (self)
        for _, card in ipairs(G.playing_cards) do
            if card.ability.set == 'Enhanced' then 
                print("I should be debuffed")
                card:set_debuff(true)
            end
        end
    end
runic pecan
#

I need advice.
It looks not good enough to me(, like it lacks something), but I'm not sure why/what...

daring fern
daring fern
tired marsh
#

new update of smodded seems to be breaking my card, is there a fix for this?

tired marsh
#

it worked perfectly pre-update but now it won't stop crashing

daring fern
tired marsh
#

i think it was Steamodded (>=1.0.0~ALPHA-1324a)

#

and now it's Steamodded (>=1.0.0~BETA-0404a)

daring fern
#

That version is extremely old.

tired marsh
#

i'm checking what version of balatro multiplayer i have bcuz that'd change which version of smodded i had

tired marsh
versed swan
neat plover
#

quick question, how do i check discarded cards to see if they are a certain rank?

daring fern
neat plover
#

so like the played hand perfect

daring fern
neat plover
#

Rise.

tired marsh
# tired marsh

@daring fern did you notice anything wrong or a way that i could check for joker rarity and blueprint compatibility without going through "config.center"?

broken rivet
#

is there documentation of all the globals in balatro

daring fern
daring fern
tired marsh
#

this joker retriggers common jokers twice, and i'm trying to avoid it retriggering jokers that don't like getting retriggered

daring fern
tired marsh
#

i guess, but generally jokers that don't get blueprinted have effects that would be weird to retrigger

#

like egg

daring fern
tired marsh
#

egg cannot be blueprinted, and retriggering egg makes it's value increase multiple times

#

i know

#

i don't think it's a very pressing issue though -.-

daring fern
tired marsh
#

what would that do

#

🎉

daring fern
tired marsh
#

i've made it exist and it doesn't work

#

also context.retrigger_joker_check inherently needs a joker to work

#

so it wouldn't work if there wasn't a joker there, and i've tried checking context.retrigger_joker_check before everything else and it also crashed so

#

yeah there's just something wrong with config

tired marsh
#

idk when it happened but there's a config folder and mods that don't put things in there just crash when trying to index something from config

#

like neatojokers

tired marsh
#

why does it do that

daring fern
tired marsh
#

extracredit?

#

i downloaded extracredit a few days ago

daring fern
tall apex
#

Valid :3

#

I was in class mb

tired marsh
#

🎉

#

well that sucks

zealous glen
tired marsh
#

thx for trying 2 help

#

u did help but, i rlly wish it'd work w/ extra credit

icy oak
#

how do i define the description of a locked joker

#

i see theres locked_loc_vars but no locked_loc_txt

daring fern
icy oak
#

hm ok

tall apex
#

It could read clearer somehow tho

zealous glen
#

yeah

tall apex
#

I just am autism hungry and must make macaroni and cheese and I have a final due at midnight

tall apex
#

Tyty!

round yacht
#

got this bug in cryptid

#

using a code card to convert a king to light

cyan lagoon
#

hey, i wanna do 'copies ability of 3 last sold common jokers' effect. how can i do that?

cursive sentinel
#

is it possible to upgrade a list of poker hands as the black hole, if so does someone know a mod that does it so i can check it up pls?

daring fern
cursive sentinel
#

yep, it does it indistinctively

#

for k, v in pairs(G.GAME.hands) do
level_up_hand(self, k, true)
end

#

i think of making an array of hand types

daring fern
cursive sentinel
#

but thats all hand types then?

sturdy compass
#

Replace G.GAME.hands with an array of your making

daring fern
cursive sentinel
#

as is would work? okok

shell stirrup
#

(hi, could I scooch in with a quick question about how to balance a joker I’ve made?)

daring fern
cursive sentinel
#

in the array i can just {'poker hand name', etc} or the syntax is more specific?

daring fern
#

Case sensitive I think.

cursive sentinel
#

k will try like that and see

cursive sentinel
#

G.handlist?

#

i havent seen it before, how does it work?

shell stirrup
faint yacht
chrome widget
#

Oh hello acid!!!

shell stirrup
#

oh hi lol

#

I was kicking around ideas to balance Invisible Sun

sturdy compass
chrome widget
#

I suppose you could require that it has two tallies, and that you have to destroy both a king and a jack to get a retrigger

chrome widget
#

So if you've destroyed 4 jacks and 2 kings, you get two retriggers

#

You could also make it start at 0 retriggers as well if you need

shell stirrup
#

that sounds better, though what I’m looking at is how annoying it would be- it does start at 0- to actually destroy enough Dude face cards to get the bonus

cursive sentinel
chrome widget
shell stirrup
#

that’s true

tall wharf
#

chat

chrome widget
#

Arguably you could also make it "Retriggers Queens [n] times if you have no Kings and Jacks in your deck", which has longer startup but has an inherent limit set on it compared to being able to create and then destroy more jacks and kings

tall wharf
#

The Fog
X5 Mult
If not sold within the next 5 minutes, get consumed by the fog and lose the run

chrome widget
#

Destroy eight specific cards in a standard deck to get one of the most powerful deckfixing-aligned abilities available

shell stirrup
#

I think I would prefer it being able to stack to silly heights though

#

just more fun that way

chrome widget
#

That's true

tall wharf
thin anchor
faint yacht
tall wharf
thin anchor
#

the fog

#

is coming

shell stirrup
#

blover

cursive sentinel
thin anchor
cursive sentinel
#

what i aim to do is, each scoring wild card has 1 in X chance to upgrade all flush containing poker hands

#

and my issue is the upgrade of the poker hand type part

shell stirrup
#

I’ll muse on maybe some other downside that could still let IS stack well while still not making it super overpowered

faint yacht
#

You'd want to iterate over the context.poker_hands and call levelling up on each entry in said table/list.

shell stirrup
#

‘yes, you CAN destroy kings and jacks as much as you like and get silly numbers of retriggers.

But.’

cursive sentinel
spark owl
#

oh yee Modders

#

I need assistance once more

#

because god damn it i cant code for SHIT

faint yacht
wintry solar
#

what are you trying to level up?

cursive sentinel
#

i mean, poker hands containing flush

spark owl
#

something is wrong here and i have no idea what is causing it rn

gilded narwhal
#

Hey guys does take_ownership work with other modded things or just vanilla

rugged pier
#
G.C.CSMR_PRESERVERS = HEX('000000')
SMODS.Rarity{
  key = 'preserver',
  badge_colour = G.C.CSMR_PRESERVERS,
  default_weight = 0.75,
  pools = {['Joker'] = true},
}

i have defined this custom rarity but for some reason it always spawns in shop, is there more i need to do to make it so it treats the rarity as an uncommon

chrome widget
wintry solar
spark owl
#

wait

cursive sentinel
#

and straight flush

spark owl
#

hang on

cursive sentinel
#

but yeah

faint yacht
#

Ah, hands containing a flush... oop, then my thing ain't fitting exactly. 😂

sturdy compass
#

could probably just if context.poker_hands['Flush'] then

cursive sentinel
#

Each scoring Wild card, has #1# in #2# chance to upgrade every Flush hand

sturdy compass
#

Ah nvm

wintry solar
#

okay

#

I am assuming you have the identifying bit done?

cursive sentinel
#

yep

spark owl
#

Nevermind i was dumb i forgot THE PREFIX TO THE MOD

#

anyways ty

cursive sentinel
#

the wild cards identifying*

wintry solar
#

so I'd suggest just adding a table of the hand type names to your config.extra and then iterating over it

cursive sentinel
#

i'm kinda new, i don't really know what it means,,, sorry

wintry solar
#

add hands = {'Flush', 'Straight Flush', 'Flush House', 'Flush Five'} in the config property of the joker

cursive sentinel
#

separately from the extra i guess?

#

ah no im stupid

#

you said in extra

wintry solar
#

inside the extra, yeah

cursive sentinel
#

i declare it in the loc vars as well? and how do i refer to it as "level up"? ive never touched poker hands levels before

wintry solar
#

no not in loc vars

wintry solar
cursive sentinel
#
if nb > 0 then
                print(nb)
                for nb, v in ipairs(card.ability.extra.hands) do
                    
                    level_up_hand(card, v, false, 1)
                end
            end```

this works, although is it possible to have one common animation as the black hole does?
#

i saw its code, it's a big brick of feedbacks

#

yeah it crashes when i try to just copy paste the black hole juice, the juice up crash

#

ok fixed te crash

cursive sentinel
#

also it only happens once even with more wild cards despite them being detected and incremented (in nb), but the print of my nb in the if gives me 5 different values, i think imma take a break lol

faint yacht
#

Setting the false to true in that command skips animations and does it quietly.

unborn bay
#

set a lower weight value

rugged pier
cursive sentinel
faint yacht
#
function level_up_hand(card, hand, instant, amount)
cursive sentinel
#

oh so i could put nb in the amount?

faint yacht
#

...as long as nb is not assigned by the for loop.

sturdy monolith
distant gate
#

I'm currently trying to make a joker that gains mult when a playing card is destroyed, and I have this code. This is not working and I don't know why.

open aspen
#

so i get a crash that literally just instantly closes the game

#

where can i find logs

faint yacht
#

mods/lovely/log

open aspen
open aspen
#

there is nothing that seems out of the ordinary 😭

#

ok

#

so i pasted this

#

and i realize im a dumbass

candid sleet
#

trying to make playing five 5s give 5x mult but nothing is happening what do wrong

#

i was basing it off the if aces >= 1 code from superposition

sturdy monolith
#

is there a way to retrigger a jokers add_to_deck function?

scarlet thorn
#

Also you should probably use joker_main not post

candid sleet
#

oh i have to define that ok

#

yeah i just swapped to joker main

scarlet thorn
sturdy monolith
scarlet thorn
candid sleet
rapid stag
#

so i'm achieving this effect in the worst way possible, by just making a sprite as a child of the card and repeatedly updating its position - is there a way i can do this via drawstep?

additionally, is there a way i can do this with better timing? admittedly, i could just make a seal that is hidden from collections and is only cosmetic for this specific purpose, but i would like the sprite to appear over any existing seals the card might have cirDerp

scarlet thorn
sturdy monolith
# sturdy monolith

just to clarify, this is for retriggering what happens when a JOKER is added with its add_to_deck function, not adding a new playing card to the deck

scarlet thorn
candid sleet
#

oh like this?

                            for i = 1, #context.scoring_hand do
                                if context.scoring_hand[i]:get_id() == 14 then aces = aces + 1 end```
#

just with 5s instead

scarlet thorn
#

yes.

scarlet thorn
# sturdy monolith

I cannot find the definition of this function taking 3 variables. What version of SMODS do you have?

sturdy monolith
candid sleet
#

ok yeah that woked thanks waffle

scarlet thorn
#

Mm nvm. Im missing things cause im tired.

sturdy monolith
scarlet thorn
#

add_to_deck is never ran with 3 variables, thats only relevant when making a joker as SMODS gives the third internally. Additioonally, if added_to_deck is true, add_to_deck will not do much.

scarlet thorn
# sturdy monolith

mentioning here. Your intellisense was telling you that you were passing false as the card parameter.

sturdy monolith
scarlet thorn
sturdy monolith
#

fixed it, thanks

#

it works now :D

scarlet thorn
#

Issue with running add_to_hand multiple times, means you would probably need to remove multiple times

#

things like changing hand size will persist x1 after removing from deck

sturdy monolith
scarlet thorn
#

You are running add_to_deck. That is what the function does.

#

If you buy a credit card, it will give you the -20, when you rerun the add_to_deck it will do another -20

sturdy monolith
sturdy monolith
scarlet thorn
sturdy monolith
#

like that is the core purpose of the joker

sturdy monolith
scarlet thorn
#

So you want the effects to still persist after the joker is gone?

sturdy monolith
#

yes

zealous glen
#

@sturdy monolith by the way, modify_ranks(
, 1) seems to work fine for me

sturdy monolith
# sturdy monolith yes

the joker is meant to be infinitely more powerful than even legendaries
hence the insolent rarity

scarlet thorn
sturdy monolith
#

i straight up said that that is the core purpose of the joker

scarlet thorn
#

After 4 messages.

sturdy monolith
scarlet thorn
#

I was explaining a downside, cause you never said anything about the effects persisting. I didnt want you coming back to the joker a few days/weeks later realizing that it was doing more than you wanted

sturdy monolith
zealous glen
scarlet thorn
# sturdy monolith

The reimplementation of Foil and Holo by SMODS uses
context.pre_joker or (context.main_scoring and context.cardarea == G.play)

Polychrome uses post_joker instead of pre. Not sure how this would fix double running by adding a new way to run however.

zealous glen
#

they work differently on Jokers compared to everything else

#

both as Editions but also as other game rules work

scarlet thorn
#

👍

sturdy monolith
#

wait nvm i can't remember shit, i thought it was originally an ace for a second 😭

scarlet thorn
#

Oh?

rapid stag
sturdy monolith
zealous glen
#

and for the second question idk

sturdy monolith
scarlet thorn
#

I feel like I remember something similar happening when I wasnt returning anything

sturdy monolith
scarlet thorn
#

huh

zealous glen
# zealous glen yes

you might not even need a DrawStep but it's probably the robust way to do it

#

if you just add the sprite to the card like this you shouldn't need to manually update its position

#

the important part is setting the draw_major role of the Sprite to the thing it's supposed to be following

peak tiger
#

Is there a way to make a booster pack only have a certain set of jokers in it, like the meme pack from Cryptid?

rapid stag
gilded narwhal
wind remnant
# gilded narwhal did i cook

thought it was just gonna be a way of making plasma deck useless when i read it but thats actually really cool, kinda busted with xmult jokers or glass cards though

zealous glen
#

busted how?

gilded narwhal
#

you go from 4 mult to 22 mult lmao

rapid stag
# zealous glen busted how?

because when you start multiplying, you will always start with a significantly higher number with this joker than without

open aspen
gilded narwhal
#

Correct

open aspen
#

you scale way faster in chips than mult

#

but

#

idk if its busted

#

well acc it kinda is? cause plasma deck 2x blind size

gilded narwhal
#

That also triggers only when scoring is finished

#

This triggers before all of that

#

So this is only REALLY busted if a large portion of your scoring comes from planets

open aspen
gilded narwhal
#

Includes that for sure, but the thing with this joker is that its unaffected by any enhancements or jokers, unlike plasma

open aspen
#

like it is balanced by that fact

#

unlike other jokers ive seen that do plasma balancing

gilded narwhal
#

Oh I didn't think you agreed 😭

#

mb

open aspen
#

the fact you arent held back by plasma deck scaling

rapid stag
#

yeah, definitely feels like a strong rare imo

worldly gull
#

hello ive have a question i am wondering why my modded challenge isnt loading in the game

#

ive looked over my code and it looks like there is nothing wrong

#

but im curious what yall say

zealous glen
#

is the mod itself loaded?

worldly gull
#

yes its in the mod folder

zealous glen
#

is the challenge on a separate file?

worldly gull
#

yes

zealous glen
#

easy things to check: 1) if there's a syntax error preventing the file from compiling;

#
  1. if there's a typo in a key or something
worldly gull
#

so i fix a typo and still nothing

crystal perch
#

trying to set card ability to G.GAME.dollars throws error "attempt to perform arithmetic on a nil value"

#

error occurs at the line card.ability.extra.counterfeit_money = G.GAME.dollars

gilded narwhal
#

common?

shell timber
#

oh that's clever

high sinew
#

did i not define this right?

#

is this how u call booster packs in main

crystal perch
gilded narwhal
#

does the vanilla game not do that?

high sinew
#

heres line 237 in src also

red flower
#

i do it all the time

thin anchor
#

opinions

rapid stag
#

how can i make this include debuffed cards? cirDerp

crystal perch
tall apex
#

question

#

i'm trying to look for a certain edition in hand, am i on the right track or writing bullshit

#

i have some errors x-x

faint yacht
#

m_gold

tall apex
#

m golg?

faint yacht
#

Oh, wait, edition.

tall apex
#

NONO

#

wait no

#

enhancement

#

i mispoke

gilded narwhal
#

Which one of these looks better do you think

tall apex
#

vanilla, none of that cryptid hoo hah

north terrace
faint yacht
#

Editions start with e_, enhancements - m_ iirc.

gilded narwhal
#

Should it keep the The Fool card or have like The Fool Tarot card

#

And if I do have The Fool Tarot should the "Tarot" be purple as well

north terrace
#

actually i got a ui opinion question too

gilded narwhal
north terrace
#

we gaming with this layout?

north terrace
rapid stag
# tall apex i have some errors x-x

you generally want to be using SMODS.get_enhancements(context.othercard) for this - it'll return a table that you'll need to iterate through, but i forget what it is you'll need to check to see if it's a gold card cirLost i think key?

faint yacht
#

if SMODS.has_enhancement(card, "m_gold")?

rapid stag
#

am dumb, misread, etc cirDerp SMODS.has_enhancement(context.other_card, 'm_gold') will work better for your needs

faint yacht
#

has_enhancement uses get_enhancements anyway.

tall apex
#

and context other cards is cards in hand?

#

AH

#

ok so

#

the this

tall apex
#

,,.. red angry lines

tall apex
rapid stag
tall apex
#

wouldn't you just do that but make the returns the same outcome?

faint yacht
#

...never card = self. 🩐

tall apex
faint yacht
#

Base game can safely use it.

#

-# Mods usually cannot.

tall apex
#

ohh.,, icic

#

also question

#

i have the this now reffering to gold cards

#

.., how would i check if there are 3 or more?

#

can you quantify how many of an edition is present in your hand?

faint yacht
#

Enhancement.

tall apex
#

.,,

#

enhancement

#

im gonna be so bad at coding anything to do with editions lmao

faint yacht
#

Set a local variable to 0, then iterate over G.hand.cards with a for i = 1, #G.hand.cards loop and check if the given card has said enhancement, increasing earlier variable by 1.

tall apex
#

thanks a bunch! :3

#

this red line is driving me up a wall

#

WHY RED

faint yacht
#

You didn't close loc_vars with a end,... and your calculate is gone?

tall apex
tender ermine
#

I was thinking of a joker that would retrigger planet cards once for every $10-20 the player has, thoughts on the concept?

rapid stag
#

oooh, a "space program" joker cirPoint

tall apex
#

oh and what's the.,,, g. thingy for adding a hand size?

#

G.handamount or somethin

faint yacht
#

G.hand:change_size(number).

tall apex
faint yacht
#

Lines 1153 - 1176... though this is for checking and doing something if face cards are present at all, you could modify it to look only for m_gold in G.hand.cards cards and do something afterwards.

tall apex
#

ok i think progress is made, but im still def lost in the sauce

#

forgot a then mb

gilded narwhal
#

todays batch of jonklers

#

Nope

#

Jongleur was from yesterday

tall apex
#

need sleep, will work on coding joker tommorowm

#

nini

rugged pier
#

when using context.selling_card how do i check for if the card being sold is that particular joker

high sinew
#

picture in file of error im pretty sure

scarlet thorn
#

I was not scrolled down at all.

#

Thats from 2 hours ago đŸ€Ł whoops

scarlet thorn
high sinew
#

I’ll send hold up

scarlet thorn
# high sinew

Do a for loop on the returned value, and run SMODS.consumable on each table inside that table

high sinew
#

ive used dofile and its worked not sure if right way when setting up as seperate files

scarlet thorn
#

right now you are trying to make 1 malformed consumable

high sinew
#

oh smart in snack_cards

scarlet thorn
high sinew
#

fair i think it does same thing tbh

#

so just smake a look to call all snack cards?

#

i did it for the packs its in so idk if i need in both

#

its consumable_choices in there tho

scarlet thorn
#

What you did for enhancements looks to be the exact right code

#

would just be a copy paste and switch it to consumabels

high sinew
#

yea those worked when i tested last night

#

sounds good ill do it that way.

#

ill luk if its still being jittery i just added a lot into game

#

like this in snack cards?

#

@scarlet thorn

scarlet thorn
#

I mean, yea

plain apex
iron haven
celest aspen
#

Quick question, Im trying to have a joker destroy itself when its probability is met. I have the code that destroys the joker but it just vanishes. I tried adding "juiced_up" to the function but it doesnt work. Here is the code I have. Ignore the 0 instead of pseudorandom, its just for testing:

high sinew
#

crashing on calling of snack pack

scarlet thorn
#

I'm on mobile, so I can't view those files

high sinew
#

oh sorry

#

issue is here

scarlet thorn
#

Ok so

#

Please look at both screenshot you sent

#

Can you see the issue yourself

reef belfry
#

how does one check how many cards are of a certain suit in a played hand are there in a condition

scarlet thorn
scarlet thorn
high sinew
#

idk...

#

do i have to call the specific files?

scarlet thorn
# high sinew idk...

You are smod.booster registering them, returning rhay in a table, and then you are smods.boosyering them again.

pliant totem
#

Is there a way to remove a sticker from a card once it's been applied?

scarlet thorn
high sinew
#

oh i thought u do same with pack as cards

scarlet thorn
#

But you are looping through the table

scarlet thorn
high sinew
#

ok do i need to call the packs a certain way in main?

scarlet thorn
high sinew
#

it still crashes on load

#

with what u said

scarlet thorn
#

Show the last lines of packs file and where you load the file

high sinew
#

just changed back to this

scarlet thorn
#

Looks good. Show main file

high sinew
#

crashing on SMODS.Booster(snack_pack)

scarlet thorn
#

Screenshot of the error

edgy reef
#

SMODS class creators are not plural

high sinew
#

yes they are?

scarlet thorn
high sinew
#

or no

#

oh u do SMOD?

scarlet thorn
rugged pier
scarlet thorn
high sinew
#

oh

#

omg

edgy reef
#

This code is calling SMODS.Boosters and SMODS.Consumables, which does not implement __call and are just tables containing injected objects.

scarlet thorn
#

SMODS is write

scarlet thorn
high sinew
edgy reef
plain apex
scarlet thorn
#

For some reason Jokers doesn't exist either.

edgy reef
#

They're children of SMODS.Center and use that lmao

scarlet thorn
#

That's what I'm thinking of

#

SMODS.Stickers

high sinew
#

its just the way u put it im dumb man

#

sorry been a long day

scarlet thorn
high sinew
#

nah i got it

#

just saying im stupid

#

new error

scarlet thorn
high sinew
#

which part?

#

ill send sc of what u want

scarlet thorn
#

Where you do SMODS.Booster

edgy reef
#

This is on consumables now actually

high sinew
scarlet thorn
#

Ok

scarlet thorn
#

Bottom lines

#

Return

high sinew
#

it had the redundant SMODS.Consumable

#

unlessi keep

scarlet thorn
#

Remove them

high sinew
#

changed back to OG

scarlet thorn
high sinew
#

if thats right

#

ok bet

plain apex
#

if there was a joker that did this (essentially corrupting all animations randomly) but also was like legendary and had a good effect would y'all pick it up?

scarlet thorn
#

That's what naneinf runs look like from the like 3 I've seen

crystal perch
high sinew
#

i think im getting errors now because i have made atlas for Snack cards nad put it would that explain this

crystal perch
scarlet thorn
plain apex
scarlet thorn
#

Someone else would need to help you with thay

#

I've not touched boosters

high sinew
#

Gotcha in terms of how I wrote it or something else

scarlet thorn
high sinew
#

Yea I haven’t touched boosters really either so it’s just been hard to get it up and running

plain apex
#

like just a genuine would anyone pick up a joker if it did this but also had some decent effect

#

i think it would be funny but thats just my oppinon

scarlet thorn
plain apex
#

i'll check

scarlet thorn
crystal perch
#

here's the error and code, only happens when entering a shop with the joker

shut crater
#

I have a joker that creates other jokers, and needs to remember which jokers it has created. All of its functionality works perfectly, but if I exit and reload the run, it causes an error because it now has references to jokers that no longer exist. What is the best way to accomplish what I'm trying to do?

crystal perch
#

im going to make a thread to not clutter chat

scarlet thorn
#

The error is on 485. I need to see 485

crystal perch
#

error assigning g.game.dollars to joker ability

plain apex
#

it appears to stop it from happening on cards and jokers but other stuff is still fair game

scarlet thorn
#

Card.ability.extra.something

shut crater
#

that's what I'm doing, but it isn't working. My theory is that the cards that are loaded in are not the some objects in computer memory, so those references now point at nothing

#

but maybe that isn't how Lua works?

pliant totem
scarlet thorn
pliant totem
#

You know, the first thing I did was check spelling

#

But that only helps if I know how to spell

shut crater
#

the card that is supposed to be stored in the array is instead a string called "MANUAL_REPLACE"

#

it looks like that shows up whenever Balatro tries to save a reference to an Object

scarlet thorn
edgy reef
#

The game cannot save a recursive table nor metatable, if it finds one it's converted to MANUAL_REPLACE

scarlet thorn
#

And on remove, loop through all g.jokers.cards and any with ability.name_debuff true, debuff it

#

No need to save the joker, just save a value on the new one

shut crater
#

the only edge case I'm worried about is if showman allows multiple Liches to be created, then each Lich should only debuff the jokers it created itself

scarlet thorn
#

I think could be used

#

I'm on mobile, so I can't help a whole lot

shut crater
#

no worries, that gives me enough of an idea

#

thank you for your help!

plain apex
plain apex
#

i probably wont do anything with it but it is very funny

scarlet thorn
shut crater
#

I'm not using card.id cause I couldn't find it quickly in the source code but I'm just using a global counter and assigning each lich its own id on creation, giving that id to all created cards, and storing those ids in ability.extra for each so it should all get loaded back automatically

coral flume
#

Hey guys, any clue how I could Upgrade the most played hand by the number of time least played hand was played?

scarlet thorn
#

You would need to save it on the game variable

scarlet thorn
daring fern
scarlet thorn
rapid stag
scarlet thorn
scarlet thorn
rapid stag
#

well, from flipping through them quickly, i can see that the items in G.GAME.hands have a .played var so cirBox

scarlet thorn
rapid stag
#

hmm

shut crater
daring fern
scarlet thorn
plain apex
# plain apex

anyway if any of y'all want this for shitpost reasons heres a joker that will just randomly break animations

SMODS.Joker{
    key = 'test2', 
    config = {
        extra = {
            timer = 0,
        }
    },
    loc_txt = {
        name = 'animation test',
        text = {
            "animation test"
        }
    },
    rarity = 1,
    cost = 5,
    atlas = 'Jokers',
    pos = { x = 0, y = 0 },
    blueprint_compat = true,

    update = function(self, card)
        local extra = card.ability.extra

        local fps = 0.1      -- corruption speed higher number is faster lower number is more extreme but slower

        local current_time = G.TIMERS.REAL


        extra.timer = (extra.timer or 0) + G.TIMERS.REAL

        if extra.timer >= (1 / fps) then
            extra.timer = 0
            G.TIMERS.REAL = 0
        end
    end
}
shut crater
#

just like

#

first try

#

that's not how coding is supposed to work lol

scarlet thorn
#

So cool

shut crater
#

thanks for the help!

scarlet thorn
coral flume
shut crater
#

and telescope

scarlet thorn
#

It could still just be a loop

shut crater
#

but the code is there somewhere for reference

scarlet thorn
#

Exactly

coral flume
scarlet thorn
#

This was brought up already

daring fern
rapid stag
#

how do i do the joker pulsing animation ala DNA, trading card, invis, etc.

coral flume
scarlet thorn
#

Or yea juice up until

coral flume
daring fern
scarlet thorn
#

@daring fern I've 100% seen that while code somewhere

shut crater
#

is there a correct way to hook into the card.hover function to provide functionality for a specific joker?

#

do I just have to do the normal hook thing?

shut crater
#

and check if it's my joker

scarlet thorn
#

Like how lucky cat has the lucky card text?

scarlet thorn
#

(Slang btw)

daring fern
shut crater
#

I'm not sure I get what you mean by lucky cat, but I want clearer UI for which jokers are tethered to a given Lich, so I'd like to highlight the stickers on those jokers (change the sprite of the sticker)

#

but I want that to happen only while the Lich is currently being hovered

scarlet thorn
#

Mmm

scarlet thorn
#

It would do the dna shaking, and you can possibly figure the rest from there

coral flume
daring fern
coral flume
#

I've put it in the wrong spot havent I

daring fern
scarlet thorn
scarlet thorn
coral flume
#

can_use is undelined red

#

and crashes

daring fern
coral flume
#

oh shit sorry

daring fern
coral flume
daring fern
# coral flume

Change it to can_use = function(self,card) at the top.

coral flume
#

Okay so it works functionally now

#

except

#

When it uplevels it just shows the numbers

#

Its very ominous

daring fern
# coral flume When it uplevels it just shows the numbers

Put this instead of the level up ```lua
update_hand_text({sound = 'button', volume = 0.7, pitch = 0.8, delay = 0.3}, {handname=localize(hand, 'poker_hands'),chips = G.GAME.hands[hand].chips, mult = G.GAME.hands[hand].mult, level=G.GAME.hands[hand].level})
level_up_hand(card, hand, nil, lowtempuse)
update_hand_text({sound = 'button', volume = 0.7, pitch = 1.1, delay = 0}, {mult = 0, chips = 0, handname = '', level = ''})

coral flume
#

Legend

#

All is functioning

coral flume
rugged pier
#

is there a way to "win the blind"

scarlet spire
#

I wonder if there's a reason the level_up_hand function doesn't just include all the needed functions to properly update the UI

crystal perch
rugged pier
daring fern
rugged pier
scarlet spire
#

I was thinking of making some kind of hand upgrade utility function, I already have a variant called level_up_hand_fast that just does the same stuff but two times faster

nocturne aspen
#

does anyone have an example of a context that triggers once after a hand has been discarded? would be apricated

scarlet spire
#

pre_discard is pretty much that, it has access to all the same stuff discard has iirc, just not happening once per card

#

I'm pretty sure it's just called pre_discard because it happens right before the loop, and discard happens during the loop, for each card

#

yep, checking the code that's pretty much the case

peak obsidian
#

How can i improve the writing here? i feel this doesn't suffice.

daring fern
peak obsidian
reef belfry
crystal perch
#

anyone know how i would create a copy of a consumable that was used from a booster pack as part of a joker effect?

#

this is what i have so far and, unsurprisingly, it doesn't work

#

don't really understand the logic of the copy_card function

shell timber
#

maybe you could make it rankless and suitless as a balancing measure (?)

daring fern
#

I'm trying to put sleeves on playing cards

rapid stag
#

1.5 MB, 28416x128 2x image asset girldmDeadand that's slightly optimised - if i optimised it even more, it'd probably only go down to 1 MB and 21248x128

i hate weird animated sprite bs hhhhhh

#

fuck it, send it.

sturdy compass
#

Full send graaaaaahhh

rapid stag
#

can balatro handle a 111 frame sprite that's literally just for a meme and nothing else

sturdy compass
#

I'd imagine it can

rapid stag
#

well it didn't like bad apple being one line when i tried to do that and that was roundabout the same amount of frames at similar dimensions

might probably run into the power of 2 issue

shell timber
sturdy compass
#

You can cheese it by not relying on an animated atlas and iterate throught the frames manually via a Game:update hook or in the card's update function

shell timber
#

cryptid and morefluff do this for jimball / hyperjimbo respectively

sturdy compass
#

That's how I do it with my 4D Joker so I could have an actually nice looking sprite sheet. Jimball from Cryptid uses the same method

rapid stag
sturdy compass
#

And you made it one line of sprites??? Niko_Uncomfortable

peak obsidian
sturdy compass
#

Insane for stone builds

scarlet spire
#

and with extra speed functionality to modify the level up animation

#

this function name sucks though

#

I could probably figure out adding a field for text override to allow the function to do stuff like black hole

neat plover
rapid stag
neat plover
rapid stag
sturdy compass
#

Biblically accurate sprite sheet

daring fern
rapid stag
#

that's what i ended up with

#

anyway, issue time

sturdy compass
#

Oh how fun

rugged pier
#
calculate = function(self, card, context)
        if G.GAME.blind.in_blind and context.selling_card then
            if context.card.config.center.key == 'j_csmr_edgard' then
                ease_chips(0.75 * G.GAME.blind.chips + G.GAME.chips)
            end
            if G.GAME.chips >= G.GAME.blind.chips then
                G.STATE = G.STATES.HAND_PLAYED
                G.STATE_COMPLETE = true
                end_round()
            end
        end
    end

i am checking for chips being higher than chip requirement and im ending the round but the round doesnt end until i play the next hand

#

what am i doing wrong

daring fern
rugged pier
neat plover
rugged pier
#

one second im rerecording

daring fern
sturdy compass
rugged pier
daring fern
sturdy compass
#

If it does that’s probably your problem

rugged pier
#

oh yeah

#

it does

#

it is immediate though

sturdy compass
#

I don’t think that really matters

rugged pier
#

so whats the issue with it being an event?

neat plover
daring fern
sturdy compass
#

I think your solution could be to put that comparison in an event itself

rugged pier
#

instead of using ease_chips

#

right

sturdy compass
#

You could but that’d lead to some weird side effects I think, i.e. the text not displaying properly

rugged pier
sturdy compass
#

Correct

rugged pier
#

okay bet let me try, thank you

faint yacht
#

🍞 Here's what my DriveSpace Joker does with the Blind requirement if it helps any.

daring fern
neat plover
#

for tetsing mainly

rugged pier
#
    calculate = function(self, card, context)
        if G.GAME.blind.in_blind and context.selling_card then
            if context.card.config.center.key == 'j_csmr_edgard' then
                ease_chips(0.75 * G.GAME.blind.chips + G.GAME.chips)
            end
            G.E_MANAGER:add_event(Event({
                trigger = 'immediate',
                func = function() 
                    if G.GAME.chips >= G.GAME.blind.chips then
                        G.STATE = G.STATES.HAND_PLAYED
                        G.STATE_COMPLETE = true
                        end_round()
                    end
                end
            }))
        end
    end
#

would this be the way to go about it

sturdy compass
#

Yeah that looks right

neat plover
rugged pier
#

awesome let me try

sturdy compass
#

Wait no

#

You’re not returning out of the event

rugged pier
sturdy compass
#

Mhm

rugged pier
#

awesome thank you :)

daring fern
rugged pier
#

okay hmm

#

its still

#

not ending the round

sturdy compass
#

Hmm

rugged pier
#

yeah i tried printing it

#

it shows old chips

#

before ease_chips run

#

even though its after

#
calculate = function(self, card, context)
        if G.GAME.blind.in_blind and context.selling_card then
            if context.card.config.center.key == 'j_csmr_edgard' then
                ease_chips(0.75 * G.GAME.blind.chips + G.GAME.chips)
            end
            G.E_MANAGER:add_event(Event({
                trigger = 'immediate',
                func = function()
                    print("reqirement:" .. G.GAME.blind.chips .. " chips")
                    print("current:" .. G.GAME.chips .. " chips")
                    if G.GAME.chips >= G.GAME.blind.chips then
                        
                        G.STATE = G.STATES.HAND_PLAYED
                        G.STATE_COMPLETE = true
                        end_round()
                    end
                    return true
                end
            }))
        end
    end
#

im going to just add a delay

sturdy compass
#

Interesting

rugged pier
#

and see if it changes anything

#

okay the delay fixes it

neat plover
daring fern
neat plover
#

yep, just used the buffer

#

the card_added didnt seem to work

sturdy compass
#

It kinda makes sense tho

#

Just kinda tho

rugged pier
neat plover
#

how would i change the shop texture with a texture pack?

sturdy compass
daring fern
zealous glen
rapid stag
#

i did what you told me to do cirBox

zealous glen
# rapid stag doesn't work is in fact, worse

Also when testing if a card could be destroyed I recommend using Card:can_calculate(true) and setting Card.getting_sliced = true instead of a custom variable (if it’s immediate)

zealous glen
rapid stag
zealous glen
#

Well, you can see it didn’t work, so something wasn’t adapted correctly

#

Setting an object’s major to a different one is how thunk makes them move together

#

You can read their comments explaining it and see how it’s done in vanilla

shell timber
#

chat how do you make tags give xmult

zealous glen
#

Idk you probably need a new Tag type

wintry solar
#

build tags into the calc pipeline

zealous glen
#

New SMODS API when

faint yacht
#

I forget which mod already had such tags...

#

-# Probably back with old-calc.

zealous glen
#

Ortalab

#

-ish

faint yacht
#

Right, Bunco has xmult and xchips tags...

runic pecan
#

How many sips does it take to finish a full mug of beer?
(What initial-count-down number should I give to a beer-based food joker?)

wintry solar
#

I think it should be as simple as just adding the tag area as a card area

#

But maybe not

zealous glen
shell timber
#

i've got it working but the message isn't placed on the tag

#

(this is using a lovely patch)

wintry solar
zealous glen
#

And maybe customize how it’s removed

#

Done without calculation

#

Although if you look you’ll notice the Tag got removed when accessing a Pack

marble flint
#

I have tags that give both + and X mult, if you want to yoink my (admittedly quite bad) implementation (or use me as a dependency and use the context i add)

brisk rose
shell timber
#

i did not know that

scarlet spire
#

I love that the tag conditions are called yep and nope

#

does anything in vanilla even trigger tag:nope in normal gameplay? I know it's called once but I couldn't quite understand the code and i've never seen it in gameplay

daring fern
brisk rose
#

Huh, I guess that makes sense

#

So I'll never see it in my life with my pool of 1500+ jokers, lol

scarlet spire
#

huh, I could've sworn I tried spawning in all rares and the rare tag just made jimbos instead of nope-ing?

brisk rose
#

Idk

daring fern
brisk rose
#

Wait... isn't showman an uncommon?

scarlet spire
#

yep, because uncommon always has showman, unless you do have showman in which case it doesn't matter

#

showman is technically the default uncommon as a result... technically

#

oh huh. I just tried it again and yeah it does just nope once the rare pool is empty

brisk rose
#

What if you have 2 uncommon tags? It isn't supposed to spawn 2 showmen

scarlet spire
#

I wonder what happened last time

brisk rose
#

Ngl I'm not sure I've ever picked up showman unless I'm already running dozens of jokers somehow or another

zealous glen
#

What if Showman is debuffed balatrojoker

scarlet spire
#

since it follows default pool rules instead of forcing a nope like rare tags do

manic rune
#

the art disease is infesting my mod...

manic rune
#

-# i actually think the main reason why people dont want to try out my mod is because everything's sprite is the same

brisk rose
manic rune
#

maybe there will be more people willing to try out my mod when all the art is finished, who knows :p

zealous glen
#

“cool 👆, what does it do?”

zealous glen
#

Artists get free programmers but programmers don’t get free artists ;P

zealous glen
marble flint
#

i make a sheet like this when i need temp art. not a ton of effort but makes it way more playable

cursive sentinel
#

is there a check to know if a certain consumeable has been used?

zealous glen
#

Ever? Retroactively?

cursive sentinel
#

no, in context.using_consumeable

#

although id be curious as for retroactively too

shell timber
#

oh so like

#

earn $3 if you use a Death

#

?

hushed field
#

retroactively, not without setting it up yourself (though it wouldn't be too difficult). It'd just be a hook, I suspect, that sets values in a hash table

#

if context.consumeable.ability.set == "Tarot" and context.consumeable.ability.name == "Death" then though you're better of checking for keys, I think, if you don't want it to be a vanilla item

cursive sentinel
cursive sentinel
#

is the checking for death not working if no check for tarot?

hushed field
cursive sentinel
#

keys are like c_death?

zealous glen
#

Yes

hushed field
#

yesss

zealous glen
#

You can do Card.config.center_key

cursive sentinel
#

so if i wanna check neptune, card.config.c_neptune ?

#

with a == true?

zealous glen
#

No

#

Card.config.center_key == 'c_neptune'

hushed field
#

is it not center.key?

scarlet spire
#

seems both do the same thing(??)

hushed field
#

oh, interesting

scarlet spire
#

I don't know enough about centers to know why, but center.key and center_key both work

cursive sentinel
#

it cuts the if when i add it

hushed field
#

nothing wrong with redundancy i guess.

shell timber
#

it's context.consumeable.config.center_key but yeah

cursive sentinel
#

oh sorry thank you

hushed field
zealous glen
#

What they said

#

I say Card because it’s the class

#

But you need to find the correct instance of the class

cursive sentinel
#

thank you!

rapid stag
#

how do i get the current game speed cirThink

zealous glen
#

If assert(false) then the speed is set to nil balatrojoker

iron haven
zealous glen
#

-# it crashes your game