#💻・modding-dev

1 messages · Page 103 of 1

hardy viper
#

ya that is like unnecessarily thunky

analog atlas
#

yeah, lmao

teal estuary
#

tbf i'd do the same

hardy viper
#

you can just do #G.jokers.cards * 0.5 *card.ability.extra.Xmult

#

unsure why this wouldn't be happening asynchronously

teal estuary
#

im gonna presume no, but is there anyway to tell if a player has their playing cards set to be a collab icon and not the normal icons?

hardy viper
#

wouldn't? would? im not even sure

#

i haven't done luau stuff in ages

#

way out of my depth

robust sapphire
night pagoda
#

new fluorescent shader for Bunco 👀

hardy viper
#

nice

hardy viper
robust sapphire
#

if async is the question it’s a yesn’t

#

coroutines are synced to the main thread from what i know

#

in luau

#

lua it’s different

analog atlas
#

hold up

hardy viper
analog atlas
#

Fixed the message bug, but the description says that it has xnil

hardy viper
#

send locvars

analog atlas
#
        text = {
          '{C:mult}+X#0.75#{} Mult for',
          'each {C:attention}Joker{} card',
          '{C:inactive}(Currently {C:red}x#2#{C:inactive} Mult)'
        },
hardy viper
#

that is loc_text

#

not loc_vars

#

wait huh

#

#0.75#

#

??

analog atlas
#

Thats the mult amount

thorny adder
teal estuary
thorny adder
#

that looks sick

hardy viper
#

nono that is for an index for the table returned from loc_vars

thorny adder
#

I want all fluo screen

#

all

#

everything

#

all jokers

hardy viper
#

you don't have an 0.75 index (i mean you can but don't do that)

thorny adder
#

all

teal estuary
#

#1# is for the first thing in loc_vars, #2# for the second, etc etc

night pagoda
thorny adder
faint yacht
#

the 🟣

thorny adder
#

as a colorblind

#

it helps

#

lmao

teal estuary
#

MY EYES

#

RAGHHHH

thorny adder
hardy viper
#

as a non colorblind they should improve the cs anticheat

thorny adder
#

skill issue

robust sapphire
# hardy viper #0.75#

would that not be in base text (i literally have no idea) cause {} is the wrapper for variables so wtf would “# #” be

#

cause # would be length if written like code

hardy viper
#

this is in a string

#

it's just formatting

analog atlas
#

so where can I put in the locvars?

hardy viper
#

just change the 0.75 in the text to 1

#

and i imagine you've handled locvars correctly

#

but you haven't posted it yet so i can't know for sure

analog atlas
#

How do I make them? I'm new to lua

hardy viper
#

hm

robust sapphire
# hardy viper it's just formatting

wait wait wait i haven’t had to do this because i’ve just been using .. but is there no like f string functionality to do like Cash: {cash}

#

ok backticks show up as formatted code on discord

#

imagine backticks there

teal estuary
hardy viper
#

this is a balatro thing

faint yacht
#

I think they implied the `formatting`.

teal estuary
#

np

hardy viper
robust sapphire
hardy viper
#

and string.format uses % or smth

edgy reef
#

yea

cursive ocean
#

Anyone know how to get the V:1 part of this to work (or what it is) in my mod's i18n file? (e.g. from Ancient Joker)

text={
    "Each played card with",
    "{V:1}#2#{} suit gives",
},

I'm getting aaa string: "attempt to index field 'colours' (a nil value)"

#

Ooh maybe it's that i'm using plural

#

For the suit

cold peak
#

Where in the source code would I find a specific joker's functionality? Specifically looking for the Marble Joker

cursive ocean
cold peak
#

Am I blind? I thought I checked there

#

Ty

#

Is there an easy way or some example of how to override this function well? I tried overriding the calcluate_joker function but now I'm getting double triggers, one of mine and the vanilla one

teal estuary
#

this is probably going to be similar to "how make joker spawn when x joker is y", but how would i make a joker only spawn if the player has another joker discovered?
i want a joker to only appear in shop when the player has blueprint and stencil discovered, but no idea how to do it code-wise 😭

cold peak
violet void
#

I used Pokermon's lovely.toml as a reference

frosty dock
#

it's a variable color basically

cursive ocean
#

Aha I thought that might have been a global thing that somehow wasnt accessible in the mod context, but it looks like it's defined on the joker itself

cold peak
violet void
cold peak
#

gotcha

thick panther
#

Is there a voucher equivelant for SMODS.create_card?

cursive ocean
# frosty dock that needs a color returned in loc_vars.colours

Hmm do you know where to define these colors? I'm trying this but getting the same error :[

SMODS.Joker:take_ownership('ancient', {
    loc_vars = function (self, info_queue, card)
        return {
            key = "j_dogmod_ancient_t" .. card.ability.extra.tier, 
            vars = {card.ability.extra.x_mult, G.GAME.current_round.ancient_card.suit, DogMod.globals.ancientUpgradedSuit},
            colours = {G.C.SUITS['Hearts']}
        }
    end,
})

and

['j_dogmod_ancient_t1'] = {
    ["name"] = "Ancient Joker",
    ["text"]={
                "Each played card with",
                "{V:1}#2#{} suit gives",
                "{X:mult,C:white} X#1# {} Mult when scored,",
                "{s:0.8}suit changes at end of round",
              },
},
#

