#💻・modding-dev

1 messages · Page 562 of 1

vocal helm
#

(or just base Balatro's debug menu)

long sun
#

ya true

#

thanks ^u^

high verge
#

I think I figured it out

#

The function name was changed

#

Now let's see if it actually functions

long sun
#

pun :3 hehe

high verge
#

It does not

pastel osprey
#

bsod joker
X1 mult
Gains X1 mult at end of round
1 in 16 chance to self destruct and crash your computer

long sun
#

[eternal]

high verge
#
  1. That's great.
  2. I hope you can't do that.
#

xD

pastel osprey
#

they're telling me this is "malware" and "puts their machine at risk"

#

they're all full of shit 🗿

#

If 1 in 4 never hits what makes you think 1 in 16 would ever hit in your lifetime

high verge
#

Card please just animate

long sun
#

-# look at what phanta does :3

crimson dune
#

Why does renaming my own mod file while having Talisman causes the game to crash on startup with this oblique crash message?

charred widget
#

hello friends. I'm having a little trouble with a joker here.

#

Rayquaza eats stone cards, and it adds to an xmult value. However, that's not the problem. I want it to display text at the same time the cards are destroyed.

#

and believe it or not, I actually experimented beforehand, by putting [message = "Eaten!"] in different "return" groups

#

but none of them did what i wanted it to

#

so now i'm coming for help

long sun
#

add your message alongside the remove = true :D

charred widget
#

ah, i see

#

i will add your name to the special thanks message in the mod

long sun
#

nawww no need ^U^

#

unless u really wanna but

#

ya dw about it :3

charred widget
#

wait actually i tried putting it next to remove = true

#

but i'll try again to see how it works

#

yeah that's not what it does

#

it says "eaten!", and then a card drops

long sun
#

hmm

#

ya sorry, i don't know then ;u;

charred widget
#

that's alright

#

would there be a way to detect when the cards are about to be destroyed? maybe then, I could display the message at the same time

steady smelt
#

is there any way to change the amount of suits per page in the deck summary it's really annoying only having 4 when 5 fits well still

#

even if i have to hook it somewhere and add a config or smth that's fine

charred widget
daring fern
charred widget
cursive gazelle
#

😭the tutorial says how

charred widget
#

wait

#

i'm dumb

cursive gazelle
#

Esz what’s reading

charred widget
#

are you asking what i'm reading, or what the concept of "reading" is?

cursive gazelle
#

The concept

charred widget
#

"Reading", as traditionally accepted in linguistics, is the act of comprehending and gaining information from written words

#

how those words are written is a product of the format the writer is using

#

are you going to ask me if I'm comprehending and gaining information from the words written in the tutorial or am i free to ponder it by myself

warm umbra
#

really reallyyy stupid question but how do i get the vars from loc_vars outside of the text styling stuff

warm umbra
cursive gazelle
#

In what context are you using them

#

What do you want to do

warm umbra
# cursive gazelle What do you want to do

basically im just stealing the code i used to make the description accurate for the actual mult giving but i want to see if theres a way to reuse the function so that i dont make my code more inefficient than it already is

cursive gazelle
#

Buddy
You can store variables in joker config and access them as card.ability.extra.variable

warm umbra
#

ty

cursive gazelle
#

Also return them as said

feral tree
#

is it possible to change the jingle that plays when you win?

cursive gazelle
#

Ye

#

If you can find the key

manic rune
pearl sentinel
#

help please

umbral zodiac
#

is there something i can hook which is ran after all centers are loaded

cursive gazelle
red flower
#

i hook SMODS.injectItems

umbral zodiac
#

yeah but the code for its main file will still be ran before all centers exist

umbral zodiac
cursive gazelle
#

Why not tho

red flower
red flower
sturdy compass
umbral zodiac
#

oh this is unrelated to hotpot

sturdy compass
#

Oh lmao

umbral zodiac
red flower
#

oh then i should have given you a good answer..

umbral zodiac
#

was that a bad answer...

red flower
#

im joking

pearl sentinel
umbral zodiac
#

sobs

sturdy compass
#

So that was a lie /j

red flower
umbral zodiac
# sturdy compass

it wouldve been true if there wasnt a critical bug in my optimizations of xp gain

sturdy compass
#

eeyouch

umbral zodiac
#

which it was still a huge optimization because it went from ~30,000 levels at once before ur game hardcrashed to being able to earn any amount at once w/o lag

#

like while i was testing i gained e70 levels at once and it was fine

daring scroll
#

Messing with Joker Forge and attempting to fix things in lua, but I'm stumped. Here's the card description for reference, but the Joker won't add any hands. I think it's reading discards after they're all removed, but I dunno how to make it add hands before removing discards. I tried custom variables and reading the mod variables directly, and switching around the order, but no luck.

#

Joker Forge blocks for reference as well

cursive gazelle
#

Cardxability ?

#

What

#

Check your calculate function

daring scroll
#

readding a variable to record the starting discards amount, then adding that to Hands

#

That did it. Red deck starts every round with 12 hands

warm umbra
#

ok so ive finished making my joker but since you get a lot of multi should i remove the indicator that shows how much you need (the 72 thing) or be nice

#

also wait i need to improve this because half the time it wont be possible

#

but originally it was way easier

dreamy lodge
#

Is there a better way to word this effect? It doesn't feel right but I dont know what to change

wintry swallow
final jewel
#

Is there someone good with event manager cause I have this fonction that change the seal but the seal get change before the card is flip and thats not what I want

frosty rampart
daring fern
final jewel
#

ok I'll try that

final jewel
daring scroll
#

Ok, mod's returning an error message on bootup. I don't understand the lua errors it's picking up, cause the references I'm using don't have symbols there and it's asking me to insert brackets in the middle of variables and functions?

hidden mirage
#

is returning remove = true only valid during discard and destroy_card?

hidden mirage
daring fern
daring fern
hidden mirage
#

okay do i say context.destroy_card and context.individual?

daring fern
brave blade
#

Is there a more up-to-date list of all contexts than the Calculate Functions page on the wiki?

hidden mirage
#

that destroys them at the end after done scoring
is it possible to score a card, when joker gets 'triggered' remove it then go to next?

daring fern
brave blade
#

Hmm... so Jokers like DNA start juicing before the first hand is played, and I need to have a Joker start juicing right before the third hand is played. What context should I use for that? I can't use hand_drawn like in DNA's code because that won't trigger if no cards are actually drawn

brave blade
daring fern
brave blade
brave blade
brave blade
vocal helm
#

since I can't find it in the docs, what's the best way to add an extra option after opening a booster pack?

#

like, instead of a spectral pack giving two cards, it gives three

daring fern
vocal helm
#

thanks! :>

glass scaffold
#

Can anyone help me figure out why the new properties aren't applying? I have the required mod.

#

@umbral zodiac since you made the CardPronouns mod

umbral zodiac
#

it uses the pronouns key and not a table

#

so itd be "she_her" and not the table

#

also yeah you would need the mod prefix for the joker

pastel osprey
#

I've not heard of it

umbral zodiac
#

i made it 3 hours ago so ideally you havent heard of it

pastel osprey
#

ah

umbral zodiac
#

it gives every card ingame random pronouns

pastel osprey
#

lmao

umbral zodiac
#

example

glass scaffold
pastel osprey
#

blueprint should copy pronouns trust

glass scaffold
#

?????

umbral zodiac
#

shrug

#

i just changed it like 15 mins ago

#

if it doesnt update when you reload the page then something is strange

glass scaffold
#

So probs GitHub taking a sec.

#

Alright, updated. Thanks lily

umbral zodiac
#

for sure

hidden mirage
#
    calculate = function(self, card, context)
        if context.before then
            card.ability.extra.cards_to_chomp = {}
        end
        if context.individual and context.cardarea == G.play then
            if SMODS.pseudorandom_probability(card, 'chomper', 1, card.ability.extra.odds) then
                table.insert(card.ability.extra.cards_to_chomp, context.other_card)
                return {
                    xmult = card.ability.extra.xmult,
                    message = "...",
                    colour = G.C.CHANCE
                }
            else
                return {
                    xmult = card.ability.extra.xmult
                }
            end
        end
        if context.destroy_card then
            for _, value in pairs(card.ability.extra.cards_to_chomp) do
                if value == context.other_card then
                    return {
                        remove = true
                    }
                end
            end
        end
    end

why no cards being destroyed

glass scaffold
umbral zodiac
#

yeah i think your cardpronouns is outdated still

vocal helm
# daring fern Modify `G.GAME.modifiers.booster_choice_mod`
add_to_deck = function(self, card, from_debuff)
        G.GAME.modifiers.booster_choice_mod = G.GAME.modifiers.booster_choice_mod + card.ability.extra.booster_mod
    end,
    remove_from_deck = function(self, card, from_debuff)
        G.GAME.modifiers.booster_choice_mod = G.GAME.modifiers.booster_choice_mod - card.ability.extra.booster_mod
    end

added this to my joker but I'm getting a nil value error

daring fern
vocal helm
#

ahh, appreciated! thanks!

glass scaffold
hollow horizon
#

Hi! How do I make a planet card for a custom poker hand that only shows up when the hand was played before?

hidden mirage
#
calculate = function(self, card, context)
        if context.before then
            card.ability.extra.cards_to_chomp = {}
        end
        if context.individual and context.cardarea == G.play then
            if SMODS.pseudorandom_probability(card, 'chomper', 1, card.ability.extra.odds) then
                table.insert(card.ability.extra.cards_to_chomp, context.other_card)
                return {
                    xmult = card.ability.extra.xmult,
                    message = "...",
                    colour = G.C.CHANCE
                }
            else
                return { xmult = card.ability.extra.xmult }
            end
        end
        if context.destroy_card then
            for _, value in pairs(card.ability.extra.cards_to_chomp) do
                if value == context.destroying_card then
                    return { remove = true }
                end
            end
        end
        if context.remove_playing_cards then
            for _, value in pairs(card.ability.extra.cards_to_chomp) do
                if value == context.removed[0] then
                    return {
                        message = "CHOMP!",
                        colour = G.C.RED
                    }
                end
            end
        end
    end

any ideas why the chomp message isnt showing?

daring fern
wintry solar
viral ember
#

what

hidden mirage
#

thankyou

hollow horizon
viral ember
#
    name = "amethyst",
    key = "amethyst",
    loc_txt = {
        label = 'Amethyst Card',
        name = 'Amethyst Card',
        text = {
            "{X:mult,C:white} X#1# {} Mult",
            "{C:green}#2# in #3#{} chance to",
            "create a {C:spectral}Spectral{} card",
            "{C:inactive}(Must have room)",
        }
    },
    badge_colour = HEX("b2112a"),
    atlas = "Jokers",
    pos = {x=9, y=13},
    config = { Xmult = 2.5, extra = { odds = 4 } },
    shatters = true,
    loc_vars = function(self, info_queue, card)
        local numerator, denominator = SMODS.get_probability_vars(card, 1, card.ability.extra.odds, 'balalalatro_amethyst')
        return { vars = { card.ability.Xmult, numerator, denominator } }
    end,
    calculate = function(self, card, context)
        if context.destroy_card and context.cardarea == G.play and context.destroy_card == card and SMODS.pseudorandom_probability(card, 'balalalatro_amethyst', 1, card.ability.extra.odds) then

            if #G.consumeables.cards + G.GAME.consumeable_buffer < G.consumeables.config.card_limit then
                G.GAME.consumeable_buffer = G.GAME.consumeable_buffer + 1
                G.E_MANAGER:add_event(Event({
                    func = (function()
                        SMODS.add_card {
                            set = 'Spectral',
                            key_append = 'balalalatro_amethyst'
                        }
                        G.GAME.consumeable_buffer = 0
                        return true
                    end)
                }))
                return {
                    message = localize('k_plus_spectral'),
                    colour = G.C.SECONDARY_SET.Spectral,
                    remove = true
                }
            end
return {
remove = true
}
        end
    end,
}```

[SMODS Balalalatro "Balalalatro.lua"]:1314: attempt to call field 'get_probability_vars' (a nil value)
Was copying VanillaRemade's Glass
#

Did the function get changed or smthn?

daring fern
hollow horizon
#

Thanks

viral ember
#

oh sweet lord

#

alright thx

#

yea that worked thanks!

#

i made a new run??

wintry solar
#

Oh that message timing is a little jank if your new run crashes immediately

#

You need to update talisman too

viral ember
#

ah

hidden mirage
#

can someone tell me the key/id for oops all sixes or where to find that info

viral ember
hidden mirage
vocal helm
#

Is there a way to call post_trigger on your own joker? I'm trying to create Hiker with a limited number of uses

#

i'm gonna try context.other_card == card and see if that works

subtle merlin
#

<@&1133519078540185692>

#

ty!

vocal helm
# vocal helm i'm gonna try `context.other_card == card` and see if that works
calculate = function(self, card, context)
        if context.individual and context.cardarea == G.play then
            context.other_card.ability.perma_mult = (context.other_card.ability.perma_mult or 0) + card.ability.extra.mult
            return {
                message = localize('k_upgrade_ex'),
                colour = G.C.MULT
            }
        end
        if context.post_trigger and context.cardarea == G.jokers and context.other_card == card and not context.blueprint then
            if card.ability.extra.s_count - card.ability.extra.s_mod <= 0 then
                SMODS.destroy_cards(card, nil, nil, true)
                return {
                    message = localize('k_eaten_ex'),
                    colour = G.C.MULT
                }
            else
                -- See note about SMODS Scaling Manipulation on the wiki
                card.ability.extra.s_count = card.ability.extra.s_count - card.ability.extra.s_mod
                return {
                    message = "-"..card.ability.extra.s_mod,
                    colour = G.C.MULT
                }
            end
        end
    end

this works, but the message pops up on the affected card rather than the joker itself
and I wouldn't want a random 6 or something with a little "Eaten!" popup over it x3

subtle merlin
vocal helm
#

that's what I'm doing, I think
card.ability.extra.s_count is how many uses of the joker remain

unborn bay
vocal helm
unborn bay
#
return {
    -- additional return keys ... etc
    message_card = card
}
#

yep

vocal helm
#

it's 4:30 am i should be asleep x3

hollow horizon
#

Does anyone know what just happened? From what I can understand (and I understand that poorly) the game wanted to add edition to the planet card (??)

subtle merlin
thorn basin
#

@red flower sorry for the late response but this is what I tried to do with my custom tag:
basically like the uncommon Tag does, it makes a Scienceful (this is not a rarity but an objectType) Joker appear in the shop for free.
The result is that it makes it appear but as a separate entity, I can move it freely but not buy it and it shouldn't do that...
Also it kind of messes up with the vanilla tags:

faint yacht
#

...why are you redefining Tag:apply_to_run?

daring fern
thorn basin
daring fern
# thorn basin oh, I shall remove that function
apply = function(self, tag, context)
    if context.type == 'store_joker_create' then
        local card = SMODS.create_card {
            set = "Scienceful",
            area = context.area,
        }
        create_shop_card_ui(card, 'Joker', context.area)
        card.states.visible = false
        tag:yep('+', G.C.GREEN, function()
            card:start_materialize()
            card.ability.couponed = true
            card:set_cost()
            return true
        end)
        tag.triggered = true
        return card
    end
end
thorn basin
#

oh wait, so the apply function kinda works like the calculate function of a joker?!

#

I still have to re-read the Tags part of the doc cuz it kinda confused me

daring fern
thorn basin
#

oh thank you Somthingcom

#

now it works

robust marsh
#

I have a set of jokers that I wish to hold in a different collection page within this area

Is there a way to do this?

wintry solar
#

There are some other helper functions somewhere

viral ember
#
        G.E_MANAGER:add_event(Event({
            func = function()
                for k, v in pairs(G.playing_cards) do
                    if v.base.rank == 'A' then
                        v:set_ability('m_gold', true)
                    end
                end
                return true
            end
        }))
    end```
