#💻・modding-dev

1 messages · Page 512 of 1

lament agate
#

context.before

#

i think

glad osprey
#

I don't speak new orleans

high sinew
manic rune
#

use blind calculate dawg

high sinew
#

Oh duh jeez sorry long day…

#

Didn’t even think to use the calculate function

nova violet
#

any reason this lil fella causes a crash?

SMODS.Joker:take_ownership('joker',
    {
        config = {
            extra = {
                mult = 4,
                enlighten = 2 
            },
        },
        loc_vars = function(self, info_queue, card)
            return { vars = { card.ability.extra.mult, card.ability.extra.enlighten } }
        end,
        calculate = function(self, card, context)
            card.calculate_joker(context)
        end

    }
)
high sinew
#

What is calculate_joker why not regular calculate function?

daring fern
modern kindle
#

<@&1133519078540185692>

#

kill him

high sinew
#

Dude…

modern kindle
#

thanks mod

#

love you

exotic hedge
#

👋

nova violet
#

for some context, I just want to add functionality to a joker but also have the joker function as before (think, like, adding a trigger counter). easiest way to do that afaik is to run calculate_joker to trigger the original effect and then have the new effect follow below. just trying to get a hold of taking ownership before making changes

daring fern
nova violet
#

then how do i trigger a custom effect

high sinew
#

What does enlighten do? I think that will help solve which one is better having both is crashing it calculate_joker is good for using strictly context of that joker

nova violet
#

i want it to:

  • run normal effect
  • increment a counter, and do something when the counter == enlighten (or enlighten == 0? still working on the logic there)

each joker has an upgraded (enlightened) version that the existing joker turns into when a requirement is met. the base joker just being rounds held. nowhere near knowing how that will work yet, just working in baby steps

high sinew
#

I would heavily suggest finalizing ur idea without that idk how to help sorry man

nova violet
#

heard, thanks for trying!

high sinew
#

Yea ofc I would decide if you want enlighten to be this keyword for jokers where when you beat blinds with one hand or boosters bought or whatever this way you can have then a output or reward which will completly make it able to be build for what you want Rn

nova violet
#

but if enlightened is unused atm why is it crashing? it should just be ignored, unless im missing something

obtuse musk
#

first time kinda making a joker, please give pointers on if its all weird and wonky or something 😭

high sinew
nova violet
#

OH. so calculate and calculate_joker are both calculate functions. calculate_joker is from the base source code so i assumed it wouldnt interfere. sorry, must have missed that

high sinew
#

Good Analogy would be like taking ur car in for only its engine but ur code Rn has the mechanic thinking it needs tires, engines wheels everything!

rapid stag
#

uhhh sanity check, what's the variable that holds the current hand count?

daring fern
oak meadow
#

((card.ability.extra.route == 0 and '{C:inactive}Neutral') or card.ability.extra.route == 1 and '{C:chips}Pacifist') or card.ability.extra.route == 2 and '{C:mult}Genocide'
would there be any way to make smth like this work

sonic cedar
#

oh my god

glad osprey
#

LMAO

sonic cedar
#

i need to pattern recognition this

sonic cedar
oak meadow
#

my goat notepad

#

also is there a way to have a joker read from a singular image file for its icon
i dont want to have to update every joker with new positions in my atlas every time i make new jokers

sonic cedar
#

what

#

no im fr what does this mean 😭

modern kindle
#

I wish I knew because my brain just played a scenario where every time he adds an image its always on the 0 0 pos sliding everything one over instead of just adding it to the end

sonic cedar
#

no because thats what i visualized

#

but i really hope

#

that it's not that

modern kindle
#

I really hope so as well

chrome widget
#

There's no required size of atlases

chrome widget
vestal magnet
#

why does this do nothing (seal)

daring fern
copper thorn
#

am i dumb ? i tried many things but i don't remember how to make the joker play a message when added to deck

daring fern
oak meadow
#

is it a good idea to have multiple spritesheets for each update so i dont have to update the spritesheet every time

copper thorn
#

?

daring fern
copper thorn
#

one of my joker, add 2 slot of joker and i want the joker to play a message once when added to deck

chrome widget
oak meadow
#

remove_from_deck(self, card, false) { G.jokers.config.card_limit = G.jokers.config.card_limit - card.ability.extra.acard_limit_old }
why does this have an error (starting from the first card_limit, it says "missed symbol '}' ")

copper thorn
oak meadow
#

its really not

#

that part's just in the normal SMODS.Joker part

#

the line after closes it with }

copper thorn
#

yhi figured so but check near it maybe you missed on

oak meadow
#

if i remove it the error goes away

outer jungle
#

hey does someone know how i can add the blueprint / brainstorm compatability label to one of my jokers?

oak meadow
#

blueprint_compat = true,

#

(added comma so you can just paste it in)

copper thorn
oak meadow
#

yes

#

that is

#

what they were asking

outer jungle
oak meadow
#

no

#

it just makes it say that its compatible

#

you need to change the actual code to make it copyable

#

(it also works for bainstoerm)

daring fern
outer jungle
#

i just want the visual label to be in my joker description

oak meadow
#

what

#

elaborate

oak meadow
#

OH I GET IT

oak meadow
#

