#💻・modding-dev

1 messages · Page 695 of 1

wanton jolt
fading rivet
#

what feli said
tl;dr (i'm assuming) is that it iterates through G.playing_cards and checks if card.ability.played_this_ante is true

wanton jolt
#

it would be card.ability.played_this_ante yes

gusty compass
#

i am, thing is i need to get the list of cards so i can find the most used rank, which i apparently cant figure out

slim ferry
#

this reminds me of when i saw someone have print = "Hello World!" at the top of their file

slim ferry
#

no

gusty compass
#

lua coders are awesome

glass scaffold
wanton jolt
slim ferry
#

god damnit

fading rivet
outer meteor
#

Uh I don't mean to interrupt but it's still not working :(

glass scaffold
glass scaffold
outer meteor
#

It's the same crash DX

fading rivet
#
bugs = no
quality = high
lag = none
controls = wasd
game = good
wanton jolt
#

the game or your joker

glass scaffold
#

Copy-paste the code and drop it in here, let me check it in my VSCode.

outer meteor
#

My code is still yellow btw

fading rivet
glass scaffold
outer meteor
fading rivet
#

I"ll debug it and show you all the issues

fading rivet
glass scaffold
#

...no, select all the code, copy and paste it here.

outer meteor
#

SMODS.Joker {
key = 'tennatiejoker',
atlas = 'xtrautdrjokerimgs',
pos = (
x = 0,
y = 0
),
config = {
extra = {
chips = 200
}
},
rarity = 2,
cost = 8,
loc_vars = function(self, info_queue, card)
return {
vars = {
card.ability.extra.chips
}
}
end,
calculate = function(self, card, context)
if context.joker_main then
return {
chips = card.ability.extra.chips
}
end
}

#

Like that?

fading rivet
#

yeah

#

brb with commented code

wanton jolt
#
SMODS.Joker {
    key = 'tennatiejoker',
    atlas = 'xtrautdrjokerimgs',
    pos = {
        x = 0,
        y = 0
    },
    config = {
        extra = {
            chips = 200
        },
    },

    rarity = 2,
    cost = 8,
    loc_vars = function(self, info_queue, card)
        return {
            vars = {
                card.ability.extra.chips
            }
        }
    end,
    calculate = function(self, card, context)
        if context.joker_main then
            return {
                chips = card.ability.extra.chips
            }
        end
    end,
}
slim ferry
#

missed comma after y = 0

#

thats the issue

#

wait no

#

nvm

#

im stupid

#

wrong brackets

#

ye

wanton jolt
#

they forget to close their doors after opening them

outer meteor
#

Wait this will work?

wanton jolt
#

yeah most of your issues were syntax issues

#

i suggest you pick up basic lua tutorials

fading rivet
#
SMODS.Joker {
    key = 'tennatiejoker',
    atlas = 'xtrautdrjokerimgs',
    pos = {
        x = 0,
        y = 0
    }, -- you used parenthesis () instead of braces {}
    config = {
        extra = {
            chips = 200
        }
    }, -- try to keep indents consistant, makes reading and debugging easier
    rarity = 2,
    cost = 8,
    loc_vars = function(self, info_queue, card)
        return {
            vars = {
                card.ability.extra.chips
            }
        }
    end, -- this is good, nice work
    calculate = function(self, card, context)
        if context.joker_main then
            return {
                chips = card.ability.extra.chips
            }
        end
    end -- you forgot to close this function
}
#

here you go

frosty dock
outer meteor
#

One sec

glass scaffold
fading rivet
#

try to keep indents I say and then discord fricks them up

slim ferry
fading rivet
#

thank you discord

slim ferry
#

closing brackets not on the same indentation as opening bracket

outer meteor
#

I don't think it was the Joker

slim ferry
#

smh smh

outer meteor
#

I'm still getting the exact same crash thing

slim ferry
#

well yeah the issue was coming from your main file wasnt it

fading rivet
#

they arein vs code 😭

fleet geyser
#

I think yellow is non standard formatting (code should still work)
red are syntax errors (won't work)

frosty dock
wanton jolt
#

yellow is syntax fail

slim ferry
#

no

#

yellow is warning

#

red is syntax fail

wanton jolt
#

wait yeah

slim ferry
#

yellow usually doesnt mean much

wanton jolt
#

it warns because its not used i think

frosty dock
#

there it is

fading rivet
slim ferry
#

no unused locals and stuff just become like greyed out

outer meteor
#

I don't think it was the Joker causing the crash

#

Cause I'm getting the same crash still

slim ferry
#

yea

#

the log said its your main file

outer meteor
#

I copied it directly :(

#

--#region Atlases

SMODS.Atlas {
key = 'xtrautdrjokerimgs',
path = 'Tenna Tie Jimbo.png',
px = 71,
py = 95
}

--#endregion

--#region File Loading

local jokers_src = SMODS.NFS.getDirectoryItems{SMODS.current_mod.path .. "src/jokers"}
for _, file in ipairs{jokers_src} do
assert(SMODS.load_file("src/jokers" .. file))()
end

--#endregion

#

It was working before

fading rivet
#

for , file in ipairs{jokers_src} do

#

it should be
for _ , file in ipairs(jokers_src) do

wanton jolt
outer meteor
#

It is it just didn't show up :0

slim ferry
#

formatting killed it

wanton jolt
#

discord just formatted the text as italics

#

lol

outer meteor
#

Yeah :(

slim ferry
#

use triple backticks to make code block

outer meteor
#

triple whats???

wanton jolt
#

put your code between a set for 3 backticks ```

slim ferry
#
these things
#

`

wanton jolt
#

`

slim ferry
#

if you do ```lua you get lua code

fading rivet
slim ferry
#

what

#

?

outer meteor
#

SMODS.Atlas {
    key = 'xtrautdrjokerimgs',
    path = 'Tenna Tie Jimbo.png',
    px = 71,
    py = 95
}

--#endregion

--#region File Loading

local jokers_src = SMODS.NFS.getDirectoryItems{SMODS.current_mod.path .. "src/jokers"}
for _, file in ipairs{jokers_src} do
    assert(SMODS.load_file("src/jokers" .. file))()
end

--#endregion ```
fading rivet
#

they did ipairs{}

slim ferry
#

the underscore just didnt show up

outer meteor
#

There

fading rivet
#

instead of ipairs()

slim ferry
#

thats all theyre saying

fading rivet
#

for _, file in ipairs{jokers_src} do -> for _, file in ipairs(jokers_src) do

outer meteor
#

That's the same thing...

fading rivet
#

no its not

outer meteor
#

OH THE BRACKETS

fading rivet
#

yeah

#

{} and () can both be functions calls

slim ferry
#

but they mean something different...

fading rivet
#

{a, b, c} is the same as ({a, b, c})

slim ferry
#

🤯

outer meteor
#

It still....

#

It's not...

#

I'm so tired

fading rivet
#

whats the crash now

outer meteor
#

The same

fading rivet
#

can you send it again i forgor

outer meteor
#

Ignore the mods

fading rivet
#

oh

#

you did the same thing as ipairs as NFS

#

do
local jokers_src = SMODS.NFS.getDirectoryItems(SMODS.current_mod.path .. "src/jokers")

outer meteor
#

What...?

fading rivet
#

you used braces again

outer meteor
#

Oh THOSE should be parentheses?

fading rivet
#

every function call should be parentheses

outer meteor
#

Still not working

fading rivet
#

unless its only recieving 1 argument, and that argument is a table

#

send code again

#

and is crash the same

outer meteor
#

SMODS.Atlas {
    key = 'xtrautdrjokerimgs',
    path = 'Tenna Tie Jimbo.png',
    px = 71,
    py = 95
}

--#endregion

--#region File Loading

local jokers_src = SMODS.NFS.getDirectoryItems(SMODS.current_mod.path .. "src/jokers")
for _, file in ipairs{jokers_src} do
    assert(SMODS.load_file{"src/jokers" .. file})()
end

--#endregion ```
fading rivet
#

you didn't fix ipairs

#

and your doing the same issue with load_file

outer meteor
#

Huuhh......?

#

What....

fading rivet
#
 --#region Atlases

SMODS.Atlas {
    key = 'xtrautdrjokerimgs',
    path = 'Tenna Tie Jimbo.png',
    px = 71,
    py = 95
}

--#endregion

--#region File Loading

local jokers_src = SMODS.NFS.getDirectoryItems(SMODS.current_mod.path .. "src/jokers")
for _, file in ipairs(jokers_src) do
    assert(SMODS.load_file("src/jokers" .. file))()
end

--#endregion 
outer meteor
#

Is that what it should be?

fading rivet
#

yes

outer meteor
fading rivet
#

whats the crash

outer meteor
#

Same

wanton jolt
#

ok take this

--#region Atlases

SMODS.Atlas {
    key = 'xtrautdrjokerimgs',
    path = 'Tenna Tie Jimbo.png',
    px = 71,
    py = 95
}

--#endregion

--#region File Loading

local jokers_src = SMODS.NFS.getDirectoryItems(SMODS.current_mod.path .. "src/jokers")
for _, file in ipairs(jokers_src) do
    assert(SMODS.load_file("src/jokers/" .. file))()
end

--#endregion
tawny mica
outer meteor
#

I'm not using placeholders

wanton jolt
#

here i fixed it i just took the code from the repo

#

lol

outer meteor
#

Same crash

wanton jolt
#

wdym nope this is literally the code

tawny mica
#

send crash

outer meteor
#

It's the same crash

tawny mica
#

send it

wanton jolt
#

send it

outer meteor
tawny mica
#

send code

#

actually send your whole file path

wanton jolt
#

send your entire folder

tawny mica
#

a screenshot

outer meteor
#

What

#

I don't think I can

tawny mica
#

???

wanton jolt
#

ok

fading rivet
#

you did earlier

#

what

#

did you have a 5 minute powerup for screenshots

outer meteor
#

You want all my code in one screenshot?

fading rivet
#

no, specificly the main file

#

and also your file system

outer meteor
tawny mica
#

send like this

fading rivet
#

like this

tawny mica
outer meteor
#

Like this?

wanton jolt
#

your 2x folder must not be in the 1x folder

tawny mica
tawny mica
wanton jolt
#

they should be separate

#

first of all

tawny mica
#

and have upscaled assets in the 2x

wanton jolt
#

drag the 2x folder on the "assets" text so you have both folders on the same level

fading rivet
#

guys is this helpful

outer meteor
#

I have a splitting headache

tawny mica
#

well if you followed the tutorial you wouldn't have one

outer meteor
#

I tried

#

Believe me I tried

wanton jolt
#

if you look at the tutorial tree you would see how the folders are disposed

outer meteor
#

That's how I have them set up

wanton jolt
#

no

fading rivet
#

no

#

no its not

#

your 2x is in your 1x

wanton jolt
#

no its not

outer meteor
#

I moved it

fading rivet
#

okay

#

does it still crash

wanton jolt
#

good

outer meteor
#

Yes :(

wanton jolt
#

can i see the metadata.json

tawny mica
#

send screenshot of file path like you did earlier

outer meteor
wanton jolt
#

can i see whats inside the metadata.json

outer meteor
fading rivet
#

could you send the full crash log

#

like ctrl+c and paste it

outer meteor
#

No that would have my file names in it

wanton jolt
#

like your dox

#

right

fading rivet
wanton jolt
#

yeah

outer meteor
#

The what?

wanton jolt
#

the thing under the crash

#

the thing you cut out from your screenshots

#

under that

fading rivet
#

the list of functions called so we can see what your providing

wanton jolt
#

that traces where the error is coming from

outer meteor
#

It looks like the traceback also has my file names tho

fading rivet
#

cut them out

#

but also those files names are important

#

and would help us figure out

tawny mica
#

use the snipping tool and just draw over them

wanton jolt
#

dont

fading rivet
#

no snipping tool

wanton jolt
#

no snipping tool

tawny mica
#

oh copy paste

fading rivet
#

i would like to be able to copy paste the code

wanton jolt
#

refractz

#

refrain

#

fro m speaking

tawny mica
#

no

wanton jolt
#

👿

wanton jolt
#

literally me

tawny mica
#

refrain

fading rivet
#

death

outer meteor
#

I'm tired chat

#

Lowkey wanna go sleep

fading rivet
#

you didn't save the file

wanton jolt
#

did you save

outer meteor
#

Oh my fucking god

#

Oh my fucking god I'm so stupi

fading rivet
#

i think we all are cause none of us thought of that 😭

outer meteor
#

Is the Joker supposed to show up in Collection?

fading rivet
#

have you unlocked it

#

or discovered it

slim ferry
#

it supposed to show in the collection yes

outer meteor
#

It's not there...

slim ferry
#

regardless there should be another joker in the collection at the end

#

is your mod loaded

fading rivet
#

are there 151 jokers

outer meteor
#

Yeah

slim ferry
#

actually nvm it definitely is but

fading rivet
#

and the 151st is a undisocvered sprite

outer meteor
#

There are only 150

slim ferry
#

the joker file is probably not loading

fading rivet
#

okay what

slim ferry
#

idk why

fading rivet
#

😭

#

uh

#

put a print statement in the joker's file

brittle yacht
#
        if context.setting_blind and not context.blueprint then
            local my_pos = nil
            for i = 1, #G.jokers.cards do
                if G.jokers.cards[i] == card then
                    my_pos = i
                    break
                end
            end
            if my_pos and G.jokers.cards[my_pos - 1] and not G.jokers.cards[my_pos - 1].getting_sliced then
                local sliced_card = G.jokers.cards[my_pos - 1]
                sliced_card.getting_sliced = true
                G.GAME.joker_buffer = G.GAME.joker_buffer - 1
                G.E_MANAGER:add_event(Event({
                    func = function()
                        G.jokers:shuffle()
                        sliced_card:start_dissolve({ HEX("57ecab") }, nil, 1.6)
                        play_sound('slice1', 0.96 + math.random() * 0.08)
                        play_sound('sink_birdcaw')
                        return {
                            message = 'fuck you',
                            colour = G.C.RED,
                        }
                    end
                }))
            end
        end
    end```
this doesnt send the message and only works twice for some reason?
fading rivet
#

do not do print = "hello world" feli

wanton jolt
#

print("hello world")

tawny mica
#

or do

#

print("it worked")

fading rivet
#

and have the event return true

brittle yacht
#

oh yeah

tawny mica
#

oh yeah

wanton jolt
#

oh yeah yeah

fading rivet
#

wait you want this happening at the saem time

slim ferry
#

you are also not resetting the joker buffer in the event

fading rivet
#

creationa nd message?

brittle yacht
#

i forgot 😭

outer meteor
#

What do I do chat

brittle yacht
#

good question

fading rivet
tawny mica
outer meteor
#

I'm out of stamina for this I just need this Joker to work DX

brittle yacht
#

what is

wanton jolt
fading rivet
#

yeah

outer meteor
#
    key = 'tennatiejoker',
    atlas = 'xtrautdrjokerimgs',
    pos = {
        x = 0,
        y = 0
    },
    config = {
        extra = {
            chips = 200
        },
    },

    rarity = 2,
    cost = 8,
    loc_vars = function(self, info_queue, card)
        return {
            vars = {
                card.ability.extra.chips
            }
        }
    end,
    calculate = function(self, card, context)
        if context.joker_main then
            return {
                chips = card.ability.extra.chips
            }
        end
    end,
} ```
wanton jolt
#

did you save your joker file

outer meteor
#

Yes

#

I did

#

I saved it after I forgot to the first time

fading rivet
#

okay uh

#

send your main file code again

#

i wanna add somethig into it

outer meteor
#

SMODS.Atlas {
    key = 'xtrautdrjokerimgs',
    path = 'Tenna Tie Jimbo.png',
    px = 71,
    py = 95
}

--#endregion

--#region File Loading

local jokers_src = SMODS.NFS.getDirectoryItems(SMODS.current_mod.path .. "src/jokers")
for _, file in ipairs(jokers_src) do
    assert(SMODS.load_file("src/jokers/" .. file))()
end

--#endregion ```
fading rivet
#
 --#region Atlases

SMODS.Atlas {
    key = 'xtrautdrjokerimgs',
    path = 'Tenna Tie Jimbo.png',
    px = 71,
    py = 95
}

--#endregion

--#region File Loading

local jokers_src = SMODS.NFS.getDirectoryItems(SMODS.current_mod.path .. "src/jokers")
for _, file in ipairs(jokers_src) do
    print("src/jokers/"..file)
    assert(SMODS.load_file("src/jokers/" .. file))()
end

--#endregion 
#

change it to this

#

tell me what the print output is

#

your gonna need to look in the lovely terminal for something like this

brittle yacht
#

now he works, he just doesnt work in the leftmost slot? (like he doesnt shuffle or destroy) [or anything from the event]

        if context.setting_blind and not context.blueprint then
            local my_pos = nil
            for i = 1, #G.jokers.cards do
                if G.jokers.cards[i] == card then
                    my_pos = i
                    break
                end
            end
            if my_pos and G.jokers.cards[my_pos - 1] and not G.jokers.cards[my_pos - 1].getting_sliced then
                local sliced_card = G.jokers.cards[my_pos - 1]
                sliced_card.getting_sliced = true
                G.GAME.joker_buffer = G.GAME.joker_buffer - 1
                G.E_MANAGER:add_event(Event({
                    func = function()
                        G.jokers:shuffle()
                        G.GAME.joker_buffer = 0
                        sliced_card:start_dissolve({ HEX("57ecab") }, nil, 1.6)
                        play_sound('slice1', 0.96 + math.random() * 0.08)
                        play_sound('sink_birdcaw')
                        return true
                    end
                }))
                return {
                    message = 'fuck you',
                    colour = G.C.RED,
                    no_juice = true
                }
            end
        end
    end```
fading rivet
wanton jolt
brittle yacht
#

ohhh

#

hm

fading rivet
#

lua is 1-indexed

brittle yacht
#

how would i go about fixing that

wanton jolt
#

and you're executing it if there is a joker to its left

fading rivet
#

what should it do if its in the leftmost slot

brittle yacht
wanton jolt
#

cut the joker to its left?

brittle yacht
#

shuffle all jokers and destroy the one to the left

fading rivet
outer meteor
wanton jolt
#

wait i know

brittle yacht
wanton jolt
#

@brittle yacht shuffle your jokers first then do the check

outer meteor
#

Wait I think I got it

fading rivet
outer meteor
#

They have a G instead of a heart is that what I wanted?

fading rivet
#

what???

tawny mica
#

???

fading rivet
#

oh

#

yeah

brittle yacht
#

???????

wanton jolt
#

like move G.jokers:shuffle() before your if my_pos check

brittle yacht
#

testing now

#

w PFP btw @wanton jolt

#

oop

#

we got an issue

brittle yacht
#

he destroyed both of the 2 jokers i had instead of just one

wanton jolt
#

because what you had there was

Checking if there was a card to my (the joker) left
If true, then shuffle the jokers, then cut the card that was to my left before shuffling

brittle yacht
wanton jolt
#

oh wait this is stupid

brittle yacht
#

there was a random delay(0.15) before the slice

wanton jolt
#

shuffle first then set my_pos

#

so you actually cut the card on its left

brittle yacht
#

thats what im doing lol

outer meteor
#

I'm pink now. That is my attack.

brittle yacht
#

gulp

wanton jolt
#

or specifying

#

since it was very vague

fading rivet
#

@outer meteor can you send the image pls

outer meteor
#

Of the Lovely thing?

fading rivet
#

what was the output of your print statements

outer meteor
#

This is what I want right?

fading rivet
#

before that

#

between injected and patches

outer meteor
#

Oh.

#

Nothing there.

fading rivet
#

did you save the main file

tawny mica
outer meteor
#

Now it's tehre

fading rivet
#

lmao

brittle yacht
#

sticker fail

#

lol

wanton jolt
#

sticker fail

tawny mica
#

😭

#

\

fading rivet
outer meteor
wanton jolt
#

sticker win

tawny mica
fading rivet
#

uh

#

put a print statement into tennatie.lua

#

tell me what it prints

outer meteor
#

Like, just anywhere?

fading rivet
outer meteor
#

It just crashed

#

Not like showed a crash screen

fading rivet
#

send code

outer meteor
#

It just closed

tawny mica
#

send code

fading rivet
#

send code

wanton jolt
#

envoie code

fading rivet
#

envoie

outer meteor
#
SMODS.Joker {
    key = 'tennatiejoker',
    atlas = 'xtrautdrjokerimgs',
    pos = {
        x = 0,
        y = 0
    },
    config = {
        extra = {
            chips = 200
        },
    },

    rarity = 2,
    cost = 8,
    loc_vars = function(self, info_queue, card)
        return {
            vars = {
                card.ability.extra.chips
            }
        }
    end,
    calculate = function(self, card, context)
        if context.joker_main then
            return {
                chips = card.ability.extra.chips
            }
        end
    end,
} ```
wanton jolt
#

fzgjk,vezklpogefzj,gez

tawny mica
#

😭

fading rivet
#

@slim ferry

tawny mica
#

im gonna end it

wanton jolt
#

print equals the sequels

wanton jolt
outer meteor
#

Do you not like my creativity? :3

fading rivet
#

do print("does something") omg

slim ferry
wanton jolt
tawny mica
outer meteor
#

It just closed again

tawny mica
#

send code

fading rivet
#

send code again

tawny mica
#

also did you save

outer meteor
#

Like, instantly

#

I DID SAVE THIS TIME 😭

tawny mica
#

send code

fading rivet
#

send code

outer meteor
#

I'M NOT DOING THAT AGAIN I SWEAR

fading rivet
#

cend kode

tawny mica
#

Code senden

outer meteor
#
SMODS.Joker {
    key = 'tennatiejoker',
    atlas = 'xtrautdrjokerimgs',
    pos = {
        x = 0,
        y = 0
    },
    config = {
        extra = {
            chips = 200
        },
    },

    rarity = 2,
    cost = 8,
    loc_vars = function(self, info_queue, card)
        return {
            vars = {
                card.ability.extra.chips
            }
        }
    end,
    calculate = function(self, card, context)
        if context.joker_main then
            return {
                chips = card.ability.extra.chips
            }
        end
    end,
} ```
fading rivet
#

OMG

tawny mica
#

son

fading rivet
#

STOP DOING PRINT =

tawny mica
#

im crine

fading rivet
#

print("I'm a transfem lesbian furry. I have ADHD and autism, touch me and I will cry.")

#

do that

wanton jolt
outer meteor
#

😔

wanton jolt
#

person

tawny mica
#

companion

wanton jolt
#

comrade

tawny mica
fading rivet
#

death

#

burn at the stake

wanton jolt
outer meteor
fading rivet
#

hmmm

frosty rampart
#

ok, so the file is loading properly, and it should be adding the joker

fading rivet
#

yeah

outer meteor
#

WAIT THERE IT IS

tawny mica
#

go to mods

#

oh

outer meteor
#

IT'S IN COLLECTION NOW

fading rivet
#

now take a break

wanton jolt
#

what if the issue was because you forgot to save the file and i was right

tawny mica
#

🍤

outer meteor
#

Yatta!!!!!

fading rivet
#

i think you've had enough lmao

wanton jolt
tawny mica
outer meteor
#

I just had my protein and caffeine I can keep going :3

fading rivet
#

where did my reply go

#

thank you discord

wanton jolt
#

@tawny mica

tawny mica
wanton jolt
# tawny mica

kolego, to szaleństwo, jak łatwo jest korzystać z ezInstaller™ dla Windows

tawny mica
solemn wharf
#

hi i got a joker that gains +5 mult when score catches on fire, but for some reason when this happens it just starts upgrading like crazy and a lot of times so why is that

slim ferry
#

because there isnt a context check

#

it just gains mult at every single calculation if the current hand score is greater than blind size as it is

solemn wharf
#

aaa okay

#

right so which context should i use?

#

context.scoring_hand?

slim ferry
#

i forget which one since there isnt really something after all scoring but before score is added

#

context.final_scoring_step is the same place where plasma triggers but that means the joker will check before plasma balances chips and mult

#

though theres a good chance youll need to patch in a context in between before and final_scoring_step to properly achieve the effect

solemn wharf
#

context. final_scoring_step worked just fine

#

tysm!

weak grove
#

How do i make a deck that divides blind size?

#

Formula:

#

blind size/(2^(ante-1))

true jasper
viscid talon
#

how do you add custom colors again i forgot

#

theres an smods page but idk where it Is

#

im a bit dummb

wanton jolt
#

either as a joker's variable

#

or through loc colours

viscid talon
#

im trying to add custom colors for my new stakes

fading rivet
weak grove
#

Is this right?

fading rivet
#

please don't do that

#

please use SMODS.Back

weak grove
slim ferry
#

youre looking at cryptid as reference arent you

#

dont do that

slim ferry
#

because cryptid code does a bunch of shit outside for its loading

#

also its just old

#

and this local whatever = { ... } is something it does a lot for loading

weak grove
fading rivet
#
SMODS.Back{
  name = ,
  key = ,
  order = ,
  config = ,
  etc.
}
slim ferry
weak grove
#

?

slim ferry
#

youre probably better off changing the blind size with calculate for this

#

since this is dynamic unlike plasma

hearty crane
#

at what speed ingame ost stored in the files?

glass scaffold
#

Please, someone help me fix this error.

#

Not even the Balatro CLAMS server has any record of it.

red flower
#

code?

#

im guessing a missing :

glass scaffold
#

I can't even paste the hooked function cause it exceeds 2000 chars

red flower
#

can you post just the first 5 lines

glass scaffold
red flower
#

missing self

glass scaffold
red flower
#

that's what the log is complaining about at least

glass scaffold
#

attempt to call field 'oldcontrollerkeypressupdate' (a nil value)

#

Now we have that one

red flower
#

not self.

#

it should be (self, the rest of the arguments)

#

like (self, key, dt)

glass scaffold
#

On ALL of them or just that? (The others only take x, y for args)

red flower
#

if the original function had a : then the first argument is self

#

then the rest of the arguments for that function

glass scaffold
#

So all of them. Got it

#

Ok, so EVEN weirder crash:

This, but the menu music was playing somehow.

#

Wait, nvm, didn't correctly update it

#

IT LET ME IN

#

Oh. Now it's doubling inputs.

#

But I got DebugPlus and TMJ compat back, so that's a step in the right direction.

#

So THAT may be caused by some bad checks like this.

#

Cause in the blind, ANY action opens TMJ

#

Yep, still getting double input and the settings tab opening at launch.

timid zinc
#

is there a way to calculate the xmult a card would give IF it was scored, without it actually scoring

glass scaffold
daring fern
timid zinc
daring fern
#

Also eval_card doesn't trigger jokers.

timid zinc
#

Alright, got it

glass scaffold
#

I can't deselect on the blind or it crashes.

#

But the function IS there.

tepid crow
# glass scaffold ?????

oldcontrollerrcursorpress and oldcontrollerqueuercursorpress are different things, don't know if that's intentional

tepid crow
#

Sometimes you just need someone to look at it with you. I spent like 20 minutes with a similar issue in latex recently lmao

glass scaffold
#

I've now fixed:

Deselect crash
Double inputs

knotty wren
#

what is the pool key for the shop

#

for planets

fading rivet
#

how could I change the height of a UI Element inside its button func

#

i tried chanigng config.maxh but its not doing anything

daring fern
knotty wren
#

i'll try that

#

wait how do I add it to this qwq

daring fern
knotty wren
#

shit I was close

#

thankss

red flower
knotty wren
#

right high priestess exists (ᵕ ´ ∇ ˋ ˶)

#

I was think what else spawns planet cards

#

no I do not want that

red flower
#

then just return false lol

#

that will stop any random spawn

#

if you later want to make your own random spawn you can do return args and args.source == "your key_append"

knotty wren
#

that makes sense

noble rapids
#

is there a way to trigger something only on cards held in hand that themselves trigger a held in hand effect? like a way to check for held in hand effect triggering cards only?

knotty wren
#

thaatsss definitely not right

#

that's better, but why the error?

#

is it a label thing

#

I think it is

#

it appears it's not

red flower
knotty wren
#

oh the latter

gilded sky
knotty wren
#

it's still not working bwehhh

daring fern
knotty wren
#

yeup

daring fern
knotty wren
#

and I compared it to other mods, idk what I'm doing wrong

verbal agate
#

heyy, so i have an edition that has a 1 in 2 chance to debuff a card, and it does it, but the debuff is applied instantly rather than after the card has its effects, but the card still scores for that play, is there a way to maybe apply the debuff after all the scoring animations? ive tried like a bunch of contexts lol

verbal agate
#

oh fr

#

why the hell didnt i think of that

#

myb if that was a stupid question lol

knotty wren
gilded blaze
#

mar_sealed_pack is enough

#

wait nvm

#

I'm not sure what's wrong there

#

try removing k_ from both

#

mine doesn't use it

knotty wren
#

let me see

#

hmm nope

dapper sun
knotty wren
gilded blaze
knotty wren
#

yeah I don't see anything, different??

#

what is no_collection

red flower
#

like in general

knotty wren
#

no I have more and those things work

red flower
#

uhh and is the misc table in the correct place

knotty wren
#

I double checked both localization files to see where to put it and I swear I had it in the correct place

#

it's on the same level as descriptions right?

#

like, on the same vertical line

gilded blaze
#

weird

red flower
#

do you have a loc_txt

knotty wren
gilded blaze
knotty wren
#

I probably wouldn't have noticed that for a while if it wasn't for what you said bweehh

#

YESSSSS

#

I was looking at the localization within vanilla balatro I couldn't figure out whyyy

#

whenever I make an error like this I feel like this image

red flower
#

kendrick first lua coder

wary ibex
knotty wren
#

it appears less so yeah you would tuna

#

lmao they got him

versed swan
verbal agate
#

so quick question, is there any way to get like all the text on screen and/or change it?

versed swan
#

Might be worth looking into G.I.UIBOX

verbal agate
#

type, def might take a look, had a funny idea for a deck lol

fading rivet
#

i mean yeah but it'll be difiicult and annoying

#

changing it is a different question though

#

UI not made to change really doesn't like changing

hushed stump
#

Instead of just doing

normal crest
#

That looks like c#

hushed stump
#

for (int i = 0; i < values.length; i++)

normal crest
hushed stump
cursive sentinel
#

question, did context.hand_space changed name?

red flower
cursive sentinel
#

thank you very much ❤️

red flower
#

it's used by the serpent in vanillaremade if you need an example

cursive sentinel
#

oh i'll look at it

whole lava
#

can i change the sprite of the enhancement if you have a variable track for it?

cursive sentinel
#

I have a small issue. I try to make it that the player draws 5 additional card (meaning that if he should have drawn 4 cards to have a full hand, he'll isntead draw 9). Now, when i have two of this joker, and get to 18/8 cards, playing 5 card will only draw 5 instead of 10. I think it's because they both overwrite the cards_to_draw. Any idea on how to dodge this?

if context.drawing_cards then
    return{
        cards_to_draw = context.amount + card.ability.extra.draw
    }
end
#

previous method was (in the if)

for i=1, card.ability.extra.draw do
    draw_card(G.deck,G.hand, i*100/(card.ability.extra.draw), 'up', true)
end
mystic river
#

if you have 18/8 cards, playing five will put you at 13/8, and the number of cards to draw will be 0

#

adding five to that gets five

cursive sentinel
#

but it should add 10 if i have two of this joker

#

not 5

mystic river
cursive sentinel
#

i think the issue is the redefining of cards to draw in return

#

since both do it

#

one overwrite the other

mystic river
#

add a print(context.amount) and see what happens?

cursive sentinel
cursive sentinel
mystic river
cursive sentinel
#

so it's not overwrite

#

anyway i think i'll stick to the for method as it seems to work

mystic river
#

oh it starts at negative if you're over your capacity

cursive sentinel
#

seems so

mystic river
#

that seems
unintuitive

#

maybe a smods bug?

#

or oversight

cursive sentinel
#

not sure, i think it's smth i could overcome by checking context.amount value

#

and making the sum with zero instead of context.amount if the latter is below zero

#

but i prefer to keep it simple, anyway thank you a lot for your time !

whole lava
#

can i change the sprite of the enhancement if you have a variable track for it?

red flower
#

you can math.max(context.amount, 0) in the meantime

red flower
heavy elm
#

is there a context for when a hand is drawn in a pack? (like arcana or spectral packs)

red flower
#

context.other_drawn iirc

heavy elm
outer meteor
#

Hey guuyyysss

#

What's uuuuppp

#

It's meeeee

#

So

#

Haha

#

Having issues AGAIN.

#

So, I'm tryna add a description to my Joker

#

But it just

#

Ain't

#

As you can see by this image

#

It lacks a description

#

But by my code

#

It SHOULD be working I think

#

It did print chicken sandwich

frosty dock
#

missing j_

outer meteor
#

Aaayyyyy

#

You're a real one

#

Thank you :D

frosty dock
#

np

cloud wraith
#

Yall know how can I make custom editions my artist needs help 😭😭

red flower
cloud wraith
red flower
narrow prawn
#

how can i add another of whatever these are to a joker?

lyric wadi
#

is this like a different notation than just defining it in loc_txt or

slim ferry
#

yes

#

localization files return a loc table

faint yacht
knotty wren
#

is there a way to make it so that when you first load the mod on a save file, it determines the next joker you get on a shop? like a mini tutorial?

mystic river
#

check the vanilla code for how it does the tutorial, skipping over the parts you don't need

red flower
knotty wren
#

is there a better way to rearrange the jokers on the collection or do I just, switch the code around on the lua file xd

gusty mountain
#

hello can someone tell me how to start modding balatro?

frosty dock
frosty dock
verbal agate
#

hey, is there a way to get the key of boosters in the shop? everything im trying is turning up nil lol

frosty dock
#

no s, whoops

verbal agate
#

oh perfect, thats like exactly what i was looking for, tysm!!

noble rapids
#

why is my joker bent? is it because its long?

noble rapids
#

is there a way to make the buy button render above the bottom shop background?

knotty wren
#

how do I relock a card in the collection

#

with debuygplush

daring fern
knotty wren
#

thankgyu

fading rivet
fading rivet
#

idr what the exact units are there

noble rapids
fading rivet
#

check vremade photgraphi

noble rapids
#

ohhh, thats makes sense

noble rapids
knotty wren
#

does smods adds attributes to the vanilla jokers already? because this kinds doesn't work

daring fern
knotty wren
#

1.0.0~BETA-1224a

#

oh wait do I not have latest?

#

shiet

maiden phoenix
#

That one's from december 2025 lol

knotty wren
#

vortex mod manager you have failed me for the last time

#

idk what happened, I changed nothingggg

sturdy compass
knotty wren
#

smods is just not updated on nexus, all other mods I got from there are updated and work fine qwq

maiden phoenix
#

People aren't usually fond of nexus mods

knotty wren
#

why not?

#

it works fine in every other game, and when I uploaded my first 2 mods there I got like 3k downloads each

#

getting donation points

maiden phoenix
#

Depends of the game

knotty wren
#

and the mod manager received support for balatro so you can download stuff directly from the browser to the mods folder qwq

wanton jolt
#

nexus mods is not recommended because almost no one uploads to nexus outside of some texture packs

knotty wren
#

damn

maiden phoenix
#

We're too used to the thread into github system lol

knotty wren
#

we need to modernize ts

maiden phoenix
#

There are mod manager in the work

#

Like imm or photon 2

wanton jolt
#

yeah and atm i have an installer for smods + lovely that can also work like an updater

maiden phoenix
#

That's not really a mod manager lol

wanton jolt
#

yeah but atleast smods is up to date :)

knotty wren
#

oh bmm DOES have a mod browser

#

where does it get it from?

wanton jolt
#

the balatro mod index, which imm also uses with the perk of not lagging your game out and not being built with ai

silent sail
#

how would one make a booster pack for a consumable that doesnt have a use function

wanton jolt
knotty wren
wanton jolt
#

if you dont want the use button to appear you would have to overwrite it

silent sail
#

yeah but like i cant select it

wanton jolt
#

you have to set select_card = consumables (if you want to save it to the consumables area)

silent sail
#

yeah i forgot that part it turns out i thknk

#

we all good now

elder wind
#

gng whats tje most useful mod

maiden phoenix
#

Uuh since you're asking in dev i'm gonna asume it's for making mod it would be DebugPlus

elder wind
maiden phoenix
#

Art wise? I use Asprite but there are prob good enough free ones out there

glass scaffold
#

krita.

maiden phoenix
#

Free if you know how to build it otherwise it's ~17€

glass scaffold
#

Krita is open-source and free. I've used it from the jump.

maiden phoenix
#

0€

fading rivet
elder wind
fading rivet
maiden phoenix
#

You can install Aseprite yourself but I don't know much more than that

elder wind
elder wind
knotty wren
#

gimp is very good :3

elder wind
knotty wren
#

how was it to return a custom message when scoring instead of the common like +10 chips or x3 mult

obtuse geode
junior tapir
#

I have a problem with a joker parameter not remembering its state, I have put comments in the code for info what is working and what is not

loc_txt = {
        name = 'Astro Stocks',
        text = {
            '{C:attention}+1{} Shop Slot if Shop',
            'contains a {C:planet}Planet{} card',
        }
    },
    config = {
        shop_slots = 0,
    },
    remove_from_deck = function(self, card, from_debuff)
        change_shop_size(-card.ability.shop_slots) 
        -- essentially when sold removes 0 or 1 slots, depending on whether you've seen a planet this shop or not
    end,
    calculate = function(self, card, context)
        if context.before_reroll or context.ending_shop then
            -- Reset slots before reroll (added new context) so I don't remove already generated cards by the shop
            if card.ability.shop_slots > 0 then 
                -- this 'if' never occurs (essentially shop_slots == 0), but I don't change the param anywhere else; why? idk
                change_shop_size(-card.ability.shop_slots)
                card.ability.shop_slots = 0
            end
            --change_shop_size(-1) -- but this works as intended, so my new context works as intended

        end

        -- have to change starting_shop (doesn't get the job done, shop slots probably load after that check)
        if context.starting_shop or context.reroll_shop then 
            -- Check for planets in rerolled shop
            hasPlanet = false
            for i = 1, #G.shop_jokers.cards do
                if G.shop_jokers.cards[i].ability.set == 'Planet' then
                    card.ability.shop_slots = 1
                    hasPlanet = true
                    break
                end
            end

            -- Add slots if needed
            if hasPlanet then
                change_shop_size(card.ability.shop_slots) -- succeeds in adding slot, so here the param is 1
            end
        end
    end
}
#

also here's the context, I didn't have enough room to share it:


# Make context right before reroll
[[patches]]
[patches.pattern]
target = 'functions/button_callbacks.lua'
pattern = '''
local final_free = G.GAME.current_round.free_rerolls > 0
'''
position = 'before'
payload = '''
for i = 1, #G.jokers.cards do
    G.jokers.cards[i]:calculate_joker({before_reroll = true})
end
'''
match_indent = true

clever lily
#

how do i set debuffs to jokers

knotty wren
#

is there a way to check for unlock when you open 2 of the same booster packs in total?

daring fern
dapper sun
#

oops wrong modding dev but oh well

#

working on replacing the card sprite in Sprite:draw_self with a canvas so i can draw shit that gets affected by edition shaders

#

more specifically i wanna apply a shader to the card that also gets affected by the edition shader

#

so i can remove parts of the card

red flower
junior tapir
#

event as in another context?

#

ooooh no, wait why event

#

is it so that the event handler does something? idk what difference it makes

#

this continuously increases the shop slots (+1+1+1+1... can't even reroll xd), maybe I'm doing it wrong

knotty wren
#

any idea why beating the challenge doesn't unlock the joker? I'm pretty sure it has the same key

        return args.type == 'win_challenge' and G.GAME.challenge == "c_mar_waters"
    end```
daring fern
knotty wren
#

really?

#

I referenced another mod

daring fern
knotty wren
#

how can I achieve this?

#

I had it like this and it's also not working

daring fern
# knotty wren I had it like this and it's also not working
[[patches]]
[patches.pattern]
target = 'functions/common_events.lua'
pattern = 'if not SMODS.config.seeded_unlocks and (G.GAME.seeded or G.GAME.challenge) then return end'
position = 'at'
payload = 'if not SMODS.config.seeded_unlocks and (G.GAME.seeded or (G.GAME.challenge and not card.modprefix_challenge_bypass)) then return end'
overwrite = true
match_indent = true
knotty wren
#

this is in lovely.toml?

junior tapir
knotty wren
red flower
#

so it waits until shop jokers exists

junior tapir
lament agate
#

is there a rarity pool?

daring fern
lament agate
#

It's random

maiden phoenix
lament agate
#

Trying to get back into Modding

fading rivet
#

what do I need to scale by in order to make the texture fit the image

clever lily
#

how do i make this video thing from yahimod work

clever lily
#

:hreat:

clever lily
clever lily
wanton jolt
#

did you copy everything it uses

#

@clever lily

#

like the event manager (if it uses it)

clever lily
#

for video popups

wanton jolt
#

you misspelled it

clever lily
# wanton jolt

probably came from me restarting the game and holding R for too long

wanton jolt
#

alt f5

clever lily
#

did not notice that at all

clever lily
#

like

#

postcrash

wanton jolt
#

oh on crash

#

yea

clever lily
#

ok same thing happens after i fixed it

#

gulp

wanton jolt
#

what does it look like

clever lily
#

the game just

#

closes

#

no crash message no nothing

lament agate
#

is there any ways to make this to affect selecting a hand?

#

i.e makes it so that it counts as pair whenever i select K and Q

wanton jolt
#

hook pairs perhaps?

lament agate
#

i couild

wanton jolt
daring fern
lament agate
#

like K and Q are now J

daring fern
# lament agate like K and Q are now J
local oldcardgetid = Card.get_id
function Card:get_id()
    local g = oldcardgetid(self)
    if next(SMODS.find_card('j_modprefix_key')) and (g == 12 or g == 13) then
        return 11
    end
    return g
end
wanton jolt
#

@daring fern can i just literally add you to my mod

#

as a card

daring fern
wanton jolt
#

thank you

lament agate
#

Is it possible to override The Sun/Moon/Star/World output to be random

#

I.e The Stars now turn selected cards into Clubs

wanton jolt
#

uhhhh you would have to take ownership im sure

lament agate
#

how would i randomize it though

red flower
#

look at the SMODS.Suit docs

wanton jolt
#

if condition
suit = random suit
function to change the suit

red flower
#

at the bottom

lament agate
#

im a bottom

#

tyyy

wanton jolt
#

local suit = pseudorandom_element(SMODS.Suits, pseudoseed('mysuit'))

#

im guessing

lament agate
#

wherte the FUCK is it

wanton jolt
#

SMODS.Rank and SMODS.Suit

#

above rarity

lament agate
#

im

#

actually

#

so blind

lament agate
#

thanks

#

so like

gilded blaze
#

missing closing bracket

lament agate
#

when this player has this joker, it will take ownership of the consumables

#

and then i can randsomize it

#

i think

#

cant hurt to try

wanton jolt
#

if next find card
local suit = pseudo
else
suit = whatever it is

suit application func

lament agate
#

but idk tho

#

a joker that

#

wait nevermind

#

Is it possible to turn the suit output into an enhancement output

#

i.e The Lovers turns card into wild

fading rivet
lament agate
#

right, about that

#

thank you

fading rivet
#

like I have a joker that makes glass cards become gold instead of breaking

#

and its done via take ownership

lament agate
#

where is take ownership doc located again

#

nbm

wanton jolt
#

did u find it

lament agate
#

fou7nd it

#

does anyone know where the tooltips doc located

wanton jolt
#

what are trying to do

lament agate
#

info_queue i mean

fading rivet
#

how could I send information from a UIBoxes ref table into its shader

bold eagle
#

how do i refer to a custom consumable type in the loacalization file?

fading rivet
bold eagle
#

do i need a prefix?

wanton jolt
fading rivet
#

did you use a prefix?

bold eagle
#

or is it just the key

gilded blaze
#

consumable types don't get prefixed by default
the category name is the exact key you put in SMODS.ConsumableType

fading rivet
wanton jolt
fading rivet
#

Tuning is my consumable type

wanton jolt
lament agate
wanton jolt
#

@lament agate

gilded blaze
#

it wouldn't work

lament agate
wanton jolt
#

is it the wrong key

gilded blaze
#

it only works if you can hover your cursor over

wanton jolt
#

oh

#

OH right

gilded blaze
#

card descriptions are gone the monent your cursor leaves the card

fading rivet
#

oh do you mean info queue stuff

wanton jolt
#

@lament agate add an infoqueue if u cant do tool tips

bold eagle
lament agate
wanton jolt
#

oh lol

lament agate
#

where does the info queue doc located

fading rivet
wanton jolt
#

i thought you meant actual tool tips

lament agate
#

😭 😭

#

yes yes

lament agate
fading rivet
#

m_wild iirc

#

e is editions

lament agate
#

right

wanton jolt
#

its m yes

#

m_wild

#

info_queue[#info_queue + 1] = G.P_CENTERS[m_wild]

lament agate
#

thanks guys

wanton jolt
#

if you want to change the card that is in the consumable type, you have to do it under c_prefix_consumabletypekey in descriptions

fading rivet
#

just do .m_wild

bold eagle
#

ok cool thank you

wanton jolt
fading rivet
#

consumabletype isnt put in there unless you choose to

wanton jolt
#

i mean prefix_consumabletype

fading rivet
wanton jolt
#

i have a k_key for my consumable types i dont know if its a dupe

#

or useless

#

this is the thing i want to group up but gave up when i saw ui btw ^^

#

@daring fern do you have art i can refer you by or can i just draw you as an all knowing wizard

lament agate
#

i tried doing the same

#

no lock

#

no luck

daring fern
wanton jolt
#

fuck how would i make that fit as an inscryption card

lament agate
wanton jolt
#

lol

#

i mean it would be quite easy to do

lament agate
#

foo is dead

#

im cooked

wanton jolt
#

i need to build it like an actual poly

wanton jolt
lament agate
wanton jolt
#

@fading rivet are you sure you coded it

#

or is the calculate somewhere else

lament agate
#

he's DEAD

wanton jolt
#

i found it

#
SMODS.Enhancement:take_ownership('glass', {
    calculate = function(self, card, context)
        if context.destroy_card and context.cardarea == G.play and context.destroy_card == card and SMODS.pseudorandom_probability(card, 'glass', 1, card.ability.extra) then
            if SynthB.effect.parry() then
                card:set_ability("m_gold", nil, true)
            else
                card.glass_trigger = true
                return { remove = true }
            end
        end
    end,
}, true)
lament agate
#

sweet

#

thgank you

wanton jolt
#

actually i should dead ass make a sort of epoxy sticker that if its breaking grants
{break, 0.7}
{upgrade,0.05}
{not break,0.25}

fading rivet
lament agate
fading rivet
#

@lament agate

wanton jolt
#

@daring fern give me two numbers from 0 to 20