#💻・modding-dev

1 messages · Page 529 of 1

stiff locust
#

this is not working and I do not know why it is not working

modern kindle
#
 local profile = G.PROFILES[G.SETTINGS.profile]
        local usage_data = profile.joker_usage
        
        print("=== JOKER USAGE DATA ===")
        
        local most_used_key = nil
        local max_count = -1
        
        -- Print all joker usage data
        for k, v in pairs(usage_data) do
            local count = (type(v) == "table" and v.count) or 0
            print("Joker: " .. tostring(k) .. " | Count: " .. tostring(count))
            
            if count > max_count then
                most_used_key = k
                max_count = count
            end
        end
        
        print("========================")
        print("Most used joker: " .. tostring(most_used_key) .. " with " .. tostring(max_count) .. " uses")
        print("========================")

these printed out my values correctly,

stiff locust
#

i got no idea then

modern kindle
#

without knowin what youre wanting to do i dont really know how to help you, because for me i displayed the number fine

frigid cargo
#

May any kind souls spare me some help for my eternal struggle? (i dont have madness)

stiff locust
#

but i can't get the count value and I don't understand why

#

-# the latter i know how to do but if anyone already has code for that so i dont have to write it that would be cool

modern kindle
# stiff locust i want to do 2 different things get the count value for splash set a boolean fo...
    local profile = G.PROFILES[G.SETTINGS.profile]
    local usage_data = profile.joker_usage
    
    -- Create sorted list of all jokers by usage count
    local joker_counts = {}
    for k, v in pairs(usage_data) do
        local count = (type(v) == "table" and v.count) or 0
        table.insert(joker_counts, {key = k, count = count})
    end
    
    -- Sort by count (highest first)
    table.sort(joker_counts, function(a, b) return a.count > b.count end)
    
    -- Get top 10
    local top_10 = {}
    for i = 1, math.min(10, #joker_counts) do
        table.insert(top_10, joker_counts[i])
    end
    
    print("=== TOP 10 JOKERS ===")
    for i, joker_data in ipairs(top_10) do
        print(i .. ". " .. joker_data.key .. " (" .. joker_data.count .. " uses)")
    end
    print("====================")
    
    -- Check if j_splash is in top 10 AND find its overall position
    local splash_in_top_10 = false
    local splash_position = nil
    local splash_overall_position = nil
    
    -- Find j_splash's overall position in the full sorted list
    for i, joker_data in ipairs(joker_counts) do
        if joker_data.key == "j_splash" then
            splash_overall_position = i
            break
        end
    end
    
    -- Check if it's in top 10
    for i, joker_data in ipairs(top_10) do
        if joker_data.key == "j_splash" then
            splash_in_top_10 = true
            splash_position = i
            break
        end
    end
    
    print("=== J_SPLASH STATUS ===")
    if splash_in_top_10 then
        print("j_splash IS in top 10 at position: " .. splash_position)
        print("Boolean splash_in_top_10 = TRUE")
    else
        if splash_overall_position then
            print("j_splash is NOT in top 10")
            print("j_splash overall position: " .. splash_overall_position .. " out of " .. #joker_counts)
        else
            print("j_splash was never used (not found in usage data)")
        end
        print("Boolean splash_in_top_10 = FALSE")
    end
    print("=======================")
    
    local joker_to_spawn = nil
    
    if #top_10 > 0 then
        joker_to_spawn = pseudorandom_element(top_10, pseudoseed("top10")).key
    else
        joker_to_spawn = "j_joker" -- In case this shit failed
    end
    
    print("Spawning joker: " .. tostring(joker_to_spawn))
    
    if joker_to_spawn then
        local fav_joker = SMODS.add_card({
            type = 'Joker',
            key = joker_to_spawn
        })
        
        fav_joker.area = G.jokers
        fav_joker.ability.force_focus = true
        
        local message = splash_in_top_10 and "Top 10 Joker (Splash detected)!" or "Top 10 Joker summoned!"
        
        card_eval_status_text(fav_joker, 'extra', nil, nil, nil, {
            message = message,
            colour = splash_in_top_10 and G.C.RED or G.C.GOLD
        })
    end
end,

i was too lazy to change it from a consumable so take from this whatever you need, but it displayed the following for me

stiff locust
#

woah

modern kindle
#

and the card stats in question so theyre clearly correct

stiff locust
#

if your exact code doesn't work on mine i'm gonna drain

#

also your top 10 is

#

quite interesting

modern kindle
#

thanks lmao

stiff locust
#

gros michel and photograph huh

modern kindle
#

let me show you why photo is

#

playing kings and queens free repeated x2 mult

#

since i ahve a blackjack poker hand and you can just do ace and king, makes life a dream

#

hi smt

#

why you thinkin me am i not smart enough

stiff locust
#

that joker as a common

#

feels crazy

modern kindle
#

see it doesnt feel like its worth an uncommon because alone it isnt good at all

#

i need to eventually make a rarity between common and uncommon

stiff locust
#

name it ncommon

modern kindle
#

but debuffing every card besides your king or queen is a huge loss

#

means no other cards with editions, enhancements, etc work for you

stiff locust
#

hmmm

modern kindle
#

so its synergy relies pretty much on its retriggers and things that will mult with it

stiff locust
#

my top 10 probably won't have any surprises

modern kindle
#

has the code worked out for you or is your build somehow violently broken

modern kindle
stiff locust
#

i've been removing the code for spawning a random top10 joker cause i don't need to do that

modern kindle
#

ye sorry, i was just editing my spawn most used joker consumable

#

too lazy to make a whole new one

#

(it wouldve been 30 seconds more)

stiff locust
#

oh hey it worked

modern kindle
#

epic

stiff locust
#

I still don't know why it didn't work when I tried to do it

modern kindle
#

now say im co creator of all of your mods and i get 50% of all of your future earnings in this world

stiff locust
#

i credited you in the comments above the function that's what i usually do

#

would people consider that enough

modern kindle
#

i imagine so, i personally dont care if im credited or not but it makes me smile if i come across being credited

stiff locust
#

it's in there for you when i make a mod release in 3 weeks

modern kindle
#

huge

stiff locust
#

i have so much shit to do

modern kindle
#

one day ill release my mod when my artists are not sitting around staring at their screens

#

id be ready for a release by now if not for that

stiff locust
#

i'm just procrastinating because I need to do a huge bugfix to my most complex joker

modern kindle
#

ive fixed most of my issues but i have not met a lazier class of creator than that of the artist

#

ive even tried bribing them with food delivery and they accepted the food to only still not do art im going to explode

stiff locust
modern kindle
#

probably, but i can only speak on the artists i know which is like 5 or so

#

one can only ever speak on their own experience

crystal perch
#

anyone know why i keep crashing when i try to detect if the current highlighted joker(s) have eternal? i've tried pretty much every permutation i can think under the moon and i have no idea why i'm still getting crashes

stiff locust
#

why not just check card.ability.eternal

crystal perch
#

doesn't work

stiff locust
#

why not

crystal perch
#

i don't know

#

doing if card.ability.eternal then still does a crash

#

scratch that it doesn't crash but it doesn't work

#

even other_card.ability.eternal doesn't work

#

no idea why it was crashing earlier, probably because i still had or other_card.ability.perishable or other_card.ability.rental uncommented

subtle merlin
crystal perch
#

let me try iterating

#

that did it thank you

frigid cargo
#

bump

modern kindle
#

Im sorry I haven't worked with rarities yet they're one of my blind spots

frigid cargo
#

aw ok

#

actually you might be able to help, im just having struggle with localization

subtle merlin
#

in the code provided there isnt a loc_txt; if there is a localization file then it's done improperly

frigid cargo
#

oh should i send my localization of where i put it?

modern kindle
#

My best advice for localization is to use the localization file, and use the dump_loc in your metadata to make one easily
Just be sure to disable all other mods

frigid cargo
# subtle merlin i have, allow me:
    misc = {
        challenge_name = {
            c_btct_PipisChallenge_1 = "Pipis",
        },
        dictionary = {
            k_shape_booster_group = "Geometric Pack",
            k_btct_booster_group = "Batrocities Pack",
            k_btct_Elite = "Elite",
        },
        labels = {
            k_btct_Elite = "Elite",
        }
    }

the boosters work but challenges and rarities dont...

modern kindle
#

What do you mean

#

I said everything

frigid cargo
#

oh so it just removes localization after or smth?

subtle merlin
#

at least from what i saw in my 10 seconds of looking (ive never used these before)

modern kindle
#

It creates a dumped file of all localization entries you'd use in a localization file
Which the localization file is used for ease of translating to other languages
But you'd have to remove your own loc_txt from each item that has it afterwards

frigid cargo
modern kindle
#

It dumps all of them
So after it was dumped you'd just remove the loc_txt from whatever has it, if only jokers have it then you'd only remove it from jokers

frigid cargo
#

oh i see thanks

velvet ingot
#

why is this crashing?

    key = 'moon', --joker key
    loc_txt = { -- local text
        name = 'Moon',
        text = {
          'Gains X1 mult everytime a hermit card is used'
        },
        --[[unlock = {
            'Be {C:legendary}cool{}',
        }]]
    },
    atlas = 'Jokers', --atlas' key
    rarity = 1, --rarity: 1 = Common, 2 = Uncommon, 3 = Rare, 4 = Legendary
    --soul_pos = { x = 0, y = 0 },
    cost = 5, --cost
    unlocked = true, --where it is unlocked or not: if true, 
    discovered = true, --whether or not it starts discovered
    blueprint_compat = true, --can it be blueprinted/brainstormed/other
    eternal_compat = false, --can it be eternal
    perishable_compat = false, --can it be perishable
    pos = {x = 0, y = 0},
    
    if context.using_consumeable and context.consumeable.config.center.key == 'c_hermit' then
        card.ability.extra.xmult = (card.ability.extra.xmult or 1) + 1
    end

    if context.joker_main then
        return { xmult = card.ability.extra.xmult }
    end
}
frosty rampart
#

the crash dump would be helpful

frosty rampart
#

oh actually yea you need that code in the calculate function

subtle merlin
velvet ingot
#

i'm VERY new to modding so thanks!

frosty rampart
velvet ingot
#

how do I do it though

modern kindle
subtle merlin
modern kindle
#

Yumby blu text

subtle merlin
#

oh right i came here bc i had a question, too, i forgot lol

modern kindle
#

No question allowed

subtle merlin
#

3:

modern kindle
#

Go ahead you can ask ig...

subtle merlin
#

yippee!!

frigid cargo
subtle merlin
#

I have i have a joker that can be sold repeatedly and a hook that i want to limit the amount of times that joker can be sold per round. The issue I'm running into is that i can't access the variable that limits the sells in the hook as that variable is tied to the joker

frigid cargo
#

I should really go to sleep, my sleep schedule is horrible

subtle merlin
#

my brain hurts from trying to solve this :3

velvet ingot
#

this is still not working

    calculate = function(self, card, context)
        if context.using_consumeable and context.consumeable.config.center.key == 'c_hermit' then
            card.ability.extra.xmult = (card.ability.extra.xmult or 1) + 1
        end
        if context.joker_main then
            return { xmult = card.ability.extra.xmult }
    end,
}
subtle merlin
#

