#đŸ’»ăƒ»modding-dev

1 messages · Page 308 of 1

worldly thicket
#

oh nvm they do, just checked card.lua

cursive sentinel
#

added it, doesnt fix

#

should i add it in the smods call?

daring fern
cursive sentinel
#
local getidref = Card.get_id
function Card:get_id()
    local id = getidref(self)
    if id == nil then
        id = 13
    end
    if next(SMODS.find_card('j_modprefix_dauphine')) then
        if id <= 12 or id == 14 then
            id = 13
        end
    end
    return id
end

SMODS.Joker {
    key = 'j_dauphine',
    loc_txt = {
        name = 'Dauphine',
        text = { 'All cards with',
        '{C:diamonds}Diamond{} suit are',
        'considered {C:attention}Kings'
        }
    },
    atlas = 'Jokers',
    pos = {
        x = 5,
        y = 0
    },
    blueprint_compat = false,
    perishable_compat = true,
    eternal_compat = true,
    rarity = 2,
    cost = 6,
    config = {
        extra = {
        }
    },
}```
daring fern
cursive sentinel
#

im not doing the diamonds part right now, first trying to get the pareidolia like stuff working

#

wdym?

#

ahhhhhh

daring fern
primal igloo
#

In which file i add It?

cursive sentinel
#

no

daring fern
cursive sentinel
#

followed the youtube video

red flower
cursive sentinel
#

so i put in DistantRemnants

#

instead of modprefix?

red flower
#

no

cursive sentinel
#

ahhh

#

im blind

#

drx1

red flower
#

lol

cursive sentinel
#

ok

#

im sorry

#

thank you

#

still doesnt work

daring fern
cursive sentinel
#
local getidref = Card.get_id
function Card:get_id()
    local id = getidref(self)
    if id == nil then
        id = 13
    end
    if next(SMODS.find_card('j_drx1_dauphine')) then
        if id <= 12 or id == 14 then
            id = 13
        end
    end
    return id
end

SMODS.Joker {
    key = 'j_dauphine',
    loc_txt = {
        name = 'Dauphine',
        text = { 'All cards with',
        '{C:diamonds}Diamond{} suit are',
        'considered {C:attention}Kings'
        }
    },
    atlas = 'Jokers',
    pos = {
        x = 5,
        y = 0
    },
    blueprint_compat = false,
    perishable_compat = true,
    eternal_compat = true,
    rarity = 2,
    cost = 6,
    config = {
        extra = {
        }
    },
}```
daring fern
cursive sentinel
#

wdym?

faint yacht
cursive sentinel
#

in the key?

daring fern
cursive sentinel
#

okok, i added it bcs i saw it on the video w/o understanding it

#

works!!!!!

#

thank you very much!!

wintry solar
#

You can just return 13 after the fine car check btw

#

With a suit check ofc

hexed stump
#

Ugh context.stay_flipped is so frustrating I understand why thunk coded the blinds that used it like that but fuck

#

Hard to use it on drawn cards

cursive sentinel
cursive sentinel
primal igloo
#

Error

game.lua:4032: attempt to index global 'SMODS' (a nil value)

Traceback

[love "callbacks.lua"]:228: in function 'handler'
game.lua:4032: in main chunk
[C]: in function 'require'
main.lua:16: in main chunk
[C]: in function 'require'
[C]: in function 'xpcall'
[C]: in function 'xpcall'

ruby delta
#

It worked now but the animation is gone which showed the cards being burnt

calculate = function(self, card, context)
card.ability.mult_bonus = card.ability.mult_bonus or 0

if not card.ability.marked then
    card.ability.marked = false
end

if context.setting_blind and context.blueprint then
    card.ability.mult_bonus = 0
    card.ability.marked = false
end

if context.destroying_card and 
   G.GAME.current_round.hands_played == 0 and 
   context.cardarea == G.play and
   not card.ability.marked then
    
    card.ability.marked = true
    
    G.E_MANAGER:add_event(Event({
        trigger = 'after',
        delay = 0.4,
        func = function()
            local burned = 0
            for _, c in ipairs(G.play.cards or {}) do
                if c and not c.removed then
                    c:remove_from_deck()
                    burned = burned + 1
                end
            end
            card.ability.mult_bonus = card.ability.mult_bonus + burned
            G.deck.config.card_limit = G.deck.config.card_limit - burned
            
            if burned > 0 then
                card_eval_status_text(card, 'extra', nil, nil, nil, {
                    message = burned..' Burned!',
                    colour = G.C.FILTER
                })
            end
            return true
        end
    }))
end

if context.joker_main then
    return {
        mult = card.ability.mult_bonus,
        card_end = true
    }
end

return {}

end
}

cursive sentinel
#

or do i have to do a separate hook?

ruby delta
wintry solar
ruby delta
hexed stump
# red flower wdym

So it triggers and checks each time a card enters and leaves the hand, be it draws, discards, and played cards. So it triggers twice usually for every situation but the starting hand, and I’m trying to get it to trigger every N cards which is possible, just annoying (as the first hand only triggers it once per card, effectively)

red flower
#

yeah that sounds terrible

wintry solar
hexed stump
#

So I’ve been looking through the code and puzzling it out

red flower
#

I've only used it to flip cards after each hand, but I haven't tested it too thoroughly

hexed stump
#

Yeah that it does pretty easily

ruby delta
# ruby delta

@daring fern and @wintry solar see how the animation is after the first hand cards are chosen and burnt

wintry solar
#

Yes that’s what you said it should do

zealous glen
red flower
#

drawstep?

zealous glen
#

that's not directly

cursive sentinel
#

tried to check the suit like that but i dont know to do it outside of a smods joker, please dont hit me, (ofc it doesnt work)

local getidref = Card.get_id
local getsuitref = Card.is_suit
function Card:get_id()
    local id = getidref(self)
    local suit = getsuitref(self)
    if id == nil then
        id = 13
    end
    if suit == nil then
        suit = 'Diamond'
    end
    if next(SMODS.find_card('j_drx1_dauphine')) and suit == 'Diamond' then
        if id <= 12 or id == 14 then
            id = 13
        end
    end
    return 13
