#💻・modding-dev

1 messages · Page 104 of 1

nocturne garnet
#

NO NANEINF

frosty dock
#

no savescum

wooden nexus
#

No Oopstone

karmic kelp
#

good enough, especially around all the other suggestions

violet void
#

what am I supposed to do when I have 2 of each suit looking for a flush 🥺

faint yacht
#

??? and Profit! could be at the end. 😆

rustic radish
#

what does this error mean? Oops! The game crashed:
Syntax error: engine/controller.lua:1511: 'end' expected (to close 'function' at line 1004) near '<eof>'

Additional Context:
Balatro Version: 1.0.1n-FULL (best guess)
Modded Version: 1.0.0~ALPHA-1221b-STEAMODDED
LÖVE Version: 11.5.0
Lovely Version: 0.6.0

Stack Traceback

(3) C function 'function: 0x1f05cf38'
(4) global C function 'require'
(5) main chunk of file 'main.lua' at line 1867
(6) global C function 'require'
(7) LÖVE function at file 'boot.lua:323' (best guess)
Local variables:
c = table: 0x1f05a5a8 {identity:false, version:11.5, accelerometerjoystick:true, modules:table: 0x1f05a5f8 (more...)}
openedconsole = boolean: false
confok = boolean: true
conferr = nil
(8) global C function 'xpcall'
(9) LÖVE function at file 'boot.lua:362' (best guess)
Local variables:
result = boolean: true
(10) global C function 'xpcall'
(11) LÖVE function at file 'boot.lua:377' (best guess)
Local variables:
func = Lua function '(LÖVE Function)' (defined at line 355 of chunk [love "boot.lua"])
inerror = boolean: true
deferErrhand = Lua function '(LÖVE Function)' (defined at line 348 of chunk [love "boot.lua"])
earlyinit = Lua function '(LÖVE Function)' (defined at line 355 of chunk [love "boot.lua"])

thick panther
#

What do you think of these suit colors? (Im making a modified deck skin with the normal skins i use, but with clubs being more distinct. Ik I could use high contrast, but that ruins the art, so this is a best-of-both-worlds solution)

exotic hedge
#

anything else

wooden nexus
thick panther
frosty dock
#

no jolly

nocturne garnet
violet void
thick panther
#

What is the base card called in the game (The basic white card)? I want to take ownership and replace its atlas with a different one.

thick panther
exotic hedge
teal estuary
teal estuary
#

hrm, maybe make it look more like a metal plate? add bolts on all 4 corners or something

tidal ice
#

what would I need to change about the highlighted code in order for this to actually rank up cards

wooden nexus
#

still needs updated art

frosty dock
wooden nexus
# wooden nexus

that and i need to code in the creation of the ace of hearts

nocturne garnet
frosty dock
#

where one rank up looks like this under smods conditions

#

(rather, one rank up of all selected cards in hand, i.e., strength)

#

should i make that a util function maybe?

wooden nexus
tidal ice
#

because idk if g.hand.cards was correct

#

but ty this helps otherwise

frosty dock
#

not sure exactly what you're trying to do, but wouldn't you just want to rank up the other_card?

tidal ice
#

ah right

frosty dock
#

i might not get your joker effect

tidal ice
#

what its ment to do is upgrade any played 2-5 (which may not be useful now that im thinking about it but ill make it anyways)

wooden nexus
#

Fixed the art and i'm working on that start of round effect

frosty dock
tidal ice
#

alright

frosty dock
#

G.hand.cards are the cards held in hand / unplayed

tidal ice
#

oops yeah thats what I thought but I tried just in case

thick panther
#

If I wanted a Joker to half all probabilities in the game, would I need a context if-statement do would I just put it directly in the calculate function?

frosty dock
#

you'd use add_to_deck / remove_from_deck functions for that to change G.GAME.probabilities.normal

#

no calculate function needed

thick panther
frosty dock
exotic hedge
thick panther
#

Can you set the sell price of a Joker seperate from its cost?

frosty dock
#

(egg, gift card)

thick panther
#

I mean the base sell price, not having a joker change other sell prices. Is there something like that like cost?

frosty dock
#

you can set sell_cost manually but it'll be overwritten by set_cost

#

so you probably want to use the same mechanic that these jokers do with ability.extra_value

#

just set it in set_ability

stray warren
#

So I have this calculate function that looks for dark suits in scoring_hand, and light suits in the hand, and destroys them. Everything gets destroyed as expected, but for some reason after the round is over, the total cards in deck count is higher than the supposed max number of cards in deck at that time (ex. it will say 49/43 in the bottom right)

Here's the video of it happening

#

I can't figure out what is going on to make that happen

elder vapor
#

i think you created a ghost card somewhere

stray warren
#

That would make sense, because gaps appear in your hand if you continue the run

#

I think it has something to do with when I'm dealing with the scoring_hand part of the code, because if I comment that whole section out, I don't have any issues

wooden nexus
#

Okay I'm stupid, Idk how SMODS.create_card works for this

thick panther
#

funny banana

teal estuary
#

only findable after cavendish is deatroyed

thick panther
#

I could make it legendary. Imagine getting this out of a soul card

teal estuary
#

im 99% sure i’d spend it all within one shop, rerolling for blueprint

stray warren
#

So I somehow created 3 ghost cards in that process

wooden nexus
wintry solar
#

you need to assign the card to a variable

#

and then emplace that

#

MurphyCardA is a table, not a card object

wooden nexus
#

how do i assign the table to a card?

elder vapor
#

local _card = SMODS.create_card(MurphyCardA)

wooden nexus
#

ah

tidal ice
#

I got this properly ranking up cards, only issue is that it increases the rank of all 5-2 ranked cards before scoring, it causes weird visual things like a 4 card giving 3 chips

wooden nexus
#

that makes... more sense lol

#

Do the complex and forget the basic

elder vapor
#

and then replace MurphyCardA at the emplace and materialize funcs with _card

#

changed card to _card because card is alr used in the calculate function params

wooden nexus
#

Okay we're getting closer

#

how do i set the card that spawns to always be the Ace of Hearts tho?

wintry solar
#

use SMODS.change_base() before you empalce it

wooden nexus
#

oh

tidal ice
#

oh that makes sense

#

oh wait shit i thought you were talking about my thing

wintry solar
#

for yours, can't you just make it in context.after?

wooden nexus
#

oh there actually is a change to ace of hearts on the wiki, cool

tidal ice
wooden nexus
#

Hey, I think it works now

#

Epic

#

yup

tidal ice
#

I kinda don't like making this Joker im ngl

#

its effect probably isnt even good

stray warren
#

Where in the code does Sixth Sense handle destroying cards in the scoring_hand? I'm checking in card.lua and I can't find it

thick panther
wooden nexus
scarlet merlin
wintry solar
#

what's the problem?

scarlet merlin
#

when I launch i get this error

#

any ideas?

stray warren
elder vapor
wintry solar
#