-# i now feel bad for the people that live in this channel

velvet ingot
#

now i'm getting this error when playing a card

subtle merlin
#

how did i miss that- you're calling card.ability.extra.xmult without setting up a config

velvet ingot
#

where do I place that in my script?

subtle merlin
#

Anywhere above your calculate.
-# (technically above all functions but you only have the calculate so it's irrelevant)
Again: look at other mods for reference, i cannot stress how much it helps early on.

modern kindle
#

Look at other mods always
Tends to be a huge help
Most of the time something you want to do has been similarly done before

#

I sometimes still look at other mods, even if its not super often

subtle merlin
#

i do a lot but mainly bc i love to sanity-check myself :3

velvet ingot
#

i'm back again and the joker is working now! I was just wondering how you add a "[currently ___ mult]" thingie at the bottom

subtle merlin
velvet ingot
#

ok thanks!

final jewel
#

What is the global for the ante

daring fern
final jewel
frigid cargo
#

Is it possible to make a joker be perishable in challenges or do i have to do stuff to make that work cause i cant find it in smods doc?

final jewel
#

This deck dont want to start it just keep calculing something infinitely I think

wintry solar
#

You need return true in your event function

final jewel
#

oh yeah lol

#

infinite hand size be like<

#

I like being Ante 108 and Round 4

#

I realy dont think my thingny works

#

do You guys know why it does that

wintry solar
#

You need and context.main_eval

subtle merlin
final jewel
wintry solar
#

Yeah there are lots of end of round contexts

subtle merlin
#

noted

subtle merlin
frigid cargo
#

True, but what if i just want the joker that i spawn at start be perishable?

subtle merlin
#

you could make the custom rule spawn that joker with the sticker ig? idk my mind is too preoccupied to do more than 5 minutes of work on this rn

wintry blade
#

Hello, I have a question. I’m making a joker that gives 50 chips for each queen played in the hand. I’ve read some mod code but I don’t understand what I’m doing wrong here.: config = {
extra = {
chip_gain = 50,

    }
},

calculate = function(self, card, context)
if context.main_scoring and context.cardarea == G.hand and not context.end_of_round and context.other_card:get_id() == 12 then

    card.ability.extra.chips = card.ability.extra.chips + card.ability.extra.chip_gain
    return {
        chips = card.ability.extra.chips
    }
end

end

frigid cargo
subtle merlin
daring fern
subtle merlin
#

oh shit yea it doesn't

daring fern
#

Also context.main_scoring isn't called for jokers.

wintry blade
wintry blade
foggy ginkgo
#

You only have chips_gain

#

Actually you don't need the adding thing either

#

If you're doing it how baron is you just need

    if context.individual and context.cardarea == G.hand and not context.end_of_round and context.other_card:get_id() == 12 then
        if context.other_card.debuff then
            return {
                message = localize('k_debuffed'),
                colour = G.C.RED
            }
        else
            return {
                chips = card.ability.extra.chips
            }
        end
    end
end,
#

Where each queen gives 50 chips

#

Wait played in hand as in hand area or the cards scored-

#

Sorry Violet I took over lmao

wintry blade
#

the card scored, i just realised im using the wrong joker for exampled

#

xD

foggy ginkgo
#

Then changed G.hand to G.play

subtle merlin
foggy ginkgo
#

Hope you get better lol

wintry blade
#

tanks for the help anyway :p

foggy ginkgo
#

Anytime

#

Except idk how to help

subtle merlin
foggy ginkgo
#

Tell me when you finish it <3

subtle merlin
wintry blade
#

hey, my joker works! tanks guys :3

foggy ginkgo
foggy ginkgo
#

Actually Violet, later ofc, but could you explain the concept of the joker

#

I'm half getting it

velvet ingot
#

I know someone asked this like half an hour ago, but how would you make a joker always appear eternal? I tried stickers = {'eternal'} but that didn't seem to work

feral tree
#

speaking of eternals, How do i have a deck spawn a specific modded joker with the eternal sticker?

rotund sable
#

In the add_to_deck

feral tree
rotund sable
#

What's that if statement?

#

Otherwise if it works then it works

feral tree
#

It's eternal for a set amount of rounds before the eternal sticker is removed and it can be sold

rotund sable
#

add_to_deck is only called when buying the joker

#

Iirc

feral tree
#

No it's when the joker is obtained at all

rotund sable
#

Yeah I meant that

#

When jokers spawn overall

#

Collection, shop etc

feral tree
#

Think card:set_eternal(true) is for something adding a joker with an eternal sticker actually

#

yeah i think card: is used for modifying other jokers or the joker that is using card:

rotund sable
#

card in functions is generally the card that the function is in

feral tree
#

not always

#

you can use card: or some variation of it to modify other cards

feral tree
#

wait

#

oh damn i think the answers in that convo

#

that didn't work so im once again asking for help

rotund sable
velvet ingot
#

how do I make a custom enhancement?

velvet ingot
#

i looked at that site, and I am quite new to programming in any language other that gdscript so i'm a bit confused on how to actually create the enhancement, the whole thing looks a bit confusing

rotund sable
#

You can look at vanilla remade