end```
wintry solar
#

Drawstep does that

zealous glen
#

I thought DrawSteps were meant for like

#

changing multiple cards

red flower
#

multiple includes 1 🙂

wintry solar
#

Drawstep is for any card drawing

zealous glen
#

because they seemed inefficient if you were doing individual stuff

zealous glen
wintry solar
#

It just replaces the draw function with a system that’s easily added to

zealous glen
#

My multilayer Jokers right now don't use DrawStep because they all have custom movement

worldly thicket
#

How can I display a custom message when you press use on a consumable but it doesn't use it, for example the one I'm working on now will check if the hand size is above 5, if it isn't I want it to say "You're already small enough"

zealous glen
#

Is there an easy way to add custom movement to a DrawStep?

wintry solar
#

Where’s your current code?

zealous glen
wintry solar
#

I think your just take the draw code and put it in the drawstep

#

But if this still works I don’t see why you’d need to change it

zealous glen
#

well, this one specifically is shared with another one

#

how would I access the correct movement?

cursive sentinel
zealous glen
#

though now that I think about it, maybe I don't need to give each sprite an unique key?

wintry solar
#

You could probably save the movement values within each joker and use a generic drawstep

#

Or do separate ones

zealous glen
#

Doing separate ones seems inefficient

wintry solar
#

SMODS.DrawStep {
    key = 'chameleon',
    order = 1,
    func = function(self, layer)
        if self.config.center_key == 'j_ortalab_chameleon' then
            if self.ability.extra.copied_joker then
                if self.children.front then self.children.front:draw_shader('dissolve') end
                self.children.center:draw_shader('ortalab_chameleon', nil, self.ARGS.send_to_shader)
            else
                self.children.center:draw_shader('dissolve')
            end
        end
    end,
    conditions = { vortex = false, facing = 'front' },
}```
This is my chameleon drawstep for example
ruby delta
thin anchor
#

how would i create custom badges?

wintry solar
zealous glen
wintry solar
#

Give them some sort of common property

zealous glen
#

but how

wintry solar
#

I believe there’s also a check_conditions function you can define on the draw step

zealous glen
#

SMODS.Joker{ 
 my_property = true, 
}?

wintry solar
#

Yeah

#

Like that

#

Then it should be card.config.center.my_property

worldly thicket
#

How do you check hand size?

zealous glen
wintry solar
#

That’s specifically for that joker

zealous glen
#

so you still need to set the sprite to give your Joker a child

zealous glen
#

Can I use it to describe the movement?

wintry solar
#

I don’t see why that wouldn’t work

#

SMODS.DrawStep {
    key = 'curse',
    order = 35,
    func = function(self)
        if self.curse then
            Ortalab.curse_sprites[self.curse].role.draw_major = self
            Ortalab.curse_sprites[self.curse]:draw_shader('dissolve',0, nil, nil, self.children.center,nil,nil,nil, nil,nil, 0.6)
            Ortalab.curse_sprites[self.curse]:draw_shader('dissolve', nil, nil, nil, self.children.center)
        end
    end,
    conditions = { vortex = false, facing = 'front' },
}```
#

Here’s another one that might be more useful

#

-# I don’t remember how it works

zealous glen
#

There's a Joker I'm gonna want to make that will need 2 DrawSteps to work

#

and I have two Joker ideas that might need some complicated DrawStep calculations to work

ruby delta
# wintry solar That animation is for when a card is destroyed

Yah I want that animation, the destroying animation like the video was doing (the video I sent is my old code which has errors) now the new one works perfectly everything works no errors nothing just that the cards are going back to the deck (the animation) instead of the destroying animation

cursive sentinel
#

by trying to check the color i end up disabling the joker from working at all, what did i do wrong?

local getidref = Card.get_id
local getsuitref = Card.is_suit
function Card:get_id()
    local id = getidref(self)
    local suit = getsuitref(self)
    if id == nil then
        id = 13
    end
    if next(SMODS.find_card('j_drx1_dauphine')) and suit == 'Diamonds' then
        if id <= 12 or id == 14 then
            id = 13
        end
    end
    return id
end```
ruby delta
wintry solar
#

There must be something wrong with it if the animation isn’t olaying

ruby delta
wintry solar
#

The one that you have that doesn’t work how you want

ruby delta
wintry solar
#

Can you screenshot pls reading code on mobile is a pain

ruby delta
#
   calculate = function(self, card, context)
    card.ability.mult_bonus = card.ability.mult_bonus or 0

    if not card.ability.marked then
        card.ability.marked = false
    end

    if context.setting_blind and context.blueprint then
        card.ability.mult_bonus = 0
        card.ability.marked = false
    end

    if context.destroying_card and 
       G.GAME.current_round.hands_played == 0 and 
       context.cardarea == G.play and
       not card.ability.marked then
        
        card.ability.marked = true
        
        G.E_MANAGER:add_event(Event({
            trigger = 'after',
            delay = 0.4,
            func = function()
                local burned = 0
                for _, c in ipairs(G.play.cards or {}) do
                    if c and not c.removed then
                        c:remove_from_deck()
                        burned = burned + 1
                    end
                end
                card.ability.mult_bonus = card.ability.mult_bonus + burned
                G.deck.config.card_limit = G.deck.config.card_limit - burned
                
                if burned > 0 then
                    card_eval_status_text(card, 'extra', nil, nil, nil, {
                        message = burned..' Burned!',
                        colour = G.C.FILTER
                    })
                end
                return true
            end
        }))
    end

    if context.joker_main then
        return {
            mult = card.ability.mult_bonus,
            card_end = true
        }
    end

    return {}
