#💻・modding-dev

1 messages · Page 302 of 1

tepid rock
#

so change sliced to right ?

#

I would use that for plasma runs ngl

runic pecan
tall wharf
tepid rock
tall wharf
runic pecan
tall wharf
#

oh there's one

#

burnt ash

tepid rock
# tepid rock correct

it is a weird mix of invis and a previous joker I made (which is based on ceremonial but gives negative to right rather than mult to itself)

tall wharf
#

INFINITE JOKER

runic pecan
#

So if my_pos and G.jokers.cards[my_pos+1] and not card.getting_sliced and not G.jokers.cards[my_pos+1].ability.eternal and not G.jokers.cards[my_pos+1].getting_sliced then would become if sliced_card and not card.getting_sliced and not sliced_card.ability.eternal and not sliced_card.getting_sliced then

tepid rock
#

gotcha, added it (and fixed all the red lines) gonna see if it crashed when i use it

tepid rock
# runic pecan More like put `local sliced_card = ...` before the `if` so you can use it in the...

calculate = function(self, card, context)
        for i,J in ipairs(G.jokers.cards) do
            if J == card then
                my_pos = i
            else
                jokers[#jokers+1] = J
            end
        end
            if context.setting_blind and not card.getting_sliced then
                if #jokers > 0 then 
                    ---if my_pos and G.jokers.cards[my_pos+1] and not card.getting_sliced and not G.jokers.cards[my_pos+1].ability.eternal and not G.jokers.cards[my_pos+1].getting_sliced then 
                    if sliced_card and not card.getting_sliced and not sliced_card.ability.eternal and not sliced_card.getting_sliced then
                        if #G.jokers.cards <= G.jokers.config.card_limit then
                            local sliced_card = G.jokers.cards[my_pos+1]
                            local left_card = G.jokers.cards[my_pos-1]
                                sliced_card.getting_sliced = true
                                G.GAME.joker_buffer = G.GAME.joker_buffer - 1
                                G.E_MANAGER:add_event(Event({func = function()
                                card_eval_status_text(context.blueprint_card or self, 'extra', nil, nil, nil, {message = localize('k_duplicated_ex')})
                                left_card:add_to_deck()
                                G.jokers:emplace(card)
                                end}))
                            
                            
                        else
                            card_eval_status_text(context.blueprint_card or self, 'extra', nil, nil, nil, {message = localize('k_no_room_ex')})
                        end
                else
                    card_eval_status_text(context.blueprint_card or self, 'extra', nil, nil, nil, {message = localize('k_no_other_jokers')})
                end
            end
        end
    end
    }

got this

runic pecan
tepid rock
#

good question, mustve accidentally deleted it ^^'

hasty mist
#

I've made a modded version of blueprint that copies the joker to its left, rather to its right, i'm trying to make it so that it can't copy blueprint and blueprint can't copy it, since putting them next to eachother ingame makes it so that left clicking crashes the game without giving a crash log, setting blueprint_compat to false makes it so that blueprint reads as incompatible, but the modded joker still reads compatible when placed on blueprint, giving the crash.

dense adder
#

is it possible to add a perma_bonus to a card thats not the scoring card?

tepid rock
#
            if context.setting_blind and not card.getting_sliced then
                if #jokers > 0 then 
                    ---if my_pos and G.jokers.cards[my_pos+1] and not card.getting_sliced and not G.jokers.cards[my_pos+1].ability.eternal and not G.jokers.cards[my_pos+1].getting_sliced then 
                    if sliced_card and not card.getting_sliced and not sliced_card.ability.eternal and not sliced_card.getting_sliced then
                        if #G.jokers.cards <= G.jokers.config.card_limit then
                            local sliced_card = G.jokers.cards[my_pos+1]
                            local left_card = G.jokers.cards[my_pos-1]
                                sliced_card.getting_sliced = true
                                G.GAME.joker_buffer = G.GAME.joker_buffer - 1
                                G.E_MANAGER:add_event(Event({func = function()
                                card_eval_status_text(context.blueprint_card or self, 'extra', nil, nil, nil, {message = localize('k_duplicated_ex')})
                                left_card:add_to_deck()
                                G.jokers:emplace(card)
                                end}))
                            
                            
                        else
                            card_eval_status_text(context.blueprint_card or self, 'extra', nil, nil, nil, {message = localize('k_no_room_ex')})
                        end
                else
                    card_eval_status_text(context.blueprint_card or self, 'extra', nil, nil, nil, {message = localize('k_no_other_jokers')})
                end
            end
        end
    end
    }

still crashing, just about juice up ; note: it crashed before and after added

tepid rock
tall wharf
#

me about to add 12 years old meme to my mod:

hasty mist
maiden phoenix
wintry solar
#

I think it’s actually complaining that the jokers table doesn’t exist, needs a local jokers = {}

coral flume
#

anyone know why this crash happens, seems to happen when I have one of my jokers bought from the shop, and then select a blind

#

but it doesnt have any issues if I had it dudring a round

rose dragon
tall wharf
rose dragon
slate bison
#

anyone know how do i get the id of the consumable being used by the player?

daring fern
slate bison
#

damn thats huge

#

thank you

tall wharf
#

i will add a new joker

south lintel
coral flume
#

What context does a joker use for 'on buy' effects?

daring fern
slate bison
#

anyone knows why my joker is not doing anything? all i want for now is that, everytime u use a tarot card, it creates a random new one

coral flume
tepid rock
#

code was too long for discord lmao

maiden phoenix
#

Is it still the same crash?

maiden phoenix
#
card_eval_status_text(context.blueprint_card or self, 'extra', nil, nil, nil, {message = localize('k_duplicated_ex')})
                                left_card:add_to_deck()
                                G.jokers:emplace(card)
                                end}))
                            
                            
                        else
                            card_eval_status_text(context.blueprint_card or self, 'extra', nil, nil, nil, {message = localize('k_no_room_ex')})
                        end
                else
                    card_eval_status_text(context.blueprint_card or self, 'extra', nil, nil, nil, {message = localize('k_no_other_jokers')})

those self should be card instead

south lintel
#

is there a simple way to check how many hands have already been used in a round?

maiden phoenix
south lintel
#

thanks

tepid rock
#

says there are no other jokers despite there being jokers

formal parrot
maiden phoenix
#

Can you show your full calculate code again

tepid rock
formal parrot
#

metal_pipe.mp3

maiden phoenix
#

Your local values should be under the context check imo

tepid rock
maiden phoenix
#

Maybe that's the reason why your jokers isn't checked

tepid rock
#

I changed it, it's still having the issue

maiden phoenix
#

You should use sendDebugMessage for debugging to see at which point it doesn't get the jokers you want

tepid rock
#

I fixed the issue but now it just spontaneously creates jokers but not showing them

formal parrot
#

Hell yeah

south lintel
#

I think I may have put the xmult increase in the wrong spot

tepid rock
maiden phoenix
#

Correct me if I'm wrong but shouldn't it be the left_card that should be emplaced?

#

If this doesnt work you should try using SMODS.add_card({key = left_card.config.center.key})

tepid rock
#

instead of add to deck?

maiden phoenix
maiden phoenix
#

I think it's because this is outside that it creates so many

runic pecan
slate bison
#

