#💻・modding-dev

1 messages · Page 307 of 1

faint yacht
#

No Jokers triggered?

iron haven
#

the color for Xmult is {C:Xmult} right?

faint yacht
#

{X:mult,C:white}

lament agate
clever abyss
#

still trying to get the joker to add a spectral after a boss blind but still stuck.

lament agate
faint yacht
#

SMODS.add_card it?

sonic cedar
lament agate
#

theres probably grammatical error in there

lament agate
#

yeah

iron haven
lament agate
sonic cedar
#

will turns pensive_cow

lament agate
#

will smith in shambles

clever abyss
long sun
sonic cedar
#

only on sundays

#

would you look at the time....

lament agate
#

oh boy

faint yacht
#

SMODS.add_card is SMODS.create_card, but it automatically emplaces and calls the add_to_deck effects.

iron haven
clever abyss
#

should that be it or is there more i'm missing

sonic cedar
faint yacht
#

Oh, you also are not giving it a table...

#

Just SMODS.add_card({ set = 'Spectral' }).

lament agate
#

i reworded it because

#

you know

#

they hit the second retrigger

sonic cedar
lament agate
#

😭

sonic cedar
#

*retrigger a second time

lament agate
#

thanks @iron haven @twin dagger

#

fuck

#

FUCK

#

@sonic cedar

twin dagger
lament agate
sonic cedar
#

you utter fool

twin dagger
#

No worries

lament agate
#

that was an accident

#

get better name

sonic cedar
#

no

twin dagger
#

Now we just need a ros I guess

sonic cedar
clever abyss
twin dagger
rugged pier
#

can you use "context"s like you have for jokers in hook functions?

manic rune
#

am i cooking

lament agate
red flower
rugged pier
manic rune
#

first time tryna draw 3d heavy stuff like this

rugged pier
#
--Function to alter Joker effects
local old = Card.calculate_joker
function Card:calculate_joker(context)
    local m = 2
    local ret = old(self, context)
    if not ret then return ret end

    -- Dollars
    if ret.dollars then
        if not self.ability.base_dollars then 
            self.ability.base_dollars = ret.dollars
        end
        ret.dollars = self.ability.base_dollars * m
    end

    -- Mult: Xmult_mod, mult_mod, x_mult, h_mult, and mult
    if ret.Xmult_mod then
        if not self.ability.base_Xmult_mod then 
            self.ability.base_Xmult_mod = ret.Xmult_mod
        end
        ret.Xmult_mod = self.ability.base_Xmult_mod * m
    end
    if ret.mult_mod then
        if not self.ability.base_mult_mod then 
            self.ability.base_mult_mod = ret.mult_mod
        end
        ret.mult_mod = self.ability.base_mult_mod * m
    end
    if ret.x_mult then
        if not self.ability.base_x_mult then 
            self.ability.base_x_mult = ret.x_mult
        end
        ret.x_mult = self.ability.base_x_mult * m
    end
    if ret.h_mult then
        if not self.ability.base_h_mult then 
            self.ability.base_h_mult = ret.h_mult
        end
        ret.h_mult = self.ability.base_h_mult * m
    end
    if ret.mult then
        if not self.ability.base_mult then 
            self.ability.base_mult = ret.mult
        end
        ret.mult = self.ability.base_mult * m
    end

    -- Chips: chip_mod and chips
    if ret.chip_mod then
        if not self.ability.base_chip_mod then 
            self.ability.base_chip_mod = ret.chip_mod
        end
        ret.chip_mod = self.ability.base_chip_mod * m
    end
    if ret.chips then
        if not self.ability.base_chips then 
            self.ability.base_chips = ret.chips
        end
        ret.chips = self.ability.base_chips * m
    end

    return ret
end
#

I am trying to

#

use a multiplier for each joker values

lament agate
rugged pier
#

but

#

i need to change the multiplier each hand played

#

and at the end i need to set values back to base

red flower
#

ok, but you can use context in the function that has context as an argument lol

#

i feel like thats obvious

rugged pier
clever abyss
#

hm.. still not working

rugged pier
#

cool though thanks

red flower
rugged pier
#

thanks

red flower
#

all the ones that go to jokers should work at least

rugged pier
#

makes sense

rapid stag
#

bump.

errant karma
#

using this to try replace the shop sign but im an idiot and dont know if this is right or not coz it wont work lol

rapid stag
#

unless it's erroring

errant karma
#

if it's an animation then shouldnt it have a thing for frame amount or am i dumb

worldly thicket
#

How would I go about making a consumable add three random playing cards to the hand, with random enhancements and other stuff

faint yacht
#

See how "Familiar" and "Grim" spectral cards do it.

tepid crow
#

did you figure it out yet?

sonic cedar
#

no 😭 i kept breaking it

bleak moth
#

How can I replace in-game localizations?

worldly thicket
tepid crow
# sonic cedar no 😭 i kept breaking it

I think it's if pseudorandom(...) < G.GAME.probabilities.normal/(self.ability.extra*(next(SMODS.find_card("insert your joker key")) and 2 or 1)) (if I got those brackets right)

sonic cedar
#

huhhhh...

faint yacht
sonic cedar
#

what's the and 2 or 1 here

faint yacht
#

Look for elseif self.ability.name == 'Familiar' or self.ability.name == 'Grim' or self.ability.name == 'Incantation' then ...

worldly thicket
slate bison
#

is there such thing as context.using_consumable.edition? im trying to check if the consumable used is negative or not

faint yacht
#

context.consumeable is passed as the consumable card.

errant karma
#

my shop sign replacer wont work, can someone help lol

slate bison
faint yacht
#

if context.consumeable.edition and context.consumeable.edition.negative?

worldly thicket
#

Okay reading this I can kind of understand it, but idk how to incorporate it into my consumable

rugged pier
#

is there a way to check what boss blind the player is currently facing?

icy adder
#

hey, I'm trying to make an joker that, when a non-face card is scored, it gains + 1 on the value N, but it's gaining +1 for every card held in hand(like baron does), what am I doing wrong, sorry for interrupting you guys

if context.main_scoring and context.cardarea == G.play then
  if not context.other_card:is_face()  then
    card.ability.extra.N = card.ability.extra.N + 1
    return {message = 'Upgraded!',colour = G.C.PURPLE,card = card}
  end
end
rugged pier
#

but how do i do it for a specific boss

errant karma
#

this does not work
please help lol

faint yacht
#

G.GAME.round_resets.blind_choices.Boss is a string.

rugged pier
faint yacht
#

bl_modprefix_name

slate bison
rugged pier
icy adder
tired silo
#

Anyone got more info on this?

TL;DR TOML file is successfully pattern matching but not printing out debug statements

