#đŸ’»ăƒ»modding-dev

1 messages · Page 255 of 1

wintry solar
#

It would but you shouldn’t need to check it’s greater than 0

gusty iron
#

cause sometimes when the card has 0 chips, it still says +0

wintry solar
#

It shouldn’t do

#

Unless you’re not using the return properly

gusty iron
#
        if context.joker_main and card.ability.extra.chips > 0 then
            return {
                chip_mod = card.ability.extra.chips,
                message = localize { type = 'variable', key = 'a_chips', vars = { card.ability.extra.chips } }
            }
        end
zealous glen
#

you don't need to write the message manually

wintry solar
#

Just return chips = X

keen tiger
#

are there any smods docs for G.GAME?

#

i need to read the game state, unsure what i can read

#

i see the event manager should allow me to dispatch in-game actions right?

bold sleet
#

As far as I know, it queues whatever event you want into the event queue.

keen tiger
#

as if im like actually playing the game?

daring fern
#

Is this a possibility?

bold sleet
#

That would require a lot of extra work.

keen tiger
#

oh, hmm

bold sleet
#

The idea of the events things is for stuff to happen not instantly.

keen tiger
#

ahhh

bold sleet
#

Let me explain myself.

#

Let's say, jokers triggering.

keen tiger
#

yea

bold sleet
#

As far as I know, every little animation the game does for each card, like scoring chips, mult, moving cards and etc, those are all events.

#

They happen in a sequencial order, which is the event queue.

keen tiger
#

makes sense

bold sleet
#

So exactly, what is the question here?

keen tiger
#

im looking to puppeteer in-game actions, its not exactly a traditional mod

#

if i cant do that from a mod ill just mock in-game clicks, its just more tedious to do that

bold sleet
#

Alright, that's a bit more complicated.

#

A tad bit, if you ask me.

keen tiger
#

if its not exactly feasible ill just do my plan b lol

bold sleet
#

Alright.

#

Maybe, just maybe, you can do that with a mod.

#

Each button you click I think triggers a function or something.

#

At least for buttons, I think.

keen tiger
#

its weird since if balatro is just a big pile of lua there should be a way to trigger the routine for selecting a hand or discarding

bold sleet
#

What are you trying to do, exactly? A replay system of sorts?

keen tiger
#

lets just say im trying to externalize the game state, so some extra processing, and then send an action back in

native zinc
#

oh ... this doesnt work

keen tiger
#

ok ill do plan b

bold sleet
#

That's a tad bit more complex than what my stupid brain can do.

bold sleet
keen tiger
#

are there more experienced modders in this chat?

long sun
#

hihi! can someone check over my code? i don't think my context is correct

#

(the cards do nothing)

native zinc
#

OH

#

okay

#

uhm

keen tiger
hushed field
# native zinc oh ... this doesnt work

I realize I gave you bad advice. The context gets reset, so the splash functionality you'd have to patch in. But I think like Eremel said, there's a context catered to doing that, called modify_scoring_hand

native zinc
#

it's definitely something wrong with my table deleted

#

oh

#

i see

hushed field
keen tiger
hushed field
#

But yeah there are states to read out

keen tiger
#

i would have to track balatro's stack tho

#

since idk if the fns are exposed

#

im able to do this if its allowed and theres a usable debugger

lethal ridge
#

how do i use pools in the rarity thing

native zinc
hushed field
#

It depends on what you wanna do. You can just inject or hook into them and interact from there

lethal ridge
#

i made a new rarity but my joker is not appearing in the shop at all

hushed field
hushed field
keen tiger
hushed field
#

Ooh, then you can just call the button event for playing a hand, right? I'm not sure what you're end goal is, so the best approach might depend on the details

keen tiger
#

the balatro mod im making is mostly a thin communication interface for another thing I'm building

#

you could consider it a remote almost

hushed field
#

Just call the function when you want it to be called, it'll functionally simulate a button press, except no visual feedback will happen on the button, I suspect.

daring fern
#

How would one do this?

keen tiger
hushed field
paper zealot
hushed field
keen tiger
#

wait its not minified/obsfucated

thin anchor
#

take a look at my poker joker

keen tiger
#

bruh what

long sun
keen tiger
#

i was running on webdev logic, i was expecting some obsfucated bundle full of stuff like function fn2f3ab383_37b281a(_a, _b, _c, _a1, _d)

native zinc
keen tiger
#

wild thanks

hushed field
lethal ridge
#

what does rate do here?

#

is it the same as default_weight?

long sun
thin anchor
hushed field
native zinc
paper zealot
native zinc
thin anchor
#

how would you compare how many chips you score (the blue box) to the blind requirement?

hushed field
long sun
#

ah, grand ^^

#

thanks!

native zinc
#

of course i do if context.modify_scoring_hand

daring fern
#

Is this possible?

hushed field
# native zinc how *do* i call this

I suspect you return {add_to_hand = true} for each card you want to add to the scoring hand. I've not used it before, but that is what it reads like

native zinc
#

ouch

hushed field
#

I assume it gets called for each specific card, so you just return it, I reckon

vast fractal
#

is there a shortcut to reload the game quickly?

long sun
#