I always forget what the rank id is for aces lol
hollow horizon
#

14

#

How would I make custom suits not appear from the beginning of the round and enable them through consumable?

hidden mirage
#

how to incorporate other scripts than main.lua?

hollow horizon
#

assert them in main

slim ferry
#

assert(SMODS.load_file("<path (relative to current file)>")()

hollow horizon
daring fern
viral ember
#

v is a card

#

right

#

card.base.rank?

daring fern
daring fern
faint yacht
viral ember
thorn basin
#

how can I check if there are jokers with editions in the joker slots kinda how abstract does?
I tried putting the function that gets the editionless ones and modified it but it then gave me error.
so I left it like this:

slim ferry
#

loop over G.jokers.cards, and check each one if they have card.edition

daring fern
robust marsh
thorn basin
daring fern
thorn basin
# daring fern What is the goal?

like abstract gives Mult for each joker in the jokers slots, I wanna do that this joker I'm making, gives Mult for each joker with an Edition in the joker slots.

daring fern
thorn basin
#

(the calculate function is still wip)

daring fern
thorn basin
next timber
#

how would i make a joker flip and change sprite? i know config.center.pos is used but i dont know how i'd do it by flipping

#

oh wait i'll check bunco's cassette

feral tree
#

What is context.cry_press?

next timber
#

i think its cryptid's context for clicking?

#

for cookie clicker for example

robust marsh
#

mmm is there any mod that creates a button below the joker card area?

crisp coral
#

joyousspring but that's above iirc

robust marsh
manic rune
#

cartomancer too i think?

#

the one mod with "Show" "Hide" buttons above the area idk

robust marsh
#

i just checked it out that's basically what i needed

lament agate
#

how do you check if a hand only contains debuffed cards

manic rune
cursive gazelle
zealous glen
manic rune
#

SMODS.debuff_card? its for debuffing cards

#

if you want to check whether a card is debuffed or not you should be checking card.debuff

cursive gazelle
#

Or scoring cards

lament agate
#

?

manic rune
#

just if card.debuff then will work too

cursive gazelle
#

Card refer to the joker .

#

You would do other card for that

manic rune
cursive gazelle
#

Or a for loop

manic rune
#

but yeah, change card with whatever card ur checking

lament agate
cursive gazelle
lament agate
cursive gazelle
manic rune
#

thats checking for if the joker is debuffed...

lament agate
#

oh

#

fuck me

zealous glen
#

It’s a bit confusing since it doesn’t use self to refer to the Joker itself

cursive gazelle
#

Bro been modding forever

#

And doesn’t know

lament agate
#

i have no clue how to do this

cursive gazelle
#

😭it’s so simple

zealous glen
cursive gazelle
#

Bepis just give bro the code

#

I’m on my phone

lament agate
cursive gazelle
#

Cut to the chase

zealous glen
#

Or N’’s vanilla remade mod

lament agate
cursive gazelle
#

Context.individual doesn’t trigger effect for debuffed cards from my knowing

lament agate
#

theres no Joker that messes with debuffed cards

zealous glen
#

There’s a few that do

lament agate
wintry solar
#

Nxkoo you know how to loop through the played cards right?

#

Just change the internal stuff there to return

lament agate
#

this?

zealous glen
# lament agate

Clever but I don’t know if context.scoring_hand is what you want

#

I thought you wanted the played hand

lament agate
#

so what should i do

cursive gazelle
#

If context.before then
Local debuffedcards=5
For _,v in iprais(G.play) do
If v.debuff then
Debuffedcards=debuffedcards+1
End
End
If debuffedcards==#G.play then
Return
End

#

On phone btw

lament agate
#

oh g.play

#

smart

#

hold on

wispy falcon
zealous glen
#

It depends on the timing

wintry solar
#

It depends on what the effect is for what you’d use

zealous glen
#

But also I think there’s a context for the full, played hand

lament agate
#

this sucks

#

its for hotpot

#

i cant leak it

#

😭

cursive gazelle
#

I thought you surrendered

lament agate
#

i DO

cursive gazelle
zealous glen
#

Or overwriting something existing

lament agate
zealous glen
#

Matador 2

lament agate
#

its for something else

#

dont worry

#

but is it correct

zealous glen
#

I mean it’s hard to say without knowing what you want to do

cursive gazelle
lament agate
#

FUCK

cursive gazelle
#

Why are you breaking

zealous glen
#

The timing (context) depends on the actual effect

cursive gazelle
#

Ns why did you set it to 5

lament agate
#

because the example said so

zealous glen
#

The rest of the logic doesn’t need the full effect, but it needs some description of the effect as a map

lament agate
cursive gazelle
#

You know what break does

lament agate
#

yes

#

i deleted it

#

my bad

zealous glen
cursive gazelle
#

Set the local variable to 0

#

Not 5

zealous glen
#

You presumably don’t need an integer counter

#

So just a Boolean and a break would suffice

lament agate
#

so do i delete the break or

cursive gazelle
#

Depends on if you want 1 card to be debuffed or to check if all are

zealous glen
#

If your question is: “do all elements of a table have a property?”, you can answer it by setting the answer to true then iteratively checking each element and breaking when you find one without

zealous glen
#

Setting the answer to false before breaking of course

lament agate
#

i see

cursive gazelle
#

You don’t need a flag

#

Just do number of debuff == size of table

zealous glen
#

They don’t need a number though

lament agate
#

so debuffs == #G.play then

zealous glen
#

If they want to check, they just need a Boolean

cursive gazelle
#

It depends on what you want to do

lament agate
#

checks if all played cards are debuffed

#

thats it

zealous glen
#

They said they wanted to check if all cards were debuffed or not

cursive gazelle
#

And remove the not in the if statement

zealous glen
cursive gazelle
#

Too smart for niko

lament agate
zealous glen
lament agate
cursive gazelle
#

I’m amazed

lament agate
#

HOW ABOUT THIS NOW

#

is it good

cursive gazelle
zealous glen
#

I think the code I had indicated was almost good enough

#

Anyways, I think s is overcomplicating but also I don’t think having too many cooks is helpful

lament agate
#

it crashes before it

cursive gazelle
#

This counts non debuffed cards

zealous glen
#

So I’ll let s handle it despite thinking they’re making it harder than it needs to be ;P

cursive gazelle
#

You need to do context.joker_main or something

#

Depends on the effect

cursive gazelle
zealous glen
#

So you told them to do something completely different for no reason

#

Which is harder to understand than the code they had already written and was close to working

lament agate
#

it took me a day to write this joker

zealous glen
# lament agate

I think this excerpt does what you want except for looking at scoring cards instead of played cards

zealous glen
lament agate
zealous glen
#

But just that excerpt makes sense to me

zealous glen
robust marsh
#

I have a question. If the joker card area is hidden and contains jokers within it, can it still score after you hide it (with states.visible = false)?

keen atlas
#

does lovely has an easy way to identify where the mod is located at instead of having to loop through mod folders?

robust marsh
robust marsh
#

my head hurts, im trying to make two card areas and both work fine on their own but once i try to put them together they follow each other and the positioning goes to shit droidcry

thorn basin
#

Question: why does the game not check if a joker in the joker slots has an edition?

wintry solar
#

that function checks a card area, not a card

thorn basin
wintry solar
#

card.edition

thorn basin
#

oh right

robust marsh
#

how could i make a card area score before the joker area? Right now it scores after all of the jokers finish scoring

wintry solar
#

inject it before the joker area

robust marsh
wintry solar
#

how are you currently adding your area?

robust marsh
# wintry solar how are you currently adding your area?
local start_run_reflocust = Game.start_run
function Game:start_run(args)
    if not self.locust_area then
        self.locust_area = CardArea(
            0, 0,
            self.CARD_W * 4.9,
            self.CARD_H * 0.9,
            { card_limit = 5, type = "jokers", highlight_limit = 1 }
        )
    end
    G.locust_area = self.locust_area
    start_run_reflocust(self, args)

    if not self.locust_ui then
        self.locust_ui = UIBox {
            definition = {
                n = G.UIT.ROOT,
                config = { align = 'cm', r = 0.1, colour = G.C.CLEAR, padding = 0.2 },
                nodes = {
                    { n = G.UIT.O, config = { object = self.locust_area, draw_layer = 1 } }
                }
            },
            config = { align = 'cmi', offset = { x = 0, y = 0 }, major = self.jokers, bond = 'Weak' }
        }
        G.locust_ui = self.locust_ui
    end

    if G.jokers and G.jokers.config and G.jokers.config.type then
        self.locust_area.config.type = G.jokers.config.type
    end
wintry solar
#

I mean to calculation

robust marsh
wintry solar
#

yes

robust marsh
# wintry solar yes
[[patches]]
[patches.pattern]
target = '=[SMODS _ "src/utils.lua"]'
pattern = "-- TARGET: add your own CardAreas for joker evaluation"
position = 'before'
match_indent = true
payload = '''
if G.pactive_area then table.insert(t, G.pactive_area) end
if G.locust_area then table.insert(t, G.locust_area) end
'''
wintry solar
#

okay, so you want to change where in the table you insert it so it's before the joker area

robust marsh
slim ferry
#

does card.config.center.config contain the base ability values of a card, or are there things that affect this table too

red flower
#

they should contain the base values

next timber
#

may be stupid but how do i make a joker just give +1 hand or discard at scoring for just that round?

red flower
#

ease_discard and ease_hands_played

violet oasis
#

Is there a way to remove a card's base chips value with an enhancement while still keeping the suit and rank? I tried replace_base_card = true, but it also removes the suit and rank.

#

Not remove permanently, just while the enhancement is there

loud summit
#

is rarity 1 uncommon or common

slim ferry
#

common

loud summit
#

thx

#

are jokers eternal and perishable compatible if not specified?

slim ferry
#

yes

#

they are compatible with all stickers by default

loud summit
#

oh

slim ferry
#

you can configure any sticker's compatibility on a joker (including modded) with <key>_compat

slim ferry
#

does everything inside of a center definition get copied into the object's G.P_CENTERS entry, or just the pre-existing parameters?

red flower
#

everything

slim ferry
#

nope

#

rental is also a sticker which has a key and therefore you can also do that

lament agate
#

vars already defined in loc_vars but it shows nil in game

#

nvm

cursive gazelle
slim ferry
#

😭

lament agate
#

dont worry

#

the prayers has been answered

cursive gazelle
#

good luck

lament agate
#

i shouldnt be joining eiher way

hollow horizon
#

How do I get poker hand's level? Like in planet cards descriptions there's [lvl. 1] and text after

long sun
#

after drawing from play to hand, the drawn card flips over and becomes unselectable

#

i know vaguely why this is happening, the game's still trying to draw it to discard

#

but, why?

#

and how can i fix this?

wispy falcon
long sun
#

[be careful, as Talisman can break with that]

rotund sable
#

Will break that

pastel osprey
#

That's sick

hollow horizon
#

And how do I implement that in text? Do i just:
desc = '['..G.GAME.hands["Poker Hand Name"].level ..']lvl AND TEXT AFTER'?

#

I guess not

wispy falcon
#

Why does this happen? I've set unlocked and discovered true and it uses the right atlas

    key = "animation",
    pos = { x = 0, y = 0},
    atlas = "animation",
    unlocked = true,
    dicovered = true,
    no_collection = true,

    update = function (self, card, dt)
        card.children.center:set_sprite_pos({ x = math.floor(G.TIMERS.REAL * 10) % 50, y = 0 })
    end,

    in_pool = function(self, args)
        return false
    end
}```
#

-# Sorry for the wall

hollow horizon
#

thanks

robust marsh
#

I have a uh.. problem.. I made a separate card area for another set of jokers and I added a Swap button for ease of use so you can manage both areas whenever you want. This works perfectly fine but when I try to play another deck and THEN the deck with this double card area function the area just flips to to the other side when i press the button and idk how to get around this.

wispy falcon
red flower
#

i have this thing in my mod too

pastel osprey
robust marsh
red flower
#

yeah

robust marsh
#

alright, one moment

robust marsh
# red flower yeah

Card Area

local start_run_reflocust = Game.start_run
function Game:start_run(args)
    if not self.locust_area then
        self.locust_area = CardArea(
            0, 0,
            self.CARD_W * 4.9,
            self.CARD_H * 0.95,
            { card_limit = 5, type = "jokers", highlight_limit = 1 }
        )
    end
    G.locust_area = self.locust_area
    start_run_reflocust(self, args)

    if not self.locust_ui then
        self.locust_ui = UIBox {
            definition = {
                n = G.UIT.ROOT,
                config = { align = 'cm', r = 0.1, colour = G.C.CLEAR, padding = 0.2 },
                nodes = {
                    { n = G.UIT.O, config = { object = self.locust_area, draw_layer = 1 } }
                }
            },
            config = { align = 'cmi', offset = { x = 0, y = 0 }, major = self.jokers, bond = 'Weak' }
        }
        G.locust_ui = self.locust_ui
    end

    if G.jokers and G.jokers.config and G.jokers.config.type then
        G.locust_area.states.visible = false
        self.locust_area.config.type = G.jokers.config.type
    end
end

Button Functionality

local game_start_run_ref = Game.start_run
function Game:start_run(args)
    game_start_run_ref(self, args)
    if G.GAME.selected_back and G.GAME.selected_back.effect.center.key == "b_tdec_tainted_nebula" then
        self.locust_buttons = UIBox {
            definition = {
                n = G.UIT.ROOT,
                config = {
                    align = "cm",
                    minw = 1,
                    minh = 0.3,
                    padding = 0.15,
                    r = 0.1,
                    colour = G.C.CLEAR
                },
                nodes = {
                    {
                        n = G.UIT.C,
                        config = {
                            align = "tm",
                            minw = 2,
                            padding = 0.1,
                            r = 0.1,
                            hover = true,
                            colour = G.C.RED,
                            shadow = true,
                            button = "SwapSets"
                        },
                        nodes = {
                            {
                                n = G.UIT.R,
                                config = { align = "bcm", padding = 0 },
                                nodes = {
                                    {
                                        n = G.UIT.T,
                                        config = {
                                            text = "Swap",
                                            scale = 0.35,
                                            colour = G.C.UI.TEXT_LIGHT
                                        }
                                    }
                                }
                            },
                        }
                    }
                }
            },
            config = {
                align = "tr",
                offset = { x = -7.3, y = 3.4 },
                major = G.ROOM_ATTACH,
                bond = 'Weak'
            }
        }
    end

    G.FUNCS.SwapSets = function(e)
        G.E_MANAGER:add_event(Event({
            trigger = 'immediate',
            func = function()
                if not G.locust_area or not G.jokers then return true end

                if G.locust_area.states.visible == false then
                    G.jokers.states.visible = false
                    G.locust_area.states.visible = true
                else
                    G.jokers.states.visible = true
                    G.locust_area.states.visible = false
                end

                return true
            end
        }))
    end
end
plain apex
#

theres sticker:apply but is there sticker:remove im trying to make a hook that does something when a specific sticker is removed but its not working

red flower
robust marsh
frosty rampart
robust marsh
#

i feel a bit dumb now but i suppose it's a learning experience

#

i spent hours trying to get it to work

vocal helm
#

Where would I put SMODS.debuff_card in the context of a Joker preventing specific kinds of cards from being disabled? I have two separate jokers that would provide immunity from debuffs:

  • one that prevents Jacks and 8s from being debuffed
  • one that prevents cards already played that Ante from being debuffed, reverse Pillar style
    I'm not sure if this is an add_to_deck kinda scenario since I haven't yet worked with debuffing cards
robust marsh
wispy falcon
#

What number is 'In a round/game' in G.STATE?

red flower
#

you probably want G.STAGE for that tho

wispy falcon
red flower
#

and if they ever change it can break

wispy falcon
#

Okay, thank you :3

chrome widget
#

What is the sandbox stage?

red flower
#

ive seen a couple of functions related to it but no idea honestly

wispy falcon
slim ferry
#

literally the exact same but with that in place of a number

red flower
wispy falcon
rotund sable
#

G.STATES != G.STATE

red flower
#

G.STAGE == G.STAGES.MAIN_MENU

wispy falcon
#

Thanks once again

next timber
#

i hope i meant x1.1 mult because otherwise there is no reason to get this

#

i like this more

robust marsh
#

gemmytroll i love card areas

using my consumable (when its in the custom card area) entirely skips booster packs as if you pressed the skip button

#

this is torture

next timber
modern kindle
robust marsh
vocal helm
#

(G.GAME.round_resets.blind_tags.Small or G.GAME.round_resets.blind_tags.Big just give me a Voucher Tag each time)

red flower
slim ferry
robust marsh
#

@red flower sorry to bother you again but is there a way to make a card area straight up just act like a consumable area but not get registered as one

vocal helm
slim ferry
#

hmm

#

try context.other_card:get_id() == 8 or context.other_card:get_id() == 11 instead maybe?

#

idk if that would change it

vocal helm
#

checking

red flower
gaunt folio
#

what localization do i need to fix here?

#

this is what i have bc im def not doing it right

vocal helm
slim ferry
#

wtf

#

send the lovely log

vocal helm
slim ferry
#

oh it just closes during launch?

#

wierd

vocal helm
#

it wasn't even during launch, the game ran fine before i tried going into a blind

#

I think the issue might be my implementation because I'm also trying to use quantum enhancements alongside it

slim ferry
#

oh yeah

#

with quantum enhancements you need to be VERY careful with what you do outside of context checks

#

i would just move the context.debuff_card check to the outside

vocal helm
#
calculate = function(self, card, context)
        if context.other_card ~= nil then
            if (context.other_card.base.value == "8" or context.other_card.base.value == "Jack") then
                if context.check_enhancement then
                    return {
                        m_wild = true,
                        m_gold = true,
                        m_steel = true
                    }
                end
            end
            if context.other_card:get_id() == 8 or context.other_card:get_id() == 11 then
                if context.debuff_card then
                    return {
                        prevent_debuff = true
                    }
                end
            end
        end
        return nil, true
    end

this implementation still causes an auto-quit though I'm not really sure how else i'd do it
I'm guessing that initial context.other_card ~= nil prob wouldn't work in this order

slim ferry
#

context.other_card ~= nil doesnt change anything here since it exists in both of those contexts anyway

#

actually try removing the return nil, true at the end maybe

gaunt folio
#

how do i fix this? the label shows up on the individual cards

slim ferry
vocal helm
slim ferry
#

well in the contexts you do have to return for the effects

#

but returning nil, true at the end doesnt do anything

vocal helm
#

ah, yeah, i just mean at the end

slim ferry
#

yeah at the end you shouldnt return

gaunt folio
#

this is what it looks like, but ill try'

vocal helm
gaunt folio
#

kw ill fix that

#

nvm got it

slim ferry
robust marsh
#

i'm trying to make it function like a consumable slot purely because I seem to be running into a few issues all the time, one of them being the fact that all consumables upon use just cancel out the booster pack

gaunt folio
#

the label shows up on the cards fine (placeholder stuff for now), how do i make the UI button say anything but "ERROR"

slim ferry
#

since youre using loc_txt it would be collection = <text>

gaunt folio
#

👍

#

aight it works thx

next timber
frigid niche
#

i have a question how could i go about changing these numbers in probabilities with a joker?

slim ferry
#

return denominator = <number> in context.mod_probability

frigid niche
#

awesome thank you

robust marsh
#

Well, now I'm even more confused. Card areas suck.

When I try to use a consumable (which is in this card area) it completely skips any booster packs UNLESS you are opening the pack via tags

#

I think I'm just not going deep enough into it but yea this is whacky. Not only that but the buttons are also really scuffed for consumables in custom card areas.

red flower
#

i just remake all the buttons for my custom areas

robust marsh
rotund sable
#

new day, new mind, old error (after 30min i still have no idea why this happens)

zealous glen
robust marsh
#

it gets closed even if you never chose anything

#

it weirds me out that this only happens in a shop

azure laurel
#

how i check if a glass card gets destroyed?

red flower
robust marsh
#

isn't it something like removed_card.shattered

azure laurel
slim ferry
#

have you checked vanillaremade glass joker

azure laurel
#

no

red flower
red flower
robust marsh
#

ah

#

alright

red flower
#

but it only check its own ability

robust marsh
#

the consumable itself works perfectly fine if it's operating under the G.consumeables area

cursive gazelle
#

the swap reminds me of something oddly familiar

robust marsh
azure laurel
robust marsh
#

i use it to swap between locusts and jokers so they arent clumped together

#

ofc both jokers and locusts will do their thing no matter what, it's just a visual thing to reduce clutter

red flower
azure laurel
#

ok thanks

azure laurel
red flower
wide chasm
#

yo uh im not really finding a way to fix this?

#

its not displaying the amount for some reason

azure laurel
slim ferry
wide chasm
#

i dont really know wtf that means 😭

azure laurel
wide chasm
#

not that good at modding, are those like files i should have in my mod or smth?

wide chasm
slim ferry
wide chasm
slim ferry
#

old metadata header jumpscare wtf

wide chasm
#

oh is it outdated

#

lmao

slim ferry
#

okay why is this file so fucked up

frosty rampart
wide chasm
#

yeah we kinda started making this a year ago and gave up on it

#

and im coming back to fix the mess but

slim ferry
#

have you been looking at vanillaremade as reference for your jokers

slim ferry
#

also the issue with your description is that you dont have a loc_vars function defined on the joker at all

#

which is whats supposed to be used to pass variables into the description

azure laurel
#

i swear that error is a thing that happens the fisrt time and then you wont suffer again

wide chasm
slim ferry
#

also the wiki of this is really useful too

wide chasm
#

alright

#

so i should remake the mod basically

#

but look into that wiki

slim ferry
#

probably yeah

#

also the actual code is literally all of vanilla remade with smods so thats a really useful reference

wide chasm
#

alr tysm

#

ill see what i can do w this

scenic steeple
#

If I wanted to set my custom joker cards in a specific order in the joker collection, how would I do that?

slim ferry
#

change the order of the joker definitions in your mod files/the order in which individual files load

modern kindle
#

I wish we could just place an order value on where it goes numerically
Instead of it being by load

red cradle
#

why message still classic orange, while i have this in my code?

sonic cedar
#

bump from yesterday

sonic cedar
red cradle
#

how?

sonic cedar
#

i have this at the top of my file whenever i wanna use the color

slim ferry
red cradle
#

but it works in localize file

obtuse silo
#

this code causes the skin to show up as blank.
I have a feeling that it might have something to do with the positioning

frosty rampart
obtuse silo
#

i see

#

so what would i do if i wanted a specific y co-ord but wanted to do pos_style 'ranks'?

frosty rampart
#

i think 'ranks' expects you to have a different atlas for each suit

#

if you go to the link there's also a way to set pos_style to a table, which lets you set each card's position individually

#

it's a bit tedious but it'll let you keep your atlas as-is

obtuse silo
#

so how would I write the syntax for that?

#

Because the wiki just has the thing down as [rank]

#

Would i just list each rank in a brace?

frosty rampart
#

i havent messed with it but my guess is

pos_style = {
  ["Jack"] = { atlas = (insert atlas here), pos = { x = 0, y = 1 } },
  ["Queen"] = ...
  ...
}
obtuse silo
#

alright i'll try that

obtuse silo
frosty rampart
#

fairly sure you can ignore it

#

but i'll go dig into deckskin code to see what's up

obtuse silo
#

well
it does work

frosty rampart
#

yea that's just an alignment issue in your image i think

obtuse silo
#

yeah

frosty rampart
#

glad the code worked tho

obtuse silo
#

noticed it

#

thank youuuu
i like the susie pfp

frosty rampart
#

thanks :3

fair osprey
#

anyone got any experience with effects that upgrade a poker hand that isn't the one you are playing? Got a joker that upgrades a different poker hand every time a straight is played. It's coming up with a ton of ui problems

#

are there any mods that do this?

wintry solar
fair osprey
#

calculate = function(self, card, context)
if context.before and next(context.poker_hands['Straight']) and card.ability.extra.used == false then
level_up_hand(false, Find_Most_Played_Hand('Straight'))
end

    if context.end_of_round then
        card.ability.extra.used = false
    end
end
#

trying to get the animation to run, but it ends up blending with the hand that's being played

#

adding the wrong figures to the display

wintry solar
#

okay, so you want to return some stuff instead, something like this would always upgrade a Pair, for example

return {
  level_up = 1,
  level_up_hand = 'Pair'
}```
fair osprey
#