Crashes when I add the V:1 thing :[

balmy stump
#

whats the difference between g,playing_cards and g.deck

mystic river
frosty dock
#

vars = {..., colours = {...} }

thick panther
#

Do these seem reasonable? Should it be rarier like a 1 in 8?

#

Forgot to add the commas after chips and mult. Its three differet things, not 2.

cursive ocean
thick panther
#

How do you make a joker debuff the hand, like some boss blinds?

weak depot
#

how would one get the hand played and current info / chips / mult in the score ticker? i'm trying to get something that upgrades a hand during a played hand to go back to the ticker for the hand played. it's confusing but

#

any help?

hardy viper
orchid thunder
#

it works just text is broken

hardy viper
#

i also know cryptid implements functionality for buying multiple vouchers at a time

thick panther
orchid thunder
#

yeah redeemed deck

hardy viper
#

that sounded a bit rude mb

#

but

#

check how those boss blinds do it

thick panther
hardy viper
#

ah

hardy viper
#

you could just check the code in that function

#

and/or copy it

edgy reef
#

Assuming that is is a joker like "if x condition true, debuff hand" then it's just 1: checking if the joker exists, 2: checking if x condition is true and 3: returning the value required to indicate the hand is debuffed (return true I think?).

hardy viper
#

i doubt there's a context for that

edgy reef
#

You wouldn't need a context.

hardy viper
#

?

edgy reef
#

Just hook with if SMODS.find_joker("j_joker")

hardy viper
#

i think you might be misunderstanding the problem?

edgy reef
#

oh?

hardy viper
#

they're trying to find a way to make a joker debuff the hand

#

not a blind that debuffs the hand if a joker is present

edgy reef
#

...This would be how you do that though?

hardy viper
#

you'll need to elaborate then

#

because what you said is nonsensical

edgy reef
#

one sec

hardy viper
#

ah i get it now

#

doubt the other guy does though

#

you mean hook Blind:debuff_hand

thick panther
#

How would you hook it?

hardy viper
#

i wonder if that's even called for small/big blinds

hardy viper
#

local old = oldFunc.path
function oldFunc:path(one, two)
--code
old(self, one, two)
end

#

variable names don't matter

edgy reef
# edgy reef one sec
local blind_debuff_hand_ref = Blind.debuff_hand
function Blind:debuff_hand(cards, hand, handname, check)
    if #SMODS.find_card("j_joker") > 0 then --does our joker exist?
        -- do check for if condition is true (see how blinds do this for reference)
        -- return true if hand should be debuffed
        -- don't return if not
    end

    --above checks failed, do normal hand debuff check
    return blind_debuff_ref(self, cards, hand, handname, check)
end
#

Something like this

hardy viper
#

true

split creek
#

Does anyone know how to access current deck data?

hardy viper
#

might be issues if the joker in question is debuffed or sold or if that function isn't called for small/big blinds

hardy viper
edgy reef
#

SMODS.find_card handles ignoring debuffed jokers already so that's chill

hardy viper
#

G.deck excludes hand

#

both work

split creek
#

I meant like the back

#

sorry

edgy reef
#

Other stuff also needs correctly checked

thick panther
hardy viper
split creek
#

For context, I want to be able to check if the current back has the remove_faces config set to true

hardy viper
orchid thunder
sonic bone
#
calculate = function(self, card, context)
        if context.destroying_card and not context.blueprint then
            for k, v in ipairs(G.play.cards) do 
                if v.debuff then -- working but ugly!
                    G.E_MANAGER:add_event(Event({
                        trigger = "after",
                        delay = 0.3,
                        func = function()
                            G.deck:remove_card(v)
                            v:start_dissolve(nil, false)
                            v:remove()
                            v = nil
                            return true
                        end
                    }))
                end
            end
        end
    end

trying to use this code to destroy every scored debuffed card, its working just fine but the card simply disappears with no animation, is there anything i can do about that?

frosty dock
#

context.destroying_card is passed as a card and iterates over the hand cards

#

you just return true to destroy a card

sonic bone
#

when i returned true it would just destroy the entire hand despite only one card being debuffed

frosty dock
#

you need to do the check on context.destroying_card

sonic bone
#

but i could have just used it incorrectly then as well

frosty dock
#

you don't need to iterate over the played cards yourself

#

literally just return context.destroying_card.debuff

sonic bone
#

hmm...

#

let me try it

#

wow that was so simple

#

what the hell

#

thank you so much

thick panther
#

Is there a way to get a config value of a joker card after you have gotten the card using something like SMODS.find_card('j_joker_here')? Would I be able to retrieve a config entry such as:

config = { extra = {
  var = 2,
}},
frosty dock
#

find_card returns an array of Card objects

#

so yes

thick panther
split creek
hardy viper
#

huh

#

i thought G.GAME wouldnt do that

#

meh

#

remove the -5

fallen tendon
#

im struggling to think of decently unique mechanics for ro-balatro

#

ive thought of places, which are unsellable and unusable consumables that provide a passive effect and destroy themself after a certain amount of rounds

#

but im struggling to see how they are different form jokers

hardy viper
#

add child exploitation

fallen tendon
#

and then ive thought about having "studs" as a card enhancement based on the roblox clans

frosty dock
fallen tendon
#

eg redcliff, overseer, korblox

sonic bone
frosty dock
#
local cards = SMODS.find_card('j_joker')
local card = cards[1]
if card and card.ability.extra.var then

end
fallen tendon
#

but how would i make a way for there to be joker synergy with them without being too specific and unusable if the pools are diluted?

fallen tendon
hardy viper
#

so tru

fallen tendon
nocturne garnet
fallen tendon
#

lol

#

but i still need to figure out what things i can do now that ive finished the 12 gears and the packs for them

#

im hesitant to make jokers because of... last time

#

the robalatro jokers were absolutely awful lol

fallen tendon
#

had an interesting idea

#

a way of mixing the factions and the places

opal hazel
#

I'm trying to press the cash out button with a mod, but it's just not working


    if G.STATE == G.STATES.ROUND_EVAL and UIBox.UIRoot then
        
        local _cash_out_button = UIBox:get_UIE_by_ID('cash_out_button', UIBox.UIRoot)

        if _cash_out_button and _cash_out_button.config and _cash_out_button.config.button and _cash_out_button.states.click.can then
            G.FUNCS[_cash_out_button.config.button](_cash_out_button)
            nextCommand()
        end

    end
end
cursive ocean
#

Is there any way of loading multiple toml patch files? My lovely.toml is getting a bit crowded

frosty dock
thick panther
# frosty dock ```lua local cards = SMODS.find_card('j_joker') local card = cards[1] if card an...

How would I get this to work when hooking into a function like so? It crashes with config as a nil value.

local blind_debuff_hand_ref = Blind.debuff_hand
function Blind:debuff_hand(cards, hand, handname, check)

    local jCards = SMODS.find_card('j_7dd_sloth')

    if #jCards > 0 then
        
        local slothJoker = jCards[1]

        if slothJoker and slothJoker.ability.extra.triggerDebuff then
            
            return true

        end
    end

    return blind_debuff_hand_ref(cards, hand, handname, check)

end
edgy reef
#

You need to pass self with blind_debuff_hand_ref

frosty dock
#

oh right, arguments

#

didn't see that, whoops

#

imma leave

thick panther
frosty dock
#

return blind_debuff_hand_ref(self, cards, hand, handname, check)

#

Blind:debuff_hand(...) is short for Blind.debuff_hand(self, ...)

thick panther
#

Ah that makes sense. It works now, thank you.

orchid thunder
thick panther
#

Im getting an error with the following. It seems to stem from the stickers field. Is it the eternal part?

function joker_add(jKey)

    if type(jKey) == 'string' then
        
        local j = SMODS.create_card({
            key = jKey,
            stickers = {
                'eternal'
            }
        })

        j:add_to_deck()
        G.jokers:emplace(j)

    end
end
edgy reef
#

That still didn't get fixed?

thick panther
#

Are stickers broken rn?

edgy reef
#

Applying stickers with SMODS.create_card that have should_apply set to false break

thick panther
#

Is there a way to circumvent that or do i just need to use add_joker until its fixed?

edgy reef
#

You can apply the sticker manually.

#
if SMODS.Stickers["eternal"]:should_apply(card, area, true) then
  SMODS.Stickers["eternal"]:apply(card, true) 
end
thick panther
edgy reef
#

yes

#

Pass G.jokers as area

#

wait I'm dumb lmao

#

Just do the apply line

#

should_apply doesn't really work (localthunk code is scuffed on this)

thick panther
#

yeah now it works. Thank you

#

hopefully the stickers issue gets fixed soon

thick panther
#

For making a thread on #1209506514763522108 , is it fine to link to the Mod's source code if its on a different platform like GitHub or is that against the rules?

faint yacht
#

I started my own thread with just a .zip of the mod... then made the GitHub later.

thick panther
#

I already have both ready, I just want to make sure linking to GitHub isnt against the rules

shell tangle
#

Github is 100% recommended.

#

It's preferred to having a .zip, since you can actually go and look through the code before deciding to download a random .zip file off of the internet.

thick panther
#

Makes sense

elder vapor
#

are there any examples on how to make a config for your mod?

faint yacht
#

config.lua is the easier part... then there's the HUD build-up which is a bit scary. You could look into mine for a "basic" one, I suppose?

shell tangle
elder vapor
#

awesome

#

didn't realize there was a wiki page

valid trench
#

it only happens in a run when I hover over the Joker or play a straight because I'm just using the Runner 2 code rn

shell tangle
#

Show loc_vars in full.

valid trench
karmic kelp
#

I believe you have to refer to self.config if you want to refer to the values in the config (in place of card.ability)

#

but do take that with a grain of salt since I've only ever made consumables

valid trench
#

alright it doesn't crash anymore but the mult isn't applied

karmic kelp
valid trench
#

no like it says the xmult is xnil

#

like the variable is still keeping track in the description

#

it's just not doing anything

karmic kelp
valid trench
#

oh wait, no it is working just the text pop up is broken

karmic kelp
#

that's reassuring

valid trench
#

oh just case sensitive

#

before I program each individual boss as a check, is there a way to check if a boss blind was gonna debuff your hand but isn't because of disabling boss effects

wild gyro
valid trench
#

IDK

valid trench
#

why is this triggering this

hardy viper
#

it isn't

valid trench
#

this is all I'm changing

#

if it's not this line idk what it could be

hardy viper
#

post the full error and the full log

#

ill take a look

#

oh wait

#

same thing

#

im dumb

#

tired

valid trench
hardy viper
#

you're returning soemthing that's not valid for that context, you need to pass repetitions in the return if you return something

valid trench
#

triggered should be a boolean

#

oh it's set to nil at the start of a blind

#

would that be causing it

#

wait yeah totally

hardy viper
#

if statements check for whether something is falsy or not

#

falsy meaning nil or false

#

anything else works fine

valid trench
#

yeah

hardy viper
#

also why did you just completely ignore what i said .

valid trench
#

then idk what could be causing it

#

ignore what?

valid trench
#

Idk what you're saying

hardy viper
#

pretty sure the context was asking for retriggers and you returned something so it used ret.repetitions in a for loop when you didn't provide it which caused a crash

#

so either you're not providing a repetitions value when you should or you're providing a return when you shouldn't

#

post full calculate function ideally

valid trench
hardy viper
#

you'll probably need to use SMODS.eval_this since you're returning twice. and the thing you're doing wrong is placing that bottom block of code outside of the context check

#

eval_this documentation is here

#

sleeping now but i don't believe you should have any more troubles

valid trench
#

alright

gritty valley
#

How will this effect steamodded?

arctic lion
gritty valley
#

Thanks for the /gen answer tho

royal seal
#

Well there goes any suspense, I thought it would have nothing

arctic lion
gaunt thistle
elder vapor
#

me waiting for steamodded 1.0

valid trench
#

does anyone know why my joker isn't reseting when I quit, like he just keeps his xmult

gritty valley
valid trench
#

I was also trying to make him animate for each discard like delayed gratification but I couldn't figure it out

gritty valley
#

You should be changing card.ability.extra.xmult not self.config.extra.xmult

valid trench
#

I had it as card.ability but someone told me to change it

gritty valley
#

Who?

#

Why?

valid trench
#

it made it not crash so

gritty valley
#

set it back to card.ability and then show me if it crashes

valid trench
#

it doesn't now

#

it was probably just something else at the time

valid trench
#

that makes sense

gritty valley
valid trench
#

yee

#

I realize that, it's why they never ran into any problems with it when dealing with custom consumables

#

do you know how to make it like not do an animation every frame and wait for the previous one to finish

#

because I keep trying to make it do a shake for each extra discard but it just doesn't wanna

valid trench
#

ight

split creek
#

How do I check if a card is a specific rank?

#

I know for suits there's card:is_suit

#

but is there an equivalent for ranks?

orchid thunder
#

there are multile things wrong

  1. a single card just floats there
  2. i want th car to be created and the text apear in between the Nopes
    3.WHY IS IT ERROR
#

Please somone help me i dont want to have to poast this like 70 times before someone helps

surreal pawn
#

ur code vry hard to read,,

orchid thunder
#

i can send screenshots

surreal pawn
#

u can do ```lua at the start of ur message to make the code ins ide the code blockj have prety colors

print("meow")
surreal pawn
#

i think the context.before happens before the cards get swiped away

orchid thunder
orchid thunder
surreal pawn
#

could u drag and drop the file with the code in it ?

#

doint like copy + paste contents upload the ifle from like file explorer o r sommehting

surreal pawn
#

an the other text u uploaded doent have ful code

#

but i think reason it hapen to quick is cause u dont hav a delay paremmetert in side the G.E_MANAGER:add_event so i think the everything happen at all once

#

but hard to be sure without full code

orchid thunder
#

might have to download it

surreal pawn
#

????

#

do u not indent anything when programing ?

orchid thunder
#

i did

#

discords just being an ass

surreal pawn
#

no ooo dont copy + paste the coded u ned top osave to file and thnen upload file to here

orchid thunder
#

?

surreal pawn
#

wait nvem im got it yea i had to download

royal ridge
surreal pawn
# orchid thunder ?

ok so in these add_event fieled i think u should add the delay paaramteter like dis

#

and then same for nope text

#

i like prety sure that should slwo it down

#

if not that u can try using delay(float) method in sice the functions

wintry solar
#

You can put trigger = ‘after’ in there too

analog atlas
#

Am I cooking?

thorny adder
#

not legendary tho

analog atlas
thorny adder
#

yeah

#

so it caps at 10x

#

oh wait

#

negatives

#

my bad

#

its good

#

maybe 1.5?

analog atlas
#

alr

thorny adder
#

or

#

this joker loses x2 per empty joker slots

#

so like

#

its 10x at default

#

and each joker space not filled makes it lose 2x

#

that way negatives dont impact it

analog atlas
#

But this is a legendary card

thorny adder
#

yeah

#

true

#

idk

analog atlas
#

imo I think I will keep the 1.5x mult

thorny adder
#

yeah

cold grotto
#

all the legendaries eitehr don't supply an immediate effect or require prior setup

analog atlas
cold grotto
#

perko is a slow burn

#

yorick requires having to discard which takes time?

#

sames goes for canio

analog atlas
#

well, alr

thorny adder
#

I should make a mod

#

that downgrades chicot to rare

#

called "all my homies hate chicot"

warm sable
#

how do i replace assets with steamodded again

#

i only know the vanilla way of just putting shit into resources dir

thorny adder
#

I believe you need to take ownership

#

But that's all I know

warm sable
#

docs are pretty confusing

stiff locust
teal estuary
#

-# without adding Xchips to my mod

faint yacht
#

Actually... why not just subtract the half as chips?

teal estuary
#

i'd have to grab the current amount of chips currently going to be scored

#

-# i feel like thats easily doable, i just dont know how 😭

faint yacht
#

chip_mod = -hand_chips/2?

teal estuary
#

its just hand_chips?

#

thats.. yeah, easily doable

faint yacht
#

Should be that.

teal estuary
#

ty ty

#

i can now add a joker i've wanted to add since the beginning

faint yacht
#

I just went the lazy route of requiring Talisman as dependency personally. 😂

warm sable
teal estuary
#

it does make life easier though 😭

faint yacht
warm sable
#

cursed

#

btw anyone know a way to quickly sort a lua file that returns a table, i just need to quickly sort the l10n keys for the game

warm sable
#

balatro malware real™️

#

anyway thai balatro is real

#

i hate unlooped fonts but I needed a bitmap font to fit in with the rest of the game

faint yacht
# nocturne garnet 😨

Scary, yeah. But the original parts are still there, I just added a bunch more conditions and operations from the lovely.toml of Talisman.

bold sleet
#

Hello, I am quite new at modding balatro (and anything really, since Balatro is literally the first game I ever attempt to mod). I was wondering if one could create a deck with a starting joker just like decks with starting consumibles.
-# Also, I am not 100% certain this is the right channel, so please, give me a slight bit of leniency, thanks you.

fallen tendon
#

how might i make a lovely patch to remove the sell and use buttons for a certain consumable set?

#

sike figured it out

mystic river
bold sleet
bold sleet
#

-# sorry, I am really dumb.

mystic river
#

not exactly, that just sets a flag
the magic line is later; search for that flag name and you'll find it

#

the code that actually does the thing starts by checking whether that flag is currently true

bold sleet
#

This bulky thing?

#

@mystic river?

mystic river
#

that's the code that does it, yeah
the fact that it's inside a function that starts

local old_back_apply_to_run = Back.apply_to_run
function Back.apply_to_run(self)
  old_back_apply_to_run(self)

is important, though: this makes the code happen at the end of the vanilla function that applies things depending on your selected deck

bold sleet
#

Do you need the first and third line, tho?

#

From the looks of it it just patches another variable or something..?

#

-# Forgive me for being dumb. I expect to learn stuff as I go, mainly asking questions here.

mystic river
#

all three lines, yes
the first line saves the vanilla function into old_back_apply_to_run
the second line replaces the vanilla function with morefluff's function
and the third line starts morefluff's function by running the entire saved vanilla function

bold sleet
#

I see...

#

Imma copy the function and tinker with it, idk.

mystic river
#

that's a good way to start learning things, yes

bold sleet
#

That's what I have been doing the past few days and hours.

#

I found a folder in the mod loader github with examples for jokers and decks.

#

I have copied and modified some stuff.

#

*also TRIED to understand balatro's source code.

#

Went better than expected, knowing I have the bare minimum knowledge to do print "Hello, World!" without making my computer implode.

#

I wonder what all these parameters are for.

mystic river
#

you can find that in the balatro source code by looking for something like function create_card(

bold sleet
#

The function (I think) isn't defined in the mod, so I am guessing it is using the game thing?

mystic river
#

(you can get the balatro source code by unzipping the exe file like a zip)

bold sleet
#

That's what I did.

#

I was left with a like a dozen files and a couple of folders.

#

I have checked some of them...

mystic river
#

it does help to have an environment that can search several files all at once
i've been using visual studio code for that

bold sleet
#

So far what I have gotten is translation keys, which I use for colored text, internal joker names and , consumables = {'c_fool', 'c_fool'}, ante_scaling = 0}.

#

(for testing porpuses only, obviously)

bold sleet
#

I know how to open files and folders and that's about it.

#

Found the function. Trying to make sense of it...

hardy viper
bold sleet
#

The good news, the function executes, I think
The bad news: it crashes.

hardy viper
#

if you want to provide the arguments as a table (so you don't have to fill in unprovided args with nil), use SMODS.create_card

bold sleet
#

erm...

#

the code

hardy viper
#

you need to supply your prefix

bold sleet
#

jogla_test_mod

#

how should it look?

#

So I have an example I can replicate later.

#

(sorry for me being dumb af)

hardy viper
#

if your key is "joker1" and your mod prefix is "jog" you'd supply "jog_joker1" to create_card

#

either that or just the default joker prefix

#

i honestly forget

bold sleet
#

ah

#

So this?

hardy viper
hardy viper
warm sable
#

how do you set your mod prefix again

mellow sable
hardy viper
bold sleet
warm sable
#

or is it automatically determined

hardy viper
bold sleet
#

I'll shorten it later.

hardy viper
#

or just j_key

mellow sable
#

j_cry_jimball

hardy viper
#

cool

#

so j_jogla_test_mod_Test_Joker_01

bold sleet
#

Ok

#

Imma shorten it because idk

hardy viper
#

i sure do love prefixing

mystic river
bold sleet
#

Why shouldn't the name be long?

mystic river
#

because it's annoying to type, mainly

hardy viper
bold sleet
#

ah

mystic river
#

you'll be typing it a lot

hardy viper
#

a three or four letter prefix is ideal

#

two can possibly lead to conflicts

bold sleet
#

Let's pray no one has picked this one...

#

so this thing?

hardy viper
#

yep

warm sable
hardy viper
#

see if that works

bold sleet
#

Let's see if it works...

bold sleet
#

I expected to get crushed or something because I am dumb af and I probably don't meet the minimum required knowledge to do proper coding

warm sable
#

whats even the new metadata format

#

i cant find anything about it

bold sleet
#

wahoo, it worked!

hardy viper
#

it's a json file and it's documented in the wiki somewhere for sure

mystic river
bold sleet
#

Yes, only for testing

hardy viper
hardy viper
#

but youre doing good

bold sleet
#

Now I have a way to test my jokers and shit.

#

Don't mind the absurdity of the joker.

#

It is just for testing and stuff.

#

that's very

hardy viper
#

honestly, being a master at Lua isn't even that helpful, being able to look at other people's similar work and being able to ask for help when you need it are much more important

bold sleet
#

Ctrl+C, Ctrl+V

#

Literally what I've been doing to get my mod working.

mystic river
#

a programmer's two best friends

hardy viper
#

the balatro modding experience

bold sleet
#

5% looking and 1% understanding what the fuck a piece of code does.

mystic river
#

(third best friend is, of course, ctrl+f)

bold sleet
#

At least I managed to find how to paint text.

bold sleet
#

Something that really annoys me of this function is the fact that you need a conditional for every single joker you want to spawn.

#

-# can't wait to ask about adding textures and sprites, but today is not the day because I am no artist.

hardy viper
#

spoiler it's SMODS.Atlas

fallen tendon
#

where does the game overlay the seal sprite onto the card?

#

i cant seem to find where it does it

crisp coral
#

G.shared_seal in Card:draw()

warm sable
#

is there a dump of the l10n keys for steamodded somewhere

hardy viper
#

..?

#

no clue what that is

warm sable
#

localization

hardy viper
#

google is just sayin something about localization, is that what you're talking about? because if so

#

gotcha

warm sable
#

I know I can extract they keys for the base game

#

but what about the mod manager

#

I'd like to add l10n for steamodded for my language pack

hardy viper
warm sable
#

ohj

#

lmfao

mystic river
#

picking #1306498554419875870 back up after years about a month and i want to be able to adjust the values of the spectrum hands at the beginning of the run if spectra are "easy"
right now i can't figure out how to edit the values at all PensiveBluyo i think SMODS.PokerHand is only evaluated when booting the game and not rechecked on a new run
and my attempts to hook the vanilla run-start code have only resulted in crashes

frosty dock
#

I think it's G.GAME.hands?

mystic river
#

yeah it is, i just realized i forgot the friggin. mod prefix.

#

okay! this seems to be working entirely as intended for the moment
does anyone see any problems i could be missing with this:

local GameStartRef = Game.start_run
function Game:start_run(args)
    GameStartRef(self, args)

    if easy_spectra() and not args.savetext then
        G.GAME.hands["spectrum_Spectrum"].visible = true
        G.GAME.hands["spectrum_Spectrum"].mult = 3
        G.GAME.hands["spectrum_Spectrum"].chips = 20
        G.GAME.hands["spectrum_Spectrum"].l_mult = 3
        G.GAME.hands["spectrum_Spectrum"].l_chips = 15

        G.GAME.hands["spectrum_Straight Spectrum"].visible = true
        G.GAME.hands["spectrum_Straight Spectrum"].mult = 6
        G.GAME.hands["spectrum_Straight Spectrum"].chips = 60
        G.GAME.hands["spectrum_Straight Spectrum"].l_mult = 2
        G.GAME.hands["spectrum_Straight Spectrum"].l_chips = 35

        G.GAME.hands["spectrum_Spectrum House"].visible = true
        G.GAME.hands["spectrum_Spectrum House"].mult = 7
        G.GAME.hands["spectrum_Spectrum House"].chips = 80
        G.GAME.hands["spectrum_Spectrum House"].l_mult = 4
        G.GAME.hands["spectrum_Spectrum House"].l_chips = 35

        G.GAME.hands["spectrum_Spectrum Five"].visible = true
        G.GAME.hands["spectrum_Spectrum Five"].mult = 14
        G.GAME.hands["spectrum_Spectrum Five"].chips = 120
        G.GAME.hands["spectrum_Spectrum Five"].l_mult = 3
        G.GAME.hands["spectrum_Spectrum Five"].l_chips = 40
    end
end
frosty dock
#

lgtm

wooden nexus
thick panther
hidden timber
#

Current Status of the Balatro Mod Manager:

  • Steamodded with lovely is nearly finished
thick panther
#

special deck 👀

nocturne garnet
#

cards scored have a 1 in 2 chance to destroy another card played

thick panther
#

Is there a way to override a vanilla joker's texture through a mod?

thorny adder
tidal ice
#

is there a context for the total amount of chips scored in a blind

autumn coral
#

Oh well

#

Actually

#

Um

#

Lovely patch? I think

#

Let me check

thick panther
autumn coral
#

Wait no vanilla only has 1 joker atlas

autumn coral
#

I don’t know how it works but I’m pretty sure that’s what it does

frosty dock
#

yeah you can take ownership and just change the atlas and pos

wintry solar
#

You can use Malverk too

faint yacht
#

...for animating cards, do I need to manually update pos every frame or, in the atlas specification, use ANIMATION_ATLAS when specifying one for the given card?

edgy reef
#

1.0 beta is soon trust

#

🙏

frosty dock
#

inb4 it actually drops next week so there's guaranteed more than one day between it and the gameplay update

#

not me still adding features despite my self-imposed feature freeze

violet void
frosty dock
#

docs are actually close to complete now, which is nice

rough furnace
#

we need to drop it before 2025 or else our versioning system breaks

frosty dock
#

me when i 1.0.1~ALPHA-0101a

rough furnace
#

so true

#

1.0.0.1

frosty dock
#

(my version parser doesn't support 4th level version numbering)

rough furnace
#

true

edgy reef
wintry solar
rough furnace
faint yacht
frosty dock
#

me when I BETA-0027a because we drop it early

rough furnace
#

me when no more SMODS versions

frosty dock
#

actually though all we really need are docs on challenges and deck skins and maybe mod functions (but that one could come later tbh)

rough furnace
#

I guess meta tags are not coming in 1.0.0

#

I need to rebase that at some point

frosty dock
#

i should maybe mark that as stale for now

rough furnace
#

it's a draft

#

it will also need lots of docs

#

but I will work on those

frosty dock
#

yeah ik

#

but it's also 2 months stale

rough furnace
#

true

#

what do we all need for a beta release?

frosty dock
#

i think we're set in terms of features?

rough furnace
#

I mean we were supposed to feature freeze a while back

#

I'm much more worried about what else we need to break

frosty dock
#

yeah good point

#

this is why i wanted complete docs first

rough furnace
#

true

frosty dock
#

but I think we've at least ironed out all the inconsistencies

rough furnace
#

that's good

#

should we look at removing more 0.9.8 compat for 1.0.0 release?

frosty dock
#

I'm not aware of any major bugs either, besides #302 which is just a cosmetic bug

hidden timber
#

@frosty dock Could you tell me, where steamodded actually looks for the mods to load? I need the lua code for BMM

wintry solar
#

Do we want to fix enhancement calculation?

frosty dock
wintry solar
#

They work differently to everything else in that they don’t have a return

rough furnace
#

what's wrong with it again?

wintry solar
#

You just have to directly modify the return table

hidden timber
rough furnace
#

require("lovely").mod_dir iirc

frosty dock
#

usually (on windows) this is %AppData%/Balatro/Mods, but can be changed arbitrarily

hidden timber
frosty dock
#

it looks up to 3 deep

nocturne garnet
rough furnace
frosty dock
autumn coral
#

custom fonts?

#

lol

rough furnace
#

it has the default paths

nocturne garnet
hidden timber
rough furnace
#

wdym?

autumn coral
#

nvm

#

found it

frosty dock
autumn coral
#

yeh i saw

frosty dock
#

am I wrong in thinking that would be non-breaking because existing usage without return will still work as normal?

autumn coral
#

can i change the language inline btw?

rough furnace
#

¯_(ツ)_/¯

autumn coral
#

without localization

rough furnace
#

what if we just wnet and promoeted the current build to 1.0.0 stable

#

that would be funny

frosty dock
#

is it stable though

rough furnace
#

depends on your definition of stable

#

Won't crash

#

probably not

#

api stable

#

probably ish

#

won't delete your save

#

yes

edgy reef
#

😭

#

This is too funny

autumn coral
#

wait so how do i change the font inline using language

#

i want to change my joker descriptions to use a different font

frosty dock
#

i remember when steamodded would mess up your vanilla profile if you even accidentally had it active when launching

rough furnace
#

Can I make a new language that is en-us but has comic sans as the font?

frosty dock
#

you can change en-us' font to comic sans

#

i'm not sure what the behavior of creating a language with a vanilla key would be

rough furnace
#

undefined beahviour nice

frosty dock
#

but you could do it at most once

rough furnace
#

could i make a language that just uses the keys frfom a different language

frosty dock
#

i think that's not the purpose of a language api

#

it could probably be rewritten to support this by not checking the lang key directly

rough furnace
#

but it would be a funny of the language api

autumn coral
#

how can i um. use the api tho to change the font of only one part of my card

#

😭

rough furnace
#

it's fine was just thinking

wintry solar
autumn coral
#

sobs

frosty dock
autumn coral
#

sighs

#

sighs very loudly actually

#

time to do ANOTHER thing

frosty dock
#

lemme see how much work it would be to add that

rough furnace
#

Lovely patching go brrrrrrrrrrrrr

autumn coral
#

😔

me: this thing's so simple, it'll only take 5 minutes
steamodded: haha noooope

autumn coral
#

i'm doing it lol

faint yacht
frosty dock
autumn coral
#

font = G.LANGUAGES['en-us'].font

#

sigh

#

oh

#

alr

autumn coral
#

oh

#

wait can i do what i wanted then

#

😭

#

wait no i can't wilson said no to me lol

#

oh erll

frosty dock
#

no, you'd have to like add a font argument somewhere in the card ui generation process

autumn coral
#

yea

frosty dock
#

and take it quite deep down

rough furnace
#

adding additional {thing:}{}'s could be intresting

autumn coral
#

card_focus_ui

rough furnace
#

even as an api for mods to add their owen

autumn coral
#

this one i think

#

imma double check tho

violet void
# faint yacht 🙏

I just wanted to mention that mod in case you didn't know about it
how does that one do it?

frosty dock
autumn coral
#

i found it

#

info_tip_from_rows

#

you can change the font in the node by changing this font = G.LANGUAGES['en-us'].font

#

i'm assuming that it would include the steamodded languages, yes?

frosty dock
#

yes

autumn coral
#

ok so i just need to use my key (which is wrenbind_teammeat) for the language and it'll get the font?

#

yeah

#

that sounds right

#

cool

frosty dock
hidden timber
#

Btw, if you guys want to know, how much code it around takes per commit for the Balatro Mod Manger, here ya go

frosty dock
#

👀

frosty dock
autumn coral
#

did i do this wrong?

#

nvm

#

nope nevermind

#

yeah

#

weird

#

this is like 1:1 from the wiki

frosty dock
#

what's on line 42

arctic lion
frosty dock
#

oh self.TILESIZE

autumn coral
#

oh nbm

hidden timber
#

A cool thing about BMM is that, the mods run in an isolated environment, which means, you can still launch the game from steam without Steamodded and lovely being loaded automatically for example

frosty dock
#

yeah change that to G.TILESIZE

autumn coral
#

ok

frosty dock
#

i think

#

yeah

bold sleet
#

Perhaps one of you persons that know how to code (because I am very new to this) could help me get names of stuff and what not?

#

(i am new to moding balatro or anything, so please forgive me)

#

(ping for reply, btw)

frosty dock
#

wdym

bold sleet
#

Like, the names for adding and removing Xmult

#

And probably the "event" names for discarding and selecting a blind.

#

That's probably what I need right now.

frosty dock
#

you can (and should) look at base game jokers for this

#

take green joker for discarding, for example

autumn coral
#

hm

bold sleet
#

The structure is quite different.

wintry swallow
#

Is there a context for the very beginning; and the very end, of a (boss) blind?

wintry solar
#

yes

frosty dock
bold sleet
#

Like, the extra thing mods use to "do stuff" is quite different in the vanilla ones.

#

I think I am looking at the right thing...

faint yacht
#

card.lua, search for context.

wintry swallow
wintry solar
#

scroll down

bold sleet
#

aw sh*t

#

Will do.

#

I am now missing the Xmult thing.

teal estuary
#

are you looking for what _mod you need for Xmult?

bold sleet
#

I can copy and paste code and put it behind another if statement

teal estuary
#

what are you looking for, in relation to Xmult?

bold sleet
#

When blind selected, add .2 to Xmult

#

When discarding, subtract .1 to Xmult

rustic radish
#

can i send an error im getting when loading up the game here?

bold sleet
#

I think so.

violet void
teal estuary
#

(ctrl + f "green joker", you'll find it)

rustic radish
#

im getting this error: Error
Syntax error: functions/state_events.lua:219: unexpected symbol near '}'
Traceback
[love "callbacks.lua"]:228: in function 'handler'
[C]: at 0x7ff99a1c2fa0
[C]: in function 'require'
main.lua:18: in main chunk
[C]: in function 'require'
[C]: in function 'xpcall'
[C]: in function 'xpcall'

#

what does it mean?

bold sleet
wintry solar
#

search for Green Joker

#

not j_green

teal estuary
#

-# are you in card.lua?

bold sleet
#

typo

rustic radish
bold sleet
#

found a

bold sleet
#

Any code editor should highlight it for you.

wintry solar
teal estuary
#

the code you are looking for is on line 2845

#

(jogla specifically)

rustic radish
bold sleet
#

found this

teal estuary
#

there you are

wintry solar
rustic radish
#

yes

wintry solar
#

can you SS your mods folder?

#

and the crash screen too

teal estuary
#

-# actually, you want all of green jokers code except the first one you found

bold sleet
rustic radish
frosty dock
teal estuary
#

thats the code that checks if you discard, and when you do you lose mult

warm sable
#

actually can you set the font type when adding a new language with steamodded

violet void
frosty dock
#

recently added feature

bold sleet
#

Now I have to still look for Xmult

warm sable
frosty dock
#

if you give it a bold font or whatever, sure

warm sable
#

I know you can set custom typeface, I meant the style

frosty dock
#

not sure if or how the game supports that tbh

teal estuary
frosty dock
bold sleet
#

ah

warm sable
teal estuary
#

you should also change all the card.ability.extra.mult to card.ability.extra.Xmult

frosty dock
rustic radish
#

nvm fixed it but i think something is wrong with the mod math blinds

bold sleet
#

Guess we copying and pasting.

rustic radish
#

idk tho im not a coder

frosty dock
#
SMODS.Language {
    key = 'en3',
    loc_key = 'en-us',
    label = 'English?',
    font = 6,
}
rough furnace
#

nice

wintry solar
# rustic radish

some of these look old, try removing everything except steamodded

rough furnace
#

Love the feature freeze

frosty dock
#

loc_key might not be the greatest name

#

but eh

warm sable
frosty dock
#

that wasn't in response to you

warm sable
#

oh

#

ok

bold sleet
#

-# I am quite amazed by the fact that I did get an answer and it wasn't just go figure yourself, tbh

frosty dock
rough furnace
#

yeah fair

frosty dock
#

anyways this was actually really simple to add

teal estuary
#

-# "just go find x" is not the best advice

frosty dock
#

i just made G.SETTINGS.language take the loc_key and keep the actual key in G.SETTINGS.real_language

warm sable
teal estuary
#

-# very unfortunate

frosty dock
#

no apparent issues with it either, might just push it up because why not

#

i don't think it's super useful but who cares

bold sleet
#

I got this thing

#

I swear I tried.

rough furnace
#

wonder if it would make sense to rework it as a default key so we can use it to patch on top of other languages without overriding them

faint yacht
#

You perform operations on the Xmult variable itself in .setting_blind and .discard.

warm sable
frosty dock
rough furnace
#

true

faint yacht
warm sable
#

i always document my software with instructions and the reasons for doing it

teal estuary
#

-# i dislike any and all forms of AI, it could be useful but with the people who currently own it and how its used? fuck no

faint yacht
# bold sleet That was for me?

Oh, and for specifically triggering once after a Boss Blind, have if context.end_of_round and not context.repetition and not context.individual and G.GAME.blind.boss then.

warm sable
#

like, Copy X to Y because Z looks for it in Y

frosty dock
#

tbf it probably isn't that bad

rough furnace
warm sable
#

or Replace version.dll so Windows will preload the library before running the game at runtime

frosty dock
#

fine i'll do it

faint yacht
bold sleet
warm sable
#

like, you don't actually need to replace a file to load the lovely injector or do any kinds of editing

faint yacht
#

Then have the first context be .setting_blind, oops.

warm sable
#

all you have to do is open up process hacker or something and preload the library in memory

bold sleet
warm sable
#

UNIX/Linux lets you do that which is pretty cool

#

LD_PRELOAD is a godsend

#

instead of replacing a file you just inject it with the environment variable

faint yacht
#

return only with context.joker_main. The other ones just have the operations.

teal estuary
#

-# theres a context for after a boss blind, right

bold sleet
teal estuary
#

thats just context.after, i presume if there isnt, its just if context.after and [boss blind check]

faint yacht
#

I have if context.end_of_round and not (context.individual or context.repetition or context.blueprint) and G.GAME.blind.boss then for rework of Control Panel.

teal estuary
#

oh yeah, end of round

#

forgot about that

#

that is what im looking for

faint yacht
#

Oh, and for Aura's animated jokers... that's a touch too complicated for me. Though, if I can still directly manage the pos of the particular Joker without affecting other copies of it myself, that seems like a decent option too.

bold sleet
#

Why does the upgrade not show up?

faint yacht
#

...again, you should not return there.

bold sleet
#

huh

faint yacht
#

Call card_eval_status_text(card, 'extra', nil, nil, nil, {message = "insert message here"}) for making the message pop up.

frosty dock
#

kid named SMODS.eval_this:

faint yacht
#

Or that. 🌚

bold sleet
#

So I can do halfway decent mods.
-# or something

bold sleet
#

The new thing.

#

It displays the downgrade thing even if it can't downgrade more, but idk.

faint yacht
#

...remove the return {} entirely.

#

Move the card_eval_status_text right under the if you have there.

bold sleet
faint yacht
#

Have the card_eval_status_text be right next to the operation.

violet void
#

context.discard can return stuff by the way

bold sleet
#

ok

#

I am new, you know the drill, right right?

faint yacht
#

Remove Xmult_mod = as well.

violet void
#
return {
   message =  "Downgraded",
   card = card,
   colour = G.C.MULT
}```

(for context.discard)
bold sleet
#

from context.setting_blind?

faint yacht
#

Is this easier?

violet void
#

ah ok nvm

frosty dock
#

(you can't derive from an already derived language and no, i won't bother with that)

bold sleet
#

This is when I ask why it works this way.

#

Playing the card requires you to return something but selecting a blind or discarding does not?

frosty dock
#

nothing actually requires you to return anything

rough furnace
frosty dock
#

it's just that thunk never needed this functionality for certain contexts so he just didn't add it

bold sleet
frosty dock
#

there's no better explanation i can give

frosty dock
#

both will have localization strings for the union of the keys they provide, with the one that's selected taking priority on the intersection

#

non-specified draws from english

faint yacht
#

I assume a given Joker can't have its' own unique pos on an Atlas with other copies of it currently held?

bold sleet
frosty dock
#

because that functionality is used in the base game

frosty dock
#

sprites have a function to change pos iirc

#

wow this has been a great use of my time, we're still missing two full API docs

autumn coral
#

i thiiink i did it for the custom text

frosty dock
#

at least one of them basically isn't an API at all, which still means I have to document the type of challenge objects

autumn coral
#

we'll see

violet void
#

what's the actual difference between context.joker_main (SMODS thing) and context.individual?

autumn coral
#

well my logic works, i just have to figure out how to make it do what i want

frosty dock
#

it's just the vanilla context for the main joker calculation

faint yacht
#

context.individual is for card-specific things, like XMult on a specific card played.

frosty dock
#

(vanilla code just doesn't mention it specifically, it's implied in a huge if-elseif tower

#

context.individual is called for each card of a card area and used mostly for jokers that do something when a card is scored

wooden nexus
#

IN CELEBRATION OF OVER $18,000 IN THE INVITATIONAL, AND A THANK YOU TO EVERYONE. PART 1/3 JOKERS

The first Joker being the long overdue@jaunty ore Joker: ```Murphy's Law

1 in 5 chance to create a Glass Red Seal Ace of Hearts ELSE Create a blank card.
1 in 1000 chance to gain $18,405 at end of round```

Part 2 will be the Doc himself, and Part 3 will be the winner: Roffle

bold sleet
#

ecin

violet void
bold sleet
#

(what does a blank card do)

faint yacht
frosty dock
bold sleet
#

azaming

wooden nexus
autumn coral
#

language fonts don't work lmfao

#

welp

#

gotta get the mod directory

#

good thing cryptid has referencable code

#

let's see...

violet void
frosty dock
#

changing the pos looks like card.children.center:set_sprite_pos(pos)

#

where pos is of course a pos table with x and y coords

wooden nexus
violet void
autumn coral
#

sigh i have to change something else, don't i

#

siiigh

#

god.

bold sleet
#

Got new problem: It re-triggers for each discarded card.

#

Which is something I don't want to happen.

autumn coral
#

OH

#

i neerd to make it dynatext

thick panther
autumn coral
#

me when i know i'm about to crash the game (silly)

#

sigh this is going to be a lot harder than i wanted it to be

frosty dock
#

so i don't think so

autumn coral
#

smods.language is so fuckedx up lmfao

frosty dock
#

why

violet void
#

only burnt joker uses it

wooden nexus
#

Btw, I'm taking suggestions for what Roffle and Dr. Spectred's jokers can do

faint yacht
frosty dock
#

i take what's wanted is something like this

#

other places handle vanilla stickers separately, but this should just apply them

faint yacht
bold sleet
frosty dock
bold sleet
exotic hedge
#

You guys like this joker? And do you think anything else could be touched up on?

dark tinsel
#

Oh cool, I came to see if a mod index existed because I was considering making a mod manager (Dimserene's is too niche for my tastes). Seems like @hidden timber has one cooking though

hidden timber
dark tinsel
#

yeah the screenshots looked great

hidden timber
#

thanks

weak brook
#

so folks

#

how would I go about adding Jokers to this site

#

now that Cardsauce 1.0 is released i'd like to get those up there

wooden nexus
#

Old ahh Shinku

#

(still love it)

nocturne garnet
#

(i was bored)

gaunt thistle
#

m

frosty dock
#

m

nocturne garnet
#

im ngl i was too lazy to patch for this

exotic hedge
#

idk what to put for the text on here

nocturne garnet
karmic kelp
frosty dock
#

no misprint abuse

wooden nexus