hold M for 1 second

#

(iirc)

#

oh, two issues with Ghost Seal

#
  1. what's this dark outline around it?
#

(code)

vast fractal
hushed field
long sun
#

ah icic

#

will have to do that for all my images then

hushed field
#

And badges need labels for their tect, iirc

hushed field
long sun
#

ooh ^^

hushed field
#

Lm check if I can find it because I definitely need to use it myself too

keen tiger
#

is there a way to get notified of when the game state changes?

#

so i can differentiate between shop/blind select/play/scoring

hushed field
#

Inject into the state manager, I'd say, or just check the game state variable and when it changes.

#

It's accessible fully, after all

keen tiger
#

i dont want to have a tight while(true), is there an equivalent to setInterval

onyx sonnet
hushed field
#

I suspect this is where you find out that I just happen to have looked a lot at the Balatro code, but you yourself are gonna now more about coding in general, haha. My approach would be to just hook a function into the state manager that triggers whenever the state changes, and then base your implementation on that.

keen tiger
knotty copper
#

@wintry solar Question about the localization argument for malverk and how it works? Asking as I'm running into an odd issue when the code for the TexturePack object is included it seems to weirdly affect the descriptions of a couple of deck/back descriptions such as Plasma and erratic decks causing them to not properly update if the language is changed, it only seems to update those ones to last language used if the game is reloaded

daring fern
#

Is this able to be done?

tall apex
#

Balalo

glacial bloom
#

Does anybody know why the badge color in game won’t change? It happened with the last joker I made. I set it to be a purple, and it stays as the default color

long sun
#

have you tried changing the hex code to lowercase, like i asked?

#

:)

glacial bloom
long sun
#

also i'm not sure you can put the badge colour there iirc

hushed field
# long sun did you find it?

No, sorry, but I'm on my phone. I need to use it myself, so I'll search for it again when I'm back home after the weekend, and I'll send it to you if I find it

long sun
#

ah :{

long sun
tall apex
glacial bloom
tall apex
#

I might be stupid tho

glacial bloom
long sun
#

oh wait 😭 you're right

#

mbmb

tall apex
glacial bloom
remote sequoia
# long sun 1. what's this dark outline around it?

If your image editor supports it, you want to export the png with an option somewhere along the lines of "preserve color data for transparent pixels," assuming you have a work file for the art.
It might also refer to it as an "optimization" of some sort (saving color data for totally transparent pixels makes the file larger)

long sun
#

ah grand

#

will try that ^^

#

so these are the options

#

aha, yeah ^^

#

will test :D

remote sequoia
#

Ah you use GIMP as well. Yeah, jusy above the drop-down.

long sun
#

bingo!! cheers ^^

#

just need to fix the name

remote sequoia
tall apex
remote sequoia
# hushed field Oooh that's very good to know

It might need some extra setup to actually have the right data in the transparent parts. One method of doing it is having your very bottom layer be the color of your outline, and then having a totally solid Erase layer above it.

hushed field
#

I'll look into it. I assume there's plenty of good guides on the process for Aseprite, luckily

glacial bloom
zealous glen
remote sequoia
#

If your outlines are multicolored, you can make that bottom layer a copy of the image, and slightly blur it (the smaller the blur the better the colors will match, usually 1px is ideal). For safety's sake in that scenario I usually do a few copies, each lower one blurred one additional time.

long sun
#

okay good news!! Ghost Seal's ability works :D

#

bad news! Ghost Cards do not

daring fern
#

Is this something that is able to be accomplished?

zealous glen
native zinc
#

and switch

#

and this goes for literally every single tool in the program (sigh)

zealous glen
#

Aseprite doesn't preserve color data for transparent pixels

daring fern
zealous glen
#

v_v

zealous glen
zealous glen
native zinc
#

krita literally better smh

#

krita till the end

zealous glen
#

Aseprite better smh my head

long sun
#

GIMP :3

daring fern
tall apex
# glacial bloom Like this?

Nono, in front of the entire line! It’s usually to make it so the line isn’t actually read, but I think it reads those very specific things even if done that way

zealous glen
tall apex
#

Aseprite my beloved

native zinc
#

well i can save colour for transparent pixels >:)

#

at the cost of

#

yknow

native zinc
#

fonts not working

daring fern
tall apex
#

Have either of you considered just making shitty pixel art?

zealous glen
zealous glen
tall apex
zealous glen
#

I'm always making sh*tty pixel art

tall apex
#

Real!!!!

native zinc
#

ig my "no draw art yet" card is literally Blank

hushed field
#

I suspect you could just hook or patch the voucher use function and emplace it in the consumeables area, no?

tall apex
#

That’s why it’s called pixel art duh, more pixel compression the better

zealous glen
#

you have to save it at lowest resolution then screenshot it and save the screenshot again

#

multiple times

hushed field
#

That's how I make joker art for Kino

zealous glen
remote sequoia
zealous glen
#

but I don't know why they want Vouchers where they're not supposed to be

native zinc
#

i'm sincerely doubting all of your advice

zealous glen
#

I advise you to become asbestos

long sun
hushed field
#

