#💻・modding-dev

1 messages · Page 176 of 1

frosty dock
#

to some extent, yes

#

but assuming both change the text as well, they'd have to do so non-destructively for that to make sense

red osprey
#

I was more thinking about other cases

ionic timber
#

how to detect if you are currently choosing a card in a pack instead of using G.state ? (using a custom created booster)

#

or how to add my own pack to G.STATES ?

modern kindle
#

in following the api for smods.pokerhand i still get ui error in the example hand for my poker hand, i even simply copy and pasted the example and it still shows as ui error

is this not the correct way to list it?

    { 'S_K', false }, -- King of Spades, does not score
    { 'S_7', true }, -- 7 of Spades, scores
    { 'D_7', true }, -- 7 of Diamonds, scores
    { 'H_7', true }, -- 7 of Hearts, does not score
    { 'D_3', false } -- 3 of Diamonds, does not score
},```
minor magnet
#

why does this display error?

#

left is localization file, right is my script

wintry solar
#

I believe it needs a specific_vars arg too

vivid solstice
#

how come this code keeps crashing?

    misc = {
        suits_plural = {
            flip_Flowers = 'Flowers'
            }
        suits_singular = {
            flip_Flowers = 'Flower'
            }
        }
    }```
the game says im not closing the bracket on line 3 near where it says "suits_singular"
wintry solar
#

Missing comma

vivid solstice
#

really? i thought a comma was only necessary when putting multiple things inside the brackets

red osprey
#

You are, you have suits_plural and suits_singular in misc

#

Put a comma after the closing bracket of suits_plural

vivid solstice
#

oh, was adding a comma to the wring thing, thanks

red osprey
#

The crash log should tell which line it's found an error in. Generally for this it will be the line right after the place you need to ass a comma to

#

(So in this isntance it should have pointed you to suits_singular)

minor magnet
#

wait

red osprey
#

Make it {} instead of nil

#

Setting it to nil is basically the same as not putting it in

minor magnet
#

still gives error

obtuse silo
#

ok i tried getting the hand to register if a 7 and 10 was in the hand played
didn't work
help me

modern kindle
obtuse silo
#

it's even white
like another type of UI

minor magnet
obtuse silo
#

ah

tepid crow
modern kindle
#

its suppose tos how the example cards for a played poker hand like it does in vanilla

violet void
obtuse silo
tepid crow
minor magnet
modern kindle
# tepid crow can you show your full pokerhand code?
  key = 'blackjack_hand',
  mult = 5,    
  chips = 100, 
  l_mult = 0, 
  l_chips = 0, 
  example = {
    { 'S_A', true },  -- Ace of Spades (Scoring)
    { 'H_K', true },  -- King of Hearts (Scoring)
    { 'D_9', false }, -- 9 of Diamonds, scores
    { 'H_6', false }, -- 6 of Hearts, does not score
    { 'D_3', false } -- 3 of Diamonds, does not score
},
  loc_txt = {
      name = "Blackjack",
      description = "A hand where the sum of card values equals {C:attention}21{}."
  },

  evaluate = function(parts, hand)
      local total_value = 0
      local ace_count = 0
      local scoring_cards = {}

      -- **Step 1: Calculate total value with Aces as 11 initially**
      for _, card in ipairs(hand) do
          local rank = card:get_id()  

          if rank == 14 then  -- **Ace**
              total_value = total_value + 11  -- Assume Ace is 11 initially
              ace_count = ace_count + 1
          elseif rank >= 11 and rank <= 13 then  -- **Face Cards (J, Q, K)**
              total_value = total_value + 10
          else  
              total_value = total_value + rank
          end

          table.insert(scoring_cards, card) 
      end


      while total_value > 21 and ace_count > 0 do
          total_value = total_value - 10  -- Convert an Ace from 11 to 1
          ace_count = ace_count - 1
      end


      if total_value == 21 then
          return { scoring_cards }  
      end

      return {}  -- No valid Blackjack
  end
}
obtuse silo
violet void
modern kindle
#

everything else about it works, just simply the display does not

tepid crow
wintry solar
#

Where are you adding the loc txt?

#

The actual description definition

minor magnet
#

inside en-us.lua in the root mod folder, ill try adding a localization folder and update you

wintry solar
#

It needs to be in the folder yes

modern kindle
wintry solar
#

<@&1133519078540185692>

minor magnet
#

<@&1133519078540185692>

modern kindle
#

oh wait nevermind, i didnt restart my run, im clear

keen gorge
#

🔫

tepid crow
#

lmao how many pings did you guys get

karmic creek
#

a BUNCH

#

and gluk too fast off the mark beat me by a country mile

tepid crow
#

🫡

wintry solar
#

It’s hard to ping on mobile I have to scroll to the bottom of the list

obtuse silo
#

this isn't working
my leading theory is that when it scores each card, the rank checks reset back to false
and since a card cannot be 7 and 10 at the same time, it never triggers

wintry solar
#

You’re returning values that aren’t things

#

You can do all this in joker main too

#

And use local flags when you find the correct ranks

minor magnet
#

IT FINALLY WORKS

manic rune
#

wow thats really good

minor magnet
#

now for the important matters

#

do i call it "Unleashed Ability", "True Potential" or something else entirely?

normal crest
#

unleashed ability is fine

manic rune
#

i think unleashed ability is cool enough

normal crest
#

You should move the "of" to the second line and add "the" after it

violet void
wintry solar
#

You should probably add true as a third arg in take ownership too

#

It’ll remove the mod badge

obtuse silo
# wintry solar You can do all this in joker main too

