#💻・modding-dev

1 messages · Page 593 of 1

wicked leaf
#

but I can't do that obviously

twilit tundra
#

wouldnt just swapping the < for a <= do it

wicked leaf
#

uhhhh lemme try actually

slim ferry
#

would still only select 1 hand

wicked leaf
#

yeah

#

it would choose the last one of the tied, wouldnt it

#

let me try something

slim ferry
#

last tied one i think

twilit tundra
#

wait hang on is it.
not doing it based off of the hand you play?

slim ferry
#

oh actually

twilit tundra
#

this check feels weird why not just check whether the hand you're playing is valid for being levelled up

slim ferry
#

what you could do is

#

if theres a tie, check if the current hand is the played hand

#

and then ignore the hand if so

wicked leaf
#

What the code is doing

loops through all the cards
selects the one that has the least uses
if the played hand is equal to that hand, level it up

daring fern
# wicked leaf let me try something
if G.GAME.hands[context.scoring_name].played <= 1 then
    return {func = function()
        SMODS.smart_level_up_hand(card, context.scoring_name)
    end}
end
local hands, played = {}, math.huge
for k, v in pairs(G.GAME.hands) do
    if SMODS.is_poker_hand_visible(k) then
        if v.played < played then
            hands = {[k] = true}
            played = v.played
        elseif v.played == played then
            hands[k] = true
            played = v.played
        end
    end
end
if hands[context.scoring_name] then
    return {func = function()
        SMODS.smart_level_up_hand(card, context.scoring_name)
    end}
end
```?
twilit tundra
wicked leaf
slim ferry
#

no because

wicked leaf
slim ferry
#

what if there is another less played hand

#

you cant know until you check every single one

twilit tundra
# wicked leaf yes but only 1 at a time

okay then simple, just don't store it and instead calculate it on an individual hand basis

when a hand is played, check if that hand specifically is the least played or tied for least played

#

or would that happen after it already adds to the played count and get fucky

atomic edge
#

hey guys why does this white box go outside of the borders even after i set its maxw to like 2

#

this is the part of code for it

#

and the red thing is not even visible

wicked leaf
#

its calling out this line specifically

daring fern
wicked leaf
#

both keys?

#

there's 2 of em

daring fern
wicked leaf
#

I suppose this won't check for any other ties that aren't 0

#

thats fine anyway

daring fern
wicked leaf
#

Didn't work btw

#

it didn't level up the hand at all

#

(I played a flush at 0)

daring fern
wicked leaf
#

lemme see

daring fern
wicked leaf
#

that seems to work

#

thank you so much

#

I owe you some sprites man

slim ferry
#

are all of these the available tables for context.other_ret in context.post_trigger? since you need to use context.other_ret.jokers to get the joker return there normally (also what do all of them even contain)

daring fern
#

They contain their specified objects calculation except playing_card, end_of_round and retriggers

wicked leaf
#

can you make an enchanced card count as a specific rank?

red flower
wicked leaf
#

instead of their original rank yeah

#

I want the card to count as jacks

red flower
wicked leaf
#

what I mean is like

#

The enhancement itself COUNTS as a jack

#

that specific enhancement

red flower
red flower
wicked leaf
#

for reference im trying to make these count as jacks, queens and kings respectively

wicked leaf
wind steppe
broken rivet
#

how do i prevent this from being debuffed on the collection screen

daring fern
broken rivet
#

upon trying to view it in the collection

faint yacht
#

Yeah, 'tis not a out-of-the-box function here.

broken rivet
#

welp time to make a utility for it

rare torrent
#

im trying to make a joker that removes all stickers from other jokers, but it isn't working calculate = function(self, card, context) local jokers = G.jokers.cards for i, joker in ipairs(jokers) do self:apply(joker, false) end end

broken rivet
#

i also honestly considered adding my clamp and sign functions to lua's math library but i feel like that could result in mod conflicts or something

rare torrent
daring fern
atomic edge
#

can anyone please help me with this, i wanna extend the top part to be a little more to the right

#

as drawn

#

im messing around with shop ui and i cant get it to work

rare torrent
frail parcel
#

question
how would i make a joker that adds a incredibly large number to a stat (+1e300 hand size) without having to write out that large number
ive tried having 2 values, a number and a power, and then doing this but it doesnt work

frail parcel
#

huh

#

thats neat

#

this does not work

broken rivet
#

tbh i'd probably use a lower number
1e100 is already far greater than the number of atoms in the observable universe

red flower
#

also a big size is going to look really bad with a small quantity of cards

daring fern
rocky plaza
frail parcel
#

the latter

rocky plaza
#

because unless you have a specific reason theres no reason not to just set the hand size to the number of cards in deck

#

and then dynamically update it

#

wait
oh the deck size can change 😭

#

but yeah theres got to be a better way to do it than just setting the number to 1e300 or something

frail parcel
slim ferry
#

instead of making a fuckton of hand size

#

because precision will make your hand size go to 0 after you sell the joker like this

broken rivet
# daring fern `if not card.area.config.collection`

still gets debuffed

apply = function(self, card, val)
        card.ability[self.key] = val
        if card.ability[self.key] then
            card.ability.lem_preorder_tally = G.GAME.lem_preorder_rounds
            card.ability.lem_preorder_rounds = G.GAME.lem_preorder_rounds

            -- don't debuff this in the collection
            if not Lemniscate.table_contains(G.your_collection, card.area) then
                SMODS.debuff_card(card, true, self.key)
            end
        end
    end,
frail parcel
daring fern
frosty rampart
#

@broken rivet
(card.config.center_key == "c_base" and not card.children.front) checks if a card is an unenhanced "fake card", i.e. the card used to display stickers/etc in the collection. i have a sticker that also needed to not do something in the collection, so i just made it only do the thing if that condition was false

broken rivet
frail parcel
#

okay so the joker is not the problem

frosty rampart
broken rivet
#

or well a blank one

broken rivet
frosty rampart
#

you mean the nil rank/suit?

broken rivet
#

yea

frosty rampart
#

yea that's still a front

#

if there's no front then the card doesn't display anything on top of the base (e.g. stone cards, but enhancements aren't c_base anymore)

broken rivet
#

ye

lucid owl
#

should SMODS.scale_card be used on effects to playing cards? like, for a joker that gives playing cards perma mult or something

#

just in terms of practice

lucid owl
# daring fern No.

alright, i figured you could use it in those cases but wasn't sure if that would be "correct"

broken rivet
#

do stakes not have loc_vars?

#

was gonna use a key return to make a toggleable blue stake rework

slim ferry
#

you could make it togglable, it would just require a restart

#

just take ownership of it based on a certain config value

gilded goblet
#

died when i figured that out

broken rivet
#

just sucks that it needs that

unkempt bronze
#

Does anyone know how to swap the card designs?

#

I'm designing a whole new deck for context

echo parrot
#

loc_vars = function(self, info_queue, card)
        local reverse_fool_c = G.GAME.tboj_last_tarot and G.P_CENTERS[G.GAME.tboj_last_tarot] or nil
        local reversal = nil
        local last_tarot = reverse_fool_c and localize { type = 'name_text', key = reverse_fool_c.key, set = reverse_fool_c.set } or
            localize('k_none')
        local colour = (not reverse_fool_c or reverse_fool_c.name == 'The Fool' or reverse_fool_c.name == 'The Fool?') and G.C.RED or G.C.GREEN
        
--more code here

        local main_end = {
            {
                n = G.UIT.C,
                config = { align = "bm", padding = 0.02 },
                nodes = {
                    {
                        n = G.UIT.C,
                        config = { align = "m", colour = colour, r = 0.05, padding = 0.05 },
                        nodes = {
                            { n = G.UIT.T, config = { text = ' ' .. last_tarot .. ' ', colour = G.C.UI.TEXT_LIGHT, scale = 0.3, shadow = true } },
                        }
                    }
                }
            }
        }

        return { vars = { reversal }, main_end = main_end }
    end,```