[patches.pattern]
target = "button_callbacks.lua"
pattern = "G.jokers:emplace(c1)"
position = "after"
payload = """
print("JOKER PURCHASED")
for key, username in pairs(TTB.SHOP_USERS) do
    if key == c1.ID then
        TTB.move_shop_user_to_joker_list(c1.ID)
        print("JOKER PURCHASED")
        break  -- Exit the loop once the transfer is done
    end
end
"""
match_indent = true```
slate bison
rapid stag
#

chat, remind me how i get the length of a table that's key-based and not indexed

icy adder
#

thx hero and harmonious joker

rapid stag
bleak moth
#

Does anyone know why the line local lan = SMODS.Language("test", "Test Language") is crashing the game?

errant karma
slate bison
rapid stag
bleak moth
icy adder
rapid stag
# bleak moth

is there a localisation file sharing its name with the key of test language in your [mod name]/localization/ folder?

bleak moth
#

yes

errant karma
bleak moth
#

that might be the problem; maybe I should switch them

slate bison
rapid stag
icy adder
rapid stag
slate bison
#

wait are u brazilian?

errant karma
bleak moth
rapid stag
slate bison
icy adder
slate bison
#

carai engracado

bleak moth
#

This channel seems to be the only modding help available

rapid stag
slate bison
# icy adder sim

so u open up steam, go to gamefiles, then right click on balatro.exe and open archive with 7zip

#

it will reveal the game's source source code

slate bison
bleak moth
rapid stag
# errant karma still the base game graphic

oh, try adding prefix_config = { key = false } to your SMODS.Atlas
either one of two things will happen from this point, either it still won't replace or it replaces wrong. the result i expect is that it replaces wrong

icy adder
#

which one

rapid stag
slate bison
rapid stag
slate bison
#

you can search other files to look for other stuff

errant karma
#

or both

rapid stag
rapid stag
#

wait

#

remove the s at the end of shopsignanimations

errant karma
#

same result ;-;

rapid stag
#

ok show me your SMODS.Atlas code again cirLost

errant karma
#

i am probably doing something wrong and im prepared for it

shell timber
#

the thing you're doing wrong is using notepad

errant karma
#

terrible option, terrible knowledge so it makes sense

#

suits me perfectly

#

lol

rapid stag
#

is the lua file this is in being run when you start the game?

errant karma
#

yes coz its with a bunch of other textures that are infact being replaced

rapid stag
#

try switching key back to shop_sign then cirThink

errant karma
#

ok that was the problem 😭

#

thank you for the help lol

rapid stag
#

ok, so it has to be key, not filename girldmNoted confusing since the balatro logo shares filename with key cirDerp

my bad

errant karma
#

its fine lol

#

i dont know shit about lua so basically everything in the texture pack im making has taken ages to implement so
it's part of the process lol

rapid stag
#

saaaaaame cirBlech

rugged pier
#
local old = Card.calculate_joker
function Card.calculate_joker(self,context)
    local m = 1
    local ret = old(self, context)
    if G.GAME.round_resets.blind_choices.Boss == 'bl_csmr_lordruler' then
        m = m * 0.75
        if context.end_of_round then
            m = 1
            if self.ability.name == 'Mail-In Rebate' then
                self.ability.extra = self.ability.base_extra
            end
            return true
        end

just a sanity check here, the return true should just end the calculate function yes?

faint yacht
#

return ret is the desired return in the end.

rugged pier
#

wait

#

that might fix my error actually tysm

faint yacht
#

...are seals stored under G.P_CENTERS?

sturdy compass
#

they definitely are not

faint yacht
#

Wheremst, then?

sturdy compass
#

I believe it's G.P_SEALS??? Lemme check rq

red flower
#

yeah

faint yacht
#

G.P_SEALS is a thing, yeah.

sturdy compass
#

yeppers

errant karma
#

just out of curiosity, using steamodded, is it possible to change the background to an image or a solid color?

stiff locust
#

it is but i couldn't tell you how to do it

rugged pier
#

im not sure

#

just came across it

chrome widget
#

I'm struggling here, I want to not load a mod if another mod is present (because this mod is basically a subset of a larger mod, and I don't want to locate duplicates), and the SMODS code refers to a mod table having either a should_enable or disabled flag but neither works as I expected. How can I determine on load that another mod is active and loaded?

tepid crow
#

next(SMODS.find_mod(...)).can_load I believe

stiff locust
#

how the hell does context.modify_scoring_hand work

tepid crow
chrome widget
#

find_mod seems to find any mod in the directory even if it's unloaded

tepid crow
#

uuhh I'll have to test that then 1 sec

chrome widget
#

for example this is what I've got rn

tardy reef
#

Hey quick question, how feasible would it be to implement a modded joker that only shows up after certain conditions are met? Like Cavendish only showing up after Gros Michel dies by its own effect

#

The condition I'm thinking would be another (vanilla) joker being sold previously during the run

chrome widget
#

Is the issue here just that it returns an empty table rather than nil if the mod isn't active?

tepid crow
#

find_mod returns a table of mods

sonic cedar
chrome widget
#

Okay yeah it seems I can just use next and I don't need the can_load check (though I'll keep it for error checking purposes). I just misinterpreted that it was returning a table

#

Mostly because I guess I just didn't inherently see the use case to have multiple instances of one mod in the directory

#

Which I see is technically possible, and you could have multiple versions

sonic cedar
tepid crow
sonic cedar
#

ohhhhh ok ok i figuredd

faint yacht
sonic cedar
#

i tried your brackets and it gave me an error though

tepid crow
#

🤔

#

I might've messed mine up tbh, didn't actually execute them

sonic cedar
#

mine's the same as yours but i removed that last one at the end

#

this is it with it

tepid crow
#

yeah you have 1 too many )s after find_card

rugged pier
#
M = 1
--Function to alter Joker effects
local base_calculate_joker = Card.calculate_joker
function Card.calculate_joker(self,context)
    local ret = base_calculate_joker(self, context)
    if G.GAME.round_resets.blind_choices.Boss == 'bl_csmr_lordruler' then
        if context.change_multiplier then
            M = M * 0.75
        end

if i wanted to trigger "context.change_multiplier" every time a hand is played within that blind, how would i do it from my SMODS.Blind? (for example in SMODS.Joker i would do it within the calculate function, whats the equivalent for the SMODS.Blind)

tepid crow
sonic cedar
#

off to test then! i dont need to do anything else to the joker itself now do i?

tepid crow
#

not really

#

I also looked at the code again and I might've fucked up my math

#

but you'll probably see that in-game 🤣

sonic cedar
#

oh nooooo lmfaoo

#

thanks for all the help though!!

rugged pier
tepid crow
#

actually, thinking about it more, I don't think you'll see it in-game 🤔

sonic cedar
#

like the numbers wont change?

tepid crow
#

not with this approach no

sonic cedar
#

good chuck_grin

tepid crow
#

though I think you want to change the 2 or 1 to 0.5 or 1 if I did my math correctly this time

sonic cedar
#

okily doke

tepid crow
#

since 1/(4*(2 or 1)) => 1/8 or 1/4 instead of the 1/2 or 1/4 you wanted

sonic cedar
#

oooh yeah thatd be bad

#

how would i visually change the numbers though? just so i can make sure its working

#

like 1 in 4 would say 2 in 4 you get it

tepid crow
#

uhh with this approach that's not really possible since you're basically directly editing the code that looks at the chance

sonic cedar
#

i seeeeee

can i print check then?

tepid crow
#

so anything that visually changes the number would work, but be completely independent from the statistical chance

gusty iron
#

how do i check the level of a played hand?

tepid crow
rugged pier
#

my wording is a little confusing,

if this was a joker, i could do SMODS.calculate_context(change_multiplier = true) in a context.before for each hand played

how would i do the same within SMODS.Blind

rugged pier
#

goated

#

thank you

#

idk how i missed that in the wiki

#

id been staring at it for far too long

#

like theres no way this isnt a function already

sonic cedar
tepid crow
#

no, because that number never gets modified

#

but you could take the whole G.GAME.probabilities.normal/(self.ability.extra*(next(SMODS.find_card("insert your joker key")) and 0.5 or 1)) out and store it in a variable, then print that

sonic cedar
#

oh sick

gusty iron
runic pecan
sonic cedar
#

right when i was about to paste that lmao

rugged pier
#

what does talisman do...

faint yacht
#

Convert a bunch of values into tables to be able to store much larger numbers.

rugged pier
#

ah

runic pecan
#

My summary of Talisman that I made some days ago☝️

rugged pier
#

for some reason everytime i play a hand, the SMODS.calculate_context is being called 4 times, anyone know why?

sonic cedar
rugged pier
sonic cedar
gusty iron
runic pecan
rugged pier
gusty iron
tepid crow
rugged pier
gusty iron
tepid crow
rugged pier
#

anyway, cool idea nonetheless

sonic cedar
#

oh lmao

gusty iron
rugged pier
gusty iron
sonic cedar
#

both with and without the joker

tepid crow
#

you can't access it outside the function haha

#

print it inside the func

sonic cedar
#

ok how do i do that actuall

#

y

tepid crow
#

the same thing you just did it the debug console 😂

sonic cedar
#

OH i thought you meant like

#

filter it in the debug to the use function

#

but no i can do that lmao

sonic cedar
#

it's not printing

tepid crow
#

show?

sonic cedar
#

i realized i should do that lmfao

lucid owl
#

where we're going, we don't need showman

sonic cedar
#

two wheels and no jokers its so over

lucid owl
#

true... but hey it's essentially an eternal negative showman as a deck so still a win

rugged pier
tepid crow
sonic cedar
#

it doesnt print anything

#

i gto the joker

#

used wheel

lucid owl
sonic cedar
#

nothing happened

rugged pier
tepid crow
sonic cedar
#

of course always

lucid owl
tepid crow
sonic cedar
# tepid crow alright send the code
SMODS.Consumable:take_ownership('c_wheel', {
    use = function(self, area, copier)
        local testvar = G.GAME.probabilities.normal/(self.ability.extra*(next(SMODS.find_card('j_hpfx_farmer')) and 0.5 or 1))
        local used_tarot = copier or card
        local temp_pool = (self.ability.name == 'The Wheel of Fortune' and self.eligible_strength_jokers) or {}
        if pseudorandom('wheel_of_fortune') < testvar then
            G.E_MANAGER:add_event(Event({trigger = 'after', delay = 0.4, func = function ()
                local over = false
                local eligible_card = pseudorandom_element(temp_pool, pseudoseed(
                    (self.ability.name == 'The Wheel of Fortune' and 'wheel_of_fortune')
                ))
                local edition = nil
                if self.ability.name == 'The Wheel of Fortune' then
                    edition = poll_edition('wheel_of_fortune', nil, true, true)
                end
                eligible_card:set_edition(edition, true)
                if self.ability.name == 'The Wheel of Fortune' then check_for_unlock({type = 'have_edition'}) end
                used_tarot:juice_up(0.3, 0.5)
            return true end}))
        end
        sendDebugMessage(testvar, "Logger")
    end,
}, true) --farmer
lucid owl
#

plus an entirely new type of card modifier in sort of the same vein as paperback's paperclips

rugged pier
#

cool mod

sonic cedar
#

oh my god

stray terrace
sonic cedar
#

on use

lucid owl
sonic cedar
tepid crow
# sonic cedar

your function still isn't consistent with the one from smods

sonic cedar
#

oh so i just have to smods update it

#

like change card to self

#

i mean self to card

#

or is there another thing

tepid crow
#

also, but your function signature is wrong too

sonic cedar
#

my function signature?

#

oh well its missing card

#

lmfao

lucid owl
#

is there a simple way to change the rate at which items appear?

#

as in, with a variable or something similar

rugged pier
#

to set a new global variable, you would just do G.GAME["variable_name"] = some_value

#

yes?

lucid owl
sonic cedar
rugged pier
lucid owl
#

the idea is that with a certain deck from this mod, jokers of this same mod would appear 3x more but i can't seem to find anything super simple

lucid owl
rugged pier
#

i was confirming it for my own implementation of something 😅😅

lucid owl
#

i mean it did work with my question anyways LMAO

rugged pier
#

perfect lol

rugged pier
sonic cedar
tepid crow
sonic cedar
#

oh my god im on the wrong console

#

yeah theres the 0.5

#

but it WORKS FINALLY

#

cannot thank you enough oh my god lars

rapid stag
#

how do make the badge in set_badge() not show if card locked or discovered

tepid crow
#

I'm not sure that's a built-in thing, might need to patch into some stuff to achieve that? 🤔

rapid stag
rugged pier
rapid stag
rugged pier
tepid crow
rugged pier
#

before anything else is loaded

tepid crow
rapid stag
rugged pier
#

huh

#

interesting

tepid crow
#

G.GAME gets defined once you're actually in a run

rugged pier
#

that makes sense actually

#

lol

rapid stag
rugged pier
#
if G.STAGE == G.STAGES.RUN then
    G.GAME["LordRulerMultiplier"] = 1
end

this would fix it right

tepid crow
#

(but yeah you're looking for something like that; my guess is card.config.center.unlocked?)

iron haven
#

hey guys? What should I replace in part of my code for a joker I am making?

faint yacht
iron haven
#

I can give the code if you want.

rugged pier
rapid stag
rugged pier
tepid crow
rapid stag
#

oh true

faint yacht
#

Please use such for pasting code.
```lua
code here

