#💻・modding-dev

1 messages · Page 117 of 1

thorny adder
#

The docs are fan made btw

#

There are no docs at all

livid tapir
#

geez

violet void
fresh swallow
#

Thanks!

#

I made the jonkler. And I need him to play the jonkler beatbox every time he is scored

violet void
#

wdym when its scored

fresh swallow
#

Not scored

#

Triggered

livid tapir
#

i feel like centers should be their own pages, just in a category of the side-panel

fresh swallow
#

My b

wintry solar
tidal steppe
#

tried that. gave me numbers rather than nil, but ace was 14 hmm. guess i can work with that. but the prime bit was returning irrelevant numbers or nil. not true or false
local prime = {1,2,3,5,7}
print(context.other_card.base.id, prime[context.other_card.base.id])

violet void
#

11 jack
12 queen
13 king
14 ace

nova finch
#

how do you add a seal to a card

tidal steppe
# violet void yes ace is 14
      local prime = {14,2,3,5,7}
      print(context.other_card.base.id, prime[context.other_card.base.id])
          if prime[context.other_card.base.id] then

yeah, but how do i make my if run if prime? rn this isnt returning true or false but random numbers or nil. lua is so confusing. when i first played with it outside of balatro i thought it was like python, but nope

violet void
tidal steppe
stiff locust
tidal steppe
#

oh so i need a list of true/false 14 long?

stiff locust
#

no

frosty dock
#

you can do something like {[2] = true, [3] = true, [5] = true, } etc.

stiff locust
#
for index = 1, #prime do
  if context.other_card:get_id() == prime{index] then
    primeflag = true
  end
end
if primeflag == true then
    ---okay, this means it's prime
end

this should work

tidal steppe
stiff locust
#

just checks the card's ID number against everything in the prime list

#

oh wait hold on you'll need a flag for this

frosty dock
pine moss
#

Hi, I'm trying to make a joker similar to steel joker but when I go to look at it in collection the game crashes with an error that playing_cards is a nil value