end```

@wintry solar
#

How's this?

red flower
#

not amazing

wintry solar
#

That’s even worse

maiden phoenix
ruby delta
#

@wintry solar ☝

worldly thicket
#

Is that the right function to remove cards from the player's hand

wintry solar
#

Thanks sdm

#

It doesn’t work because you don’t return anything from the context

#

You need return { remove = true }

#

But also

#

This code is ridiculously complicated for what you’re trying to do

ruby delta
thin anchor
#

how would i create a card with an edition?

ruby delta
wintry solar
#

Yes it should be like 6 lines

zealous glen
#

@wintry solar question about DrawSteps: are all DrawSteps called for all cards?

wintry solar
#

I think so

zealous glen
#

that's why I didn't want to use them

wintry solar
#

It’s just what Card:draw does

zealous glen
#

a DrawStep per Joker increases overhead by a lot

#

the Card itself could know how to draw itself

ruby delta
edgy reef
#

Mostly because the "drawing" parts are not done if proper conditions aren't met.

#

And the function related to those are effecient enough that there really isn't a problem.

thin anchor
#

how would i make my mod talisman compatible

zealous glen
#

if talisman then talisman = nil end

edgy reef
#

The actual performance overhead for calling a function and indexing tables before trying to draw is miniscule.

zealous glen
#

It just seems like a mostly worse system than what I already have đŸ€”

daring fern
thin anchor
#

k

zealous glen
#

I changed the name of my sprite and now it's rendering twice đŸ€”

#

except seemingly for one of them

worldly thicket
#

How do I check if a highlighted card is a face card

edgy reef
#

SMODS already does this with self.tilt_var

daring fern
worldly thicket
zealous glen
#

that is local

daring fern
worldly thicket
#

What if I want to check if all highlighted cards are face

wintry solar
worldly thicket
zealous glen
#

a soul sprite (with custom movement) and a second sprite (with custom movement)

#

although to be fair, this particular version could've used a single sprite

wintry solar
#

Just don’t use the standard soul stuff and use a drawstep for both

zealous glen
#

it doesn't seem right to not use the existing feature

wintry solar
#

You’re overwriting the existing feature anyway

zealous glen
#

It's not overwriting if SMODS provides an API for it

#

and again

#

I can access the local variable this way

daring fern
worldly thicket
#

do I do a "for" loop?

#

Do I start i = 0 or do I start at 1

#

@daring fern Like this?

daring fern
worldly thicket
# daring fern `1`

should I turn that is_face check into an if statement and then return true

daring fern
daring fern
#

Put return true outside the for loop.

wintry solar
#

Why not just return the function call?

wintry solar
#

This also doesn’t need a loop

worldly thicket
#

Well it didn't work anyway, so what is another way to do it

#

actually nvm it did work, forgot to save before I opened the game

rugged pier
#

does smods have a way to use context.destroy_card to store those cards somewhere

rapid stag
#

cirThink if i start with a joker's key, can i check if it's unlocked and discovered by looking for it in G.P_CENTERS?

faint yacht
#

.discovered and .unlocked could be checked for.

#

-# I can only vouch for .discovered, though.

rapid stag
worldly thicket
#

How would I go about adding the same functionality of the "Strength" card but opposite

#

so instead it decreases in rank

maiden phoenix
#

check SMODS.modify_rank

#

It supports negative values

chrome widget
#

Question for the SMODS heads, what is the purpose of the obj_buffer concept on some SMODS tables versus just iterating through the table itself?

#

This might be a Lua thing that I just haven't wrapped my head around yet

zealous glen
chrome widget
#

Afaik no? Because the buffers can be iterated through as tables, whereas the vanilla buffers like with joker and object count buffers are numbers

worldly thicket
chrome widget
#

I'm under the implication that you're supposed to use the vanilla buffers as you'd expect, to pre-empt a change made to one of the cardareas by a newly emplaced card. But instances where things like SMODS.Rank.obj_buffer are iterated through kinda confuse me. I forgot I didn't leave the SMODS server so I'll ask there

maiden phoenix
rapid stag
worldly thicket
#

this better?

rapid stag
#

G.hand.highlighted[i]

worldly thicket
#

Alright fixed that, let me test now

#

still got this crash

rapid stag
#

what did you end up with

worldly thicket
#

Wdym? Code-wise?

#

I'm confused, what do you mean end up with

rapid stag
#

in code yes

daring fern
worldly thicket
rapid stag
#

girldmDead
G.hand.highlighted[i] was meant to go in the function where you have i, in place of it:

for i=1, #G.hand.highlighted do
  SMODS.modify_rank(G.hand.highlighted[i], -3)
end
worldly thicket
#

Oh I'm sorry, I misunderstood, apologies

rapid stag
#

it makes sense, i wasn't clear enough cirDerp

worldly thicket
#

Now how can I add chips at the same time

rapid stag
worldly thicket
rapid stag
#

wait, do you mean add chips to the current score?

worldly thicket
#

Yes! To the side where it's like Chips X Mult

#

sorry I suck at wording things, I can't even word the description right for this card

rapid stag
#

cirThink this is a consumable, right?

worldly thicket
#

Yeah

worldly thicket
rapid stag
worldly thicket
#

I've just been trying to come up with ideas for Alice in Wonderland themed cards and I started with consumables and this was the "Drink Me" Potion so like in the movie it makes her small (hence the card rank decreasing) but I wanted it to benefit as well, rethinking about it I don't like the idea of adding chips

rapid stag
#

there's inherent benefits to decreasing card ranks

rugged pier
#

^hack

uneven bobcat
#

anyone know how you might show compatibility on jokers that have a copying effect? the same way that blueprint does in base game? possibly a silly question im just getting into modding for fun

worldly thicket
#

is there inherent benefits to doing that

rapid stag
rugged pier
#

in your joker^

#

like this

rapid stag
#

ah, my interpretation was that they were looking to copy how blueprint does that

#

not the other way around

#

bear in mind that blueprint_compat is purely cosmetic - blueprint and brainstorm call calculate with the special context of context.blueprint

worldly thicket
#

What is a good rarity for a Joker that adds an enhanced Queen of Hearts when each blind is selected

rapid stag
worldly thicket
#

Alright and right wrong place, I'll remember for next time

uneven bobcat
worldly thicket
#

How do I add the color and description for gold, steel, and holographic to my joker's description

worldly thicket
#

what about coloring the text?

zealous glen
#

{C:
}

gusty peak
#

i have weird green particles around cards in my booster pack, how do i get rid of them?

worldly thicket
#

Do I need to have a loc_vars function if my card doesn't have any variables

gusty peak
#

if your localization entry doesnt have any #number# in them then you dont need loc_vars

worldly thicket
#

Alright, then where do I put the function for the info_queue

gusty peak
#

in loc_vars

#

set info_queue, and then return empty { vars = {} } from it

worldly thicket
#

Alright thanks

iron haven
#

E and I assume all the letter jokers that have have to do with playing cards gain mult when you have an eight and you don't play it.

wintry solar
#

You don’t need to return empty iirc

#

You can just do the info queue stuff

iron haven
#

also G upgrades on all the blind...

karmic scroll
#

is there any way to make default (non-edition) cards to use a vanilla Balatro shader? I just can't wrap my head around it. nothing i try works

#

for example i want all planet cards to use the same shader that spectral cards use. but how?

ruby delta
#

@wintry solar I didn't get when u said I should keep return { remove = time }

#

Sorry

wintry solar
#

Let me write it up for you, hold on

worldly thicket
#

It's not creating the card, nothing happens when I select a blind

gusty peak
#

ok that old problem is fixed, now i cant find in the docs how to set background color for the pack

frosty dock
tall wharf
#

how is john smods doing

frosty dock
#

i'm well, ty for asking

worldly thicket
frosty dock
#

it is the problem that's preventing your code from running

#

the rest looks good to me but I'm too tired to guarantee for it

worldly thicket
#

It worked

wintry solar
frosty dock
#

-# no extra?

worldly thicket
#

Is there a way to check if a flush contains all hearts

wintry solar
#

I just copied the values he already had

#

Someone else can fix his missing extras, I’m going to bed 😂

frosty dock
#

won't be me

scarlet thorn
#

Speaking of extra. Returning {extra={repetitions=X}} from calculate doesnt seem to actually want to calculate them.

formal parrot
#

Hey chay

#

Chat

red flower
#

hi

scarlet thorn
frosty dock
#

this should be something that is fixed ahead of the latest release

scarlet thorn
#

0315b, it was what cryptid staff was advertising week or 2 ago

#

I also couldve sworn I looked at the code for 0408 and the part where extra is eval'd didnt change

frosty dock
#

yeah that would do it, 0330a is the first version to have that fixed

chrome widget
#

I've seemingly made a shader that is immune to randomness

zealous glen
#

What do you think of this effect?

Cherry
After you use a Consumable, sell this card to create 2 copies of it
(Must have room)

rugged pier
zealous glen
#

Yes

rugged pier
#

would be abused

#

oh

#

what about

#

soul

zealous glen
#

Sure

maiden phoenix
#

Cryptid's pointer: balatrojoker

rugged pier
#

yikes i mean get a perko with normal soul

#

sell this

#

profit

#

infinite legendaries

zealous glen
#

They aren't that good

rugged pier
#

ik lol just funny

#

but yeah

#

cool effect

faint yacht
#

Am I missing something here? testing with just one atlas.

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

SMODS.DeckSkin {
    key = "retro",
    suit = "Hearts",
    loc_txt = "test",
    palettes = {
        {
            key = 'lc',
            ranks = {'Jack', 'Queen', "King", "Ace",},
            display_ranks = {'Jack', 'Queen', "King", "Ace",},
            atlas = 'TOGARetroSkin',
            pos_style = 'deck',
        },
        {
            key = 'hc',
            ranks = {'Jack', 'Queen', "King", "Ace",},
            display_ranks = {'Jack', 'Queen', "King", "Ace",},
            atlas = 'TOGARetroSkin',
            pos_style = 'deck',
        },
    },
}
iron haven
#

Did you guys remember what I said?

rugged pier
#

what rarity?

zealous glen
#

It was meant to be common

rugged pier
#

yeah that sounds about right

zealous glen
#

With this effect it might be uncommon

rugged pier
#

nah

#

common seems right tbh

#

actually

#

nvm

#

yeah uncommon is cool

zealous glen
#

I'm not sure I want the Spectral interaction

rugged pier
#

instead of two copies just make one

zealous glen
#

That's just the Fool

rugged pier
#

well fool cant interact with spectrals

faint yacht
candid sleet
#

i'm making an edit of the example jokers mod to see if i can make a version of walkie talkie for +5 chips and +10 mult for each 5 and 10 in hand but it seems to be triggering at the end of the blind too, how do i prevent this?

faint yacht
#

and not context.end_of_round

candid sleet
#

ok thanks

ruby delta
rugged pier
candid sleet
#

oh i added that thinking it might fix the issue i am really bad at understanding this stuff and all the documentation is a bit overwhelming so i'm kinda just throwing myself at it

#

i don't understand lua (or any coding language) very well at all i just wanna try make something

rugged pier
candid sleet
#

even if it's basic

rugged pier
#

makes sense?

candid sleet
#

i think so

rugged pier
#

so since you do not have a #3#, you have no reason to return a "third" variable, in your case your third variable would throw an error anyway since its not a valid return

candid sleet
#

gotcha

rugged pier
#

however, in your calculate function

#

you returning context.other_card matters

#

because the message of the localization (the +chips and +mult) MUST be on the playing cards

#

not the joker itself

candid sleet
#

ok right

rugged pier
#

for example, if you were to not return card = context.other_card then the +chips and +mult would appear on your joker

candid sleet
#

gotcha okay thanks

rugged pier
#

i could be wrong, someone feel free to correct me

#

im new to this myself lol

#

wait its not card = ..

red flower
#

you should use message_card = context.other_card the examples are a bit outdated. you never need to return card = something

rugged pier
#

its message_card

#

yes

#

what he said

#

@candid sleet

candid sleet
#

sure thanks

worldly thicket
#

What is the code to check for a certain poker hand being played

faint yacht
#

Specifically or if the hand contains said hand?

worldly thicket
#

Specifically

#

like a Flush

rugged pier
#

context.scoring_name

faint yacht
#

context.scoring_name == 'Flush'

candid sleet
#

oh wait i was doing an edited version of Runner in my edited examples and it uses context.poker_hands?

worldly thicket
candid sleet
red flower
candid sleet
#

ah ok

iron haven
#

code time?

faint yacht
worldly thicket
red flower
#

it's a flush

#

all the cards are the same suit lol

worldly thicket
#

Oh I am dumb

#

oops

#

but are a specific suit is what I meant to say like a Flush of Hearts

red flower
#

you can check the first card in context.scoring_hand

#

and check card.base.suit

#

or card:is_suit if you want a specific one

worldly thicket
#

do I do if context.scoring_name == 'Flush' and context.scoring_hand == something

red flower
#

context.scoring_hand is a table

#

if you want to check for a specific one then context.scoring_hand[1]:is_suit("Hearts")

zealous glen
iron haven
#

guys?

zealous glen
#

?

iron haven
worldly thicket
zealous glen
iron haven
#

when you hold like an 8. E triggers.

zealous glen
#

E like the number?

#

Or like

#

Notation

iron haven
#

my letter joker.

zealous glen
#

Ok that’s progress

#

What are your Jokers

candid sleet
iron haven
#

I have A through K made. A, B, C, D, E, H, and I have logic errors.

candid sleet
zealous glen
worldly thicket
#

but I doubt that is causing your issue

iron haven
candid sleet
#

ok idk what that file is gg

#

i just copied on the crash screen so i guess that is the error

worldly thicket
#

just screenshot it

candid sleet
stark geode
#

try SMODS.create_card

#

with the key of 'c_earth'

iron haven
#

brb

worldly thicket
# candid sleet

It is telling you there is an unexpected symbol on line 109

hexed stump
#

Is there any way to check for face down cards when you go to scoring? As far as I can tell they get flipped up before context.before sees them and can check, and I’ve not been able to figure out any trickery of checking highlighted cards first

candid sleet
red flower
#

SMODS.add_card{key = "c_earth"}

candid sleet
#

ah thanks

#

will try again

worldly thicket
#

Idk what could be causing this to happen, before I even play the hand

karmic scroll
#

gotta ask again: is there any way to make planet cards use the same shader as spectral cards?

worldly thicket
red flower
#

oh i see

worldly thicket
#

should it be "H" instead of "Hearts" or is that the wrong quotation marks

candid sleet
red flower
#

you need to define a specific context

candid sleet
#

now i just need to add a visual to the joker when it creates the earth card

worldly thicket
red flower
#

maybe

#

is this a joker or what is it

worldly thicket
#

or joker_main

#

it's a joker

red flower
#

joker_main makes sense

#

or context.before

worldly thicket
#

so context.joker_main on top of those other ones

red flower
#

yeah

worldly thicket
red flower
#

both work

rugged pier
#
--Function to store last destroyed card
G.destroyed_cards = {}
local function capture_destroyed_card(card)
    if G.STAGE == G.STAGES.RUN  then
        local rank = card.base.id
        local suit = card.base.suit
        local enhancement = SMODS.get_enhancements(card, extra_only)
        local edition = card.edition
        local seal = card.seal
        table.insert(G.destroyed_cards, card)
        print("Rank destroyed: " .. rank)
        print("Suit destroyed: " .. suit)
        print("Enhancement: " .. (enhancement or "None"))
        print("Edition: " .. (edition or "None"))
        print("Seal: " .. (seal or "None"))
    end
end

local original_shatter = Card.shatter
local original_start_dissolve = Card.start_dissolve

function Card:shatter(...)
    capture_destroyed_card(self)
    return original_shatter(self, ...)
end

function Card:start_dissolve(...)
    capture_destroyed_card(self)
    return original_start_dissolve(self, ...)
end

would this be the right way to record destroyed cards?

candid sleet
rugged pier
candid sleet
#

i'm guessing the card?

rugged pier
#

youre not returning anything?

#

also indent your code pls

rugged pier
candid sleet
#

ah ok

rugged pier
candid sleet
#

to indent the code do i just copy and paste it from notepad++ and use the format with these guys ``

rugged pier
#

no i mean like for yourself lol

#

code is not easy to read and spot errors in when its written like that

candid sleet
#

ah ok

rugged pier
red flower
rugged pier
#

card = card is redundant, it will default to joker anyway, you can get rid of it

violet oasis
#

Is there any way to use pseudorandom_element with G.P_CENTERS, but limit to jokers only? I'm trying to make it so the joker that spawns on the splash screen is randomized, but replacing G.P_CENTERS['j_joker'] with pseudorandom_element(G.P_CENTERS) can also spawn spectrals and tarots

rugged pier
limber blaze
red flower
# rugged pier only playing cards

then you can probably just hook SMODS.calculate_context and check for context.remove_playing_cards. your hooks will get any card without a check

rugged pier
#

so i would do if context.remove_playing_cards in my initial function yes?

#

where would i use the SMODS.calculate_context

red flower
#

if you only need it for one joker then just use that context directly

#

only hook calculate_context if you need it globally

violet oasis
rugged pier
#

but i would need it for other uses later which is why im using a hook

red flower
#

yeah then hooking the smods thing makes sense for that

rugged pier
slate bison
#

anyone knows why my joker just gives me +mult and not the +chips also?

candid sleet
red flower
rugged pier
limber blaze
#

i was correct

slate bison
#

ohh yeah

#

makes sense

#

i always miss studd like that

#

thanks

faint yacht
#

Why not just chips = and mult =?

scarlet thorn
#

One of them is for playing cards and the other is from jokers from what I remember

rugged pier
#

if G.STAGE == G.STAGES.RUN and context.remove_playing_cards then
this is line 194

scarlet thorn
red flower
rugged pier
scarlet thorn
#

How are you running capture destroyed?

rugged pier
scarlet thorn
#

Or is it supposed to be something that just runs without any centers attached

candid sleet
#

is there a list of colours like
colour = G.C.CHIPS,
on the wiki somewhere?

scarlet thorn
candid sleet
#

thanks

scarlet thorn
#

There are some things that are out of date, but this is what I use

red flower
#

didn't breeze write that like a week ago

rugged pier
#

but i think im supposed to replace these with

#

SMODS.calculate_context

red flower
#

yeah

scarlet thorn
red flower
#

it might be just wrong yeah

scarlet thorn
#

Not sure if it would be better or not.

rugged pier
scarlet thorn
#

You wouldnt need context for that I dont think.

red flower
#

i think it's easier and cleaner by using the context, you can do it without but requires more checks and stuff

scarlet thorn
#

Err yea i was thinking just removed cards, but their function is destroyed

#

Though honestly, checking the specific area of a card might be good.

rugged pier
#
--Function to store last destroyed card
G.destroyed_cards = {}
local function capture_destroyed_card(context)
    if G.STAGE == G.STAGES.RUN and context.remove_playing_cards then
        for k, v in context.removed do
            local rank = v.base.id
            local suit = v.base.suit
            local enhancement = SMODS.get_enhancements(v)
            local edition = v.edition
            local seal = v.seal
            table.insert(G.destroyed_cards, v)
            print("Rank destroyed: " .. rank)
            print("Suit destroyed: " .. suit)
            print("Enhancement: ")
            print(enhancement)
            print("Edition: " .. (edition or "None"))
            print("Seal: " .. (seal or "None"))
        end
    end
end

local base_calculate_context = SMODS.calculate_context

function SMODS:calculate_context(context, return_table)
    capture_destroyed_card(context)
    return base_calculate_context(context, return_table)
end
#

like this?

red flower
#

yeah

rugged pier
#

awesome let me test it

#

still same error

#

when i start a run

unborn bay
#

you could just do a nil check first

rugged pier
#

and context ?

red flower
#

i dont think context should ever be nil

#

i do the same thing and i dont nil check

rugged pier
#

since my function is only being called for calulate_context

red flower
#

let me look at the code again on my pc instead of mobile lol

rugged pier
unborn bay
#

also i believe it shouldn't be SMODS:calculate_context

#

it should be SMODS.calculate_context

red flower
#

oh yeah that

unborn bay
#

: denotes it being a class function that takes in self automatically as the first argument, referring to the class instance

rugged pier
unborn bay
#

also are you planning to save the destroyed cards in saves because they probably won't save properly here

#

atleast in my experience

rugged pier
#

next problem now 😅 for k, v in context.removed do

red flower
#

ipairs

unborn bay
#

ipairs ,,,,

rugged pier
rugged pier
red flower
crisp coral
rugged pier
#

ah

scarlet thorn
#

and when they get destroyed, any reference to them becomes nil

rugged pier
#
            local suit = v.base.suit
            local enhancement = SMODS.get_enhancements(v)
            local edition = v.edition
            local seal = v.seal```