Do you have the atlas in both the 1x and 2x folders?

wintry solar
scarlet merlin
#

I have GrassyMod.png in both assets -> 1x and assets -> 2x

stray warren
#

without creating these weird ghost cards

wintry solar
#

it's in state_events

stray warren
#

Ah, ok. Thanks

wintry solar
#

O: finally fixed the Malverk switch profiles/reloading atlases crash 🎉

stray warren
#

When I call start_dissolve() on a card in G.play.cards do I need to do table.remove(G.play.cards, current_card), or is that done inside that function? Cause when I reload the game, those ghost cards appear back as they were before they were destroyed

thick panther
#

Is there a way to have colour override mult_mod's color when returning in calculate?

return {
                card = card,
                mult_mod = mult,
                message = '^' .. card.ability.extra.ExpMult,
                colour = G.C.DARK_EDITION,
            }
stray warren
#

Ok, so when it is all glass cards and they all shatter with shatter(), no ghost cards are created. If it is all regular cards and start_dissolve() is called on them, for some reason ghost cards are created. Anybody have any clue why this might be happening? I'm about to lose my mind trying to figure it out lol

wooden nexus
#

welp, trying to figure it out

exotic tangle
#

Hello, I've gotten into modding and I've got something going with my jokers but...

I don't know how to play custom sounds. I know the code requires the play_sound() function and an SMODS.Sound thing, but apparently I need to add the mod Prefix... but I'm very clueless as to what it means to add the prefix?

Help appreciated, thanks!

scarlet merlin
elder vapor
exotic tangle
elder vapor
#

you can set the prefix to whatever, i would recommend keeping it to 3-4 characters

#

for playing the sound the format is <mod prefix>_<sound name>

exotic tangle
#

Okay thank you so much for the help!

thick panther
#

What is the edition param for returning in a Joker's calculate function?

scarlet merlin
#

Does anyone know what the if statement would look like to check if card played is steel?

stray warren
#

if context.other_card.ability.name == "Steel Card"

#

sorry, let me correct that

#

Forgot to add ability before name

scarlet merlin
#

awesome thanks!

winged bridge
clever steppe
#

for anyone who wants to try making their own standard decks, here's my aseprite file with all the blank deck backs. posted these in fan art too but theyre reskins for a holiday mod im a part of 😄 #🎨・fan-art message

golden lake
#

o nice! im sadly going to need to do entirely original deck backs due to: hubris

clever steppe
shell tangle
#

I'm trying to use the event manager to make it go and change editions of scored cards one by one, but it's ignoring the event delay only for changing the edition, changing all cards at once, then it scores, and then it shows the status text.
I'm in context.before, so no idea why it's adding it after scoring and not before scoring either.

Any ideas or insights?

inland hedge
#

is there like a wiki where some of the basics for modding are laid out?

shell tangle
# inland hedge is there like a wiki where some of the basics for modding are laid out?
GitHub

A Balatro ModLoader. Contribute to Steamopollys/Steamodded development by creating an account on GitHub.

GitHub

A Balatro ModLoader. Contribute to Steamopollys/Steamodded development by creating an account on GitHub.

inland hedge
raw path
#

if anyone is interested I just spent a couple hours making a balatro color palette filter you can apply to images through Krita using its 'Palettize' filter

raw path
#

It isnt perfect but it is nice if your goal is just to import an image and make it work purely off of colors ripped from existing Jokers, here's a couple examples:

winged bridge
#

how do i add new jokers into the game

arctic lion
tidal ice
#

idk where it is though

#

oh yeah I have no idea whats up here

arctic lion
tidal ice
#

right

#

how do I keep forgetting

arctic lion
#

because languages are ✨ inconsistent ✨

stray warren
#

I can't think of a language that uses '=' for equality. The vast majority of them use '=='

arctic lion
#

but some use === or is which doesn't help

winged bridge
#

what do you call the joker that you have on the table

winged bridge
#

now to find a way to actually implement the ability

thorny adder
modern tundra
#

Are a bunch of mods just waiting on updates right now? The only one I can really seem to get working is Cryptid

stiff locust
# winged bridge now to find a way to actually implement the ability

this description would be better written something like this

When blind is selected, this joker gains X0.1 mult and destroys 1 other random joker
Cannot be sold or destroyed unless captured by a Sealing Card
If this Joker does not destroy another Joker when blind is selected, the run ends

the last line changing makes it not possible to circumvent and neuter this joker's effect by simply having 1 eternal joker, which can't be destroyed

stiff locust
#

can you screenshot your mods folder

modern tundra
#

And again, Cryptid works completely fine with no issue, at least so far

stiff locust
#

okay well without crashing is a bit more complex
there are some very unstable mods

modern tundra
#

Therein lies the problem, Cryptid is the only one that hasn't crashed😅

stiff locust
#

hey look, bunco

shell tangle
stiff locust
#

yeah most of your crashes are likely caused by 0.9.8 mods

modern tundra
#

Ah, that'd probably do it. Know of any lists like that with more updated mods?

stiff locust
#

dimserene has a selection of modpacks that are 1.0.0 friendly

shell tangle
stiff locust
#

and they have their own installer

#

which is very cool

modern tundra
#

thanks!

winged bridge
#

what's the color for gray for the currently +X mult line

maiden phoenix
#

C:inactive

winged bridge
#

how do i select a random joker in the joker area to be destroyed

bold sleet
#

Alright, new question from this idiot (me):
How would I make a joker that triggers every X-cards played?

bold sleet
#

This line, to be specific.

#

(clueless)

winged bridge
#

how do i spawn my joker in a test game using debug mod i wanna try it

frosty dock
#

hover over it in the collection and press 3

bold sleet
#

Every other reference is for the language translation.

frosty dock
#

search for Loyalty Card

#

not j_loyalty

#

the calculate functions always refer to the name in vanilla, not the key

bold sleet
#

ok

winged bridge
#

like the mod?

bold sleet
#

The joker, I think.

winged bridge
#

oh

#

where do i see it

bold sleet
#

Is this what I am looking for?

bold sleet
winged bridge
#

oh madness is literally what im making lmfao

#

😔

bold sleet
#

Madnesser

winged bridge
#

yeah except for the part that it end the run if theres no destructable joker

violet void
#

maybe it can work

bold sleet
#

-# what is a config.extra?

violet void
#

of your joker yes

#

when you increase the count, make sure you aren't in context.blueprint or it will increase twice

winged bridge
#

how do i make a joker end the run

bold sleet
#

Now I need to figure out how to make a reverse counter.

#

Which is just subtract active (7) - count (int between 0 and 7)

#

idk how to do that in here.

violet void
#

why do you need a reverse counter

winged bridge
#

just +1

bold sleet
#

For the remaining thing.

#

count 0, 7 remaining
count 1, 6 remaining
and so on.

#

For the how many remaining 7s you have to play for it to trigger.

violet void
#

mult_activate - count

bold sleet
#

But where?

#

