#💻・modding-dev

1 messages · Page 105 of 1

stray warren
#

else can't start by itself

gilded narwhal
#

bump

gilded narwhal
#

guys i have tried every variation of this i can think of please

#

i don't understand

#

Because I'm 100% sure that skipping_booster is a valid context

#

Other jokers use it

#

And it works perfectly fine with other contexts

frosty dock
#

isn't skipping_booster a joker context used only by red card?

gilded narwhal
#

Are deck contexts and joker contexts completely different

gilded narwhal
gilded narwhal
#

man

#

then how would i actually do that

frosty dock
#

PR #324 actually adds this and other joker contexts as deck contexts

#

I just haven't reviewed it yet

warm sable
#

balatro now runs natively on linux

#
  • achivements and steam api integration
frosty dock
gilded narwhal
#

Okay I'll just work on the other parts then

#

What are the contexts that are going to be added tho?

frosty dock
thick panther
warm sable
thick panther
warm sable
#

Proton uses Xwayland

warm sable
#

its part of a bigger project im working on

#

porting indie games to native linux without relying on Proton

#

and using their respective underlying engines/frameworks to handle the game instead

#

which means you'll get easier access to saves and sometimes even linux-specific optimizations from the respective engines

#

i think love2d has some linux-specific optimizations

#

less cpu overhead too since no more proton and translating calls to windows calls

leaden bay
#

Hey- I'm new to Balatro modding. I'm trying to make a joker which has all cards base their face value off the first card held in hand. How can I access the currently selected/played hand in is_suit? It doesn't seem to have access to context so I'm guessing I need to access something in G.GAME

zealous glen
#

so coding it would probably only make it work for vanilla and your own mod

faint yacht
#

As update is called every frame... that depends on FPS, correct?

elder vapor
#

it should afaik

leaden bay
gilded narwhal
#

Hey gang, I have some questions about the take_ownership function

Why does it undiscover the jokers that I modify

Is it possible to make those modifications only take place on a specific deck? I have this almost by just putting it in the back:apply, but the modifications stay even when switching to a different deck

#

Okay nvm I fixed the first one but how can I make that revert back after I switch decks

gilded narwhal
#

Is that just a steamodded thing?

spring anvil
#

I guess I'm coming here

#

how do I set up a framework mod

#

I want other mods to communicate to a mod I'm making

#

do I need to do take_ownership or is there a better method?

#

@ me on a response please

shell tangle
stray warren
#

There's not already a cashing_out context for calculate_joker, right? I created this hook, but if one already exists, I'll just use that

-- Hooks into cash_out function to call calculate_joker()
local cash_out_ref = G.FUNCS.cash_out
G.FUNCS.cash_out = function(e)
  for i = 1, #G.jokers.cards do
    G.jokers.cards[i]:calculate_joker({ cashing_out = true })
  end

  cash_out_ref(e)
end
spring anvil
#

thank you so much

tidal ice
#

I have tried several different contexts and it seems that I cant get this to trigger at the right time, either cards_destroyed equals nil and causes a crash or the Joker simply does nothing (in this case, it does nothing)

shell tangle
stray warren
#

no, I need it specifically when the Cash Out button is pressed

#

It pays money in the cash out screen, and I don't want it to upgrade the payout before it gives it to the user

shell tangle
#

Yeah, think you had to make it yourself, the closest guarnteed check after end of round is leaving shop, I believe.

olive shoal
#

silly 🤭

gilded narwhal
#

Hey why does this not work in the way it's supposed to? Burglar just works like normal

shell tangle
gilded narwhal
#

No, but neither does all the other ones I've modified

#

And they all work

shell tangle
#

Odd, what happens when you change "burglar" to "j_burglar"? Shouldn't change anything, but it's odd you're not getting mod badges, unless you have them toggled of in the steamodded settings,

gilded narwhal
#

Yeah that didn't do anything

shell tangle
#

Yeah, no idea, it just doesn't seem like it's getting called if that's working fine, I can't think of what to check. Maybe add an add to deck function with a debug message, see if it's specific to burglar's calculate function?

gilded narwhal
#

I don't think I'm gonna worry about that right now

tidal ice
#

looking at glass joker's code was no good

gilded narwhal
#

Is take_ownership also able to modify the text or do I have to use lovely for that

tidal ice
#

oh I would imagine you'd be able to, unfortunately I can't help with that

crisp coral
gilded narwhal
#

Nvm I figured out how to use take_ownership

outer patio
#

how can i set a cards variable? like if i want its mult to be 0 from start

gilded narwhal
tidal ice
#

current attempt

if its not obvious, I need help here

#

this does nothing

#

I hate how just directly copying glass joker's code just doesnt work

gilded narwhal
#

Guys how would I actually make this work

#

and using take_ownership with loc_txt doesn't work either

crisp coral
#

😭

#

make a folder called localization and a file called en-us.lua in it

#

then do

return {
    descriptions = {
        Joker = {
            j_drunkard = {...}
        }
    }
}
gilded narwhal
#

I'm trying to make it so it only modifies the description on a specific deck

tidal ice
elder vapor
#

awesome

tidal ice
#

I'm working on smth else

gilded narwhal
#

I sure do love when your code doesn't work for no apparent reason

#

And there's no error or anything so you don't even have anything to point to

spring anvil
#

try doing print() to debug

#

oh I see you have actually

tidal ice
#

oh yeah thats what I've been doing, didn't change much

crisp coral
#

i forgor how you do this with loc_txt

spring anvil
#

but yea usually debugging what certain things are at certain points helps

#

rather than doing print("im over here")

crisp coral
spring anvil
#

how do I get love2d context stuff in vscode

#

I don't like the yellow underline lol

crisp coral
#

this triggers whenever any card is destroyed, and gives access to context.glass_shattered (which is the list of all cards destroyed, not just glass)

#

and then copy the entire code and use context.removing_cards instead of context.cards_destroyed and context.removed instead of context.glass_shattered

#

i hope that makes sense

gilded narwhal
#

And I tried doing it in that format too

#

With the brackets

#

Nothing

#

And I know that the take_ownership thing is working properly because the config change works

crisp coral
#

never used take_ownership so sorry can't help :c

gilded narwhal
#

It's fiiiiine

south pagoda
#

Are there any mods that add extra save profiles? It seems like a pretty simple implementation so would be surprised if there isn't one

tidal ice
#

well unfortunately this doesnt work

gilded narwhal
#

i'm not a programmer but I imagine this is how is feels

tidal ice
#

tbh I should be going to bed its midnight lol

spring anvil
#

also hi yes i did just follow you on bluesky

tidal ice
#

I saw LOL

elder vapor
#

was thinking about making a mod where you upgrade jokers (using money & consumables) but now it just sounds like a copy of fusion jokers

spring anvil
#