ffs, I need to stop using other mods as a basis and just experiment with SMODS itself

#

ty

#

much appreciated

gaunt folio
#

yay balance?

#

placeholder for now as im basically taking some code from vanillaremade

zealous glen
sonic cedar
#

why is the value nil? if i set _played to 0 if it's nil before checking for unlock will that fix it?

#

guess ill just nilcheck for now

red flower
quasi shard
#

s

red flower
cursive gazelle
#

i've been summoned

sonic cedar
cursive gazelle
#

hi toma

sonic cedar
#

hi s

red flower
robust marsh
sonic cedar
zealous glen
# robust marsh yeap..

I can suggest a temporary solution, and I have to imagine someone knows a permanent one

#

But it's weird that happens

red flower
sonic cedar
#

kay ill check

robust marsh
daring fern
#

zealous glen
#

and by moving I mean

#

just in the background

#

no animation

robust marsh
zealous glen
robust marsh
#

should work

zealous glen
#

I think it's something like

#

CardArea.draw_from

#

or draw_to

sonic cedar
red flower
#

yw

daring scroll
#

Getting an error that "has_seal" is reading as a nil value, but "has_enhancement" works

#
config = {
        extra = {
            chips = 80,
            mult = 10,
            Xmult = 1
        }
    },
    loc_vars = function(self, info_queue, card)
        local enhance_count = 0
        local seal_count = 0
        local edition_count = 0
        if G.playing_cards then
            for _, playing_card in ipairs(G.playing_cards) do
                if SMODS.has_enhancement(playing_card) then
                    enhance_count = enhance_count + 1
                end
                if SMODS.has_seal(playing_card) then
                    seal_count = seal_count + 1
                end
                if SMODS.has_edition(playing_card) then
                    edition_count = edition_count + 1
                end
            end
        end
        return {
            vars = {
                card.ability.extra.chips,
                card.ability.extra.mult,
                card.ability.extra.Xmult,
                card.ability.extra.chips * enhance_count,
                card.ability.extra.mult * seal_count,
                1 + card.ability.extra.Xmult * edition_count
            }
        }
    end,
    calculate = function(self, card, context)
        if context.joker_main then
            local enhance_count = 0
            local seal_count = 0
            local edition_count = 0
            if G.playing_cards then
                for _, playing_card in ipairs(G.playing_cards) do
                    if SMODS.has_enhancement(playing_card) then
                        enhance_count = enhance_count + 1
                    end
                    if SMODS.has_seal(playing_card) then
                        seal_count = seal_count + 1
                    end
                    if SMODS.has_edition(playing_card) then
                        edition_count = edition_count + 1
                    end
                end
            end
            return {
                chip_mod = card.ability.extra.chips * enhance_count,
                mult_mod = card.ability.extra.chips * seal_count,
                Xmult = card.ability.extra.Xmult * edition_count
            }
        end
    end,
    in_pool = function(self, args)
        for _, playing_card in ipairs(G.playing_cards or {}) do
            if SMODS.has_enhancement(playing_card) then
                return true
            end
            if SMODS.has_seal(playing_card) then
                return true
            end
            if SMODS.has_edition(playing_card) then
                return true
            end
        end
        return false
    end