This mostly works, but for some reason the last used tarot color is incorrectly green instead of red when the last used tarot is 'The Fool?'
slim ferry
#

you should probably be checking reverse_fool_c.key, name is just a field that vanilla uses and wont exist unless you define it seperately (its not the same as the name from localization basically)

echo parrot
#

ah okay ty

#

it works now, thanks :)

wicked leaf
#

does anyone have good examples of jokers with an use button

#

I wanna make a hook for it but I have no good examples

violet void
wicked leaf
#

yeah but it crashed the game for me

violet void
wicked leaf
#

completely unrelated error in line 777 of the entropy file

#

like not even IN my mod

#

just having it in my mod was causing a crash by entropy

violet void
#

What line of code did you take from the mod

gusty compass
#

Where can I get the full deck?

wicked leaf
#

the whole akyros part

#

of using and selling

#

plus the function where it starts

dusty fractal
#

how would you check if a card is scored inside of full_hand

slim ferry
#

<@&1133519078540185692>

slim ferry
dusty fractal
#

nothing other than not wanting to do that if there is a simpler way, and that i need to account for the unscored cards as well

violet void
gusty compass
#

That works in SMODS.Back too I suppose?

dusty fractal
#

eh i figured out a better way to do it

#

by just subtracting full hand by scored cards and manually adjusting by the debuffed cards

#

cus debuffed cards dont count as scored cards normally, right?

violet void
# wicked leaf of using and selling

These are the parts you need

First, your Joker with its id (prefix included)

Second, a hook for G.UIDEF.use_and_sell_buttons(card)

And then the two functions (G.FUNCS.use= function(e) and G.FUNCS.can_use = function(e))

Can you send your code?

wicked leaf
#

no I just deleted it

#

im doing a different effect cuz I dont wanna bother rn

violet void
#

oh alr, you'll get it later 💪🏽

wicked leaf
#

i might just wait until like

#

the SMODS button function is ready

#

next release for sure

violet void
#

it's in the works?

wicked leaf
#

yeah its almost done apparently

#

one of the main things rn is adding controller binds to the buttons

violet void
#

that's pretty neat

violet void
glossy comet
#

hello, is there any reason why this shouldn't be working? in game the joker don't animate for whatever reason

slim ferry
#

joker animations are currently not supported, either wait for next smods release or use the system that was made for cryptid

glossy comet
#

oh i see

wicked leaf
#

cryptlib could have it right

slim ferry
#

it might

wicked leaf
#

where's the documentation for it anyway

red river
#

how can i make joker change its description to highlight certain words mid-run?

#

e.g. {C:inactive}Spades changing to {C:spades}Spades{C:inactive} if something happens

#

doing it through displaying variables doesn't seem to work

latent perch
#

you could instead use the colours field in your loc_vars return and return a custom colour depending on whether it's active or not

red river
#

ooh, cool

#

thanks!

latent perch
#

np! :)

broken rivet
#
if Lemniscate.config.blue_stake_rework then
    SMODS.Stake:take_ownership("stake_blue", {
        modifiers = function()
            G.GAME.modifiers.enable_lem_preorder = true
        end
    })
end

this is causing the stake to be displayed as green stake instead of blue stake in the continue run tab (though it is still blue stake when i actually do continue it)

pastel torrent
#

