#💻・modding-dev

1 messages · Page 355 of 1

brazen tusk
#

is_doctor = true

#

i think

#

or mb

brisk rose
#

config = {extra = {is_doctor = true}}

shut crater
#

config = { extra = { mult = 10, is_doctor = true } }
(Or yeah is there a reason it has to go in config?)

brazen tusk
#

in the config extra

brisk rose
#

or something

brazen tusk
#

yeah

#

¯_(ツ)_/¯

#

either works i tihnk

brisk rose
brazen tusk
#

did in fact not work

sleek cliff
#

so soemthing like this?

shut crater
#

I only ask because stickers like eternal and perishable are just variables on card.ability

sleek cliff
#

gotta move the is_doctor tho

shut crater
#

if context.other_card.ability.extra.is_doctor then

sleek cliff
#

oh yeh

shut crater
#

You are no longer checking the key

brazen tusk
#

is doctor a joker or

shut crater
#

Also in general the yellow underline is worth paying attention to

shut crater
#

Like from doctor who

brazen tusk
#

ohh

#

ok you probably dont want it as other_card context then right?

sleek cliff
#

it's for a doctor who related mod

shut crater
#

Oh right

#

So context.other_joker

brazen tusk
#

yeah

shut crater
#

Right?

brazen tusk
#

p sure

brisk rose
hollow sphinx
#

using this joker to create a negative hash brown joker at the end of round, works entirely without the negative part if i remove ".edition.negative" so all i need is the correct way to actually make it negative

brisk rose
#

they already have places on the joker object

brisk rose
sleek cliff
brisk rose
faint yacht
sleek cliff
thorn flame
#

my friend said this would be more balanced if it also added a random edition

#

i disagree

sleek cliff
#

I'll test and see how it goes

faint yacht
sleek cliff
#

okaaaaay, still nothing

faint yacht
sleek cliff
#

ohhhh

daring fern
sleek cliff
daring fern
sleek cliff
#

ah oki

#

Ayyyy now it works

brazen tusk
#

ok im at the point where i think the context isnt right

sleek cliff
faint yacht
#

Actually, wait.

brazen tusk
#

oh

#

its bc im checking id not key

faint yacht
#

The get_id returns a number...

brazen tusk
#

yeahhh

#

hm

#

would i just change it to context.other_card.key?

faint yacht
#

You'd probably want to store the .key to the .currentrank/.newrank variables whilst using .id in the check...

faint yacht
brazen tusk
#

i have no idea how id do either

faint yacht
#

Replace context.other_card:get_id() == card.ability.extra.currentrank with SMODS.Ranks[context.other_card.base.value].key == card.ability.extra.currentrank?

brazen tusk
#

would i be able to just do SMODS.Rank ==

manic rune
#

is add_to_deck triggered when a joker is duplicated through ctrl + D?

faint yacht
#

SMODS.Ranks is a table.

#

SMODS.change_base uses it too.

faint yacht
#

...what's that exact line in the Mods/lovely/dump/card.lua?

brazen tusk
#

oh thats related to flipping now, means the context is working

#

gonna comment those out for now

faint yacht
#

:flip(), by the way.

brazen tusk
#

ahh that'll do it ty

#

the rank changing works!!

#

tyvm

faint yacht
#

🤝

drowsy kelp
#

First time modder here, following the artmuncher video tutorial now

is there a method for coding cards that each have their own individual sprite file? The tutorial doesn’t seem to be doing it that way unless I’m mistaken

#

Been looking at the layout and files of the Cardsauce mod and their main.lua is completely different

faint yacht
#

...do you mean splitting by type of card or per-card splitting?

#

Like joker.lua, spectral.lua...?

brazen tusk
#

i mean you just put the sprite name in the atlas right?

brisk rose
#

and the pos would always be 0,0

faint yacht
drowsy kelp
#

oh man the beginner’s anxiety is already kicking in aaa 😅

brisk rose
#

which you really don't have to do

#

i mean you can do it any way

brazen tusk
#

just depends why you want that really

brisk rose
#

yeah it helps a lot for adding more things i'm sure

#

like especially if you also have the jokers on a per-file basis

#

you can in theou just drop in the new joker lua and image png and not have to touch anything

drowsy kelp
#

So you would more recommend having all of the joker assets on one sheet?

#

It’s hard to figure out exactly since the video tutorial only uses one as a demo

brazen tusk
#

i personally find it easier to do that

brisk rose
faint yacht
#

It's like storing tools individually in boxes vs. storing a bunch of them in one large toolbox.

drowsy kelp
#

makes sense, especially if I’m just starting out with the basics

brazen tusk
#

this is what mine looks like rn, when i make a new joker i just make the file longer and add the jokers atlas key to the atlas

#

quite intuitive once you have it set up

drowsy kelp
brisk rose
#

so you're gonna have to use more rows at some point

brazen tusk
brisk rose
#

at least i've been told such

#

but it's like.... a lot more than what you have

brazen tusk
#

my current idea is just go along the x axis and use the 2nd row for soul sprites

brisk rose
#

just look at how wide the all-in jest atlas is and stop there, lol

brazen tusk
#

i'll keep going till it stops working smh

#

they get auto assigned x coord values based on atlas key

brisk rose
#

so no need to worry for some time

brazen tusk
#

i dont plan on have an absurd amount so

#

should be alr

#

at most ill have to add a second index for a new row

brisk rose
#

the idea of writing a list of my jokers by hand and mainting it sounds worse than the actual coding ngl

brazen tusk
#

i just add the key to the end of that list when i add a new one, not much effort

#

and having the jokers file name decoupled from its keys means i can change the order they appear in the collection super easy

brisk rose
#

I'm not the type of raccoon to pace myself

brazen tusk
#

which is smth i care about

brazen tusk
#

bc i just load my whole jokers folder so whichever appears first alphanumerically shows up first in the collection, it isnt pretty but this is what i have rn lol

cursive sentinel
#

hi, quick question, i want a message to appear on context.other_card which does (using card_eval_text) although it appears under the card instead of above; any idea on why?

daring heron
#

How would i replace the current high contrast colors with different colors? Made this and i kinda wanna make it into a mod haha

#

If its not possible i’ll just make it a texture pack

brisk rose
#

the thing i said to name like the keys was using individual pngs

#

because that way you can make the atlas objects with a loop

brazen tusk
#

oh right mb

frigid blaze
#

Can you tell me how to delete some cards in SMODS.Deck?

brisk rose
#

from this and the original i mean

#

it isn possible to do, lemme look at smth

#

oh yeah i think bunco adds a third coloring option

#

'emhamced contrast'

#

might wanna do smth like that

daring heron
#

wait it does?

brisk rose
daring heron
#

oh i didnt know

daring fern
#

brisk rose
daring heron
#

fair

#

i mean im not planning on making it have a gradient

#

and this is more like "okay colors still look nice and are still easily destinguishable"

#

idunno i just dont like the colors on high contrast

brisk rose
frigid blaze
#

I want to create my own deck that would not have 2,3,4,5,6 in it, please tell me how to do it correctly.

daring heron
brisk rose
#

