#đŸ’»ăƒ»modding-dev

1 messages · Page 26 of 1

frosty dock
#

that's actually a ternary

#

it sets the current option depending on the gamespeed

native osprey
#

oh

frosty dock
#

so it checks if the game speed is 3 and if so, selects the 5th option (which is game speed 3)

#

if the game speed is different, the check doesn't work

native osprey
#

thank u for the explanation

frosty dock
#

np

maiden phoenix
#

Aure :((

random sleet
#

you can put literally anything inside a gameobject constructor

maiden phoenix
#

Im gonna put you in a gameobject constructor

random sleet
#

you could set arbitrary_value_24 = 24 in your constructor and then your gameobject will have self.config.center.arbitrary_value_24 and it will be 24

#

(assuming it is a center, otherwise accessible however appropriate for that object)

#

the whole point of the new constructor taking a table is so you can just cram whatever the fuck in there

maiden phoenix
#

SMODS.Joker{
...
AutumnMood = "yeehaw"
...
}

😎

random sleet
#

that would work

maiden phoenix
#

CowboyMood

random sleet
#

yeehaw.

frosty dock
#

everything is inside

#

there is no outside

random sleet
#

im outside your window

maiden phoenix
#

*inside

frosty dock
maiden phoenix
#

Because shes nil rn

#

Just you wait

random sleet
#

technically we're all outside your window

frosty dock
#

unless you're inside

maiden phoenix
#

When I read your text you're inside my head

random sleet
#

everyone on earth is outside your window, even you

frosty dock
#

i mean that's true

#

I'm not inside my window

random sleet
#

nobody has ever been inside your window. that would be foolish behavior.

#

gdi autocorrect making me seem british

frosty dock
maiden phoenix
#

Ok but if you re between the window and the window frame are you inside or outside the window

random sleet
#

you are in the void

maiden phoenix
#

Frick

frosty dock
#

no u

random sleet
maiden phoenix
#

Btw now I can officially call myself a Steamodded dev lol 😎

random sleet
#

dang i cant

#

im not even a self

maiden phoenix
#

Ill put that on my resume

#

Instantly get a job

frosty dock
#

very exclusive club

maiden phoenix
#

Where did you say the yatch was btw?

random sleet
#

is it bad that my brain subbed in the Beleren font in that screencap bc im so used to seeing it in my game

frosty dock
#

the yatch?

random sleet
#

tbf i am wearing sunglasses rn cuz its heathenously bright out today

maiden phoenix
random sleet
#

getting back more ontopic here, should i be looking to release thac/oapi/emojiokers for 1.0 soon? or are there more breaking changes anticipated and i should just hold on a while

#

(its spelled yacht btw)

frosty dock
#

oh

#

i think we're mostly good on breaking changes, but you never know

#

except sound.lua, not quite happy with where that one's at

random sleet
#

well, i dont touch sounds

#

so thats good

#

i do only have a few things left before thac is Ready and emojiokers is like 65% shitpost so

#

and i just dont want to get caught in a weird limbo state where it only works on like one alpha version yk

frosty dock
#

i still haven't given seals a prefix lmao

#

i mean 'nil' is funny

random sleet
#

i dont know if that'll be an issue exactly; feder implemented the stamps as their own gameobject class (the main thing i have left is just integrating his ported code lol, so i dont quite know the intricacies of it yet)

#

shoutouts to itay for being awesome again

frosty dock
#

they could have a shared parent class like centers do, but that seems like it could work out either way

random sleet
#

i dont know! one of the many great mysteries of the universe :^)

hushed estuary
#

can anybody tell me the blind api commands for steamodded 1.0?

frosty dock
hushed estuary
#

oh alr

worldly sapphire
#

Joker idea: Powerplant - for each joker you have, you get +2$

maiden phoenix
random sleet
#

ok

wooden nexus
oblique gust
#

main.lua L1926

#

bruh is this actually a harmless typo?

#

lke it should be planet_options right

zealous glen
oblique gust
wooden nexus
zealous glen
wooden nexus
#

It's a historical deck

zealous glen
#

gold suit when

oblique gust
zealous glen
#

What were you redistributing?

oblique gust
#

and i just sent a block from main.lua

#

like a smol block

zealous glen
#

I feel like if it’s small enough it doesn’t violate the rule, since I imagine it’s to prevent from straight up redistributing the source code

oblique gust
#

i dont even know if its injected by steamodded but whatever

frosty dock
#

eh, that's fine

#

no one gonna reconstruct Balatro's source from small snippets

zealous glen
#

I think if someone would reconstruct Balatro’s source code it would be by unzipping it

frosty dock
#

even steamodded contains some code that's basically taken unmodified from vanilla code

random sleet
#

i believe lyman was referring to rule 3

#

as cryptic and beyond mortal comprehension as it is

frosty dock
#

even less so then... sending a code snippet does not qualify as debugging

crisp coral
#

stares at the lovely dumps

mellow sable
#

with steamodded 1.0 idk how to change the loc_vars when taking ownership of a joker

#
SMODS.Joker:take_ownership('green_joker', {
                config = {extra = 1, mult = 0},
                name = "cry-Green Joker", --will prevent old calculation code from working
                loc_vars = function(self, info_queue, center)
                    return {vars = {center.ability.extra,center.ability.extra,center.ability.mult}}
                end,
                calculate = function(self, context)
                    if context.discard and not context.blueprint and context.other_card == context.full_hand[#context.full_hand] then
                        local prev_mult = self.ability.mult
                        self.ability.mult = math.max(0, self.ability.mult - self.ability.extra)
                        if self.ability.mult ~= prev_mult then 
                            return {
                                message = localize{type='variable',key='a_mult_minus',vars={self.ability.extras}},
                                colour = G.C.RED,
                                card = self
                            }
                        end
                    end
                    if context.cardarea == G.jokers and context.before and not context.blueprint then
                        self.ability.mult = self.ability.mult + self.ability.extra
                        return {
                            card = self,
                            message = localize{type='variable',key='a_mult',vars={self.ability.extra}}
                        }
                    end
                    if context.cardarea == G.jokers and not context.before and not context.after then
                        return {
                            message = localize{type='variable',key='a_mult',vars={self.ability.mult}},
                            mult_mod = self.ability.mult
                        }
                    end
                end
            }):register()

Here's the relevant code, but the localization doesn't work

zealous glen
frosty dock
#

nvm I know what this is

#

it wrongly assumes you're not touching localization and setting generate_ui to 0

#

it should work with loc_txt = {}, but it's something I should fix

mellow sable
#

didn't work with that, and this is what happened when I put a garbage key/value pair in loc_txt

#

updated Steamodded and now Stake API crashes

#

yippee

frosty dock
#

i moved some things around with the way stake text works

mellow sable
#
self.shared_sticker_perishable = Sprite(0, 0, self.CARD_W, self.CARD_H, self.ASSET_ATLAS["cry_sticker"], {x = 4,y = 4})

and this line of code crashes the game again

frosty dock
#

the main description goes in loc_txt.description, and the sticker description goes in loc_txt.sticker

mellow sable
#
local sticker_atlas = {object_type = "Atlas",
    key = "sticker",
    
    path = "sticker_cry.png",
    px = 71,
    py = 95
}

atlas code if that helps

#

this part of the code usually breaks every few steamodded commits so I'm used to it by now

frosty dock
#

uh huh

#

what's the crash message?

mellow sable
#

same old attempt to index field 'atlas', a nil value

#

I'm putting this near the end of G:start_up()

frosty dock
#

just to be sure, after initSteamodded(), right?

mellow sable
#

yes

#
# New perishable texture
# Quartz Stake - register pinned sticker
[[patches]]
[patches.pattern]
target = "game.lua"
pattern = "set_profile_progress()"
position = "before"
payload = '''self.shared_sticker_perishable = Sprite(0, 0, self.CARD_W, self.CARD_H, self.ASSET_ATLAS["cry_sticker"], {x = 4,y = 4})
self.shared_stickers['pinned'] = Sprite(0, 0, self.CARD_W, self.CARD_H, self.ASSET_ATLAS['cry_sticker'], {x=5, y=0})'''
match_indent = true

#

this was my patch file

#

oh wait

#

it's probably crashing becuase I removed the code that registers it

#

lmao

#

false alarm

frosty dock
#

oh

#

lmao

mellow sable
#

yeah that was in my stake file which I just removed for now

#

ty for the help, works perfectly now

#

green joker description still isn't working, but I'm fine waiting for that bug to be patched

frosty dock
mellow sable
#
SMODS.Joker:take_ownership('green_joker', {
                config = {extra = 1, mult = 0},
                name = "cry-Green Joker", --will prevent old calculation code from working
                loc_vars = function(self, info_queue, center)
                    return {vars = {center.ability.extra,center.ability.extra,center.ability.mult}}
                end,
                calculate = function(self, context)
                    if context.discard and not context.blueprint and context.other_card == context.full_hand[#context.full_hand] then
                        local prev_mult = self.ability.mult
                        self.ability.mult = math.max(0, self.ability.mult - self.ability.extra)
                        if self.ability.mult ~= prev_mult then 
                            return {
                                message = localize{type='variable',key='a_mult_minus',vars={self.ability.extra}},
                                colour = G.C.RED,
                                card = self
                            }
                        end
                    end
                    if context.cardarea == G.jokers and context.before and not context.blueprint then
                        self.ability.mult = self.ability.mult + self.ability.extra
                        return {
                            card = self,
                            message = localize{type='variable',key='a_mult',vars={self.ability.extra}}
                        }
                    end
                    if context.cardarea == G.jokers and not context.before and not context.after then
                        return {
                            message = localize{type='variable',key='a_mult',vars={self.ability.mult}},
                            mult_mod = self.ability.mult
                        }
                    end
                end,
                loc_txt = {}
            })

nope

#

ignore that I accidentally pasted the image 4 times

night pagoda
#

can lovely inject into the shaders?

frosty dock
#

i got my os and objs mixed up

#

fixed

mellow sable
#

it works

royal ether
#

this is why i just give my variables overly descriptive names

mellow sable
#

m

royal ether
#

me when i card.config.center.extra.arachnei_sap.base_stats.mult

random sleet
#

i should probably hide my variables and stuff in a table so they don't conflict with other people doing the same thing as me

royal ether
#

i might do it too much but yea its good practice

frosty dock
mellow sable
#

I do that for Ankh, but for Cryptid I just prefix them or load them from a file

royal ridge
#

why does glass joker have a specific condition for when you're using hanged man?

night pagoda
#

do I understand correctly that this injection should allow me to use remove from deck function in joker's constructor?
EDIT: tried and yes it does allow me

worldly sapphire
#

i still don't understand how the loyalty card works, i'm trying to use its code for a joker i'm doing but idk what is wrong

#

here is the code of the joker i'm trying to make using loyalty card as base by replacing the Xmult with chip_mod

SMODS.Jokers.j_cheesecake.calculate = function(self, context)
                if context.loyalty_remaining then
                if self.ability.name == 'Cheesecake Bomb' then
                    self.ability.loyalty_remaining = (self.ability.extra.every-1-(G.GAME.hands_played - self.ability.hands_played_at_create))%(self.ability.extra.every+1)
                    if context.blueprint then
                        if self.ability.loyalty_remaining == self.ability.extra.every then
                            return {
                                message = localize{type='variable',key='a_chips',vars={self.ability.extra.chip_mod}},
                                chip_mod = self.ability.extra.chip_mod
                            }
                        end
                    else
                        if self.ability.loyalty_remaining == 0 then
                            local eval = function(card) return (card.ability.loyalty_remaining == 0) end
                            juice_card_until(self, eval, true)
                        elseif self.ability.loyalty_remaining == self.ability.extra.every then
                            return {
                                message = localize{type='variable',key='a_chips',vars={self.ability.extra.chip_mod}},
                                chip_mod = self.ability.extra.chip_mod
                            }
                        end
                    end
                end
            end
        end```
zealous glen
worldly sapphire
#

how the loyalty_remaining works

#

also the joker is not working

sly forge
#

hm, see the if context.loyalty_remaining?

worldly sapphire
#

its already there

sly forge
#

the joker will only activate if context.loyalty_remaining is true

#

so, check where in the code calculate_joker is called when context.loyalty_remaining is true

frosty dock
#

is reloading after crashes (by pressing r) broken for anyone else?

sly forge
zealous glen
worldly sapphire
sly forge
#

er, no

zealous glen
zealous glen
#

context never has loyalty_remaining

#

What you want is to track the number inside your Joker

frosty dock
zealous glen
#

If you defined it, that is

sly forge
#

ok this is just getting confusing

worldly sapphire
#

I only want the joker to give 350 chips after i played 3 hands

wintry solar
#

change line two to if context.after then

zealous glen
#

Is that the context Loyalty Card uses?

wintry solar
#

yes

zealous glen
#

I never know what’s after and what’s neither before nor after

wintry solar
#

wait no

#

it's not after

#

I misread my collapsed code

#

it doesn't look at context

#

it's literally the first one in the stack

#

so just delete line 2

zealous glen
# wintry solar

it doesn’t look at context
pic shows it looking at context

wintry solar
#

no it doesn't?

#

context.after is collapsed, see the else

zealous glen
wintry solar
#

it's in the if/else chain

zealous glen
#

and what’s the if condition in the chain?

wintry solar
#

if context.before then do collapsed stuff, elseif context.after do collapsed stuff, else do loyalty card

frosty dock
#

that boils down to context.joker_main

zealous glen
#

So what does that imply about the condition when Loyalty Card executes?

frosty dock
#

it's just not explicitly named

#

if context.joker_main then is good enough

zealous glen
#

Or Observatory

#

I forget the name

#

I don’t think joker_main matters at all here

#

But context.before and context.after do

frosty dock
#

run it and print out context

wintry solar
#

i mean this is the entire sequence

frosty dock
#

it'll have joker_main, it's just not explicitly named

zealous glen
#

But AFAIK so do other calls

wintry solar
#

yeah but other calls won't get that far

frosty dock
#

the block is defined by the fact that it isn't any of the above

zealous glen
#

Exactly

frosty dock
#

which breaks when you add other contexts

wintry solar
#

loyalty card is in the bucket of things that don't need to happen at other contexts

frosty dock
#

the truth of the matter is that it needs to happen in joker_main, the game just doesn't say that

zealous glen
#

That’s why context.before and context.after are looked at by Loyalty Card

frosty dock
#

it says it's none of the above

zealous glen
#

Because if Loyalty Card runs those are not true

zealous glen
wintry solar
#

yes

zealous glen
#

So it does care about context.before and context.after

wintry solar
#

no

zealous glen
#

yes

wintry solar
#

it specifically doesn't want context.before or context.after

zealous glen
#

It doesn’t run when context.before evaluates to true

frosty dock
#

there are 7 different calculate calls with cardarea = G.jokers

zealous glen
#

Therefore it cares about it evaluating to not true

frosty dock
#

one is remove_playing_cards, which is somewhere in the above stack

zealous glen
#

Idem for context.after

frosty dock
#

one is before

wintry solar
#

oh I see what you mean

frosty dock
#

one is edition

wintry solar
#

it should be not context.before and not context.after and context.joker_main

frosty dock
#

one is also remove_playing_cards

zealous glen
frosty dock
#

one is debuffed_hand

#

one is after

#

and one is joker_main

#

the only one that reaches is joker_main

zealous glen
#

It’s if context.cardarea == G.jokers and not context.before and not context.after

#

At least natively

frosty dock
#

if context.joker_main then works

#

it's not equivalent when there's other context calls, but that's when the vanilla code breaks down

zealous glen
frosty dock
#

no

zealous glen
#

Because again there’s another context that uses joker_main

#

When you open a pack

frosty dock
#

there's exactly one call with joker_main, and it's this one

#

it's the only one

zealous glen
#

Maybe it wasn’t Telescope but Observatory

#

One of the Voucher effects uses it

frosty dock
#

this gets executed in line with jokers in joker_main

#

aka the else block of doom

wintry solar
#

speaking of the else block of doom

#

for custom editions how am I supposed to hook their calculation into it

zealous glen
#

I prefer localthunk’s if-then-elseif Tower of Babel

frosty dock
#

I'm actually using the incorrect patch in steamodded as of now, now that I explained all that

#

I need to change that else to account for joker_main and added context just aren't an issue

zealous glen
#

By the way, I think a short paragraph on how to add contexts would be helpful

#

Or at least “afterwards hook this function and add your context to it”

#

end_calculate_context?

frosty dock
#

THAT'S WHAT I JUST WENT ON ABOUT

#

that function is useless

#

it's a dumb inverted check that boils down to context.joker_main

zealous glen
#

I mean except it can have not context.joker_main

frosty dock
#

it can if you add context

#

which is why I just made it explicity context.joker_main

edgy reef
#

Oh cool

sly forge
#

the tower of if statements is annoying. I have been thinking of doing a scoring overhaul instead of just messing with enhancements and Stone Cards

#

just gotta come up with a good structure

frosty dock
#

excluding custom contexts makes it slightly less annoying, but yeah it's pretty bad

sly forge
#

ah, I'd support adding custom contexts. I want mutual exclusion though

frosty dock
#

the thing with overhauling is that every update of the game requires changes on our end

frosty dock
sly forge
#

I see

#

ok, desired requirements: I want it to be easy to tell when a joker will activate, and easy to write a joker that just does one thing in one context

frosty dock
#

it's always been possible to just use context.joker_main, it's just that we didn't notice

zealous glen
#

joker_main ah yes of course thunk

frosty dock
#

take jimbo's +4 mult

#

that's what happens there

#

but yeah the name is bad

zealous glen
#

Except not there there because AFAIK they don’t use calculate

#

They just have a non-extra variable

frosty dock
zealous glen
#

TIL

#

But it’s still not an extra variable

frosty dock
#

the meaning of config.mult is void, the implementation is up to you

#

similar is not true of config.h_size

zealous glen
#

But why didn’t thunk define functions for individual Jokers rather than the endless tower;_;

sly forge
zealous glen
sly forge
#

eh. not the worst, it's forgivable still

frosty dock
#

rationalize all centers

zealous glen
zealous glen
sly forge
#

so what do people think of using context as a keying structure instead?

frosty dock
#

imo it's less readable than

calculate = function(card, context)
  if context.whatever then

  end
end
frosty dock
#

you have to keep in mind some jokers need multiple contexts

zealous glen
sly forge
#

if you want typing in Lua... actually you can get it with annotations and the lua language server on vscode right now

#

not Julia but hey

zealous glen
#

There’s a trick where you can define a type and then a function with the same as another function, but that takes that type as an argument, as a way to select for cases without using ifs

frosty dock
#

type args

#

function calculate<joker_main>(card, context)

sly forge
#

ok, how about having a context.type field containing an 'enum'

#

(w/ annotations)

#

type args, ha

#

no

zealous glen
#

I think overhauling the calculation system can wait

#

For now I’d rather have it working

sly forge
#

appreciate the joke there

zealous glen
#

What’s a type args?

sly forge
#

like List<T> in java

#

the T

zealous glen
#

I don’t know Java

#

Is that like parametric functions?

#

In Julia

sly forge
#

nah

wintry solar
#

man I haven't programmed in a static typed language in ages

sly forge
#

at a basic level, List is a "function on types", like given int as a type, List<int> would be a type

#

and T is a type parameter / type argument

frosty dock
#

i mean a context.type sort of enum-driven system can work, but I think it's fine as is and can wait for now

sly forge
#

yeah

frosty dock
#

the fact we have calculate functions separated out for each center is already so much more readable

zealous glen
#

To be fair I don’t remember the name for the Julia functions that can depend on a type like that

#

I just called it parametric like parametric types

sly forge
#

actually both use "parametric types"

frosty dock
#

tbf parametric functions are similar

sly forge
#

just in different ways

#

so yeah, a copy(x) function taking x of type T and returning type T, the T would be another example

#

the actual syntax might like copy<T>(x: T) -> T or something

zealous glen
#

Is that Java?

sly forge
#

...no

frosty dock
#

...

sly forge
#

java is awkward

zealous glen
#

Ah wait is that a Julia anonymous function

#

I don’t exactly recognize that syntax

#

I don’t remember ever typing anonymous Julia functions

#

Is that even possible?

frosty dock
#

that's not an anon function

#

the syntax isn't even the point here

#

I don't mind reading that as pseudocode even if it's valid in some lang

zealous glen
#

Is it valid in some language or not?

#

I thought it was

#

But I just didn’t know which

sly forge
#

it would be valid in Rust, maybe, but I'm just using the most common notations

frosty dock
#

it doesn't even really matter if it's valid, if we understand what it means

zealous glen
#

I didn’t

#

:<

frosty dock
#

:p

sly forge
#

the idea is, in my fantasy programming language, you'd call that thing as copy<int>(5). or just copy(5) most likely, the int argument will be inferred

zealous glen
#

I’m still not sure because it looks close to Julia but isn’t Julia so it’s messing with me

sly forge
#

it's not Julia at all

zealous glen
#

I got that already

frosty dock
#

now why would you copy an int

zealous glen
#

But my parser is guessing it’s Julia to try it first in a naive optimization heuristic and failing, then getting too confused to revert to parsing it the traditional way

sly forge
#

however julia's docs seem quite complex, so

zealous glen
#

It’s been a while since I used Julia frequently

#

Current place uses Python (unfortunately for me)

#

(though still better than other options)

sly forge
#

oh, my example actually works perfectly in python

zealous glen
#

Eh, except for macros which I never learned the rest was ok

sly forge
#

just replace <> with []

zealous glen
#

I’ve never seen that in Python

#

Is that new?

#

Or is it like

sly forge
#

funnily enough Python's bolted-on type system is in some ways better than some other languages' actual type systems

zealous glen
#

Cython

sly forge
#

nope, it's TYPE ANNOTATIONS!

#

which actually do nothing, technically, but are useful

frosty dock
#

it's type hints, technically

#

much like typescript, which won't help you at runtime, but forces you to write cleaner code instead... but then again js by itself is a crime against humanity

worldly sapphire
#

okay, i think i got a better idea for the joker that doesn't involve the loyalty card... i guess

wintry solar
#

did you not try context.joker_main?

worldly sapphire
#

i did put it in the start

#

idk if it worked

#

like this?

SMODS.Jokers.j_cheesecake.calculate = function(self, context)
                if context.joker_main then
                if self.ability.name == 'Cheesecake Bomb' then
                    self.ability.loyalty_remaining = (self.ability.extra.every-3-(G.GAME.hands_played - self.ability.hands_played_at_create))%(self.ability.extra.every+1)
                    if context.blueprint then
                        if self.ability.loyalty_remaining == self.ability.extra.every then
                            return {
                                message = localize{type='variable',key='a_chips',vars={self.ability.extra.chip_mod}},
                                chip_mod = self.ability.extra.chip_mod
                            }
                        end
                    else
                        if self.ability.loyalty_remaining == 0 then
                            local eval = function(card) return (card.ability.loyalty_remaining == 0) end
                            juice_card_until(self, eval, true)
                        elseif self.ability.loyalty_remaining == self.ability.extra.every then
                            return {
                                message = localize{type='variable',key='a_chips',vars={self.ability.extra.chip_mod}},
                                chip_mod = self.ability.extra.chip_mod
                            }
                        end
                    end
                    end
                end
            end
        end```
#

oh my god, i'm feeling so dumb right now

mellow sable
#

SMODS.find_card is a nice addition

worldly sapphire
#

:( angy with myself

mellow sable
#

no longer do I need to put prefixes in my joker names

wintry solar
frosty dock
worldly sapphire
#

now i cant make the loc_def work >:(

#

the infamous loc_def

function SMODS.Jokers.j_cheesecake.loc_def(card)
                return {card.ability.extra.every + 1, card.ability.extra.chip_mod, localize{type = 'variable', key = (card.ability.loyalty_remaining == 0 and 'loyalty_active' or 'loyalty_inactive'), vars = {card.ability.loyalty_remaining}}}
            end```
wintry solar
#

what doesn't work about it?

worldly sapphire
#

the game generates this crash

night pagoda
#

are there any changes to SMODS.end_calculate_context(context) in joker's calculation? I thought I saw commit about that on github

gilded narwhal
#

Tried creating a new account

zealous glen
#

Idk but earlier aure mentioned one can just check for context.joker_main

#

@night pagoda

night pagoda
#

would that be the same thing essentially?

#

by that I mean do I just replace everything with it and it should be fine without any additional changes?

zealous glen
#

If I understood what aure said, yes

#

But idk what your jokers are doing so Idk

night pagoda
#

ty!

sly forge
#

hm. after working on enhancements a bit more, I feel that making a calculate_enhancement function is somewhat misguided. What kinds of enhancements do people want to make?

#

something like X-Card, for example, modifies getting the card's rank, it doesn't need calculate_enhancement

wintry solar
wintry solar
#

wait nvm I am dumb

mellow sable
#

do mod versions print in the error screen of Steamodded 1.0.0? or if not, is there a way to make them print?

wintry solar
#
position = "after"
payload = '''end'''```
getting an error on this in lovely, any tips?
worldly sapphire
# worldly sapphire

this is generating this crash how do i fix this?

function SMODS.Jokers.j_cheesecake.loc_def(card)
                return {card.ability.extra.every + 1, card.ability.extra.chip_mod, localize{type = 'variable', key = (card.ability.loyalty_remaining == 0 and 'loyalty_active' or 'loyalty_inactive'), vars = {card.ability.loyalty_remaining}}}
            end```
#

WHY ITS TRYING TO CONCATENATE A NIL VALUE

wintry solar
#

one of your values doesn't exist

worldly sapphire
#

like

#

its all correctly set

#

but its giving this error

#

Man i love when "after ERROR hands played this joker gives +ERROR chips. ERROR"

worldly sapphire
#

this is the only part of the loc_def that crashes the game when i hover the joker

localize{type = 'variable', key = (card.ability.loyalty_remaining == 0 and 'loyalty_active' or 'loyalty_inactive')```
remote coral
#

Arbitrarily large

worldly sapphire
#

game be like "nope, no animations nope "

mellow sable
#

with the same chance

long gust
#

why is its back two lines on a graph

zealous glen
#

The UI object holding your number of hands is replaced with a single square particle that immediately vanishes out of existence

#

When you check the list of hands for this run, it has been replaced with the sound gong

worldly sapphire
zealous glen
#

concatenating is putting things side by side

#

In this context it means concatenating strings

#

which is text

#

except one of the values isn't a string, it's nil, so the operation fails

#

either the localize call is going wrong, or what the return value is used for

worldly sapphire
#

its the loc_def

#

it just doesn't work

#

the chips and the every works fine

#

but the message saying how many hands are left doesn't feel right

zealous glen
#

Again

#

either the localize call is wrong or what the return value is used for

#

You could test it by temporarily remplacing the localize call with something else

worldly sapphire
#

it worked

#

but it says only Active!

austere schooner
#

so, q: if you wanted to duplicate and modify an existing joker, is there a better way of doing that than "copying the code for it out the original game and modifying it from there", especially if it does something that isn't just chips/mult/xmult

worldly sapphire
#

looks like the issue is the localize

worldly sapphire
# worldly sapphire bruh

when its removed and i left only this its stays like this

card.ability.extra.chip_mod, card.ability.loyalty_remaining == 0 and 'loyalty_active' or 'loyalty_inactive'```
zealous glen
worldly sapphire
#

so do i actually need to put a context or a name change in the config?

wintry solar
#

that looks like it's working to me?

zealous glen
worldly sapphire
#

i tried everything

#

i changed the remaining in the config to loyalty_remaining and it does not work

wintry solar
#

have you added it to the localize tables properly?

worldly sapphire
#

its the same as the loyalty card

#

i just changed the self's to card

worldly sapphire
#

and the xmult

#

its set to card

zealous glen
#

But does the card's ability have loyalty_remaining?

#

It won't have it unless you defined it

worldly sapphire
#

i'm starting to get coo coo crazy

zealous glen
worldly sapphire
#

idk man, 'im just confused

#

:(

zealous glen
#

But you can see that this is config.extra.loyalty_remaining and not config.loyalty_remaining

#

So you have two options:

  1. Define config.loyalty_remaining;
  2. Replace ability.loyalty_remaining with ability.extra.loyalty_remaining.
worldly sapphire
wintry solar
#

do option 2

worldly sapphire
#

i already tested it

#

i did put the card.ability.extra.loyalty_remaining

#

it still crashes

#

😔

zealous glen
#

What's the crash message

worldly sapphire
zealous glen
worldly sapphire
#

where?

zealous glen
#

where it was before you removed it to test

worldly sapphire
zealous glen
worldly sapphire
#

here is the code rn

function SMODS.Jokers.j_cheesecake.loc_def(card)
                return {card.ability.extra.every, card.ability.extra.chip_mod, localize{type='variable',key = card.ability.extra.loyalty_remaining == 0 and 'loyalty_active' or 'loyalty_inactive', vars = {card.ability.loyalty_remaining}}}
            end```
zealous glen
#

localize is used so the game can display text in multiple languages. If you don't care about that, you can usually get away with just writing text

wintry solar
#

here

#

you need extra

zealous glen
#

or that

#

that probably works?

wintry solar
#

because card.ability.loyalty_remaining is still nil and you're using it as the variable

worldly sapphire
#

still crashes i already tested

#

when i fully remove the localize it works

#

but it shows the remaining_active and remaining_inactive

#

the literal words

#

btw

#

is there a way to atleast track how many hands it needs, to appear in the custom message?

mellow sable
#

does anyone know how to modify G.E_MANAGER so it can process multiple events in one frame?

scenic zenith
#

does anyone know how i can save custom game data

#

to the save file

#

cause im pretty sure the game does not save my deck config

zealous glen
scenic zenith
#

highest ante reached

scenic zenith
#

basically my deck does something if you reach a new highest ante

zealous glen
#

Lemme see

scenic zenith
#

i saved that in config

#

and it just resets to 1 everytime

edgy reef
zealous glen
scenic zenith
#

yea i think decks just do not care about config

#

cause every single deck effect is static

edgy reef
#

I haven't looked into it so I have no clue wtf anything in that file does but if you need to edit E_MANAGER logic it's probably through there.

scenic zenith
#

trying to save it in GAME rn

zealous glen
scenic zenith
#

it sounds logical but just thought i'd ask if there's a smarter solution

#

(also i haven't had it work yet)

zealous glen
#

I did this

scenic zenith
#

oo i think that finally made it work

mellow sable
#

I should again ship this as a separate mod for competitive players

frosty dock
#

i could use this

#

ectoplasm is very much balanced

wintry solar
rough furnace
worldly sapphire
#

is it possible to create a joker that copies a random joker ability?

mellow sable
#

i just found the most cursed line of code in Balatro (this is for Yorick calc)

frosty dock
#

certified thunk moment

wintry solar
#

I dunno, this is a pretty cursed way to handle edition calculation

maiden veldt
#

does anyone know where the code that makes the plasma deck purple scoring is?

edgy reef
#

Although I did forgor to remove soul_pos

#

But I have loc_vars for Disenhancements now

long gust
#

why did you make a worse glass card

edgy reef
#

Because it's supposed to be bad

#

You no want on card

long gust
#

oh it's a disenhancement. is this just to nerf standard packs

edgy reef
#

They don't spawn from anything yet

#

Haven't made that part xdd

#

Also why tf will this not patch

#

I used the wrong slash LMAO

#

ok finally it does

pure shore
wintry solar
worldly sapphire
#

is there a way i can make a card name be the same color as the polychrome badge?

pure shore
mellow sable
worldly sapphire
#

ty

mellow sable
#

yw

maiden veldt
#

relating to that, where do the C:example functions draw their colours (or function like dark_edition) from?

mellow sable
#

there’s a function that maps those to colors

maiden veldt
#

where can i find that?

mellow sable
#

misc_functions.lua

maiden veldt
#

thanks

#

i checked in misc_funcitons.lua, but dark_edition only links to G.C.DARK_EDITION, and the value for that in globals.lua only has {0,0,0,1} as its value. where is the code that controls the colour cycle?

mellow sable
#

i think it’s in Game:update iirc?

maiden veldt
#
self.C.DARK_EDITION[3] = 0.6+0.2*(1- math.sin(self.TIMERS.REAL*1.3))
self.C.DARK_EDITION[2] = math.min(self.C.DARK_EDITION[3], self.C.DARK_EDITION[1])```
this?
worldly sapphire
maiden veldt
wild gyro
worldly sapphire
#

it doesn't work if i put a normal color in the X:mult space

#

like X:blue or X:red

#

but if i put X:mult it will appear a second X in the X3 mult space

random sleet
#

{X:red,C:white} X#1# {}

worldly sapphire
#

not working

#

the color of the letter will stay black

quaint topaz
#

hey, i have a simple question. I make youtube videos, and i want to make a simple balatro mod that just changes what the talking joker says, would anyone have any idea how to do that?

#

actually; i can just use debug mode

#

nevermind

zealous glen
mellow crag
#

I have a stupid idea, that might actually work

#

What if we added more than just cards to a collection

#

Like, added info about specific things

#

Or changed the layout of the collection

#

Idk

random sleet
#

what

remote coral
random sleet
#

what else would be in a collection but cards

shell timber
#

balatro: legacy

wintry solar
#

Is this so you can categorise collections by where they’re from instead of it all being together?

#

So you could see everything a mod adds in one place?

zealous glen
rough furnace
random sleet
#

thanks

royal ridge
#

can you use loc_vars to dynamically change the name/description/infoboxes of a joker's local loc_txt?

#

based on conditional statements and such

mellow crag
random sleet
#

little treats...

frosty dock
zealous glen
royal ether
#

i think the issue w/ using collection for stuff is that it pulls from g center pools

#

unless ur making a new page

#

i guess thats what you mean actually

leaden siren
#

how would I go about setting a deck to only use the "checkered" suits? hearts/spades only

I'm trying to change a modded deck (all 8s), it already iterates through all the cards for its normal effect but I was wondering how to approach this with the suit change as well (not used to lua, appreciate any help)

#

also this isn't for a release it's just for me to test some other stuff

frosty dock
#

check out how checkered deck itself does it - you can simply extract the game executable with 7-zip

leaden siren
frosty dock
#

np

pseudo kindle
#

not sure if this is the right place to just share ideas for mods but im trying to learn pixel art and made this with the idea that it's a rare consumable that randomly shows up in tarot / spectral packs (same idea as black hole / soul rarity), and the functionality is that it combines two COMPATIBLE jokers into one slot to free up space / combine joker effects into one joker. Obviously you have ectoplasm already to make more room for jokers but the rarity of this consumable would justify not adding the hand size penalty and im sure you could get some cool effects by mashing the sprites of 2 jokers together

crisp coral
#

this is the channel for actually developing mods sorry

worldly sapphire
#

is there a way i can make a joker always be in a edition?

night pagoda
#

yeah, by injecting in create_card

pseudo kindle
worldly sapphire
#

like, when it spawns or appears its always polychrome

mellow crag
worldly sapphire
wintry solar
#

Wouldn’t injecting into create_card and calling set_edition if a certain name work?

worldly sapphire
#

i'm trying to make a joker that creates a random polychrome card. is it possible?

mellow sable
#

Yes

#

A joker in my mod has a relatively similar effect (creating a specific negative card)

worldly sapphire
#

hmmm

wintry solar
#

what code have you got so far?

worldly sapphire
#

nothing :(

#

i tried using the marble joker as base, but the game just crashes

wintry solar
#

I'd really recommend learning what your crash logs mean

zealous glen
zealous glen
#

The example they give is exactly how to make a Joker always have an edition

mellow crag
#

i didn't know that

zealous glen
# mellow crag o really? XD

This is the second time in two days that someone doesn’t know Steamodded has had a set_ability hook since 0.9.8

#

Also I’d like to correct myself: at least at the moment the example in the wiki isn’t about setting one’s own edition, though that isn’t difficult

#

I think it must’ve been a tutorial I followed that had it as an example

#

Either myst’s or the other tutorial

worldly sapphire
#

uhm, i'm still confused

#

my bad

zealous glen
#

Search the game’s code for the definition of set_edition to learn how to use it

zealous glen
worldly sapphire
#

well i did it

#

lol

mellow sable
#

Nice

worldly sapphire
#

one thing that is funny, i got the hang of this because of perkeo's negative code

#

it was so easy to understand

zealous glen
worldly sapphire
#

its in portuguese

#

native language

zealous glen
#

But I thought it was coringa

worldly sapphire
#

coringa is the name of The Joker from DC comics here

#

Curinga is the name used in baralhos

zealous glen
#

Apparently some dictionaries classify them as different words; my guess is that people use them interchangeably hence in contemporaneity they’re synonyms

zealous glen
worldly sapphire
#

BRAZIL???

#

LETS GOOOOOOOOO

zealous glen
#

Brazil mentioned

wintry solar
worldly sapphire
#

now for the joker ability....

#

btw, the shader of the polychrome in this card looks awesome

frosty dock
#

wait why'd I make this so inconsistent

#

clearly this should just be center:set_ability(self, initial, delay_sprites)

worldly sapphire
#

can i make a joker spawn cards but with a loyalty card counter?

#

nvm

#

idea scrapped

worldly sapphire
#

well, final product is done

hallow forge
#

do you mean playing cards?

worldly sapphire
#

yes

#

i forgor

#

let me just fix it rq

zealous glen
#

I think you can just say “cards”

worldly sapphire
#

i think it looks better like this

frosty dock
#

why am i so inconsistent with arguments 💀

wintry solar
#

where can I see examples of using load?

maiden phoenix
zealous glen
#

You can also use require instead of NFS.load

wintry solar
#

no not like that, like jokers saving and loading their internal variables between game closures

#

how does the source code handle that

zealous glen
#

It handles it automatically currently but otherwise I don’t have much to say besides “read the code” :<

#

I think it saves and loads recursively but also that it creates new card objects whenever it loads

#

So references to specific cards are lost

maiden veldt
#

how would i change the values for the self.C.DARK_EDITION functions in game.lua? would i use the take_ownership function with a specific tag? or is it simpler than that?

zealous glen
#

I wouldn’t change it but create a new one

#

Unless you’re just making a mod that changes colors and textures

maiden veldt
zealous glen
#

In which case you could probably just hook or overwrite it directly

maiden veldt
#

how would i do that? i'm not familiar with this section and how to call for it

zealous glen
#
self.C.DARK_EDITION = “Hello, world!”
``` would overwrite it with the string “Hello, world!”, breaking a lot of things in the process
#

Well, that syntax is probably incorrect unless it’s in the appropriate place

#

I imagine self is either G or G.GAME

frosty dock
#

self is always G in Game functions

#

G.GAME does not have a class associated with it

zealous glen
zealous glen
#

hmmm

frosty dock
#

Game:init() literally has G = self

maiden veldt
#

when i use G.C.DARK_EDITION[1] and change the variable to something like 0, nothing in-game changes. i feel like the game isn't reading it properly

frosty dock
#

there is never a game instance that isn't G, and it would break things if there was

zealous glen
frosty dock
#

the global scope is _G iirc

zealous glen
mellow sable
#

That’s why

frosty dock
#

G is just a global var

zealous glen
#

If you don’t change the function then it’ll be overridden when updated in the next frame

maiden veldt
#

oh i see

zealous glen
frosty dock
#

no it's _G

#

just checked

#

oh what that's cursed

#

_G._G is the same thing as _G

zealous glen
#

That’s not so cursed

maiden veldt
frosty dock
#

brb putting _G._G._G._G._G._G._G._G._G.G somewhere in mod code

maiden veldt
# zealous glen What’s your code

only showing what's important

function SMODS.INIT.Colors()
    
    local greyscale_mod = SMODS.findModByID("GreyscaleTextures")
    
    G.C.DARK_EDITION[1] = 0.6+0.9*math.sin(G.TIMERS.REAL*5.0)
    G.C.DARK_EDITION[3] = 0.6+0.6*(1- math.sin(G.TIMERS.REAL*5.0))
    G.C.DARK_EDITION[2] = math.min(G.C.DARK_EDITION[3], G.C.DARK_EDITION[1])```
maiden veldt
zealous glen
#

I mean I imagine it shouldn’t be necessary to make it a patch

zealous glen
#

So you didn’t fix your problem

#

It’s still being overridden each frame

frosty dock
#

doing it in init changes something for all of one frame

zealous glen
#

You need to find the function that sets it each frame and change that, or if it happens to be stored coordinate-wise here, write it correctly

maiden veldt
#

i'm not very familiar with lua, i'm learning just by looking at other people's code, sorry

mellow sable
#

Do it as an addendum to Game:update

frosty dock
#

that function is Game:update()

zealous glen
#

a function definition will look something like

function(vars)
    foo(vars)
end
frosty dock
#

one way you can do this is with a lovely patch, but that seems unnecessary here

#

basically you can modify a function like this

zealous glen
#

What you have is just a function call, so it’s executed exactly once then overridden

frosty dock
#
local update_ref = Game.update
function Game:update(dt)
  update_ref(self, dt) -- call the original first
  self.C.DARK_EDITION[1] = ...
  -- ...
end
zealous glen
#

Which can be defined outside of INIT

frosty dock
#

classic case of 'it doesn't matter'

zealous glen
#

But there’s no INIT in 1.0

#

So it’s forward compatible

frosty dock
#

me tired

zealous glen
#

Whenever you want to make a change that can go before or after an existing function you can use a hook, otherwise use a patch

maiden veldt
#

yeah, i managed to get it to work in the end. it also makes more sense with how the game works. thanks, you three 👍

worldly sapphire
#

i'm still trying to figure out why this upgrades but doesn't give the chips after

SMODS.Jokers.j_lea.calculate = function(self, context)
    if context.cardarea == G.jokers then
    if context.before then
        if self.ability.name == 'Spheromancer Pride' and next(context.poker_hands['Two Pair']) then
        if context.scoring_name == ("Two Pair") then
    card_eval_status_text(self, 'extra', nil, nil, nil, {message = localize('k_upgrade_ex'),colour = G.C.BLUE})
    self.ability.extra.chip_mod = self.ability.extra.chip_mod + self.ability.extra.chips
    end
    if SMODS.end_calculate_context(context) then
        if self.ability.extra.chip_mod > 100 then
        return {
            message = localize{type='variable',key='a_chips',vars={self.ability.extra.chip_mod}},
            chip_mod = self.ability.extra.chip_mod,
            card = self,
        }
    end
    end
    end
    end
end
end```
hushed estuary
#

do these look good?

hallow forge
#

yeah excluding perish

#

what do they do

hushed estuary
#

uhh

#

stickers

#

idk why anyone would wan to make a joker rental

#

or perishable

#

but that's why they're bad ideas

random sleet
#

if the rental one like applied to your next shop maybe

#

like "all jokers in next shop are rental"

oblique gust
#

i just saw this in cheesyjokers

        local function edit_scoring_hand(event, line)
            if line == 603 and debug.getinfo(2, 'S').short_src == 'functions/state_events.lua' then
                local n, v = debug.getlocal(2, 5)
                (truncated)
                debug.setlocal(2, 5, v)
            elseif line == 778 and debug.getinfo(2, 'S').short_src == 'functions/state_events.lua' then
                local n, old_scoring_hand = debug.getlocal(2, 5)
                (truncated)
                debug.setlocal(2, 5, new_scoring_hand)
            end
        end
        (truncated)

im kinda afraid itd f things up with lovely

#

yea nothing much. that joker just wont work

crisp coral
#

yeah that absolutely doesn't work

worthy depot
random sleet
#

cheese mentioned it before and was advised to just use lovely instead

oblique gust
#

yeah ill just stop using it for now before the migration. and it breaks reverie too for some reasons

royal ether
#

mfw the final product uses debug library

#

:programming:

random sleet
mellow crag
random sleet
#

tasty

mellow crag
#

wooooo using 10 of these can give you a naneinf XD

mellow sable
#

who needs X-Chip when we can have ^-Mult

random sleet
#

^-^mult

unreal nacelle
#

Expo-Mult

mellow crag
#

naneinf was never as easy

mellow crag
#

also expo-chips

random sleet
#

nannyinf

wild gyro
random sleet
#

that is the point

wild gyro
#

ah

unreal nacelle
#

Albiet, how does that work? I'm trying to remember how exponents exactly work in this case

wild gyro
#

thought the dash represented an actual number or smth

random sleet
#

nuh

mellow crag
#

or you didn't mean the expo mult/chips

unreal nacelle
#

So, in this case, if the ending Mult was 100, it'd be 100 ^ 2, which is 10,000?

mellow crag
#

yes

unreal nacelle
#

Oh, that is a REALLY fast scaling effect, and I love it for the chaos factor of it.

mellow crag
#

it's an API

#

so you would be able to add your own emult and echip jokers

unreal nacelle
#

Oh, nice!

random sleet
#

feder will there be -Blind

mellow crag
random sleet
#

and/or %Blind

#

yeah

#

:)

mellow crag
#

Sure

random sleet
#

a unified way to reduce blind req

mellow crag
#

I can do that

random sleet
#

so maybe if stuff can trigger off/otherwise affect blind reduction

#

like a joker that doubles all blind reduction effects

#

thatd be slick

#

idk just thinkin aloud

proud cypress
#

Hey everyone! I'm new here and I'm trying to make some mods 😁
Any suggestions on where to look for on how to extend UI?

random sleet
#

good luck

#

nodes[1].nodes[1].nodes[1].nodes[1].nodes[1].nodes[1].nodes[1].nodes[1].nodes[1].nodes[1].nodes[1].

proud cypress
#

looks about right

hushed estuary
#

how do i add tooltips

random sleet
#

depends on what you're adding them to

hushed estuary
#

i need one on a consumable

mellow crag
#

Currently the plan for this api thing is:

X chips
Held x chips
Expo (^) mult
Held expo (^) mult
Expo (^) chips
Held expo (^) chips
X gold
Held x gold

Might also do:
Blind%

random sleet
#

Blind% and -Blind? :)))))))))))

