#💻・modding-dev

1 messages · Page 168 of 1

solar eagle
#

id test it to make sure, didnt test the code i sent you since i need to track down a bug in my mod lol

graceful magnet
#

do I just, run the game from Steam now?

solar eagle
#

is steamodded installed n everything?

ionic verge
#

ok well i looked through every lovely file and didnt find it

graceful magnet
ionic verge
#

wait nvm i thought of something

graceful magnet
#

oop wait hold on

solar eagle
graceful magnet
#

my ass forgot the Lovely Injector step!!

solar eagle
#

yea thats the most important one lol

ionic verge
daring stratus
#

I was looking through cryptid for how they resize jokers and saw they did it through lovley TOML shenanigans, is there a way to do it just through steamodded LUA files?

solar eagle
#

doubt it

graceful magnet
solar eagle
#

looks right!

graceful magnet
#

banger!

solar eagle
#

ah

#

card.ability.extra.pool = card.ability.extra.pool
not +

solar eagle
#

which is line 48?

daring stratus
graceful magnet
#

great question lemme open this in something that tells me

graceful magnet
solar eagle
#

missing an end

#

place it after the first return

#
                card.ability.extra.pool + card.ability.extra.pool + card.ability.extra.mult_add
            return {
                extra = { message = localize('k_upgrade_ex'), colour = G.C.MULT },
                colour = G.C.MULT,
                card = card
            }
end```
graceful magnet
#

oop, went to view it in Collection

solar eagle
#

do you have an atlas defined for the art?

graceful magnet
#

ah, noo, it is currently just a single card png

solar eagle
#

where is it in the mod? and do you have an SMODS.Atlas defined so smods knows how to render it lol

graceful magnet
solar eagle
#

i've got a whole bunch set up, you can have many cards per atlas

#

this is what my joker atlas looks like

graceful magnet
solar eagle
#

you dropped config = { extra = { mult_add = 1, pool = 0 } }, this somewhere

#

its kinda important

graceful magnet
#

whoops

#

okay! It

shouldn't say nil

BUT!!

plush cove
#

what are your loc_vars set to?

solar eagle
#

so

#
            "scored face card",
            "{C:inactive}(Currently {C:mult}+#2#{C:inactive} Mult)"```
#

is correct

graceful magnet
cerulean rose
ionic verge
#

i actually also checked that too

#

nothin

solar eagle
#

is it possible to have jokers do things while you're selecting cards?

ionic verge
#

youd need to patch in a context for that i think

#

but no it doesnt sound impossible

solar eagle
#

figures

#

just trying to make it so a joker can tell you the mult it'll provide before you score it since it changes based on ur cards

#

to the game source

#

what determines contexts and the like?

obtuse silo
#

what is this meant to mean?

cerulean rose
cerulean rose
obtuse silo
#

i see
so if the file is called "jokers.png" and it is in subfolder "assets", should the path just be "jokers.png"?

#

nvm still got the same error

solar eagle
#

oh nice i think i can

#

hm, i can update loc_txt but the joker doesn't re-render

novel dagger
#

I'm trying to make every 4 scored give 4X mult but when I select a blind the game crashes and says,[SMODS GaryJOKER "main.lua"]:46: attempt to index field 'other_card' (a nil value) (Line 46 is if context.other_card:get_id() == 4 then)

solar eagle
#

can you send the calculate function?

obtuse silo
novel dagger
solar eagle
#

you're missing the part where you make sure you're in the right context

#

place this around everything else:

#

place this if statement first:
if context.individual and context.cardarea == G.play and not SMODS.has_no_rank(context.other_card) then

obtuse silo
#

i got joker working!!
only issue is the text isn't loading-

gusty sequoia
#

:0

solar eagle
obtuse silo
novel dagger
#

It keeps telling me [SMODS _ "src/loader.lua"]:571: [SMODS GaryJOKER "main.lua"]:54: unexpected symbol near ','

novel dagger
#

bruh i fixed it nvm

obtuse silo
novel dagger
#

Now it's saying [SMODS GaryJOKER "main.lua"]:49: attempt to index field 'ability' (a nil value)

solar eagle
#

as a rule of thumb, use card instead of self in steamodded

#

use card = card in the return as well

novel dagger
#

the 4s ain't giving the mult now

#

I got it

cursive glade
#

Can someone explain to me like I'm a dunce how SMODS.PokerHand and SMODS.PokerHandPart are supposed to interact to detect a custom played hand? Give me a blank example with the required params or something? Been bashing my head against it all day today...

wintry solar
fringe ember
#

How would I do it so it gives x2 mult and not +2 mult when heart faces are scored?

graceful magnet
#

hell yeah

wintry solar
fringe ember
#

makes sense

graceful magnet
paper zealot
#

Anyone able to give this a try on Steam Deck or OSX? Just want to make sure it's stable on all platforms over the weekend, since I won't have time next week to fix anything.

fringe ember
#

now the problem is drawing a hand with heart faces

fringe ember
#

also dumb question, do we have a list/reference of text formatting things? like how 'Played Face cards with Diamond suit give {C:mult}x#1#{} Mult when scored.' has {C:mult}

#

I tried looking in the .zip luas, no dice

plush cove
#

there are definitely more guidelines but that's the most basic explanation I can give

fringe ember
#

Yes

#

Do we have a reference of what does what

#

like how **this** does bold

#

That's what I'm asking

#

Specifically looking for the ones that does this text [with or without the suit symbol]

novel dagger
#

How do I check how many of a card I have in my full deck

fringe ember
stray warren
#

under the loc_colours function in misc_functions

#

And you can add your own colors by adding to that list

scarlet spire
#

so, I have an enhancement for a card where the individual card gains 1.5 Mult when played and unscoring, but it isn't increasing under those circumstances. is this calculate function correct for this?

stray warren
#

I don't think context.unscoring is a thing

scarlet spire
#

hmm

#

cryptid uses it for the green seal

stray warren
#

they probably defined that context in the mod

#

But it's not a thing in SMODS by itself

scarlet spire
#

ahh okay i'll see where I can find that then

fringe ember
stray warren
scarlet spire
#

hmm

fringe ember
#

i'm blind as hell thanks

stray warren
#

all good lol

scarlet spire
#

what is the usage license for cryptid's code? this patch is pretty much exactly what I need, but I obviously don't want to just Steal it

orchid thunder
#

any help?

tepid crow
# orchid thunder any help?

The error implies it's an issue with Grim, but I can't tell for sure.
You probably shouldn't be enabling this many mods when trying to debug anyway

#

try reducing it to only your mod (and maybe debugplus or whatever), then making a minimum reproducible example that crashes

tepid crow
#

what's unclear about that message 🤔

paper zealot
orchid thunder
#

how i broke grim

tepid crow
#

like I said, I'm not even sure you did

orchid thunder
#

ok nvm

#

this is now complaining about zodiac deck

tepid crow
#

look man I wouldn't be reading that crash screen unless there's less than 5 mods enabled

orchid thunder
#

want me to disable everything

tepid crow
#

basically yeah

#

something something minimum reproducible example

cursive glade
#