that's a joke, i have no idea but i'[d halp if i did

#

deck code is kinda a pain

brazen tusk
#

delay doesnt appear to be doing anything, i dont see the card backs for even a millisecond

brazen tusk
#

i have never used events

frigid blaze
daring fern
brisk rose
true glen
#

Who's cat is this

brisk rose
brazen tusk
daring fern
brazen tusk
#

😔

daring fern
frigid blaze
daring fern
brisk rose
#

there don't need to be special functions for decks

brisk rose
frigid blaze
brisk rose
#

@daring fern they just want a deck without those ranks

#

i think it's in_pool actually, right?

#

like make it return false for those ids?

daring fern
brazen tusk
#

better i think lol

brisk rose
brazen tusk
#

can't be this difficult to just flip a card ;-;

faint yacht
brisk rose
#

function combine(key1, key2)
    local combined = temp_profile.joker_usage[key1]
        local doner =  temp_profile.joker_usage[key2]

    local orig_order = combined.order


    for e, r in pairs(doner) do
        if type(e) == "number" then 
        if not combined[e] then combined[e] = 0 end
         combined[e] = combined[e] + r
         end
end


    for e,r in pairs (doner) do
        if type(e) == "table" then
                           if not combined[e] then combined[e] = r
            end
            if combined[e] ~= r then
                for t, y in pairs(e) do
                        if not combined.e[t] then combined.e[t] = 0 end
                        if type(t) == "number" then combined.e[t] = combined.e[t] + y
                        end
                end
            end
        end
    end
    combined.order = orig_order
return combined
end
                                
        
combine("j_mf_couponcatalogue", "j_mf_coupon_catalogue")```

so now that this is actual real lua, can anyone help me figure out why it doesn't appear to do anything?
#

it's meant to be evaled in the debugplus console and combine the given 2 entries in the profile table so that the stats for the joker are reflected accurately

brazen tusk
#

yknow what i dont need delays on my flips, this'll do for now

brisk rose
spark remnant
#

I have a joker that does essentially the same thing as mr bones, how do I stop them from both activating if you have them both?

daring fern
spark remnant
spark remnant
#

ok

cunning barn
#

how do you add priority to a mod? is it in the json file or the lua? im using the example smods mods for bases for my jokers but they dont have a bit about priority anywhere

daring fern
cunning barn
#

alright thanks much! im gonna see if i can get the mod running now i know that

#

alright im getting the atlas working. do the key and path have to be the same?

cunning barn
#

I FINALLY GOT MY FIRST JOKER UP AND RUNNING
it was like the most basic +chips/mult thing but i don't care, JOKESTAR RUNNER IS ALIVE

toxic flicker
#

HOW THE FUCK

#

DO I GET

#

A JOKER

#

TO GIVE A RANDOM ENHANCEMENT AND SEAL

#

TO A CARD

#

BEFORE SCORING

#

IM GONNA LOSE IT

#

THERE IS NO DOCUMENTATION

#

AHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH

#

how do you guys figure this stuff out

#

where do u get the information

daring fern
toxic flicker
#

what does that mean 😭

#

look where

subtle hawk
toxic flicker
#

i loook

#

but i cant figure it outttttt

#

lemme look again

#

which file yall use?

daring fern
subtle hawk
#

Jokers are in card.lua i think?

toxic flicker
#

oho k

daring fern
toxic flicker
#

so ima just yoink this

cunning barn
#

ok now i got my first crash

#

added a second joker and the atlas just randomly doesn't work anymore. it worked perfectly when i only had one joker. when i add a second it dies

#

after i get this fixed highkey im just goin 2 bed its like 5AM but im up off a combination fo a new medication and hype for actually getting a Balatro mod working

#

on the bright side i do think the joker itself is gonna work im just having some issues with atlas

cunning barn
brisk rose
#
INFO - [G] Table:
order: 289
losses: Table:
  1: 7

losses_by_key: Table:
  stake_white: 7

bunco_loaded: true
count: 93
wins: Table:
  1: 2

wins_by_key: Table:
  stake_white: 2

 
INFO - [G] < nil 
INFO - [G] > eval  print(G.PROFILES[1].joker_usage.j_mf_couponcatalogue) 
INFO - [G] Table:
order: 338
losses: Table:
  2: 1
  1: 6

losses_by_key: Table:
  stake_white: 6
  stake_red: 1

bunco_loaded: true
count: 573
wins: Table:
  2: 5
  1: 19

wins_by_key: Table:
  stake_white: 19
  stake_red: 5

 
INFO - [G] < nil 
INFO - [G] > eval temp_profile = G.PROFILES[1]

function combine(key1, key2)
    combined = temp_profile.joker_usage[key1]
        local doner =  temp_profile.joker_usage[key2]

    local orig_order = combined.order


    for e, r in pairs(doner) do
        if type(r) == "number" then 
        if not combined[e] then combined[e] = 0 end
         combined[e] = combined[e] + r
         end
end


    for e,r in pairs (doner) do
        if type(r) == "table" then
                           if not combined[e] then combined[e] = r
            end
            if combined[e] ~= r then
                for t, y in pairs(r) do
                        if not combined[e][t] then combined[e][t] = 0 end
                        if type(y) == "number" then combined[e][t] = combined[e][t] + y
                        end
                end
            end
        end
    end
    combined.order = orig_order
return combined
end
                                
        
combine("j_mf_coupon_catalogue", "j_mf_couponcatalogue") 
INFO - [G] < nil 
INFO - [G] > eval print(G.PROFILES[1].joker_usage.j_mf_coupon_catalogue) 
INFO - [G] Table:
order: 289
losses: Table:
  2: 1
  1: 13

losses_by_key: Table:
  stake_white: 13
  stake_red: 1

bunco_loaded: true
count: 666
wins: Table:
  2: 5
  1: 21

wins_by_key: Table:
  stake_white: 21
  stake_red: 5

 
INFO - [G] < nil ```

@rough furnace I think I got it working
cunning barn
#

heres both of my atlas stats and the atlas at the top. PLEASE tell me this is an easily fixable issue, its like 5AM and im getting tired

brisk rose
#

function combine(key1, key2)
    combined = temp_profile.joker_usage[key1]
        local doner =  temp_profile.joker_usage[key2]

    local orig_order = combined.order


    for e, r in pairs(doner) do
        if type(r) == "number" then 
        if not combined[e] then combined[e] = 0 end
         combined[e] = combined[e] + r
         end
end


    for e,r in pairs (doner) do
        if type(r) == "table" then
                           if not combined[e] then combined[e] = r
            end
            if combined[e] ~= r then
                for t, y in pairs(r) do
                        if not combined[e][t] then combined[e][t] = 0 end
                        if type(y) == "number" then combined[e][t] = combined[e][t] + y
                        end
                end
            end
        end
    end
    combined.order = orig_order
return combined
end
                                
        
combine("j_mf_coupon_catalogue", "j_mf_couponcatalogue")```

here's the code I ended up with

```order: 289
losses: Table:
  1: 7

losses_by_key: Table:
  stake_white: 7

bunco_loaded: true
count: 93
wins: Table:
  1: 2

wins_by_key: Table:
  stake_white: 2

The original entry for the new key

losses: Table:
  2: 1
  1: 6

losses_by_key: Table:
  stake_white: 6
  stake_red: 1

bunco_loaded: true
count: 573
wins: Table:
  2: 5
  1: 19

wins_by_key: Table:
  stake_white: 19
  stake_red: 5

the original entry for the old key

losses: Table:
  2: 1
  1: 13

losses_by_key: Table:
  stake_white: 13
  stake_red: 1

bunco_loaded: true
count: 666
wins: Table:
  2: 5
  1: 21

wins_by_key: Table:
  stake_white: 21
  stake_red: 5

and the new combined entry on the new key

drowsy kelp
#

first three joker drafts are done (if you can guess the theme you're very subjectively cool)

weary haven
#

i recognise 2 of those jokers arts i think

cunning barn
#

oh wait yeah that'd do it

weary haven
#

last one is obra dinn

drowsy kelp
#

I’m not great at sprite art so I started with ones that were easy to recreate or assemble from the original assets

cunning barn
#

it. its a mkv it wont play

#

whatever just download it im too tired to re-export

floral flicker
#

does somone know how can i make my joker always go to righmost position. Like the Ceremonial Dagger in the 'On a Knife's edge' challenge whos goes always to the leftmost position.

floral flicker
daring fern
brisk rose
# brisk rose ayyy

what I think would be cool is a BetterStats mod, that shows 2 pages of all the card stats and a lot more of the other valuesstored on the profile

runic pecan
#

Is it "the number it lands" or "the number it lands on"?

brisk rose
runic pecan
runic pecan
# brisk rose

I suggest you to make a global function, do the counting inside, and then call it in debug console.

brisk rose
#

notepad because i'm on windows atm and am a lazy fuck

brisk rose
#

lol

#

I just eval'd that whole thing

cunning barn
#

wow ngl im kinda good at the coding thing actually. i've gotten one crash and it's from something being case sensitive.
granted im just kinda fishing through vanilla joker implementations and fiddlign with the numbers rn but it's something

cyan lagoon
#

what's overstock's key?

#

i do v_overstock and the game crashes

brisk rose
#

I mean all the jokers in the whole game

runic pecan
red flower
#

also G.P_CENTER_POOLS.Joker

#

and there are pools for each rarity too

runic pecan
#

Ah, right, G.P_JOKER_RARITY_POOLS, almost forget about that one.

runic pecan
# brisk rose

So the answer you need would be eval #G.P_JOKER_RARITY_POOLS[(rarity)].

cyan lagoon
#

am i doing this right? cause it's not really doing anything

#

i want to remove jokers and consumables from the shop but keep vouchers and boosters in my challenge

cursive sentinel
#

is there a way to call a precise poker hand without the other hands that include it?

#

or do i have to manually exclude the others?

brisk rose
runic pecan
brisk rose
manic rune
cursive sentinel
#

like trigger on two pair and not full house

cursive sentinel
brisk rose
runic pecan
red flower
#

oh yeah what bepis said then

cursive sentinel
cursive sentinel
runic pecan
red flower
cursive sentinel
#

return had the same issue

red flower
#

in which context

cursive sentinel
#

in a context from when i hook / patch playing card (not necessarily when playing, the type "playing card") destroy

#
if context.sdr1_cardtryingtobedestroyed then
            if not context.other_card.seal then
                local seals = {}
                for k, v in pairs(G.P_SEALS) do
                    table.insert(seals, k)
                end
                context.other_card:set_seal(pseudorandom_element(seals, pseudoseed('seal')))
            end
            return{
                message = 'Transmutation!',
                colour = G.C.MULT,
                message_card = context.other_card
            }
            --card_eval_status_text(context.other_card, 'extra', nil, nil, nil, { message = 'Transmutation!', colour = G.C.MULT })
        end
#

and weirdly also the seal appear before the effect takes place (like visually the seal appear but not yet used (which is fine for functionality, but idk how to not have the seal appear before))

red flower
#

hmm im not sure how to specify where the attention text goes

cursive sentinel
#

bcs of the trigger after?

cyan lagoon
brisk rose
#

because this shit was not hard

runic pecan
cyan lagoon
#

well... how do i detect entering the shop to do that?

runic pecan
red flower
#

(just guessing by looking at the change shop size code)

manic rune
#

CardArea:change_size is cursed

#

im never touching that shi again 🥀

#

negative trauma

red flower
#

lol

#

i think i only use it for the hand size

#

for the rest i modify the limit directly

#

although..

cyan lagoon
manic rune
cyan lagoon
red flower
#

the problem might be that that function is too early?

#

have you tried doing change_shop_size in an event?

cyan lagoon
#

yep

cyan lagoon
#

in an event, yes

#

like overstock

daring heron
#

can you put multiple names in author?

cyan lagoon
#

yea

red flower
# cyan lagoon

this seems to call Game:start_run in an event
maybe try hooking that instead?

cyan lagoon
#

crash on launch

red flower
#

self instead of e

unborn bay
#

another day another coder falling for a crash due to lack of self

cyan lagoon
daring heron
#

how would i make a joker that gives x2 chips but gets destroyed after 5 rounds?

brisk rose
# cyan lagoon

I'm... confused by how this code is causing that error

#

is it when you try to start the run?

#

or on boot?

cyan lagoon
#

on boot

brisk rose
cyan lagoon
brisk rose
#

wait... aren't you erasing the rest of the function?

#

you don't seem to be retyping or returinng it

#

isn't that how hooks work?

cyan lagoon
#

i dunno how they work either, but 'return
ret' should be it

red flower
cyan lagoon
#

gimme a moment

red flower
cyan lagoon
#

works! yipee!

#

thank you

#

now, one last (<- lying) thing, what's overstock's key?

red flower
cyan lagoon
#

of course it had to be weird and quirky

brisk rose
#

from an export of my profile

daring heron
#

does anyone know how i can make a joker that gives x2 chips but gets destroyed after 5 rounds?

brisk rose
#

I've redeemed it 132 times, lol

cyan lagoon
brisk rose
#

always

cyan lagoon
brisk rose
daring heron
#

this is what i have rn

    calculate = function(self, card, context)
        if context.after and context.main_eval and not context.blueprint then
            if card.ability.extra.chips - card.ability.extra.chip_mod <= 0 then
                G.E_MANAGER:add_event(Event({
                    func = function()
                        play_sound('tarot1')
                        card.T.r = -0.2
                        card:juice_up(0.3, 0.4)
                        card.states.drag.is = true
                        card.children.center.pinch.x = true
                        G.E_MANAGER:add_event(Event({
                            trigger = 'after',
                            delay = 0.3,
                            blockable = false,
                            func = function()
                                G.jokers:remove_card(card)
                                card:remove()
                                card = nil
                                return true
                            end
                        }))
                        return true
                    end
                }))
                return {
                    message = localize('k_Extinct!_ex'),
                    colour = G.C.FILTER
                }
            else
                card.ability.extra.chips = card.ability.extra.chips - card.ability.extra.chip_mod
                return {
                    message = localize { type = 'variable', key = 'a_chips_minus', vars = { card.ability.extra.chip_mod } },
                    colour = G.C.CHIPS
                }
            end
        end
        if context.joker_main then
            return {
                chips = card.ability.extra.chips
            }
        end
    end
}

(just a retexture of ice cream rn)

red flower
cyan lagoon
red flower
#

"XChips" doesn't work but "xchips" does

daring heron
#

yeah i just need to figure out where

#

and how to make it not give less chips per hand

red flower
#

you want to replace after with end_of_round if you want it each round

runic pecan
daring heron
#

like this?

red flower
#

no

#

card.ability.extra.xchips = card.ability.extra.xchips - card.ability.extra.xchip_mod

xchips = card.ability.extra.xchips

daring heron
#
calculate = function(self, card, context)
        if context.end_of_round and context.main_eval and not context.blueprint then
            if card.ability.extra.chips - card.ability.extra.chip_mod <= 0 then
                G.E_MANAGER:add_event(Event({
                    func = function()
                        play_sound("tarot1")
                        card.T.r = -0.2
                        card:juice_up(0.3, 0.4)
                        card.states.drag.is = true
                        card.children.center.pinch.x = true
                        G.E_MANAGER:add_event(Event({
                            trigger = "end_of_round",
                            delay = 0.3,
                            blockable = false,
                            func = function()
                                G.jokers:remove_card(card)
                                card:remove()
                                card = nil
                                return true
                            end
                        }))
                        return true
                    end
                }))
                return {
                    message = localize("k_Extinct!_ex"),
                    colour = G.C.FILTER
                }
            else
                card.ability.extra.xchips = card.ability.extra.xchips - card.ability.extra.xchip_mod
                return {
                    message = localize { type = "variable", key = "a_chips_minus", vars = { card.ability.extra.chip_mod } },
                    colour = G.C.CHIPS
                }
            end
        end
        if context.joker_main then
            return {
                xchips = card.ability.extra.xchips
            }
        end
    end
}
``` like this?
red flower
#

yes

daring heron
#

how do i make it not decrease chips tho

red flower
#

oh i read how to make it give

#

delete the entire thing after the else

daring heron
#
    calculate = function(self, card, context)
        if context.end_of_round and context.main_eval and not context.blueprint then
            if card.ability.extra.chips - card.ability.extra.chip_mod <= 0 then
                G.E_MANAGER:add_event(Event({
                    func = function()
                        play_sound("tarot1")
                        card.T.r = -0.2
                        card:juice_up(0.3, 0.4)
                        card.states.drag.is = true
                        card.children.center.pinch.x = true
                        G.E_MANAGER:add_event(Event({
                            trigger = "end_of_round",
                            delay = 0.3,
                            blockable = false,
                            func = function()
                                G.jokers:remove_card(card)
                                card:remove()
                                card = nil
                                return true
                            end
                        }))
                        return true
                    end
                }))
                return {
                    message = localize("k_Extinct!_ex"),
                    colour = G.C.FILTER
                }
            else
            end
        end
        if context.joker_main then
            return {
                xchips = card.ability.extra.xchips
            }
        end
    end
}
``` like this?
red flower
#