iron haven
#
SMODS.Joker{
    key = 'juliett',
    loc_txt = {
        name = 'J',
        text = {
            "all played {C:attention}jacks{} give {X:mult,C:white}x#1#{}.",
        }
    },
    atlas = "Jokers",
    pos = {x = 1, y = 1},
    config = { extra = {
            Xmult = 1.5,
        }
    }, 
    unlocked = true,
    discovered = true,
    rarity = 3,
    cost = 10,
    loc_vars = function(self, info_queue, card)
        return {
            vars = {
                card.ability.extra.Xmult,
            }
        }
    end,
    calculate = function(self,card,context)
    if context.individual and context.other_card:get_id() == 11 and context.cardarea == G.jokers then 
          card.ability.extra.mult = card.ability.extra.Xmult + 5
          return {
              message = 'Upgrade!',
          }
    end
    if context.joker_main and context.cardarea == G.jokers then
         return {
            Xmult = card.ability.extra.Xmult,
            card = card
        }
    end
end
}
rugged pier
rugged pier
#

card.ability.extra.mult = card.ability.extra.Xmult + 5
return {
message = 'Upgrade!',
}

what is this part?

iron haven
rugged pier
#

you want to loop through G.play.cards and see if each card has id of 11 and add 1.5 each time to a mult variable in your config

