#💻・modding-dev

1 messages · Page 418 of 1

scenic steeple
#

now a slight continuation question, what about specific suits (uhhh hearts for example)

red flower
#

context.other_card:is_suit("Hearts")

pure salmon
#

yeah that

scenic steeple
#

got it so my entire mistake there was not throwing it into the ()

#

-# I did it similar to ranks

lament agate
#

alrigh fuck it

#

is it possible for a joker to check lovely dumps inside of your Mods folder?

#

if so, how

normal crest
#

or are you referring to something else

red flower
#

do you want to count the logs like you said before?

tardy juniper
#

how can i make a joker add mult before cards are scored? tried using context.before but then when the cards start scoring the mult resets.

lament agate
red flower
#

#NFS.getDirectoryItems(SMODS.MODS_DIR .. "/lovely/log")

formal parrot
normal crest
lament agate
lament agate
#

where do i out this

red flower
#

that gives you the number of logs

formal parrot
red flower
#

you put it where you need the number

lament agate
maiden phoenix
lament agate
#

hold on

normal crest
#

oh wait that reminds me

#

I made a context for that months ago

#

the pattern needs to be changed tho cus that's old

wintry solar
#

after before seems to be a pretty common request

normal crest
#

if you add it please think of a better name lol

maiden phoenix
#

Can't wait for context.after_the_before_of_after_before_of_after_but_before

normal crest
#

how about modify_hand_score or smt like that

wintry solar
#

I think context.initial_scoring_step would work

red flower
red flower
normal crest
red flower
#

yes

#

for the flint-like effects

normal crest
#

oh modify_scoring_hand

#

fair enough

maiden phoenix
red flower
#

that's for splash

hollow sphinx
#

I've been trying to find the code for the custom editions added in cryptid but I can't find them anywhere...

normal crest
red flower
#

trying to find stuff in cryptids codebase is a nightmare because of their custom loading

normal crest
#

I guess you're referring to the blind function

red flower
#

yes it's also a context now

normal crest
#

i see i see

wintry solar
#

omg being able to add stuff here is neat

#

N, any reason you added round_eval before the deck trigger, or am I free to move it around slightly?

red flower
#

i think i copied final_scoring_step, feel free to move it

plush depot
#

oh my god my fuse blew a few hours ago and my code didnt save

#

I LOST EVERYTHING FOR MY ENHANCEMENT

red flower
#

F

plush depot
#

i give up

#

ill just ask (force) someone to help me (do it for me)

unkempt thicket
#

How do i change the Main menu (Balatro picture, Ace card, Background colors)

hybrid shadow
plush depot
#

but it kept giving me error messages for idk what and put it aside for a while

hybrid shadow
plush depot
#

ty factwixard

wild escarp
#

So polychrome but an enhancement?

patent hare
#

hello gang I have a Joker i'm tryna make and all its supposed to do is activate the effects of three random jokers, but i cannot get it to work whatsoever. The game doesn't crash, Chatgpt won't help, and IM GETTING VERY ANNOYED someone please help

le code:

hardy viper
#

chatgpt 💔

plush depot
hybrid shadow
# plush depot x1.5 mult

