#💻・modding-dev

1 messages · Page 474 of 1

sonic cedar
#

i hit the button, the card stays selected but does the transformation properly
since i havent clicked on the card again, the SHED is still there on a card that shouldnt have it

chrome widget
#

Yeah you can do that

sonic cedar
#

the sell button updates states but the shed doe- oh my god is it the state function

#

do i need it after all

chrome widget
#

I would say look for the vanilla code for a number of the transformation Tarot's or whatnot because I believe those deselect automatically after they're done

#

That said yeah you could use the state function for this if you really wanted

#

But honestly not recommended since you want to get rid of the entire button

sonic cedar
#

ok thank goodness

chrome widget
#

If it had a transform back function, then you'd probably use it

sonic cedar
#

it will not

chrome widget
#

I would look it up but I'm not on my PC to have the source code handy

#

Err

#

Wait let me look up the Cardsauce repo

sonic cedar
#

i mean i have the source up i just need to know where to look lmao

#

would it be the defs or just ui.lua

bitter portal
#

okay i decided im scrapping the "seal that discards the card to the right of it when it's discarded" idea for now. i may come back to it in the future when i have a better understanding of the balatro code

#

now to come up with a new seal idea...

chrome widget
#

Call G.jokers:unhighlight_all() after the transformation code

sonic cedar
#

oh that is the most obvious name ever okay

#

after the eventchain but before the return true, right?

chrome widget
#

Yeah

#

(probably)

sonic cedar
#

it's a chain of E_MANAGER events, but here's the last one

#

i should start sending these messages with pictures more

chrome widget
#

You could possibly unhighlight before the flip events and it would look better?

sonic cedar
#

you guys arent magicians lmfao

chrome widget
#

Since it's not gonna flip with the UI then

sonic cedar
#

since i have the event that goes before the flips anyway, i can just slide that in here

pale holly
#

i've a video to illustrate the issue i got, which i don't even get it since it's literally took from Vanilla's remade but modified to work on the scoring hands

sonic cedar
#

oh hey deltarune theme- oh except specifically that guy i guess

pale holly
#

is something wrong with the deltarune skin ?

#

as far as i saw, it looks pretty cool

scarlet imp
#

its too clean, thats the problem

pale holly
#

probably Tenna

#

it does looks the most polished

shell timber
#

b-side mentioned 🗣️

sonic cedar
scarlet imp
#

Tenna is just too goated for his own good

pale holly
#

cuz

#

spoilers

chrome widget
#

Oh yeah Deltarune I'm gonna play it soon

sonic cedar
chrome widget
#

Gonna be annoyed at Tenna when I get to Ch 3 though

sonic cedar
#

now im forever gonna wonder who tf that is until i finally play it

pale holly
scarlet imp
sonic cedar
#

i already know tenna cause that guy been around since sweepstakes

pale holly
chrome widget
#

Every time a sexyman drops, I am reminded how much Tumblr (and also everyone else) doesn't care about women

sonic cedar
pale holly
sonic cedar
chrome widget
#

Yeah

pale holly
#

like i legit don't get why, it shouldn't do that

#

and i tried blocking some parts of the code and it jsut doesn't make it better

scarlet imp
#

Maybe the even you're using to rank up the cards is running twice

#

Code?

sonic cedar
#

jedi it's right there

scarlet imp
#

ope

sonic cedar
#

granted it IS a lua file so if youre on mobile i apologize

pale holly
red flower
#

where context check

pale holly
#

?

red flower
#

you need a specific context, cardarea is too generic

pale holly
#

wouldn't G.play work ?

red flower
#

no, there are multiple contexts with cardarea == G.play

basically, there are contexts and contexts attributes: cardarea is an attribute, youre missing the main context

sonic cedar
#

context.cardarea == G.play is like a "this manner specifically" attribute for an certain existing contexts

pale holly
#

ahhh okay

red flower
#

killed kitty

sonic cedar
pale holly
#

as i said i just retook from the VanillaRemade and edited it a bit, I DID tired using context.before so the cards would change before scoring

#

...then i just realise now i did that but in the same if line and not before

#

shit

#

i'll go test

sonic cedar
#

good thing john remade came to save you

pale holly
#

and also look about it for the calculate as well

#

Yeeeep

#

got a lot of saves from my jokers

scarlet imp
#

I'm still dying trying to solve this dumb button I want

sonic cedar
#

im glad mine works now
now i dont ever have to do it again

scarlet imp
#

now the card is being drawn in the middle of the screen and never leaving

sonic cedar
#

hi 1up

red flower
#

whats the problem?

#

like, what does the code do, i can see the problem lol

pale holly
#