well if i dont use context.individual it keeps talking about indexing a nil value :(

#

and giving an error

maiden phoenix
#

Because context.consumeable might not exist instead do

if context.using_consumeable then
  if context.consumeable.ability.set == ...
runic pecan
slate bison
#

looking at the game code i saw that but didnt think it was a big deal

slate bison
runic pecan
maiden phoenix
#

nil check this

slate bison
#

😭

maiden phoenix
#

What is your joker supposed to do btw Neon Kitchen?

tepid rock
#

kill left, dupe right

#

it is doing that, technically

maiden phoenix
#

Oooh I'm blind

#

You're never returning true for the event

south lintel
#

I need opinions, is this an alright effect to have and how rare should the joker be?

maiden phoenix
#

Yea it's kinda like a better Carto

south lintel
#

I was thinking of this being rare or legendary but idk if the effect is adequate enough for a legendary

zealous glen
#

Not Legendary

#

Just Very Rare

tepid rock
maiden phoenix
south lintel
formal parrot
#

It’s pretty good tho

#

Can i see the art ?

tepid rock
#

its destroying the left

#

then recreating the one it jsut destroyed

south lintel
#

and when I say terrible I mean it lol

formal parrot
#

Trust

#

I was horrible

south lintel
maiden phoenix
#

Odd, maybe sliced_card is getting replaced somehow

formal parrot
#

I’m doing the reverse LOL

south lintel
#

the upside is when I do get around to making the art, I only have 7 jokers in this mod, so it won't be that much work hopefully

formal parrot
#

I’m doing the art and saving ideas to code later

tepid rock
#

final code

south lintel
maiden phoenix
tepid rock
#

nope. Says there are no jokers

maiden phoenix
#

Good

tepid rock
#

Nvm, crashes without a left joker but i think I can fix it

#

Fixed, just had to add if #jokers > 0 and not G.jokers.cards[my_pos-1] == nil then

maiden phoenix
#

if #jokers > 0 and G.jokers.cards[my_pos-1] then also works but nice 👍

tepid rock
#

I swear, every single joker i have made has forced me to get help lmao

runic pecan
maiden phoenix
#

Tbh if you're just starting that's quite a complex joker so props for going this far 👍

tepid rock
#

thank you and i am not ashamed, just find it funny that i dived into the deep end

south lintel
tepid rock
#

Real, happens when making music and any creative thing (just more obvious in coding cus you can almost always see it)

unborn bay
#

i am only good at programming

formal parrot
runic pecan
#

That being said, I'm currently also asking for help. *bump

formal parrot
#

Sorry for late response

unborn bay
#

holy shit

tepid rock
#

Question tho, is there a way to have a joker ignore a full joker hand when you buy it? (I have a joker that adds an extra joker slot and you cant buy it when jokers are full)

south lintel
reef belfry
#

After 1 round of modded balatro i have to work in the mines and create another joker

formal parrot
#

I never done pixel art before

south lintel
#

eugh I will have to find out how to fix this

coral flume
tepid rock
south lintel
formal parrot
#

I implemented what i learned from normal art to pixel art

#

Like shading and stuff

#

Just look up some references and some jokers from the game

#

They helped me a log

#

Lot

south lintel
#

yeah that makes sense

#

my only experience with art is music really, but I don't think that's gonna help me with drawing pixel art lmfao

unborn bay
#

i have been learning art though out my balala modding journey of all things

#

like im actually kinda proud of these two ngl

shell timber
#

they're both nice but ten 10s should probably have the white border the other jokers have

south lintel
unborn bay
#

yes

south lintel
#

I have no idea how I remembered that

hard needle
#

good sprites tho

reef belfry
#

The Human Magnet Medicinatron

#

There are 4 people who will get where this is from

tepid rock
tepid rock
shell timber
#

this is the one album joker i have though i might change the effect tbh

tepid rock
#

is that lemon demon?

shell timber
#

close enough

unborn bay
#

i should make the marvin's marvelous mechanical museum joker

tepid rock
#

I am making ghost pop tapes 100% but idk what it would be

unborn bay
#

featuring jimbo, jolly joker, blueprint and brainstorm

reef belfry
#

Why would they be copying jimbo

#

Ur losing out on like +8 mult when playing a pair

unborn bay
#

why not

south lintel
#

I fixed it! That means that all my jokers are done codewise (I hope) and I just need to make the art and maybe balance them

unborn bay
#

it's still free +4 mult

tepid rock
hard needle
#

if my mod has an error does balatro just blackscreen when i strat it?

hushed field
#

no, it'll give a crash, or if it's an infinite loop, shutdown everything

hard needle
#

well thats very fun

hushed field
#

a blackscreen can happen, but shouldn't if you're not doing something really weird in your code

hard needle
#

?????????

#

well it does for me xd

hushed field
#

Haha, what's your mod added so far? Is it just a joker and some loading code?

hard needle
#

uhhhh

hushed field
#

you'll wanna post your code, I reckon 😛

hard needle
#

i added a joker that has X2 mult and -0.25 Mult every round

#

uhh i didnt do that 2nd part yet because i just wanted to see if it would work

reef belfry
#

Or the slightly unbalanced
C.) Draw all steel cards in deck regardless of hand size

tepid rock
#

Randomly force all but 1 score to either chip or mult

#

or 10, might make it useful

south lintel
tepid rock
#

otherwise B sounds good

hard needle
#

hmmmm so if i remove the steamodded header the black screen goes away probably because my mod didnt load

#

the hell is going on with my mod??

maiden phoenix
hushed field
hard needle
unborn bay
#

i had this stupid idea for a joker once where it gives like x20 mult

#

with a 1 in 10 chance of doing x0 mult

hard needle
#

its supposed to look like this right

--- STEAMODDED HEADER
--- MOD_NAME: Stuffz
--- MOD_ID: STUFFZ
--- MOD_AUTHOR: [Mini]
--- MOD_DESCRIPTION: Adds some jokers.
--- PREFIX: stfz
----------------------------------------------
------------MOD CODE -------------------------
shell timber
#

you shouldnt use a header

hard needle
#

oh?

hushed field
# hard needle yeah..?

not your fault for not knowing, no worries, but it's the outdated method for loading mods. You'll wanna use a separate .json file

shell timber
#

morefluff only uses a header because i havent been bothered to change it

unborn bay
#

please don't use lua headers as those are depracrated now

#

deprecated? depracated?

#

idk

reef belfry
#

I HAVE a stupid idea for a joker where it does 11 different things depending on how many of each suit you have scored

#

And i think i have to go through with it

#

Also isnt 1 in 10 a bit too low of a chance

shell timber
#

Complexity Creep - Rare
Gains a random effect after each Boss Blind

reef belfry
#

X20 is a biggo xmult

hard needle
#

i was thinking about it but the example mod that i'm trying to learn off of was updated like 4 months ago and i figured that not much breaking changes should've happened in that gap

hushed field
#

haha, good luck with setting that up. Took me making a whole system to make that work

hard needle
#

sorry i will look into it

unborn bay
#

yeah but the other option is flat X0

#

meaning all you have will turn into NOTHING

hushed field
hard needle
#

whats the format for main.json, same as header?

reef belfry
#

Make it -1X mult so it fucks you iver and gives you negative score

hushed field
#

but nothing wrong with making that mistake, the documentation on what's changed isn't great

hushed field
hard needle
#

ah, i found it

#

alr

#

does debugplus have an option to like create a certain joker

hushed field
#

yes! hover over it in collection and press 3 (or shift-3, depending on your settings)

hard needle
#

omg yey i made my first joker

#

thank you ic

#

e

hushed field
#

Congrats 😊

reef belfry
#

whenever im down i know SMODS.Gradient got me

hard needle
#

does debugplus have an option to instantly end the round and go to cash out

crisp coral
#

yes

hard needle
south lintel
#

@formal parrot the most temporary of temporary art

tall wharf
#

do you not just have random art slapped on it

south lintel
south lintel
reef belfry
#

draw the 4 as the suits

#

the other 3 pray for a miracle of an idea

south lintel
#

only one of these has anything to do with suits 😭

reef belfry
#

i meant like glutt greedy lusty n wrathful

south lintel
#

yeah I know what you mean

formal parrot
south lintel
#

I will make actual art

#

I just need to come up with ideas for these

hard needle
#

how do i get the scoring hand

unborn bay
#

the characters from the hit netflix anime series the seven deadly sins

#

don't actually do that

icy moss
#

SMODS.Rarity { key = "supercommon", loc_txt = "Super Common", default_weight = 100, badge_colour = HEX('FFA500'), get_weight = function(self, weight, object_type) return weight end, }
I was try to create a super common rarity to test my joker but it doesn't seem to do anything, reading the code on the SteamModded I would think it will make the joker much more common in this case

tepid rock
#

is there a branching category for all cards (eg, something to detect a specific edition from consumables and jokers) or do i just need to add an "or" between consumables and joker