yes but also delete the else

#

now you need to change if card.ability.extra.chips - card.ability.extra.chip_mod <= 0 then to your counter logic

#

also are you adding "k_Extinct!_ex"?

#

because the key is k_extinct_ex

daring heron
#

thats just the message for when it breaks after 5 rounds

red flower
#

that wasnt my question :3

daring heron
#

oh

#

thx

#

btw it doesnt do anything rn

red flower
#

did you add xchips to the config?

daring heron
#

hm?

#

like the atlas?

red flower
#

have you made a joker before

daring heron
#

barely 😔

red flower
#

you know how the things in card.ability.extra have to be initialized in config.extra

#

that

daring heron
#

where do i add it then?

red flower
daring heron
#

like this?

red flower
#

yes

daring heron
#

still doesnt work

red flower
#

what doesn't work

daring heron
#

it doesnt trigger

red flower
#

did you restart a run

stiff locust
#

how difficult is it to make achievements

daring heron
karmic arch
#

MoreFluff has, just take it from morefluff

stiff locust
#

i've been ⭐ 'd

#

it's so over

daring heron
#

how tf did i misclick from literally like 5cm away

#

i didnt even touch my mouse

#

😭

worthy stirrup
#

How can i force a joker to always be a certain edition?

stiff locust
karmic arch
#

