#💻・modding-dev

1 messages · Page 75 of 1

brisk rose
#

I need /all/ the cards

#

lol

opal spade
#

I'm not sure what's the process for grabbing images is (or how to work with it), but the center should have enough info to pull the images u need

#

cus atlas (or lack thereof) + pos/soul_pos

languid mirage
#

yeah it should

but handling other things like scale is easier with an actual card

#

but Ig there isn't that many jokers like wee?

#

so maybe it's fine

opal spade
#

ye

#

I think manual approach for abnormal jokers should be ok

brisk rose
#

I... have almost 1000 jokers in game

#

I should be able to create the card from what's in G.P_CENTERS

#

and then go from there

stray orbit
#

divine journey i think

frosty dock
#

first time a steamodded mod has been loaded without a mod header

#

(yes prefix and main_file are required, don't fight me)

brisk rose
#

@frosty dock sorry to bother you, but is there a simple way to create a card object from G.P_CENTERS?

opal spade
brisk rose
#

I need to do it iteratively though, what parameters do I need?

#

for a joker specifically

frosty dock
#

I'd use SMODS.create_card

opal spade
#

Card(X, Y, W, H, card, center, params)

frosty dock
#

fair but that creates redundancy in the params when you can just do SMODS.create_card{key=center.key}

#

it ends up calling the Card constructor anyways of course, but it's easier

opal spade
crisp coral
#

you should start documenting misc functions

frosty dock
#

there's lots of things i should start doing actually

brisk rose
#

the indendation is pretty screwed up, my b

frosty dock
#

hm

#

does JimbosPack fully override create_card?

#

because the stack trace looks like it does

#

oh ok i see the issue there

opal spade
frosty dock
#

basically randomness doesn't work outside of a run because there's no seed, which shouldn't be an issue normally because there's no randomness with forced keys

#

yet here the random var is generated regardless, even though it's only used in a case where there is no forced key

brisk rose
#

same with if I remove betmma's

frosty dock
#

what's in your common_events.lua at line 2619? mine isn't even reachable if there's a forced_key

brisk rose
frosty dock
#

oh wait nvm i see, it's this

#

should be avoidable by waiting until the game object is initialized though

brisk rose
#

how'd I do that? And does that mean that it needs a run to start to do its thing?

frosty dock
#

no, a game object is initialized as soon as the main menu is entered

#

you'd just need to change what function your hooking onto

tepid crow
#

also wtf is happening with your indentation coonie

brisk rose
#

I was lazy wth copy-pasting, lol

frosty dock
tepid crow
frosty dock
#

probably better anyways if it's prone to breaking with other mods

brisk rose
frosty dock
#

formatters exist outside of ides

brisk rose
#

at least not a functional one

#

I have "auto indent" on, it does nothing

tepid crow
#

might not support Lua

brisk rose
frosty dock
#

yeah I'd just opt for the card constructor at this point

brisk rose
#

this is roughly correct, right?

opal spade
#

I'd put x y as 0s and card params as nil but I'll check the error rn

opal spade
opal spade
#

damn

#

even card constructor doesn't work

#

what's your code rn

brisk rose
#

one sec

opal spade
#

instead of hooking into post inject you should probably hook into something else and loop over G.P_CENTERS

brisk rose
#

idk exactly how to format that though

brisk rose
# brisk rose here it is

also realized I forgot to fix the param for the sprite function, not like it works anyway yet without the card object

opal spade
#

also your current card constructor is passing a number as a card argument when it rlly should be nil instead

brisk rose
#

no longer crashes, now I just gotta debug the image function

#

still outputting blank images

brisk rose
#

and also, the cards are all spawned on the top left of the screen when the game starts, I'm sure that's easy to fix

opal spade
#

you can just add tempcard:remove() at the bottom of the loop to dispose of the cards once ur done with them

brisk rose
mental nacelle
#

found a solution for now, if silent = true then the original version of set_edition() runs regardless of rules

#

this would allow for duplicates to have editions but the original cards wouldn't have editions anyway

brisk rose
crisp coral
#

congo rats

limpid flint
#

woah

orchid thunder
#

just found out my enhancement int broken the game is

#

nvm another mod breaks it

orchid thunder
loud citrus
#

how do you add reminder text? like when stone joker reminds you of stone cards

lusty epoch
#

one example (ignore the vars those are unrelated)

loud citrus
lusty epoch
#

looks good

loud citrus
#

now putting that in the description

#

i have no idea

opal spade
# loud citrus like this?

you can also define it as {set = <set>, key = <key>, specific_vars = {<vars>}} to pull entries that arent centers/to put specific variables in the descriptions

loud citrus
#

is there an example i can look at 😅

#

i'm having a hard time visualizing this

#

wait i'ma try something

opal spade
loud citrus
#

i have this now

opal spade
#

you didnt have to change it lol

#

just telling u about options

#

vanilla uses just g.p_centers for pack info queues

loud citrus
#

oh, okay... when i add it to my description how would i do it? because this probably isn't it

opal spade
#

just C:spectral

#

T: is for deck descriptions

opal spade
loud citrus
#

oh, that makes a lot more sense

opal spade
#

words with T: bring up an item description when you mouse over them

loud citrus
#

that's very good to know, i can hide easter eggs egg

tepid crow
#

wait, T is specific to decks?

opal spade
#

how would you mouse over a word in a joker description

loud citrus
#

oh i didn't think about that

tepid crow
#

oh I see

#

I was about to say I also use it for my sleeves 🙃

loud citrus
#

i'm starting to realize my head is fogged, i'm just doing that comes to thought

opal spade
#

its not that its specific to decks, its just decks are like the one thing in the game that use it

tepid crow
#

yeah exactly

#

cuz decks are the only things that have a description you can hover over in the base game

opal spade
#

the stakes underneath:

tepid crow
#

truueee

loud citrus
tepid crow
#

thunk put anything that could be tooltipped in the full description though

tepid crow
loud citrus
tepid crow
#

what? no

#

like what vars do in localization

#

they replace the #1# stuff

#

(again I'm just guessing that that's what specific_vars does, maybe I'm wrong)

loud citrus
#

i'm so sorry, i'm lost 🐟

#

i've been looking for a mod to take example from

tepid crow
#

it's alright I'm completely lost too

#

localization is quite complicated lol

loud citrus
#

😭

loud citrus
#

i honetly don't know what i'm doing anymore

frosty dock
#

nah you just misspelt loc_vars

loud citrus
#

WHAT IT WORKS NOW
thank you and to everyone who told me how to do it lol

#

YES!!!

#

YES

topaz sun
#

Guys, is there something like get_id() but for suits?

#

basically, a function that would return a string with the suit's name

mental nacelle
#

i mean there's Card:is_suit(suit) which returns a boolean (true if Card belongs to the suit suit)

topaz sun
#

I think that wouldn't work :/

#

I'm trying to store played cards' suits and ranks into a table stored in a joker

mental nacelle
#

you could have it store a different value depending on which suit it is, im not too sure

tepid crow
topaz sun
loud citrus
#

darn it beck to not knowing how to show pinned :(

wintry solar
#

I’m not sure the key for pinned is just pinned

loud citrus
#

i've also seen pinned_left

#

but neither work

edgy reef
#

There are no sticker configs (in vanilla code anyways).

#

You'd have to do info_queue[#info_queue+1] = {key = "pinned_left", set = "Other"}

#

Or info_queue[#info_queue+1] = {key = "pinned", set = "Other"}

loud citrus
#

holy cow i'm learning so much about loc_vars

#

thank you balatroheart

#

also i think hex has a lot better theming now :)

loud citrus
hardy viper
#

(0 < G.hand.highlighted < 5 wouldnt be valid)

lucid sun
#

is there a way for context.open_boosters to only impact boosters opened in the shop? dont want boosters from skips to impact

loud citrus
loud citrus
#

or don't trigger if you're outside the shop

topaz sun
#

Is there a way to print variables to check their values in a given moment in game?

loud citrus
#

if you're looking to check it's as easy at if X = Y then but if you need to print it depends on the context you're talking about

topaz sun
#

I'm storing variables in these two tables, rank{} and suit{}. I suspect they're not storing the values properly, so I'm trying to find a way to see what's being stored

glad wasp
#

I'm making a joker that's supposed to give +10 chips and +6 mult to clubs cards, and it does do that, but the joker doesnt wobble when it activates, and it also doesnt work with wild cards or smeared joker. if someone could help me fix that, that'd be great!

#

heres my code (ignore the comments, theyre leftovers from the template i used)

#

(also im gonna have to do something verey soon so i might not be able to respond to replies right away)

opal spade
opal spade
glad wasp
opal spade
#

open balatro.exe using an archive viewer like winrar or 7zip

glad wasp
#

dang, its that easy?

opal spade
#

it's that easy

opal spade
hardy viper
#

(generally they're the important ones)

opal spade
#

lovely dump = the version of the files the game was using the last time it was launched

#

modified by lovely

hardy viper
opal spade
hardy viper
#

true

opal spade
#

hm

tepid crow
#

if you remove the repo:Steamopollys/Steamodded part from the query, you can see some other mods that also do it

lament zealot
#

Are ya gonna do something for Ankh as well, or no?

umbral zodiac
#

47 copries of one joker

lament zealot
#

I would probably do something like.
Make a Perishable copy of one random Joker.

#

[Also no longer removes Negative from the copy.]

lucid sun
loud citrus
lucid sun
# orchid thunder What you trying to do

I have it set so when a card/voucher/booster is bought the xmult increases, however, when i skip and receive a booster pack the xmult also increasem which i dont want happening

loud citrus
#

personal opinion here, i think that's a cool interaction

lucid sun
#

i dont mind it to be honest cos its definitely worse than actually going to a shop but now am also curious how to make it only trigger in shop

orchid thunder
loud citrus
#

how do i make tabs for my config like cartomancer mod does?

loud citrus
#

also i want my mod to have a built in wiki in the config menu, so when you hover over an option it tells you what it does.

#

gosh configs are so hard 😭

maiden phoenix
#

When you click on a mod in the ingame modlist it already shows what it adds

split jungle
#

can anyone help me add new joker ?

narrow pollen
frigid flame
#

that'd
not give ectoplasm a downside tho

loud citrus
#

i think that's easily abusable but works for higher power mods

#

most people are fine with the decreased hand size

frigid flame
#

like imagine you have stencil joker
you just sell everything else once you get ectoplasm

#

from that point onward ankhs and invisible jokers are your #1 priority

split jungle
#

oi lad is our current version steam loader 1.0.0-ALPHA-0721a

narrow pollen
#

i mean sure, making a joker eternal is more situational of a downside than losing hand size

frigid flame
#

ok but if you make a joker eternal instead of -1 hand size

#

nothing's stopping you from just

#

getting another ectoplasm

#

to me at least, -1 hand size in exchange for turning a joker negative feels like a fair trade

narrow pollen
#

...i suppose i just have a problem with the penalty ramping up the more ectoplasms you get

#

just makes it feel like localthunk is going

"NO. You are having TOO MUCH FUN."

loud citrus
#

what if i removed this in my mod egg

#

though i can see why it's here

brisk rose
#

Just replace ectoplasm with insense from Mika's

#

it dow=es the same thing and costs $50 to use (even if you don't have the cash) and goes up every use

#

losing hand size can be inreconsiliable, this is a balance that doesn;t feel bad

split jungle
#

what mods should I follow to make joker mod

#

I am so bloody confused

narrow pollen
loud citrus
split jungle
#

i loook at them but some wont even load

#

other are too much too see

#

literally a lot

#

I check D6 joker and have no idea where to go

narrow pollen
#

it just feels like you're putting unnecessary limiters on a card that is placed alongside other insanely valuable consumeables that don't punish you for seeing too many of them in the same run

brisk rose
#

it's not normal jokers

split jungle
#

FAIR

narrow pollen
#

it would be like immolate burning one additional card every time you saw it

brisk rose
#

it still has theramping punishment but it's a mich fairer one

narrow pollen
#

or every aura past the first being half as likely to apply an edition to the card

#

it's not the idea of it having a cost that i hate

#

it's just the cost of hand size is so irreconcilable, on top of it being one of the only spectral cards to have a stacking cost mechanic

split jungle
#

@brisk rose which mod should I look at mate

brisk rose
#

I'd pick something like morefluff

#

lots of jokers with standard definitions

split jungle
#

thanks mate

#

checking it out now

#

what does config lua do btw

narrow pollen
#

so i would be fine with a halfway of negative, eternal, and maybe -1 hand size... or, like... cuts your money in half. because after all, it's not always a guarantee that the card that ectoplasm will hit is one you want to keep long-term.

#

or even one that will stick around long-term

#

because imagine ectoplasm hitting a food joker

brisk rose
#

one reason why I don't keep food jokers around usually

narrow pollen
#

or mr. bones

brisk rose
#

an extra joker slot is an extra joker slot

narrow pollen
#

yeah, wouldn't be as bad as with a food joker ig

#

but you get the point

brisk rose
#

yeah, definititely

narrow pollen
#

being locked into a particular joker isn't always a good thing

#

it's one of the more manageable stickers, definitely

#

but it is still something of a downside

loud citrus
#

why does card = self crash my game?

narrow pollen
loud citrus
#

that's the message

narrow pollen
#

so you have to search through G.jokers.cards

#

for a value with an ability.name equal to self.name

#

then set the card key to that value

loud citrus
#

so make ability and self the same as card?

narrow pollen
#

no, like... here, lemme grab my own code for you

#
local joker = nil
for k, v in pairs(G.jokers.cards) do
    if v.ability.name == self.name then
        joker = v
        break
    end
end
return {
    x_mult = card.ability.extra,
    colour = G.C.MULT,
    card = joker
}
#

something like that

#

yes, that is flawed in that it only triggers on the leftmost card when you have multiple, but...

#

if card = card doesn't work, then that will.

loud citrus
#

HOW???

#

it's like saying 1 = 1

#

yeah, duh

#

why does this work???

narrow pollen
#

okay uh

#

here's what i think is happening

#

calculate has a variable called "card"

#

(self, card, context)

loud citrus
#

you made it sound reasonable

narrow pollen
#

and you're putting that value into the list that you're returning

#

with a key of the same name

loud citrus
#

so it prevents card from not being card in this context?

opal spade
#

its a center

#

every vanilla self would be a smods card

loud citrus
#

oh, this is very good to know, so that's why card replaces self

#

and center is used as well

opal spade
#

(the function is run within the center)

opal spade
loud citrus
#

is there a recourse to see how the smods api works? i've been trying to find it but i've just been stuck to looking at other mods

opal spade
#

smods wiki is a bit outdated but generally a good source, lovely dumps and smods code are better at seeing how it all works in practice though

loud citrus
#

okay thank you :)
i'll take a looksy

#

though will it be updated at all?

opal spade
#

smods takes the card's center and makes it do the calculate method using card's self and context

#

because its obj:calculate and not obj.calculate the calculate's self is the obj, not the card thats being passed into it

loud citrus
#

so that's why if card.ability.name == "your joker" then isn't needed

teal estuary
#

i’ve been out of the loop of balatro modding since early this year, has steamodded had any major changes to its API?

#

really got an itch to start making stuff for balatro again, but wanna make sure my existing stuff will at least ‘work’ 😭

languid mirage
#

it did change quite a bit

crisp coral
#

early this year? very

teal estuary
#

☹️

languid mirage
#

there's lots of examples for stuff though

#

you can find example mods in steamodded source code

teal estuary
#

oh yeah i’ve used those before, with varying degrees of success

languid mirage
#

and you can read wiki for docs (though not everything is documented)

teal estuary
#

cool, ty

#

are the docs fully up to date? raisedcateyebrow

languid mirage
#

the ones with the numbers yeah

teal estuary
#

cool, cool

languid mirage
teal estuary
#

seems a lot more finished from before, neat

#

should hopefully be pretty easy to get back into it

#

thank you mwah

languid mirage
#

np

brisk rose
#

I think that what I'm doing with the canvases is stopping the game from loading, but nothing I try helps

#

so, doing a slightly different method for getting the iages, going from @dense jasper 's code and doing s lot of work on my end, I was able to get that working and even overlaying the souls. However, no matter what I do, it hangs indefinitily right before the main menu

#

messages sent kinda out of order

lost rover
#

where do I find the vanilla atlas sheets?

brisk rose
lost rover
brisk rose
#

in the resources folder

lost rover
#

unfortunately im on a mac

brisk rose
#

maybe the mac binary is just a zip too?

tepid crow
#

yeah you should just try unzipping it on mac as well, might work, might not

lost rover
#

part of the problem is also i'm not familiar with code n stuff and theres a lot of folders

crisp coral
#

try 7zip or sth, extracting on mac is most likely possible

#

also rotaeno colab jumpscare

lost rover
crisp coral
#

but yeah im sure there are mac users that have done so

lost rover
#

i give up for now, don't know enough to do anything

limpid flint
#

you just want the vanilla assets?

lost rover
#

yeah

#

for a stupid project

limpid flint
#

I can do that, wait a second

#

There you go

lost rover
#

thanks!

#

better not be malware

#

this mod is gonna take like 50 years to make for me lmao

gilded narwhal
#

Art for all the decks I've made so far

tacit escarp
#

this guy is currently trying to make ai llms play balatro, not very successful so far but pretty entertaining

hardy viper
#

my first balatro mod was a very deterministic random seed balatro ai

#

granted it was mid and only ever got to ante 4, exclusively because i accidentally left in a bug where it would purchase every card it saw in the shop

rough furnace
#

oh I've heard of teej

hardy viper
#

he's gonna have a blast if he hasn't done balatro modding yet /s

tacit escarp
#

i dont think he has

#

:p

rough furnace
#

He is familar with lua though

hardy viper
rough furnace
#

I wasn't familar with lua but I didn't tocuh the ui so I'm sitll okay

hardy viper
#

it's gonna take him awhile to even get a working model of what actions the LLM can choose and how to properly execute those actions

tacit escarp
#

mayb help him idk

hardy viper
#

although i haven't worked with an LLM in ever so

rough furnace
#

is he going to mod the game or use some other way of interacting with it (like screenshots and mouse clicks)

hardy viper
hardy viper
brisk rose
#

LLMs are.... very non deterministic, so good luck interfacing with it with code

hardy viper
#

hes loading a lua file via steamodded so

rough furnace
#

I have interacted with llms with code and they sure are not detemrinsitc

hardy viper
#

aceually I did work with an LLM once

tacit escarp
hardy viper
#

now that i think about it

rough furnace
#

oh he made an auto reload

#

neat

#

I should send him DebugPlus's watch command

#

or steal his watch command

#

depending which is better

hardy viper
#

if i still have my old code for my balatro "ai" i could probably just send him snippets if he needs them

#

or rather he could just like join here lol

#

but if he's doing fine he's probably gonna be ok

rough furnace
#

I should join the stream after my class

brisk rose
rough furnace
#

I mean setting the heat to 0 or whatever makes them detemrinsitc doesn't it?

mellow sable
mellow sable
hardy viper
#

don't make the man use python smh

mellow sable
#

In that case the replay part of Ankh could probably be modified to accept actions on the fly

hardy viper
#

oh probably yeah

brisk rose
#

preformance be damned

hardy viper
brisk rose
#

reminds me of the idea I had once to make a modular pokemon fangame in python where you could supply your own assets and iwell... it'd basicallly be an engine for pokemon fangames

rough furnace
brisk rose
hardy viper
brisk rose
#

no, but I presume there's a reason it's used for games a fair bit more than python

rough furnace
#

It's much easier to embed

hardy viper
#

that

brisk rose
#

fair enough

hardy viper
#

love2d (internally) is rust right? or is that just lovely

rough furnace
#

love2d is cpp lovely is rust

hardy viper
#

it's cpp

brisk rose
#

I guess the difference between an interpreted language and a jit language isn;t gonna be much, especially because python can be jit or even aot compiled apperently

rough furnace
#

but it's using luajit for it's lua runtime which is c

brisk rose
#

and yeah I know love2d itself is cpp

#

see, I know.... very little about the technical side of languages and all that

hardy viper
#

i might know some someday

#

someday...

brisk rose
#

I'm just pleasently surprised I was able to figure out how to overlay a cards soul sprite if it has one on the main sprite without asking for help here (and without having to make the card object)

#

and then ofc @dense jasper took my hacky implementation (which to be fair was built on their code as a base which coulsn't do that part yet) and made it actually work without hanging the game and not being super nessy and full of unnessacary nonsense

gaunt thistle
hardy viper
#

interesting

gaunt thistle
#

Math will probably refute what I'm saying but Lua's math performance is probably why mods like Cryptid work so well

#

I've considered exposing some native math functions via Lovely but it's not really necessary

regal wolf
#

Lua is actually a pretty fast language for what it does

#

But the great thing about Lua is, if you need speed, you can use the C API

gaunt thistle
#

Yeah, and the FFI layer is pretty simple

#

I do wish that Lua had preemptive multithreading

regal wolf
#

Yeah, me too. It’s one of the biggest downsides to Lua tbh.

gaunt thistle
#

I wonder if there would be any value in Lovely spawning a separate compute process entirely for score calculation.

#

That way the game isn't as likely to die

regal wolf
#

I feel like it might just create more problems?

gaunt thistle
#

absolutely

regal wolf
#

Also, the mods that crash the game are definitely not well optimised from the ones I’ve seen 💀

mellow sable
rough furnace
mellow sable
#

Theoretically you could write a program to run all of Balatro’s calculations in FFI, but that wouldn’t be practical

rough furnace
#

also good luck supporting mods

hardy viper
#

compute time isn't even the limiting factor atm so

gaunt thistle
#

afaik you can override Lua's math operators

mellow sable
#

nope!

hardy viper
#

only for non numbers

gaunt thistle
#

yikes

mellow sable
#

otherwise people wouldn’t need to make Talisman compat

hardy viper
#

adding 2 numbers together completely ignores metatables yeah

gaunt thistle
#

what an annoying limitation

mellow sable
hardy viper
#

i feel like the whole "math is quick" thing would go down the drain if you checked for a metatable whenever you did an operation

#

but what do i know about stuff that low

gaunt thistle
#

and like I said, Lua math is super fast

#

I think that we could solve a lot of problems if we simply deleted math

maiden phoenix
mellow sable
#

clearly he meant Mathguy

maiden phoenix
#

From MathIsFun to MathIsNotFun

languid mirage
#

mathisgone

maiden phoenix
mellow sable
mental nacelle
mellow sable
#

Call it MathIsDone_

rough furnace
#

can I get all text in a uibox

maiden phoenix
hardy viper
rough furnace
#

pefereably

hardy viper
#

then idk

tepid crow
hardy viper
#

oh wait

#

you mean all text contained in a uibox

#

not getting all text in every uibox

rough furnace
#

yes

hardy viper
#

mb

tepid crow
stray orbit
#

how can i use create_card or SMODS.create_card to make cards with a specific enhancement

#

playing cards i mean

#

cant seem to make it work

wintry solar
#

Think you just need to set the enhancement afterwards

rough furnace
# rough furnace can I get all text in a uibox
local function stealText(table)
    local text = ""
    if table.config and table.config.text then text = text .. table.config.text 
    elseif table.nodes then text = text .. stealText(table.nodes)
    else
        for k,v in ipairs(table) do
            text = text .. stealText(v)
        end
    end
    return text
end

local card = test
card:hover()
local tab = card.ability_UIBox_table.main
card:stop_hover()
local fin = "" 
for k,v in ipairs(tab) do 
    fin = fin .. stealText(v) .. "\n"
end
return fin
tepid crow
#

like a thief in the night...

loud citrus
topaz sun
#

Guys, how can I make a joker check +mult and xmult added to score by other jokers that triggered before?

#

Is it possible without lovely patches?

wintry solar
#

No

#

Well

#

Unless you rerun the calculations and collect the results

topaz sun
#

Sorry, I'm a little in over my head here

rough furnace
#

what are you trying to do here?

topaz sun
#

I'm trying to implement this. The idea is to take an already calculated joker, grab the amount of Xmult it aded, multiply it by 0.1 and have Integral use this value during its own calculation

rough furnace
#

Uhh I would check how cryptid exponetia does it

topaz sun
#

Will do, thanks

topaz sun
#

Damn, it's basically the same thing lol

stray orbit
mental nacelle
#

how would i select a random joker?

mental nacelle
#

nvm got it working

brisk rose
#

Is there a way to use a custom sprite (that the shader still gets applied to ofc) for a given edition? I have an idea for #1292971421349445785 (not at all my project but it'd be cool to contribute) where the pokemon is shiny if the card is negative

#

Relatedly, how would i have to edit an image so that the negative shader turns it back to normal?

rough furnace
brisk rose
opal spade
#

It would make sense to look inside the actual shader to see how it does colors

opal spade
#

then they wouldn't need editing for negatives

brisk rose
#

Hmm, not a bad idea

opal spade
brisk rose
opal spade
#

tbh silly idea but I'd just make it so when a pokemon joker is created, it runs the actual shiny check

brisk rose
brisk rose
#

Like it's an obvious idea but the closest thing I know to it is just writing a script separately and feeding it what you have

opal spade
#

tbh, if there's that much redundant code, why not write it in a more automated way

brisk rose
opal spade
brisk rose
opal spade
#

no I mean like

brisk rose
#

I'd much rather have normal smods.Joker definitions for every joker, etc, etc in the final product

opal spade
brisk rose
#

And I hate the how it is to navigate the file after

opal spade
#

I mean you could make a table that represents all the unique parts of each joker and then iterate over it to fill in the missing redundant code fields procedurally

#

so the initial table looks like a set of smods jokers

brisk rose
#

I have an aesthetician preference for anods.joker objects being drag and drop modular

#

With everything being in one place

#

Jestobiology did do something like that and I had to feed it into chatgpt to get bare joker definitions to add

#

Because lazy

#

And wasn't yet trying to code again

edgy reef
#

Ideally I hope for either everything in very few files or everything neatly separated so browsing isn't hell

#

(although actually making every object separated involves convoluted loading setups)

#

xdd

brisk rose
#

But browsing is still nice at least

edgy reef
#

It does come with the small benefit of feeling nice that you're making big progress on a mod update (this is 80% cosmetic + cleanup and 20% rebalances, legit nothing new yetbalatrojoker).

frosty dock
#

I mean I usually just use global search to browse

#

but I agree it's nice structurally

brisk rose
#

And here I am using xed she is I truly needed to do a global search if have to use grep in the terminal, lol

#

Actually that night not be true. Xed might have more support for project-like features than I use one give it credit for

regal wolf
regal wolf
wintry solar
opal spade
glossy stone
#

my descent starts now, i wanna get to modding after c++

glossy stone
#

like any resources to start learning how to make mods

opal spade
#

reading smods wiki and looking at smods example mods is a good starting point i think

glossy stone
loud citrus
#

why does this say juice up is a nil value?

tepid crow
#

do you have the full error? I'm guessing it's because the first argument doesn't have a juice_up function defined though

loud citrus
#

yeah, it says it lies with commonevents

tepid crow
#

yeah so self:juice_up(...) doesn't exist

crisp coral
#

pass card instead of self

loud citrus
#

right i forgot 😭

#

Thank you

hardy viper
#

self is card.config.center iirc

wintry solar
#

@mellow sable retrigger question, if I've got a joker that copies an effect, like blueprint, how am I getting any text to appear under my joker rather than the copied card?

mellow sable
#

Look at how I patched blueprint (or how old blueprint works in Cryptid)

#

I don’t fully remember what changes I made lol

wintry solar
#

I don't get messages appearing under blueprint though

#

they appear under the copied card

rough furnace
#

I noticed that too

#

I think it might be a smods bug

#

it happens on scholar

edgy reef
#

I saw it as well without Cryptid

#

It's likely a context.blueprint_card oversight.

#

I know that's used to point to Blueprint/Brainstorm or the card being copied.

#

Which would change any text eval to show up on that card.

zinc zenith
#

Hello all sorry if im in the wrong place or anything. I've got an idea for a mod but have 0 idea of where to start the whole process. I'm familiar with lua scripting and general programming (largely python) and could figure out how to get stuff rolling once I know how to start digging around.
Is there some place with a 101 intro into pulling source code and explaining the injectors for those trying to create mods?

glad wasp
#

i saw someone say i should add self:juice_up to a joker to get it to wobble, but idk where to add it in the code, as when I try to the game crashes.

#

and while I'm at it, blueprint is saying my joker is incompatable with it, when it's a simple +chips and mult per card joker. do I have to manually set up blueprint compatibility or?

#

wait, i just tried blueprint with it, and it actually worked?? despite it saying it was incompatible???

nocturne garnet
#

change blueprint_compat to true

nocturne garnet
glad wasp
#

here's a snippet of my code, (where card:juice_up currently is is just to visualise where ive tried to put it individually. i never put it in both places at the same time)

north prairie
#

where does one get the spritesheet for the jokers

wintry solar
glad wasp
wintry solar
#

oh wait

#

it's card:juice_up()

glad wasp
#

ah

glad wasp
rough furnace
#

whats the crash?

glad wasp
#

hold on, lemmie trigger it again and ill send the log

rough furnace
#

you have a syntax error

#

Would need to see your code

glad wasp
rough furnace
#

oh it might not like having a juice_up after the return

#

and even if it did it would never run

glad wasp
#

ok, now i'm back to square one.
where should I put it?

rough furnace
#

above the return

#

you have 2 in the shown code

glad wasp
#

i have put it above the return before, and it crashes

rough furnace
#

can you just send the full code?

glad wasp
#

...ok ignore what i last said

#

it works now

nocturne garnet
glad wasp
#

...ok when i said it works i just meant it didnt crash on start up, apperently.

#

now, if i use card:juice_up(), nothing changes, and if i use self:juice_up(), the game crashes when it's triggered.

rough furnace
#

by any chance does it juice up immediatly after pressing play hand?

wintry solar
#

can you send the current code?

glad wasp
#

yep, didnt notice that before.

rough furnace
#

yeah you need to make an event then

glad wasp
#

ok, how do i do that?

rough furnace
#

I don't have access to stuff rn

wintry solar
#

wilson posted a lovely guide to the event manager this morning

glad wasp
#

nice, was it in this chat or somewhere else?

wintry solar
#

yeah this one

topaz sun
#

Why does it crash with '<name>' expected near '5' ?

rough furnace
#

that is not how for statements are formatted

topaz sun
#

Thanks

#

I'm truly a buffoon

wintry solar
#

ahhhh, figured out the blueprint message issues

royal brook
#

Odd question, and apologies if it's dumb, but I understand that the Priority system means that mods with a higher priority are loaded after those with a lower priority, yes? Would I still be able to detect that e.g. a certain mod is installed?

If you're curious about the use case, i'm wondering if I can detect if Jen's Almanac is installed and add some Token Cards to match with Tags I also wanna add. it's not a super huge issue i'm just curious if it was possible

rough furnace
#

for steamodded the smallest priority is loaded first and then the one's with higher priority get loaded. So if you have a smaller priority then Jen's, all of Jen's stuff shoul;d be loaded then

tepid crow
#

yeah, it loads them from -inf -> +inf

rough furnace
#

sory you need a higher priority then jen's

#

I said smaller in my message

tepid crow
#

you can still check if a mod exists using SMODS.Mods[id], and check if it's loaded with .can_load, even if you load before the other mod does

#

(iirc)

royal brook
#

I see

rough furnace
#

Unfrotuatnly for you jen has inf priority

royal brook
#

Like I said it's not a big issue (I'm still spriting aha) so if it doesn't work i'm not too miffed

wintry solar
#

it'd be (SMODS.Mods[id] or {}).can_load

#

I don't know jen's id though

tepid crow
#

^ that's the safe way to check

rough furnace
#

mod id is just jen

royal brook
#

no but the help is appreciated

rough furnace
wintry solar
#

without having looked at the internal stuff though, I'm pretty sure priority is for injection order and that the mods are loaded all at the same time

rough furnace
#

lovely and steamodded both have priroties

tepid crow
#

I thought steamodded first collected all the mods, then loaded them in order of priority

rough furnace
#

it does

tepid crow
#

and lovely priority being a completely separate thing

wintry solar
#

yeah but the priority isn't for assigning whether the mods are present or not, thats all done before the priority kicks in

tepid crow
#

yeah that's what I meant with "collecting all the mods"

rough furnace
#

oh yeah sorry I was thinking in cases where you want to detemrine if an object was regiusteered

#

like if you want to take ownership

wintry solar
#

ah yeah, in that case you'd need a higher priority

#

or if you're using a type thats defined in that mod

tepid crow
#

only if you want to directly interface with that mod yeah

regal wolf
rough furnace
#

Idk I'd ask jen

regal wolf
#

Surely not right?

tepid crow
#

Jen said he doesn't want any other mods to build off of almanac

rough furnace
#

I mean you nifht wabt to have a higher priority if you modify quite a few other mods stuff but inf is not nessicary

tepid crow
#

setting priority to inf is definitely a way to do that, I guess

rough furnace
#

I mean we could just fork the almanac

regal wolf
#

yeah exactly

#

It’s literally open source

tepid crow
#

¯_(ツ)_/¯

regal wolf
#

That’s kinda cringe lol

#

Also Jens almanac source code isn’t publicly accessible anymore to my knowledge, which goes against the modding rules…

hardy viper
#

you can just join the cryptid discord and look at it so 🤷

brisk rose
#

But he does post download links in the channel I think

regal wolf
hardy viper
#

being able to download the source code is 100% good enough though

brisk rose
#

A server he controls is not public by definition

#

In theory he did ban whoever he wants

regal wolf
#

^

hardy viper
brisk rose
#

Wait it is the cryptid server not his

hardy viper
#

he has admin there so

tepid crow
#

it's not his server, no

brisk rose
#

But still

tepid crow
#

I'd argue that as long as it's not an exe/obscured code (e.g. lovely's exe), the files itself being available for download are "public" enough

regal wolf
#

Maybe I'm misremembering something else, but I swear the code had to be accessable on github.

regal wolf
mental nacelle
#

that sort of infers the github thing then

brisk rose
regal wolf
brisk rose
#

Fair

tepid crow
#

I also prefer people putting their code on github, makes it easier for me too

regal wolf
brisk rose
regal wolf
#

the whole idea of source code being viewable is so that there are no bad actors.

brisk rose
crisp elbow
#

I mean gplv3 is technically required for any steamodded mod

#

I think

brisk rose
regal wolf
#

A lot of mods also have copied code from the game

tepid crow
edgy reef
#

Altho idk what would actually happen with liscence conflicts like this

crisp elbow
#

Yeah that's what I thought it's implicit

#

Because you're using the modding api and code from a gplv3 project, your project is technically gplv3

regal wolf
#

Yeah

brisk rose
#

Though I guess the gpl doesn't really prevent Jen trolling addons

#

It just makes it unenforceable

regal wolf
#

Wait, no ankh does

crisp elbow
#

Ankh is also a lovely mod

#

I thought not smod

regal wolf
#

that's also true

languid mirage
#

I mean, the rule doesn't say that code needs to be on github

#

it's not a closed source

#

you can download and see the code

regal wolf
#

well

languid mirage
#

unless Im misunderstanding it

tepid crow
crisp elbow
#

The rule does leave a little lax inerpretation

regal wolf
#

it depends on how the mods see it i guess

crisp elbow
#

I usually interpret it as publicly viewable source code before download

regal wolf
#

but you can get viruses, etc from even just downloading a file. (0-click ios exploit, for example)

regal wolf
crisp elbow
#

Something you can clone from a git and see what it actually has in it

#

Before you do that

brisk rose
crisp elbow
#

Technically every steamodded mod is "open source" code though

#

As in it isn't obfuscated

regal wolf
#

there are a lot of poeple who try to mod the game who are not at all "technologically savvy"

languid mirage
#

well, some projects like #1276894022656462910 I dont feel comfortable posting on github, as it's 1-1 ported balatro source code

so that means its breaking the rule?

brisk rose
crisp elbow
#

Well that isn't a mod to the game

languid mirage
languid mirage
regal wolf
#

Do not redistribute the Balatro source code.

brisk rose
tepid crow
brisk rose
brisk rose
regal wolf
#

It does, but It also extends to not shipping parts of the game as other things.

brisk rose
#

It says "the"

#

Which implies the whole thing

regal wolf
#

No not really

#

The only implies there is only one source code. which is true.

brisk rose
#

"Don't redistribute Balatro source code" would be different

#

Count vs collective noun

languid mirage
regal wolf
languid mirage
#

Ig

#

that's why I'm only posting on discord

limpid flint
#

I think I am out of the loop

languid mirage
#

it should be within the rules, as it is game's source code. within modding section

#

it's as if I only posted a snippet of it raw

#

because instead of having it in zip files, I can just post it in separate messages

regal wolf
#

I think it's fine in the context of balatro, but if you were to then advertise it as seperate from Balatro you might have problems.

languid mirage
#

I'm not advertising it for anything other than balatro tbh

regal wolf
#

No exactly

tepid crow
regal wolf
#

I think it's a good idea to put the code on github though, and just referece balatro where necessary.

crisp elbow
#

Yeah I don't usually like downloading mods directly from discord especially if they update it that way because like.. it seems horribly inefficient too. I'm the type of guy who would wanna push every thing once i'm done with it and have it be rolling when adding new features then just making releases only

brisk rose
#

I should really tell people how to clone it instead of only distributing it as a zip (and now Dim's manager)

limpid flint
#

It (manager) is far from perfect but it's good enough for me

crisp coral
#

posting it as a zip directly doesn't matter, as long as you can still see all the code inside

#

(which is why Ankh is like. technically legal)

rough furnace
rough furnace
#

Oh well the zip is shared here so it's accessible by the peolem here

crisp coral
#

honestly i have no clue how he isn't able to manage github repos for his mods but

#

whatevs

regal wolf
#

I have a feeling its something to do with the whole "no one make addons"

regal wolf
rough furnace
#

I mean they are about as easy to check for viruses as a githuv repo

#

Possibly easier Becuase they can't change very easily where a repo can be changed at any moment

crisp coral
#

which idk if he has asked Lyman for permission to use the art. definitely don't see anything crediting him tho

brisk rose
#

Yeah attribution apparently is a requirement of the gpl when used properly. Though for code snippets I feel it's pretty optional in practice. The images though should be credited at least to the original project

#

I mean I left Lyman and itafayder in the mod authors for defused as well as everyone listed in that "expansion" which feels sufficient

crisp coral
#

i mean, here credit is needed because you're building on top of FusionJokers

#

same should be applied to Almanac's ThAC consumables

brisk rose
#

True though not exactly how I would word it v/ think about it

regal wolf
#

That’s very ironic…

rough furnace
# regal wolf Commit history ?

I can overwrite commit history and also one commit could do a bunch of work that in one commit that makes it hard to tell if malware was added or not, (and that's even if you chrkc the commit history)

regal wolf
#

Hard, but not impossible

#

Nothings perfect but there’s no point trying to argue that discord is just as safe as GitHub.

rough furnace
#

I mean if your using githbu releases it's litterally the same as it's just an uploaded zip

regal wolf
#

I still think GitHub is much safer overall.

rough furnace
#

I don't think it makes a difference

#

saftey wise

loud citrus
#

I've decided how to nerf wee joker, and this nerf will make wee joker more interactive and targets it's dependency on retriggers.

brisk quartz
#

not the wee joker

loud citrus
#

Don't worry, it will still be overpowered but not instantly run winning when you get any form of retriggers.

#

I'm too afraid to nerf it any farther, the masses will eat me alive

brisk rose
#

I guess rare shouldn't mean anything /hj

loud citrus
#

What 😂
Rare shouldn't be the reason you can win a game as your only joker, have you seen the chips only run?

#

It is the best source of chips right now without question in my mind

opal spade
#

jen's almanac itself builds off cryptid, then why aren't other mods allowed to build off it

loud citrus
#

That reminds me, I should put something up saying anyone can use my code

tepid crow
brisk rose
#

The idea of just playing vanilla with a rebalamcing mod isn't part of my universe

#

But I'm sure it makes sense in that context

tepid crow
brisk rose
#

I'd be flattered if anyone wants to build off DeFused

royal brook
#

not saying it's that big of a deal but like. cmon man

loud citrus
# brisk rose The idea of just playing vanilla with a rebalamcing mod isn't part of my univers...

That's why it's all optional, I'm making this mod for three types of people, those who want buffed vanilla content to compare to mods, those who want a new vanilla experience and those who desire a balanced experience. The config allows for all three of these wants to be met.

Personally i stand with the three of the desires i mentioned, but the one I stand with most is a balanced experience.

The change to wee joker is played 2's instead of scored 2's, removal of one synergy to hopefully add many others.

brisk rose
#

Hmm. Interesting

#

Only really synergies with poker hands under 5 cards

#

So not for me, but for at the very least all those brain rotters and mercurisns out there

loud citrus
#

I'm going to take this as a compliment? 😂

brisk rose
#

Neutral connotation tbh on the specifics. But complementing your grasp of GameDesign™️

tepid crow
#

I'm a proud brain rotter

brisk rose
tepid crow
#

flushing skibidi toilet till I sigma

brisk rose
#

Gotta have my Iuppiters

opal spade
loud citrus
frigid flame
#

so i want to get into modding

#

but chrome is deleting lovely injector whenever i try installing it

#

anyone know how i can get around this?

glass scaffold
#

btw how do I get Cryptid to work with Proton?

#

I need to find the location to drop Cryptid and things like that

frigid flame
glass scaffold
#

Odd

tepid crow
frigid flame
#

never thought trying to mod in Kitchen Tiles would end up being this much of a hassle /j

frigid flame
#

ok onto step 2

#

ok i just allow this, right?

tepid crow
#

there's a whole section about win defender if you scroll down a bit in the guide

frigid flame
#

a console looking thing popped up while the game was open, did i do it right?

tepid crow
#

that's the command prompt, it allows lovely, steamodded and other mods to actually output stuff

frigid flame
#

alright

tepid crow
#

having that open means lovely is working at least

frigid flame
#

now i just put steamodded-main in the mods folder, right?

#

AND THERE WE GO

#

so uh

#

now what?

limpid flint
#

Fun begins

#

Add mods ofc

frigid flame
#

does this mean i get to make kitchen tiles now?

limpid flint
#

What kitchen tile

tepid crow
frigid flame
#

Kitchen Tiles
"Stone Cards are considered Spades (suit changes every round)"

limpid flint
#

oH

#

Yeah boy

frigid flame
#

(preferably i'd want to go with how ancient joker determines the chosen suit)

#

how hard would this be to code?

#

as a starting joker?

limpid flint
tepid crow
narrow pollen
#

isn't there a function like... card:is_suit or something?

#

so there is!

frigid flame
#

trying to figure out how to add a joker rn

frigid flame
#

yeah uh

#

i don't think i have the mental capacity to do this lol

gaunt thistle
#

you absolutely do

frigid flame
#

the mod won't show up in the list

brisk rose
#

Also idk if you have every thing for a header. I can't recal. It looks a bit sparse though

frigid flame
#

judging by that message

#

because i uh

#

understood none of that ;-;

brisk rose
#

Might be more comprehensible now

#

Basically just copy the exact header formatting from any 1.0 mod, including the stuff with all the dashes

loud citrus
#

does anyone know why my other half of the config isn't showing? i'm using the config from cardsleeves as a base

brisk rose
loud citrus
#

shouldn't be, lets find out

brisk rose
#

yeah I think I was looking at it wrong

loud citrus
#

it's not the problem

#

oh poo

crisp coral
#

the left side needs to be in a column node

loud citrus
#

i don't think i did it right, still having the same problem

#

hold on

#

oh god

languid mirage
#

your first one is G.UIT.R (row), and the other one is G.UIT.C (column)

#

they need to be both either row or a column

tepid sky
regal wolf
#

G.UIT.B is the most disappointing node to ever exist

#

IIRC u can’t give it children

tame condor
#

hello i would like to decompile balatro to know the names of the states and actions so i can add a "press space" for next round

i get this when i run balamod with -d flag.

[ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: PathNotFoundException: Cannot open file, path = '/home/user/.local/share/Steam/steamapps/libraryfolders.vdf' (OS Error: No such file or directory, errno = 2)

i am working in linux.

hardy viper
#

first of all balatro is not compiled until runtime

gaunt thistle
#

do you just want to look at the game's source?

hardy viper
#

you can view the contents of the exe using 7zip or a similar program

#

i use a file explorer extension

#

forget what its called

tame condor
#

oh ok that should be faster thanks

gaunt thistle
#

w11 has native 7z explorer support hehe

hardy viper
#

oh sick

tame condor
#

so do i like rename the exe as 7zip?

hardy viper
gaunt thistle
#

no need

hardy viper
languid mirage
#

on linux you probably do?

#

also

#

you rename it to just .zip

#

and open as an archive

tame condor
#

i did 7z x Balatro.exe and that worked so yay

#

thanks

hardy viper
#

oh linux

languid mirage
#

k good to know

brisk rose
#

or any number of other ways probably

languid mirage
#

oh I misremembered then. I think you have to rename on mac

tame condor
#

so i found the cash_out function and i would like to know why simply calling G.FUNCS.cash_out() doesn't work?
i just want a SPACE keypress to trigger a cashout

primal robin
tame condor
#

hmm interesting how so

primal robin
tame condor
#

oh thank you this is indeed super handy!

languid mirage
#

you can find exact place of it being used if you search G.FUNCS[ across all files

languid mirage
#

ctrl + shift + f

#

if you're using vscode

tepid sky
#

ooh nice

#

i didn't know there was a shortcut for it lol

tepid sky
limpid flint
#

Do you guys think we can make a mod that reduce/skip animations even further?

hardy viper
#

nopeus unsafe is good enough

crisp coral
#

balatro with too many qol mods plays itself

#

/ref

limpid flint
#

I haven't tried that, but the animations I have in mind are like these:

  • cards flying in before title load
  • main menu buttons flying in from bottom
  • new cards unlocking
  • the single card transition going in/out of runs
  • blinds/cash-out/shop popping in/out from below screen
#

Mostly UI flying around

hardy viper
#

the only thing i can imagine speeding up the game would be to run batches of frames at once and only draw on the last one

#

which would speed up ui

#

and everything else

#

but like 3 times the speed for half the framerate is pretty bad

limpid flint
#

Yeah I don't think I know the UI stuff well enough to understand the technicality of this

hardy viper
#
FRAMECOUNTER = 0
local numFramesPerFrame = 3
local oldupd = love.update
function love.update(...)
 for i = 1, numFramesPerFrame do
  FRAMECOUNTER = FRAMECOUNTER + 1
  oldupd(...)
 end
end

local olddraw = love.draw
function love.draw(...)
 if FRAMECOUNTER%numFramesPerFrame == 0 then
  olddraw(...)
 end
end

something like this ig

languid mirage
#

pretty sure animations are controlled by dt (delta time), otherwise having higher FPS would speed up the game

hardy viper
#

well yeah

#

that'd run 3 frames at the same dt as 1 frame so effectively 3 times the speed

#

although you could just run 1 frame at 3 times the dt

#

with little difference

languid mirage
#

not little

#

3 updates is 3 times more intense than 1 update

hardy viper
#

yup

languid mirage
#

so you'll just be losing performance

hardy viper
#

there's a reason nopeus doesn't do it 🤷

limpid flint
#

So at best we can only speed it up, not skip them entirely

languid mirage
#

you can skip them

#

function Moveable:hard_set_VT() does that

#

every Moveable UI element has T and VT

#

T is "real" location/rotation of the element
and VT is "visual"

#

VT eases into T over time

#

which is the core of animations with this UI engine

#

that's what I do in cartomancer for jokers zoom

#

small difference is that CardArea has hard_set_cards that does it for me

plush stream
#

So... memorable...

loud citrus
languid mirage
#

you can search UIT = to see what's in the table

#

in source code

#

would help understand UI stuff a bit more

loud citrus
#

Oh yes this Will be so helpful balatrojoker
Thank you so much!

#

Now I need to know if it's possible to give a description of a config by hovering your mouse other the toggle

tepid crow
#

You can have a description below a config option

loud citrus
#

Yeah but I want to write a lot for each one 😅
Kind of like a built in wiki

opal spade
#

I don't remember how but it's an option

plush stream
opal spade
#

iirc galdur has that so you can see there

opal spade
tepid crow
plush stream
#

Oh no... too much memories

loud citrus
tepid crow
#

You could also hook the hover function I suppose

tepid crow
#

Are you talking about the config menu?

opal spade
#

ye

#

info argument of create checkbox function

tepid crow
#

no, that's not on hover

#

that's the "description below" I kept talking about

opal spade
#

damn

tepid crow
opal spade
#

strange that I remember there being a hover tooltip but that must be some mandella