icy moss
daring fern
icy moss
tepid rock
#
    loc_vars = function(self, info_queue, card)
        return { vars = { card.ability.extra.Xmult } }
    end,
    calculate = function(self, card, context)        
        local other_joker = nil
        for i = 1, #G.jokers.cards do
            if G.jokers.cards[i] == card then other_joker = G.jokers.cards[i+1] end
        end
        if  context.joker_main then
        if context.other_joker then
            if context.other_joker.config.center.edition == 'e_negative' then
                G.E_MANAGER:add_event(Event({
                    func = function()
                        context.other_joker:juice_up(0.5, 0.5)
                        return true
                    end
                })) 
                return {
                    message = localize{type='variable',key='a_xmult',vars={card.ability.extra}},
                    Xmult_mod = card.ability.extra
                }
                end
            end
        end
    end
}

It is meant to detect negatives jokers (idk how i can get it to detect consumables) then give 2x mult for each one but it is doing neither

daring fern
red flower
#

also for consumables it's just context.other_consumeable

tepid rock
red flower
#

no, what I'm saying is that they are separate contexts
remove the context.joker_main check

tepid rock
red flower
#

yes

tepid rock
#
    loc_vars = function(self, info_queue, card)
        return { vars = { card.ability.extra.Xmult } }
    end,
    calculate = function(self, card, context)        
        local other_joker = nil
        for i = 1, #G.jokers.cards do
            if G.jokers.cards[i] == card then other_joker = G.jokers.cards[i+1] end
        end
        if context.other_joker then
            if context.other_joker.card.edition.key == 'e_negative' then
                G.E_MANAGER:add_event(Event({
                    func = function()
                        context.other_joker:juice_up(0.5, 0.5)
                        return true
                    end
                })) 
                return {
                    message = localize{type='variable',key='a_xmult',vars={card.ability.extra}},
                    Xmult_mod = card.ability.extra
                }
                end
            end
        end
}
daring fern
wintry solar
#

You’ll also need to check just the edition exists first too

tepid rock
#

and would it be this?

    loc_vars = function(self, info_queue, card)
        info_queue[#info_queue + 1] = G.P_CENTERS.e_negative
    end,
wintry solar
#

The line that is context.othwr_card.edition.key should be context.other_card.edition and context.other_card.edition.key == blablabla

tepid rock
#
    loc_vars = function(self, info_queue, card)
        return { vars = { card.ability.extra.Xmult } }
    end,
    calculate = function(self, card, context)        
        local other_joker = {}
        local other_consumeable = {}
        for i = 1, #G.jokers.cards do
            if G.jokers.cards[i] == card then other_joker = G.jokers.cards[i+1] end
        end
        for j = 1, #G.consumeable.cards do
            if G.consumeable.cards[i] == card then other_consumeable = G.jokers.card[i+1] end
        end

        if context.other_joker or context.other_consumeable then
            if context.other_card.edition and context.other_card.edition.key == 'e_negative' or context.other_card.edition and context.other_consumeable.edition.key == 'e_negative' then
                G.E_MANAGER:add_event(Event({
                    func = function()
                        context.other_joker:juice_up(0.5, 0.5)
                        context.other_consumeable:juice_up(0.5, 0.5)
                        return true
                    end
                })) 
                return {
                    message = localize{type='variable',key='a_xmult',vars={card.ability.extra}},
                    Xmult_mod = card.ability.extra
                }
                end
            end
        end
}

new error :3

#

also happens if

       local other_joker = nil
        local other_consumeable = nil
crisp coral
#

G.consumeables

tepid rock
#
    loc_vars = function(self, info_queue, card)
        return { vars = { card.ability.extra.Xmult } }
    end,
    calculate = function(self, card, context)        
        local other_joker = {}
        local other_consumeable = {}
        for i = 1, #G.jokers.cards do
            if G.jokers.cards[i] == card then other_joker = G.jokers.cards[i+1] end
        end
        for j = 1, #G.consumeables.cards do
            if G.consumeables[i] == card then other_consumeable = G.consumeables[i+1] end
        end

        if context.other_joker or context.other_consumeable then
            if context.other_card.edition and context.other_card.edition.key == 'e_negative' or context.other_consumeable.edition and context.other_consumeable.edition.key == 'e_negative' then
                G.E_MANAGER:add_event(Event({
                    func = function()
                        context.other_joker:juice_up(0.5, 0.5)
                        context.other_consumeable:juice_up(0.5, 0.5)
                        return true
                    end
                })) 
                return {
                    message = localize{type='variable',key='a_xmult',vars={card.ability.extra}},
                    Xmult_mod = card.ability.extra
                }
                end
            end
        end
}

new issue

hard needle
#

how do i get all of the cards of the played hand

tepid rock
tepid rock
unborn bay
reef belfry
#

i havent even finished the 3 jokers im planning to make and i already have 3 more in my backlog of hellish ideas

tepid rock
#

I'm trying to think of more ideas tbh

#

some i'm like "i want to make this into a joker" but idk how

unborn bay
#

i now have 9 jokers this is good pace

formal parrot
#

No one hears a word

#

They say

#

intense music

tepid rock
maiden phoenix
#

I do it in modding chat because there's more people there

tepid rock
#

mood

#
    loc_vars = function(self, info_queue, card)
        return { vars = { card.ability.extra.Xmult } }
    end,
    calculate = function(self, card, context)        
        local other_joker = {}
        local other_consumeable = {}
        for i = 1, #G.jokers.cards do
            if G.jokers.cards[i] == card then other_joker = G.jokers.cards[i+1] end
        end
        for j = 1, #G.consumeables.cards do
            if G.consumeables[i] == card then other_consumeable = G.consumeables[i+1] end
        end

        if context.other_joker == 1 or context.other_consumeable == 1 then
            if context.other_card.edition and context.other_card.edition.key == 'e_negative' or context.other_consumeable.edition and context.other_consumeable.edition.key == 'e_negative' then
                G.E_MANAGER:add_event(Event({
                    func = function()
                        context.other_joker:juice_up(0.5, 0.5)
                        context.other_consumeable:juice_up(0.5, 0.5)
                        return true
                    end
                })) 
                return {
                    message = localize{type='variable',key='a_xmult',vars={card.ability.extra}},
                    Xmult_mod = card.ability.extra
                }
                end
            end
        end
}

stopped the crashing but now it just doesnt work again

maiden phoenix
daring fern
tepid rock
tepid rock
daring fern
maiden phoenix
#

Yea also not sure why you're calling context.other_joker and context.other_consumeable

tepid rock
tepid rock
# daring fern

Egg on my face, thank you. should consumables be in there?

long urchin
#

is it possible to change the pos value of a joker during the calculate function?

#

i wanna make a joker have different forms but i dont wanna make a different joker for each version, ideally i just want it to be all in one

unborn bay
#

card.children.center.set_sprite_pos({x = x, y = y}) i think

daring fern
# tepid rock Egg on my face, thank you. should consumables be in there?