I've won Best Balatro Mod for 12 years in a row, and best Joker Art for a Joker called Morbius twice, so I'd say my advice is prrretty stellar

modern kindle
#

Good schmorning chat

zealous glen
#

If you become asbestos, then asbestos can't hurt you

native zinc
#

dang it.

zealous glen
long sun
#

unused vouchers found in some demo versions

remote sequoia
zealous glen
long sun
#

aware. i said "technically"

zealous glen
zealous glen
long sun
#

like, it doesn't do anything passively over the run, it just gives you stuff

zealous glen
zealous glen
native zinc
#

im not even destroying cards

long sun
#

again, ya, i didn't say it was a consumable

#

just that it does something that a consumable could do

modern kindle
#

i mean 'technically' it is because you 'use' a voucher to 'get' a 'benefit'

#

checkmate

long sun
#

unlike other Vouchers, it did something only when purchased

zealous glen
#

It's like a wrong way to destroy cards

native zinc
hushed field
# native zinc

I think that context is like the context for Individual, and that you just wanna return true, instead of the card object

native zinc
#

oh

modern kindle
#

ice my goat

zealous glen
daring fern
zealous glen
#

pass the shader

native zinc
hushed field
#

Also you can't for loop a return statement that way, it'll stop after the first hit!

glacial bloom
zealous glen
native zinc
#

oh hm

tall apex
native zinc
#

okay maybe the cards in the local var are being deleted??

#

im confused now

tall apex
#

sorry took a sec for my pc to boot up

zealous glen
gleaming zealot
tall apex
#

meh, it works :3

native zinc
#

doesnt that only work for back compat

tall apex
native zinc
#

dangerous life you live im ngl

zealous glen
gleaming zealot
tall apex
zealous glen
#

you might also need to hook Card:can_calculate

tall apex
native zinc
#

all i wanted to do was retrigger unscoring cards 😔

zealous glen
native zinc
#

exactly

zealous glen
#

Instead use the 'unscored' CardArea

native zinc
#

well i wanted to score them then retrigger them

hushed field
#

I'd rewrite the context to assume that context.modify_scoring_hand runs for each card. That you you can just check if the card is unscoring, and add it the hand

modern kindle
onyx sonnet
zealous glen
hushed field
tall apex
tall apex
gleaming zealot
glacial bloom
native zinc
#

i'll try

tall apex
#

i put that stuff in my main

modern kindle
#

damn ur livin life

gleaming zealot
#

BADGE_COLOUR
🇬🇧

glacial bloom
tall apex
tall apex
native zinc
# native zinc ah no need for table delete from table shenanigans

if you want free delete table from table code ```lua
for j = 1, #lf do for k = 1, #ls do
if lf[j] == ls[k] then -- thing in lf is also in ls?
for i = j, #lf-1 do -- then starting at lf thing:
lf[i] = lf[i+1] -- replace it with the thing before it (effectively deleting original lf i)
end
lf[#lf] = nil -- yeet the last thing in lf (bc lf[#lf-1] = lf[#lf] rn)
end
end

tall apex
#

as sad as it is im an american

native zinc
#

yes i indent with three spaces just to make everyone mad

#

sorry

modern kindle
zealous glen
#

common america L

tall apex
#

i wanna say COLOUUUUUUUUURE

#

forced to say corllr

modern kindle
#

easy, colour = color 😎

tall apex
#

iwahabaohowahuh

hushed field
#

Spelling's variable, you know

glacial bloom
tall apex
#

forced to say i want a bottle of water

sullen fern
#

hey guys! i’m back, and i’m still confused on why this little snip of code doesn’t do what i want it to

gleaming zealot
modern kindle
#

when i say 'chips' im not talking about fries..........

gleaming zealot
zealous glen
modern kindle
glacial bloom
zealous glen
#

đŸ‘œ

gleaming zealot
tall apex
tall apex
sullen fern
# sullen fern hey guys! i’m back, and i’m still confused on why this little snip of code doesn...
    for k, v in pairs(G.playing_cards) do
      if v:get_id() % 2 == 1 then
        v:set_debuff(true)
      end
    end
  end,

  remove_from_deck = function(self, card, from_debuff)
    for k, v in pairs(G.playing_cards) do
      if v:get_id() % 2 == 1 then
        v:set_debuff(false)
      end
    end
  end,

  calculate = function(self, card, context)
    if not context.blueprint and context.playing_card_added then
      for k, v in pairs(context.cards) do
        if v:get_id() % 2 == 1 then
          v:set_debuff(true)
        end
      end
    end

    if context.individual and context.cardarea == G.play then
      if not card.ability.extra.dead then
        if context.other_card:get_id() % 2 == 0 then
          return {
            mult = card.ability.extra.mult
          }
        end
      end
    end
  end```
tall apex
tall apex
hushed field
#

Have people worked with the blind calc additions to SMODS btw? Is it stable?

hushed field
modern kindle
zealous glen
native zinc
#

its the same error as last time

#

well, card = nil

#

uhhhhh

hushed field
#

Hmm, I assume I gave you some bad directions about how to use that context then. You might wanna check when that context exactly triggers

native zinc
#

oh

hushed field
#

Hmm, no checking the smods code it should work that way

native zinc
#