i can use these values to recreate the card then yes?
#

i would just save these instead of v itself

red flower
#

yeah thats what i thought you were doing

rugged pier
#

yeah that was going to be my next step after fixing the initial problems

scarlet thorn
#

What exactly is the end goal of this? I joined a bit late

red flower
#

or create a copy of a card but you need to save those to a cardarea probably

rugged pier
rugged pier
unborn bay
#

yeah you can just save the relevant information and use that as data for a card you create later

scarlet thorn
#

You could save copy_card()

#

Instead of fully recreating it, and probably missing mod specific data

rugged pier
#

so far so good

scarlet thorn
#

But then you would need another area for it

unborn bay
#

if you do just save the entire card then you will need to use a cardarea yeah

rugged pier
red flower
#

if only we had autumn's graveyard code..

rugged pier
#

what are card areas, like consumable slot joker slot player hand? etc

red flower
#

yeah

rugged pier
#

ah yeah, ill use that for when i implement the tarot card

#

rn im seeing if i can extract relevant information out of the destroyed card

rugged pier
rugged pier
rugged pier
#

true

#

i can just see how copy_card() extracts data

#

genius

red flower
#

but they quit and deleted their mod

rugged pier
#

unfortunate

scarlet thorn
#

Looking at this function will definitely get you the info you need.

