#šŸ’»ćƒ»modding-dev

1 messages Ā· Page 243 of 1

high eagle
#

i see

formal parrot
#

You should download the mod

next timber
#

my edition keeps flipflopping back and forth between working and not working

minor furnace
#

I love when smods patches start failing despite me not targeting these lines with my own patches

neat plover
#

argh

minor furnace
#

maybe they're deprecated?

high eagle
#

..................and it crashed

#

idk why; isnt atlas always a nil value?

#

always a table, i mean

neat plover
#

did you find anything

#

????

#

cause i surely didnt

old bane
#

i mean like which line is like 53, is it the first one i sent or the second one

#

becuase if it's the first one context.scoring_hand[i].config.center is a table containing a lot of entries, are you trying to get the rank of the card?

hard flume
#

I've decided to completely redo my Yume Nikki Jokers

zealous glen
#

old Yume Nikki Jokers:

high eagle
#

Also

#

Um

#

What’s with the deperate 1x and 2x folders on mods

#

Separate

zealous glen
high eagle
#

I see

#

....WHY IS THIS HAPPENING THEN?!

hard flume
high eagle
#

each joker is 4 jokers

minor furnace
#

why does the order field of my new consumeable type begin indexing at 46?

hard flume
high eagle
#

...

hard flume
#

You're supposed to have the Jokers in the 2x folder be 2x size

minor furnace
final wagon
#

is there an array or way to get an array of all jokers, modded ones included?

minor furnace
#

Ideally, I'd want my new planet to have order 13, and my Zodiac cards to have order 1-13

neat plover
tawdry coyote
#

Does anyone know a way to destroy a random joker card after a round?

minor furnace
high eagle
#

oh god oh fudge

tall apex
tawdry coyote
high eagle
#

WHAT DID I DO I MADE IT WORSE

minor furnace
tall apex
high eagle
#

i see, ill tkae a look

tawdry coyote
high eagle
#

does the atlas take from 2x or 1x again?

minor furnace
#

1x I think

high eagle
#

i see

minor furnace
#

the sprite size should be 71 x 95

neat plover
#

depends on smoothing i think, for me its always 2x for some reason, but update both

neat plover
high eagle
#

Gotcha

neat plover
bold sleet
#

Hello, good people. Are there any functions that do the same as set_edition but for enhancements, seals and stickers?

minor furnace
old bane
neat plover
#

OH

#

ITS NOT CRASHING

remote sequoia
minor furnace
upbeat bronze
#

how complicated would yall say making 1 joker is?

#

ive heard Lua isnt exactly fun to deal with

tall apex
wintry swallow
#

Sorry but, anybody know if I could run another .lua file trough my main.lua file?
I tried using dofile() or require but it didn't work and I didn't find anything online
Idk if what I'm saying makes any sense haha

neat plover
#

yk what??

minor furnace
neat plover
wintry swallow
wintry swallow
bold sleet
#

The file you want to load should be inside the same directory from where you are calling the function.

minor furnace
#

I assume you can specify the file path though

wintry swallow
#

aight, ty

minor furnace
#

./folder/file_name.lua

bold sleet
#

And so on.

minor furnace
bold sleet
#

Should work.

wintry swallow
#

maybe I'm stupid but sadly doesn't

upbeat bronze
#

is there any up to date guides for modding? closest one i can find in threads is from like 7 months ago so i doubt its uptodate

wintry swallow
# upbeat bronze is there any up to date guides for modding? closest one i can find in threads is...
GitHub

A Balatro Modding Framework. Contribute to Steamodded/smods development by creating an account on GitHub.

GitHub

A Balatro Modding Framework. Contribute to Steamodded/smods development by creating an account on GitHub.

GitHub

A Balatro Modding Framework. Contribute to Steamodded/smods development by creating an account on GitHub.

GitHub

A Balatro Modding Framework. Contribute to Steamodded/smods development by creating an account on GitHub.

GitHub

A Balatro Modding Framework. Contribute to Steamodded/smods development by creating an account on GitHub.

upbeat bronze
#

tysm

wintry swallow
#

try to read them through, there are sadly no modding guides

upbeat bronze
#

yeah i feel the game being in lua is killing the modding scene, the modding scene for balatro is surprisingly small for how massive of a game its become

charred halo
#

I have a joker that creates a copy of itself every time a boss blind is beaten, but it always just copies itself infinitely. Is there some stupid obvious oversight im missing

#
if G.GAME.blind.boss and G.GAME.chips / G.GAME.blind.chips >= .95 then -- Combined condition
            print("Condition met, adding event") -- Debug print
            G.E_MANAGER:add_event(Event({
                trigger = "before",
                delay = 0.0,
                func = function()
                    print("Event triggered, creating new card") -- Debug print
                    local new_card = create_card('powercreep', G.jokers, nil, nil, nil, nil, 'j_pow_powercreep') 
                    print("New card created") -- Debug print
                    new_card:set_edition({ negative = true }, true)
                    print("New card set to negative edition") -- Debug print
                    new_card:add_to_deck()
                    print("New card added to deck") -- Debug print
                    G.jokers:emplace(new_card)
                    print("New card emplaced in jokers") -- Debug print
                end
            }))
        end
glacial bloom
#

brand new to this. Trying to make a joker that gains X0.5 mult every time two face cards are scored (not caring about balance right now) im kind of stuck and not sure what to do from here. I understand what I have currently, but don't understand anything else so far

zealous glen
glacial bloom
zealous glen
#

It lists the automated calculation returns

#

And it also lists the context that provides the scoring hand

high eagle
#

What does the calculate context function do again?

tall apex
high eagle
#

I see

#

Because I’m trying to find out why one specific joker is not working

#

Let me copy and paste the code and see if anyone can help:

tall apex
#

I’ll try but I’m not very experienced :3

#

But I have a few functioning jonklers

wintry arch
#

any of yall ever played nuclear throne?

#

you know the effect when you go through a portal in that game. the background screen

#

it's like a spiral tunnel