#

based on the remade Steel Joker

red flower
#

has seal and has edition dont exist

daring scroll
#

ahhhhh

daring scroll
#

I misread. It's card.seal and card.edition, correct?

red flower
#

yeah

#

also has_enhancement doesnt work like that

modern kindle
# daring fern

my only thought would be to just have it not draw with specific states or menus up or something, im not super familiar with drawstep or anythin like that though

daring scroll
daring fern
red flower
sonic cedar
#

are all the contexts stored in a table? if so, where is it?

sonic cedar
#

oh hi somecom
ill just have to make them manually then?

#

the table/list

slim ferry
#

pretty sure you can find all of them in the smods lsp def

sonic cedar
#

i see! thanks
was asking if they already existed as a table, but its ok ill just make it myself

wintry solar
#

what do you need a table of all the contexts for?

sonic cedar
robust marsh
sonic cedar
#

(if it ends up working)

wintry solar
#

I don't even know what you're looking for 🤣 a lot of contexts are dynamic

zealous glen
#

about your issue

sonic cedar
slim ferry
#

If you want to check if theres any context active you could probably just do smth like #context > 0, idk if thats a good idea though

robust marsh
sonic cedar
#

i forgot to use math.floor whoops

daring fern
versed swan
#

How do you get the information of a vanilla atlas?