wait what version of lua does love2d use

elder vapor
#

11.5 iirc

spring anvil
#

lua.. only goes until 5.4,,,,

#

ok it's 5.1 i think

elder vapor
#

oh idk

edgy reef
#

Love framework uses LuaJIT which is 5.1

spring anvil
#

ok got it

dusk shoal
#

heyyyy chat, i want a variable that stays the same throughout the entire run, the idea is the joker gains mult every time its destroyed and then comes back

#

how would i do that? make a global variable or whatever

cerulean rose
#

check monster from cryptid

dusk shoal
#

damn am i unoriginal

#

do i have to die

cerulean rose
#

any idea why this doesn't work?

[[patches]]
[patches.pattern]
target = "functions/state_events.lua"
pattern = "local hand_text_set = false"
position = "after"
payload = '''
for k, v in ipairs(G.play.cards) do
    if v.ability.name == "Diseased Card" then
        local changed = false
        if k > 1 and G.play.cards[k - 1].ability.name ~= "Diseased Card" then
            G.E_MANAGER:add_event(Event({
                trigger = 'immediate',
                blocking = false,
                blockable = false,
                func = (function()
                    G.play.cards[k - 1]:set_ability(G.P_CENTERS["m_pencil_diseased"], nil, true)
                    return true
                end)
            }))
            changed = true
        end
        if k < #G.play.cards and G.play.cards[k + 1].ability.name ~= "Diseased Card" then
            G.E_MANAGER:add_event(Event({
                trigger = 'immediate',
                blocking = false,
                blockable = false,
                func = (function()
                    G.play.cards[k + 1]:set_ability(G.P_CENTERS["m_pencil_diseased"], nil, true)
                    return true
                end)
            }))
            changed = true
        end
        if changed then
            card_eval_status_text(v, 'extra', nil, nil, nil,
                { message = localize({ type = 'extra', key = 'k_infected' }) })
        end
    end
end
'''
match_indent = true

it changes the cards eventually, but only after scoring has finished. also, card_eval_status_text doesn't work

shell tangle
dusk shoal
#

that would make sense !! is there anything i need to do to set that up or can i like

#

G.GAME.variable_name = number

#

okay so i tried that and it crashed lol

#

im guessing theres a specific way to set up a g.game variable

shell tangle
#

G.GAME variables can only be made and accessed during a run, so you usually want to do G.GAME.variable or defaultvalue.

dusk shoal
#

ohhh like uhm. probability i see

#
      loc_vars = function(self, info_queue, card)
        return { vars = { card.ability.extra.mult, card.ability.extra.mult_gain } }
      end,
      remove_from_deck = function(self, card, from_debuff)
        G.GAME.boomerang = card.ability.extra.mult + card.ability.extra.mult_gain
        card.ability.extra.mult = G.GAME.boomerang
        card:add_to_deck()
        G.jokers:emplace(boomerang)```
#

how does this look?

#

boomerang is the tag of the joker so

cerulean rose
#

what are you doing in remove_from_deck

dusk shoal
#

okay well it didnt cuz the game crashed lmao

dusk shoal
#

then giving the joker back to the hand

cerulean rose
#

i don't think you should give it back like that

#

cus the game tries to destroy it still

dusk shoal
#

no yeah i wont but

#

ohhhh

#

well the idea is

#

as long as you have space

#

it'll give it back at the end of the blind

#

and if you dont it wont come back

#

(its a boomerang)

shell tangle
#

You can probably have it set mult to G.GAME.boomerang or 1 on add_to_deck.

cerulean rose
#

you end up having a non-existent joker

shell tangle
#

All duplicate copies would share boomerang values, though.

dusk shoal
#

well its card.ability.extra.mult = G.GAME.boomerang

#

but i assume thats the same because game.boomerang or 1 is what it is in the config

dusk shoal
shell tangle
#

Do you have it in add_to_deck specifcally, not remove_from_deck?

dusk shoal
#
        card.ability.extra.mult = G.GAME.boomerang
      end,
      remove_from_deck = function(self, card, from_debuff)
        G.GAME.boomerang = card.ability.extra.mult + card.ability.extra.mult_gain
        card:add_to_deck()
        G.jokers:emplace(boomerang)
      end,```
shell tangle
#

Anyways, when does the crash happen? On boot, on hovering over the card, what?

dusk shoal
#

maybe the issue is from_debuff

#

on boot

shell tangle
#

Give the crash screen, it's not from_debuff.

dusk shoal
#

ok !

#

i can kindaaa read this

#

like, i understand its an error with the game part

#

since its nothing

shell tangle
#

What's line 87 in your code?

dusk shoal
#

config = {extra = { mult = 0, mult_gain = 7, (G.GAME.boomerang or 1) } },

#

makes sense

shell tangle
#

What about config = {extra = { mult = (G.GAME.boomerang or 1), mult_gain = 7 } },?

dusk shoal
#

i can try that !

#

would i need to change anything with the card.ability.extra.mult

#

oop crashed again

#

ohhh my god.

#

i realized one of the problems (i think)

#

i didnt add the g.game to the return vars

shell tangle
#

Actually, wait, just set mult to 1, you don't need the game variable in the config.

dusk shoal
#

ok !

#

does 0 work actually

shell tangle
#

Yeah.

dusk shoal
#

kk!

#

IT LAUNCHED THIS TIME !!

#
      loc_vars = function(self, info_queue, card)
        return { vars = { card.ability.extra.mult, card.ability.extra.mult_gain, (G.GAME.boomerang or 1) } }
      end,
      add_to_deck = function(self, card, from_debuff)
        card.ability.extra.mult = G.GAME.boomerang
      end,
      remove_from_deck = function(self, card, from_debuff)
        G.GAME.boomerang = card.ability.extra.mult + card.ability.extra.mult_gain
        card:add_to_deck()
        G.jokers:emplace(boomerang)```
#

i assume this is where its fuckin around

#

mainly

#

G.GAME.boomerang = card.ability.extra.mult + card.ability.extra.mult_gain

#

this

shell tangle
#

Yeah, it's trying to read the mult after already being destroyed, so there's nothig to read.

dusk shoal
#

inter resting

#

trying to think of how to get around it

#

i guess

dusk shoal
#

nah tried that

#

gave the same thing but instead of mult being nil, game was nil

shell tangle
#

Stupid idea, you could have G.GAME.boomerang = {mult = 0, mult_gain = 0} in the add_to_deck, and access it from a global value rather than trying to use the card's value.

dusk shoal
#

so like

#

turn the config into a global value?

#

thats hilarious

shell tangle
#

So you'd use G.GAME.boomerang.mult instead of card.ability.extra.mult, yeah.

dusk shoal
#

would it still have the extra = ?

#

{extra =}?

shell tangle
#

Not unless you did G.GAME.boomerang = {extra = {values}, the extra is there to prevent most cards from triggering unwanted effects - you could just have it as config = {mult = 5} actually, but the thing is that it'll automatically give you the 5 mult during the scoring phase, so unless you want a joker that's just +4 mult with no unique effects or conditions like base jimbo, you usually don't want this.

dusk shoal
#

right right ok ! i knew that but in this case was kinda weird

#

alright i'll try

#

ohh wait

#

hm

#

if G.GAME.boomerang is the config

#

then i think the actual value i want to keep

#

would be something else

#

unless i have it wrong

#

i think i just need to change some code if thats the case

#

no yeah i think i know what to do

#
      loc_vars = function(self, info_queue, card)
        return { vars = { card.ability.extra.mult, card.ability.extra.mult_gain, (G.GAME.boomerang or 1) } }
      end,
      add_to_deck = function(self, card, from_debuff)
        G.GAME.boomerang = {mult = 0, mult_gain = 0}
        card.ability.extra.mult = card.ability.extra.mult
      end,
      remove_from_deck = function(self, card, from_debuff)
        card.ability.extra.mult = card.ability.extra.mult + card.ability.extra.mult_gain
        card:add_to_deck()
        G.jokers:emplace(boomerang)```