so i removed the "return" brackets and made them simple flags

        local hasSeven = false
        local hasTen = false
        if context.individual and context.cardarea == G.play then
            if context.other_card:get_id() == 7 then
                    hasSeven = true
            end
            if context.other_card:get_id() == 10 then
                    hasTen = true
            end
        end
        if context.joker_main then
            if hasSeven == true and hasTen == true then
                return{
                    xmult = card.ability.extra.xmult
                }                
            end
        end
    end
}```
still nothing
but are you suggesting that i can take all the code starting from `if context.individual and...` and put it in `if context.joker_main then`?
wintry solar
#

It would need slightly adjusting, but yes

manic rune
#

it can replace the "#1#" part now

minor magnet
wintry solar
#

After the table

#

So it’d go }, true)

obtuse silo
minor magnet
wintry solar
minor magnet
obtuse silo
wintry solar
minor magnet
wintry solar
#

I don’t think that will be the reason of the crash though, silent take ownership has been a thing for ages

minor magnet
#

using new smods doesn't fix it

wintry solar
#

Are you reloading a save perchance?

minor magnet
#

the crash happens as i load the game

obtuse silo
wintry solar
#

Oh I think it’s crashing in your loc file?

glad osprey
#

luke pickman music pack coming soon ™️

wintry solar
#

And it’s not context.scored

minor magnet
manic rune
#

rq, what happens if i use tonumber("abc")?

obtuse silo
#

what would be the correct context?

wintry solar
#

These are your values inside the joker main context

hardy viper
manic rune
#

epic, thanks

obtuse silo
#

gotta be somewhere
i'll leave this error message from playing any hand

#

maybe it's because i'm writing context.val instead of just val?

normal crest
#

What's your code exactly

minor magnet
normal crest
#

Need to localize

minor magnet
vocal verge
#

pretty sure that's supposed to be m_lucky in the code

#

unless this is another localthunk moment

minor magnet
#

ye it is m_lucky in the code im just trying to take ownership and it lost localization

normal crest
#

Try finding how the base game does the localization

edgy mountain
#

how do i detect if the card being bought is a consumable?

maiden phoenix
#

the context buying_card comes with context.card which is the bought card, could check its content

manic rune
#

another function i made

glad osprey
manic rune
#

dawg 😭

glad osprey
#

steamuconmmunity

#

at local thunk smite this sinner

manic rune
#

mods, kill him

#

🗣️

storm kraken
#

read steamu like temu am i cooked

manic rune
# manic rune

i can probably add a table to my function, so it knows what else to color too

autumn coral
#

how do i take ownership of the default names of hands to change them in steamodded

#

i'm doing something really stupid instead of working on my mod

#

is it really as easy as just writing it into the localization lmao

#

Guess not

maiden phoenix
#

There's a bunch of small mod who did it, like the one that replaces Straight by Gay

autumn coral
#

FUCK SOMEONE ALREADY HAD MY IDEA

#

CRYING

#

😭😭

maiden river
hardy viper
#

there was the balamod version which got ported to steamodded
so that's two if we're being generous
then #1324037115171831819 does it

#

hivemind fr

autumn coral
#

crying

hardy viper
#

i think skyline wanted to do that aswell

autumn coral
#

btw i exist in here again

#

i got back into balatro

hardy viper
#

gg

#

i can't leave the 98% would be clueless

main mica
#

does smods change the way rarity weights are handled?
I want to make it so the shop can only have rares in it

manic rune
#

cryptid has a deck which maybe does that (the one which makes everything has an equal chance of spawning, im pretty sure it changes rarity weight, idk)

maiden river
surreal kernel
#

Hello! Me again asking how to add smods for vscode to detect the variables cause I have it in my workspace and it doesn't work

normal crest
#

assuming you're using the Lua extension ofc

surreal kernel
#

Sorry pretty new to programming, where and how do I add this?

#

I create a .vscode/settings.json and add it there?

normal crest
#

Mods/your mod name/.vscode/settings.json

surreal kernel
#

👌

normal crest
#

I put smods there, but maybe your smods mod folder has a different name

old bane
#

how would i destroy a random card held in my hand (not in the played hand)?

surreal kernel
#

Like this?

normal crest
#

that looks correct

#

Do you get autocompletions when typing SMODS. in your code

surreal kernel
#

No

normal crest
#

Do you have the lua extension installed

surreal kernel
#

I do have it

#

got these 4

normal crest
#

Weird

#

Idk it's working for me just fine

#

Try adding the ../lovely/dump one

surreal kernel
#

Ah wait I do get it

#

But it has a squiggly line

#

And says that+

normal crest
#

Like, have both at once

surreal kernel
#

What does ../ mean? Is it that it's supposed to be in the same folder?

#

Cause maybe it's that

normal crest
#

../ means going up a folder

surreal kernel
#

Ah ok

normal crest
#

so it should access the Mods folder

surreal kernel
#

Ok that's the problem, I don't have it in the mod folder

normal crest
#

What's in your mods folder

surreal kernel
#

a bunch of mods

#

But I mean

#

I don't have the one I'm doing on the mods folder

normal crest
#

Oh

#

You should

#

Or I guess if you don't want to

#

you can copy the full path

#

and paste it instead of ../smods

surreal kernel
#

Will try

#

Hmmm like this?

#

Still the same error

#

Let me try putting it in the mods folder

frosty dock
#

I just have my full mods folder in my workspace jimbo_spin

surreal kernel
#

Yeah I added the whole mod folder just now

#

Including the one I'm making

#

Still getting the same error

#

Ah wait no

#

Now it works

#

Still shows squiggly line though

normal crest
#

What'd you end up putting in the settings.json?

surreal kernel
normal crest
#

Hmmmm

#

That seems to be an undefined variable from another extension

#

luacheck

surreal kernel
#

ahh

normal crest
#

I'm not familiar with it so I wouldn't be able to tell you how to set that one up too

surreal kernel
#

Ok extension yeeted

normal crest
#

and they wouldn't make sense if you have them disabled ingame

young dew
#

i only did patches for that

# banana image scaling, part 1/2
[[patches]]
[patches.pattern]
target = "card.lua"
match_indent = true
pattern = "if center.name == \"Wee Joker\" and (center.discovered or self.bypass_discovery_center) then"
position = "before"
payload = '''
if center.name == 'banana' and (center.discovered or self.bypass_discovery_center) then
    H = H*0.5
    W = W*0.5
    self.T.h = H
    self.T.w = W
end
'''

# banana image scaling, part 2/2
[[patches]]
[patches.pattern]
target = "card.lua"
match_indent = true
pattern = "elseif self.config.center.name == \"Wee Joker\" then"
position = "before"
payload = '''
elseif self.config.center.name == 'banana' then
    self.T.h = H*scale*0.5*scale
    self.T.w = W*scale*0.5*scale
'''
normal crest
#

you probably need to set self.children.center.scale

frosty dock
#

you don't need to patch that in

normal crest
#

oh that's convenient

#

when was it added

frosty dock
sturdy compass
#

imma bump this rq

frosty dock
frosty dock
#

not sure if that necessarily makes a difference, you could check what cryptid does though

young dew
#

the size changed though

sturdy compass
surreal kernel
#

How do I check what a card's ID is?

glass scaffold
surreal kernel
#

Ok, rephrasing, how do I make it a specific card? I wanna do 7 of diamonds

manic rune
#

automatic description 🗣️

old bane
#

how would i check if a joker is a specific joker by key? i'm trying to make a joker like joker stencil that boosts when another "joker stencil" is in play

manic rune
red flower
obtuse silo
old bane
#

i see

normal crest
vivid solstice
#

ive got this code to add the names and descriptions to the cards but when I check the game it turns blank what am I doing wrong?

    descriptions = {
        Tarot = {
            flip_flip_t = {
                name = 'The Flip',
                text = {
                    'Flips 3 selected cards in your hand',
                    'into their flipped suit',
                        },
                    },
                },```
normal crest
#

Needs the c_ at the start

#

So c_flip_flip_t

vivid solstice
#

would that be the same for all consumables?

normal crest
#

Yes

vivid solstice
#

thanks

surreal kernel
#

SMODS.Joker { key = 'sietedeoros', loc_txt = { name = '7 de oros', text = { "Each played {C:attention}7{} of {C:diamonds}Diamonds{}", "gives {X:mult,C:white} X#1# {} Mult" } }, config = { extra = { Xmult = 2} }, rarity = 1, atlas = 'BarajaEspaniolaJokers', pos = { x = 1, y = 1 }, cost = 4, loc_vars = function(self, info_queue, card) return { vars = { card.ability.extra.Xmult } } end, calculate = function(self, card, context) if context.individual and context.cardarea == G.play then if context.other_card:get_id() == 7 then return { Xmult_mod = card.ability.extra.Xmult, card = context.other_card } end end end }

#

Trying to make a joker make 7 of diamonds give x2 mult

#

I'm copying walkie talkie from the examples

#

But can't get it to work on any 7

#

Let alone on specific ones xD

normal crest
#

put x_mult instead of Xmult_mod

frosty dock
#

Xmult_mod always requires a message due to vanilla behavior

faint yacht
#

...so I have a table of sounds that I want to look for. Would it not be like this?

local sfxtable = {'chips1', 'multhit1', 'multhit2', 'coin3', 'generic1', 'foil2'}
if sfxtable['insertinputsfxnamehere'] then ... end
past forge
#