mellow crag
#

Blind% will also enable -%

#

I mean, that’s what it will do probably

#

It says %, but it cuts a percentage from the blind size

random sleet
#

no i mean like

#

flat blind reduction

mellow crag
#

Oh I see

#

Yeah that’s possible

hushed estuary
#

how do i add a tooltip to a center

random sleet
#

first you must create a universe

but that's a lot of work so just use the one we have

#

secondly, loc_def is passed info_queue as the second parameter

#

or loc_vars if youre on 1.0

#

info_queue handles tooltips

#

just put centers in there or check how vanilla stuff handles info_queue for special stuff

shell timber
#

^ Gold when

mellow crag
#

I can grant you expo gold

shell timber
#

i don't really care

random sleet
#

this is gonna be so ridiculous lmao

zealous glen
# mellow crag I can do that

I made some code that animates the Blind size change while inside the Blind (like the Hand and Discard ones), if you’re interested

#

I haven’t done it for the Blind screen (where you either play or skip) but I imagine it’s possible

mellow crag
mellow crag
zealous glen
mellow crag
zealous glen
#

and here's the code

G.E_MANAGER:add_event(Event({trigger = 'after', delay = 0.8, func = function()
            local new_chips = math.floor(G.GAME.blind.chips * self.ability.extra.difficulty)
            local mod_text = number_format(math.floor(G.GAME.blind.chips * self.ability.extra.difficulty) - G.GAME.blind.chips)
            G.GAME.blind.chips = new_chips
            G.GAME.blind.chip_text = number_format(G.GAME.blind.chips)
            
            local chips_UI = G.hand_text_area.blind_chips
            G.FUNCS.blind_chip_UI_scale(G.hand_text_area.blind_chips)
            G.HUD_blind:recalculate() 

            attention_text({
                text = '+'..mod_text,
                scale = 0.8, 
                hold = 0.7,
                cover = chips_UI.parent,
                cover_colour = G.C.RED,
                align = 'cm',
            })

            chips_UI:juice_up()

            play_sound('chips2')
            return true end
        }))