SMODS.Joker {
    atlas = 'Estrocards',
    key = 'echoagenda',
    pos = { x = 3, y = 0 },
    rarity = 2,
    config = { extra = 1 },
    loc_vars = function(self, info_queue, center)
        info_queue[#info_queue + 1] = G.P_CENTERS.m_cry_echo
        return { vars = { center.ability.extra } }
    end,
    loc_txt = {
        ['en-us'] = {
            name = 'Echo Agenda',
            text = {"Every {C:attention}echo{} card",
                    "in your deck gives",
                    "{C:attention}+#1#{} joker slots"
                    }
        },
    },
    update = function(self, card, dt)
        local echo_tally = 0
        if #G.playing_cards > 0 then
            for k, v in pairs(G.playing_cards) do
                if v.config.center == G.P_CENTERS.m_cry_echo then echo_tally = echo_tally+1 end
            end
            G.jokers.config.card_limit = G.jokers.config.card_limit + card.ability.extra
        end
    end,
}
frosty dock
#

also inefficiency alert

frosty dock
pine moss
frosty dock
#

this will sequentially increase the joker limit every frame

pine moss
stiff locust
pine moss
frosty dock
#

it's fine to have here, you just need to keep track of the old limit added

#

as for the crash, just check that G.playing_cards exists

#

like if G.playing_cards and #G.playing_cards > 0 then

pine moss
#

Thanks

frosty dock
stiff locust
#

does it really matter that much

#

like it's marginal performance difference

tidal steppe
#
      local prime = {[14] = true,[2] = true,[3] = true,[5] = true,[7] = true}
      if prime[context.other_card.base.id] then

It works! thx so much @violet void and @frosty dock

frosty dock
granite plover
#

How do I check for not scoring cards?

frosty dock
stiff locust
#

that message starts with "with quantum enhancements"

frosty dock
#

no of course it doesn't make a huge difference, but lots of unoptimized code adds up in the long run

frosty dock
tidal steppe
livid tapir
#

quantum enhancements?!?!

#

what

violet void
#

get_id is basically get_rank

#

i think

frosty dock
tidal steppe
#

aight

violet void
frosty dock
#

rank key is still card.base.value

tidal steppe
#

just thought it would give 1 for ace instead of 14

frosty dock
#

that's just how the game does things

tidal steppe
#

ig i could always do get_id()%13

frosty dock
#

don't

granite plover
frosty dock
#

if you do that, stone cards will start behaving as completely random ranks

violet void
frosty dock
tidal steppe
frosty dock
#

there's no individual context for unscored cards afaik

#

can always make one but eh

livid tapir
#

i heard of a balatro mod about yomihustle but like
i heard about it once and cant find it now 💀

livid tapir
#

oh thx

frosty dock
violet void
#

I made a joker like Splash that gave unscored cards 1/2 chance to score twice and I had to add a new property to card to make it work but im sure theres a better way

nova finch
#

ok i need some help because i have been trying to figure this out for like an hour straight

frosty dock
frosty dock
#

and what is it you're trying to accomplish?

frosty dock
#

also doesn't this add the seal to the joker?

nova finch
nova finch
#

i just started out like yesterday

tidal steppe
#

other_card:set_seal() after play_sound? not in the return?

frosty dock
#

gimme one sec

tidal steppe
violet void
stiff locust
#

splash mention

frosty dock
# nova finch ok i need some help because i have been trying to figure this out for like an ho...

if you want to work like midas mask, I'd go for something like this

calculate = function(self, card, context)
    if context.before and context.cardarea == G.jokers and not context.blueprint then
        local faces = {}
        for k, v in ipairs(context.scoring_hand) do
            if v:is_face() then
                faces[#faces + 1] = v
                v:set_seal('Blue', true)
                G.E_MANAGER:add_event(Event({
                    func = function()
                        v:juice_up()
                        return true
                    end
                }))
            end
        end
        if #faces > 0 then
            return {
                message = 'Seal!',
                colour = G.C.CHIPS,
                card = card
            }
        end
    end
end
#

this adds the seals before scoring, not as the cards score

nova finch
#

ok

livid tapir
#
function remove_from_deck(self, card, from_debuff)
    if card.ability.extra.slot_removed then
        G.jokers.config.card_limit = G.jokers.config.card_limit + 1
    end
end
``` do i put this in the calculate of my joker?
frosty dock
#

no

#

this goes in your joker constructor the same way the calculate function does

livid tapir
#

ah ok

#

makes sense

#

if the wiki just had examples 😭

frosty dock
#

example mods exist

#

but we don't have examples for everything

#

-# you'd probably find an example for most things supported in some mod though

stiff locust
#

there are no enhancement examples graagh

violet void
#

a small snippet of code after showing a function would be great

stiff locust
wintry solar
#

I find it really annoying that the week I decided to unscuff enhancement calculations seemingly everyone has decided they want to make enhancements

stiff locust
#

i was going to make an enhancement ages ago

#

but I can wait

tidal steppe
#

i am going thru the example mod currently, its only marginally more helpful than the wiki XD

stiff locust
#

I'll make an edition instead if I can figure out how to make a shader

stiff locust
#

so it feels like there's more

wintry solar
#

no there's definitely more

stiff locust
#

there's just more people making mods yeah

tidal steppe
#

mostly i want to make jokers

stiff locust
#

everyone mostly wants to make jokers

frosty dock
tidal steppe
#

wot?

frosty dock
tidal steppe
#

strong enough? XD

frosty dock
#

speculo:

#

can it copy copies of itself though?

tidal steppe
#

0_0

#

quite possibly XD

radiant halo
#

i didnt get enough sleep last night

tidal steppe
#

prime time pairs well with fib

left bear
#

is it possible to replace the original quips (these ones) with custom ones via mods? i can't figure it out

tidal steppe
#

ive never seen dq_1. when does it show?

left bear
#

no idea

#

lq is when you lose wq is when you win

tidal steppe
#

l=lose
im guessing lower w=win?

left bear
#

no idea what dq is

#

yes

tidal steppe
#

lol, 2 jokers later example covered what i wanted

radiant halo
#

if you had <10 loser quotes, theres a chance of returning an error, >10 and some will never appear

left bear
radiant halo
left bear
#

ahhh

#

thanks

random sleet
#

i think you can also just literally just override the variables since its just stored in a variable

tidal steppe
tidal steppe
livid tapir
#

o yea btw i got the doubled joker thing working with add_to_deck and remove_from_deck
thx for the help yall

radiant halo
#

for lovely injector regex, is there a way to use capture groups in your payload?

pine moss
#

This isn't working

return {
  message = localize("k_nope_ex"),
  colour = G.C.FILTER,
 }

am I missing something?

#

Also while im here, will a weight of 0 make a card not show up?

stiff locust
#

yes

#

yes to both

pine moss
#

Thank you

stiff locust
#

that's the location of the message

#

card = card is itself

pine moss
#

Just after colour right?

stiff locust
#

doesn't matter idt

normal crest
#

Order doesn't matter

pine moss
#

Thanks

nova finch
#

now that the weezer joker is done i can start working on the next one

oblique silo
#

am i allowed to ask someone to update a mod for me?

frosty dock
#

why wouldn't you be allowed...

oblique silo
#

i dunno just wanted to make sure

frosty dock
#

whether someone will do it, i don't know

oblique silo
#

there's a custom deck mod that hasn't been updated since april and i'd like to be able to use it

wintry swallow
#

is there an easy way to specify for a joker to be rental in a challenge definition nvm i figured out how to allow rentals

livid tapir
#

realized a tiny flaw in doubled joker
how do i check if a joker is negative?

#

is it like if cardname.edition == 'negative' then?

normal crest
#

if card.edition.negative should work

livid tapir
#

ok!

#

thc

#

thz*

#

thx**

#

omg

oblique silo
#

lmao

livid tapir
#

ok gotta do smth
we got to have the add_joker also have the edition

gaunt thistle
radiant halo
gaunt thistle
#

I made the syntax balatrojoker

#

it's standard regex capture group syntax. afaik I have an example on lovely's readme

livid tapir
#

OH WAIT

gaunt thistle
#

I do not have an example

livid tapir
#

i forgot how for works in lua

#

its not like python

#

it should be for i = 1, t do i think

gaunt thistle
livid tapir
#

wait no for i = 1, table_length(t)

radiant halo
frosty dock
#

for i = 1, #t be like:

livid tapir
#

oh ok

#

thx

frosty dock
#

for i,v in ipairs(t) be like:

elder vapor
#

oh yeah

fringe dune
livid tapir
#

in this example deck, why do they do '4' in config and use it only ONCE in assert call, instead of just sayin '4' directly in the assert call

normal crest
#

Maybe using some kind of template

#

It'd achieve the same thing if you just put '4'

#

And removed config

livid tapir
#

yea, so idrk why the person who made that example used config instead of just '4'

normal crest
#

ask them!

livid tapir
#

i have no idea who made that example

#

idk if its steamo (the creator of steamodded) or just a random other person in the github

normal crest
#

I was mostly joking

#

there really is no difference

livid tapir
#

lol

normal crest
#

but if you want to know who made that and it's on github

#

click "Blame" on the top left

#

when looking at the file in github

livid tapir
#

like its not related to anything im doing but im genuinely curious why they did the more boilerplate option than just '4'

nova finch
#

I'm trying to make a joker that upgrades mult when cards are destroyed using something like the hanged man or immolate. would context.cards_destroyed work for that?

tidal steppe
#

im still confused by how config works

wintry swallow
#

i am having so much fun over here

#

had to make some lovely patches to make rental jokers and negative consumables in challenge definitions possible

#

the 'down in' challenges, and 'standing ovation'/'round of applause' etc (including the locked ones) are the same challenge at their core, just gradually getting harder and harder

teal estuary
#

test it, but thats what i've been told

nova finch
#

i think it is

#

it didn't work

#

i decided to just switch it to cards being sold

pine moss
#

What's the prefix for tarot cards?
like with enhancements its m_cry_echo
and for jokers its cry_jimball_joker

tidal steppe
#
    trigger_effect = function(self, args)
        if G.GAME.last_blind and G.GAME.last_blind.boss then
            G.E_MANAGER:add_event(Event({
                func = (function()
                    add_tag(Tag('tag_double'))
                    return true
                end)
            }))
        end
    end

how do i use trigger_effect. clearly im doing something wrong. crashes on launch

#

this is in a deck(back) btw

hollow mortar
#

Does anyone know the right API call to replace the texture of an existing joker?

livid tapir
#

how do i get a joker's edition? i know how to check if it is negative, but cant figure out how to actually just get what it is

vivid oyster
#

I have a seal that tracks its discards as a value in its config, but the number persists through runs, does anyone know why that is or how to solve that

hidden timber
vivid oyster
arctic steeple
#

other_card should work as card refers to anything card-shaped, not just playing cards

pine moss
nova finch
#

is there a way to check if a certain hand is being discarded (ex. discarding a pair)?

arctic steeple
#

yes

#

uh

#

maybe?

#

Idk if there's logic for that by default

tidal steppe
#
    calculate = function(self, card, context)
        if context.joker_main then
            return {
                -- mult = number of cards left in hand
                mult = #context.hand,
                message = localize { type = 'variable', key = 'a_mult', vars = { #context.hand } }
            }
        end
    end

Any idea how to retrieve the number of cards left in hand (not in the played hand; thats .full_hand)
I want how many were not played. so if handsize=8 and you play high card, 7 remain in hand

pine moss
#
calculate = function(self, card, context)
  if context.cardarea == G.jokers then
    if context.after then
        local card = create_card("c_est_miniblahaj", G.consumables)
        card:set_edition({ negative = true })
        card:add_to_deck()
        G.consumeables:emplace(card)
     end
   end
end,

I think I have my contexts wrong here. I want this to activate when a hand is played like ice cream but it's making my game crash

tidal steppe
#

whats your config?

pine moss
#

Or do you mean the whole code?

#

wait

#

wait sorry im a moron, here you go

#

config = { extra = { amount = 1 } },

#

it's not being used though

tidal steppe
#

hey, i dont know this either. i just thought #1 meant vars which relies on config. but no its talking about ipairs which i dont see in your code snippet

pine moss
#

Yeah. when I make it this

if context.before and not context.blueprint then
  if context.cardarea == G.play then
``` then it doesnt crash so I think maybe the error is actually in the creation of c_est_miniblahaj?
tidal steppe
#

¯_(ツ)_/¯

pine moss
#

OH WAIT I THINK I KNOW WHAT I DID. there should be more arguments in create_card

nova finch
vivid oyster
#

anyone know if there's any check for start of run or anything like that?

random sleet
#

you can probably check your lovely dumps for that; line 2177 of your functions/common_events.lua might not match other peoples'

pine moss
#

line 2177 is end 😔

tidal steppe
#

love this trail and error of just guessing what variable im looking for

livid tapir
tidal steppe
#

i know exactly what i want to do, and my code works. i just dont know which of the infinite permutations is the correct var/field i need

#

i need to know #cards in hand

livid tapir
#

so maybe like #G.hand.cards or smth

tidal steppe
#

Your brilliant!

#

thank you so much

#

i tried hand_size and everything else

livid tapir
#

oh wait that worked? wow i just guessed based on the situation lol

pine moss
#

Ok well we have a new error now which is progress. I can make a random tarot card and add it to the consumables but then it crashes and complains about center

tidal steppe
#

It works!

    calculate = function(self, card, context)
        if context.joker_main then
            return {
                mult_mod = #G.hand.cards,
                message = localize { type = 'variable', key = 'a_mult', vars = { #G.hand.cards } }
            }
        end
    end
pine moss
wintry swallow
#

in Lovely is it possible to catch more than one line in a pattern

#

i need to do some pretty extensive modification of some base game behaviours

nova finch
#

how would I put a random hand in the description of a joker like the to do list

gaunt thistle
wintry swallow
#

right, thank you

tidal steppe
#

IT WORKS, my first proper joker!

livid tapir
livid tapir
gaunt thistle
#

what's lovely?

random sleet
#

john lovely

gaunt thistle
#

I am he

livid tapir
#

lol

wintry swallow
#

i need multiline patterns because of this stipulation in my challenge descriptions, as some of my challenges are designed to give just the bare amount of resources to win ante 8 and no further

#

no point trapping the player in a doomed run

#

i know what i'm doing now though

gaunt thistle
#

just got flashbanged by that gif

gaunt thistle
#

good luck o7

random sleet
#

regex patterns can be multiline right

wintry swallow
random sleet
#

pretty sure smods uses them as such

gilded narwhal
#

Hey guys is it a bad idea to have an unlockable legendary because none of the legendaries I've seen are unlockable

nova finch
karmic kelp
#

Burnt Joker maybe?

gaunt thistle
wintry swallow
#

i have had to do some horrible things in my time

nova finch
#

what should the brat joker do

pine moss
#

OK. It is c_ but theres no prefix

#

just c_key

wintry swallow
#

tarots are c_

#

jokers are j_

#

for vanilla anyway

tidal steppe
#
    calculate = function(self,card,context)
        if context.discard then
            for card in G.discard do
                G.deck:remove_card(card)
            end
        end
    end

Any advice on how to remove discarded cards?
i didnt expect this to work, but i dont know what will

elder vapor
#
G.E_MANAGER:add_event(Event({
  trigger = 'after',
  delay = 0.2,
  func = function() 
    for i = 1, #context.full_hand do
    local card = context.full_hand[i]
    if card.ability.name == 'Glass Card' then  
      card:shatter()
    else
      card:start_dissolve(nil, i == #context.full_hand)
    end
  end
return true end }) 
#

try that after context.discard

merry raven
#

Doesn't that create ghost cards?

lusty pollen
#

Man, is it really going to take about 20 different patches to make a custom enhancement work like stone :(
This is going to be tiring.

faint yacht
crisp coral
#

i have a looping event here:

function lobc_abno_text(key, eval_func, delay, quips)
    ...
    G.E_MANAGER:add_event(Event({
        trigger = 'after',
        delay = delay or 0, 
        blocking = false, 
        blockable = false, 
        timer = 'REAL',
        func = function() 
            if eval_func() then 
                lobc_screen_text(...)
                lobc_abno_text(key, eval_func, math.random(2, 10), quips) 
            end 
        return true 
        end
    }))
end

how do i make it so that it removes itself from the event when lobc_abno_text is recalled?

faint yacht
#

Add an extra argument that is sent only by a recall?

tidal steppe
merry raven
#

Are there any checks to prevent cards from being forcefully discarded or debuffed, trying to make an Enhancement where its ability is just being immune to debuffs

EDIT: Nvm I figured it out, done by overriding the function by defining this block of code outside of my SMODS sections

local alias_set_debuff = Card.set_debuff
function Card:set_debuff(should_debuff)
    if self.config.center_key == "m_fm_wovenmail" then
        self.debuff = false 
        return
    end
        return alias_set_debuff(self, should_debuff)
end
crisp coral
#

oh wait i'm fucking stupid i forgot to return true in the events in lobc_screen_text

livid tapir
#

but it seems that that might worke

#

work*

#

lemme see

gilded narwhal
#

Hey I'm curious when multiple ppl get together to work on a mod is it more often just like two friends like

"Oh hey I can program"
"Oh hey I can draw"
"Let's do it"

livid tapir
gilded narwhal
#

Or is it more like

"Hey I really liked your art/programming on hrhfqhsgvj1itq can I commission you" does thar ever happen 😭

nova finch
livid tapir
#

id help.... if i knew that album 😭

#

any specific themes?

livid tapir
#

thx

nova finch
livid tapir
#

ngl i should make a custom edition which is like an actually useful negative: just negative but instead of +1 its +2 slots

livid tapir
gilded narwhal
livid tapir
#

wow
good idea ngl

livid tapir
#

except for having that joker

fervent grotto
#

how do i put him in my game

spring anvil
#

SMODS.Atlas

#

go read up on steamodded's documentation

radiant halo
#

anyone know how to get the chips currently in the blue chip box during joker calculation?

faint yacht
#

hand_chips and mult are globals you can access.

#

...bizarre that remove_from_deck triggers when a Joker is debuffed.

radiant halo
#

i tried G.chips, G.current_round.current_hand.chips, and G.current_round.current_hand.chip_total and none were what i wanted lmao

radiant halo
faint yacht
#

Perhaps... though, this introduces an unintentional SFX trigger on some of my Jokers.

radiant halo
#

oooo

#

good luck with that

crisp coral
#

you can use if not from_debuff

faint yacht
#

I was, actually. Still do it.

gilded narwhal
#

UNLOCKS FOR MY DECK(tattered red) WOO

White stake(common joker):
Speedrunner: Skipping a blind gives +1 hand to the next selected blind

Red stake(t1 voucher): Thrift: Discarding has a 3 in 4 chance to use a discard

Green stake(uncommon joker): Sleight of Hand: After playing a hand, draw an additional card

Black Stake(challenge):
--Slow Burn--
Start with 5 hands and 4 discards
Even antes permanently remove 1 discard
Odd antes(after 1) permanently remove 1 hand

Blue Stake(uncommon joker):
Trash Hoarder: If blind is won after using all discards, grant a garbage tag

Purple Stake(t2 voucher):
Steal: Discarding has a 1 in 2 chance to use a discard

Orange Stake(rare joker):

Trade-off: The first two discards of round give +1 hand, the first two hands of round five +1 discard

Gold Stake(background)
Red and black, upon scoring over 5x the blind requirement, the background will start to burn

raw path
#

What would I need to do if I were to make a a new type of playing card effect category seperate from Enhancements and Seals

tidal steppe
tall wharf
#

i have yet to fix something of my deck

#

she is literally too big

gilded narwhal
gilded narwhal
crisp coral
#

how to get art for your mod:
step 1: ask lyman
step 2:

tall wharf
#

i usually do the art myself

tidal steppe
random sleet
#

how to get art for your mod:
do weird scribbles
someone feels bad for you and draws the thing better

tall wharf
#

at least you tried

random sleet
#

how does this booster api even work orz

gilded narwhal
tidal steppe
#

im not an artist, im looking for artist

gilded narwhal
#

OH

#

Mb

random sleet
#

i am grate artiest

gilded narwhal
#

PEAK

tidal steppe
#

stunning

#

whats the trigger on deck(back) for defeating blind(boss)
and
what is the command to increase the number of joker slots?

random sleet
#

i'm highly confused by this crash im getting, happening when i hover a booster pack i've added

gilded narwhal
#

I've never seen that 😭

random sleet
#

🧓

gilded narwhal
#

TRUE

random sleet
sturdy compass
#

Implementing this felt dirty lol

tall wharf
#

why do i keep makin bocchi the rock characters

tall wharf
#

(i know they are twemojis)

random sleet
normal crest
radiant halo
#

anyone have any ideas about how to re-trigger jokers?

normal crest
#

from cryptid's source

radiant halo
#

huh ok

#

im guessing retrigger_joker_check and retrigger_joker are defined in cryptid an not smods?

#

ill look for it though ty

normal crest
#

i believe they are in smods

#

just not documented yet

radiant halo
#

oh really

normal crest
radiant halo
#

hmm ok, ill test it out

#

ok yeah that worked damn

normal crest
#

🥳

radiant halo
#

i would prefer to inject it instead of take_ownership but man i am relieved

#

i was dreading this part

tall wharf
#

actually

#

does steamodded have like

#

some intellisense stuff

#

that would be nice

edgy reef
#

Considering Intellisense works with workspaces.

#

Assuming your code editor supports those

normal crest
#

We are in need of some intellisense

hardy viper
#

some general definitions that don't need a 600ms search would be nice

edgy reef
#

It's that slow?!

hardy viper
#

+cutting back on undefined global end your own life now is nice

hardy viper
#

it gets a little rough

normal crest
#

Is there a setting for the lua extension that allows it to work with multiple workspaces? From my experience my files would need to be in the same workspace as the source for it to consider giving me any kind of completions

hardy viper
#

if you limit yourself to just a few things it gets a good bit better, but with how often i need to search through other mods/debug them i just don't feel like it's worth the tradeoff, i just ball without any sort of autocomplete

edgy reef
#

Oh yeah if you're adding mods in that would slow down.

#

I just defined LOVE, Balatro source, and Steamodded in my neovim config and called it a day

edgy reef
hardy viper
#

yea it's kinda inverse for luals in vsc unfortunately

#

you have to exclude things

normal crest
#

That's why I'm asking if I'm missing something

hardy viper
#

naw it's just a fact of life unfortunately i don't think anyone here has ever looked at any luals detected "problems"

#

minus syntax errors

edgy reef
#

Hmm

#

There is a "Add Folder to Workspace" button in the file tab

normal crest
#

That's what I did

hardy viper
#

including literally everything in your workspace + installing love2d definition extensions + praying usually does okay

faint yacht
#

To use more advanced typesetting, specify your description as a localization entry at G.localization.descriptions.Mod[id]... does that value need to be a table too?

normal crest
#

So in my mod folder it doesn't know SMODS exist, but if I go to steamodded source folder it does know

edgy reef
#

oh

livid tapir
#

what should i make next in my mod?

normal crest
edgy reef
#

uhh idk

#

I ditched VSCode for other reasons

#

This is just adding another one lmfao

normal crest
#

What reasons

#

If you don't mind me asking

livid tapir
#

is steamodded in your mods folder?

#

i mean id assume so

#

if you want both your mod and SMODS to be included, just change your workspace folder to the mods folder, itll know SMODS exists once you do that

edgy reef
#

Wait wha

normal crest
edgy reef
#

How in the world is this considered "undefined" yet can also fetch every value that can be ties to them

livid tapir
#

then you can also look at other mods you have installed too

normal crest
#

I'll try that when I'm on pc, I actually hadn't considered that

livid tapir
normal crest
#

I just wish variables had types, I hate not being able to see everything context or card have to offer

livid tapir
#

i thought they did have types
wdym by that, im kinda confused

normal crest
#

Variables don't have types, they can hold any value

livid tapir
#

oh yea

#

i really wish they did

#

i dont get why they dont tho

#

i mean there are workarounds

stray warren
#

That's why I like statically typed languages so much

#

Nothing is hidden from you

livid tapir
#

i mean non statics can be cool, like python doesnt hide as much from you
but statics still are coolio

radiant halo
#

alright im losing my mind, i made blueprint retrigger all other jokers but i want it to not retrigger other blueprints to prevent wacky interactions, what's wrong with this? abort is never printed

stray warren
#

Is it supposed to be context.other_joker? I've seen that used before, but I haven't messed with that kinda stuff

radiant halo
#

no change with that

normal crest
#

you're comparing a card with a center

radiant halo
#

it is currently retriggering itself which is odd considering i would think context.other_joker ~= self would block that

normal crest
#

Other_card.center insteqd

stray warren
#

Do you need to pass context.other_card into the return statement instead of card?

#

I guess that would only be for which Joker to show the "Again!" message under

normal crest
#

That sounds correct to me

radiant halo
#

ok this triggers all non_blueprint cards once

#

i dont really know why

stray warren
#

You passed 1 to repetitions

radiant halo
#

i mean i get that part

#

what is card?

normal crest
#

You only return early when it's not blueprint, so that adds up

radiant halo
#

i thought self was blueprint

normal crest
#

card is blueprint

#

Self might refer to the center but that's just a guess, I've never used it

stray warren
#

I've only ever used self to represent the card when I hook into a function. With the custom SMODS APIs, the card is passed in separately

#

self in that context should refer to SMODS.Joker

#

which isn't what you need

radiant halo
#

huh ok

radiant halo
#

which contains self

normal crest
#

Cryptids code is a mess

radiant halo
#

maybe its different with take_ownership as opposed to calculate functions in new jokers?

#

brother all this code is a mess

stray warren
#

The base game code is a mess

normal crest
#

So I've no idea what they're doing to setup their jokers, didn't bother looking through files with over 3k lines

random sleet
#

we are so back

normal crest
radiant halo
random sleet
#

its the mtg font

radiant halo
#

ahhh

normal crest
#

what oddities are in there

random sleet
normal crest
#

Joker dollars

random sleet
#

20 jollars

normal crest
#

Is that an icicle

random sleet
#

narwhal horn

radiant halo
#

man that is some sick art

random sleet
#

thanks lyman did it

radiant halo
#

shoutout to lyman

random sleet
#

shoutout to that guy

orchid thunder
#

How do I add retrigger support to a joker

gaunt thistle
#

Lyman in the chat

#

:-(

radiant halo
tall wharf
#

draw 2 extra cards at the start of the round

radiant halo
#

this is what i did to make blueprint retrigger all other jokers one time, excluding other blueprints and brainstorms

random sleet
#

oddities notably always go to your consumables from the pack, instead of being used immediately

normal crest
#

Does it tell two jokes

tidal steppe
#
    apply = function()
        G.GAME.starting_params.joker_slots = 1
    end,
    trigger_effect = function(self, args)
        if args.context == "eval" and G.GAME.last_blind and G.GAME.last_blind.boss then
                G.GAME.starting_params.joker_slots = G.GAME.starting_params.joker_slots + 1
        end
    end

apply is working 🙂

  • setting joker slots to 1 at start
    But trigger is NOT working 😦
  • it isnt increasing slots by 1 per boss defeat
#

how do i increase joker slots?

radiant halo
#

this might help, the antimatter voucher code

#

i would guess that anything in starting_params would become irrelevant after the run has started, given they're, yknow, starting params

#

but tbf its equally likely its extremely relevant given some code ive seen

tidal steppe
#

fair, ill try that

#

That worked 🙂 Thanks!

radiant halo
#

awesome, glad to hear it

tidal steppe
#

shall i call this the antimatter deck?
Joker Slots = Ante

radiant halo
#

personally i try to avoid reusing names, even if it's two completely different things, but it's up to you

tall wharf
#

redrawn and i think it's much better

#

pre redrawn

tidal steppe
#

subject to rename, open to suggestions

nocturne garnet
tidal steppe
#

oof

#

ive been on 0 before, not -1 tho

tidal steppe
# nocturne garnet me on Ante -1:

psst ||like some vanilla mechanis that have secret tricks, this doesnt actually equal ante. but starts at 1 and increases per boss blind. so heirogliph is king on this deck||

orchid thunder
#

Thanks

lusty pollen
merry raven
# lusty pollen first custom balatro thing :)

Oh shit that's amazing
I've been doing card conversions like that for my mod, but how do you make it so that it plays the bounce animation? And also doing it after the hand is scored?

#

Also that card destruction you did there by 16 seconds, did you run into any problems with ghost cards?

cosmic notch
#

I think I have a good base to work with

wintry solar
#

oooo more zodiacs I wonder what these ones do

cosmic notch
#

i want them to be kinda reverse planets (because constellations are tied to the stars) and have them take away levels from hands and grant an equivalent reward

nocturne garnet
#

i made myself an eternal testing chamber

merry raven
#

So like a combination of Spectrals and Planets

merry raven
cosmic notch
#

with some new rewards tied to other features of the mod

merry raven
nocturne garnet
#

idfk

#

and thats not my mod

merry raven
#

Ogh

nocturne garnet
#

whyre you asking

merry raven
#

Thought you are the one who made the mod

#

Bah never mind

jagged roost
#

Can anyone help me understand what config does for enhancement? I assume it's the values used in calculation, but I don't know what they all mean

{
    bonus, --Not sure what this one is
    bonus_chips, --Additive bonus chips
    mult, --Additive multiplier
    x_mult, --Multiplicitive multiplier
    p_dollars, --Money?
    h_mult, --??
    h_x_mult, --??
}``` These are my best guess
nocturne garnet
jagged roost
#

ahhhh

#

and bonus versus bonus chips?

tidal edge
wintry solar
#

bonus is also chips

jagged roost
#

then what's the difference?

random sleet
#

hee hee
hoo hoo
looks like the joke's
on you!

earnest creek
#

What's the context for checking enhancements?

lusty pollen
# merry raven Oh shit that's amazing I've been doing card conversions like that for my mod, bu...

The bounce animation is just card::juice_up()

I had issues with ghost cards at first, but later fixed it by utilizing what handles glass shattering. I injected all the code I need into the for loop that iterates through scoring cards to check for glass, which marks them for safe deletion with both a variable stored in each card and an array with variable size.

Having it happen after you score just depends on where the code is injected.

merry raven
#

Oh you wrote a Lovely patch for the shattering?

lusty pollen
#

Yeah, pretty much everything is lovely patches aside from the definitions/info for the enhancements.

merry raven
#

And this juice_up, is it a part of a G.E_MANAGER:add_event function or can it be called by itself like card.juice_up()

#

No wait, it's both

#

Which one do you use instead

lusty pollen
#

I just called the juice_up function with card[i]:juice_up() on each effected card iteratively.
I haven't figured out events yet lol.

merry raven
#

Ah right then

#

One more thing, which file in the source code did you patch the shattering code into? This ghost card problem is killing me, and I have zero experience with Lovely patches

lusty pollen
#

It's in state_events. If you search for shatter/glass through it you should find the spot that handles it easily.

merry raven
#

Gotcha, thanks!

#

Is it the one in evaluate_play?

spring lantern
#

is there a way to do custom unlock conditions for a specific joker?

valid forge
tall wharf
#

🔥

#

yellow iphone 14

faint yacht
earnest creek
#

why is there a card.ability.extra.chips and a card.ability.extra.chips2? What's the difference?

frosty dock
faint yacht
#

Any specific prefix, aside from the mod ID?

frosty dock
#

just the mod ID

faint yacht
#

Well, this adds the white background to the text, nice.

frosty dock
#

you can change the background color with a loc_vars function

#

description_loc_vars, rather

bold sleet
#

fuck am I doing wrong? The text simply displays 'error'
(uses the talisman mod thing for xchips)

faint yacht
#

Is a_xchips even defined in your case? Unless you also have Talisman itself involved... otherwise, you may need a custom localization entry for that.

bold sleet
#

I have Talisman installed and as a dependency.

#

It is just super not working for some reason.

faint yacht
#

Ah, right, Talisman itself doesn't add the localization entries for that... just the functions and what not.

bold sleet
#

Ah, great.

#

how fix™️

#

(i stupid, as you may have noticed)

faint yacht
#

Using localization file yet?

bold sleet
#

I have that.

faint yacht
#

Right, at the same level of descriptions, make another key of misc... then v_dictionary and then you can a_xchips = {"X#1# Chips"},. Cryptid does define such entries by itself, which is where I am pulling this from.

merry raven
#
calculate = function(self, card, context, effect)
        if context.cardarea == G.play and not context.repetition then
            for i, playedCard in ipairs(context.scoring_hand) do
                if playedCard == card then
                    if i > 1 and context.scoring_hand[i-1].base.suit == card.base.suit then
                        leftCard:set_ability(G.P_CENTERS.m_fm_slow, nil, true)
                        card.ability.extra = { frozen = false }
                        card_eval_status_text(leftCard, 'extra', nil, nil, nil, {
                            message = "Slowed!",
                            sound = "fm_slow",
                            colour = G.C.BLUE
                        })
                    end
                    break
                end
            end
        end
    end

Is there a way to make it so that if there is no leftCard it will proceed as normal? Now Balatro's crashing because there's a nil value if there's no left card

bold sleet
#

random bs go

faint yacht
wintry solar
merry raven
#

Wait I pasted the wrong code

bold sleet
#

azaming

merry raven
#

No wait it was the right code

#

I just fucking forgot to define left card

bold sleet
#

great!

faint yacht
#

Feels a bit weird still without shadow on the text, but 'tis neat anyway.

merry raven
#

Is there a check to see if a card has no Enhancements? Is it not card.config.center

#

Making an enhancement that will convert the left card into a specific enhancement but it needs a blank card to do so

bold sleet
#

convert theleft card into the right card

merry raven
#

What

deft flame
#

there is a way to set balatro to have more ram?

wintry solar
merry raven
#

Oooo gotcha, thanks

weary jungle
#

how do i pass loc vars into a info queue

#

when i use info queue for this, its nil in nil chance

thorny adder
#

For title or description

#

Oh live variables

#

Not fixed

#

Idk

weary jungle
#

do i just hard code the chances

#

im gonna do that

nocturne garnet
weary jungle
#
            key = keyeeee, 
            set = 'Enhanced',
            config = {extra = 1}
        }```
#
            keyeeee = "m_TGTM_SturdyGlass"
        else
            keyeeee = "m_TGTM_SturdierGlass"
        end ```
nocturne garnet
#

i meant the entire loc_vars function

weary jungle
#

i

#

oh

#
        local keyeeee = ""
        if not TGTMConsumables.config.CursedRunes then
            keyeeee = "m_TGTM_SturdyGlass"
        else
            keyeeee = "m_TGTM_SturdierGlass"
        end
        print(keyeeee)
        info_queue[#info_queue + 1] = {
            key = keyeeee, 
            set = 'Enhanced',
            config = {extra = 1}
        }
        

        return {vars = {card.ability.extra.CardAmt, RuneCurse}, key = card.config.center.key .. (TGTMConsumables.config.CursedRunes and "C" or "")}
    end,```
nocturne garnet
#

and what is card.ability.extra.CardAmt

weary jungle
#

ok

nocturne garnet
#

did you forget to change your values

weary jungle
#

rune curse is so i can change the chances for curses

#

its set to 2 rn

nocturne garnet
weary jungle
#

at the start

nocturne garnet
#

but where

weary jungle
nocturne garnet
#

can you just send a screenshot of your whole Joker

weary jungle
#

its a consumable

nocturne garnet
#

or consumable

#

wait wait

#

do you mean your consumable

weary jungle
nocturne garnet
#

or do you mean the info_queue

weary jungle
#

what

nocturne garnet
weary jungle
#

info queue

zealous glen
# weary jungle

Look at how Jokers with probabilities are written in the game

#

The probability doesn’t exist outside of a run

#

So in the main menu it won’t show up unless

#

You do the same as vanilla Jokers do

#

(binary operator trick)

nocturne garnet
weary jungle
#

specific_vars = {(G.GAME.probabilities and G.GAME.probabilities.normal) or 1, 5}, like this?

nocturne garnet
#

yea

supple folio
#

How would I get the key of a specific joker in the joker area?

weary jungle
nocturne garnet
weary jungle
#

am i dumb/ looking in the wrong place

nocturne garnet
#

idfk i dont really use the wiki that much

wintry swallow
#

i wonder if this is over the line of being not physically possible

#

i'll probably up the discard count to like 20 or 25

weary jungle
#

i might have done somethin ewrong

wintry swallow
#

it's designed around skips

#

8 hands for the entire run means you have to skip

weary jungle
#

oh yeah

#

i forgot

wintry swallow
#

no tag bans

karmic kelp
#

how would you even win ante 1? force 4 of a kind?

wintry swallow
#

pretty much, that's how my girlfriend did it when clearing down in 8 (this)

#

you just need a strong opening hand

#

hm

#

something i am considering doing is making 'locked' challenges selectable, but not playable, and having the 'custom rules' box tell you the unlock requirements

valid forge
#

anyone got documentation for a sample custom deck?

wintry solar
violet void
#

is there a way I can pass a custom sound to card_eval without using lovely?

faint yacht
#

You'll have to patch that in... I did it for use in card_eval_status_text and return {}.

violet void
#

mm I guess I'll create a copy of that function and add the key of the sound in its parameters

#

that can work too

#

I cant find SMODS.eval_this in the docs, does that not allow custom sounds either?

faint yacht
#

Nope.

wintry solar
#

-# better calc 2 pls be faster

violet void
weary jungle
#

how do i fix this

weary jungle
violet void
#

most excellent, and smart way to edit it in, ty

faint yacht
#

Thus, you can literally have it as extra argument. It won't play the usual "click", using your provided sound instead, something like such: 🦆

return {
  message = localize('toga_bonusapply'),
  colour = G.C.CHIPS,
  card = card,
  sound = 'toga_duck'
}
weary jungle
#

this also didnt work

faint yacht
#

Perhaps it's complaining about the key one.

weary jungle
#

lets go

#

im so good at this

#

(im not)

#

i think i forgot the m_TGTM

#

how would i format this description, like what colors?

faint yacht
#

Reroll, rarity, raised, generated w/ attention
Chance w/ green

wintry solar
#

Joker should be attention too

weary jungle
#

creative liberty, curse change with purple

#

i forgot about the other version

#

i think the all future blinds is not worded goos

#

i should put a thing

#

like current: 2x or whatever

elder vapor
#

line breaks found where

weary jungle
#

what

elder vapor
#

your rune descriptions have few line breaks

weary jungle
#

you will not like this then

elder vapor
#

ow

#

are you gonna go back and fix all of the descriptions

weary jungle
#

maybe

#

i gotta work on like actually doing the runes

#

i have like 12 done, and i need like 25

#

ugh

#

i HATE runes

elder vapor
weary jungle
#

then i have to do cryptid .... ugh

#

then i have to balance.....

#

man

#

why is modding so DUMB!!!

#

how do i make it so that score gets balanced when a variable is true

#

would it be patches

faint yacht
#

With fancy animations and all? Or do you want to have just the balance of the two occuring?

weary jungle
#

just balance if its not like super hard

#
[patches.pattern]
target = "state_events.lua"
pattern = '''local nu_chip, nu_mult = G.GAME.selected_back:trigger_effect{context = 'final_scoring_step', chips = hand_chips, mult = mult}'''
position = "after"
payload = '''
if UnPlasmaRnd then 
    local tot = hand_chips + mult
    nu_chip = math.floor(tot/2)
    mult = math.floor(tot/2)
    update_hand_text({delay = 0}, {mult = nu_mult, chips = nu_chip})
end
'''
match_indent = true``` why is my patch not working
faint yacht
#

Do mod_chips(nu_chip) and mod_mult(nu_mult), respectively. Also, nu_mult = math.floor(tot/2)

weary jungle
#

where do i put mod_chips?

#

also my patch isnt showing up

wintry solar
#

oh

#

target should be 'functions/state_events.lua'

weary jungle
#

oh im an idiot

#

good to know

valid forge
#

first custom deck! ⚒️

#

card back is temporary

weary jungle
#

is it named that because you mine for cards?

valid forge
#

mhm!

#

diggy diggy deck

weary jungle
#

Where is buildy buildy deck

valid forge
#

was thinking of one where it's the inverse

#

not sure how fun that'd be though. burglar basically does the same thing

gilded blaze
#

it's possible to disable burglar if that's your intention with this deck

#

or… not

valid forge
vivid oyster
#

i have a seal that im making and it has some data where it keeps track of discards but that count stays through runs and doesnt reset, anyone know how to stop that from happening?

nocturne garnet
gilded blaze
#

well, this deck isn't restricted like Golden Needle

valid forge
#

might try and figure out how to add cardsleeves compat for these decks I'm doing

#

for the time being they'll be very simple variable tweaks, as I'm not experienced enough at all to do too much more than that

valid forge
#

if so then I'm perfectly fine with people having Burglar

#

moreso meant making an inverse of this deck (no discards, 7 hands)

#

Where is buildy buildy deck
^^

weary jungle
#

1 hand, like +5 handsize

valid forge
#

hmm

#

that sounds fun actually

gilded blaze
weary jungle
#

0 hands so you lose immediatly

gilded blaze
#

nope

#

hand count is forcibly set to 1 at start of round if reduced below 1

valid forge
#

assumed that'd be the case

#

think you could probably set it to 0 hand size though

gilded blaze
#

that's why Troubadour works in Golden Needle

valid forge
#

same effect

gilded blaze
#

nah

#

0 hand size = instant game over upon entering a blind

valid forge
#

yeah that's the point

#

0 hands so you lose immediatly

gilded blaze
#

hand count is different from hand size tho

valid forge
#

yeah, I know lmao, just meant that you could do the instant game over with hand size instead of hand count

gilded blaze
#

eh

#

imagine Golden Needle
Hieroglyph = -1 Ante with no penalty

valid forge
#

consider this the buildy buildy deck I guess

weary jungle
#

lets go

valid forge
#

very easy to play flushes and can really abuse things like Mime but harder to dig

#

but hey, at least one boss blind does effectively nothing to you at first

crisp coral
#

+8hs is way too good for -2/3 discards

#

i'd say +4

wintry swallow
#

i reworked it to give you the normal 4 hands because it just wasn't fun

valid forge
#

oh yeah that makes sense, when you're that limited on discards

#

I also just buffed the dwarf deck to give +5 instead of +4

#

might drop that down again but

#

given how hard it is to score with just one hand I think it's fiiiiiine? will play test it

violet void
#

does anyone know what's wrong here

lusty epoch
valid forge
#

anyone have, like, a full set of variables for SMODS decks?

#

I assume a lot of it will just be digging through the balatro code itself but thought if there was a source anywhere to make things easier I could use that

wintry swallow
#

i'm addicted to making challenges so i might workshop creating a daily challenge

#

the idea is that the challenge's parameters would change daily, the mod would require an internet connection to play because it would pull the parameters from a remote server

valid forge
#

might it not be better to have it use the system's date to determine which one is active, then just release like biweekly updates to add new ones?

wintry swallow
#

that's susceptible to "the wordle exploit" aka changing the date in windows (or reading the source) to spoil challenges ahead

valid forge
#

that's true actually

wintry swallow
#

it also requires me to update the mod on a regular basis which i will forget to do

valid forge
#

yeah I didn't consider the spoiling scenario

#

would be cool to let them go back and play older ones though

wintry swallow
#

yeah that will likely be a thing

#

...maybe

valid forge
#

could always just do semi-regular separate mods with all the challenges

#

like once a month or so you just release the challenges so far in that period as offline accessible

#

that'd mean you don't have to program a way to go back days and you could then access them without wifi

fallen tendon
#

just released robalatro reborn!

#

only includes gears tho

#

theres a bunch more content planned

dreamy thunder
#

im abt to give up on figuring out how to make a joker spawn a random joker 🙏

fallen tendon
#

try smods create card

violet void
valid forge
lusty epoch
violet void
#

docs say .wav is supported

faint yacht
#

I am also using some .wav ones... just that they may have an incompatible encoding method.

violet void
#

solved, apparently I hadn't saved my main.lua 😮‍💨

dreamy thunder
#

bro ong i love Github CoPilot

zealous glen
#

What do you think is going wrong here?

#

I don't understand how the argument is nil

#

when the table isn't empty

#

I think understanding why it prints k would help

#

But I have no idea why it does that

royal ridge
#

should do G.GAME.FacePaint[k], currently you're doing the equivalent of G.GAME.FacePaint['k']

zealous glen
#

It works for the first iteration

prisma loom
#

Is there a API documentation for Balatro?

zealous glen
#

why does the second one break

zealous glen
spring lantern
#

so say k = 1

royal ridge
spring lantern
#

rn you're asking for a value called k instead of value 1

prisma loom
royal ridge
#

that can't be good

fallen tendon
zealous glen
fallen tendon
#

its going to be big sets of jokers and consumables based on roblox places

spring lantern
#

whatever it is you're accessing "k" instead of it

royal ridge
spring lantern
#

yeah yeah

#

i know

zealous glen
prisma loom
#

I kinda need a starting point in learning how to make a mod for Balo

#

But I only find mod installation guides

zealous glen
spring lantern
#

are they?

royal ridge
#

you're doing table['k']

zealous glen
zealous glen
spring lantern
#

you are defining an entry called literally k

#

thats what it seems like

prisma loom
#

Thanks

royal ridge
zealous glen
#

Wait it's interpreting k as 'k'?

royal ridge
#

yep

violet void
#

probably not possible, how do I check if any of the next Jokers after the current one (not previous) is X?

spring lantern
#

you need [k] instead of ['k']

royal ridge
#

you'll want to use bracket indexing for these things

zealous glen
zealous glen
#

Everything else is equivalent

royal ridge
zealous glen
#

So table['k'] is equivalent to table[k] is equivalent to table.k

#

But I guess not

spring lantern
#

except table[k]is the only one that actually reads the variable's value, the other 2 it interprets literally

zealous glen
#

Which it is

spring lantern
#

but k should be equal to a suit isn't it?

#

not the literal string 'k'

royal ridge
#

you can think of it like G['GAME']['FacePaint'][k]

#

and i believe that actually works

spring lantern
#

or say you define a variable g = 'GAME' then you could be goofy and do G[g]['FacePaint'][k]

#

but not G['g']

royal ridge
#

yep

quasi kettle
#

ive been working on updating a bunch of older jokers to work with the current steammodded and I cant figure out how to fix this so that it doesnt crash when it the round ends

wintry solar
#

why are you using 0.9.8 code

quasi kettle
#

I wrote this code back when it was what everyone used

#

I've been going through updating it but I wanted to try and fix any big errors before I redo the rest

random sleet
#

SMODS.Joker works different now id recommend lookin at its implementation

royal carbon
#

I'm trying to make a consumable that converts one specific highlighted joker into another, but I don't have the slightest clue how to go about doing that thinkvi

wooden nexus
#

Question: I know there’s a flushcalc for stuff like stone cards and whatnot, but are there other calcs for stuff like pair, 3OAK, etc?

wintry solar
#

iirc it's called get_X_same

wooden nexus
#

I see, i wanted to play around with it to make it so i can do certain ranks to count the same

#

Example: In Hanafuda, there’s Multiple chaff cards, but they have different art for each

#

To work around it, i would make “Chaff 1-3 (since December has 3 chaffs)” and treat them all as the same “Rank” essentially

frosty dock
#

you'd want to have their get_id return the same value I think

shut sigil
#

Okay so I'm trying to make a hearts set for malverk but I have no idea what I'm doing

#

I should probably finish the art first though huh

wintry solar
#

malverk isn't for suit textures, use SMODS.DeckSkin for that

shut sigil
#

Oh okay

#

I still have no idea what I'm doing though lmao

valid forge
shut sigil
#

Thank you sm

valid forge
#

not strictly necessary but has some good guidance and templating

#

it's what I'm using

#

malverk covers everything except the playing cards

#

DSL should be able to do exactly what you want, it's pretty intuitive ^^

shut sigil
#

Thanks!

#

I saw that bsky post of someone making SIGNALIS spades and I wanna do something similar

valid forge
#

fair enough

#

anyone able to help me in terms of how I could achieve something like this through SMODS? I'm not literate in lua so haven't the foggiest myself, and of course I can't just build this off of the same config as discards/hands/etc (at least I assume not?)

#

planned on adding a simple deck that just changes the checkered suits to clubs/diamonds lol

nova finch
#

what happened to my hand

#

(not an actaul question lmao i was just tersting SMODS.Enhancement)

tidal steppe
zealous glen
#

Ignore the Blind textures

wintry solar
#

oh random textures?

#

neat

zealous glen
#

Would you like to help or can I steal fork malverk?

night pagoda
#

Is it possible to offset the card? I'm making a Joker and it's center of mass is a bit in a different place, so I wanted to account for that

zealous glen
#

-# "fork" as a joke

night pagoda
#

I typed the message by accident oops

#

edited

zealous glen
#

So resizing cards accounts for that unless you grow up

#

I also need to figure that out, but a few days ago someone was trying to do the same

night pagoda
#

Yes, I mean that the center of mass is still in the center, but I want to change that

zealous glen
#

They sent me some code

#

But I haven't looked into it yet

wintry solar
#

you can play around with it in the cardarea alignment

zealous glen
wintry solar
#

I'm not too sure how that would be best layed out

zealous glen
mellow widget
#

Is there a tutorial on how to create a balatro mod?

wintry solar
#

oh exactly like malverk

#

I mean that would work

zealous glen
valid forge
#

I imagine if I just remove the if statement it might be fine?

zealous glen
tidal steppe
sudden dew
#

Anybody know how to view the game's source code on MacOS? When I right click balatro.app and click "show package contents," it seems to reveal different files that what I'm seeing in tutorials for windows

zealous glen
zealous glen
valid forge
# zealous glen Maybe you forgot the function arguments
SMODS.Atlas{
    key = 'tartanDeckAtl',
    path = 'tartanDeck.png',
    px = 71,
    py = 95
}

SMODS.Back{
    name = 'Tartan Deck',
    key = 'tartanDeck',
    atlas = 'tartanDeckAtl',
    pos = {x = 0, y = 0},
    loc_txt = {
        name = 'Tartan Deck',
        text ={
            "Start with a deck containing",
            "{C:clubs}26 Clubs{} and {C:diamonds}26 Diamonds{}",
        },
    },

    config = {
        hands = 0,
        hand_size = 0,
        discards = 0,
    },

    apply = function()
        if self.name == 'Tartan Deck' then
            G.E_MANAGER:add_event(Event({
                func = function()
                    for k, v in pairs(G.playing_cards) do
                        if v.base.suit == 'Spades' then 
                            v:change_suit('Clubs')
                        end
                        if v.base.suit == 'Hearts' then 
                            v:change_suit('Diamonds')
                        end
                    end
                return true
                end
            }))
        end
    end
}```
#

pretty sure it's just the self there

zealous glen
#

at least self

#

maybe others

valid forge
#

that seems to be the pickle here then

#

I've got no idea personally lmao

zealous glen
#

Check the wiki

#

for the correct function line

valid forge
zealous glen
#

See?

#

You missed self

valid forge
#

ah yeah that seems to be it

#

lemme test that

tidal steppe
#

also dont think you need the if name = as it is already running on itself

valid forge
#

yeah I was thinking that too

tidal steppe
#

also not sure that event is needed for basic setup stuff. isnt events just for things to be animated?

valid forge
#

¯_(ツ)_/¯

#

I have next to no experience here

zealous glen
#

@night pagoda Maybe this helps

tidal steppe
#
    apply = function()
                    for k, v in pairs(G.playing_cards) do
                        if v.base.suit == 'Spades' then 
                            v:change_suit('Clubs')
                        end
                        if v.base.suit == 'Hearts' then 
                            v:change_suit('Diamonds')
                        end
                    end
    end
}

like this? *with fixed indents

valid forge
#

so it does need event

tidal steppe
#

huh, ok

elder vapor
#
apply = function()
            G.E_MANAGER:add_event(Event({
                func = function()
                    for k, v in pairs(G.playing_cards) do
                        if v.base.suit == 'Spades' then 
                            v:change_suit('Clubs')
                        end
                        if v.base.suit == 'Hearts' then 
                            v:change_suit('Diamonds')
                        end
                    end
                return true
                end
            }))
    end
#

just that with fixed indents

tidal steppe
#

wonder why this didnt need event then

    apply = function()
        G.GAME.starting_params.joker_slots = 1
    end,
    trigger_effect = function(self, args)
        if args.context == "eval" and G.GAME.last_blind and G.GAME.last_blind.boss then
            G.jokers.config.card_limit = G.jokers.config.card_limit + 1
        end
    end
sudden dew
valid forge
#

IT WORKS

#

HUZZAH

#

thanks a ton @elder vapor @tidal steppe

elder vapor
#

np

valid forge
#

splendid

cyan dune
#

This is what modding's all about

valid forge
#

I might throw in two more decks for hearts/diamonds and clubs/spades

tidal steppe
#

ooh

nocturne garnet
valid forge
#

might call them Charcoal and Saloon after some Tetris colour schemes

valid forge
nocturne garnet
#

AAAAAAAAAAAAAAAAAAAAHHH!!!

tidal steppe
#

Does anyone know how to add challenges(by which i mean unlock requirements) to jokers, decks, etc?
For example my Antimatter deck is unlocked by you having 8+jokers in a run

tidal steppe
#

?

#

is that a mod or person

cedar stream
#

its a mod

night pagoda
#

john bunco

wooden nexus
winged nest
#

i saw someone else have this issue, the solution was "downgrade from lovely 0.6.0" so i switched to 0.5.0-beta7 and surprisingly it worked for a single launch, and now its erroring again