anything else special about it? (overriding base card's chip value, all suits, no suit, no rank, etc)

plush depot
hybrid shadow
plush depot
#

thanks

hybrid shadow
#

np

thorn furnace
#

What's the best way to go about balancing Jokers

I've opened up my mod for playtesting but I'm not sure if there are other ways to go about it
I've done more than a few runs myself but a lot of the Jokers in my mod I'm worried about being unbalanced are incredibly hard to get so it's hard to test legitimately

wintry solar
hybrid shadow
spice wadi
thorn furnace
wild escarp
#

How would I track jokers that have been edited by another joker? I'd like to keep naturally occurring eternals separate from ones made by the joker.

wintry solar
#

I guess these other PRs can wait for another day, I am done 🥱

hybrid shadow
chrome widget
#

Thanks for merging mine Eremel. I can now go murder a lovely patch with glee

hollow sphinx
#

trying to make an edition that retriggers whatever card it's on. It works fine on cards but doesn't work on jokers.

hybrid shadow
# thorn furnace Yea

ig what im trying to say is that you should balance it for when you want players to find it, and if they get it early then it's lucky them

spice wadi
spice wadi
hollow sphinx
#

yes

#

this is the code i have for that

#

if thats wrong

hybrid shadow
hybrid shadow
hollow sphinx
#

that makes sense...

#

yep it works now

thorn furnace
#

Eh ill just wait for the playtesters ig

hybrid shadow
hardy viper
red flower
# wild escarp bump

you might be able to patch something in create_card_for_shop but this seems kinda hard to keep track of

wintry solar
#

I submitted a PR that fixes it but I don't know if it buggers up the search algorithm

hardy viper
#

ah ill take a look

thorn furnace
hybrid shadow
scenic steeple
#

so, I'm trying to make a sort of counter to keep track of the number of wild cards vs the total number of cards in the deck, then replace this joker with another joker (Devotion) when 1/4 of the deck is just wild cards, but well, nothing is happening so there's got to be some sort of mistake here

unkempt thicket
#

How do i change the Main menu (Balatro picture, Ace card, Background colors)

red flower
coarse plank
#

anyone know how to affect the tripple and pair in a full house seperatly?

plush depot
hybrid shadow
#

question, in something that uses SMODS.add_card, how would i make it so it creates a joker of two possible rarities? (i have SMODS.add_card({ set = 'Joker', rarity = 'Rare' }) currently

hybrid shadow
plush depot
#

oh not the x and y lol

scenic steeple
hybrid shadow
plush depot
plush depot
hybrid shadow
plush depot
#

oops

hybrid shadow
#

you need to add an atlas for it

plush depot
#

done lets see if it works

#

same error message

hybrid shadow
plush depot
hybrid shadow
crimson tapir
#

hey im new to modding im tying to add a joker to the source code in the 7-zip archive what do i add to the code to add a joker

hybrid shadow
plush depot
#

yep

#

ok lets see now!

#

it worked?

#

lemme add loc_txt lol

hybrid shadow
plush depot
#

woohoo

#

imma see if it works now thx factwixard

hybrid shadow
plush depot
#

thank you

#

oh yeah it works

#

alr i now need to make the taarot card

red flower
chrome widget
#

I've taken two more lovely patches behind the woodshed

#

I see two more whose days are numbered

thorn furnace
#

I need to stop thinking of overambitious ideas for mods i need to just learn how the engine works first

hybrid shadow
glad osprey
scenic steeple
red flower
scenic steeple
#

oh

#

I'm gonna presume I rename that to wilds

red flower
#

i would name it playing_card

scenic steeple
#

that sounds better

tardy juniper
#

why does it... what am i doing wrong

scenic steeple
tardy juniper
#

nvm figured it out

#

minor spelling mistake

chrome widget
#

there's no other_card in joker_main, and you're wanting to tally the playing_card values per the iterator in the for loop

scenic steeple
#

-# assuming I didn't f up something somewhere

chrome widget
#

should be good?

scenic steeple
#

well it didn't work, didn't crash so I just have no clue

#

I probably messed up the add_card but idrk

lament agate
#

is this right?

#

context: Xmult for each remaining card in deck

#

wait fuck

#

hold on

#

how do you change it to xmult

scenic steeple
#

Probably the best I need is just a nice explanation of how

SMODS.add_card{key = "j_modprefix_key"}

works (more specifically what the j_modprefix_key really means)

lament agate
#
        return { vars = { card.ability.extra.xmult, card.ability.extra.xmult * ((G.deck and G.deck.cards) and #G.deck.cards or 52) } }
    end,
    calculate = function(self, card, context)
        if context.joker_main then
            return {
                chips = card.ability.extra.xmult * #G.deck.cards
            }
        end
    end
}```

is this right?
scenic steeple
#

that looks mostly good to me, otherwise maybe try removing the x???????

#

don't listen to me kekw

lament agate
#

aight

red flower
#

change it to xmult

lament agate
#

also it shows nil

#

Xnil

red flower
#

what's the text

lament agate
red flower
#

it needs to be #1# and #2#
each number corresponds to one of the vars

lament agate
#

how would the vars looks like

red flower
#

the vars look correct

lament agate
#

so X1 Mult for each and currently X2?

red flower
#

no

exotic imp
#

Can someone help me understand calculate

lament agate
exotic imp
#

I have read that and I am still confused

red flower
red flower
lament agate
#

s

red flower
exotic imp
#

I have looked at other jokers from mods but I don't understand it

red flower
#

is there something specific you don't understand?

exotic imp
#

in the github it's put as steps 2 and 3

red flower
# exotic imp in the github it's put as steps 2 and 3

step 2 is telling you that you can do any logic you want in a context. for example when the shop ends you add 1 to a counter

step 3 is saying that there are special tables you can return to do effects like give chips, mult, money, destroy cards, etc.

red flower
lament agate
#

hold on

#

oh

#

for fuck sake

#

really

#

done

exotic imp
red flower
#

no, look at the basic joker in the link i sent earlier for example

#

that only has steps 1 and 3

exotic imp
#

ok thank you

#

I was confused because the ways it's written int the github it makes it seam like you need 1-3

lament agate
#

i got 4 jokers working 🥳

#

baby step

violet gulch
#

Is there a context to watch for money spent? Say you wanted something to trigger on every X dollars spent?

formal parrot
lament agate
violet gulch
lament agate
#

ALRIGHT THE RARITY

#

let me list the jokers ability

formal parrot
sonic cedar
#

what am i doing wrong here? cause apparently lucky.trigger is based on false rather than true, but this doesnt work?

formal parrot
#

You can check money before entering shop and when starting a blind

daring fern
lament agate
#

COPE: Retrigger 7 and 4 twice
jofreak: played 6 or 9 has 1 in 2 chance to give X6.9 Mult
FIM: X0.2 Mult for each remaining card in deck
fish: +15 Chips for each scored cards

formal parrot
#

(I’m bad at explaining)

violet gulch
chrome widget
#

hooking is a function of the Lua language itself

violet gulch
#

Oh, thats helpful. thanks. Not well versed in Lua. Just starting down this experiment

chrome widget
#

essentially, save the old version of a function in a variable, and then redeclare it. You can then call the old function as kind of a form of inheritance

hollow sphinx
#

getting this crash and I assume it is because I have the names of the seals wrong here

chrome widget
#
function ease_dollars(mod, instant)
    local ret = ref_ease_dollars(mod, instant)

    -- do some code

    return ret
end```
daring fern
chrome widget
#

Here's a basic example of hooking ease dollars that does nothing except return the original function's return (which is nil, but it's good practice to explicitly return it anyway)

hollow sphinx
#

awesome thanks

lament agate
#

does smods supports custom font?

daring fern
lament agate
#

how

violet gulch
#

Ah, so thats what Extra Credit is doing here:

lament agate
#

i want to use custom font for the description

#

and probably the title too

chrome widget
sonic cedar
daring fern
violet gulch
#

Thank you for the help! Been writing joker ideas down for awhile. Got the first 3 working. 4th idea wasn't quite as simple.

red flower
lament agate
#

what version is this

red flower
#

0530

lament agate
#

updating

#

brb

#

should i use the dev branch or

red flower
#

yeah but because the latest release has a big bug

lament agate
#

fair

#

dev branch it is

scenic steeple
#

so uhhhh, how tf does a custom rarity work?

exotic imp
#

if I wanted to discard a card in the played hand after all jokers are activated which context would I use?

hybrid shadow
scenic steeple
#

like, if I wanted to make a custom joker rarity

#

yk just, something above legendary

hybrid shadow
exotic imp
#

thanks I will try that

red flower
#

if you want to respect weights you need to do your own polling probably

sonic cedar
#

you can link it to pseudorandom_element i'm pretty su--i was THIS close

hybrid shadow
exotic imp
red flower
#

i cant wait for the next smods release to never have to write pseudoseed again

sonic cedar
#

REAL

lament agate
#

71*95 was for one joker right?

red flower
lament agate
#

how about 1 joker and 1 soul pos?

red flower
#

the size is for the sprite not for the entire atlas

#

each sprite is 71x95

lament agate
#

so twice that amount?

#

i am SO sorry, i skipped math last year

red flower
#

in the atlas definition you put 71x95

#

then the png can be any multiple of that you want

lament agate
#

oh yes of course i will put that, but making one

#

so 2 sprites means

red flower
#

grab a calculator lol

lament agate
#

fair

hybrid shadow
normal crest
#

they mean you will be able to do pseudorandom_element(list, "seed")

scenic steeple
hybrid shadow
sonic cedar
exotic imp
#

how do I give myself my new joker to test if it works?

hybrid shadow
exotic imp
#

no

hollow snow
#

what does info_queue use? or what can i use to make a custom info_queue item

flint fern
#

my RAM is not fucked is it

red flower
sweet pelican
#

I got this custom joker working, it is functioning as intended, but the display always says that it's at x1 mult, I get that it's because in the config Xmult is equal to 1 but I'm not sure how I can get it to reflect the value accurately as anytime I try to reference the "#G.consumeable.cards" I get errors, any insight would be awesome I'm super new to this lol

normal crest
#

in your loc_vars also return the Xmult + the number of consumables

#

also use x_mult or xmult, not Xmult_mod

#

(you will have to check whether G.consumeables exists in your loc_vars function)

red flower
#

you can use card.ability.extra.Xmult + (G.consumeables and #G.consumeables.cards or 0)

violet gulch
normal crest
#

Xmult_mod only works if you also pass a message, which is fine if you're using a custom message, but otherwise x_mult and xmult automatically create the message

sweet pelican
#

worked flawlessly yall are goated tysm

exotic imp
#

can anyone explain why my joker isn't doing anything?

primal robin
#

Holy sh what I did, that's looks scary

modern kindle
#

Hi besties

daring fern
normal crest
exotic imp
normal crest
exotic imp
#

no it's joker_main

normal crest
#

hmm, make sure to start a new run

exotic imp
glad osprey
#

what funcs are called when the shop is opened or rerolled

daring fern
# exotic imp

Also, you should be using context.destroy_card not context.after and just return {remove = true}

daring fern
exotic imp
daring fern
exotic imp
daring fern
primal robin
exotic imp
#

I updated it and it's doing the exact same thing

normal crest
#

Did you save the file

zinc violet
#

ooo hello

#

I need help with something

#

do you know how to make a pool of cards?

exotic imp
exotic imp
daring fern
exotic imp
#

please explain further

daring fern
exotic imp
#

will that delete the cards in the played hand?

normal crest
#

all of them, unconditionally, you murderer

zinc violet
#

I use this code and the game does not start.
I search in google and I can't find anything

normal crest
#

What is the crash?

#

if there is one

zinc violet
#

"src/game_object.lua"]:888: attempt to index local 'center' (a nil value)

daring fern
zinc violet
#

oooooh

acoustic briar
#

don't think anyone responded to this at the time, so if anyone can give advice on this that'd be great

exotic imp
daring fern
hybrid shadow
#

how do i have a voucher double the weight of a custom rarity

zinc violet
hybrid shadow
exotic imp
zinc violet
daring fern
exotic imp
#

yes

#

I also saved

zinc violet
#

nop

#

the same error

granite nymph
#

i really do apologize for asking here so often but does anyone know how to define global value

#

ive never coded in lua and im still learning

hybrid shadow
# exotic imp

to be clear it does everything but destroy the cards?

zinc violet
#

Could it be that the error is here?

granite nymph
#
SMODS.Joker {
    loc_txt = {
        name = 'Guess Who',

        text = {
                 "Earn {C:money}$#1#{} if {C:attention}poker hand{}",
                    "is a {C:attention}#2#{} and contains",
                    "the {C:attention}#3#{} of thespade,",
                    --"of {V:1}#4#{},",
                    "{s:0.8}poker hand and card change",
                    "{s:0.8}card change every round",
            }
    },
    key = ```
exotic imp
granite nymph
#

give me a second tyhasdts half

#

can i just send my entire jokers.lua its not all gonna fit

exotic imp
#

it reduces the max of the deck but the cards still exist in the deck

daring fern
hybrid shadow
exotic imp
granite nymph
exotic imp
#

it just gets worse the further you continue

hybrid shadow
normal crest
exotic imp
red flower
#

wtf

daring fern
granite nymph
#

oh

red flower
granite nymph
acoustic briar
#

black magic

exotic imp
exotic imp
red flower
#

maybe

hybrid shadow
granite nymph
#

by define i mean fix this warning

daring fern
daring fern
exotic imp
granite nymph
daring fern
daring fern
exotic imp
daring fern
exotic imp
hybrid shadow
red flower
exotic imp
red flower
#

yeah it might be your smods version

urban wasp
daring fern
sonic cedar
#

i thought that meant i could check for it still? just with false instead of true?

red flower
#

no

#

it means that you can't hook calculate because it doesn't have one

sonic cedar
#

ohhhhhh

red flower
#

you need to patch where lucky triggers

sonic cedar
#

how can i check for it then?

sonic cedar
daring fern
red flower
#

you can also use a calculate_context hook and do what lucky cat does

daring fern
sonic cedar
#

oh true...

exotic imp
red flower
#

what's the version?

exotic imp
red flower
red flower
exotic imp
#

I just realized somthing that might be it but tell me if you can find any problems in the code

red flower
#

hmmm no i dont see it
you're restarting the run right?

lament agate
#

so like

#

uhh

exotic imp
wooden nexus
#

So i got a problem. Every time i create a card using my one seal during the pillar, it gets debuffed but triggers the xmult if it's steel. Is there any way for me to not trigger it?

lament agate
#

so like i change this to smods mod dir or

hybrid shadow
# red flower

how would i write that out? like G.GAME.['key_mod']?

red flower
zinc violet
#

I just deleted the pool code and the game started, but it is as if the joker does not exist, it does not appear in the collection.

red flower
hybrid shadow
red flower
lament agate
red flower
#

to the code i sent earlier

lament agate
#

got

wooden nexus
# red flower might be related to this https://github.com/Steamodded/smods/issues/699

so where do i put it in this then?

SMODS.Seal {
    key = "Silver",
    atlas = "BCU_centers",
    pos = {x = 0, y = 5},
    config = {extra = {DupeNum = 1, DupeDenom = 2, DupeAmount = 1}},
    discovered = false,
    prefix_config = {
        key = {mod = false}
    },
    badge_colour = HEX('B1B1B1'),
    shiny = true,
    sound = { sound = 'gold_seal', per = 1.2, vol = 0.4 },
    loc_vars = function(self, info_queue, card)
        return {vars = {self.config.extra.DupeNum, self.config.extra.DupeDenom}}
    end,
    calculate = function(self, card, context)
        if context.cardarea == G.play and context.main_scoring then
            for i = 1, self.config.extra.DupeAmount do
        local new_card = copy_card(card, nil, nil, G.playing_card)
        new_card:set_seal(nil)
        new_card:add_to_deck()
        G.deck.config.card_limit = G.deck.config.card_limit + 1
        table.insert(G.playing_cards, new_card)
        playing_card_joker_effects({new_card})
        G.hand:emplace(new_card)
        new_card.states.visible = nil
        G.E_MANAGER:add_event(Event({
            func = function()
                new_card:start_materialize()
                G.GAME.blind:debuff_card(new_card)
                G.hand:sort()
                return true
            end,
        }))
            end
        return {
        playing_cards_created = {new_card}
        }
        end
    end,
}```
zinc violet
#

this is the full code of the joker

#

the error would be there?

red flower
wooden nexus
#

There's a fix in the comment

#

Method to fix: smods needs to change it so ability.played_this_ante is set somewhere later, like after G.FUNCS.draw_from_play_to_discard() maybe

red flower
#

that's not for modders that's an idea on how to fix it in smods

hollow sphinx
#

am i able to change the edition of a joker card using debug plus?

wooden nexus
#

oh

wooden nexus
#

it is

hollow sphinx
#

thanks

wooden nexus
#

you could just hold tab and look at the info on the side bar

hybrid shadow
quick scarab
#

trying to make a enhancement that destroy after 5 usages but it seems to crash the game, any help?

#
    key = 'pizza',
    atlas = 'Enhancers',
    pos = { x = 0, y = 0 },
    config = { bonus = 500, uses_left = 5},
    replace_base_card = true,
    no_rank = true,
    no_suit = true,
    always_scores = true,
    loc_vars = function(self, info_queue, card)
        return { vars = { card.ability.extra.uses_left} }
    end,
    calculate = function(self, card, context)
        if context.destroy_card and context.cardarea == G.play and context.destroy_card == card and pseudorandom('pizza') == uses_left then
            return { remove = true }
        else
            card.ability.extra.uses_left = card.ability.extra.hands_left - 1
            return {
                message = card.ability.extra.uses_left .. '',
                colour = G.C.FILTER
            }
        end

    end,
}```
quick scarab
#
                name = "Pizza Card",
                text = {
                    "{C:chips}+#1#{} Chips",
                    "no rank or suit",
                    "Expires after {C:attention}#2#{} Usages",
                },
            },```
hybrid shadow
daring fern
quick scarab
daring fern
quick scarab
#

so how do I fix it?

daring fern
chrome widget
lament agate
#

assert(SMODS.load_file('PixelOperator-Bold.ttf'))() ? @red flower

red flower
#

no

zinc violet
#

I tried to lengthen the code a little bit but it still gives the same error.

red flower
#

you need to load the file that has the SMODS.Font code

lament agate
#

ohhh

#

okay

zinc violet
#

"src/game_object.lua"]:888: attempt to index local 'center' (a nil value)

red flower
#

i would appreciate the full crash log

lament agate
#

im going to fucking tweak

zinc violet
red flower
lament agate
red flower
#

then it didn't load

zinc violet
lament agate
#

how

zinc violet
#

thats all

red flower
red flower
# zinc violet

you can ctrl+c ctrl+v to paste it here as a file btw lol

glad osprey
zinc violet
#

I didn't know that

lament agate
zinc violet
red flower
sonic cedar
#

so just take out individual? i just used the remade lucky cat checks

red flower
#

hmm no it's a bit more complicated then i didnt remember what lucky cat did

#

i would patch where somethingcom said

daring fern
red flower
# lament agate

ok you dont need the load file thing then, it's weird that it's not crashing

sonic cedar
#

oh ok

daring fern
# sonic cedar oh ok

Also there is already a count for how many times you have used every consumable on the profile.

red flower
#

can i see the json

lament agate
lament agate
red flower
red flower
lament agate
#

dont have one

sonic cedar
red flower
#

where are you putting the font then

lament agate
red flower
#

i dont mean a loc file i mean the loc_txt in your joker

lament agate
lament agate
#

closed or not, same result

red flower
#

hmmm i think it's cursed

lament agate
#

god damn you smods

#

or this font is

#

let me try other font

red flower
#

if you tried f:5 and it didn't change i dont think it's the font

glad osprey
red flower
#

it does

lament agate
red flower
#

it's a vanilla feature as well

lament agate
#

yeah no

#

it doesnt work at all

#

not even crashing

#

weird

red flower
#

ok last idea

#

are you editing the correct file

#

are you sure you dont have a second copy of your mod

hybrid shadow
#

is there a way to have a deck that starts with certain jokers

red flower
#

in the config add jokers = { "key1", "key2" } etc

lament agate
#

huh it froze

#

oh wait

#

@lament agate

#

fuck

#

@red flower

hybrid shadow
hybrid shadow
# lament agate

youre asserting the loading of the file in the first line of said file

is it looping the loading of itself?

red flower
#

oh yeah you need to delete the load file thing

lament agate
#

hold

red flower
#

because you don't have multiple files

lament agate
#

both?

red flower
#

yeah

#

we know it's loading now

zinc violet
#

I used vanilla remade as a base, and the game works but the joker is not in the collection.

red flower
zinc violet
#

yes

lament agate
red flower
#

let's goo

#

that's probably an issue with the font config

lament agate
#

fuck i dont know how to configure this font

quick scarab
#
    key = 'pizza',
    atlas = 'Enhancers',
    pos = { x = 0, y = 0 },
    config = { bonus = 500, extra = {hands_left = 5}},
    replace_base_card = true,
    no_rank = true,
    no_suit = true,
    always_scores = true,
    shatters = true,
    loc_vars = function(self, info_queue, card)
        return { vars = { card.ability.extra.hands_left} }
    end,
    calculate = function(self, card, context)
        if context.destroy_card and context.cardarea == G.play and context.destroy_card == card and pseudorandom('pizza') == hands_left then
            return { remove = true }
        else
            card.ability.extra.hands_left = card.ability.extra.hands_left - 1
            return {
                message = card.ability.extra.hands_left .. '',
                colour = G.C.FILTER
            }
        end

    end,
}```
daring fern
# quick scarab

You are not checking for a context when you're decreasing it.

violet gulch
#

context.individual only triggers on scoring cards or played?

hybrid shadow
lament agate
hybrid shadow
zinc violet
#

yep, is activated but at the same time not

daring fern
lament agate
hybrid shadow
quick scarab
lament agate
#

wait hold on

daring fern
sonic cedar
sonic cedar
#

bet

quick scarab
daring fern
hybrid shadow
quick scarab
#

yeah

#

and after that destroy

red flower
daring fern
#

Instead of just else

hybrid shadow
granite nymph
#

i think ill have this joker done by today

zinc violet
#

I just used one of the steammode examples, the game works but the joker still doesn't come out.

granite nymph
#

i just need help wtih this one thing whihc is that other card is a nil value

zinc violet
#

Is it because the main.lua has absolutely nothing in it?

zinc violet
#

ohhhhh

granite nymph
#

you could do something like assert(SMODS.load_file("src/jokers.lua"))() assert(SMODS.load_file("src/backs.lua"))() assert(SMODS.load_file("src/blinds.lua"))() assert(SMODS.load_file("src/seals.lua"))() assert(SMODS.load_file("src/vouchers.lua"))() assert(SMODS.load_file("src/enhancements.lua"))() assert(SMODS.load_file("src/tarots.lua"))() assert(SMODS.load_file("src/editions.lua"))() assert(SMODS.load_file("src/spectrals.lua"))() assert(SMODS.load_file("src/challenges.lua"))() assert(SMODS.load_file("src/stakes.lua"))() assert(SMODS.load_file("src/rarities.lua"))()

#

and of course change the directoryu with the one you store your joker files

#

file*

granite nymph
#

does anyone know why its calling other_card a nil value??

lament agate
#

how do you check if a score catches on fire

granite nymph
#

i dont know but maybe you could check if score exceeds the boss requirement?

lament agate
#

only boss?

zinc violet
daring fern
lament agate
zinc violet
granite nymph
# zinc violet lol

kind of a dumb question but do you have your joker file in a folder called src

zinc violet
#

a

#

sorry

granite nymph
#

bumping agian

daring fern
zinc violet
#

mmmmmmmm

regal ether
#

how do i run something when a card is actually destroyed because context.destroy_card is just for marking cards to be destroyed

hybrid shadow
# zinc violet

youre missing the if statement for when to return the mult

granite nymph
#

its too large to fit inot one message

zinc violet
#

like this?

hybrid shadow
daring fern
zinc violet
hybrid shadow
zinc violet
#

oooh

#

now is it? sorry if i'm so insistent

hybrid shadow
zinc violet
#

o

#

i forgot the then

hybrid shadow
granite nymph
hybrid shadow
granite nymph
lament agate
#

is this right?

#

or

#

Gives 25$, 1 in 6 chance to set score to whatever

hybrid shadow
lament agate
hybrid shadow
lament agate
#

but

#

1 in 6 chances to set players score

hybrid shadow
digital niche
#

what do i add to "in_pools" when making new suits to make it only appear in onee deck?

hybrid shadow
gray void
lament agate
tall wharf
#

baya

unborn bay
#

you could just set mult or chips to -math.huge

tall wharf
#

bro is requiring talisman

digital niche
#

how do i check for vanilla suits?

#

vanilla decks*

granite nymph
#

does anyone know why this joker is not working\

tall wharf
#

no

glad osprey
#

no

digital niche
#

no

granite nymph
#

i was

#

posting the creenshot

lament agate
digital niche
granite nymph
digital niche
#

wait i dont think you have to add the poker hand and sttuff to extra in config?

#

i could be wrong tho

hybrid shadow
tall wharf
digital niche
tall wharf
#

are you copying idol

granite nymph
#

im basing it off the vanilla remade idol as well as to do list

granite nymph
granite nymph
zinc violet
#

ok this is a step forward

#

so

tall wharf
zinc violet
#

Why does the image not appear?

tall wharf
#

idk how are you defining it

hybrid shadow
zinc violet
hybrid shadow
zinc violet
hybrid shadow
zinc violet
granite nymph
hybrid shadow
# zinc violet

do you actually have assets called Banana64.png in your assets folder (inside 1x and 2x)

hybrid shadow
#

hmm

zinc violet
#

with their respective dimensions

hybrid shadow
#

actually why is the loc_vars returning nil

zinc violet
#

I have not modified it yet

hybrid shadow
#

wdym

#

have you not saved your changes

zinc violet
#

like says nil but gives the 64 that i wanted

hybrid shadow
#

since they're both card.ability.extra.mult

pure salmon
#

why does this keep creating evil ghost cards

zinc violet
#

while I configure this, how do I solve the image problem?

digital niche
#

why isnt the colour going?

zinc violet
#

okkkkkkkk

#

and only the image would be missing and it would be done.

lament agate
#

is it possible for a joker to change sprite each hands

hybrid shadow
#

do i need to define anything in my SMODS.Backs so that center is not nil?

digital niche
#

can i make something like "if something checks for X suit, it will also work with Y suit"?

hybrid shadow
pale venture
oblique pond
#

any of yall got a clue on why this makes the card completely blank when hovered over?

subtle hawk
# pure salmon why does this keep creating evil ghost cards

I assume it tries to draw the same card multiple times, though I don't understand the code in question since I'm dumb so can't be sure.
Why I think that's the case is that I had a similar(?) issue but with scored cards. I have a card that plays and scores all spades, but I had to make it deselect spades first because otherwise it could select already selected cards and cause existence of evil ass constantly flipped and ghost cards.
I don't think that will help you anyhow but I didn't see anyone experiencing phantom cards except myself so wanted to drop that

jagged kernel
#

hi, is there a way to make a card multiply chips? I've looked through the steammodded documentation and couldn't find anything

#

I'm very new to modding so I'm sorry if this is an obvious question lmao

hallow forge
#

it's like x_mult

#

but put x_chips instead

jagged kernel
#

thank you

#

I'm dumb as hell

keen totem
#

and theyre also evil

#

so

#

not really

oblique pond
#

evil fucked up documentation

umbral zodiac
#

sinister & evil

hallow forge
#

not the documentation tho

jagged kernel
keen totem
#

this channel exists to ask questions

#

so youre good anyways

#

also as i said

#

smods is evil

#

and does some of the DUMBEST things

#

you would never figure out

#

(you can do Xmult but not Xchips, has to be xchips)

jagged kernel
#

horrific

keen totem
#

(mult is mult but chips are hand_chips)

#

decks are called backs

#

the list goes on, balatro is evil

oblique pond
#

this is only a peep of the horror

stiff quiver
#

what am i supposed to put on the source part of SMODS.debuff_card(card, debuff, source), i want it to be from any source ```lua if context.hand_drawn then
for i = 1, #G.hand.cards do
if G.hand.cards[i].edition and G.hand.cards[i].edition.key == "e_negative" then
SMODS.debuff_card(G.hand.cards[i], 'prevent_debuff')
end
end
end

hybrid shadow
#

how would i increase the chances of getting soul/black hole in tarot/planet packs?

sage crater
# granite nymph its too large to fit inot one message

fun fact, if you hit the plus sign next to your message and Upload your message as a file, you can send your text as a file.
in this specific case, you'd also want to rename the file to have the ending .lua so it's easier to read

umbral zodiac
#

what is the relevent card variable for context.selling_card

umbral zodiac
#

cool

umbral zodiac
#

what formatting would you guys say is best for xhandlevels

stiff quiver
#

I got this crash when opening the full deck menu . I think its this code causing it since there are debuffed cards in the deck and because its the last thing i addedlua if context.hand_drawn then for i = 1, #G.hand.cards do if G.hand.cards[i].edition and G.hand.cards[i].edition.key == "e_negative" then SMODS.debuff_card(G.hand.cards[i], 'prevent_debuff',"any") end end end

ashen ermine
#

Hi, does anybody know how I can set the deck and stake in code, thanks

daring fern
ashen ermine
echo aurora
#

how do you change font sizes for the descriptions?

daring fern
echo aurora
daring fern
echo aurora
#

Thanks

umbral zodiac
#

anyone know why this straight up doesnt do anything?

#

it does the level up animation fine, so scoring_name is valid, but it just doesnt gain anything other than hand level

wintry solar
#

Where’s the code?

umbral zodiac
#

heres the full screenshot, calculate function of a joker

wintry solar
#

And whats intended to happen?

umbral zodiac
#

the chips and mult of the hand to go up

#

before and after, nothing changed except the level

#

the l_mult and l_chips are going up properly, as shown on planet cards, but its not changing the hand's stats

wintry solar
#

It’s because you’re doing it mid scoring

umbral zodiac
#

when should i do it

wintry solar
#

It won’t take effect on the current score, but should be upgraded for future

#

context.before if you want it to count for that hand too

umbral zodiac
#

if i use before, will i have to manually make it go through each played card instead of just relying on context.other_card

wintry solar
#

Yes

umbral zodiac
#

ok cool

#

thanks

pale holly
#

Okay so i tried to change my joker code so instead to directly check if it's a shodown boss blind it'll check instead if the Ante is a multiple of 8 or not when entering the boss blind, if yes then the card destroy itself, otherwise x5 mult, but now i have this error that for some reason impact outside of my joker's code
I'm not so sure how or why mult suddently is a nil value now

    key = "goldkey",
        loc_txt= {
        name = 'Gold Key',
        text = { "{X:mult,C:white}x5{} when entering a Boss Blind",
        "Gets destroyed when entering a Showodwn Boss Blind"
    },},
    --atlas = 'key',
    pos = { x = 0, y = 0 },
    rarity = 3,
    cost = 7,
    pools = {["pseudoregamod"] = true},
    
    unlocked = true,
    discovered = false,
    blueprint_compat = true,
    eternal_compat = true,
    perishable_compat = true,
    
    config = { extra = {xmult = 5}},
        loc_vars = function(self, info_queue, card)
        return { vars = { card.ability.extra.xmult }  }
    end, 
   calculate = function(self, card, context)
   local ante8 = (G.GAME.round_resets.ante % 8 == 0) 
    if context.setting_blind and (G.GAME.blind.boss) then
    if ante8 then
            card:start_dissolve({G.C.RED})
            return {
                message = "Used !"
            }
    else
            return {
                message = "x".. card.ability.extra.xmult,
                Xmult_mod = card.ability.extra.xmult
            }
            end
    end
end
    }```
umbral zodiac
#

yeah so it still doesnt actually do anything to the hand chips & mult lmao

hollow sphinx
#

trying to make a joker that retriggers all instances of a different joker, but I think something is wrong with my contexts because nothing prints. I have already set up the optional feature for joker retriggers and have gotten it to work on other things

hollow sphinx
manic rune
#

card.config.center.key refers to the "goldkey" joker

#

so yes, that will never run

hollow sphinx
#

do you know what I could replace it with so that it would work?

umbral zodiac
#

proobabbblyyy context.other_joker

#

im not actually fully sure but that sounds about right

manic rune
#

change card with context.other_card

umbral zodiac
#

bepis is probably more right than i am

hollow sphinx
#

tysm

manic rune
#

np :p

subtle merlin
#

how would i add a card back to the hand that was just discarded or is about to be discarded? (either or)

daring fern
modern kindle
manic rune
#

hi dilly

#

wait what time is it over there

modern kindle
#

Hi bestie

#

It is 0234

manic rune
#

😭

#

why r u up so late

modern kindle
#

I haven't been able to sleep well lately:(

#

Usually 4 am or so

manic rune
#

oof

modern kindle
#

I am laying in bed tho

manic rune
#

that cant be healthy, i hope u can sleep better soon
-# this is coming from someone who sleeps at 3 am daily btw

modern kindle
#

I am appreciative
Im sure on Monday things will even out cause I'll have access to melatonin

#

But I'm in hotel with gf rn without it

#

So no sleepy time meds

manic rune
#

thats nice

#

r things getting better on your side

modern kindle
#

Unfortunately quite literally 0 change

modern kindle
#

But I am doing my best

manic rune
#

oof

manic rune
manic rune
modern kindle
#

I hope it do
Tomorrow we will go to a water park i think so things will be off my mind for a bit

manic rune
#

oo nice

modern kindle
#

Unless for some reason mid water park I come here to see you cool people

manic rune
#

:3

pale holly
manic rune
#

oh wait

#

yeah, probably not a good idea to return mult in context.setting_blind

pale holly
#

oh i guess that could explain, though not sure how come mult became a nil value out of sudden

subtle merlin
pale holly
manic rune
#

use context.joker_main and return mult in there

pale holly
#

It works now thanks !

wintry solar
#

FYI, checking for a multiple of 8 doesn’t guarantee a showdown boss blind

subtle merlin
# daring fern

draw_card(G.discard, G.hand, 90, 'up', nil, discarded_card)?

uncut cloud
#

i'm loosing my mind ive been trying to find out whats wrong for a while
how would yall go about duplicating every joker held?

second image is what a singular joker does

3rd and 4th image are before and after (joker self destructs)

daring fern
subtle merlin
daring fern
uncut cloud
#

i'll try to fix this

daring fern
uncut cloud
#

i think i know what i did

#

gimme a second i may have removed the emplace by accident

#

adding emplace makes the same thing as last time

uncut cloud
#

lemme send the code rq

wintry solar
#

It’s because you’re looping over a table that you keep adding to

uncut cloud
#

that's got to be it

#

i could try to make a local table that holds all the data from the start of the blind and get the info from there

subtle merlin
# daring fern Yes, flag every card that you redraw.

like:

if context.discarded then
    local redo = false
    if discarded_card.ability == G.P_CENTERS.m_fm_overshield and redo = false then
        draw_card(G.discard, G.hand, 90, 'up', nil, discarded_card)
        redo = true
    end
end

?

uncut cloud
daring fern
pine sun
#

ill see what i can do!

daring fern
#

I meant put a flag on the card like card.ability.flagged = true

subtle merlin
#

Would it be just replacing the variable up there with card.ability.flagged?
-# (I doubt it but its my only idea)

daring fern
#

discarded_card.ability == G.P_CENTERS.m_fm_overshield will never be true.

#

Also did you define context.discarded?

#

Also discarded_card doesn't exist.

subtle merlin
#

Noted, i won't trust VS autocorrect again (it said both of those already existed)

stiff quiver
#

How can i check if a card is flipped down?

subtle merlin
daring fern
stiff quiver
daring fern
uncut cloud
#

ah

#

that would make sense

#

lemme try that

zenith sage
#

how would one check for the score (total chips x mult) scored by the current hand only

subtle merlin
uncut cloud
daring fern
daring fern
molten musk
#

morning folks

uncut cloud
subtle merlin
uncut cloud
subtle merlin
#

i saw it mentioned awhile back in the channel

daring fern
molten musk
#
G.GAME.LastTriggeredSeal = card.seal``` 
added this as a global variable to read last triggered seal
but crashes the game
faint yacht
#

Original center may not have self.config.farts, for example, but a Joker can set card.ability.farts.

molten musk
subtle merlin
molten musk
#

what do i do?

daring fern
daring fern
molten musk
#

but shouldnt card exist as a global var in the game files?
or am i understanding it wrong?

zenith sage
#

whats the context for the current blind requirement

molten musk
#

i see

daring fern
#

There are many cards, so why would one random card be global?

molten musk
#

true

stiff quiver
#

I'm sometimes getting this crash when opening the full deck menu. It doesn't seem to be happening consistently. It only happens when there's a negative card in the deck. I think this is the part of the code that is causing it. lua if context.hand_drawn then for i = 1, #G.hand.cards do if G.hand.cards[i].edition and G.hand.cards[i].edition.key == "e_negative" and G.hand.cards[i].debuff then SMODS.debuff_card(G.hand.cards[i], 'prevent_debuff',"any") G.hand:change_size(1) end if G.hand.cards[i].edition and G.hand.cards[i].edition.key == "e_negative" and card.facing == 'front' then G.hand.cards[i]:flip() end end end

molten musk
#

dont know why thought that

uncut cloud
faint yacht
#

For getting last triggered seal... perhaps a Card:calculate_seal(context) hook could be of use.

molten musk
#

whats hook Shy

daring fern
# molten musk whats hook <:Shy:1347341733217701929>
Klei Entertainment Forums

In LUA, it is a very important concept to understand that everything is a variable and all variables may be edited in runtime. This includes functions. With modding other peoples' LUA files, like Klei's basegame code, you may find yourself wanting to run your code before or after the original fun...

molten musk
#

thx

daring fern
molten musk
#

oh

#

i want it to work for all seals

faint yacht
#

Some seals don't really have a "function" of their own, instead being the condition for something to happen.

#

Like such.

molten musk
#

so?

#

they dont have a function? so? cant hook?

daring fern
faint yacht
#

Seals that actively do stuff is what you are likely to focus on.

molten musk
#

u said it wont work on gold blue or purple

daring fern
molten musk
#

i mean, i have an idea that works, but not mod compat

#

i add a variable that is saved localy inside each seal code

#

it will save last triggered one

daring fern
molten musk
#

yep

#

but works

#

but im trying to get it be mod compat

#

thats why im searching for a way to read/save last triggered seal whatever it may be

uncut cloud
# molten musk but im trying to get it be mod compat

the only way i could think of that is somehow saving the last hand played and checking trough the seals of each played card and replace the value you're saving your seal in each card except if it has no seal then you could probably do whatever with the last seal played

#

i mean like
saving the last hand played in a table

#

and checking what cards were played

molten musk
#

but not all seals are played

#

some trigger in hand

uncut cloud
#

then checking trough the seals in those cards

molten musk
#

or discard

uncut cloud
#

ah

#

right

#

i mean you COULD check absolutely everything but that would be hell to code in

daring fern
uncut cloud
#

i just cant think of a good way to get it done tbh since seals are very different one from the other

uncut cloud
#

cyall

stiff quiver
#

this is supposed to flip negative cards that are face down but its not working, whats wrong?

for i = 1, #G.hand.cards do
        if G.hand.cards[i].edition and G.hand.cards[i].edition.key == "e_negative" and card.facing == 'back' then
          G.hand.cards[i]:flip()
        end
end
molten musk
#

like a value in code?

faint yacht
#

You know how Jokers can return { chips = 50 } and such?

molten musk
#

yep

wintry solar
faint yacht
#

Basically that, but with seals.

molten musk
#

blue purple and gold return something? right?

#

red just retriggeres

daring fern
stiff quiver
faint yacht
#

'cause how would you account for this?

molten musk
#

just making sure, patching: i copy same original code and modify a bit ?

molten musk
#

hmm, can u tell me then?

daring fern
molten musk
#

hmm, is it hard?

zenith sage
#

my seal is not using the correct atlas and im not sure why 😔

daring fern
molten musk
#

will look it up

subtle merlin
#

Going back to something from yesterday or the day before that i thought was solved: this code keeps saying 'end' expected (to close 'if' on line 2062) near '=', but i have an end on the next line?
-# went to another issue bc if i work too long on a single issue this late then i burn out

bitter pasture
#

Classic

subtle merlin
#

long sigh at my blindness ty

teal token
subtle merlin
zenith sage
#

does anyone know why

SMODS.Atlas {
    key = "Enhancers",
    path = "Enhancers.png",
    px = 71,
    py = 95
}

this is using the vanilla enhancers atlas

#

when there is an Enhancers.png in my assets folder

wintry solar
ashen ermine
#

Hi, asked before but no answer, how can I set the deck type and stake on this menu in code? Thanks!

subtle merlin
molten musk
#

blank crashes when i try to trigger it

daring fern
molten musk
#

ok

#

nope still same crash

daring fern
molten musk
daring fern
molten musk
daring fern
#

modprefix_key

molten musk
#
G.P.SEALS [ modprefix_key] ........```
#

like this??

daring fern
molten musk
#

oh u mean when i save the var

#

it worked ^^

#

thx

spice wadi
fallow condor
#

To add multiple probabilities on a card, like luckies.
Do I have to use this?

#

nvm

#

I have my answer