I guess is a pretty mid card just because they are easier ways to make the same amount of money but i dont know how to improve it keeping the theme, ¿any ideas?

normal crest
frosty dock
#

that's what one might call an array

normal crest
#

if you wanted to access it by name you'd need to to local sfxtable = { name = 'something' } etc etc

frosty dock
#

if you want a table representing a set, the values should be the keys

#

local sfxtable = { chips1 = true, multhit1 = true, ... }

past forge
#

i also want to make the "suits changes every round" smaller like the ancient joker does

#

but i dont know how to make that subtitle

frosty dock
#

like {s:0.8}

past forge
#

oh true, scale exists

frosty dock
#

-# (scales by a factor of 0.8, tweak as needed)

past forge
#

lmao

#

thanks

frosty dock
#

-# now it's also a subtitle

faint yacht
#

local sfxtable = { 'chips1' = true, 'multhit1' = true, 'multhit2' = true, ... }, ya?

frosty dock
#

that's not what I said

normal crest
#

without the ' around the names

#

that was just a mistake on my example that i edited to fix

frosty dock
#

either chips1 = true or ['chips1'] = true

#

you may need the latter for keys that are not valid identifiers

past forge
#

(forgot the decimal point)

frosty dock
#

Almanac descriptions be like

tepid crow
#

lmao

old bane
manic rune
#

"i still cant read anything", she says ✍️

obtuse silo
#

nice.

faint yacht
#

Definitely better being tame instead of outright replacing all sound calls with the click.

surreal kernel
#

if card.is_suit('Diamonds') and card.base.value == '7' then
Trying to detect if it's a 7 of diamonds with this, is this correct? Assuming not cause I get this crash:

red flower
#

card:is_suit with a colon

vivid solstice
#

where can you find the vanilla code for consumables in the game files?

surreal kernel
normal crest
#

what's your code

old bane
#

how would i make it so that my custom rarity uses the label i set for it? cause right now it's just ERROR

red flower
surreal kernel
#

Alright managed to make it

#

Thank you for the help

past forge
#

Im trying it to detect if Full house contains a trio of some suit and/or a pair of some suit, but can not think on the logic around it

faint yacht
#

next(poker_hands['Pair'])?

past forge
#

wdym

old bane
#

I wonder if it's possible to make custom behavior to allow Jokers to become gold 🤔

old bane
#

then you can do card:is_suit() for the second part

surreal kernel
#

How do I look at the four fingers code?

past forge
#

ill try it :)

vivid solstice
old bane
past forge
#

just because in card.lua i think four fingers doesnt even have variables

#

thats the only time four fingers shows in card.lua

surreal kernel
#

Seems to be in misc_functions.lua

hardy viper
#

four fingers is implemented in get_straight

#

which smods overwrites

#

so just look at the smods version

#

or don't tbh

#

might be more understandable in vanilla

#

more applicable in smods

#

whatever suits you

past forge
#

hehe

#

suits

#

okey

#

now is there a way to check if all the three cards that take part on this three of a card are of the same suit?

red osprey
#

Is there a way to differentiate cards in the collection display from actual cards in the set_ability method?

past forge
#

the three of a card is inside a Full house so checking if there are three cards of the same suit wont work

surreal kernel
past forge
#

two fingers? 🤨

vivid solstice
surreal kernel
#

But that would make it a new hand that wouldn't level with flush right?

past forge
#

i guess the four fingers should what youre looking for, so take a look to the misc.functions.lua there

#

or anything related to four fingers

fallen vigil
#

this crashes if i play any 5 cards that doesnt contain a 6

glass scaffold
#

Anyone know the keybind to hide the console (DebugPlus)?

violet void
#

It should be esc

glass scaffold
#

Not it

violet void
#

weird

past forge
#

its suppose to be "/"

#

but doesnt work for me

spring lantern
#

think bro needs a new hairstyle

#

what should i do

vivid solstice
spring lantern
#

wait thats fire

#

thanks

violet void
#

I couldnt open it either so I had to change the keybind in the mod's folder

past forge
#

i have to do shift+7

tepid crow
#

what kinda keyboard do you guys have that slash is on shift+7

past forge
#

every keyboard that i know is like that

violet void
past forge
#

besides if you have a numpad you can also do it there but most laptops dont have numpads

violet void
tepid crow
#

where are you guys from lmao

past forge
past forge
spring lantern
#

wait same

#

viva españita

violet void
past forge
#

viva

spring lantern
#

yeah spanish keyboards are like wildly different from american ones when it comes to special characters and stuff

#

also i think mullet was the right call so thx

#

added a J tattoo for good measure

violet void
#

Looks like Perkeo kinda

spring lantern
#

oh my god it's perkeo's long lost cousin

#

you're so right

past forge
tepid crow
spring lantern
#

bet he's chill

past forge
violet void
#

ye

past forge
#

and also

#

americans ☕

violet void
#

also the tilde

#

why

spring lantern
#

´

edgy mountain
#

could someone help me with something?
i wanted to make consumables free in the shop but the game's code isnt really helping me understand how it would work

violet void
#

Did you check Astronomer's code

vivid solstice
#

can anyone tell me how to make it so that when you use a tarot card the cards that get selected turn into a certain suit
as in hearts change from one suit to another and clubs change to a different one

vivid solstice
#

where is that in the github?

surreal kernel
#
SMODS.Joker {
    key = 'envido',
    loc_txt = {
        name = 'Envido',
        text = {
            'You can play {C:attention}flush{} with {C:attention}2{} cards. ',
            'If doing so, add {X:mult}Mult{} equal to',
            '{X:mult}#1#{} + sum of ranks',
            'of numbered cards in scoring hand.'
        }
    },
    atlas = 'BarajaEspaniolaJokers',
    pos = {
        x = 0,
        y = 0
    },
    rarity = 1,
    blueprint_compat = false,
    cost = 6,
    config = { extra = { mult = 20, hand_type = 'Flush'} },
    loc_vars = function(self, info_queue, card)
        return { vars = { card.ability.extra.mult, localize(card.ability.extra.hand_type, 'poker_hands') } }
    end,
    calculate = function(self, card, context)
        if context.joker_main and next(context.poker_hands[card.ability.extra.hand_type]) then
            if context.other_card:is_numbered() then
                return {
                    mult_mod = card.ability.extra.mult + context.card:get_id(),
                    card = context.other_card
                }
            end
        end
    end,
}
#

I've got this, getting this crash when playing a flush

vague pendant
#

is it possible to read what badges a card has?

past forge
#

Im trying to do a joker that gives you money at the end of the round, but just found this on the source code, i dont know where or what it references to

vivid solstice
#

would this code be correct?
use(SMODS.change_base('Hearts','Flowers'),('Clubs','Drinks'),('Diamonds','Stars'),('Spades','Shovels'),('Flowers','Hearts'),('Drinks','Clubs'),('Stars','Diamonds'),('Shovels','Spades'))

vivid solstice
vague pendant
tepid crow
#

that's not something you should be calling (in most cases, unless you know what you're doing), that's something you should be defining

frosty dock
#

not to say that this isn't valid syntax and I'm not sure I get what you even think SMODS.change_base does

tepid crow
#

I mean there are some fundamental misunderstandings going on here

vivid solstice
#

maybe giving an example would help explain what im trying to do here
like if you used the card on a spade, a heart and a club, each of them would turn into a diffeent suit from the same card

vague pendant
#
use = function(self, card area, copier)
  -- Get highlighted cards
  for _, c in highlighted_cards do
    assert(SMODS.change_base(c, "Hearts", nil))
  end