#

then return xmult = mult

iron haven
#
calculate = function(self,card,context)
    if context.individual and context.other_card:get_id() == 11 and context.cardarea == G.jokers then 
          card.ability.extra.mult = card.ability.extra.Xmult + 5
          return {
              message = 'Upgrade!',
          }
    end
    if context.joker_main and context.cardarea == G.jokers then
         return {
            Xmult = card.ability.extra.Xmult,
            card = card
        }
    end
``` So I have to change this.
#

ok.

lucid owl
# rugged pier if you do figure this out, lmk pls i need to implement something similar as well

i figured it out! check out how paperback does this with their paper deck (essentially, they simply triple the amount of times jokers from their mod show up using a lovely patch, but you can substitute checking the presence of the deck for basically anything) https://github.com/Balatro-Paperback/paperback/blob/main/lovely/paper_deck.toml

GitHub

Steamodded v1.0.0+ :: A vanilla centered mod built upon expanding the base game by PaperMoon - Balatro-Paperback/paperback

iron haven
rugged pier
#

very rough

#

youd have to create a number_jack variable in your config

iron haven
rugged pier
#

what are your errors

lucid owl
#

you can format code text like this, btw:

print("example lua code")

here's what you would type to get this:
```lua
print("example lua code")
```

#

indents are preserved

iron haven
lucid owl
rugged pier
#

spent a loooong time trying to figure out joker multiplier effect today

rugged pier
# iron haven

can you implelement my changes then send your code

iron haven
gilded blaze
rugged pier
#

yes, everything i said just replaces what you have inside your calcualte

iron haven
#

oh

#

number_jack = 0 is good?

rugged pier
#

yes

gilded blaze
#

what does the joker do

iron haven
#

?

gilded blaze
#

you're trying to code something, I need the context

rugged pier
#

theyre giving 1.5x mult for each joker played

gilded blaze
#

what I'm seeing in the code is

#

gain X1.5 Mult for each played Jack

#

💀

rugged pier
#

sorry

#

jack

#

not joker

#

lol

#

but yeah their initial goal was for the joker to gain that mult for each jack played

#

so i gave them the implementation for that

iron haven
rugged pier
iron haven
#
for k, v in G.play.cards do
gilded blaze
#

it should be

for k, v in pairs(G.play) do

but I'm suggesting

for i = 1, #context.full_hand do
  if context.full_hand[i]:get_id() == 11 then ... end
rugged pier
#

whoops

#

that is infact the right way to do it

iron haven
#

Line 432

if v:get_id() == 11 then
gilded blaze
#

why is v still there
didn't I tell you to use context.full_hand[i]? 💀

iron haven
gilded blaze
#

this guy is helpless 💀

#

the ... is meant to represent whatever you're trying to do within the if statement

iron haven
#

oh

#

so this?

gilded blaze
#

yes

#

may I get the full joker description

#

since there might be some unexpected behavior with your code

iron haven
#

All played Jacks give 1.5 mult

gilded blaze
#

including Jacks that do not score?

#

what are you trying to achieve here

iron haven
#

line 433

card.ability.number_jack = card.ability.number_jack + 1
faint yacht
#

card.ability.extra.number_jack

#

Honestly, if each Jack is to give X1.5 Mult individually, it all could've been just one large if check.

iron haven
#

there's 3 ifs and a for loop in the code 😛

gilded blaze
#

if you're trying to trigger X1.5 Mult on individual Jacks, use this instead

if context.individual and context.cardarea == G.play then
  if context.other_card:get_id() == 11 then
    return {
      x_mult = card.ability.extra.Xmult
      card = card
    }
  end
end
#

there's no need for number_jack

iron haven
#

ok it works now.

#

kings are 13, right?

rugged pier
#

yes

iron haven
#

ok

#

Okay. How am I going to make L....

tall wharf
#

taking an L

gilded blaze
#

track how many losses you have

#

save it to a global variable

#

and use it as Xmult

iron haven
#

This is what L's text will be. +30 Mult if last hand scored under 25% of the blind requirement

tall wharf
#

i will be adding this as a joker

rugged pier
#

is there a way to track the last destroyed card in the game?

iron haven
#

uh. I have no idea if you are asking me.

gilded blaze
#

well, that is until you can't decide how it would work with Hanged Man and Immolate

rugged pier
gilded blaze
#

probably not

rugged pier
#

makes sense

gilded blaze
#

since vanilla doesn't have any objects that rely on that

rugged pier
#

true

#

if those tarots/spectrals destroy cards one by one

#

it might be possible

#

let me see how they are implemented

gilded blaze
#

yep

iron haven
#

I guess I'll stop at K for now.

rugged pier
#

it does technically

#

because its stored in a table

#

so i could implement something similar

gilded blaze
#

so, always take the last element in the table?

rugged pier
#

where i just take the last value

rugged pier
#

i could randomize it?

gilded blaze
#

probably

rugged pier
#

to add in the rng element of the game

#

hmm

#

yeah shouldnt be too hard to implement at all

gilded blaze
#

Immolate could be a bit different

#

still stored in a table but

#

it chooses 5 at random instead of from highlighted

runic pecan
#

Does SMODS have any alternative method for not_enhanced?

rugged pier
#

i dont think i understand this even, whats the destroyed_cards table

#

like its not defined?

gilded blaze
#

you want to store last destroyed card's rank and suit?

rugged pier
#

yeah

#

(potentially the seal, enhancement, and edition)

sturdy compass
#

Anyone have any ideas on how I would get this to work? The intended function is to add 15% of last hand's chips and mult to the following hand's, but Talisman is making this less than pleasant to work with, as it's crashing within the before context. stg = card.ability.extra

gilded blaze
rugged pier
ruby lily
#

is this correct for a rank card key?

#

i dont think it wants a table but idk what to put

gilded blaze
#

huh

rugged pier
tall wharf
rugged pier
#

the challenge is jsut determining which is the card that should be selected for immolate

tall wharf
#

gt is greater than

sturdy compass
#

The comparison works fine believe it or not, it's the calc_effects that are tripping the crash

rugged pier
sturdy compass
#

I wish lmao

gilded blaze
rugged pier
#

not looking forward to making my mod talisman compatible 😔😔

tall wharf
#

attempt to compare number with table:

gilded blaze
#

the game should take Talisman's to_big if it's installed or use your own fallback if not

#

which makes your mod functional with or without Talisman

sturdy compass
#

Oh how nice that would be

#

Anyways
It's crashing here cuz stg.chips/stg.mult are tables and are what's being passed in as amt

tall wharf
#

does talisman not patch that 😭

sturdy compass
#

apparently not

#

In other news
check out this really cool joker I came up with

#

Good stone build synergy eviler

rotund ridge
#

indeed

wintry solar
#

Ah right

#

This is why we don’t like talisman

sturdy compass
#

Lmfao

wintry solar
#

Because turning numbers into things that can’t be used in comparisons is dumb

sturdy compass
#

As much as I’d love to not have Talisman compat I kinda need to, both for popularity reasons and to handle very large numbers from one of my features Emoti_Shrug

wintry solar
#

Then badger the talisman devs to fix their shit

faint yacht
#

Can I access the G.P_CENTER_POOL['Consumeables'] from create_card at all or do I need to define a new pool of my own and inject all the cards from it into said pool? 💀

faint yacht
#

...guess I'll need to use inject_card for the custom pool, but how do I use such again?

manic rune
#

not sure why they didn't patch it yet

gilded blaze
#

probably because card_eval_status_text is hardly used for Chips/Mult displaying stuff

#

return {chips/mult = value, etc.} already does the job well 💀

faint yacht
#

@wintry solar Apologies pinging you like this, but does the G.P_CENTER_POOLS['Consumeables'] not have all the varying types of consumables in it, including modded ones?

ruby lily
#

does anyone know why my example cards are showing blank? the king of hearts shows correctly and the custom cards show properly in the deck as well.

#

heres the rank code

wintry solar
wintry solar
gilded blaze
wintry solar
#

Yes

#

Every message that is on a card

gilded blaze
#

then why is it still under the radar until now

#

💀

wintry solar
#

I imagine most people have animations off

gilded blaze
#

like, people still play Cryptid with vanilla objects

#

and with anim

faint yacht
#
INFO - [G] > eval G.P_CENTER_POOLS['Consumeables']
INFO - [G] Table:
1: Table:
  order: 1
  _d: false
  unlocked: true
  set: Tarot
  consumeable: true
  _saved_d_u: true
  cost: 3
  discovered: true
  effect: Disable Blind Effect
  pos: table: 0x2284cb70
  cost_mult: 1
  name: The Fool
  config: table: 0x2284cbd0
  alerted: true
  key: c_fool
  _discovered_unlocked_overwritten: true

2: Table:
  alerted: true
  _saved_d_u: true
  unlocked: true
  freq: 1
  effect: Hand Upgrade
  cost: 3
  order: 1
  _d: false
  set: Planet
  consumeable: true
  discovered: true
  pos: table: 0x228500d0
  cost_mult: 1
  _discovered_unlocked_overwritten: true
  name: Mercury
  key: c_mercury
  config: table: 0x22850130

3: Table:
  alerted: true
  _saved_d_u: true
  original_key: familiar
  _u: true
  name: Familiar
  _discovered_unlocked_overwritten: true
  order: 1
  _d: false
  atlas: Tarot
  set: Spectral
  consumeable: true
  registered: true
  taken_ownership: true
  discovered: true
  use: function: 0x226822a8
  prefix_config: table: 0x22640a50
  pos: table: 0x22851d50
  generate_ui: 0
  type: table: 0x2266c080
  cost: 4
  key: c_familiar
  config: table: 0x22851db0
...
wintry solar
#

Alright, what’s the question? Whether modded consumables are added to this?

#

Looking at the smods code, it should have all consumables including modded ones

faint yacht
#

At this point, the question is if we ever could just have a pool that we can access of all the consumables to be put directly into create_card?

#

Like SMODS.add_card({ set = 'Consumeables' }), unless I am missing something.

wintry solar
#

Youd have to select the key yourself I think

#

I think you could use get_current_pool(“Consumeable”) too

runic pecan
#

I need a function that, for example, input "m_glass" and output localized string for "Glass card".

wintry solar
#

That’s what localize is for

runic pecan
wintry solar
#

Nah you need a table

#

Just search for uses of it in code

runic pecan
iron haven
#

um. big problem. I got D (my joker) and it works if it doesn't score or in your hand.

#

And I don't want that.

iron haven
daring fern
faint yacht
#

-# Don't forget to share code!

daring fern
iron haven
#

oh?

#

this is a straight, right?

daring fern
# iron haven oh?

You need to check context.cardarea == G.play if you only want it to be scored cards.

daring fern
# iron haven

Your checking context.individual and context.cardarea == G.jokers which never happen at the same time.

iron haven
#

so I have to add it to all 11 jokers? ok

daring fern
iron haven
faint yacht
#

If you are upgrading when a straight is played, why not if context.before and context.cardarea == G.jokers? (Similiar to how Space Joekr does it.)

iron haven
#

what's the different between play and played?

wintry solar
#

You don’t need area checks on jokers like that

#

Unless it’s an edition you shouldn’t ever need to check it’s in G.jokers

faint yacht
#

if context.before and context.scoring_name == 'Straight', oop.

wintry solar
#

I’d do next(context.poker_hands[“Straight”])

iron haven
faint yacht
#

-# I'm very much outta fumes, gonna hit the hay.

ruby lily
#

Im getting an error here telling me something wants a table but is getting a string instead. does anyone know where that would be?

SMODS.Stake{
    key = 'royal',

--    unlocked_stake = 'ocho_stake',
    applied_stakes = {'gold'},
    above_stake = 'gold',
--[[
    modifiers = function()
        G.GAME.modifiers.enable_scattering_in_shop = true
    end,
]]
    colour = HEX('f9d041'),

    pos = {x = 0, y = 0},
    sticker_pos = {x = 0, y = 0},
    atlas = 'stakes',
    sticker_atlas = 'stake_stickers',
    loc_txt = {
        name = 'Royal',
        text = 'Royal Description!',
        sticker = {
            name = 'Royal',
            text = 'Royal Stake wowee',
        },
    },
}
iron haven
#

I'll take a break today..

sturdy compass
ruby lily
icy oak
#

anyone knows how to access/check the background color of the lvl

#

niche question

versed swan
#

How do you change a Joker with a fancy flip animation like Death, Strength, etc does?

maiden phoenix
icy oak
ruby lily
#

whats the function to set a cards rank? set_ranks() isnt it

maiden phoenix
#

Try SMODS.change_base

ruby lily
#

im trying to put it here

maiden phoenix
#

set_ranks isn't used for that, it doesn't even take parameters

ruby lily
#

thats fine, what can i use instead to change the selected card into another rank, i tried using SMODS.change_base with no luck

maiden phoenix
#

assert(SMODS.change_base(card, nil, rank))

ruby lily
#

oh i see

maiden phoenix
#

the rank has to be the card base value

hushed field
ruby lily
#

is there a place i can read abt all the functions

maiden phoenix
#

Yea in the utils file of SMODS' code

hushed field
#

nope! The source code isn't documented in that way. Though the functions you'll wanna use are documented on the SMODS wiki, with a lot of info on the utility page https://github.com/Steamodded/smods/wiki/Utility

GitHub

A Balatro Modding Framework. Contribute to Steamodded/smods development by creating an account on GitHub.

daring fern
#

How does one make a poker hand example contain enhancements?

ruby lily
maiden phoenix
#

Check Steamodded\src\utils

ruby lily
#

alr

maiden phoenix
#

For vanilla functions it's slightly harder since they're scattered around

ruby lily
#

o yea i see the utils, ty 🫡

#

btw that did work

#

btw is there a way to have custom ranks not appear in every deck by default? i dont see anything on it in the documentation

ruby lily
#

oh i missed that on the docs

maiden phoenix
#

Yea it should look like (taken from Bunco)

in_pool = function(self, args)
        if args and args.initial_deck then
            return false
        end
    end
ruby lily
#

o nice

#

ive been referencing bunco a lot

lavish lake
#

So Im making a mod called Bun Co. (definitely not Bunco) and I was wondering if my joker ideas headed in the right direction. Here they are atm:
Bun
When fused with another Bun, create a Sandwich
Sandwich
Gains +5 Mult per enhanced card played and scored, self destructs at 100 Mult
Toaster
Creates a Toast each Ante
Toast
When fused with another Toast, create an Endless Sandwich
Endless Sandwich
Gains +5 Mult per enhanced card played and scored,
1 in 100 chance that this card self destructs at the end of round

lavish lake
reef belfry
#

how do i make it so it goes through each card rather than instantly changing every card to a suit...

#

ah...

#

i see where i was wrong

long urchin
#

is there a way to move an object using code? Only the offset code isnt working, the rest is perfectly fine

            context.shop_card.config.center = G.P_CENTERS[packselect]
            context.shop_card:set_ability(context.shop_card.config.center)
            context.shop_card.children.center.scale.x = 71 * 0.8059
            context.shop_card.children.center.scale.y = 95 * 0.8059
            context.shop_card.children.center.offset.x = context.shop_card.children.center.offset.x * -2
            context.shop_card.children.center.offset.y = context.shop_card.children.center.offset.y * -2
            context.shop_card:set_cost(G.P_CENTERS[packselect].cost)```