#

i kinda wanna see if i can get love2d to make an effect like that for a card, maybe to implement for balatro

high eagle
tall apex
#

I’ll look when I get home I’ll be like 5 minutes :)

#

… the file isn’t a .txt normally though right?

mellow widget
#

anyone know what the extension for steammods in vs code is?

high eagle
tall apex
#

this is way above my paygrade unfortunately i haven't worked with suits yet

#

oh wait

#

a lot of this is context not actual code ok wait

high eagle
#

I see

tall apex
#

not... context

#

i mean like -- message i worded that awkwardly

red flower
#

if context.before and next(context.supbal_card_changes_suit(self, new_suit)) and not context.blueprint then
should probably be if context.change_suit then

tall apex
#

oh hey n c:

red flower
#

hi

high eagle
#

I see

#

Thank you

tall apex
#

i might have a quick question if this fix doesn't work for me

high eagle
#

lemme check if thi works

red flower
#

also you're missing a reference in that hook

tall apex
#

... yup same issue, god this is annoying

hard flume
#

Hihi!! :3

tall apex
#

hihi!

red flower
# red flower also you're missing a reference in that hook
local _card_changes_suit = Card.change_suit
function Card:change_suit(new_suit)
    -- Then call the stored reference to the original function so it still works
    _card_changes_suit(self, new_suit)

    -- Then do whatever we want after (or before if you want)
    SMODS.calculate_context( { change_suit = true, changed_card = self } )
end
red flower
tall apex
#

it do be breaking my brain, care to point out my inevitable newb mistake? X3

red flower
#

did you modify the code in the middle of a run?

tall apex
#

no? i've been loading a savestate but i've restarted the game numerous times

upbeat bronze
#

well managed to get it to atleast show in game, now to figure out how i'd even make the effect work, i guess i could forcibly tear parts from Canio and Ceremonial Dagger

tall apex
#

i could try a new one

red flower
#

what if you dont load from a savefile?

tall apex
upbeat bronze
#

ty

tall apex
red flower
#

objects keep their old ability values when you load

#

you need to restart or get a new instance

tall apex
#

OHHHHHHHHHH

#

gotcha

high eagle
#

its working!!!!!!!!!!!! tysm

tall apex
#

i can move on to finally making the joker ability work rather than troubleshooting something i have done on a previous joker LMAO

zealous glen
#

Paperback and Betmma’s do it tho

red flower
#

joyousspring does it :3

upbeat bronze
#

ah yeah i suppose it wouldnt detect it

zealous glen
#

Betmma’s old solution checked for the color of Card:dissolve

red flower
#

i hook card:remove

#

and i check the area and that it's not the end of the game

high eagle
#

Hm. Well, it’s not working for the Sigil card which is odd

red flower
upbeat bronze
#

my reaction to this convo:

round island
#

can someone please help me install lovely mod injector

#

im gonna lose it

upbeat bronze
#

i am not code guy i am art guy

red flower
#

im a code guy

#

i hate art

#

(making it)

wintry arch
#

does balatro do anything silly with love2d in terms of rendering

next timber
#

wtf why is my edition breaking only after i apply it to a joker, remove it, and then apply it again?? the original mult should never be changing i cannot find anywhere in the code that would be causing it to change, let alone only after its applied twice

#

oh shit maybe i should deep clone on this one specific line in the on_remove function

#

does aiko not do that?? why does it work for them then

#

or did they just not test as rigorously as me

tall apex
next timber
#

istg if this really is just a reference vs value assignment problem i might lose it

#

it was a fucking reference assignment issue

slow crater
#

Hello. Can anyone tell me if there is a person on this server who understands the code? I am making my own joker and I need to apply a function to it so that it is destroyed with a 25% chance after the end of the round. Maybe someone in the chat made mods and knows how to do this?

next timber
#

which has basically the same effect as you're describing

slow crater
#

I'll take a look now, thank you very much for your help

tall apex
#

michel when gros

next timber
#

if gros, then only michel !!

#

ok so i think i've fixed big jokers? i can't think of any more glaring issues with them i should solve

#

though while im debugging them. why the fuck does loyalty card double to every eleven hands instead of twelve

#

ohh

#

in the code for some fucking reason

high eagle
next timber
#

it stores it as one lower than it is

#

and then adds one

#

???

#

why does it do that.

#

can i be bothered to patch it? fuck no!

#

its staying at every 11 hands

red flower
#

it might be because of the timing of the update, I remember having trouble with that for jokerdisplay

next timber
#

no like its ability.extra.every is 5. why is it 5

upbeat bronze
#

man this is giving me a headache

next timber
#

that i presume doesnt change

#

so why is it 5

#

lol

upbeat bronze
#

why did i have to pick a complicated effect to start with

red flower
#

i dont know if this is the case but i can guess its so it doesn't trigger early

high eagle
next timber
#

no cause like it does activate every 6

#

so its not a bug. its working as intended

red flower
#

thats not what i mean

next timber
#

depending on how it works i might just be able to handle the doubling of the every variable differently which would be fairly easy

crisp elbow
next timber
#

not in lua

crisp elbow
#

0-11 is technically 12

next timber
#

in lua its. fucking 1 indexed baybee

#

whyyy

high eagle
#

I’m going to check the code for sigil, see why it’s not triggering

next timber
#

ok it seems like i may have to decide between making Joker Stencil not buff at all or giving literally every joker a x2 mult. fun

high eagle
#

I see

next timber
#

ok its making probabilities half as likely again why is it doing that i told it not to

high eagle
crisp elbow
red flower
#

hook set_base and check if the suit before and after are different

high eagle
#

I see

next timber
#

the thing is im trying to double all values. except the default value for x_mult is 1 so i don't wanna double that except for when i do and its so so confusing

red flower
#

thats why i dont do stuff with vanilla jokers lol

#

if i ever have to im taking ownership and recreating the effects with smods api

next timber
#

damn, Big Perkeo doesn't give two negative consumables

#

thats a shame

#