having some issues trying to do custom boosters

    key = 'testbooster_dark',
    group_key = "k_dark_testbooster_group",
    atlas = 'Boosters', 
    pos = { x = 0, y = 0 },
    discovered = true,
    loc_txt= {
        name = '{C:red}TEST{} Booster pack',
        text = {"Pick {C:attention}1{} card out of",
                "{C:attention}3{} {C:red}TEST{} jokers!", },
        group_name = {"Lorem Ipsum"},
    },
    
    draw_hand = false,
    config = {
        extra = 3,
        choose = 1, 
    },

    loc_vars = function(self, info_queue, card)
        return { vars = { card.ability.choose, card.ability.extra } }
    end,

    weight = 1,
    cost = 7,
    kind = "DarkHazardPack",
    
    create_card = function(self, card, i)
        ease_background_colour(HEX("ffac00"))
        SMODS.create_card({
            set = "jokersTest",
            area = G.pack_cards,
            skip_materialize = true,
            soulable = true,
        })
    end,
    select_card = 'jokers',

    in_pool = function() return true end
}```
slim ferry
#

ease_background_colour should not be in the create_card function, and you should not use SMODS.create_card either

#

just return the table of arguments and it gets passed into SMODS.add_card

pastel torrent
#

will report

#

if anything happens

pastel torrent
slim ferry
#

might not be related but select_card should either be G.jokers or just not there

#

also the in_pool function does nothing

crystal perch
#

how would i add a shader to a deck back? tried doing my usual draw step and it doesn't work. is it even possible?

slim ferry
pastel torrent
slim ferry
#

oh

pastel torrent
#

my create_card function

#

is just messed up

#

I SERIOUSLY need to lock the fuck in 💔

#

thanks for the help though

#

I appreciate!

crystal perch
# pastel torrent welp

btw for future reference if you press ctrl + c on the crash screen it copies the entire crash log to your clipboard so you can paste it

#

makes it a lot easier to diagnose issues

slim ferry
#

i forget how to access the back sprite of a card but i hope thats enough

crystal perch
#

hrm i shall look on the docs

#

but thank you

pastel torrent
#

it wasnt the function

#

I mean

#

it was but

#

only one line

#

tried with set = "Playing Card"

#

worked

#

but not with mine

#

hm

slim ferry
#

set = "Playing Card" should work

#

are you sure youre like. actually returning the table

pastel torrent
#

so like

#

im trying to do a custom pool

#

for a custom booster

#

giving well

#

custom jokers

slim ferry
#

what is the key in the ObjectType definition

pastel torrent
#

I do precise the pool though

slim ferry
#

did you actually create that pool with an SMODS.ObjectType

pastel torrent
pastel torrent
#

im stupid as shit

#

gimme a sec

slim ferry
#

yeah the pool wont exist just by adding it to jokers

pastel torrent
#

I though it like just assumed it does it

#

mb then

#

lemme try

crystal perch
#

eyikes!

red flower
#

it would be cool if an objecttype was created automatically

#

maybe thats a thing for the tags pr

crystal perch
# crystal perch got it working but uh

code

SMODS.DrawStep {
    key = 'chak_decks',
    order = 10,
    func = function(self)
        if G.GAME.selected_back.effect.center.key == 'b_chak_draft' then
            self.children.center:draw_shader('booster', nil, self.ARGS.send_to_shader)
        end
    end,
    conditions = { vortex = false, facing = 'back' },
}
slim ferry
crystal perch
#

oh that's funky

slim ferry
#

yeah thats just an issue with drawing shaders on backs iirc

pastel torrent
#

just making sure

slim ferry
#

yeah

pastel torrent
#

alr

slim ferry
#

just make sure you use the same capitalization everywhere

#

since i saw different capitlization in some of your screenshots

pastel torrent
#

oh prob

#

I made sure

#

should be good

#

worked 😎

#

ty!

#

whats the base joker doing in there

#

anyways

#

it works so

#

not gonna complain

#

will look into it later

slim ferry
#

because the pool ran out of cards to spawn

pastel torrent
#

alr

#

that good to note

#

ty!

jolly shadow
#

u can set a custom default card on ur booster

slim ferry
#

you can configure the default card for a pool

jolly shadow
#

^

slim ferry
#

if needed

jolly shadow
#

or if u dont want free copies of a card just leave it as jimbo

crystal perch
#

i may have just come up with the most hacky solution ever and just took a screenshot of the deck with the booster shader and applied it as a multiply layer in aseprite

#

but hey

jolly shadow
#

but why 😭 what was wrong with the previous solution

crystal perch
#

it works!

crystal perch
#

shader was not centered and you could see jokers through their back

#

(this is a deck btw not a booster)

jolly shadow
#

for the first one u could just make sure it draws the shader in order of the deck's sorting

crystal perch
#

no it's a different issue

jolly shadow
#

but yhea idk why it does that on the other one

crystal perch
#

playing cards rotate depending on their position on the screen, deck backs don't

#

so the booster shader is rotating as if it was a playing card when it's not

jolly shadow
#

ohh

#

well you drew the shader on the center

#

not the back

crystal perch
#

you can tell more easily when you mouse over it and the shader tilts while the card back itself doesn't

red flower
slim ferry
#

maybe try looking at how cryptid does the shader for antimatter deck

#

thats the only mod i can think of with deck shaders

crystal perch
#

i could take a peek

jolly shadow
#

a quick look perhaps

slim ferry
#

lets take a look...

wicked leaf
#

Can I make a joker that makes all other jokers think an enhancement is a specific rank, with a return statement maybe?

frosty rampart
#

not until the quantum ranks PR is merged
(i mean technically probably you can do it now, but it'll be difficult and involve hooking/patching shit)

slim ferry
#

quantum ranks 😨

wicked leaf
#

I dont wanna paaaatch

#

it scary...

slim ferry
#

i mean you could also hook Card:get_id() if its replacing the base rank entirely

#

like cryptid abstract cards

frosty rampart
#

true

broken rivet
#

my sticker isn't even appearing in the shop 😭

wicked leaf
slim ferry
#

this isnt a cryptlib thing

#

you can do that anyway its just a function

crystal perch
broken rivet
#
if Lemniscate.config.blue_stake_rework then
    SMODS.Stake:take_ownership("stake_blue", {
        modifiers = function()
            G.GAME.modifiers.enable_lem_preorder = true
        end
    })
end

literally all the stake is doing

#

idk why this doesn't work

crystal perch
broken rivet
#

or why the game seems to think blue stake is also green stake

jolly shadow
#

tho

frosty rampart
jolly shadow
#

is what im wonderin

crystal perch
broken rivet
# frosty rampart show sticker code
local preorder = {
    object_type = "Sticker",
    key = "preorder",

    atlas = "stickers",
    pos = { x = 0, y = 0 },

    badge_color = HEX("e87169"),

    default_compat = true,
    rate = 0.3,

    init = function()
        local gsr = Game.start_run

        function Game:start_run(...)
            gsr(self, ...)
            G.GAME.lem_preorder_rounds = 2
        end
    end,

    loc_vars = function(self, info_queue, card)
        local r = G.GAME.lem_preorder_rounds or 2
        return {
            vars = {
                card.ability.lem_preorder_rounds or r,
                card.ability.lem_preorder_tally or r,
            }
        }
    end,

    calculate = function(self, card, context)
        if context.end_of_round and not context.repetition and not context.individual then
            -- countdown
            card.ability.lem_preorder_tally = card.ability.lem_preorder_tally - 1

            -- remove sticker
            if card.ability.lem_preorder_tally <= 0 then
                SMODS.debuff_card(card, false, self.key)

                card.ability[self.key] = nil
                card.ability.lem_preorder_tally = nil
                card.ability.lem_preorder_rounds = nil
            end
        end
    end,

    should_apply = function(self, card, center, area, bypass_roll)
        return G.GAME.modifiers.enable_lem_preorder and card.config.center.lem_preorder_compat
    end,

    apply = function(self, card, val)
        card.ability[self.key] = val
        if card.ability[self.key] then
            card.ability.lem_preorder_tally = G.GAME.lem_preorder_rounds
            card.ability.lem_preorder_rounds = G.GAME.lem_preorder_rounds

            -- don't debuff this in the collection
            if not (card.config.center_key == "c_base" and not card.children.front) then
                SMODS.debuff_card(card, true, self.key)
            end
        end
    end,

    --[[lem_credits = {
        art = { "InvalidOS" },
        code = { "InvalidOS" },
        idea = { "InvalidOS" },
    },]]
}

also shows a completely white "ERROR" badge in-game but i suspect that's because of my mod's credit badge code

crystal perch
#

okay okay so the shader now takes the shape of the back i just have to disable the rotation

jolly shadow
frosty rampart
jolly shadow
broken rivet
#

somehow i thought smods would set that

crystal perch
#

i got it i'm looking at the draw_shader func

#

yippie!

jolly shadow
jolly shadow
frosty rampart
jolly shadow
#

looks great

crystal perch
#

however,,,,,,,,,,,,,,,,,,,,,,,,,,

broken rivet
#

this is the first time i've tried adding both a sticker and a stake

#

so

frosty rampart
jolly shadow
broken rivet
#

it appeared on everything

crystal perch
#

if you disable tilt for the shader, it'll look good on the deck view, but face down cards look pants
if you enable tilt for the shader, it'll look pants on the deck view, but face down cards look good

jolly shadow
#

youll have to change the shaders first arg to focus on the rotation of the back rather than the center

broken rivet
#

i'm guessing i should check for if the compat value is false

crystal perch
#

here's the current code

SMODS.DrawStep {
    key = 'chak_decks',
    order = 10,
    func = function(self)
        if G.GAME.selected_back.effect.center.key == 'b_chak_draft' then
            self.children.back:draw_shader('booster', nil, self.ARGS.send_to_shader, true, nil, nil, nil, nil, nil, nil, false)
        end
    end,
    conditions = { vortex = false, facing = 'back' },
}
broken rivet
#

and also roll the appearance rate myself

frosty rampart
#

and then yea you'll have to roll the appearance rate

gaunt folio
#

From last night but have another question ngl bc I’m not knowledgeable in this part lol

you need to enable the retrigger_joker optional feature and then use context.retrigger_joker_check (and don't use the cardarea or main_scoring checks)

Where do I paste the retrigger thing in? Anywhere in the doc? The joker? A seperate config file?

gaunt folio
#

Aight

crystal perch
#

putting it in main.lua should be fine

red flower
crystal perch
#
-- Enable optional features
SMODS.current_mod.optional_features = {
  retrigger_joker = true
}
jolly shadow
#
local send_to_shader = { math.min(self.children.back.VT.r*3, 1) + G.TIMERS.REAL/(28) + (self.juice and self.juice.r*20 or 0) + self.tilt_var.amt, self.ARGS.send_to_shader[2]
}

might work?

crystal perch
#

just put that at the top of main

gaunt folio
#

Aight

jolly shadow
#

and then use that table in the draw shader

wicked leaf
#

context.beat_boss is a thing right?

red flower
#

yes

#

in context.end_of_round specifically

jolly shadow
#

keep in mind i am no expert and i am jus lookin thru source to try to solve this thing

wicked leaf
#

this should be right

jolly shadow
#

do you need context.end_of_round if there's context.beat_boss ?

red flower
#

not really but it's good practice because it might be used for another context later

gaunt folio
jolly shadow
#

fair nuff was just wondering

crystal perch
jolly shadow
crystal perch
#

alright

#

hrm

crystal perch
#

so that stopped the shine from going crazy when you hover over the deck, but the cards still don't flip well

jolly shadow
crystal perch
gilded goblet
frosty rampart
gilded goblet
#

we love to see new stickers

broken rivet
#

i might add an infoqueue that shows the joker info

frosty rampart
frosty rampart
broken rivet
#

ah

#

discord moment

jolly shadow
#

wouldnt you just

#

perishable

broken rivet
#

positive

frosty rampart
#

positive versions of stickers

jolly shadow
#

yea but

#

preorder is positive

broken rivet
#

it's not???

jolly shadow
#

how would u invert it

broken rivet
#

it debuffs the card

frosty rampart
#

that's why i pinged astro so we could brainstorm

jolly shadow
crystal perch
#

preorder is more positive than perishable

#

any day

jolly shadow
#

exactly

broken rivet
#

it's part of a blue stake rework

frosty rampart
#

just because it's less worse than perishable doesn't mean it's outright good

jolly shadow
#

yea but im saying how would u do an inverse of it

crystal perch
#

it's buffed for 2 rounds?

#

maybe?

frosty rampart
hushed field
#

pre order bonuses

crystal perch
#

anyway the shader is still not changing, i think maybe the other args in draw_shader may be overriding it?

SMODS.DrawStep {
    key = 'chak_decks',
    order = 10,
    func = function(self)
        if G.GAME.selected_back.effect.center.key == 'b_chak_draft' then
            local send_to_shader = { math.min(self.children.back.VT.r*3, 1) + G.TIMERS.REAL/(28) + (self.juice and self.juice.r*20 or 0) + self.tilt_var.amt, self.ARGS.send_to_shader[2]}
            self.children.back:draw_shader('booster', nil, send_to_shader, true, nil, nil, nil, nil, nil, nil, false)
        end
    end,
    conditions = { vortex = false, facing = 'back' },
}
queen crescent
crystal perch
#

a deck

frosty rampart
whole linden
#

Crap sorry i completely crashed and fell asleep sorry to anyone who wanted to help me yesterday

clear ocean
#

its okay kennit the tart

crystal perch
#

so having "true, nil, nil, nil, nil, nil, nil, false" makes it look good in the deck space, but makes flipped cards look pants
removing "true, nil, nil, nil, nil, nil, nil, false" makes it look pants in the deck space, but makes flipped cards look good

clear ocean
#

pants?

broken rivet
crystal perch
clear ocean
#

just say bad

broken rivet
#

i know something like it was in the csd

clear ocean
broken rivet
#

cryptid suggestions doc

frosty rampart
clear ocean
broken rivet
#

true

clear ocean
#

plant the bomb at site c(ryptid)

broken rivet
#

many horrors in there

whole linden
broken rivet
#

either way i'll just take ownership of the cryptid one and make it Not Exist because mine is objectively more awesome on account of not being cryptid

jolly shadow
#

based

clear ocean
#

uh make sure you updated tailsman

crystal perch
#

honestly i think i'll just change the shader based on the cardarea

whole linden
clear ocean
#

2.5

clear ocean
whole linden
#

Alright will try that version brb (for context im on Android for discord junk)

clear ocean
#

i mean if you are comfortable you can create a github or gitlab account and link your mod repo

#

its a good way to version control

wicked leaf
#

how do you make a joker change its own edition?

slim ferry
#

card:set_edition(<key>)

crystal perch
#

how would i get a card's cardarea while only having it's self to reference

slim ferry
#

Card.area

crystal perch
#

hrm

whole linden
#

Alright so just looked and i am using the recent version of the mod (also idk how to txt the crash log here since im not really using discord for this junk lol)

crystal perch
#

but also what's the card area for this area called?

#

is it deck?

slim ferry
#

G.deck

crystal perch
#

amazing

#

thank you

whole linden
crystal perch
#

shader's working very nicely

#

this is why i don't use cryptid as a reference cuz it's so ancient 😭

#

if i had done the cryptid method instead of a simple drawstep i wouldve killed myself

#

the only problem is that in the main menu it has no shader, but in a run all the decks have the shader

#

though this may just be a galdur problem

#

it's not just a galdur problem

#

i think the issue is that it's checking for the current game selected back instead of each card's selected back, so it's applying it to every deck if you're playing the selected back

wicked leaf
#

trying to do smth and its not quite workin

red flower
#

should be lowercase card

wicked leaf
#

lemme try

whole linden
#

Alright i think this is the best i can do for the crash log sorry if its not perfect but best i can do atm

red flower
#

why is it pdf 😭

#

that looks like a talisman issue

whole linden
#

And its the current version so im just stuck and confused

crystal perch
#

post an issue to the github then

red flower
whole linden
#

And yet when i try to download the mod my computer says i already have the file downloaded by the extra (1) in the name

red flower
#

the file is always named Talisman.zip

crystal perch
#

anyone know the name of the cardarea for this deck in New Run

whole linden
red flower
#

i dont think that's necessary, just delete the old folder and unzip the new one in

whole linden
#

Fine brb

#

Ok so downloaded and unzipped everything and put in the mods folder and gonna give a test game (proof to see I've downloaded the right version sorry if its crap Android camera)

crystal perch
#

why can't you use discord on your computer again?

whole linden
#

My computer is a laptop/lemon it can barely run 2gb games lol (its old)

crystal perch
#

use the discord website then

#

discord.app

whole linden
#

Well nvm it seems like the mod is finally working i am gonna test it using other mods like cryptid/pokermon just to be safe (this is very tiresome why do people mod <:3

#

And now lovey is having a fit great apparently its going though a syntax error with a card or something (maybe a file got damaged in the log/dump) update im stupid because it might be trying to load cryptid pokermon and undertale/deltarune mod all at once

stone dagger
#

Hello, anyone know why I get this error when I try to call SMODS.create_card?

local _card = max_played_card
            if (max_played_card.ability and max_played_card.ability.set == "Enhanced") then
                _card = SMODS.create_card { set = max_played_card.ability.set, enhancement = max_played_card.ability.name, seal = "Red", edition = 'e_polychrome', rank = max_played_card.base.value, suit = max_played_card.base.suit,  area = G.discard }
            else
                _card = SMODS.create_card { set = "Basic", seal = "Red", edition = 'e_polychrome', rank = max_played_card.base.value, suit = max_played_card.base.suit,  area = G.discard }
            end
red flower
#

it should be Base not Basic

#

in the first one I would also recommend using Base to not accidentally apply an enhancement twice

stone dagger
#

thank you

red flower
#

oh and the enhancement should be max_played_card.config.center.key

real crown
#

Why does this say table index is nil? When I iterate through the vouchers and print their keys, this is literally the key that is used there:
G.GAME.banned_keys[v_tarot_merchant] = true

red flower
#

the string should be in quotes

real crown
#

Ahhh makes sense, thank you!

#

Weirdly the voucher is still not getting banned, I tried it with both G.GAME.banned_keys['v_tarot_merchant'] = true and G.GAME.banned_keys["v_tarot_merchant"] = true, but the vouchers I try to ban this way just don't get banned
They're inside the apply function of an SMODS.Back by the way, setting joker rates and other stuff works, just not the voucher bans

real crown
#

I iterated through the voucher pool and banned keys that way, it's still not working
I'm assuming banned_keys doesn't apply to vouchers then? Is there a banned vouchers list? banned_vouchers didn't work

red flower
#

yeah looking at the code i don't think vouchers check for that but i might be wrong

#

it should because it works for challenges so idk

stuck ore
#

Quick question, is there a way to have a message trigger and originate from a joker adjacent to the trigger joker (I.E. is there a card = card variant that would make a different joker have the message)

stuck ore
#

So when written its "card = message_card"?

daring fern
stuck ore
#

Ah gotcha thanks

red flower
#

it's not recommended to use card = at all

#

it's something smods handles internally

wind steppe
#

what function is used to spawn vouchers in the shop (not picking them but actually making them appear)

loud summit
#

i believe its just in the generic "setup shop" code

#

you can look at how ortalab does its chalupa pack tag tho?

#

if you wanted to clear/interact with it i think its also a cardarea

wintry solar
#

SMODS.add_voucher_to_shop

stuck ore
#

If I’m trying to make a joker spawn in one specific joker after a number of rounds, what would be the code for spawning in the joker?

wind steppe
#

so for oops all sixes itd be j_oops

#

for example

stuck ore
#

Gotcha thanks

solemn shuttle
#

holy crap its actually so much easier than i thoguht 😭

#

Profit

lucid owl
#

is context.post_trigger not a thing in blind calculate?

winter flower
lucid owl
#

i had turned it on earlier but removed it after i thought i didn't need it 😭

vale zinc
#

How do I determine if a single Joker does or does not have an Edition? I looked in the code and saw that Wheel of Fortune uses SMODS.Edition:get_edition_cards(G.jokers, true) to specify, but would get_edition_cards() be able to specify only one Joker if a single card was passed as the first argument?

wind steppe
vale zinc
frosty rampart
#

no

#

generally when someone says to check card.[something], the "card" is a placeholder for whatever card object you're trying to use

#

so in your case, G.jokers.cards[1].edition would check if the leftmost joker has an edition (and if it does, it would also specify what that edition is)

vale zinc
#

That helped. Thanks, Meta.

mellow lotus
#

Hey all, starting to tinker with the idea of modding the game. I don't wanna ask questions that have been said to death here, but I'm wondering if there's any documentation available RE the audio engine of LOVE2D / Balatro? I'm a PhD audio tech student and that's my primary area of tinkering

#

tbh I just need a productive hobby and a dumb mod sounds up my street

#

like a stupid idea I'd want to look into: the mult of each score plays a sinwave at that frequency. If I can do something like that within Lua I can pretty much do everything I wanna

wind steppe
#

I dont think balatro does any modifications to love2d audio system so i'd say a search engine is your friend here

#

not google though use like. firefox or something

stuck ore
#

I mean fastest way to have a correct answer is by guessing and someone correcting me but I think if you access the games files through the browse local files in steam you can open up and within the resources folder find sounds and change the sound files by making a new one and replacing the old one by renaming your new file to the same name

#

This is a hypothetical, I haven't yet done something like that

versed swan
stuck ore
#

Also what does error: attempt to index local 'center' [a nil value] mean?

mellow lotus
jolly shadow
mellow lotus
stuck ore
wind steppe
#

not really much simpler it gets

mellow lotus
#

ahah if i'm reading this right, balatro could play soundfonts

atomic edge
#

how do i hook Game:update_shop(dt)

crystal perch
#

anyone know how to make get_enhancements less laggy? i got a stack overflow from a joker whose effect is literally just this:

calculate = function(self, card, context)
        if context.check_enhancement and context.other_card.base.suit == "Diamonds" then
            return {
                m_gold = true
            }
        end
    end

(though to be fair my entire deck was steel diamonds)

crystal perch
urban wasp
#

would this work as a hook for the box from cryptid to add another rarity that it debuffs?

-- make the box debuff plentiful jokers too
local og_box_debuff = SMODS.Blind.cry_box.recalc_debuff
og_box_debuff = function(self, card, from_blind)
    if og_box_debuff and og_box_debuff(self, card, from_blind) then
        return true
    end
    return card.config.center.rarity == "crp_plentiful"
end
#

sorry if i sound weird it's late lol

umbral zodiac
#

probably want to set the function directly rather than using the variable just for clarity but i think it'd be fine

crystal perch
#

remember to return og_box_debuff

#

unless?

#

idk as long as it works

urban wasp
wind steppe
crystal perch
#

here

#

yeah

wind steppe
#

same as standard blind stuff

umbral zodiac
urban wasp
daring fern
crystal perch
#

main thing is i want them to be compatible with anything that would interact with gold cards

#

like golden ticket, etc

#

without manually making those clauses

wind steppe
#

thats the consequence of quantum enhancements unfortunately

urban wasp
umbral zodiac
#

you also forgot bl_

urban wasp
#

okay yeah that makes more sense 😭

daring fern
crystal perch
#

sounds like i gotta learn how to recreate quantum enhancements now..

urban wasp
# umbral zodiac you also forgot `bl_`

it doesn't crash but also doesn't debuff plentiful rarities what else am i missing

-- make the box debuff plentiful jokers too
local og_box_debuff = SMODS.Blinds.bl_cry_box.recalc_debuff
og_box_debuff = function(self, card, from_blind)
    if og_box_debuff and og_box_debuff(self, card, from_blind) then
        return true
    end
    return card.config.center.rarity == "crp_plentiful"
end
umbral zodiac
wind steppe
#

^

urban wasp
wind steppe
urban wasp
#

no i'll do that

#

forgot lol

#

is autocomplete correct here

#

or should it just be the first

wind steppe
#

yeah seems good

urban wasp
#

mmm still doesn't seem to affect them

#
-- make the box debuff plentiful jokers too
local og_box_debuff = SMODS.Blinds.bl_cry_box.recalc_debuff
og_box_debuff = function(self, card, from_blind)
    if og_box_debuff and og_box_debuff(self, card, from_blind) then
        return {
            debuff_card = true
        }
    end
    return {
        debuff_card = card.config.center.rarity == "crp_plentiful"
    }
end
round lion
#

how am i meant to use draw function on cards

#

jokers i mean

daring fern
urban wasp
#

must i? i feel like a hook might be better

#

i mean idk what "better" is but

daring fern
urban wasp
#

mm okay

#

it's probably easier anyway

wind steppe
urban wasp
#

yes

wind steppe
#

oh wait

daring fern
wind steppe
#

you're redefining your local variable

#

not the actual. thing it checks for

urban wasp
#

is that not the same

umbral zodiac
#

me when this is what i said earlier

urban wasp
#

er actually

#

i see

wind steppe
urban wasp
#

i see i see

urban wasp
wind steppe
#

thats what makes hooks work

#

otherwise thatd be infinite recursion

#

which is. Bad™

urban wasp
#
-- make the box debuff plentiful jokers too
local og_box_debuff = SMODS.Blinds.bl_cry_box.recalc_debuff
SMODS.Blinds.bl_cry_box.recalc_debuff = function(self, card, from_blind)
    if og_box_debuff and og_box_debuff(self, card, from_blind) then
        return {
            debuff_card = true
        }
    end
    return {
        debuff_card = card.config.center.rarity == "crp_plentiful"
    }
end
umbral zodiac
#

i think you might have been silly paradox

wind steppe
umbral zodiac
#

i assume it doesnt need a table it just needs a bool and its seeing the table and goes "welp. tables are truthy. go ahead. be debuffed"

urban wasp
#

"tables are truthy" yes i see your vision

wind steppe
urban wasp
umbral zodiac
#

if you need proof simply if {} then print("tables are true...") end in your debugplus console,,

urban wasp
#

insert true... emoji here

#

yay it worked without tables

wind steppe
#

oh damn

#

why are we returning debuff_card = true

#

like ever

umbral zodiac
#

sin

wind steppe
#

have i been lied to

stuck ore
#

In response to this SMODS.add_card{key = "the key of the joker you want to spawn, including object and mod prefix"} what are the object and prefixes because I believe the issue I'm having is that I'm not setting them

stuck ore
#

So how would I set that? currently its nil

daring fern
stuck ore
#

The object and prefixes

#

Sorry I feel like I'm misunderstanding

daring fern
#

You don't set the class prefix.

stuck ore
#

So it would be like SMODS.add_card{key= "jokername", "modname"}?
I feel foolish

urban wasp
#

sorry if this is like unreadable it's pretty big 😭

daring fern
urban wasp
#

so it should be card instead of self

daring fern
urban wasp
#

okay easy fix

royal yarrow
#

im trying to make a joker that increases its mult value each round and if a card is destroyed (in any way) the molt resets to 0, any ideas how to fix? (destroying cards doesnt seem to trigger the effect i want, but it does scale at least)

#
--Code
config = { extra = { Xmult = 1, Xmult_mod = 0.25 } },

    loc_vars = function(self, info_queue, card)
        return { vars = { card.ability.extra.Xmult_mod, card.ability.extra.Xmult } }
    end,

    calculate = function(self, card, context)
        if context.setting_blind then
            card.ability.extra.Xmult = card.ability.extra.Xmult + card.ability.extra.Xmult_mod

            return {

                message = localize { type = 'variable', key = 'a_xmult', vars = { card.ability.extra.Xmult } }

            }

            -- i think the above says what the mult is when the blind starts
        end

        if context.joker_main then
            return {

                Xmult = card.ability.extra.Xmult

            }
        end

        if context.removed_card then
            card.ability.extra.Xmult = 1

            message = localize { type = 'variable', key = 'a_xmult', vars = { card.ability.extra.Xmult } }

            
        end
    end```