#

nvm got it, G.ASSET_ATLAS

sonic cedar
#

unless...

daring scroll
#

Is there a quick way for me to say "every enhanced card" or do I need to have it look for every individual enhancement? As of right now, it's giving an error that it's recieving a boolean and expecting a table

if next(SMODS.has_enhancement(playing_card)) then
    enhance_count = enhance_count + 1
end
daring fern
daring scroll
#

I have that, it's still giving me that error

daring fern
wind steppe
#

if i have a card, how would i find out if that card is being played or held in hand?

daring scroll
#

I need to learn to fuckin read 💀

daring scroll
#

thanks lmfao

wind steppe
sonic cedar
#

well that depends actually

#

is this calculate

wind steppe
#

yes

#

but the card's not being calculated

sonic cedar
#

do context.cardarea then

#

G.play for being played, and G.hand for

#

well

#

being in hand

wind steppe
#

no it happens to be in calculate but im not calculating the card

#

its in context.money_altered

wintry solar
#

what are you trying to do

wind steppe
#

i get a random card and need to know where it is

wintry solar
#

giving the full effect is much more helpful than vague hints if you want help

wind steppe
#

i need to find out if its in hand or played so i can flip it if it is

#

and then unflip it after the conversion

wintry solar
#

check card.area == G.play/card.area == G.hand