#

For reference, ```lua
self.ability.extra.difficulty = 1.5

zealous glen
proud cypress
#

is this alright? I didn't find any later versions

maiden phoenix
#

You have to download steamodded's code zip instead of the release

proud cypress
#

alright thanks

maiden phoenix
#

Dont forget to update lovely too

proud cypress
#

Also the zip or whats in releases?

frosty dock
proud cypress
#

Cool got it working, thanks again!

#

I was trying to download through git

worldly sapphire
#

One of my jokers that always spawns as a Polychrome crashes my game when it spawns lol

#

Is there a way to fix this?

wintry solar
#

Why does it crash?

worldly sapphire
#

Let me send the crash message

#

Idk why is this happening

wintry solar
#

You need to read the rest of the error trace

#

It’ll tell you where in your code it’s struggling

worldly sapphire
#

I'm not home tho

wintry solar
#

Well we’re going to struggle to fix that then

worldly sapphire
#

When i get home i will try to fix it

wintry solar
#

But you’re not assigning an edition properly somewhere

worldly sapphire
#

In my pc

#

Atleast now i know it crashes when it spawns

worldly sapphire
#

My set_ability in the joker is like this

card:set_edition({polychrome = true}, true)```
mellow sable
#

you're missing a quotation mark

worldly sapphire
#

