#đŸ’»ăƒ»modding-dev

1 messages · Page 346 of 1

hushed arrow
#

hmm my stuff doesnt get loadded if I dont put the () though

brisk rose
#

I think somethingcom might have just been mistaken

#

because they run it bu wrapping it in a function

#

this is if you're just running it on its own

#

they make a function called err and run it

red flower
#

f but yes

brisk rose
red flower
#

god cryptid is so complicated

brisk rose
unborn bay
#

extremely technical explanation

  • SMODS.load_file is a mere wrapper to a loadfile-like interface, and just like loadfile it returns a function and an error code
  • f refers to the function. lua scripts can return a value that will be the return value that the function provides. usually seen in require statements like local foo = require "bar" which gets bar.lua and returns the return value of that to foo
  • err is the error code. nil (or just 0?) when there is none. usually done for error checking before calling f to prevent a hard nil value reference crash
wintry solar
cyan lagoon
#

anyone knows how to use generate_ui?

#

or where can i find code to look at?

red flower
cyan lagoon
#

recreate the description of a joker without loc_vars

red flower
#

hmm can you elaborate a bit more? I'm pretty sure you don't need generate_ui to do something like that

cyan lagoon
#

i use G.P_centers rn, but that includes info_queue of the joker in that center

#

i used key, set thing but that crashes the game

red flower
cyan lagoon
#

smth smth common_functions

#

gimme a sec

onyx sonnet
#

im making a joker that sets your entire played hand to a random suit, this seems to work fine visually but the hand proceeds as if the suits were unchanged (when playing a diamond flush, even if turned into spades, greedy joker will activate on the scoring cards), afterwards it works fine.
Could someone tell me how to make the game take into account the new suit instead of the old one?

distant gate
#

It'll trigger after scoring happens if you do

onyx sonnet
#

I see

#

thanks!

#