end
#

^example of usage

vivid solstice
#

wouldnt that change all the cards to hearts? or am i misunderstanding

frosty dock
#

well for starters highlighted_cards doesn't exist here

vague pendant
#

yeah

frosty dock
#

you'd want something like G.hand.highlighted

vague pendant
#

I'm too lazy to find how to get highlighted cards

frosty dock
#

also you need to wrap that in ipairs because lua

vague pendant
#

u right there. def meant to :P

vivid solstice
#

my code says otherwise
use = function(self, card area, copier)

fading pier
#

my friend is helping me out with the art for my mod. Any thoughts on which one for these 3. I like the white border the most. Joker name - "Devil's Machine" in a reference to earthbound

main mica
#

What's the target path if I want to patch smods /src luas?

#

And also, do the smods scripts run before the lovely patches? what's the order of operations?

edgy mountain
#

so i dont know how to reference the cards in the shop in code i guess is my problem

tepid crow
tepid crow
past forge
edgy mountain
tepid crow
#

cards in general but yes

edgy mountain
stiff locust
#

how do you do info_queue for a modded seal again

manic rune
#

they change the cost of jokers to 0, so i believe that should help

tepid crow
stiff locust
edgy mountain
tepid crow
#

so what's the issue with doing that in the same way astronomer does

stiff locust
#

yeah you can hook the function astronomer does it inside and do it there

#

line 359 in card.lua has the function card:set_cost() which is where the astronomer functionality is

edgy mountain
#

i guess im confused by the use of self there?

stiff locust
#

if (self.ability.set == 'Planet' or (self.ability.set == 'Booster' and self.ability.name:find('Celestial'))) and #find_joker('Astronomer') > 0 then self.cost = 0 end
im pretty sure this is the entire code for that

tepid crow
#

self is the card itself (in the shop)

edgy mountain
#

who actually calls the function set_cost?

stiff locust
#

¯_(ツ)_/¯

#

if it works for astronomer it'll work for you

red flower
#

it gets called in a couple of places when modifying a card i think, to recalculate how much it costs

stiff locust
#

yeah it accounts for editions and stuff

red flower
#

I made a couple of jokers that sets price to free and I just hooked card:set_cost and put self.cost to 0

tepid crow
#

gets called in a lot of random places, but the important one is this one:

function Card:add_to_deck(from_debuff)
        ...
        if self.ability.name == 'Astronomer' then 
            G.E_MANAGER:add_event(Event({func = function()
                for k, v in pairs(G.I.CARD) do
                    if v.set_cost then v:set_cost() end
                end
                return true end }))
        ...
#

so just have an add_to_deck defined that does that
(oh and also in remove_from_deck)*

edgy mountain
#

cause the number has to change for mine

#

it isnt a permanent rule

tepid crow
#

what does that mean

past forge
#

why does the print in 229 gives me the amount of cards scoring instead of the rank of each card scored

manic rune
#

:get_id()

#

i think you use that to get the rank

past forge
edgy mountain
# tepid crow what does that mean

basically at the start you have one free purchase. when you buy something, it is spent.
you regain one purchase every blind (and as a chance when buying anything)

manic rune
#

i think so, yeah

past forge
#

okay, thanks

red flower
stiff locust
#

couldn't it just use the buying_card context

tepid crow
#

could give you the money back on purchasing a card context

edgy mountain
tepid crow
#

could also set all cards money to 0 normally and reset back to normal on purchase-card context

edgy mountain
red flower
#

the buying_card context seems to be called before spending the money so you could do
card.cost = 0

tepid crow
manic rune
#

(aka not debuffed)

past forge
red flower
#

it needs the colon, not .

past forge
#

oh, okay thanks :)

red flower
#

does G.P_SEALS['seal_key'] work?

stray warren
#

That should work

red flower
#

or maybe this badge to key thing

stiff locust
past forge
#

How do i make a joker to jiggle?

#

i know is probably a very dumb question

hushed field
past forge
#

ill elaborate the question a little bit more, so i got the line of code juice_card_until(self, eval, true) from the trading card, how do i set the eval to make it stop jiggling?

tepid crow
#

do you want it to jiggle until a condition or do you just want it to jiggle once

past forge
#

until a condition

tepid crow
#

eval should be a function, make it return false (I think false? might also be true tbh) to stop jiggling

modern kindle
#

where can i see where planet cards are working? i was trying to search up earth as an example but couldnt seem to find it

hushed field
modern kindle
#

affirm, thanks

past forge
#

ive tried a lot of things but the card doesnt want to juice

#

should it be self instead of card?

#

ill try

tepid crow
past forge
#

so this?

normal crest
#

function() return whatever end

past forge
#

okay

paper zealot
# past forge so this?

Something along the lines of

local eval = function() return card.ability.extra.ready and not G.RESET_JIGGLES end
juice_card_until(card, eval, true)
past forge
#

i see

main mica
past forge
#

ill try to work with that

sturdy compass
#

Mmmmmmm that's the good stuff

tepid crow
gaunt thistle
#

^

#

update

main mica
#

Alright, gotcha

paper zealot
# past forge ill try to work with that

Check my example again, i had the result backwards, should be right now. juice_card_until should really be named juice_card_while. It will juice until eval returns false

wintry solar
#

yeah I assumed it juiced until the function returned true at first

red flower
#

same

scarlet spire
#

is there a way to make a card trigger as if it was played in the current hand, even when it wasn't? (via a seal applied to that card)

#

like how steel cards trigger, but instead of X1.5 mult, it's the values of the card itself, including enhancements and editions and such

paper zealot
#

Ah, it's not a class function, my bad.

local eval = function() return card.ability.extra.ready and not G.RESET_JIGGLES end
juice_card_until(card, eval, true)
chrome prawn
past forge
#

but it doesnt work for me

#

one question, why card and not self?

fallen vigil
#

why does this return 3 when i play a 10 instead of 1

normal crest
#

because you haven't specified a context

#

You're just checking the cardarea

fallen vigil
#

what context could i use to make it only check once

past forge
paper zealot
# past forge one question, why card and not self?

Depends where you're calling it from. If you're within the card class, then self refers to the card table object, and you should use that. Otherwise i assumed the card you're working with is card, since you had that in your code

normal crest
#

Any, just depends on when you want it to happen

normal crest
past forge
normal crest
#

And since you're not filtering one, it's executing for all three

fallen vigil
#

is it like checking before during and after

past forge
#

you can check the contexts here

normal crest
#

context.before and context.after are two of them

#

Before is before hand is scored, after is after

fallen vigil
#

thank you for the help

past forge
#

it depends on what you want to do

#

if you want the ability to scale before the joker triggers, use context.before, if you want it to scale after, use context.after

dire palm
#

Is there a way to make the game recalculate the scoring hand during context.before?

#

My joker turns non-scoring cards into Stone cards and I wonder if I can make them score too.

past forge
modern kindle
#

ive got most of my shit workin, but when a planet card levels up, how does it display that on the ui? i cant seem to make the ui reflect the levelling changes

#

is itt he generate ui im looking for in the smods api?

dire palm
past forge
#

Im trying to do a joker that gives you money at the end of the round, but just found this on the source code, i dont know where or what it references to

#

i dont even now what context to use, because i guess context.end_of_round if for before the cashout tab appears

vivid solstice
#

huh, there is an example mod with an end of round money joker in there if i can find the link so that should help

main mica
#