For some reason I can't get the example to show up for my custom SMODS.PokerHand. 🤔

normal crest
#

What's your example code

cursive glade
#
    example = {
        {'C_14', true},
        {'S_14', true},
        {'C_8', true},
        {'S_8', true},
        {'H_14', false},
    },
normal crest
#

Try 'C_Ace' instead

#

Same for the other 14s

tepid crow
#

what does royal flush use?

#

(iirc it's 'C_A'? but idk)

normal crest
#

Could be

fringe ember
#

so i might be a bit goofy, but how would i add additional face card sets? Like, not an override of the default face textures but as a separate one [like how Among Us and Cult of the Lamb have their sets]

normal crest
#

Oh yeah it's the first letter only

fringe ember
#

I know how to do it via texture override but not in adding sets

cursive glade
#

changed it to *_A for the aces, still not showing up. Not sure what's going on.

#

also tried _Ace

normal crest
#

it is definitely _A

cursive glade
# normal crest it is definitely _A
    example = {
        {'C_A', true},
        {'S_A', true},
        {'C_8', true},
        {'S_8', true},
        {'H_A', false}
    },

That's how it's written now. Same issue.
Does it take anything from PokerHandPart into account? Or just what's in example = {}?

normal crest
#

Probably only what's in example

#

I am not sure what the issue could be

#

Did you start a new run, just in case

cursive glade
#

No, I'll try that. One sec.

tepid crow
# orchid thunder happy

I'm just trying to explain how I would approach debugging this 😅

have you gotten a chance to look at misc_functions.lua:1689 yet?

orchid thunder
#

ye

sage reef
#

hey there yall, so what do yall use in particular to mod the game itself? i am new to the concept as a whole so any way to get a start would help

cursive glade
cursive glade
normal crest
#

you misspelled labels

sage reef
normal crest
orchid thunder
tepid crow
orchid thunder
orchid thunder
tepid crow
#

center's definition is basically equivalent to G.localization.<group>.<set>.<center>*

orchid thunder
#

so group is the mod

#

set is the key and center is idfk

tepid crow
#

wait hold on I might've messed that up 🤔

#

there we go

orchid thunder
#

oh

normal crest
orchid thunder
#

its not?

normal crest
#

honestly your loc file is a bit messily formatted

tepid crow
normal crest
#

and yes it goes to misc.labels

orchid thunder
#

: |||

normal crest
#

you even have this here

orchid thunder
#

yeah im a fucking idiot

#

its more progress

#

cant get the text to work though

tepid crow
normal crest
#

can you send your full generate_ui code

orchid thunder
#

ye

orchid thunder
normal crest
#

yeah I've been looking at it and tbh I do not really understand what it's doing

tepid crow
#

I hate generate_ui code ngl

#

I have no idea what it's doing most of the time and I need to go 3 balatro files/functions deep to understand small parts

orchid thunder
#

i just want to make a new gameobject that is like seals i dont understand

tepid crow
#

anyway, can't you fallback on SMODS.Center.generate_ui?

#

(that's what I do for my sleeves anyway)

orchid thunder
#

maybe can i take a look at that code

tepid crow
#

oh and btw, don't forget to change the name of your obj to something other than SMODS.Sigil

#

(the SMODS part to be clear; Sigil is fine)

orchid thunder
#

why?

tepid crow
#

it gives people the wrong impression that SMODS is providing the Object instead of you

orchid thunder
#

i can do that?

#

i though smods was for the function

tepid crow
#

I just do CardSleeves.Sleeve = SMODS.Center:extend {

normal crest
#

Yeah don't put stuff on SMODS

tepid crow
#

so I suggest you do something like SigilsMod.Sigil or whatever you prefer as name

orchid thunder
#

yeah il do that

scarlet spire
#

alright I'm just going with a different "on discard" functionality, though I'm also seemingly messing up this as well, getting this error when discarding it

tepid crow
#

SigilsMod isn't defined

#

mine's CardSleeves = SMODS.current_mod

orchid thunder
#

Oh

scarlet spire
tepid crow
#

(at least, that's how you do it for jokers; I'm assuming it's the same for enhancements?)

orchid thunder
tepid crow
#

me neither tbh it just randomly worked out for me

scarlet spire
fringe ember
scarlet spire
#

doing that caused it to crash

fringe ember
#

thank

tepid crow
scarlet spire
#

works now, thank you!

orchid thunder
orchid thunder
#

ik

#

i was just saying i dont know what to do at this point

tepid crow
#

try taking a break, that's what I usually did when I couldn't figure out balatro's way too complex UI

smoky talon
#

im making a card that has a 1 in 10 chance to spawn a soul card. im adding the random element later, and trying to get the spawning working first. I can't get it to be usable though, and the use button is greyed out. all the consumables ive made so far are ones that only activate when selecting cards so im not used to coding for ones that just get used whenever. What am i missing?

normal crest
#

@fringe ember

fringe ember
#

o7

normal crest
#

and you can define whatever custom logic you want in there

#

return true if it can be used

smoky talon
#

it works

#

now how do i add a 1 in 10 chance?

normal crest
smoky talon
#

isnt it something like pseudorandom < 0.1?

#

k

normal crest
smoky talon
#

perfect

normal crest
#

if you want it to be compatible with oops all 6s and other jokers like that, use G.GAME.probabilities.normal

#

which is usually the first number you see in many jokers that say 1 in x chance

#

and then you can just do pseudorandom < G.GAME.probabilities.normal / 10

#

also you need to pass a string to the pseudorandom function as a seed

smoky talon
#

i dont understand what you mean by that

normal crest
#

pseudorandom("put whatever here")

smoky talon
#

why is the pseudorandom highlighed here?

stray warren
#

do you have pseudorandom in a find box in VSCode? That's an IDE thing, not a code check warning

smoky talon
#

ah im stupid nvm

stray warren
#

although you aren't using it right there now that I see

smoky talon
#

ok it works now

#

thanks so much

#

now i just need the wheel nope text lol

#

i added the nope text but it spawns in the top left of the screen

#

how do i fix that?

fringe ember
#

so. i don't know what i did but now the deck skin's invis. gonna upload relevant code one sec

#

^ relevant png

normal crest
#

try changing 'lc' to 'def'

#

in palettes

#

if that doesn't do anything I can only imagine you setup your atlas incorrectly, make sure you have a 1x and 2x versions under assets and the path matches the file name

fringe ember
#

or just in general

normal crest
#

the key of the first palette

#

i'm not confident it'll do anything

#

but might as well try

fringe ember
#

yeah, i do have a 2x and 1x folder

#

nope, didn't do squat

normal crest
#

and both files have the same name in each folder

fringe ember
#

yes

#

it worked before

normal crest
#

do you have any other mods

fringe ember
#

uh.

#

only one, but it's my default reskin mod

normal crest
#

i am not sure then, maybe a recent steamodded update broke it? I doubt it but it could happen

fringe ember
#

wait a sec i think i see it

#

nope

normal crest
#

yeah I don't know what's wrong, hopefully someone else can help you

fringe ember
#

well that's new

normal crest
#

what'd you change

fringe ember
smoky talon
#

how would i change the money by a multiple of 10 or set it to a flat value? i dont know what variable the money uses.

normal crest
# fringe ember

you might need to include your mod prefix when putting the key directly into palettes

small moon
#

Is there any way to check when a function is called?

#

For example, if smth were to trigger whenever a card is debuffed, can you check when Card:set_debuff is called?

plush cove
#

if context.debuffed_hand and context.cardarea == G.play then

normal crest
small moon
paper zealot
# small moon Is there an example of hooking on the wiki?

It's more of a general Lua feature. This is a good explainer:
https://forums.kleientertainment.com/forums/topic/129557-tutorial-function-hooking-and-you/

Klei Entertainment Forums

In LUA, it is a very important concept to understand that everything is a variable and all variables may be edited in runtime. This includes functions. With modding other peoples' LUA files, like Klei's basegame code, you may find yourself wanting to run your code before or after the original fun...

#
YourMod.start_run_ref = Game.start_run
function Game:start_run(args)
  --do things immediately before Game.start_run here
  YourMod.start_run_ref(self, args)
  --do things after Game.start_run is called here
end
``` Would allow you to hook the `Game.start_run` function, for example
#

Just don't forget to call start_run_ref in your replacement function and return a relevant value otherwise you'll be effectively deleting the original function

cursive glade
#

Welp. Noob question, again.
How do I make a joker add to mult, or xmult when calculate meets the joker's requirements? is it in the calculate's return{}?

sullen fern
cerulean rose
plush cove
#

like if I wanted to take a function and have it trigger a Joker, how would I do that without using the pre-existing context feature (when there isn't one for my situation?)

random sleet
#

you can call SMODS.calculate_context with any context, including madeup ones you come up with

plush cove
#

so hypothetically, if I wanted a card that activated once the Plasma deck balanced itself (and was only accessible in the plasma deck), I could insert an SMODS.calculate_context({balanced = true}) after the balancing happens using lovely?

random sleet
#

i suppose

#

"balanced" might be a bit generic of a name

plush cove
#

well I don't actually plan to add any cards like that, it was just the first example that cropped up

random sleet
#

i'd recommend keeping your mod prefix on the context name, like i did here

#

that way you dont bump elbows with other mods

#

(hopefully)

plush cove
#

for sure

meager socket
#

How can I get current handsize (after modified by G.hand:change_size) ?
-# (I'm fixing other mod's bug actually)

scarlet spire
#

this enhancement calculate function adds 0.5 Mult to the card itself whenever the card is discarded, but for some reason it's adding it for every card I discard, so if I discard the ehnanced card alongside three other cards, the mult on it will go up by 2 instead of 0.5
I can kind of see the issue, but I'm not quite sure what to do in order to fix it

#

any ideas?

rose dragon
rose dragon
#

how can i get the current deck as a table?

frosty dock
#

G.GAME.selected_back

#

for the Back instance, that is

#

for the prototype, G.GAME.selected_back.effect.center

rose dragon
frosty dock
#

G.playing_cards is the table of all the cards in your full deck

#

G.deck.cards contains only the cards currently in your deck pile

sturdy compass
#

Holy shit I can't believe I got that to work

plush cove
rose dragon
sturdy compass
sturdy compass
rose dragon
sturdy compass
#

To the n-th degree now eviler

#

I genuinely can't believe I actually got this deck to work tho lmao

plush cove
sturdy compass
#

Oh I hate it lmao

plush cove
#

of course the blinds would have to be horribly scaled down

#

because it'd be literally impossible otherwise

rose dragon
sturdy compass
#

I have a challenge that scales blinds by X8 that people have beat so I think you might be fine lol

plush cove
#

root deck is also intended to be a shittier Plasma Deck

with that, your number becomes really big when the chips and mult balance out
with this, your number shrinks greatly lmao

plush cove
#

maybe I can also have it so that planet cards level up everything by two instead of just one

sturdy compass
#

Both of those honestly wouldn't be too hard to do

daring warren
plush cove
sturdy compass
plush cove
rose dragon
#

praying that talisman is a depo for the nuclear deck

foggy carbon
#

if I have a joker, card what do I do to card in order to properly use set_sprite_pos?
card:set_sprite_pos({x = 9, y = 2}) didn't work

plush cove
sturdy compass
rose dragon
plush cove
#

i feel like as a boss blind, it would kill most runs

sturdy compass
#

Suggest that to Cryptid lol

#

Sounds like a cryptid boss

rose dragon
plush cove
#

making the root deck and I'm realizing I have no idea how the hell to use the new calculate function in the way I want to

can anyone provide a brief idea of how the calculate function works in the context of a deck, and how I can convert this to not use the depreceated system?

plush cove
rose dragon
plush cove
#

yeah I like jetbrains

#

but also I want some help figuring out how calculate() works when it's used on a deck

#

yeah I'm scanning through the steamodded code and I'm still completely lost on how calculate() works when I use it on a back

sturdy compass
#

I take it you saw this part of the Back documentation?

plush cove
#

yup

foggy carbon
#

dunno if the odds seem balanced

sturdy compass
# plush cove yup

It looks to me you are trying to define your own trigger_effect function, which, as stated in the docs, is no longer supported

#

So instead of that, just check for context.context == ‘final_scoring_step’

foggy carbon
sturdy compass
#

I just noticed my bad

plush cove
#

with trigger_effect, there's a whole args thing built in, so that stuff's real simple

with this new calculate() function, i haven't found anything

foggy carbon
#

context.chips and context.mult?

sturdy compass
#

hand_chips and mult are global variables holding the current chip and mult values. I’d say try using those

rose dragon
foggy carbon
#

ahh

plush cove
wintry solar
#

Ahhh talisman how lovely you are

plush cove
#

i dont even have talisman enabled kekw

sturdy compass
#

Wtf lol

crisp coral
#

talisman moment

crisp coral
#

err

rose dragon
#
print(hand_chips)

prints a # for me

wintry solar
#

Oh, you’re making it a table then

plush cove
#

why

#

does it think

#

it is

#

a

#

table

#

if i cant figure this out ill just use the depreciated system LMAO

sturdy compass
plush cove
#

i genuinely dont know what to do about this

sturdy compass
#

Does the game actually accept that return?

wintry solar
#

It just won’t do anything with the hand chips part

sturdy compass
#

I think you should just be setting those values as opposed to returning them

plush cove
manic rune
plush cove
sturdy compass
plush cove
#

talisman_ready btw

frosty dock
#

you can use context.final_scoring_step instead if you want it to behave like joker calc

frosty dock
plush cove
wintry solar
#

Oh of course that’s why it complained at a table

plush cove
#

i had an inkling of what the issue was when I changed it to "return true" and it complained about it being a boolean

south folio
#

having trouble with it not counting the cards here

#

like. it should give +20 mult right out the bat right

rose dragon
south folio
#
    key = 'j_dafisha',
    loc_txt = {
        name = 'Dafisha',
        text = {
            'Gains {C:red}+#1#{} Mult',
            'for each {C:attention}8{} card in Full Deck',
            '{C:inactive}(Currently {C:red}+#2#{C:inactive} Mult)',
        },
    },
    atlas = 'Jokers',
    rarity = 2,
    cost = 3,
    unlocked = true,
    discovered = true,
    blueprint_compat = true,
    eternal_compat = true,
    perishable_compat = true,
    pos = {x = 9, y = 0},
    config = { extra = { mult = 0, mult_gain = 5 } },
    
    loc_vars = function(self, info_queue, card)
        return { vars = { card.ability.extra.mult_gain, card.ability.extra.mult } }
    end,

    calculate = function(self, card, context)

        local eight_count = 0
        for _, deck_card in ipairs(G.playing_cards) do
            local card_id = deck_card:get_id() or (deck_card.base and deck_card.base.id)
            if card_id == 8 then
                eight_count = eight_count + 1
            end
        end

        card.ability.extra.mult = eight_count * card.ability.extra.mult_gain

        if context.joker_main then
            return { mult = card.ability.extra.mult }
        end
    end,
}```
manic rune
#

if you want the "Currently +0 Mult" to update in real time, then you should probably use update instead of calculate

runic pecan
#

What about #G.deck.cards ?

#

Wait

#

Yeah, you should iter G.deck.cards instead of G.playing_cards

manic rune
#
update = function(self,card,dt)
        local eight_count = 0
        for _, deck_card in ipairs(G.deck.cards) do
            local card_id = deck_card:get_id() or (deck_card.base and deck_card.base.id)
            if card_id == 8 then
                eight_count = eight_count + 1
            end
        end
        card.ability.extra.mult = card.ability.extra.mult_gain * eight_count
end,
#

oh yeah, it should be deck instead

#

probably that, idk

manic rune
#

for the calculate part, you can just leave the context.joker_main there

runic pecan
south folio
#

I am intentionally making the prefix j_ yes

#

for the jokers

#

I think

runic pecan
#

Odd, but not illegal.

south folio
#

I think I just some mod do it and just kept that

runic pecan
south folio
#

wait, second j_?

runic pecan
plush cove
#

by default, your jokers are already named j_[prefix]_[jokername]

if you name it j_dafisha then it's gonna be j_[prefix]_j_dafisha

rose dragon
south folio
#

Oh

#

yeah I didn't know that

runic pecan
#

Nah you could keep it, as a style.
As I said, it's not illegal, it'd be just mildly inconvenient for yourself.

south folio
#

Ok finally it works, thanks y'all

wintry solar
#

Please don’t put counting effects in update

#

Just do the counting within joker main and loc vars

foggy carbon
zealous glen
foggy carbon
#

inb4 posts the code for cloud nine

wintry solar
#

Does that even do anything?

foggy carbon
# plush cove ?

no need to make a new function, plus, don't detect Talisman from SMODS since it's not a dependency

#

I'd argue the code that aure posted, while efficient, is so condensed as to be nearly illegible, but that could be solved with a few newlines

plush cove
wintry solar
# plush cove ?

This basically does what your function does but much cleaner and without making a new function. You just throw it anywhere in top level

#

And then you just wrap stuff in to_big instead of your new talisman ready function

plush cove
#

(General dependencies is a bunch of functions I like to re-use wrapped up into one file. I reload it every time I load a file so it's functions can be easily used)

random sleet
#

oh boy do i get to analyze some code

#

so basically that line reads as:

set to_big to itself
if to_big doesn't already exist, instead define it as the following function:
to_big = function(x)
  return x
end
which effectively just means that it becomes a pass-through for the number,
since Talisman isn't loaded (to_big would already exist!)
there's no "big" numbers to embiggen a number into so it remains as-is;
your code will work the same way if Talisman is or isn't loaded
(as long as you don't need to do anything too complicated)```
#

jimbo_spin hee hee hoo hoo jimbo_spin

#

i have solved nothing leaves

rapid trail
#

Ping me if you respond, but I just can't get this to work. Says it's expecting a }.

SMODS.Joker {
  key = 'ethereal_j',
  loc_txt = {
    name = 'Ethereal Joker',
    text = {
      "Each played Planet Card gives",
      "a Tarot Card"
    }
  },
  rarity = 1,
  atlas = 'vopjs',
  pos = {x = 1, y = 0 },
  cost = 6,
  loc_vars = function(self, info_queue, card)
  end,
  calculate = function(self, card, context)
    if context.using_consumeable then
      if context.consumeable.ability.set == "Planet" then
        local card = copy_card(pseudorandom_element('Tarot', G.consumeables, pseudoseed('ethereal_j')), nil)
        return {
          card:add_to_deck()
          G.consumeables:emplace(card)
          }
        }
      end
    end
  end
}
foggy carbon
wintry solar
#

You also don’t need to return those things

manic rune
#

i have a question, is i in this case "musketeer"?

#

for some reason, it wont run even bother printing "Phase 2" which is making me tweaking rn 😭

wintry solar
#

No

#

Use pairs not ipairs

manic rune
#

oh

#

ohh, thanks

rapid trail
vapid mango
#

why would the joker not be showing up here

wintry solar
#

show code

vapid mango
wintry solar
#

you have a second position value

vapid mango
#

Hm..

#

Which one should I get rid of here?

wintry solar
#

the 2nd one

manic rune
#

is it possible to make a booster pack which i can manipulate the odds of cards spawning in there?

vapid mango
#

atlas = "TheGorgonAtlas",
pos = { x = 0, y = 0 },

#

this one?

wintry solar
#

no keep that one

manic rune
#

not that

vapid mango
#

OH

#

That worked!

#

ty!

#

dumb lookin little guy

#

I wonder if there is a way that I can like

#

use the dissolve looking effect to make it look like the card is turning to stone

#

instead of what it does now

#

but the effect I have in mind is like, that dissolving-in visual the main card on the title screen does, over the card itself, giving way to the stone card texture

#

And potentially make the Stoned! pop up above the face cards themselves

signal glacier
vapid mango
#

Make it look like the stone is spreading onto it, yk?

signal glacier
#

fair enough

vapid mango
#

I just can't find anything in the steamodded api documentation that would let me do something like that

#

so if anyone has any idead/solutions for how to do this, I'd be happy to hear em

wintry solar
#

I'm not aware of that being possible

signal glacier
#

destroy the card in hand with that effect and quickly add a card to the deck which is the one that is going to be played

signal glacier
vapid mango
# signal glacier destroy the card in hand with that effect and quickly add a card to the deck whi...

My assumption was actually something like that!

I assumed the function for the main menu card exists somewhere in the game, so it would be possible for me to make it do that effect into a stone card, have that card placed directly over the face cards in hard with some sort of jank overlay, and then as soon as it's finished, it deletes the original face card and then stores the stone card into the deck

#

But that feels a little beyond smn that can be done with the current system

signal glacier
#

feel like it's gonna be a mess to code, but still possible nonethanless

wintry solar
#

that's not going to play nicely with effects that look at cards being added/removed

vapid mango
#

I figured as much

#

If I can't figure it out, I'll probably just go with the Midas style effect like Market suggested

manic rune
#

if i want to add a global variable, i assume i will need a patch for this?

maiden phoenix
#

Depends when you need that global, sometimes you can init it yourself

worthy stirrup
#

I have an idea but first I need to know, are you able to apply shaders to seals?

vocal verge
#

So you could play the card
Draw sprite
Turn card to stone
Dissolve sprite somehow
Tada

novel dagger
#

How do I check how many cards of 1 rank I have?

obtuse silo
#

got this error message when trying to look at a deck that was part of the mod

#

i know this is the offending code because when I removed it the mod worked normally

broken cliff
#

what u want to add, btw

obtuse silo
#

that's the odd thing
line 76 in this file is completely irrelevant

broken cliff
#

well is it a joker?

obtuse silo
#

yea
but this error occurs upon looking at a deck

#

i think this might be because i'm using the T: indicator to bring up the pop-ups

vapid mango
obtuse silo
broken cliff
#

maybe the deck isnt added properly?

#

idk.

#

maybe its bcuz theres no methods like calculate?

obtuse silo
#

maybe

#

ig they might be different from jokers in that way

broken cliff
#

like i think its bcuz of apply method missing

#

since most of the decks have it

#

like +1 hand, +1 discard, or getting a voucher/consumables

obtuse silo
#

probably
every joker has some sort of caveat to it

broken cliff
#

js put smth like apply(self,back)
end,
to the deck ur trynna add

urban veldt
#

`SMODS.Joker {
key = 'glyph_draft',
loc_txt = {
name = 'Glyph Draft',
text = {
"Gains {C:chips}+#2#{} Chips",
"if played hand",
"contains a {C:attention}Flush{}",
"{C:inactive}(Currently {C:chips}+#1#{C:inactive} Chips)"
}
},
config = { extra = { chips = 0, chip_gain = 10 } },
rarity = 1,
atlas = 'PowerOfTheGlyphs',
pos = { x = 1, y = 0 },
cost = 4,
loc_vars = function(self, info_queue, card)
return { vars = { card.ability.extra.chips, card.ability.extra.chip_gain } }
end,
calculate = function(self, card, context)
if context.joker_main then
return {
chip_mod = card.ability.extra.chips,
message = localize { type = 'variable', key = 'a_chips', vars = { card.ability.extra.chips } }
}
end

    if context.before and next(context.poker_hands['Flush']) and not context.blueprint then
        card.ability.extra.chips = card.ability.extra.chips + card.ability.extra.chip_gain
        return {
            message = 'Upgraded!',
            colour = G.C.CHIPS,
            card = card
        }
    end
end

}`

If I programmed this right, it's "gain 10 chips everytime you play a Flush"

#

Gonna test it, but is there any obvious glaring flaws?

broken cliff
#

prob bnot

broken cliff
#

well i based it off smods.back documentation

#

perhasp i was Wrong

young dew
#

help i've resized a joker but the stickers doesn't resize, i've done everything like wee joker and i don't understand what's the problem

plain wyvern
#

Is there a way to get/set chips/mult directly?

broken cliff
#

u can js use mult ig

#

but beware

#

if ur using talisman its a bignum

crisp coral
#

doesnt matter?

broken cliff
#

which could cause problems if ur wanna alter them in sum way ig
but in most cases it works fine

crisp coral
#

you can either do some math to get the chips/mult difference or use hand_chips and mult globals

broken cliff
# crisp coral doesnt matter?

i tried to alter it once
almost died

from what i got told in cryptid server, normal operations work fine with bignum

plain wyvern
#

oh, they're global, I didn't know lol

obtuse silo
# obtuse silo nope

okay so how do i unfuck the decks, we went from being able to play the game as long as i didn't look at them to not being able to play at all

broken cliff
#

wait hold on

#

are u making a deck skin

#

or what

obtuse silo
#

two new decks

#

one makes the mod's jokers more common

#

the other gives a bunch of stuff
-Eternal "Oops! All 6s"
-Two copies of Wheel Of Fortune
-Tarot Merchant
-starts you off with -10$

#

(yes, you start in debt with that deck)

dense vector
#

Even when you gamble into debt, you can still win it big

#

Just trust me

obtuse silo
#

that's literally the deck, omg..

pastel dagger
#

What's the safest way to change ingame sprites and then be able to revert it?

prisma loom
#

context.discard is for discarding but what is used to check if card is scored?

obtuse silo
prisma loom
wintry solar
#

dollars = -1

#

Oh wait

#

The money var of your joker

prisma loom
#

its a local var

#

money = 50

wintry solar
#

On the joker?

prisma loom
#

yeah

wintry solar
#

card.ability.extra.money = card.ability.extra.money - 1

#

Not in the return

obtuse silo
#

to recap
this code causes this error
can someone help

wintry solar
#

That’s just incorrect syntax

#

What are you trying to do?

fringe ember
#

still getting this error when trying to do the card skin part of the mod

prisma loom
#

what is the context?

obtuse silo
# wintry solar What are you trying to do?

ok, the first deck is to make the mod's jokers more likely to appear
the second deck adds a bunch of stuff, an eternal joker, two wheels of fortune, the tarot merchant voucher and starts you off with -$10

fringe ember
wintry solar
wintry solar
vapid mango
# vapid mango

Is there any way to make a joker only apply it's effect AFTER a card is scored?

Like, if I wanted this to score the face cards, then turn them to stone before they go back into the deck

dreamy thunder
#

how do i check if the played card has an enhancement or not? i have a joker which gives scored cards a random enhancement, but i dont want it to work if the card already has one

obtuse silo
wintry solar
smoky talon
#

what variable do i use to change the player's money?

wintry solar
south folio
#

just checking here from the example mod, from where does the mod call for the #2# there?

obtuse silo
lucid owl
obtuse silo
#

handhold me as much as necessary, i'm sorry

prisma loom
#

like The Tooth boss

lucid owl
wintry solar
lucid owl
# south folio got it

config declares the variables themselves, while loc_vars is what actually sets the variables for use in text descriptions by the game - so you could set a text variable to a value that isn't explicitly declared by the joker, it can be arithmetic or maybe the value of a function to do with other jokers or cards

prisma loom
#

idk how this timing is called

#

ig just right when hand is played

regal ether
#

what file do i mod in

wintry solar
dreamy thunder
#

right after i figured it out. Thanks though

regal ether
#

eugh lua 😭

wintry solar
regal ether
#

how do i get the code to mod does it work from the steam .dll files?

prisma loom
#

I think this could work but the context is wrong

regal ether
#

uh this doesnt look right

prisma loom
#

yeah, thats what im sayin

regal ether
#

no i mean this

#

that doesnt seem like the ritght code

wintry solar
#

Yeah you won’t get any unscored cards using context.individual

prisma loom
#

(folder on the top is where all code and assets are gonna be)

regal ether
prisma loom
#

after extraction

prisma loom
regal ether
prisma loom
#

"extract"

#

via 7zip

regal ether
#

i only have compress

proper relic
#

"Open Archive"?

regal ether
#

found it

#

it was under more

#

what script has the jokers in it

prisma loom
#

open archive > then extract

regal ether
#

i got the lua files

#

but like which script has the jokers in it

prisma loom
#

cards.lua

#

but dont try to copy 1:1

#

it works differently

#

(ik now lol)

regal ether
#

idk what that means lol

prisma loom
#

if u try to use this code and copy it 1:1 it wont work

regal ether
#

BRO WHAT IS LUA

prisma loom
#

coding language

regal ether
#

WHAT IS THIS WEIRD SYNTAX

#

ok but where does it define the powers?

#

those are the cards wheres where it defines the joekrs abilities

tall wharf
regal ether
tall wharf
#

except the times programmers decide it starts at 0

tall wharf
#

like x and y on atlas

regal ether
#

do you know what file the jokers abilities are in

tall wharf
#

game.lua

regal ether
#

yk what i shoud ctrl f to find it

tall wharf
#

and card.lua

tall wharf
regal ether
#

i see where it defines the jkoekrs but it doesnt bvioe them the powers there

tall wharf
regal ether
regal ether
tall wharf
#

Caino

regal ether
#

no results

#

im gonna do a get used by nintendo speedrun and put all of their IP in the game

#

oh i found it

tall wharf
#

i live caino

regal ether
#

wtf does this mean

tall wharf
#

what does what mean

obtuse silo
regal ether
#

the code 😭

#

like what part of the code does what

#

do i go from

if self.ability.name yap yap yap then
yap yap yap
#
if self.ability.name ~= 'Seeing Double' and self.ability.x_mult > 1 and (self.ability.type == '' or next(context.poker_hands[self.ability.type])) then
                            return {
                                message = localize{type='variable',key='a_xmult',vars={self.ability.x_mult}},
                                colour = G.C.RED,
                               

like how does the game know how much mult to give for this?

wintry solar
#

A better question is what are you trying to achieve

regal ether
#

just how to create new jokers and what i change to change the chips/mult/multipler/econ/creation

#

i just kinda need to understand what the code does to udnerstand how to change it

#

fyi i have no experience with lua :3

wintry solar
#

Looking at the game source code isn’t really going to help then

#

You need to look at smods and see how modded items work

regal ether
#

can i not just copy and paste the joker declaration and change the stuff

wintry solar
#

If you’re only working personally I suppose you can modify the direct source code sure

#

But it’s more complicated than using the modding tools that have been made for you

regal ether
#

theres tookls that make it easier

#

ive never modded a game before

wintry solar
#

I’d recommend playing with mods before looking to create them

#

Then at least you are aware of the systems they use

regal ether
#

but thats so much effort 😭

wintry solar
#

If you’re not prepared to put effort in I’m not sure making a mod is going to be something you enjoy

regal ether
#

i perfer coding then actually playing the game 😭

#

cuz im like hyperfixated on coding a mod rn and i cant get myself to do anything else like play a video game 😭

wintry solar
#

Then go and read the information about the modding tools

regal ether
#

is their a link you can give me?

lucid owl
#

yeah you're not going to make a mod easily without checking the tools people use to do that lol

regal ether
#

everything ive googled gives me instructions to download mods not to make mods

lucid owl
#

cause modifying the source code is very different from making a mod

regal ether
#

i just kinda guessed

wintry solar
lucid owl
regal ether
lucid owl
pulsar flower
#

does text formatting color support arbitrary colors

#

or better yet, could i set up a custom one

#

mostly for convenience

regal ether
humble gale
regal ether
#

i did

#

like how do i mod it now

#

i have it all installed but what do i do to start modding

#

do i just change the soruce code now?

humble gale
#

the wiki should tell you how to make a mod

cursive glade
regal ether
#

now it does :3

cursive glade
#

the whole right bar on the wiki is PACKED with info on how to make mods and what you can do with SMODS. Read that and try your own solutions before you come here, please.

regal ether
#

it just says to do it and doesnt say anything else

stiff locust
#

how do I modify a sound such that it sounds normal while it's in balatro

#

game fucks with the sound ingame so it sounds different

graceful magnet
#

is there a check for if a card is Enhanced? I'm surprised the example Jokers don't have stuff like Vampire and Bloodstone as examples you can look at. Right now I just have the empty context and I'd like to have it check if the scored card has any Enhancement, and then score some XMult if it is

normal crest
#

to answer your question tho, in your situation you can check with

#

context.other_card.set ~= "Enhanced"

graceful magnet
normal crest
#

to check whether a card has no enhancement

#

Most of the logic for jokers is in card.lua

#

You can ctrl + f their name to quickly find it

graceful magnet
normal crest
graceful magnet
graceful magnet
#

oop!

#

so in theory, this, should do what I'm hoping?

mystic river
#

not quite
you have to return those values in a table

#
return {
 values go here, 
 comma separated
}
graceful magnet
mystic river
#

right, like that
also for reasons i don't actually know you want to use card in smods wherever vanilla uses self

graceful magnet
#

so that makes the card = self redundant yeah?

mystic river
#

i think card means two different things in that context? but also smods makes card = card default anyway iirc

graceful magnet
#

alright so this should work, and if it doesn't I should probably uncomment the card = self

wintry solar
#

Just xmult = card.ability.extra.Xmult is needed here

#

Though this won’t trigger

#

Because of the cardarea check iirc

graceful magnet
#

oh?

wintry solar
#

Wait never mind ignore me

#

This is fine

graceful magnet
#

alright sweet time to

hopefully get this Rare card in a run so I can make sure it works. :)

wintry solar
#

Use debugplus

graceful magnet
#

it did not trigger

frosty dock
#

for the love of God please use a code editor that isn't notepad jimbo_spin

#

context.other_card.ability.set is what you need for the set

graceful magnet
#

swap out cardarea for that?

#

or

#

wait

#

fix this line with that

frosty dock
#

context.other_card.ability.set == 'Enhanced'

graceful magnet
#

hell yeah

#

okay well this is really convenient to make sure copying works

#

and it does, sweet

south folio
#

for some reason this just. deletes the entire score instead of adding anything?

        extra = { 
            chips = 0, chips_gain = 1, 
            mult = 0, mult_gain = 2, 
            Xmult = 0, Xmult_gain = 0.3, 
            odds_chips = 2, odds_mult = 3, odds_Xmult = 4 
        } 
    },
    
    loc_vars = function(self, info_queue, card)
        return {
            vars = {
                (G.GAME.probabilities.normal or 1), 
                card.ability.extra.odds_chips, 
                card.ability.extra.odds_mult, 
                card.ability.extra.odds_Xmult, 
                card.ability.extra.chips_gain, 
                card.ability.extra.mult_gain, 
                card.ability.extra.Xmult_gain, 
                card.ability.extra.chips, 
                card.ability.extra.mult, 
                card.ability.extra.Xmult
            }
        }
    end,

    calculate = function(self, card, context)
        if context.after and context.cardarea == G.jokers then

            if pseudorandom('j_roxanne') < G.GAME.probabilities.normal / card.ability.extra.odds_chips then
                card.ability.extra.chips = card.ability.extra.chips + card.ability.extra.chips_gain
                card_eval_status_text(card, 'extra', nil, nil, nil, {colour = G.C.BLUE, message = 'Chip!'})
            end

            if pseudorandom('j_roxanne') < G.GAME.probabilities.normal / card.ability.extra.odds_mult then
                card.ability.extra.mult = card.ability.extra.mult + card.ability.extra.mult_gain
                card_eval_status_text(card, 'extra', nil, nil, nil, {colour = G.C.RED, message = 'Mult!'})
            end

            if pseudorandom('j_roxanne') < G.GAME.probabilities.normal / card.ability.extra.odds_Xmult then
                card.ability.extra.Xmult = card.ability.extra.Xmult + card.ability.extra.Xmult_gain
                card_eval_status_text(card, 'extra', nil, nil, nil, {colour = G.C.RED, message = 'XMult!'})
            end
        end

        if context.joker_main then
            return {
                chips = card.ability.extra.chips,
                mult = card.ability.extra.mult,
                Xmult = card.ability.extra.Xmult
            }
        end
    end
}```
graceful magnet
#
    loc_vars = function(self, info_queue, card)
        return { vars = { card.ability.extra.mult_add, card.ability.extra.pool } }
    end,
    calculate = function(self, card, context)
        if context.individual and context.cardarea == G.play and not SMODS.has_no_rank(context.other_card) then
            if context.other_card:is_face() then
                card.ability.extra.pool = card.ability.extra.pool + card.ability.extra.mult_add
                return {
                    extra = { message = localize('k_upgrade_ex'), colour = G.C.MULT },
                    colour = G.C.MULT,
                    card = card
                }
            elseif context.joker_main then
                return {
                    message = localize { type = "variable", key = "a_mult", vars = { card.ability.extra.pool } },
                    mult_mod = card.ability.extra.pool
                }
            end
        end
    end
}```

After having a chance added and then removed, this no longer scores its stored Mult
smoky talon
#

what variable is tied to the money? Im trying to make a joker that changes your money but cant find the variable it uses.

wintry solar
#

XMult is 0

sturdy compass
#

I'm trying to make a Boss Blind that randomly disables 1/4 of the full deck. Anyone have any ideas as to why none of the cards are getting disabled?

graceful magnet
wintry solar
#

your joker main is within a different context

#

it'll never trigger

graceful magnet
#

ohhhh yeah that'd do it

#

yeah that worked

wintry solar
#

ah right I'll do it now 👍

prisma loom
#

dont rush urself for that

wintry solar
#

it's fine I'm on my pc now

#

can you send the full joker for me then I can get variable names correct?

wintry solar
#

and what do you want to happen?

prisma loom
wintry solar
#

it decreases whilst still charging right?

prisma loom
wintry solar
#

the 3 round count

prisma loom
#

yeah

#

even at 3/3

stiff locust
#

how do you add temporary discards

violet void
#

ease_discard(1)

wintry solar
# prisma loom yeah
if context.before then
            for _, played_card in pairs(context.full_hand) do
                card.ability.extra.money = card.ability.extra.money - 1
                SMODS.calculate_effect({
                    message = '-$1',
                    colour = G.C.RED,
                    message_card = card,
                    juice_card = played_card
                }, card)
            end
        end
        if context.end_of_round and context.main_eval then
            card.ability.extra.coffee_rounds = card.ability.extra.coffee_rounds + 1
            if card.ability.extra.coffee_rounds == card.ability.extra.target then
                card.ability.extra.active = true
                local eval = function() return card.ability.extra.active end
                juice_card_until(card, eval, true)
            end
            return {
                message = card.ability.extra.active and localize('k_active_ex') or card.ability.extra.coffee_rounds .. '/' .. card.ability.extra.target,
                colour = G.C.FILTER
            }
        end
        if context.selling_self and card.ability.extra.active then
            return {
                dollars = card.ability.extra.money
            }
        end
#

this should work

desert ore
#

is there any reference sheet on common/needed balatro code and what they do? I'm having trouble misunderstanding what a lot of this stuff does and why this is needed

runic quiver
#

Hello, i have this error, could you guys please help me?
It happens when perkeo duplicates a tarot card i have if i then sell the non-negative card.

primal robin
#

Hm, most likely Saturn is not compatible with better-calc or smth

wintry solar
#

does saturn stack the negative and non negative cards?

primal robin
#

It definitely stacks negative cards

runic quiver
primal robin
runic quiver
#

oh ok

primal robin
wintry solar
#

let me see if I can reproduce

primal robin
#

Her'es a thing

#

3 mods = same crash

#

My mod definitely not intersect with editions

#

Removed saturn not fix an issue

#

So problem with Brainstorm

runic quiver
#

probably then

wintry solar
#

yeah I don't get that crash

runic quiver
primal robin
#

Saturn still in mod folder

#

Remove it better

runic quiver
#

i tried removing only saturn then only brainstorm, am doing for both

#

btw, those crashes happens in the same run, they might not happen if i start a new run idk

#

it doesnt happen in a new run without every mod

#

@primal robin do you use Saturn and/or Brainstorm ? might i ask you to send me the version you have for each of those QOL mods you use and dont have the crash with? that'd be great

wintry solar
#

it seems like one of them is tainting the cards

runic quiver
#

i believe it is saturn

primal robin
prisma loom
wintry solar
#

oh okay hold on

#

try this

if context.before then
    for _, played_card in pairs(context.full_hand) do
        card.ability.extra.money = card.ability.extra.money - 1
        SMODS.calculate_effect({
            message = '-$1',
            colour = G.C.RED,
            message_card = card,
        }, played_card)
    end
end
#

tracked down the saturn thing, it sets the card.edition to an empty table instead of nil if it's not present

graceful magnet
#

Tried my hand at writing one independently

    key = 'revolver',
    loc_txt = {
        name = "Revolver",
        text = {
            "Every {C:attention}sixth{} card scored",
            "gives {X:mult,C:white} X#1# {} Mult {C:inactive} [#2#] {}"
        }
    },
    rarity = 1,
    discovered = true,
    cost = 5,
    blueprint_compat = true,
    eternal_compat = true,
    perishable_compat = true,
    atlas = "jokers",
    pos = { x = 2, y = 0 },
    config = { extra = { Xmult = 2, cardTrack = 1 } },
    loc_vars = function(self, info_queue, card)
        return { vars = { card.ability.extra.Xmult, card.ability.extra.cardTrack } }
    end,
    calculate = function(self, card, context)
        if context.individual and context.cardarea == G.play then 
            if card.ability.extra.cardTrack == 6 then
                return {
                    x_mult = card.ability.extra.Xmult,
                    --card = self
                }
                card.ability.extra.cardTrack = 1
            else 
                card.ability.extra.cardTrack = card.ability.extra.cardTrack + 1
            end
        end
    end
}```
If I could get a once-over to see if I've properly written it
wintry solar
#

need to move the reset above the return

graceful magnet
#

kk, fixed that

wintry solar
#

rest looks good

graceful magnet
#

didn't crash when loading!

prisma loom
#

Huge thanks for help

wintry solar
#

no problem!

prisma loom
#

does this set cost to zero?

orchid thunder
#

becaus ei need a lot fo help

graceful magnet
orchid thunder
cursive glade
#

On a joker, are you supposed to increment a multiplier before or after scoring? Like if a card starts at X1 but gains X0.5 when Two Pair is played, do you increment after scoring the X1? or is that all based off how the ability is written?

pulsar flower
#

both are possible, but i think it's usually before the hand scores

wintry solar
#

I do t think you need to process loc text in that situation

orchid thunder
orchid thunder
wintry solar
#

Seals don’t need you to

orchid thunder
#

but is not a seal because its its own game object

pulsar flower
#

hm, i have a tag that creates a booster pack, but unlike the vanilla tags multiple of them are able to trigger at the same time and it breaks everything

#

i'm unsure what prevents this from happening

wintry solar
#

Hmm maybe it does, let me compare to my new object

#

Can you show a sigil definition?

prisma loom
orchid thunder
wintry solar
#

Add _sigil to the key

orchid thunder
#

: |

wintry solar
#

I think that’ll work

#

It’ll break the badges but they can be fixed too

orchid thunder
wintry solar
#

Oh I see where you were adding that across them all anyway, nvm

#

Hmmmm

unkempt thicket
#

Could it be adding insc_ before it?

orchid thunder
#

il try

wintry solar
#

Do you have any lovely patches regarding this?

orchid thunder
#

uh maybe not sure

orchid thunder
#

i have this one for badge

orchid thunder
wintry solar
#

Cool I have a couple of others that I think relate to it but I don’t remember

#
[[patches]]
[patches.pattern]
target = 'functions/common_events.lua'
pattern = '''local seal = G.P_SEALS[v] or G.P_SEALS[SMODS.Seal.badge_to_key[v] or '']'''
position = 'before'
match_indent = true
payload = '''
local curse = Ortalab.Curses[v] or Ortalab.Curse.badge_to_key[v] and Ortalab.Curses[Ortalab.Curse.badge_to_key[v]]
if curse and curse.generate_ui ~= 0 then
    local t = { key = v, set = 'Curse' }
    info_queue[#info_queue+1] = t
    if curse.loc_vars and type(curse.loc_vars) == 'function' then
        local res = curse:loc_vars(info_queue, card) or {}
        t.vars = res.vars
        t.key = res.key or t.key
    end
end
'''
[[patches]]
[patches.pattern]
target = 'functions/common_events.lua'
pattern = '''elseif _c.set == 'Joker' then'''
position = 'before'
match_indent = true
payload = '''
elseif _c.set == 'Curse' then
    localize{type = 'descriptions', set = 'Curse', key = _c.key, nodes = desc_nodes, vars = specific_vars or _c.vars}
'''
#

should be able to adapt these

#

don't remember what they do lol

weak gate
#

How can I know in code which deck/back the player is using?

orchid thunder
wintry solar
#

not without your dumps

orchid thunder
fringe ember
#

Any idea on how/why this happens? I keep trying to do the deck skin part of the mod and it never works.

#

Actually. I think I see what my problem is now

orchid thunder
#

wait nvm thtas the new one this is the one i found

fringe ember
#

How do we set the mod prefix again?

#

iirc it had to do with something in the mod header

#
--- STEAMODDED HEADER
--- MOD_NAME: Astarion - Joker
--- MOD_ID: ascendant_joker
--- MOD_AUTHOR: [shadowfelled]
--- MOD_DESCRIPTION: Adds a matching Joker that gives X2 Mult when Diamond face cards are scored.

----------------------------------------------
------------MOD CODE -------------------------```
#

that part

orchid thunder
#

--- PREFIX:

fringe ember
#

thank

wintry solar
orchid thunder
#

misc_functions.lua:1974

wintry solar
#

yeah I'm not scrolling through your dumps

orchid thunder
#

well i have another crash

south folio
#

ok I give up, the function of it upgrading works (I think?) but it just doesn't wanna give me the score to it

paper zealot
fringe ember
#

gotcha

south folio
#

it just doesn't. add the amount the joker has to the calculation

#

did I accidentally made it random?

wintry solar
#

I'd need to see more of the code

south folio
#

got it hold on

wintry solar
#

and how are you testing it?

south folio
#

by....playing it with the debug mod?

wintry solar
#

because the first time you play cards this will do nothing, and then randomly upgrade some of the values, but if it doesn't upgrade all 3 it'll continue to not trigger

graceful magnet
#

how would I modify the ability.set to check for both Stone and Steel cards?

wintry solar
#

so you're kind of just waiting for it to upgrade all of them at some point before it will do anything

orchid thunder
wintry solar
orchid thunder
#

oh that would make sence

wintry solar
south folio
graceful magnet
wintry solar
wintry solar
graceful magnet
#

ahh

south folio
wintry solar
#

no

fringe ember
wintry solar
#

not those ones

#

the ones in the joker_main check

fringe ember
#

might have to redo the atlas for the mod

south folio
#

oh ok

maiden river
#

btw @wintry solar in the current implementation of the select_card thing for boosters
is there a way for the select to work for different types of cards in the same pack

wintry solar
#

how do you mean

maiden river
#

well for my mod, I have some consumables that go to the consumable area, and some that go to my custom cardarea

wintry solar
#

no

maiden river
#

I see 😔

#

back to the scuffed method

wintry solar
#

whats the custom type with an area?

maiden river
#

I have cards that go on the right here (G.weapons in the code)

#

in mimicking the source game, the booster pack has a lot of different types of cards in it

wintry solar
#

I can maybe add that functionality then

zealous glen
graceful magnet
#
        if context.individual and context.cardarea == G.play then 
            if context.other_card.config.center_key == 'm_stone' or context.other_card.config.center_key == 'm_steel' then
                return {
                    mult = card.ability.extra.multWM,
                    card = context.other_card
                    --card = self
                }
            end
        end
    end```

So when I was using `mult_mod` it worked but didn't have the +Mult message, but then I read the Example Walkie Talkie which uses `mult` because that comes *with* the +Mult message, but when I implemented that, it doesn't score at all now
wintry solar
#

remove the card = line

graceful magnet
#

I know that won't fix it, because it wasn't there the first time I tested mult

wintry solar
#

is your config table set to multWM?

orchid thunder
#

why dis no work

graceful magnet
orchid thunder
#

also i got erh text to work thanks Eremel

wintry solar
graceful magnet
#

I'll test it again but pretty confident

wintry solar
#

there's no reason mult_mod would work and mult wouldnt

#

the only thing I can think is that putting card = context.other_card is messing with where the message would go because of how contexts have been reworked slightly

graceful magnet
dapper sun
#

hi, i'm new to balatro modding. how do i add my own hand card style like the collabs?

graceful magnet
# graceful magnet

I'm gonna try the mind-blowing solution of just, checking if instead of a variable, I just, put mult = 18

dapper sun
zealous glen
wintry solar
#

you might jsut need to respawn your joker

dapper sun
zealous glen
dapper sun
#

i think i saw where in the lua to set that

zealous glen
#

I think I have a working example

dapper sun
#

thanks

iron iron
#

how would i check for how many fours there are in the deck?

dapper sun
sturdy compass
wintry solar
cerulean rose
dapper sun
#

what are the icon_lc/hc images in the deck skin example?

#

ok i got it

graceful magnet
#

what's the way to get the chip value of the card being scored?

#

hmm, ssssomething with these?

frosty dock