I don't know how to store variables inside jokers and stuff.

#

(yes, I am stupid)

winged bridge
#

the joker isnt removing other jokers when a blind starts what am i doing wrong

violet void
#
        return {
            vars = {
                center.ability.extra.s_mult,
                center.ability.extra.suit,
            }
        }
    end```

loc_vars is the place for showing data in the joker description

in loc_txt then you can reference them by using #1#, #2# etc like

```       text = {
            "Played cards with",
            "{C:hearts}#2#{} suit give",
            "{C:mult}+#1#{} Mult when scored",
        }```
bold sleet
#

(is that for me?)

#

(or idk)

violet void
#

depends if thats what you wanted to know

bold sleet
#

Checking...

#

But where and how do I declare variables for a specific joker?

#

i.e. Any counter, really

#

And where do I do these funky operations?

violet void
#

can you send your joker code

bold sleet
#
SMODS.Joker {
    key = 'battleworn_insomniac',
    loc_txt = {
      name = 'Battleworn Insomniac',
      text = {
        "{X:mult,C:white}x#1#{} every {C:attention}7th{} played 7",
        "{C:inactive}#3# remaining{}"
      }
    },
    config = { extra = { Xmult = 2.0 , count = 0 , active = 7 } },
    loc_vars = function(self, info_queue, card)
      return { vars = { card.ability.extra.Xmult , card.ability.extra.count , card.ability.extra.active} }
    end,
  }
#

Yes, I am stupid af.

winged bridge
#

oh wait i can just replace self with context

#

still getting error
damn

wintry solar
#

what are you trying to do?

violet void
# bold sleet ```lua SMODS.Joker { key = 'battleworn_insomniac', loc_txt = { nam...

this is how I would do it

        extra = {
            Xmult = 2.0, 
            Xmult_activation = 7
            rank = 7
            count = 0
        }
    },```


```      text = {
        "{X:mult,C:white}x#1#{} every {C:attention}#2#th{} played #3#",
        "{C:inactive}#4# remaining{}"
      }```

        ```return {
            vars = {
                center.ability.extra.Xmult,
                center.ability.extra.Xmult_activation,
                center.ability.extra.rank,
                center.ability.extra.Xmult_activation - center.ability.extra.count ,
            }
        }```
#

so you technically could change which rank triggers it easily etc

bold sleet
#

Imma yoink that if you don't mind

#

It has stupid become

violet void
#

in loc_vars you use center instead of card

and also your loc_vars has 3 items instead of 4

winged bridge
#

can u help me

#

how do i fix this

violet void
bold sleet
#

My function does not function

violet void
bold sleet
#

What shall I name it?

#

(and why that way?)

violet void
#

wdym name it

bold sleet
#

wait

#

Are you talking about the return thing?

#

Tst, gib a sec

wintry solar
#

In your loc vars return, each value corresponds to the #1# parts of your description

bold sleet
#

almost there, I know what I am missing, I think.

violet void
#

th and the substraction

violet void
bold sleet
#

lesgoo

violet void
#

does the joker gain the x2 mult or does the 7th played 7 get a x2 mult when scored?

bold sleet
#

Let me ask the guy who came up with the idea.

#

I think the joker gives x2 mult

#

Not the card played.

#

Guess I have to learn how to inplement my own Xchips

#

Now it is time to add the logic to it.

violet void
# bold sleet lesgoo

Then the description can be changed into

x2 mult every 7th played
card with rank 7
(X remaining)

violet void
bold sleet
#

"shouldn't be too hard"
-# Last famous words
-# Doesn't even know where to start

violet void
#

although that joker is kinda pointless

original score 30 x 100

60x100 is the same as 30x200

bold sleet
#

What is
context.individual
context.cardarea
G.play
Like, what do they refer to?

#

i stoopid and you know the drill

#

Trying to gather as much information as I can so I don't have to ask later.

violet void
#

.

bold sleet
#

ah

frosty dock
#

that in combination with the cardarea being G.play (the area for played cards) makes this trigger each time a card scores

bold sleet
#

So under that context I should increase the counter thing, right?

frosty dock
#

yes

violet void
#

if you play more than one seven does the count increase by 1 or per played 7

bold sleet
#

Per played 7

violet void
#

then yes

bold sleet
#

Yes, you are heavely encouraged to play 7s.

violet void
#

if context.other_card:get_id() = 7 then

frosty dock
#

I suggest you also give the mult on the card instead of the joker and use the same context

#

it also works on retrigger so you could end up in a situation where 7s are scored more than 7 times in one hand

bold sleet
#

I'd rather give it with the joker, since it is the joker the one firing the x2 mult

violet void
frosty dock
#

the vanilla-like effect is giving it to the card instead of in the main scoring phase imo

bold sleet
#

ah

frosty dock
#

it's still the joker giving it, but it triggers on the card scored

bold sleet
#

Then I guess I'll do it your way.

#

I am fine with it.

#

So, what do I need for the conditional?

frosty dock
#

the other option is to do everything based solely on the hand, in which case you're not counting retriggers

bold sleet
#

context.individual and...

winged bridge
#

getting error at juice_up
(*temporary) = string: "attempt to call method 'juice_up' (a nil value)"

frosty dock
#

or card

#

not self

winged bridge
#

ok thanks

#

how do i know where to put card and where to put self

frosty dock
#

Also check for not context.bluepring when changing the counter

violet void
frosty dock
#

in Steamodded calculate, card is the actual card while self is just the prototype/center

winged bridge
#

ah ok

frosty dock
#

which you can otherwise access as card.config.center, so it's mostly out of OOP conventions

bold sleet
#

so this?

winged bridge
#

LETS GO IT WORKED

bold sleet
#

I swear I am trying.

winged bridge
#

ok now for the run ending function

violet void
#

you should do a specific if encapsulating the code that increases the count inside that if

frosty dock
#

yeah, except you might want to move the blueprint check in as a separate if statement

violet void
#

unless blueprint cannot copy the x2 mult (your decision)

winged bridge
#

is there a function that allows a joker to end a run

bold sleet
violet void
bold sleet
#

I am fine blueprint blueprinting my stuff.

bold sleet
violet void
winged bridge
#

as in the code

#

i can use it ingame

violet void
bold sleet
bold sleet
#

egg

#

Now: how the fuck does one give the x2 mult to card.

winged bridge
#

isnt there a recent tutorial vid

limpid flint
#

what's the pool for blinds?

violet void
crisp coral
violet void
bold sleet
#

Wouldn't I get like 2 messages or something then?

frosty dock
violet void
frosty dock
#

I believe it's x_mult = 2 here

#

but might be XMult, can't check rn

bold sleet
#

I believe.

frosty dock
#

no

crisp coral
#

yeah its x_mult

bold sleet
#

Based on this other joker I have.

#

this one

limpid flint
#

how do i remove specific blinds from the game

bold sleet
#

you kindly ask them to piss off

nocturne garnet
#

:3

#

will be updating that thing soon

winged bridge
limpid flint
#

yeah i knew that mod but i don't want to only disable them i want them to get the hell out of my sight

nocturne garnet
#

like, not in the collection?

frosty dock
frosty dock
limpid flint
#

I guess i'll just remove them from code (it's easier for me)

nocturne garnet
frosty dock
#

that's because I just added it a few days ago

nocturne garnet
#

might add that as a config

crisp coral
#

imagine using in_pool balatrojoker

winged bridge
#

how do i make a joker eternal without the eternal sticker

#

like unable to be destroyed or sold

#

card.ability.eternal = true?

crisp coral
#

that will add the sticker

winged bridge
#

damn

#

eh i'll have to put up with the eternal sticker i guess

#

how do i make a joker appear in a shop with debugplus

frosty dock
#

you can only directly spawn it into your joker slots

winged bridge
#

damn

#

how do i make the joker spawns in a custom deck

violet void
winged bridge
#

how do i make a deck that starts with a specific joker

#

can the game do that

bold sleet
#

I don't know why, but when the counter thing reaches zero nothing happens, help.

#

(Sort of, if I uncomment --card.ability.extra.count = 0 it does reset.)

winged bridge
#

try adding "and context.joker_main" to this idk

bold sleet
winged bridge
#

yeah

bold sleet
#

Check

winged bridge
#

then in return add card = card,

bold sleet
#

wat

winged bridge
bold sleet
#

Makes sense why.

winged bridge
#

here's my dingaling

#

why doesnt it spawn the correct Joker?

#

it spawned a random joker instead

bold sleet
#

Prefix

#

(that's in my case)

nocturne garnet
bold sleet
#

j_ - joker
jgl_ - your custom prefix
battleworn_insomniac - card name thing
not certain

winged bridge
#

where is the jgl coming from

bold sleet
#

My mod prefix

winged bridge
#

i mean where do you get the prefix

bold sleet
#

The json you bundle up with your mod

#

Or if you are using the old thing the prefix field

winged bridge
#

im using lovely theres no json

bold sleet
#

At the start of your mod file.

#

You should have the mod name, author and stuff.

#

There should be a prefix field.

nocturne garnet
winged bridge
#

ok good it worked

bold sleet
#

This is still not working. I suspect it is because this isn't the joker phase but rather the playing card triggering phase thing. How do I make so it gives the x2 Mult it should?

winged bridge
#

i have no idea i just follow tutorial

thorny adder
#

Someone should host a best balatro mod of the year award thing

bold sleet
#

Why is this triggering my jokers twice?

wintry solar
#

That’ll trigger many times

surreal pawn
#

calculate_joker is like always called with scoring_hand set

bold sleet
#

I need it to trigger only once.

#

... and when only 1 card is played.

#

-# jelp me

wintry solar
#

Then you want to use context.before and check that the played hand is only 1 card

surreal pawn
#

so true

bold sleet
#

Testing...

#

How do I check for hand size?

#

found this in the game files

surreal pawn
#

#G.play.cards i think

bold sleet
#

Testing 2

wintry solar
#

Context full hand would work too

bold sleet
surreal pawn
#

yes brah 💯

bold sleet
#

Sh*t not working, tho

#

Now the thing doesn't work at all.

#

help

frosty dock
#

context.full_hand == 1

#

dawg that's an array of cards which is never a numbee

bold sleet
frosty dock
#

#context.full_hand maybe

#

but a table can't be a number

bold sleet
#

me am now confused

surreal pawn
#

🤯

#

# brah

bold sleet
#

wait, that sh*t is a table™️ or something?

surreal pawn
#

# count the table brah

bold sleet
#

ah

#

new stuff!

frosty dock
#

#count_the_table

bold sleet
#

got ya

frosty dock
#

🥶

bold sleet
#

"small"

frosty dock
#

ah yes 240k ante 1 small blind

bold sleet
#

Very possible.

nocturne garnet
#

cryptid

mellow sable
#

Cryptid gameset UI be like

winged bridge
#

is there a mod that can put jokers into playing deck

#

like converting a joker into a playing card type

nocturne garnet
#

lowkey forgot about this summoned blind

#

its been broken since forever 💀

cobalt basin
#

hi i need help!! (please)

this joker is supposed to gain mult for every played diamond card and then destroy those cards. The gaining mult part seems to be working (though it doesn't seem like the upgrade message is working) but idk what type of warcrimes my attempt at destroying cards is committing because it is NOT working

calculate = function(self,card,context)
    local destroyed_cards = {}
    if not context.blueprint then
        if context.individual and context.cardarea == G.play then
            -- Is played card diamond?
            if context.other_card:is_suit('Diamonds', nil, true) then
                -- If so, add mult and add card to the destroy queue
                card.ability.extra.CurMult = card.ability.extra.CurMult + card.ability.extra.CardMod
                destroyed_cards[#destroyed_cards+1] = context.other_card

                return {
                    message = 'Upgrade!',
                    colour = G.C.FILTER,
                    card = card
                }
            end
        end
    end
    
    if context.joker_main then
        -- Delete all cards in the queue
        G.E_MANAGER:add_event(Event({
            trigger = 'after',
            delay = 0.1,
            func = function()
                play_sound('tarot1')
                for i=#destroyed_cards, 1, -1 do
                    local ncard = destroyed_cards[i]
                    if ncard.ability.name == 'Glass Card' then 
                        ncard:shatter()
                    else
                        ncard:start_dissolve(nil, i == #destroyed_cards)
                    end
                end
                return true
            end
        }))

        return {
            card = card,
            mult = card.ability.extra.CurMult,
            message = '+' .. card.ability.extra.CurMult .. ' Mult',
            colour = G.C.MULT
        }
    end
end
#

also sorry for the giant message lmao

crisp coral
#

hi k

#

use context.destroying_card to destroy cards, for example

if context.destroying_card and not context.blueprint and not context.destroying_card.ability.eternal then
    return true
end
wintry solar
#

also you'll need to do your check in that context, your destroyed_cards table will be set to empty everytime the calculate runs

cobalt basin
#

oh ok

cobalt basin
crisp coral
#

(you don't even need destroyed_cards using this)

cobalt basin
#

i'm guessing i should put it inside this if statement?

crisp coral
#

no, outside

cobalt basin
#

alr

#

doesn't seem to be working

#

sorry it took like 10 minutes to test i couldn't find the card in the shop lmaop

#

this is what i have

#

oops wait

#

shit am i stupid

#

the not before the eternal thing just deleted itself at some point

#

ok let me try now

crisp coral
#

😭

cobalt basin
#

i just set my money to 50k and reroll until i find it like a normal person

crisp coral
#

then why are you looking for it in the shop instead of

#

spawning it

cobalt basin
crisp coral
#

collection > jokers > hover over the card and (ctrl+)3

cobalt basin
#

oh

#

thank you!!!

#

i have wasted probably hours of my life looking for cards in the shop i'm not even joking 😭

#

still doesn't seem to be destroying the cards though

#

actually let me try rebooting the game completely

#

just in case

#

ok then rebooting the game fixed it

#

thanks for helping!!

warm sable
#

currently writing a mod to force enable Steamworks API integration when running balatro on Linux

#
[S_API] SteamAPI_Init(): Loaded '/home/cappy/.local/share/Steam/linux64/steamclient.so' OK.
Couldn't connect to steam...
Please ensure that the following conditions are met:
* Do you have Steam turned on?
* If not running from steam, do you have a correct steam_appid.txt file?
* Is the application running under the same user context as steam?
* Is a license for the App ID present in your active steam account?
* Is your App ID correctly set up, i.e. not in ``Release State: Unavailable`` and not missing default packages?
#

skull

#

I got it to load luasteam but it can't connect to steam when using lovely

#

wtf

#

nvm it loads fine when Steamodded isnt loaded

#

so I guess it's a Steamodded bug

warm sable
#

currently looking at what steamodded modifies so i can see where it fucks up

teal estuary
#

if i wanted a joker to gain something when cards are discarded, would it be context.pre_discard or context.discard?

arctic lion
bold sleet
#

So, is there a way to give Xmult to cards via a joker
i.e. aside from the normal scoring, a card also gives x2 multi

teal estuary
#

forgot that got added

teal estuary
#

i have a joker that gives mult, you should be able to just replace it with xmult

bold sleet
#

yup

#

Need to stitch together some shit.

#

It works except for the multi part.

teal estuary
#
calculate = function(self, card, context)
    if context.individual and context.cardarea == G.play then
      context.other_card.ability.mult = context.other_card.ability.mult or 0
      context.other_card.ability.mult = context.other_card.ability.mult + card.ability.extra.mult_gain
      return {
          extra = {message = localize('k_upgrade_ex'), colour = G.C.MULT},
          colour = G.C.MULT,
          card = card
      }
    end
  end
``` this is what i have, its essenitally just hikers code but for mult
#

i presume it'd be context.other_card.ability.Xmult or xmult

bold sleet
#

I'll check.

teal estuary
#

im not sure if smods has been updated to handle jokers giving cards extra values, but if not i have the code that makes that work too

bold sleet
#

What does the thing inside the return do?

nocturne garnet
teal estuary
winged bridge
#

is there a way to prevent a joker from being sold right at the start of the game

mystic river
#

if you want it to be entirely unsellable, you can give it the eternal sticker

#

if you want it to be temporary, I'm less sure about that

winged bridge
#

yeah but when the round start but before selecting a blind the eternal sticker isnt applied yet

#

so you can just

#

sell the joker

#

since the sticker only applies AFTER you go into a blind

mystic river
#

huh
why does the sticker wait til selecting a blind? it doesn't in vanilla challenges

winged bridge
#

lemme tweak my code to find a way

#

how do i fix it

#

in the create_card function

nocturne garnet
winged bridge
#

is there a way to apply eternal sticker directly

#

help

mystic river
#

my first try would be putting set eternal after add to deck
(it would be weird for that to make a difference at all, but weird in the way i expect programming to be weird sometimes, so worth trying)
my second try would be to look at the vanilla code to see what it does for its challenges that center around an eternal card

winged bridge
nocturne garnet
#

arent i a great programmer

arctic lion
winged bridge
#

hmm i should change it to challengs instead of deck

shell tangle
wooden nexus
#

I know, my pixel art level is not the best, but i'm trying

#

I'm using the jimbos as a base obviously (because everyone's a jimbo at the end of the day)