Trying to have a global variable referencing a specific card, but if I quit to main menu and come back the variable messes up to the the card now being "gone" per se, what's the proper way to reference a specific card?

random sleet
#

youll have to save it to the save file

#

and then somehow figure out which card it was again on load

main mica
#

Hmph, alright, thank you!

random sleet
#

id recommend using a variable on the card itself

main mica
#

!

chrome prawn
# chrome prawn

I've been trying to make this work for a while can someone please help me?

main mica
random sleet
#

and then modifying the Card:save() and Card:load() functions to keep that marker

main mica
#

Nice ^^

random sleet
#

(if needed, depends how you do it)

main mica
#

Can't I just put it in it's ability?

random sleet
#

probably*

#

*: subject to jank and confusion

modern kindle
#

what is it i need to mess with to make it so i can play more than 5 cards?
im able to select the 6, but then it just greys out the bar

past forge
#

i wonder if there is a way to make the text italic

chrome prawn
#

I tried this when I got home and it didn't work

#

idk if I'm doing something wrong

surreal kernel
#
    config = { extra = { Xmult = 4 } },
    loc_vars = function(self, info_queue, card)
        return { vars = { card.ability.extra.Xmult } }
    end,
    calculate = function(self, card, context)
        if context.joker_main then
            if next(context.poker_hands['High Card']) then
                if card:get_id() == 14 or card:get_id() == 7 or card:get_id() == 3 or card:get_id() == 2 then
                    return {
                        message = localize { type = 'variable', key = 'a_xmult', vars = { card.ability.extra.Xmult } },
                        Xmult_mod = card.ability.extra.Xmult
                    }
                end
            end
        end
    end

Trying to make a joker trigger when it's both a high card and a specific card but can't seem to get what I need in the 3rd if

vivid solstice
#

trying to make it so that the 4 new suits dont appear in a regular deck but it keeps crashing