it stopped crashing when i just

#

but it doesnt work

#

so it's the card

#

idgi

sullen fern
#

but that doesn’t seem to be working.

vivid solstice
#

hey guys (gender neutral), how would i check if a played hand contains exactly one card?

hushed field
#

The table will get wiped

native zinc
#

oh

#

.

hushed field
#

It's local, so after each context check, it creates a new one and throws out the previous one

#

I recommend the simpler solve of doing 'context.other_card.splashretrigger = true', and then checking that during the repetitions context, and just setting it to false again afterwards

sullen fern
manic rune
#

is this how i do it

#

never tried making a mod compat with talisman before so idk what im doing

modern kindle
#

bepisss

manic rune
#

hiii

modern kindle
#

i need to do talisman compat but why isnt it just as easy as if talisman make to_big end

manic rune
#

it seems shi breaks when money is infinite

manic rune
#

but my mod scaling is probably gonna go insane the more shit i add, so its best i take care of this early

tall apex
#

minecraft font minecraft font

#

kind of love it

manic rune
#

idk if im doing it wrong tbh, it doesnt crash anymore

paper zealot
# tall apex minecraft font minecraft font

t∷⚍ ᒷ ⎓ᔑăƒȘᓭ ∎đ™č⚍ ꖎ↞ ⚍ ᓭᒷ ℾ ÌŁâ‘á’· ᒷăƒȘᓔ⍑ᔑăƒȘℾ ÌŁâ•ŽăƒȘ ⊣ ℾ ÌŁá”‘Ê–ê–Žá’· ⎓đ™čăƒȘℾ ÌŁ

manic rune
#

i also tried just putting it G.GAME.dollars, same results

#

but removing to_big on card.config.center.cost and it crashes, so thats definitely mandatory

#

hmmmm

modern kindle
# sullen fern i might just have to ask <@324783675118059520> because they’re the one that wrot...
  add_to_deck = function(self, card, from_debuff)
    for _, v in ipairs(G.playing_cards) do
      if v:get_id() % 2 == 1 then
        v:set_debuff(true)
      end
    end
  end,

  remove_from_deck = function(self, card, from_debuff)
    -- Remove debuff from all odd cards when The Doise is removed
    for _, v in ipairs(G.playing_cards) do
      if v:get_id() % 2 == 1 then
        v:set_debuff(false)
      end
    end
  end,

  calculate = function(self, card, context)
    -- Ensure new odd-ranked cards added to play area are debuffed
    if context.cardarea == G.play then
      for _, v in ipairs(G.play.cards) do
        if v:get_id() % 2 == 1 then
          v:set_debuff(true)
        end
      end
    end

    -- Apply Mult when even-ranked cards are scored, if The Doise is alive
    if context.individual and context.cardarea == G.play and not card.ability.extra.dead then
      if context.other_card:get_id() % 2 == 0 then
        return { mult = card.ability.extra.mult }
      end
    end
  end
}

if i understood what you wanted, this works

tall apex
#

gonna make enchantment table consumables

modern kindle
lament agate
#

theoretical question

#

is it possible if i want to replace a sound of a mod with the one that came from my mod

manic rune
#

oh

#

i think i know why

#

i dont even think comparing "inf" with "5" is valid

#

:3 im so fucking confused

tall apex
tall apex
gleaming zealot
native zinc
#

issue is: i have no clue how to make it work

native zinc
#

is it not calculate_retriggers() or something

rain slate
#
function Card:set_perishable(_perishable) 
    self.ability.perishable = nil
    if self.config.center.perishable_compat and not self.ability.eternal then 
        self.ability.perishable = true
        self.ability.perish_tally = G.GAME.perishable_rounds
    end