kind of a shame tho since without the event it all happens as the cards are moving :(

cyan lagoon
red flower
#

can i see the code

cyan lagoon
wintry solar
#

Just set card.base.suit = newsuit outside the event

red flower
# cyan lagoon

i will try to see what the issue is but if it is your own joker you can also go to sncury_mostand's loc_vars and do

if not card.fake_card then
    -- info_queue stuff
end
cyan lagoon
#

right?

red flower
#

yes

cyan lagoon
#

aight, i'll try in a moment

red flower
# cyan lagoon

also i think the issue is that you need a config table here

stark geode
#

i love when defender randomly kills lovley

runic pecan
#

What rarity should this be?

cyan lagoon
#

so there can be card.fake_card

#

yep that crashed

#

global 'card' (nil)

wintry solar
#

Because you’re using the jank cryptid loc vars definition that uses center instead of card

cyan lagoon
#

so do i just replace center with card or...

#

holy shit, it worked

brisk rose
wintry solar
#

I think it was just a stylistic choice

brisk rose
#

Perhaps, but cryptid /is/ quite old

#

not the perfect comparison because I misremebered the cryptid first commit date

#

but real close

#

being accurate to the actual last bump version makes it look so much worse though

#

lol

#

I guess there was no 0.8.x of smods, or it was extremelhy short lived

icy oak
#

is there a quick way to make only certain boss blinds available in a specific ante

wintry solar
#

but variable naming isn't a required thing, it's almost certainly a stylistic choice

brisk rose
#

I guess I was meaning the zeitghesit too

#

what was the 'done thing'

#

old smods conventions tended to be a lot more heavily inspired by thunk's code even cosmetically I've noticed

#

idk if that applies here

#

though I have no clue where 'slug' came from instead of key

#

back in the early days

flat sorrel
#

which of these do you think looks better?

willow plinth
#

right but depends

flat sorrel
#

depends on?

willow plinth
#

if they'll get a body or something at bottom

flat sorrel
#

no, it's just a bust like the normal jokers

willow plinth
#

i see

#

i'd say right

#

but what do i know

#

left may look a bit more "comical", but the arms are still just thin thin

topaz tiger
#

tried to give a deck the negative shader and for some reason did this to the screen lol

worthy stirrup
#

How can I check if I have two diffrent number cards in the hand, i know about context.other_card:get_id(), but im not sure if adding an And statment will work

daring fern
worthy stirrup
#

ah, okay, thank you

pale venture
#

I was trying to make a dynamic text a la misprint but it's not working at all, did i do anything wrong here?

loc_vars = function(self, info_queue, card)
        return {
            main_start = {{n=G.UIT.O, config={object = DynaText({string = string.gsub(string.format("%.2f", tostring(30-(G.TIMERS.REAL - card.ability.start)*card.ability.inblind)), "%.", ":"),pop_in_rate = 9999999, silent = true, pop_delay = 0.5, scale = 0.32, min_cycle_time = 0})}}},
        }
    end,
red flower
worthy stirrup
#

Im checking if the played hand has both an Ace and Nine

red flower
#

oh ok

native zinc
worthy stirrup
#

just to be sure, is this how you check a cards ID?

if card.get_id() == 14 then
red flower
worthy stirrup
#

ohh

#

thank you once more

worthy stirrup
#

Would something like this work or am i over complicating it

    calculate = function(self, card, context)
        if context.joker_main then
            local found = {}
                for _, card in ipairs(G.hand.cards) do
                     found[card:get_id()] = true
                end
                if found[14] and found[9] then
                    
            end
        end
    end
red flower
#

yeah that makes sense

cursive sentinel
#

is there a way to detect probabilites fail occuring?

#

like a hook 1 - odds when a pseudorandom is done?

red flower
#

no

worthy stirrup
red flower
#

with the code you posted it should work when there are multiple

worthy stirrup
#

i wish it was doing that lol

#

heres the most recent code, its also crashing when i play an ace and a nine

 calculate = function(self, card, context)
        if context.joker_main then
            local found = {}
                for _, card in ipairs(G.hand.cards) do
                     found[card:get_id()] = true
                end
                if found[14] and found[9] then
                    card.ability.extra.mult = card.ability.extra.mult * 1.99
                    return {
                        xmult = card.ability.extra.xmult
                    }
            end
        end
    end
red flower
#

you use mult in one line and xmult in the other

#

also i just tested this and it works with multiple of each

worthy stirrup
#

is it the same code?

red flower
worthy stirrup
#

like two aces and two nines?

red flower
#

tested with two ace and a nine and two nines and an ace

#

i dont see how it would be different

worthy stirrup
#

okay, ill see if its something on my end

#

it seems to be triggering when you just have the cards in hand

#

plus it still crashes

#

ill try redoing the code

red flower
#

what's the effect?

#

maybe thats the problem

worthy stirrup
#

if played hand has an Ace and Nine, give 1.99x mult

red flower
#

ohhh G.hand is held in hand

worthy stirrup
#

oh my god

red flower
#

context.scoring_hand

worthy stirrup
#

i am so dumb

cursive sentinel
# red flower no

would i necessarily need to manually check for each probability in game, from jokers, tarot and playing cards ?

worthy stirrup
#

so just replace G.hand with context.scoring_hand

red flower
worthy stirrup
#

Got it, I’ll try it out

#

Now watch I don’t pull any of my fucking aces

worthy stirrup
#

Okay sweet, it still crashes but at least it detects it now

#

YES, IT FINALLY WORKS

hearty mesa
#

can someone help me out here? i'm trying to add an image to my mod's config tab, that being my mod's icon, but i keep getting a crash
this is my code

SMODS.Atlas {
    key = "modicon",
    path = "modicon.png",
    px = 34,
    py = 34
}
...
function SMODS.current_mod.config_tab()
      local sprite = Sprite(34, 34, 34, 34, "modicon")
      local config_nodes = {n=G.UIT.ROOT, config = {align = "cm", colour = G.C.L_BLACK}, nodes = {}}
      config_nodes.nodes[1] = {n = G.UIT.O, object = sprite}
      return config_nodes
end
red flower
#

the fifth argument is an atlas not a string

cursive sentinel
#

are tags considered consumeables? as in, im trying to see how to track how many have been used during the run, and looking at fortune teller it uses G.GAME.consumeable_usage_total and G.GAME.consumeable_usage_total.tarot

hearty mesa
cursive sentinel
#

how could i track them then?

red flower
daring fern
#

tag:yep()?

cursive sentinel
#

so in a hook?

daring fern
cursive sentinel
#

alrighty

hearty mesa
#

what is the difference between the x,y and w,h values in the Sprite()?

hushed estuary
#

Hello
I had a very silly idea of a deck that only gets added into the game at the weekend but like how would I do that

hearty mesa
hearty mesa
daring fern
hushed estuary
cursive sentinel
#

when a tag is used, the print does increment but the game stops working (i mean cant select a blind, or skip, can only use menu ui)

local tag_used = 0
function Tag:yep()
    tag_used = tag_used + 1
    print(tag_used)
end```
daring fern
#

Also you want to put it in G.GAME

cursive sentinel
#

im not sure i understand the difference ^^;

daring fern
willow plinth
#

anyone seen these logs in their build?

INFO - [G] Error unpacking string: [string "return {["BLIND"]={["chips"]=0,["dbsk"]={},["..."]:1: attempt to perform arithmetic on global 'inf' (a nil value)
INFO - [G] Error unpacking string: [string "return {["BLIND"]={["chips"]=0,["dbsk"]={},["..."]:1: attempt to perform arithmetic on global 'inf' (a nil value)
INFO - [G] Error unpacking string: [string "return {["BLIND"]={["chips"]=0,["dbsk"]={},["..."]:1: attempt to perform arithmetic on global 'inf' (a nil value)
INFO - [G] Error unpacking string: [string "return {["BLIND"]={["chips"]=0,["dbsk"]={},["..."]:1: attempt to perform arithmetic on global 'inf' (a nil value)
INFO - [G] Error unpacking string: [string "return {["BLIND"]={["chips"]=0,["dbsk"]={},["..."]:1: attempt to perform arithmetic on global 'inf' (a nil value)
INFO - [G] Error unpacking string: [string "return {["BLIND"]={["chips"]=0,["dbsk"]={},["..."]:1: attempt to perform arithmetic on global 'inf' (a nil value)
INFO - [G] Error unpacking string: [string "return {["BLIND"]={["chips"]=0,["dbsk"]={},["..."]:1: attempt to perform arithmetic on global 'inf' (a nil value)
#

logs without stopping on the deck selection screen

cursive sentinel
#

im not sure i understand the structure difference

daring fern
cursive sentinel
#

ahh so i store it before

#

thanks

quartz ravine
#

Hi guys, what does the weighting mean? I am guessing higher == more chance to see

red flower
#

yeah, exactly

cursive sentinel
#

wrote G.GAME.context.vdr_tag_used or 0 in loc vars, crashes, have i miscalled the context?

daring fern
cursive sentinel
#

how can i use the context's returned value of how many tags have been used as the joker's current chips?

daring fern
cursive sentinel
#

ahh no context needed?

daring fern
weary haven
#

is there a way i can replace the locked deck sprite

#

in malverk etc

#

tryna convert my texture mod to actual mod format

wintry solar
#

no

#

not atm

weary haven
#

cringe so the superior format for this mod is still straight file replacement

quartz ravine
#

Is there a context window for "and this hand will win", i.e. the flaming effect is happening?

cursive sentinel
#

the hook's : lua local oldtagyep = Tag.yep local tag_used = 0 function Tag:yep(message, _colour, func) tag_used = tag_used + 1 SMODS.calculate_context({vdr_tag_used = tag_used}) return oldtagyep(self, message, _colour, func) end

#

when i print context.vdr_tag_used though it does return tag_used correctly

daring fern
#

No context?

cursive sentinel
#

im confused

wintry solar
daring fern
weary haven
#

if i cannot complete my mod in malverk then it is not superior

cursive sentinel
#

for joker chips to be equal to an amount * nb of tags used this run

weary haven
#

im trying to recreate shit i already did by dragging a file into my balatro exe in less than 10 seconds

cursive sentinel
#
local oldtagyep = Tag.yep
local tag_used = 0
function Tag:yep(message, _colour, func)
    tag_used = tag_used + 1
    SMODS.calculate_context({vdr_tag_used = tag_used})
    return oldtagyep(self, message, _colour, func)
end

--Hang Tag R
SMODS.Joker {
    key = 'hang_tag',
    loc_txt = {
        name = 'Hang Tag',
        text = {
            "This Joker gains {C:chips}+#1#{} Chips",
            "per {C:attention}Tag{} used this run",
            "{C:inactive} (Currently {C:chips}+#2#{C:inactive} Chips)"
        }
    },
    atlas = 'Jokers',
    pos = {
        x = 1,
        y = 1
    },
    blueprint_compat = true,
    perishable_compat = true,
    eternal_compat = true,
    rarity = 1,
    cost = 4,
    config = {
        extra = {
            chipsmod = 35
        }
    },

    loc_vars = function(self, info_queue, card)
        return {
            vars = {card.ability.extra.chipsmod, G.GAME.vdr_tag_used or 0}
        }
    end,

    calculate = function(self, card, context)
        
        if context.vdr_tag_used then
            print(G.GAME.vdr_tag_used)
            card_eval_status_text(card, 'extra', nil, nil, nil, { message = localize('k_upgrade_ex'), colour = G.C.CHIPS})
        end

        if context.joker_main then
            return{
                chips = G.GAME.vdr_tag_used or 0
            }
        end
    end
}```
daring fern
#

No calling contexts.

cursive sentinel
#

the context is only used for the card_eval though

#

how do i define G.GAME? in hook?

daring fern
cursive sentinel
#

ok so replacing the tag_used and no needing to local define it before the hook?

cursive sentinel
#

ok thank you!

#

works perfectly fine, thank you a lot !

quartz ravine
#

hi guys

I was trying to play a sound effect within a hand but I have the issue of the sound being played when the cards are selected,not when they are played. Has anyone tried something similar?

daring fern
weary haven
#

am i able to give texture atlases offsets

quartz ravine
#

I'm playing the sound within a custom hand's definition

#

I think that is the wrogn approach, I am going to rethink this

daring fern
quartz ravine
placid star
#

whats the function to change the shop size? i used SMODS.change_booster_limit(1) and SMODS.change_voucher_limit(1) for vouchers and that works, but SMODS.change_shop_size(1) doesnt work, neither does removing the SMODS prefix

wintry solar
#

change_shop_size() is a vanilla function

wild escarp
#

I'm trying to kind of make a midas mask that has a 1 in 4 chance to add polychrome instead (though I have yet to swap out gold for polychrome in the code), and I get this error, anyone know why?

loc_vars = function(self, info_queue, card)
    return { vars = { (G.GAME.probabilities.normal or 1), 4 } }
  end,

calculate = function(self, card, context)
  if context.cardarea == G.play and pseudorandom('Child Vance') < G.GAME.probabilities.normal / 4 then
    local faces = {}
    for k, v in ipairs(context.scoring_hand) do
        if v:is_face() then 
            faces[#faces+1] = v
            v:set_ability(G.P_CENTERS.m_gold, nil, true)
            G.E_MANAGER:add_event(Event({
                func = function()
                  v:juice_up()
                  return true
                end
            })) 
        end
    end
    if #faces > 0 then 
        return {
            message = localize('k_gold'),
            colour = G.C.GOLD,
            card = self
        }
    end
  end
end
wintry solar
#

delete card = self

weary haven
#

can texture atlases have offsets

wild escarp
worthy stirrup
#

how do i make it so my enhancement doesnt spawn natually?

prisma hedge
#

alright, back at it again, anyone know why my joker isnt triggering when a light card is triggered?

daring fern
paper trout
#

?

valid dove
#

you're setting the enhancement as G.P_CENTERS.glimmering, but it needs to be like G.P_CENTERS.m_prefix_glimmering

crisp coral
#

@wintry solar any idea why none of the params except x_mult works here

#

(this is blind calc)

wintry solar
#

needs a message

crisp coral
#

buh

worthy stirrup
#

just to be sure, is this how i set up first_hand_drawn?

    calculate = function(self, card, context)
        G.E_MANAGER:add_event(Event({
            func = function()
                if context.first_hand_drawn then
                    print("HAI :3")
                end
            end}))
    end
}
crisp coral
#

that's annoying

wintry solar
#

auto messages dont take custom stuff

crisp coral
#

ty

worthy stirrup
#

oh wait

#

i gotta return True

prisma hedge
worthy stirrup
#

thats just how support chats work

daring fern
valid dove
worthy stirrup
daring fern
worthy stirrup
#

Fair

#

what context should I use

crisp coral
#

lol

#

and the card = ... param doesnt work

daring fern
valid dove
worthy stirrup
#

ohh wait, i misunderstood your message

#

mb

quartz ravine
#

What is this type?

3hi?

crisp coral
#

if i have to use xmult_mod instead of x_mult i'm actually going to end it all

manic rune
valid dove
prisma hedge
valid dove
#

ye

prisma hedge
#

still nothing

plain apex
#

what did i do wrong here why does it crash if i start a new run??

SMODS.Voucher {
    key = 'Dumpster',
    loc_txt = {
        name = 'Dumpster Diving',
        text = { '{C:green}#1# in #2#{} chance to spawn a random consumable at {C:attention}end of round{}', '{C:inactive}(No need to have room)'}
    },
    atlas = 'Jokers',
    pos = {
        x = 0,
        y = 32,
    },
    config = {
        extra = {
            odds = 3,
        }
    },
    loc_vars = function(self, info_queue, card)
        local stg = card.ability.extra
        return {
            vars = { G.GAME.probabilities.normal, stg.odds }
        }
    end,
    
    calculate = function(self, card, context)
        if context.end_of_round and not context.repetition and not context.individual then
            if pseudorandom('trash') < (G.GAME.probabilities.normal / card.ability.extra.odds) then
                local new_card = create_card('Consumeables', G.consumeables)
                new_card:add_to_deck()
                G.consumeables:emplace(new_card)
                if config.sfx ~= false then
                    play_sound("fn_trash")
                end
            end
        end
    end
}

SMODS.Voucher {
    key = 'Dumpster2',
    loc_txt = {
        name = 'Trash Tycoon',
        text = { 'Spawn a random consumable at {C:attention}end of round{}', '{C:inactive}(No need to have room)'}
    },
    atlas = 'Jokers',
    requires = 'v_fn_Dumpster',
    pos = {
        x = 1,
        y = 32,
    },
    
    calculate = function(self, card, context)
        if context.end_of_round and not context.repetition and not context.individual then
            local new_card = create_card('Consumeables', G.consumeables)
            new_card:add_to_deck()
            G.consumeables:emplace(new_card)
            if config.sfx ~= false then
                play_sound("fn_trash")
            end
        end
    end
}
placid star
#

how can i find the key of a booster pack?

prisma hedge
#

bro

valid dove
# prisma hedge still nothing

my best guess then is that you're using the wrong key? are you sure the prefix is cry and the enhancement key is light

prisma hedge
#

its from cryptid, the prefix is cry, and i'm pretty sure the enhancement key is light

#

i checked and thats what it said

plain apex
# prisma hedge ?

could try something similar to this joker it gets the gold cards and retriggers them

SMODS.Joker({
    key = "Kane",
    loc_txt = {
        name = "Fletcher Kane",
        text = {
            "Retriggers every {C:money}Gold{} card {C:attention}#1#{} times",
        }
    },
    rarity = 2,
    atlas = "Jokers",
    pos = { x = 0, y = 15 },
    cost = 6,
    unlocked = true,
    discovered = false,
    blueprint_compat = true,
    eternal_compat = true,
    perishable_compat = true,
    config = { extra = { repetitions = 1 } },

    loc_vars = function(self, info_queue, card)
        info_queue[#info_queue + 1] = G.P_CENTERS.m_gold
        info_queue[#info_queue + 1] = G.P_CENTERS.e_cry_gold
        info_queue[#info_queue + 1] = G.P_SEALS.Gold
        return { vars = { card.ability.extra.repetitions } }
    end,

    calculate = function(self, card, context)
        -- Check if a Gold Card is played or in hand
        if context.repetition and context.cardarea == G.play then
            if context.other_card and context.other_card.ability.name == 'Gold Card' or context.other_card.edition and context.other_card.edition.key == 'e_cry_gold' or context.other_card.seal == 'Gold' then
                return {
                    repetitions = card.ability.extra.repetitions,
                    message = localize('k_again_ex'),
                    card = card
                }
            end
        end

        -- Handle Gold cards in hand
        if context.cardarea == G.hand then
            for i = 1, #G.hand.cards do
                if context.other_card and context.other_card.ability.name == 'Gold Card' then
                    return {
                        repetitions = card.ability.extra.repetitions,
                        message = localize('k_again_ex'),
                        card = card
                    }
                end
            end
        end
    end
})
prisma hedge
#

that's for editions though

plain apex
#

context.other_card.ability.name == 'Gold Card'

#

thats an enhancement

prisma hedge
#

context.other_card.edition.key == 'e_cry_gold'

plain apex
#

yeah it retriggers all forms of gold seals, edition, and enhancement

prisma hedge
#

ohhh

#

i'm not looking to retrigger though, i want it to add x2 mult when a light card is triggered

weary haven
#

yo whattup can you give an atlas an offset

plain apex
#

that should work i'd think

placid star
#

what context should i use for creating a booster when entering the shop? couldnt find one for entering the shop

worthy stirrup
#

how can i change this to make it so Last Hand Played only triggers once?

prisma hedge
#

oh wait i think i see it

plain apex
# prisma hedge where would that go?

it'd be something like this


calculate = function(self, card, context)
        -- Check if a Light Card is played or in hand
    if context.repetition and context.cardarea == G.play then
        if context.other_card and context.other_card.ability.name == 'Light Card'
            card.ability.extra.Xmult = card.ability.extra.Xmult + card.ability.extra.Xmult_add
        end
    end
    
    if context.joker_main then
      return {
        message = localize{type='variable', key='a_xmult', vars={card.ability.extra.Xmult}},
        Xmult_mod = card.ability.extra.Xmult,
      }
    end
  end
}
#

you'd probably remove the repetition actually since no repetition

prisma hedge
#

why are we checking if its held in my hand? they get triggered when played

worthy stirrup
plain apex
#

that doesn't the original code i had for fletcher kane did since gold cards in hand have an effect to retrigger (the $3 they give you for holding them)

prisma hedge
#

ohhh

wild escarp
#

Why do I get an error nil value on extra in what would be line 4 here?

config = { extra = { odds = 4 } },

loc_vars = function(self, info_queue, card)
  return { vars = { (G.GAME.probabilities.normal or 1), card.ability.extra.odds } }
end,
valid dove
unkempt thicket
#

Where is the code that makes the boss blind outline and inner color of the UI (the color that mimics the blind)

worthy stirrup
#

im trying to have it apply after the player beats the score requirement

prisma hedge
#
 pos = {x = 0, y = 0},
 config = {
  extra = {
   Xmult = 2
  }
 },
 loc_vars = function(self, info_queue, center)
  return { vars = { center.ability.extra.Xmult } }
 end,
calculate = function(self, card, context)
        -- Check if a Light Card is played or in hand
    if context.cardarea == G.play then
        if context.other_card and context.other_card.ability.name == 'Light Card'
            card.ability.extra.Xmult = card.ability.extra.Xmult + card.ability.extra.Xmult_add
        end
    end
    
    if context.joker_main then
      return {
        message = localize{type='variable', key='a_xmult', vars={card.ability.extra.Xmult}},
        Xmult_mod = card.ability.extra.Xmult,
      }
    end
  end
}```
valid dove
valid dove
plain apex
unkempt thicket
valid dove
broken shadow
#

how does one get to read this code

red flower
prisma hedge
valid dove
worthy stirrup
#

so something like this?

        if context.end_of_round and context.main_eval then
            G.E_MANAGER:add_event(Event({
                trigger = 'before',
                delay = 0.0,
                func = (function()
                        print("BAI! :3")
                    return true
                end)}))
        end
#

or should it be not context.main_eval

valid dove
#

like that yeah just tested it, just saying context.main_eval is good

worthy stirrup
#

oh, that did seem to work

#

thanks

#

now i gotta find out how to randomly add my enhacement

broken shadow
#

all this feels like near gibberish

worthy stirrup
#

i wish i knew what i was doing

prisma hedge
#

learn lua then ig

worthy stirrup
#

ive learned lua in the past but switched to python lol

broken shadow
valid dove
worthy stirrup
#

i need to figure out how to pull a randon card

broken shadow
valid dove
# wild escarp

try (G.GAME and G.GAME.probabilities.normal or 1) instead of G.GAME.probabilities.normal or 1)?

wild escarp
#

Same thing.

valid dove
plain apex
# prisma hedge like this? because this didnt work

ok yeah that didn't work but this works

SMODS.Joker {
    key = 'ash',
    loc_txt = {
        name = 'Ash Baby',
        text = {
            "This Joker Gains {X:mult,C:white}X#1#{} Mult",
            "When a Light Card is played",
        }
    },
    rarity = 1,
    atlas = "ashbaby",
    pos = { x = 0, y = 0 },
    cost = 5,
    unlocked = true,
    discovered = false,
    eternal_compat = true,
    blueprint_compat = true,
    perishable_compat = false,
    config = {
        extra = {
            Xmult_add = 1,
            Xmult = 2
        }
    },
    loc_vars = function(self, info_queue, card)
        return {
            vars = {
                card.ability.extra.Xmult_add,
                card.ability.extra.Xmult
            }
        }
    end,
    calculate = function(self, card, context)
        if context.individual and context.cardarea == G.play then
            for _, played_card in ipairs(G.play.cards) do
                -- Check if the card is light
                if played_card.config.center == G.P_CENTERS.m_cry_light then
                    card.ability.extra.Xmult = card.ability.extra.Xmult + card.ability.extra.Xmult_add
                    return {
                        message = localize('k_upgrade_ex'),
                        colour = G.C.Mult,
                        card = card
                    }
                end
            end
        end
        if context.joker_main then
            return {
                message = localize{type = 'variable', key = 'a_xmult', vars = {card.ability.extra.Xmult}},
                Xmult_mod = card.ability.extra.Xmult,
            }
        end
    end
}
prisma hedge
#

no no no i want it to add x2 mult to the score

#

not gain it

plain apex
#

oh

prisma hedge
#

lmao

plain apex
#

i misunderstood that

quartz ravine
#

What data type is a hi? I am seeing numbers that are formatted as 2hi or 3hi. I'm trying to parse hi into a number

broken shadow
#

does Xmult_add add times mult or an x amout of mult

formal parrot
#

X amour of mult

#

Ofc it adds times bro

#

Like

#

Its in the name

worthy stirrup
#

any idea why this isnt printing anything?

broken rivet
#

can someone tell me how to get localized text in a proper ui table because this does nothing

loc_vars = function(self, info_queue, card)
    local main_end = {}
    if G.jokers and G.jokers.cards then
        for k, v in ipairs(G.jokers.cards) do
            if (v.ability and v.ability.eternal) then 
                main_end = {}
                localize({type = "text", set = 'Other', key = 'o_af_removes_eternal', nodes = main_end, vars = {}})
                main_end = main_end[1]
                break
            end
        end
    end

    return {
        main_end = main_end
    }
end,
broken shadow
# formal parrot Its in the name

i havent seen balatros source code myself and its kinda unreliable to make those assumptions (i know from experience looking through other games code)

woven stratus
wild escarp
#

It's going to be the tiniest thing, I swear. Anyone?

quartz ravine
plain apex
# prisma hedge no no no i want it to add x2 mult to the score
SMODS.Joker {
    key = 'ash',
    loc_txt = {
        name = 'Ash Baby',
        text = {
            "Played Light Cards each give {X:mult,C:white}X#1#{} Mult when scored",
        }
    },
    rarity = 1,
    atlas = "ashbaby",
    pos = { x = 0, y = 0 },
    cost = 5,
    unlocked = true,
    discovered = false,
    eternal_compat = true,
    blueprint_compat = true,
    perishable_compat = false,
    config = {
        extra = {
            Xmult = 2 -- Mult per light card
        }
    },
    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 then
            for _, played_card in ipairs(G.play.cards) do
                if played_card.config.center == G.P_CENTERS.m_cry_light then
                    return {
                        x_mult = card.ability.extra.Xmult,  -- Apply multiplier to the current card
                        card = card
                    }
                end
            end
        end
    end
}
worthy stirrup
worthy stirrup
#

stole my idea :( /j

plain apex
#

lol

prisma hedge
#

still nothing

#

what is going on?

plain apex
#

you sure because that worked for me??

prisma hedge
#

oh wait i might have fucked up pasting it oops

plain apex
broken shadow
#

can someone please inform me on how to read balas code so i can get some knowledge in before i sleep as its 00:43 and i want to ignore the fact i have assesments to work on tmmr

prisma hedge
#

yeah no it still didnt work

quartz ravine
#

Send the full error code?

worthy stirrup
broken shadow
#

wha

worthy stirrup
#

its fucking something

turbid maple
#

you can unzip the game executable

broken shadow
#

what does that even mean

worthy stirrup
#

wait, do you mean reading it or extracting the code

broken shadow
#

that is like telling a todler to do astrophysics

worthy stirrup
#

oh

#

so you have the code pulled up

turbid maple
#

okay then maybe you should learn said astrophysics

prisma hedge
broken shadow
turbid maple
#

do you not have the source code on hand right now

plain apex
turbid maple
#

you can take Balatro.exe it's actually a zip file

broken shadow
turbid maple
#

you can unzip it

#

then you can see the source code directly

prisma hedge
#

hang on i'll dm you the whole thing, i probably fucked up somewhere

broken shadow
worthy stirrup
#

yea

plain apex
worthy stirrup
#

open it with 7zip and extract it

turbid maple
#

yeah

broken shadow
#

THE FUCK

worthy stirrup
#

yea

#

ikr

turbid maple
#

zip files are a cursed file format

weak brook
#
[patches.pattern]
target = '=[SMODS _ "src/crash_handler.lua"]'
pattern = "table.insert(err, sanitizedmsg)"
position = "before"
payload = "sendDebugMessage(tprint(sanitizedmsg))"
match_indent = true```

trying to lovely patch smods so that the game can tell people that they need to update it for cardsauce and i dont understand for the life of me why this lovely patch doesnt work
#

flower pot's works

broken shadow
#

HOW THE SHIT CAN SOMETHING BE A ZIP FILE AND EXECUTABLE AT THE SAME TIME

prisma hedge
#

i mean

#

thats kinda what executables are

broken shadow
worthy stirrup
#

does that help at all

prisma hedge
#

technically balatro is a .love file, which is a .zip file in disguise

#

so thats 3 filetypes

broken shadow
#

time to download the unlimited free trial app

turbid maple
#

to get technical the main bits of data needed to be a valid zip file come at the end of file

tranquil gull
#

i've been playing a little bit of nnf and i had a kind of funny idea for a joker:

Nubby: Rare
At the end of scoring, force-trigger the joker to the right
how possible do you think this would be

#

force-triggering is a nnf thing - triggering a joker regardless of whether it usually would be

native zinc
#

reallypainful

prisma hedge
tranquil gull
shell timber
#

you could hijack cryptid's demicolon stuff

broken shadow
tranquil gull
#

unfamiliar with demicolon

native zinc
#

doesn't that use talisman

shell timber
#

it's forcetrigger but during scoring

prisma hedge
#

yeah but 7zip doesn't pester you

broken shadow
#

and i personally prefer the books

shell timber
broken shadow
worthy stirrup
#

how can i get a list of cards in hand that arent enhanced?

weak brook
#

super weird

versed basin
worthy stirrup
#

how can i edit this so it tells me the rank and suit of the card instead of printing its tables?

weak brook
ruby delta
#

Hey can anyone help me out and guide me how I could turn some of the changes into smods I hv a txt file

tepid crow
weak brook
#

i am in the middle of attempting to switch from using one lovely patch file to several seperated ones in a lovely folder

#

it wouldnt like

#

prevent the folder ones from loading if i have a central one, would it?

broken rivet
#

i'm guessing this has something to do with how i tried to stop glass cards from being destroyed but i have no idea what the fuck is going on

-- makes kori block shattering
local shatterVanilla = Card.shatter
function Card:shatter()
    local kori = false

    for i = 1, #G.jokers.cards do
        if G.jokers.cards[i].ability.name == "Korihas" then 
            kori = true
            break
        end
    end

    if not kori then shatterVanilla(self) end
end
weak brook
#

ah that explains it then

wintry solar
#

It either looks at lovely.toml or the lovely folder

weak brook
#

ok well i moved my core patches to the folder

#

but now its still not loading?

#

i mean all my other patches seem to be loading but this smods one in particular just

#

lovely refuses to acknowledge that it exists

wintry solar
#

Can you screenshot your folder structure?

regal ether
#

i use self.config.extra instead and it works

wintry solar
#

Don’t do that

regal ether
#

thats probably not good but eh

wintry solar
#

Bill can you screenshot the code?

wild escarp
plain apex
regal ether
maiden phoenix
# wild escarp

Should be ((G.GAME and ' '..G.GAME.probabilities.normal) or 1)

wild escarp
wintry solar
wild escarp
#

It happens whenever I hover over the card.

placid star
#

can anyone tell why this crashes on end of round?

maiden phoenix
wintry solar
placid star
wild escarp
maiden phoenix
#

If you continue a run it will keep the old values so yes try a new run

wild escarp
#

Ah, that fixed it, I'm just stupid. At least I know for next time.

#

Is this the right code to add polychrome to a playing card?
v:set_edition(G.P_CENTERS.e_polychrome, nil, true)

wintry solar
#

Just “e_polychrome” as the first argument

wild escarp
#

Okay, got it.

weak brook
#

its super confusing cause im following pretty much the exact same formatting as this patch from flower pot (even using the same priority value) and this patch works on my end. but for some reason the patch i made doesnt

wintry solar
weak brook
#

previously it was in lovely.toml in the root folder

#

didnt work there

#

but ill try

wintry solar
#

Try typing it out again from fresh

weak brook
#

wdym?

bold sleet
#

Hello good people. Question: Is there a way to figure out if any given card has a seal? (basically where are seals stored.)

faint yacht
#

card.seal?

bold sleet
#

o

#

that's... very

#

why the fuck is in there wtf?

brisk rose
#

It's a blessing when things are on the nose like that

bold sleet
#

I swear enhancements, editions and seals are eo extra fucked up.

bold sleet
faint yacht
brisk rose
#

Modded

faint yacht
bold sleet
#

For some reason enhancement keys are both 2 places?

#

wtf is up with that?

wintry solar
wintry solar
bold sleet
#

card.ability.seal does not seem to exist.

faint yacht
bold sleet
#

wait

wintry solar
#

Oh maybe not

#

Maybe that’s just where it stores I’m the seals values

bold sleet
faint yacht
#

Copy of such.

hard needle
#

how does idol choose a random rank?

faint yacht
#

card.seal for identifying current seal, card.ability.seal for using a given value of config from seal.

weak brook
brisk rose
weak brook
#

is there something im missing when it comes to lovely patching smods?

tranquil gull
#

@woven stratus hii :3

#

yall, is there a way to layer multiple deck skins on top of each other

woven stratus
#

hi!

tranquil gull
#

like

tranquil gull
#

like minecraft resource packs

weak brook
#

not unless you merge them yourself

spring thistle
#

for gimp, after i have made my images and saved them, how can I mass export into pngs?

quartz ravine
#

Does anyone see why this card woul not proc? It says 'AGAIN', but the action doesn't take place at all

if context.individual and context.cardarea == G.play then
            local hand_name = "Fox_shungokusatsu"
            local retrigger = tonumber(format_ui_value(G.GAME.hands[hand_name].level))
            card.ability.extra = retrigger
            
            local otherCard = context.other_card
            local cardInfo = getValueNilSafe(otherCard.base.value)
            sendInfoMessage("Played Card " .. cardInfo, card.key)

            if cardInfo == 10 or cardInfo == "10" then
                sendInfoMessage("Played Card " .. cardInfo .. " is a ten, retriggering " .. retrigger .. " times", card.key)                
                if FoxModConfig.playSounds then
                    return {
                        message = localize('k_again_ex'),
                        repetitions = card.ability.extra,
                        card = card,
                        sound = "Fox_metsu"
                    }
                else
                    return {
                        message = localize('k_again_ex'),
                        repetitions = card.ability.extra,
                        card = card
                    }
                end
            end     

wild escarp
#

Debugplus gives me this and playing a card gives a message saying "ERROR" on both the card and joker, here's the code, why's it happening?

config = { extra = { odds = 4 } },

loc_vars = function(self, info_queue, card)
  return { vars = { (G.GAME.probabilities.normal or 1), card.ability.extra.odds } }
end,

calculate = function(self, card, context)
  if context.cardarea == G.play and pseudorandom('Child Vance') < G.GAME.probabilities.normal / card.ability.extra.odds then
    local faces = {}
    for k, v in ipairs(context.scoring_hand) do
        if v:is_face() then 
            faces[#faces+1] = v
            v:set_edition(e_polychrome, nil, true)
            G.E_MANAGER:add_event(Event({
                func = function()
                    v:juice_up()
                    return true
                end
            })) 
        end
    end
    if #faces > 0 then 
        return {
            message = localize('k_poly'),
            colour = G.C.POLYCHROME,
            card = card
        }
    end
  end
end
placid star
#

is there a way to make 6 card hands and above playable?

brisk rose
#

Cryptid can do anything but is probably jank

red flower
midnight coyote
#

How do i put a value above cash to display a value? UI is hurting my head

wintry solar
mellow sierra
wintry solar
#

yes but if you copy it, it will break in the next smods release

mellow sierra
#

whens the next smods release?

midnight coyote
#

--[[
G.UIT.R: Row assortment.
G.UIT.C: Column assortment.
G.UIT.ROOT: Root node. Every UI element needs a root node.
It's, generally speaking, good practice to alternate between rows and columns. 
--]]
--

function risk_menu_test_func(menu_name)
    return {
        n = G.UIT.ROOT,
        config = { align = "cm" },
        nodes = {
            {
                n = G.UIT.R,
                config = { align = "cm" },
                nodes = {
                    {
                        n = G.UIT.C,
                        config = { align = "cm" },
                        nodes = {
                            { n = G.UIT.T, config = { text = menu_name, colour = HEX("000000"), scale = -1.5 } },
                        },
                    },
                },
            },
        },
    }
end

local my_menu = UIBox({
    definition = risk_menu_test_func("I Am menu"),
    config = { type = "cm", ... },
})

function create_UIBox_HUD()
    local contents = original_hud()

    local stupid_fucking_box = my_menu

    table.insert(contents.nodes[1].nodes[1].nodes[4].nodes[1].nodes, stupid_fucking_box)
    return contents
end

midnight coyote
#

why is scale -1.5??

#

i fixed it but that didnt change anything

#

btw i dont intend for this to look good i just wanna get it working

turbid maple
#

its very confusing but I had that happen sometimes when I was mixing up things that expect a list of nodes and things that expect a node

#

not saying it is I dont know enough UI to diagnose it from that snippet

midnight coyote
#

hmm let me see then

#

that was quite literally exactly it

#

thanks

turbid maple
#

oh youre putting it into .nodes of a node

#

yeah

#

that expects a list

midnight coyote
#

i changed it to 'stupid_fucking_box.nodes'

digital niche
#

is there a way to make a different window just for a certain type of enhancement?

turbid maple
#

I do not like tables and lists being conflated in lua because of crap like this

bold sleet
#

Now, good(er) people. Where can I find if a card is rental, eternal and stuff?

shut crater
#

For each

#

If I'm remembering correctly

bold sleet
#

I'll check

lucid owl
#

what localization entry does SMODS.deck_skin take?

hearty mesa
#

misc.collabs maybe?

#

how would i add a bit of text here?

hard needle
#

how can i check when the boss blind is defeated?

hearty mesa
#

look at how campfire did it in the base game

faint yacht
# lucid owl what localization entry does `SMODS.deck_skin` take?
GitHub

A personal timewaster project that is a mod for Balatro. - TheOneGoofAli/TOGAPackBalatro

GitHub

A personal timewaster project that is a mod for Balatro. - TheOneGoofAli/TOGAPackBalatro

midnight coyote
#

how do i modify the game's UI

paper trout
#

I want to make a food joker that gives extra discards each round but changes the amount of extra by -1 each round, how should i do that?
i found https://github.com/Steamodded/examples/blob/master/Mods/ExampleJokersMod/ModdedVanilla.lua and it says

    Extra note, having the config as something like
    config = {d_size = 3, h_size = -1, extra = {whatever variables you put}}
    automatically applies these changes.
    However, these values outside of the extra table are constants, so they aren't good for jokers with values that change.
    You can find a fuller list of them at card.lua:275.
    ]]```
which makes sense but i'm not sure what i should use instead

it also uses `G.GAME.round_resets.discards = G.GAME.round_resets.discards + card.ability.extra.discard_size` but that seems like it wouldnt work well if the number of discards changes either unless im wrong?
hearty mesa
hearty mesa
vapid flume
#

new to modding, is there a best way to do chance other than just doing it with regular lua code, and how would i make the 'Nope!' text show up if the chance fails

hearty mesa
#

use psuedorandom() which takes a seed (string) and returns a number from 0 to 1

lucid owl
#

can anyone explain to me why my deckskin isn't working?? (excluding the localization)

hearty mesa
#

atlas should be a string i think

#

which is the key of your atlas

lucid owl
#

it is

#

atlas_lc.key is "peppered_diamonds_lc"

hearty mesa
#

woops

#

im stupid lol

rare obsidian
#

did you initialize it to be the location of the art?

#

that might be needed

lucid owl
#

wdym

rare obsidian
#

noit sure tho

lucid owl
#

i have all of the images in my /assets/ folder

rare obsidian
#

but at the top of the code, did you specify the paths?

lucid owl
#

yeah, atlases use /assets/ by default

limber blaze
# faint yacht

why does it do it like this, what is the actual benefit to relooping over all centers this just seems wasteful

#

am i stupid or

cursive sentinel
#

i have this line

in_pool = function(self)
        return false
    end,```
to take the joker off the pools of joker creations like judgement or riff raff, but now it stopped appearing in shop or boosters, is there a way to fix it?
limber blaze
#

the center should already contain the centers key this just feels like extra steps for no reason

faint yacht
limber blaze
#

oh wait this isnt vanilla i thought this was vanilla

#

you should be able to just access center.key instead of doing it like this unless issues pop up

#

i mean it almost doesnt matter

#

unless a lot of cards are created at once

#

idk what cardsauces deal is tbh

faint yacht
#

¯_(ツ)_/¯

long sun
#

hihi, two questions

limber blaze
#

hello

long sun
#

hai :3

paper trout
long sun
#

first: i have a modded, secret hand called Junk, and a Joker that depends on it

#

how can i check if Junk is unlocked, in the Joker's in_pool function?

limber blaze
#

G.GAME.hands[handkey].visible

digital niche
#

the second layer would be the "enhanc" thing right?

long sun
#

second: said Joker has this code

lucid owl
long sun
#

it works, but i'm worried that future localisations will break it

limber blaze
limber blaze
long sun
#

is there a better way that doesn't rely on the player playing in- ah thanks ^^

limber blaze
#

but the key will be modprefix_Junk

#

instead of just junk

long sun
#

testing ^^

digital niche
limber blaze
#

then yes this is correct

lucid owl
#

you'd probably need to fiddle with floating_sprite and drawsteps to get exactly what you want

#

oh wait, nvm i misread

digital niche
long sun
#

wait i'm dumb nvm

limber blaze
#

try printing text to find the exact key cause you might be checking wrong

#

but text is the hand index in G.GAME.hands which exists for all hands incl modded ones

#

and also doesnt depend on localization

long sun
#

ya i had phanta_Junk 😭 thanks! changed it to phanta_junk

long sun
#

gonna post the art here too :3 meet Binman!

limber blaze
#

should be something like return G.GAME.hands["phanta_junk"].visible

#

or G.GAME.hands.phanta_junk.visible would work too

long sun
#

ah ya ^^ that looks good, i've seen that syntax

#

will run with the first one

#

tytyty!!

lucid owl
limber blaze
#

the issue is that the atlas provided is nil but idk what the root cause of that is

digital niche
lucid owl
digital niche
#

is there another way to put more layers to a consumable isntead of soul_pos?

limber blaze
#

youll have to mess with some things that i dont remember to do that

#

but its possible

limber blaze
#

cause atlases need to be mod prefixed in some specific places

#

iirc

lucid owl
limber blaze
#

hm

limber blaze
#

the prefix is automatically added sometimes but not everywhere

lucid owl
#

let me try and prefix

limber blaze
#

idk if this is the specific issue here but it might be

lucid owl
#

did not fix it

limber blaze
#

you might want to inspect G.ASSET_ATLAS if you get into the game

#

before you crash

#

and see if you can find your atlas key

lucid owl
#

it's luckily not crashing anymore but the cards are just blank

#

it IS there but.. for some reason the cards are blank

paper trout
lucid owl
midnight coyote
#

--[[
Risk is a mechanic for astropulvis that I want to add, but problem is, I have not a clue what to start with. Oh well, here we go!


  ]]

local original_hud = create_UIBox_HUD

Risk = 0.00 -- Risk is measured between 0.00 and 1.00. Higher means more chance of bad things happening.
-- ALSOOOOO... make globals start with uppercase letters. Good practice or whatever.
Risk_manip_table = { risk = Risk }
--Some kind of UI element? gotta figure out how to do that.

--[[
G.UIT.R: Row assortment.
G.UIT.C: Column assortment.
G.UIT.ROOT: Root node. Every UI element needs a root node.
It's, generally speaking, good practice to alternate between rows and columns. 
--]]
--

function risk_menu_test_func(menu_name)
    local spacing = 0.13
    local scale = 0.4
    return {
        n = G.UIT.R,
        config = { align = "cm" },
        nodes = {
            {
                n = G.UIT.C,
                config = {
                    align = "cm",
                    padding = 0.05,
                    minw = 1.45 * 2 + spacing,
                    minh = 1.15,
                    colour = HEX("ffffff"),
                    emboss = 0.05,
                    r = 0.1,
                },
                nodes = {
                    {
                        n = G.UIT.R,
                        config = { align = "cm" },
                        nodes = {
                            {
                                n = G.UIT.C,
                                config = { align = "cm", r = 0.1, minw = 1.2, colour = HEX("000000") },
                                nodes = {
                                    {
                                        n = G.UIT.O,
                                        config = {
                                            object = DynaText({
                                                string = { { ref_table = Risk_manip_table, ref_value = "risk" } },
                                                font = G.LANGUAGES["en-us"].font,
                                                colours = { G.C.RED },
                                                shadow = true,
                                                scale = 2 * scale,
                                            }),
                                            id = "astropulvis_risk_UI_shit",
                                        },
                                    },
                                },
                            },
                        },
                    },
                },
            },
        },
    }
end

local my_menu = UIBox({
    definition = risk_menu_test_func("I Am menu"),
    config = { type = "cm", ... },
})

function create_UIBox_HUD()
    local contents = original_hud()

    local stupid_fucking_box = my_menu

    table.insert(contents.nodes[1].nodes[1].nodes[5].nodes[2].nodes, stupid_fucking_box.nodes)
    return contents
end

can someone explain to me why this ui element only shows up during the inital startup animation, and not during the run like I want it to.

unborn bay
#

you should probably just make the element in Game:start_run and attach it in G.HUD from there

chilly hull
#

is there a context on destroying cards?

vapid flume
unborn bay
#

pseudorandom

chilly hull
#

happens to me

#

EVERYTIME

unborn bay
#

not psuedorandom

#

lmaower

vapid flume
#

thaat makes sense lawl

unborn bay
#

also the first argument takes in a seed name

placid star
#

tryna make flush six bla bla bla, this doesnt work, whenever i make a flush it considers it a flush six

chilly hull
placid star
red flower
#

yeah there's none for destroying jokers

chilly hull
placid star
red flower
#

no

lucid owl
midnight coyote
red flower
paper trout
#

i'm trying to just save it in self.ability.extra.discard_size but idk if that works?

chilly hull
paper trout
#

well it's meant to be a food joker, so it just gives self.ability.extra.discard_size discards each round, but the value of that also goes down by 1 each round

red flower
brisk rose
#

I just found out that Extra Credit users lovely patches for their "changes each round" jokers that act on suits and ranks, abs hard codes them to only use the vanilla ones instead of in_pool

#

That's insane, right?

chilly hull
paper trout
#

I think i have the logic for it going down working, but cant test cause it's just crashing where i'm trying to put ease_discard() rn

unborn bay
chilly hull
#

except on destroying playing card

unborn bay
#

actually no you probably don't need to do this

chilly hull
#

but i dont think theres any way to remove playing cards without destroying them

lucid owl
unborn bay
#

create_UIBox_HUD does not make a uibox- it creates the definition for it

#

meaning its a raw table of elements

lucid owl
#

i had a "card changes each round" joker that did a little bit of patching

red flower
midnight coyote
unborn bay
#

you don't need to make a UIBox to attach elements to it

chilly hull
lucid owl
brisk rose
midnight coyote
#

i see

lucid owl
midnight coyote
#

so i should just add the function for the definition

#

of the uibox

#

rather than the ui box

unborn bay
#

yep

midnight coyote
#

that seems to work

#

thanks

red flower
red flower
unborn bay
#

doesn't loc_txt just take in a single string here

#

like just loc_txt = "THE NAME IS HERE"

lucid owl
#

that would suck if it does but let me check

unborn bay
#

the game rendering a table would mean its trying to create a representation of that table as a string

lucid owl
#

i mean i guess there's not too much to localize anyways for the name of a game

unborn bay
#

which refers to the pointer in memory

#

lmao

paper trout
unborn bay
#

you really shouldn't be using loc_txt if you're planning for that

lucid owl
#

god damn it 😭

red flower
lucid owl
#

there's no docs on what set deckskins use

#

so i just gave up

unborn bay
#

that looks good btw !!!! diamonds is my second favorite suit besides spades

#

all the other suits SUCK

midnight coyote
#

I WIN!!!

#

I WINNNN!!!!!

#

I WIN I WIN I WIN

#

I WIN I WIN I WIN

#

i might have it disp like hands, discards, ante and round

paper trout
red flower
unborn bay
paper trout
#

ive tried calling it in some different spots and all of them crash
also the calculate part is just taken from popcorn

red flower
#

dont use self, use card pls

paper trout
#

oh i missed that part i see

lucid owl
#

trying to think of how to shuffle played cards back into the deck

#

not sure how that would go

midnight coyote
chilly hull
#

should playing card be yellow? idk which text to make yellow

unborn bay
# midnight coyote

i should probably add a separate hud element for pyrox and money now that i think about it

lucid owl
unborn bay
#

im currently lovely patching it rn its not great

quick kraken
#

How do I make tooltips?

paper trout
#

its still crashing, where are the crash logs saved?

quick kraken
#

How do they work?

hasty mist
#

this is intended to give +1 hand size, why doesn't this work properly?

paper trout
#

oh i found it

quick kraken
paper trout
#

nvm

red flower
red flower
quick kraken
#

the cry_ prefix is usually for Cryptid stuff

red flower
#

i assume it's a cryptid thing that's called every frame?

chilly hull
#

how do you keep an effect constantly active again?

hasty mist
red flower
paper trout
hasty mist
#

is it still self, dt or is it something else

red flower
quick kraken
red flower
red flower
pale venture
red flower
quick kraken
#

but in another mod it does it differently

paper trout
#

oh ty

quick kraken
#

Do I also need anything else outside of loc_vars to make the tooltip work?

hasty mist
#

okay that is way too much hand size what happened

hasty mist
#

it gave +3 instead of +1

pale venture
red flower
quick kraken
#

I have not used localization files

#

and what's a Center?

red flower
red flower
pale venture
quick kraken
red flower
quick kraken
#

And seal keys are just modprefix_sealkey?

red flower
#

not sure on that one

quick kraken
#

I will try

hasty mist
quick kraken
#

and see how that goes

daring fern
red flower
#

thank you seals on everything creator

pale venture
quick kraken
red flower
# cursive sentinel bump

you can either manually exclude it from judgement and riff raff or manually include it in shop and boosters but checking args.source

cursive sentinel
red flower
hasty mist
red flower
red flower
hasty mist
#

ah i see

placid star
#

can anyone tell why my f6 doesnt work? my 6oak works fine but the game now things ANY hand no matter what is a f6

digital niche
#

what is the context for retrigger?

daring fern
digital niche
#

playing cards!

daring fern
digital niche
#

tyty!

buoyant merlin
#

Is there any way to make the upgrade text display after the card finishes scoring? It's being handled by an enhancement

#

The code is being ran in the main_scoring context

digital niche
digital niche
#

i think

buoyant merlin
daring fern
buoyant merlin
#
  repetitions = 1
}```
digital niche
#

oh, gotcha, tyty both!

buoyant merlin
digital niche
eager pendant
#

How to correctly spell rarity in localization

hasty mist
#

where is the code for the serpent wtf

shell timber
#

draw to hand

#

the function

buoyant merlin
hasty mist
#

what 😭

#

localthunk why

vapid flume
#

how would i check for if a hand contains a certain poker hand like jolly joker for example?

#

and probably the harder part of what im trying to do, is there a way to check if all cards scored are a specific suit?

buoyant merlin
#

Eg. 'Two Pair'

quartz ravine
#

Hi folks, how do I set the default state of a config toggle? For bran new users of my mod, a toggle is unchecked, which can lead to a crash

flat sorrel
#

or just store the suit of the first card and if the suit of any subsequent card is different set false and break

eager pendant
#

How to correctly spell rarity in localization

#

?

vapid flume
buoyant merlin
#

Then context.other_card is the current card the joker is calculating on

daring fern
#

context.scoring_hand

buoyant merlin
#

Wait

#

I misinterepted

#

It depends on how the joker works, if the joker activates once, you can activate its effect in context.joker_main and store variables in context.individual

#

If it activates per card, then yes, do it before scoring

paper trout
#

i tried to add a rarity and a joker with that rarity, but it's crashing on load, can anyone help

    key = 'fusion',
    loc_txt = {name='Fusion'},
    badge_colour = '009900'
}```
I have `rarity = "m_eodmod_fusion"` in the joker code, where my mod prefix is eodmod
hasty mist
#