end```
old bane
#

does find_joker() find a joker by key or by name

normal crest
#

And they look by key (correction: find_joker doesn't look by key)

open aspen
#

are there any more structured guides for how to create a simple mod from scratch

#

im finding the steammodded documentation hard to find my way around

old bane
#

cause rn i'm trying to make it so that when a certain joker is present glass cards do not shatter at all

normal crest
#

no, don't use find_joker

old bane
#

okay

#

okay for some reason my lovely patch isn't finding the line i want to inject into even though i literally copied it from the file >_<

tepid crow
normal crest
#

Mods/lovely/dump

old bane
#

would i be able to do a lovely patch on SMODS? because SMODS overrides how the game normally calculates which glass cards to shatter and puts it in a different file

fervent comet
#

ahoy just wondering if it would be possible to create a joker that destroys the joker to the right even if its placed in the last joker slot

#

so it would wrap around, destroying the first joker

old bane
scarlet spire
normal crest
#

I don't know the specifics tho

vivid solstice
normal crest
scarlet spire
#

I don't mean scoring when it should be unscoring like a stone card, I mean scoring if you even have it in your hand, like a steel card (except instead of a specific X1.5 mult, it's just whatever the card is)

#

the brute force method is to just grab every possible variable from the card the seal belongs to and return it under if context.cardarea == G.hand and context.main_scoring but I really don't want to have to manually tell it what to do for every single enhancement

vivid solstice
#

id look at shoot the moon's code then, use that as a template alongside baron and steal cards

#

the queen +13 mult joker

runic pecan
#

How to decide if a string should be k_ or ph_ in localization file?

scarlet spire
#

these are extremely different, they're just looking for specific ranks in your hand and giving +13/X1.5 mult when they're calculated
the issue I'm trying to figure out is how to make a card calculating from your hand have the same effect it would when being played

vivid solstice
#

seems like you would have to make a whole new event for that which im not very experienced at,
but you should find something in the steammodded github guides

tepid crow
runic pecan
chrome prawn
#

does anyone know how I would get the value for the amount of a specific type of suit in your deck?

#

e.c. like the amount of hearts in your deck

snow valve
#

I want to reference this global variable but can't find what class it belongs to to put in place of ".C." if anyone knows off the top of their head that would be wonderful

runic pecan
tepid crow
runic pecan
bitter gazelle
#

why does my game crash whenever i try to add my modded joker? the joker preview in the mod menu looks fine, and adding the vanila jokers work too.

runic pecan
normal crest
#

you can do SMODS.add_card { key = 'j_para_the_train' }

normal crest
sturdy compass
normal crest
#

the crash log mentions add_card which you didn't use

bitter gazelle
#

i did save it

normal crest
bitter gazelle
#

oh wait its add_card not SMODS.add_card

runic pecan
#

So you coded add_joker, yet the game thought you called add_card...

bitter gazelle
#

hold on brb

normal crest
#

did you accidentally use add_card by itself

bitter gazelle
#

yeah

#

changed it back

#

im so dumb bro

old bane
#

finally got the legendaries to pop out :D

snow valve
#

I was just trying to figure out the correct syntax to reference the global variable in my files (sometimes it's G.JOKER, sometimes it's G.C. etc...) but I figured it out

#

Just called a different context that does the same thing

glad osprey
nova finch
#

Is there a way to make a joker that can toggle between two different sprites?

runic pecan
sturdy compass
nova finch
runic pecan
stiff locust
#

alright chat how do I add permanent +mult/xmult/xchips to playing cards

#

i remember it requiring a lovely patch and some other stuff

#

but I don't know how to do this in a way that doesn't conflict with other mods
-# i mean i don't know how to do it in general

red flower
#

maybe this can help?

lavish latch
#

how hard is modding this game? i wanna add in GUI's to replace the current system of sliding cards

gaunt thistle
#

modding isn't that hard but UI mods are

#

the UI system in the game takes time to wrap your head around

marble flint
#

UIs are a PITA to implement just in general, not only in balatro

lavish latch
#

still gonna be worth it since me and my friend keep ending up with 40+ jokers and i normally end up with ~200 during my modded runs

marble flint
#

Check out Cartomancer, which might cover what you need

lavish latch
#

its also to give me something to do while someone else is working on that performance uncap mod

lavish latch
#

tho tbh i think making a game that works in lua in the first place was an interesting decision

marble flint
#

it's a very good decision for something like this

#

rapid prototyping is one of the most valuable things you can do, along with staying flexible for future changes

#

löve2d does that fantastically

wooden nexus
#

Hey, does anyone know how to make a deck load multiple of the same card?

#

I want the deck to have the proper amount of "Tiles"

#

Yes, I know there's missing ranks and the honor tiles from my deck, but i have yet to figure out how to add additional copies

lavish latch
marble flint
#

:pain:

nocturne garnet
#

cryptid doesnt work on newcalc...

lavish latch
#

old calc

nocturne garnet
#

dang

lavish latch
#

i was playing cryptid like 15 minutes ago

tall wharf
#

😭 Aotenjo

tall wharf
modern kindle
exotic hedge
stiff locust
#

no that's zoroark

#

is that how you spell it

marble flint
#

tl; don't rember: there's a function to update that text until it changes again later

modern kindle
stiff locust
# modern kindle speaking of ui, gonna bump this in case you guys know the answer

i did it with this code

update_hand_text({ sound = 'button', volume = 0.7, pitch = 0.8, delay = 0.3 },
                        {
                            handname = localize(_hand, 'poker_hands'),
                            chips = G.GAME.hands[_hand].chips,
                            mult = G.GAME
                                .hands[_hand].mult,
                            level = G.GAME.hands[_hand].level
                        })
                    level_up_hand(context.blueprint_card or card, _hand, nil, 1)
                    update_hand_text({ sound = 'button', volume = 0.7, pitch = 1.1, delay = 0 },
                        { mult = 0, chips = 0, handname = '', level = '' })

_hand is the hand you're levelling up

#

try that

#

this also includes whatever it is that actually levels up the hand

old bane
stiff locust
#

I have no idea how any of this works, but it works

modern kindle
#

Much obliged, I'll test it soon, laid down for the day
Thanks a ton for your assistance

old bane
#

also how do i make stickers not like be tiny asf and determine their location

stiff locust
#

they're sprites

#

wait stickers not seals

#

uhhh

#

¯_(ツ)_/¯

sturdy compass
#

How would I check if the boss blind is a showdown boss? I've tried this method but no dice

stiff locust
#

just check if the ante number is divisible by 8

#

unless you're using bonus blinds, they only appear on intervals of 8 antes

sturdy compass
stiff locust
#

it'd be great to just have it be a dependency and have that be the end of it

but amm has a bunch of other extra stuff that i don't want

#

it'd be nice to have a library mod that literally just adds perma bonus mult, xmult, xchips and nothing else

tall wharf
plush cove
edgy reef
stiff locust
#

i feel like i dont undestand what library means in the context that it's not a "library mod" and is instead a "library"

#

whatever it is, it'd be nice to have a library that does that

#

or for smods to just have it

#

if that doesn't exist already can someone do it

plush cove
#

heya, what would be the best way to make a Joker where if you sell it, all probabilities are guaranteed for the rest of the round?

random sleet
#

also wouldnt it be swell if i could add things to smods

#

but thats not the world we live in

#

so tough luck

#

i guess i could try to set something up like smods' optional settings for amm

#

that way it disables irrelevant parts of the mod

#

which is all of it lmao

frosty dock
plush cove
paper zealot
frosty dock
normal crest
#

Can you add the mod badge to stickers

#

Nvm I got it

#

Weird that it's not a thing in smods

sturdy compass
fallen vigil
#

i want blueprints to also set redox to +1 how would i do that

rose dragon
#

does this need rebalancing?

red osprey
#

That's something only testing can tell I think

#

The concept is very cool though, and you have two easy levers to pull to make this more or less powerful

rose dragon
#

i made a few changes to it to combat skipping

red osprey
#

Hmm

#

Not sure I like it but I understand why it's there

paper zealot
maiden phoenix
rose dragon
red osprey
#

Could only take away hands and leave discards alone

rose dragon
#

"double-skipping" now gives you the default hand & discard count.

plush cove
#
poll_question_text

when possible, which is superior

victor_answer_votes

3

total_votes

3

victor_answer_id

1

victor_answer_text

hooks!

random sleet
past forge
#

I just have a lot of SMODS.joker tables and like 3 hooks

opal spade
#

tbh now that better calc is out i feel kinda stupid trying to unify joker/playing card calcs before better calc

#

better calc makes everything so much easier

prisma loom
lavish lake
wintry solar
#

missiung an =

spring lantern
#

only one item left in the todo list...

past forge
#

Im having issues with the timing and the flipping of the cards, what are the ingame delays??

cerulean rose
#

check basegame tarot cards ctrlv

spring lantern
lavish lake
#

Also, does anybody know how to test out your mod jokers in a run without having to go through the trouble of actually finding it?

spring lantern
#

debug mode -> go to collection -> press 3 on a joker to spawn it

#

also seeing this was like dear god

past forge
spring lantern
#

huh didn't know about too many jokers

past forge
#

i dont even need to go to the collection

lavish lake
#

Why is it showing +nil though? It's supposed to show +10 mult

lavish lake
past forge
lavish lake
#

Oh

past forge
#

Is there somewhere a list of all localize messages?

random sleet
#

Balatro.exe/localization/en-us.lua

red osprey
#

Random idea:

Giant (Common) - +30 Mult, but takes 2 Joker slots

past forge
#

very powerful early game

#

i like it

red osprey
#

Obviously, but I think that's fine considering a lot of flat mult jokers are

#

I could bump it to uncommon

#

Negative Giant would just be regular size which is funny

past forge
#

lol

#

new edition: double negative

#

but it really does nothing because negative*negative = positive

red osprey
#

Yeah

lavish lake
#

@red osprey I see you can make joker ideas, can you think of an idea for the modded joker called 'B'? I'm making an alphabet jokers mod and I need your input

red osprey
#

That's not a very inspiring prompt tbh

past forge
#

Why is the message not showing up? Im also open to suggestion to what to put in the message

red osprey
#

You're returning inside an event

#

Put the last return outside the event

past forge
#

but the joker juices up

#

i dont see why the message wont show

red osprey
#

Yes, because you're calling juice_up in the event

#

The message is managed in SMODS by the return of the calculate function

past forge
#

oh okay

red osprey
#

Keep the juice_up in the event, and put

return {
  message = localize('k_upgrade_ex')
}
#

at the end of the calculate function

past forge
#

so message must be in return

red osprey
#

You can do it manually but it's best to handle it like this yes

past forge
red osprey
#

Yes

#

You're defining the return of calculate to return the message

past forge
#

okay

red osprey
#

Events define new functions, so if you use return in those, you'll only return from the event callback, and not the wider calculate (because they're called later)

past forge
#

i guess it shouldnt do this

red osprey
#

That's from the return?

past forge
#

yes

#

maybe from the juicing

#

let me try a couple thing

lavish lake
#

Also, does anybody know how to check when an uncommon joker is triggered and how to retrigger it?

past forge
edgy mountain
#

im still struggling with my code
i need to get the cards in the shop, check if they are consumables and if so set their cost to 0

red osprey
#

Look at the code for Astronomer

#

If you don't know where, unzip Balatro.exe in your Steam folder, and it should contain a bunch of Lua files. Open that unzipped folder in VSCode and use the search function to explore

past forge
#

Le Codex would be a top teacher fr

red osprey
#

Stealing code is a very good method when doing stuff already done elsewhere

#

(As long as you understand what you're stealing to modify it)

edgy mountain
#

i know, i already did, but the problem is astronomer does the check when it is added

#

mine isnt a permanent effect

#

it needs to be able to be turned on and off

#

based on a variable

red osprey
#

What is the exact functionality you're lookign for?
Write out the ability

vivid solstice
#

im trying to make it so that the new suits arent added into every deck but ti keeps crashing
here's my code local function allow_suits(self) = false end

red osprey
#

That's not valid Lua

edgy mountain
#

joker: you have [variable] free consumable purchases. Gain one at the end of every blind

red osprey
#

If you want a function that returns false you need to use return false instead of = false

lavish lake
red osprey
#

I don't know if replacing prices upon being bought is something Balatro supports

#

So I guess the cleanest way would be to refund the money when that happens

#

But then you wouldn't be able to buy them if you are broke

edgy mountain
#

i guess ill just do that

#

now i just need to figure out that

red osprey
#

The buy event probably happens after the item has been bought, so you'd need some kind of event that triggers either when the card is selected or right before the buy happens

#

Could be added fairly easily with a patch or hook into whatever function handles that

edgy mountain
past forge
#

Is this even a thing?

red osprey
#

^

past forge
#

love how i just freestyle it

#

thanks

chrome prawn
#

Does anyone know how I would make it so that a custom poker hand looks for one specific card

lavish lake
#

Guys how do I look at the code for jokers in the vanilla game?

chrome prawn
#

like for example how would you make it only activate if I have an Ace selected

past forge
#

loop through the hand and use the key of the card

chrome prawn
past forge
#

card_key would be the specific card (doesnt look for enhancements, seals or editions)

frosty dock
#

G.full_deck isn't a thing, it's G.playing_cards

#

the enhancement check should look like SMODS.has_enhancement(v, 'm_stone')

lavish lake
red osprey
#

Return an object with repetitions = <number of retriggers you want>

#

Might need to be in context.repetition

past forge
lavish lake
vivid solstice
#

the game keeps crashing and saying i need to add a "do" near the "in" in my code but I alreagy have one

            assert(SMODS.change_base(c,'Flowers', nil))
            end```