here's the blueprint code from there

    key = "blueprint",
    unlocked = false,
    blueprint_compat = true,
    rarity = 3,
    cost = 10,
    pos = { x = 0, y = 3 },
    loc_vars = function(self, info_queue, card)
        if card.area and card.area == G.jokers then
            local other_joker
            for i = 1, #G.jokers.cards do
                if G.jokers.cards[i] == card then other_joker = G.jokers.cards[i + 1] end
            end
            local compatible = other_joker and other_joker ~= card and other_joker.config.center.blueprint_compat
            main_end = {
                {
                    n = G.UIT.C,
                    config = { align = "bm", minh = 0.4 },
                    nodes = {
                        {
                            n = G.UIT.C,
                            config = { ref_table = card, align = "m", colour = compatible and mix_colours(G.C.GREEN, G.C.JOKER_GREY, 0.8) or mix_colours(G.C.RED, G.C.JOKER_GREY, 0.8), r = 0.05, padding = 0.06 },
                            nodes = {
                                { n = G.UIT.T, config = { text = ' ' .. localize('k_' .. (compatible and 'compatible' or 'incompatible')) .. ' ', colour = G.C.UI.TEXT_LIGHT, scale = 0.32 * 0.8 } },
                            }
                        }
                    }
                }
            }
            return { main_end = main_end }
        end
    end,
    calculate = function(self, card, context)
        local other_joker = nil
        for i = 1, #G.jokers.cards do
            if G.jokers.cards[i] == card then other_joker = G.jokers.cards[i + 1] end
        end
        return SMODS.blueprint_effect(card, other_joker, context)
    end,
    check_for_unlock = function(self, args)
        return args.type == 'win_custom'
    end
}```
daring fern
oak meadow
#

oh

#

i dont read

#

sry

daring fern
daring fern
copper thorn
#

yh i'll check it out when i have time

#

i have to go

oak meadow
#

oh im stupid

copper thorn
#

i thoug6i had enough time

oak meadow
#

doesnt work and i dont think im stupid

daring fern
# oak meadow
remove_from_deck = function(self, card, from_debuff)
    G.jokers.config.card_limit = G.jokers.config.card_limit - card.ability.extra.acard_limit_old
end
oak meadow
#

idk i just replaced it with false cuz i dont want it to happen on debuff

daring fern
charred rain
#

where do i start if i want to make a mod

oak meadow
daring fern
oak meadow
#

ty

languid canopy
#

is there a specific atlas for vouchers ?

rare torrent
#

how do i run a function only one time when the game loads?

charred rain
#

how do you put in a loc_txt thingy

daring fern
languid canopy
# daring fern What do you mean?

i wanna put custom sprite for my voucher, do i put it in my consumable sprite chart or i have to create a new file for it a thus find it with SMODS.atlas and stuff

oak meadow
daring fern
languid canopy
charred rain
daring fern
oak meadow
#

remove the }, after sylver

languid canopy
oak meadow
#

actually

#

let me just type it out

oak meadow
#
SMODS.Joker{
key = 'sylver'
loc_txt = {
name = 'sylver',
text = {
'does nothing yet',
}
}
atlas = 'Jokers'
pox = {x = 0, y = 0}
}
oak meadow
outer jungle
#

thanks

oak meadow
#

@charred rain after you put that in... please rclick and format

charred rain
#

what

oak meadow
#

just copy that over the joker

#

the text = (the description) was outside of loc_txt because you put a } to close loc_txt after name

charred rain
#

oh alright

#

thx

oak meadow
#

yw

charred rain
#

chat i'm in the video game lets goo

oak meadow
#

no way
he's using reset for seed in yahimod
oh and also he's in the game which is cool

charred rain
oak meadow
#

no

#

download debugplus

#

it is EXTREMELY helpful for testing

charred rain
#

dont feel like it

#

ok fine

oak meadow
#

you can also just like
have fun with it somtims

gray horizon
#

Ok so guys i read the files and im installing steam modded and Github

#

To test out the balatro mod

#

What are all the assets needed

#

?

#

That way im sure i have everything but the Json

oak meadow
#

if cryptid is installed, can i juse use "cry_epic" as a rarity in my joker or does that not work

oak meadow
#

niceeee

trail tide
#

How do I use {V:something} to color the text as a selected suit?

daring fern
#

And then it would be {V:1}

proven adder
#

Is it possible to re-trigger every joker that the player has?

proven adder
daring fern
# proven adder how?

if context.retrigger_joker_check then return {repetitions = 1} end if you have it enabled.

oak meadow
#

how do i make a pool default to a card other than Joker

#

(Joker as in the default Joker)

red flower
oak meadow
#

im doing that

#

its not working

red flower
#

can i see

oak meadow
#

SMODS.ObjectType {
key = 'cat_shop',
default = 'kat',
cards = {
j_lucky_cat = true,

}

}
this is my pool

#

i can send the card im using to summon from

red flower
#

it has to be the full key

oak meadow
#

this always meses me up

#

ty

#

is there a context for consumable used

daring fern
oak meadow
#

can i check what consumable it is in particular with that somehow

daring fern
oak meadow
#

then i assume i could so something like
if context.using_consumeable and context.consumeable == "c_tmod_boxofcats" then
x
end

#

rite?

daring fern
# oak meadow rite?

No, if context.using_consumeable and context.consumeable.config.center.key == "c_tmod_boxofcats"

modest dock
#

hello, how can i check if the played hand wins the round?
i have a joker which rewards you if you win the round with n number of hands left
I am using context if context.final_scoring_step and G.GAME.blind.chips <= G.GAME.chips * mult then
but it doesn't consistently trigger whenever you win the round

slim ferry
#

just check for the remaining hands in context.end_of_round

#

your hands dont get reset until the shop

modest dock
#

Great, thank you!

oak meadow
#

if you dont add context.main_eval it loops the effect i think

thorn basin
#

Small question: why the UIbox I made in config doesn't have the small black shade in the lower part and instead it has those white angles?
Should I specify the outline?

manic rune
#

you only need 1 G.UIT.ROOT

#

use G.UIT.C/G.UIT.R instead

thorn basin
#

alright

thorn basin
manic rune
#

{n = G.UIT.ROOT, config = {r = 0.1, minw = 5, align = "cm", padding = 0.15, colour = G.C.BLACK}, nodes = {

#

try this

thorn basin
#

aight

oak meadow
#

is there a way to check if a card is from a mod as a context or smth

#

actually even better

#

is there a way to check if a card has no pools

daring fern
daring fern
thorn basin
oak meadow
#

is there a way to make multiple copies of the same joker not all do something
such as only one copy will do that part

manic rune
#

check if the joker has multiple copies, if it does then make it so it only works when its on the leftmost position

oak meadow
#

ah that makes sense
also i just got deja vu for this lol thats funny

bold gyro
#

hey y'all, is there a way to shorten a description box/ignore a line if it's "blank"? right now i have the extra line at the end that's basically a variable string, so there's this empty space if the variable is empty

red flower
#

use main_end to add ui nodes or key to switch localization keys

feral tree
#

Can consumables have souls?

daring fern
oak meadow
#

can i do something like
if G.jokers.cards[2] == 'j_tmod_catofboxes' then
x
end

manic rune
manic rune
oak meadow
#

ty

#

if my_pos and G.jokers.cards[my_pos - i].config.center.key == "j_tmod_catofboxes" and not card then
stupid = false
break
end
so would this check if
the jokers before my_pos are not catofboxes and if they aren't this card
then it sets stupid to false
just makin sure

daring fern
oak meadow
#

how do i check if its not this card (the one running the code)

daring fern
oak meadow
#

would that not check
the jokers before my_pos are not a card

daring fern
oak meadow
#

so is card just any card or the card that is running code

obtuse musk
manic rune
#

why...

oak meadow
#

reminds me of when i used notepad (2 days ago)
bad times (2 days ago)
i really hated (2 days ago)

#

if my_pos and G.jokers.cards[my_pos - i].config.center.key == "j_tmod_catofboxes" and not card then
why does this index a nil value

oak meadow
#

for i = 1, #G.jokers.cards do
if my_pos == 1 then
stupid = true
break
end
-- next line indexes a nil value
if my_pos and G.jokers.cards[my_pos - i].config.center.key == "j_tmod_catofboxes" and not card then
stupid = false
break
end
if i == my_pos then
stupid = true
break
end
end
(my_pos should be defined as a number and stupid is defined as nil)

distant junco
#

is there a mult equivalent of hand_chips?

#

because hand_mult gives me a squiggly so its obviously not happy with it

spice wadi
red flower
#

mult

distant junco
#

so if i put idk temp_var = mult it will have the mult scored but if i return mult = temp_var it will score that as mult

red flower
#

yes

distant junco
#

got it

#

thanks

spice wadi
distant junco
#

well ill give it a shot and i shall report back

oak meadow
spice wadi
rotund sable
#

is there like a list of things talisman changes to tables?

unborn bay
#

wdym

#

talisman changes nothing about how tables work on a fundamental level

red flower
#

what values are turned into bignum

oak meadow
unborn bay
#

a lot

rotund sable
unborn bay
#

you probably should have said what values are bignum'd

rotund sable
#

it sounded good enough in my head

unborn bay
#

most notable ones are ante, round count, dollars, i THINK hands and discards, as well as blind chip requirements

red flower
#

pokerhand values like chips mult and levels too iirc

#

someone should make a talisman wiki

unborn bay
#

no

#

the less people using talisman the better

#

insert superman png

rotund sable
#

i just want talisman compat

#

🥲

red flower
#

weirdly i only needed to use to_big once in my mod

#

i guess i just dont touch global values

rotund sable
distant junco
cursive gazelle
#

Hey so i’m making a factorial mult function and when i call it it
return{xmult=sxeif.fact(card.ability.extra.mult)}
It prints an error that i’m trying to preform arithmetic on a string
Even tho card.ability.extra.mult is set to 15 in config

red flower
#

whats the crash and the code for the function

cursive gazelle
#

Its just a normal factorial function
I’m using an( x )variable in params

#

Error is attempt to preform arithmetic on a string

red flower
#

what's the full crash log and the full code for the function

cursive gazelle
#

1 sec

red flower
#

like, I dont know where the error is if you paraphrase lol

cursive gazelle
#

function sxeif.fact(x) if x == 0 or x == 1 then return 1 else return x* sxeif.fact(x- 1) end end

red flower
#

yeah i would need to see the log

spice wadi
#

I'm planning on messing around with the built-in error handling stuff

#

Would it be possible to catch a specific style of error (like comparing a number to a table from not using to_big) and like
Retry the calculation somehow (or at least warn about talisman compatibility not being setup properly in the crash)

cursive gazelle
#

i found the error nvm

#

Wow now i get a different crash message

#

I figured it out

#

Finally

#

How would i go to make my own return ?
Like
Return {
xfact=value}

red flower
cursive gazelle
red flower
#

yeah its an internal function

cursive gazelle
#
                
                colour=G.C.TAROT,
                xmult_messsage=tostring(card.ability.extra.mult).."!",
                xmult = sxeif.fact(card.ability.extra.mult),
                message_card=card,

            } ```
