#💻・modding-dev

1 messages · Page 316 of 1

lucid owl
#

why is this never being reached? i'm trying to index every joker and add ones with the Food pool (used in many mods) to a list

#

maybe i need to structure it differently

red flower
#

G.jokers is a cardarea, G.jokers.cards is a list of cards in the area

thick panther
#

nvm figured it out:

For anyone looking for it:

card.sell_cost = num
lucid owl
#

this is for a tag that will add a random joker from the Food pool

red flower
lucid owl
#

but i need to do all this indexing because vanilla food jokers exist without that pool

thick panther
red flower
#

you can change extra_cost instead or hook/patch set_cost

tall wharf
#

i discovered that i am fucked

thick panther
#

How did you get a custom font?

tall wharf
lucid owl
red flower
#

i should add a custom font to my mod to display the ☆s

hard needle
#

why do i always have to re-discover my jokesr

spiral hawk
#

FINALLY LMAO

sonic cedar
#

is there a command that lets me spawn a joker into the current shop? trying to see if it renders properly but without the shop

plain apex
#

if there is that would also be helpful for showing off jokers that do something the moment you buy them as well lol

#

like to show off this one i just kept giving myself uncommon tags and rerolling until i found it in shop lol

sonic cedar
#

yeah the thing with mine is the way its sprite is set up you cant load it in the collection so i wanted to spawn it instead

#

but idk how debug mode does it so i cant just tinker my way to a functioning command

crisp coral
tired wharf
#

How would I recreate the "Upgraded!" effect that the hiker does but in a consumable

plain apex
# tired wharf How would I recreate the "Upgraded!" effect that the hiker does but in a consuma...

something like this perhaps but changed for chips?