Cryptid has)

stiff locust
#

set_ability is run when the joker is first spawned

worthy stirrup
#

okay

#

ill check it out

stiff locust
#

that includes when it appears in packs and the shop

#

i think that'll also set its edition like that in the collection

#

the edition can technically still be removed but i doubt you're trying to make an edition generator so set_ability is fine

karmic arch
#

hmm, I wonder if it is possible to make it so editions with set_ability, and when add_to_deck is taken away

red flower
#

it should be

worthy stirrup
#

when should Set ablity be ran?

stiff locust
#

it's like the calculate function

#

you put it inside the joker code

worthy stirrup
#

for me its saying unknown global

stiff locust
#
set_ability = function(self, card, initial, delay_sprites)
---set edition here
end,
worthy stirrup
#

nvm, i made a typo

#

and i was trying to do a python

stiff locust
#

happens

worthy stirrup
#

like this?

  set_ability = function(self, card, initial, delay_sprites)
    Card:set_edition(hiss, true, true)
  end,
#

because the effect isnt showing up in the collection

#

or do i include its prefix?

daring heron
#
calculate = function(self, card, context)
        if context.end_of_round and context.main_eval and not context.blueprint then
            if card.ability.extra.chips - card.ability.extra.chip_mod <= 0 then
                G.E_MANAGER:add_event(Event({
                    func = function()
                        play_sound("tarot1")
                        card.T.r = -0.2
                        card:juice_up(0.3, 0.4)
                        card.states.drag.is = true
                        card.children.center.pinch.x = true
                        G.E_MANAGER:add_event(Event({
                            trigger = "end_of_round",
                            delay = 0.3,
                            blockable = false,
                            func = function()
                                G.jokers:remove_card(card)
                                card:remove()
                                card = nil
                                return true
                            end
                        }))
                        return true
                    end
                }))
                return {
                    message = localize("k_extinct_ex"),
                    colour = G.C.FILTER
                }
            end
        end
        if context.joker_main then
            return {
                xchips = card.ability.extra.xchips
            }
        end
    end
}
``` works but crashes after it calculates, also is there any code here that's unnecesary
red flower
stiff locust
#

if it's a modded edition then it should be "e_modprefix_negative"

worthy stirrup
#

ah okay

daring heron
#

hm?

worthy stirrup
#

i fixed it but now it crashes

  set_ability = function(self, card, initial, delay_sprites)
    card:set_edition("e_CTRL_hiss", true, true)
  end,
stiff locust
#

it's a set_edition thing idk

worthy stirrup
#

fair

stiff locust
#

:set_edition({ negative = true }, nil) this is how I do it apparently? try that method

daring heron
#

what would the counter logic be?

#

like, that it destroys itself after 5 rounds?

red flower
#

yes

#

it counts the rounds and then when if counter >= 5 (pseudocode, do not use) you destroy it

daring heron
#

so what should i change?

red flower
#

the problem here is that if i tell you then i just made your whole joker for you lol

daring heron
#

fair enough

red flower
#

look at how popcorn decreases mult and change that to increase a counter

manic rune
red flower
#

both should work

manic rune
#

like, if its using a table then is it possible to add more than one edition 🤔

red flower
manic rune
#

o

manic rune
#

rip

#

quantum edition when

worthy stirrup
#

it seems to be the shader probably

daring heron
#

problem being i have no idea what to put where

brisk rose
manic rune
#

-# except they dont work

brisk rose
#

Like... as in they make the game crash by existing broken

manic rune
#

broken in two meanings, literally

brisk rose
#

So there's no way to disambiguate

red flower
#

chat is this hand hard to make (ignore the description)

manic rune
#

wh

#

what hand is that??

#

😭

#

honestly, not too hard except for the negative playing card

brisk rose
red flower
#

it's a gold card with gold seal, holo stone, negative, red seal with an unscored bonus

manic rune
#

😭

#

is the unscored part necessary??

red flower
#

yes

manic rune
#

thats so fucked up

#

i love it

daring heron
#

could anyone help me on how i can make my joker destroy itself after 5 rounds?

manic rune
#

use context.end_of_round to increase a value

#

then when its at a certain value, use :start_dissolve()

maiden phoenix
manic rune
#

oh, i actually just remembered that you can have :start_dissolve() effect colored

floral flicker
#

Someone know how i can make a joker stay on the rightmost position ?

manic rune
#

🤔

daring heron
manic rune
maiden phoenix
manic rune
#

oh yeah, use context.main_eval too, or it might trigger more than 1 time

daring heron
manic rune
#

yeah yeah that

worthy stirrup
manic rune
#

:3

daring heron
#

so do i put it instead of context.end_of_round?

manic rune
#

not instead, you put your code inside that block

worthy stirrup
#

it works when i turn disable_base_shader = true, to false

#

but then that causes the shader to not do anything

daring heron
#

so like this?

manic rune
#
if context.end_of_round and context.main_eval and not context.blueprint and not context.retrigger_joker then
  card.ability.extra.elapsed_round = card.ability.extra.elapsed_round + 1
  if card.ability.extra.elapsed_round >= 5 then
    --the event + card:start_dissolve()
  end
end

you probably want to do something like that

manic rune
daring heron
#

is that a problem?

daring fern
manic rune
#

🤔 idk, depends on whether you want the retrigger to affect the speed of the joker being destroyed i guess?

daring heron
#

i dont

manic rune
#

yeah, add that then

manic rune
#

and theres no context.end_of_round there, too

manic rune
daring heron
#

fair

manic rune
daring heron
#

so like this?

manic rune
#

i

#

wheres your context.main_eval now

#

🥀

daring heron
#

up there

daring fern
# daring heron up there

if context.end_of_round and context.main_eval and not context.blueprint and not context.retrigger_joker

daring heron
#

like this?

manic rune
#

yes

#

dont forget to add elapsed_round = 0 to config extra too

#

-# and remember to spawn that joker again, if you already have it in a run

daring heron
#

do i need multiple configs or just add it to the one i have

cyan lagoon
#

yes

manic rune
#

add it to the one you already have

daring fern
#

daring heron
#

like this?

cyan lagoon
#

put it next to xchips

manic rune
#

you could always add your own context if none fits the timing :p

daring fern
cyan lagoon
#

can someone tell me why this no workie

daring heron
#

like this?

cyan lagoon
#

yes

daring heron
#

it still crashes

daring fern
cyan lagoon
daring fern
daring heron
daring fern
daring heron
#

which one?

daring fern
daring heron
#

top one of the whole joker?

daring fern
daring heron
#

works now but it does it after 1 round and it doesnt get to the next round

daring heron
#
calculate = function(self, card, context)
        if context.end_of_round and context.main_eval and not context.blueprint then
                G.E_MANAGER:add_event(Event({
                    func = function()
                        play_sound("tarot1")
                        card.T.r = -0.2
                        card:juice_up(0.3, 0.4)
                        card.states.drag.is = true
                        card.children.center.pinch.x = true
                        G.E_MANAGER:add_event(Event({
                            trigger = "end_of_round",
                            delay = 0.3,
                            blockable = false,
                            func = function()
                                G.jokers:remove_card(card)
                                card:remove()
                                card = nil
                                return true
                            end
                        }))
                        return true
                    end
                }))
                return {
                    message = localize("k_extinct_ex"),
                    colour = G.C.FILTER
                }
            end

        if context.end_of_round and context.main_eval and not context.blueprint and not context.retrigger_joker then
            card.ability.extra.elapsed_round = card.ability.extra.elapsed_round + 1
                if card.ability.extra.elapsed_round >= 5 then

                end
        end

        if context.joker_main then
            return {
                xchips = card.ability.extra.xchips
            }
        end
    end
}
daring fern
manic rune
#

the destroy code works unconditionally

daring fern
daring fern
daring heron
#

it doesnt show the message anymore now

manic rune
#

you still need to manually add the message

daring heron
#

mb yeah

daring fern
manic rune
#

alak

#

yeah, do what somethingcom said

daring heron
#

i mean this works

red flower
#

does it?

daring heron
#

it does

manic rune
#

that works?

daring heron
#

nvm it doesnt lol

#

mb

manic rune
#

yeah, it only works when you are returning that

#

i suggest going with somethingcom's approach instead

daring heron
#

how do i make the description be "x2 chips for (however many rounds left) rounds"?

#

and like, make it update

#

as in, however many rounds until it destroys itself

manic rune
#

loc vars

daring heron
#

how do i do that?

quartz ravine
#

Hi all, what's that funciton we call to proc a random message from a joker? I woke up and can't remember what it's called and can't find it in my own jokers!

manic rune
quartz ravine
manic rune
gilded narwhal
#

Guys does retriggering a joker also retrigger it's edition

manic rune
#

nope afaik

daring heron
#

it doesnt

gilded narwhal
#

Okay phew

quartz ravine
#

@daring heron

This card has 6 uses, store under its card.ability.remaining

loc_txt = {
        ['name'] = 'Fickle Fox',
        ['text'] = {
            [1] = '{C:attention}Applies gold seal randomly to cards played',
            [2] = 'Has a {C:green}#1# in #2#{} chance to bless',
            [3] = 'Has a {C:green}#1# in #3#{} chance to vanish with the wind',
            [4] = 'Flees after 6 seals applied, {C:red}#4# seals remaining ',
        }
    },
    loc_vars = function(self, info_queue, card)
        info_queue[#info_queue + 1] = { key = "artistcredit", set = "Other", vars = { "Linzra" } }
        info_queue[#info_queue + 1] = G.P_CENTERS.m_gold
        return { vars = { G.GAME.probabilities.normal, card.ability.oddsToBless, card.ability.oddsToFlee, card.ability.remaining } }
    end,

See line 4 in it's loc_txt. It is taking in a variable.

loc_vars is where you send vars into loc_txt

quartz ravine
manic rune
#

ahhh

daring heron
#

can i replace that with this?

#

or do i still need this

manic rune
#

just add card.ability.extra.elapsed_round in there

quartz ravine
#

Ah, it was card_eval_status_text I was thinking of

manic rune
#

they should work the same, so you can use either

bold gyro
#

Hey y'all, is it possible to add an extra blind to an Ante using something like the opposite of G.GAME.round_resets.blind_states.Small = 'Hide', or would I have to build the UI and stuff from scratch?

manic rune
#

i remember a mod adding an extra blind to the ante

#

uhh

#

one sec

daring heron
#

it doesnt display the number of rounds left

#

changed it to destroy if <= 0, starts at 5 and -1 each round so itd look good in the game

bold gyro
#

I think it's because there's a missing } after C:attention

manic rune
daring heron
quartz ravine
#

Hey guys, anyone know what this object is?

The deck object shown in the Deck Collection list, and also shown when you're playing the game

manic rune
#

is that obelisk the tormentor

daring heron
#

works now exept for that it just says "message" when it gets destroyed

#

which is a problem on my part

#

somehow didnt see this 😭

manic rune
#

🥀

cyan lagoon
#

how can i make a joker use an effect of other joker if it has it's key

quartz ravine
daring heron
#

how can i make it so it says rounds in the description if its more than 1 and round if its 1?

cyan lagoon
#

look at this

quartz ravine
#

I love this little baby

#

these are two jokers of which I am most satisfied

daring heron
manic rune
daring heron
#

does anyone know how?

#

tried making it a loc_vars but i don't know how i could set it to either round or rounds

red flower
#

change rounds to #4# (or the number it should be) and add elapsed_rounds == 1 and 'round' or 'rounds' to loc_vars

bold gyro
manic rune
#

ahh i see

red flower
#

does this make sense

daring heron
#

like this?

red flower
manic rune
#

-# seriously though, i think its clear enough personally

red flower
#

good

quartz ravine
#

I think it makes sense as well!

#

Bye guys see you later

red flower
#

i will have it as a note at the bottom in the examples

manic rune
#

te N'

runic pecan
#

Has anyone done the "Suit convert Tarot cards in your consumeable area give X1.5 Mult for their specified suit if played hand contains a Flush" voucher idea? Like "Observatory" but suits?

daring heron
#

like this?

red flower
#

it should be card.ability.extra.elapsed_rounds

manic rune
daring heron
#

like this?

#

it doesnt display nil anymore but it doesnt display round either

red flower
#

oh it's elapsed_round without the s sorry

daring heron
#

that's okay dw

runic pecan
#

I need wording and naming advice.

#

no-suit cards will be represented by The Tower, and all-suit cards The Lover.

red flower
#

should probably be "most common suit"

brisk rose
#

it worked perfect

#

after a lot of tweaks

potent drift
#

a

brisk rose
potent drift
#

whuh

brisk rose
#

sorrry

#

wrong @

brisk rose
potent drift
#

xd

rough furnace
#

Ok

brisk rose
#

i swear his name was highlighted when i pushed enter

#

lmfaoo

potent drift
#

lmfao i don’t care it’s good

manic rune
#

debug

potent drift
#

yes i have a very generic name

#

-# it’s a long story

manic rune
#

does fit your pfp really well though

runic pecan
manic rune
#

i should really try out holotro

#

the mod looks insanely cool

runic pecan
daring heron
#

so if i have multiple of my joker at the same round number it destroys them all instantly instead of 1 for 1, how do i change that?

#

i want it to destroy them 1 for 1 instead

red flower
#

do it in an event?

daring heron
#

hm?

runic pecan
daring heron
#

what event type should i make it

#

delay?

runic pecan
manic rune
#

honestly either before or after with delay should work just fine 🤔

daring heron
#

like this?

runic pecan
manic rune
#

i was wondering where the event was

#

🥀

wheat pulsar
#

hi i have a problem detecting stone cards or idk whats the problem

runic pecan
daring heron
#

yeah

manic rune
red flower
#
G.E_MANAGER:add_event(Event({
    func = function()
        card:start_dissolve()
        return true
    end
}))
red flower
daring heron
#

where do i put that?

red flower
manic rune
#

oh yeah, just noticed

wheat pulsar
shut crater
red flower
shell timber
#

also, you can just return xmult = card.ability.extra.x_mult, you don't need all of the Xmult_mod and message stuff

red flower
# wheat pulsar

oh ok thats different, then yeah use context.before and loop through context.full_hand

#

or scoring_hand

daring heron
#

what's the sound called that gros michel uses when it goes extinct?

red flower
#

tarot1

hallow relic
#

Is there a context for probabilities similarly to the likes of Business Card or Reserved Parking?

daring heron
#

how do i play a sound again, i forgot 😔

shut crater
daring heron
#

nvm found it

#

i think

runic pecan
shut crater
hallow relic
runic pecan
hallow relic
#

Is there a way to change the base probability to make an unusual probability stat like "4 in 1003 chance"?

shut crater
shut crater
#

Also you're calling has_enhancement twice

hallow relic
wheat pulsar
runic pecan
# wheat pulsar like this?

SMODS.has_enhancement(v, 'm_stone')
Although that would make your joker "gain X0.25 mult for each Stone Card you played"

shut crater
shut crater
#

Because the way to do those is different and your current code is halfway between them

#

Mmk so you probably do want to be using context.individual and context.other_card instead of the loop

#

Unless you really need this effect to be in context.before

runic pecan
shut crater
#

Mmmm true

#

Well

wheat pulsar
#

what exactly do context.before, im new in this modding

shut crater
#

Not necessarily because doesn't context.individual get run for unscored cards as well?

#

Whatever, the current effect is fine

runic pecan
shut crater
#

context.before is before scoring. There are a couple contexts for different moments during scoring. context.after is for after scoring, etc

shut crater
#

And then there are contexts for when the round starts or ends, when a card is destroyed, etc

shut crater
runic pecan
shut crater
#

Cause I haven't looked into that

red flower
shut crater
#

I thought that context only existed if you enabled it or something

red flower
#

i think it did at the very beginning but it's not performance heavy so it didn't make sense

wheat pulsar
#

in the moment the joker do a weird stuff, first work with all cards no only with stone cards and later it multiplies like exponentially

#

when i play first stone card give the multiplier, then any card y play give the mult

runic pecan
#

Do we have a "Show us your code" emote or something on this channel?

wheat pulsar
runic pecan
# wheat pulsar

So, G.playing_cards is your full deck, but according to our previous conversation, I assume what you need should be context.full_hand.

runic pecan
# wheat pulsar

Also I'd recommend you using for _,v in ipairs(context.full_hand) do in this case.

#

pairs iterates through table, and ipairs iterates through list.

quartz ravine
#

Hi folks, has anyone successfully epplied a shader or edition to the G.deck object?

I see that it is definted in Globals as a CardArea type, so I might have a lot of heavy lifting to make this work.

brisk rose
#

print(G.PROFILES[1].voucher_usage.v_betm_vouchers_collector)
print(G.PROFILES[1].voucher_usage.v_collector)

for i,v in pairs(temp_profile.voucher_usage) do
    if string.find(i,"v_betm_vouchers") then
        old_key = "v_"..string.sub(i, 17)
        if temp_profile.voucher_usage[old_key] then
            v.count = v.count + temp_profile.voucher_usage[old_key].count
        end
    end
end

print(G.PROFILES[1].voucher_usage.v_betm_vouchers_collector)
print(G.PROFILES[1].voucher_usage.v_collector)
``` ayyy got another thing working, to account for the fact that betmma couchers used to not have a prefix due to how they were added (I think the mod predates smods.voucher)
shut crater
#