what's failing here? now it's turning blinds specified in this function into bl_ast_iboss when it's only supposed to turn blinds that aren't specified here into it

vapid flume
daring fern
quartz ravine
#

hi all, How could I totally reset progress for my mod? I want to see how a new user would experience it

hoary crown
#

double blind

buoyant merlin
daring fern
#

Unless you want to show a message on the cards?

buoyant merlin
hasty mist
daring fern
quartz ravine
daring fern
#

A for loop is not going to nuke your frames.

vapid flume
#

idea, is it possible to just check if any of the cards in hand are a speciifc suit (in this case hearts) because a; would probably balance nicer in the thing im trying to make and b; all flushes will be all the same suit anyway

buoyant merlin
buoyant merlin
#

Obviously Hearts can be a different suit if needed

red flower
buoyant merlin
#

Oh. It's if the check should bypass debuff

paper trout
#

badge_colour: Colour of the rarity's badge.
how is this formatted? i tried to use a hex code but it isnt working, seems like other mods use G.C.[color name] but i'm not sure how to find a list of built in colors like that

vapid flume
#

not to be that person who just asks it to be done for them but my brain is like melting trying to figure out how to put these pieces together

eager pendant
#

What did I do wrong?

buoyant merlin
buoyant merlin
brisk rose
#

