#💻・modding-dev

1 messages · Page 629 of 1

tired kestrel
#

bump

umbral spire
tired kestrel
#

Anyone? has anyone have an idea how a Lovely patch would work cause right now I've been dealing with this issue to a single joker

faint yacht
#

You currently are using a Game:start_run(args) hook, yes?

faint yacht
#

Set the game.lua as target file to patch, with after for position and set

self.play = CardArea(
        0, 0,
        CAI.play_W,CAI.play_H, 
        {card_limit = 5, type = 'play'})

as pattern to target... with payload being

self.customarea = CardArea(insertargshere)

or something. Although, next SMODS release will have a custom_card_areas function for SMODS.current_mod, fwiw.

umbral spire
#

bump

faint yacht
tired kestrel
faint yacht
#

The payload also can be a call of a function defined by your mod... but that probably should be checked for if the function is accessible at that point.

#

For this example, this lets me safely do my own things during the error handler... mainly to play the death chime of Mac Performa 5400.

quasi pike
#

thx

tired kestrel
#

what's this?

#

uhh..

#

was it pattern or? regex? or?

faint yacht
#

Pattern... and for multi-line, use ''' on both ends instead of ".

tired kestrel
#

oh

umbral spire
#

usage:

                local chosen = PLUTO.UTILS.pick_random_cards('bl_jokerblinds_blueprint', G.jokers.cards, math.ceil(#G.jokers.cards/2))
                for k,v in ipairs(chosen) do
                    G.GAME.blind:debuff_card(v)
                end

func:

PLUTO.UTILS.pick_random_cards = function(seed, area, n, set)
    local f = 'pick_random_cards'
    if not area then PLUTO.COMMON.missing_required('area','UTILS.'..f) end 
    if type(seed) ~= 'string' then PLUTO.COMMON.invalid_type('seed','string', tostring(type(seed)), 'UTILS.'..f) end
    if not PLUTO.COMMON.is_area(area) then PLUTO.COMMON.expected_area('area', area, 'UTILS.'..f) end
    if set and not PLUTO.COMMON.is_set(set) then error('[PLUTO]: ERROR: `set` is expected to be a valid set, received invalid or nil value') end
    local indices = {}
    if not set then
        for i=1, n do 
            local c = 0
            local function choose()
                c = pseudorandom(seed, 1, #area)
                if PLUTO.COMMON.tbl_contains(indices, c) then 
                    c = PLUTO.COMMON.pick_unique(seed, area, indices)
                end
            end 
            choose()
            table.insert(indices, c)
        end 
    else 
        local valid_indices = {}
        for k, v in ipairs(area) do
            if v.ability.set == set then 
                table.insert(valid_indices, k)
            end
        end
        for i=1, n do 
            local pick = 0

            local function choose()
                pick = valid_indices[pseudorandom(seed, 1, #valid_indices)]
                if PLUTO.COMMON.tbl_contains(indices, pick) then
                    pick = PLUTO.COMMON.pick_unique(seed, valid_indices, indices)
                end
            end

            choose()
            table.insert(indices, pick)
        end
    end 
    return indices
end 
faint yacht
#

687 line?

umbral spire
#

i think that is balatros' blind.lua?

#

i dont have a blind.lua

tired kestrel
#

it actually worked Ali, thanks though now this is the problem now.

toxic cave
#

im back from class now but i havent gotten a response, what do i gotta do to make it work on vanilla blinds

faint yacht
umbral spire
# umbral spire usage: ``` local chosen = PLUTO.UTILS.pick_random_cards('bl_joke...

pick_unique and tbl_contains:

PLUTO.COMMON.tbl_contains = function(tbl, itm)
    for k,v in ipairs(tbl) do 
        if itm == v then 
            return true 
        end
    end 
    return false
end

PLUTO.COMMON.pick_unique = function(seed, pool, taken)
    local out
    repeat
        out = pool[pseudorandom(seed, 1, #pool)]
    until not PLUTO.COMMON.tbl_contains(taken, out)
    return out
end
tired kestrel
umbral spire
#

in lsp_def/classes/blind.lua there isn't a line 687

tired kestrel
#

about the positions.

faint yacht
#

blind.lua is actually part of vanilla Balatro, so-

umbral spire
#

brb

faint yacht
tired kestrel
#

alright

#

now it worked

#

do I still get rid of the one with the hook thing?

#

or?

river grail
faint yacht
#

As you're directly patching into the original function, the hook isn't necessary.

tired kestrel
#

Alright, might as well get rid of the hook by commenting on it

solid salmon
#

how do i make a joker check its own edition

faint yacht
#

(self, card, context), so the Joker that's being calculated is card... and to check its' own edition, you just card.edition and card.edition.holo for Holographic, as example.

tired kestrel
#

I mean under it invisible

solid salmon
#

so

solid salmon
faint yacht
#

yeh.

toxic cave
solid salmon
#

OH NO

#

this code somehow does stack overflow

faint yacht
#

elseif, not else if.

solid salmon
#

it breaks the game after entering the blind

#

it makes a copy of itself

faint yacht
#

Comment out the whole if block that contains the actual card addition, add print(is_foil, is_holo, is_polychrome) to test if those variables of yours actually pass.

solid salmon
#

?

#

huh

faint yacht
#
SMODS.add_card({key = card.ability.extra.joker, edition = is_foil and 'e_foil' or is_holo and 'e_holo' or is_polychrome and 'e_polychrome' or nil})

...even then, the condition check can be condensed to just this.

solid salmon
#

wanna know why i excluded negative?

tired kestrel
#

How is it possible to make an invisible cardarea?

faint yacht
#

That'd be silly.

solid salmon
#

the game still freezes btw

faint yacht
faint yacht
solid salmon
#

my guess

#

probably since it creates itself after starting a blind

#

the copy creates a copy

#

hi sigma

umbral spire
faint yacht
#

The Mods/lovely/dump/game.lua version of it.

umbral spire
#

oh that's blind.lua

faint yacht
#

a

umbral spire
#

wait what

#

game.lua:687 is p_spectral_jumbo_1 = {order = 31, discovered = false, name = "Jumbo Spectral Pack", weight = 0.3, kind = 'Spectral', cost = 6, pos = {x=2,y=4}, atlas = 'Booster', set = 'Booster', config = {extra = 4, choose = 1}},?

faint yacht
#

I meant blind.lua, oops.

faint yacht
#

So what is around it?

tired kestrel
quasi pike
#

can't make it work, it doesn't debuff anything

faint yacht
umbral spire
# faint yacht So what is around it?
function Blind:debuff_card(card, from_blind)
    local obj = self.config.blind
    if not self.disabled and obj.recalc_debuff and type(obj.recalc_debuff) == 'function' then
        if obj:recalc_debuff(card, from_blind) then
            card:set_debuff(true)
            if card.debuff then card.debuffed_by_blind = true end
        else
            card:set_debuff(false)
        end
        return
    elseif not self.disabled and obj.debuff_card and type(obj.debuff_card) == 'function' then
        sendWarnMessage(("Blind object %s has debuff_card function, recalc_debuff is preferred"):format(obj.key), obj.set)
        if obj:debuff_card(card, from_blind) then
            card:set_debuff(true)
            if card.debuff then card.debuffed_by_blind = true end
        else
            card:set_debuff(false)
        end
        return
    end
    if self.debuff and not self.disabled and card.area ~= G.jokers then
        if self.debuff.suit and card:is_suit(self.debuff.suit, true) then
            card:set_debuff(true)
            if card.debuff then card.debuffed_by_blind = true end
            return
        end
        if self.debuff.is_face =='face' and card:is_face(true) then
            card:set_debuff(true)
            if card.debuff then card.debuffed_by_blind = true end

solid salmon
#

uhhh

umbral spire
#

so it's something to do with my SMODS:debuff_card()

#

line

solid salmon
#

good news and bad news

umbral spire
faint yacht
solid salmon
#

it stopped freezing

umbral spire
#

huh- weird

solid salmon
#

but

#

it made too many dupes

umbral spire
#

oh wait my pick_random_cards() helper returns a list of indices

#

;-;

#

whoops

faint yacht
solid salmon
#

gotta make up a new global variable

umbral spire
#

it should be G.jokers.cards[v] not v

#

;-;

faint yacht
#

-# Brain fried... not exactly in best of mindset either - got a whole ass new court order against me. mr_bones

tired kestrel
#

-# also I'm sorry to hear that as well

faint yacht
#

-# Long story... but "debt" is the theme. Not for this channel, anyway.

solid salmon
#

i fixed it

static valley
#

so I got image loading to work

#

how do I get a gif to load

#

as if I try doing it the way I would normally load an image, it would give an error, saying it's an "unsupported file format"

faint yacht
static valley
#

yea I just figured that part out

#

an idea I have is to split it into frames

#

how would I be able to get it to load the thing frame by frame, while at the same time being able to modify animation speed

harsh belfry
#

split that gif up using an online tool and load the resulting images and also reduce the frame rate and size so you don’t load too much

umbral spire
#

is it possible to make my own context

#

like the one in calculate(self, card, >>context<<)

#

or would it be a different way?

#

I know this way.

#

But again, I mean the calculates' context

#

And there is no goal, I

#

'm just curious

harsh belfry
#

double check because i couldn’t but

umbral spire
#

?

harsh belfry
#

so you can call it with whatever_context = true and calculate functions can detect for it

tired kestrel
#

finally got it

#

now only thing left is trying to like apply the two cards into the played hand (or maybe even making that poker hand automatically updates when those two come)

faint yacht
tired kestrel
#

Alright. now what about forcing the two cards into the scoring hand or playedhand. as I have in my concept earlier

#

wait I just realized that this is changes the rank right?

terse merlin
#

this is a shader though

#

which im not sure is the best option

static valley
#
-- in utils.lua
function Comedy_load_gif(name, num_frames)
    gif = {}
    for i = 1, num_frames do
        local path = (ComedyGold.path .. "assets/custom/" .. name .. "/" .. name .. "_" .. i .. ".png")
        local fileData = assert(NFS.newFileData(path))
        local img = assert(love.image.newImageData(fileData))
        gif[i] = assert(love.graphics.newImage(img))
    end
    return gif
end

-- in ComedyGold.lua
    if G.nuclearExplosion and (G.nuclearExplosion > 0) then
        if not ComedyGold.images["explosion"] then
            ComedyGold.images["explosion"] = Comedy_load_gif("explosion", 64)
        end
        for i, frame in ipairs(ComedyGold.images["explosion"]) do
            local a = math.min(1, G.nuclearExplosion * 2)
            love.graphics.setColor(1, 1, 1, a)
            love.graphics.draw(frame, 0, 0, 0, xScale, yScale)
        end
    end

ok so It sorta works. Only problem is that it only loads the last frame, and never get's unloaded

quasi pike
#

how does play_sound work?

#

I have the file but it just crushes when trying to play it

slim ferry
static valley
slim ferry
#

What is it that youre trying to do

slim ferry
#

SMODS.calculate_context calculates all centers with the given table as the context

tired kestrel
#

how do I make sure to put the cards into the played hand thing?

#

I got an error once I played

umbral spire
#

How do I play audio on loop? do i just use L2ds' sound:setLooping(true)?

#

I want to play an audio on loop for a tag, and it doesn't stop until it's removed, which only happens by starting a new run.

harsh belfry
umbral spire
harsh belfry
umbral spire
#

like 15 hours 😭😭

#

sleeping for too long = grants the ability to hear colors, sleeping for too little = grants the ability to @94n124912shfawaSAUDn

prisma island
#

How long would it take to make a mod that makes rare poker hands good? As in straight flush is at least the level of flush for example?

wispy falcon
#

How do I retrigger a joker?

tired kestrel
#

... Uhh... That happened.

#

I think I'm getting close but not close enough.

prisma island
#

still not playing

humble pawn
tired kestrel
wispy falcon
humble pawn
# wispy falcon bump

Are you trying to retrigger it or just copy it like what blueprint and brainstorm do?

wispy falcon
#

Retrigger

prisma island
#

How long would it take to make a mod that makes rare poker hands good? As in straight flush is at least the level of flush for example?

humble pawn
#

Under optional features

harsh belfry
#

also this is a goofy question to ask just ask how to do it instead

prisma island
#

How would I do it?

slim ferry
#

But it wouldnt take long at all

#

On average

harsh belfry
# prisma island How would I do it?

the level_up_hand function handles hand level ups so you could hook it and make flush also level up straight flush and flush house etc etc

slim ferry
#

Oh i misread the thing

#

Nvm

harsh belfry
prisma island
umbral spire
#

how do i change the weight of a vanilla/modded rarity

#

for a voucher

harsh belfry
tired kestrel
#

what is the context of removing a joker itself or a joker is getting destroyed?

harsh belfry
#

like you can just halve the amount of levels it levels up

tired kestrel
#

that triggers the last code thing.

harsh belfry
#

so straight flush scales slower

#

alternatively you could also probably make straight flush scale the same as flush when the cascading levels happen but i don't want to explain how to do that rn

slim ferry
umbral spire
prisma island
# harsh belfry so straight flush scales slower

Is my original idea not possible / hard to do? Basically that the rare hands get a floor from their inferiour versions and anything you spend to level up the rare hand is an extra level. So basically if you have flush at level 5 and straight at level 3 then straight flush would be level 5. If you then get Neptune straight flush would become level 6.

harsh belfry
umbral spire
slim ferry
#

Idk then steal from like

#

All in jest fabled deck or smth

harsh belfry
umbral spire
umbral spire
#

oh ok

#

thanks

harsh belfry
#

its a _mod meaning it multiplies the rarity weight by that

slim ferry
#

It wont

harsh belfry
#

if the weight is initially zero then it stays zero

slim ferry
#

Thats why you should use like

#

All in jest method or smth

#

What it uses for the deck

harsh belfry
#

yeah

#

alternatively screw with the get_weight of the rarity

umbral spire
#

;-;

#

is that even a vanilla thing

slim ferry
#

No

umbral spire
#

exactly

slim ferry
#

Its probably in a hook somewhere

umbral spire
#

rah

slim ferry
#

Some create_card hook or smth

umbral spire
#
            self.config = { increase_legendary_pool_rate = 0.008, extra = {}}
            vars = { }
        else
            key = self.key
            self.config = {joker_slot = -1, extra = {should_increase = true, remove_amt = 0, counterbalance = 0}}
            vars = { self.config.joker_slot }
        end
        return { key = key, vars = vars }
    end,
    apply = function(self, sleeve)
        CardSleeves.Sleeve.apply(self)
        if self.get_current_deck_key() == "b_aij_fabled" then
            self.config = { increase_legendary_pool_rate = 0.008, extra = {}}
            G.E_MANAGER:add_event(Event({
                trigger = "after",
                func = (function()
                    G.GAME.jest_legendary_pool.rate = G.GAME.jest_legendary_pool.rate - sleeve.config.increase_legendary_pool_rate
                    return true
                end)
            }))
        else
            self.config = {joker_slot = -1, extra = {should_increase = true, remove_amt = 0, counterbalance = 0}}
            G.E_MANAGER:add_event(Event({
                trigger = "after",
                func = (function()
                    G.GAME.jest_legendary_pool.in_shop = true
                    G.GAME.jest_legendary_pool.rate = G.GAME.jest_legendary_pool.rate - 0.008 -- 0.08%
                    return true
                end)
            }))
        end
    end,
    calculate = function(self, sleeve, context)

        local deck_or_sleeve = (sleeve.config.extra and sleeve.config.extra.should_increase and sleeve) or G.GAME.selected_back.effect

        if not sleeve.config.increase_legendary_pool_rate then
            if context.end_of_round and not context.repetition and not context.individual and deck_or_sleeve.config.extra.should_increase then
                 G.GAME.jest_legendary_pool.rate =  G.GAME.jest_legendary_pool.rate - 0.002
                 deck_or_sleeve.config.extra.remove_amt = deck_or_sleeve.config.extra.remove_amt + 0.002
            end
quasi pike
umbral spire
tired kestrel
#

I think I managed to make it work.

#

kinda.

umbral spire
# quasi pike bump

Do you mean how to use it?
play_sound('modprefix_soundkey',volume,pitch)
-# or was it pitch, volume?

#

you have to do SMODS.Sound{...} first

tired kestrel
#

Not sure if this seems a bit more sense for texas hold em'

quasi pike
tired kestrel
#

what on earth?

quasi pike
tired kestrel
prisma island
quasi pike
#

why does this deck crash my game?

vale grove
#
use = function(self, card, area, copier)
        G.E_MANAGER:add_event(Event({
            trigger = 'after',
            delay = 0.4,
            func = function()
                play_sound('timpani')
                SMODS.add_card({ set = 'Joker' })
                card:juice_up(0.3, 0.5)
                return true
            end
        }))
        delay(0.6)
    end,

how do i make this take from a custom pool?

daring fern
dapper sun
#

how do i check what cardarea a card is in?

frosty rampart
#

card.area is the area object itself
so card.area == G.jokers checks if card is in the jokers area

errant arrow
#

for having something print in debugplus's logs, do i just use the print() function?

frosty rampart
#

yep

errant arrow
#

cool, thanks

quasi pike
normal crest
#

if crash then why no crash log

daring fern
#

mellow marsh
#

this feels like a dumb question but: is there a way to tell if a playing card is in your deck or not

#

because apparently added_to_deck is nil for all of the playing cards that start in your deck

daring fern
hushed field
#

If it's the actual deck location, you can check the area. Otherwise you can look for it by iterating though G.playing_cards. But generally area should be a good check, as the playing cards that exist in game but aren't in your deck are probably in the shop or a booster

mellow marsh
#

as in whether it's in your full deck or whether it's in a booster pack or shop

#

iterating through G.playing_cards seems like a horribly inefficient solution

#

especially as it seems unintentional that some cards in your deck will have added_to_deck defined as true (anything that gets added to your deck after the run starts will have this set correctly)

daring fern
mellow marsh
#

unintentional meaning it seems like a bug with balatro, so it may not be SMODS' job to fix it

dapper sun
#

how do i get_current_pool with repeating jokers like showman

mellow marsh
daring fern
dapper sun
#

ty

mellow marsh
wintry solar
#

that is a cursed way of getting a duplicate pool

mellow marsh
#

more specific context is, i have a joker that's triggering when a playing card's rank or suit changes, and this context is called when creating a copy of the card, such as via the cryptid spectral

#

i'm looking to only get the joker triggered when an existing card changes, but it seems like there isn't a reliable way to know whether a card is in your deck yet

hushed field
wintry solar
mellow marsh
#

i'm using these contexts and they do not cover this

wintry solar
#

oh

mellow marsh
#

Card:set_base is called from copy_card, and those contexts will trigger any time set_base is called

#

i do wonder whether patching the game such that added_to_deck is properly defined for your initial deck would change any behavior at all

mellow marsh
#

i'm not seeing how patching copy_card solves much for me here

solid salmon
#

how do i make a joker turn itself into something better

daring fern
solid salmon
#

can i do the same with consumables

daring fern
mellow marsh
#

my issue is that copy_card calls set_base (as it needs to do, obviously, for the new card to have the same rank and suit as the original card), but doing so triggers the contexts for changing rank and suit, and there is no way for me to determine within those contexts whether the card is in your deck or not
i suppose your proposal is that i should be patching copy_card to add my own variable to say the card is a copy?

solid salmon
#

yippee

daring fern
mellow marsh
#

hm
i think this would introduce a new problem of preventing death from working though

#

as copy_card is also used for that

#

as in, if you use death to change a card, it should correctly call the contexts (as it's altering an existing card in your deck, which is the behavior i want to target)

#

though i guess maybe just checking that new_card is nil would be enough to recognize if it's from a death or if it's a new copy

wintry solar
mellow marsh
#

i would also think this but it seems it doesn't

wintry solar
#

yes, it's a change I'll need to make in smods I think

mellow marsh
#

i think if that were changed and the rank/suit contexts were provided an initial field then yeah that would be sufficient for being able to tell whether it's affecting an existing card or not

mellow marsh
humble pawn
#

Gonna drop this soon

solid salmon
#

Is there a way to make a joker check if the jokers you own are a part of a specific group

static valley
#

trying to make an edition where playing a card with a specific suit will have a chance to retrigger the joker.

    calculate = function(self, card, context)
        local canRetrigger = false
        if context.individual and context.cardarea == G.play and
            context.other_card:is_suit(card.edition.extra.suit) and
            context.retrigger_joker_check and
            SMODS.pseudorandom_probability(card, 'comedy_greedy_edition', 1, card.edition.extra.odds) 
        then
            canRetrigger = true
        end
        if canRetrigger and context.retrigger_joker_check then
            return { repetitions = card.edition.extra.retriggers }
        end
    end

it doesn't seem to be doing anything. What can I do to make it actually work

daring fern
# static valley trying to make an edition where playing a card with a specific suit will have a ...
if card.ability.set == 'Joker' and context.retrigger_joker_check and context.other_card == card and G.play and next(G.play.cards) then
    local effects = {}
    for k, v in pairs(G.play.cards) do
        if v:is_suit(card.edition.extra.suit) and SMODS.pseudorandom_probability(card, 'comedy_greedy_edition', 1, card.edition.extra.odds) then
            table.insert(effects, {repetitions = card.edition.extra.retriggers, message_card = v})
        end
    end
    return SMODS.merge_effects(effects)
end
wispy falcon
#

Why does this retrigger nothing instead of itself?

if context.retrigger_joker_check and card == self then

#

It's an edition

spiral mural
#

how do i apply a shader without a edition...

tepid crow
#

probably drawstep

spiral mural
#

show a code sample or smth 😇

opaque relic
#

im trying to make it so this joker spawns filler jokers and gains x mult for each one of those owned, how do i make it so the xmult properly correlates to the amount?

config = {extra = { Xmult = 1, }},
    loc_vars = function(self, info_queue, card)
        return { vars = { card.ability.extra.Xmult, 
        1 + card.ability.extra.Xmult*funnykittyamount}},
        -- need to figure out how to define these x amount of jokers.
    end,
    calculate = function(self,card, context)

        -- if context.other_card/how df do i create more kitty
        if context.setting_blind then 
            return {
                SMODS.add_card{ key = c_pokers_funnykitty}
                -- here is where i would put my kitty spawning logic... if i had one!!
        }
    end
        
        if context.joker_main then
            return {
                Xmult_mod = card.ability.extra.Xmult,
                message = localize { type = 'variable', key = 'a_xmult', vars = {card.ability.extra.xmult} }
            }
        end
        card.ability.extra.xmult = card.ability.extra.xmult + card.ability.extra.xmult_gain
        return {
            message = '+1 Kitty!',
            colour = G.C.XMULT,
            card = card
        }
    end```
#

the *funnykittyamount being a filler variable

#

also im just realizing the message return should be in the other context dont worry about that

toxic cave
spiral mural
#

don't get it

#

i need to apply the shader to a created card btw

tepid crow
#

idk man I've never worked with drawstep before, I just know it exists

daring fern
daring fern
humble pawn
ocean sinew
#

how do I make a deck give things like 30 chips before any joker gives stuff like x mult x chips etc

gaunt folio
#

is there a way to see if any card in deck has a polychrome edition? I wanna do something like steel joker of sorts but with polychrome cards\

naive agate
#

ballotro

daring fern
obsidian spear
daring fern
obsidian spear
#

yea

daring fern
# obsidian spear yea
SMODS.current_mod.set_debuff = function(card)
    if condition then
        return 'prevent_debuff'
    end
end
obsidian spear
#

tyyyyyyyyyyyyyyyyyyyyyyyyyy

urban wasp
#

why doesn't this work?

if context.other_joker and (context.other_joker.config.center.rarity == 1 or context.other_joker.config.center.rarity == "Common") then
    return {
        money = card.ability.extra.dollars
    }
end
daring fern
faint yacht
#

...that, and dollars =, not money =.

urban wasp
obsidian spear
#

How do I get if the player only has 1 tarot card?

daring fern
obsidian spear
#

tyyyyyyy againnnnnnnnnnn

timid parrot
#

the edition label seems to not be working. What am I doing wrong in the loc file?

frosty rampart
timid parrot
#

oh, weird

#

currently solving the loc_txt technical debt (it is large 😭)

quasi pike
obsidian spear
#

why does this crash?

  -- in loc_vars
            colours = { 
                HEX("000000"),
                HEX("FF0000"),
                HEX("00FF00"),
                HEX("0000FF")
            }

I was using {V:4} and {B:1} and the others in other places

umbral zodiac
#

colours goes in the vars table

obsidian spear
#

in?

#

oh in!

#

#1 dumbass 🙏

urban wasp
#

how do i get the message here to show on this joker? every time another joker gives +mult, the upgrade message is displayed on the +mult-giving joker instead

#
calculate = function(self, card, context)
    if context.post_trigger and context.other_card and context.other_card.config and context.other_card.config.center_key ~= "j_bfs_compressed" and not context.blueprint_card then
        if context.other_ret and context.other_ret.jokers and (type(context.other_ret.jokers) == "table" and context.other_ret.jokers.mult and context.other_ret.jokers.mult ~= 0) or (type(context.other_ret.jokers) == "table" and context.other_ret.jokers.mult_mod and context.other_ret.jokers.mult_mod ~= 0) then
            card.ability.extra.mult = card.ability.extra.mult + card.ability.extra.mult_mod
            return {
                message = localize("k_upgrade_ex"),
                colour = G.C.RED
            }
        end
    end
end,
#

i've tried card = card and card = self, but neither have worked

quasi pike
# quasi pike

forget about this, I just changed the ability of the deck to one I could easily make

timid parrot
#

currently creating a custom gradient and wondering how to access it in code (like how you can set a badge color to G.C.RED for instance)

quasi pike
#

Somehow the play_sound() crashes the game, I don't understand why

vale grove
#

How do you apply a perishable sticker on joker creation?

timid parrot
#

I think card:set_perishable(true) with card being the created joker card

vale grove
timid parrot
#

uhhh prob not

vale grove
#

how else would you do apply it?

obsidian spear
#

its stickers = {"perishable"}

#

then after you need force_stickers = true

timid parrot
#

SMODS.add_card({ set = 'Scalala',stickers = {"perishable"}})

faint yacht
vale grove
obsidian spear
obsidian spear
timid parrot
#

I don't think force_stickers is necessary? Just reading the documentation

obsidian spear
#

SMODS.Gradients["key"]

obsidian spear
#

documentation is bad

vale grove
obsidian spear
#

shocking ik

timid parrot
#

figured it out by digging thru the smods source

obsidian spear
obsidian spear
vale grove
obsidian spear
#

inside the table next to set or stickers

#

not next to perishable

vale grove
# obsidian spear inside the table next to set or stickers
        G.E_MANAGER:add_event(Event({
            trigger = 'after',
            delay = 0.4,
            func = function()
                play_sound('timpani')
                SMODS.add_card({ set = 'Scalala', force_stickers = true, stickers = { "perishable" } })
                card:juice_up(0.3, 0.5)
                return true
            end
        }))

Maybe im just stupid but this doesn't work

obsidian spear
#

compare with this

        SMODS.add_card({
            key = "j_crafty", 
            stickers={"perishable"}, 
            force_stickers = true
        })

since this one does work

#

why is set Scalala is that like a rarity or?

#

actually doesnt matter

vale grove
obsidian spear
#

ah

vale grove
#

from the jokers i made

#

like balala but scalala

#

eyy ty

obsidian spear
#

i'd help if i could man

obsidian spear
#

has to have a bunch of to_big() dw tho ali helped me

solid mesa
# obsidian spear has to have a bunch of to_big() dw tho ali helped me

idk i have it working without to_big() XD

        if context.cardarea == G.jokers and context.joker_main then
            if hand_chips % 2 == 0 then
                return {
                    xchips = card.ability.extra.div_chips
                }
            else
                return {
                    xchips = card.ability.extra.xchips,
                    extra ={chips = -card.ability.extra.minus_chips}
                    
                }
            end
        end
    end

-# yea i know this isnt the best coding, not need to remind me

obsidian spear
#

basically the exact same as the other two 🙏 fym not the best, if the other 2 did it the same its probably not bad

#

wait handchips is probably for the base chips?

#

idk if cass meant for current chips

solid mesa
obsidian spear
#

ah okay

obsidian spear
#

Bitterstuff.crossmodded[mod.id and mod.id or 1] = mod
gosh why the fuck does mod.id exist but also not?

#

the two lines before

    local mod = SMODS.find_mod(file)
    if next(mod) then
obsidian spear
#

aeuhuheuhehuhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh

#

ml some things are annoying

#

why does name appear and not text

true jasper
obsidian spear
#

no

#

thats not how text works

#

i can use any
""
''
or [[]]

true jasper
#

🤷‍♀️

daring fern
tall wharf
#

bro copied my code without knowing what to do with it

obsidian spear
tall wharf
#

i know this because i came up with the name description dummies

obsidian spear
tall wharf
#

just put it in others

obsidian spear
#

all of it?

tall wharf
#

and use it the normal people way

obsidian spear
#

ik i might be dumb

tall wharf
#

Description Dummy is not how normal people do it

obsidian spear
#
        Other = {
            dd_Bitters_CassGlop = {
                name = "Re:potassium Crossmod",
                text = {
                    '{V:1}Spawn{} a {C:dark_edition}negative{} {C:planet}Glopur{} every {C:attention}3{} rounds {B:1,C:inactive}(#4#){}',
                }
            }
        },

so why no work?

tall wharf
#

how did you add info queue

obsidian spear
#

uh oh

#

ah

#

i see the problem the set i think?

true jasper
#

also you don't need the "dd_" in the key

obsidian spear
#
        if Bitterstuff.crossmodded["potassium_re"] then
            info_queue[#info_queue+1] = {set = "DescriptionDummy", key = "dd_Bitters_CassGlop", vars = {card.ability.extra.round2}}
        end

#

mmmmmmm

tall wharf
#

dd is what i came up with

obsidian spear
#

euuguhhhh so whats broken

tall wharf
#

i have it outside of Other because i don't want to clutter vanilla things

obsidian spear
#

yes aiko, but why does mine crash

#

do i make set "Other"?

daring fern
obsidian spear
#

bro im gonna throw my pc outta my window

        if Bitterstuff.crossmodded["potassium_re"] then
            info_queue[#info_queue+1] = {
                set = "Other", 
                key = "Bitters_CassGlop", 
                vars = {
                    card.ability.extra.round2,
                    colours = { 
                        HEX("000000"),
                        HEX("FF0000"),
                        HEX("00FF00"),
                        HEX("0000FF")
                    }
                }
            }
        end
#

why is it nil

#

oh

#

noononon

#

nvm

#

i got it

toxic cave
quasi pike
distant junco
quasi pike
#

dang it

#

D:

nova cedar
#

how would I go about appending my custom UI table to G.HUD?

opaque relic
#

getting "functions/common_events.lua:2323: attempt to index local 'center' [a nil value]

upon attempting to create a joker at the start of a blind. its saying my key to reference to the joker is forced. any ideas?


SMODS.Atlas{
    key = 'Pokers', -- might need to add this later to all the everything as a tag ig
    path = 'Pokers_Jokers.png',
    px = 71,
    py = 95
}

SMODS.Joker{ --catastic 
    key = 'catastic',
    loc_txt = {
        name = 'Catastic',
        text = {
            'When Blind is selected,',
            'create a {C:attention}Funny Kitty{}',
            'Gains {X:mult, C:white}X#1#{} Mult for each {C:attention}Funny Kitty{}',
            '{C:inactive}(Currently {X:mult}X#1#{C:inactive} Mult)'
        }
    },

    atlas = 'Pokers',
    pos = {x = 0, y = 0},
    rarity = 2,
    cost = 6,
    unlocked = true,
    discovered = true,
    config = {extra = { Xmult = 2, creates = 1}},
    loc_vars = function(self, info_queue, card)
        local kitty_count = #SMODS.find_card("c_Pokers_funnykitty")
        return { vars = { card.ability.extra.Xmult + kitty_count, card.ability.extra.creates}}
        -- need to figure out how to define these x amount of jokers
    end,
    calculate = function(self,card, context)
        if context.joker_main then
            local kitty_count = #SMODS.find_card("c_Pokers_funnykitty")
            return {
                Xmult_mod = card.ability.extra.Xmult + (2*kitty_count),
                messsage = localize { type = 'variable', key = 'a_xmult', vars = {1 + kitty_count}}
            }
        end
#
      -- if context.other_card/how df do i create more kitty
        -- removed: #G.jokers.cards + G.GAME.joker_buffer < G.Jokers.config.card_limit
        if context.setting_blind then
            local jokers_to_create = math.min(card.ability.extra.creates, 
                G.jokers.config.card_limit - (#G.jokers.cards + G.GAME.joker_buffer))
            G.GAME.joker_buffer = G.GAME.joker_buffer + jokers_to_create
            G.E_MANAGER:add_event(Event({
                func = function()
                    for _ = 1, jokers_to_create do
                        SMODS.add_card{ key = "c_Pokers_funnykitty"}
                        G.GAME.joker_buffer = 0
                    end
                    return true
                end 

                -- here is where i would put my kitty spawning logic... if i had one!!
        }))
        return {
            message = '+1 Kitty!',
            colour = G.C.XMULT,
            card = card
        }
    end
        
        if context.joker_main then
            return {
                Xmult_mod = card.ability.extra.Xmult,
                message = localize { type = 'variable', key = 'a_xmult', vars = {card.ability.extra.xmult} }
            }
        end

        for _, catastic in ipairs(SMODS.find_card("c_Pokers_funnykitty")) do
        card.ability.extra.xmult = card.ability.extra.xmult + card.ability.extra.xmult_gain
        -- return {}
    end
end
}
golden field
#

how do i add the flipping effect to ts

SMODS.Consumable {
    key = 'beth',
    set = 'blindconsumabletype',
    pos = { x = 1, y = 0 },
    atlas = 'blindcon',
    display_size = {w = 64, h = 64},
    config = { max_highlighted = 1 },
    loc_vars = function(self, info_queue, card)
        info_queue[#info_queue + 1] = G.P_CENTERS.m_mult
        info_queue[#info_queue + 1] = G.P_CENTERS.m_wild
        info_queue[#info_queue + 1] = G.P_CENTERS.m_glass
        info_queue[#info_queue + 1] = G.P_CENTERS.m_steel
        info_queue[#info_queue + 1] = G.P_CENTERS.m_stone
        info_queue[#info_queue + 1] = G.P_CENTERS.m_gold
        info_queue[#info_queue + 1] = G.P_CENTERS.m_lucky
        return { vars = { card.ability.max_highlighted } }
    end,
    use = function(self, card, area, copier)
        G.E_MANAGER:add_event(Event({
            trigger = 'after',
            delay = 0.4,
            func = function()
                local enhancement = SMODS.poll_enhancement({key = 'emuismeaningsmile', guaranteed = true, options = {'m_mult', 'm_wild', 'm_glass', 'm_steel', 'm_stone', 'm_gold', 'm_lucky'}})
                local change_card = G.hand.highlighted[1]
                change_card:set_ability(enhancement, true)
                card:juice_up(0.3, 0.5)
                return true
            end
        }))
    end,

    can_use = function(self, card)
        if G and G.hand then
            if #G.hand.highlighted ~= 0 and #G.hand.highlighted <= 1 then
                return true
            end
        end
    end
}
hushed field
#

card:flip()

golden field
hushed field
#

chance_card:flip()

#

the flip() function is something all cards have access to, so as long as something is a card, you can call :flip() on it!

runic pecan
#

Hey guys,
is there any tutorial about in-game animation, as in, let's say,
moving a png across the screen?
I've planned to make some custom animation for some of my consumeables in the future.

tired kestrel
#

is there a way to like detect if the round has ended?

#

or another hand playing?

solid salmon
#

is there a way to make sure jokers cant appear in shop

humble pawn
solid salmon
tired kestrel
#

I don'T even know why this is happening.

#

And I tried to find ways to fix it and now there is a nother problem

#

tihsi s what's happening.

tired kestrel
# tired kestrel
  1. once the round ends the two card on the area still put there for no reason.
  2. dispite it displays the thing weirdly somehow it's skipping the other cads that could easily qualify for a hand?
hardy vessel
#

Am I missing something to make this joker have the +chips message appear on the planet cards?

    calculate = function(self, card, context)
        if context.other_consumeable and context.other_consumeable.ability.set == 'Planet' then
            local planets_used = 0
            for k, v in pairs(G.GAME.consumeable_usage) do if v.set == 'Planet' then planets_used = planets_used + 1 end end
            return {
                chips = planets_used * card.ability.extra.chips,
                message_card = context.other_consumable
            }
        end
    end,
tired kestrel
slim ferry
hardy vessel
tired kestrel
wispy falcon
#

How would I make an edition that has a 1 in 4 to make the Joker/Card not trigger?

tranquil gull
#

decided to add G.C.RETRIGGER / {C:retrigger} just for clarity

"time finish"

"use hand finish implies"
"card all is use time again"

"power big"

distant junco
#

how can you check what pools a joker is in

tired kestrel
daring fern
#

tired kestrel
#

hm?

#

what is happening?

#

this isn't normal

wispy falcon
daring fern
tired kestrel
daring fern
tired kestrel
#

first was the joker.
||-- World Joker Tour SMODS.Joker { key = "worldpokertour", loc_txt = { name = 'World Joker Tour (GBA 2005)', text = { [1] = "Texas Hold Em'" } }, unlocked = true, blueprint_compat = true, perishable_compat = false, rarity = 2, cost = 5, pos = { x = 0, y = 0 }, atlas = 'j_placeholder', display_size = { w = 71, h = 95 }, config = { extra = { t_chips = 0, }, }, loc_vars = function(self, info_queue, card) return { vars = { card.ability.extra.t_chips, } } end, calculate = function(self, card, context) if context.setting_blind and not context.blueprint and not context.repetition then G.FUNCS.draw_from_deck_to_hole_hand() end if context.before and context.main_eval and not context.blueprint then --G.FUNCS.draw_from_hole_hand_to_play() end if not context.end_of_round and context.game_over == false then if context.after and not context.blueprint and not context.repetition then G.FUNCS.draw_from_deck_to_hole_hand() end end if context.joker_main then return { chips = card.ability.extra.t_chips } end end }||

#

The code where I had the G.FUNCS to work:

||```
G.FUNCS.draw_from_deck_to_hole_hand = function(e)
local tour_space = e or math.min(#G.deck.cards, G.hand.config.card_limit - #G.hand.cards)
tour_space = math.min(#G.deck.cards, 2)
delay(0.3)

for i=1, tour_space do --draw cards from deckL
    if G.STATE == G.STATES.TAROT_PACK or G.STATE == G.STATES.SPECTRAL_PACK then 
        draw_card(G.deck,G.holehand, i*100/tour_space,'up', true)
    else
        draw_card(G.deck,G.holehand, i*100/tour_space,'up', true)
    end
end

end

G.FUNCS.draw_from_hole_hand_to_play = function(e, spac_)
local anycarddrawn = false
local allholehands = {}

for i = 1, #G.holehand.cards do
    allholehands[#allholehands+1] = G.holehand.cards[i]
end

if #allholehands > 0 then
    for i = 1, #G.holehand.cards do
        for v = 1, #allholehands do
            draw_card(G.holehand, G.play, (i+(spac_-1))*100/((#allholehands)+spac_), 'up', nil, G.holehand.cards[i])
            anycarddrawn = true
        end
    end
end

end

#

||```[[patches]]
[patches.pattern]
target = "game.lua"
pattern = '''self.play = CardArea(
0, 0,
CAI.play_W,CAI.play_H,
{card_limit = 5, type = 'play'})'''
position = "after"
match_indent = true
payload = '''
self.holehand = CardArea(
9.5, 2.75,
G.CARD_W * 1.5,G.CARD_H * 0.9,
{card_limit = 2, type = 'hand', highlight_limit = 0})