There's a 5% chance I either hallucinated or misunderstood what was being shown

quartz ravine
#

Trying to call draw_shader on the G.deck.cards[1].back or config doesn't seem to work.

Amusingly this actually sets polychrome on the top card in your deck

G.deck.cards[1]:set_edition('e_holo')

shut crater
modern kindle
#

im like hey whats up hello chat happywave

quartz ravine
#

Hi Dilster

shut crater
modern kindle
#

hey fox, i hope all is well

quartz ravine
#

I want to apply a shader to the back of the card I have a cool shader I love and want this special deck to have it applied

shut crater
#

But my experience in this arena is actually less than negative infinity

quartz ravine
wheat pulsar
shut crater
#

G.playing_cards is every playing card the player owns

runic pecan
shut crater
#

So by using that, it's checking the player's whole deck for a stone card

#

Which is not right

quartz ravine
#

I dumped out the full table of my G.cards[1] object, to see where the sprite is set. If there is a sprite, shaders are apply-able (like skew, when you move your mouse over it).

Meaning I can apply a shader to it! Now what will happen when 52 cards are running a shader on their front and back?

wheat pulsar
shut crater
#

So hopefully only the backs will be getting rendered

brisk rose
shut crater
#

I only vaguely understand what you're doing

brisk rose
#