🩝 < have a random raccoon emoji I had in my text box for some reason

eager pendant
#

What did I do wrong?

willow plinth
#

also hello modding chat

#

modding dev

paper trout
buoyant merlin
#

Yw!

digital niche
#

to make a card eternal i just need to set _eternal?

#

like this?

eager pendant
#

What did I do wrong?

daring fern
digital niche
#

this doesnt give the sticker tho right?

#

just gives the eternal abilityi?

daring fern
digital niche
daring fern
digital niche
daring fern
digital niche
#

because the idea is a enhancement that works like eternal

daring fern
digital niche
#

obsidian enhancement, gives X2 mult and cant be solt or destroyed

daring fern
#

That’s a lot different.

digital niche
digital niche
daring fern
buoyant merlin
#

What happened to the formatting of the third line...?

buoyant merlin
#

Pretend the slash before it doesn't exist

daring fern
digital niche
#

i think

hasty mist
#

what is wrong here?

#

it's supposed to be setting non specified blinds to the generic one

#

but its setting EVERY blind to the generic one

red flower
#

even small and big?

hasty mist
vapid flume
red flower
#

yeah the last condition basically says that if it's a boss it gets replaced

hasty mist
buoyant merlin
#

The intent is for it to trigger after scoring is done

eager pendant
#