red flower
cursive gazelle
cursive gazelle
red flower
#

you have an extra s

#

(ironically)

cursive gazelle
#

yeah

#

im surprised it didn't crash

red flower
#

it doesnt crash for fields that are not listed, theyre just not checked

cursive gazelle
#

It doesn’t print anything

spice wadi
#

Can you show the code

#

Also what is this for

cursive gazelle
#
                
                colour=G.C.RED,
                xmult_message=tostring(card.ability.extra.mult).."!",
                xmult = sxeif.fact(card.ability.extra.mult),
                message_card=card,

            }```
#

custom xmult message

spice wadi
#

Why?
I mean compared to just returning a message

#

Genuinely curious, I might be missing smth haha

cursive gazelle
#

if i return a message the xmult message will still appear

#

i'm using a factorial mult , i want to replace the mult value with just x! in message display

unborn bay
#

use either xmult_mod over xmult or remove_default_message

#

-# was that what it was called

cursive gazelle
#

remove_default_message=true ?

unborn bay
#

if you're going that route

red flower
cursive gazelle
unborn bay
#
xmult_message = { message = "whatever", colour = G.C.WHATEVER }
red flower
#

oh yeah

unborn bay
# red flower does it?

expects a table filled with parameters you would set for an extra table for card_eval_status_text yeah

#

did you know all message does is encapsulate the entire return table as an extra table for that

red flower
#

thats not what the docs say..

#

have the docs been lying to me the entire time

red flower
#

thats why you can do stuff like volume and instant

spice wadi
lament agate
#

is this ethical

spice wadi
#

Ethical yes
Crazy yes

modern kindle
#

Good schmorning chat

lament agate
#

mornign dil

modern kindle
#

Wave emoji

red flower
#

hi dilly

modern kindle
#

I dont know if I desire to exist rn but I couldn't fall back asleep

#

Hi N how are you bestie

red flower
#

i dont know

gaunt thistle
#

hi dilly!

modern kindle
#

Hi metherul!

#

I hope you are well

modern kindle
vestal magnet
#

ok so i have a joker that swaps places with another joker when the play hand button is presesd; but the issue is that it sometimes (just outta nowhere. might be cuz of blueprint/brainstorm) literally crashes the game. no i don't get any error message the game just freezes up and i have to close it

red flower
#

you can try adding and not context.blueprint

vestal magnet
#

seems to work so far

manic rune
#

what text editor is that...

vestal magnet
#

notepad

rotund sable
#

🙏

#

Please at least use notepad++ if not vscode

manic rune
#

is notepad becoming the meta or something 😭

slim ferry
#

are we fr

#

notepad??

proven adder
manic rune
#

same.

red flower
#

i code in a napkin

slim ferry
#

no way like brainstorm

red flower
#

oh sorry my use of prepositions is bad

#

i mean i am physically in the napkin

spice wadi
cursive gazelle
#

Is praying your code work a common thing when developing lua

spice wadi
#

Yes

manic rune
#

you pray that its in the exact location you want it to be, everytime

cursive gazelle
#

Funny i am coding ui

manic rune
#

same

red flower
#

i love ui

manic rune
#

im currently trying to make info_queues' names support stylized strings rn

#

i might cry before i get this working :3

red flower
#

bepis are you just fixing all the pissdrawer problems

manic rune
#

yeah

#

you guys are my teammates so :3

red flower
#

also can you make them work in the round eval screen once youre done with that

spice wadi
#

I love ui (kill me)

manic rune
#

round eval screen?

#

-# i actually dont know what that means sob

red flower
#

like calc_dollar_bonus

cursive gazelle
#

I’m having your code on second monitor and currently having the philosophical pose

manic rune
#

o

#

they dont already support stylized strings?

red flower
#

i have a custom patch so my jokers get their names colored in that

red flower
manic rune
#

*slams table at least six times

#

sure, i will take a look into that after this

cursive gazelle
#

N

#

Trying to implement this to my mow

#

Mod

manic rune
red flower
#

im guessing the process is the same but with different defaults

manic rune
#

mhm

vestal magnet
manic rune
#

"damn wtf WAS i doing"

manic rune
#

🥀

red flower
manic rune
#

what does that do

#

is it just, press space = 4 times normally

#

or something

red flower
#

no, you press the tab key and it does 4 spaces

manic rune
#

o

red flower
#

instead of a tab

modern kindle
#

bepous

manic rune
#

hi dilly

modern kindle
#

hi

manic rune
#

anyways back to me digging through at least 4 functions to figure out how they are doing desc_nodes.name

#

sob

red flower
manic rune
#

lmao 😭

modern kindle
cursive gazelle
#

Attempt 50

rotund sable
#

how would i spawn something from a custom pool?

red flower
#

SMODS.add_card { set = "poolkey", area = area }

manic rune
# red flower also wdym

like, checking where they run generate_card_ui, see what they are doing with desc_nodes.name, stuff

rotund sable
#

ty

red flower
#

and then it gets passed here

cursive gazelle
#

now the button doesn’t show up

#

Great

#

I give up
I’ll do it later

spice wadi
modern kindle
#

the secret is to remain inefficient

manic rune
modern kindle
#

thusly never discovering anything bad

spice wadi
#

That's so smart

#

I'll do that

modern kindle
#

glad to be of help

chrome widget
#

Weh

red flower
#

wah!

hidden sable
chrome widget
#

Wehhhhhhh

hidden sable
chrome widget
#

Weh is a very important emotion to me

hidden sable
chrome widget
#

I have no idea what that unauthorized fucking thing is

hidden sable
#

bro just look up ss14 weh and you'll get it

whole lava
#

how can i make a joker that modify value of another joker?

hidden sable
chrome widget
#

Oh I see, space station 14

hidden sable
#

ok tantalizing juice gem

modern kindle
#

hi @chrome widget

chrome widget
#

Hi Dilly!!!

modern kindle
#

how is the goat of goats

chrome widget
#

Doing alright, trudging through finishing some challenges

modern kindle
#

hell yea atta girl

#

keep it up

hidden sable
#

truly the difference

modern kindle
#

i was just messin with the https stuff for an idea but ill have to figure out what i evne want to do with it

hidden sable
#

make it

chrome widget
ocean sinew
#
_G.loadstring = function(text, chunkName)
    local result = o_loadstring(text,chunkName)
    local function extract_params(func_line)
        local param_str = func_line:match("function%s*%((.-)%)")
        if not param_str then
            param_str = func_line:match("return%s*function%s*%((.-)%)")
        end

        local params = {}
        if param_str then
            for param in param_str:gmatch("[^,%s]+") do
                table.insert(params, param)
            end
        end

        return params
    end
    local function wrap_result(result, text)
        local t_result = result
        return function(self,...)
            --o_print("code:",text)
            local args = {...}
            if self ~= nil then
                args = {self,...}
            end
            --o_print("called wrapped result?")
            local return_value
            if unpack == nil then unpack=o_unpack end
            if type == nil then type=o_type end
            if t_result then
            return_value = t_result(o_unpack(args))
            end
            if type(return_value) == "function" then
                print("new code:",text)
                SMODS.SourcedFunction:add_source(return_value, text, extract_params(text))
                return_value = wrap_result(return_value)
            end
            --o_print("got return value I guess?")
            --o_print("return value:",return_value)
            return return_value
        end
    end
    SMODS.SourcedFunction:add_source(result, text, extract_params(text))
    return wrap_result(result, text)
end
#

PLEASE HELP ME

#

ITS SETTING THE SOURCE TO _G.LOADSTRING WHEN A FUNCTION THAT RETURNS A FUNCTION IS CALLED

#

PLEASE 😭

hidden sable
ocean sinew
#

someone is indian programmer😭

modern kindle
# chrome widget Oooo cool!! How did your computer specs polling end up?

things appear to be on the up and up
i still havent gotten around to the cpu part mostly because of laziness admittedly

after moving fridge to not be in all of G it made it so i was no longer going to 35 fps when i had it being read as joker eval
so perf wise im chillin there now

i was trying to use the https stuff to pull a random game and its wr but i keep failing the game fetching for some reason, i can pull the record of an indiv game but i assume im just doing something wrong which ill look into later

chrome widget
#

Mm I see

modern kindle
#

ill get dere eventually :D
im not sure if i want to keep it only cause of balance reasons what i was gonna do doesnt seem to be the wave
i was gonna have it select the time and then make it either chips or mult and add records the longer you hold it

but my initial test of ultrakill was 660 seconds making it that aount of chips or mult

which is alot lmao

chrome widget
#

My next challenge is gonna be a little harder because it requires some patches, I need to replace basically all blinds in a run

modern kindle
#

godspeed

#

i really need to get around to lowering my patches

red flower
#

eremel was planning to port the ortalab blind stuff to smods i think

ocean sinew
#

return/function(self,/info_queue,/card)

return/{vars{card.ability.extrahands,card.ability.extradiscard_threshold}}
end
INFO - [G] C:/Users/user/AppData/Roaming/Balatro/Modsreturn/function(self,/info_queue,/card)

return/{vars{card.ability.extrahands,card.ability.extradiscard_threshold}}
end

#

is there a way to get the actual source of this somehow 😭

#

the actual code:function(self, info_queue, card)

return {vars={card.ability.extra["hands"],card.ability.extra["discard_threshold"]}}

modern kindle
red flower
#

what would i be useful for

modern kindle
#

my life ♥

rare torrent
#

im trying to make a deck start with only a set of my custom suit, im doing it by changing one of the suits and removing the rest but idk how to remove cards and this isn't working apply = function(self, back) G.E_MANAGER:add_event(Event({ func = function() for k, v in pairs(G.playing_cards) do if v.base.suit == 'Clubs' then v:change_suit('omega_suit') end if v.base.suit == 'Diamonds' then remove = true end if v.base.suit == 'Hearts' then remove = true end if v.base.suit == 'Spades' then remove = true end end return true end })) end

faint yacht
#
for k, v in pairs(G.playing_cards) do
  if v.base.suit ~= 'Clubs' then SMODS.destroy_cards(v) else v:change_suit('omega_suit') end
end
plucky zenith
#

Does anyone know of a good mod that I can look at to try to learn how to add a couple buttons (claim/destroy) to a card that I spawn into the G.play area?

cursive gazelle
cursive gazelle
#

credits to N'

plucky zenith
#

Hmm, I looked through Vanilla and it seems to add similar buttons to cards in shop, but those seem to be added by some background code in Balatro. I'll look again, maybe I'm missing an example in there somewhere

rare torrent
faint yacht
#

SMODS.destroy_cards(v) > SMODS.destroy_cards(v, nil, true)

rare torrent
red flower
#

my problem with destroy_cards there is that it calls the remove_playing_card context i think

red flower
faint yacht
#
if next(playing_cards) then SMODS.calculate_context({scoring_hand = cards, remove_playing_cards = true, removed = playing_cards}) end

Yes it does.

cursive gazelle
#

you're taking all the credit for the cool stuff N

plucky zenith
#

Thank you!

cursive gazelle
cursive gazelle
#

disable all mods work

#

i need to figure out where to place it now

#

every copy of balatro is custumizable just like linux

cursive gazelle
#

i didn't do localization

#

i'll do it later

red flower
#

if this is for smods i would probably have it in the same screen

#

as the mods

cursive gazelle
#

i couldn't sadly

#

too much space occupied

#

not a good ux

#

also added a confirmation

spice wadi
#

I might expand on that sometime

cursive gazelle
cursive gazelle
spice wadi
cursive gazelle
#

no worries

spice wadi
#

The mod management update is gonna have modpack support hopefully, so having a system to disable other mods easily (as well as lock certain mods from being disabled by the disable all thing) would be useful

cursive gazelle
#

modpacks you say

#

intresting

spice wadi
#

Well since you're gonna be able to install mods ingame

#

And it'll install dependencies automatically

#

Making a modpack system shouldn't be too hard

cursive gazelle
#

do i make a pull request or contact eremel

cursive gazelle
spice wadi
#

Working a bit with the people on that team for this as well

#

I'm mainly doing frontend

cursive gazelle
spice wadi
#

And corobo is doing backend

spice wadi
#

Not sure which approach to take

#

I think it'll be like
You just make an empty mod with the other mods listed as dependencies

cursive gazelle
#

good luck for you guys , i'd love to contribue but i'm not good at web dev

spice wadi
cursive gazelle
#

lmao

#

the problem with modpacks

#

is some mods don't like others

rotund sable
# cursive gazelle

if you're using create_UIBox_generic_options please add no_back = true to the table you pass to it

cursive gazelle
rotund sable
#

looks better than cancel and back next to each other

spice wadi
cursive gazelle
#

it's unfinished product for now so i'll make sure to add that

cursive gazelle
spice wadi
#

Wdym?

#

Oh

#

Out of the box it'll support the Balatro Mod Index (BMM) and Photon

#

With support to add more via mods

cursive gazelle
#

great

#

good luck

#

so ... factorial mult balatro ?

#

maybe i'll add that to smods aswell

red flower
#

i dont think they will add it

#

factorial mult doesnt make sense without talisman

ocean sinew
#

I want to know

#

cuz

#

I need to make a function that injects cards into the game in real time

#

for secret cards

#

and other stuff

rare torrent
#

how do i add an negative wheel of fortune? calculate = function(self, card, context) if context.individual and context.cardarea == G.play and context.other_card:is_suit("omega_suit") then SMODS.add_card{key = "c_wheel_of_fortune"} set_edition("e_negative", true} end end,

cursive gazelle
ocean sinew
ocean sinew
#

np

red flower
#

youre emplacing and adding the card twice

ocean sinew
#

really?

#

I didn't know sorry

ocean sinew
red flower
#

SMODS.add_card{key = "c_wheel_of_fortune", edition = "e_negative"}

ocean sinew
#

you don't need to do :add_to_deck and :emplace()

ocean sinew
cursive gazelle
#

it's so funny whenever i decide to edit something i get faced witha 1k+ lines code

frosty rampart
trail tide
#

Do I need to manually code (with no_pool_flag) so that my jokers don't appear in the shop, when aalready owned? Or is there an easier way?

frosty rampart
#

no, the game automatically removes any card from the pool if you own it and don't have showman

trail tide
#

Maybe they appeared there because i took them with DebugPlus? Because they did not appear third time as far as i remember

modern kindle
#

Yea they'll still appear if you spawned them in with debug in my experience

#

Just wont when acquired normally

trail tide
#

Yeah it worked correctly now when i got my joker naturally from the shop

#

And i saw the "nope" from a rare tag for the first time, when i took all rare jokers

chrome widget
#

Huh, what's the most effective way to determine if a sticker is a stake win sticker in regards to the G.shared_stickers table?

#

In SMODS, the other stickers are added to it when originally they had their own fields

#

But it means the grouping is a little less obvious now

snow breach
#

What's the method to make a card rental?

thorn furnace
#

How do I force a game over?
Like is there a SMODS.game_over() function or something

snow breach
#

I think it's something along the lines of lose_run()

chrome widget
#
if not G.GAME.seeded and not G.GAME.challenge then 
    G.PROFILES[G.SETTINGS.profile].high_scores.current_streak.amt = 0
end
G:save_settings()
G.FILE_HANDLER.force = true
G.STATE_COMPLETE = false```
snow breach
#