nocturne garnet
#

why does my text input UI hide most other UI unless you're typing in it?

young dew
#

i need help i updated steamodded to the most recent version and my mod just stopped working

#

the mod is detected, but the card that i added aren't there

wooden nexus
#

And there, after some cleaning up and changing pixel movements

#

Roffle:

1 in 5 chance to create a Negative copy of 1 random consumable card in your possession at the end of the shop

This Joker gains X0.25 Mult for each card sold, halved when Boss Blind is defeated

#

It's Campfire + Chance at Perkeo

hardy viper
#

well damn

tidal ice
#

I think this alone is causing a crash and I'm not sure why

#

everything else works well its just this

rough furnace
#

You somehow picked line the least useful part of the crash log

#

Send the entire crash

tidal ice
#

for reference I kinda just want this card to display how many rounds it has left when creating a card

#

its supposed to be destroyed after 10 or so rounds

tidal ice
#

this must be a weird case where nobody knows what the issue is

so I guess this means I have no idea how to get this joker to display a message when blind is selected

#

it might be smth stupid lol

wintry solar
nocturne garnet
#

king of ui

wintry solar
#

Text inputs are funky

nocturne garnet
rough furnace
#

yeah text inputs are cursed

rough furnace
#

from the lovely dump

tidal ice
#