You should remove everything in your calculate function and try putting ```lua
if context.other_joker or context.other_consumeable then
if (context.other_joker.edition and context.other_joker.edition.key == 'e_negative') or (context.other_consumeable.edition and context.other_consumeable.edition.key == 'e_negative') then
return {
x_mult = 2,
card = card
}
end
end

I'm not sure if this works because I just wrote it now.
crisp coral
unborn bay
#

card.children.center.set_sprite_pos(card.children.center, {})

tepid rock
hard needle
#

is there a way to increase the amount of joker slots

daring fern
long urchin
crisp coral
#

missing .children.center

long urchin
#

oh its card.children.center:set_sprite_pos???

#

ive never seen that before

#

only card:

daring fern
cursive sentinel
#

is there anyway to stock how much dollars a player earned precisely during a blind?

#

i dont know of base game or modded jokers that do that, i don't know all mods but in case someone already knows one i could check on?

tepid rock
long urchin
tepid rock
#
    loc_vars = function(self, info_queue, card)
        return { vars = { card.ability.extra.Xmult } }
    end,
    calculate = function(self, card, context)        
        if context.other_joker or context.other_consumeable then
            if (context.other_joker.edition and context.other_joker.edition.key == 'e_negative') or (context.other_consumeable.edition and context.other_consumeable.edition.key == 'e_negative') then  
                return {
                    x_mult = 2,
                    card = card
                }
            end
        end
    end
}
daring fern
# tepid rock Idk why but its not working for me cus it says other_consumeable is nil
if context.other_joker or context.other_consumeable then
    if (context.other_joker and context.other_joker.edition and context.other_joker.edition.key == 'e_negative') or (context.other_consumeable and context.other_consumeable.edition and context.other_consumeable.edition.key == 'e_negative') then  
        return {
            x_mult = 2,
            card = card
        }
    end
end
long urchin
#

but that wouldnt account for things like spending it just sees the difference on before vs after

cursive sentinel
cursive sentinel
long urchin
#

mayhaps you could check the price when its added to your deck and then do a check at the end of each round's money screen calculation and keep adding from that

#

though i feel like theres probably a check for when money is added i feel it in my gut

cursive sentinel
#

but it wouldn"t be within a blind then?

#

i thought there would but for now i havent found it yet

long urchin
#

you could reset it each blind completion

#

theres context for blind completions

#

see what context campfire uses :V

cursive sentinel
#

there's something called "c_dollars_earned" but i dont really understand what it refers to

#

looks more like for the feedback of earned dollars for ease_dollars

long urchin
#

try doing a debug run and check it

daring fern
cursive sentinel
#

i could just take the end_of_round

#

already used it for a previous joker

long urchin
# long urchin try doing a debug run and check it

lemme provide you my debug function, it does a little action text with whatever you put in the function parenthesis. Its only in the corner cuz i dont know how to move it lmao ive tried everything

function maxx_debug(txt)
    attention_text({
        text = txt,
        scale = 1.3, 
        hold = 1.4,
        major = aura_card,
        backdrop_colour = G.C.RARITY[4],
        align = (G.STATE == G.STATES.TAROT_PACK or G.STATE == G.STATES.SPECTRAL_PACK) and 'tm' or 'cm',
        offset = {x = 0, y = (G.STATE == G.STATES.TAROT_PACK or G.STATE == G.STATES.SPECTRAL_PACK) and -0.2 or 0},
        silent = true
    })
end```
unborn bay
#

y'all don't just use print with debugplus enabled

cursive sentinel
#

how do i add it in?

long urchin
#

use this and during some kinda context put maxx_debug(c_dollars_earned)

long urchin
unborn bay
#

debugplus has a console lmao

#

any print calls are printed to it

long urchin
#

o shit what

#

thats like

cursive sentinel
long urchin
#

kinda huge news lmao

cursive sentinel
#

i have it installed but i use it like an ape

long urchin
cursive sentinel
#

only to spawn cards and jokers

#

nope

unborn bay
#

any print calls show up in your face

#

you print by print()

cursive sentinel
#

does it have to be within a section?

#

or can it be just in any context like that?

long urchin
#

just put in your code print(c_dollars_earned) whenever you wanna check it, it can go anywhere

tepid rock
unborn bay
#

Xnil mult and all it does is immediately crash your game when it's triggered

#

attempt to compare to a nil value

tepid rock
#

Ngl, need that

cursive sentinel
tepid rock
#

yes and no

daring fern
cursive sentinel
#

yeah no it's alwyas nil

tepid rock
#

Nil means nothing, 0 means lack of thing

long urchin
# tepid rock sadge