i like perkeo

tall apex
#

hey n i have another question

next timber
#

oh damn Driver's License is hard coded to 16 cards

red flower
#

shoot

tall apex
#

for why not work? it says it's indexing a nil value

#

or wait did it say indexing?

#

i got this from the arm, but it's still quite confusing

red flower
#

handname should probably be context.scoring_name

tall apex
#

like in the brackets?

red flower
#

yeah

#

idk what the effect does tho

tall apex
#

the goal is to level down a played hand c:

upbeat bronze
#

i do not know what im doing and the guides really dont help

red flower
#

that's me but in life

upbeat bronze
#

i mean they got the joker to display in game sure but it just crashes upon doing anything

#

so

tall apex
#

i wish there was a way to see all the contexts and stuff tbh

#

i so often need to ask for a certain context

red flower
#

the wiki?

tall apex
red flower
#

no

upbeat bronze
#

im like trying to use the modded vanilla example jokers as a guide and even then it wont do anything

#

i am not a programming guy why did i think this was a good idea

red flower
#

most context are there except some new ones

next timber
#

why the FUCK does 8 Ball literally just store its probability directly to the extra. like literally just extra = 4

#

that is. so annoying

tall apex
red flower
#

yeah

next timber
tall apex
#

huh

#

still doesn't help me level down a hand unfortunately

#

lemme give it another gander

red flower
#

you can try returning level_up = -1

tall apex
high eagle
red flower
#

changes suit and rank

high eagle
#

I see

charred halo
#

I have a joker that creates a copy of itself every time a boss blind is beaten, but it always just copies itself infinitely. Is there some stupid obvious oversight im missing

red flower
#

yeah, it's probably calling the calculation of the new ones

tepid crow
tall apex
#

wdym it works now

#

WDYM

red flower
#

extra= ball

tepid crow
#

extra = we ball

tall apex
#

n was it really as shrimple as that? do my eyes decieve me?

charred halo
red flower
#

you can add a value to the new one so it doesn't trigger that round

tall apex
#

i can finally do the pixel art after a good long coding lession

charred halo
red flower
#

when you make a copy you do copy.ability.extra.copied_this_round = true and then you set it to false in context.setting_blind or something

tall apex
#

waiiiiit no i cant, it upgrades even when it cant level down the hand

tall apex
#

although, seeing a lvl 0 hand is hilarious so immna keep that part

#

im p sure itss a shrimple context change

mellow widget
#

i would use if context.final_scoring_step then to make a enhancement do something at the same time glass cards break, right?

unkempt thicket
#

How do i get the current deck the run is on?

upbeat bronze
#

i'd kill for someone to make coding simpler just in general man

upbeat bronze
pseudo cape
#