sonic cedar
#

so then just use card.area instead

wintry solar
#

though I don't see why those areas would be different cases

wind steppe
#

g.play and g.hand are treated the same

#

i just need to know if you can see it mostly

sonic cedar
#

do info_queues have to use keys for their titles? or can they be titled like with a string? im not the best at them so forgive me if this is obvious

like if i wanted a tooltip that went
Current Phase:
[actual information]

wind steppe
wind steppe
#

youd put that in Other in the localization

sonic cedar
#

ohhhh okay

spare atlas
wind steppe
#

and then access it like this
info_queue[#info_queue + 1] = { set = "Other", key = "para_to_big_goldseal"}

spare atlas
#

when i tried to select a deck

wind steppe
#

replace para_to_big_goldseal with your tooltip

rotund sable
sonic cedar
daring scroll
#

I'm now getting this error. Here's my joker's code for ref, based on Steel Joker

SMODS.Joker {
    key = 'thunderlord',
    loc_txt = {
        name = "Thunderlord",
        text = {
            "Gains {C:blue}+#1#{} Chips for every {C:enhanced}Enhancement{} in deck,",
            "{C:red}+#2#{} Mult for every {C:attention}Seal{} in deck,",
            "and {X:red,C:white}X#3#{} Mult for every {C:dark_edition}Edition{} in deck",
            "{C:inactive}(Currently{} {C:blue}+#4#{} {C:inactive}Chips,{} {C:red}+#5#{} {C:inactive}Mult, and{} {X:red,C:white}X#6#{} {C:inactive}Mult){}"
        }
    },
    blueprint_compat = true,
    perishable_compat = true,
    eternal_compat = true,
    rarity = 4,
    cost = 20,
    atlas = 'JokerPackOne',
    pos = { x = 1, y = 0 },
    soul_pos = { x = 1, y = 1 },
    config = {
        extra = {
            chips = 80,
            mult = 10,
            Xmult = 1
        }
    },
    loc_vars = function(self, info_queue, card)
        local enhance_count = 0
        local seal_count = 0
        local edition_count = 0
        if G.playing_cards then
            for _, playing_card in ipairs(G.playing_cards or {}) do
                if next(SMODS.get_enhancement(playing_card)) then
                    enhance_count = enhance_count + 1
                end
                if playing_card.seal ~= nil then
                    seal_count = seal_count + 1
                end
                if playing_card.edition ~= nil then
                    edition_count = edition_count + 1
                end
            end
        end
        return {
            vars = {
                card.ability.extra.chips,
                card.ability.extra.mult,
                card.ability.extra.Xmult,
                card.ability.extra.chips * enhance_count,
                card.ability.extra.mult * seal_count,
                1 + card.ability.extra.Xmult * edition_count
            }
        }
    end,
    calculate = function(self, card, context)
        if context.joker_main then
            local enhance_count = 0
            local seal_count = 0
            local edition_count = 0
            if G.playing_cards then
                for _, playing_card in ipairs(G.playing_cards or {}) do
                    if next(SMODS.get_enhancement(playing_card)) then
                        enhance_count = enhance_count + 1
                    end
                    if playing_card.seal ~= nil then
                        seal_count = seal_count + 1
                    end
                    if playing_card.edition ~= nil then
                        edition_count = edition_count + 1
                    end
                end
            end
            return {
                chip_mod = card.ability.extra.chips * enhance_count,
                mult_mod = card.ability.extra.chips * seal_count,
                Xmult = 1 + card.ability.extra.Xmult * edition_count
            }
        end
    end,
    in_pool = function(self, args)
        for _, playing_card in ipairs(G.playing_cards or {}) do
            if next(SMODS.get_enhancement(playing_card)) then
                return true
            end
            if playing_card.seal ~= nil then
                return true
            end
            if playing_card.edition ~= nil then
                return true
            end
        end
        return false
    end
}
wind steppe
#

not get_enhancement

daring scroll
#

illiteracy hits again

spare atlas
#

is absolutely nobody currently talking

exotic hedge
#

Smh

#

Why’d you delete the ping 😭

wintry solar
#

you were too fast 😭

spare atlas
#

just realized there wasnt even a shader

#

i hate you "none" dropdown option you betrayed me

#

Ahh, even with the edition set it still says nil

#

Is anyone even listening

#

Oh wait, Jokerf*rge doesn't even have a joker edition effect

wide chasm
#
calculate = function(self, card, context)
        if context.first_hand_drawn and not context.blueprint then
            local eval = function() return G.GAME.current_round.hands_played == 0 and not G.RESET_JIGGLES end
            juice_card_until(card, eval, true)
        end
        if context.discard and not context.blueprint and
            G.GAME.current_round.discards_used <= 0 and #context.full_hand == 1 then 
                local card_rank = context.hand_card:get_id()
                local tarot_cards = {
                    [14] = "c_magician", [2] = "c_high_priestess", [3] = "c_empress",
                    [4] = "c_emperor", [5] = "c_heirophant", [6] = "c_lovers",
                    [7] = "c_chariot", [8] = "c_justice", [9] = "c_hermit",
                    [10] = "c_wheel_of_fortune", [11] = "c_strength",
                    [12] = "c_hanged_man", [13] = "c_death"
                }
                if tarot_cards[card_rank] then
                    G.GAME.consumeable_buffer = G.GAME.consumeable_buffer + 1
                    G.E_MANAGER:add_event(Event({
                        func = (function()
                            SMODS.add_card {
                                set = 'Tarot',
                                key = tarot_cards[card_rank],
                            }
                            G.GAME.consumeable_buffer = 0
                            return true
                        end)
                    }))
                    remove = true
            end
        end
    end

is this a viable way of checking each tarot's number?

#

like this is supposed to look at the number of the hand played and correspond it to the numbers on the tarot cards

#

but doesnt seem to be working

frosty dock
wide chasm
#

well i tried hand_card alone and it didnt work

frosty dock
#

don't you want context.other_card here

wide chasm
#

so i tried putting context. before

frosty dock
#

context.hand_card isn't a thing

wide chasm
#

oh alr

frosty dock
#

try reading the docs, it can save you some headaches haha

#

-# i should note that the calculation docs are vastly incomplete when it comes to newer features

wide chasm
#

u got a link to that?

frosty dock
wide chasm
#

aight ty

#

ill check if it works

#

oh

#

uhh

#

its doing it on a discard?

gusty iron
#

decided to rework my 6-card selection joker, thoughts?

frosty dock
#

yeah that's what you wrote?

#

you have context.discard

#

obviously it's gonna be on discard

wide chasm
#

oh lmao

frosty dock
#

do you want it on play?

wide chasm
#

yeah i did

#

mustve confused them when typing it? idk

frosty dock
#

did you also want the card to get destroyed? i see a rogue remove = true but it's not the right format

wide chasm
#

not really

#

i think the destroyed is there cuz i was looking at the trading card code

frosty dock
#

mkay then what you should do depends a bit on what exactly you want the effect to be

#

if it should give the tarot when the card is scored, you should use context.cardarea == G.play and context.individual

steady smelt
#

i've added a new deckskin palette to all suits, how can I add options for that palette for each existing collab?

wide chasm
frosty dock
#

yeah then replace context.discard with that

wide chasm
#

alr

frosty dock
#

-# and remove the rogue remove = true, it doesn't cause any harm in isolation but you're setting a global variable for no reason

wide chasm
#

aight

#

alr it works tysm dude 🙏

frosty dock
#

np

sonic cedar
#

how do you print to the lovely console again
for log checking purposes

warm umbra
#

how would i make code in a joker run every tick

next timber
#

ok im stumped, im trying to make it so that all unscored cards instead get retriggered 3 times, but i can't figure out which context i should be resetting the retrigger_targets array to {} in

frosty rampart
sonic cedar
warm umbra
sonic cedar
frosty rampart
#

oh lmao
uhhh still worth a shot, i don't see any reason why it wouldn't work in just the lovely log

sonic cedar
#

k

lament agate
#

is it possible for a voucher to play a custom sound when redeemed

warm umbra
#

how do i add money and detect how much money the player has

frosty dock
frosty rampart
wide chasm
#

Xnil mult??

manic rune
wide chasm
#

loc_vars = function(self, Xmult, xmult_gain)

next timber
#

wrong

manic rune
#

well yes thats wrong

next timber
#

it should be uhh gimme a sec

manic rune
#

can i see your joker's config

wide chasm
#

uh the config is kinda empty

#

that may be the issue huh

manic rune
#

does it have nothing

wide chasm
#

yep

next timber
#
loc_vars = function(self,info_queue,card)
  return {
    vars = {
      card.ability.x_mult,
      card.ability.extra.xmult_gain
    }
  }
end

but in the vars table they should be valid values in your joker's config table

frosty dock
#

i once again ask you to read the docs before you blindly do stuff

next timber
#

this example assumes you have

config = {
  x_mult = 1,
  extra = { xmult_gain = 0.25 }
}
wide chasm
#

alright

next timber
#

or smth like that

wide chasm
#

other thing

#

wait no let me look at the docs i have learned from my mistakes

warm umbra
daring fern
#

Also context.cardarea == "unscored" exists.

next timber
#

im.. not trying to put cards in cards?? wdym

daring fern
next timber
#

where

daring fern
next timber
#

it worked for another joker that does a similar thing so idk 🤷‍♀️

#

but on that joker i only needed to target a single card whereas here i need to target every unscored card

daring fern
next timber
#

yeah the effect is that unscored cards score AND are retriggered 3 times, but normal scoring cards dont retrigger, which is why im trying and failing to keep track of which ones were unscoring

daring fern
next timber
#

i mean it also should affect debuffed cards but. ill figure this out first lol

#

why do i need to hook score_card

#

surely theres gotta be a better way to keep track of which cards were unscored

daring fern
next timber
#

im confused

#

why wouldn't add_to_hand work

#

it works for one of my other jokers just fine

daring fern
warm umbra
#

how do i prevent code in an update function from running in the collection

next timber
#

nah im fine with it just working like how splash does

daring fern
wide chasm
daring fern
next timber
#

and how would i do that

daring fern
next timber
#

yeah ok that works

#

thx

daring fern
#

You would also have to remove the flag.

gusty iron
#

i love adding compat with other mods

swear word warning 😨

next timber
#

so i could either patch the game so it always gives the unscored flag to unscoring cards incase i wanna use this mechanic for more jokers, orrrrr i could just set the flag to false if they're scoring and have it only work with this joker

#

im lazy and wanna be done with this joker. i choose option 2

worthy flicker
next timber
#

ok so now why isn't

if context.individual and context.cardarea == G.play then
  if context.other_card.debuff then
    context.other_card.hodge_unscored = true
    card:set_debuff(false)
  end
end

doing anything

#

fuck

#

nvm im stupid i see it now

distant junco
#

if context.playing_card_added and context.other_card:get_id() == 7
would this work?

ocean sinew
plush mica
#

is this the place where i beg for assistance

distant junco
#

yeah

plush mica
#

everytime i play a card this happens

#

also talisman wont change config when i change it in-game

#

or maybe i just dont know how to restart the game?)