i know i had that issue before and using SMODS.add_card{ fixed taht

#

it was there but also non existing

scarlet imp
#

don't mind the print statement at the top
so this function is being called, and I modeled it after the use_consumable function

#

I think there might be something wrong with the line:

SMODS.calculate_context({ using_consumeable = true, consumeable = card, area = G.jokers })

since Jokers aren't consumables, but I don't know what I'd replace it with

thorn furnace
#

Bump
For clarification, clicking the button just changes a boolean, it doesn't actually do anything to the size
Or it shouldn't
I have no idea why it does or what the process is behind that

placid star
#

so this allows me to buy memory joker even with 5/5 jokers, but it still calls alrt_no_space any ideas?

red flower
red flower
scarlet imp
#

so like card:destroy() after the line I mentioned?

red flower
#

look for the start dissolve line

#

and the getting sliced one too

scarlet imp
#

ok it's not staying in the middle anymore, but I also don't want it to be destroyed if I can manage that

red flower
#

call the function in the else when you return

#

not before

scarlet imp
#

yeah, basically you can activate the card occasionally on a cooldown

red flower
#

then replace that for G.jokers:emplace(card)

modern kindle
#

Hello friends and pals

scarlet imp
#

I tried that before, it stays stuck in the middle

placid star
red flower
#

because you were calling the function at the beginning so the original calls alert no space before it runs your code

placid star
#

ahh, so return a table like this? return {false, alert_no_space(params)}

red flower
#

no

#

can you copy the code here i will show u

placid star
#
function G.FUNCS.check_for_buy_space(card)
    local ret = cfbs(card)
    if card.config.center.key == 'j_tac_herald' then
        if G.jokers.config.card_limit > G.jokers.config.card_count + 1 then
            return true
        else
            alert_no_space(card, card.ability.consumeable and G.consumeables or G.jokers)
            return false
        end
    elseif card.config.center.key == 'j_tac_memory' then
        if 1 == 1 then
            return true
        else
            alert_no_space(card, card.ability.consumeable and G.consumeables or G.jokers)
            return false
        end
    else
        return ret
    end
end```
red flower
placid star
#

okay ill give it a try!

red flower
scarlet imp
#

well, it worked... kinda

#

hold on

red flower
#

without the emplace

placid star
scarlet imp
pale holly
# red flower where context check

In the end i just had to add a simple context.indvidual and now it seems to trigger properly even though it does score right after their previous rank now, i might rework on this a bit but at least it's working more properly, thanks !!

scarlet imp
red flower
#

yeah

#

it's trying to emplace the joker twice

scarlet imp
#

gotcha gotcha

pale holly
#

also i suppose from what i see there's no way to make a context.after/before to change the played cards before scoring ? Since context.individual seems to be the only one that does work

scarlet imp
#

for my other mod

pale holly
scarlet imp
#
if context.after then
  local _suit = pseudorandom_element({"Spades", "Hearts", "Clubs", "Diamonds"}, pseudoseed("err"))
  local _rank = math.random(2, 14)
  for i = 1, #context.scoring_hand do
      G.E_MANAGER:add_event(Event({trigger = "after", delay = 0.1, func = function()
          local _card = context.scoring_hand[i]
          _card:flip()
          local suit_prefix = string.sub(_suit, 1, 1).."_"
          local rank_suffix = _rank
          if rank_suffix < 10 then rank_suffix = tostring(rank_suffix)
          elseif rank_suffix == 10 then rank_suffix = "T"
          elseif rank_suffix == 11 then rank_suffix = "J"
          elseif rank_suffix == 12 then rank_suffix = "Q"
          elseif rank_suffix == 13 then rank_suffix = "K"
          elseif rank_suffix == 14 then rank_suffix = "A"
          end
          _card:set_base(G.P_CARDS[suit_prefix..rank_suffix])
          _card:flip()
      return true end }))
  end
  delay(1.5)
end

this works fine for me

#

granted, this uniformly randomizes the suit and rank, so its a bit simpler

#

if you don't want that then maybe try the individual approach

pale holly
#

maybe i should still check about it, as far as i see you definitely simplified the thing, it's only a context after, no individual or anything, just the cotext scoring hand for afterwards

#

maybe i'll test it out later on

#

appreciate the help thanks

placid star
#

can challenge jokers start with rental like they do eternal?

red flower
pale holly
#

that explain a lot more, still gotta get used to the for i = ^part too

red flower
#

(without doing it yourself with a patch/hook)

sonic cedar
#

am i doing this right? the joker's effect involves destroying face cards, and face cards get destroyed once you acquire it. will doing this have it factor in the cards it destroyed when it was taken?

#

(it being the calc context, that's the new thing)

red flower
#

i think destroy_cards does it automatically

chrome widget
#

Yeah

red flower
#

but if it doesnt you also need to pass the cards to the context

sonic cedar
chrome widget
#

Perhaps your calculate code is a little off?

placid star
red flower
#

it might be called before it's in the joker slot

chrome widget
#

Oh yeah that's true

#

Add to deck is called before the card is in the proper location

sonic cedar
#

cardarea check should fix maybe?

chrome widget
#

(which is annoying)

chrome widget
#

Typically card creation calls it before it calls the CardArea:emplace

#

For

#

Reasons

sonic cedar
#

what can i do then? is it just impossible, or so complicated that you might as well just cope

red flower
#

you can just copy the calculate code into add to deck

placid star
red flower
sonic cedar
red flower
#

idk why that one is regex tho

#

should be pattern probably

serene granite
#

ok so i am trying to make a joker like faceless joker and i am using vanilla remade as a guide, but i want it to work with steel cards instead of face cards, how can i detect facecards? i tried using is_steel and m_steel, am i doing something wrong?

red flower
#

SMODS.has_enhancement(playing_card, "m_steel")

serene granite
#

yess thank you

sonic cedar
serene granite
#

thanks so much for the quick help you two i appreciate it !

modern kindle
#

Such helpful pals

sonic cedar
#

(you dont need to do the former if it's in calculate)

#

hi dilly

bitter portal
#

Am i doing this right (for temporary hands/discards?) Also how do i use pseduorandom?

sonic cedar
#

wait actually no easy fix disregard

fallow breach
#

does anyone know what the keyword for playing cards would be here?

#

or if there is one at all

red flower
#

so G.GAME.probabilities.normal /2 for 1 in 2

scarlet imp
#

is there a global "all Jokers" pool that includes the legendaries too

#

or something like that

bitter portal
red flower
red flower
#

i think so yes

bitter portal
scarlet imp
# red flower for what

like there's a pool for what can appear in the shop or in arcana packs for example, I just want to know if there's a pool that contains every Joker or if I have to make it myself

red flower
#

G.P_CENTER_POOLS.Joker

placid star
red flower
bitter portal
#

ah

scarlet imp
#

insanely broken too

placid star
#

its supposed to replace serpent naneinf

red flower
sonic cedar
scarlet imp
#

although, now that I think about it, how does this interact with blinds that hide cards? since the "remaining cards in deck" doesn't update when you draw a face-down card?

serene granite
#

btw is there any documentation for how to create a custom Deck? i want to make a deck that forces the shop to have only jokers of one kind of rarity, is that something that can be done?

red flower
sonic cedar
#

but also they have mini tutorials/examples in their example mod

serene granite
#

is back another word for deck? i saw this but got confused

sonic cedar
modern kindle
#

I was gonna say remade was probably the wave

serene granite
#

ohhhh thank you so much ! ill look through that

sonic cedar
serene granite
#

or ghost deck i mean

pale holly
#

oh and i didn't even needed the for i = part too since it was already state already lmao

sonic cedar
serene granite
#

thank you !

rotund sable
#

how do i reload the colors i added? rn i have this code

G.C.EF = {
    PLANT = HEX('FFFFFFFF')--HEX("FF2BE725"),
}

local loc_colour_ref = loc_colour
---@diagnostic disable-next-line: lowercase-global
function loc_colour(_c, _default)
    if not G.ARGS.LOC_COLOURS then
        loc_colour_ref()
    end
    G.ARGS.LOC_COLOURS.ef_plant = G.C.EF.PLANT

    return loc_colour_ref(_c, _default)
end

and it doesn't seem to update after everything i tried.

#

rn i tried:
-closing and opening the game
-disabling and enabling the mod
-restarting the pc

red flower
red flower
#

are you sure youre loading the file

rotund sable
#

on first load it was set as the dark green and when i wanted to make it darker it stopped refreshing

red flower
#

oh

red flower
rotund sable
#

🤦‍♂️ ofc it does

#

ty N'

sonic cedar
red flower
#

i think you can use 8 but the alpha is at the end? not sure

red flower
rotund sable
scarlet imp
#

the cards are just a bit funky, I don't think they're actually being replaced as shop cards

sonic cedar
red flower
#

2 things, you dont need to check if its a face twice
youre declaring face_card inside the first if so it wont exist in the second

rotund sable
red flower
#

oh yeah

desert hedge
#

How can I add a card to the player's consumable area

chrome widget
#

whats up modding gang

scarlet imp
#

pain.

#

what's good lol

chrome widget
#

still dying. I have chili and tortilla chips now though

rotund sable
#

just noticed that most of people in this channel have a balatro mod link in their bio

gaunt thistle
#

i do not

scarlet imp
chrome widget
#

aw hell yeah banda express

#

I don't cause my mod isn't out yet

rare torrent
#

does anybody know how to add an enchacement to a card? for editions is "Card:set_edition" but how do you do that for an enchacement?

chrome widget
#

Card:set_ability()
Pass in the enhancement center, i.e. G.P_CENTERS['key'], though you can also pass in the key directly if you want and it'll parse it

scarlet imp
#

I've probably spent like half the money I made last semester at Panda

desert hedge
chrome widget
#

Honestly, as is your right

desert hedge
#

That spectral card

red flower
#

debugging

rare torrent
#

i just want to set the enchacement to a steel card if that's possible

red flower
#

card:set_ability("m_steel")

#

initial is for the first run of set_ability when its created and delay sprites is to delay sprites during scoring (mostly)

snow breach
#

Is there a way to set a “default” for a given pool? For example, a pool of every sin joker that defaults to Wrathful if you try to summon another.

scarlet imp
#
use = function(self, card, area, copier)
  if G.STATE == G.STATES.SHOP then
      for i = 1, #G.shop_jokers.cards do
          local _card = G.shop_jokers.cards[i]
          if _card.config.center.set == "Joker" then
              _card = create_card("Joker", G.shop_jokers, nil, nil, nil, nil, nil, "reroll_shop")
              create_shop_card_ui(_card, "Joker", G.shop_jokers)
          end
      end
  end
end,

I'm trying to do a manual shop reroll but I'm missing something
the cards that I create aren't actually being placed in the shop I don't think

chrome widget
#

It takes a center, not a card
card:set_ability(G.P_CENTERS.m_steel)

red flower
bitter portal
#

hey guys how do i set a card to be a small playing card pack

snow breach
chrome widget
#

self is implicitly passed from the object calling the function when you use a colon in the function call

red flower
chrome widget
#

And yes both work

bitter portal
rare torrent
# chrome widget It takes a center, not a card `card:set_ability(G.P_CENTERS.m_steel)`

ummmm not what i was expecting💀 i want it to work like certificate but it gives you a random steel card, but it just turned the joker into steel ```calculate = function(self, card, context)
if context.first_hand_drawn then
G.E_MANAGER:add_event(Event({
func = function()
local _card = create_playing_card({
front = pseudorandom_element(G.P_CARDS, pseudoseed('cert_fr')),
center = G.P_CENTERS.c_base}, G.hand, nil, nil, {G.C.SECONDARY_SET.Enhanced})
card:set_ability(G.P_CENTERS.m_steel)
G.GAME.blind:debuff_card(_card)
G.hand:sort()
return true
end}))

            playing_card_joker_effects({true})
        end
    end``` here's the current code i have
bitter portal
#

steel joker 😭

scarlet imp
#

steel edition Joker when

serene granite
#

can you have a joker create the plasma deck affect in a deck that isnt plasma deck? are there any examples i can look at for this? i kinda want to make a joker that does that

red flower
#

yes

#

copy the plasma deck calculate from vanillaremade

#

but in the joker

chrome widget
#

Whatever the object you're calling the function from (card is a standin) should be whatever you want to put the enhancement on. card in that code is the Joker, passed in as a parameter to calculate. _card is your playing card, so use that instead

scarlet imp
rare torrent
rotund sable
#

just sending the link N' mentioned

scarlet imp
sonic cedar
#

oh we in there

#

is card.config.center.rarity valid

red flower
#

yes

sonic cedar
#

sick

bitter portal
#

how do i set a card to a standard_normal_1 with set_ability

red flower
#

using "p_standard_normal_1" works

#

but you need additional logic for it to actually work as a pack

rare torrent
#

why does this add the card basically when playing but the message only appears in the main joker scoring timer? if context.joker_main and next(context.poker_hands["Pair"]) then return { message = "M", card = self }, SMODS.add_card{key = "c_cryptid"} i want the card to be added at the same time as the message, so when the joker is supossed to be scoring

red flower
#

but anyway, do it inside an event

rare torrent
red flower
#

yeah you need to put the add_card line in an event

rare torrent
old epoch
#

Is there a way to detect how many different poker hands have been played?

red flower
rare torrent
#

also quick question, if i don't specify the cost of a joker does it automatically choose the price based on rairity?

red flower
#

no, it has a default

#

it should be in the docs what it is but i think it's the price of jimbo

fallow breach
#

i apologize for another basic question but i can't find any info on how to get the mod name below the rarity

#

that space is there by default and it's bugging me lol

red flower
#

it should be there

#

how does your json/header look like

chrome widget
#

Did you not fill in the mod badge info in your metadata?

bitter portal
fallow breach
#

ah nevermind i had left a blank space in the json

#

my bad

fallow breach
#

is there a way to change the color?

red flower
#

yes, it's specified in the docs

#

something like badge_colour

fallow breach
#

alright

rotund sable
#

any name ideas?

red flower
#

deadly laser

hallow forge
#

22 AM?

rotund sable
rare torrent
#

how can i make a suit not appear in playing card booster packs? or in any pool at all?

hallow forge
#

Sunshine

rare torrent
#

and what do i put to not appear in any pool? just a random thing?

red flower
#

return false

rare torrent
red flower
#

no it's a function

modern kindle
#
    in_pool = function(self)
        return false
    end
rare torrent
#

oh my bad g

#

ok it works now thanks!

thorn furnace
#

Bump dance

scarlet imp
thorn furnace
rotund sable
scarlet imp
urban wasp
#

there's a blind for my mod that's just "+4 blind requirement" but it only displayed once you entered the blind. i asked somethingcom about this and was told to look at the clock, and tried this

SMODS.Blind {
    key = "joker",
    name = "Joker",
    pos = { x = 0, y = 0 },
    boss = { min = 1, max = 10 },
    atlas = "blind",
    mult = 1,
    cry_ante_base_mod = function(self, dt)
        return 4
    end,
    boss_colour = HEX("f7343e"),
    crp_credits = {
        idea = { "Unknown" },
        code = { "ScarredOut", "Glitchkat10" }
    }
}

it instead increases the blind size a ton like every second
(my mod is a cryptid addon btw)

thorn furnace
rotund sable
#

ig

#

i normaly use 24h but thought 12h may be nicer

#

for some people

#

way better

scarlet imp
#

in that case 22:00 would be 10PM

rotund sable
#

ik

#

my mental logic isn't functioning ig

urban wasp
#

a bit late tbh

#

sun goes down at like 6 7

#

in the summer at least

scarlet imp
#

the Joker that actively punishes players for being gaming goblins

rotund sable
urban wasp
#

when does the sun rise for you

scarlet imp
#

it depends on how far north of the equator you are. Some days in upper Canada have like 18 hours of sunlight

urban wasp
#

yeah i mean i live in az usa and sun rises at like 5 and falls at (again) like ~6 7

sonic cedar
#

why does this trigger twice? instead of the xmult going from 2->4->8 it goes from 2->8->32

thorn furnace
thorn furnace
#

More common in south america

Theres even some places in south america with a 24 hour sun

bitter portal
#

Is there a way to get the last chips and mult scored in calculate before that card is scored?

scarlet imp
rotund sable
red flower
urban wasp
#

pretty much

red flower
#

have a variable somewhere that checks if it already returned

urban wasp
#

so just like

...
    jok = false,
    cry_ante_base_mod = function(self, dt)
        if not self.jok then
            self.jok = true
            return 4
        end
        return 0
    end,
...
red flower
#

yeah
but maybe not on self because thats the definition

urban wasp
#

that made it quadruple 🤔

#

so it's multiplication

sonic cedar
#

overwrites itself

#

so it factors twice

bitter portal
#

wtf do editions not have a calculate field?

urban wasp
# bitter portal wtf do editions not have a `calculate` field?

they do; this is the calculate area for one of my mod's editions

...
    calculate = function(self, card, context)
        if
            (
                context.edition -- for when on jokers
                and context.cardarea == G.jokers -- checks if should trigger
                and card.config.trigger -- fixes double trigger
            ) or (
                context.main_scoring -- for when on playing cards
                and context.cardarea == G.play
            )
        then
            return { eee_chips = lenient_bignum(self.config.eee_chips), eee_mult = lenient_bignum(self.config.eee_mult) }
        end
        if context.joker_main then
            card.config.trigger = true -- context.edition triggers twice, this makes it only trigger once (only for jokers)
        end
        if context.after then
            card.config.trigger = nil
        end
    end,
...
bitter portal
#

right i forgot that was on almost every object type

urban wasp
#

also reminds me that i coded it wrong

vast bough
#

how would i go about altering the "saved by mr. bones"?

 calculate = function(self, card, context)
        if context.end_of_round and context.game_over and context.main_eval and not context.blueprint then
                return {
                    saved = true,
                    message = "LOOOOOOL"
                }
        end
    end
urban wasp
pulsar furnace
#

How do I get the number of times a voucher was claimed?

vast bough
urban wasp
pulsar furnace
#

like when unlocking antimatter

bitter portal
#

wait how do i make this award chips AND mult

scarlet imp
bitter portal
#

i figured it out

urban wasp
#

okay i need to do that then

vast bough
#

thank u guys regardless

scarlet imp
vast bough
scarlet imp
#

hang on

vast bough
#

the reason i was initially annoyed is because it is for joker forge but if i get given ideal code i can write code generation based off of that

#

so thank u dearly

scarlet imp
#

in your en-us.lua file, in the table misc.dictionary, put this k_saved = "Saved by #1#",

#

it won't work without that

bitter portal
vast bough
urban wasp
vast bough
#

1 up

urban wasp
#

well yeah but like

scarlet imp
urban wasp
#

it doesn't look like this joker saves you at all or maybe i'm dumb

vast bough
scarlet imp
#

it does lol, I promise

red flower
urban wasp
scarlet imp
#

it just does idk lol

urban wasp
#

fair enough

wintry solar
#

😭 the first PR I've looked at seems fine but it behaves strangely with something in ortalab and I DONT KNOW WHY

scarlet imp
#

it used to work but its bugged ugh

wintry solar
#

the one that handles cards that hide the front sprites

#

but it might just be a general ortalab bug, I need to check

errant fulcrum
#

I have this code for my custom seal but for some reason it triggers for all cards discarded and not just the ones with the seal

        if context.discard and context.cardarea == G.hand then
            for i=1, #G.hand.highlighted do
                local card = G.hand.highlighted[i]
                if card.seal == 'leshys_beeswithin' then
                G.E_MANAGER:add_event(Event({trigger = 'after',delay = 0.1,func = function()
                    SMODS.add_card({set = 'Base', area = G.hand, no_edition = true, enhancement = 'm_gold'})
                return true end }))
                end
            end
        end
    end,```
wintry solar
#

okay it's just a general bug cool

hexed stump
scarlet imp
#

its bugged, I fixed it but its not well written

vast bough
#

what is the updated version

#

send the calc function please (calc is short for calculate im just using slang)

scarlet imp
#

one sec

#

(sec is short for second I'm just cool like that)

#
calculate = function(self, card, context)
    if context.end_of_round and context.game_over and context.main_eval then
        G.E_MANAGER:add_event(Event({
            func = function()
                play_sound("tarot1")
                card:start_dissolve()
                return true
            end
        }))
        return {
            saved = "ph_1_up",
            message = localize("k_saved_ex"),
            colour = G.C.RED
        }
    end
end

new version

#

unfortunately having a variable for the "Saved by ___" message kinda messes it up

vast bough
#

beautiful, thank you

scarlet imp
#

you still need to define misc.dictionary.<key> in your localization though if you want the correct message though

vast bough
#

yeah thats chill, i appreciate the code

#

will get around to it... one day

scarlet imp
#
use = function(self, card, area, copier)
  if G.STATE == G.STATES.SHOP then
      local new_shop = {}
      for i = 1, #G.shop_jokers.cards do
          local _card = G.shop_jokers.cards[i]
          if _card.config.center.set == "Joker" then
              _card = create_card("Joker", G.shop_jokers, nil, nil, nil, nil, nil, "reroll_shop")
              create_shop_card_ui(_card, "Joker", G.shop_jokers)
          end
          new_shop[#new_shop + 1] = _card
      end
      G.shop_jokers.cards = new_shop
  end
end,

this is rerolling shop Jokers but they're not actually being placed into the shop, like the don't have the "Buy" button or anything, any ideas

vast bough
scarlet imp
#

yeah its pretty weird hold on

#

and because they're not being added to the shop they stay there forever lol

lofty sand
#

hey, does anyone know how I could get the current shop size? (in terms of card slots)

lofty sand
#

maybe, I'll try realq

scarlet imp
pale rampart
#

quick question: are booster packs more rare if you put a higher number or a lower number on the "weight" value

sonic cedar
scarlet imp
#

is it meant to be added or multiplied by xmult_gain

sonic cedar
#

it's supposed to double

#

but it's double doubling

bitter portal
#

why is score_passthrough nil... how do i do a custom config value

sonic cedar
daring fern
bitter portal
#

whoops

#

thank you

frigid cargo
#

how can i check if played poker has been played? i have a loop but id how to check if its been played before

sonic cedar
frigid cargo
#

ok thanks

sonic cedar
#

or yeah played if not just this round

#

make sure you have G.GAME.hands[context.scoring_name] and too so it knows if it exists

errant fulcrum
# errant fulcrum I have this code for my custom seal but for some reason it triggers for all card...

Okay so the only wrinkle left here is that when I discard two cards with this seal, it creates four gold cards instead of two but I can't tell why

        if context.discard and context.cardarea == G.hand and context.other_card == card then
            for i=1, #G.hand.highlighted do
                local card = G.hand.highlighted[i]
                if card.seal == 'leshys_beeswithin' then
                G.E_MANAGER:add_event(Event({trigger = 'after',delay = 0.1,func = function()
                    SMODS.add_card({set = 'Base', area = G.hand, no_edition = true, enhancement = 'm_gold'})
                return true end }))
                end
            end
        end
    end,```
sonic cedar
#

double trigger issue twins

scarlet imp
#

i wish I knew but I'm just as confused as you, it looks fine

sonic cedar
#

ill work on it more when i get back home

errant fulcrum
scarlet imp
#

how can I add a card to the shop?

frigid cargo
#

what does context.main_eval do?

wintry solar
#

makes sure it's the main evaluation of the card basically

rare torrent
#

is it possible in loc_txt to use custom colors instead of attention/chips/mult etc? "{C:chips}{}"

scarlet imp
#

@red flower what's the proper way to use the new context you made for SMODS? the context.evaluate_poker_hand one

rare torrent
# daring fern Yes.

how then? like imagine i want to use a hex color, how would i format that?

daring fern
rare torrent
wintry solar
#

you can also add your own colour codes

#

by adding them to the G.ARGS.LOC_COLOURS table

red flower
# scarlet imp <@390594268286418944> what's the proper way to use the new context you made for ...
if context.evaluate_poker_hand then
  local poker_hands = context.poker_hands
  return {
    -- It will be treated as a High Card
    replace_scoring_name = "High Card",
    -- It will be called Royal Straight
    replace_display_name = "Royal Straight", -- or a loc key
    replace_poker_hands = poker_hands
  }
end

you can also return replace_poker_hands but it's a bit more complicated, basically you can do poker_hands["Flush"] = {} to remove all flushes and stuff like that so the hand doesnt contain a flush anymore

scarlet imp
#

THANK YOUUU this is so helpful

frigid cargo
red flower
rare torrent
# wintry solar by adding them to the `G.ARGS.LOC_COLOURS` table

wait it says in the docs that it auto adds colors based on suit's and i have a custom suit i wanna use the color of local omega_suit = SMODS.Suit{ key = "omega_suit", card_key = "O", hc_atlas = 'omega_suit', lc_atlas = 'omega_suit', hc_ui_atlas = 'omega_ui', lc_ui_atlas = 'omega_ui', hc_colour = HEX('0026FF'), lc_colour = HEX('0026FF'), pos = { y = 0 }, ui_pos = { x = 0, y = 0 }, loc_txt = { singular = "Omega", plural = "Omegas" }, in_pool = function(self) return false end } how do i do that? {C:omega_omega_suit} isn't working (omega being the mod prefix)

wintry solar
#

if you're running debugplus, just run eval G.ARGS.LOC_COLOURS in the console and find what the key is

scarlet imp
red flower
#

For those you would need to modify poker_hands

#

they check for containment

scarlet imp
#

gotcha

rare torrent
red flower
#

then it's just {C:omega_suit}

rare torrent
#

oh no mod prefix? goddam

red flower
#

i think because smods removes the prefix if you add it manually

frigid cargo
#
calculate = function(self, card, context)
   if context.before and context.main_eval and not context.blueprint then
            for k, v in pairs(G.GAME.hands) do
                if G.GAME.hands[k].played > 0 then
                    card.ability.extra.mult = card.ability.extra.mult + card.ability.extra.mult_gain
                end
            end
        end
        if context.joker_main then
            return {
                mult = card.ability.extra.mult
            }
        end
    end,
}

i know what i did wrong but what im trying to do is check if hand has been played before and if so, add mult. the problem is the code i have right now will always update but i just want it to me a one time thing, how can i make it do that?

red flower
frigid cargo
#

yes

red flower
#

and never again?

#

or once per blind or something

frigid cargo
red flower
#
-- add played_hands = {} to config extra
calculate = function(self, card, context)
    if context.before and context.main_eval and not context.blueprint then
        for k, v in pairs(G.GAME.hands) do
            if G.GAME.hands[k].played > 0 and not card.ability.extra.played_hands[k] then
                card.ability.extra.played_hands[k] = true
                card.ability.extra.mult = card.ability.extra.mult + card.ability.extra.mult_gain
            end
        end
    end
    if context.joker_main then
        return {
            mult = card.ability.extra.mult
        }
    end
end
rotund sable
#

(JokerDisplay) im confused. why wont it show up the 2x

  mod_function = function(card, mod_joker)
        print((EF.photosynthesis_hour_check(mod_joker) and card.config.center.rarity == "EF_plant" and mod_joker.ability.extra.xmult ^ JokerDisplay.calculate_joker_triggers(mod_joker) or nil))
        return {
            xmult = (EF.photosynthesis_hour_check(mod_joker) and card.config.center.rarity == "EF_plant" and mod_joker.ability.extra.xmult ^ JokerDisplay.calculate_joker_triggers(mod_joker) or nil),
        }
    end
red flower
#

sadly i never used jokerdisplay

rotund sable
#

🥺

red flower
#

sometimes the modifiers hide themselves (dont know why)

rotund sable
#

other one works fine

red flower
#

i know what it might be gimme a sec

#

xmult is not a valid option :3

#

i can add it

vague crest
#

is there a convenient way to add an extra voucher slot to the shop?

rotund sable
red flower
vague crest
#

sickk i was hoping it was simple

rare torrent
#

probrably a big ask but i can't find anything in the docs about can_use and use functions, like a wanna make a cosumable that works like any other tarrot that changes 3 cards suit's, but to my own custom suit, how could i do that? ```use = function(self, card, area, copier)
end,

    can_use = function(self, card)
end```
scarlet imp
#
if context.scoring_name == card.ability.extra.poker_hand and context.end_of_round and not context.game_over and context.cardarea == G.jokers then

any reason this doesn't work for detecting if the player ends a Blind with a specific hand?

obtuse talon
#

sorry, but does anyone know if there is a like, template for creating a main.lua for a Malverk card replacement?

I found this mod, but it only has the png of 1-13 all suites, and tells you to replace the 8bit deck, but I don't wanna use the mod all the time, and found Malverk. I have the folder structure right I think, with the assets, 2x, .png, but I am terrible at coding (only done python), and can't understand the help on the malverk page. (I tried to use deepseek, and gemini 2.5 pro, and to trouble shoot with them, but I get through various phases of crashing at startup, crashing when entering the texture menu, the mod just not loading, and the mod doing everything perfectly... but on the back of the cards...)

Any help is very much appreciated

vague crest
#

is there anything specific im missing thats causing these to display as nil

rotund sable
#

You close off the vars

#

In the loc_vars

#
return {vars = {#1#, #2#, #3#}}
vague crest
#

yuppp that was it

#

ty !

red flower
rare torrent
#

how do i make a consumable create a random joker based on a custom rarity? kinda like soul execpt for a rarity in my mod

frigid cargo
#

Imma try it out again later thank tho

daring fern
rare torrent
vague crest
#

trying to increase the rate of playing cards in the shop (just a testing number) for a deck, any idea whats going wrong?

#

they still do appear in the shop just not at the extra frequency

rare torrent
daring fern
rare torrent
vague crest
#

im wondering if maybe magic trick is taking effect after and overwriting it

rotund sable
#

pseudoseed("seed")

#

instead of "seed"

daring fern
daring fern
rotund sable
#

no?

#

that worked for me

#

whe i got that error

daring fern
rotund sable
#

oohhh

red flower
vague crest
#

yep its definitely that i removed the vouchers and now i only see cards

#

i definitely want the vouchers to still be redeemed though

real night
#

i am asking yet again, how do you add to a poker hands' chips or mult

daring fern
real night
#

yay

rare torrent
daring fern
vague crest
#

bc all the code technically works here its just applying in the wrong order

real night
rare torrent
daring fern
daring fern
vague crest
#

attempting this causes a crash i fear

rare torrent
#

nevermind i fixed it!

#

just changed the variables names, probrably "local joker" was conflicting with the actuall joker pool

#

thank you very much!

#

oh wait...

#

nah i just got lucky💀

#

it's still creating any joker

daring fern
rare torrent
#

yes i did

daring fern
rare torrent
#

doubled checked it

#
for k, v in pairs(G.P_CENTERS) do
    if v.set == "Joker" and v.mod and v.mod.id == "omega" then
        table.insert(mymodjokers, v.key)
    end
end
local omegjoker = pseudorandom_element(mymodjokers, "seed")

local omega_joker = SMODS.Joker{
    key = "omega_joker",
    
    loc_txt = {
        name = "Omega",
        text = {
            "Turns every card in your deck into an {C:omega_suit}Omega{} Suit",
            "Also creates {C:attention}1 Joker{} from {X:omega_suit,C:white}OMEGATRO{} when {C:attention}Blind{} is selected"
        }
    },

    atlas = "omega_joker",
    
    pos = {x=0, y= 0},
    soul_pos = {x=0, y= 1},
    
    rarity = "omega_simp",
    cost = 20,
    unlocked = true,
    discovered = true,
    blueprint_compat = true,
    eternal_compat = true,
    perishable_compat = true,

    calculate = function(self, card, context)
        if context.first_hand_drawn then
            SMODS.add_card({key = omegjoker, set = "Joker"})
        end
    end
}```
daring fern
rare torrent
#

uhhhh idk

midnight coyote
#

how do i make a new cardarea

rare torrent
#

i asked if it needed to be inside or outside the joker and got no answer😭

daring fern
#

Modded jokers don't exist in G.P_CENTERS at that time.

midnight coyote
#

moreover, how would i inject it into UI

rare torrent
# daring fern Modded jokers don't exist in `G.P_CENTERS` at that time.

so something like this? calculate = function(self, card, context) if context.first_hand_drawn then local mymodjokers = {} for k, v in pairs(G.P_CENTERS) do if v.set == "Joker" and v.mod and v.mod.id == "omega" then table.insert(mymodjokers, v.key) end end local omegjoker = pseudorandom_element(mymodjokers, "seed") SMODS.add_card({key = omegjoker, set = "Joker"}) end end

rare torrent
#

i tried that, but still spawning any joker

#

like when the blind is selected, it spawns a random joker from the og balatro, it's only supossed to spawn jokers from my mod

daring fern
rare torrent
#

pretty sure

#
  "id": "omegatro",
  "name": "OMEGATRO",
  "description": "i love balatro",
  "version": "1.0.1",
  "author": ["omega"],
  "mod_type": "gameplay",
  "main_file": "main.lua",
  "prefix": "omega",
  "badge_colour": "0046FF"
}```
#

wait

#

oh

#

id???

#

omg im so blind💀💀💀

#

i thougth it was prefix

#

ok yeah now it's working thank you so much again😭😭😭

flat siren
#

man every time i come in here its new stuff. y'all are great

urban wasp
#

so yesterday i wanted to make my boss blind (+4 blind requirement (e.g. score at least 300 -> 304)) display correctly when not selected, as it had only applied when the blind was selected. anyway i tried this and it turns out that cry_ante_base_mod multiplies instead of adds. how could i possibly get around this?

SMODS.Blind {
    key = "joker",
    name = "Joker",
    pos = { x = 0, y = 0 },
    boss = { min = 1, max = 10 },
    atlas = "blind",
    mult = 1,
    jok = false,
    cry_ante_base_mod = function(self, dt)
        if not self.jok then
            self.jok = true
            return 4
        end
        return 0
    end,
    disable = function(self)
        self.jok = false
    end,
    boss_colour = HEX("f7343e"),
    crp_credits = {
        idea = { "Unknown" },
        code = { "ScarredOut", "Glitchkat10" }
    }
}
vast night
#

hi again. how can i load the contents of a file as text?

vast night
#

i quickly came up with this but i hope this works

#

edit

#

ignore my part with +1

#

i didnt use my brain

urban wasp
#

uhh what do i replace "base" with again i forgot

vast night
urban wasp
#

okay yeah i'll just look lol

#

oh goodie

cry_ante_base_mod = function(self, dt)
    if not self.jok then
        self.jok = true
        return (G.GAME.blind.chips + 4) / G.GAME.blind.chips
    end
    return 0
end,
urban wasp
#

sob

vast night
#

i think its because you return 0 and you cant divide by 0

red flower
#

yeah probably return nil

urban wasp
#

true

vast night
red flower
#

whom

urban wasp
#

somebody named "n'"

red flower
#

im always here i just ignore the chat when i see a lot of big blocks of code

urban wasp
#

true

vast night
red flower
#

also im slowly reading the mod manager thread

urban wasp
#

anyway WHY 😭

SMODS.Blind {
    key = "joker",
    name = "Joker",
    pos = { x = 0, y = 0 },
    boss = { min = 1, max = 10 },
    atlas = "blind",
    mult = 1,
    jok = false,
    cry_ante_base_mod = function(self, dt)
        if not self.jok then
            self.jok = true
            return (G.GAME.blind.chips + 4) / G.GAME.blind.chips
        end
        return nil
    end,
    disable = function(self)
        self.jok = false
    end,
    boss_colour = HEX("f7343e"),
    crp_credits = {
        idea = { "Unknown" },
        code = { "ScarredOut", "Glitchkat10" }
    }
}
vast night
#

we need an ai bot to repeatedly ask questions to just kill everyone

vast night
urban wasp
urban wasp
vast night
#

print out the calculation result

#

the variables may return nil

rare torrent
#

is this not how you convert a suit? scored_card.ability.suit = 'omega_suit'

urban wasp
vast night
vast night
vast night
red flower
vast night
ivory coral
red flower
#

also emoji reactions are not working on my phone so something's power has been nerfed

red flower
#

1

rare torrent
#

it'ssss not doing anything

molten rover
#

alright chat i got an idea for my launcher script right
so right now i just have a list of mods and their github repositories (from awesome-balatro)
my problem is, not all mods are installed by just cloning the repository into the mods folder
another problem is, not all mods can be used standalone with no other mods
another problem is, having only this selection of mods limits how many mods the user can install with the program
another problem is, mods generally include more information than just its name and a vague category
my idea is to have a sorta database that includes mods, information like the author and description, and a script that installs it
another problem is, itd take weeks to go through every balatro mod and write a script that works on every system to install it
what should i do chat

vague crest
#

anyone got any idea why this is crashing?

ivory coral
vast night
#

also

#

there already is a mod loader

vast night
rare torrent
# ivory coral im not 100% sure how custom suits are handled but i think so given that `scored_...

im basically making midas mask, but it changes every card's played suit ```if context.before and context.main_eval and not context.blueprint then
local converted = 0
for _, scored_card in ipairs(context.scoring_hand) do
SMODS.change_base(scored_card, nil, 'omega_suit')
converted = converted + 1

        G.E_MANAGER:add_event(Event({
            func = function()
                scored_card:juice_up()
                return true
            end
        }))
    end
    if converted > 0 then
        return {
            message = 'Omega!',
            colour = G.C.SUITS['omega_suit']
        }
    end
end```
urban wasp
vague crest
daring fern
rare torrent
ivory coral
vague crest
#

ok wait how would i resolve this then

#

would it just pretty much be pasting that code in iinstead

daring fern
vague crest
#

oh

vast night
rare torrent
vast night
ivory coral
vague crest
#

woahhh sick it works

ivory coral
#

then with the error message maybe we can see whats wrong

vast night
rotund sable
#

damn

#

rank != suit

vast night
ivory coral
rare torrent
#

a

ivory coral
#

thats my bad

#

i messed up the order when i told you

rotund sable
ivory coral
#

its (card, suit, rank)

rare torrent
vague crest
#

one last question, i added the extra bit to everything in the other deck and while i think itll get the effect im hoping for once ive added everything properly, it's currently still crashing. does anyone know a fix?

vast night
#

did you mean G, Gameor card?

vague crest
#

oh yeah i have that deck working this is hte other one im trying to set up today

vague crest
#

it's supposed to increase the rate of seeing playing cards with illusion in the shop, but im trying to set it up so that it applies the voucher before applying the playing card rate increase because magic trick by default overwrites it

vast night
#

How can i load the text of a file in my mod? I remember hearing smtn about systemfs or smtn like that

thorn furnace
#

Bump

frozen smelt
#

i'm booting up to a black screen

#

idk if its mod related but it doesnt usually happen

#

think it is mod related tho because i reinstall the game to no black screen

red flower
#

for the button and whatever function it uses

thorn furnace
thorn furnace
red flower
#

im a psychic

thorn furnace
#

:3

#

Here is the functions

#

Lemme grab the button

urban wasp
thorn furnace
daring fern
urban wasp
#

so like

daring fern
# urban wasp so like

get_blind_amount(G.GAME.round_resets.ante)*G.P_BLINDS.bl_modprefix_key.mult*G.GAME.starting_params.ante_scaling

urban wasp
#

yeah that works lol

red flower
urban wasp
# daring fern `get_blind_amount(G.GAME.round_resets.ante)*G.P_BLINDS.bl_modprefix_key.mult*G.G...

great

SMODS.Blind {
    key = "joker",
    name = "Joker",
    pos = { x = 0, y = 0 },
    boss = { min = 1, max = 10 },
    atlas = "blind",
    mult = 1,
    jok = false,
    cry_ante_base_mod = function(self, dt)
        if not self.jok then
            self.jok = true
            return get_blind_amount(G.GAME.round_resets.ante)*G.P_BLINDS.bl_crp_joker.mult*G.GAME.starting_params.ante_scaling
        end
        return nil
    end,
    disable = function(self)
        self.jok = false
    end,
    boss_colour = HEX("f7343e"),
    crp_credits = {
        idea = { "Unknown" },
        code = { "ScarredOut", "Glitchkat10" }
    }
}
#

i have no idea why this is happening

thorn furnace
#

not entirely sure where that would go

red flower
#

you can put it in the patch just before local lock probably

thorn furnace
#

unless you mean just like

#

oh

#

yeah

#

I'll give it a shot

red flower
#

my guess is that it gets messed up by it being nil the first time before the other function loads

final jewel
#

Small question, is the rarity actually makes consumable rarer to be drop ?

ocean goblet
#

how does one load their config in other files?

#

as in those loaded via SMODS.load_file

errant fulcrum
#

Does context.destroy_card trigger its effects when a card is destroyed or is it used itself to destroy cards?

red flower
ocean goblet
#

thank you :D

red flower
#

or SMODS.current_mod.config in initial loading

#

which you can save for easier access

errant fulcrum
#

Ah, is there a context for when cards are destroyed?

thorn furnace
#

I can now move onto the next UI thing I will suffer with

red flower
#

context.remove_playing_cards for playing cards, context.joker_type_destroy for other things (in the next SMODS release)

errant fulcrum
#

Thanks a million

thorn furnace
red flower
#

good luck

thorn furnace
#

:3

#

There's no text so recalculate shouldn't fail me 🙏

hidden sable
#

anyone know how to make a shader overlay the games "camera"

#

i need to make a function that overlays a shader for 170 seconds and if the event isnt cancelled before it ends it ends the run

urban wasp
sour garden
#

how do i use a global variable to make a sell counter? i tried to use a reset_game_globals to set it but the game says that i'm trying to increment a nil value here

hidden sable
#

jsut call the global

sour garden
hidden sable
#

like literally just call the global in its own line

errant fulcrum
#

Is there a way to manipulate a card's position in the deck? Or at least place it at the top of the deck?

hidden sable
#

anyone know how i can get my shader into balatro?

#
{
    vec2 uv = fragCoord / iResolution.xy;
    vec3 bg = texture(iChannel0, uv).rgb;

    float speed = 0.0059;
    float t = clamp(iTime * speed, 0.0, 1.0);

    float borderPx = 0.5;
    float thickness = borderPx / iResolution.y;

    float freq = 50.0;
    float flash = (sin(iTime * freq) * 0.02) + 0.5;

    vec3 col = bg;

    float borderPos = 1.0 - t;
    if (uv.y > borderPos) {
        float darkR = 1.0;
        float brightR = 0.9;
        col.r = mix(darkR, brightR, flash);
        col.g = bg.g * (1.0 - flash * 0.8);
        col.b = bg.b * (1.0 - flash * 0.8);
    }

    if (uv.y < borderPos + thickness && uv.y > borderPos - thickness) {
        col = vec3(1.0);
    }

    fragColor = vec4(col, 1.0);
}
urban wasp
mellow osprey
#

how would i code a joker card where it gives me x3 mult when a king is played but when i play a queen it gives me 0.50x mult how would i do that shiish

daring fern
urban wasp
#

okay right

#

but somehow this is equaling 0

hidden sable
# mellow osprey how would i code a joker card where it gives me x3 mult when a king is played bu...
-- Triboulet
SMODS.Joker {
    key = "triboulet",
    unlocked = false,
    blueprint_compat = true,
    rarity = 4,
    cost = 20,
    pos = { x = 4, y = 8 },
    soul_pos = { x = 4, y = 9 },
    config = { extra = { xmult = 2 } },
    loc_vars = function(self, info_queue, card)
        return { vars = { card.ability.extra.xmult } }
    end,
    calculate = function(self, card, context)
        if context.individual and context.cardarea == G.play and
            (context.other_card:get_id() == 12 or context.other_card:get_id() == 13) then
            return {
                xmult = card.ability.extra.xmult
            }
        end
    end,
}
mellow osprey
#

thanks bro!

sour garden
#

that's just the code for trib

hidden sable
#

yeha

sour garden
#

you gotta modify it

urban wasp
#

uh no i'm pretty sure he was just giving an example on how you could do so

mellow osprey
#

yeah man i dont know shit of coding im just in a call with friends

frozen smelt
#

anyone know the issue here

frozen smelt
#

shouldn't be too much i hope

hidden sable
urban wasp
frozen smelt
#

just x2 i think

hidden sable
#

you nee dboth

urban wasp
#

yeah you need both

hidden sable
frozen smelt
#

i have both the issue just persists with just x2

#

judging by the crashlog

urban wasp
hidden sable
#

needs to be like this

frozen smelt
urban wasp
hidden sable
frozen smelt
#

alright

urban wasp
#

could be either

frozen smelt
hidden sable
#

both pngs need to be the same name

frozen smelt
#

yeah i got that

#

both have the same name

urban wasp
#

i.e. make both "dl_bald_joker"

frozen smelt
#

alright

sour garden
hidden sable
#

jsut declare it

frozen smelt
#

same crash each time

hidden sable
#

id put it in its own file for organization sake

frozen smelt
#

is this not the correct file organisation?

sour garden
#

i'm already putting every joker in their own file, i think it's fine in main

urban wasp
frozen smelt
#

what else could be the issue

urban wasp
#

are you sure the atlas is correct?

hidden sable
urban wasp
#

like the SMODS.Atlas

frozen smelt
#

in jokers.lua?

urban wasp
#

yes

hidden sable
#

wherevr

frozen smelt
#
    key = "bald_joker",
    path = "j_bald_joker.png",
    px = 71,
    py = 95
})```
hidden sable
hidden sable
frozen smelt
#

so j_bald_joker.png was fine the first time, or should have been

hidden sable
#

so in this case dl_bald_joker

frozen smelt
hidden sable
#

wreong person but point stands

hidden sable
#

then lets see

frozen smelt
#

aight

hidden sable
#

my theory is your atlas in the actual joker is wrong

frozen smelt
#

same crash

hidden sable
#

show joker code

#

or at least

#

where you define atlas

#

inside the joker

frozen smelt
#
    key = "bald_joker",
    path = "dl_bald_joker.png",
    px = 71,
    py = 95
})

SMODS.Joker{
    key = "bald_joker",
    config = { extra = { mult = 2} },
    pos = { x = 0, y = 0 },
    rarity = 2,
    cost = 4,
    blueprint_compat = true,
    eternal_compat = true,
    unlocked = true,
    discovered = true,
    effect = nil,
    atlas = 'bald_joker',
    soul_pos = nil,

    calculate = function(self, card, context)
        if card.debuff then return nil end
        if context.individual and context.cardarea == G.play then
            return {
                shake_card(context.cardarea),
                mult = card.ability.extra.mult,
            }
        end
    end,

    loc_vars = function(self, info_queue, card)
        return { vars = { card.ability.extra.mult } }
    end
}```
#