frosty dock
#

all the playing cards you have

frosty dock
#

what is name = 'Hearts' doing here

lavish lake
frosty dock
#

I'm not even sure what you're trying to do tbh

vivid solstice
#

im checking for hearts in the played hand and changing them to flowers

frosty dock
#

change all selected cards to flowers? change all selected hearts to flowers? something else entirely?

frosty dock
manic rune
lavish lake
manic rune
past forge
#

SMODS.Joker {
    key = 'great_wall',
    subtitle = "Art and idea by Toyrapple",
    loc_txt = {
        name = 'The Great Wall',
        text = {
            "Gives {C:mult}+#2# {} Mult for",
            "each {C:gold}Stone card{}",
            "in your {C:gold}full deck{}",
            "{C:inactive}(Currently {C:mult}+#1# {C:inactive}Mult)"
        }
    },
    config = { extra = { mult = 0, mult_scaling = 2 } },
    loc_vars = function(self, info_queue, card)
        return { vars = { card.ability.extra.mult, card.ability.extra.mult_scaling } }
    end,
    rarity = 1,
    atlas = 'ToyrappleCollection',
    pos = { x = 0, y = 1 },
    cost = 2,
    calculate = function(self, card, context)
    
        card.ability.extra.mult = 0

        for k, v in ipairs(G.playing_cards) do
            if SMODS.has_enhancement(v, 'm_stone') then
                card.ability.extra.mult = card.ability.extra.mult + card.ability.extra.mult_scaling
            end
        end

        if context.joker_main then
            return {
                mult_mod = card.ability.extra.mult,
                message = localize { type = 'variable', key = 'a_mult', vars = { card.ability.extra.mult } }
            }
        end
    end
}
manic rune
#

for index,value in pairs(table) do (sometimes it can be ipairs too)
...
end

for index = 1,10 do
...
end

thats how most for loops should look like

frosty dock
#

it should look more like this

for i, c in ipairs(G.hand.highlighted) do
  if c:is_suit('Hearts') then -- is this card a heart?
    assert(SMODS.change_base(c, 'prefix_Flowers', nil)) -- change prefix to your mod's prefix
  end
end
lavish lake
frosty dock
manic rune
frosty dock
#

you can move that into context.joker_main and additionally do the counting in loc_vars

manic rune
#

i dont think G.playing_cards is correct honestly

past forge
frosty dock
past forge
frosty dock
#

you need to count in loc_vars so it gets updated when you look at the description

manic rune
frosty dock
#

other than that, you only need it in joker_main

manic rune
#

oof

frosty dock
#

G.playing_cards is all playing cards you have (your full deck)

manic rune
#

ohh

frosty dock
#

G.deck only has the cards that are physically in your deck pile right now

past forge
frosty dock
manic rune
#

or wait, u can actually put a loop in loc_vars itself?

past forge
#

honestly, i didnt knew i could do that

manic rune
#

😭 i thought loc_vars is not a loop, you tell it what variable to check then it will update if that changes

past forge
#

thank you Mr smods

frosty dock
frosty dock
manic rune
#

istg im learning everything just reading this channel 💀

frosty dock
#

you need to check if context.other_joker exists before doing any logic on it, and self is the wrong table to compare against

#

if context.other_joker and context.other_joker.config.center.rarity == 2 and context.other_joker ~= card then

manic rune
#

is it context.other_joker or context.other_jokers for the second condition?

frosty dock
#

silly me i should have seen that

manic rune
#

ah i see, gotta ask to make sure

lavish lake
manic rune
#

cryptid- 🗣️

frosty dock
#

whoops i didn't pick up the context for your question. that's a different context

#

if context.retrigger_joker_check and context.other_card.config.center.rarity == 2 and context.other_card ~= card then

#

you also need to put SMODS.current_mod.optional_features = { retrigger_joker = true } somewhere in top-level scope of your mod to enable it

frosty dock
lavish lake
frosty dock
#

wherever you want in your main file, just not inside anything else

vivid solstice
#

the deck code didnt work and the suits are still on a regular deck

    return false