What did I do wrong?

red flower
gentle rain
#

how does one go about adding your mod to the balatro mod manager

#

as in, uploading it to be downloaded by others

wintry solar
#

it also runs in every context

hasty mist
digital niche
hoary crown
#

how do you make a joker count a round going by?

buoyant merlin
hasty mist
#

the keys should be fine

digital niche
red flower
hasty mist
#

what should i do?

red flower
#

run it in setting_blind?

vapid flume
red flower
buoyant merlin
daring fern
hasty mist
vapid flume
red flower
hasty mist
eager pendant
#

What did I do wrong?

red flower
hasty mist
#

thats what i was trying to avoid

buoyant merlin
red flower
paper trout
#

how do i check if the player has a certain joker?

red flower
paper trout
#

ty

wintry solar
#

first_hand_drawn should work

vapid flume
cursive sentinel
# red flower yes

wrote it like that but doesnt spawn at all, have i understood it wrong?

in_pool = function(self)
        return args and (args.source == 'sho' or args.source == 'buf')
    end,```
hasty mist
#

id rather not use first_hand_drawn since some boss blinds effects begin before first_hand_drawn, it's fine though im gonna try specifying every blind in the final elseif

red flower
cursive sentinel
#

wdym? i dont know what args is 😔

red flower
placid star
#

can example cards for poker hands have enhancements?

digital niche
#

oh wait nvm ik why

red flower
placid star
#

will it be coming soon?

digital niche
red flower
#

you can copy the lovely patch in that pr

red flower
tall wharf
digital niche
#

gotcha

red flower
red flower
wintry solar
#

yeah that'll get merged

digital niche
#

no but really i love this concept totally will play with your mod when i have the time

red flower
#

i need to pr the mod ui customization in a bit too

wintry solar
#

yeah I looked over that briefly

rare obsidian
#

?

digital niche
#

also tried with the enhancement key

daring fern
digital niche
#

still not working

daring fern
digital niche
daring fern
digital niche
daring fern
digital niche
paper trout
#

how do i give a certain joker to the player?
I notice riff-raff does local card = create_card('Joker', G.jokers, nil, 0, nil, nil, nil, 'rif') but idk what all of those arguments do and I can't find it on the wiki

cursive sentinel
#

says table index is nil when i use it while selecting a card

daring fern
digital niche
#

ok, testing, 1 sec

#

worked! but how about hangedman?

paper trout
red flower
daring fern
daring fern
#

Change it to check for your enhancement as well.

digital niche
daring fern
digital niche
daring fern
digital niche
#

oh okok, ty

daring fern
digital niche
paper trout
daring fern
sturdy compass
#

Just found out this also affects non-playing cards. Is there an easy way I can prevent that??

daring fern
sturdy compass
#

Y'know you're right facepalm

wise walrus
#

Been trying to explore how to hide certain elements of the ui for challenge functionality, where can I find the reference to the Skip Ante button? I’ve already figured out how to flat out remove/hide specific blinds but I’d want to prevent skipping in another challenge

wise walrus
#

Honestly been putting off looking at cryptic purely because of how much content it has, so I’ll look into it soon

#

Only other thing would be how would I mark a boss to not increase the ante? I’m thinking of having a challenge that has a 50% chance to replace the Big Blind with a set of certain bosses