SMODS.Consumable{
    key = 'Popcorn',
    set = 'Tarot',
    atlas = 'Jokers',
    pos = {x = 3, y = 21},
    loc_txt = {
        name = 'Popcorn',
        text = {
            'Split {C:mult}+20{} permanent Mult across {C:attention}all selected cards{}',
        }
    },
    config = {
        extra = {} -- No selection limit needed
    },
    loc_vars = function(self, info_queue, center)
        return {vars = {}}
    end,
    can_use = function(self, card)
        return G and G.hand and G.hand.highlighted and #G.hand.highlighted > 0
    end,
    use = function(self, card, area, copier)
        if G and G.hand and G.hand.highlighted and #G.hand.highlighted > 0 then
            -- Calculate split multiplier
            local split_mult = math.floor(20 / #G.hand.highlighted)

            for _, target_card in ipairs(G.hand.highlighted) do
                -- Apply split permanent multiplier
                target_card.ability.perma_mult = (target_card.ability.perma_mult or 0) + split_mult

                -- Juice-up effect for feedback
                G.E_MANAGER:add_event(Event({
                    func = function()
                        target_card:juice_up()
                        return true
                    end
                }))
            end
        end
    end,
}
sonic cedar
#

-# please for the love of god tell me i pressed OFF

wintry solar
crisp coral
#

you did not

#

eval SMODS.add_card{ key = "my_joker", area = G.shop_jokers}

plain apex
#

oh i thought they meant the actual effect (perm chips)

crisp coral
#

in a different program replace the key then throw all that into the console

thin anchor
#

is this right for adding a vanilla shader to a joker

tired wharf
tranquil cypress
plain apex
#

like how you gotta unlock blueprint by winning a game to find it

tranquil cypress
#

oh I see, thanks!

midnight coyote
#

how do i make a consumable appear in 2 pools at once

#

like how black hole is in planetand spectrals if i’m not mistaken

#

and how soul is in tarot and spectral

thin anchor
#

ok how about this

hard needle
lucid owl
#

how do you make a legendary joker not show up in the soul?

spiral hawk
#

do i replace the "scored_hand" with "full_hand"?

tall wharf
blissful lance
#

Hi, is there a way to access to all of the registered jokers in the game ?

spiral hawk
shell timber
tall wharf
tall wharf
#

certain enhancements do kinda want to be at the end

#

or some cards might want to be the first

gusty iron
#
    calculate = function(self, card, context)
        if context.joker_main and #context.scoring_hand % 2 == 0 then
            return{
                card = card,
                Xmult_mod = card.ability.extra.Xmult,
                message = 'X'..card.ability.extra.Xmult.." Mult",
                colour = G.C.MULT
            }
        else
            return{
                card = card,
                mult_mod = card.ability.extra.jmult,
                message = '+'..card.ability.extra.jmult.." Mult",
                colour = G.C.MULT
            }
        end
    end,

can someone help me with this? it should work fine, but it keeps on saying mult is nil

tall wharf
#

what the old calc

red flower
tall wharf
#

messages are automatically added

gusty iron
spiral hawk
# red flower whats the issue

i tried to play the ace of hearts in a full hand (two pair, pair, straight, etc.), but it doesn't work and it only works with high card

tall wharf
#

are you using steamodded 1304b

#

for w/e reason

hard needle
hard needle
#

90% of the time its useless probably

tall wharf
#

just makes it a bit annoying

gusty iron
#

how do i check the version of smods im using

red flower
#

top right corner of the main menu

tall wharf
#

which case

gusty iron
tall wharf
#

you can just return the xmult and mult

spiral hawk
#

calculate = function(self,card,context) if context.joker_main then for _, full_hand in ipairs(context.full_hand) do if scored_card:get_id() == 14 and scored_card:is_suit("Hearts") then return { xmult = 3 } end

tall wharf
#

what you wrote is kinda outdated stuff

midnight coyote
#

is it like this

spiral hawk
#

i don't know what i'm doing at this point

tall wharf
red flower
gusty iron
#

whenever i try to use the joker, the game crashes and this happens

red flower
spiral hawk
gusty iron
#

.

#

oh my god im an idiot

#

i forgot to check if the joker was being used

gusty iron
#

so i did

#

joker_main and even hand

hard needle
#

is there a way to just get the suit of a card, rather than having to use is_suit

gusty iron
#

and i ljust slapped on an else

gusty iron
#

without checking if it was just the second condition being false

red flower
#

oh yeah

gusty iron
#

fixed it with an elseif 👍

tall wharf
gusty iron
#

.

#

WHAT ARE THOSE CARDS

#

WHY ARE WE PLAYING SCRABBALATRO

thick panther
#

Should this be rare or uncommon? "Money" in this case is the card's sell value.

red flower
tall wharf
gusty iron
#

oh my god this is so peak

wintry solar
#

man blind calc really fucked with the automatic messages T_T

tall wharf
#

😭

#

what happened

gusty iron
tall wharf
#

no

red flower
#

i noticed that sometimes i had to define a message_card for other_joker now

gusty iron
#

sob

tall wharf
#

not in dictionary

proud moon
midnight coyote
blissful lance
hard needle
gusty iron
#

whats the longest word you can play then

hard needle
#

feel like there's some cool potential with those ngl

lucid owl
#

how do you make a modded legendary joker not show up from the soul?

proud moon
midnight coyote
#

o okay

thick panther
gusty iron
#

boy i do love my EX jokers

tall wharf
#

YOOO IT'S 4/20

red flower
gusty iron
#

gg

willow plinth
#

this is readable code right?

gusty iron
#

thats like

#

13 jokers now

#

im so peak

hard needle
#

quick question, do jokers that say "if blahbalbhah contains a straight" do they take in unscored cards when checking if there's a straight?

gusty iron
proud moon
hard needle
#

i am too smart bro

proud moon
limber blaze
hard needle
#

so it doesn't look cursed

proud moon
red flower
thick panther
proud moon
#

hmm

limber blaze
#

in vanilla impossible

#

but you can do this in vanilla:

#

minus the acended hands stuff

#

but the straight flush calculations are the same

shell timber
#

that's +1?

midnight coyote
#

how am supposed to set boss

#

i mean

#

how am i supposed to tell a boss blind to be a boss blind

limber blaze
#

since the straight only needs 4 cards now

#

the other one is extra

shell timber
#

odd

thin anchor
limber blaze
#

they are wdym

#

totally

midnight coyote
#

hey

#

please

thin anchor
#

stop gaslighting

midnight coyote
#

little help here ;-;

red flower
#

they got added today in 1.1

shell timber
#

as an avid four fingers sflush player it s unfortunately not real

red flower
#

im waiting

hard needle
#

ill just try it with flower pot since that better suits what im trying to look for

proud moon
hard needle
#

ok so flower pot does not take unscored cards

willow plinth
#

guys i‘m really hyped about my progress with my botting and automated testing API mod so far, hope someone will find it useful as soon as i get everything a bit cleaned up and pushed to GitHub

Balatro modding is fun, this scene feels cozy

gusty iron
#

most things like that i normally fix after i send the image and realize

#

"huh. that doesnt look right."

tall wharf
#

why does the card art look fucked up

#

right because k is missing 1 pixel

lucid owl
#

how would you make a card's soul bounce/wiggle like the soul? (as in, the consumable)

thick panther
gusty iron
tall wharf
#

you just forgot about it didn't you

gusty iron
#

....

yes

tall wharf
#

it's ok

#

everyone does

hard needle
tall wharf
#

vro probably copied from jimbo and forget

proud moon
#

but its not my joker, do what you want with it

thin anchor
#

how would i force a shader onto a joker

wintry solar
#

use a drawstep

thin anchor
#

alternatively
is this correct for applying a vanilla shader "hologram" to an edition

wintry solar
#

🤞 automatic messages are fixed 🤞

lucid owl
#

why is my legendary consumable not being added into packs with this exact set? if i remove the line it appears just fine in spectral packs but not the card's base set (being "Silly")

glad osprey
maiden wraith
#

when we generate a "random" value it's actually random, and not based on seed. How could we make it depend on the seed?

glad osprey
#

pseudorandom

blissful lance
#

well that's what we're using

maiden wraith
#

maybe we're using it wrong?

blissful lance
#
local seal = pseudorandom_element(G.P_SEALS)
glad osprey
#

you dont have a pseudoseed in there

maiden wraith
#

so like we're missing an argument?

glad osprey
#

yea

maiden wraith
#

And how would one get a pseudoseed? crying

glad osprey
#

heres how i use it

maiden wraith
#

thanks we'll try this out

#

much love <3

glad osprey
#

just add pseudoseed("whatever you want the seed to be")

maiden wraith
#

we want it to be based on the game seed

#

i bet it's G.seed

#

(no)

glad osprey
#

no

ivory coral
glad osprey
#

that is based on the seed

maiden wraith
#

i see

glad osprey
#

that is just an identifier for the randomizer

scarlet spire
#

whatever you put in pseudoseed() will just make it unique from other psuedorandom generations

hard needle
#

does this joker look "nerdy"

#

does this fella look nerdfy

#

uhh im gonna take that as a yes

old bane
#

yes it does

#

also how would i be able to access the jokers in the shop? i'd like to be able to update their costs

urban wasp
red flower
urban wasp
#

i just found it yea

red flower
old bane
#

also also i think aiko would prolly know this best but like how would i create a little textbox similar to what you'd see in like boss blinds? i wanna use it to show the player a score prediction and I'd like to be able to just put the number there

#

because when i tried to use the chip text it just wouldn't update

steady smelt
#

when it comes to adding in a drawstep between two parts of an existing drawstep (i.e. adding a draw_shader() function between the drawing of the center and front of a card when it has an edition, is the best/only way to do that to patch the existing drawstep? i can't think of a better way since you can't do it with a new drawstep without it being in the wrong order

#

in general the drawing order of drawsteps is very inconvenient if you want to add extra layers between existing layers of a card lol

#

since they draw at different times if the card has an edition

proper lichen
#

i keep getting this error when im trying to make my mod. I'm not sure at thispoint what is causing it.

old bane
#

can i see your json file's code?

proper lichen
old bane
#

change "main.lua" to "Balatrans.lua"

digital niche
#

how do i make it so the card only is removed after it ends scoring?

tall wharf
proper lichen
digital niche
#

in your balatrans.lua i mean

proper lichen
tall wharf
#

what

digital niche
#

what should SMODS.Mods be?

tall wharf
#

i don't think that should even be a thing anymore

digital niche
#

the only thing i see here that mmakes sense for me in parts is the atlas

tall wharf
proper lichen
#

used other people's and my own...

zealous glen
tall wharf
#

to be more exact where did you get that SMODS.Mods part

tall wharf
digital niche
#

also just realized your pfp aint knuckles

zealous glen
proper lichen
tall wharf
#

that's a very old mod

#

you shouldn't use it to base your mod of

south lintel
tall wharf
digital niche
tall wharf
#

what is that

#

what are you trying to achieve

digital niche
#

destroy the card after 3 uses

#

but only be destroyed after scoring

#

it s being destroyed as soon as played

tall wharf
#

wait what are uses

digital niche
#

scoring

tall wharf
#

destroy what card

tall wharf
#

is it a joker

digital niche
#

a enhancement

tall wharf
#

is it an enhancement

#

oh

digital niche
#

that after being scored 3 times it is destroyed

zealous glen
#

also context.destroying_card is a boolean you don't want to manually change it

tall wharf
#

i think you decrease uses in main scoring context

zealous glen
#

or rather

#

you don't want to compare it with a number

red flower
gusty iron
#
loc_vars = function(self, info_queue, card)
        local suits = G.GAME.current_round.j_baguette_ex_suits
        return {
            vars = {
                card.ability.extra.chip_mod,
                localize(suits[1], 'suits_singular'),
                localize(suits[2], 'suits_singular'),
                card.ability.extra.chips,
                colours = {
                    G.C.SUITS[suits[1]],
                    G.C.SUITS[suits[2]]
                }
            }
        }
    end,

a bit of help with this? its saying colours is nil

zealous glen
digital niche
#

that i already got working, i just need to make it only be destroyed after scoring

tall wharf
#

and once that reaches 0 you check for destroy card context and return remove true

zealous glen
#

In my defense it's midnight

#

Aiko might function sleepless but I'm not them

#

I will never be them

digital niche
zealous glen
#

not context.destroying_card

digital niche
#

im so confused

#

the card and uses part is already working, i just need it to only be destroyed after it is scored in the last use

red flower
gentle rain
#

just saw in a video he said this

digital niche
#

i took out the changes i did and it just started working as intended for some reason

zealous glen
gentle rain
zealous glen
gentle rain
#

he HAD to do it intentionally

red flower
#

maybe he forgot

zealous glen
#

He just didn't notice it was in the wrong place

gentle rain
digital niche
zealous glen
#

I think you're overthinking it

#

Thunk didn't realize he let Mime work with Blueprint

red flower
#

I think he either forgot to put it there or you're right but he forgot that he came to that decision when making it

zealous glen
#

I remember during the demo thunk discussing what to do with Blueprint since they didn't want it to include a timing element into it

red flower
#

thunk would hate the moveman

zealous glen
#

(Some) players enjoyed the timing element

zealous glen
red flower
gentle rain
zealous glen
gusty iron
gentle rain
digital niche
red flower
#

i think it's fun but I agree it probably shouldnt work for accessibility, balatro shouldnt be about testing motor skills

zealous glen
zealous glen
gusty iron
gentle rain
#

cause i personally have no clue how to create a mod which overwrites code

zealous glen
zealous glen
ruby delta
#

Anyone, I wanted a small help, one of my joker mods I wanted to make that the copies that are created should be registered in the deck and wanted to make that it multiplies the mults not add so if there is x4 in the scoring and the card is giving x2 than it should be 8 and not 6 like that

Here is the code
SMODS.Atlas {
key = "j_rwby_weiss",
path = "weiss.png",
px = 71,
py = 95
}

SMODS.Joker {
key = 'j_rwby_weiss',
loc_txt = {
name = 'Weiss',
text = {
"If the first hand contains {C:attention}1 card{}, copy it {C:attention}twice{}.",
"Gain {C:money}$5{} for each copy made."
}
},
rarity = 2,
cost = 8,
atlas = 'j_rwby_weiss',
pos = { x = 0, y = 0 },
config = {
copied_this_round = false
},
calculate = function(self, card, context)
if context.end_of_round then
card.ability.copied_this_round = false
return
end

    if context.before and not card.ability.copied_this_round then
        if G.GAME.current_round and 
           G.GAME.current_round.hands_played == 0 and 
           #context.scoring_hand == 1 then
            
            local original = context.scoring_hand[1]
            local dollar_gain = 0
            
            for _ = 1, 2 do
                local copy = copy_card(original, nil, nil, nil, true)
                copy:add_to_deck()
                G.play:emplace(copy)
                table.insert(context.scoring_hand, copy)
                dollar_gain = dollar_gain + 5
            end
            
            ease_dollars(dollar_gain)
            card.ability.copied_this_round = true
        end
    end
    return {}
end

}
The function of the card is that if first hand contains one card, gain 2 copy of that card . Gain 5$ every time a card has been copied

gusty iron
#

its a table consisting of (as the name suggests) 2 suits

red flower
gusty iron
#

the hooks set the table

ruby delta
red flower
#

then i dont understand what you want to add

zealous glen
#

Otherwise, what does the localization look like

tall wharf
gusty iron
gusty iron
#

even the predefined variables

gusty iron
zealous glen
#

the relevant one

gusty iron
#

the suits_singular?

tall wharf
#

i think i just had a stroke reading

blissful lance
#

how can I add back a joker in the pool after I got it ?

zealous glen
#

whatever has variables you're trying to localize

#

I imagine the Joker

gusty iron
#

hold on i think i mightve figured it out

midnight coyote
#

how do i add a joker slot, and how do i check edition on a joker

#

i know how to get jokers

#

but how do i check the edition on one

red flower
midnight coyote
#

so for card limit

red flower
#

card.edition.negative for negatives btw

midnight coyote
#

how do i bind that to a joker

gusty iron
# zealous glen the relevant one

heres the loc_text

        text = {
            "This Joker gains {C:chips}+#2#{} Chips",
            "per scored #3# or #4# card,",
            "suits change every round",
            "{C:inactive}(Currently {C:chips}+#5#{C:inactive} Chips)",
        }
midnight coyote
#

how do i make the extra slots go away when the joker does

red flower
ruby delta
midnight coyote
red flower
#

no

midnight coyote
#

no

red flower
midnight coyote
#

api method

red flower
#

from my mod

midnight coyote
#

hm alright

zealous glen
gusty iron
midnight coyote
#

im just having it iterate over every joker one by one to check for negative, is this correct?

gusty iron
#

heres the loc_vars too

loc_vars = function(self, info_queue, card)
    local suits = G.GAME.current_round.j_baguette_ex_suits or {'Spades', 'Hearts'}
    return {
        vars = {
            suits,
            10,
            localize(suits[1], 'suits_singular'),
            localize(suits[2], 'suits_singular'),
            card.ability.extra.chips,
            colours = {
                G.C.SUITS[suits[1]],
                G.C.SUITS[suits[2]]
            }
        }
    }
end,
midnight coyote
#

okay

ruby delta
red flower
#

I'm saying that I don't understand what you're saying lol

lucid owl
#

why is my legendary consumable not being added into packs with this exact set? if i remove the line it appears just fine in spectral packs but not the card's base set (being "Silly")

midnight coyote
#

so for G.jokers.config.card_limit, when i feed it the value should i just do [var] = [var] + 1

#

when it pops

ruby delta
# red flower I'm saying that I don't understand what you're saying lol

Owh sorry i thought u were busy as you said I don't follow, lol, look my joker creates 2 copies if 1 card is scored in first hand now what I wanted is that those two cards copied should be saved in the deck instead of disappearing and the mults I want them to multiply the scoring mults not add them (now? Was it clear or?)

midnight coyote
#

and i will also have a loc var

#

and then whenever the card is removed, i should do [var] = [var] - [loc_var]

#

i hope this is understandable enough]

red flower
old bane
ruby delta
blissful lance
midnight coyote
red flower
old bane
blissful lance
red flower
#

you probably have to patch get_current_pool then

old bane
#

i think you might have to do a lovely patch in that scenario

red flower
#

you might also be able to do it by setting G.GAME.used_jokers[key] to nil

gusty iron
#

...I FINALLY DID IT

blissful lance
#

Ok I'll try these out thank you very much,

gusty iron
#

yeah it turns out my hooks were way out of wack

old bane
#

btw does anyone know if i can just create a text box on a whim using the update() function?

gusty iron
#

COLORSSSSS

tall kestrel
wintry solar
#

native multi box is life

red flower
#

horizontal boxes when

gusty iron
# gusty iron COLORSSSSS

Also to quickly explain EX jokers

Buffed jokers that require you to have a golden stake on the normal version of the joker

#

I currently have 12 Normal Jokers, and 4 EX jokers

midnight coyote
#

why doesnt this work

wintry solar
#

show me those gloriously large tooltips

daring fern
daring fern
# midnight coyote what

Instead of looking through the jokers you should do if context.card_added and context.card.ability.set == "Joker" and context.card.edition and context.card.edition.negative

midnight coyote
daring fern
midnight coyote
#

if context.card_added and context.card.ability.set == "Joker" then?

daring fern
gusty iron
#

can i use table.find?

red flower
wintry solar
#

they should be in the order you type them

red flower
#

they dont seem to be, unless one of my patches is breaking something

midnight coyote
#

like this

wintry solar
#

can you send me the loc string?

daring fern
midnight coyote
#

oh

#

thats way simpler

#

thank you

wintry solar
#

oh

#

I know what it is

#

it's your typing bit

#

so when it tries to put the extra ones in the 3rd place in the box, that's above the first description instead of after

red flower
#

hmm i dont follow

#

the type stuff is in .name

wintry solar
#

it adds an extra node in

midnight coyote
#

oh when i kill negative it doesnt have time to process that

red flower
midnight coyote
ruby delta
#

@red flower is there a way to show total mults the card is carrying in the tooltip so in changes when the joker card mults increase?

red flower
#

loc_vars?

wintry solar
red flower
#

i can also be lazy and just put the last line first 👍

wintry solar
#

I mean if you want to reorder all of your loc files instead of writing a small patch knock yourself out 🤣

#

looks good though!

#

I was debating adding colour support to it, perhaps another day

red flower
#

i will think about it once i get the energy to go through 300 joker locs

red flower
wintry solar
#

oh I guess you have to update all the locs anyway

ruby delta
true jasper
#

I want to change the art of a joker from another mod using a lovely patch, how would I do that
I know how to do lovely patches but not how to make it use the art from my mod

inner lantern
#

Question, is there any easy way to change which hands contain which other hands?

midnight coyote
#

my evil creature joker has 0.2x mult for every cursed card in the deck

inner lantern
#

im relatively new to modding and I want to add a utility joker that makes all hands contain all other hands

daring fern
inner lantern
#

awww

#

theres no utility function for checking what a hand contains or anything I could patch?

daring fern
inner lantern
#

hmmm

#

that would work

#

except it’d make every hand count as a flush five right? or whatever the strongest hand is

#

I’ll try it later today tho

daring fern
midnight coyote
#

how do i do the end of round money like cloud 9 or golden joker

red flower
midnight coyote
#

how do i do a shifting color like negative does

red flower
midnight coyote
#

and then key is what i reference it to

#

in the C: tag

#

right

red flower
#

i think it should be modprefix_key yeah

midnight coyote
#

kk

rapid stag
red flower
#

🧙‍♂️

#

(he just added it to smods if that's what you're asking)

high sinew
#

ok ive got a slightly weird issue my snack cards and booster are being added no problem but the jokers dont get added to collection did I do something wrong?

rapid stag
high sinew
#

i can send a joker file if needed

red flower
rapid stag
#

i see

high sinew
#

im not sure what u mean

red flower
high sinew
#

ohh ok bet

faint yacht
#

me when I

for _, file in ipairs{...} do -- ... is just a list of filenames here.
    assert(SMODS.load_file("items/"..file))()
end
red flower
#

me when im evil

local others_src = NFS.getDirectoryItems(SMODS.current_mod.path .. "src/others")
for _, file in ipairs(others_src) do
    assert(SMODS.load_file("src/others/" .. file))()
end
rapid stag
# wintry solar native multi box is life

outside of the SMODS change to make this natively work with loc_text.text/loc_text.description, would this also be possible via main_end or would it have to be done via generate_ui()?

high sinew
#

so should I just change jokers?

#

i found issue SMODS.Joker had " = {" no = XD

faint yacht
#

¯_(ツ)_/¯

rapid stag
#

oh, right

#

so i'm writing a new joker and my plan for it is to have, among other things, the name change based on certain conditions. i know about description changing via main_end and other stuff, but how do i change the name on the fly? cirThink

faint yacht
#

Just the name?

blissful lance
#

how can I apply a sticker using a spectral card, I know that there's an "apply" method but I dont know where or how to use it

rapid stag
red flower
#

return a key in loc_vars then

#

like this

rapid stag
red flower
#

it changes the name and description to that key

#

you can also change the set

rapid stag
#

ah, so i need corresponding items in localization, then

red flower
#

yes

faint yacht
#

I've done something like that for my Seal^2 and the 2 upgrade vouchers.

red flower
#

Egg.

faint yacht
#

-# heccin' image layout, Discord-

#

Wrap the code in
```lua
...
```

high sinew
#

yea sorry my computer is annoying

high sinew
#

crashing here I need to define certain jokers in sets for some cards functions idk if right way

#

do i add this in main

faint yacht
#

...should it not be ['Joker'] = true?

high sinew
#

wdym?

#

dont you want it true to register?

faint yacht
#

G.P_CENTER_POOLS["Joker"]

#

Joker = true > ['Joker'] = true

high sinew
#

for the joker pools code?

faint yacht
#

If this is supposed to be a Joker and you're adding it via SMODS.Joker... why the manual inject attempt?

high sinew
#

i thought u had to since its in a different folder

#

load it into main one

faint yacht
#

Nope.

high sinew
#

so what am i supposed to do im not really understanding what ur saying tbh

faint yacht
#

If this is a Joker being defined, just ignore the pool stuff as it's handled automatically.

high sinew
#

ok I just added pools variable in becuase it still wasnt regerstering in my main idk why i can send the main file again and ex of joker

#

ive tried what u said and hasnt worked

faint yacht
#

fwiw, I have a "pool" of my own defined in the main file and, at the bottom of said file, I do the loading of other .lua scripts to load the actual content, like the Jokers and such.

GitHub

A personal timewaster project that is a mod for Balatro. - TheOneGoofAli/TOGAPackBalatro

GitHub

A personal timewaster project that is a mod for Balatro. - TheOneGoofAli/TOGAPackBalatro

high sinew
#

ok thank you visual is a lot easier to interpret

faint yacht
#

-# The main file was getting a bit too big to scroll through, so I split it off into many parts.

high sinew
#

nah i get what u did tho so ill prob just input manually

thin anchor
#

is this correct? trying to figure out how shaders work on editions
the foil shader is from vanilla

gusty iron
#

how do i get the most played hand?

high sinew
#

i just wanna keep orginized

willow plinth
#

if not, print(tprint(G.GAME)) should help you

faint yacht
high sinew
#

no i took out...

#

after u said too

faint yacht
#

Send the pimento_pepper one over?

high sinew
#

here

faint yacht
#

...hm, all appears well. What of your SMODS - tried updating it?

high sinew
#

i changed the jokers loading to how u did it but kept the boosters same since they were fine before

faint yacht
#

-# ...wait, did you even define a 'Pepper Jokers' set?

high sinew
#

wdym?

#

i thought u said i didnt need to

faint yacht
#

set = 'Pepper Jokers', is still there.

high sinew
#

oh so you dont need that?

faint yacht
#

Remove (or comment out) the set = line in your Jokers and try loading.

high sinew
#

k

digital niche
#

telescope does this

#

how come i can find those things for anyone but for me

high sinew
faint yacht
#

-# Did you update SMODS?

high sinew
#

yea mines been updated

digital niche
#

how do i make that little animation of the card being created in the screen then going to the deck like the marble joker?

#

i already looked at the marblee joker code but didnt understand

high sinew
high sinew
faint yacht
#

For consumables, need the set.

high sinew
#

mm right

digital niche
tired wharf
#

Anyone know why I am getting this error whenever I hover over a booster pack with this code

faint yacht
high sinew
#

send me the lua code of marble joker plz i can figure out how to do other part

high sinew
digital niche
red flower
digital niche
high sinew
#

ya feel free to dm me ive made tons of joker ideas i bet i can help

faint yacht
#
if self.ability.name == 'Marble Joker' and not (context.blueprint_card or self).getting_sliced  then
    G.E_MANAGER:add_event(Event({
        func = function() 
            local front = pseudorandom_element(G.P_CARDS, pseudoseed('marb_fr'))
            G.playing_card = (G.playing_card and G.playing_card + 1) or 1
            local card = Card(G.play.T.x + G.play.T.w/2, G.play.T.y, G.CARD_W, G.CARD_H, front, G.P_CENTERS.m_stone, {playing_card = G.playing_card})
            card:start_materialize({G.C.SECONDARY_SET.Enhanced})
            G.play:emplace(card)
            table.insert(G.playing_cards, card)
            return true
        end}))
    card_eval_status_text(context.blueprint_card or self, 'extra', nil, nil, nil, {message = localize('k_plus_stone'), colour = G.C.SECONDARY_SET.Enhanced})

    G.E_MANAGER:add_event(Event({
        func = function() 
            G.deck.config.card_limit = G.deck.config.card_limit + 1
            return true
        end}))
        draw_card(G.play,G.deck, 90,'up', nil)  

    playing_card_joker_effects({true})
end
high sinew
#

adding cards in deck is easy so i got u

tired wharf
red flower
tired wharf
red flower
#

oh sorry, loc_vars should be a function
i didnt notice that

tired wharf
#

oooooohhhhhhhhhhhhhh whoops

#

thanks

high sinew
#

@faint yacht ur a legend bro it worked thx so much solved an error i could not get XD

gusty iron
#

how do i check if a card is a facecard?

#

i normally check if its within ranks 11~13, but i realized that doesnt work with the one joker

faint yacht
#

:is_face()

plain apex
#

can a seal check for when its drawn?

gusty iron
#

jippie

sturdy compass
weak gate
#

How do I make playing cards in the shop free?

worldly thicket
#

Is this the right way for a joker to destroy itself

weak gate
#

remove(self, card, context, true) was what I did recently @worldly thicket

high sinew
#

@faint yacht finally seeing my jokers in game is so satifying all thanks to u 🙌 clutch coder in the house

worldly thicket
#

It's saying it's an undefined global

sturdy compass
#

Anyone have an example of adding cards to your deck with a back? Nvm, found one!

weak gate
worldly thicket
#

that seems to work

#

Is this the right way to do odds?

weak gate
#

It won't be affected by oops all 6's, do you want that?

tired wharf
#

how do I get the create card part of a booster pack working

worldly thicket
weak gate
#

Hmmm wait you have a 4-way (40% to do nothing) probability check, which is probably best not to involve Oops. Since which odds would go up?

worldly thicket
weak gate
#

that's just preference

worldly thicket
#

Alright, but with my current set up it will work?

weak gate
#

seems like it will work, 20% chance of xmult, 20% of chips, 20% of destruction, 40% of doing nothing

proud moon
#

does anyone have a list of EVERY Smodded function, context, and whatnot?

#

the smoded docs has a lot, but i know its missing some stuff and id love to know what im missing out on

brazen tusk
#

anyone know whats up here?

Syntax error: card.lua:5360: 'end' expected (to close 'function' at line 828) near '<eof>'


Additional Context:
Balatro Version: 1.0.1o-FULL
Modded Version: 1.0.0~BETA-0419b-STEAMODDED
LÖVE Version: 11.5.0
Lovely Version: 0.7.1
Platform: Windows

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

have you checked for missing commas or end

worldly thicket
weak gate
#

well, put a print after you roll it so you can see which number is failing to do stuff
it might be _pool == 2, that ease_chips inside the return statement seems suspect

worldly thicket
brazen tusk
#

wasn't even turned on

proud moon
#

ah

#

thats

#

odd

brazen tusk
#

quite

worldly thicket
#

@weak gate I found out, it's when _pool == 3, the Joker doesn't destroy itself

weak gate
#
          card:remove()
          card = nil
``` maybe do all these to destroy itself...?
tired wharf
#

how do I get the create card part of a booster pack working
(my current code)

weak gate
worldly thicket
#

How can I make a return that levels up a random poker hand by a random amount

wild escarp
#

Could someone give me a rundown on what I need for my json file?

daring fern
tired wharf
proud moon
#

how does one reference the name of the currently played hand?

worldly thicket
proud moon
#

that works!

#

thank you

tired wharf
#

does anyone know why I am getting this error when I open this booster pack

worldly thicket
weak gate
#

hmm there's a start_dissolve() function

willow plinth
#

there's also Card:explode

cerulean rose
#
SMODS.Consumable({
    key = "rchariot",
    set = "Tarot",
    pos = { x = 2, y = 1 },
    atlas = "rtarots",
    config = { extra = get_starting_params().hand_size },
    set_ability = function(self, card, initial, delay_sprites)
        card.ability.extra = G.GAME and G.GAME.starting_params.hand_size or self.config.extra
    end,
    loc_vars = function(self, info_queue, card)
        table.insert(info_queue, G.P_CENTERS.m_steel)
        return { vars = { card.ability.extra, G.hand and math.max(G.hand.config.card_limit - card.ability.extra, 0) or 0 } }
    end,
    can_use = function(self, card)
        return #G.hand.cards > 0 and G.hand.config.card_limit > card.ability.extra
    end,
    use = function(self, card, area, copier)
        local targets = {}
        local valid_targets = copy_table(G.hand.cards)
        for _ = 1, G.hand.config.card_limit - card.ability.extra do
            local new_target = pseudorandom_element(valid_targets, pseudoseed("rchariot"))
            targets[new_target] = true
            for i, held_card in ipairs(valid_targets) do
                if held_card == new_target then
                    table.remove(valid_targets, i)
                    break
                end
            end
        end
        local modification_list = {}
        for _, hand_card in ipairs(G.hand.cards) do
            if targets[hand_card] then
                table.insert(modification_list, hand_card)
            end
        end
        modify_cards(modification_list, function(target)
            target:set_ability(G.P_CENTERS.m_lucky)
        end)
    end,
})

using this consumable causes the game to close with no error message

iron haven
#

I don't know if I should do L today or not.

willow plinth
#

or all loops fwiw

digital niche
#

im getting a crash everytime the joker is activated

cerulean rose
#

skipping the first loop has no effect

heady glen
#

What do you guys think of these designs?

cerulean rose
#

commenting out both loops doesn't fix anything actually

daring fern
tired wharf
cerulean rose
#

no freeze

heady glen
cerulean rose
#

also here's the definition of modify_cards

---Modify cards with the tarot animation
---@param targets Card[]
---@param modification fun(card: Card): nil
local function modify_cards(targets, modification)
    for i, target in ipairs(targets) do
        G.E_MANAGER:add_event(Event({
            trigger = 'after',
            delay = 0.15,
            func = function()
                target:flip()
                play_sound('card1', 1.15 - (i - 0.999) / (#targets - 0.998) * 0.3)
                target:juice_up(0.3, 0.3)
                return true
            end
        }))
    end
    delay(0.2)
    for i, target in ipairs(targets) do
        G.E_MANAGER:add_event(Event({
            trigger = 'after',
            delay = 0.1,
            func = function()
                modification(target)
                return true
            end
        }))
    end
    for i, target in ipairs(targets) do
        G.E_MANAGER:add_event(Event({
            trigger = 'after',
            delay = 0.15,
            func = function()
                target:flip()
                play_sound('tarot2', 0.85 + (i - 0.999) / (#targets - 0.998) * 0.3, 0.6)
                target:juice_up(0.3, 0.3)
                return true
            end
        }))
    end
    G.E_MANAGER:add_event(Event({
        trigger = 'after',
        delay = 0.2,
        func = function()
            G.hand:unhighlight_all(); return true
        end
    }))
    delay(0.5)
end
#

this works with another card i used tho

daring fern
tired wharf
manic rune
#

aaaa iaaa iaa

cerulean rose
#

game does not crash if the entire use function is commented out

daring fern
tired wharf
# heady glen Gotcha

i'd also reconmmend that you look at the base game jokers to get an idea of how they look

cerulean rose
#

copy_table(G.hand.cards) seems to be causing the crash

#

apparently copy_table is a deep copy!?

#

since when!?

worldly thicket
#

How can I increase the level of a random poker hand

hushed estuary
#

Is there a way to target all files at once with lovely

cerulean rose
willow plinth
tired wharf
cerulean rose
#

use SMODS.create_card

daring fern
cerulean rose
#

ok i fixed my issue

#

just had to shallow copy manually

worldly thicket
cerulean rose
#

where are you finding this?

tired wharf
cerulean rose
daring fern
worldly thicket
#

Ah, I just saw the Space Joker's code and went with it

daring fern
#

Also you should be using card not self

tired wharf
cerulean rose
willow plinth
#

in the future you could find this out looking at other's code or yes, the docs

hushed estuary
daring fern
tired wharf
willow plinth
#

that's why i recommend downloading some docs locally regularly, and then searching through them with vscode or whatever

tired wharf
#

alr

hushed estuary
willow plinth
hushed estuary
#

I'd like to patch all lua files of the game with basically the same thing

willow plinth
#

oh

hushed estuary
#

And it's not very convenient to do it for every file separately

willow plinth
#

you could write an external script that does the mundane work for you - other than that idk, sorry

hushed estuary
#

Nah no problem

worldly thicket
proud moon
willow plinth
daring fern
#

It worked for me.

worldly thicket
#

is it the color?

daring fern
worldly thicket
#

It was the color

willow plinth
orchid nest
#

How do you check for WoF fails?

#

I tried checking cryptid but I can not find the code where the "Celestial Globe" is

cerulean rose
#

the heck is Celectial Globe

#

you should be looking for Wheel of Hope

orchid nest
#

idk man

#

im just checking chat history

#

it was labelled apparently on the wiki as "Celestial Globe"

daring fern
orchid nest
#

i was confused :p

orchid nest
#

wait nvm

#

i think i found it

daring fern
copper lion
#

Looks like using any multi-use card added by cryptid will instantly crash the game

#

3rd time now that I tried to use a multi-use followed by an instant crash

copper lion
#

I tried it with a different code card that also said "Multiuse: (2 remaining)" with even less mods than I have now

#

and it caused a similar crash

#

I tried it again, the exact same thing, and it didn't crash this time

#

K it looks like it does the crash if you have multiple consumables when you use the card

rustic swallow
#

does anyone know why this doesnt work

        if context.individual and context.destroy_card and context.cardarea == G.play then
            if pseudorandom('burn',G.GAME.probabilities.normal) <= G.GAME.probabilities.normal/card.ability.extra.odds then
                card.ability.extra.Xmult = card.ability.extra.Xmult + 0.25
                return {
                destroy_card = card,
                message = ('Burning!'),
                colour = G.C.ATTENTION,
                }
            end
        end
        if context.joker_main then
            return {
            Xmult = card.ability.extra.Xmult
            }
        end
    end
} ```
true jasper
willow plinth
#

first step: learn to screenshot CringeHarold

faint yacht
#

Could such be animated?

daring fern
true jasper
heavy hare
#

i seemingly keep getting this error when removing a UI box: engine/ui.lua:396: attempt to index field 'object' (a nil value)

is there any reason this would be causing that?

if self.uibox then self.uibox:remove() end
#

if i remove that line, it works perfectly, just doesn't clear the UI box

#

this is the definition of the UI box:

self.uibox=UIBox{
  definition=def,
  config={
    major = G.HUD:get_UIE_by_ID('blind_tracker'),
    align = 'cm',
    offset={x=0,y=0},
    colour=G.C.CLEAR,
  }
}
#

i guess i would need to show def but it's rendering fine otherwise

willow plinth
hot island
#

not exactly a mod but im working on something using nodejs canvas that can display a game state

#

this entire ui (other than the images obviously) were generated programmatically from the game state

#

still gotta add cards

#

but it shouldnt be too hard

#

i also need to make it so the deck in the bottom right can change size (right now the deck stack is just an image other than the top card)

#

and i need to handle selected cards for the cerulean bell

shell timber
#

one nitpick: the jokerdisplay textboxes seem slightly too short

hot island
#

because right now the chips and mult display will always say 1

hushed field
#

I'm entirely unfamiliar with what nodejs canvas is, but I'm very interested haha

shell timber
#

it's a library for node.js that lets you draw images

shell timber
#

seems close enough. it doesn't really matter

hot island
#

i also thought it looked a little short but i thought copied the exact value from the screenshot i took

#

turns out i was 2 pixels off

shell timber
#

here's a screenshot of it

#

might still be a bit short (?)

hot island
#

gimp says its 47 pixels

shell timber
#

oh it's probably rendering below the jokers

#

so it looks shorter on the top half

hot island
#

either way im not copying jokerdisplay functionality entirely

shell timber
#

yeah fair enough

hot island
#

i just figured id use the ui as inspiration

#

i just wanted to use it to easily show where scaling jokers are

#

wait i just realized i would need 2 for yorick

#

me when i cant hard code because of one joker

hot island
#

to be used for a discord bot and/or over sms

#

i already made a bot that can recieve and send text messages from my phone

#

so i figured itd be cool to make balatro

#

localthunk please dont kill me

shell timber
#

oh on the topic of balala discord bots

hot island
#

but yeah if its text based its pretty important that i show the details of cards because you wouldnt just be able to hover over it quickly

shell timber
#

what would probably be useful is being able to do like [[Baseball Card]] and having a message show up with the joker's effect and art

hot island
#

sounds pretty easy

runic pecan
#

Does calculate return table support delay?

hot island
wintry solar
wintry solar
runic pecan
wintry solar
#

Uhhh it might do, just give it a try

#

@daring fern what situation are you experiencing missing messages?

daring fern
wintry solar
#

what have you used to test this

daring fern
hushed field
#

what exactly does the 'destroying_cards' cardarea in calculate context target?

#

wait, i'm not even sure if that's standard smods or just in my dump due to another mod patching it in

#

I'm not entirely sure how the game handles the cardareas that are presented as strings

daring fern
runic pecan
#

Is this the correct way to reduce the score requirement by 10%?

wintry solar
daring fern
wintry solar
#

Can you record?

daring fern
wintry solar
#

How does it look with chad?

daring fern
wintry solar
#

So chad works fine?

daring fern
wintry solar
#

Huh

willow plinth
hard needle
#

how would pareidolia's is_face hook look like

#

nevermind i found it

high sinew
#

my pepper isnt evoliving to the 'anaheim chile' correctly am i doing SMODS.create_card right?

faint yacht
#

Replace SMODS.create_card with SMODS.add_card and key = 'anaheim_chile' with key = 'j_mills_anaheim_chile'.

faint yacht
high sinew
#

kk

high sinew
faint yacht
#
local newcard = SMODS.add_card{...}
newcard.ability.extra.mult = card.ability.extra.mult
high sinew
hot island
#

well technically not finished i still need to make the editions for them

#

i dont generate the editions live i have folders like jokersbase, jokersfoil, jokersholographic, etc.

daring fern
#

Is there a way to make scoring happen twice?

hot island
#

so i just gotta do that for the card backs and overlays

crisp coral
#

did you manually make one version for every edition instead of applying a shader...

hot island
#

i made a script to mass convert them

#

i dont know of a way to apply a shader with nodejs canvas

#

im sure there is one

#

but it was just easier to make the images instead

crisp coral
#

how would you be able to get a card's rotation exactly right on the canvas

hot island
#

it was just based on the distance from the center of the card area

#

the closer it is to the center the less rotation it has

crisp coral
#

oh right there's uh reduced motion

hot island
#

oh yeah

#

that ss was taken with reduced motion

#

yeah otherwise theyd be moving all around

#

i could always add some randomization to the rotation once im done

#

but even without it i think it looks great

#

i sure cant wait to recreate the shop screen and the blind screen once im done with this

#

and then rewrite the game logic in js

#

luckily i can borrow the balatro calculator code for the game calculations

#

but i still gotta make everything else

heavy hare
# heavy hare this is the definition of the UI box: ```lua self.uibox=UIBox{ definition=def,...
  local def = {n=G.UIT.ROOT, config={align = "cl"}, nodes={
    {n=G.UIT.R, config={align="cl",maxw=2.075},nodes={
        self:get_sprite("Small"),
        self:get_sprite("Big"),
        self:get_sprite("Boss"),
    }}
  }}

^ that's the def for the UIBox, all the get_sprites is markup with the sprites in them as object nodes. is that the "object" it says in the error can't find? do i have to make a UIBox for every object?

#
              n = G.UIT.C,
              config = {align = "cm"},
              nodes = {
                {
                  n = G.UIT.R,
                  nodes = {
                    { n = G.UIT.O, config = { object = blind_sprite } }
                  }
                },
                blind_preview_ui and { n = G.UIT.R, config = { align = "tm" }, nodes = { blind_preview_ui }},
                {
                  n = G.UIT.R,
                  config = { align = "cm" },
                  nodes = {
                    tag and {
                      n = G.UIT.C,
                      config = {align = "cm"}, nodes={{ 
                        n = G.UIT.O, config = { id = choice.."_tag_sprite", object = tag_sprite, colour=G.C.CLEAR
                      }}}
                    }}
                },
              }

does it have an issue with the nodes being made from booleans?

wintry solar
#

Add an or nil in any logic to add nodes

heavy hare
#

still getting attempt to index field 'object' (a nil value)

            {
              n = G.UIT.C,
              config = {align = "cm"},
              nodes = {
                {
                  n = G.UIT.R,
                  nodes = {
                    { n = G.UIT.O, config = { object = blind_sprite } }
                  }
                },
                blind_preview_ui and { n = G.UIT.R, config = { align = "tm" }, nodes = { blind_preview_ui }} or nil,
                {
                  n = G.UIT.R,
                  config = { align = "cm" },
                  nodes = {
                    tag and {
                      n = G.UIT.C,
                      config = {align = "cm"}, nodes={{ 
                        n = G.UIT.O, config = { id = choice.."_tag_sprite", object = tag_sprite, colour=G.C.CLEAR
                      }}}} or nil
                    }
                },
              }
            } or nil
faint yacht
heavy hare
#

okay it's not happening on remove nvm

heavy hare
#

oh it was deleting the references to the AnimatedSprites on :remove() lmao

reef belfry
#

i can never EVER spell it correctly on the first try

rapid stag
unborn bay
#

atleast that's already if you already have generate_ui setup in your card of choice

rapid stag
unborn bay
#

if you wanna see how the text description is actually parsed you might want to look into localize for that

cursive sentinel
#

got a joker that makes diamonds considered kings, although it doesnt interact with wild, and i dont seem to find how to hook wild cards info (tried ability == 'Wild Card', and ability.name == 'Wild Card'), any idea?

#
if next(SMODS.find_card('j_drx1_dauphine')) and (suit == 'Diamonds' or ability == 'Wild Card') then```
here, doesnt take the ability into account, guess thats because it's not how it's called, and no clue on how it would be
#

(bonus, how do you declare a card as a face separately to it's rank? card.is_face = true ?)

#

or shall i do a separate hook perhaps

sacred lava
#

Anybody got a good resource to start with? I have some experience with lua but looking at some of the other mods it seems a bit overwhelming

#

I tried looking for an example mod but couldnt find anything

stiff locust
#

github/smods/example_mod

faint yacht
cursive sentinel
#

will check your code to see if there's my answer

#

but doens't seem to activate on wild cards for now, and doesn't count as faces

#

i see you've separated it clearly per thing, like issuit, isid and isface

faint yacht
#

You can do the SMODS.has_enhancement(card, 'm_wild') to check if it has the Wild enhancement.

cursive sentinel
#

in the ifs? will try

#

had to replace the card with self but works with wilds now, thx !

#

i see that you did another iscardref with also pareidolia in it

#

is it necessary to do an additional checking in a hook like that to ensure the transformed card's id to be seen also as isface ? and to put pareidolia in it too to make sure it doesnt somehow misinteract with the base game code?

faint yacht
#

I put it there just in case.

cursive sentinel
#

i think i'll do it too then 😂

willow plinth
#

my pixel art (bottom) vs the pixel art she tells me not to worry about (top)

cursive sentinel
# faint yacht I put it there *just in case*.

did i do it wrong? the diamond cards are still showing normally even against the boss that flips face cards, idk why

local isfaceref = Card.is_face
function Card:is_face(from_boss)
    if self.debuff and not from_boss then return end
    local suit = self.base.suit
    if next(SMODS.find_card('_drx1_dauphine')) and (suit == 'Diamonds' or SMODS.has_enhancement(self, 'm_wild')) or next(find_joker("Pareidolia")) then
        return true
    end
    return isfaceref(self, from_boss)
end```
rapid stag
reef belfry
#

how do you check if a planet card of most played hand is being used

faint yacht
#

Missing a j there?

cursive sentinel
#

...thank you

#

all works fine now, thx !!

faint yacht
#

For you can't Wee.

cursive sentinel
#

Lol

#

a friend of mine wanted me to make heart card considered as 2s

#

it's very stupid (i might do it)

brisk rose
midnight coyote
#

how do you look at currently selected cards

faint yacht
#

I blame @marsh radish for having me end up processing this sheet into the 4 atlases for the 4 DeckSkins.

#

G.hand.highlighted

midnight coyote
#

this is a list?

faint yacht
#

ye.

midnight coyote
#

alright, many thanks

#

im just implementing all the stuff i have art for lol

midnight coyote
#

Is this valid

rapid stag
wintry solar
#

Just put a table of tables as your loc description

midnight coyote
#

no it would be ability, right

#

because ability is enhancement

#

which ability is a string

rapid stag
wintry solar
#

Like what?

rapid stag
wintry solar
#

That’s absolutely possible

rapid stag
midnight coyote
#

for the can_use function of my consumable, how would i check for an enhancement on both cards

#

do i just do an or statement

rapid stag
#

but i already have the ui code, why can't i just do this via generate_ui() that way i can also keep my animatedsprite

midnight coyote
#

for looking for an enhancement on either

faint yacht
#

If one of them has it or both?

rapid stag
#

i just don't know what i'm doing wrong

midnight coyote
wintry solar
#

Then just carry on using your code if it works

midnight coyote
#

or either i mean

faint yacht
#

or.

midnight coyote
#

so if G.blahblahblah[1].ability = "blahblahblah" or G.blahblahblah[2].ability = "blahblahblah"

#

and this wont error out if the second index simply isnt present, right?

daring fern
midnight coyote
#

how do i remediate this

crisp coral
faint yacht
#

if (G.hand.highlighted[1] and G.hand.highlighted[1].ability) or (G.hand.highlighted[2] and G.hand.highlighted[2].ability)

midnight coyote
#

got it

#

and does this work\

#

you put else statements before the end if im not mistaken

#

wait why am i asking ive just ought to see if it works

faint yacht
#

Sometimes it is needed.

#

Though, sometimes, it can be as simple as

can_use = function(self, card, area, copier)
  return G.playing_cards and #G.playing_cards > 1
end,
rapid stag
#

...i'm gonna have an aneurysm girldmDeadplease. i just want to know why my code in generate_ui() is:

  • removing the joker's name
  • not splitting into multiple boxes
    that's all. i'm not shopping for alternate solutions to this
crisp coral
#

wdym by splitting into multiple boxes

#

also full_UI_table.name = localize{type = 'name', key = desc_key, set = self.set, name_nodes = {}, vars = specific_vars or {}}

#

you might also want to worry about the debuffed and undiscovered descriptions

if not self.discovered and card.area ~= G.jokers then
    localize{type = 'descriptions', key = 'und_'..self.key, set = "Other", nodes = desc_nodes, vars = vars}
elseif specific_vars and specific_vars.debuffed then
    localize{type = 'other', key = 'debuffed_default', nodes = desc_nodes}
else
    -- your custom ui
end
unborn bay
wintry solar
#

Because you’re editing generate ui wrong

red flower
wintry solar
#

Just do it in the easy way

wintry solar
#

Use main_end to put your sprite at the end of the main box, and then use the new feature for your multiple boxes

crisp coral
#

if it doesnt appear then it probably doesnt exist

#

what new feature whuh

rapid stag
#

new with newest smods version

#

you can populate loc_text descriptions with multiple tables of text and it'll do that

unborn bay
#

new smods feature that allows for multiple [[[box]]]

#

the method im currently using just uses a lovely patch to do it

crisp coral
#

oh cool

#

i dont need it

wintry solar
#

Super easy to do

crisp coral
#

wait what the fuck do you mean by multiple tables of text

wintry solar
#

So you know how descriptions are normally tables of strings?

#

Just use a table of those tables

crisp coral
#

god

rapid stag
#

as in

loc_text = {
  name = 'bla',
  text = {
    { 'hi' },
    { 'xd'  }
  }
}
crisp coral
#

what the fuck is a backwards compatibility 🔥🔥🔥

unborn bay
# wintry solar

i would switch to this if you had the ability to change the boxes' color which doesn't seem to be the case currently

wintry solar
#

Yeah I was considering colours

unborn bay
#

that and i don't want to update to a dev smods version just yet

crisp coral
#

is it only for descriptions type loc

wintry solar
midnight coyote
#

is this a little too unreadable

crisp coral
#

return #G.jokers.cards > 0

#

pls

midnight coyote
#

thats alot simpler

wintry solar
midnight coyote
#

why isnt this being reached?

#

here's the whole use func

crisp coral
#

lol of course my blind passive system doesnt work with it

midnight coyote
#
 use = function(self, card, area, copier)
    local potential_victims = {}
    for i = 1, #G.jokers.cards do
      if G.jokers.cards[i]:can_calculate(true) and not G.jokers.cards[i].ability.eternal then
        table.insert(potential_victims, G.jokers.cards[i])
      end
    end

    local victim = pseudorandom_element(potential_victims, pseudoseed("I LOVE AMONG US"))
    if not victim then return end -- Safety check

    victim.getting_sliced = true
    G.GAME.joker_buffer = G.GAME.joker_buffer - 1

    -- Store reference in local variable for closure
    local dissolve_target = victim
    G.E_MANAGER:add_event(Event({
      trigger = 'immediate',
      blockable = false,
      func = function()
        if dissolve_target and dissolve_target.start_dissolve then
          dissolve_target:start_dissolve()
        end
        G.GAME.joker_buffer = 0
        return true
      end
    }))
    --[[ And Thus begins  the part where i purify the cards. I'm not worried for if they are cursed or not, thats checked in can_use...
    -- Now, in a perfect world only cursed cards will be selected, but I'll make sure that the cards are cursed before operating on them.--]]
    for i = 1, #G.hand.highlighted do
      if G.hand.highlighted[i].ability == "m_astropulvis_cursed" then
        G.hand.highlighted[i]:juice_up(0.3, 1)
        G.hand.highlighted[i]:set_ability("m_astropulvis_purified")
      end
    end
  end,
unborn bay
#

what kind of seed name is "I LOVE AMONG US"

#

😭

crisp coral
#

a based one

midnight coyote
zealous glen
crisp coral
#

what character

hearty mesa
#

Is there a similar function to SMODS.current_mod.reset_game_globals(run_start) that is called every ante?

midnight coyote
#

so uhh

#

why is my if statement not reachable

zealous glen
midnight coyote
#

below the event

crisp coral
zealous glen