next timber
gusty iron
distant junco
feral tree
#

is it possible to detect if you're playing a small or big blind?

next timber
#

so, SMODS.debuff_card(context.other_card,false)?

distant junco
#

no

next timber
#

oh

distant junco
#

what are you trying to do

next timber
#

if a playing card is debuffed, undebuff it and set hodge_unscored on it to true

#

preferably before context.repetition is calculated

distant junco
#

im not sure if thats even possible tbh because debuffing is only called at certain points in the game but i could be wrong about that

next timber
#

wdym its only called at certain points

#

does context.individual not even touch debuffed cards

distant junco
#

debuffs are (afaik) only updated at the start of the round and the start of the shop

next timber
#

i can patch a custom context for that

#

so you dont think jokers setting debuffs is even possible

#

that sounds. odd

#

i mean clearly it must be tons of mods do it

distant junco
#

as i said i could be wrong but im pretty sure thats what i was told

next timber
#

well then why does smods even have SMODS.debuff_cards if you cant even use it. that makes no sense

#

im gonna investigate

distant junco
next timber
#

ok well i jsut did it with debugplus lmao

distant junco
#

idfk

#

thats what i was told

next timber
#

eval G.hand.cards[1]:set_debuff(false) worked fine for me

ocean sinew
gusty iron
ocean sinew
#