crisp coral
#

i dont have thac

#

but i have graveyard (original)

red flower
#

how are you doing myst

scarlet thorn
#

I would probably recommend copying it, and making it put the info in a table instead of creating a new card

crisp coral
#

the horrors

red flower
rugged pier
rugged pier
scarlet thorn
#

You can clear the table at the start of each round

digital niche
#

How could i change stone for a list of enhancements?

calculate = function(self, card, context)
            if context.setting_blind and not card.getting_sliced then
                G.E_MANAGER:add_event(Event({
                    func = function() 
                        local front = pseudorandom_element(G.P_CARDS, pseudoseed('cave'))
                        G.playing_card = (G.playing_card and G.playing_card + 1) or 1
                        local card = Card(G.play.T.x + G.play.T.w/2, G.play.T.y, G.CARD_W, G.CARD_H, front, G.P_CENTERS.m_stone, {playing_card = G.playing_card})
                        card:start_materialize({G.C.SECONDARY_SET.Enhanced})
                        G.play:emplace(card)
                        table.insert(G.playing_cards, card)
                        return true
                    end}))
                card_eval_status_text(context.blueprint_card or card, 'extra', nil, nil, nil, {message = localize('k_plus_stone'), colour = G.C.SECONDARY_SET.Enhanced})
    
                G.E_MANAGER:add_event(Event({
                    func = function() 
                        G.deck.config.card_limit = G.deck.config.card_limit + 1
                        return true
                    end}))
                    draw_card(G.play,G.deck, 90,'up', nil)  
    
                playing_card_joker_effects({true})
                end
            end}```
rugged pier
thick panther
#

Is there a list or table that houses every joker key loaded?

scarlet thorn
#

You will need to filter for set == "Joker" though

red flower
rugged pier
#

i suppose the challenge is now in the fact i cant let the player access that card until the tarot is used

#

hmm

red flower
#

you can hide cardareas

rugged pier
#

oh sick

#

so basically create new area, keep it hidden

#

wait no

#

i cant create a card area can i

unborn bay
#

you can

red flower
#

my mod has like 20 new cardareas

rugged pier
#

:o

unborn bay
#

what warrants needing all those card areas

red flower
#

play it and find out 🙂

rugged pier
#

can you link, i would rather search through code than bug you with questions (unless you dont want me to)

unborn bay
#

i need to play joyousspring ,,,

red flower
scarlet thorn
#

Now would be when I link the wiki, but I see no cardarea wiki page

rugged pier
red flower
#

most vanilla stuff isnt documented

#

at most you might get something in the lsp

rugged pier
scarlet thorn
#

language server processesor or smth like that

digital niche
#

when i change this the game crashes

scarlet thorn
red flower
scarlet thorn
rugged pier
#

goddamn

digital niche
# scarlet thorn Can you show the code around?
calculate = function(self, card, context)
            if context.setting_blind and not card.getting_sliced then
                G.E_MANAGER:add_event(Event({
                    func = function() 
                        local front = pseudorandom_element(G.P_CARDS, pseudoseed('cave'))
                        G.playing_card = (G.playing_card and G.playing_card + 1) or 1
                        local card = Card(G.play.T.x + G.play.T.w/2, G.play.T.y, G.CARD_W, G.CARD_H, front, G.P_CENTERS.ruby, {playing_card = G.playing_card})
                        card:start_materialize({G.C.SECONDARY_SET.Enhanced})
                        G.play:emplace(card)
                        table.insert(G.playing_cards, card)
                        return true
                    end}))
                card_eval_status_text(context.blueprint_card or card, 'extra', nil, nil, nil, {message = localize('k_plus_stone'), colour = G.C.SECONDARY_SET.Enhanced})
    
                G.E_MANAGER:add_event(Event({
                    func = function() 
                        G.deck.config.card_limit = G.deck.config.card_limit + 1
                        return true
                    end}))
                    draw_card(G.play,G.deck, 90,'up', nil)  
    
                playing_card_joker_effects({true})
                end
            end}```