#

To see how the vanilla ones are made

velvet ingot
#

thanks! that will be very helpful

wispy falcon
#

Where go custom consumables go in the localization file?

rotund sable
wispy falcon
#

I forgot a = TwT

gaunt coral
#

is there any way to add a mult perma bonus to a card, like hiker adds +5 chips to cards ? i tried just using the hiker re-implementation, but i changed it a little bit to this, but it still adds chips as a perma bonus

rotund sable
paper elbow
#

I figured out what I was doing wrong. It was prefixing my suits with my mod. Which makes perfect sense, ofc, but I for some reason didn't expect it to do that. My modded suit changers are now working. 👍

gaunt coral
#

oh my god im blind

#

happens when you code at 2am ig

wispy falcon
#

What does this mean?

rotund sable
wispy falcon
rotund sable
#

SMODS.ConsumableType iirc

velvet ingot
#

tryna make a card like marble joker, but with custom gnome cards instead but it just crashes :( (I am very new to modding btw)
here is code for gnome cards:

SMODS.Enhancement {
    key = 'gnome',
    pos = { x = 1, y = 0 },
    config = { bonus = 500 },
    replace_base_card = true,
    no_rank = true,
    no_suit = true,
    always_scores = true,
    loc_vars = function(self, info_queue, card)
        return { vars = { card.ability.bonus } }
    end,
}
wispy falcon
daring fern
rotund sable
velvet ingot
#

working now thanks!

#

but how do I stop it from being called ERROR in game

pastel kernel
#

Defining Object Type

velvet ingot
#

and have the texture I want

pastel kernel
#

sorry i mean consumable

#

How do i define my new consumable type

rotund sable
wispy falcon
#

Wait, I have to add that consumable Type to the localization too, right?

daring fern
wispy falcon
pastel kernel
#

ok what about putting it in the collection

rotund sable
#

Handles it automatically I think

rotund sable
rotund sable
wispy falcon
#

What is dump loc?

rotund sable
#

.

pastel kernel
red flower
#

you can also just check where the localization is in vanillaremade

pastel kernel
#

wait objecttype or consumabletype?

rotund sable
#

If you want to create a consumable set then use ConsumableType

pastel kernel
#

what's primary and secondary colour

rotund sable
gaunt coral
#

this is supposed to gain X0.2 mult when a wild card is scored, but for some reason it never scales ? im using the exact same logic in a different joker that scales when bonus cards are scored

#

i found it

#

theres a misspelling 😭

pastel kernel
#

hex code

rotund sable
#

Random?

pastel kernel
#

oh wait

#

hold on

#

how do i

wispy falcon
#

What does default do?

pastel kernel
#

give it a custom color

rotund sable
rotund sable
wispy falcon
#

Why does it always show this? I just can't find out what the problem is

rotund sable
#

Can you show the code?

#

Error is the localization

pastel kernel
rotund sable
#

Should be correct

wispy falcon
# rotund sable Can you show the code?

In my localization:

            c_void_chip = {
                name = "Void Chip",
                text = {
                    "Next {C: attention}hand gives",
                    "{C:chips}+#1# but you can",
                    "only play #2# cards"
                }
            }
        },```

In my dictonary:

```b_c_storm_tokens = "Tokens"```

and in my Labels:

```cstorm_tokens = "Tokens"```
rotund sable
rotund sable
#

Because you use both here

#

I suck at localization

pastel kernel
# daring fern No, remove the `#`

pools are in a separate file called pools.lua



-- Jokers Pool
SMODS.ObjectType{
    key = "bustjokers",
    default = "j_busterb_spinel",
    cards = {},
    inject = function(self)
        SMODS.ObjectType.inject(self)
    end,
}
-- Mechanical Cards
SMODS.ConsumableType{
    key = "mechanical",
    default = "c_busterb_offer",
    cards = {},
    collection_rows = { 4, 4 },
    primary_colour = HEX('40FF83'),
    secondary_colour = HEX('40FF83'),
    shop_rate = 0.05
}```
rotund sable
#

Stuck with loc_txt

wispy falcon
# rotund sable Is the key Tokens or tokens

This is my consumable code:

    key = "cstorm_Tokens",
    collection_rows = { 4, 5 },
    primary_colour = HEX ('000000'),
    secondary_colour = HEX ('ffffff'),
}

SMODS.Atlas({
    key = "void_chip",
    path = "void_chip.png",
    px = 71,
    py = 95
})

SMODS.Consumable{
    key = "void_chip",
    set = 'cstorm_Tokens',
    atlas = "void_chip",
    pos = { x = 0, y = 0},
    --config = {  },
    unlocked = true,
    discovered = true,
    cost = 5,
    
}```
paper elbow
#

I'm confused on how the loc_txt works

pastel kernel
#

How do I make an epileptic gradient

#

Like tuahngents

paper elbow
#

Right now I'm just trying to do it in-line as part of the object:

Leaves = SMODS.Suit {
    key = 'Leaves',
    card_key = 'L',
    pos = { y = 3 },
    ui_pos = { x = 3, y = 1 },
    loc_txt = {
        ['en-us'] = {
            name = "Leaves",
            plural = "Leaves",
            singular = "Leaf"
        }
    },
    keep_base_colours = true,
    hc_colour = HEX('3EA055'),
    lc_colour = HEX('3EA055')
}

I have made a localization file and copied the blank skeleton structure from SMODS docs, but I don't want to have to populate it yet. I would like to just be able to see the "Rank of Suit" description in-game, as it were.

gaunt coral
#

is there a context for when you gain or lose money

manic rune
#

no

daring fern
manic rune
#

you would need to hook to ease_dollars and create your own context there

#

a

gaunt coral
rotund sable
pastel kernel
#

Does anyone know where I can find templates for everything

#

Including gradients

placid star
pastel kernel
placid star
#

oh bepis can I get your ease event code?

manic rune
#

which one

#

the one for progress bars?

#

its a PR in smods, you should be able to find it

placid star
#

yeah my ease event goes (original value > nil > new value)

placid star
pastel kernel
#

so

#

where's the gradients

placid star
wispy falcon
placid star
#

all the stuff is there

pearl jacinth
#

i'm attempting something crazy
is this possible

daring fern
gaunt coral
#

how does one get an array of all played cards in a hand

manic rune
#

G.play.cards?

pearl jacinth
#

G.play.cards

velvet ingot
#

how do you do what cloud 9 does with nines in deck but with suits instead?

manic rune
#

instead of :get_id() == 9, :is_suit("suit")

pearl jacinth
velvet ingot
manic rune
#

:is_suit, and its "Hearts"

velvet ingot
pearl jacinth
#

how do i get a list of mods installed

cursive gazelle
red flower
manic rune
#

wait nvm im blind

#

scrap that

#

hm

#

i, have no clue

#

does it not give you any money at payout screen?

velvet ingot
#

yeah

#

none

#

wait its working now!

manic rune
#

nice

cursive gazelle
#

any hand ?

dreamy thunder
#

maybe something with that

cursive gazelle
#

i found nothing lol

dreamy thunder
#

lemme see

gaunt coral
#

how does one get the enhancement of a card from G.play.cards

dreamy thunder
lament agate
#

any ideas what this means

#

playEffect?

cursive gazelle
dreamy thunder
#

same thing

#

wait

#

idk

cursive gazelle
dreamy thunder
#

yeah draw_card can add them back to the deck

pastel kernel
dreamy thunder
lament agate
#

how would i detect

#

if a sound plays

#

i wanted to trigger a function

#

whenever that sound plays

gaunt coral
dreamy thunder
gaunt coral
frigid birch
#

joker image is not showing up

gaunt coral
#

then do something if they are wild cards

dreamy thunder
#
for k, v in pairs(G.play.cards) do
    if SMODS.has_enhancement(v,"enhancement_goes_here") then

        -- do something here
            
    end
end
#

oh wait

#

you can probably do it easier by looping through context.individual

#

if context.individual and context.cardarea == G.play then
    if SMODS.has_enhancement(context.other_card,"m_wild") then
    end
end
gaunt coral
#

since im using similar logic in other jokers that act upon cards being scored

dreamy thunder
#

what do you want to happen to the wild cards found in G.play