does anyone know what all the names of variables for colors modifiers in descriptions (the {C:[variable name]} {} things are? I'm working on a tool and part of that is a real time visualizer of text modifiers with colors and I need to have all the base ones in there to get it fully set up. If you also know the hex codes of what the variables are somehow that'd also be amazing

upbeat bronze
#

sitting looking at the example jokers lua with tons of lines of code going completely unexplained with 0 notes like:

red flower
pseudo cape
red flower
upbeat bronze
#

trying to get literally anything to work beyond the joker appearing

charred halo
upbeat bronze
#

im looking at Castle & Cavendish being explained in examplejokers and theres just no notes for what anything does

red flower
red flower
upbeat bronze
#

and frankly diving into a lua document thats hundreds of indexes long to try and get 1 simplish thing to work is an absurd ask

next timber
#

is there any easy way to change a joker's odds in such a way that the description says, for example, "2 in 4" instead of "1 in 2"? or is that just something that only oops all sixes can do

upbeat bronze
red flower
upbeat bronze
#

i dont even know why its displaying as +nil either

hard flume
red flower
hard flume
tall apex
#

hihi i am once again having a problem, ik this is probibly the wrong context and worded incorrectly but how would i look at the level of the played hand and see if its above or equal to zero

#

this goober is a problem child

red flower
red flower
#

i think the link explains it well

upbeat bronze
#

i dont mean to be rude but none of these are actually helpful

tall apex
#

ohhh right it says its trying to compare with a table for that line which,,, im still learning about tables ;w;

upbeat bronze
red flower
#

all of that correlates to what the code does

hard flume
#

And even if it didn't, that mindset is not going to help you with programming

unkempt thicket
#

How do i get the current deck the run is on?

upbeat bronze
#

now my balatro wont even start without crashing, i dont get how its gotten worse

#

i dont think im a stupid person but man this is so frustrating to deal with

red flower
#

you might need to learn more basics

#

like, I'm willing to help but it's hard when people say that they don't understand anything

tall apex
#

i be here like

clever coral
#

Hi. I'm a curious person who can understand a bit of coding but never quite put my hands onto it.
If I were to create a mod for personal use to add a few more jokers in the game, where should I start from?
(I already have smods and talisman running)

azure phoenix
#

i'm making my first mod and don't really know what i'm doing, this joker is either crashing or just doesn't do anything (supposed to convert spades to hearts and clubs to diamonds)

SMODS.Joker {
    key = 'conversionJoker',
    loc_txt = {
        name = 'Placeholder',
        text = {
            "Convert played cards with {C:spades}Spade{}",
            "suit to {C:hearts}Heart{} suit and {C:clubs}Club{}",
            "suit to {C:diamonds}Diamond{} suit when scored"
        }
    },
    -- This is leftover from the template, i don't know if config is required or not but i left it in just in case
    config = { extra = { mult = 4 } },
    rarity = 1,
    blueprint_compat = false,
    atlas = 'jokerAtlas',
    pos = { x = 0, y = 0 },
    cost = 8,
    loc_vars = function(self, info_queue, card)
    return { vars = { card.ability.extra.mult } }
    end,
    calculate = function(self, card, context)
    if context.individual and context.cardarea == G.play then
            if context.other_card:is_suit(spades) then
                return {
                    assert(SMODS.change_base(card, 'Hearts'))
                }
            elseif context.other_card:is_suit(clubs) then
                return {
                    assert(SMODS.change_base(card, 'Diamonds'))
                }
            end
    end
    end
}
faint yacht
#

is_suit also accepts strings for the suit.

hard flume
faint yacht
#

SMODS.change_base(context.other_card, 'Hearts') also.

azure phoenix
#

oh

tall apex
#

hmm, im still having trouble.,, idk what table this is trying to compare to at all x-x

maiden phoenix
azure phoenix
#

it works, thanks

tall apex
red flower
#

that's the problem

tall apex
#

ah.

red flower
#

talisman makes hand levels into tables

tall apex
#

ohhh.,, weird

charred halo
red flower
#

no, you need to define it yourself

#

inside config

charred halo
#

ok thanks

faint yacht
# tall apex

if to_big(context.hands.level) > to_big(0) then

tall apex
#

mind if i ask what to_big is?

red flower
#

it's what turns numbers into talisman numbers

tall apex
#

AH.

#

saw that in some other mods and left it alone, that is VERY good to know

red flower
#

you need a dummy version of it if you want to use it without talisman, something like

to_big = to_big or function(a) return a end
tall apex
red flower
#

yeah

tall apex
#

word!

#

ugh.,,

#

now im getting the old issue where its saying 'hand' is a nil value

#

ignore that i was looking up space LMAO

faint yacht
#

Is this trying to get the "level" of "current" hand?

minor furnace
#

why is smods making the card prefix c for something I've specified is a planet?

red flower
# tall apex

context.hands.level doesn't exist, you need to do the other thing i told you but wrap it in to_big

minor furnace
next timber
#

losing my mind because my code randomly stopped working and i literally have no fucking clue why. even undoing all the recent changes isnt working

pseudo cape
#

I am discoverer of hex codes

#

my tool be coming along

tall apex
#

ITS FULLY WORKING

maiden river
#

so planets, tarots, spectrals, etc

tall apex
#

literally n thank you for your patience im so happy about learning this stuff c:

#

my first rare jonkler is working, exp farm my beloved

next timber
minor furnace
pseudo cape
tall apex
#

witness the consiquences of your actions (soon to be textured)

granite turret
#

0!?

tall apex
next timber
#

what really is xChips anyways

tall apex
#

c:

pseudo cape
#

can it go below 0?

granite turret
tall apex
pseudo cape
tall apex
#

it was keeping it at 0 but still leveling off of a hand

next timber
pseudo cape
#

o huh

granite turret
#

very similar to XMult, but interacts differently for a few things

tall apex
granite turret
tall apex
minor furnace
#

so, these cards both have the same order value. But all of my custom consumables appear to have their order calculated as if all of them were tarot cards (values begin and go up from 23), even if that's not the set they're in

#

and I'm not sure how to fix that

granite turret
#

the difference between XChips and XMult is very build-dependent and typically not much of a change

#

but it does exist

red flower
#

i dont think it should be in vanilla but i think it adds flavor to mods

tall apex
#

oh that's an interesting perspective

#

well worded too

granite turret
#

i find it worth, if mainly for the variety

tall apex
granite turret
#

certain Chips Jokers would enjoy it :3

#

but outside of that

tall apex
#

i still play vanilla runs even tho i play modded

granite turret
#

think of it like how you think of XMult

tall apex
plain apex
#

is it possible to kill the player during scoring?

tall apex
#

the wee 2

granite turret
tall apex
#

I LOBE VE CHIPS ADSGJLSDJG

tall apex
tall apex
zealous glen
#

:D

tall apex
#

mine is a rare, what's yours? c:

granite turret
#

in general, XChips makes Chip scaling useful in the endgame

granite turret
red flower
granite turret
tall apex
#

ooh, and make sure you define when a hand CANT level any lower!! I have mine set to 0 because i wanna see people cry that they have a lvl 0 hand XD

red flower
#

i know, whats different from adding mult

zealous glen
#

I just go with vanilla

#

not below 1

tall apex
#

... right?

#

im an art student not a math nerd X3

red flower
#

it's the same operation unless you're in plasma deck

granite turret
#

exactly

tall apex
granite turret
#

except that some Jokers behave differently with it

minor furnace
red flower
tall apex
#

my logic is simple, blue number funny and quirky and different

granite turret
tall apex
#

even if its not different LMAO

red flower
gusty iron
#

could someone give me a guide on how to make joker retextures?

granite turret
red flower
#

no

zealous glen
red flower
#

it's the same

granite turret
#

then i am very confused

red flower
#

like unless youre ordering it wrong i guess

#

but thats the same for +mult

granite turret
#

that's what i'm trying to say
there is very little difference at the end of the day

red flower
#

yeah but my point is that wee + xchips is not more insane than wee + xmult

tall apex
#

ok real debate tho, mips or chult

red flower
#

in fact xmult is better because order doesnt matter

granite turret
granite turret
#

i'm not a math student either, i'm an engineering student

red flower
#

im comsci so im worse than both

granite turret
#

of course, why not have both

tall apex
granite turret
#

the simple solution: XChips and XMult working together for maximum chip generation

tall apex
#

BIG NUMBER!!!!!!!!!!!!

red flower
#

^mult

next timber
#

huh?? why is it saying the length of keywords is 0???

granite turret
tall apex
red flower
next timber
#

samn

granite turret
next timber
#

aiko's code is.. bad..? no, it cant be..

red flower
#

if you need to check if it has something do next(keywords)

tall apex
#

this joker is so mid LMAO i love it

granite turret
granite turret
granite turret
#

😭

tall apex
#

having a level zero hand is MISERABLE, you have to have a planet engine online for that joker to ever be worth

granite turret
gusty iron
minor furnace
#

I'm just gonna assume either I'm missing some specific value in my card declaration, or this is an artifact of SMODS implementation at this piont

modern kindle
# plain apex is it possible to kill the player during scoring?

you can prob just add event

    calculate = function(self, card, context)
        if not context.joker_main then return end

        if pseudorandom("death_card_trigger") < (1 / card.ability.extra.odds) then
            print("[DEBUG] acitvated death prob")

            -- force game over
            G.E_MANAGER:add_event(Event({
                func = function()
                    G.STATE = G.STATES.GAME_OVER
                    G.STATE_COMPLETE = false
                    print("[DEBUG] game over triggered")
                    return true
                end
            }))
        else
            print("[DEBUG] get fucked kiddo")
        end
    end
}