#

whoops, i shoulda condensed that but idk how

daring fern
daring fern
royal yarrow
#

ohhh thank you

wicked leaf
#

how do you disable a joker from appearing naturally?

stuck ore
#

how do you find the center of a joker or is that just the key?

daring fern
daring fern
hollow horizon
#

I have a bit of a problem with fusing my jokers. Nothing happens even if both needed jokers are present. Someone sees what could be the problem here?

real crown
#

What's the context for opening shop?

manic rune
daring fern
# hollow horizon
if next(SMODS.find_card('j_modprefix_key1')) and next(SMODS.find_card('j_modprefix_key2')) then
    local jokers = {SMODS.find_card('j_modprefix_key1')[1], SMODS.find_card('j_modprefix_key2')[1]}
    SMODS.destroy_cards(jokers)
    SMODS.add_card({key = 'j_modprefix_key3'})
end
hollow horizon
#

oh that's 100 times easier

real crown
#

Is there a context for rerolling that applies before reroll?
So if I ban planet cards when I reroll, then I can't reroll into them? Now with context.reroll_shop the first reroll can still reroll into planet

wicked leaf
#

hmmm today I will use quantum enhancements

granite jay
#

Is there a way to make it so jokers are triggered by cards that don't score?

daring fern
wicked leaf
#