#

i changed to "ruby", it is a custom enhancement from my mod

scarlet thorn
#

unless you disabled them

digital niche
scarlet thorn
#

m_fus_ruby

digital niche
#

tyty!

digital niche
scarlet thorn
#

Call a list how

#

Get a value from the list?

digital niche
#

like, i want a joker that creates a card with one of the enhancements for the list everytime a bllind is selected

#

i only need to figure out the part where it chooses one random from the list

rugged pier
#

upon reading the lsp wiki

#

ive decided that instead of messing around with creating new card areas

scarlet thorn
rugged pier
#

i will store an entire table of values instead

#

and use those values when needed by the tarot

#

lol

digital niche
scarlet thorn
#

If you have your list, just put the list there.

candid sleet
#

Thanks to everyone who helped me out earlier, really appreciate it and I think I'm starting to understand it a bit better now!

digital niche
digital niche
scarlet thorn
digital niche
scarlet thorn
#

Those are editions. local card is being set to an edition

manic rune
#

dont name ur vars "card", it overrides "card" from calculate btw đŸ„€

scarlet thorn
#

^

manic rune
#

shouldnt affect anything in ur code rn but its a bad practice

digital niche
digital niche
manic rune
#

yeah

#

just name it smt else and ur good

digital niche
#

and i also changed the times it was mentioned to the new name

gilded narwhal
#

what are the arguments for juice_up again?

digital niche
rugged pier
# scarlet thorn I would probably recommend copying it, and making it put the info in a table ins...
--Function to store destroyed cards
function card_information(other, playing_card)
    local scale = 1
    local card_snapshot = {}
    card_snapshot.T = { x = other.T.x, y = other.T.y }
    card_snapshot.width = G.CARD_W * scale
    card_snapshot.height = G.CARD_H * scale
    card_snapshot.playing_card = playing_card
    card_snapshot.base = other.config.card
    card_snapshot.center = other.config.center
    card_snapshot.ability = {}
    card_snapshot.ability.type = other.ability.type
    for k, v in pairs(other.ability) do
        if type(v) == 'table' then 
            card_snapshot.ability[k] = copy_table(v)
        else
            card_snapshot.ability[k] = v
        end
    end
    card_snapshot.edition = other.edition or {}
    check_for_unlock({type = 'have_edition'})
    card_snapshot.seal = other.seal
    if other.params then
        card_snapshot.params = copy_table(other.params)
        card_snapshot.params.playing_card = playing_card
    end
    card_snapshot.pinned = other.pinned
    return card_snapshot
end

G.destroyed_cards = {}
local function capture_destroyed_card(context)
    if G.STAGE == G.STAGES.RUN and context.remove_playing_cards then
        for k, v in ipairs(context.removed) do
            local info = card_information(v, nil, G.playing_card)
            table.insert(G.destroyed_cards, info)
        end
    end
end

local base_calculate_context = SMODS.calculate_context

function SMODS.calculate_context(context, return_table)
    capture_destroyed_card(context)
    return base_calculate_context(context, return_table)
end

so this is the implementation i came up with

#

and when i use the tarot card, i would index the last card_snapshot within G.destroyed_cards

#

and use all the information within it

#

table within table (within table)

iron haven
iron haven
stark geode
hexed stump
#

So I’ve figured out how to track flipped cards on scoring by attaching an additional variable to them on flip that’ll be checked for on scoring, though it wouldn’t work with the blinds

#

The problem is like, clearing that on unscored cards if you sell the joker

rugged pier
#

in SMODS.create_card(t) what set should i use for playing cards?

rugged pier
stark geode
#

np

rugged pier
#

and similarly for area

#

i would not either right

#

default would just be the playing hand?