I was quite wrong.

modern kindle
#

Damn thats alot more than I usually do
I just do like 2 lines

thorn furnace
chrome widget
#

would probably help yeah

#

That's just's called in end round to initiate it, then the Game:update_game_over() function handles it

thorn furnace
#

So it would be like this?

red flower
#

i actually do an extra line so i can show what card you lost to in the game over screen

#

(stolen from lobcorp)

thorn furnace
#

what card?

red flower
#

yeah, im not on my pc rn but it shows you the card sprite instead of the blind icon

#

for this

ocean sinew
chrome widget
red flower
ocean sinew
thorn furnace
#

I only asked because I realized that if HP reaches 0 in Alloy, it doesn't actually matter right now
It only matters when the loss happens

#

so if i want it to lose right away then

chrome widget
#

Depending on your use case, it can also be used for winning the game, but the code I gave you assumes it's a loss condition

#

Which is why I took out a check for G.GAME.won on resetting your win streak

#

If you need it, you can add a won argument to the function, set G.GAME.won = won or false, and then readd that check to make sure it's only resetting the win streak on loss

ocean sinew
#

level_up_hand(card, G.GAME.last_hand_played, false, 1)
why this doesnt actually level up?

chrome widget
ocean sinew
#

guys nvm it does

#

I was just being a dumbass