from the atlas, all relevant code

hidden sable
#

atlas is correct...

frozen smelt
#

equally as confused

urban wasp
hidden sable
#

also if you are defiing something as nil you can jsut not define it

frozen smelt
frozen smelt
urban wasp
#

dumb question: you sure you saved everything

hidden sable
frozen smelt
hidden sable
#

aslo whats in globals.lua

frozen smelt
#

just colors

urban wasp
#

anyway

#

ummmmmm

hidden sable
rotund sable
#

My best guess is atlas key and joker key are clashing

urban wasp
hidden sable
#

oh wiat

#

sorry

#

stupid

rotund sable
#

If not I have no clue

frozen smelt
#

whats the issue here

urban wasp
#

it's supposed to be "1x" and "2x" not "x1" and "x2"

hidden sable
#

OH

#

YEAH

#

good catch

red flower
#

classic

urban wasp
#

sob

hidden sable
#

the wizard is here

frozen smelt
#

wait what

#

how do i change that then

hidden sable
rotund sable
#

Rename folders

hidden sable
#

kind wizard of n, how does shaders work

#

how can a make a simple shader overlay

urban wasp
frozen smelt
#

oh wait

#

i misread

#

damn i am an idiot

urban wasp
#

learn the entirety of glsl

hidden sable
#