#

sorry im a little slow in the head 😭

frigid birch
gaunt coral
gaunt coral
dreamy thunder
#
if context.before then
    for k, v in pairs(G.play.cards) do
        if SMODS.has_enhancement(v,"m_wild") then
            
        end
    end
end
#

this could work

gaunt coral
#

lets see

placid star
gaunt coral
#

wait

#

i changed to context to context.cardarea == G.play and now it adds too much, weird

dreamy thunder
#

uh

dreamy thunder
#

what the fuck happened to teh code

gaunt coral
#

oh i think its working

#

fuck yeah it does

dreamy thunder
#

nice

gaunt coral
#

i was trying to figure this out for like 30 mins before i asked

dreamy thunder
#

lol

dreamy thunder
#

add and not context.blueprint

#

after context.before

ocean sinew
#

how to make joker like cavendish which only appears after a specific condition is meet?

ocean sinew
#

thanks

wispy falcon
#

Why does my consumable just show this?

#

In my localization:

            c_void_chip = {
                name = "Void Chip",
                text = {
                    "Next {C: attention}hand gives",
                    "{C:chips}+#1# but you can",
                    "only play #2# cards"
                }
            }
        },```

In my dictonary:

```b_c_storm_Tokens = "Tokens"```

In my Labels:

```cstorm_Tokens = "Tokens"```

And my code:

```SMODS.ConsumableType{
    key = "cstorm_Tokens",
    collection_rows = { 4, 5 },
    primary_colour = HEX ('000000'),
    secondary_colour = HEX ('ffffff'),
}

SMODS.Atlas({
    key = "void_chip",
    path = "void_chip.png",
    px = 71,
    py = 95
})

SMODS.Consumable{
    key = "void_chip",
    set = 'cstorm_Tokens',
    atlas = "void_chip",
    pos = { x = 0, y = 0},
    --config = {  },
    unlocked = true,
    discovered = true,
    cost = 5,
    
}```
dreamy thunder
wispy falcon
dreamy thunder
#

yea both in dictionary

wispy falcon
dreamy thunder
dreamy thunder
wispy falcon
#

cstorm is my modprefix

dreamy thunder
#

c_cstorm_void_chip

wispy falcon
#

Okay, description works now

#

Labels still don't though

dreamy thunder
#

idk

clear ocean
#

going to go work on some joker concepts and such

wispy falcon
#

Can I get the hand select size temporarily down to 1 and if so, how?

pastel kernel
#

how do i set how fast the color rotation is for my SMODS.Gradient

coarse marsh
#

What does this mean

idle plaza
# coarse marsh What does this mean

What is 'i' in this case? Is your code inside a for loop of some kind? I don't see any kind of for loop, but using '[i]' implies the contents of your func (except the return) should be in one.

clear ocean
#

<@&1133519078540185692>

#

another scam

pastel kernel
#
-- located in rarities.lua

SMODS.Rarity {
    key = "Grandiose",
    loc_txt = {
    name = "Grandiose",
    },
    default_weight = 0.0,
    pools = { ["Grandiose"] = true },
    badge_colour = gradients_grand,
    get_weight = function(self, weight, object_type)
        return weight
    end,
}
-- located in gradients.lua

SMODS.Gradient{
    key = "grand",
    colours = {
        G.C.SPECTRAL,
        G.C.PURPLE,
        G.C.TAROT,
        G.C.RED,
        G.C.FILTER,
        G.C.GOLD,
        G.C.GREEN,
        G.C.PLANET,
        G.C.CHIPS
    },
    cycle = 2,
    interpolation = 'trig',
}
#

tell me if i'm doing this right

frigid birch
#
    key = "loneliest",
    loc_txt = {
        name = "The Loneliest Joker",
        text = {
            "Gives {X:mult,C:white}X#1#{} Mult",
            "if played hand is a ",
            "single {C:attention}Ace{}",
        }
    },
    config = { 
        extra = {
            x_mult = 5
        }
    },
    loc_vars = function(self, info_queue, card)
        return { 
            vars = { 
                card.ability.extra.Xmult
            } 
        }
    end,
    rarity = 3,
    atlas = 'CC_loneliest',
    pos = { x = 1, y = 0 },
    cost = 8,
    blueprint_compat=true,
    eternal_compat=true,
    unlocked = true,
    discovered = true,
    effect=nil,
    soul_pos=nil,

    calculate = function(self,card,context)
        if context.individual and context.cardarea == G.play then
            if context.scoring_hand == 1 then
                if context.other_card:get_id() == 1 then
                    if context.joker_main and context.cardarea == G.jokers then
                        return {
                            x_mult = card.ability.extra.x_mult
                        }
                    end
                end
            end
        end
    end
}```
got a problem where the xmult isn't going into the score
clear ocean
pastel kernel
dreamy thunder
clear ocean
# clear ocean i wanted to make a loop where it goes through all the source and reads the direc...
for _, i in ipairs(NFS.getDirectoryItems(SMODS.current_mod.path .. "source/back")) do
    assert(SMODS.load_file("source/back/" .. i))()
end
for _, i in ipairs(NFS.getDirectoryItems(SMODS.current_mod.path .. "source/blind")) do
    assert(SMODS.load_file("source/blind/" .. i))()
end
for _, i in ipairs(NFS.getDirectoryItems(SMODS.current_mod.path .. "source/joker")) do
    assert(SMODS.load_file("source/joker/" .. i))()
end

this so i don't prevent from repeating myself

frigid birch
dreamy thunder
#

what are you trying to do exactly?

idle plaza
frigid birch
wispy falcon
#

It gets set to 1 when this consumable is used and after one hand gets played it get's reverted to the original. And the hand select size SMODS.change_play_limit

dreamy thunder
#

something like this i think

frigid birch
#

and just get rid of everything else in the calculate section?

primal robin
#

Trolge what is this

idle plaza
primal robin
#

G.play.cards[1]:get_id()

dreamy thunder
#

true

#

sorry i can't tihnk correctly rn 😭

frigid birch
#

wait is ace considered 14?

#

or 1?

clear ocean
#

14

frigid birch
#

god

#

damn

coarse marsh
modern kindle
#

Good schmorning chat

clear ocean
#

morning dilly

idle plaza
rotund sable
clear ocean
modern kindle
#

Is that fortnite

lament agate
#

shit

#

wrong channel

#

FUCK

clear ocean
#

average balatro mod

lament agate
#

MY BAD

long sun
#

quick question, how do i use the localize function for labels?

wispy falcon
#

What's the name for the variable that saves the hand select size?

modern kindle
clear ocean
#

im pretty sure theres a better way of doing this in the long run

#

don't repeat yourself

frigid birch
clear ocean
#

take your time 👍

frigid birch
#

it works now thanks everyone

#

wait if ace is 14 then whats 1

gaunt coral
#

probably nothing

clear ocean
#

its nothing i think

frigid birch
#

wtf

#

why

clear ocean
#

ask localthunk idk man

candid elbow
#

There’s no rank for 1

#

Local thunk is weird for that one

frigid birch
#

lol

candid elbow
#

Selection limit i think

#

I saw this yesterday somewhere

#

I think

#

G.hand.config

tranquil gull
#

kind of wanna make a mod that just makes balatro play like texas hold 'em

#

but that sounds Really Hard

subtle merlin
knotty orchid
#

What does G.GAME.blind.hands_sub = -1 and discards_sub do?

wispy falcon
tranquil gull
#

bc you can't exactly fold, that just would kill you

wispy falcon
tranquil gull
#

i guess

#

but what would it do??

mighty kiln
#

whatkind of an event handler might i put to just changed the loc_txt if unlocked = false?

wispy falcon
#

Maybe you have a life system and it makes you lose a live? Or reduces your score

tranquil gull
#

nah idea

#

discards => folds

#

and it just redraws everything from a reshuffled deck

wispy falcon
#

Good idea!

subtle merlin
modern kindle
#

yea i was gonna ask you for the joker when i was more awake

mighty kiln
#

I want to put in an unlock condition and a loc_txt for if the deck is locked and idk what event handler to use

wispy falcon
# tranquil gull nah idea

You can keep me updated or ask stuff about that if you want since I would really like the idea of your mod