thin anchor
#

would this be correct for giving custom rarities values?

reef bolt
#

hoi, new to modding - I'm currently trying to get a joker effect working but for some reason I seemed to have not done it properly

the intended effect is to create a negative spectral if your played hand has Foil and an Ace, and as far as I'm aware, the check is correct, but... not the "making a consumable" part

daring fern
#

And you would have to check separately.

ruby lily
#

how do i add cards to the playing card deck? i tried G.playing_cards:emplace(card) but "playing_cards" doesnt seem to be right

gusty peak
#

G.deck

daring fern
ruby lily
#

what are the parameters?

#

or do i just tag that on instead

daring fern
#

create_playing_card({front = 'S_A', center = G.P_CENTERS['m_stone']}, G.deck)

ruby lily
#

ill give it a go rn

cyan lagoon
#

how do i use context.repetition to retrigger enhanced cards?

daring fern
cyan lagoon
daring fern
# cyan lagoon

My mistake it's SMODS.get_enhancements(context.other_card)

cyan lagoon
#

works

#

thanks

reef belfry
#

does G.play.cards base every card suit in your hand?

daring fern
reef belfry
#

like

#

well not necessarily suits

#

just its values n stuff

#

like enhancements suits rank etc

#

if i have something that checks if its hearts does it check every card played in that hand