royal ridge
#

anything in G.shared_stickers looks like a stake sticker

thorn furnace
chrome widget
#

Ooop, found it. G.sticker_map is actually changed in SMODS to be a proper map, and the stake sticker keys are added to it

#

So I can use that, I was disregarding it because it doesn't work that way in vanilla

royal ridge
#

oh i'm stupid i didn't backread enough

#

sorry

chrome widget
#

No yeah specifically i need to delineate stake stickers for a custom draw step

#

The Stickers step doesn't really do that and I need to do smth specific

chrome widget
thorn furnace
#

i feel like i should change the name of the function
I guess winning is technically a game over

#

game_end to be more neutral?

cursive gazelle
#

prototype

red flower
#

uhhh

#

you might want to use latest smods for this

#

it changes that screen

cursive gazelle
#

...

#

i'm using the latest release

faint yacht
#

Latest commit.

red flower
#

latest commit

cursive gazelle
#

don't tell me

#

oh my god

red flower
#

it doesnt do anything of what youre doing

#

but its a nicer view now

cursive gazelle
#

i see

#

i thought they changed the whole structure

red flower
#

looks like that

faint yacht
#

More efficient use of screen space.

cursive gazelle
#

i'll look into it later today

thorn furnace
#

the internal fight between making 40,000 functions that all do subroutines or to just make it into one function that does everything