I think thats the base game's files

rough furnace
#

yes but it's patched by lovely so it's different on your machine than mine unless we have the exact same patches

tidal ice
#

oh huh

#

when checking the lua file I have extracted before, its this interestingly enough

#

which doesnt seem related to what I'm doing

rough furnace
#

did you grab the rightfile?

tidal ice
#

its functions/common_events.lua yeah

rough furnace
#

from your lovely dumps?

tidal ice
#

oh wait no this is extracted from the exe

#

oops

#

ah so its this

#

is it actually an issue with my consumeables creation thing instead hand on I mightve mispelled smth

#

YEAH

#

its 'Consumeables' not 'Consumeable'

#

sorry to bother ya then

nocturne garnet
wooden nexus
#

Dang

#

I can't wait to disable the second one

bold sleet
teal estuary
winged bridge
#

need someone to help me on how to create a joker with an eternal seal attached BEFORE the blind start

#

or should i just make it a challenges instead

bold sleet
#

It just shows the upgrade text.

#

And that's about it.

teal estuary
#

it doesnt change the cards value?

bold sleet
#

No.

faint yacht
teal estuary
#

hrm.. hasnt be implemented into smods then

#

hold on

bold sleet
#

'sides, it looks like the upgrade would be permanent, while I want it to be just this one round.

#

/hand

winged bridge
teal estuary
#

oh, i have no idea how to do that 😭 i presume you could do something like:

if context.after then
[iterate over deck] then
context.other_card.ability.mult == 0
  end
end
#

but thats just a guess

bold sleet
#

I am thinking it could set a variable to true then add a context.joker_main and that variable and if it is true, trigger the x2 thing

#

Like, once the counter reaches 7, do that.

#

I don't know.

teal estuary
bold sleet
#

I know, I know.

#

Imma test something real quick.

#

Hold on.

teal estuary
#

sure

teal estuary
faint yacht
# winged bridge i understand half of the thing you said

So, before you emplace the created Joker, set card.ability.extra.deckcreate = true. Go to where you define the Joker and