But I think you can load my profile back into a jkr file

#

Before I made these changes

#

Or I could just send the jkr

#

Yeah that's allowdd

shut crater
#

Oh I just meant like how there's profiles 1 2 and 3

#

I wasn't sure if your stats carried over between them

#

Nvm, I'm probably misunderstanding what you're doing

brisk rose
rough furnace
shut crater
#

No idea, I've only used it in the context of balatro modding

brisk rose
shut crater
#

I come from a unity background

rough furnace
#

Love is more so a framework and not an engine

brisk rose
rough furnace
#

Balatro's ui system is written entirely by thunk

shut crater
brisk rose
#

so it can't mess it up

rough furnace
brisk rose
#

i keep it backed up anyway

wheat pulsar
#

so contex.full_hand is when the hand that i play?

rough furnace
brisk rose
#

so i didn't have to reload the game to reload my profile

#

(or force reload in colsole)

#

I did restard the game and do them again anyway, with the commands that save it, just because

brisk rose
wheat pulsar
#

last question, when the joker is x1 it show in the game x1, is any form to not show this message? only when >1

runic pecan
brisk rose
shut crater
#

Oh ok, I thought you were saying you weren't able to test it because they weren't showing up in collection

brisk rose
faint yacht
brisk rose
shut crater
#