and just integrate that with your other functions

tall apex
#

me when large messages

tall apex
granite turret
#

good

tall apex
#

if it could i would have let it LMAO

#

im sick and twisted like that

#

:3

copper ermine
#

hello chat, how would i check to see when a joker is purchased or otherwise added to your inventory (through riff raff, judgement)?

zealous glen
tall apex
zealous glen
#

you need a more recent modding reference

tall apex
granite turret
red flower
#

:3

tall apex
#

:3

gusty iron
granite turret
#

what does emotional support do

tall apex
tall apex
#

c:

#

i love useless jokers RAAAAAAAAAAAAAHHHHHHHHHH

granite turret
tall apex
granite turret
granite turret
#

and beat Violet Vessel

modern kindle
#

ive got 2 legendaries myself, but only 1 can be spawned through a soul card

tall apex
#

how many squeak per second

granite turret
modern kindle
#

the other you need to sell x amount of another joker to spawn it in

tall apex
granite turret
tall apex
#

(im a little statistic)

granite turret
#

sooooo...

#

a little wild

high eagle
#

Hello

tall apex
high eagle
#

What does set base call again?

minor furnace
granite turret
modern kindle
red flower
granite turret
#

and you get cash out of it

modern kindle
#

money is always epic

next timber
#

how do i make the tooltip for an edition change depending on what type of card it's referring to? like how negative changes between "joker slot", "hand size" and "consumable slot"

#

infact thats basically exactly what i want to do

red flower
#

you need to make your own tooltip localization

granite turret
azure phoenix
#

how would i make the game determine which hand is played after a joker modifies some cards (ex. play a two pair that would end up being a flush, how do i make it detect the flush)

high eagle
#

trying to create the context "a card changes suits" for my joker to call ^^

red flower
#

it should be something like

local card_set_base_ref = Card.set_base
function Card:set_base(card, initial)
    card_set_base_ref(self, card, initial)
    SMODS.calculate_context(...)
end
high eagle
#

i see

red flower
#

and i think it would be easier for you if you name the context the same thing you did before

#

<@&1133519078540185692>

high eagle
#

ummm..... scammer?

modern kindle
#

<@&1133519078540185692>

#

oop

#

n got it

next timber
#

thats a nice tinyurl link you got there my man

#

where does it lead

gusty iron
#

how do i add malverk as a dependency for my mod?

#

im extremely new to modding sorry ;-;

livid scroll
#

Gave him a week timeout so he has a chance to regather his account

modern kindle
#

that was pretty...cool of you šŸ˜Ž

high eagle
next timber
#

one could even say it was..

#

1010 cool..

high eagle
#

(dab)

high eagle
#

i see, ty

red flower
#

you need to check if the suit changed in set_base tho

high eagle
#

mhm mhm

red flower
#

because it will trigger if the rank changed

high eagle
#

so um. how, exactly, would i do that? would i need to redefine "set base" again?

red flower
#

you can do local original_suit = self.base.suit at the beginning and put calculate_context inside if self:is_suit(original_suit)

#

this doesn't take into account stone cards and stuff probably

gusty iron
red flower
gusty iron
#

yeah

#

thank you

copper ermine
high eagle
#

i want my joker to gain when it changes suits

red flower
red flower
high eagle
#

i seeeeeeeeeeee ty

next timber
#

ok how do i check the type (joker,playing card,consumeable) of a card?

red flower
#

card.ability.set

next timber
#

thx

azure phoenix
#

how would i make the game determine which hand is played after a joker modifies some cards (ex. play a two pair that would end up being a flush, how do i make it detect the flush)

scarlet spire
#

what localization field should custom consumables be in? Other?

high eagle
gusty iron
red flower
noble schooner
high eagle
# red flower what's the code looking like now?

local card_set_base_ref = Card.set_base
local original_suit = self.base.suit
function Card:set_base(card, initial)
card_set_base_ref(self, card, initial)
if self:is_suit(original_suit) then
return { SMODS.calculate_context ({ change_suit = true, changed_card = self }) }
end
end

red flower
#

switch to vscode or a proper code editor

red flower
high eagle
#

i see

noble schooner
#

oh, forgot to reply

noble schooner
red flower
#

i mean as long as it does what you need

high eagle
tepid crow
gleaming zealot
noble schooner
high eagle
#

get yuried idiot

noble schooner
#

real

red flower
#

yuri!?

noble schooner
#

yes

#

also known as

#

based

gleaming zealot
#

the balatro discord server

next timber
#

lmao

high eagle
#

true

noble schooner
#

lol

#

true tho

next timber
#

true

high eagle
#

anyway yea idk why base is nuthing now

#

local card_set_base_ref = Card.set_base
function Card:set_base(card, initial)
local original_suit = self.base.suit
card_set_base_ref(self, card, initial)
if self:is_suit(original_suit) then
return { SMODS.calculate_context ({ change_suit = true, changed_card = self }) }
end
end

red flower
high eagle
#

fair enough

gusty iron
#

okay so its saying AltTextures is nil so like

what do i do

noble schooner
#

currently trying to find a way to make a joker that adds its own edition to played cards

red flower
noble schooner
#

the adding an edition part isn't the part that's confusing me

tall apex
#

just wrapped up the art for my joker c:

noble schooner
#

just wanting to know how I'd make it add its own edition to noneditioned cards

gusty iron
high eagle
#