update = function(self, card)
  if card.ability.extra.deckcreate and card.ability.extra.deckcreate == true and not card.ability.eternal then
    card:set_eternal(true)
    card.ability.eternal = true
    card.ability.extra.deckcreate = false
  end
end
winged bridge
#

do i need to add deckcreate into var

faint yacht
#

Not necessarily.

teal estuary
#

oh yeah, quick question, if a joker spawns as eternal, can it still destroy itself or would i need to find another way to make it unsellable/undestroyable?

bold sleet
#

woky af

#

idk if it will work.

#

But I need to carry a variable for the joker to trigger.

winged bridge
#

yeah no its still sellable

teal estuary
#

(as in, if its own calculate has a way to destroy the joker, will it work or will its eternal-ness stop it?)

faint yacht
teal estuary
#

oh thank god 😭

bold sleet
#

Not so eternal, huh?

teal estuary
winged bridge
#

if i get the joker card before choosing the blind no seal apply

faint yacht
#

Did you set the update function in the Joker definition? That runs every single frame.

winged bridge
#

yea

#

wait

#

oh i put it inside the calculate func

#

dumb

bold sleet
winged bridge
#

ok thank god

#

it worked

bold sleet
#

Kind of works?

#

I need to further test it.

faint yacht
#

Though, I guess card.ability.extra.deckcreate = false could also be card.ability.extra.deckcreate = nil so that it's not defined anymore for other stuff to mess with it.

winged bridge
#

thanks for the help

#

now to make another card that can capture jokers

#

oh there's the pokemon mod that is similar

bold sleet
#

(stoopid OBS, but you get it, right?)

teal estuary
#

also that joker idea is sick

bold sleet
#

Is not even mine, lol.

#

I asked suggestions for jokers related to Rhythm Doctor and A Dance of Fire and Ice and I got that.

teal estuary
#

still, i like it

tidal ice
#

is there a more direct way to level up a hand multiple times or am I gonna have to do level_up = true multiple times

wooden nexus
#

huh, this is odd

#

My tag freezes when it tries to load the pack

#

but not a usual crash

#

like actually freezes

#

oh it's not a me issue

#

its' happening with any modded tag it seems

tidal ice
#

does context.glass_shattered even work in this sort of context

#

wait do I also have to do some sort of card destroyed context aswell

#

yeah idk what to do here

#

maybe I got it

#

ok no

nocturne garnet
#

please someone help me with this 😭

#

i dont understand why create_text_input does this

thick panther
#

How would you deduct money when a joker is sold? Do you set the sell cost to a negative number?

nocturne garnet
tidal ice
#

if not, make the sell value zero and remove money with an ability instead

nocturne garnet
thick panther
# tidal ice that may work yeah

Setting it to a negative kinda words, but you can sell it even when the player doesnt have enough money ($1 with a $-4 sell value leads to $-3).

#

Is there a way to prevent a joker from being sold until certain conditions are met?

urban wasp
gritty valley
#

Why the fuck is cryptid the only card to use this color

#

It doesn't even fit in the pallete

#

thunkism stg

teal estuary
#

getting this error at the end of the round, when using this joker

#

no idea why its throwing an error 😭

nocturne garnet
thick panther
tidal ice
#

I don't really consider this an issue, I like this, but I realized the glitched enhancement also changes values that are not even displayed on the card

I wonder if I could make it where the amount of retriggers is displayed when given the glitched enhancement

cobalt basin
thick panther
#

When selling a Joker, is there a way to remove the sell animation on the dollars UI? I only want it to show the animation for ease_dollars in this case.

remove_from_deck = function(self, card, from_debuff)
        
        -- Pay off debt
        ease_dollars(-card.ability.extra.owed)

        G.GAME.bankrupt_at = G.GAME.bankrupt_at + card.ability.extra.debt

    end,

    update = function(self, card, dt)
        
        -- Check if the player can afford the interest
        if (G.GAME.dollars - card.ability.extra.owed) >= 0 then
            
            -- Joker can be sold
            card.ability.eternal = false

        else

            -- Joker cannot be sold
            card.ability.eternal = true

        end

    end,
zealous glen
#

Any suggestions on how to render these cards properly?

tidal ice
zealous glen
tidal ice
#

the code for the atlas

#

sorry

zealous glen
#
SMODS.Atlas {
    key = 'disenhancement_confused',
    px = 87,
    py = 118,
    path = 'vic_confused.png'
}
tidal ice
#

cuz first off that sprite is larger than the typical card so the issue may be related to that

zealous glen
#

Yes I know it is related to that

tidal ice
#

ok sorry I thought id be able to help but idk what the issue is here myself

zealous glen
#

I knew the alignment was based on the top of the atlas

wintry solar
#

You’d have to adjust the size of the card itself afaik

zealous glen
wintry solar
#

Oh it’s cropped too

zealous glen
#

Do you know how to both change the size of the card and change the alignment

wintry solar
#

Look at wee joker in set ability

zealous glen
wintry solar
#

They should have a set ability function afaik

zealous glen
#

I'll try it

#

Do you know where I set the offset?

#

I believe that's an option but I don't know where

#

Actually maybe it would be in set_ability too

wintry solar
#

It would yeah

zealous glen
tidal ice
#

oh yeah I need some help here

I'm just trying to make the context when a card breaks, this card is supposed to level up the played hand when a glass card is broken

#

it causes a crash related to ipairs

#

I decided to take some code from Glass Joker

thorny adder
#

Hi chat

mellow sable
frosty dock
wintry solar
#

We could do yeah

#

Either that or separate out the center docs

#

I’m not sure people who are new would know to look there

tidal ice
#

(im people who are new)

bold sleet
#

Hello, good people. 2 quick questions:

  1. Is there a way to fix the +- problem in the joker description?
  2. What is the context.XXX for defeating a boss blind?
tidal ice
frosty dock
zealous glen
tidal ice
#

oh wait right

#

so like, context.v.shattered ig?

zealous glen
#

at least if context.glass_shattered, maybe also and next(context.glass_shatered)

tidal ice
zealous glen
#

or rocket

bold sleet
#

Alright.

zealous glen
#

I reckon it just manually checks if it's a boss

#

does anyone else use vscode

thorny adder
bold sleet
#

imma be honest, when people tell me look at the other joker's code half of the battle is figuring out what joker to look as an example

zealous glen
#

I would like a keybind for multiline comments in Lua that doesn't suck

tidal ice
zealous glen
zealous glen
#

Idk how the context works

thorny adder
zealous glen
thorny adder
#

Shes just like me fr

bold sleet
#

Could be this what I am looking for?

zealous glen
#

yes

#

keep in mind

bold sleet
#

so G.GAME.blind.boss?

zealous glen
#

thunk uses a giant tower of conditions

#

so you need "every" condition on top

#

sometimes you can reduce

#

but as mentioned you need to check you're defeating a Blind

bold sleet
#

A boss blind.

#

So I'll try that one.

nocturne garnet
tidal ice
thick panther
zealous glen
#