#

looks gooooood ?

#

well i need to change the G.GAME.boomerang mult_gain into a 7

#

but other than that

shell tangle
#

Wait, that won't scale,

#

You'd be setting G.GAME.boomerang.mult to 0 every time it's added.

dusk shoal
#

ohhh yes true

#

resetting the value

#

i mayy have an idea

#
        G.GAME.boomerang = {mult = card.ability.extra.mult, mult_gain = card.ability.extra.mult_gain}
      end,
      remove_from_deck = function(self, card, from_debuff)
        card.ability.extra.mult = card.ability.extra.mult + card.ability.extra.mult_gain
        card:add_to_deck()
        G.jokers:emplace(boomerang)```
#

this is so stupid

proper stratus
dusk shoal
#

"mult = mult"

shell tangle
dusk shoal
#

alright !

#

what i did crashed anyways lawl

#

upon giving me the joker

#

but no yeah it uh

#

oh wait

#

in return vars

#

boomerang is or 1

#

and its or 0 in here

#

probably not the full error but maybe important

shell tangle
dusk shoal
#

huh!

#

i see

#
      loc_vars = function(self, info_queue, card)
        return { vars = { card.ability.extra.mult, card.ability.extra.mult_gain, (G.GAME.boomerang or 0) } }
      end,
      add_to_deck = function(self, card, from_debuff)
        if G.GAME.boomerang then
          card.ability.extra.mult = G.GAME.boomerang.mult
         else
          G.GAME.boomerang = {mult = 0, mult_gain = 7}
        end
      end,
      remove_from_deck = function(self, card, from_debuff)
        card.ability.extra.mult = card.ability.extra.mult + card.ability.extra.mult_gain
        card:add_to_deck()
        G.jokers:emplace(boomerang)
      end,```
shell tangle
#

You don't need the game variable in the return, but I don't think it'd crash anything, but the mult at the bottom needs to switch over to G.GAME.boomerang.mult = G.GAME.boomerang.mult + G.GAME.boomerang.mult_gain.

dusk shoal
#

okay !!!!! thaaaaat makes sense actually

#

since extra no longer equals it

#

thats just for the config

#

interesting

#

wait

#

it might be

#

the from_debuff

#

i just directly copied this from the uh

#

tutorial

shell tangle
#

What's line 35?

dusk shoal
#

thats. so weird. because thats a different joker.

#

chip_mod = card.ability.extra.chips,

shell tangle
#

Wait, nevermind, tht's cardarea.

dusk shoal
#

since it says the issue is card i assume its with adding the joker

#

and i was going to remove that anyways because like, that was just for testing purposes

shell tangle
#

card:add_to_deck() doesn't have a card to read from, by the way. Look at the steamodded wiki, utility near the bottom, I think - learn SMODS.create_card, do local card = SMODS.create_card(stuff here), and then emplace()card.

dusk shoal
#

okay !!

#

except im gonna get rid of that because again, just testing lol

#

but i might need it later for uhm

#

when the blind is over

#

okay, didnt crash on sell

#

AND

#

IT SCALES

#

WHEN I GET IT BACK

#

THANKS A TON MAN WOOHOO !! will probably need more help later

#

lmao

shell tangle
#

Yeah, it was interesting to think about.

dusk shoal
#

funny inside joke is

#

another joker from the same mod

#

is called the Crash joker

#

slowly increases in chance to disappear as you play it

#

and the temporary card art IS the crash joker

#

so it was really funny to have the game crash with that as the art

vivid glade
#

hello! is there a special thing i have to do in order to require another lua file in my mod? is it just as simple as doing a regular require?

frosty dock
dusk shoal
#

Would there be a way to check when a 1 in chance succeeds or not? Whether it’s from a joker or lucky card or whatever

#

I have an idea but I don’t know if such a thing is possible

frosty dock
#

not really

dusk shoal
#

for lucky cards I can do the reverse of lucky cat I guess

#

And same with glass joker

frosty dock
#

you can detect specific events

#

but not generic chance rolls

dusk shoal
#

events is very broad lol

frosty dock
#

if there's a specific thing that has a chance to happen, you can patch into it to catch it

dusk shoal
#

mhm

#

again only thing that’s chance based is lucky and glass cards

frosty dock
#

there's a bunch of chance based jokers too

dusk shoal
#

No yeah !!

frosty dock
#

you can find all those individually too but you get no support for modded jokers/enhancements

dusk shoal
#

I just mean

#

Ohh yeah I guess ?

#

I can detect it they activate their effect

#

But like you say nothing applicable for modded stuff

frosty dock
#

you'd have to patch into each calculation separately

crisp coral
#

and if you just fetch all then you're also taking in every playing card draw, every shop card, etc

#

so yea gotta ^^

dusk shoal
#

which is wayyyy too much work even if I like the idea lmao

#

It was gonna be every failed 1 in chance the joker gains xmult or smth like that

obsidian fjord
#

Hey I seem to be having an issue where text values aren't being set correctly or something. I'm trying to create an Erosion-like joker but for mult mult and when I look in the collections it sets the text properly (first image), however it sets everything to nil in the joker list in a run (second image).