#

the fight lost

cursive gazelle
#

are you making a mini game

thorn furnace
#

im not good enough at lua to make a mini game

cursive gazelle
#

it's not hard to make something simle there's a lot of love 2d docs

cursive gazelle
#

because i was using a release not a commt version

thorn furnace
#

i might be misunderstanding love2D tho

cursive gazelle
#

pretty sure you can do a lot with just tabs/shaders/buttons

cursive gazelle
formal quest
#

I have a Joker that creates a speed tag when the blind is skipped, but it keeps redeeming before double tags activate. How do I spawn a tag as if it was obtained directly from skipping?

cursive gazelle
#

and your tag code

red flower
#

i think someone had a similar problem but idk how they solved it

#

i think they needed to add a context after the tag is added

formal quest
cursive gazelle
#

check your context

formal quest
#

I'm using this hook for a custom context, then creating a tag in an event in that context

daring fern
formal quest
#

What do you mean by apply the tag again?

daring fern
formal quest
#

So this activates tags again? That's just what I needed.

formal quest
frosty rampart
short girder
#

folks, is there a way to create a card with modified attributes? i wanted to create a card usin SMODS.add_card but i wasnt quite sure how to modify some of its attributes(like card.ability.extra.[field])
is there a way to do that?

red flower
#

save the return to a local variable and change that

#

it returns the card added

formal quest
short girder
# red flower it returns the card added

like what, this?

local _k = ''
func = function()
  return SMODS.add_card({ Set = 'set' }) == _k
end
_k.ability.extra.field == 2 * _k.ability.extra.field -- example
SMODS.add_card({ key = '_k' })
sonic cedar
#

hello modding dev
i am doign pr stuff

daring fern
short girder
#

<eof> expected after return

cursive gazelle
daring fern
short girder
#

yeah and it's inside another function

sonic cedar
daring fern
short girder
#

so im calling a second function to not kill the one i want to continue

oak meadow
#
                        for i = 1, #G.jokers.cards do
                if my_pos == 1 then
                    stupid = true
                    break
                end
                if i == my_pos then
                    stupid = true
                    break
                end
-- this line
                if my_pos and G.jokers.cards[my_pos - i].config.center.key == "j_tmod_catofboxes" and not card then
                    stupid = false
                    break
                end
            end

one of the ifs in this for loop never outputs true
idk why
(my_pos is set to the joker position right before this and stupid is nil)

short girder
#

or is that not necessary

daring fern
red flower
#

idk what you're doing there

#

== is comparison not assignment

#
local added_card = SMODS.add_card{...}
added_card.ability.extra = blahblah
short girder
#

oh gotcha

#

so would somethin like this work

red flower
#

no

#

did you see what i wrote

sonic cedar
#

that requires reading

short girder
#

Sorry stubbornness

ocean sinew
#

is that gambling??? 💀

cursive gazelle
#

i had to rewrite the whole thing

#

somehow

#

it worked !!!!!!!!

#

i wanna know who's responsible for this ui change@red flower

red flower
#

aikoyori

cursive gazelle
#

i had to change their function

#

to add a row

short girder
cursive gazelle
#

because it looked so bad ,,,,,

cursive gazelle
red flower
cursive gazelle
#

add counter for

#

mods

#

mods enabled

#

mods disabled

short girder
#

wait a minute you dont need two of them

#

what

cursive gazelle
#

issues with mods

red flower
#

no why would you

short girder
#