stark geode
#
local _rank = pseudorandom_element({'J', 'Q', 'K'}, pseudoseed('never_punished'))
            local _suit = pseudorandom_element({'S','H','D','C'}, pseudoseed('never_punished'))
            local _card = create_playing_card({
                front = G.P_CARDS[_suit..'_'.._rank],
                center = G.P_CENTERS.m_glass
            }, G.hand, false,false,nil)
            _card:add_to_deck()
            table.insert(G.playing_cards, _card)
            _card.states.visible = nil
            G.E_MANAGER:add_event(Event({
                func = function()
                    _card:start_materialize()
                    return true
                end
#

code i use to create a random face card

stark geode
rugged pier
stark geode
#

fyi

rugged pier
gilded narwhal
#

guys how would I make this work? I'm trying to balance the base mult and chips of poker hands but when a card scores it just goes back to normal values

iron haven
rugged pier
stark geode
#

i forget what it is

#

check certificate code

rugged pier
#

okok

long sun
#

hiya! any common reasons why i might be getting this error?

#

i tried reupscaling the images in Phanta and BFDI, but no luck

#

okay aha what.

#

i removed one of my Spectral cards

#

and. huh.

sturdy compass
long sun
sturdy compass
#

How big are the files?

long sun
#

at most, 505KB?

#

it'd better not be a hardware issue

sturdy compass
#

I doubt it

#

though 500kb seems like a lot

long sun
#

i mean, it is quite big ^^

sturdy compass
#

I think mine might be a tiny bit bigger HxW wise and is half the file size

long sun
#

oh is that your 1X?

sturdy compass
#

That's my 2X

long sun
#

ah right

#

ya mine's 12x11

#

yours seems to be 9x12

#

oh i know why mine's so much larger

sturdy compass
#

It is, but that doesn't seem like +200kb bigger??

long sun
#

to fix the dark edge bug, i ran a script to set the colour of all transparent pixels ^^

#

that's probably why

sturdy compass
#

That sounds very hardware heavy lol

long sun
#

i guess so ^^

#

but it hasn't caused any issues before

sturdy compass
#

Also, dark edge bug?

long sun
#

do you have any decks?

sturdy compass
#

a few

long sun
#

show me one of them :D

sturdy compass
long sun
#

bingo. see those little grey lines, between the cards?

#

i'd boot up the game to show you, but i can't -w- but

#

most of the vanilla decks don't have that issue

#

iirc there are a couple for. some reason

sturdy compass
#

Are you sure that's not just the CRT effect?

long sun
#

you can turn that off to confirm

sturdy compass
#

Comparison for myself

long sun
#

ya there you go

sturdy compass
#

They look the same

#

lol

long sun
#

look at the corners

sturdy compass
#

Ah ok

long sun
#

it applies to all your cards, but it's more noticable on transparent Jokers, and Souls

sturdy compass
#

interesting, however doesn't seem worth the hassle lol

long sun
#

but, it requires Pillow, and you need to change the link in the code ^^

long sun
#

okay anyway

#

gonna try lovelyignoring Phanta to see if it's causing the issue

sturdy compass
#

What changes did you make immediately before it started causing issues?

long sun
#

i added a Spectral card, but removing it again caused the game to run out of memory

sturdy compass
#

Very odd. Are you loading your cards' codes from external files or are they all in one big master file?

long sun
#

for Phanta, it's a master file

#

for BFDI, it's multiple

sturdy compass
#

I wonder if your loop is running infinitely somehow

long sun
#

oh! BFDI caused the issue

#

...for some reason

sturdy compass
#

Take a look into how your cards are being loaded. I feel like that may have something to do with it

long sun
sturdy compass
#

You should make it draw cards after use

long sun
#

sounds difficult, but i'll give it a go :D

#

hmm, how would i go about doing that? i'd need to check if a card can even be drawn in the first place, as it can be used outside of a Blind

old bane
#

G.GAME.blind.in_blind

#

?

long sun
#

it should count Spectral packs too, though

wooden nexus
#

An Enhancement

long sun
#

đŸ”„

#

i mean, i'm happy to keep it as-is, Hanged Man doesn't let you draw with it :>

sturdy compass
faint yacht
long sun
#

like, say you open a Mega Spectral pack, and get a Norwell Wall, and choose it first

sonic cedar
#

does anyone know how the debug win run button works? I may
need it for something


sturdy compass
faint yacht
#

Well, more of the conditions for it to be forced to draw... though, for you, I don't think it is necessary to lock it down behind if the cards are drawn if you are increasing the hand size.

#

Instead, after activation, check for

if ((context.other_drawn and (G.STATE == G.STATES.TAROT_PACK or G.STATE == G.STATES.SPECTRAL_PACK or (G.STATE == G.STATES.SMODS_BOOSTER_OPENED and SMODS.OPENED_BOOSTER.config.center.draw_hand)))
or (context.first_hand_drawn or context.hand_drawn)) and G.deck and #G.deck.cards > 0 then
  -- maybe call G.FUNCS.draw_from_deck_to_hand() here?
end
sturdy compass
#

That's probably better since it takes every pack into account

long sun
#

will give that a go tomorrow ^^

#

thanks!!

faint yacht
#

I... sure had an experience getting the first enhancement I made to work as intended, let's put it lightly.

sturdy compass
#

😭

faint yacht
#

The save_run() that made it work was just not used right.

sonic cedar
faint yacht
sturdy compass
#

Is that win hand or win run?

#

Cause I'd imagine win run is a lil more in depth

faint yacht
#

Win Blind.

#

Win run... uh...

loud citrus
rugged pier
#

what are dream cards, some context?

loud citrus
reef belfry
#

How do u make a good looking deck

rugged pier
#

also on another note, how do i initialize a global variable thats not reset across the same run and also is not reset when you quit and restart the game into the same run

long sun
#

✹

rugged pier
reef belfry
#

I feel like its missing something though

loud citrus
rugged pier
#

for example in the game, magician does 2 but chariot only does 1

#

because some are more strong than others

#

so see what balancing you want to keep with Dream cards

#

if you want them to be powerful you could also do 3 (but then nerf the spawn rate) if that makes sense

rugged pier
long sun
#

hmm, why is mph_full nil, here?

#

(assigning mph_full to mph here to make it easier to change later, in case i've done this wrong)

sonic cedar
#

why are you making a car

long sun
#

mm?

sonic cedar
#

why does your joker have a mileage

long sun
#

oh

#

aha

#

it's short for most played hand

#

:}

sonic cedar
#

ohhhhhhh

#


so you’re not making a car

long sun
#

mhmhm :>

#

i'm making a Spectral

sonic cedar
#

close enough

scarlet thorn
long sun
#

OH :P oops

#

forgot Lua started at 1 dfkjgndkjfng

scarlet thorn
#

or well 0

long sun
#

thanks :D

scarlet thorn
#

Its a key/value table

#

so using numbers wont work

#

unless the number is the key

sonic cedar
#

Was gonna ask if that’s an index too

long sun
#

oh, true

#

there ^^

#

well, i should also add an else, too :>

scarlet thorn
#

If that doesnt work, try ipairs. I dont know the full difference between them, but one of em works and thats all that matters

potent glen
long sun
#

ah, i'm sure pairs works here, as i used this code in another Joker

scarlet thorn
# rugged pier b u m p

Possibly G.GAME. Im not too sure though. After im through with what im doing i could take a look

rugged pier
#

problem with G.GAME is that it is not initialized until a player starts a run, and so i cant define it when my mod is loaded in

scarlet thorn
#

My project was bust.

rugged pier
scarlet thorn
scarlet thorn
#

It returns a table, which is always immedietly setting the value of G.GAME

rugged pier
#
G.GAME['destroyed_cards'] = {}
#

it would crash upon launch

scarlet thorn
#

Yea

#

You would need to access it if G.GAME is equal to something

#

if G.GAME then X end

rugged pier
#

basically

#

cool makes sense actually, seems obvious now that i think about it lol

#

wait no but if i did that

#

everytime a player closes the game

#

and restarts

#

it would reset the destroyed_cards to an empty table no?

glad osprey
#

guys i have an idea

#

bonus blinds

#

they replace small or big blinds and have much larger requirements

#

however you cannot lose on them and if you beat the requirement you get lotsa money

rugged pier
#

whats the downside?

glad osprey
#

there is none

#

they just aren't consistent

#

it's a random chance for one to show up

rugged pier
#

ah

#

if you lose you just dont get any money

#

?

tall wharf
#

might make a stupid modpack

scarlet thorn
#

Because .GAME is what is saved to the disk

rugged pier
scarlet thorn
#

look at the vanilla code for init

rugged pier
#

okok tysm

scarlet thorn
#

it has everything like your money, to the marble joker's current suit

tall wharf
#

...castle?

rugged pier
dense adder
#

anyone understand this issue when using level_up_hand?

scarlet thorn
dense adder
#
                local h_text = G.FUNCS.get_poker_hand_info(G.hand.highlighted)
                level_up_hand(context.blueprint or self, h_text, nil, 1)
            end
         end```
scarlet thorn
#

use card not self

#

its erroring becuase self:juice_up doesnt exists

dense adder
#

thanks, its working

scarlet thorn
#

so cool

scarlet thorn
rugged pier
#
--Function to capture destroyed cards' information
local function capture_destroyed_card(context)
    if G.STAGE == G.STAGES.RUN and context.remove_playing_cards then
        for k, v in ipairs(context.removed) do
            local info = card_information(v, nil, G.playing_card)
            table.insert(G.destroyed_cards, info)
        end
    end
end
#

this is how im defining the table

scarlet thorn
#

2 problems. 1, G.GAME is not defined when your mod is loaded, so that bottom code will never run, and destroyed_cards will not exist

#
  1. i said G.GAME.destroyed_cards
scarlet thorn
#

whenever you are going to access destroyed_cards, make sure its defined, and if it isnt, define it

rugged pier
scarlet thorn
#

if G.GAME and not G.....

rugged pier
#

did i not do that 😭
G.GAME.destroyed_cards

#

am i being stupid

#

oh

#

my god

#

i am

#

being stupid

#

i changed the if but not the

#

part where im inserting

tardy reef
#

Hey quick question, how feasible would it be to implement a modded joker that only shows up after certain conditions are met? Like Cavendish only showing up after Gros Michel dies by its own effect

#

The condition I'm thinking would be another (vanilla) joker being sold previously during the run

iron haven
#

I don't know how to fix the logic errors

marble flint
#

for hooking onto a vanilla joker being sold, you can simply take_ownership of it with a calculate function (which doesn't override* for vanilla jokers)

tardy reef
#

Ok so the basic idea is that there's a global flag that tells the game when the banana jokers are allowed to be generated, right?

#

How would I go about making a global flag of my own in my code?

timid star
#

anyone know a simple way to prevent a blind from being disabled

#

chicot is really gonna ruin it

brisk rose
#

Maybe don't frick over your players?

#

Fuck over rather, I'm used to a server that has profanity blocking

timid star
brisk rose
#

Oh my b

#

Sorry for assuming

#

Made an ass of me

timid star
brisk rose
#

I kinda hope there isn't a simple way to prevent it, not for your case but because I already hate a lot of custom blinds that come with otherwise good mods and I'd hate for them to make them even more annoying, lol

#

There prolly is though

timid star
brisk rose
#

I'm not trying to bitch, just rambling

timid star
#

dw, my blinds won't be the blind that debuffs red seal steel kings (tm)

#

they just kill your cards instead

brisk rose
#

It's little stuff like this that makes me always suggest that smods needs modularity built in to disable stuff Ala carte

brisk rose
timid star
#

and hell, blinds are cool actually

brisk rose
timid star
#

ig there should be a little thing for easy disabling and enabling blinds

#

guess gotta dig into the code once more

brisk rose
#

Yeah that's all, really anything that mods add around be able to be modular on the smods side like that

#

Imo

#

Would also save work for those who do want to make their mod modulat, instead of having to do it with their own config

timid star
#

if they dont make the function then make it yourself

#

can't really make other people add what you want

#

thats what modding is for

brisk rose
#

It's not begging, just a suggestion. If I was competent with coding I'd do the pr myself

timid star
#

asking for better documentation though sigh.. i like to read not analyze code..

brisk rose
#

Afaik there actually is an external mod that does this, I just need to play around with it

timid star
#

idk, an easy function to display images on screen would be real nice

#

end up making the function yourself by using another mod's code as scrap material for it

brisk rose
#

The funny thing is that love.grapgics is probably the one thing I have done experience with

#

From my very few modding attempts

#

Speaking of love.grqphics that's where you'll find documentation for graphics functions, on lovely's official site

timid star
#

for me it looks like putting magic numbers on a function and hoping it'll align correctly

timid star
edgy reef
#

I haven't used it but I assume that it's similar to other frameworks that provide graphics rendering.

timid star
#

pretty new to this stuff so i barely know anything

crisp coral
timid star
#

for some odd reason god i should be testing this more

tall wharf
timid star
iron mantle
#

Hey so this is kinda embarrassing lol, I've been busy with work recently and I could've sworn I tested this the day of, but it turns out that it actually doesn't work with Buffoon Packs 😅

crisp coral
#

its almost as if i took that code from my mod

tall wharf
#

that's theft

timid star
#

i forgot you were the guy

crisp coral
#

is it theft if im stealing from myself

tall wharf
#

yes

crisp coral
#

wowww

tall wharf
#

unless you allowed yourself

#

which you have to do in paper

#

no pdfs no docx just printed paper signed with blue ink only

timid star
#

oh my god the problem was that it was supposed to be G.GAME.blind.config.blind.no_debuff rather than G.GAME.blind.config.no_debuff

crisp coral
#

cooked

timid star
#

whateverr.. finally finishing the asriel dremurr fight

chrome widget
tall wharf
#

chat

timid star
# crisp coral cooked

now im gonna take even more of your code to analyze how id be able to force small and big blinds to special blinds trolling_moment

#

im gonna need more jokers

tall wharf
timid star
tall wharf
#

wow

timid star
#

my idea was to make a teto pack but i took all the time to work on one blind

tall wharf
#

you will be the third to make a tetoris joker

timid star
#

igaku teto đŸ”„

#

would it be a crime to make joker abilities play an animation cutscene every time they are triggered

chrome widget
#

Replace your current one with this

tall wharf
tall wharf
timid star
tall wharf
#

(they have 25 rigged boredoms)

timid star
#

500 triggers