you didnt set up a values table so 'card.ability.extra.xmult' doesnt refer to anything i dont think. Try adding this mayhaps?

    config = { extra = {
            Xmult = 3
        }
    },```also in your calculate function you use x_mult and not Xmult which is different im pretty sure
#

i may be wrong tho i am very stupid

daring fern
long urchin
#

where

tepid rock
#

Still not working

 loc_vars = function(self, info_queue, center)
        return { vars = { center.ability.extra.Xmult } }
    end,
long urchin
#

i dont see it

tepid rock
#

under loc_txt

long urchin
#

ohhhhhhh

#

it wasnt indented i didnt see :b

#

my bad

primal robin
#

Can I somehow reload Steamodded mod's config page?

long urchin
daring fern
long urchin
#

oh does smods use both to mean that

#

strange

#

though i guess for good code practice you shouldnt switch it up :V

tepid rock
long urchin
#

its card.ability.extra.Xmult

#

you need to put center.ability.extra.Xmult

long urchin
#

oh i may be stupid

tepid rock
#

I am close to just putting 2 instead of proper code but i want to know how to do it yk

cursive sentinel
#

is there a context like blind_is_selected ?

daring fern
cursive sentinel
#

thank you !

long urchin
#

im looking at a guide and like i have no clue whats wrong here

limber blaze
#

show the actual localisation

long urchin
#

i dont see a difference

tepid rock
#
SMODS.Joker{
    --identifier
    key = 'xRay',
    --what it says
    loc_txt = {
        name = 'X-Ray',
        text = {
            "{X:mult,C:dark_edition} X#1# {} Mult",
            "per {C:dark_edition}negative{}"
        }
    },
    config = {extra = {Xmult = 2}},
    rarity = 3,
    --sprite location
    atlas = 'Jokers',
    pos = {x = 1, y = 0},        
    cost = 10,
    loc_vars = function(self, info_queue, center)
        return { vars = { center.ability.extra.Xmult } }
    end,
    calculate = function(self, card, context)        
        if context.other_joker or context.other_consumeable then
            if (context.other_joker and context.other_joker.edition and context.other_joker.edition.key == 'e_negative') or (context.other_consumeable and context.other_consumeable.edition and context.other_consumeable.edition.key == 'e_negative') then  
                return {
                    x_mult = 2,
                    card = card
                }
            end
        end
    end
}
limber blaze
#

loc txt might be doing something funny but i doubt it

tepid rock
#

full thing

manic rune
#

dawg

#

dont name it center

#

use card 🥀

limber blaze
#

self is the center

#

center here is an actual instance of the card

tepid rock
#

so undo this?

limber blaze
#

irrelevant change anyway since you can name it whatever you want

manic rune
#

wha

limber blaze
#

but center is just inaccurate

manic rune
#

no clue why they would tell u to do that

#

yeah

long urchin
#

ok sanity check

limber blaze
#

wait holdon

#

when youre checking if it works

#

are you going into an existing save where its already there

tepid rock
#

yes?

limber blaze
#

dont do that

long urchin
#

oh my god

limber blaze
#

card abilty values dont get reset when you change them

long urchin
#

im shitting the bed

manic rune
#

u need to spawn in that joker again

tepid rock
#

I forgot that Twt

#

thank yall

limber blaze
#

ive had this exact same issue more times than id like to admit cause i always forget

long urchin
#

i remember debugging my first joker with bepis and i did the same problem and i was ready to die when i figured it out

limber blaze
#

usually i just tend to check the collection now cause it bypasses the issue

long urchin
#

and not white

manic rune
#

aka the negative color

#

its a gradient

tepid rock
#

It is negative colour

long urchin
#

i mean the "X2" in the red background

limber blaze
#

do you like my cards

manic rune
#

oh yeah

tepid rock
#

it is negative

long urchin
#

ngl that doesnt look the best its kinda hard to read

manic rune
limber blaze
#

you cant get Xoak or flush with these

#

it is entirely a downside for a reverse spectral card

manic rune
#

it should be X:mult,C:white btw

tepid rock
#

I am aware, was experimenting cus its negative based

long urchin
unborn bay
#

half a dollar ,,,,

limber blaze
#

cryptid addon anyway so decimal money is fine

unborn bay
#

half a dollar ,,,,

manic rune
#

half a dollar

#

thats crazy 😭

long urchin
#

dawg its not effort its like

#

ok hold on

limber blaze
#

btw if the wording isnt clear this means cleansing a 7 takes 6 chips because it goes from 7 -> 1 so you get 3 dollars

unborn bay
#

i need to make more jokers tomorrow because i got 2 more new joker ideas

manic rune
#

does it synergize with hiker

unborn bay
#

im boutta hit 15 soon

#

💔

limber blaze
unborn bay
#

and im STILL not making The Nether as a boss blind for some reason

#

i could've done that earlier

#

im stupid

manic rune
#

does this work with stone cards too

limber blaze
#

for the same reason probably not yet

unborn bay
#

free 25 dollars

manic rune
#

🤑

manic rune
#

stone cards finally getting an use, crazy

limber blaze
#

1 chip stone card would be funny but ill probably just have to make it cleanse the stone enhancement too

long urchin
long urchin
tepid rock
#

thank you 🙏

long urchin
#

so

#

new question unrelated to the previous situation

#

is it possible to get a joker's pos using like their key or wtv

plain apex
#

how do i get the cards enhancement so that i can give it back

SMODS.Blind {
    loc_txt = {
        name = 'The Truth',
        text = { 'Ignores all seals, enhancements, and editions for cards' }
    },
    key = 'Truth',
    name = 'The Truth',
    config = {},
    boss = { min = 1, max = 10, hardcore = true },
    boss_colour = HEX("7f7373"),
    atlas = "BlindChips",
    pos = { x = 0, y = 2 },
    dollars = 5,

    press_play = function(self)
        G.E_MANAGER:add_event(Event({
            func = function()
                for _, card in ipairs(G.play.cards) do
                    card._truth_backup = {
                        seal = card.seal,
                        edition = card.edition,
                        ability_key = card.ability and card.ability.key
                    }

                    if card.ability then
                        card:set_ability(G.P_CENTERS.c_base)
                        card.seal = nil
                        card.edition = nil
                    end
                end
                return true
            end
        }))
        return true
    end,

    drawn_to_hand = function(self)
        for _, pile in ipairs({G.play, G.hand, G.discard}) do
            for _, card in ipairs(pile.cards) do
                if card._truth_backup then
                    local ability_key = card._truth_backup.ability_key
                    if ability_key and G.P_CENTERS[ability_key] then
                        card:set_ability(G.P_CENTERS[ability_key])
                    else
                        card:set_ability(G.P_CENTERS.c_base)
                    end
                    card.seal = card._truth_backup.seal
                    card.edition = card._truth_backup.edition
                    card._truth_backup = nil
                end
            end
        end
    end
}
daring fern
long urchin
#

no like position on the atlas

red flower
#

card.children.center.sprite_pos iirc

long urchin
#

im working on a joker that mocks other jokers but uses a different spritesheet, i wanna pull the pos and then set its pos to that since im using a spritesheet that lines up

tepid rock
# long urchin change `{X:mult, C:dark_edition}` into `{X:mult, C:negativetxt}` or `{X:mult, C:...
SMODS.Joker{
    --identifier
    key = 'xRay',
    --what it says
    G.ARGS.LOC_COLOURS['negativetxt'] == HEX("c6d7ff"),
    loc_txt = {
        name = 'X-Ray',
        text = {
            "{X:mult,C:negativetxt} X#1# {} Mult",
            "per {C:dark_edition}negative{}"
        }
    },

and

    G.ARGS.LOC_COLOURS['negativetxt'] = HEX("c6d7ff")

SMODS.Joker{
    --identifier
    key = 'xRay',
    --what it says

    loc_txt = {
        name = 'X-Ray',
        text = {
            "{X:mult,C:negativetxt} X#1# {} Mult",
            "per {C:dark_edition}negative{}"
        }
    },
tepid rock
#

did i do it wrong?

long urchin
#

i dont think so??

#

oh wait

#

its not == its just = im stupid

#

change it to one equals

tepid rock
# long urchin change it to one equals
SMODS.Joker{
    --identifier
    key = 'xRay',
    --what it says
    G.ARGS.LOC_COLOURS['negativetxt'] = HEX("c6d7ff"),
    loc_txt = {
        name = 'X-Ray',
        text = {
            "{X:mult,C:negativetxt} X#1# {} Mult",
            "per {C:dark_edition}negative{}"
        }
    },
cursive sentinel
#

i have this but moneyearned increases not only out of game blind, but also when i dont change the game dollar value (for example selecting a playing card increases it by 20), any clue why?

local moneytrack = 0

        if context.setting_blind then
            moneytrack = G.GAME.dollars
        end

        if G.GAME.blind and moneytrack ~= G.GAME.dollars then
            if moneytrack < G.GAME.dollars then
                card.ability.extra.moneyearned = card.ability.extra.moneyearned + (G.GAME.dollars-moneytrack)
                moneytrack = G.GAME.dollars
            end
            if moneytrack > G.GAME.dollars then
                moneytrack = G.GAME.dollars
            end
        end
        if context.joker_main then
            if card.ability.extra.moneyearned >= card.ability.extra.moneycap then
                return{
                    x_mod = card.ability.extra.xmult
                }
            end
        end

        if context.end_of_round then
            card.ability.extra.moneyearned = 0
        end
long urchin
#

hold on lemme like

daring fern
long urchin
#

yeah i dont know does anyone know how to set up custom text colors

#

cuz afaik this should be working

#

so i have no fucking idea

cursive sentinel
#

so from blind start to the end of round, counting the money earned, and outside ideally would shouw "0$" since not counting

primal robin
#

New technology unlocked: rerender settings page on any moment RUN

red flower
#

hmm i don't know if the logic you're doing is correct or if you can even do that inside calculate but:

  • to check if you're in a blind it's G.GAME.blind.in_blind
  • to give xmult it's xmult or x_mult not x_mod
  • context.end_of_round is going to trigger many times, you should always do context.end_of_round and context.game_over == false and context.main_eval for these kinds of effects
cursive sentinel
#

ok will do it like that and see

#

thank you!

#

ok out of blind it works

#

but within a blind it goes stupid

tepid rock
cursive sentinel
#

when i sell a joker for 2 dollars it shows 1296 or so dollars

#

and it also adds dollars when i select playing cards for obscure reasons

red flower
#

oh i just say the local moneytrack

#

i thought it was a global

cursive sentinel
#

should i set it global?

red flower
#

it will always be 0

cursive sentinel
#

why?

red flower
#

because every time calculate is called you reset it back to 0

#

you should store it in G.GAME.modprefix_moneytrack

cursive sentinel
#

should i make it a loc vars instead?

cursive sentinel
red flower
red flower
#

your mod prefix is just so it doesnt conflict

cursive sentinel
#

ok i made it a loc vars it seems to start to work

#

but there's a weird thing, on first blind it shows the total gold i have

#

and on following blind, it's the total gold i have minus the total gold i had at the end of previous round

vague helm
#

Hi! Is there an easy way to perform an action when another Joker is "triggered" (I guess we can define this as them getting "juiced up"). I thought context.other_joker would work, but that just refers to when another Joker is allowed to trigger, not necessarily when it triggers.

daring fern
long urchin
#

So after updating smods, using a patch i used in the past now gives me this error. Does anyone know why?

[manifest]
version = "1.0.0"
priority = 0


[[patches]]
[patches.pattern]
target = "card.lua"
pattern = "self.seal = cardTable.seal"
position = "after"
match_indent = true
payload = '''
self.isIjiarq  = cardTable.isIjiarq
self.visiblyIjiraq = cardTable.visiblyIjiraq
'''
times = 1

[[patches]]
[patches.pattern]
target = "card.lua"
pattern = "seal = self.seal,"
position = "after"
match_indent = true
payload = '''
isIjiarq = self.isIjiarq,
visiblyIjiraq = self.visiblyIjiraq,
'''
times = 1```
daring fern
long urchin
#

where would i do that

#

i didnt make the patch i dont know what im sposed to do 😭

daring fern
# long urchin where would i do that
local oldsave = Card.save
function Card:save()
    cardTable = oldsave(self)
    cardTable.isIjiarq = self.isIjiarq
    return cardTable
end
``` for save.
long urchin
#

in the main lua file?

daring fern
long urchin
#

ok and then where do i call the function

#

or does it just work automatically

daring fern
#

And ```lua
local oldload = Card.load
function Card:load(cardTable, other_card)
self.isIjiarq = cardTable.isIjiarq
return oldload(self, cardTable, other_card)
end

daring fern
long urchin
#

okie doke

vague helm
daring fern
long urchin
tepid rock
#

Is there a way to categorise jokers? Eg, if i had a bunch of knife jokers and wanted them all to be the same type, could I do that?

daring fern
tepid rock
daring fern
maiden phoenix
#

Paperback and Cryptid got some if you need refs

tepid rock
#

Is it in the base cryptid code? I might be blind

manic rune
#

im bad at pixel art...

tepid rock
#

Second question: is it possible to make odds like "5/6"?

manic rune
#

it is

#

pseudorandom("blah blah") < 5/6

#

thats pretty much it

tepid rock
#

Sweet. for config, would it be odds = 5/6?

manic rune
#

ye

#

it would be pseudorandom("blah blah") < card.ability.extra.odds in which case

red flower
tepid rock
#

5 in 6

red flower
#

do you want it to be affected by oops

fickle stag
#

how do I access the round number in game?

tepid rock
#

last bit before i code more: would detecting only numbered cards be
if context.other_card:get_id() == 2-10 then?

tepid rock
red flower
#

then thats a bit hard because the normal probabilities start at 1

#

you can make it like some stuff in cryptid where it goes down

daring fern
tepid rock
#

thank you

manic rune
manic rune
tepid rock
red flower
#

?

tepid rock
# red flower ?

if you meant balancing wise, its not a big deal but if you meant code wise, i dont quite get what you mean

red flower
#

i mean code-wise, G.GAME.probabilities.normal starts at 1

formal parrot
#

If you’re making one

red flower
formal parrot
#

Otherwise it looks cute

#

Slay

manic rune
#

or at least, the template i got has that border

#

it does seem to be working normally though

formal parrot
#

Yeah it does

#

That’s not what i meant

formal parrot
#

You see every joker in the base game usually has an outline of gray of 1 pixel and another one with 2pixel usually white

manic rune
#

huh

daring fern
formal parrot
#

@manic rune

manic rune
#

well damn

red flower
manic rune
#

blame the template, not me :p

formal parrot
#

I’m not blaming you cutie

tepid rock
red flower
#

10 in 6

formal parrot
#

Also your corners DONT have to be round

#

You can make them flat if you want to

#

It’s a matter of preference

#

Your art us amazing good luck

tepid rock
red flower
#

yeah

manic rune
#

the joker combusts if its above 6 in 6

red flower
#

if you want to make it 6 in 6 you can do the 4 + G.GAME.probabilities.normal thing

tepid rock
#

looks cleaner that way imo

red flower
#

but then it would go to 8 with 2 oops

manic rune
#

does the 2px thick border look better than the 1px one

red flower
#

im still very proud of the borders i made for my mod

manic rune
#

wat border

red flower
#

look at em

manic rune
#

i dont remember there being one

#

OHHH

#

that

#

yeah it looks clean

#

do u intend to do anything with the arrows of link monsters?

red flower
#

probably not but maybe

tepid rock
#
    config = {extra = { mult = 5, odds = 5/6, repetitions = 1}},
    rarity = 2,
    --sprite location
    atlas = 'Jokers',
    pos = {x = 0, y = 0},
    cost = 4,
    loc_vars = function(self, info_queue, card)
        return { vars = { card.ability.extra.mult, (4 + G.GAME.probabilities.normal), card.ability.extra.odds } }
    end,
    calculate = function(self, card, context)
        if context.individual and context.cardarea == G.play then
            if not context.other_card:is_face() then
                mult_mod = card.ability.extra.mult
                if pseudorandom('vinyl') < card.ability.extra.odds then
                    return {
                        message = 'Again!',
                        repetitions = card.ability.extra.repetitions,
                        -- The card the repetitions are applying to is context.other_card
                        card = context.other_card
                    }

not the joker the odds will be put on (tho this one will have odds too) but does this look right?

red flower
tepid rock
#

if not a face

manic rune
red flower
tepid rock
red flower
tepid rock
#

cus odds are 5/6 in config

red flower
#

then the odds would be fixed

tepid rock
#

I see what you mean, changed it to what you said

red flower
tepid rock
#

what I am getting

    loc_vars = function(self, info_queue, card)
        return { vars = { card.ability.extra.mult, (G.GAME.probabilities.normal), card.ability.extra.odds } }
    end,
    calculate = function(self, card, context)
        if context.individual and context.cardarea == G.play then
            if not context.other_card:is_face() then
                mult_mod = card.ability.extra.mult
                if pseudorandom('vinyl') < (4 + G.GAME.probabilities.normal)/card.ability.extra.odds then
                    return {
                        message = 'Again!',
                        repetitions = card.ability.extra.repetitions,
                        -- The card the repetitions are applying to is context.other_card
                        card = context.other_card
                    }
                end
            end
        end
    end
}```
red flower
tepid rock
#

as in 6 + or smth else?

#

wait, i am dumb

#

forgot odds is a variable

#

All good

red flower
manic rune
tepid rock
#

cus i didnt finish the description

manic rune
#

FINALLY SOMETHING EASY TO DRAW

#

🙏

faint yacht
#

(G.GAME and G.GAME.probabilities.normal or 1) * 3 could work.

manic rune
#

they want the joker to start at 5/6 though

faint yacht
#

* 5, then.

red flower
#

but that would make it 10 lol

manic rune
#

they want it to go to 6/6 when u have oa6 :p

tepid rock
#

I am a pain :3

manic rune
#

but honestly, it would be pretty weird

since oa6 says it doubles all probabilities

red flower
#

why are people doubting my solution : (

tepid rock
#
    loc_vars = function(self, info_queue, card)
        return { vars = { card.ability.extra.mult, (4+ G.GAME.probabilities.normal), card.ability.extra.odds } }
    end,
    calculate = function(self, card, context)
        if context.individual and context.cardarea == G.play then
            if not context.other_card:is_face() then
                mult_mod = card.ability.extra.mult
                if pseudorandom('vinyl') < card.ability.extra.odds then
                    return {
                        message = 'Again!',
                        repetitions = card.ability.extra.repetitions,
                        -- The card the repetitions are applying to is context.other_card
                        card = context.other_card
                    }
                end
                
            end
        end
    end
}

it aint repeating the cards

manic rune
#

The Soultion

Creates a Legendary N'

long urchin
#

how do i modify the last value of a table value?

manic rune
tepid rock
red flower
faint yacht
#

pseudorandom("vinyl") < G.GAME.probabilities.normal/card.ability.extra.odds 💀

tepid rock
#

What would that do?

faint yacht
#

It accounts for increased probability when doing the calculation.

faint yacht
#

Also, is it extra retriggers for non-face cards?

tepid rock
#

one extra yes

faint yacht
tepid rock
#

it is gonna be 1 in 10 but another joker im making is 5 in 6 so two bird, one stone debuggin

runic pecan
#

Just found another classic Thunk moment:

#

Either that or there's some lua technic/tip/shenanigan I haven't learned yet.

red flower
#

i dont think so lol

tepid rock
# red flower you need to use context.repetition
    loc_vars = function(self, info_queue, card)
        return { vars = { card.ability.extra.mult, (4+ G.GAME.probabilities.normal), card.ability.extra.odds } }
    end,
    calculate = function(self, card, context)
        if context.individual and context.cardarea == G.play then
            if not context.other_card:is_face() then
                mult_mod = card.ability.extra.mult
                if pseudorandom('vinyl') < card.ability.extra.odds then
                    if context.cardarea == G.play and context.repetition and not context.repetition_only then
                        return {
                            message = 'Again!',
                            repetitions = card.ability.extra.repetitions,
                            -- The card the repetitions are applying to is context.other_card
                            card = context.other_card
                        }
                    end
                end
                
            end
        end
    end
}

this isnt working nor is if context.repition then

tepid rock
glad osprey
#

all of them

runic pecan
glad osprey
runic pecan
glad osprey
#

-# or if not a or b idk how this shit works

red flower
faint yacht
glad osprey
#

i love stealing the style of peoples nicknames

tepid rock
red flower
#

no, replace the entire calculate with that

long urchin
#

how does the card:set_sprites function work?

cursive sentinel
#

hi quick question, i have a message supposed to appear under my joker (like upgrade things) but it gets instead under the blueprint, and when i had the not context.blueprint the effect just doesn't happen

glad osprey
#

show

#

whats happening

tepid rock
red flower
# tepid rock Thank you, it just isnt doing mult now. Is that a different calc?
if context.repetition and context.cardarea == G.play then
    if not context.other_card:is_face() then
        if pseudorandom('vinyl') < (4 + G.GAME.probabilities.normal) / card.ability.extra.odds then
            return {
                repetitions = card.ability.extra.repetitions,
            }
        end
    end
end
if context.individual and context.cardarea == G.play then
    if not context.other_card:is_face() then
        return {
            mult = card.ability.extra.mult
        }
    end
end
cursive sentinel
#
local spe = 0
            if card.ability.extra.moneyearned >= card.ability.extra.moneycap then
                spe = spe + 1
                if spe == 1 then
                    return{
                        message = 'EFFECT',
                        colour = G.C.MONEY,
                        card = card
                    }
                end
            end```
daring fern
cursive sentinel
#

no, the entire is:

#
if context.setting_blind then
            card.ability.extra.moneytrack = G.GAME.dollars
            card.ability.extra.moneyearned = 0
        end

        if G.GAME.blind.in_blind and card.ability.extra.moneytrack ~= G.GAME.dollars then
            if card.ability.extra.moneytrack < G.GAME.dollars then
                card.ability.extra.moneyearned = card.ability.extra.moneyearned + (G.GAME.dollars - card.ability.extra.moneytrack)
                card.ability.extra.moneytrack = G.GAME.dollars
            end
            
            if card.ability.extra.moneytrack > G.GAME.dollars then
                card.ability.extra.moneytrack = G.GAME.dollars
            end
            local spe = 0
            if card.ability.extra.moneyearned >= card.ability.extra.moneycap then
                spe = spe + 1
                if spe == 1 then
                    return{
                        message = 'EFFECT',
                        colour = G.C.MONEY,
                        card = card
                    }
                end
            end
        end

        if not context.blueprint then
            if card.ability.extra.moneyearned >= card.ability.extra.moneycap then
                local eval = function(card) return (card.ability.extra.moneyearned >= card.ability.extra.moneycap) end
                juice_card_until(card, eval, true)
            end
        end

        if context.joker_main then
            if card.ability.extra.moneyearned >= card.ability.extra.moneycap then
                return{
                    xmult = card.ability.extra.xmult
                }
            end
        end

        if context.end_of_round and context.game_over == false and context.main_eval then
            card.ability.extra.moneyearned = 0
        end```
#

within the calculate

#

when i put the return in the if with the jiggle effect, the messages shows on the right spot but

#

repeats on loop and i dont know to stop it

#

wether i put it before or after the local eval

glad osprey
cursive sentinel
#

x4 when player has earned 10 dollars at least during the blind

#

the effect itself functions

#

it's just the message popping that is wrong for now

#

when there is a blueprint

#

without blueprint it works just well

glad osprey
#

add not context.blueprint to the tracking context

cursive sentinel
#

already tried

glad osprey
#

blueprint should only be copying the actual xmult part

cursive sentinel
#

the effect doesnt show at all

long urchin
#

how does grabbing card sprite positions work? i tried local posx = card.config.center.sprite_pos.x but it said that sprite_pos was a nil value

cursive sentinel
#

tried again just now, effect doesnt show

red flower
long urchin
#

card.children.center.sprite_pos.x?

red flower
#

yeah

glad osprey
cursive sentinel
#

oh and now i just noticed my jiggle adds on itself

glad osprey
#

so like the first line until the joker main

cursive sentinel
#

okay

glad osprey
#

also you don't need to define the card for messages

#

it should just default to the og card

#

also also it's message_card for messages

tepid rock
#
    loc_vars = function(self, info_queue, card)
        return { vars = {(4+ G.GAME.probabilities.normal), card.ability.extra.odds } }
    end,
    calc_dollar_bonus = function(self, card)
        if context.setting_blind then
            if context.repetition and context.cardarea == G.play then
                if pseudorandom('cd') < (4 + G.GAME.probabilities.normal) / card.ability.extra.odds then
                    local bonus = card.ability.extra.money
                    if bonus > 0 then return bonus end
                end
            end
        end
    end
#

hopefully a quick one

cursive sentinel
glad osprey
glad osprey
cursive sentinel
#

instead of card = card?

glad osprey
#

ya

cursive sentinel
#

ok, also an idea on why the jiggle effect would add into itself?

wintry solar
#

card = card doesn’t do anything at all

cursive sentinel
tepid rock
# glad osprey there is no context in calc dollar bonus
calc_dollar_bonus = function(self, card, context)
        if context.setting_blind then
            if context.repetition and context.cardarea == G.play then
                if pseudorandom('cd') < (4 + G.GAME.probabilities.normal) / card.ability.extra.odds then
                    local bonus = card.ability.extra.money
                    if bonus > 0 then return bonus end
                end
            end
        end
    end
``` changed to this and still got the error
glad osprey
glad osprey
cursive sentinel
#

ok now works well

tepid rock
glad osprey
#

yes

cursive sentinel
#

putting it all into the no context blueprint fixed also the juice

tepid rock
#

so would it be calculate = function?

glad osprey
#

you just return how much money you wanna give

glad osprey
tepid rock
#

easy, thank you

long urchin
#

how do you hide a card from collection view

glad osprey
#

iirc

long urchin
#

ty

cursive sentinel
#

or plays multiple times on itself

#

is rly weird

glad osprey
cursive sentinel
#

how do i?

glad osprey
#

add config that turns true when you juice it up

#

then check if that is true

#

then set it to false when you reset the money earned

opal holly
#

it's done

cursive sentinel
#

im not sure i understand ^^;

long urchin
#

how do i flip over a card

glad osprey
long urchin
#

is it card:flip() or self:flip()

glad osprey
#

card

#

always card

cursive sentinel
glad osprey
#

Basically set a variable that won't allow you to juice it up after you juice it up

cursive sentinel
#

ahh so i put an if as a condition of the juice

#

okok

glad osprey
#

yes

cursive sentinel
#

will try that thanks

glad osprey
#

Just make sure you reset the var when the juice up condition is false

hard needle
#

Is it possible to check whether a joker has a certain edition

glad osprey
#

and also make sure it's part of the config and not a local var

glad osprey
hard needle
tepid rock
#
    calculate = function(self, card, context)
        if context.setting_blind then
            if context.repetition and context.cardarea == G.play then
                if pseudorandom('cd') < (4 + G.GAME.probabilities.normal) / card.ability.extra.odds then
                    ease_dollars(card.ability.extra.dollars)
                    G.GAME.dollar_buffer = (G.GAME.dollar_buffer or 0) + card.ability.extra.dollars
                    G.E_MANAGER:add_event(Event({func = (function() G.GAME.dollar_buffer = 0; return true end)}))
                    return {
                        message = localize('$')..card.ability.extra.dollars,
                        dollars = card.ability.extra.dollars,
                        colour = G.C.MONEY
                    }
                end
            end
        end
    end

not giving money (using oops to guarantee it)

glad osprey
#

calc just let's you set how much

red flower
glad osprey
#

if you want it to give money like golden joker

red flower
#

also you dont need both ease_dollars and return { dollars =

tepid rock
#

so would that be a calc in a calc

glad osprey
#

no

lavish lake
#

How to draw planet cards?

glad osprey
#

separate funcs

tepid rock
tepid rock
glad osprey
cursive sentinel
# glad osprey Just make sure you reset the var when the juice up condition is false

Doing it like this makes the jiggle not happening (on context.end_of_round i set shake back to 0)

if card.ability.extra.moneyearned >= card.ability.extra.moneycap and shake == 0 then
                local eval = function(card) return (card.ability.extra.moneyearned >= card.ability.extra.moneycap) end
                juice_card_until(card, eval, true)
                shake = 1
            end```
glad osprey
tepid rock
#

5 in 6 chance for $10

#

at start of blind

red flower
glad osprey
#

just if setting_blind then
check probability
return {dollars = 4}

#

calc_dollars is just for giving money during cashout

tepid rock
#

oh, gotcha

glad osprey
tepid rock
cursive sentinel
#

its in config and not in loc vars

tepid rock
#

cus that aint working

red flower
glad osprey
#

you don't need context.rep

glad osprey
#

it's supposed to be card.ability.extra.shake

#

not just shake :4

cursive sentinel
#

ah so i put it in loc vars?

glad osprey
#

No

#

in config

cursive sentinel
#

in config i name it shake but then call it c.a.e.shake?

#

will work?

glad osprey
#

{extra = {shake = false}}

cursive sentinel
#

alright!

glad osprey
#

also you can have bools in config

tepid rock
# red flower remove if context.repetition and context.cardarea == G.play then

thank you. wouldnt possibly know how to fix this?

    loc_txt = {
        name = 'CD',
        text = {
            "{C:green}#1# in #2#{} chance earn",
            "{C:money}$#3#{} at end of round"
        }
    },
    config = {extra = {odds = 6, money = 10}},
    rarity = 1,
    --sprite location
    atlas = 'Jokers',
    pos = {x = 0, y = 0},
    cost = 4,
    loc_vars = function(self, info_queue, card)
        return { vars = {(4+ G.GAME.probabilities.normal), card.ability.extra.odds } }
    end,
glad osprey
#

you ar only returning prob and odds

#

lol

tepid rock
#

so would it be {C:money}$#2#{} at end of round?

cursive sentinel
glad osprey
#

how the hell do people do this every day

tepid rock
#

painfully

glad osprey
south lintel
#

how do I check if a joker is or is not in my lineup? I made a joker that loses or gains value if I have it in the shop and I don't want it to do that

glad osprey
#

you need to add smth to the return func in loc vars

red flower
maiden phoenix
red flower
glad osprey
#

we really need to pay teachers more im just now realizing

glad osprey
#

this is almost worse than customer service lmao

tepid rock
# glad osprey you need to add smth to the return func in loc vars
     loc_txt = {
        name = 'CD',
        text = {
            "{C:green}#1# in #2#{} chance earn",
            "{C:money}$#3#{} at end of round"
        }
    },
    config = {extra = {odds = 6, money = 10}},
    rarity = 1,
    --sprite location
    atlas = 'Jokers',
    pos = {x = 0, y = 0},
    cost = 4,
    loc_vars = function(self, info_queue, card)
        return { vars = {(4+ G.GAME.probabilities.normal), card.ability.extra.odds, money = 10 } }
    end,
tepid rock
wintry solar
cursive sentinel
# glad osprey ya

The effect doesnt play as is

if card.ability.extra.moneyearned >= card.ability.extra.moneycap and card.ability.extra.shake == false then
                local eval = function(card) return (card.ability.extra.moneyearned >= card.ability.extra.moneycap) end
                juice_card_until(card, eval, true)
                card.ability.extra.shake = true
            end

            if context.end_of_round and context.game_over == false and context.main_eval then
                card.ability.extra.moneyearned = 0
                if card.ability.extra.shake == true then
                    card.ability.extra.shake = false
                end
            end```
wintry solar
#

At least the kids generally listen

glad osprey
tepid rock
#

what kids are you around?

tepid rock
wintry solar
#

I teach 10/11 year olds

glad osprey
#

not money = 10

tepid rock
#

gotcha, misclock

glad osprey
#

me when i missed my clock

tepid rock
#

teach primary school

vague helm
#

I will thank but not apologize for asking questions. 🙂 Got 30 / 34 Jokers implemented by RTFM. That said, I don't think that this behavior is possible. Then again, I didn't know that custom sorting was possible. Thoughts?

tepid rock
glad osprey
lavish lake
daring fern
#

How do I make a seal say different things if it's on a playing card or a joker?

glad osprey
glad osprey
glad osprey
#

ah

#

understandable

tepid rock
glad osprey
#

look at how cryptid does it for its stickers

#

they have different text depending on if they are on a joker or pack

cursive sentinel
vague helm
radiant hearth
#

hi how to get started with modding

vague helm
maiden phoenix
shell timber
#

oh you could probably do that?

glad osprey
shell timber
#

but it would be very incompatible

red flower
radiant hearth
glad osprey
vague helm
#

Let's pretend for a second that the capability was rephrased to say "Jokers placed before this one are triggered before hand is scored". Let's forget the implications for the gameplay. Is this something that is remotely reasonable to do?

radiant hearth
#

thats okay, you have made a balatro mod ?

shell timber
#

that'd be even harder to add

glad osprey
#

also i was joking about the dont

radiant hearth
#

can you send link ?

vague helm
glad osprey
#

and check how it does cards then jokers

vague helm
# wintry solar What does this even mean?

For example, if Green Joker was before this, it would add Green Joker's mult before scoring the hand. So, if you have something like Photograph, it would also XMult that base mult instead of adding the base mult at the end.

glad osprey
#

if your lucky they are two seperate funcs that you could be swapped around

#

i doubt they are tho

wintry solar
#

So you just want the joker main of the left jokers to happen before the playing cards are evaluated?

vague helm
red flower
#

isnt it in evaluate_play

cursive sentinel
wintry solar
#

I mean it’s not going to be easy to do and it will cause countless bugs for other jokers, but I suppose it’s doable

shell timber
#

yeah this effect would have to mess with evaluate play to the point where it becomes incompatible with a bunch of other mods

glad osprey
red flower
cursive sentinel
#

oh right

glad osprey
#

also you prob dont have to do the shake

cursive sentinel
#

design wise?

glad osprey
#

ya

cursive sentinel
#

cuz loyalty card does so i just thought as a conditional mult joker i could

glad osprey
#

similar things like card sharp or dusk dont

cursive sentinel
#

although acrobat doesnt, so you're maybe right

glad osprey
#

yea it seems very inconsistant

cursive sentinel
#

welp i'll stick with the proc effect, you're right

#

thank you a lot for your help !

glad osprey
#

ill be here all day

#

regrettably

vague helm
shell timber
#

you could do this by patching the spawn playing card method

#

if the source is from the shop

glad osprey
#

yea

#

look at how death copys cards too

vague helm
#

As I think this through, perhaps it'd be better, and it's certainly easier, to rewrite as "Each shop contains a copy of a random card from your deck"

wintry solar
#

By each shop you mean every time you reroll?

vague helm
#

Let's bookmark that for a second. I wanted to revisit something else. I'm assuming it's not too hard to make custom jokers include reference to other types of cards like we have here with "Gold Card"?

vague helm
vague helm
glad osprey
#

loc_vars

vague helm
#

Exactly what I needed. Thank you!

tall wharf
#

am i stupid

#

i fucking laughed at my own joke

glad osprey
#

yes

#

question how do i make a joker become another joker

daring fern
glad osprey
#

coolio

#

and now, i am become helper, destroyer of bugs

tall wharf
glad osprey
#

crazy

#

someone already answered

vague helm
tall wharf
#

sorry

#

cabnt hel;p

glad osprey
#

also idk how to ref stickers either

cyan lagoon
#

question how do i check if played hand has only one suit without it being a flush?

glad osprey
#

go through each card and see if its suit matches the first one checked

#

then just if poker hand ~= flush

cyan lagoon
#

yea,

#

how do i do that?

#

i got the ~= flush part

#

the other i've been at it for like 5 hours

cyan lagoon
#

no

#

pait, two pair, 3oak with every card of the same suit

#

like that

tall wharf
#

so like

#

if the same suit appears on 5 cards or more it's a flush

#

so you want flush but less than 5 cards

#

idk

#

i think you just not next(context.poker_hands['Flush'])

glad osprey
#
 if (function ()
            local test = G.play.cards[1].suit--[[i dont remember how to access the suits change that to the correct thing]]
            for _,card in ipairs(G.play.cards) do
                
                if card.suit ~= test then return false end
                
                
            end
            return true
        end)()
south lintel
#

why doesn't this work? I want the joker to trigger on buying something when it is in my joker area, but it also triggers when I buy it, and I don't want it to do that, and I thought the ~= self would fix that

tall wharf
#

wait so

#

it's gonna be so hard to activate

glad osprey
#

also make sure thats the correct index

south lintel
cyan lagoon
glad osprey
#

idk tho i cant look rn

tall wharf
tall wharf
#

i think it activates when buying self

#

only self

tall wharf
#

idk

south lintel
tall wharf
#

i was gonna say hook to some button click stuff

south lintel
cyan lagoon
tall wharf
#

ok apparently i am stupid

cyan lagoon
vague helm
# glad osprey something to do with localization files

Very close. I added this to the localization file:

, Custom = { c_food = { name = 'Food Joker', text = { 'Test test test' } } }

Then:

info_queue[#info_queue+1] = { key = 'c_food', set = 'Custom' }

Problem: Title loads, but text doesn't

tall wharf
#

™️

#

or put everything in Other

glad osprey
tall wharf
#

ok i am not being helpful ill leave this chat as it is

vague helm
hushed field
tall wharf
#

because

glad osprey
#

localthunk

tall wharf
#

the code doesn't actually show it

glad osprey
#

always blame localthunk