daring fern
reef belfry
#

so like

#

EVERY card

#

how do you uh... make it so it checks the scored card

daring fern
thin anchor
#

is there a list of all of the custom rarities people have made

daring fern
thin anchor
daring fern
thin anchor
#

doh

reef bolt
reef belfry
daring fern
daring fern
bold sleet
reef belfry
#

rah..

unborn bay
#

you can probably reference card.lua for more info about events

#

probably reference how tarots do the funny animation

bold sleet
#

...or you can check the SMODS documentation...

#

Half of the times checking the source code isn't useful because the game makes half of the stuff work via a completely different way.

#

Or that's what I found so far.

late basin
#

How would you detect how many of a specific card are in your deck (like the way Steel Joker and Cloud 9 do it)? The Steammodded documentation is my best friend but I'm having a hard time finding this one

glad osprey
#

card.lua

#

ctrl+f Steel Joker

daring fern
#

Change the has_enhancement to the requirement you are looking for.

cursive sentinel
#

Is it possible to have a permanent effect on cards like the hiker but on something else than chips?

distant gate
#

I am trying to make a joker that has the splash effect (all cards score) but I can't seem to figure it out (I've tried looking through the pokermon code but couldn't find anything) Does anybody know how to make this work?

daring fern
glad osprey
#

genuinely source code is a savior 🙏

distant gate
glad osprey
#

ah

#

figured it would

#

most likely needs a patch then

#

i think

unborn bay
#

lovely patch ,,,,,

red flower
glad osprey
#

evil splash: no cards are scored

thin anchor
#

for some reason this code doesnt work when i have cryptid installed
can anyone tell me why?

glad osprey
#

cryptid patches it to do smth and that breaks shit

thin anchor
#

oh

glad osprey
#

i had this issue too 😔

thin anchor
#

how would i make it compatable

glad osprey
#

is there a crash

thin anchor
#

no it just doesnt do anything

glad osprey
#

oh

#

oh you never define sum

#

before to do add local sum = 0

thin anchor
#

are you sure

glad osprey
#

fuck nvrm

daring fern
glad osprey
#

try having it print the rarity it gets

#

and what that rarity is from the table

#

so

print(J.config.center.rarity)
print(rarities[J.config.center.rarity])
reef belfry
#

well uh now it just makes the first card a spade..

#

i know its probably in the upper part but im too stupid to actually know what to change it with

glad osprey
#

are there all four prints?

reef belfry
#

whar..

glad osprey
#

you have it print when it changes

#

this should have printed that four times

red flower
reef belfry
#