end```
frosty dock
#

how are you using it?

lavish lake
frosty dock
#

what smods version are you using?

lavish lake
frosty dock
#

1304a?

#

there's your issue, that's 6 weeks out of date

manic rune
#

quick question, where do i check all of the optional features of smods?

#

just knew about the existence of that

#

and it seems really useful

frosty dock
frosty dock
#

i need to get that into the docs

manic rune
#

sweet, thanks

past forge
#

what the heck are quantum enhancements

manic rune
#

quantum science

frosty dock
wintry swallow
#

like polychrome wild card right

manic rune
#

thats neat

past forge
frosty dock
#

no

manic rune
#

wait so, is there an example for the application of that?

frosty dock
#

polychrome is an edition

past forge
#

its more like polychrome negative

manic rune
stray wing
#

what context checks would I want for increasing a card's mult after each hand is scored? I tried just context.after, which didn't work, and "context.after and context.scoring_hand" which also crashed

frosty dock
manic rune
lavish lake
past forge
#

😭

manic rune
#

nah but i get u man, i get editions and enhancements mixed up all the time 😭

wintry swallow
#

trolling worked

frosty dock
manic rune
lavish lake
#
SMODS.Joker {
    key = "letter_b",
    loc_txt = {
        name = "B",
        text = {
            "{C:green}#1# in #2#{} chance to retrigger an uncommon joker,",
            "{C:attention}except this joker{}"
        }
    },
    config = { extra = { odds = 1 } },
    rarity = 2,
    atlas = "alphabet_atlas",
    pos = { x = 0, y = 0 },
    loc_vars = function (self, info_queue, card)
        return {
            vars = { (G.GAME.probabilities.normal or 1), card.ability.extra.odds }
        }
    end,
    calculate = function (self, card, context)
        if context.other_joker then
            if context.retrigger_joker_check and context.other_card.config.center.rarity == 2 and context.other_card ~= card then
                if pseudorandom('letter_b') < G.GAME.probabilities.normal / card.ability.extra.odds then
                    return { repetitions = 1 }
                end
            end 
        end
    end
}

This is for the joker

frosty dock
#

you just return a table with the enhancements to add as keys

frosty dock
#

i told you it's a different context

manic rune
#

oh i see, thanks

frosty dock
#

just get rid of that outer if

wintry swallow
#

john sama i pushed a pr into smods wiki but not sure if its not pulled because its bad or not noticed

frosty dock
#

i need to setup a webhook for that repo, I'm not watching that one

#

I'll check it

lavish lake
frosty dock
#

if context.other_joker then

#

other_joker and retrigger_joker_check are different contexts

frosty dock
past forge
lavish lake
past forge
#
    calculate = function(self, card, context)

        if context.before and context.cardarea == G.jokers then
            for i = 1, #context.scoring_hand do
                if context.scoring_hand[i].is_face() then
                    print("face card played")
                    card.ability.extra.xmult = card.ability.extra.xmult + card.ability.extra.scaling_factor
                end
            end
        end

        if context.joker_main then
            return {
                mult_mod = card.ability.extra.xmult,
                message = localize { type = 'variable', key = 'a_xmult', vars = { card.ability.extra.xmult } }
            }
        end
    end
wintry swallow
frosty dock
past forge
#

damn, the colon

frosty dock
wintry swallow
#

yeah but in the average case it'll be rod-y

#

its your decision either way

bitter gazelle
#

why isnt my jokers mult increasing

manic rune
#

you didnt return anything

bitter gazelle
#

okay actually thats fair was too sleepy to notice that

manic rune
#

nah its fine lol

lavish lake
manic rune
#

thats weird

#

i did the same and it works for me

lavish lake
# manic rune

Maybe check your code compared to mine
SMODS.Joker {
key = "letter_b",
loc_txt = {
name = "B",
text = {
"{C:green}#1# in #2#{} chance to retrigger an uncommon joker,",
"{C:attention}except this joker{}"
}
},
config = { extra = { odds = 1 } },
rarity = 2,
atlas = "alphabet_atlas",
pos = { x = 0, y = 0 },
loc_vars = function (self, info_queue, card)
return {
vars = { (G.GAME.probabilities.normal or 1), card.ability.extra.odds }
}
end,
calculate = function (self, card, context)
if context.retrigger_joker_check and context.other_card.config.center.rarity == 2 and context.other_card ~= card then
if pseudorandom('letter_b') < G.GAME.probabilities.normal / card.ability.extra.odds then
return { repetitions = 1 }
end
end
end
}

manic rune
#

hmm

#

what was the crash log?

lavish lake
#
Oops! The game crashed:
main.lua:1781: main.lua:1882: table index is nil

Additional Context:
Balatro Version: 1.0.1n-FULL
Modded Version: 1.0.0~ALPHA-1413a-STEAMODDED
LÖVE Version: 11.5.0
Lovely Version: 0.6.0
Platform: Windows
Steamodded Mods:
    1: Alphabet Jokers by Runtem [ID: alphabet_jokers, Version: 1.0.0]
    2: Talisman by MathIsFun_, Mathguy24, jenwalter666, cg-223 [ID: Talisman, Version: 2.0.2, Uses Lovely]
        Break Infinity: omeganum
    3: DebugPlus by WilsontheWolf [ID: DebugPlus, Version: 1.3.1, Uses Lovely]
Lovely Mods:

Stack Traceback
===============
(3) LÖVE function at file 'boot.lua:352' (best guess)
Local variables:
 errhand = Lua function '(LÖVE Function)' (defined at line 553 of chunk [lovely debugplus.console "console.lua"])
 handler = Lua function '(LÖVE Function)' (defined at line 553 of chunk [lovely debugplus.console "console.lua"])
(4) global C function 'error'
(5) Lua upvalue 'gfep' at file 'main.lua:1781'
Local variables:
 success = boolean: false
 err = string: "main.lua:1882: table index is nil"
(6) Lua field 'evaluate_play' at file 'main.lua:1898'
Local variables:
 e = nil
(7) Lua field 'func' at file 'functions/state_events.lua:480'
(8) Lua method 'handle' at file 'engine/event.lua:99'
Local variables:
 self = table: 0x23134f80  {start_timer:true, timer:TOTAL, blockable:true, trigger:immediate, func:function: 0x2305f7b8 (more...)}
 _results = table: 0x2346e640  {blocking:true, pause_skip:false, time_done:false, completed:false}
(9) Lua method 'update' at file 'engine/event.lua:182'
Local variables:
 self = table: 0x22bdc330  {queue_last_processed:18.466666666667, queues:table: 0x22bdc358, queue_dt:0.016666666666667 (more...)}
 dt = number: 0.0133257
 forced = nil
 (for generator) = C function: next
 (for state) = table: 0x22bdc358  {unlock:table: 0x22960038, other:table: 0x229600d8, tutorial:table: 0x22960088 (more...)}
 (for control) = number: nan
 k = string: "base"
 v = table: 0x22960060  {1:table: 0x22ebd1a8, 2:table: 0x23134f80, 3:table: 0x231353f0, 4:table: 0x23135478 (more...)}
 blocked = boolean: false
 i = number: 2
 results = table: 0x2346e640  {blocking:true, pause_skip:false, time_done:false, completed:false}
(10) Lua upvalue 'gameUpdateRef' at file 'game.lua:2631'
Local variables:
 self = table: 0x22978aa0  {F_GUIDE:false, F_CRASH_REPORTS:false, F_QUIT_BUTTON:true, HUD_tags:table: 0x231f63e0 (more...)}
 dt = number: 0.0133257
 http_resp = nil
(11) Lua upvalue 'upd' at Steamodded file 'src/ui.lua:84' 
Local variables:
 self = table: 0x22978aa0  {F_GUIDE:false, F_CRASH_REPORTS:false, F_QUIT_BUTTON:true, HUD_tags:table: 0x231f63e0 (more...)}
 dt = number: 0.0133257
(12) Lua method 'update' at file 'main.lua:1761'
Local variables:
 self = table: 0x22978aa0  {F_GUIDE:false, F_CRASH_REPORTS:false, F_QUIT_BUTTON:true, HUD_tags:table: 0x231f63e0 (more...)}
 dt = number: 0.0133257
(13) Lua upvalue 'oldupd' at file 'main.lua:996'
Local variables:
 dt = number: 0.0133257
(14) Lua field 'update' at file 'main.lua:1788'
Local variables:
 dt = number: 0.0133257
(15) Lua function '?' at file 'main.lua:935' (best guess)
(16) global C function 'xpcall'
(17) LÖVE function at file 'boot.lua:377' (best guess)
Local variables:
 func = Lua function '?' (defined at line 906 of chunk main.lua)
 inerror = boolean: true
 deferErrhand = Lua function '(LÖVE Function)' (defined at line 348 of chunk [love "boot.lua"])
 earlyinit = Lua function '(LÖVE Function)' (defined at line 355 of chunk [love "boot.lua"])
manic rune
#

hm

dire palm
lavish lake
manic rune
#

try removing each to identify the error, i have no clue rn since im pretty new to modding myself

fickle quail
#

Right, kinda wanna learn to actually make a mod. Is there a simple quickstart guide & wiki I could use, or is it simple enough to just stare at other mods & the smods source 'til I've figured out how it works?

frosty dock
#

oops

fickle quail
#

lmao

#

ta

manic rune
#

dang, bro roasted my skills

#

😭

manic rune
frosty dock
#

I just misclicked

manic rune
#

did you add this on top of everything?

lavish lake
lavish lake
long sun
#

heyo! how do you create one of those little side info boxes?

frosty dock
#

I fucking hate talisman crashes

#

they tell you nothing useful

long sun
#

i'd like to do that for both enhancements and jokers

lavish lake
lavish lake
#

what you talking about

#

talisman issue?

frosty dock
#

it's not a talisman issue, but talisman makes the crash screen be like that

manic rune
stray wing
past forge
lavish lake
past forge
#

1 frame per sometimes

frosty dock
#

it's a talisman bug, it requires a card in return tables where smods doesn't

manic rune
#

oh

manic rune
#

crazy

#

😭

lavish lake
manic rune
#

maybe try flipping the card first before turning it into a stone card?

#

its kinda unavoidable otherwise since stone cards wipe out the texture of the card before applying itself, i think

frosty dock