pure verge
#

i cannot figure out why the joker isnt triggering

#

SMODS.Joker{
key= "magnet",
blueprint_compat = true,
rarity = 2,
cost = 8,
pos = { x = 0, y = 0},
config = { extra = { xmult = 2 } },
loc_vars = function(self, info_queue, card)
return { vars = { card.ability.extra.xmult } }
end,
calculate = function( self, card, context)
if context.individual and context.cardarea == G.play and
SMODS.has_enhancement(context.other_card, "m_steel") then
return{
xmult = card.ability.extra.xmult
}
end
end
}

subtle merlin
modern kindle
#

@clear ocean good news i may have made some progress
testing it out to make sure and ill post it here

clear ocean
#

being a living legend as always

lament agate
modern kindle
clear ocean
surreal knot
pure verge
#

YEAH

modern kindle
#

@clear ocean

local function auto_load_with_nfs()
    -- Get all items in the mod root directory
    local success, items = pcall(NFS.getDirectoryItems, SMODS.current_mod.path)
    if not success then
        print("damn shawty!!! NFS: Could not access mod directory: " .. SMODS.current_mod.path)
        return
    end
    -- Only scan directories, ignore root .lua files
    for _, item in ipairs(items) do
        local item_path = SMODS.current_mod.path .. item

        -- Check if it's a directory
        local dir_success, dir_items = pcall(NFS.getDirectoryItems, item_path)

        if dir_success then
            -- It's a directory, now load all .lua files in it
            print("📁📂 Found directory: " .. item)   --idk if im even allowed to just use emojipedias folders icons but idc why wouldnt i be

            for _, filename in ipairs(dir_items) do
                if filename:match("%.lua$") then
                    local file_path = item .. "/" .. filename
                    print("NFS Auto-loading: " .. file_path)

                    local load_success, error_msg = pcall(function()
                        assert(SMODS.load_file(file_path))()
                    end)

                    if not load_success then
                        print("OH LAWD MAN WE Failed to load " .. file_path .. ": " .. tostring(error_msg))
                    end
                end
            end
        end
    end
end

auto_load_with_nfs()

you can just remove the silly little emojis they just made logs easier for me to read, theyre from emojipedia lmao
i left u 2 in the print if youd want either or none u can just delete

but this worked for me

pure verge
#

yeah

#

idk why tho

clear ocean
modern kindle
#

pardon my damn shawties

#

lmfao

surreal knot
pure verge
#

the most recent?

clear ocean
surreal knot
#

if it is, i have no clues then

modern kindle
clear ocean
#

yeah

#

might be accidentally calling the function every single time

#

ill go ahead and clean it up and make a credit in the comments and if i do get around to publishing it ill put your twitter or steam as a credit

modern kindle
#

you shouldve only had to paste that in the main file once and been fine
cause it only does it once for me

clear ocean
#

weird maybe because its trying to load the loc files?

modern kindle
#

🤔

#

im not sure, let me show my log

clear ocean
#

it does work but takes a while

#

i could make a call to skip if its the main file or in the localisation file

#

or have it pcall to the source folder

modern kindle
#

mine was immediate (well, as immediate as it could be, my pc has been taking a minute to launch balatro anyway i just ahvent restarted the sys)

cursive gazelle
#

is there noway to replace the background shader in this game

modern kindle
#

yea mine loads once, finds dirs, then loads it if its lua

#

hi @red flower

clear ocean
modern kindle
#

show me ur main file where uve put this

clear ocean
modern kindle
#

and its only in this file? or is it in others too

clear ocean
#

just this file

modern kindle
#

hmm

clear ocean
#

but it does boot so its a bit weird

#

so its doing it several times but not in a forever loop

mighty kiln
#

how do i add a description for a deck when its locked about how to unlock it

clear ocean
modern kindle
#

could just be simple and add a flag if a file was already loaded, let me try that and send that

mighty kiln
mighty kiln
clear ocean
#

the same place where your text and description

#
    locked_loc_vars = function(self, info_queue, back)

    end,
    check_for_unlock = function(self, args)

    end
mighty kiln
modern kindle
# clear ocean take your time 👍

i wasnt having duped file loading but try this maybe

-- Track individual loaded files instead of blocking the entire function
local loaded_files = {}

local function auto_load_with_nfs()
    -- Get all items in the mod root directory
    local success, items = pcall(NFS.getDirectoryItems, SMODS.current_mod.path)
    if not success then
        print("damn shawty!!! NFS: Could not access mod directory: " .. SMODS.current_mod.path)
        return
    end
    -- Only scan directories, ignore root .lua files
    for _, item in ipairs(items) do
        local item_path = SMODS.current_mod.path .. item
        -- Check if it's a directory
        local dir_success, dir_items = pcall(NFS.getDirectoryItems, item_path)
        if dir_success then
            -- It's a directory, now load all .lua files in it
            print("📁📂 Found directory: " .. item)   --idk if im even allowed to just use emojipedias folders icons but idc why wouldnt i be
            for _, filename in ipairs(dir_items) do
                if filename:match("%.lua$") then
                    local file_path = item .. "/" .. filename
                    -- Check if this specific file was already loaded
                    if not loaded_files[file_path] then
                        print("NFS Auto-loading: " .. file_path)
                        local load_success, error_msg = pcall(function()
                            assert(SMODS.load_file(file_path))()
                        end)
                        if load_success then
                            loaded_files[file_path] = true  --Mark this file as loaded
                        else
                            print("OH LAWD MAN WE Failed to load " .. file_path .. ": " .. tostring(error_msg))
                        end
                    else
                        print("Skipping already loaded file: " .. file_path)
                    end
                end
            end
        end
    end
    print("Auto-loading scan completed, get some cereal")
end

auto_load_with_nfs()
mighty kiln
clear ocean
#

you asked for the if statement but yeah sure

#

okay it might just be my computer 😭

modern kindle
#

it may be lmao
cause both vers didnt double load for me

clear ocean
#

maybe i could try putting it a particular lua file?

modern kindle
#

i just have mine in my main
my main file is dilatro.lua

#

as a ref

clear ocean
#

wait i think i know why

#

my main file is in the files itself

#

look at that

modern kindle
#

ayy

surreal knot
#

how to make card go beyond the standard 71x95 frames? for examle i want to make this one 95x95

modern kindle
clear ocean
#

i mean you could have it 71x71

surreal knot
#

i dont want to make it 71x71

mighty kiln
mighty kiln
#

what i tried is this and it crashed

clear ocean
#

its like magic thank you

modern kindle
clear ocean
#

feel free to use the code for your own mod too as its not only yours but def would help

#

and feel free to let others use it too

modern kindle
#

yea i already swapped to using it, at least the first variant
if i make it i consider it open for everyone

#

it was even a low priority thing i wanted to do at some point cause several lines just for assert is cringe

#

i just have many things i want to do

clear ocean
#

do you have a github or gitlab i can link to

modern kindle
clear ocean
#

dilly or dilly_the_dillster?

modern kindle
#

either one works, the latter would prob be easier to associate me in here with people

clear ocean
#

👍

modern kindle
#

cause people call me dilly but my display name is that

surreal knot
#

but i dont think theres args.type for checking current number of jokahs in hand

surreal knot
#

no just return true

mighty kiln
surreal knot
#

and i think you still need to figure out how to check jokers number

surreal knot
mighty kiln
surreal knot
#

yep

pure verge
#

sorry for the long delay

modern kindle
#

i cant remember off the top of my head is there a way to specify the pos of a card in the collection?
ie if i wanted to slot some where vanilla jokers were for thematic purposes

surreal knot
pure verge
#

ok thx

wispy falcon
#

How do I get the current card selection limit?

plain apex
#

how can i hook buying_card
function Card:buying_card didn't seem to work?
trying to get a count of how many jokers you've bought that run

local card_buy_original = Card.buying_card

-- Override method
function Card:buying_card(...)
    if self.ability.set == "Joker" then
        G.GAME.purchased_jokers = (G.GAME.purchased_jokers or 0) + 1
        print("Joker purchased! Total:", G.GAME.purchased_jokers)
    end

    return card_buy_original(self, ...)
end
dense fulcrum
#