@wintry solar set_ability and set_sprites didn't quite work

bold sleet
#

errrr...

nocturne garnet
bold sleet
#

I need it to trigger once after the boos blind is defeated.

#

I looked for campfire code.

tidal ice
#

if G.Game.blind.boss and context.end_of_blind then

#

or whatever the end of blind context was

zealous glen
#

as we said before

bold sleet
#

Testing...

#

Ok, it works mostly.

tidal ice
#

does anyone have any idea how I'm supposed to make a joker trigger when a glass card is shattered, I've tried everything (including looking at glass joker's code) and nothing works

bold sleet
#

It triggers like 8 times for some reason.

tidal ice
#

oh weird

faint yacht
#

if context.end_of_round and not context.repetition and not context.individual

bold sleet
#

Yeah, just looked it up, but thanks you.

zealous glen
tidal ice
#

something along the lines of this

#

well there shouldn't've been an extra end there but yeah

#

this is what happens

zealous glen
#

You're still not checking if the context exists

tidal ice
#

oh right

#

I forget that vanilla jokers dont have every context for them displayed

zealous glen
#

I mean, technically the context is nil

#

So it is displayed, it's just nil

thick panther
#

Does -2 joker slots seem right for the pros of this card? Originally, i had it as -3.

mellow sable
#

seems fine when you compare this to Cryptid's Wormhole Deck

nocturne garnet
#

problem:

#

its cryptid

zealous glen
mellow sable
#

I haven't messed with it

zealous glen
#

I suspect I'll need a hook or injection to apply the offset, and anoter to fix the size issue. The size issue might be better as a Steamodded change

edgy reef
#

I remember doing something like this via having the atlas size differ from the default.

zealous glen
#

Because what I have in mind is to have all playing card centers set their own size

edgy reef
#

But that code is so old idk if it still works

zealous glen
wintry solar
#

I have some code knocking around somewhere that offset the seal sprite, that might help?

tidal ice
#

I tried both context.destroyed and context.remove_playing_card, the first does nothing and the latter causes a crash

edgy reef
#

Note that the drawing for this might not work for enhancements specifically (since this is drawn on top I believe?) but the idea might work

zealous glen
# edgy reef

flowey I already know how to configure the Atlas

#

also we worked on that together

#

I had that code open already

edgy reef
#

lmfao

#

Getting another cup of coffee brb

zealous glen
#

Now it's drawing everything, but it's… too small?

#

actually it's still cropped

wintry solar
#

the one behind the 2 of diamonds looks correct

zealous glen
#

so it's twice as big

#

logarithmically

wintry solar
#

can I see what code you've got so far?

zealous glen
#

ok if I move the code from set_sprites into set_ability it doesn't crop

#

althought I can see that it also scales the rank and suit

wintry solar
#
if self.ability.floating_away then
    self.ability.floating_away = self.ability.floating_away - 0.075
    G.shared_seals[self.seal]:draw_shader('dissolve', nil, nil, nil, self.children.center, scale_mod, rotate_mod, self.T.w*-0.38 + 0.3*math.cos(self.ability.floating_away), self.ability.floating_away + self.T.h*-0.65)
else
    if SMODS.Seals[self.seal] and SMODS.Seals[self.seal].balloon then 
        G.shared_seals[self.seal]:draw_shader('dissolve', nil, nil, nil, self.children.center, nil, nil, self.T.w*-0.38, self.T.h*-0.65)
    else
        G.shared_seals[self.seal]:draw_shader('dissolve', nil, nil, nil, self.children.center)
    end
end

looks like my offset and movement was patched into Card:draw

zealous glen
zealous glen
wintry solar
#

though I think there are smods hooks into card:draw now

zealous glen
wintry solar
#

if you leave the size alone and just alter the drawing it wouldn't need that

edgy reef
#

altho idk if there comes a problem if the center is drawn then redrawn with offset.

wintry solar
#

changing the draw method when your enhancement is in effect wouldn't need you to change the size of the card itself

#

you just scale up the drawing of the center of the card

zealous glen
#

The scale of the drawing is correct

#

It just needs to avoid cropping and be offset

#

if you know how to do it without changing the size

#

I could do that

tidal ice
#

this is what I currently got, no crash but it doesnt print

zealous glen
tidal ice
#

ah

#

if I could just detect when a card is destroyed during play I might be fine at this point

gilded narwhal
#

Thoughts?

tidal ice
#

thats so different

gilded narwhal
#

I took anaglyph's notion of incentivizing skipping and then worked with that

thick panther
#

Should the debt amount be higher or is 40 good? Im trying to make it like a better Credit Card, but with its downsides too.

dusk shoal
#

where would one, such as me, aka i, find a list of all the events in balatro?

#

wait i think i mean contexts

#

like the code used for:
when a pack is opened
when a consumable is used
when a blind is selected

#

all of those

mellow sable
#

Someone did it for you

dusk shoal
#

thank you !!!!!!!

#

thats what i meant like a premade list lawl

thick panther
dusk shoal
#

there was a link for that in there anyways

#

oh yeah this is great stuff

#

ty mx. cryptid

tidal ice
#

to be able to detect if a destroyed card is a glass card, would I do if cards_destroyed.enhancement == 'Glass'

wintry solar
#

it's written out differently on the wiki

#

if you're new the wiki is definitely better

#

if you just need a quick reference my original list is fine

dusk shoal
#

do you have a link to the wiki ?

thick panther
dusk shoal
#

ty!!

zealous glen
wintry solar
#

like I said, I think you can do it by patching the draw function

zealous glen
#

I'll try that after I eat

#

or tomorrow

tidal ice
#

this doesnt seem to be leveling up the hand, is there anything I'm missing?

gilded narwhal
#

Hey so if I want to rework a joker or blind for a specific deck, I pretty much have to use lovely for that right?

maiden phoenix
#

For a joker there's a take_ownership function, but for blind I think you need lovely yea

#

or at least function pilling

gilded narwhal
#

I was prolly gonna use lovely either way but neat !

dusk shoal
#

i quickly made a little test mod thats adds 1 joker, but its not appearing and im not sure why

#

i have the 1x and 2x folders in assets, and the main.lua file in the folder for the mod itself

frosty dock
mystic river
maiden phoenix
frosty dock
zealous glen
#

the existing keybind doesn't do what I want it to do IMO

#

the block comment keybind doesn't comment the entire line, and I feel like the line-by-line keybind isn't what I should be using for multiline comments

mystic river
#

lol
uhhhh idk, i haven't used a keybind for this, i was satisfied to learn that i didn't need to comment every individual line

zealous glen
#

in most text editors and programming languages CTRL + / comments

mystic river
#

I'm away from my computer rn but where is the existing keybind anyway? i might look into this later

zealous glen
#

so for example in Python it adds # to the beginning of every line

zealous glen
#

I might just change CTRL + ; into CTRL + /

dusk shoal
#

i should ask, is there a thing i actually need to do first before my mod appears in the game?

#

i kinda just put the code for a test joker and the mod isnt appearing in the mods menu

hardy viper
#

unless that was a typo

frosty dock
#

basically you can just uncomment the top delimiter to uncomment the full block

wooden nexus
#

This one's a little different because they got an avatar

tidal ice
#

how do I get the name of the currently scoring hand

#

apparently context.scoring_name doesnt work

frosty dock
#

where?

tidal ice
#

oh wait I think I know

#

leme check smth

frosty dock
#

context.scoring_name works in contexts that provide it

tidal ice
#

ok idk how to do it actually, anyways im tryna make the current hand level up after a glass card breaks

frosty dock
#

kid named context.glass_shattered:

tidal ice
#

I remember that not working

exotic hedge
#

Kid named kid:

tidal ice
frosty dock
#

yeah scoring_name doesn't exist in glass_shattered I'm pretty sure

tidal ice
#

oh so do I have to do some kind of last played hand context then?

#

I dont remember what that is though

gilded narwhal
#

hey so does the take_ownership function only modify the variables like rarity and stuff or can it also completely rework the logic as well

frosty dock
gilded narwhal
#

Gotcha

dusk shoal
#

does anyone know why my mod just straight up doesnt exist? I made a little test mod that adds a joker that does literally nothing and it doesnt show up in collection or mods, is there something else i need to do first?

gilded narwhal
#

And I can just plug that into the back.apply of a deck to make it apply for only that deck?

dusk shoal
#

i can send an example if need be

tidal ice
#

theres more info about that in steammodded's wiki page

dusk shoal
#

huh . the tutorial i watched didnt include that

#

thank you !!

thick panther
dusk shoal
#

okay yeah i do remember there needing to be a file like this when modding minecraft so that makes sense

#

is there any place it needs to go in particular? or just in the folder

#

wait nvm it says that lawl

#

thanks again

#

also also !! is there a way to automatically unlock the custom joker just so i can quickly see what it does?

#

like some mod or line of code that helps with that

#

orrrr actually theres the unlock all thing lol nvm

tidal ice
zealous glen
#

what do you mean

tidal ice
#

it did not work for me whatsoever, I even tried it while including context.remove_playing_cards

frosty dock
#

from what i can tell, you just call ease_dollars and put a message either thru return value or eval_this

gilded narwhal
#

Is there a way to distinguish what type of pack you're skipping in the code? Because I want to have it to where it has more rewards when skipping a mega pack than just a normal one

edgy reef
#

Maybe it's about dollar_buffer?

frosty dock
#

hm fair enough

#

I'll just add support for a dollars arg in eval_this

tidal ice
#

how would I be able to detect the ability of a card that was just destroyed had

#

wait I could just detect is the scoring hand has a glass card

#

wait I think I got it

#

i dont

#

oh I realized theres some very clear problems here

#

context.remove_playing_cards is after a discard

gilded narwhal
#

am i being silly

tidal ice
frosty dock
# edgy reef Maybe it's about dollar_buffer?

hm, trying to add it to eval_this and having a bit of an issue, in context.individual eval_this will fire before any other effects returned from the context will, so the effect happens before the chips from the playing cards themselves

edgy reef
#

Got an idea

#

What is instead of calling eval_this inside the context, what about returning a callback function that has eval_this, then calls it when effects are checked (like if effects[ii].eval_this).

#

Should work for context.individual since it's logic is handled that way

frosty dock
#

i dunno, eval_this just doesn't seem to be built with context.individual in mind

#

just confirmed it does the same for other evals, the message pops up before the card itself

#

i don't think there's a reasonable way to delay it

edgy reef
#

So it's more of a eval_this limitation, hmm

frosty dock
#

so passing eval_this thru the return might be the only option there

#

individual context is already different enough, so why not throw that in, idk

edgy reef
frosty dock
#

hm so that's why the game never uses card_eval_status_text and actually supports multiple effects in one return for individual

#

then again that means there's not much of a need to ever use eval_this under those conditions

#

I'd say we keep it without individual in mind and just keep the boilerplate around for individual

#

we can't patch it into evaluate_play because that breaks vanilla jokers

#

(in which case it's inconsistent to get rid of it at all, so keep it?)

frosty dock
tidal ice
#

wrong channel whoops

frosty dock
#

i think it's completely unnecessary

#

i wouldn't mind some way to make more profiles

edgy reef
#

Auto-backup of player saves in case of corruption is nice, but idk if that's even a risk anymore.

frosty dock
#

but that doesn't need to be part of steamodded, and not in some way that syncs to vanilla saves

edgy reef
#

Plus it's practically unfeasible to separate vanilla from steamodded.

stray warren
#

I defined these custom colors, but how do I make them able to be used in loc_txt within the curly braces? (like {C:dark_suit})

G.C.DARK_SUIT = HEX('324975')
G.C.LIGHT_SUIT = HEX('f05250')
frosty dock
frosty dock
stray warren
#

Ah, that's a separate thing. Makes sense

frosty dock
#

(is that significant enough to warrant some SMODS.LocColour api? i don't think so)

edgy reef
#

It's really easy to make a hook into loc_colour too.

analog cypress
#

Balatro's art style is surprisingly easy to replicate.

(Though I'm not sure why my numbers aren't appearing in the blue box for chips)

gilded narwhal
#

why does this not work? I'm like 99% sure it has to do with the context because it works with other contexts just not skipping_booster

wintry solar
#

iirc you don't even need to patch loc_colour

#

throwing G.ARGS.LOC_COLOURS['Zodiac'] = HEX("a84040") for example in works

#

as long as you call loc_colour at some point

stray warren
#

Ok, so is having the {C:x} in the loc_text calling loc_colour?

#

So if I do the above and put {C:zodiac} that will color that portion in the zodiac color as defined?

wintry solar
#

yeah you just need to do loc_colour('red') or something before you try and assign any of them

tidal ice
#

btw for future reference sorry for asking so many questions

stray warren
#

That's what this channel is for. No need to apologize for it

#

Should be G.joker.cards

hardy viper
#

this is correct

#

it is not G.joker

stray warren
#

Make sure you are including the mod prefix when you pass the key into jokers_contains. that may be your issue

#

no, just prefix_exodia_left_arm I think

#

Also I think the prefix gets cut off after 4 characters, so try both

dusk shoal
#

if context.end_of_round and not context.repetition and context.game_over == false and not context.blueprint then
if card.ability.extra.chance == 1 then
card.ability.extra.chance = G.GAME.probabilities.normal + card.ability.extra.odds_gain
end
else
card.ability.extra.chance = card.ability.extra.chance + G.GAME.probabilities.normal + card.ability.extra.odds_gain
end

#

doing the thing above caused the error below

#

basically i want it to go from 1 in chance to 2 in chance

#

then go from 2 to 3 and start considering probability

stray warren
#

You put an end in front of the else, try removing that end

dusk shoal
#

because its a food joker that slowly gets more likely to break

#

kk!