#💻・modding-dev

1 messages · Page 600 of 1

slim ferry
jolly shadow
#

i only need to change 2 blinds the rest is modded content lmao

slim ferry
#

yeah

#

you can just have a built in texture pack in the mod

#

or just look at how malverk changes the sprites and use that yourself

jolly shadow
#

just took ownership of small and big blind instead lmao

bold sleet
#

Will do lol

ripe oak
#

Anyone know if it's possible to change the score requirement (and reward) of a blind so it shows up on the 'Select your next blind' screen? I.e. without changing the base blinds themselves.

bold sleet
#

dunno sorry
Do you, or anyone knows how to make the game re-calculate the played hand?

#

For an effect similar to vampire, for example.

ripe oak
#

Maybe check the code for Vampire in here:

bold sleet
#

mmmm

#

It doesn't recalculate, because it doesn't have to, I believe.

#

or it does..?

#

wtf

high quartz
#

if you ask it nicely

#

it might recalculate

pseudo furnace
#

Can someone help me with a sticker script? Nothing seems to be printing/happening

plucky berry
#

guys i'm tryina change blind requirements with G.GAME.blind.chips = G.GAME.blind.chips * amt and it works but the UI doens't update to show the change how can i do it

umbral zodiac
#

i believe you should also run G.GAME.blind.chip_text = number_format(G.GAME.blind.chips) afterwards

#

this is what i do in my code that does similar, idk if recalculating is necessary but you can try it

plucky berry
#

ok it works tnx, only problem is the timing the ui is updating way before the message and sound playing but i'll figure it out

umbral zodiac
#

you could try n put it all in an event

#

calculate all runs at once and then gets queued up to show its effects so if you do something like setting blind size and updating immediately it will update way before it "should"

plucky berry
#

i'm trying that

#

alright probably messed something up

wintry swallow
#

I got the code on that new joker to work but now this popped up after it finished triggering:

#

and i dont think it says "cards" in the code anywhere

queen crescent
wintry swallow
#