how do you make a probability thats influenced by oops

latent perch
#

Goatker

candid elbow
#

Goat

latent perch
#

🐐

modern kindle
#

bepis my wepis

manic rune
#

wheres the localization of the white stake located in G.localization?

solar eagle
#

is it possible to tell the game to re-render the name of a joker

manic rune
#

yeah i figured it out, thanks

red flower
solar eagle
red flower
#

yes, you need to return a key in loc_vars to a new localization entry

solar eagle
red flower
#

it changes both

solar eagle
#

interesting

#

would be handy if this was documented better

red flower
#

i am planning to include this in the vanillaremade wiki

modern kindle
#

can you put me in the vanillaremade wiki

modern kindle
#

you hate me

red flower
#

also no

stiff locust
#

you ever just answer your question in the middle of typing it

modern kindle
#

no i just ask a stupid question and then go 'oh, duh'

#

im built diffy

stiff locust
#

yeah my question needs to be answered by another question now

#

i answered the second question too

modern kindle
#

now answer the other question

stiff locust
#

i did

modern kindle
#

now find out the radius

frigid cargo
#
    misc = {
        challenge_name = {
            c_btct_PipisChallenge_1 = "Pipis",
        },
        dictionary = {
            k_shape_booster_group = "Geometric Pack",
            k_btct_booster_group = "Batrocities Pack",
            k_btct_Elite = "Elite",
        },
        labels = {
            k_btct_Elite = "Elite",
        }
    }

Did i do my labels and challenge wrong? Because it just says error and idk what im doing wrong?

wispy falcon
frigid cargo
#

my booster works but the rarity and challenge doesnt pepecry

stiff locust
wispy falcon
# frigid cargo <:pepecry:1110519641735966831>

This is my code but I don't have anything with rarity and challenges (yet)

            a_chips="+#1#",
            a_chips_minus="-#1#",
            a_hands="+#1# Hands",
            a_handsize="+#1# Hand Size",
            a_handsize_minus="-#1# Hand Size",
            a_mult="+#1# Mult",
            a_mult_minus="-#1# Mult",
            a_remaining="#1# Remaining",
            a_sold_tally="#1#/#2# Sold",
            a_xmult="X#1# Mult",
            a_xmult_minus="-X#1# Mult",

            k_cstorm_Tokens = "Token",
            b_cstorm_Tokens_cards = "Tokens",
        },
        labels = {
            cstorm_Tokens = "Tokens",

            cstorm_cracked_stone = "Cracked Stone",

            cstorm_death = "Death",
        }```
stiff locust
#

I know area and circumference

#

but i forgot how to get diameter and radius

slim ferry
slim ferry
#

and chips

#

actually like everything there except for the hand size

#

and the sold tally

wispy falcon
split saddle
#

how do you modify the tarot's selection amount?

frigid cargo
slim ferry
stiff locust
#

i don't need to do anything circle related fortunately

#

but i am having a new problem

split saddle
frigid cargo
stiff locust
#

hey wait a minute

slim ferry
# split saddle existing

change the max_highlighted in config, assuming youve already done the SMODS.take_ownership stuff

stiff locust
#

oh nevermind

split saddle
stiff locust
#

what does this mean

#

i'm trying to set a value to either what it already is, or 1, because i'm transferring values from a fusion material joker to the fused joker, but I don't want it to break if you obtain it without fusing it (mostly by spanwing it in with debug or cryptid's DoE)

#

if I don't do that the values won't exist if you didn't fuse it, but now it's giving me this error
even though card.ability.extra does exist

split saddle
#

so, like this?

SMODS.Consumeable:take_ownership('c_strength',
    {
    config = {max_highlighted = 3}
    },
    true
)```
stiff locust
#

wait i'm fuckin stupid nevermind

#

i was setting card.ability.extra = function but the function doesn't return anything

#

so it was being set to nil

slim ferry
#

though idk if that matters since strength has no other variables afaik

split saddle
#

other cards do have more variables i think so i'm gonna do that

surreal knot
floral narwhal
surreal knot
slim ferry
#

when stuff like SMODS.Joker or the like are called, is it immediately injected into the game? if not, when during the mod's loading process does that happen

frigid cargo
frigid cargo
frigid cargo
wispy falcon
#