'''

[[patches]]
[patches.pattern]
target = "cardarea.lua"
pattern = "(self.config.type == 'deck' and self ~= G.deck) or"
position = "before"
match_indent = true
payload = '''
(self.config.type == 'hand' and self == G.holehand) or
'''

[[patches]]
[patches.pattern]
target = "functions/state_events.lua"
pattern = '''for i=1, #G.hand.highlighted do
if G.hand.highlighted[i]:is_face() then inc_career_stat('c_face_cards_played', 1) end
G.hand.highlighted[i].base.times_played = G.hand.highlighted[i].base.times_played + 1
G.hand.highlighted[i].ability.played_this_ante = true
G.GAME.round_scores.cards_played.amt = G.GAME.round_scores.cards_played.amt + 1
draw_card(G.hand, G.play, i*100/#G.hand.highlighted, 'up', nil, G.hand.highlighted[i])
end'''
position = "after"
match_indent = true
payload = '''

G.FUNCS.draw_from_hole_hand_to_play(nil, (#G.hand.highlighted))

'''

Here's thel ovely patch.
#

there we go

#

sorry if I had to like share all the code here cause I wasn't sure if I have to like go into detail. I might delete this once it gets resolved.

weary merlin
#

what method would be safe to get the length of the purchased vouchers array within the in_pool function?

dapper sun
#

how do i add a cardarea to a joker description?

weary merlin
#

why is it working now

#

thanks i guess
maybe had an invisible typo, kept on saying i was trying to index G.vouchers.cards

weary merlin
tranquil gull
#

how would i cause the tutorial to pop up again?

#

need to check my localization

minor pumice
#

Uhh how would I make a timer that whenever it hits a number it would add more to a variable and then reset?

tranquil gull
#

okay i need some help with smods internals

#

i want to mount a folder over the SMODS folder so that i can, for example, add SMODS/_/localization/tok.lua

#

this is in a non-SMODS mod

#

@rough furnace i see you're part of the SMODS github team, would you happen to know if this is possible?

rough furnace
#

You can put whatever keys you want in your own mods localization

tranquil gull
#

what i have rn is this:

if not NFS.mount(mod_dir .. "/crossmod/SMODS", "SMODS", true) then
    error("failed to mount crossmod assets")
end
#

yes, but

#

i tried putting the keys of other mods but it doesn't work

rough furnace
#

Can I see an example?

#

Actually your priority might have to be higher

#

Than the other mod

tranquil gull
#

it's a lovely mod so it doesn't have priority

#

it doesn't depend on smods

rough furnace
#

how do you load localization?

tranquil gull
#
function _tokipona_init_language(self, mod_dir)
    check_mount(mod_dir)
    self.LANGUAGES['tok'] = {
        font = 1,
        label = "toki pona",
        key = "tok",
        beta = true,
        warning = {"toki ni li sin mute a", "sina wile pana pona la o pali e nena toki", "o pali sin la ni li pona"},
    }
end
[[patches]]
[patches.pattern]
target = "game.lua"
position = "before"
pattern = "for _, v in ipairs(self.FONTS) do"
payload = """
_tokipona_init_language(self, "{{lovely_hack:patch_dir}}")
"""
times = 1
match_indent = true
#

maybe i could move check_mount to the top of main.lua

#

yea here's the new one:

#
local mounted = false

function _tokipona_load_language(mod_dir)
    if not mounted then
        mounted = true
        if not mount(mod_dir .. "/localization", "localization", true) then
            error("failed to mount mod assets")
        end
        if not mount(mod_dir .. "/crossmod/SMODS", "SMODS", true) then
            error("failed to mount crossmod assets")
        end
    end
end

function _tokipona_init_language(g)
    g.LANGUAGES['tok'] = {
        font = 1,
        label = "toki pona",
        key = "tok",
        beta = true,
        warning = {"toki ni li sin mute a", "sina wile pana pona la o pali e nena toki", "o pali sin la ni li pona"},
    }
end
[[patches]]
[patches.pattern]
target = "game.lua"
position = "before"
pattern = "for _, v in ipairs(self.FONTS) do"
payload = """
_tokipona_init_language(self)
"""
times = 1
match_indent = true

[[patches]]
[patches.pattern]
target = "main.lua"
position = "before"
pattern = "function love.run()"
payload = """
_tokipona_load_language("{{lovely_hack:patch_dir}}")
"""
times = 1
match_indent = true

still not working though

#

@rough furnace basically what 'm asking is is there anywhere i can mount(mod_dir .. "/crossmod/SMODS", "???", true) to to make this work

rough furnace
#

Not really

#

the simplest solution would be to register a smods mod for override smods loc

#

this can be done without losing vanilla compat (see DebugPlus)

dapper sun
#

how would i store a card in a joker?

rough furnace
#

I'm not really familar enough with how smods loads it's localization to suggest a way to load yours after it

daring fern
tranquil gull
#

i'm not loading it on top of a file

dapper sun
#

i wanna have a consumable that i can put inside the joker and take back out

rough furnace
tranquil gull
#

i'm trying to add a new smods/localization/tok.lua

#

without being smods itself

rough furnace
#

you'll have to creat a meatadata with a lua file as the main file (it can be empty) in the same folder as the localization folder

#

or well you can use the one function to load it too if you want to do so manuaklly

daring fern
dapper sun
#

where can i find documentation on those functions?

tranquil gull
#

damn that actually did it

golden field
tranquil gull
#

it's annoying to have all of the cross mod localization in one file though

daring fern
dapper sun
#

😭

rough furnace
dapper sun
#

then how do i use them?

tranquil gull
#

nah i got it

daring fern
dapper sun
#

thanks

static valley
#

If I double a joker's values, and the joker adds a number of joker slots, how do I double the slots?

#
SMODS.Sound({key = "crit", path = "crit.ogg",})
SMODS.Joker {
    key = "teto",
    atlas = "comedy_jokers",
    pos = { x = 2, y = 2 },
    soul_pos = { x = 3, y = 2 },
    unlocked = false,
    blueprint_compat = true,
    rarity = 4,
    cost = 20,
    config = { extra = { joker_slot_gain = 1, joker_slots_added = 0 } },
    loc_vars = function(self, info_queue, card)
        return { vars = { card.ability.extra.joker_slot_gain, card.ability.extra.joker_slots_added, colours = { ComedyColors.TETO } } }
    end,
    calculate = function(self, card, context)
        if context.final_scoring_step and (SMODS.calculate_round_score() > G.GAME.blind.chips) then
            return {
                message = "+1 Joker Slot",
                colour = ComedyColors.TETO,
                sound = "comedy_crit",
                func = function()
                    G.jokers.config.card_limit = G.jokers.config.card_limit + card.ability.extra.joker_slot_gain
                    card.ability.extra.joker_slots_added = card.ability.extra.joker_slots_added + card.ability.extra.joker_slot_gain
                end
            }
        end
    end,
    add_to_deck = function(self, card, from_debuff) -- resets the amount added (prevents unnecessary joker slot removal)
        if from_debuff then
            G.jokers.config.card_limit = G.jokers.config.card_limit + card.ability.extra.joker_slots_added
        else
            card.ability.extra.joker_slots_added = 0
        end
    end,
    remove_from_deck = function(self, card, from_debuff) -- removes any joker slots that you gained
        G.jokers.config.card_limit = G.jokers.config.card_limit - card.ability.extra.joker_slots_added
    end
}

I already got edge cases so that the slots gained are removed if the joker is debuffed (and the slots are added back when it is undebuffed)

dapper sun
dapper sun
#
if (card.ability.extra.card) then
    local newcard = SMODS.create_card({set = card.ability.extra.card.ability.set})
    newcard:load(card.ability.extra.card)
else
    card.ability.extra.card = G.consumeables.highlighted[1]:save()
    G.consumeables.highlighted[1]:remove()
end```
#

wait that's not it

#

there

dapper sun
#

i still dunno how to fix this

spiral mural
#

is there a way to see if a joker got retriggered

dapper sun
primal robin
#

Is this check correct?

dapper sun
#

since u asked to see my code earlier

daring fern
dapper sun
vale zinc
#

This new Enhanced card of mine isn't giving its ^Mult. Can anyone tell me why?

-- Uranium Card
SMODS.Enhancement {
    key = "uranium",
    atlas = "EnhancedSheet",
    set = "Enhanced",
    pos = {
        x = 0,
        y = 0
    },
    object_type = "Enhancement",
    config = {
        extra = {
            emult = 1.15,
            cards_to_destroy = 1
        }
    },
    loc_vars = function(self, info_queue, card)
        return {
            vars = {
                card.ability.extra.emult,
                card.ability.extra.cards_to_destroy,
            },
        }
    end,
    replace_base_card = true,
    no_rank = true,
    no_suit = true,
    always_scores = true,
    calculate = function (self, card, context)
        if (context.cardarea == G.play) and context.main_scoring then
            for i = 1, card.ability.extra.cards_to_destroy do
                SMODS.destroy_cards(pseudorandom_element(G.hand.cards, 'm_lapsems_uranium'))
            end
        end
    end
}
umbral zodiac
#

emult isnt implied like xmult or +mult is right

#

i thought you had to do it yourself

vale zinc
#

I dunno, I saw it in some of Minty's code and it evidently must've turned out hunky-dory.

dapper sun
#

okay but maybe they had a patch or smtn that made it implied

umbral zodiac
#

ye probably

#

you should likely just implement the effect yourself

glacial robin
#

is this the place to look for testers or am i at the wrong place

vale zinc
dapper sun
#

talisman moment

#

to be fair, i'd recommend having talisman if ur using emult anyways

#

since it very easily passes vanilla naneinf

umbral zodiac
#

scale a tropical smoothie in 4 rounds with oil lamp then put them in the center of your joker slots. this trick will ruin your life because you listened to a type A chatter.

dapper sun
#

🔥

glacial robin
#

i didnt get no answer im asuming thats a no then

dapper sun
#

maybe if you show off your mod then people would be interested in trying it out

glacial robin
#

thank you for the help wise man

dapper sun
#

*woman

#

blows you up with my Misgender Beam™

umbral zodiac
dapper sun
#

i forgor

#

but i like shooting it at anyone that misgenders me giggle_hehe

vale zinc
dapper sun
#

idk

dapper sun
vale zinc
dapper sun
#

i'm trying to load a card that i've saved but it just crashes the game

dapper sun
vale zinc
#

You trying to retrieve a Joker card or a consumable card?

dapper sun
#

consumable

#

not that it should matter since the save/load functions are part of Card, so it should work regardless

dapper sun
vale zinc
sage crater
dapper sun
#

i'm convinced :load() is just broken

#

or :save()

#

and i can't find any examples of it being used in vanillaremade

umbral zodiac
#

@dapper sun

#

oops i couldve just replied you

dapper sun
#

it's okay

umbral zodiac
#

i think that you need to do Card:load(saved_card, newcard)

dapper sun
#

i looked at the vanilla function tho

umbral zodiac
#

that could be wrong but might as well try it

dapper sun
#

other_card isn't referenced anywhere

umbral zodiac
#

oh yea it uses self nvm my bad

#

i was just looking at a hook of it used in another mod so all i saw wasthe parameters

dapper sun
umbral zodiac
#

yeah

dapper sun
#

so idk what's wrong

#

i'm gonna go to bed and worry abt this tomorrow

normal crest
dapper sun
#

i need to be up early anyways and it's already past 1am

dapper sun
normal crest
#

it's crashing cus it's trying to index self.VT.h but the Card:load method seems to always assign nil to that, presumably cus of a typo (should be self.T.h lowercase)

dapper sun
#

so how do i fix that?

dapper sun
#

and it wasn't just my shitty coding :)

mystic river
normal crest
#

and see if that fixes all your issues

#

so just replace it with self.VT.h = self.T.h

dapper sun
#

since my thingy is for a modding event i asked an organizer and

#

this sounds like an issue for the SMODS team

normal crest
#

if you don't want to patch it do card:hard_set_T() right after loading it

#

that's what the game does whenever it loads a card

dapper sun
#

thanks

#

that works

#

i've still let one of the smods devs know though

#

as this is a bug in the vanilla code that can cause probems for modders

dapper sun
#

how do i put a cardarea in a card's description

gilded narwhal
#

not getting much answers in modding-chat but does anyone that knows git better than me know why this is happening

dapper sun
#

i'm trying to reuse old code where i managed to do it but it's just putting the cardarea in the top-left of the screen instead

#

?

gilded narwhal
umbral zodiac
#

technically 3 of them did but cardpronouns averages 0 downloads per day so having 2 on 12/3 isnt that unusual

#

cryptid & talisman also kinda spiked but less so

#

cryptlib spiked from 0 on 12/2 to 9 on 12/3

normal crest
#

paperback spiked on the 3rd of december too

#

55 downloads

spiral mural
#

vinny voice WHO'S BEEN SCRAPPING BALATRO MODS!?!?!?

normal crest
umbral zodiac
#

ultra dragging it

spiral mural
static valley
#

How do I check if it is the end of an ante?

daring fern
dapper sun
#

how would i check whether a given card is a playing card or a consumable?

#

nvmd

#

how do i emplace a card to my hand and also add it to the deck

#

okay yea i'm stuck on this

true jasper
#

im want to make a dynatext thing where the text teleports/shakes around aggressively but there isnt any documentation on dynatext

static valley
#

Hey so quick question.

Let's say I have a legendary joker that gains xmult every time a probability succeeds, and I also have a luck based edition.
How do I prevent said joker from causing a stack overflow error whenever they get that edition and I try and play a hand?
-# i can't even get any crash logs as it crashes that too

static valley
#
SMODS.Joker {
    key = "wip",
    atlas = "comedy_jokers",
    pos = { x = 0, y = 2 },
    soul_pos = { x = 1, y = 2 },
    unlocked = false,
    blueprint_compat = true,
    rarity = 4,
    cost = 20,
    config = { extra = { xmult_gain = 0.5, xmult = 1 } },
    loc_vars = function(self, info_queue, card)
        return { vars = { card.ability.extra.xmult_gain, card.ability.extra.xmult_loss, card.ability.extra.xmult, colours = { ComedyColors.GAMBLE } } }
    end,
    calculate = function(self, card, context)
        if ((context.pseudorandom_result and context.result and not Comedy_table_contains(UnluckyOutcomes, context.identifier))
        or (context.pseudorandom_result and not context.result and Comedy_table_contains(UnluckyOutcomes, context.identifier)))
            then
                  return {
                      message = "Lucky!",
                      colour = HEX("43e557"),
                      func = function()
                          card.ability.extra.xmult = card.ability.extra.xmult + card.ability.extra.xmult_gain
                      end
                  }
        end

        if context.joker_main then
              return {
                  xmult = card.ability.extra.xmult,
              }
        end

    end
}
normal crest
#

What does your edition code look like

subtle hawk
#

Question

#

Is there a way to prevent add_to_deck effect of a card from triggering when added into a custom cardarea

#

Maybe I worded that shitty uh

#

Prevent cardarea from triggering any cards add_to_deck function?

#

Also how could I get a card's position on the screen? (<- I don't think I need that anymore but still would appreciate an answer hehe)

daring fern
subtle hawk
#

Damn it

#

Okay

tired kestrel
rigid solar
#

Someone reported a bug with my mod and Im not sure as to why it acts this way
Swoobat (on the left) prevents Hearts with Red Seals to be debuffed. Mega Barbaracle (on the right) debuffs anything that's not a 7.
In theory, having both would debuff everything but 7s and red seal hearts. But here we can clearly see the 5 of hearts is debuffed despite having a red seal. Is there anything I'm missing? I figured you want the "prevent_debuff" things first in the function to prevent this kind of situation, but apparently that's not enough.

faint yacht
#

-# ...why find_joker and not SMODS.find_card?

mystic river
#

I'm slightly baffled that find_joker works at all with no prefixes in the key

#

maybe it doesn't, actually. that would cause behavior shaped like this
though it would actually be swoobat not preventing any debuffs ever

#

i guess check real quick whether swoobat works against any boss blinds? head, pillar, plant, window if you've got smeared joker

granite jay
#

How do I make a specific music track play for a specific boss blind?

#

Like if a certain boss blind is active then special music for it plays

daring fern
vale grove
#

hey yall just a quick question

SMODS.Booster {
    key = "arcana_normal_1",
    weight = 1,
    kind = 'vremade_Arcana'

    cost = 4,
    pos = { x = 0, y = 0 },
    config = { extra = 3, choose = 1 },
    group_key = "k_arcana_pack"
    draw_hand = true,
    loc_vars = function(self, info_queue, card)
        local cfg = (card and card.ability) or self.config
        return {
            vars = { cfg.choose, cfg.extra },
            key = self.key:sub(1, -3),
        }
    end,
    ease_background_colour = function(self)
        ease_background_colour_blind(G.STATES.TAROT_PACK)
    end,
    particles = function(self)
        G.booster_pack_sparkles = Particles(1, 1, 0, 0, {
            timer = 0.015,
            scale = 0.2,
            initialize = true,
            lifespan = 1,
            speed = 1.1,
            padding = -1,
            attach = G.ROOM_ATTACH,
            colours = { G.C.WHITE, lighten(G.C.PURPLE, 0.4), lighten(G.C.PURPLE, 0.2), lighten(G.C.GOLD, 0.2) },
            fill = true
        })
        G.booster_pack_sparkles.fade_alpha = 1
        G.booster_pack_sparkles:fade(1, 0)
    end,
    create_card = function(self, card, i)
        local _card
        if G.GAME.used_vouchers.v_omen_globe and pseudorandom('omen_globe') > 0.8 then
            _card = {
                set = "Spectral",
                area = G.pack_cards,
                skip_materialize = true,
                soulable = true,
                key_append =
                "vremade_ar2"
            }
        else
            _card = {
                set = "Tarot",
                area = G.pack_cards,
                skip_materialize = true,
                soulable = true,
                key_append =
                "vremade_ar2"
            }
        end
        return _card
    end,
}

Im looking up how to make boosters but how do you change the sprite?

vale grove
#

ik its normally atlas but vremade works without

daring fern
vale grove
#

ahhh i see i see

rigid solar
#

after testing a bit, i've found that sealed hearts get debuffed or not depending on the order you got the jokers in

#

which makes no sense

vale grove
rigid solar
vale grove
#
    ease_background_colour = function(self)
        ease_background_colour_blind(G.STATES.TAROT_PACK)
    end,
```i see this but how do you make it your own colours?
daring fern
granite jay
granite jay
#

D:

vale grove
daring fern
vale grove
# daring fern Yes.

how do you use the hex tho?
im trying some things but

    ease_background_colour{new_colour = FA9629, special_colour = 148929}
    ease_background_colour{new_colour = G.C.FA9629, special_colour = G.C.148929}

but both of these dont work

vale grove
#

ahh i see i see

vale grove
golden field
#

question: how do i add an edition to a created joker

opaque relic
#

is there a way to make it so this guy actually uses up multiple art slots so that the full joker can be 2 jokers wide

SMODS.Joker{
    key = 'bigasscat', 
    loc_txt = {       
        name = "Big Ass Cat",
        text = {
            "dude this guy is",
            "{C:attention,s:1.5}HUGE.{}",
            "{X:mult, C:white}X#1#{} Mult"
        }
    },
    config = {extra = {Xmult = 300}},
    atlas = 'Pokers',
    pos = {x = {0,1}, y = 1}, -- the important part right here
    display_size = {w = 142, l = 95},
    pixel_size = {w = 142, l = 95},

i tried using brackets and just a comma but brackets crashes and comma does nothing

mystic river
#

not like that

#

realistically you're going to have to put this joker in its own atlas

#

there's nothing you can do with the pos value that will have the effect you want

golden field
#

why does my boss blind crash the game when spawning in

subtle hawk
#

Are you trying to debuff Aces?

golden field
subtle hawk
#

The same story with faces

golden field
#

thanks

subtle hawk
#

At least according to vanilla code

golden field
#

it's so inconsistent aipusfioahughsdgsdg

golden field
subtle hawk
#

Ah

#

Then idk I never did a blind

rigid solar
golden field
#

huiosdhoghsiodhgioshdigsdgfsdh

subtle hawk
subtle hawk
#

Line 1861 of misc_functions.lua seems to be a function that gets challenges from id

golden field
#

it's when i hover over the blind though

#

and only that specific blind

subtle hawk
#

Wait a fucking second

#

Do you have a localization entry for it

#

Just like, the only thing that comes to mind when thinking about hovering

golden field
subtle hawk
#

Huh

golden field
#

i found an indent error

#

let's see if that fixes it

#

NOPE

subtle hawk
#

Oh wait

subtle hawk
golden field
#

fuck

#

ok attempt 3!!!

#

NOPE

subtle hawk
#

What

#

No I meant like

golden field
#

it crashed again afsdhoiahdguihsuodg

subtle hawk
#

It should be text = {}

golden field
#

huh

subtle hawk
#

Never seen a loc entry like that

golden field
#

thats what i used for the jokers tho

subtle hawk
#

Oh

#

It works?

golden field
#

‼️

#

time to test the loading

subtle hawk
#

Huh

golden field
#

HOLY FUCKING SHIT

#

thanks a lot man

subtle hawk
golden field
#

-# no the 8 is not bugged i textured the 8's like that lmao

subtle hawk
#

It's weird and I'm afraid of it I'm scared man

dapper sun
#

how do i change a card's pixel_size and display_size from in update?

tired kestrel
#

Somethingcom, Hey, sorry if I had to remind you about this but have you look into the code I sent ya?

static valley
# normal crest What does your edition code look like
-- Shiny
SMODS.Shader({key = "shiny", path = "shiny.fs",})
SMODS.Sound({ key = "edition_shiny", path = "edition_shiny.ogg", pitch = 1.0 })
SMODS.Edition {
    key = 'shiny',
    shader = 'shiny',
    in_shop = true,
    weight = 5,
    sound = { sound = "comedy_edition_shiny", per = 1.2, vol = 0.7 },
    config = { extra = { mult = 20, dollars = 20, mult_odds = 5, dollars_odds = 15 } },
    loc_vars = function(self, info_queue, card)
        local multNumerator, multDenominator = SMODS.get_probability_vars(card, 1, card.edition.extra.mult_odds, 'comedy_shiny_edition')
        local dollarNumerator, dollarDenominator = SMODS.get_probability_vars(card, 1, card.edition.extra.dollars_odds, 'comedy_shiny_edition')
        return { vars = { card.edition.extra.mult, multNumerator, multDenominator, card.edition.extra.dollars, dollarNumerator, dollarDenominator,  } }
    end,
    calculate = function(self, card, context)
        if (context.post_trigger and context.other_card == card)
        or (context.main_scoring and context.cardarea == G.play) 
        or (context.using_consumeable and context.consumeable == card) 
        then
            local multOdds = SMODS.pseudorandom_probability(card, 'comedy_shiny_edition', 1, card.edition.extra.mult_odds)
            local dollarOdds =  SMODS.pseudorandom_probability(card, 1, card.edition.extra.dollars_odds)
            local ret = {}
            if multOdds then 
                card.lucky_trigger = true
                ret.mult = card.edition.extra.mult 
            end
            if dollarOdds then 
                card.lucky_trigger = true
                ret.dollars = card.edition.extra.dollars 
            end
            return ret
        end
    end
}

sorry for the late response I just got up

normal crest
#

Presumably that's the issue

static valley
#

this issue only happens if they have that edition and that edition specifically. It works normally with any other edition (and of course without an edition)

#

unrelated, but how do I check how many consumables of a custom type I have bought?

normal crest
static valley
#

it stops gaining mult when probabilities succeed

normal crest
#

How did you add what I said?

#

if you can send the code again

static valley
normal crest
#

And it works without the edition?

#

I'm not sure why that code would make the joker itself stop triggering

static valley
#

might have found the issue

#

turns out in the joker code I had a thing that makes it so that it wouldn't count the edition for probability checking

#

I removed that part

#

currently checking if that changes anything

#

ok cool it works as intended now

distant junco
minor pumice
#

Could anyone show me retrigger samples for seals?

#

I believe I am having issues with it

#

And want to look into something

brave blade
minor pumice
#

Seeing the code, I guess I now know how it works

bleak coral
#

does anyone know how to lovely patch into smods code?
trying to make an addon for a mod but i need to add more options to its mod options

distant junco
#

idk why this isnt giving me only rare jokers

shell timber
#

try rarity=3?

static valley
#

how do I make sure a sticker can only appear on jokers?

wind steppe
#

rarity in create_card is like. ass

#

afaik for rare itd be 1

shell timber
#

oh right

#

wouldnt that break with custom rarities though

wind steppe
static valley
#
-- polymorphic
SMODS.Sticker {
    key = "polymorphic_sticker",
    atlas = "comedy_stickers",
    pos = { x = 2, y = 0 },
    badge_colour = HEX("fd5f55"),
    needs_enable_flag = true,
    rate = 0.15,
    sets = {Joker = true},
    should_apply = function(self, card, center, area, bypass_roll)
        local stakeCheck = G.GAME.modifiers.enable_comedy_polymorphic_sticker
        local rngCheck = (pseudorandom("comedy_preowned", 1, 100) <= 15)
        local otherStickerCheck = ((card and card.ability) and (card.ability.eternal or card.ability.perishable))
        local locationCheck = (area == G.shop_jokers) or (area == G.pack_cards)
        local valCheck = (card.ability ~= nil) and card.ability.extra
        return locationCheck and not otherStickerCheck and rngCheck and valCheck and stakeCheck
    end,
    calculate = function(self, card, context)
        if context.end_of_round and context.game_over == false and context.main_eval then
            return{
                func = function ()
                    Comedy_reroll_joker(card)
                end
            }
        end
    end
}

here's the sticker code if that helps

static valley
#

because if I just check if they can spawn, they will have a 100% spawn rate for some reason

wind steppe
#

you dont need to check for the enable flag

static valley
#

so... what should I check then?

wind steppe
#

look at vremade stickers

normal crest
minor pumice
static valley
#

like... all the time

daring fern
# static valley like... all the time

return locationCheck and not otherStickerCheck and rngCheck and valCheck and stakeCheck and SMODS.Sticker.should_apply(self, card, center, area, bypass_roll)

solid salmon
#

Is there a way to make an enhancement with a held in hand effect

timid parrot
minor pumice
#

Nvm

distant junco
timid parrot
daring fern
dapper sun
#

how do i get what ante i'm on

daring fern
dapper sun
#

i tried doing ante set 8 and it didn't change that value

granite jay
#

I’m thinking of making it so a certain boss blind only spawns if you beat the previous without skipping Blinds and buying anything from shop.

Anyone know the best way to code that in?

solid salmon
#

Guyd

dapper sun
#

how do i get how many mods are enabled?

solid salmon
#

How do i get if the card has a mod seal

daring fern
daring fern
dapper sun
#

ty

#

it's not giving the amount of enabled mods

hallow slate
#

What functions do I use to transfer a playing card between the (deck/the hand) and a custom cardarea I made?

wintry solar
#

draw_card(old_area, new_area, nil, nil, nil, card)

dapper sun
daring fern
dapper sun
#

ty

dapper sun
#

ok i checked and i think i literally just have to subtract 3?

daring fern
dapper sun
#

ah that makes sense lol

static valley
glad halo
#

I made a Joker using Joker Forge. is there any chance anyone can assist me in putting it into my game?

frosty rampart
#

afaik jokerforge already exports a whole usable mod, literally just drag and drop it into your mods folder and you're good to go

glad halo
#

oh, bet

static valley
# static valley Hey so giving this edition to certain jokers (like oops all 6’s) will cause it t...
-- Shiny
SMODS.Shader({key = "shiny", path = "shiny.fs",})
SMODS.Sound({ key = "edition_shiny", path = "edition_shiny.ogg", pitch = 1.0 })
SMODS.Edition {
    key = 'shiny',
    shader = 'shiny',
    in_shop = true,
    weight = 5,
    sound = { sound = "comedy_edition_shiny", per = 1.2, vol = 0.7 },
    config = { extra = { mult = 20, dollars = 20, mult_odds = 5, dollars_odds = 15 } },
    loc_vars = function(self, info_queue, card)
        local multNumerator, multDenominator = SMODS.get_probability_vars(card, 1, card.edition.extra.mult_odds, 'comedy_shiny_edition')
        local dollarNumerator, dollarDenominator = SMODS.get_probability_vars(card, 1, card.edition.extra.dollars_odds, 'comedy_shiny_edition')
        return { vars = { card.edition.extra.mult, multNumerator, multDenominator, card.edition.extra.dollars, dollarNumerator, dollarDenominator,  } }
    end,
    calculate = function(self, card, context)
        if (context.post_trigger and context.other_card == card and not context.other_context.pseudorandom_result)
        or (context.main_scoring and context.cardarea == G.play) 
        or (context.using_consumeable and context.consumeable == card) 
        then
            local multOdds = SMODS.pseudorandom_probability(card, 'comedy_shiny_edition', 1, card.edition.extra.mult_odds)
            local dollarOdds =  SMODS.pseudorandom_probability(card, 'comedy_shiny_edition', 1, card.edition.extra.dollars_odds)
            local ret = {}
            if multOdds then 
                card.lucky_trigger = true
                ret.mult = card.edition.extra.mult 
            end
            if dollarOdds then 
                card.lucky_trigger = true
                ret.dollars = card.edition.extra.dollars 
            end
            return ret
        end
    end
}

if this helps, here's what the current edition looks like.
The crash happens whenever the edition is applied to a joker

glad halo
#

so, My joker didn't work and crashed when I added a card to my deck. If anyone can assist me, it would mean a lot for me and my friend

normal crest
static valley
#

scratch that it triggered a lot of times, but not as quickly

spiral mural
#

where is the localized name of a joker stored

#

(in the center)

chrome widget
#

Either in loc_txt or via a localization file

static valley
toxic cave
solid salmon
#

how do i fix it

static valley
# normal crest code?
-- Paddington
SMODS.Sound({key = "hard_stare", path = "hard_stare.ogg",})
SMODS.Joker{
    key = "paddington",
    atlas = "comedy_jokers",
    pos = { x = 6, y = 2 },
    unlocked = true,
    blueprint_compat = false,
    rarity = 3,
    cost = 10,
    pools = {["comedyGoldEdition"] = true, ["Joker"] = true},
    loc_vars = function(self, info_queue, card)
        return { vars = { colours = { ComedyColors.PADDINGTON } } }
    end,
    -- have you forgotten your manners
    remove_from_deck = function(self)
        G.E_MANAGER:add_event(Event({
            trigger = "immediate",
            func = function()
                G.hardStare = 1
                play_sound('comedy_hard_stare')
                delay(1)
                return true
            end
        }))
    end,
    calculate = function(self, card, context)
        if context.debuffed_hand or context.joker_main then
            if G.GAME.blind.triggered then
                G.E_MANAGER:add_event(Event({
                    func = function()
                        G.E_MANAGER:add_event(Event({
                            trigger = "immediate",
                            func = function()
                                G.GAME.blind:disable()
                                G.hardStare = 1
                                play_sound('comedy_hard_stare')
                                delay(1)
                                return true
                            end
                        }))
                        return true
                    end
                }))
            end
        end
        return nil, true
    end
}
normal crest
static valley
#

for every other joker the edition functions normally

#

it's specifically with that joker in particular that has that wierd effect

glad halo
#

Using Joker forge. I'm trying to make it to where the joker gains x0.25 mult for every Jack of Spades in the full deck. I'm very lost with all this.

glad halo
#

Oh? Where did you find that?

spiral lichen
glad halo
#

ohhh, alright. lemme take a look rq. one sec

#

thank you, btw

#

how do I make it exclusively Jack of Spades?

#

@spiral lichen

spiral lichen
glad halo
#

aw, damn

solid salmon
#

hey guys

#

how do i manipulate card.glass_trigger

#

actually what does it even do

sturdy compass
solid salmon
#

Make glass cards have a held in hand effect

daring fern
brazen kite
#

I'm trying to make playing cards perishable/rental, and it works how I want it to except for the fact that it seems to trigger twice (e.g., each rental card held in hand causes you to lose $6, and each perishable card goes down by 2 rounds instead of 1.)
i haven't done anything special other than call SMODS.Stickers[sticker_name]:apply. does anyone know how to prevent this from happening?

vale zinc
#

I have the code for one of my Jokers within the code for the custom Enhanced card that corresponds to it. It gains Chips when my Uranium Cards do their thing -- which I can see with eval G.jokers.cards[1].config.center.config.extra.chips -- but they don't show up on the card itself. What am I doing wrong?

local card_to_kill = pseudorandom_element(G.hand.cards, 'm_lapsems_uranium')
for j = 1, #G.jokers.cards do
    local current_joker = G.jokers.cards[j]
    if (current_joker.config.center.key == 'j_lapsems_mutant') then
        local total_chip_increase = card_to_kill:get_chip_bonus()
        total_chip_increase = total_chip_increase + LAPSEMS.COPIED_FROM_ORTALAB_get_chips_from_edition(card_to_kill)
        total_chip_increase = total_chip_increase + LAPSEMS.COPIED_FROM_ORTALAB_get_chips_from_enhancement(card_to_kill)
        
        current_joker.config.center.config.extra.chips = current_joker.config.center.config.extra.chips + total_chip_increase
        card_eval_status_text(not context.blueprint and current_joker, 'extra', nil, nil, nil, {message = localize('k_upgrade_ex')})
    end
end
SMODS.destroy_cards(card_to_kill)
static valley
#
-- for adjusting the values of a card
function Comedy_multiplyCardValues(card, multiplier, applyToCost)
    if applyToCost then card.cost = math.floor(card.cost * multiplier) end
    -- if the card is a playing card
    if card.base then
        if type(card.base) == "table" then
            for k, v in pairs(card.base) do
                if type(v) == "number" and not Comedy_table_contains(ValueManipulationBlacklist, k) then
                    card.base[k] = v * multiplier
                end
            end
        end
    end

    -- if the card has abilities
    if card.ability then
        if type(card.ability) == "table" then
            for k, v in pairs(card.ability) do
                if type(v) == "number" and not Comedy_table_contains(ValueManipulationBlacklist, k) then
                    card.ability[k] = v * multiplier
                end
            end
        end
        if card.ability.extra then
            if type(card.ability.extra) == "table" then
                for k, v in pairs(card.ability.extra) do
                    if type(v) == "number" and not Comedy_table_contains(ValueManipulationBlacklist, k) then
                        card.ability.extra[k] = v * multiplier
                    end
                end
            end
        end
    end
end

this is how I multiply the values of a joker. for some reason it gives a joker x2 mult as well. how do I fix that?

hybrid iris
#

oh jokers start with 1 Xmult by default!

#

you might want to blacklist that

quasi pike
#

How can I change the big text that apears in the main menu?

daring fern
quasi pike
#

yep

daring fern
# quasi pike yep
SMODS.Atlas{
    key = 'balatro',
    raw_key = true,
    path = 'newlogo.png',
    px = 333,
    py = 216
}
quasi pike
#

thx!!

#

Thanks a lot to all of you, this mod is a birthday gift for a friend and I couldn't have done without your help, thanks!! I'm really grateful

spiral mural
tired kestrel
#

How do I apply shader to a back edition?

golden field
#

how do i make an effect activate right after drawing cards

daring fern
golden field
tired kestrel
#

finally ported the unused decks into the modern balatro... well one or two graphic issues but happy with the result.

#

now I fixed fixed it in a way.

#

now up next is vouchers

tired kestrel
#

snap I didn't know someone else already did that

#

wait somehow the effects on the decks aren't applied somehow but eh.

tired kestrel
#

Finally done it.

#

and I didn't even have to use cryptid code.

#

I found a way to achive it simply

#

(I actually fixed the issue about the graphic errors to realized that I have to determine betwen paused or not)

#

now time for the vouchers

#

wait there was one more deck

tired kestrel
#

wait there is also more decks I don't think I ahve made into yet.

bold sleet
#

dude wtf is this?
-# they are supposed to be standard Cards

daring fern
bold sleet
daring fern
bold sleet
#

fucking dammit

tired kestrel
#

by the way, Something do you remember when I have shared the code for you to take al ook at it?

daring fern
tired kestrel
#

Or is there a way to make it seemless and not messed up like that?

#

and additionally how can you make the holecard pull stop one the round is over?

solid salmon
tired kestrel
#

I don't know why this isn't showing up

#

dispite I already did use locked_loc_vars

tired kestrel
stuck ore
#

It seems like an error with the pathing for the localization? I had a similar issue with a joker but I'm not positive. The way it was having an issue was that the prefixes in the localization file were wrong so it lead to nothing and it had no text, it might be something similar

tired kestrel
#

not sure if there is sometihng similar as I did search in this server but...

normal crest
#

That is the description when locked

tired kestrel
static valley
#

Hey so a good friend of mine gave me a really funny joker idea. How would I go about implementing this, specifically the part where it gets the effect of a random boss blind?

faint yacht
#

Probably get a random Boss Blind from G.P.BLINDS, then :set_blind()?

static valley
#

that could work...

#

i'll go and test that out later today...

tired kestrel
#

or otherwise only display "locked"

vale zinc
#

I have the code for one of my Jokers within the code for the custom Enhanced card that corresponds to it. It gains Chips when my Uranium Cards do their thing -- which I can see with eval G.jokers.cards[1].config.center.config.extra.chips -- but they don't show up on the card itself. What am I doing wrong?

local card_to_kill = pseudorandom_element(G.hand.cards, 'm_lapsems_uranium')
for j = 1, #G.jokers.cards do
    local current_joker = G.jokers.cards[j]
    if (current_joker.config.center.key == 'j_lapsems_mutant') then
        local total_chip_increase = card_to_kill:get_chip_bonus()
        total_chip_increase = total_chip_increase + LAPSEMS.COPIED_FROM_ORTALAB_get_chips_from_edition(card_to_kill)
        total_chip_increase = total_chip_increase + LAPSEMS.COPIED_FROM_ORTALAB_get_chips_from_enhancement(card_to_kill)
        
        current_joker.config.center.config.extra.chips = current_joker.config.center.config.extra.chips + total_chip_increase
        card_eval_status_text(not context.blueprint and current_joker, 'extra', nil, nil, nil, {message = localize('k_upgrade_ex')})
    end
end
SMODS.destroy_cards(card_to_kill)
primal robin
#

.ability.extra

vale zinc
#

That context didn't work for my code.

normal crest
tired kestrel
#

but yeah this is what the unlock looked like

normal crest
# tired kestrel

no, just put text like normal, so

unlock = {
  "some text on 1st line",
  "some text on 2nd line"
}

and you can use #1# an #2# just like loc_vars but through locked_loc_vars

queen meadow
#

how does JokerDisplay pull out driver_tally

i have a card similar to this with the exact same code and the best i can do is to convert the tally into an card.ability.extra variable leading to it only getting updated each time i check the card description

normal crest
queen meadow
#

so like JD actually pulls out the variable that's in the game's code

normal crest
#

it's using the value stored in card.ability.driver_tally which the game updates every frame

tired kestrel
#

kinda wished there is like "text_text"

queen meadow
#

man

#

found a way to have it update all the time

tired kestrel
midnight sluice
#

does someone know how i get the chips and mult when a joker is triggered. like i want the chips and mult from the score before it get multiplied

frail parcel
#

did i mess up here because the game crashes

vale zinc
#

Whatever's gone wrong, there it is.

normal crest
#

I mean under misc only

#

so just return { misc = { ranks = { tmr_12 = "12" } } }

frail parcel
#

thx

#

now i need to work out how to make them like the secret hands where they dont show up unless you have one

vale zinc
frail parcel
#

what's the loc_txt for it

urban wasp
#

how do i make it so that a usually unobtainable-in-shop joker rarity can be obtained in the shop when a deck is used

faint yacht
#

get_weight function of the rarity returns 0 unless the desired deck is active.

urban wasp
#

what's the thing to check if a deck is active?

normal crest
vale zinc
# normal crest send your loc_vars and localization/loc_txt for the joker
-- Here's the loc_vars.
loc_vars = function(self, info_queue, card)
    info_queue[#info_queue + 1] = G.P_CENTERS.m_lapsems_uranium
    return {
        vars = {
            card.ability.extra.chips,
        }
    }
end,

-- Here's the localization/loc_txt.
j_lapsems_mutant = {
    name = "Mutant Joker",
    text = {
        "When a {C:attention}Uranium Card{} destroys a",
        "card, this Joker gains {C:blue}Chips{} equal",
        "to the destroyed card's Chips",
        "{C:inactive}(Currently {C:blue}+#1#{C:inactive} Chips)"
    }
},
normal crest
vale zinc
normal crest
frail parcel
#

i tried to autogenerate ranks
but whenever i have a straight that includes some of them it crashes

normal crest
vale zinc
frail parcel
normal crest
#

... adding your prefix

#

'tmr_' .. (v + 1)

frail parcel
#

it works

#

thx

#

how do i make it so the rank isnt in the starting deck

faint yacht
#

return false if args.initial_deck.

midnight sluice
#

calculate = function(self, card, context)
        if context.joker_main then
            return {
                message = localize { type = 'variable', key = 'a_mult', vars = { card.ability.extra.mult } },
                mult_mod = card.ability.extra.mult,
                chip_mod = card.ability.extra.chips
            }
        end
        if context.after and not context.blueprint then
            local current_chips = hand_chips or 0
            local current_mult = mult or 0
            print("Current chips: " .. tostring(current_chips))
            print("Current mult: " .. tostring(current_mult))

            if to_big then
                current_chips = to_big(current_chips)
                current_mult = to_big(current_mult)
            end

            local mult_gain = math.floor(current_chips / 50)
            local chips_gain = math.floor(current_mult / 5) * 50
            print("Mult gain: " .. tostring(mult_gain))
            print("Chips gain: " .. tostring(chips_gain))

            local m_gain_num = tonumber(mult_gain)
            local c_gain_num = tonumber(chips_gain)
            print("Mult gain num: " .. tostring(m_gain_num))
            print("Chips gain num: " .. tostring(c_gain_num))

            if m_gain_num > 0 or c_gain_num > 0 then
                card.ability.extra.mult = card.ability.extra.mult + m_gain_num
                card.ability.extra.chips = card.ability.extra.chips + c_gain_num

                return {
                    message = 'Upgraded!',
                    colour = G.C.RED
                }
            end
        end

can someone help me understand why i get this error?

faint yacht
#

tonumber will return nil if the given input doesn't convert to a number.

#

Maybe you want to_number, seeing as you use to_big?

midnight sluice
#

i forgot a screen shot

midnight sluice
faint yacht
#

Although you very much could just m_gain_num = mult_gain and if m_gain_num > to_big(0).

midnight sluice
#

yeah true

faint yacht
#

Safest route is just to_big both values when comparing.

midnight sluice
#

yeah i just made them to_number for now

midnight sluice
#

do you know why that happends? cus if convert them to to string. it seems to be fine. cus otherwise the previous console log wouldnt work

midnight sluice
midnight sluice
faint yacht
#

hand_chips and mult already are tables.

#

This is why tonumber fails, but to_number does not.

granite jay
#

How do I make a tag that changes the Boss blind to a specific Boss Blind?

midnight sluice
#

that explains alot lol

faint yacht
#

tonumber is default Lua function, but to_number is added by Talisman.

midnight sluice
#

ahhh

#

yeah okay

#

that makes alot of sense

shrewd cobalt
#

Is it possible to have a used consumable wait for a specific context before activating its effect and disappearing?

#

I’d use keep_on_use I assume?

faint yacht
#

return true for keep_on_use, yeah, then set a variable on itself in the use and, if said variable is set when checking for specific context, do stuff.