idk

cursive gazelle
#

(all the display is done in one row and it dynamically changes display)

thorn furnace
#

Two mini questions
First one is how do I make a sticker only be able to spawn on Jokers
Second one is how do I make it not spawn 100% of the time

short girder
# short girder idk

thought it only fetched the created key not that it actually created the card lmfao

cursive gazelle
thorn furnace
#

github wasnt loading for me for some reason

cursive gazelle
#

i'm done

#

never touching ui again (today)

thorn furnace
#

Is this a good sticker to add for a bonus stake
Ultimately it's just a worse Perishable on its own but I can imagine it having uses where it stacks up

slim ferry
#

i mean you can just sell it?

thorn furnace
#

theoretically you could get explosive + eternal but that's like a 9% chance

#

which actually isn't that uncommon now that I think about it

cursive gazelle
#

does this appear on every joker

thorn furnace
#

wdym

cursive gazelle
#

in vanilla scaling jokers can't have perishable sticker

#

and food jokers can't have eternal

thorn furnace
#

o that

#

it does appear on every joker

cursive gazelle
#

i see

#

is this a new stake you're working on

thorn furnace
#

i made a whole bunch of stakes

cursive gazelle
#

sounds nice

#

make sure to keep it playable

thorn furnace
#

I was about to show them but apparently it thinks I meant an alloy stake when I said gold stake

thorn furnace
cursive gazelle
#

so it has all the previous stakes effects applied

thorn furnace
#

yea

#

would that not just be this for gold stake

cursive gazelle
#

yes

thorn furnace
#

o

thorn furnace
cursive gazelle
#

i wonder how would the game be if every joker had 100% to spawn with a stciker

#

sticker*

slim ferry
#

hell

#

torture

thorn furnace
#

apparently very interesting
the two stickers I added seem to be at 100% constantly despite changing the rate

cursive gazelle
#

can you add weight to stickers

#

idk

cursive gazelle
thorn furnace
#

It's going alright

#

I've been working on making the backend more modular so it can be adapted more easily to different platforms

cursive gazelle
#

very nice, i hope you don't face a dead end

#

if you do , consider slamming into it multiple times, it works on the 55th time

spice wadi
cursive gazelle
#

sorry im not good with names,also new here

cursive gazelle
#

but i haven't done localization , i'll do it tomorrow

#

i need to add a little padding between the cinfirm and cancel button aswell

spice wadi
spice wadi
#

Very nice feature genuinely

cursive gazelle
#

oh lmao

#

do you think mod counter should be in a global variable ?

#

idk maybe someone can use it

spice wadi
#

maybe?
seems like a good idea

cursive gazelle
#

i was thinking maybe someone would make a joker that gains mult based on how many mods you have , and this would help lol

#

i'm not sure who's gonna use it but i'll add it anyway

red flower
#

i feel like someone already did it

cursive gazelle
#

i'll check

thorn furnace
#

I mean as of now it's just one file so

gray horizon
#

Yo chat im havin problem installing steam modded

spice wadi
gray horizon
#

If yall want while i try and fix it can i send the zip of the mod and who wants tests it out for me pls?

thorn furnace
red flower
#

this is for mod development

gray horizon
#

Thats why i didnt ask there

red flower
#

if it's forbidden there it's forbidden here

spice wadi
thorn furnace
#

Yea

spice wadi
#

ingame

gray horizon
# spice wadi whats the problem then

I jus made a mod and im new so they explained like, you need to try it on your steam modder but my wifi isnt workin today and steam modded aint want to install

#

So like i have a zip and no way to test out if it works

spice wadi
#

i dont really understand the problem

#

you cant install steamodded?

#

or the game is crashing?

#

or its just not loading

gray horizon
#

Rn in having trouble installing steam modder

#

And i have a mod finished to put on github

#

But i cant test it on my pc

#

Thats the only thing

#

So like i jus wanted to ask in chat if somebody who wanted could try it out while i wait for this to actually install here

spice wadi
#

im guessing most people wont be comfortable with that

#

put it on github first

gray horizon
#

Yeah i expected that

spice wadi
#

test it a bit yourself

#

then look for playtesters

gray horizon
#

So it wasnt a problem the testinf just

#

Im anxious man its my first mod i wanna try ittt

slim ferry
#

but like why are you making mods without steamodded installed

gray horizon
#

I wanna see it in game

gray horizon
#

I never modded a game before

#

At first i entered only with my artist experience planning to make art for jokers for free to whoever wanted to, but then they told me about joker forge

#

So i tried workin on my own stuff

#

Im doin anythin from scratch

slim ferry
#

i mean tbf

#

with joker forge

#

nothing can really go wrong at all i feel

spice wadi
#

Less can go wrong

#

Personally I'd advise making more content for your mod

slim ferry
#

most things that go wrong are on joker forge's end though

spice wadi
#

With the amount of mods that exist currently, 1 joker might not be enough for people

gray horizon
spice wadi
#

And always put stuff on GitHub if you want people to test

worthy stirrup
#

Wait I’m in the wrong chat

spice wadi
#

Hi

gray horizon
#

I wanted to make like a 50+ joked pack

#

All jokers that you could build an entire run aroubd

#

Around

worthy stirrup
#

Why did it say it sent twice

spice wadi
#

Nothing sent twice I think

worthy stirrup
#

Damn

#

Now I look crazy

spice wadi
#

You are crazy

#

We're not real

worthy stirrup
#

Thank god

oak meadow
#

why is card.config.center.pools.cat always returning true
if context.selling_card and card.config.center.pools.cat then
x
end

red flower
#

because card is the joker

#

not the card sold

oak meadow
#

how do ig et the card sold

red flower
#

context.card i think

oak meadow
#

yeah thats what i thought
ty

red flower
#

it will crash if you dont check if pools exists

oak meadow
#

you see im trying to do that
and it just always goes through fully

waxen halo
#

speaking of pools what are they? i have that issue

red flower
#

because your joker is probably in the pool

red flower
oak meadow
#

even if i sell smth like scary face which 100% does not have the cat pool

waxen halo
stiff locust
#

how would i activate an effect whenever a specific type of card spawns

red flower
#

spawns anywhere? or in the owned slots?

stiff locust
#

anywhere

#

if it appears in the shop or in a pack or is directly created

#

basically during set_ability

waxen halo
stiff locust
#