But yeah not sure which they mean

brisk rose
wheat pulsar
brisk rose
#

ah yeah the pop-up

wheat pulsar
faint yacht
#

Can be condensed to just

return { x_mult = card.ability.extra.x_mult > 1 and card.ability.extra.x_mult }
#

-# Adjust the .extra.x_mult to what you have assigned.

valid dove
#

does anybody know exactly how the context.check_enhancement works? i have code to send a traceMessage as soon it enters the context but my traceMessage never gets sent from my testing. not during playing the hand nor when i add an enhancement

faint yacht
alpine briar
#

Stupid question for those who make mods, but is it legal for me to access the source code and use it for myself? I've never modded anything before lmao

brazen tusk
#

Yes

#

As long as you don’t post it anywhere

daring heron
#

wait how do i destroy cards like gros michel? (it flips them instead of burning)

rough furnace
#

Idk look at the code

#

I think it's manual

alpine briar
daring heron
#

is it remove_card(self)?

red flower
#

it's the entire event

rough furnace
#

Is G.jokers:remove(card) nessicsary?

#

I thought card:remove handled that

shut crater
valid dove
red flower
valid dove
rough furnace
shut crater
#

I'm usually on mobile so I never see the context menu

#

That's good to know

valid dove
rough furnace
#

I've never used that context menu before

shut crater
#

I guess I should say I've never tried clicking a line of code on mobile so it's never changed the url

daring heron
#

so, how do i make it flip?

#

tried this but that didnt work

valid dove
shut crater
#

I've heard of quantum enhancements but I've never seen how they're used

#

That's neat

valid dove
#

yeah it's actually really simple now. very cool however

worthy stirrup
#

The shader it self isn't crashing, but when the card tries to apply Hissing to it self it causes a crash.
I think its work nothing that It works when i turn