i ahve one made

urban wasp
#

ah

hidden sable
#
{
    vec2 uv = fragCoord / iResolution.xy;
    vec3 bg = texture(iChannel0, uv).rgb;

    float speed = 0.0059;
    float t = clamp(iTime * speed, 0.0, 1.0);

    float borderPx = 0.5;
    float thickness = borderPx / iResolution.y;

    float freq = 50.0;
    float flash = (sin(iTime * freq) * 0.02) + 0.5;

    vec3 col = bg;

    float borderPos = 1.0 - t;
    if (uv.y > borderPos) {
        float darkR = 1.0;
        float brightR = 0.9;
        col.r = mix(darkR, brightR, flash);
        col.g = bg.g * (1.0 - flash * 0.8);
        col.b = bg.b * (1.0 - flash * 0.8);
    }

    if (uv.y < borderPos + thickness && uv.y > borderPos - thickness) {
        col = vec3(1.0);
    }

    fragColor = vec4(col, 1.0);
}```
urban wasp
#

i mean you can just replace the shader file of a different mod

hidden sable
#

for ref

urban wasp
#

that's what i did

hidden sable
#

what is this

urban wasp
#

oh wait did you make your shader outside of balatro/LOVE

hidden sable
#

uhhh

#

i made the shader inside shadertoys

urban wasp
#

yeah you're cooked idk how to convert that lol

hidden sable
#

😭L

urban wasp
#

somebody probably does

#

i am not a shader guy alright

hidden sable
#

its a simple shader tho it shouldnt be too hard

#

onyl time vremade doesnt come in clutch

urban wasp
#

you underestimate the number of syntax errors that are possible

#

the only two shaders in my mod (of the 11 editions) were made on complete accident or were a joke from ai slop 😭

#

it's great

#

no it's not but like the only ways i've ever done shaders were by just messing with values on other shaders

#

because i have no clue why any time i ever try to make a shader i get 50 syntax errors

hidden sable
#

the shader should be even easier considering it's not going on a card

#

it's just an overlay

frozen smelt
#

thanks for helping guys all is well now

hidden sable
#

like the vhs shader or whatever

frozen smelt
#

appreciate it even if it was a stupid issue of mine

hidden sable
frozen smelt
#

just as planned

hidden sable
#

lol

urban wasp
#

classic lurking somethingcom "🤔"

hidden sable
#

i need to figure out how to do that that is funny asf

daring fern
urban wasp
# daring fern

okay unironically this is just what i wanted to do with one of my jokers (but just for enhancements)

#

ended up commenting it out though since returns end all next things so i would have to create an if for every single scenario (e.g. lucky cards and echo cards' probabilities)

daring fern
hidden sable
#

imagine a card enhancement that would slowly infect all your cards

final jewel
#

how do I make a cunsumable spawn as freakently as the soul ?

urban wasp
#

but no i have no idea what those are

daring fern
# daring fern

The only thing that is missing is multiple of the same sticker.

hidden sable
final jewel
urban wasp
hidden sable
urban wasp
#

makes things appear rarely

hidden sable
#

or wait sorry

#

misread

#

execute me ig... 😢

final jewel
#

like I want my consumable to be as rare as a soul in my packs

#

its going to do that Ig

urban wasp
hidden sable
#

i consider mr poly bridge and n to be the wizards of the modding community

#

the ⬆️ should get a balatro makeover

hidden sable
#

anyways any wizards here that know shaders?

hasty mist
#

how do you use loc_vars on a blind

daring fern
urban wasp
tranquil axle
#

hey so why is this happening?

#
--- STEAMODDED HEADER
--- MOD_NAME: Shenanagain
--- MOD_ID: shenanagain
--- MOD_AUTHOR: [TheTyphothanian]
--- MOD_DESCRIPTION: Shenanigans but again
--- PREFIX: shen
--- VERSION: 1.0.0

----------------------------------------------
------------MOD CODE -------------------------

SMODS.Atlas {
  key = "shen",
  path = "shen_atlas.png",
  px = 71,
  py = 95
}
idle plaza
tranquil axle
#

also using vs code is there something better?

tranquil axle
#

dang

daring fern
tranquil axle
#

oh my god

daring fern
#

2x being double sized.

tranquil axle
#

yeah

#

I've seen that when digging through mod files just completely forgot

#

testing

#

same error

daring fern
tranquil axle
lucid owl
#

also, you don't need that ancient mod header

tranquil axle
#

oke

lucid owl
#

just do your stuff in the metadata .json

tranquil axle
#

ye but I saw some mods doing it

#

felt like I should

lucid owl
tranquil axle
#

now I know

storm frigate
#

ok hear me out:

#

what if i try to add folders to the mod menu in smods

storm frigate
#

what are the odds i accidentaly delete everything

tranquil axle
#

high

tranquil axle
daring fern
tranquil axle
#
[manifest]
version = "1.0.0"
dump_lua = true
priority = 0

[[patches]]
[patches.copy]
target = "main.lua"
position = "append"
sources = [
    "shenanagain.lua"
]
#

do I need more?

daring fern
tranquil axle
#

okay

daring fern
#

I think you're trying to load the file before SMODS.Atlas exists.

tranquil axle
#

oh dang that was it

#

holy cow thank you

#

time to develop my overpowered spectral card

real night
#
SMODS.Joker {
    key = "universal_joker",
    config = { extra = { h_mult = 1 } },
    rarity = 2,
    cost = 10,
    blueprint_compat = true,
    eternal_compat = true,
    pos = { x = 1, y = 0 },
    atlas = "placeholders",
    demicoloncompat = true,
    loc_vars = function(self, info_queue, card)
        return {
            vars = {
                number_format(card.ability.extra.h_mult),
            },
        }
    end,
    calculate = function(self, card, context)
        if context.before and context.cardarea == G.play or context.forcetrigger then
            return {
                G.GAME.hands[context.scoring_name].mult = G.GAME.hands[context.scoring_name].mult + card.ability.extra_h_mult
            }
        end
    end,
}
#

why isnt this working

idle plaza
tranquil axle
#

hrrrmmmm

#

why no texture

#

eh I can prob figure it out

real night