end
``` bro why do they not use `_perishable` at all here
manic rune
native zinc
manic rune
#

do i just fucking use a really big number

modern kindle
#

well, that would be a number thats...

#

to big...

#

😎

manic rune
#

✍

#

no but actually, is that the way

#

😭

rain slate
modern kindle
#

if it returns true prob

manic rune
noble schooner
tall apex
#

hey this isn't super dev related but i just wanted to say i really appreciate this modding community c:

manic rune
#

;3 aw

noble schooner
#

:3

rain slate
noble schooner
#

sames,,,,,,,

manic rune
#

do i have to be this specific

sonic cedar
#

does anyone know the variable for money? so i can set up an if statement dependent on how much you have

manic rune
#

G.GAME.dollars

tall apex
#

it just makes me so happy seeing my shitposts come to life and merge with the base game and other peoples mods, i love seeing how modded jokers interact with eachother making for newer weirder strats :3

sonic cedar
wintry solar
rain slate
manic rune
tall wharf
#

bepis

wintry solar
#

then use Card:remove_sticker

manic rune
#

hi aiko

tall wharf
#

i am so coojked...

manic rune
#

im trying to make my mod compatible with talisman :3

rain slate
#

at least not in my dumped card.lua

wintry solar
#

they're in smods utils.lua

tall apex
manic rune
tall apex
modern kindle
#

woah its aiko chat

rain slate
manic rune
#

im so confused about how it works rn 💔

tall wharf
#

what are these cart art

tall apex
tall wharf
#

5 balls

hushed field
tall apex
native zinc
#

ah

sonic cedar
manic rune
#

whats the crash log

#

if its comparing table with number then talisman

hushed field
# native zinc ah

It's not for the retrigger context, but I can send you a joker from my mod that uses the same concept to check if a card needs to be destroyed, if you'd think that could help?

sonic cedar
manic rune
gleaming zealot
tall wharf
tall apex
#

idk, im sure they have a discord where you could ask for help!! :3

wintry solar
#

the easiest way to deal with talisman is to uninstall it

rain slate
#

ok this is weird

#

why do these two jokers have a different back? (they're all flipped at that moment)

#

the lucky cat is the correct back

#

could it be something from debugplus?

tall wharf
sonic cedar
rain slate
manic rune
#

u forgot this

rain slate
#

oh right

manic rune
#

to_big that too

sonic cedar
#

ohhhh truw

manic rune
native zinc
#

what's bugging me is mostly the modify_scoring_hand thing

noble schooner
rain slate
tall wharf
#

hi

rain slate
#

or is it like to big num or smtn

sonic cedar
hushed field
sonic cedar
rain slate
sonic cedar
#

talisman

rain slate
#

what's that

onyx sonnet
#

or well

#

bigger numbers

sonic cedar
manic rune
#

you need to to_big(0)

#

:3

manic rune
sonic cedar
manic rune
#

i dont think you need to to_big(G.GAME.dollars) since its already a table

tall wharf
#

done...

manic rune
#

but keeping it is fine

#

hats 9

#

whats 9

onyx sonnet
#

@wintry solar Would you be able to tell me why my perm mult increases by 2 every trigger instead of once?

tall wharf
#

gold bars

sonic cedar
tall wharf
#

wait no that's 8

#

9 are

#

ice cubes

#

bcs yk

#

9\

#

➈

onyx sonnet
#

actually its more like +3 i guess since im counting the base mult i want it to have

tall wharf
worthy stirrup
#

How do i get the sell value of a consumable?

sonic cedar
manic rune
#

you forgot to to_big the first 0

sonic cedar
#

i did

tall wharf
#

wait

#

wait

#

wait

#

what

#

could you not just

sonic cedar
#

wait then i dont need

noble schooner
sonic cedar
#

😭

tall wharf
#

wait what the fuck that is such a flawed logic

manic rune
#

dasda

manic rune
tall wharf
#

local valueToPutInIf = to_big and to_big(G.GAME.dollars):le(0) or G.GAME.dollars <= 0

#

????????????

manic rune
#

aiko

#

how do you compare inf with a number

#

:3

tall wharf
#

what are you trying to do

manic rune
#

the inf in question is in G.GAME.dollars

tall wharf
#

is it like

manic rune
tall wharf
#

way beyond 1e309

manic rune
#

im doing stuff like

tall wharf
#

ok so

#

jus do what i said

#

?

manic rune
#

"if you have more money than (x), yes"

sonic cedar
tall wharf
#
local valueToPutInIf = to_big and to_big(G.GAME.dollars):le(some_value_lol) or G.GAME.dollars <= some_value_lol```
#

?

native zinc
#

😅

tall wharf
tall apex
manic rune
#

oh, i see

tall apex
#

making them scored :3

manic rune
#

whats the one for more than or equal?

#

:mo?

tall wharf
#

nvm

#

actually

#

it's lte

onyx sonnet
tall wharf
#
local valueToPutInIf = Talisman and to_big and to_big(G.GAME.dollars):gte(some_value_lol) or G.GAME.dollars >= some_value_lol
manic rune
#

oh wait, its >=

native zinc
#

oh hm

tall wharf
#

check for talisman too

native zinc
#

maybe im doing something wrong

manic rune
tall wharf
#

because sometimes mods just add to_big

hushed field
manic rune
sonic cedar
native zinc
tall wharf
#

should

worthy stirrup
#

i tried destoying it... it fucking made it a ghost

tall wharf
#

i am not a code wizard by any means

hushed field
worthy stirrup
sonic cedar
manic rune
#

just Talisman?

worthy stirrup
#

reveresed jokers

#

im working on a mod to add the "anti" versions

manic rune
#

if this works then im forever in ur debt aiko :3

sonic cedar
native zinc
tall wharf
#

i have to add consumables to all of this 😭

worthy stirrup
#

how do you properly destory a card

tall wharf
#

wtffffffffff

hushed field
glad crane
#

Alright I am stumped - I have followed the smods example as best as I can but the in game values come up nil, any insight as to what I am doing wrong?

worthy stirrup
manic rune
#

holy shit

#

THANK YOU 😭

worthy stirrup
#

wait, i think i found my error

glad crane
hushed field
native zinc
#

perhaps i'm checking context.cardarea wrong?

tall wharf
#

you're supposed to use loc_vars

#

it's not local_vars

hushed field
# native zinc

The modify_scoring_hand may not check that cardarea ever

native zinc
#

ah

#

then ig put the cardarea check first

#

maybe

#

perhaps

worthy stirrup
#

how do you destroy a consumbible

glad crane
worthy stirrup
#

bc i got this so far