disable_base_shader = true,
```to false
main path
#

chat why does my antivirus have a stroke while making a mod

daring heron
#

so how do i make a card flip instead of burn whilst being destroyed? this doesnt work

shut crater
#

Actually how does Cavendish disappear...?

worthy stirrup
#

it doesnt flip

#

it just goes extinct

shut crater
#

But doesn't it shrink out of existence?

daring heron
#

i mean it kinda gets squished idunno

worthy stirrup
#

I would look at X-ray challenges code

daring heron
rough furnace
#

That's the card.T part you didn't copy from above iirc

worthy stirrup
#

I dont think its the shader causing it, the game can render the shader without a crash

red flower
#

you missed the rest of the event

worthy stirrup
#

but when its applied with the set_ablity, it crashes

daring heron
worthy stirrup
worthy stirrup
#

oh, mb

#

if you ever get the chance to look, just tell me :3

daring heron
#

how do i make the message not play sound?

#

(i forgor)

shut crater
#

remove the line that says play_sound?

daring heron
#

no that's not the message sound

shut crater
#

mmm maybe in the args of calculate_effect you can do sound = nil?

#

idk if the return table is the same for that as it is for calculate

red flower
#

it is

daring heron
#

this doesnt work sadly

shut crater
#

it would need to be the same table

#

{message = "Eaten!", sound = nil}

daring heron
#

still doesnt work

shut crater
#

one last idea, try sound = ''

#

this might cause a crash

worthy stirrup
#

this mod making me go mad, idk why my game crashes when im trying to apply the effect to a card

shut crater
#

if it does then I think the only way to have no sound be played is to create a sound effect that's just silence

red flower
#

or volume = 0

shut crater
#

this is why they pay you the big bucks

#

people that aren't me are so smart

daring heron
#

still doesnt work sadly

#

i mean, it works

#

but it delays the code

shut crater
#

I think that's inevitable with the calculate_effect function

red flower
#

just return the message instead of using calculate_effect

modern kindle
#

hi n

worthy stirrup
#

How can i make it so it applies to a random joker?

  calculate = function(self, card, context)
    if context.ending_shop then
      card = G.jokers[math.random(#G.jokers)]
      card:set_edition( {CTRL_hiss = true}, true, true)
    end
  end
}
faint yacht
#
if context.ending_shop then
  pseudorandom_element(G.jokers.cards, pseudoseed('insertseedhere')):set_edition('e_CTRL_hiss', true, true)
end

?

broken cliff
#

Doesn't math.random take in 2 arguments?

faint yacht
#

-# It's not advised to use math.random for gameplay, anyway.

hardy viper
#

0, 1, or 2

worthy stirrup
#

oh

hardy viper
#

random float [0,1), random int [0, n1], random int [n1, n2]

red flower
modern kindle
#

how are you faring my friend

red flower
#

im ok

#

wbu

worthy stirrup
#

oh, it seems to apply the effect, but its seemly not affecting the appearnce of my joker?

red flower
daring heron
#

also why doesnt this put a space between X2 and mult?

red flower
#

{X:...} doesn't allow spaces

#

put it after the {}

acoustic briar
#

hello!! just popping into the server to ask: how do i alter the sprite for playing cards? not suits, but specifically the blank sprite they're overlaid onto. from what i can tell, the actual sprite itself is located in the decks/enhancers sprite sheet and i've altered that.

however, malverk doesn't seem to be changing anything despite successfully altering both deck and enhancer sprites, and the source code of the mods i've looked at that do change the playing card sprite haven't been informative as to what line of code does the job

wintry solar
acoustic briar
#

yup

wintry solar
#

Add this anywhere

local keys_table = Malverk.keys.Enhanced
table.insert(keys_table, "c_base")

And add this in the enhancement alttexture

keys = keys_table,
original_pos = true

That should work

acoustic briar
#

ah!! tysm!!

#

it worked!! you're a lifesaver

cunning barn
#

i want to have a joker (legendary) that gets x1 mult from one source and x2 mult from another. i know how to do the variables but how would i do multiple valuables that give the same thing, like xmult in this case?

eager pendant
#

Can you tell me what's wrong?

cunning barn
red flower
cunning barn
#

what do you mean by that? i dunno how to explain it that's not just saying what i want the joker to do again

red flower
#

like what specifically gives the joker the xmult
do you mean for example it gains X1 when you play an Ace and X2 when you use a tarot or something like that?

cunning barn
#

right yeah i didnt specify. played straights gain x1 mult and played straight flushes gain x2

#

(yes this is the Homestar legendary from my mod. Homestar jokers are very straight-dependent mostly off the strength of Runner lol)

gusty iron
#

how do i set the hand a planet card represents (blue seals crash my game when i play custom hands)

red flower
red flower
cunning barn
#

i thought that card.ability.extras could only have one number assigned? im rlly confused

modern kindle
# red flower wbu

im doing okay, just ordered myself 2 pizzas and alfredo pasta and an artichoke and spinach dip!

#

looking forward to it

red flower
eager pendant
#

Can you tell me what's wrong?

cunning barn
red flower
red flower
cunning barn
#

ive just been modifying vanilla jokers and pasting stuff around is there like a good tutorial out there? im really in over my head with lua i think

gusty iron
#

this is what the error looks like

#

do i have to return it in locvars?

red flower
gusty iron
red flower
#

consumable

gusty iron
#
SMODS.Consumable{
    key = "c_thesun",
    set = "Planet",
    config = { hand_type = 'JCJ_flushsix', },
    loc_txt = {name = "The Sun", text = {
        "{S:0.8}({S:0.8,V:1}lvl.#1#{S:0.8}){} Level up",
        "{C:attention}Flush Six{}",
        "{C:mult}+#2#{} Mult",
        "{C:chips}+#3#{} Chips"
    }},
    loc_vars = function()
        return {
            vars = {
                G.GAME.hands["JCJ_flushsix"].level,
                G.GAME.hands["JCJ_flushsix"].l_mult,
                G.GAME.hands["JCJ_flushsix"].l_chips,
                colours = {
                    G.GAME.hands["JCJ_flushsix"].level == 1 and G.C.UI.TEXT_DARK
                    or G.C.HAND_LEVELS[math.min(7, G.GAME.hands["JCJ_flushsix"].level)]
                }
            }
        }
    end,
    atlas = "Planets",
in_pool = function(self, args)
return G.GAME.hands["JCJ_flushsix"].played > 0
end,
    pos = {x = 4, y = 0},
    cost = 3,
    pools = {
        ["Default"] = true,
        ["Dwarf Planet"] = true
    },
    discovered = false,
    unlocked = true,
    config = {},
    use = function(self, card, area)
        update_hand_text({ sound = "button", volume = 0.7, pitch = 0.8, delay = 0.3 }, {
            handname = "Flush Six",
            chips = G.GAME.hands["JCJ_flushsix"].chips,
            mult = G.GAME.hands["JCJ_flushsix"].mult,
            level = G.GAME.hands["JCJ_flushsix"].level,
        })
        level_up_hand(card, "JCJ_flushsix", false, 1)
        delay(0.1)
        update_hand_text(
            { sound = "button", volume = 0.7, pitch = 1.1, delay = 0 },
            { mult = 0, chips = 0, handname = "", level = "" }
        )
    end,
    can_use = function(self, card) return true end,
    set_badges = function(self, card, badges)
        badges[1] = create_badge("Kinda Spicy (Star)", G.C.BLUE, G.C.WHITE, 1.2)
    end
}
cunning barn
#

ok so the tables work like
define the name of the table, then list the compatible hands, and then say "if hand is this hand, add to table?" and then call the table? i m getting a headache even typing this ngl

gusty iron
#

oh shit yeah youre right

red flower
cunning barn
#

yeah i dont know what im talking about either im just gonna drop it for now

#

i think i just need an example of a table that has multiple hand types in it?

eager pendant
broken cliff
#

Tables are just storages for variables and other object

gusty iron
#

JIPPIE

#

thank you!!

broken cliff
#

In fact you can store anything in a table, either by an index(number starting from 1 to almost any number) or key (a word to access the value)

#

You can also loop through a table by using for loops

brazen tusk
#

ok coming back to this, how would i add a delay in here?

cunning barn
#

no, in a table that can be pulled from

#

like if this value then give this much mult, if this value then give this much

broken cliff
#

Ok so a storage of hand types, with hand information?

cunning barn
broken cliff
#

Only straights and straight flushes?

cunning barn
#

yep just those

broken cliff
#

If context.poker_hands[hand_name] then

#

Be wary, a straight flush contains a straight too

#

Hand_name is the name of the hand, as in "Straight Flush"

wintry solar
#

Just check context.scoring_name

broken cliff
gusty iron
#

how do i check if a card is a wild card?

cunning barn
#

so like

if context.scoring_name[Straight] then [code to add +x1 mult]
if context.scoring_name[Straight Flush] then [code to add +x2 mult]

something like that?

gusty iron
red flower
#

context.scoring_name == "Straight"

#

it's not a table

cunning barn
#

alright i think i can handle that then

brazen tusk
#

Anyone know how to resolve this?

red flower
#

dont use context inside an event, store it somewhere else first

brazen tusk
#

so js somewhere else put variable = context.other_card?

red flower
#

ye

brazen tusk
#

aight ty

gusty iron
#
suit = card.base.suit
table.insert(accepted, card)
elseif card.base.value ~= rank or card.base:is_suit(suit) then

would this snippet of code work? (im trying to make my hands wild-card compatible)

brazen tusk
#

me when i couldnt think of a variable name lmao

cunning barn
#

this is what i have for the xmult code. still unsure of what i have to do to make it so that i can have 2 xmult values

config = { extra = { Xmult_gain = 1, [do something about the Xmult gain 2 variable] Xmult = 1 } },
    loc_vars = function(self, info_queue, card)
        return { vars = { card.ability.extra.Xmult_gain, card.ability.extra.Xmult } }
    end,
    rarity = 4,
    atlas = 'hsr',
    pos = { x = 2, y = 0 },
    soul_pos = { x = 3, y = 0 },
    cost = 3,
    calculate = function(self, card, context)
        if context.before and context.main_eval and context.scoring_name == "Straight" then
            card.ability.extra.Xmult = card.ability.extra.Xmult + #context.cards * card.ability.extra.Xmult_gain
        end
        if context.before and context.main_eval and context.scoring_name == "Straight Flush" then
            card.ability.extra.Xmult = card.ability.extra.Xmult + #context.cards * card.ability.extra.[second xmult gain variable]
        end
    end
}```
#

apologies for the terrible formatting idk how to put it into a box like this

#

the lack of xmult gain 2 variable is intentional because i dunno how to define it

brazen tusk
#

use 3 of the `