but without adding it to the set_ability of every item

red flower
#

hook set_ability?

stiff locust
#

you can do that?

red flower
#

yeah you can hook any function except for like 2 that load before the mod is loaded

stiff locust
#

goddamn

#

how do I hook a function again

waxen halo
#

yaaaaaaaaaaaaaaaaaaaaa

red flower
stiff locust
#

so how would I check data from the card whose set_ability is current being run

red flower
#

self is the card

stiff locust
#

gotcha gotcha

oak meadow
#
                        if context.selling_card and context.card.config.center.pools.cat then
                            catcount = -2
                        end
                    end

why is it not working now
at all
i dont get it

#

(it doesnt set catcount to that amt)

stiff locust
#

you wrote if context.selling_card inside context.selling_card

oak meadow
#

yes

stiff locust
#

why

waxen halo
red flower
waxen halo
oak meadow
#

so it counts the amount of jokers with the cat pool
and i need to do this for some reason for it to work better
it adds that many jokers slots

red flower
waxen halo
oak meadow
#

ew

red flower
#

stop

oak meadow
#

coding with chatgpt

#

just code by hand

waxen halo
red flower
#

start again

waxen halo
gaunt thistle
#

spin around

red flower
#

pull it twist it

waxen halo
gaunt thistle
#

bop it!

cursive gazelle
#

I’m not gonna question why your file name like that

red flower
#

anyway it would be too much of a pain to fix that code

cursive gazelle
#

But using ai is just bad
If you’re lazy use jokerforge

rotund sable
red flower
#

not (pools and next(pools)) is true only if pools doesn't exist

oak meadow
#

ok yeahthats what i thought

#

i inversed it :3

fading pivot
#

I'm having a repeatable bug that causes all hands played to be worth 0 score, what's the best/easiest way for me to get a log or something for you guys?

stiff locust
#

i forgot about that part

red flower
#

card.area and card.area.config.type == 'title' gives you if it is in a menu area

cursive gazelle
#

Btw how can i change the background to a color like when opening a spectral pack

red flower
#

check vremade for examples

oak meadow
#

does cryptlib (when it works again) include Gateway

stiff locust
#

regardless, it doesn't seem to be doing anything

slim ferry
stiff locust
#

the code is running both on cards inside and outside the collection so now I don't know what to do

slim ferry
#

and it doesnt have exotic rarity anyway so what would be the point

oak meadow
#

what does cryptlib have

slim ferry
#

forcetrigger stuff

#

i think value manipulation?

red flower
slim ferry
#

the stuff for the middle layer that exotics have

oak meadow
#

force trigger??? nubby reference??

stiff locust
#

i changed it to self

#

already

red flower
#

hmm weird

stiff locust
#

i added and not (self.area and self.area.config.type == 'title') to the end of the if statement

#

and it seems like it's just being ignored

red flower
#

can you print the statement on its own to see if it's ever true

stiff locust
#

what's the card area called for the collection

#

idk how to print out the info for cards in the collection

sonic cedar
sonic cedar
red flower
stiff locust
#

oh

red flower
#

it's going to print a lot but i want to see if it prints a lot of true when you open the collection

stiff locust
short girder
#

That's a lot of nil

stiff locust
#

yeah

red flower
#

it shouldn't be nil wtf

stiff locust
#

new idea

red flower
#

i feel like that will crash if the area is nil

stiff locust
#

we'll findout

#

oh yeah no it crashed on startup

#

new idea v2

red flower
#

let's see

stiff locust
#

now it's printing nothing

#

so the cards in the collection don't have a card area

#

?

red flower
#

it seems like it

stiff locust
#

that can work

#

i can just check if self.area and that'll make it not happen in collection

red flower
#

to do list does check for it so it's weird

stiff locust
#

strange

#

yeah that worked

#

my consumables have never been happier

royal ridge
#

isn't emplacement and area setting far after set ability

red flower
#

to do list checks for it in set_ability

high sinew
#

How can i for a blind outta curosity subtract chips? im not sure if diff than G.GAME.chips but ik that is for the total chips of blind

oak meadow
#

i think you could do
return {
chips = (negative value)
}

royal ridge
red flower
#

famously?

clear ocean
#

I am going to surprise a friend with something. How do you localise a seal's label and description? misc > labels?

royal ridge
#

exaggeration lol

red flower
#

well im fixing it in vanillaremade then

high sinew
#

oh not a bad call lol

high sinew
oak meadow
#

it makes sense

distant junco
#

yeah you can return negative values to chips and mult!

high sinew
royal ridge
high sinew
#

and just didnt think of using chips = - of my local param🤦‍♂️

distant junco
#

i cant remember if i asked this before but does anyone know if its possible to check if a played card currently has a perma bonus attached to it? if so, how?

royal ridge
red flower
high sinew
high sinew
distant junco
red flower
#

what

high sinew
#

hiker implementation explain too 🙂

midnight coyote
#

can i localize a rank from an ID

high sinew
#

ex for Ace

#

it will need sum thing to check card so use if context.other_card or sum else

red flower
midnight coyote
#

this is the function i made

clear ocean
#
SMODS.Seal {
    key = 'sealSeal',
    badge_colour = HEX('95E9F5')
}
return {
    descriptions = {
        Mod = {
            seal = {
                name = "Seal",
                text = {
                    "A mod about a Seal Seal and a related Joker."
                }
            }
        }
    },
    Other = {
        modSeal_sealSeal_seal = {
            name = "Seal Seal",
            text = {
                "TEST"
            }
        }
    }
}
#

The joke is that it's a seal about the animal

slim ferry
#

missing localization

#

for the label

clear ocean
#

ohh

midnight coyote
#

yeah

red flower
distant junco
#

thanks mills and N

midnight coyote
red flower
#

return the rank too

midnight coyote
#

ill return a table

red flower
#

you can return id, rank

midnight coyote
#

i think i need to rewrite my func a bit

#

because my goal is to get the most played rank in deck

#

so im iterating over playing cards and making a table of {RANK, TIMES_PLAYED}

proven belfry
#

hey so uhh I'm trying to make Kronos (a consumable) create an Unfair Scaling joker but the SMODS.Joker center didn't inject into G.P_CENTERS so I had to inject it directly. Now, when I use Kronos, it makes a joker with the texture of a random vanilla joker with no name, description, or rarity, and cannot be sold.