Oops writing issue

#

Im not in my pc rn

#

Oh, it doesn't have quotations

mellow sable
#

I don't think you need the quotes actually

#
card:set_edition({
  negative = true
})

This is how I have it set up in my code

worldly sapphire
#

Its like this

#

But its polychrome, and idk if that additional true adds something?

worldly sapphire
#

Can you try testing if its the additional true

#

Bc im not home rn

#

And i can't do it myself rn fool

wintry solar
#

The additional true makes it silent or immediate

#

I don’t remember the order but it won’t affect it

#

So I guess that the card you’re checking and the card you set the edition of are different

zealous glen
#

If there’s event shenanigans the lack of immediacy (or its presence) could cause a crash

frosty dock
#

i should start adding indicators like this to alpha versions

mellow sable
#

please do

mellow sable
#

are there any other Steamodded 1.0 ported mods besides Cryptid, SDM_0 dev branch and MystBlinds? Want to test the interactions with multiple mods loaded

frosty dock
#

I should release a port of SixSuits, I've basically done half of the porting already for testing things

maiden phoenix
maiden phoenix
#

Oh I didn't know center objects had added_to_deck and removed_from_deck too that's cool

maiden phoenix
worldly sapphire
#

the crash related to my joker rn

#

he is always polychrome, but when it spawns the game crashes