glad crane
#

Works now :3

hushed field
sullen fern
#

i want them to ALWAYS be debuffed.

native zinc
#

hm

sullen fern
#

like how a blind does it

zealous glen
hushed field
worthy stirrup
glad crane
worthy stirrup
#

but thats a permanent debuff no matter what

zealous glen
sullen fern
worthy stirrup
#

great question, i brute forced my code, i am not the guy to ask

zealous glen
#

@sullen fern what are you trying to do

sullen fern
#

always have odd cards be debuffed when the doise is in play

tall wharf
#

?????????????

zealous glen
zealous glen
sullen fern
zealous glen
#

and I'm suggesting the new SMODS feature

sullen fern
#

well, i don’t know where to put it!!!

tall wharf
#

THE BLIND CALCULATE FEATURES!!!

zealous glen
#

calculate

tall wharf
zealous glen
tall wharf
#

the calculate function in blinds is such a good thing to have

#

no longer do i have to hardwire my shit in the events

sonic cedar
sullen fern
sullen fern
#

if i’m looking in the right area

zealous glen
sullen fern
#

which is this one

sonic cedar
sullen fern
#

the “ensure new odd ranked cards added to play area are debuffed” section

zealous glen
#

-ish

tall wharf
#

😭

zealous glen
#

also need to handle unscored cards

tall wharf
#

coding with serif font is crazy

worthy stirrup
#

what colors are used when a card is sold

zealous glen
#

why

worthy stirrup
#

bc i want to have the dissolve be the same color

zealous glen
#

I think it's like money

sonic cedar
tall wharf
#

what are you trying to do

#

it didn't return anything

#

i s'pose

#

wait hold on

#

what are you doing

#

what do you want to do

sullen fern
tall wharf
sonic cedar
tall wharf
sullen fern
sonic cedar
tall wharf
#

context.cardarea == 'unscored'

#

😔

sullen fern
#

i’m still confused on where i’m intended to put all thid

#

inside the calculate function?

tall wharf
#

yes.

sullen fern
#

where inside the calculate function

#

this is important so i don’t fuck anything up

tall wharf
#

try shit out

#

fuck shit up

#

learn

#

repeat

sullen fern
#

if context.cardarea == G.play and 'unscored' then

tall wharf
#

😭

tall wharf
zealous glen
sullen fern
tall wharf
#

what are you trying to do

sullen fern
#

always have odd cards be debuffed by the doise

sonic cedar
# tall wharf

local coldcash = Talisman and to_big and to_big(G.GAME.dollars):gte(0) or G.GAME.dollars >= 0 or to_big(G.GAME.dollars):lte(0) or G.GAME.dollars <= 0
would this fix it

zealous glen
tall wharf
#

idk

modern kindle
#

always, i already gave them when played

tall wharf
#

im watching this sorry

modern kindle
#

but it wasnt good enough

zealous glen
sullen fern
zealous glen
hushed field
#

What's the doise for object?

sullen fern
worthy stirrup
#

how do i change the players amount of cash

#

nvm

#

i scrolled up

glacial bloom
vivid solstice
#

i was going to put the finger but its not on discord

worthy stirrup
modern herald
#

ok wild question, can I force another joker to trigger after it's already been triggered?

quartz ravine
#

Anyone know if lua does pass by value or pass by reference for equality?

Like if I compared full_hand to scoring_hand, would it trigger an objet or value reference comparison

worthy stirrup
sullen fern
worthy stirrup
#

what does juice_up do?

quartz ravine
#

juice_up means jiggle this card

worthy stirrup
#

oh

modern herald
#
        if card.facing ~= 'back' then
            if context.other_joker.post_joker and JoyousSpring.is_monster_archetype(context.other_joker, "Fluffal") or JoyousSpring.is_monster_archetype(context.other_joker, "Frightfur") then
                for _ = 1, card.ability.extra.copy do
                    context.other_joker.calculate(self, context.other_joker, context)
                end
                return {
                }
            end
        end
    end```

If this works how I think this works, I am gonna do some horrendous shit
hushed field
modern herald
#

correct

hushed field
#

Rad!

modern herald
#

if you can guess what the gimmick of fluffals is gonna be, you can imagine how broken it's also gonna be

sonic cedar
modern herald
manic rune
#

@tall wharf is it possible to G.GAME.chips/5 with talisman

tall wharf
#

yes

sonic cedar
tall wharf
manic rune
#

is it this

#

or is it to_big(G.GAME.chips)/to_big(a)

vivid solstice
#

im trying to make a hand that only scores when you have no hands left in your hand or deck and you are only playing one card, this is what my code looks like so far

        if G.hand == 0 and G.deck == 0 then```
i dont know how to check if your only playing a single card
sonic cedar
hushed field
#

Bepis you're making me dread doing talisman compat 😭

manic rune
#

this is it right

#

-# that local var is supposed to represent the comparison at the bottom but for talisman

manic rune
#

:3

modern kindle
manic rune
#

which is used by a huge portion of the modding community

#

so just for the sake of making your mod much more convenient to play with

#

you would have to make it compat with talisman

#

...and uh, i want to keep my players too :3

modern kindle
#