it should be base.suit, if im reading the text corfrectly: self.base = {
name = self.config.card.name,
suit = self.config.card.suit,
value = self.config.card.value,
nominal = 0,
suit_nominal = 0,
face_nominal = 0,
colour = G.C.SUITS[self.config.card.suit],
times_played = 0
}

local rank = SMODS.Ranks[self.base.value] or {}
self.base.nominal = rank.nominal or 0
self.base.face_nominal = rank.face_nominal or 0
self.base.id = rank.id

if initial then self.base.original_value = self.base.value end

local suit = SMODS.Suits[self.base.suit] or {}
self.base.suit_nominal = suit.suit_nominal or 0
self.base.suit_nominal_original = suit_base_nominal_original or suit.suit_nominal or 0

if not initial and G.GAME and G.GAME.blind then G.GAME.blind:debuff_card(self) end
if self.playing_card and not initial then check_for_unlock({type = 'modify_deck'}) end

end

red flower
noble schooner
#

bc it might have a different edition

tall apex
#

yay minecraft industrialism art

red flower
noble schooner
#

nonono

#

I need to check what edition it has

scarlet spire
noble schooner
#

then add that edition to played cards

red flower
#

isnt that just card.edition

azure phoenix
#

is there a context that is after the cards are played but before the played hand is determined

noble schooner
#

does it do that by defau-OHHH

scarlet spire
#

I'm fairly certain it's laid out correctly? isn't the loc entry just supposed to match in key?

red flower
high eagle
scarlet spire
modern kindle
scarlet spire
#

I did see that cryptid uses Code as a loc category and I couldn't find any patches to hint at it being custom behavior

gusty iron
#

can someone give me a mod that uses malverk so i can get a reference?

scarlet spire
modern kindle
azure phoenix
red flower
#

idk

azure phoenix
#

ok

scarlet spire
#

a pre-scoring when played context might come with blindcalc, whenever that releases? since that's when press_play for boss blinds calculates

red flower
#

yeah

azure phoenix
#

are there any mods with jokers that change the suit of cards?

charred halo
#

is there a way to count instances of a card in your inventory

red flower
charred halo
#

mb, a joker

red flower
#

#SMODS.find_card("j_key")

gusty iron
charred halo
red flower
#

SMODS.find_card("j_key") returns a list of all the jokers with key "j_key"
# gives you the length of the list

next timber
#

GIVE YOU THE LENGTH OF THE LIST

red flower
#

damn markdown

warped marsh
noble schooner
#

they're using notepad

warped marsh
#

Wowie that’s so cool

noble schooner
#
{
    cardarea = G.jokers, -- G.play, G.hand, (G.deck and G.discard optionally enabled)
    full_hand = G.play.cards,
    scoring_hand = scoring_hand,
    scoring_name = text,
    poker_hands = poker_hands,
    before = true
}```
...how outdated is the wiki-?
red flower
#

why

noble schooner
#

oh it isn't outdated

cursive root
#

looks up to date to me

noble schooner
#

that function errored like three times when I plugged it in lol

red flower
#

the brackets at the bottom is what's inside of context

scarlet spire
#

wonderful

red flower
#

lmao

lofty axle
#

new to balatro modding and lua in general, how would one go about changing the pitch of a sound based on the game speed if possible? this is giving an error lol

noble schooner
#

it causes a crash lol

red flower
#

what causes a crash

noble schooner
#

the brackets

red flower
#

you don't put that in your code literally

noble schooner
#

from that snippet of code

cursive root
#

well yeah

noble schooner
#

wha

cursive root
#

its documentation

noble schooner
#

why is it like that then

cursive root
#

not valid lua code

warped marsh
#

Oh Andromeda you are a Miku enjoyer right?

noble schooner
noble schooner
warped marsh
#

What do you think of this new Joker I’m working on!

noble schooner
#

woaa :O

gusty iron
noble schooner
#

I love it!!

modern kindle
#

i wonder how many mikus we have across the modding scene

foggy carbon
red flower
# noble schooner then why is it presented like it is?? 😭

this is read like:

if context.before and context.cardarea == G.play then -- condition to check if you're in the context

-- this is what's inside of context in that condition
context = {
    cardarea = G.jokers, -- G.play, G.hand, (G.deck and G.discard optionally enabled)
    full_hand = G.play.cards,
    scoring_hand = scoring_hand,
    scoring_name = text,
    poker_hands = poker_hands,
    before = true
}
cursive root
warped marsh
warped marsh
#

Although I’m still trying to figure out the Fool and Judgement aspect, can’t get them both

#

Well like it’ll either crash the game or it’s just the create the fool and never a judgement

zealous glen
#

You’ll get Brazilian Miku when I give her an effect

#

But the art is done

warped marsh
red flower
#

try something like

SMODS.add_card({key = "c_fool"})
SMODS.add_card({key = "c_judgement"})
noble schooner
#

just making sure

warped marsh
#

I did it completely differently

#

Wait I’ll have the code that’s close to it

red flower
#

using the smods function is probably the best way

noble schooner
#
scoring_hand:set_edition(edition, true)```
is this how you give played cards an edition before scoring?
red flower
#

it should be

noble schooner
#

alright, that's what I thought lol

red flower
#

oh wait what's scoring_hand

noble schooner
#

do I need to use an expression or smth

red flower
#

you want all played cards or all scored cards or what

noble schooner
#

all scored cards

red flower
#

you need to loop through context.scoring_hand

warped marsh
noble schooner
red flower
gusty iron
#

Okay so i got the game to load, but when i try to apply the texture, the game crashes, any fixes or do i need to give the error?

red flower
noble schooner
#

nnnno

warped marsh
#

Like key = blah blah

gusty iron
# gusty iron Okay so i got the game to load, but when i try to apply the texture, the game cr...

the error is on line 138 of maverk, saying its calling a "nil" value.

heres what my lua code looks like:

AltTexture({
    key = "jokers",
    set = "Joker",
    path = "JrJokers.png",
    original_sheet = true,
    keys = {
        "j_joker",
    },
    localization = {
       "j_joker",
    },
})