SMODS.Sticker {
    key = "unkillable",
    badge_colour = HEX("a86232"),
    pos = { x = 0, y = 0 },
    atlas = "unkillable",

    calculate = function(self, card, context)

        if inscrypt_unkillable_triggered then
            return
        end

        if not (context.destroy_card or context.selling_self) then
            return
        end

        inscrypt_unkillable_triggered = true
            
        G.E_MANAGER:add_event(Event({
            trigger = 'after',
            func = function()
                -- Re-run after Oroboros finishes upgrading
                local joker_key = card.config and card.config.center and card.config.center.key
                if not joker_key then 
                    return true
                end

                local new_card = SMODS.create_card {
                    set = "Joker",
                    key = joker_key,
                    area = G.shop_jokers
                }
                if not new_card then 
                    inscrypt_unkillable_triggered = false
                    return true
                end

                create_shop_card_ui(new_card, nil, G.shop_jokers)
                G.shop_jokers:emplace(new_card)

                -- Copy updated stats (after Oroboros upgraded)
                if card.ability and type(card.ability.extra) == "table" then
                    new_card.ability.extra = {}
                    for k, v in pairs(card.ability.extra) do
                        new_card.ability.extra[k] = v
                    end
                end

                new_card:start_materialize()
                new_card.states.visible = true
                new_card.ability.couponed = false
                new_card:set_cost()
                new_card:add_sticker("inscrypt_unkillable", true)

                inscrypt_unkillable_triggered = false
                return true
            end
        }))
    end```
#

heres the code if anyone can help

#

THAT WAS A LOT MORE THAN I THOUGH

queen crescent
#

literally absolute

pseudo furnace
#

Do stickers have a update function or equivalent?

pale holly
#
    calculate = function(self, card, context)
        for i = 1, #G.jokers.cards do
            if context.retrigger_joker_check and not context.retrigger_joker and context.other_card ~= self then
                if context.other_card == G.jokers.cards[i] then
                    return {
                        message = localize("k_again_ex"),
                        repetitions = center.ability.extra.retriggers,
                    }
                end
            end
        end
    end

Hello, trying to make a joker that would retrigger all jokers once, took the code from cryptid and trying to adapt to it but i'm not how i can do it, help is appreciated !

slim ferry
#

remove the for loop

#

and also self should be card

pale holly
slim ferry
#

for i = 1, #G.jokers.cards do ... end

solid salmon
#

can someone give me the weird ''' thing

pale holly
slim ferry
#

remove that too

solid salmon
#
SMODS.Joker {
    key = 'joker?',
    loc_txt = {
      name = 'Joker?',
      text = {'{X:mult,C:white}X#1#{} mult, increases by {X:mult,C:white}X#2#{} per blind cleared',
              '{C:green}1/#4#{} chance to activate the {C:red}lose condition{} when playing a hand',
              'denumerator decreases by 2 every round'
            }
   },
   rarity = 3,
   pos = {
      x = 0,
      y = 0
   },
   config = { extra = {odds = 100, Xmult = 1.75, Xmult_mod = 0.1}},
   cost = 16,
   discovered = true,
   loc_vars = function(self,info_queue,card)
    local numerator, denominator = SMODS.get_probability_vars(card, 1, card.ability.extra.odds, 'joker?')
    return { vars = {card.ability.extra.Xmult, card.ability.extra.Xmult_gain,numerator,denominator}}
   end,
   calculate = function(self,card,context)
    if context.end_of_round and context.game_over == false and context.main_eval and not context.blueprint then
        card.ability.extra.Xmult = card.ability.extra.Xmult + card.ability.extra.Xmult_mod
        card.ability.extra.odds = card.ability.extra.odds - 2
    end
    if context.joker_main then
        if SMODS.pseudorandom_probability(card, 'joker?', 1, card.ability.extra.odds) then
            G.GAME.round_resets.hands = G.GAME.round_resets.hands - 5
            ease_hands_played(-5)
        end
        else
            return
            {
                Xmult = card.ability.extra.Xmult
            }
        end
    end,
#

yeah so uhhh

#

for some reason

#

this crashes the game

#

whenever i load in the blind

pale holly
solid salmon
#

oh wait

pale holly
solid salmon
#
}
SMODS.Atlas {
    key = "joker?",
    path = "JokerQ.png",
    px = 71,
    py = 95
}```
#

lemme clearly state what i wanted it to do

pale holly
#

what error you got ?

solid salmon
#

arithmetic mult

#

actually lemme just replicate it

pale holly
solid salmon
#

i dunno

pale holly
#

also if i'm right it' xmult and not Xmult

slim ferry
#

either works

pale holly
solid salmon
pale holly
solid salmon
#

can i say what i wanted it to do

#

i wanted it to give 1.75x mult that increases everytime you beat a round

#

but it also has a chance to activate the "lose condition"

#

which for now is -5 hands

analog spoke
#

fell asleep the other day lol, time to get back on my balalala stuff lol

pale holly
solid salmon
#

huh?

#

oh

#

i think i get it

#

ok

#

lemme me try it now

pale holly
#
     if context.joker_main then
        if SMODS.pseudorandom_probability(card, 'joker?', 1, card.ability.extra.odds) then
            G.GAME.round_resets.hands = G.GAME.round_resets.hands - 5
            ease_hands_played(-5)
        else
            return
            {
                Xmult = card.ability.extra.Xmult
            }
        end
    end,

just remove the end and keep the else like this, now it should work

pseudo furnace
#

Do stickers have a update function or equivalent?

solid salmon
#

how do i fix the nil

pale holly
#

does it work now ?

solid salmon
#

it does

pale holly
solid salmon
#

ah

#

wait

pale holly
#

Xmult_gain doesn't exist in the config so it renders nil

#

just replace gain by mod and you're good

solid salmon
#

ok

#

yep its perfect now

queen crescent
# solid salmon

worded it better:
X1.75 Mult, increase by X? per cleared Blind
1 in 100 Chance to instantly lose the run
At the end of the round, decrease the denumerator by 2

pale holly
# slim ferry remove that too
        config = {
        extra = { retriggers = 1}},
    loc_vars = function(self, info_queue, center)
        return { vars = { center.ability.extra.retriggers } }
    end,

    calculate = function(self, card, context)

            if context.retrigger_joker_check and not context.retrigger_joker and context.other_card ~= card then

                    return {
                        message = localize("k_again_ex"),
                        repetitions = center.ability.extra.retriggers,
                    }

        end
    end
    ```

Nope still won't  do anything, i did removed so
spare wren
#

hey is there a way to exclude a card from a table pool when using psuedorandom_element? i have a joker that picks two cards that are held in hand and i need it to be so it doesn't pick the same card twice

pseudo furnace
queen crescent
#

-# im skipping xStep next bdash gameplay update

pseudo furnace
#

what does that even mean

queen crescent
#

i will not elaborate
look it up

spare wren
pale holly
solid salmon
#

ive been using it for all my consumables

spare wren
#

idk why its not in the

#

utility functions page of the github docs

solid salmon
#

they work the same

spare wren
#

unless im. literally just blind

spare wren
#

and i like readability

pale holly
# spare wren utility functions page of the github docs

the smods wiki always feels blurry for me to read and understand how it works since there's not always everything your search on it yet and even so there's no proper exemple, Vanilla Remade in that case is a huge helper
But in general the best way to learn easier is also just by looking trough other mods

solid salmon
#

i looked at ortalab

solid salmon
#

(im gonna fuse yellow with yellow deck joker eventually)

wintry solar
#

I just don’t update the wiki 😭

spare wren
# spare wren hey is there a way to exclude a card from a table pool when using `psuedorandom_...
local picked_cards = {}
picked_cards[1] = pseudorandom_element(G.hand.cards, pseudoseed('br_ilb'))
local new_pool = { table.unpack(G.hand.cards) }
table.remove(new_pool, table.find(new_pool, picked_cards[1]))
picked_cards[2] = psuedorandom_element(new_pool, psuedorandom('br_ilb'))

for _, v in ipairs(picked_cards) do
    ...
end
``` yeah i feel like this is the most cursed way of possibly doing this i really dont know any other implementation though
pale holly
hushed field
#

How would I get the key of the edition that's applied to a card? I'm sure I've done it in the past but I've forgotten how, it seems, haha

spare wren
solid salmon
#

my ghost joker crash ;{

pale holly
#

code ?

solid salmon
#

warning possibly outdated code

SMODS.Joker {
    key = 'ghost_deck_joker',
    loc_txt = {
      name = 'Ghost Deck Joker',
      text = {'{C:green}#1# in #2#{}chance to get Spectral after exiting shop'}
   },
   rarity = 2,
   pos = {
      x = 0,
      y = 0
   },
   cost = 3,
   discovered = true,
   loc_vars = function(self, info_queue, card)
    return {vars = {G.GAME.probabilities.normal*1,3}}
end,
    calculate = function(self, card, context)
    if context.ending_shop and not context.individual and #G.consumeables.cards + G.GAME.consumeable_buffer < G.consumeables.config.card_limit then
        if pseudorandom ('ghost_deck_joker') < G.GAME.probabilities.normal*1/3 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
end,
atlas = "ghost_deck_joker"
}
SMODS.Atlas {
    key = "ghost_deck_joker",
    path = "ghost_deck_joker.png",
    px = 71,
    py = 95
}
spare wren
#

nvm

pale holly
solid salmon
#

also

#

i was just testing it

pale holly
#

i just find it weird the game crash upon juice_up despite your code not even having any, and you're on the most recent version of smods too

solid salmon
#

oh wait

#

i based this joker of the ghost deck

#

imma just see its code

#

...

#

yeah

#

thats not right

pale holly
#

gotta remodernize it

solid salmon
#

yeah ik

#

just need to find out how

#

i will try using eightballs code

pale holly
#
        config = {
        extra = { retriggers = 1}},
    loc_vars = function(self, info_queue, center)
        return { vars = { center.ability.extra.retriggers } }
    end,

    calculate = function(self, card, context)

            if context.retrigger_joker_check and not context.retrigger_joker and context.other_card ~= card then

                    return {
                        message = localize("k_again_ex"),
                        repetitions = center.ability.extra.retriggers,
                    }

        end
    end
    ```

JUst resending this
Trying to make my joker retrigger each joker but right now it does nothing at all, feel like i'm missing more, but not sure what exactly honestly
wintry solar
#

Have you turned on retriggers

real crown
#

Is something wrong with my check here?
I get the "AAAAAAAA" output but not the "BBBBBBB", even though the key to the pack IS p_pool_1

        local ref = args and args.config and args.config.ref_table
        local is_rrn_pool_pack = ref and ref.config and ref.config.center and ref.config.center.key == 'p_pool_1'
        local ret = _end_consumeable(args)
        print("AAAAAAAA")
        if is_rrn_pool_pack then
            print("BBBBBBBB")```
pale holly
wintry solar
#

Joker retriggers is an optional feature, it’s not enabled by default

rotund sable
#

It could be slightly different or something

real crown
rotund sable
#

How is printing a value crashing?

real crown
#

Like this, in the line where I have the print

rotund sable
#

I meant copy the entire thing into the print or assign that to a variable

#

and then print

solid salmon
#

ok guys

#

i fixed the joker

long sun
#

hihi! why is this patch not being applied?

nova sleet
#

Want to start modding Balatro... What programs do I need to start?

solid salmon
#

and also steammodded and lovely

nova sleet
#

I am familiar with Lua from modding another game

hushed field
jovial wave
#

quick question, how do I create a joker of a specified type?

hushed field
#

What do you mean with specified type?

solid salmon
#

or do you mean like

#

straight up making a joker

jovial wave
#

like I'm making a spectral card and I want it to create a joker that I made

solid salmon
#

like only that

hushed field
#

Oh, a specific joker. You can just pass the specific key along!

long sun
#

okay i've solved my problem 😭 it was commented out

lavish elm
#
[[patches]]
[patches.pattern]
target = "functions/button_callbacks"
pattern = '''
G.FUNCS.can_use_consumeable = function(e)
    if e.config.ref_table:can_use_consumeable() then 
        e.config.colour = G.C.RED
        e.config.button = 'use_card'
    else
        e.config.colour = G.C.UI.BACKGROUND_INACTIVE
        e.config.button = nil
    end
'''
position = 'after'
match_indent = true
payload = '''
if G.GAME.joker_mayhem then
    e.config.colour = G.C.UI.BACKGROUND_INACTIVE
    e.config.button = nil
end
'''

why does this not work?

solid salmon
#

oh yeah guys

#

how do i make my mod

#

cross mod compatible with fusion

#

without it being dependent

long sun
#

oh one more question

#

i've tried this code with SMODS.Planet and SMODS.Consumable, but neither worked. G.Phanta.thetrick_supported_planets is a list of keys (eg. "c_pluto", "c_venus")

#

what am i doing wrong?

jovial wave
slim ferry
#

makes it not load unless that mod is present

#

alternatively you could next(SMODS.find_mod("<id>")) to check for the mod to skip loading a file entirely or smth

solid salmon
#
Othermod = {}
Othermod_Mod = SMODS.current_mod
Othermod_Config = Othermod_Mod.config

if next(SMODS.find_mod("FusionJokers")) and Othermod_Config.OtherFusions == true then
    Othe_has_Fusion = true
else
    Othe_has_Fusion = false
end

SMODS.load_file("Others/Othermod_Jokers.lua")()

if Othermod_Config.OtherFusions then
SMODS.load_file("Others/Fusions.lua")()
end

Othermod_Mod.config_tab = function()
    return {
        n = G.UIT.ROOT,
        config = { align = "m", r = 0.1, padding = 0.1, colour = G.C.BLACK, minw = 8, minh = 6 },
        nodes = {
            { n = G.UIT.R, config = { align = "cl", padding = 0, minh = 0.1 }, nodes = {} },

            {
                n = G.UIT.R,
                config = { align = "cl", padding = 0 },
                nodes = {
                    {
                        n = G.UIT.C,
                        config = { align = "cl", padding = 0.05 },
                        nodes = {
                            create_toggle { col = true, label = "", scale = 1, w = 0, shadow = true, ref_table = Other_Config, ref_value = "OtherFusions" },
                        }
                    },
                    {
                        n = G.UIT.C,
                        config = { align = "c", padding = 0 },
                        nodes = {
                            { n = G.UIT.T, config = { text = "Other fusions", scale = 0.45, colour = G.C.UI.TEXT_LIGHT } },
                        }
                    },
                }
            },
        }
    }
end
slim ferry
#

yeah you arent checking if fusionjokers is installed

#

you just set a flag and then never use it

solid salmon
#

soo

#

how do i check

#

correctly

slim ferry
#

check the flag you set

#

and not Othermod_Config.OtherFusions

#

since youre already checking for that anyway

solid salmon
#

so i remove the config part

slim ferry
#

no

#

well

#

i assume its actually an existing config option

solid salmon
slim ferry
#

ok

#

well

#

you set this very useful flag Othe_has_Fusion if the config option and fusion jokers are both enabled

#

so you should

#

use that

#

to check if you should load the file

solid salmon
#

uhhh

#

oh

#

do you want me to use Othe_has_fusion for the loading instead of OtherFusions

slim ferry
#

yes

solid salmon
#

ok

slim ferry
#

because then it actually checks if fusionjokers exists

solid salmon
#

alright

pale holly
solid salmon
nova sleet
#

can I even mod my game? I play the Xbox PC version of Balatro

#

Don't really see many guides for that

slim ferry
#

nope

nova sleet
#

frick

slim ferry
#

xbox store version isnt supported yet

#

it might in the future maybe sometime

analog spoke
#

anyone know how I'd make an edition that makes vouchers cost less?
it's been a while since I've done edition stuff lol

#

I already have the shader btw, incase u were curious lol

slim ferry
#

i imagine you would hook Card:set_cost()

cobalt iron
#

How would I destroy all cards held in hand?

lyric wadi
#

what's the area for consumable again

slim ferry
#

G.consumeables

slim ferry
cobalt iron
#

Ah, alright thanks

lyric wadi
#

and how do i check what type of consumable it is

slim ferry
#

in what situation

lyric wadi
#

i want to check if it's a planet, and then get what hand it correspond to

#

kinda like observatory

slim ferry
#

did you check vanillaremade observatory...

lyric wadi
#

yes and i must've fucked up something

#

hence why i come here

slim ferry
#

whats the code

lyric wadi
#
if context.other_consumeable and context.other_consumable.ability.set == 'Planet' and context.other_consumable.ability.consumeable.hand_type == context.scoring_name then
            return {
                x_mult = 2,
                message_card = context.other_consumable
            }
        end```

this is literally just from observatory
#

crash message was something about context.other_consumable being nil or something i didnt get screenshot

slim ferry
#

oh

#

yeah because

#

its other_consumeable

#

you spelled it correctly in 2 places

lyric wadi
#

OKAY

#

then it's vanillaremade that's wrong

slim ferry
#

oh

#

lmfao

lyric wadi
#

minor spelling mistake

wind steppe
#

minor spelling correction mistake

slim ferry
#

accidentally spelled consumable correctly

#

🥀

red flower
#

:p

lyric wadi
#

130 is

if context.other_consumeable and context.other_consumeable.ability.set == 'Planet' and 32 < card.ability.extra.wordAdded < 36 then
slim ferry
#

yeah you cant do that

lyric wadi
#

heck

long sun
#

omg it works pleading

lyric wadi
#

can you not do chained inequality in lua

#

if yes then genuinely the first actual Lua L

long sun
#

also hai kusane :3

lyric wadi
#

other stuff i can put up with

slim ferry
lyric wadi
#

hihi ghostie :3 :3

slim ferry
#

it calculates the first one seperately

long sun
#

:3 :3 :3

slim ferry
#

and then it becomes true/false < some number

lyric wadi
#

:3 :3 :3

slim ferry
#

first ever python w over lua

lyric wadi
#

real

pseudo furnace
#

Is there a way to check jokers being moved?

wind steppe
red flower
slim ferry
#

smallnum

pseudo furnace
rare torrent
#

why is this nothing working for checking if there is a specific consumable in one of the consumable slots?

    local required = {
        c_omega_vaccum_tube = 1
    }
    local found = {
        c_omega_vaccum_tube = 0
    }
    for _, consumable in ipairs(G.consumeables.cards) do
        if consumable.key == "c_omega_vaccum_tube" then
            found.c_omega_vaccum_tube = found.c_omega_vaccum_tube + 1
        end
    end
    return found.c_omega_vaccum_tube >= 1
    end
slim ferry
#

it would be consumable.config.center.key

rare torrent
#

where?

slim ferry
#

instead of consumable.key

rare torrent
#

ok yeah that was it thank youuu

long sun
#

how do you add something to a card's name?

#

so eg. Pluto+ or Venus+++

#

<@&1133519078540185692>

lyric wadi
#

wha

cobalt iron
slim ferry
#

which is...?

cobalt iron
slim ferry
#

when are you destroying the cards

cobalt iron
#

after the hand is played

#

I'm using a joker

slim ferry
#

what context

cobalt iron
#

context.after

slim ferry
#

try putting the SMODS.destroy_cards in an event

cobalt iron
slim ferry
#

can you show line 2507 of SMODS/src/utils.lua in your lovely/dump

cobalt iron
#

This is what it shows

slim ferry
#

okay yeah i have no clue

pseudo furnace
#

This hook crashes so I think I'm doing smth wrong

high quartz
#

for some reason it's not recognizing my main.lua file

slim ferry
#

do you have a metadata file

high quartz
#

yeah haha

#

"main_file": "main.lua",

slim ferry
#

does it have all of the required fields entered

red flower
high quartz
#

i just followed the documentation

cobalt iron
# slim ferry okay yeah i have no clue

I think it has to do with the hand size that the joker adds? For some reason, if the joker increases hand size by 6 and then destroys the cards, it crashed the game. When I give the joker +5 hand size it doesn't crash at all.

cobalt iron
pseudo furnace
red flower
#

that's what hooks are yes

high quartz
#

its just my visual studio thats restarded

pseudo furnace
warm gyro
#

How can I get my voucher into a run?

tranquil gull
#

i think this art is good enough

#

not the best at drawing jimbo

high quartz
#

hahahhahahahaha

tranquil gull
#

by unique i mean like. if you score a card and then enhance it it's a different card. if you score two cards that have identical everything they're different cards still

#

might need a nerf tbh

noble schooner
#

yeah

tranquil gull
#

maybe +5

noble schooner
#

+2

tranquil gull
#

how about +3

noble schooner
#

especially since any modification to a card makes it considered a separate card iirc

#

so +2 seems good for a common like that to me

tranquil gull
#

well hang on

#

no i just realized thats not right based on how i implemented it

#

modifying cards doesn't count, the only way to get new unique cards is to add to the deck

noble schooner
#

unique cards makes me assume the same logic as The Pillar

noble schooner
#

not how unique cards work in balatro

tranquil gull
#

it uses Card.unique_val :p

noble schooner
#

at least, I'm pretty sure

tranquil gull
#

i'm just like, how would i do it like how pillar does it
i. gotta look into that

#

or i could just do per unique rank/suit combination

noble schooner
#

that'd probably be better

#

keep it at +10 if you do that since it'll cap out at 52 scales anyways

#

assuming you aren't adding any ranks or suits

tranquil gull
#

stone cards make that 53 but yea

noble schooner
#

right

tranquil gull
#

either way, is that art passable?

#

for the joker i mean

midnight trellis
# tranquil gull either way, is that art passable?

It looks good, I like it. I would make the glasses rectangular so that it leaves space in the corners that won't be covered by the orange eyelashes. You might also have to make the glasses a little bit bigger in such case. I would also make the shirt blue like Jimbo has, because orange and blue are complementary colors. If the shirt has to be orange in any case, make it a lighter/darker variation of the orange found in the eyelashes. The hair is spot on to me. Nice work.

lavish elm
#

how to do the calc_dollar_bonus without jokers?

charred widget
#

Hey folks. Today we're back with more work on my Balatro mod. This time, I'm attempting to program a voucher to allow Item consumables to show up in the shop when they normally aren't. Enjoy the video.

#

Anyways yeah I want to make a voucher allow a custom consumable type appear in the shops. any ideas how I could go about doing that?

slim ferry
#

what is the key of the consumable type

frosty rampart
charred widget
slim ferry
#

ah well

#

it seems meta has already given the answer

high quartz
#

this might be slighty dumb, but do you just create the code in one long "main.lua" file with jokers blinds and so on?

havent coded in lua before

slim ferry
#

you can load other files by doing assert(SMODS.load_file("<path>"))()

high quartz
#

might have missed that in the documentation

slim ferry
#

im not even sure if it is in the documentation because i didnt know about it until i looked at vanillaremade using it

#

probably is because its rather important but ig its just very hidden then

high quartz
#

ahhhh I see

red flower
#

it's in the utility page

high quartz
#

ill kiss you

slim ferry
#

??

high quartz
#

thank you ❤️

hardy viper
slim ferry
#

?????

tranquil gull
#

Bartender [Uncommon]
+1 discard limit, -1 hand size

high quartz
#

Is there a way to remove the "Purcahse or use this card in an unseeded run to learn what it does"
so i can test the cards I have created

frosty rampart
#

unlock all

#

and if you want to spawn the card in, use debugplus

high quartz
#

ahhh alright

#

thanks 😛

#

guess I need to draw the cards before i insert them to test if its work

wind steppe
#

how do i stop a created card from coming with additional stickers?

#

i want to create a card with specific stickers and nothing else

slim ferry
#

Does the balatro font support the | character

#

pipe i think its called

hardy viper
#

try it and see

slim ferry
#

true...

solid salmon
signal plaza
fossil ermine
#

bump

true jasper
#

add an in pool function

mystic river
#

give them an in_pool function and have it use SMODS.find_card("joker key") to look for the joker you want

fossil ermine
#

kay :3

mystic river
#

it should return true if your desired conditions are met, and false if not
(it can also return true, {allow_duplicates = true } if you want the card able to show up multiple times without showman or equivalent, but that's a different story than what you're going for rn :v )

slim ferry
#

should be next(SMODS.find_card("joker key"))

slim ferry
mystic river
#

right, right, next
because it returns a table of every found card

#

i always forget that

unkempt bronze
#
    key = 'ewow'
    config = { extra = { mult = 1 } },
    rarity = 1,
    atlas = 'gb_Jokers',
    pos = { x = 2, y = 1 },
    cost = 4,
    blueprint_compat = true,
    loc_vars = function(self, info_queue, card)
        local letter_count = 0
        if G.jokers and G.jokers.cards[#G.jokers.cards] then
            local joker_name = G.localization.descriptions.Joker[G.jokers.cards[#G.jokers.cards].config.center.key].name
            if joker_name then
                for i = 1, #joker_name do
                    local c = joker_name:sub(i,i)
                    if c ~= " " then
                        letter_count = letter_count + 1
                    end
                end
            end
        end
        return { vars = { card.ability.extra.mult, letter_count * card.ability.extra.mult } }
    end,
    calculate = function(self, card, context)
        if context.joker_main then
            local letter_count = 0
            if G.jokers and G.jokers.cards[#G.jokers.cards] then
                local joker_name = G.localization.descriptions.Joker[G.jokers.cards[#G.jokers.cards].config.center.key].name
                if joker_name then
                    for i = 1, #joker_name do
                        local c = joker_name:sub(i,i)
                        if c ~= " " then
                            letter_count = letter_count + 1
                        end
                    end
                end
            end
            if letter_count = 11 then
             return {
                mult = letter_count * card.ability.extra.mult
             }
        end
    end
}```   
Barring my addition of the 'if then' line, it's all of Typograph from Grab Bag. How do I make it so that it looks at every joker held, and not just the one to it's right?
fossil ermine
bold sleet
#

Hello. Is there a way to make so the atlas of say, a joker, does not include the mod's prefix?

red flower
#

i think you do atlas = false

bold sleet
#

where do I define that?

#

In each joker?

red flower
#

yes

granite jay
#

Anyone know how to make it so you change which texture a joker uses when a config option is selected?

bold sleet
#

fuck

#

Well, I guess I now spend another hour of my life on that.

crimson echo
#

wsg chat

#

A friend of mine wanted me to gaslight you all into handing over your github usernames to help with a balatro mod we're working on

bold sleet
#

Further explain.

#

Also, is there a way to separate the atlas for the base part of the card and the soul part of the same card?

crimson echo
bold sleet
#

So basically random bullshit go

fossil ermine
#

wait i forgot to specify this was for a legendary joker venniebwaah

crimson echo
bold sleet
#

What if I added whatever the fuck to balatro 36

frosty rampart
crimson echo
bold sleet
#

fucking dammit

crimson echo
#

wait, what do you mean by "soul" part?

bold sleet
#

You know the soul and legendary jokers, that they have part of their image as a separate part of the atlas.

frosty rampart
#

i don't think so
at least not easily

bold sleet
#

As if hovering over the normal card.

red flower
#

you would need a custom draw function/drawstep

crimson echo
#

I mean, if you wanted to, you could have them in seperate areas of the same atlas sprite and draw step them

bold sleet
#

I'll see what I can do.

crimson echo
bold sleet
#

Basically the mod you described and want victims to help part-take in it.

fossil ermine
#

how do i make it so that a legendary joker can only appear from a soul once a specific joker is in the main joker slots vennieblep

crimson echo
#

more like, add cool shit (and fishing)

bold sleet
#

Can I have a look at the mod?

crimson echo
#

sure, it's in a very unfinished state, we just started working on it

#

i hope you have vscode-

bold sleet
#

good luck

#

I am currently juggling other mods and shit

crimson echo
#

oh that's fine then

#

if you decide to help out after you finish suffering, just- drop in unannounced-

#

good luck to you too

#

anyone else want to have a crack at this?

elder rune
#

Have never seen someone do something like this as a joker

granite jay
#

like SMODS.current_mod.config_file.altsprinkle

red flower
#

config instead of config_file but yes

granite jay
#

so current mod returns a nil value

#

wait i have an idea

#

nvm i just had to set a variable to SMODS.current_mod

granite jay
#

or like it attempted to call it when it was nil

red flower
#

it's card.children.center:set_sprite_pos

high quartz
#

this might be dumb, but do I have to draw the the jokers before I can test their functionality?

frosty rampart
#

no, you can just have a placeholder asset (or even just don't make the joker refer to a specific atlas, it'll point to the vanilla joker spritesheet)

high quartz
#

oh really? what would I use as the atlas reference?

#

i just took a random png

wintry swallow
#

so earlier this morning i finally fixed the code for the unkillable sticker (which returns the attached card to the shop after sold or destroyed) and it works (at least for being sold, not sure about being destroyed yet) but after the joker it's attached to finishes triggering, i get the following crash error:

#

anyone mind helping me out?

solid salmon
#

Guys

#

I wanna make a pool

#

For cards and jokers that have no enhancements, seals and editions

#

How do i do that

slim ferry
#

you can force cards to generate without editions be adding no_edition = true to SMODS.add/create_card

solid salmon
#

Not generate

#

I want to make a group called "tainted"

slim ferry
#

okay but

jolly shadow
#

cards in the center pool do not have enhancements seals or editions by default

#

they only get them when u generate them

slim ferry
#

what does not having enhancements seals or editions have to do with this

solid salmon
#

Im trying to make a white deck

slim ferry
#

and what does it do

solid salmon
#

Non-tainted cards retrigger once (includes jokers)

slim ferry
#

so just cards without modifiers

solid salmon
#

Pretty much

#

(Also plan on making a joker based of said deck)

slim ferry
#

for stickers you need to do a bit more if you want to include those but the others are simple enough

solid salmon
#

You mean stamps?

slim ferry
#

no

#

stickers like

#

eternal rental

#

that kinda stuff

solid salmon
#

Im not sure if i should include those

#

Oh wait

#

Yeah i should

slim ferry
#

a lot of modded modifiers are stickers under the hood

#

and for stickers youll have to do a loop across either SMODS.Stickers or SMODS.Sticker.obj_buffer since there isnt really a way to look for any sticker directly

#

so you need to check for every sticker key if a card has it

solid salmon
#

K

chrome widget
bold sleet
#

noice

granite jay
#

Hey how do I make it so you can make it so a straight can be played with only one gap of two ranks?

#
[patches.pattern]
target = '=[SMODS _ "src/overrides.lua"]'
pattern = '''
if skip and (wrap or not SMODS.Ranks[v].straight_edge) then
    for _,w in ipairs(SMODS.Ranks[v].next) do
        ret[#ret+1] = w
    end
end
'''
position = "at"
payload = '''
if type(skip) == 'number' and skip > 1 then
    if next(get_flush(hand)) then
        local function get_next_ranks(rank, skip, ret)
            if skip > 0 and (wrap or not SMODS.Ranks[rank].straight_edge) then
                for _,w in ipairs(SMODS.Ranks[rank].next) do
                    ret[#ret+1] = w
                    get_next_ranks(w, skip - 1, ret)
                end
            end
        end
        get_next_ranks(v, skip, ret)
    end
elseif skip and (wrap or not SMODS.Ranks[v].straight_edge) then
    for _,w in ipairs(SMODS.Ranks[v].next) do
        ret[#ret+1] = w
    end
end
'''
match_indent = true```
#

Code btw

solid salmon
#

Can i use

#

card.seal == nil

#

For the context

slim ferry
#

that works i think but you should just use not card.seal instead

feral tree
#

ANYONE HERE WHO KNOWS HOW MALVERK'S ALT TEXTURE THING WORKS???

serene granite
#

whats the code to import card textures? like playing cards, i am following a tutorial but i think it might be old and it keeps crashing for me

#

i added an atlas for the files but

chrome widget
#

@wispy falcon

{
    vec2 uv = ((texture_coords*image_details) - texture_details.xy*texture_details.ba)/texture_details.ba;
    
    float x_scale = texture_details.b/image_details.x;
    float local_x_origin = x_scale*texture_details.x;
    float local_x_diff = texture_coords.x - local_x_origin;
    float local_x = local_x_diff/x_scale;
    vec2 mirrored_coords = vec2((local_x > 0.5 ? (local_x_origin + x_scale) - local_x_diff : texture_coords.x), texture_coords.y);
    vec4 tex = Texel(texture, mirrored_coords);

    return dissolve_mask(tex, mirrored_coords, uv);
}```
wispy falcon
#

What was the problem, if I may ask?

chrome widget
#

Doing bad math

#

I'm not as good at math as I used to be and I struggle without writing it out myself

#

the stock market is stable

hardy viper
#

to the . side

#

are there any truly symmetrical jokers

#

invis?

serene granite
#

can someone link me to some information please, i am trying to import custom playing card textures for my mod, but it doesnt seem to be working

chrome widget
#

Because of Joker text, I'm not sure any are truly symmetrical

hardy viper
#

oh true

wispy falcon
#

They look funny

chrome widget
#

Golden Ticket is pretty close

hardy viper
#

almost

#

yeah i think they all have at least some text on them

#

so probably nothing that can be symmetrical

chrome widget
#

Brainstorm is a weird cyclops alien

hardy viper
#

😭

#

what does misprint look like

chrome widget
hardy viper
#

joker

wispy falcon
#

Blueprint looks dumb since his eyes are usually looking right

serene granite
#

hey does anyone have any advice on importing playing card textures?

#

i cant seem to get it to work

solid salmon
#
    key = "white",
    loc_txt = {
      name = 'White Deck',
      text = {'{C:attention}retriggers{} unmodified cards'}
   },
    pos = { x = 0, y = 0 },
    config = {repetitions = 1},
    loc_vars = function(self, info_queue, card)
        return {vars = {self.config.repetitions}}
    end,
    calculate = function(self, card, context)
        if context.cardarea == G.play and context.repetition then
            if next(SMODS.get_enhancements(card,nil)) and card.seal == nil then
            return {
            message = localize('k_again_ex'),
            repetitions = self.config.repetitions,
            }
        end
    end
end,
atlas = "white"
}
SMODS.Atlas {
    key = "white",
    path = "White_Deck.png",
    px = 71,
    py = 95
}```
#

WHAT AM I DOING WRONG

jolly shadow
#

config = { extra = {repetitions = 1 } }

#

and you dont do self.config.repetitions you do card.ability.extra.repetitions

solid salmon
fluid steppe
#

does anyone know how i would make a seal retrigger the joker it's on

#

red seal no work it justt retriggers every card in hand if a joker exists with a red seal

faint yacht
#

That'd be context.retrigger_joker-related... as well as the optional feature of joker retriggers needing to be enabled.

solid salmon
#

Where do i add that?

faint yacht
#
SMODS.current_mod.optional_features = function()
    return { retrigger_joker = true }
end

for enabling said Joker retriggers... and for the Seal's calculate, you do

if context.retrigger_joker_check and context.other_card and context.other_card == card and card:get_seal() and card:get_seal() == 'your_seal' then
  return { repetitions = 1 }
end

I think?

fluid steppe
#

this is in SMODS.Seal:take_ownership('red_seal',{...})

#

god i hope this works

SMODS.Seal:take_ownership('red_seal',{
    calculate = function(self, card, context)
        if context.other_card==card then -- because there's no reason a red seal should be retriggering anything other than the card it's on.
            if context.repetition or context.retrigger_joker_check then
                return {
                    repetitions = card.ability.seal.extra.retriggers
                }
            end
        end
    end
    },
    true
)
#

and it doesnt.

#

oh my god

#

it's not even actually taking ownership

#

i swear to fucking god

hardy viper
#

is the key really red_seal

fluid steppe
#

if it's not i'm killing

#

ok i think it is

#

but then i have no idea wht the fucks happening

#

does take_ownership not work on seals or smth???

red flower
#

the key for red seal is "Red" im pretty sure

fluid steppe
#

why the fuck

red flower
#

red_seal is only for localization i think

solemn shuttle
#

"i bought a property in balatro"

faint yacht
fluid steppe
#
SMODS.Seal:take_ownership('Red',{
    key = 'Red',
    pos = { x = 5, y = 4 },
    config = { extra = { retriggers = 1 } },
    badge_colour = G.C.RED,
    calculate = function(self, card, context)
        if card==context.other_card and (context.repetition or context.retrigger_joker_check) then
            return {repetitions = card.ability.seal.extra.retriggers}
        end
    end,
    loc_vars = function(self, info_queue, card)
        return { vars = { self.config.extra.retriggers } }
    end
},true)

ok so it's retriggering the joker but it's still retriggering played cards despite the card==context.other_card

faint yacht
#

context.cardarea == G.jokers?

#

'cause the card is the current card that's being checked, regardless if it's a playing card, Joker, Consumable, etc.

#

-# oops.

cunning valley
#

Hello! Anyone happen to have the function that makes Idol choose a random card in your deck?

feral tree
#

how do i change g.sharedsoul

red flower
#

G.shared_soul = Sprite(<parameters>)

cunning valley
#

However, for the description I want it to display them in the config. What values should I be placing in said config? since vremade doesn't use custom loc_txt

feral tree
true jasper
red flower
fluid steppe
#

ok what if i make it a brand new sticker that just looks like a red seal and just. lie

#

agh but then itll be compatible with other seals

#

wait why would that be a problem there shouldnt be a way for other seals to appear

feral tree
red flower
#

i dont have code ready for this

#

and im not going to do it for you

quick prairie
#

how do i manipulate values on a joker using another joker? I know I'm supposed to use Cryptlib or something but does anyone have an example

true jasper
fluid steppe
#

i just need to a) make it not shiny and b) figure out how the fuck to make jokerdisplay work with this

#

neither of which i know how to do

wanton wren
#

wssp d ox

elder rune
elder rune
#

I got it working shortly after

quick prairie
#

i eventually figured it out, but getting it to work on specific jokers was annoying

elder rune
#

🔥

red flower
#

whats the issue

fluid steppe
#

it's a sticker

#

how the fuck would you make a sticker add a retrigger to the joker its on

red flower
#

to a joker?

#

or a playing card?

fluid steppe
#

a joker

elder rune
#

context.retrigger_joker iirc

fluid steppe
#

this is for jokerdisplay

red flower
drifting topaz
#

Im new to modding balatro how would I like detect when something happens like when a card is played/scored

#

I cant figure it out

#

😭

fluid steppe
#

oh i should prob explain before throwing a wiki page at you

#

uh

drifting topaz
fluid steppe
#

actually nevermind im too tired to

drifting topaz
#

But im trying to like make new stakes I guess

red flower
drifting topaz
fluid steppe
#

well youre gonna have to if you want help

frosty rampart
#

^ try anyway
first, do you mean played or scored?
second, what do you want to do once you've detected it?

fluid steppe
drifting topaz
#

For like anything that happens

frosty rampart
#

do you actually want it globally, or for a specific stake

fluid steppe
#

you know thats actually something i wanna know too

drifting topaz
red flower
#

stakes have calculate functions

elder rune
#

Is this joker description understandable

drifting topaz
#

Oh 😭

red flower
#

(thanks to me)

drifting topaz
#

I couldnt tell

fluid steppe
drifting topaz
#

It didnt have a thing for calculate

red flower
#

its very recent

drifting topaz
#

So I was confused

#

Thanks

fluid steppe
#

im goin to bed

#

awa

frosty rampart
fluid steppe
#

hold on

elder rune
#

It's that every joker that gives mult. Will give a little more

#

+15 mult -> +16 mult
X5 -> X6

red flower
#

oh are those 2 different effects

elder rune
#

Yea

#

But it affects itself too

red flower
#

i would recommend capitalization at least, and a line break or multibox

elder rune
#

alr

#

And I guess it's also not gaining mult repetitively

serene granite
#

hey im trying to make an enhancement that makes it so cards cant get debuffed, is that possible with steamodded, i cant find how to do it in the guide

frosty rampart
#
SMODS.current_mod.set_debuff = function(card)
  if card.ability and card.ability.name == "m_modprefix_enhancementkey" then
    return "prevent_debuff"
  end
end

current_mod is literally "current_mod", but replace modprefix with your mod's actual prefix and enhancementkey with the key of your enhancement
put this in your main file, not in any enhancement definitions or whatever

serene granite
#

so i just put that in my main file, and replace the words and it will work ?

serene granite
#

ok lets tr y

faint yacht
#
SMODS.current_mod.set_debuff = function(card)
    if SMODS.has_enhancement(card, 'm_mod_key') then return 'prevent_debuff' end
end

?

serene granite
#

its still debuffed

serene granite
faint yacht
#
togabalatro.set_debuff = function(card)
    if SMODS.has_enhancement(card, 'm_toga_nickel') then return 'prevent_debuff' end
end

is mine.

#

Where toga is my mod prefix and nickel is the key for my Nickel enhancement.

serene granite
#

ohhh ok

#

so i could use that? if i replace the first togabalatro with mymodkeybalatro.set_debuff?

faint yacht
#

togabalatro = SMODS.current_mod

serene granite
#

ohhh

#

sorry im so noobish to this haha

faint yacht
#

So was I back when I started.

serene granite
#

i understand

#

aw didnt work..

#

@faint yacht see

#

is that right or wrong

#

do i have to put it somewhere special

frosty rampart
#

that should be correct
is your mod prefix actually enchiridion? and is the enhancement's key actually slime?

serene granite
#

yeah i am pretty sure

#

oh wait

#

it wasnt

#

does capital letters matter

frosty rampart
#

it might yea

serene granite
#

omg it worked ! thank u so much

#

ok another question, sorry for asking a lot, but is it possible to make it so the same enhancement also makes the card count as a face card

#

i was reading the pereidolia example but i cant get it to fit into an enhancement the same way

frosty rampart
#

the vremade code for pareidolia is actually a bit hard to read, but you'd essentially just replace the snippet of next(SMODS.find_card("j_vremade_pareidolia")) with SMODS.has_enhancement(self, "full_enhancement_key") (where "full_enhancement_key" is the same string that you used in the set_debuff function earlier)

serene granite
#

ooo ok let me give it a shot

#

it freaking worked you genius !

frosty rampart
#

happy to help

chrome widget
#

weird inconsistent scaling between different text items based on the scaling of other text items and I haven't figured how best to clamp it

copper perch
#

So, I was testing a joker of mine in multiplayer and it crashed the game. I got the crash log and have the code, any help would be greatly appreciated! Trying to make it so a card deletes after a blind. It can do that in vanilla but I'd like it to work in multiplayer too if possible

calculate = function(self, card, context)
        if context.remove_playing_cards and not context.blueprint then
            local destroyed_cards = 0
            for _, removed_card in ipairs(context.removed) do
                destroyed_cards = destroyed_cards + 1
            end
            if destroyed_cards > 0 then
                card.ability.extra.xmult = card.ability.extra.xmult + destroyed_cards * card.ability.extra.xmult_gain
                    return {
                        message = localize {
                        type = 'variable',
                        key = 'a_xmult',
                        vars = {
                            card.ability.extra.xmult
                        }
                    },
                }
            end
        end
        if context.joker_main then
            return {
            xmult = card.ability.xmult
            }
        end
        if context.end_of_round and not context.game_over and context.main_eval and not context.blueprint then
            local card_ = pseudorandom_element(G.hand.cards, 'seed')
            SMODS.destroy_cards(card_, nil, true)
        end
    end
red flower
copper perch
#

Really?? Its been working just fine without my mod so thats weird, but thank you! What version would I need?

red flower
#

711

copper perch
#

and with the code above would any of it need to be changed going back to that older version?

red flower
#

i dont think so

copper perch
#

Alright, thank you for the help! I'll try that out tomorrow

serene granite
#

what do i use to make it so a card has the same glass destroy effect

#

like my enhancements

faint yacht
#

Hook SMODS.shatters(card).

serene granite
#

oohh ok

faint yacht
#

...actually, wait, the shatters could be defined in the Enhancement definition, I think.

#

As it checks for G.P_CENTERS[key].shatters...

serene granite
#

hmm

#

i think ill try to fix it tomorrow.. ill move on for now

serene granite
#

why is my joker appering in the shop multiple times without show man

frosty rampart
#

if you spawned it in with debugplus, it doesn't get taken out of the pool for some reason

#

it should be fine in normal gameplay

serene granite
#

ohh ok

#

good to know

faint yacht
red flower
#

that one was a bit older

serene granite
#

ok last question i will ask tonight !
i want to make a joker that scales with hand size

so like if u have the juggler lets say then you get more mult, is it possible to track hand size like that? or like each additional hand size gained

#

i guess for more info, it gives 15 mult for every additional hand size the player has

faint yacht
#

...and I was mainly referencing what I already had for my enhancements since 1.2.0.

serene granite
serene granite
#

how would i impliment that, like where?

daring fern
serene granite
#

oooo

#

okok

high quartz
#

whoever told me how to fix the assets is a fucking g

#

sorry my language

red river
#

what in-game function or tidbit of code is responsible for displaying boss blind's ability text in the middle of the screen? i'm trying to change boss blind ability mid-round and the text doesn't seem to be affected

red river
#

that seems too broad... which specific part of it displays boss blind text?

#

nevermind, i think i found it(?)

#

anyway, thanks

prisma loom
#

Folks, Im trying to add a +1 card choice in packs as a passive effect for the deck but can't understand why it's not working

#

any ideas?

daring fern
long sun
#

what contexts run when my Joker is selected or deselected?

#

also, i've heard that you can play a sound when returning a message, how do you do that?

prisma loom
long sun
#

thanks ^^

prisma loom
#

14

long sun
#

i'm gonna look at yahimod to see how it handles the selection thing, so dw about answering that

daring fern
slim ferry
#

can i reuse the operator used for scaling in calc_scaling when its a function or will whatever extra local variables it uses no longer exist?

lavish elm
#

how do I modify the amount of dollars given at the cashout screen?

slim ferry
#

if youre just adding new rows (like gold joker), then use calc_dollar_bonus while checking gold joker or some other joker like that in vanillaremade for reference

lavish elm
#

I am trying to do it with a consumable

solid salmon
#
    key = "white",
    loc_txt = {
      name = 'White Deck',
      text = {'{C:attention}retriggers{} unmodified cards'}
   },
    pos = { x = 0, y = 0 },
    config = {repetitions = 1},
    loc_vars = function(self, info_queue, card)
        return {vars = {self.config.repetitions}}
    end,
    calculate = function(self, card, context)
        if context.cardarea == G.play and context.repetition then
            if card.seal == nil then
                return {
                repetitions = self.config.repetitions,
                }
            end
        if context.retrigger_joker_check then
            return{
                repetitions = self.config.repetitions,
            }
        end
    end
end,
atlas = "white"
}
SMODS.Atlas {
    key = "white",
    path = "White_Deck.png",
    px = 71,
    py = 95
}```
guys i need help, this code works BUT not in the contexts i want it to
#

like i said yesterday its supposed to retrigger non-modified cards

#

but right now

#

it retriggers ALL CARDS

#

excluding jonklers

#

wait

#

why do i even have a config for the repetitions if its only one?

daring fern
solid salmon
#

thx

vast night
#

Hey everyone. I just had a quick curiosity question: What does dq_1 do in localization? I've never seen this in game

dq_1={
  "Yikes! I hope you",
  "have a few tricks",
  "up your sleeve for",
  "this final challenge!",
},
slim ferry
#

unused text for jimbo when entering ante 8 if i had to assume

#

its not actually used or referenced anywhere afaik so its hard to have more than a guess

solid salmon
#

uhhh

#

the code works but crashes at the joker part

#

i know i need the optional features but where do i implement it?

daring fern
solid salmon
#

also do i need to make a variable for something that only happens once?

#

like only 1 retrigger

wintry swallow
#

hey yall :3

daring fern
wintry swallow
#

how do i get into balala modding this shi confusing asf 😭

solid salmon
#

but this context.retrigger_joker_check

#

needs me to add optional features

daring fern
solid salmon
#

where do i add that

wintry swallow
#

ty my legendary joker <3

lavish elm
solid salmon
#

ok

red river
#

how can i get a list of all existing boss blinds in the game as objects? neither G.P_BLINDS or SMODS.Blinds seem to return expected results

#

G.P_BLINDS is the closest bet but it doesn't take modded boss blinds into account. and SMODS.Blinds returns only 10 boss blinds in a... random manner(?)

daring fern
red river
#

so i have to... add that manually with a patch. do other mods do that too?

slim ferry
#

no

#

G.P_BLINDS already has every blind

#

youre either doing something wierdly or breaking it and its probably the former since otherwise some blinds just wouldnt exist

red river
#

ok, lemme triple check that...

slim ferry
#

if youre just looking at what vscode shows when hovering it then that wont have everything

#

fyi

red river
#

okay it works, i forgot to put quotation marks around bl_jd_snecko in local blindcopy = G.P_BLINDS["bl_jd_snecko"]

#

thanks!

solid salmon
#

ok

#

yeah i added the optional stuff

#

but the code you sent kept crashing

red river
#

actually i code everything in notepad. i only occasionally look at my code in vscode to see the number of the string

solid salmon
#

(also it cant be card.effect because the deck will crash)

#

also

#

context.retrigger_joker_check

daring fern
solid salmon
#

i used the "fixed" code

#

but i changed the card.effect to self

#

because if i keep it as card then it crashes

#

...

solid salmon
#

heck this

#

for now it'll just retrigger playing cards

#

oh wait

#

ortalab has retrigged jokers

hybrid iris
#

im really irritated by this one thing im working on but I have no idea how to fix it
for some reason, the game refuses to display things in my custom collection in load order and i cant figure out Why

lavish pine
#

I have a lot of textures I've drawn for a high quality texture pack im making but i've got no idea how to import them, could someone help me?

spare wren
#

how would i create a specific joker using this function? like this?

local card = create_card('Joker', G.jokers, nil, 0, nil, nil, "customjoker", 'chr')

because even with the prefix included (mod_customjoker) this seems to give a center not found error (which is basically telling me it couldnt find a card to generate)

spare wren
daring fern
spare wren
#

does the function handle the adding to deck and such part by itself or

spare wren
daring fern
spare wren
#

okay thank you

spare wren
# daring fern Yes.
G.E_MANAGER:add_event(Event({
    func = function() 
        SMODS.add_card({key = 'j_blr_observatorium'})
        return true
    end}))   

this still seems to give the same error unfortunately, my mod prefix is blr and my joker key is observatorium

daring fern
spare wren
#

yup

#

ill try again

#

just in case

#

yup

daring fern
spare wren
#

this is my full code if it changes anything

#
if context.end_of_round and not context.individual and not context.repetition and not context.blueprint then
    card.ability.extra.rounds_remaining = card.ability.extra.rounds_remaining - 1
    if card.ability.extra.rounds_remaining == 0 then
        G.E_MANAGER:add_event(Event({
            func = function()
                card.T.r = -0.2
                card:juice_up(0.3, 0.4)
                card.states.drag.is = true
                card.children.center.pinch.x = true
                G.E_MANAGER:add_event(Event({trigger = 'after', delay = 0.3, blockable = false,
                    func = function()
                        G.jokers:remove_card(card)
                        card:remove()
                        card = nil
                    return true; end})) 
                return true
            end
        }))
        G.E_MANAGER:add_event(Event({
            func = function() 
                SMODS.add_card({key = 'j_blr_epinephrine'})
                return true
            end}))   
        return {
            message = "UNBOUND",
            colour = G.C.GREEN
        }
    end
end
#

first event was just stolen from gros michel, the second is what you said to do

#

i replaced observatorium with another joker from my mod (which also exists, i definitely know that)

solid salmon
#
    key = "white",
    loc_txt = {
      name = 'White Deck',
      text = {'{C:attention}retriggers{} unmodified cards'}
   },
    pos = { x = 0, y = 0 },
    config = {repetitions = 1},
    loc_vars = function(self, info_queue, card)
        return {vars = {self.config.repetitions}}
    end,
    calculate = function(self, card, context)
        if (context.repetition and context.cardarea == G.play) then
            if not (context.other_card.edition or (next(SMODS.get_enhancements(context.other_card)) and context.other_card:get_seal())) then
                return {repetitions = self.config.repetitions}
        end
    end
    if context.retrigger_joker_check then
        if not (context.other_card.edition or (next(SMODS.get_enhancements(context.other_card)) and context.other_card:get_seal())) then
            return {repetitions = self.config.repetitions}
        end
    end
end,
atlas = "white"
}
SMODS.Atlas {
    key = "white",
    path = "White_Deck.png",
    px = 71,
    py = 95
}```
my deck is pissing me of
#

it works perfectly well WITHOUT the context.retrigger_joker_check

#

but if i try implementing it

#

before you say anything about the vars

#

card.extra.ability.repetitions will crash the game

#

i kept it as self.config.repetitions cause thats the only one that works for the deck

#

also for no reason this is what it looks like

red flower
solid salmon
#

ok

#

but hypothetically

red flower
#

wdym hypothetically, thats the issue

solid salmon
#

what if someone uses one of those mods that does make it like that

red flower
#

theres no mod that does that

#

and they would require its own functions if there was

solid salmon
#

okie dokie

red flower
#

because enhancements and jokers are the same thing in code basically

solid salmon
#

also

#

in terms of balance

#

how op is anything that can retrigger non-modified jokers

red flower
#

very

solid salmon
#

as in no stickers, editions, enhancements etc

red flower
#

very

#

i dont think balance matters for a deck tho

solid salmon
#

ok

#

seems balanced

#

not installing cryptid

#

...

#

oh no

#

now theres a new unintentional error.

peak coral
solid salmon
#

playing cards NOW RETRIGGERS TWICE

#

also i am going to make a joker based of this deck

#

imma nerf white deck alil

#

it will retrigger non playing cards

#

and have a 1 in 3 chance to retrigger non modified jokers

elder rune
#

im trying to add a new consumable set but it just looks like this in the game

slim ferry
#

Content Set is not a thing, its just something that cryptid adds for its gamesets.

elder rune
#

ah

#

then what do I use

slim ferry
#

under misc.dictionary you should have k_<key> for the label on the card and b_<key>_cards for the name in the collection

slim ferry
#

just k_ops, consumabletypes dont use a mod prefix

solid salmon
#

k i fixed it

elder rune
#

like this?

#

Okay yeah the name shows up but not the color

cunning valley
#

I'm trying to make a poker hand type that has an Ace and two 6s (A55)! How would I go about detecting if two fives are played?

frosty rampart
#

in the poker hand's evaluate function, parts._2 is a list containing every pair in the played hand (as their own lists). you'd loop over that to check if it contains a list of cards that are all 5s

cunning valley
#

i see! not sure how to do that, but i think this info will be useful

#

(first time with poker hands btw)

frosty rampart
#

yea it's a little hard to explain lol

cunning valley
#

havent tested it but i'm 100% sure it'll fail cuz i've never done this before

#

nonetheless, i think i have a bit of a sketch of how I want things to work

vast night
#

Hey i just had a random thought and searching it on google didn't help. Are you able to define a mod, inside a mod? Because some mods like hot potato, did do that or something similar

red flower
#

i dont think hot potato does that

vast night
#

could be that i just looked at the files for a too short time

red flower
#

i dont think you can

pseudo furnace
#

Is there a function yo update loc_vars without hovering over it?

red flower
frosty rampart
solid salmon
#

GUYS

#

oh wait

#

im a hecking moron

vast night
#

ok hi again. this time it's a real question being: how are notifications (a bit like the achievments popup). i couldn't even find a reference to that. also while i'm asking are there also ways to overlay an image/gui component over an arbitrary position on the screen

azure valley
#

maybe you can adapt that code for your purposes.

solid salmon
#

guys

elder rune
#

spit on that thang

solid salmon
#

this code keeps making playing cards retrigger twice

#

(pretend the repetitions = 0 is actually repetitions = self.config.repetitions)

slim ferry
#

why is odds even there you dont use probabilities anywhere

slim ferry
#

also

#

idk how its retriggering twice because it just shouldnt do that

azure valley
#

Is there a built in way to split a pool into multiple weighted pools? For instance, let's say I added a bunch of powerful planet cards, but I'd like them to show up at a lower rate than regular planet cards. Is there a way to do this?

azure valley
#

using 'hidden' isn't ideal because that restricts it to the packs, and due to the sequential nature of the 'hidden' items drawing it means that early items are more likely than later ones.

daring fern
elder rune
#

im retriggering my problem

solid salmon
#

by nerfing it

#

i gave the joker retrigger and the card retrigger a 1/2 chance to activate

elder rune
#

crazy

slim ferry
#

oh wait

#

i know the issue

#

with the first thing

elder rune
slim ferry
#

just remembered that

#

decks can be retriggered with retrigger_joker_check

#

just check that the thing being retriggered isnt itself

solid salmon
#

huh

#
SMODS.Back {
    key = "white",
    loc_txt = {
      name = 'White Deck',
      text = {'{C:green}#2#/#3#{} chance to retrigger, unmodified playing cards and jokers'                                        
            }
   },
    pos = { x = 0, y = 0 },
    config = {odds = 2, repetitions = 1},
    loc_vars = function(self, info_queue, card)
        local numerator, denominator = SMODS.get_probability_vars(card, 1, self.config.odds, 'white')
        return {vars = {self.config.repetitions,numerator, denominator}}
    end,
    calculate = function(self, card, context)
        if (context.repetition and context.cardarea == G.play) then
            if not (context.other_card.edition or (next(SMODS.get_enhancements(context.other_card)) and not context.other_card:get_seal())) then
                if SMODS.pseudorandom_probability(card, 'white', 1, self.config.odds) then
                return {repetitions = self.config.repetitions}
            end
        end
    end
        if context.retrigger_joker_check then
            if not (context.other_card.edition) then
                if SMODS.pseudorandom_probability(card, 'white', 1, self.config.odds) then
            return {repetitions = self.config.repetitions}
                end
        end
    end
end,
atlas = "white"
}
SMODS.Atlas {
    key = "white",
    path = "White_Deck.png",
    px = 71,
    py = 95
}```
#

thats literally what i used

slim ferry
#

try adding context.other_card ~= card to the retrigger joker thing

elder rune
#

deck totally being a card 🗣️🗣️🗣️🗣️🔥🔥🔥🔥

azure valley
solid salmon
#

YAY

elder rune
# fossil ermine ^

I mean you could just make the joker destroy itself and create another from the same pool but it'd probably look weird

slim ferry
#

?

daring fern
# fossil ermine ^

in_pool = function() return next(SMODS.find_card('j_modprefix_key')) end

red river
#

add in_pool function to the joker (similiarly to how caven- jinx

fossil ermine
#

legendary-

slim ferry
#

yes

#

?

#

what about it being legendary

red river
#

that should work for legendary jokers aswell..?

slim ferry
#

in_pool still works

fossil ermine
#

whuh

slim ferry
#

i dont see why the soul would ignore in_pool

#

nothing else does

elder rune
#

I have such visionary solutions but of course there's just a SMODS function

#

When will Apple Store modded release

slim ferry
#

what

slim ferry
#

in_pool is a vanilla thing

elder rune
#

Oh

#

Tomato tomato

slim ferry
#

and also what you said doesnt even do the same thing

red river
#

how do i display boss blind ability text above player's hand manually? doing this for a boss blind that changes its ability each hand and needs to display it every hand

#

i tried modifying base-game code but trying to re-use it looks like this

slim ferry
#

look at how plasma deck displays its "balanced" text

slim ferry
slim ferry
red river
#

i'll look into that...

fossil ermine
solid salmon
#

GOOD NEWS

#

MY DECK AND JONKLER WORKS

slim ferry
#

the code

fossil ermine
#

12 end

slim ferry
#

yeah you shouldnt return a table

#

remove the brackets

fossil ermine
#

oh wait

#

the {}

slim ferry
#

tables are truthy so what you had before didnt do anything because of that

red river
#

the same method used by plasma deck is used in blind.lua

fossil ermine
#

moment

#

( 1st one is not joker im tryna delete from soul pool )

#

does legendary jokers automatically force itself out of shop pool

slim ferry
#

yeah legendary rarity cant be rolled

fossil ermine
#

kay

#

so this should work

slim ferry
#

yeah

fossil ermine
#

works yay :3

#

thx

chrome widget
#

More UI scaling hell today

gilded goblet
#

may god have mercy on your soul

fossil ermine
#

the xmult comes before the message here i wannya it to come after but usin extra = { Xmult = card.ability.extra.xmultvar } at the end of the return no worky even thos its worked to put it last for others venniebwaah

copper perch
#

I return from last night with the same bugs, I'm wanting this card to work in multiplayer (it deletes a card in hand at end of the round). If you win 1st in a PvP blind though, it crashes (I'm like 80% sure thats the source anyways). My code is below, any help is greatly appreciated :)

calculate = function(self, card, context)
        if context.remove_playing_cards and not context.blueprint then
            local destroyed_cards = 0
            for _, removed_card in ipairs(context.removed) do
                destroyed_cards = destroyed_cards + 1
            end
            if destroyed_cards > 0 then
                card.ability.extra.xmult = card.ability.extra.xmult + destroyed_cards * card.ability.extra.xmult_gain
                    return {
                        message = localize {
                        type = 'variable',
                        key = 'a_xmult',
                        vars = {
                            card.ability.extra.xmult
                        }
                    },
                }
            end
        end
        if context.joker_main then
            return {
            xmult = card.ability.xmult
            }
        end
        if context.end_of_round and not context.game_over and context.main_eval and not context.blueprint then
            local card_ = pseudorandom_element(G.hand.cards, 'seed')
            SMODS.destroy_cards(card_, nil, true)
        end
    end
rocky plaza
#

I am having a really strange bug
the print statement is showing 5 but only the lowest ranked card is being scored when i play the hand

rocky plaza
#

oh lmao

#

missed the extra curly braces when looking at another example custom hand impl

fluid steppe
#

how would/could i access the badge that's erroring so i know how to fix it
can you get to it through G.jokers.cards[1]?
-# given it's in the first joker slot ofc

#

notably this is actually a sticker that just looks like a red seal

#

putting actual red seal on a joker instead retriggers every card that's held in hand

lone oyster
#

my joker is working perfectly

fluid steppe
#

lmao

slim ferry
#

how

#

😨

lone oyster
#

multiplying instead of adding

#

for the lols smiley_face