How you know a word is swear word

gusty iron
#

if the word isnt a swear, text will say "Hand Will Not Score"

next timber
#

ok im gonna patch in a context.debuffed_individual

distant junco
#

no how the game knows its a swear word

gusty iron
#

OH

#

i have a pre-defined table

ocean sinew
#

what abt other languages

#

is it in there too

plush mica
gusty iron
#

aikoyori's letter deck is only english letters

distant junco
#

can i add some to the table

ocean sinew
#

Btw can't you just dump the swear words in a dictionary into a txt

#

It's easier than writing every single swear word

distant junco
gusty iron
#

thats what i did

#

i have a table full of swearwords based off of a list i found online

plush mica
#

i can launch the game but whenever i play a card

#

it crashes

distant junco
#

try disabling them one by one

#

and then reinstall the mod that crashes

plush mica
#

im fairly certain its talisman

distant junco
#

reinstall talisman then

plush mica
#

btw i reinstalled it and it did the same th i9ng

distant junco
#

idk i dont use talisman

gusty iron
distant junco
#
######## #### ###### ######## ###### #### #### ######
gusty iron
#

TRUE

#

should i add the brainrot "swears" into the table

#

like job

distant junco
#

w*man

hallow slate
#

How would I repeat discard effects?

urban wasp
#

how would i make a deck that starts the player off on a specific ante?

urban wasp
# red flower https://discord.com/channels/1116389027176787968/1233186615086813277/14041913026...

hmm what did i do wrong

SMODS.Back {
    key = "glyphic",
    name = "Glyphic Deck",
    config = { ante = 0 },
    atlas = "crp_placeholder",
    pos = { x = 4, y = 2 },
    loc_vars = function(self, info_queue)
        return { vars = { lenient_bignum(self.config.ante) } }
    end,
    apply = function(self, back)
        G.GAME.round_resets.ante = self.config.ante
        G.GAME.round_resets.blind_ante = G.GAME.round_resets.ante
    end,
    crp_credits = {
        idea = { "Glitchkat10" },
        code = { "Glitchkat10" }
    }
}
#

wait a minute the blinds are on ante 0

#

but it doesn't display ante 0 in the ui

long sun
#

currently, i'm using G.GAME.modifiers.booster_size_mod to modify the sizes of booster packs

#

is there a way to modify the sizes of one particular type of booster pack? (eg. Buffoon)

daring fern
long sun
daring scroll
#

Coding a Joker that gains XMult when tarot cards are used, based on the tarot number. Does anyone know of a mod I can study the code of that'd help?

#

Like stuff that has effects based on different cards inside the tarot group or other groups

red flower
feral tree
#

is there no vanilla remade for the skip tags??

daring scroll
#

Been brainstorming thru Vanilla Remade and and Mod Dev QNA

red flower
red flower
feral tree
red flower
#

you're probably on an old commit

#

check that it says main here

feral tree
#

oh

warm umbra
#

how do i replace the vanilla music tracks, i looked through the SMODS.Sound wiki but im confused

gusty iron
#

how would i access another mod's folder inside of my mod?