the only 'need' is having balatro

if talisman made themselves easier to work with it wouldnt be a prob

wintry solar
hushed field
#

I really wish there was a way for that compat to be talisman-sided but sadly it's not

onyx sonnet
manic rune
#

surely those are correct

#

:33333

analog spoke
#

I finally made a page for this in #1209506514763522108 btw, in case u didn't see :3
the mod's name is Aneyh Vampirica :3

modern kindle
#

youd think theyd just pull whatever they change and make the compat inside change whatever

worthy stirrup
#

any ideas why this isnt causing a message under either of the cards?

manic rune
hushed field
#

Turn numbers into tables so you can have big numbers

manic rune
#

and too many mods already added stuff to make them compat with talisman anyways, so i think theres less need to make it more convenient to change how that works

#

...OH ITS RIGHT

hushed field
#

It's just annoying honestly that another mod is such an important compat, but I get that people want to play mods in huge packs

#

Or just turn some things off, instead of swapping whole things out

manic rune
#

...

#

:3 yeah idk

sonic cedar
#

bepis is less than equal just lte

manic rune
#

probably needs to to_big card.config.center.cost too

hushed field
#

Is there a write up for talisman compatibility you're following btw, Bepis?

manic rune
manic rune
sonic cedar
hushed field
#

I wonder what needs to be bigged and what Talisman takes care of normally. I should honestly look into Lua's quantum tables and see what those can do

#

Someone that sounded smart was talking about them in the context of quantum ranks as well, and that seemed like a good solution

manic rune
#

this is not it either

#

...WHY IS IT EVEN BREAKING

#

IT WORKED EARLIER

#

WHAT

#

i am so close to absolutely breaking it down

manic rune
#

like G.GAME.chips, G.GAME.blind.chips, G.GAME.dollars, and such

#

if you were to compare them with "5" for example, you need to to_big(5)

#

to turn 5 into a table

#

ghh

sonic cedar
manic rune
#

im also struggling with talisman, but can u show me that line

#

-# whats with that theme

#

uh

#

you know what, heres my theory

sonic cedar
#

im listenin

manic rune
#

this is the problem, because:

if to_big(G.GAME.dollars):lte(0) returned true, then sure, everything works normally

#

BUT

#

if it returns false

#

then it will run G.GAME.dollars <= 0 again

#

and as we know, G.GAME.dollars is a table

#

so it will fucking break

#

you need to_big(0) on that

sonic cedar
#

on it

#

in the calc function too right

manic rune
#

whats the calc function

sonic cedar
manic rune
#

oh

#

yeah

#

coat that 0 with to_big

sonic cedar
#

here goes

manic rune
#

IT FUCKING LIVESSSSSSSSSSSSSSSSSS

worthy stirrup
#

if i have a mod, and its lua is called for, how could i get it to run a python script if able to be done at all

#

i have a script that randomizes the color in a trance color file

#

and i want to have that run everytime i boot up the game

sonic cedar
#

oh my god it didnt crash

manic rune
#

TALISMAN CONQUERED

#

RAHHHHHHHHHH

sonic cedar
#

real moment of truth is going into the negatives

sonic cedar
#

why arent you transforming

manic rune
#

huh

#

weird

#

can you try running
eval print(to_big(G.GAME.dollars) <= to_big(0))

hushed field
#

I should add JokerDisplay to the list of mod compatibilities to set up next too

manic rune
#

jokerdisplay cant be as painful to implement as this

#

💔

sonic cedar
hushed field
sonic cedar
#

wait i should get negative first

manic rune
#

wha

manic rune
#

how is that possible

#

N', ngl

sonic cedar
manic rune
#

i would trust you with my life

manic rune
red flower
#

im watching a vtuber play my mod rn its nice

hushed field
#

I'd trust you to not send me to the shadow realm without valid reasons

manic rune
#

idk whats going on over that side toma

#

😭

#

mine works normally

#

can you show me your to_big function

sonic cedar
#

yes

manic rune
#

its supposed to look like this

manic rune
#

dont forget me pls :3

red flower
#

i need to find time to play your mod

sonic cedar
red flower
#

i dont even play mine that much lol

zealous glen
red flower
manic rune
manic rune
#

😭

manic rune
manic rune
#

i dont know what the fuck is going on :3

sonic cedar
#

ok

#

neither

#

:)

manic rune
#

...yeah, its the to_big function thats wrong

#

hm

sonic cedar
#

do i change num to x

manic rune
#

...i guess?

#

try it

#

to_big = to_big or function(x) return x end

#

heres my entire function

sonic cedar
#

i mean we have the same function i just

#

pressed enter

manic rune
#

where did you put the function

#

i put it at the top of my main.lua

sonic cedar
#

right under my atlas

#

in the main file

manic rune
#

technically not the top but everything loads below it

#

:3

sonic cedar
#

“technically” line 788 😭

#

meanwhile mine on line 9

manic rune
#

look at this toma

#

its as big as a localization file of most mods

#

😭

manic rune
#

idk wtf is going on

#

💔

sonic cedar
manic rune
#

oh

#

its not my localization file

#

if your thinking about it

sonic cedar
#

oh

#

oh my

manic rune
#