Code below (ignore the name and key I haven't slept):

SMODS.Joker {
  key = "hi",
  loc_txt = {
    ["default"] = {
      name = "hi",
      text = {
        "{X:mult,C:white}X#1# {} Mult",
        "per card under {C:attention}#2#{} in your",
        "{C:attention}full deck",
        "{C:inactive}(Currently {X:mult,C:white}X#3# {C:inactive} Mult)"
      }
    }
  },
  config = {
    -- 300 is placeholder
    extra = { Xmult = 300, deckSize = 52, mult_total = 1.0 }
  },
  loc_vars = function(self, info_queue, card)
    return { vars = { card.ability.extra.Xmult, G.GAME and G.GAME.starting_deck_size or 52, card.ability.extra.mult_total } }
  end,
  unlocked = true,
  discovered = true,
  no_collection = false,
  rarity = 1,
  cost = 0,
  blueprint_compat = true,
  calculate = function(self, card, context)
    if context.joker_main then
      return {
        Xmult_mod = card.ability.extra.Xmult,
        message = localize { type = 'variable', key = 'a_xmult', vars = { card.ability.extra.mult_total } }
      }
    end
  end
}
cold grotto
#

seems to work for me

#

though when playing a hand, it shows that the card gives x 1 mult, i think from the mult total not being updated

frosty dock
cold grotto
obsidian fjord
obsidian fjord
cold grotto
#

:P

obsidian fjord
#

Also how did you just, spawn the joker?

cold grotto
#

the debugplus mod

obsidian fjord
#

Tyty

cold grotto
#

if you hold tab it shows all the commands

winged bridge
#

anyone a kamen rider fan im thinking of making a full on KR Gotchard or Blade mod

#

101 chemies into jokers would be a nightmare tho lmao

#

ryuki cards can be consumable
decade can also be consumable? or playing cards
chemies and undeads are jokers

zealous glen
winged bridge
#

is there a way to make a joker randomly spawns in a run

#

if you start a blind then a joker would appear on the joker area something like that

maiden phoenix
#

Pretty sure you'd have to lovely patch that in

bold sleet
#

Hello, quick question: Is there a way to look and for example, change the suits of an entire deck?

#

... and the same thing but look for only a specific suit?

stiff locust
#

and you do that with for index, value in pairs(G.playing_cards) do

#

i think it can do ipairs too idk the difference honestly

#

value is the term you use to refer to the card here

#

so to check the suit you do value:is_suit("Suitname")

#

i don't know how to change the suit but it's probably not that difficult

bold sleet
#

-# to this day I still don't know what in pairs means

wintry solar
#

pairs takes the table that you give it and returns the key and value for each entry in it in turn

bold sleet
#

ah

#

Thanks you.

bold sleet
#

Surely surely someone has already made Xchips for me right right?

frosty dock
#

yep, exists in talisman

bold sleet
#

could someone give me that piece of code so i can yoink it real quick?

bold sleet
#

or like where I can find it, idk

inner folio
nocturne garnet
inner folio
#

all my jokers were negative

#

no reroll voucher

#

the whole run

nocturne garnet
inner folio
nocturne garnet
#

weak smh

#

i woulda gotten 10{999}10 just sayin...

faint yacht
#
return {
    message = localize({ type = "variable", key = "a_xchips", vars = { card.ability.extra.x_chips } }),
    Xchip_mod = card.ability.extra.x_chips,
    colour = G.C.CHIPS
}
bold sleet
faint yacht
#

Which type of header you using for the mod?

bold sleet
#

json

#

new

#

Azaming

frosty dock
#

... what

frosty dock
wintry solar
#

looks like he's tried to throw it in loc_vars return

frosty dock
#

I've figured that much, but why would there be a var in the loc_vars return...

wintry solar
#

🤷‍♂️

bold sleet
#

Because I need the text to change every played hand.

#

And not just a number.

#

I need to change the text color, background color, and the trailing text Chips <> Mult

frosty dock
#

I'd use different loc entries for that

bold sleet
#

huh?

#

You can do that?

#

how what

frosty dock
#

you can return a key in loc_vars and it'll use that instead of the joker key to get the loc

bold sleet
#

So this?

frosty dock
#

no

#

in the return table, you add a key field

bold sleet
#

Continue

frosty dock
#

add a localization entry in your loc file (assuming you have one) with a different key

#

then you'd give it a different key depending on whatever

bold sleet
#

me have no localization file

frosty dock
#

you should

faint yacht
#

I still don't, and I think one isn't really required here if you define it earlier in the script.

#

Though, I probably will eventually move stuff over to a localization file, still need to figure that out.

frosty dock
#

but it's common practice because it's the only way to allow your mod to be localized

bold sleet
#

I don't know how to set a localization file

frosty dock
#

look at pretty much any larger mod for 1.0

bold sleet
#

^ only has his own mod, steamodded and talisman installed

frosty dock
#

pft excuses

nocturne garnet
#

🙄

faint yacht
#

To be fair, maybe a localization file example wouldn't be a bad idea.

stiff locust
#

tis certainly a method

frosty dock
#

yeah that sets things up for you, but make sure you don't run any other mods that add localization strings while doing it

stiff locust
#

well if they have no other mods than talisman, steamodded and their own mod

#

it should be alright

nocturne garnet
stiff locust
cold grotto
#

how many times should the end of round context trigger, i think it's supposed to be once but it seems to trigger 17 times?

cold grotto
#

this is a commonly known thing i'm sorry :(

faint yacht
#

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

nocturne garnet
nocturne garnet
#

why...

stiff locust
#

especially on a spectral

nocturne garnet
#

fair

stiff locust
#

it takes playing the same flesh card

#

10 times for them to be as good as steel when held in hand

#

and steel can still be played and not give X0.5 mult

#

its just not worth it

nocturne garnet
#

i didnt want it to be X0.1 held Mult because it'd scale too fast possibly

#

dunno tho

#

i'll just have to test

#

or change effects

stiff locust
#

i think it conceptually just cant coexist with steel

#

its either going to make steel worthless or be worthless because of steel

nocturne garnet
#

hm

stiff locust
#

id change effect

nocturne garnet
#

yeah probably

stiff locust
#

maybe instead of giving X0.5 mult when played it could get debuffed when played, and then give +mult in hand instead of Xmult? would definitely have to be on a tarot instead of a spectral if you changed it this way

#

makes it synergise with steel cards instead of competing with steel cards

nocturne garnet
#

hm, i'll think about it

stiff locust
faint yacht
#

Fusion Enhancements. 🧠

stiff locust
#

one of my jokers activated its effect 8 times at end of round

frosty dock
faint yacht
#

Jimbo going Nuclear.

bold sleet
#

jimbo update

nocturne garnet
limpid flint
#

you can always balance it after playtesting

bold sleet
#

hello, quick question: how do I make so a joker fires after a card gets retriggered but not after?

winged bridge
#

have someone made a mod where joker can randomly spawn in a blind

bold sleet
gilded narwhal
#

I've tried this ```
[[patches]]
[patches.pattern]
target = 'localization/en-us.lua'
pattern = '''text = {
"{C:red}+#1#{} discard",
"each round"
}'''
position = 'at'
match_indent = true
payload = '''
text = function()
local desc = {}
if G.GAME.selected_back.config.ttr_red then
desc = {
"{C:red}+#1#{} discards",
}
else
desc = {
"{C:red}+#1#{} discard",
"each round"
}
end
return localize(desc, self.config.d_size)
end
'''

#

And this ```
SMODS.Joker:take_ownership("drunkard", {
loc_txt = {
name = "Drunkard",
text = {
"{C:red}+$#1#{} discards",
},
},
config = {d_size = 5},
discovered = true,
})

#

Neither of them do anything

#

And drunkard is a bad example because it modifies literally one thing and that's it but I have other ones where they need to be entirely reworked and I need that to show in the description

wintry solar
#

You can’t lovely patch localisation files

gilded narwhal
#

Good to know

hardy viper
#

arent multiline pattern patches also like not a thing

wintry solar
#

What doesn’t work about the take ownership?

gilded narwhal
wintry solar
hardy viper
#

ah gotcha

gilded narwhal
#

Like this is the full thing, config and discovered work just not loc_txt

faint yacht
#

...can't you do a function for the text field instead? That way, you can do checks in the functions and return an appropriate table.

wintry solar
#

You could always just throw it in a loc file

gilded narwhal
#

I'm gonna try that

#

And if I make text a function with and ifelse statement that should work properly right?

wintry solar
#

No

#

I don’t think you can have functions in loc txt

gilded narwhal
#

Hmmm

#

I'm gonna try a few different things and see if they work

#

Because I'm pretty sure it's just that take_ownership doesn't work with strings

#

Or something like that

faint yacht
#

Actually, loc_txt can take functions.

#

They do execute during initialization only, though.

hardy viper
#

smods helper function for reloading a cards loc_txt when ...

gilded narwhal
#

So do you think that the initial goal of having it's description be modified with a specific deck is just not possible?

#

Wait

wintry solar
#

You can do that

gilded narwhal
#

Like this?

wintry solar
#

No

#

You’ll need to create a loc_vars in your take ownership call and have it return a different key depending on your back being selected

#

Then in your localisation file you have the two alternate descriptions (or probably just your new one if it should use vanilla without your deck)

gilded narwhal
#

I see

#

So I need to use both

rough furnace
gilded narwhal
#

Or can I just use loc_vars and localization

rough furnace
#

don't need loc_txt if you are providing localization

fallen tendon
#

how might you make the badge color of a consummable type cycle through the rainbow?

frosty dock
#

SMODS.Gradient when

fallen tendon
#

lol

rough furnace
#

you need to update the colour's values every frame

fallen tendon
#

whats a funciton that triggers every frame?

rough furnace
#

Game.update is where the game does it iirc

fallen tendon
#

also how do you make a color out of hsv

rough furnace
#

iirc theres a helper for that somewhere in the code

#

I haven't done much with colours

#

maybe that was in shader land

#

idrc

frosty dock
#

no there's a function, but idr what it was called

fallen tendon
#

also, im trying to get objects to not spawn at all in its original sets

frosty dock
#

?

fallen tendon
#

i found omit = true, but that doesnt change the set item counts in the menu

#

this joker for example

rough furnace
fallen tendon
#

it shows up when you go into the joker page of the collection

frosty dock
#

no_collection = true

#

omit is cringe

fallen tendon
#

but the joker section still says 150/150

fallen tendon
#

i just want it to only appear in a custom pool

rough furnace
#

just set a custom in_pool function

fallen tendon
#

wait waht are the args for that

rough furnace
#

uhh idk

fallen tendon
#

cuz it doesnt say n the steaodded docs

gilded narwhal
#

Making progress

rough furnace
fallen tendon
#

i need to check the actual pool its in

rough furnace
#

seems like it's whatever the games in pool passes

#

probably just print it out and see

fallen tendon
rough furnace
#

tprint or inspect

tidal ice
rough furnace
#

or require('debugplus-util').stringifyTable if you're feeling fancy, have DebugPlus, and don't mind using unstable api's

fallen tendon
#

doesnt seem to be printing

#

even opened a bufoon pack

rough furnace
#

did you actually print it?

fallen tendon
#

i cant even fnd where this function is defined

#

its like it doesnt exist

frosty dock
#

print(inspect(args))

#

inspect just stringifies the table

#

args.source is whatever create_card has as an append key (RNG source)

rough furnace
#

My internet is sucking rn

fallen tendon
#

what...

#

thats literally it

rough furnace
fallen tendon
#

what even is the point of a whole args table if theres one arg

#

albeit that still works as a way to discern them

frosty dock
#

there can be other args

rough furnace
#

also future proofing

frosty dock
#

like initial_deck for suits/ranks

#

and we don't want to end up with 50 function params because we kept adding more

rough furnace
#

also ever used create_card

#

we want to avoid (nil, nil, nil, nil, nil, true)

fallen tendon
#

yay managed to get a system that works

gilded narwhal
#

am I getting closer

frosty dock
#

uh not quite

#

more like separate j_drunkard_red next to normal j_drunkard with own name and text

gilded narwhal
#

Gotcha

#

Like this?

rough furnace
#

isn't name supposed to be a string and not a table?

frosty dock
#

yeah it's meant to be a string

gilded narwhal
#

Oops

frosty dock
#

else you'll probably hard crash

gilded narwhal
#

I mean I didn't hard crash

#

The name just didn't appear

#

And it still doesn't

#

I think I'm calling key wrong

frosty dock
#

yeah that's wrong

rough furnace
frosty dock
#

just put j_drunkard_red as the key

gilded narwhal
#

Is j_drunkard_red a global?

wintry solar
#

key = ‘j_drunkard_red’

tidal ice
#

I tried this but I'm still having issues

gilded narwhal
#

oh my god finally I'm so happy thank you

tidal ice
#

oh nice

wintry solar
gilded narwhal
#

Okay so now there's only one problem left that I need to solve before I just have to wait for SMODS to get updated so I can call on more contexts

#

My intention is that it only reworks the jokers while the deck is currently selected

tidal ice
gilded narwhal
#

However, currently it makes it permanent after I select the deck, like unless I close the game then drunkard will give 5 discards, when I want it to do that only for the deck

rough furnace
#

if your just adjusting the config you should be able to store the original and reset it

wintry solar
#

You can also just give it a custom calculate that checks the deck first

frosty dock
#

you should change the config from set_ability

fallen tendon
#

i cant stop asking for help

#

is there a mod funciton?

#

like the mathematical modulus operation

wintry solar
#

math.mod iirc

#

Or x % y

rough furnace
gilded narwhal
rough furnace
fallen tendon
#

why isnt dt gertting passed correctly through this hook?

wintry solar
#

Put (self, dt)

fallen tendon
#

ok

tidal ice
#

something interesting I noticed is that nothing prints, with or without context.destroying_cards, even when glass cards do indeed get destroyed
what am I missing

fallen tendon
wintry solar
#

No no in the reference bit

#

Bottom line

fallen tendon
#

ok

wintry solar
fallen tendon
#

i guess i needed self,dt in both places?

#

very weird

wintry solar
#

Oh yeah you don’t have the : in the definition

fallen tendon
#

oh god

#

the hsv funciton i found appears ot hate me

tidal ice
wintry solar
fallen tendon
#

and the base game in fact does not have an hsv function at all

tidal ice
wintry solar
wintry solar
tidal ice
#

yup

fallen tendon
wintry solar
# tidal ice yup

Okay you don’t need three different parts, just use the if statement I sent then loops over context.removed, do your glass check and then level up inside the loop

fallen tendon
wintry solar
#

Might need an alpha channel too?

tidal ice
fallen tendon
#

yup alpha channel

frosty dock
#

yep it does that

faint yacht
#

...do I have to do things the Cryptid way if I want to influence values of a different card, be it a Joker, consumable or playing card?

fallen tendon
#

its both not changing

#

and also bugged looking

#

if only i had the gradient system lol

fallen tendon
#

THE COLOR CHANGES!!!!!

#

but it still doesnt change after initially rendering things

#

so it stays at that color forever until it gets reloaded

#

how might i fix that?

gilded narwhal
#

So I have this but this gives me 6 discards, presumably because the original drunkard's function is still there, how would I fix that? (Ik I could just do ease_discard(4) but that wouldn't give the +5 on the UI)

wintry solar
young dew
#

does someone know how i could add text here

gilded narwhal
#

I think at least

young dew
#

but i don't know how to modify the text

#

like what to use

fallen tendon
tidal edge
#

trying to make this, can anyone provie some help

wintry solar
gilded narwhal
tidal edge
gilded narwhal
fallen tendon
#

imm thinking the problem is that i need to find a way to access the badges and the consumable types entrance that smods mmmakes directly and change the color there too

fallen tendon
#

this is how the edition badges do it

#

calls the color every frame i think

wintry solar
#

Oh hang on

fallen tendon
wintry solar
#

The colour will be where the secondary colours are saved

#

I don’t remember where it is off the top of my head

#

Try G.C.SECONDARY_SET.Place

#

Assuming place is your key

fallen tendon
#

i already do that

#

btw my key is lowercase

dusk shoal
#

hey chat, im trying to figure out the SMODS.create_card(t) function but im a little loss on . where to put things i guess?

#

i really just need a solid format structure for it i guess

#

and im on the wiki i just would like a more specific explanation

tidal edge
#

any poker handers able to provide help :) im trying to code this

dusk shoal
#

helps with card id's

fallen tendon
dusk shoal
#

OHHH

#

I GET IT NOW

#

THANKS!!

fallen tendon
#

replace with actual args of the normal one

dusk shoal
#

no yeah ofc

#

if i want to do the same thing twice would i just

#

copy paste the code lmao

fallen tendon
wintry solar
#

🤔 so it changes each time you hover over the card?

fallen tendon
#

no

#

every time i reload the ui screen

wintry solar
#

Even the badge?

fallen tendon
#

yes

#

actually ima test if it does that in actual play

tidal edge
#

me when i suck at like everything

#

gosh how will i o this

gilded narwhal
#

GUYS IM SO GOOD AT PROGRAMMING OH MY GOD

#

I finally did the thing I want :3

dusk shoal
#

thats how it feels

fallen tendon
dusk shoal
#

speaking of doing things, how would i check the current edition of the joker via the joker?

fallen tendon
#

iot does it too in the collecvtion

dusk shoal
#

like check its own edition

fallen tendon
#

the button for the type in the collection changes when reloading

tidal edge
#

all i want is a han that only works if you have a 3 1 an an ace in it

tall wharf
#

i finished localizing but there are some weird stuff i want to work out

#

i tried patching misprint word order but failed spectacularly

frosty dock
#

Also there's no context so no context.other_card in poker hands

edgy reef
#

Quantum ranks someday

#

shorely

tall wharf
#

how do dis with misprint

frosty dock
#

it uses a main_start or main_end I think

tidal edge
frosty dock
#

which is a fully custom UI element so you might need to override it completely using loc_vars/generate_ui

frosty dock
gilded narwhal
#

I'm so happy rn

#

BECAUSE NOW I CAN DO IT WITH ALL THE REST AND IT'LL BE E A S Y

wintry solar
frosty dock
gilded narwhal
wintry solar
#

They should just be decks

gilded narwhal
#

Ehhh I like how it is rn, it's more faithful to TBOI's way of doing it

frosty dock
#

nah that's lowkey cursed

nocturne garnet
gilded narwhal
#

maybe when I learn how to do UI stuff I'll fix that

tidal edge
frosty dock
#

literally just make it a deck-?

#

no need for custom ui

nocturne garnet
#

of the deck desc

nocturne garnet
frosty dock
gilded narwhal
frosty dock
#

hand is just an array of cards

#

you can loop through it and do checks on each card

frosty dock
gilded narwhal
#

I'll get there when I finish the art for all of them trust

wintry solar
#

Unless you’re doing it for every single modded deck it doesn’t look cool

#

It’s just a redundant button on almost every deck select page

fallen tendon
#

also i feel like the tattered button should send you to a wholly different page with tattered versions of all the decks

gilded narwhal
#

I think that's the end goal

#

Because like

#

Would that be too hard to implement

dusk shoal
dusk shoal
#

new screens arent much of a challenge

gilded narwhal
#

I'll try it later 😭

#

I'm gonna focus on getting these T. red reworks working

royal ridge
#

where are the lists of registered enhancements and editions stored?

frosty dock
#

G.P_CENTERS

#

or the respective G.P_CENTER_POOLS I guess

royal ridge
#

...huh

nocturne garnet
#

G.P_CENTERS my beloved....

royal ridge
#

i mean it makes sense lmao

frosty dock
#

G.P_CENTER_POOLS.Edition or Enhanced

nocturne garnet
#

i hate that its not G.P_CENTER_POOLS.Enhancement

royal ridge
#

was just confused on how those collective smods tables existed for some objects and not others

#

ty

frosty dock
wintry solar
#

I wish seals were a center

#

Curse you think

frosty dock
#

they don't need to, the base game doesn't have them either. it just has pools

frosty dock
#

centers don't stack

#

so no enhanced cards with seals no more

fallen tendon
#

do you guys know exactly when the game overlays the seal sprite onto the normal card sprite?

frosty dock
#

somewhere in Card.draw 🙄

wintry solar
#

Editions and enhancements stack though

dusk shoal
#

got this crash after deleting the card, aka removing it from deck

#

remove_from_deck = function(self, card, from_debuff)
SMODS.create_card({
set = 'Joker',
key = 'you_idiot',
skip_materialize = true
})

#

i dont exactly know what it means by center

#

i assume thats meant to be a variable

#

in the table

frosty dock
faint yacht
#

I think you're supposed to use the full key, complete with the mod prefix.

dusk shoal
#

ohh so like

frosty dock
#

I can't pretend now I don't think that's also cursed

frosty dock
dusk shoal
#

ty !

frosty dock
#

where prefix is your mod prefix

dusk shoal
#

mhm

#

key = j_prefix_you idiot specifically

#

is that a string?

faint yacht
#

Yes.

dusk shoal
#

kk thanks !

wintry solar
#

The entire way seals are stored is cursed tbf

#

Base game ofc

edgy reef
#

Not worse than stickers.

#

They straight up don't exist anywhere

wintry solar
#

Stickers are also bad

faint yacht
#

Assuming I access values of a given instance of the first Joker card held (specifically the config) via G.jokers.cards[1].children.center.config?

dusk shoal
#

UH OH.

#

I JUST

#

IT CREATED THE JOKER LIKE I WANTED

frosty dock
#

yeah stickers are even more cursed

dusk shoal
#

BUT I FORGOT TO PUT IT IN THE JOKER SPACE

#

SO NOW ITS JUST ON MY SCREEN

wintry solar
#

Getting stickers to work with textures was a chore

#

Like the floating sprite on the soul

dusk shoal
#

i just had a wonderful idea.

frosty dock
#

if you replace children with config that should work

#

any reason you can't use the card's ability though?

dusk shoal
#

one of these things is not like the other

frosty dock
#

yeah you need to do some other things with the card it returns

dusk shoal
#

yea yea i know ! the area i think right

#

area = g.jokers

frosty dock
#

specifically you should call add_to_deck on it and emplace it into G.jokers

faint yacht
dusk shoal
#

yeye

frosty dock
#
local _card = SMODS.create_card(...)
_card:add_to_deck()
G.jokers:emplace(_card)

I think that's all?

dusk shoal
#

in add_to_deck, right?

#

or was that in remove_from_deck

fallen tendon
#

actually i have an idea

frosty dock
fallen tendon
#

can you apply stickers to playing cards?

frosty dock
dusk shoal
#

mhm

frosty dock
fallen tendon
#

yesssss

frosty dock
# dusk shoal mhm

though you should maybe rule out from_debuff, remove_from_deck also gets called when your joker gets debuffed

dusk shoal
#

ohhh i see

#

yeah i just used a template lol

#
        SMODS.create_card({
          set = 'Joker',
          key = 'j_melon_you_idiot',
          skip_materialize = true
        })
        local _card = SMODS.create_card(...),
        _card:add_to_deck(),
        G.jokers:emplace(_card)
      end```
#

just gonna double check that this is good

#

though i might be

#

compeltely wrong lmao

#

im like super good at following instructions as long as the instructions are very carefully planned out haha

nocturne garnet
#

see what happens

dusk shoal
#

fair point

dusk shoal
#

no yeah i imagined not

frosty dock
#

I thought it was implied you actually put the args you already had in place of my ...

#

like that's clearly a placeholder, it just happens to be valid syntax too

dusk shoal
#

no yeah now it is really clearly obvious

#

im just a little dumb

fallen tendon
#

how do i fix the big fat error

frosty dock
#

uh is that a mod badge

fallen tendon
#

no

#

thats the red stud badge

#

also, how does the calculate function work on playing cards?

#

for stickers

frosty dock
fallen tendon
frosty dock
fallen tendon
#

i need a version that works similarly to the enhanceent one

elder vapor
dusk shoal
#

alright completely rewrote it and it works !

elder vapor
#

@fallen tendon

-- Sticker compatability for playing cards (from Cryptid)
local ec = eval_card
function eval_card(card, context)
    local ret = ec(card, context)
    
    if card.area == G.hand or card.area == G.play or card.area == G.discard or card.area == G.deck then
        for k, v in pairs(SMODS.Stickers) do
            if card.ability[k] and v.calculate and type(v.calculate) == "function" then
                context.from_playing_card = true
                context.ret = ret
                v:calculate(card, context)
            end
        end
    end

    return ret
end
#

in the SMODS.Sticker() register you can add a calculate function with args self, card, context

frosty dock
#

SMODS.Sticker calculate in base steamodded only works on jokers though

gilded narwhal
#

Hey gang, I have a few ideas for how to rework mystic summit to be balanced around Tattered Red deck (Hands/discards don't get replenished, but they can be gained through various actions). Which do y'all like the most?

elder vapor
#

which is why you have to hook eval_card to add playing cards with stickers

dusk shoal
#

okay so, the problem with the card is that its supposed to add 2 of itself when you remove it, but it will add 2 despite the joker slots

#

what variable would be the amount of space in your joker area?

#

i assume g.game. something or other

frosty dock
#

G.jokers.config.card_limit iirc

#

whereas amount of cards is #G.jokers.cards

dusk shoal
#

okay, i understand #G.jokers.cards easily enough, its how many jokers you have

night pagoda
#

wasn't there a setting for the soul jokers that'd enable shared shaders for the soul? (for ex. if the base has foil, the soul also renders it)

dusk shoal
#

but how exactly does G.jokers.config.card_limit work? like, how would a joker use that ?

#

probably easy to just make it if #g.jokers.cards is 4, only create 1 blah blah blah but i still would like to know

frosty dock
#

you can compare the two and stop creating cards if they're equal

dusk shoal
#

OHH I SEE

#

thanks!!

thorny adder
#

Isnt x3 mult when 0 discard just sunset

gilded narwhal
#

dusk?

thorny adder
gilded narwhal
#

That's retriggering cards on last hand

thorny adder
#

Oh no its retrigers

#

My bad

faint yacht
#

Can I have an extra config (that's not accessible via card.ability) for a Joker that is separate?

gilded narwhal
#

Acrobat is x3 mult on last hand

thorny adder
#

So its a better accrobat

#

Basically

gilded narwhal
#

Well

#

When you have 32 discards and replenishing hands isn't a given then it's pretty much only relevant in end-game

#

I think I might do the first one because that's more in line with how I reworked dusk and acrobat

#

Unless people really want the third one

frosty dock
#

new util func

dusk shoal
#

whats the context for using a consumable?

#

and is there like a list of contexts to make it so i dont have to ask questions so much lol

frosty dock
#

context.using_consumeable

dusk shoal
#

thx!!

frosty dock
#

and yes

#

also no that is not a spelling mistake

#

it's actually consumeable

dusk shoal
#

OHH i seee

#

oh my god

#

thats awesome localthunk

frosty dock
#

i mean i guess i should say it's not a spelling mistake on my part

dusk shoal
#

RIGHT i remember this list i just. forgot about it lol

bold sleet
#

Hello, quick question: How can I make so a joker chooses between an interval of 2 numbers randomly?

rough furnace
frosty dock
#

checking this previously had some non-obvious boilerplate so people weren't doing it correctly

rough furnace
#

whats the behaviour if multiple mods provide the id

frosty dock
#

now that provides is fully functional, even that isn't fully correct anymore

rough furnace
#

or there is the mod and the provide

frosty dock
#

find_mod will give you each mod that provides the ID

#

potentially multiple times if you provide different versions

rough furnace
#

oh neat

frosty dock
#

provides got an extra table SMODS.provided_mods that store them per-id with reference to the providing mod

#

i.e. each SMODS.provided_mods[id] is an array of tables with a version and a mod

gilded narwhal
#

Hey guys how does the juice_card_until thing work?

frosty dock
#

pseudorandom(seed, min, max)

bold sleet
#

Thanks you.

gilded narwhal
#

Like I know this is definitely not correct

frosty dock
gilded narwhal
#

Hmmm, that juices the card only after it activates for the first time hold on

#

And it also juices multiple times per hand

bold sleet
frosty dock
hidden timber
#

@frosty dock how is the multiplayer mod for balatro looking so far?

bold sleet
#

0.75 and 1.5

frosty dock
frosty dock
bold sleet
#

god dammit

frosty dock
#

pretty easy to get around depending on the precision you want

bold sleet
#

Just multiply by like 100 and then divide

#

Shouldn't be too hard.

frosty dock
#

mhm

dusk shoal
#

trying to put echo chamber from TBOI into the game, and im trying to make it so basically every card has a chance to be the fool

#
      end,
      calculate = function(self, card, context)
        if context.using_consumeable then
          if G.GAME.echo == nil then 
            G.GAME.echo = context.consumeable
          else
            if pseudorandom('echo_chamber') < G.GAME.probabilities.normal / card.ability.extra.odds then
            local card = (G.GAME.echo)
            card:add_to_deck()
            G.consumeables:emplace(card)
          end```
#

but it just doesnt give the card

#

actually i may have an idea

#

ok nvm the idea didnt work

#
            G.GAME.echo = {card = context.consumeable}
          else
            if pseudorandom('echo_chamber') < G.GAME.probabilities.normal / card.ability.extra.odds then
            G.GAME.echo.card:add_to_deck()
            G.consumeables:emplace(G.GAME.echo.card)```
#

im using oops all 6s to make sure it activates

tidal ice
#

not sure whats goin on here, its not doin anything

#

do I need context.individual or no

frosty dock
tidal ice
#

wait did steammodded just update

frosty dock
#

you can just use SMODS.OPENED_BOOSTER for this, it's the card of the booster pack that was opened

frosty dock
tidal ice
#

cool

frosty dock
tidal ice
#

ohhhh

#

yeah that makes a lot of sense

gilded narwhal
tidal ice
#

neato

rough furnace
#

c_base

gilded narwhal
#

Hey where are the G.STATES listed?

rough furnace
#

that is the list of them

scenic sphinx
gilded narwhal
#

I mean if it worked like normal than if you got it early then you're getting $60+ every hand

#

So I just have it fixed at 8

scenic sphinx
#

anyone have a good guide on mod making?

arctic lion
#

depends how experienced you are

scenic sphinx
#

ik a good bit about coding ig

#

i just need a good base to start

arctic lion
scenic sphinx
#

thats how to install it lol

arctic lion
#

on the side

scenic sphinx
#

ahh sorry mb lol

dreamy kindle
#

hi im simply looking to make it to where it plays a sound effect depending on what hand you play (like in Poker Night at the Inventory)

arctic lion
#

then just do an if statement based on the hand return true

dreamy kindle
#

alright

gilded narwhal
#

I'm confused, why does the crash say that ability is nil when I've defined them in set_ability

bold sleet
#

Help, how do I give color to the text and background badge thing?

gilded narwhal
#

Oops

#

Like it works fine when I do it here

#

And why does it still add mult when I've made calculate be xmult

#

How do I override it

tidal ice
bold sleet
#

Alright.

tidal ice
#

OH wait the badge shit, its related to the json file to your mod

bold sleet
#

Not that one.

#

Just like this one.

tidal ice
#

anyways, idk how to get this workin
yes I've done function Card:is_suit(suit, bypass_debuff, flush_calc) aswell but it did nothing

#

do I have to do card.base.suit instead actually?

frosty dock
tidal ice
#

alright good to know

frosty dock
#

if it still crashes, show the new crash pls

tidal ice
#

ill try this again

#

no crash, simply does nothing and does not allow me to play a flush with diamonds and spades

bold sleet
tidal ice
#

if you're talking about the badge that has a white bg and white text

gilded narwhal
#
            set_ability = function(self, card)
                if G.GAME.selected_back.effect.config.ttr_red then
                    card.ability.extra.mult = nil
                    card.ability.extra.Xmult = 4
                    card.ability.extra.d_remaining = 0
                end
            end,
            calculate = function(card, context)
                if G.GAME.selected_back.effect.config.ttr_red then
                    if context.joker_main and G.GAME.current_round.discards_left == card.ability.extra.d_remaining then
                        return{
                            message = localize{type='variable',key='a_xmult',vars={card.ability.extra.Xmult}},
                            Xmult_mod = card.ability.extra.Xmult
                        }
                    end
                end
            end,
            loc_vars = function(self, card)
                if G.GAME.selected_back.effect.config.ttr_red then 
                    return {key = 'j_mystic_summit_red'}
                end
            end,
            unlocked = true,
            discovered = true,
        })```
bold sleet
#

It is not tied to the mod badge thing.

tidal ice
bold sleet
#

I know because I have it set with other colors.

gilded narwhal
#

Like it just gives +nil mult now which isn't helpful

tidal ice
frosty dock
tidal ice
#

alright

frosty dock
gilded narwhal
tidal ice
autumn coral
#

is there an event that triggers when hand downs happen?

#

i need the event that triggers G.GAME.current_round.hands_left to = G.GAME.current_round.hands_left-1

crisp coral
#

hook to ease_hands_played

autumn coral
#

no like i need it in a joker calculate

#

i need it to run like at the end of a hand played, assuming the blind isn't complete

#

rn i have if not context.end_of_round and context.after and not context.repetition then but this is triggering everything minus the return early

#

oh wait

#

context.final_scoring_step?

#

ahhh

#

that does nothing

#

😭

#

oh wait

#

hm

tidal ice
#

making this joker print woo and yeah is the funniest thing actually because it did this when it worked

autumn coral
#

THINK BREAK MENTIONED

#

i think i needed an event (?) i'm trying it