TexturePack({
    key = "jr_cards",
    textures = {
        "JJ_jokers",
    },
  loc_txt = { -- Localization text for tooltips displayed in the texture selection screen - can be added to a localization file under [descriptions][texture_packs]
    name = "Jr's Jokers!",
    text = {"Jokers, but they're replaced by Jr's friends!"}
  }
})
warped marsh
noble schooner
red flower
#
for _, card in ipairs(context.scoring_hand) do
   card:set_edition(your_edition, true)
end
gusty iron
#

I GOT IT TO WORK

#

OH MY GOD

#

THANK YOU GUYS!!

azure phoenix
#

a joker i added is appearing in the shop multiple times even though i dont have showman or anything

noble schooner
red flower
#

hmm maybe some functions do allow that

#

let me check

zealous glen
#

Do you know if SMODS adds a card to the deck when selling a card?

red flower
#

i think so

upbeat bronze
#

how do cards get that (Currently 1x Mult) text color

zealous glen
red flower
#

oh that wasnt in response to you sorry

#

i dont know what you mean

zealous glen
#

But selling a card triggers my Joker

red flower
red flower
noble schooner
zealous glen
# red flower weird

Yeah. Either my calculate is poorly written or a card is being added somewhere; could be a SMODS thing

noble schooner
#

lemme make sure it works in the first place

#

oh, the function itself doesn't work

scarlet spire
#

yes... it works

noble schooner
noble schooner
#
   if context.before and context.cardarea == G.play then
    for _, card in ipairs(context.scoring_hand) do
   card:set_edition(e_polychrome, true)
end
  end
  end```
#

did I do anything wrong?

red flower
#

oh but if you're using card.edition you might need to change card to another name like playing_card

red flower
noble schooner
#

oh right, ty

red flower
#

or do {polychrome = true}

noble schooner
red flower
noble schooner
#

the problem is

#

I was just using polychrome as a test to see if the function works

#

I want it to copy the joker's edition

red flower
#

i know but does it work with that or not

zealous glen
noble schooner
#

...where do I put the {polychrome = true}

red flower
#

instead of e_polychrome

zealous glen
#

Or maybe look into card.edition if it’s a table

noble schooner
zealous glen
#

Hence why it doesn’t work

noble schooner
#

which argument?

zealous glen
#

The one I told you to change

noble schooner
#

that's the one I'm using polychrome as a placeholder to test as

gusty iron
#

so uh

when i try to play a round of balatro with my custom textures, this error happens

functions/common_events.lua:2489: attempt to compare nil with number
zealous glen
gusty iron
zealous glen
#

I said to try card.ability.edition

noble schooner
#
   if context.before and context.cardarea == G.play then
    for _, card in ipairs(context.scoring_hand) do
   card:set_edition({polychrome = true}, true)```
#

changing card.edition to something else didn't work, it's caused by something else

zealous glen
#

Or to see if .edition is a table and use that table to fetch the key

gusty iron
noble schooner
#

it's just not doing anything

zealous glen
noble schooner
gusty iron
#

yeah

zealous glen
#

Oh wait I misread

gusty iron
#

would updating 2x but not 1x cause this or no

zealous glen
#

It’s nil and table

noble schooner
noble schooner
gusty iron
noble schooner
#

then I couldn't tell you

#

wait, is this for a mod?

tall apex
#

i wanna make a joker that scales up other jokers but idk if thats something im learning tonight oml

red flower
lament agate
#

im going to

#

mod every sounds in game

#

reshuffled style

noble schooner
#

reverse all of the sounds

#

make Ortalab

gusty iron
lament agate
noble schooner
#

hm, no clue then

noble schooner
red flower
noble schooner
#

neither did card.edition

#

oh you did pcard

red flower
#

no, the problem is the context

noble schooner
#

oh yeyeye the function itself works

#

I'm just trying to figure out how to make it use the joker's edition

#

OKAY IT WORKS NOW

#

YIPPIE

red flower
#

i mean the condition was wrong

noble schooner
#

yeah

#

everything works now

#

WOOO

tall apex
#

yibeeeeeeeeee c:

noble schooner
#

alright, now to figure out how to guarantee that it has an edition lol

azure phoenix
#

how would one implement the shaking animation with delays when a joker triggers

gusty iron
#

Okay so yeah it just corrupted my save

#

booted up a new save and its perfectly normal

#

can we get an rip for my level 2 save šŸ˜”

upbeat bronze
#

ok i managed to get it to actually display correctly and not crash on startup, better than it was, now to actually make the effect work

noble schooner
upbeat bronze
#

does anyone have the code for Canio? or should i bite the bullet and just unzip balatro so i have it all myself (and if so how would i do that)

noble schooner
#

it's completely unobfuscated lol

#

I forgot to hit save, checks out lol

upbeat bronze
#

trying to even find what lua theyre listed in and unless im blind

#

i cant find em

noble schooner
red flower
#

what do you mean by guarantee

reef belfry
#

Which one looks the lamest

azure phoenix
#

probably the second but they all look good

noble schooner
red flower
#

you can probably give it a random edition in set_ability

noble schooner
#

I tried that

#

it crashes