Why does this not work? I just want to bring it down to 1

        
        while G.hand.config.highlighted_limit ~= 1 do
            SMODS.change_play_limit(-1)
        end
    end,```
slim ferry
#

just do G.hand.config.highlighted_limit = 1? what even is SMODS.change_play_limit anyway

frigid cargo
daring fern
slim ferry
#

yeah but isnt that the same as just changing G.hand.config.highlighted_limit directly

slim ferry
#

whats the difference then

daring fern
unreal cosmos
#

what happened to balaui??

slim ferry
#

ah i see

unreal cosmos
#

also does anyone just have an image of a raw deck back (like red deck)

surreal knot
unreal cosmos
#

balaui is down

wispy falcon
#

So how do I change the play amount to 1 instead of my while loop?

daring fern
wispy falcon
frigid cargo
rapid stag
#

i want to make a joker that, while in posession of, changes glass card's xmult to xchips. cirThink ...given that the xmult comes from the enhancer config, how do i go about doing this? do i nullify the config values and do it via context.individual instead?

surreal knot
split saddle
#

i thought of putting it in overrides but that doesn't work

#

do i just put it into calculate inside of it? 🤔

slim ferry
#

if you want to only change the values with a certain voucher youll probably need to do other stuff, i'd look into how cryptid reduces the selection limit of tarots in one of its stakes (kinda hate suggesting cryptid as a reference because its kind of a mess but thats all i can think of)

wispy falcon
frigid cargo
# surreal knot Idk then

sadge

misc = {
        challenge_names = {
            c_btct_PipisChallenge_1 = "Pipis",
        },
        dictionary = {
            k_shape_booster_group = "Geometric Pack",
            k_btct_booster_group = "Batrocities Pack",
            k_btct_Elite = "Elite",
        },
        labels = {
            btct_Elite = "Elite",
        },
    }
slim ferry
#

genuinely what is G.I.CARD, i cant figure it out from the code

daring fern
slim ferry
#

as in, every card that currently exists?

daring fern
wispy falcon
#

So, how do I get my play limit down to 1 without that while loop?

surreal knot
split saddle
#

this is the only reference I found to that stake (aside from setting the stake itself)

#

it says it's not working :(

slim ferry
#

yk i kinda half expected that from cryptid tbh

split saddle
rapid stag
#

why is my game complaining about there being no end to this if when there is one?

frigid cargo
#
-- JimathanAnimation
local btct = {ticks = (5)}
local upd = Game.update
local btct_Jimathan_dt = 0
function Game:update(dt)
    upd(self, dt)
    local Jimathanobj = G.P_CENTERS.j_btct_Jimathan
    btct_Jimathan_dt = btct_Jimathan_dt + dt
    if Jimathanobj and btct_Jimathan_dt > 0.1 then
            btct_Jimathan_dt = btct_Jimathan_dt - 0.1
            if Jimathanobj.pos.x > 3 then 
                Jimathanobj.pos.x = 0 
            else
                Jimathanobj.pos.x = Jimathanobj.pos.x + 1
            end
    end
    for k, v in pairs(G.I.CARD) do
        if v.children.joker and v.children.joker.atlas == G.ASSET_ATLAS["btct_JimathanAtlas"] then
            v.children.floating_sprite:set_sprite_pos({x = 0, y = 1})
        end
    end
end

why does this just update the background and not the soul itself?

rapid stag
#

oh, i didn't put it in a table

wispy falcon
daring fern
frigid cargo
daring fern
frigid cargo
#

ok

wispy falcon
#

Is there a way to add a set chip amount to the next hand played and then reset back to original values for the hand and play limit afterwards?

frigid cargo
# daring fern Change it to `v.children.floating_sprite`
for k, v in pairs(G.I.CARD) do
        if v.children.floating_sprite and v.children.floating_sprite.atlas == G.ASSET_ATLAS["btct_JimathanAtlas"] then
            v.children.floating_sprite:set_sprite_pos({x = 0, y = 1})
        end
    end

is this right?

stiff locust
#

if i set a value

#

to be X value or Y
Z = X or Y

#

it gets set to X if X value exists, but Y if X does not exist, correct?

red flower
#

yes

stiff locust
#

then why the fuck isn't this working

#

i feel like i'm going insane I've got code here in my joker

#

for context i'm transferring a LOT of values from 1 joker to another

#

because fusionjokers can't transfer tables when fusing jokers I have to do it myself

#

everything works except actually putting the table of values into the joker as the last step

#

but when I do the last step manually with debugplus, it just works

wintry solar
#

why can't you transfer tables?

stiff locust
#

the joker can't do it itself for some reason and I don't know why

stiff locust
#

I don't know what to tell you

wintry solar
#

what method are you using?

stiff locust
#

on the material's remove_from_deck, i set a global table to be equal to its card.ability.extra
on the fused joker's set_ability, I set its card.ability.extra to be equal to that global table or a list of dummy values for card.ability.extra so it doesn't crash if you look at it in the collection

#

i can't use a local table because i'm moving the table between files, I put the legendary and gold fusion jokers in different files

#

but the table starts with my mod name so it shouldn't clash with anything ever

#

the fused joker just simply isn't doing this part

on the fused joker's set_ability, I set its card.ability.extra to be equal to that global table or a list of dummy values
it always uses everything after the or even though the value before does exist

#

and it works if I do that final step manually using debugplus eval

#

the other code in its set_ability also runs perfectly fine

wintry solar
#

are you handling all your fusion stuff within remove from deck and set_ability?

latent perch
stiff locust
#

not all of it, just for this one joker

#

because this one joker has way too many values that I need to transfer and no other method worked so far

#

the fusion API handles actually fusing the joker as usual

wintry solar
#

Hello! for reference, it is much easier to communicate stuff like that through either a ping on here, or more prefereably on the smods discord

frigid cargo
# daring fern Yes.
-- FlopprAnimation
local btct = {ticks = (5)}
local upd = Game.update
local btct_Floppr_dt = 0
function Game:update(dt)
    upd(self, dt)
    local Flopprobj = G.P_CENTERS.j_btct_Floppr
    btct_Floppr_dt = btct_Floppr_dt + dt
    if Flopprobj and btct_Floppr_dt > 0.1 then
            btct_Floppr_dt = btct_Floppr_dt - 0.1
            if Flopprobj.pos.x > 10 then 
                Flopprobj.pos.x = 0 
            else
                Flopprobj.pos.x = Flopprobj.pos.x + 1
            end
    end
    for k, v in pairs(G.I.CARD) do
        if v.children.floating_sprite and v.children.floating_sprite.atlas == G.ASSET_ATLAS["btct_FlopprAtlas"] then
            v.children.floating_sprite:set_sprite_pos({x = 0, y = 4})
        end
    end
end

It just changes the background instead of the soul itself.

wintry solar
#

I am not a fan of reading through multiple git messages

wintry solar
wintry solar
stiff locust
#

I think fusionjokers got edited to allow you to transfer 2 values at once and you can add them together if you want

#

nobody else really makes fusions anymore though, and I've only run into this once on this joker right now

wintry solar
#

are you transferring everything from one table to the other?

stiff locust
#

everything yes

wintry solar
#

are there any repeats across the two?

stiff locust
#

i separated the other values of the fused joker so nothing clashes

wintry solar
#

have you tried using SMODS.merge_defaults?

stiff locust
#

there are no repeats because the fused joker doesn't have any values in that table at default

daring fern
stiff locust
wintry solar
stiff locust
#

I can try that

clear ocean
#

the jokers aren't being added in

stiff locust
#

the main issue is that if I use a function to merge the values, I still need to use an or somewhere

#

because otherwise the joker will crash in the collection

modern kindle
stiff locust
#

if I have the fused joker already have the values nothing will get merged because they're all dupes so it crashes on hover in collection

clear ocean
stiff locust
#

I made a table merge function myself and tried to do it that way and crashing on hover in the collection is kind of a bad thing

stiff locust
#

so I feel like it doesn't really solve the root issue of or not working for no reason

frigid cargo
modern kindle
# clear ocean

Does the console say they loaded cause I dont think itll print in game

clear ocean
#

i can switch them to sendMessage functions

modern kindle
#

As they are if you didnt change what i sent itll print in the console

#

So dont need to

#

Just read the console

split saddle
#

i know that will work for sure :clueless:

clear ocean
slim ferry
wintry solar
frigid cargo
# daring fern Yes, you're changing the `pos` instead of the `soul_pos`
-- FlopprAnimation
local btct = {ticks = (5)}
local upd = Game.update
local btct_Floppr_dt = 0
function Game:update(dt)
    upd(self, dt)
    local Flopprobj = G.P_CENTERS.j_btct_Floppr
    btct_Floppr_dt = btct_Floppr_dt + dt
    if Flopprobj and btct_Floppr_dt > 0.1 then
            btct_Floppr_dt = btct_Floppr_dt - 0.1
            if Flopprobj.soul_pos.x > 10 then 
                Flopprobj.soul_pos.x = 0 
            else
                Flopprobj.soul_pos.x = Flopprobj.soul_pos.x + 1
            end
    end
    for k, v in pairs(G.I.CARD) do
        if v.children.floating_sprite and v.children.floating_sprite.atlas == G.ASSET_ATLAS["btct_FlopprAtlas"] then
            v.children.floating_sprite:set_sprite_pos({x = 0, y = 4})
        end
    end
end

this still doesnt work...
-# (im very not smart D:)

clear ocean
#

maybe it's trying to load the file from the root?

modern kindle
#

mine doesnt so

clear ocean
#

that didnt do it

daring fern
modern kindle
clear ocean
#

which folder

#

source or joker

frigid cargo
modern kindle
#

the folder called source/joker

#

files arent folders

clear ocean
#

nope

#

that didnt do it

mighty kiln
#

this is my code to unlock a deck when the player has 8 jokers and it crashed and i cant find the error

modern kindle
clear ocean
#

sure

#

dms don't work without a friend request so here @modern kindle

stiff locust
# wintry solar can you show the big that isnt working

the other code in here works fine (it gets the win sticker for another one of my jokers, the gimmick of the gold legendary fusions is that they gain additional effects scaling based on the stake you've won with another joker on)

Tsunami_Rise_Transfer is the global table I'm using to transfer them, and if I set the fused joker's card.ability.extra to Tsunami_Rise_Transfer using debugplus after fusing the joker it works, so I don't think it's anything to do with this table in itself

this or and any or i put here as a matter of fact simply doesn't work and I don't get why when Tsunami_Rise_Transfer clearly exists and I can access it

wintry solar
#

have you tried printing it on the line above to make sure it's actually got stuff in

stiff locust
#

i've printed it out with debugplus after fusing it and it does indeed have the right things in it

#

as mentioned if I set its card.ability.extra table to Tsunami_Rise_Transfer after fusing it with debugplus, everything works

modern kindle
stiff locust
#

I tried doing if Tsunami_Rise_Transfer instead of the or to check it exists, but that didn't work either and I also don't know why
if Tsunami_Rise_Transfer ~= nil also did not work for this

wild escarp
#

So, I'd like to make a poker hand that is three of a kind all one suit, and a pair of a different suit, but I have no clue what I'm doing, and I think I've just recreated a normal full house. How would I do this?

clear ocean
wintry solar
#

just put print(Tsuname_Rise_Transfer) as the first line in set ability and see what it is

clear ocean
#

the idea is have it like this and have jimbo in the middle or just jimbo in ascii text

red flower
stiff locust
red flower
#

oh no, you shouldnt I was just asking if you did

slim ferry
clear ocean
#

is there a libre/asprite palette for balatro?

red flower
stiff locust
stiff locust
#

the fusion happens all at the same time
the transfer table doesn't exist until after the joker has been fused

#

and that's too late to do it

#

I either have to save the transfer table sooner or merge it later and I don't think I can do either of those in an efficient manner that won't break

#

I could have the transfer table save as a lazy update in every context on the original joker

#

assuming that's not too resource intensive

#

yeah that's probably the only way I can do this

wintry solar
#

you could just build it into the api

#

I mean it seems like something that it should cover

#

being limited to only merging two values seems strange

stiff locust
#

you know that simpsons episode where mr burns gets told that he has every disease ever but because he has every disease none of them can get him cause they all try at the same time

#

that's what fusionjokers is nowadays

frigid cargo
#

is it possible to change the sprite pos when a specific hand is played or when something happens or smth?

red flower
#

yes

frigid cargo
#

ok thanks

stiff locust
#

I can't really understand how its code works even if I wanted to change it myself and I fear that if I did it would cause a crash when you fuse anything that would require every other fusion joker to make a change to its API call

#

it's not looking great and I don't want to make it worse

frigid cargo
red flower
#

it would be the same function but in the soul sprite

#

i dont remember the name of the field

frigid cargo
#

cause just doing card.children.center:set_sprite_soul_pos({ x = 0, y = 4 }) wouldnt work thats all i know

#

i found it

#

its card.children.floating_sprite:set_sprite_pos

frigid cargo
#
if context.individual and context.cardarea == G.play and context.other_card:get_id() == 14 then
            card.children.floating_sprite:set_sprite_pos({ x = 0, y = 4 })
            return {
                xmult = card.ability.extra.xmult
            }
        end

ok now it just doesnt change, how can i fix this?

honest bridge
#

Yo does anyone know how to add/replace the scoring sound for jokers like scary face or odd todd?

frigid birch
#

code for if it's the start of the round?

long sun
#

in reset_game_globals, how can i only activate my code if the last blind was a boss blind?

frigid cargo
frigid birch
#

ill try it

split saddle
#

it's me again
why does copying Card:can_use_consumeable into my overrides.lua makes tarots stop working inside of packs?

wild escarp
#

How could I check if groups of cards sharing the same rank (parts._3) also share the same suit in a poker hand? So far I've only found ways to check if a poker hand is a flush, but I'd like to check if groups of the same rank also share the same suit.

frigid birch
#

trying to make it so every round gives you a spectral card

        if context.setting_blind and #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({
                trigger = 'before',
                delay = 0.0,
                func = (function()
                        local card = create_card('Spectral',G.consumeables, nil, nil, nil, nil, nil, 'sea')
                        card:add_to_deck()
                        G.consumeables:emplace(card)
                        G.GAME.consumeable_buffer = 0
                    return true
                end)}))
            return {
                message = localize('k_plus_spectral'),
                colour = G.C.SECONDARY_SET.Spectral,
                card = self
            }
        end
    end```