when the played card isnt a heart...

daring fern
red flower
#

returning false in an event just makes it repeat again iirc

glad osprey
#

you already check for that

thin anchor
#

no none nothing

reef belfry
#

oh..

thin anchor
glad osprey
#

no put it in the loop lol

glad osprey
bold sleet
#

guys 👆 idk you've been using it a lot for the past 10 minutes

thin anchor
glad osprey
#

ah

thin anchor
#

sorry

glad osprey
#

maybe try removing the check for card area

#

it should work fine then

thin anchor
#

ok yeah

#

thank you!!!!

glad osprey
#

lol

#

yea ive made plenty of decks

#

too many one might say

thin anchor
#

too many decks:

#

i like your mod

#

its pretty neat

glad osprey
#

one might even say neato-

glad osprey
#

feel free to steal tmd's code if needed

#

i did not spend that long figuring out how to do stuff just for it to be used for my mod exclusively

wooden nexus
#

Okay question

#

SMODS.load_file('versions/0.8.6.lua') I did this right, right?

glad osprey
#

put it in an assert

#

so

crisp coral
#

imagine asserting

wooden nexus
#

assert?

glad osprey
#
assert(SMODS.load_file('versions/0.8.6.lua')()
wooden nexus
#

ok

thin anchor
#

how would i create a custom color

#

for badges and such

wooden nexus
#

ok it works now, thanks

daring fern
wooden nexus
#

Also question: Is it possible for me to unlock and lock cards just by having a specific config?

wooden nexus
#

Yeah, I want to make it so that one of the requirements to unlock the jokers from a version is to, y'know, turn it on in the config

glad osprey
#

oh that

#

i just add a dependancy that doesnt exist

wooden nexus
#

yeah, but i don't want to REMOVE the joker from the collection

glad osprey
#

ah

candid sleet
#

extremely new to modding but i'm following that one tutorial by artmuncher
right now i'm just trying to make a simple joker that adds 30 chips when hand is played but the end goal for this joker is to add 30 chips for each face card in hand, i tried setting that up yesterday but it was crashing the game on load, i've tried pulling back stuff from it since, but it's still crashing on load. if anyone has any advice i'd really appreciate it. sorry this is basic stuff i am just lost here

thin anchor
#

is this how i would give a custon rarity to a joker

wooden nexus
daring fern
#

Also you need your prefix.

wooden nexus
#

btw for all those wondering

#

Though I also want to be able to lock 1.0.1o later on

glad osprey
#

also need an SMODS.Rarity for the rarity

cursive sentinel
daring fern
cursive sentinel
#

it first counts its gold, then upgrade it, even though i have the same temporality as hiker, or am i crazy and hiker actually doesnt count the chip added on the round its added on?

#

okok im crazy then ,thank you

ruby delta
#

@daring fern please can you help me with only 1 joker it's a very small bug,

This one joker I am getting an issue with this error

Oops! The game crashed:
[SMODS _ "src/utils.lua"]:347: bad argument #1 to 'pairs' (table expected, got nil)

whenever I press New Run after the Game over screen or from the Options, It's happening just after the cards get burnt/destroyed

worldly thicket
#

is this how to make a new playing card?

ruby delta
# daring fern What is your code?

SMODS.Joker {
key = 'j_TeamRWBY_Yang_yang',
loc_txt = {
name = 'Yang',
text = {
"First hand each round is {C:attention}burned{}",
"{C:mult}+{} Mult per burned card",
"added to {C:attention}final played card{}"
}
},
rarity = 2,
cost = 8,
atlas = 'j_TeamRWBY_Yang_yang',
pos = { x = 0, y = 0 },
config = {mult_bonus = 0},

calculate = function(self, card, context)
    card.ability.config = card.ability.config or {
        mult_bonus = 0,
        marked_for_burn = false,
        cards_to_burn = {}
    }
    local config = card.ability.config

    if context.end_of_round then
        config.marked_for_burn = false
        config.cards_to_burn = {}
        return {}
    end

    if context.before and not context.blueprint then
        if G.GAME.current_round and G.GAME.current_round.hands_played == 0 then
            config.marked_for_burn = true
            config.cards_to_burn = {}
            for _, c in ipairs(G.play.cards) do
                table.insert(config.cards_to_burn, {
                    card = c,
                    pos = {x = c.T.x, y = c.T.y}
                })
            end
        end
    end

There is more

daring fern
ruby delta
#

if context.after and config.marked_for_burn then
if #config.cards_to_burn > 0 then
config.mult_bonus = (config.mult_bonus or 0) + #config.cards_to_burn

            G.E_MANAGER:add_event(Event({
                trigger = 'after',
                delay = 0.1,
                func = function()
                    for _, data in ipairs(config.cards_to_burn) do
                        local c = data.card
                        if c and not c.removed then
                            c.vel_x = 0
                            c.vel_y = 0
                            c.rot = 0
                            c.rot_vel = 0
                            c.T.x = data.pos.x
                            c.T.y = data.pos.y
#

There is more

worldly thicket
ruby delta
# ruby delta if context.after and config.marked_for_burn then if #config.cards_to...

c.states.visible = true
c.children.phantom = nil
c:start_dissolve(nil, true)
end
end
return true
end
}))

            G.E_MANAGER:add_event(Event({
                trigger = 'after',
                delay = 0.8,
                func = function()
                    for _, data in ipairs(config.cards_to_burn) do
                        if data.card and not data.card.removed then
                            data.card:remove_from_deck('destroyed')
                           G.deck.config.card_limit = G.deck.config.card_limit - 1
                        end
                    end
                    config.cards_to_burn = {}
                    card_eval_status_text(card, 'extra', nil, nil, nil, {
                        message = config.mult_bonus .. ' Total Burned!',
                        colour = G.C.FILTER
                    })
                    return true
                end
            }))

            config.marked_for_burn = false
        end
    end

    if context.joker_main and config.mult_bonus > 0 then
        return {
            mult = config.mult_bonus,
            card_end = true
        }
    end

    return {}
end

}

#

@daring fern ☝️

daring fern
#

@worldly thicket

worldly thicket
#

what about for a random suit and rank?

zealous glen
worldly thicket
#

do I do pseudorandom, as I was looking at how the Grim spectral does it

ruby delta
#

@daring fern I sent u Lua file on dms

worldly thicket
#

Also someone told me earlier to get Intellisense I need to add SMODS to my project but how do I do that in VSCode

daring fern
worldly thicket
#

I add the "Steammodded" folder right?

daring fern
worldly thicket
daring fern
wooden nexus
#

So another weird question:

        if _center.name == 'Half Joker' and (_center.discovered or self.bypass_discovery_center) then 
            self.children.center.scale.y = self.children.center.scale.y/1.7
        end

If Let's say I don't wanna use the Center's name but its key, is that possible?

daring fern
wooden nexus
#

ty

#

strange, it didn't work

#
                self.children.center.scale.y = self.children.center.scale.y/1.7
            end```
wooden nexus
#

card.lua as a lovely patch?

daring fern
wooden nexus
#

Well the problem is that i can't use the name, it's already half joker in the localization so that it doesn't break the original

worldly thicket
#

I used the Balatro Mod Manager

daring fern
daring fern
wooden nexus
worldly thicket
daring fern
wooden nexus
#

huh... didn't think about that. might make porting code a bit easier

#

if it WORKED, smh game

worldly thicket
daring fern
wooden nexus
#

i know there's code missing in the screenshot, that's on purpose

#

But did i do the name thing right?

storm wharf
#

what's the context for checking the number of jokers you have?

worldly thicket
daring fern
worldly thicket
#

sorry if I'm annoying you btw

daring fern
worldly thicket
#

Yes

daring fern
worldly thicket
hard needle
hard needle
daring fern
worldly thicket
#

Also did not do anything

daring fern
worldly thicket
storm wharf
#

how do you check for the current number of jokers you have?

worldly thicket
#

Now back to my original question, do I do a pseudorandom for the cards' suits and ranks?

daring fern
ruby delta
cursive sentinel
#

I think i already have my answer, but would there be a way to make a pareidolia like effect on a specific rank instead of is_face?

zealous glen
#

Not exactly

#

you could make every Rank the same (replacing the original)

cursive sentinel
#

wdym?

digital niche
#

in this, where is the enhancement set?

cursive sentinel
#

basically i would like to make card count as kings (so not contradictory with pareidolia)

#

but the way pareidolia is done is weird asf

zealous glen
#

and I'm saying you can make every card a King

cursive sentinel
#

how would i?

#

im really debuting, started about a week ago

hard needle
#

has someone re-made smeared joker with steamodded?

zealous glen
#

hooking the function that gets the id I think

zealous glen
daring fern
hard needle
#

i want to see how they make cards count as other suits

zealous glen
#

I made Chimera

worldly thicket
hard needle
cursive sentinel
#

i'm not sure i understand ^^; get id on card played and then i return (i dont know how) the id i want (without changing the card)?

zealous glen
digital niche
zealous glen
hard needle
daring fern
digital niche
# sonic cedar

if i have an enhancement list, what would i put instead of "m_stone"?

zealous glen
zealous glen
hard needle
worldly thicket
#

I tried using my consumable and got this crash

daring fern
daring fern
worldly thicket
#

I just got this crash now

daring fern
ruby delta
#

But I am getting this error

#

(whenever I burn/destroy the cards and press new run either on game over menu or options menu) @daring fern

cursive sentinel
daring fern
wintry solar
#

Don’t do that

#

They will scale ridiculously fast

worldly thicket
daring fern
#

Is there a way to put a poker hand above all other hands?

digital niche
#

am i missing something?

#

trying to do like a bonus enhancement

#

but with +80 chips

wintry solar
#

Return chips = …

digital niche
#

OH CHIPS, thought it was bonus

red flower
digital niche
red flower
#

oh yeah then it's chips

#

dont point at me, eremel said it

digital niche
#

if i want to return both chips and mult i just add a comma then mult = card.ability.extra.mult?

wintry solar
#

Yes

worldly thicket
#

Does this look right,

cursive sentinel
#

im trying to find where the code for the joker maximized of cryptid is, i dont seem to find it, since it has something similar to pareidolia

cursive sentinel
#

thank you!

#

although is it not in calculate? i haven't done a joker whose effect wasn't in the calculate function before, is that any different?

zealous glen
#

yes

#

this is a hook

#

of get_id

#

like I told you to do ;P

cursive sentinel
#

but i dont know what a hook is :c

#

ive not put the code of a joker outside of its smods.joker yet

zealous glen
#

instead, you save the original function, then you overwrite it, but you include the saved copy inside

worldly thicket
#

I got this crash again, it started after I removed the G.hand:emplace(newcard)

cursive sentinel
#

i really try to but i dont understand half the words, perhaps i should try doing smth else x)

modern kindle
#

hello besties

zealous glen
#

get_id sends a courier to delive a message, but if you hook them, you interrupt the courier which you can replace with your own courier or you can let them keep going

#

like a member of the mafia taking control of the courier trade

cursive sentinel
#

and the get id doesnt work in calculate?

zealous glen
zealous glen
modern kindle
modern kindle
#

hope you are well

cursive sentinel
zealous glen
zealous glen
cursive sentinel
#

looking at pareidolia and maximized, they're in totally different places

modern kindle
#

im don alright, took a nice lil shower so im hanging out now

cursive sentinel
#

and not in the same structure as smods im used to

zealous glen
worldly thicket
#

and I get the same crash when I add the emplace back

faint yacht
cursive sentinel
zealous glen
#

no

red flower
#

cryptid puts it in there because they do some weird stuff when loading objects

worldly thicket
cursive sentinel
#

in where should i put it in then? and if somewhere else, does the structure need to change too?

zealous glen
#

they just put it next to it

#

but outside

cursive sentinel
#

it seems in "local maximized"

zealous glen
#

whoever keeps pointing at me

cursive sentinel
#

in misc_joker.lua

zealous glen
faint yacht
cursive sentinel
#

but the whole way it is written looks like none of the mods ive lurked over before, thats why i struggle understanding it

red flower
zealous glen
worldly thicket
faint yacht
zealous glen
#

me too

faint yacht
cursive sentinel
#

would love to!

faint yacht
cursive sentinel
#

so i can just put it outside my smods.joker

#

not needing anything to surround it?

worldly thicket
#

And when I hover over one of the face down cards it does this

cursive sentinel
#

ok will try like this

cursive sentinel
zealous glen
#

I do it to organize them

worldly thicket
#

By removing the emplace I got it to work, however the cards are random despite me putting the front = ['H_Q']

zealous glen
#

I could also choose to only add some hooks

#

But I have sorta changed my mind about implementing a system where that would make sense

cursive sentinel
#

okok

#

will try smth based on cryptid, toga and yours

#

if i use the base of 3mods thats work, that should be fine...Eventually

primal igloo
#

How do you add new hands on balatro?

daring fern
cursive sentinel
#

tried this but it doesn't do anything, i have totally misunderstood it?

local getidref = Card.get_id
function Card:get_id()
    local id = getidref(self)
    if id == nil then
        id = 13
    end
    if next(SMODS.find_card('j_dauphine')) then
        if id <= 12 or id == 14 then
            id = 13
        end
    end
    return id
end```
daring fern
cursive sentinel
#

also i ask this now, but can i add a suit condition in this same piece? (id guess yes)

cursive sentinel
daring fern
worldly thicket
#

Numbered cards don't need to be like this right '2'?

#

like they don't need to be put in quotes when in a pseudorandom