ive seen a few mods do things for unscored cards

granite jay
wicked leaf
#

how would I use get_id() in a hook to tell an enchancement to be considered a specific rank ?

daring fern
wicked leaf
#

I replace id with the rank, right?

daring fern
wicked leaf
#

So if its a jack, would it be 11 (the order), J (the card's key) or Jack (the key)?

wicked leaf
#

got it

wicked leaf
#

I know quantum enhancements are wonky, so would this cause a loop?

daring fern
wicked leaf
#

thank you

wicked leaf
#

can create_card / add_card add only a specific joker?

daring fern
wicked leaf
#

thankuu

lament agate
#

if i wanted to change the vanilla jokers description, is it loc_txt or an actual localization?

hushed field
#

Is it SMODS that adds the from_quantum parameter to card objects?

daring fern
lament agate
daring fern
lavish elm
#
local hand = G.GAME.current_round.current_hand
            local planet = nil
            for _, v in pairs(G.P_CENTER_POOLS.Planet) do
                        if v.config.hand_type == hand then
                            planet = v.key
                        end
                    end
            return{
                SMODS.add_card
                    {
                        key = planet,
                        set = "Planet",
                        edition = "e_negative"
                    }
            }

why is this not working?

faint yacht
#
return {
  func = function()
    SMODS.add_card{ key = planet, set = "Planet", edition = "e_negative" }
  end
}
wicked leaf
#

how do you SET the mult to something? I know return mult increases it but I'm not sure how to set it directly

lavish elm
wicked leaf
faint yacht
#

return { func = function() mod_mult(amount) end }

#

-# iirc, anyway.

final jewel
#

yeah you dont need do end end around return

wicked leaf
faint yacht
#

Was more speaking about mod_mult & mod_chips functionality.

wicked leaf
final jewel
#

I think its because you place an if directly after the return

wicked leaf
#

do I have to place it before that?

final jewel
#

yeah

#

the return is the last thing

wicked leaf
#

got it

final jewel
#

technicly you could place the if in the func

#

like
return {
func = function()
mod_mult() = xxx
if xxx = xxx then
xxxxxxxx
end
end
}

#

What is the c_base equivalent for _card:get_seal()

faint yacht
#

nil

#

_card.seal will be nil if no seal is present.

final jewel
#

if _card.seal ~= nil then
or
if _card.get_seal() ~= nil then

loud summit
#

hey

#

how do move cards from the discard pile to the top of the draw pile

#

and would it be safe to do so in a discard context

flat cypress
#

does anybody have a copy of the vanilla negative shader? I want to poke around and figure out once and for all what the heck is going on with the color math there (I dont have access to my game files rn)

faint yacht
#

Sounds like hooking antics and changing the target of draw to the deck... as well as having the discarded cards "marked" and them reshuffled and remove the mark.

loud summit
#

great,

atomic edge
#

is there a function that changes the background color as well as the color dyn_ui.boss_main

#

?

daring fern
hushed field
#

Is it possible for a mod to handle multiple separate config files?

pastel kernel
#

Gaze at the atrocity of this frankenstein of a jokerlua calculate = function(self, card, context) local my_pos = nil for i = 1, #G.jokers.cards do if G.jokers.cards[i] == card then my_pos = i break end end if my_pos and G.jokers.cards[my_pos + 1] and not SMODS.is_eternal(G.jokers.cards[my_pos + 1], card) and not G.jokers.cards[my_pos + 1].getting_sliced then local sliced_card = G.jokers.cards[my_pos + 1] sliced_card.getting_sliced = true G.GAME.joker_buffer = G.GAME.joker_buffer - 1 G.E_MANAGER:add_event(Event({ func = function() G.GAME.joker_buffer = 0 card:juice_up(0.8, 0.8) sliced_card:start_dissolve({ HEX("57ecab") }, nil, 1.6) play_sound('slice1', 0.96 + math.random() * 0.08) return true end })) card_eval_status_text(card, "extra", nil, nil, nil, { message = localize({ type = "variable", key = "a_spy", vars = { 1 }, }), colour = SMODS.Gradients["busterb_epileptic"], no_juice = true, }) local eternalreward = pseudorandom_element(G.P_CENTER_POOLS.Joker, pseudoseed('spytf2')).key local card = create_card("Joker", G.jokers, nil, "eternalreward", nil, nil, nil, "busterb_spy") card:add_to_deck() G.jokers:emplace(card) return nil, true end end

#

ya i stole from both daggers

loud summit
#

why are you usijg create_card

#

use SMODS.add_card it handles emplacing and stuff

pastel kernel
#

k

#
 local eternalreward = pseudorandom_element(G.P_CENTER_POOLS.Joker, pseudoseed('spytf2')).key
            SMODS.add_card({ key = "eternalreward", edition = 'e_negative' })
            return nil, true```
loud summit
pastel kernel
#

any string

loud summit
#

it doesnt matter beyond debugging i believe

#

yeah

pastel kernel
#

so SMODS.Rarities?

loud summit
#

no i mean

#

the second arg

pastel kernel
#

element?

loud summit
#

where u put pseudoseed

pastel kernel
#

oh

loud summit
#

yea it can be any string

pastel kernel
#

pseudoseed (SMODS.Rarities))?

loud summit
#

no remove pseudoseed

lucid owl
#

they mean that you don't need to call pseudoseed and can instead just enter any string

loud summit
#

yeah

lucid owl
#

it'll be converted to a pseudoseed automatically if it hasn't been

#

smods adds that afaik

pastel kernel
#

(G.P_CENTER_POOLS.Joker, SMODS.Rarities)?

loud summit
#

thats a table

lucid owl
#

why are you putting rarities there

minor magnet
#

is there a quick way to reload all of my mod's centers?

pastel kernel
#

candy suggested i use SMODS.Rarities for some reason

#

but idk where

wind steppe
#

also you're not actually creating eternalreward

lucid owl
#

just put 'spytf2' like you did before without the pseudoseed

wind steppe
#

you're returning the string eternalreward corresponding to a card that doesn't exist

#

instead of the variable

loud summit
faint yacht
#
function pseudorandom_element(_t, seed, args)
    if seed and type(seed) == "string" then seed = pseudoseed(seed) end
pastel kernel
lucid owl
#

yeah

#

strings are automatically turned into pseudseeds

pastel kernel
#

hmmlua local eternalreward = pseudorandom_element(SMODS.Rarities, 'spytf2').key SMODS.add_card({ key = eternalreward, edition = 'e_negative' }) return nil, true

#

like this?

loud summit
lucid owl
lucid owl
#

key is an argument for the key of a joker/center

loud summit
#

yea thats if youre trying to spawn a specific joker

pastel kernel
#

rarity = key, do i keep it that way?

daring fern
pastel kernel
#

lucid owl
pastel kernel
#

ok so

calculate = function(self, card, context)
    local my_pos = nil
        for i = 1, #G.jokers.cards do
            if G.jokers.cards[i] == card then
                my_pos = i
                break
            end
        end
            if my_pos 
            and G.jokers.cards[my_pos + 1] 
            and not SMODS.is_eternal(G.jokers.cards[my_pos + 1], card) 
            and not G.jokers.cards[my_pos + 1].getting_sliced then
                local sliced_card = G.jokers.cards[my_pos + 1]
                sliced_card.getting_sliced = true
                G.GAME.joker_buffer = G.GAME.joker_buffer - 1
                G.E_MANAGER:add_event(Event({
                    func = function()
                        G.GAME.joker_buffer = 0
                        card:juice_up(0.8, 0.8)
                        sliced_card:start_dissolve({ HEX("57ecab") }, nil, 1.6)
                        play_sound('slice1', 0.96 + math.random() * 0.08)
                        return true
                    end
                }))
                card_eval_status_text(card, "extra", nil, nil, nil, {
                message = localize({
                    type = "variable",
                    key = "a_spy",
                    vars = { 1 },
                }),
                colour = SMODS.Gradients["busterb_epileptic"],
                no_juice = true,
            })
                local _, key = pseudorandom_element(SMODS.Rarities, "spytf2")
                SMODS.add_card { set = "Joker", rarity = key }
            return nil, true
            end
        end```
#

is it good now?

#

oh yeah

#

i forgot to remove the comment from dagger

#

since i stole it from vremade

#

loud summit
#

one last thing again since this is supposed to be "busted"

#

you could make it not spawn cursed jokers

#

by putting if key == "cry_cursed" then key = "cry_exotic" end after the pseudorandom_element call

pastel kernel
#

if key == “cry_cursed” then key = “entr_entropic” end

daring fern
pastel kernel
#

Ok so

#

The main reason why I made spy tf2 was to combat cursed jokers

#

What they suggested was

#

To replace cursed jokers with exotic jokers

#

If detected that is

pastel kernel
loud summit
#

yea

wind steppe
loud summit
#

oh yea true

pastel kernel
#

Fair nuff

#

BUT

#

cursed IS a cryptid rarity

#

Right?

loud summit
#

yeah

pastel kernel
#

Oh wait

loud summit
#

its CRY_cursed

pastel kernel
#

Right

#

I forgot

#

Then it’s still cry_exotic

#

Ok so spy breaks

#

When I try selecting a blind

#

With another joker

loud summit
#

:(

pastel kernel
#

It doesn’t even give any “oops the game crashed” or something

#

WTF

#

REMOVING SPY BREAKS THE GAME??

#

Maybe it’s the placement of the local my_pos

#

IT WORK

pastel kernel
long urchin
#

how do i change the """"size"""" of a joker? like, when its flipped, how do i make it a square or whatever yknow

#

cuz i have some nonstandard joker sizes

pastel kernel
#

Candycane?

slim ferry
atomic edge
#

if im patching a new texture path into the game how do i specify the folder it is in?

#

or can i just put imagename.png

slim ferry
#

why are you patching images into the game

atomic edge
#

i want to change the shop sign

#

dynamically

slim ferry
#

i cant imagine you would have to patch the texture files for that

#

try looking at how tangents changes the shop sign

atomic edge
#

the shop sign is a texure

#

its not ui

#

thanks

slim ferry
#

yes

atomic edge
#

missunderstood you

final jewel
#

Guys I currently have this and it doesnt seems to work

minor magnet
#

how do i make it so this variable is kept between reloads?

#

stupid question ik

slim ferry
#

store in card.ability

minor magnet
#

thanks

long urchin
slim ferry
#

you should probably ask the malverk thread about that

long urchin
#

alr

slim ferry
#

actualyl

#

ig you could take_ownership but that would be wierd with the texture pack disabled

long urchin
#

ill ask malverk

slim ferry
long urchin
#

ty

loud summit
#

wdym multiple, just copy paste the line

pastel kernel
#

Would it crash if I use the joker without cryptid?

faint yacht
#

If Cryptid won't be present during the check, those will just fail.

pastel kernel
#

They’ll be ignored?

atomic edge
#

can you dissolve something and just hide it?

#

and not destroy the element

faint yacht
#

<@&1133519078540185692>

karmic creek
#

bazinga

faint yacht
#

🫡

vale zinc
#

Could one of you tell me how to specify a random Tag? Diet Cola uses add_tag(Tag('tag_double')) to specify a Double Tag in particular, but can this be modified to produce a random Tag?

round lion
#

particles keep crashing.

#

(before yall hound me for using a development version, this happens even on stable.)

tepid crow
vale zinc
slim ferry
#

get_next_tag_key would interfere with the main tag spawns i imagine

#

since itll use the same queue

rough furnace
#

DebugPlus

tepid crow
slim ferry
#

uhhhhhhhhhhhhhhhhhhhhhhhh

#

i have no clue i only knew about the vanillaremade way of getting a random tag

red flower
tepid crow
atomic edge
#

okay thanks

left sonnet
#

Hey, is there a good way to test UI? Like making a separate window so you're not messing with the base game UI

wintry solar
#

Debug plus watch commands

warm ore
#

anyone able to help with this

frosty rampart
#

looking at your screenshots of the code, you never defined any icon atlases

#

remove the suit_icon = { ... } lines

#

and see if that works

warm ore
frosty rampart
#

you did not remove all the suit_icon = { ... } lines

warm ore
frosty rampart
#

did you. save the file?

warm ore
#

yeah

frosty rampart
#

it doesn't seem like you did

#

there is literally no way for the error to say anything about icon_lc if icon_lc isn't anywhere in your file

warm ore
#

wait i resaved it and it still crashed but i think this is a new error

frosty rampart
#

delete line 27

prisma loom
#

Folks, how could I check what current Ante is? Like for exmaple «if current Ante is 6»?

#

in terms of context

slim ferry
#

G.GAME.current_round.round_resets.ante iirc

#

if that doesnt work then try blind_ante instead of ante

warm ore
#

ok i got it in the game now i just need to actually figure out how to add it to the cards

prisma loom
#

Thanks!

frosty rampart
warm ore
#

im here

hallow slate
#

{ n = G.UIT.O, config = { object = G.GAME.blind, draw_layer = 1 } },
{ n = G.UIT.O, config = { object = G.GAME.blind, draw_layer = 2 } },

How come the first one shows up in the create_UIBox_HUD_blind function, but not the second?

frosty rampart
#

the Hearts suit should have a new option

warm ore
frosty rampart
#

hrm

warm ore
#

is this because of the altered pixel size

frosty rampart
#

not sure

#

again i'm in class rn so i can't help much

warm ore
#

fair

#

Im gonna try something

daring fern
slim ferry
#

try turning off pixel smooting in your settings if you have that on and see if it shows then

warm ore
#

well thats interesting

#

i changed it back to 71x95 and it did this

slim ferry
#

yeah uhhhhh

#

you should probably keep the dimensions the same lol

warm ore
#

the entire reason im making this mod in the first place is to change the dimensions to make the cards high quality

red river
#

is there a way to fix that?

#

the code for calculate looks like this

    if context.before and not context.blueprint and #context.full_hand == 1 and context.full_hand[1]:get_id() == 6 and G.GAME.current_round.hands_played == 0 then
      -- context.full_hand[1]:set_seal("Gold", nil, true)
      G.E_MANAGER:add_event(Event({
        func = function()
          card:juice_up()
          context.full_hand[1]:juice_up()
          context.full_hand[1]:set_seal("Gold", nil, true)
          return true
        end
      }))
      return {
        message = "Gold Seal",
        colour = G.C.MONEY,
        message_card = card
      }
    end
  end```
prisma loom
daring fern
red river
#

which... doesn't look great

warm ore
slim ferry
#

it should just work by default

#

deck skins are probably different then but ive never worked with them so i wouldnt know

warm ore
#

ok cause my plan is the png for the texture pack is 10x larger than normal so i want the card pixel size to also be 10x larger to match it

gusty compass
#

Where can I have decks store permanent data (eg from card.ability), since self.ability and card.ability seem to throw an error where the value is nil

slim ferry
#

just store it in G.GAME

red flower
#

deck.effect.config iirc

#

i think deck.effect just works too

slim ferry
#

isnt deck.effect.config the center's config

faint yacht
#

G.GAME.selected_back?

gusty compass
#

Since I'm running it on calculate, and using a config to set a persistent value like jokers do

red flower
gusty compass
#

Idk if they carry similar params

red flower
#

deck.effect should work i think

gusty compass
#

Deck.effect?

#

Like deck.effect.multi?

red flower
#

yeah

gusty compass
#

I'll see

red flower
#

deck should be the second argument of calculate in this case

gusty compass
#

Not self, card, context?

#

Alr one sec

red flower
#

well they can be named john, sue, alvin if you want lol

faint yacht
#

The card is equal to the deck itself.

red flower
#

but self, deck, context is what makes sense there

gusty compass
#

Fair enough

#

Nope...

#

"attempt to perform arithmetic on field 'multi' (a nil value)"

faint yacht
#

For my "Deck! Deck! Deck!"...

#
calculate = function(self, back, context)
    if context.before then back.effect.config.repeatamount = G.jokers.cards and #G.jokers.cards or 0 end
    ...
#

You should also start a fresh run to initialize the value.

gusty compass
#

Kk

red flower
#

yeah ok just tested and you can modify that value without affecting the center so it should work ok

gusty compass
#

Well the crash is gone, but the effect is just dead

#

It's not removing the enhancements of the entire deck which is a shame

red flower
#

whats the code

gusty compass
#

One second

#

Probably I'm just being stupid and I don't get the message

daring fern
gusty compass
#
    key = "GG_vampiricdeck",
    atlas = "atlasholders",
    pos = {
        x = 4,
        y = 2
    },

    config = {
        multi = 0
    },

    loc_txt = {
        name = "Vampiric Deck",
        text = {
            "At the end of ante",
            "remove all {C:attention}Enhancements{},",
            "gain {C:mult}+2{} Mult for every",
            "{C:attention}Enhancement{} removed."
        }
    },

    calculate = function(self, deck, context)
        if context.end_of_round and G.GAME.blind.boss then
            local cards = G.playing_cards

            -- fix this shit later idk
            for i = 1, #cards do
                if cards[i].ability.name ~= "Default Base" then
                    cards[i].ability.name = "Default Base"
                    deck.effect.config.multi = deck.effect.config.multi + 2
                end
            end
        end

        if context.pre_joker then
            return {
                mult = deck.effect.config.multi
            }
        end
    end
} ```
slim ferry
#

setting the name does nothing besides creating janky interactions, you should check config.center.key and use Card:set_ability("c_base") instead of setting the name

red river
gusty compass
#

i never played with Smods.Back so no

gusty compass
#

via debugplus

#

as far as i know it was doing something since the crash was related to within the if condition, but i will see how i can tinker with the keys and all that

daring fern
red flower
gusty compass
#

Alright

faint yacht
#

On 0827c

if context.ante_end then
  for k, v in pairs(G.playing_cards) do
    if v.config.center.key ~= 'c_base' then
      v:set_ability('c_base')
      deck.effect.config.multi = (deck.effect.config.multi or 0) + 2
    end
  end
end

would be simpler.

red river
gusty compass
#

Well at least the enhancement draining works

lavish elm
#
return{
                sound = "xmpl_soda",
                func = function ()
                    SMODS.add_card{key = "j_diet_cola", edition = "e_negative"}
                end
            }

why does the sound not play?

gusty compass
#

But I think the deck just doesn't want to give me any mult

daring fern
red river
#

if anything, it probably looks even worse now because "-$3" popup and the effect are out of sync

red flower
red river
# daring fern Code?
    if context.before and context.main_eval and not context.blueprint and #context.full_hand == 1 and context.full_hand[1]:get_id() == 6 and G.GAME.current_round.hands_played == 0 then
      context.full_hand[1]:set_seal("Gold", nil, true)
      context.full_hand[1]:juice_up()
      return {
        message = "Gold Seal",
        colour = G.C.MONEY,
        message_card = card
      }
    end
  end```
daring fern
red flower
gusty compass
#

Got any suggestions?

slim ferry
#

context.other_joker

red river
slim ferry
#

like baseball card

red flower
#

whats my keyboard doing

gusty compass
#

Are there anything I can use to have it before jokers score?

gusty compass
red flower
#

initial_s oring_step

#

ant type that letter anymore

slim ferry
#

or does it give the mult after the joker trigger

gusty compass
#

Before any joker should trigger

#

Like the green joker's mult change for instance

#

Idk

slim ferry
#

i dont think thats a thing, there is initial_scoring_step which is before everything ig

gusty compass
#

Well that's a bit rough

red flower
#

i dont think thats a problem here

#

that step is before jokers but de ks are last anyway

#

im just going to buy a new keyboard i think