but there's an error that's just this
red flower
#

remove card = self

split saddle
frigid birch
#

i knew i should've done that omg

red flower
frigid birch
#

thanks so much kind sir and/or madam

frigid cargo
#

This is why N is the goat

red flower
#

try the one from the lovely dump

#

but also it's not a good idea to replace functions lol

split saddle
#

i'm trying to make a voucher that increases the effects of all consumables. i tried some things and even went into cryptid code (ew). in the end i decided to modify the function with the cards (or the cards themselves, but i haven't gone there yet)

also i was told that :take_ownership is what i want but i don't know where to put it so that it will work

split saddle
#

check it out

split saddle
red flower
#

can i see what youre doing

split saddle
#

there's nothing to see right now

#

aside from what i told you about copy-pasting

red flower
#

send a screenshot i mean

#

sometimes it's something dumb that you dont realize

split saddle
#

i also tried patching it in but now that you mention the lovely dump that was probably the reason it didn't work
also i'm still trying to find a way of doing it with :take_ownership if you have any ideas :>

mighty kiln
#

i tried to make this to unlock my deck but it crashes and i dont think its syntax so idk

mighty kiln
#

i know it has to do with that because it dosent crash without it

modern kindle
mighty kiln
#

its this and the part that crashes is the part to unlock the deck

modern kindle
#

isnt your calculate missing an end

#

vscode tells you if youre missing something like that, its underlined red

mighty kiln
modern kindle
#

then it means youre missing something else

#

more than 1 thing can be wrong

#

but you are definitely missing an end

#

i would recommend reading more on lua, smods docs, and learn from other mods

short girder
#

pretty sure this thing dont work. any ideas?

wispy falcon
#

Is there a way to add a set chip amount to the next hand played and then reset back to original values for the hand and play limit afterwards? I need it for my consumable

crystal perch
#

quick question is there a context for using a consumable from a booster pack?

frigid birch
#

code for destroying a joker every round?

frigid cargo
frigid birch
#

yes like madness

frigid cargo
latent perch
frigid birch
#

wow this time I only asked 1 question, I'm getting better chat

rapid stag
#

i wanna make a joker that can softlock the game and forces a run reset if the blind was beaten by at least 3x the required score emberuSip
i know how to check against the score now, but what are some ways i can softlock the game in this way? ideally, i would like the event queue to still be running

frigid birch
#

brilliant idea and way to nerf me lol

split saddle
#

how can you check if a consumable has been discovered?

rapid stag
#

try G.P_CENTERS.<consumable key>.discovered

frigid birch
#

is it necessary to have different atlases if they have the same png?

#

probably stupid question

red flower
#

no

frigid birch
#

k

red flower
#

you can use the same one

frigid cargo
#

is there a way to check the blind score and how much youve scored currently?

split saddle
#

how do you make a planet level up twice?

frigid cargo
frigid birch
wispy falcon
frigid birch
#

code for destroying a specific joker?
example: perry the joker destroing the joker-inator when he's bought

#

if you have the joker in your hand

#

wow

modern kindle
#

<@&1133519078540185692>

#

Kill him

#

Murder him

frigid birch
#

with hammers

modern kindle
#

Obliterate his line

subtle merlin
#

crucifixion time

frigid cargo
#

thanks mods

frigid birch
#

thanks so much mods

modern kindle
#

Wheres the awesome gun react

#

I live for pew pew react

livid scroll
#

🔫

modern kindle
#

There my freaking goat

subtle merlin
#

i feel ive tried everything i can find to try and get this card undebuffed but nothing shown in the screenshot has worked no matter what configuration i try

clear ocean
#

how many people are sending scams and such- anywho, what do you think about this voucher

wispy falcon
#

bump3 (Can anyone just help, please?)

clear ocean
#

i could make it for discarding and hand or just discarding

subtle merlin
#

there was no reply there

clear ocean
#

on default you can select up to five but theres an api call to lower or increase the number

subtle merlin
clear ocean
#

oh i got an idea for a voucher, increase the chances of an uncommon or rare joker card

keen atlas
#

ah

clear ocean
#

can either make one just for uncommon cards and then rare cards or do something like hone/glow up

split saddle
# frigid birch code for destroying a specific joker? example: perry the joker destroing the jok...
-- inside of perrytheplatypus.lua
if context.card_added and context.card.config.center.key = 'j_modID_jokerinator'
  for _,v in ipairs(G.jokers) do
    if v.config.center.key == 'j_modID_jokerinator' then
      v.getting_sliced = true
      -- this part was copied from dagger
      G.GAME.joker_buffer = G.GAME.joker_buffer - 1
      G.E_MANAGER:add_event(Event({
        func = function()
          G.GAME.joker_buffer = 0
          v:start_dissolve({ HEX("57ecab") }, nil, 1.6)
          return true
        end
      }))
    end
  end
end

try this (might need some debugging xd)

frigid birch
#

peak???

naive reef
frigid cargo
#

is there a way to check the chips that are about to be scored?

clear ocean
wispy falcon
#

I give up asking questions since it seems like nobody knows it

wispy falcon
subtle merlin
split saddle
#

also that question is a little hard in general

#

and the wording is a little confusing

wispy falcon
wispy falcon
split saddle
#

punctuation and wording

#

i think you can be more concise in what you want

subtle merlin
split saddle
wispy falcon
clear ocean
#

name is inspired by baseball joker but maybe the latter is too long

#

maybe something like "double fine" or "third base"

split saddle
#

N', context.eremel, Eris, etc

#

very smart and cool people imo

clear ocean
#

what do you yall think for the voucher names

wispy falcon
#

If you want the one shorter, maybe call it 'Out the Park'?

clear ocean
#

or Park Out?

wispy falcon
#

By the way, what could I do, while I wait for my question to be answered?

clear ocean
subtle merlin
split saddle
#

same