#
  poll_edition("Sage", 1, true, true, {"e_foil", "e_holo", "e_negative", "cry_mosaic", "cry_oversat", "cry_gold", "cry_astral"})```
#

whenever I try to load the joker

thorn ridge
#

what would be a good way to ban all the jokers besides ones under a certain prefix.

#

for a challenge

noble schooner
red flower
#

set_edition(poll_edition(...)) should work

#

but idk the exact syntax

red flower
#

as in card:set_edition

noble schooner
#

ah, right

#

nope

#

still doesn't work

#

here's the syntax

noble schooner
#

ohhh, I think one of the cryptid editions are bugged rn

#

idk why else it'd give that error

azure phoenix
upbeat bronze
#

where are the base balatro jokers data stored in balatro's lua files? I've searched card.lua and cannot find em

azure phoenix
upbeat bronze
#

Canio

red flower
#

Canio is misspelled as Caino in game

#

btw

upbeat bronze
#

AH

#

THAT EXPLAINS IT

minor furnace
#

how on earth do I keep a custom consumeable from showing up in the shop

upbeat bronze
#

lol

#

ty

red flower
minor furnace
#

I tried that and it didn't work as far as I could tell

#

wait let me try starting a fresh run...

#

I'm even dumber

#

shop_rate = 0 since this is a custom type

upbeat bronze
#

hmm trying to understand this

#

so to reuse this i would have to define a local variable such as Faces but instead for total cards destroyed

final wagon
#

is there a way to get an array of all jokers, including modded ones?

upbeat bronze
rapid stag
#

under what condition does the game use 2x assets?

red flower
red flower
rapid stag
#

i see, thanks. i wondered if that's what that did

red flower
# thorn ridge .

idk if it's a good way but i do that in my mod so that only cards from it appear by hooking get_current_pool

azure phoenix
red flower
red flower
azure phoenix
#

ok, thanks

thorn ridge
rugged star
#

Is there a way to do the opposite of a dependency? or like, an incompatibility with a mod

red flower
scarlet spire
#

how can I apply a custom sticker to a card that already exists?

#

i'm trying to look it up here and finding tons of conflicting info

minor furnace
#

I might need to install Cryptid for the sole purpose of debugging when people report crashes with Cryptid active

thorn ridge
#

I cant seem to find an example to follow for a booster pack

red flower
#

i just reply "sad" and move on when they report talisman or cryptid crashes idk how to solve

scarlet spire
#

do stickers have a specific prefix like other objects?

red flower
thorn ridge
thorn ridge
#

What is the objectypes doing

red flower
#

it creates a custom group of your objects basically

thorn ridge
#

im confused as to what this is doing

red flower
#

that's why i said it was hard to follow šŸ™‚

#

it's basically looking for all the jokers that start with "j_joy" and then putting them in groups depending on their qualities in my mod

#

you care about that first part only probably

thorn ridge
#

yeah

#

my brain hurts

lucid owl
#

would there be a surefire way to check when a card is enhanced? or should i attempt a hook?

red flower
lucid owl
# red flower card.ability.set == "Enhanced"

that works to check if a card is enhanced, but i'd need to have something activate when one is enhanced. so far i'm thinking a hook on set_ability() but i had wanted to check if there was a guaranteed way to make sure without hooking

red flower
#

ohh yeah i don't think there is

upbeat bronze
#

anyone willing to guide me through this?

#

trying to make the joker gain x0.3 mult per card destroyed, ive copied some stuff over from canio but its crashing and im not exactly sure why

#

dont have enough knowledge to know why

#

im trying to get this atleast working with playing cards without getting frustrated as i was earlier

cursive root
#

key will be nil

#

keys are also prefixed with the type (in this case "j_") followed by your mod prefix

#

if you need the key its at center.key (card.config.center.key)

#

i dont think you need to check it though

upbeat bronze
#

well basically i just want it to only apply if its the flowey joker

cursive root
#

it will

#

since its the calculate function for the flowey joker

upbeat bronze
#

and as i said im not really knowledgable enough on how to define that, assumed that referencing key would work

#

canio has this if self.ability.name == 'Caino' and not context.blueprint then and i wasnt sure how to really

#

make that work

#

for something else

earnest perch
#

Is this the appropriate place to ask about modding errors?

cursive root
#

vanilla code needs to do that since hte calculate is lumped into one big function ran for every joker

#

your calculate only runs for your joker

earnest perch
#

Got this error during a run, honestly do not know enough about modding to understand why it messed up

upbeat bronze
#

man this is rough

#

uh

minor furnace
#

you have like a million mods active

upbeat bronze
#

probably the most ugly code anyone in here has ever saw lets be real

cursive root
#

im pretty sure youre using an old outdated version anyways but more recent forks arent compatible either

earnest perch
red flower
#

the chatgpt ones are my favorites

cursive root
#

ive written worse

earnest perch
#

I was just trying to get as many working as I could tbh

upbeat bronze
#

now im getting a gamecrash and im not sure why

#

what shouldve been a simple like maybe 3 hour adventure has turned into 10

#

and counting

#

honestly if i had money at this point i'd pay to have someone take this damn problem away from me im very much done with fighting to learn it

#

im writing code and have 0 understanding on what any of it is doing, im trying to actively copy other code and apply it to my own joker and it just doesnt work

red flower
#
  1. the line that says self.ability.extra.xmult = ... should have all the self replaced with card

  2. the second return is wrong, you don't return what it says on the wiki, that's what's inside context

#
  1. you should read what the crash log says or at least send it as well
upbeat bronze
red flower
#

sorry i mean the second in calculate

lament agate
#

how do you fix mods not appearing

upbeat bronze
#

ah

upbeat bronze
red flower
#

you can delete it

#

unless you want to also want to display a message when it upgrades or something

upbeat bronze
#

nah

unkempt thicket
#

Why doesn't this work? is it because its the being of a run or?

upbeat bronze
#

man coding is stupid

red flower
# upbeat bronze

oh one more thing, lua is case sensitive so it's going to crash because sometimes you use xmult instead of Xmult

cursive root
main mica
upbeat bronze
#

because lets not make things simple

noble schooner
#

okay, I have returnedeth

cursive root
unkempt thicket
noble schooner
#
  card:set_edition(poll_edition("Sage", 1, true, true), true)
  end,```
why this crash
cursive root
#

surely making it case insensitive wouldnt add extra complexity and extra overhead

unkempt thicket
upbeat bronze
cursive root
#

i cant tell if youre serious

upbeat bronze
#

but man i will not miss whenever ai is smart enough to actually write functional code so art people like me dont have to toil in the pits of whatever level of hell this is

scarlet spire
#

anyone who understands balatro's pool system a bit more than me, is there any possible reason tarot merchant voucher (tarot cards appear 2X more likely) sets the tarot_rate from 4 to... 9.6, instead of 8?