crisp coral
#

in shop?

worldly sapphire
#

shop, or even spawned by soul

#

the joker is a legendary btw

#

but when it spawns he crashes the game :)

#

His set_ability

function SMODS.Jokers.j_polychromereactor.set_ability(card, initial, delay_sprites)
                card:set_edition({polychrome = true})
            end```
crisp coral
#

yeah it happens with those two spawnings

#

it's because of the set_edition in set_ability

worldly sapphire
#

where do i put it then?

crisp coral
#

i! have no idea

#

bobm only works because it cannot spawn from the shop

worldly sapphire
#

:/

austere schooner
#

if i wanted to rig up a really jank mod that just prints an internal game variable to the screen, is there something as simple as an update loop for steamodded or do i need to hook onto something else

crisp coral
#

you'll need to hook onto the game's update loop i'm pretty sure

mellow sable
#

you might be able to override poll_edition to always return polychrome for your card

crisp coral
#

poll_edition wouldn't work if you directly spawn the card tho

worldly sapphire
#

if i spawn the card with a debug menu it works fine

#

but when it spawns in a shop, pack or sould the game crashes

fallen tendon
#

Does anybody just have a list of every context used in balatro and what it does?

night pagoda
#

tried my hand at shaders - fluorescent edition, I think I want more colors than just radioactive green

remote coral
#

Where are those fallout Jokers?

wintry solar
#

Oooo I love that shader

#

It’s so greeeeeeen

#

💚

frosty dock
#

đŸ€”

mellow crag
#

I am almost back from work

#

What are you guys up to

mellow crag
frosty dock
#

there's still only hiding mod badges there

mellow crag
#

Oh I see

#

I wonder what other settings you could add?

#

Maybe if steamodded ever adds base game features, you could toggle them there

#

Btw @frosty dock I wonder, how can you place UI objects in the mod menu?

mellow sable
frosty dock
mellow crag
frosty dock
#

no issues here

mellow crag
scenic zenith
#

Hey, I'd like to make it so a card changes it's name/description at some point
How would I do this?

I was assuming i an use loc_vars "key" return and just like adding my own loc_txt into the game using

SMODS.process_loc_text(G.localization.descriptions[self.set], changed_key, loc_txt2)
return {key = card.ability.extra.broken and changed_key or card.config.center.key, ...}
#

this errors out somewhere in localize

#

oh this doesn't parse it

mellow sable
frosty dock
scenic zenith
#

will try

#

hmm

#

it doesn't work

#

here's what im trying

#

it does this ingame

zealous glen
scenic zenith
#

prob pressed the debug button for make eternal on accident

frosty dock
#

hm what is ominousmirror defined as here?

scenic zenith
#

its the joker

zealous glen
#

I figured out why this wasn't working. I wasn't giving the folder to the lovely patch

#

because I didn't know I had to give the folder

frosty dock
#

try putting the function directly in the SMODS.Joker constructor

#

oh wait

#

no, the object is just wrong

zealous glen
frosty dock
#

remove the loc_txt = {} layer of nesting

zealous glen
#

The effect was inspired by a Reddit post. I'm trying to contact the person who made it but I implemented it for now because I already had had ideas that would require the same backend as this anyways

scenic zenith
#

oh oops

#

that's what i get for copy pasting

frosty dock
scenic zenith
#

ok it stil ldoesn't work but the description is no longer broken

frosty dock
#

that's a start

scenic zenith
#

lemme see if it changes description

#

ok neat

#

now why does it not change the name

frosty dock
#

might honestly be my fault

scenic zenith
#

does it just not use name in loc_txt

frosty dock
#

I'll see what I can do

scenic zenith
#

would be hype

#

we kinda thought of quite a few cards that change name

zealous glen
#

Worst-case you can manually change the tooltip

frosty dock
#

hm that makes sense, names happen in a different spot than descriptions do

#

shouldn't be too bad to fix

zealous glen
#

I mean you can also manually change the description

frosty dock
#

yeah sure but that's boring

#

it's meant to be supported

zealous glen
#

Then why am I doing it manually đŸ€”

proud cypress
#

any suggestions on where to hook into the event that gets fired when you add a joker to your run?

frosty dock
#

Card:add_to_deck()?

proud cypress
#

đŸ‘ŒđŸœ thanks

#

this works, but how do I access the card info?

frosty dock
#

the original function is Card:add_to_deck, meaning there's an implicit first argument self

#

it's just syntactic sugar, but it makes quite the difference

proud cypress
#

it doesnt let me access self

#

does it ned to be a part of the signature?

scenic zenith
#

[redacted]

#

oh wait no self shoul be center

#

im confusing myself cause it is broke but it's prob just me

#

oh im dumb

#

im confusing the class center with like some sprite called center

scenic zenith
#

either make the function with a : which adds self automatically

#

or write self as the first argument

proud cypress
#

so I get this log on console

#

but it still crashes

scenic zenith
#

awww

#

the load function of jokers is called at like the start of it

#

meaning all the stuff hasn't been set and it'll change ability

#

@frosty dock any chance that can be moved to the very end of it

#

i feel like making sure the sprite of a card is correct is not a stupid idea for using load() in joker right