THIS is the actual one

#

:3

#

-# not that bad

sonic cedar
#

there are 57 lines in my main file

manic rune
#

there are 2012 in mine

#

and like 5k3 lines in my jokers.lua, but thats not a fair comparison since my mod is vastly different from others :3

manic rune
sonic cedar
#

of course?? 😭

#

(yes i checked)

manic rune
#

hmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm

sonic cedar
#

okay let’s see if num was the issue

#

i also made it one line

#

darn

#

oh wait the eval

#

nil


manic rune
#

bruh

#

💔

#

do you have anyyy other content mod rn

#

like, ones that add jokers and such and are compatible with talisman

sonic cedar
#

none enabled

manic rune
#

what the fuck

#

uh

#

why isnt your to_big workigngngaon

sonic cedar
#

maybe my talisman version? which version should i have

onyx sonnet
#

The newest probably

sonic cedar
#

yeah what version are we on though

manic rune
#

this is my version

sonic cedar
#

i’m on 2.1.0

#

i’ll try updating

manic rune
#

i really hope thats the issue

#

💔

modern kindle
#

im on the same ver as bepis

#

never mind no im not

manic rune
#

oh

#

:3

#

welp, guess i should update talisman too

modern kindle
#

ive been haivng moderate success in converting my shit to to_big but its been alot of fucking around and finding out

pale venture
#

Mood

manic rune
#

i straight up copied aiko's code

#

and improvised

#

seems to work now

tall apex
manic rune
#

false

#

aiko gave me it

#

:3

tall apex
#

consentual theft

manic rune
#

tf

sonic cedar
#

and me (we had the same issue which was funny)

sonic cedar
tall apex
sonic cedar
#

realll

#

PLEASE work

#

AHAHAHAHAHAAA

#

YEAHHHEHDJSBA

manic rune
#

DID IT WORK

sonic cedar
feral jay
#

what does this mean 😭 the documentation doesn't mention a "center" param anywhere

manic rune
#

TALISMAN CONQUERED đŸ—Łïž

sonic cedar
manic rune
#

might be wrong though

feral jay
#

the docs says i can do tarots/spectrals

manic rune
#

o

open aspen
#

I should probably pay more attention

#

not sure if anyone can spot whats causing an error in the card.lua file of all things

#

i notice the stack traceback starts at (3)

#

why not start at (1)

feral jay
#

i just updated steamodded (it did not fix the problem)

open aspen
frosty dock
#

c_modprefix_sealtarot

#

Also for the edition it should be edition = 'e_negative'

feral jay
#

ohh

open aspen
#

i get a similar error

#

but im not sure why it gives me the error because I'm doing all of the code atm with get enhancements function

#

so it shouldnt fuck up with prefixes if it gets all the prefixes from the cards

vivid solstice
#

how do i check how many cards are selected in hand?

manic rune
#

G.hand.highlighted

vivid solstice
#

would this code work then for seeing if youre playing 1 card with no cards left at all?

#
        if G.hand == 0 and G.deck == 0 and G.hand.highlighted == 1 then
        end
    end,
}```
open aspen
#

it depends if g.hand == 0 if u select a card

#

it might be g.hand == 1 and g.hand.highlighted == 1 cause you still have it in ur hand technically

faint yacht
#

#G.hand.cards & #G.deck.cards & #G.hand.highlighted

mystic river
#

test this with debug messages i suppose
just have it print the current value at the relevant time and see which way it behaves

tepid crow
#

+1 for "just print it out and see"

mystic river
open aspen
#

and this

#

print it out and see doesnt work for me

#

in my currrent issue

upbeat bronze
#

how would i go about creating a custom texture pack for face cards + aces? ive seen other people have done it prior

open aspen
#

goodness its been like a day now of this one thing 😭

red flower
rapid stag
#

does anyone remember how to set your own order of jokers in the collection?

open aspen
#

it seems to be a common problem with fucking with cards, spawning them or changing enhancements

#

from what i can tell

hushed field
rapid stag
open aspen
#

I figured it out. 1. I need to use G.P_Centers (something like that i left the house so i forgot) when using set ability.

and 2. It does return an empty table without all the ternary stuff i was doing, but even with the ternary stuff I had the logic backwards so it was returning nil instead of c_base

#

I have a few issues left to iron out, cause I realized the context for final scoring step is right after it’s calculated, not after the score is finished displaying (eg final scoring step is right after the cards are calculated against which is right after all the cards are played)

#

So I should switch it to being after. Also, I haven’t tested it but i’m very sure that it will swap enhancements until it reaches the end because it evaluates the left card with the enhancement, swaps with the right card, then evaluates the right card which now has the enhancement so it will swap again

frosty dock
#

set_ability works with string keys now

open aspen
#

well

#

it didn’t for me

#

or maybe it did

#

cause now that i think about it it might have been because i fucked up the ternary from the beginning

#

so it was doing nil

#

probably that then

solid surge
#

how would i go about creating a card like The Soul for custom rarities, and if possible, where could i look for examples?

glad osprey
glad crane
#

As simple of a concept this joker was, it was a good learning experience to try and understand how the modding for the game works - and I am happy to say it works!