#💻・modding-dev

1 messages · Page 507 of 1

primal robin
#

I have proposition for you

long sun
#

yoyoyo!

loud silo
#

i made textures for a skin but they appear grey in game

#

and only half of them are appearing

primal robin
gusty iron
#

(just asking, when is "soon"?)

frosty rampart
#

soon is now, I had a cat on my lap but now I'm pulling up the code I wanted to reference

gusty iron
#

okay fire

loud silo
#

anyone know why this is happening ?

sonic cedar
#

Probably

loud silo
#

that doesnt do anything

sonic cedar
#

oh wait that doesn’t explain the suit
Hmm

loud silo
#

also i made several cards and most of them arent showing up

#

it was only showing customs for the hearts and dimond cards that i made but was greying them out

long sun
modern kindle
loud silo
#

wait this is weird

#

it is because of that setting

sonic cedar
loud silo
#

but how do i get it to not do that..??

modern kindle
loud silo
#

do i need to specify to make it hc or lc?

sonic cedar
#

im pretty sure that's what you do? i dont really work with card skins

frosty rampart
# gusty iron okay fire
local is_suit_ref = Card.is_suit
function Card.is_suit(self, suit, bypass_debuff, flush_calc)
  -- do this so that debuffed cards don't count for their suit when they're not supposed to
  if self.debuff and not bypass_debuff then return end

  -- replace the "modprefix" with your mod's prefix. this also assumes that "Spearts", "Spiamonds", etc. are the actual keys of the suits
  if (self.base.suit == 'modprefix_Spearts') and (suit == 'Spades' or suit == 'Hearts') then return true end
  if (self.base.suit == 'modprefix_Spiamonds') and (suit == 'Spades' or suit == 'Diamonds') then return true end
  -- fill in the rest of the suits similarly...

  return is_suit_ref(self, suit, bypass_debuff, flush_calc)
end
loud silo
#

ok

#

sorry

sonic cedar
#

dont apologize lmao its mb

gusty iron
frosty rampart
#

lemme dig into flush calculations then, hang on

#

is it working otherwise?

rapid stag
#

is there a way i can iterate through a table and during each iteration, track whether or not it's the last? for instance

blah = function()
 for i, v in ipairs(myTable) do
   if v:function(arg1, arg2, isThisTheLastIteration) then
     return
   end
 end
end
gusty iron
#

it also doesnt seem to work in general

#

(i played a pair of diclubs when a joker was tracking diamonds, and nothing happened)

frosty rampart
#

shoot, ok. flush calculations just use is_suit anyway so it makes sense that it's all or nothing. do you have the debugplus mod?

clear ocean
#
poll_question_text

hare's rarity

victor_answer_votes

2

total_votes

4

frosty rampart
# gusty iron yeah

ok great. hover over a card with one of your custom suits with the mouse, press / to open the console, type eval dp.hovered.base.suit, and send me the output

gusty iron
#

so i think it goes based off of the name

#

and not the key

#

OH WAIT

#

IM AN IDIOT

#

I MIXED UP CARD_KEY SUIT SUIT_KEY

rapid stag
frosty rampart
#

yea lol
i assume you've got it then?

gusty iron
frosty rampart
fading kiln
#
    calculate = function(self, card, context)
        if context.individual and context.cardarea == G.play and not context.blueprint then
                local enhancement_pool = { 'm_gold', 'm_steel', 'm_glass', 'm_wild', 'm_mult', 'm_lucky', 'm_stone', 'm_bonus' }
                          local random_enhancement = pseudorandom_element(enhancement_pool, 'edit_cards_enhancement')
                        context.other_card:set_ability(random_enhancement, nil, true)
                          local seal_pool = {'Gold', 'Red', 'Blue', 'Purple'}
                          local random_seal = pseudorandom_element(seal_pool, 'edit_cards_seal')
                        context.other_card:set_seal(random_seal, true)
                        local edition = poll_edition('edition_random', nil, true, true, 
                            { 'e_polychrome', 'e_holo', 'e_foil' })
                        context.other_card:set_edition(edition, true)
                return {
                    message = "Card Modified!"
                }
        end
    end

is there a reason why the seals and editions are being applied when the hand is played and the enhancement when it scores?

#

shouldnt it all happen when the card scores?

gusty iron
#

Is this cursed

solemn shuttle
#

is there a G.STATES.{thing] for discarding btw and if so what is it

#

-# i forgot it

solemn shuttle
paper elbow
#

Who here has done extensive UI mods?

paper elbow
# gusty iron Is this cursed

Mildly, but it could be worse. Try to find someone you know with visual impairments and see how well they can tell what's happening though, because I could see this being an accessibility issue.

red flower
#

i have done a UI mod

primal robin
#

i have done a UI mod too

paper elbow
#

Perfect. So I want to add an interaction button similar to the sell button, but doing something else. I want these to be triggered by a joker. It's for moving cards into slots they wouldn't normally go to. What do I need to do?

Also in general, how can I override vanilla UI code? I want to make some colour adjustments.

gusty iron
paper elbow
sonic cedar
#
INFO - [G] Is j_test_broken in G.P_CENTERS? nil
INFO - [G] key type:  string value type:  string
INFO - [G] G.P_CENTERS does not contain key:  j_test_broken
INFO - [G] calc_dollar_bonus does not exist.
INFO - [G] obj: nil
INFO - [G] key: j_test_broker
INFO - [G] value: j_test_broken

someone.......please........for why......does it not work ShinjiHustle

red flower
#

it's not something that I can explain over messages tho. i can link to the code

paper elbow
red flower
#

@/sleepy make a card button api that works with a controller pls thank you

paper elbow
#

Yeah, actually how the heck does Balatro play on consoles???

#

Haven't tried.

red flower
#

all the functions above that one except for function Card:align_h_popup() are used

#

i should probably move them around

normal crest
#

as for the rest, I dunno what you're trying to do

gusty iron
#
        can_use = function(self, card)
            return #G.hand.highlighted == 2
        end,

how would i make it so that the 2 cards selected also have to be the same rank?

paper elbow
sonic cedar
gusty iron
paper elbow
gusty iron
normal crest
sonic cedar
red flower
normal crest
solemn shuttle
#

nvm

#

i know how to answer the question

#

lol

paper elbow
normal crest
sonic cedar
normal crest
sonic cedar
#

i am?

#

so the
the detection isnt broken?

#

its the loading?

#

holding celebration until i see it myself

normal crest
#

yep that looks like the right order

sonic cedar
normal crest
#

if it still doesn't work, it's possible the jokers aren't added to G.P_CENTERS immediately, and you should check in SMODS.Centers instead

sonic cedar
#

ok trying with that then

gusty iron
#

it works jippie :)

red flower
#

cant you do this in a hook

sonic cedar
red flower
#

i mean if P_CENTERS is not updated at that point

#

you can do it in Game:main_menu or something

#

idk whats the best function to hook at the beginning of the game

vernal path
#

How might I take ownership of e_foil in order to change it's effects, as a joker? I want to simply make it X2 chips.

#

The wiki kinda explains it's a thing you can do, but it doesn't much explain how to make things happen in this kind of oblique way.

normal crest
sonic cedar
normal crest
#

good then

#

tho the message you replied to for that wasn't what solved it

sonic cedar
#

true.....

#

pack it up guys wedding's off

#

i want the lorax gif to be posted here so bad

fading kiln
#

does anyone know how to make set_seal only activate when a card is triggered?

#

i know set_edition has a delayed argument which works

ivory coral
fading kiln
#

the enhancements and editions are applied when the card triggers

#

but the seals are applied when the hand is played

placid star
#

@red flower do you have the latest smods installed?

#

pretty sure i found a bug in src/overrides.lua where there arent nil checks in funcs causing crashes when you restart a run with a card highlighted

#
[patches.pattern]
target = '=[SMODS _ "src/overrides.lua"]'
pattern = '''
text = flags.replace_scoring_name or text
    disp_text = flags.replace_display_name or flags.replace_scoring_name or disp_text
    poker_hands = flags.replace_poker_hands or poker_hands
'''
position = "at"
payload = '''
if flags then
text = flags.replace_scoring_name or text
    disp_text = flags.replace_display_name or flags.replace_scoring_name or disp_text
    poker_hands = flags.replace_poker_hands or poker_hands
end
'''
match_indent = true
[[patches]]
[patches.pattern]
target = '=[SMODS _ "src/overrides.lua"]'
pattern = '''
    if flags.prevent_debuff then return false end
    if flags.debuff then
        SMODS.debuff_text = flags.debuff_text
        SMODS.hand_debuff_source = flags.debuff_source
'''
position = "at"
payload = '''
if flags then
    if flags.prevent_debuff then return false end
    if flags.debuff then
        SMODS.debuff_text = flags.debuff_text
        SMODS.hand_debuff_source = flags.debuff_source
end
'''
match_indent = true``` fixed with this
ivory coral
fading kiln
#
    calculate = function(self, card, context)
        if context.individual and context.cardarea == G.play and not context.blueprint then
                local enhancement_pool = { 'm_gold', 'm_steel', 'm_glass', 'm_wild', 'm_mult', 'm_lucky', 'm_stone', 'm_bonus' }
                local random_enhancement = pseudorandom_element(enhancement_pool, 'edit_cards_enhancement')
                    context.other_card:set_ability(random_enhancement, nil, true)
                local seal_pool = {'Gold', 'Red', 'Blue', 'Purple'}
                local random_seal = pseudorandom_element(seal_pool, 'edit_cards_seal')
                    context.other_card:set_seal(random_seal, nil, true)
                local edition = poll_edition('edition_random', nil, true, true, { 'e_polychrome', 'e_holo', 'e_foil' })
                    context.other_card:set_edition(edition, nil, true, true)
                return {
                    message = "Card Modified!"
                }
        end
    end
red flower
#

jokerdisplay did that but i fixed it

placid star
#

hm

#

well itd be something to show them in the pr thing no?

#

also, great to have you on team piss drawer!

placid star
red flower
#

the github issues?

placid star
#

perchance?

red flower
#

you can make an issue there if you want

placid star
#

uploaded an issue on github o7

ivory coral
fading kiln
#

the second true in edition in theory is for that

#

i gues set_seal just doesnt have it

red flower
#

nobody added the delay to set_seal

ivory coral
#

yeah immediate in set_seal seems to just skip making an event at all

#

and without it doesnt help either

#

i suspect you'll have to patch set_seal to make it work how you want

vernal path
#

okay, I've gotten fairly close but I don't know how I'd check if you have a certain joker:

SMODS.Edition:take_ownership('foil',
    {
        calculate = function (self, card, context)
            if context.post_joker and context.card_area == G.jokers then
                return { xchips = 2 }
            end
            if context.main_scoring and context.cardarea == G.play then
                return { xchips = 2 }
            end
        end
    },
    true
)``` I'm wanting to check for `j_mode_blue_monday`
#

because doing something like context.other_joker == "blue_monday" just does nothing, and also doesn't work for card scoring

modern kindle
#

i only just glanced but maybe you could do smods.find_card or smth

red flower
#

card_area is wrong, its cardarea

vernal path
#

whoopsies

vernal path
red flower
#

it would probably just be card.config.center.key == "key"

vernal path
#

oh wait no it's always on

#

smh my head

red flower
#

what's the intention for this?

red flower
#

I can see that

#

but when, how, why

vernal path
#

When you have the joker, Blue Monday, it changes foil to do X2 chips instead. It is supposed to go back to normal if you lose Blue Monday.

red flower
#

yeah this will just overwrite it

vernal path
#

yeah :(

red flower
#

does foil use a config

vernal path
#

it does, it's just config = { extra = 50 }

red flower
#

oh ok, it doesnt for what i was asking but dw lol

red flower
# vernal path it does, it's just `config = { extra = 50 }`
SMODS.Edition:take_ownership('foil',
    {
        calculate = function (self, card, context)
            if next(SMODS.find_card("j_mode_blue_monday")) and (context.post_joker or (context.main_scoring and context.cardarea == G.play)) then
                return { xchips = 2 }
            end
            if context.pre_joker or (context.main_scoring and context.cardarea == G.play) then
            return {
                chips = card.edition.extra
            }
        end
        end
    },
    true
)
vernal path
#

hm, that's what i was worried about, lol, having to completely override it :P

red flower
#

thats what take ownership does

vernal path
#

I can hope!

#

Had to re-add the config, but it works. Danke!

rapid stag
#

i want to write either a joker, enhancement or deck effect (undecided) wherein scored cards explode (as in exploding dice - so instead of scoring their normal chips value, they score a random number between 1 and their normal chips value, if they score their normal chips value, they retrigger) but i don't know how to "replace" a card's value such that it does something else cirThink where should i look to start looking into this?

#

can i just set bonus to 0 or

modern kindle
#

i assume you can just get the card.base.nominal per card and then just make it the base is the max and 0 as the lowest and just doa good ole rolling

normal crest
#

dilly

#

did you solve the lag

rapid stag
# modern kindle i assume you can just get the card.base.nominal per card and then just make it t...
calculate = function(self, card, context)
  if context.before and context.main_eval then
    for i, c in ipairs(context.scoring_hand) do
      c.base.nominal = pseudorandom('explodeVal', 1, to_number(c.base.value))
    end
  end

  if
    context.repetition
    and cardarea == G.play
    and context.other_card.base.nominal == c.base.value
  then
    local cardRef = context.other_card
    return { repetitions = 1,
        func = function()
          cardRef.base.nominal = pseudorandom('explodeVal', 1, to_number(cardRef.base.value))
        end
      }
  end
end

? cirDerp

modern kindle
# normal crest did you solve the lag

yes =]

now its just the thing of making the messages return properly

it was simple when the fridge joker was handling that, but now since its all done in calculate_joker thats been a struggle

modern kindle
normal crest
#

what was the source of the lag?

modern kindle
#

it was that we were probably iterating through all of G
now we just do

[[patches]]
[patches.pattern]
target = '=[SMODS _ "src/utils.lua"]'
pattern = '-- TARGET: add your own CardAreas for joker evaluation'
position = "after"
payload = '''
for _key, _cardarea in pairs(G.fridgeareas) do
table.insert(t, _cardarea)
end
'''
match_indent = true
normal crest
#

ah, awesome

#

i'm surprised that caused so much lag

#

but glad it's solved

modern kindle
#

yea from over 100 frames to 35 was horrendous

#

but now we go from like 140 to 120

normal crest
#

still a lot tbh

#

how many cardareas do you have

modern kindle
#

alot of that has to do with gpu joker

normal crest
#

ah

modern kindle
#

since im pulling the gpu util constantly

normal crest
#

and set ret.card to the fridge card too, if the joker returned anything

modern kindle
#

gotcha gotcha, let me try and see if i can do that

i had a version where it worked for messages before when we didnt have it working for seals
but then since it called calc joker in jokers calc it meant it scored twice (once in jokers calc and once in my cal joker hook)

sonic cedar
#

next one done

red flower
#

all mods should have documentation

modern kindle
#

just for that im removing every comment ive ever made

#

perish

red flower
#

dilly

modern kindle
#

N

red flower
#

im going to

#

sleep

modern kindle
#

i hope you rest wonderfully

#

im glad i got some stuff done because tomorrow is concert

red flower
#

are you singing

modern kindle
#

no because i am talentless

#

=[

sonic cedar
red flower
#

hi fellow pissdrawer

sonic cedar
#

hello fellow pissdrawer

#

normally itd take me a week to do something like things i did today

#

instead it only took today and last night

red flower
#

thats means your getting better :3

sonic cedar
#

and that was last night with 4 am brain i had to fix my own code bro 😭

sonic cedar
modern kindle
#

i feel like i aint getting much better
ill do x thing but then not comprehend how to do some basic thing

#

i just rotate knowledge

sonic cedar
#

that's literally just programming

#

"not getting any better"

looks inside
listing rite of passage as an example
wires

modern kindle
#

ur simply a baboon

sonic cedar
#

my ass is nowhere near that color thank you very much

modern kindle
#

tell it to the judge

sonic cedar
sonic cedar
#

IS tOO LAte

red flower
#

gn zzz

sonic cedar
#

yeah that should be good

modern kindle
#

lmao

sonic cedar
#

now he'll rest REALLY well

red flower
#

chiaki danganronpa

modern kindle
#

he will when i slide up next to him

#

this just looks really funny
no care, just chiaki

sonic cedar
sonic cedar
modern kindle
#

chunky kong

errant arrow
#

how would i make a joker detect the jokers to it's immediate left and right

#

-# wait, i can just look at blueprint-

rapid stag
#

how can i compare the current blind score to the required score cirDerp

i remember that the required score var is G.GAME.blind.chips, but what's the one for the current score?

it was G.GAME.chips cirDerp

chrome widget
#

Big fan of chiaki Danganronpa

rapid stag
#

-# this joker gives xmult for how many times chiaki danganronpa has been mentioned in the balatro discord

summer idol
#

Would it be possible to have a joker check a players other current jokers to see if any are in a pre-determined pool? I currently have a list of jokers in a pool via SMODS.ObjectType and was wondering if there is potentially a way to use it to pull this off.
I haven't quite thought this through fully but wanted to ask before I potentially waste anymore time trying to figure something out.

hybrid shadow
#

what change removes negative from this again

normal crest
#

the 3rd parameter should be true if you don't want negative

hybrid shadow
normal crest
#

yes

hybrid shadow
#

alr

normal crest
summer idol
#

🫡 I shall give that a shot, thank you

charred widget
#

hello lads

#

i'm here because i need help and people in modding-chat are being weird

charred widget
#

so i'm using jokerforge

crisp coral
charred widget
#

ok sure

misty radish
vernal path
#

Is there a way to access how many chips have been scored? I want to use it as a variable.

#

Not total score, like how many chips when the joker is triggered

crisp coral
#

hand_chips

vernal path
#

in what context? context.hand_chips? G.GAME.hand_chips?

normal crest
#

just a global variable

#

hand_chips

vernal path
#

oh, really? Okay

normal crest
#

same with mult

worthy stirrup
#

Is there a way to apply a shader to the whole screen instead of just a joker?

normal crest
#

i'd assume the same way the crt shader is applied

worthy stirrup
#

I’ll probably have to do a lovely patch then

charred widget
#

ok so i'm trying to make a joker that levels up the most played poker hand after a boss blind

faint leaf
#

how do i make it so a hand is ALWAYS set to a certain one, no matter what i play?

vernal path
#

Okay, am I blind? I am looking for the way to add $$$ to cash out, but the context doesn't seem to exist in any documentation? Is there a better docs source than the github wiki since it's really tiny and doesn't actually have much.

vernal path
#

Ah, okay. I'm glad this doesn't exist anywhere for anyone to read without finding this repo ShostyAngry

#

oh, i put it in calculate

gusty iron
#

how would i hook into a function from a different mod?

#

(doing this for compatibility)

median veldt
#

what would be better to do to make a consumable that doubles all joker values more balanced

  • make the consumable spawn in packs less often, a la Soul
  • change it to double the values of a specific amount of jokers
  • change double to 1.5x or something
  • leave it be
solemn shuttle
median veldt
#

especially if it doubles values of jokers you get later
it would not do that

#

just the ones you have

solemn shuttle
#

oh ok
-# I must be recalling smth that does in Cryptid I think I forget tbh

#

then yeah probably just make it pretty rare

#

that can be very powerful with the right build

median veldt
#

the glowing deck pisses me off because it doesnt round the values so if you do stuff with money or heaven forbid hands per round

solemn shuttle
median veldt
#

you just have. a decimal of those that you can never ues

solemn shuttle
#

im sure it wouldn’t be too hard of a process to make an addon to make it round

-# granted I wouldn’t know how off the top of my head but

median veldt
solemn shuttle
hybrid shadow
#

yknow what i shouldve asked here but what does kind dictate in terms of packs

median veldt
#

it's its own, but i don't want to make ALL of that consumable type rare

#

i could make the 4 their own type

#

seems like a bit much tho

#

i honestly think it'd be easier to just nerf the card a little

vague crest
#

i have a joker that makes a random card wild if you play a hand with a scoring 8, but it sometimes hits wild cards and then of course does nothing, which is something i thought i specifically stopped it from doing. does anyone know what happened here?

solemn shuttle
solemn shuttle
#

nerfing it works too ofc

median veldt
#

i also dont wanna make a separate pack

solemn shuttle
#

valid

median veldt
#

so yea i'd rather nerf it

#

but how..

#

lower the number or make it like a certain amount of jokers

#

like 1-3

#

-# side note i MIGHT like sharks
-# my sona is a shark and i'm hugging my ikea shark while coding my mod called the shark pack

solemn shuttle
#

hm
I think both probably work well enough, actually, depending on how much the number reduction would be,

solemn shuttle
median veldt
#

i'd set it to either 1.5x or 1.25x

solemn shuttle
#

ya
I’d think that would work imo

#

-# admittedly at the end of the day it’s your decision and you could always go back on it later-

solemn shuttle
vague crest
#

yep i just figured that out 🙏 ty

solemn shuttle
#

-# np ! :>

median veldt
#

like the only thing i wouldn't round would be probably xmult

solemn shuttle
chrome widget
#

The story tab is fun, I love doing these stupid writeups

hybrid shadow
chrome widget
#

fairly certain it was intentionally named that

median veldt
chrome widget
#

I need to play Deltarune so I can project my depressive transfeminine swagger onto Kris

vague crest
#

how would i make the player lose the game on a condition in a joker?

lament agate
#

it's something to do with the G GAME functions

#

start_run or delete_run

vague crest
#

cool cool ty

lament agate
#

make an event

median veldt
daring heron
#

Peak

median veldt
#

-# art not by me, its by the shrimp
-# i'd ping them but idk if they would like random ping

daring heron
#

Shrimpsnail?

median veldt
#

nuhuh

daring heron
#

Oh

outer jungle
#

I'm defining a new PokerHand, i need to check the order in which cards are played/appear in the hand for the hand to be valid.

For instance:

King, then Queen should count.

Queen, then King shouldn't count.

The evaluate function for SMODS.PokerHand gets the hand as an argument. The ipairs(hand) order reflect the selected order, is there another way to check the actual inhand position of cards?

final jewel
subtle merlin
final jewel
#

is there a way to let negative mult appear

subtle merlin
#

no idea

final jewel
#

like its not that hard ig, since the mult part is probably a float type

chrome widget
#

Would anyone happen to here know how to resolve issues when using set_ability() to transform a card to one of different pixel size? I keep getting hese resizing issues on the floating sprites even if I try to reset the dimensions of the center child sprite

gusty iron
#

how would i check if a flush is a certain suit

open tapir
#

hello

runic jay
midnight hornet
#

how can I skip the initial animation when opening balatro? Is there a function that I can call in my mod?

subtle merlin
subtle merlin
runic jay
midnight hornet
subtle merlin
# runic jay

ignoring the fact that the consumable's key should be butter_dog, try adding your mod prefix before butter in the consumable's extra and see if that works
example:

config = {
extra = '[mod prefix]_butter'
}
subtle merlin
subtle merlin
runic jay
vague crest
#

i feel like it didnt do this before am i going crazy its like comedically silly with my mod name length LOL

subtle merlin
midnight hornet
subtle merlin
midnight hornet
subtle merlin
midnight hornet
#

I've solved it. Simply add this in the Lua entry point of your mod.

G.SETTINGS.skip_splash = "Yes"
glass scaffold
open tapir
glass scaffold
tall wharf
subtle merlin
#

Now that more people are awake i once again ask how to fix this

ruby delta
#

Hey can someone help me out, so I have been working with this joker and am having a headache now literally a headache I asked so many People for it they helped me and yet nothing so my hope on you, basically this jokers second function is to give me xmults if all the other 4 jokers that I have made are there together and yah idk what or where am messing it up

subtle merlin
ruby delta
faint yacht
#

if G.jokers.cards[i].config.center.key == "j_modprefix_key" ☝️

subtle merlin
subtle merlin
# subtle merlin

i narrowed down the issue to it's source but i still have a question: how can i give a stake a timer using the one found here and have the timer pick up where it left off if you leave and rejoin the run?

quick kraken
#

How do I make a mod whose only thing is replacing all the music with a track I have?

#

I only have said track as a normal speed Mp3, do I need to download audacity to manipulate it first or is there a way where I can just convert to .ogg and nothing else?

wintry solar
#

looking for a general feeling about a tag_added context

slim ferry
#

i can see that being very useful already just because you could check for what tag was obtained

lament agate
#

god please let it be a real thing

wintry solar
#

similarly, are people interested in a tag_triggered context?

slim ferry
#

ough

#

yes

#

when are we getting retrigger_tag in the optional features 🔥

stiff locust
#

Double Tag:

slim ferry
#

but cryptid makes its own tag_added context so id imagine adding it to smods itself would be a great thing

#

im all for tag related stuff

faint yacht
#

...what about "preventing" tags from triggering altogether, much like prevent_debuff?

slim ferry
#

tag storage

gaunt thistle
#

is this a statement you would still stand behind?

#

wrong chat

#

sorry dev

faint yacht
#

😂

lament agate
faint yacht
#

-# me when I am searching for meth in a given room:

slim ferry
#

breaking bad

wintry solar
#

you could prevent all triggers on a certain context though

worthy stirrup
#

How could I draw a line between the two?

red flower
#

if you're already using main_end you can just add a thin row node before the cards

worthy stirrup
#

Oh, that’s a thing that’s able to be done? Thank you

thorn basin
#

how can I add 2 red buttons to this enhancement like it would be a consumable card?
(the 2 buttons goal is to increase/decrease the rank of said enhancement by 1)

red flower
#

I would look into how aikoyori's shenanigans adds buttons to playing cards

thorn basin
primal robin
#

Maybe it's time for SMODS api for card buttons?

#

???????

red flower
#

please

wintry solar
subtle merlin
#

call mods?

wintry solar
#

<@&1133519078540185692>

livid scroll
#

🔫

hidden sable
#

what'd i miss

subtle merlin
hidden sable
#

oh hell yeah

#

sign me in

wintry solar
#

stopping tags triggering is a bit jank if you want messages to trigger but it does work

faint yacht
slim ferry
#

show code?

faint yacht
#
-- togabalatro = SMODS.current_mod
local newicon = love.image.newImageData(togabalatro.path.."executable.png")
slim ferry
#

and what does it look like in the folder

faint yacht
#

...see the image below the error image.

thorn basin
#

what is the command for creating a button?
(one of those buttons you find on consumables if you click one of them)

slim ferry
#

i can barely see anything there

worthy stirrup
#

Do I need to patch lovely for my mod to use love2D code?

faint yacht
slim ferry
#

well okay that looks correct

shell timber
slim ferry
#

im going to assume thats the main folder of your mod

worthy stirrup
#

Okay, just wanted to be sure

faint yacht
#

yeh.

slim ferry
#

might be something with how smods compiles it then which i dont really know anything about tbh

#

since the file does definitely exist

faint yacht
#

...and nativefs helped.

unborn bay
#

yeah its how love2d deals with paths

#

nfs is the answer to most problems like this lmao

faint yacht
#

Does remind me about that one video with someone remaking a section of Rewrite's song with window position manipulation and what not.

spice wadi
#

I don't think it's as simple as just running a function

#

Find a mod that does this

#

And read the code for it

thorn basin
#

aight

whole lava
#

how can i make joker trigger when click?

faint yacht
#

Hook Card:click.

faint yacht
hidden sable
manic rune
#

im gonna try

long sun
#

how do i get the localisation name of a card?

long sun
#

also, how do i close a menu in a function?

red flower
long sun
#

schweet ^u^ thankuthanku!

long sun
#

this happens when i open my building menu

red flower
#

oh you need to check if G.OVERLAY_MENU exists

long sun
#

ah ^U^ gotcha

#

mm, same issue, even after replacing all references of that with one that checks it

#

(if G.OVERLAY_MENU then G.FUNCS.exit_overlay_menu() end)

#

oh. i see what i did -u- oops hold on

thorn basin
#

question: if you wanna create some balatro ui you code it in another file or in the main file?

hidden sable
#

anywhere

red flower
#

anywhere you like, the game treats everything as one big file basically

#

unless its like lovely patches or assets

thorn basin
#

it's because I'm learning how to make a ui consumable red button and how ortalab did it... jesus christ

red flower
#

UI is UI

thorn basin
#

yeah

#

I really need to learn how to make ui

hidden sable
#

not too hard once you get into it but there's alot of jank

#

try starting with simple things

long sun
#

is there a way to change what my menu's back button does?

red flower
#

depends on how you're making the menu

long sun
#

ah, i'm using create_UIBox_generic_options

red flower
#

for mine i just recreated all of it and made my own function for the back button

long sun
#

right ^^

red flower
#

it has a back_func argument

long sun
#

ah sweet :D exactly what i need

#

thanks!

wintry solar
#

hmmm, what other tag contexts do we need

#

I have tag added, tag triggered, and prevent tag trigger atm

red flower
#

does triggered check for yep and nope

wintry solar
#

no

#

does anyone use nope

long sun
#

iirc gambler's tag does? unsure

wintry solar
#

what is gambler's tag from

long sun
#

Cryptid

#

the one that has a 1 in 4 to give an empowered tag

#

sorta guessing here, i'll double-check

#

yeah it nopes

#

you may as well add nope anyway ^u^; who knows

wintry solar
#

but nope isn't for triggers

rapid stag
#

why me cirPrise

wintry solar
#

nope just removes the tag

long sun
#

ah right

#

ya sorry i think i misunderstood dfgkjnbdfkjgn

slim ferry
#

nope also used to be vanilla

red flower
slim ferry
#

so shouldnt be too difficult i assume

red flower
#

i think nope is used exclusively by rare tag

slim ferry
#

how can rare tag nope

red flower
#

if you have all rares

#

for some reason it checks

#

uncommon doesnt

slim ferry
#

what 😭

#

why would it do that

#

i was more referring to old edition tags

#

with the nopes

long sun
#

there may have been fewer rares at some point

#

maybe 3 rares, say

faint yacht
#

I have exactly 2 instances of :nope().

#

...of this tag.

wintry solar
#

why does it nope?

long sun
#

i'd assume if it can't apply the edition

slim ferry
#

probably if you have no jokers

long sun
#

or that ^u^ nvm

slim ferry
#

wait why is rare tag so wierd LMAO

#

why does it do that..

rapid stag
#

-# what does :nope() do cirDerp

faint yacht
#

If, during calculation, all Jokers have an edition, it aborts.

long sun
#

weird, why doesn't it replace any?

slim ferry
faint yacht
#

It's intended to simple make Jokers have an edition, not replace them.

slim ferry
#

it literally says it can replace them though....

long sun
#

^^^^^^^

faint yacht
#

Blame calc jank. 🍞

wintry solar
#

why doesn't it just sit and wait

faint yacht
#

Wasn't intended to back when I added it.

#

For replacing editions... I have Vista.

wintry solar
#

Ali would you expect a joker that tracks triggers of tags to rigger when your settings tag fails to go off

long sun
faint yacht
#

Similiar to how we now can track if a probability fails, yeah, I'd expect being able to track whether a tag :yep()s or :nope()s.

#

-# Hell, I'd probably make one that scales based off of :nope()s.

wintry solar
#

I am conflicted on this, I don’t feel like using nope is similar to a probability failing, it’s just removing a tag

faint yacht
#

Vanilla uses :nope(), so...

slim ferry
#

it does but its also not necessarily for probabilities

wintry solar
#

I think it’s just a naming issue, vanilla doesn’t use it when a tag has triggered

#

It just inconsistently removes one tag when it can’t trigger

faint yacht
#

Contexts for if a tag is triggered, when it :yep()s and when it :nope()s sounds solid though.

wintry solar
#

I don't want to overflow contexts either though

#

it's either one context that tracks the tag being set as triggered, or it's one context that tracks tags having yep called

faint yacht
#

Then limit the context calling to the hooks of :yep() and :nope().

red flower
#

i would do the opposite and have one for triggered and make mods hook yep and nope

#

especially given nope is not that common

faint yacht
#

That sounds fine too, I guess. 🤷

#

-# At least for me, I've been hooking and calling contexts myself.

wintry solar
#

this also relies on people setting tag.triggered = true which has previously done nothing

red flower
wintry solar
#

I think

faint yacht
#

tag.triggered = true just prevents the tag from executing again from what I can see.

wintry solar
#

oh that's why I did it in yep 😭

#

curse these events

faint yacht
#

As for the other hook...

worthy stirrup
#

Is there a way to add the use ability to a joker or is that consumables only?

red flower
#

i have like a million contexts

red flower
#

there are some mods that do it (like mine) but you need custom stuff

worthy stirrup
#

is there a way to add a button to a joker>?

#

oh

red flower
#

yeah

worthy stirrup
#

oh?

wintry solar
#

tries to test context in a different place
why is it running multiple times
hadn't removed old attempt

#

😭

worthy stirrup
#

Okay, how could a button cause a function to go off?

red flower
#

to make something a button you need to have button = "function_name" in a node in the first place

worthy stirrup
#

wait, first i actually got to get the button appear, 1s

red flower
#

that would call G.FUNCS.function_name

worthy stirrup
#

thank you btw

manic rune
#

how do i prevent a card from being dragged

#

🤔

red flower
#

hook Node:can_drag?

worthy stirrup
#

Wait, i just realized, the joker description doesnt stay when you have it selected

red flower
#

or set card.states.drag.can = false

#

let me test that

manic rune
#

ure

red flower
manic rune
#

s

#

hanks n

#

adsomda

red flower
#

elcome

worthy stirrup
#

or like, have a better option

red flower
#

what are you trying to do

worthy stirrup
#

i want a joker with a button to activate it

red flower
#

i get that

#

why do you need the description to be up

worthy stirrup
#

the button is in there

#

i can send the code if you want

red flower
#

oh having buttons in a description is harder

wintry solar
#

what is the button for

worthy stirrup
#

to delete the joker and spawn in a new one, and hopefully if i can code it, add a lovely stencil on the screen

#

and the player could activate the joker at will

#

ill take any eaiser way to do it

wintry solar
#

does it need to be in the description or can it be a button like all the other buttons?

worthy stirrup
#

it can be either, i dont mind

#

but, N' said what im doing is harder so lets just go with what the sell button does lol

#

sorry if im making this difficult for yall

ancient mango
#

i have a pokerhandpart which is four fingered flush but just not needing four fingers and another one thats the same but with straight and i want to make a pokerhand thats both of them but not on the same four like the image but i dont know how to do that

#

also how do i explain it

#

(for the run info)

modern kindle
#

Good schmorning chat

distant junco
#

is there a way of checking whether the hand played is "not allowed" such as a 4 card hand in the psychic etc?

red flower
#

context.debuffed_hand

distant junco
#

sweet!

red flower
modern kindle
#

Hi N how are you

wintry solar
#

good morning dilly

modern kindle
#

Hi eremel how are you

wintry solar
#

look I'm not on mobile today so you get your real name and not auto correct silly!

modern kindle
#

Lmfao
Im not silly this day, only serious

red flower
modern kindle
#

How are you silly

red flower
#

sillying around

tepid crow
#

Silly_The_Sillster

modern kindle
#

I was silly
Then I serioused

brittle tide
#

is there a way to get the edition of a joker and store it?

chrome widget
#

Greetings modding individuals

modern kindle
#

Hello :)

chrome widget
#

Wehhhh CattoBlush

#

Having a weird sprite resizing issue

modern kindle
#

I wish the issues you have i had any brain to help with but alas I am not that guy

ancient mango
#

is there a part(pokerhandpart) that makes it so that all cards score?

modern kindle
#

I will acknowledge you so you dont feel you are being ignored, i dont know the answer to your question right now because im still waking up, but if someone hasn't answered you soon I'll check once I am up and about

ancient mango
#

thank you

#

another question:
is there a way to make a poker hand that just always wins like setting to chips to the blind chips or smth

long sun
#

my info_queue isn't working, here. is it because the card it's referencing has multiple descriptions?

red flower
#

wdym multiple descriptions

#

like multiboxes or something else

long sun
#

its first one says Gives a free Rare Tag, and its second, +1 consumable slot

#

lemme grab it, hold on

#
c_catan_settlement = {
                name = "Settlement",
                text = {
                    {
                        "Creates a free",
                        "{C:attention}Rare Tag{}"
                    },
                    {
                        "{C:attention}+#2#{} consumable slot"
                    }
                }
            },```
red flower
#

that should work fine

red flower
#

what is it

modern kindle
#

when do you think multiboxes should be used to look best
ie after how many lines

red flower
#

i do it per effect but my cards have like 3 effects each

long sun
#

alas, nada

#

ah lemme see

#

OH god uhm

#

embarassing

#

there are

#

two of them -u-

#

oops!

red flower
#

lol

long sun
#

yeah this'd fix it dfkjgnfdkjng

red flower
#

my autocorrect tried to type LoL

#

what does it think i am

long sun
#

oh so close ;u;

#

this is because the card is assigned its +1 consumable slot ability when it's loaded

#

but, it's not loaded here ^^;

#

idrm tbh

#

i think the Catan divorce is finished 😢 Phanta will miss it

#

but it'll hopefully make Phanta a little less bloated

ancient mango
#

i have a pokerhandpart which is four fingered flush but just not needing four fingers and another one thats the same but with straight and i want to make a pokerhand thats both of them but not on the same four like the image but i dont know how to do that

though i am closeing my pc for today

frosty rampart
#

the calculation for a regular straight flush already allows you to do that if you have four fingers, so you should be able to just do pretty much the same thing (do you have pokerhandparts set up for your currently-implemented hands? if so, you can just check if the hand contains both a four-flush part and a four-straight part, that's how a vanilla straight flush works pretty much)

frosty rampart
worthy stirrup
#

i got this code from Aiko and I was wondering what definition is

local cardhighlightook = Card.highlight
function Card:highlight(is_highlighted)
    local ret = cardhighlightook(self, is_highlighted)
            if self.highlighted and self.area and self.area.config.type ~= 'shop' then
            self.children.use_button = UIBox {
                definition = AKYRS.UIDEF.wildcards_ui(self),
                config = { align = "cl",
                    offset = { x = 1, y = -0.75 },
                    parent = self }
            }
        elseif self.children.use_button and self.highlighted then
            self.children.use_button:remove()
            self.children.use_button = nil
        end
    return ret
end

quick kraken
manic rune
#

the first node should be G.UIT.ROOT

modern kindle
#

bepis

manic rune
#

dilly

modern kindle
worthy stirrup
#

ive got such a mess of a code

modern kindle
#

dw so do i

manic rune
#

same

#

any problem ur facing rn

worthy stirrup
#

not yet

#

that might change bc im about to test it

modern kindle
#

bepis i realized why my mod was so big when i handed it to you that one time

worthy stirrup
#

okay yes, its there but now the sell button is gone

manic rune
#

you didnt add the sell button

worthy stirrup
#

let me quickly organize my code and ill send it

#

oh right

manic rune
#
{
            n = G.UIT.C,
            config = { align = "cr" },
            nodes = {
                {
                    n = G.UIT.C,
                    config = { ref_table = card, align = "cr", padding = 0.1, r = 0.08, minw = 1.25, hover = true, shadow = true, colour = G.C.UI.BACKGROUND_INACTIVE, one_press = true, button = 'sell_card', func = 'can_sell_card' },
                    nodes = {
                        { n = G.UIT.B, config = { w = 0.1, h = 0.6 } },
                        {
                            n = G.UIT.C,
                            config = { align = "tm" },
                            nodes = {
                                {
                                    n = G.UIT.R,
                                    config = { align = "cm", maxw = 1.25 },
                                    nodes = {
                                        { n = G.UIT.T, config = { text = localize('b_sell'), colour = G.C.UI.TEXT_LIGHT, scale = 0.4, shadow = true } }
                                    }
                                },
                                {
                                    n = G.UIT.R,
                                    config = { align = "cm" },
                                    nodes = {
                                        { n = G.UIT.T, config = { text = localize('$'), colour = G.C.WHITE, scale = 0.4, shadow = true } },
                                        { n = G.UIT.T, config = { ref_table = card, ref_value = 'sell_cost_label', colour = G.C.WHITE, scale = 0.55, shadow = true } }
                                    }
                                }
                            }
                        }
                    }
                },
            }
        }
#

heres the sell button

worthy stirrup
#

AHHH

#

thank

modern kindle
manic rune
#

sob

worthy stirrup
#

ui code jumpscare

modern kindle
manic rune
#

:3

#

also the button is on the wrong side me think

modern kindle
#

is any side truly a wrong side

worthy stirrup
#

dont worry, youll probably not be allowed to sell this joker anyways

#

i feel like im overlooking something simple

#

im gonna try and see if replacing it with self

#

wait

normal crest
#

pass the card (self) to my_menu_function

worthy stirrup
#

okay

#

it worked, thanks

modern kindle
#

hi srock

normal crest
#

hi d

modern kindle
#

how are you my buddy pal

normal crest
#

sleepy

#

very

modern kindle
#

i feel you, i slept from like 10pm to 3 am, then was up for a couple of hours then forced myself to sleep until like 10

#

but today is concert day

normal crest
#

how do you force yourself to sleep

#

Is this some kind of magic

worthy stirrup
#

now i gotta find out why its not centered

modern kindle
# normal crest how do you force yourself to sleep

well i woke up the first time because my body does this cool thing where it stops breathing

so after i fixed some of the messages for fridge i then just put on a yt video, and closed my eyes for an hour until i tricked my brain into going 'well, i guess we may as well' while blasting cold air from my fan on my face

#

its not always effective but it worked out

worthy stirrup
manic rune
#

uhh dunno, i copied joyousspring's code and the button was on the right side

#

:3

#

i can send it to u to check if u want

worthy stirrup
#

lucky bastard... /j

#

yes please

manic rune
#

sure, one sec

#

lemme remove the parts you dont need

worthy stirrup
#

thamk

normal crest
#

What does it look like rn

worthy stirrup
#

lil blood warning

manic rune
worthy stirrup
#

thamk

normal crest
#

set align to 'cr' in your UIBox call

manic rune
#

oh yeah heres the config too

red flower
#

i add a small version of this for the vremade wiki

manic rune
#

very nice

red flower
#

i dont know why i said that in caveman speech

manic rune
#

i thought about posting a small template of this to bmsp too but i guess its not necessary

red flower
#

do it so i can copy it

manic rune
worthy stirrup
#

oh, got it, thank you srockw

misty radish
#

I'm getting a bug with my mod. Can someone please help me fix it?
I have no clue how to code in lua lol (this entire mod is with help)

The mod is just to change the win ante from 8 to 10 btw.

worthy stirrup
#

im dying laughing rn

#

okay, how could i check if the card is a specific joker?

function Card:highlight(is_highlighted)
    local ret = cardhighlightook(self, is_highlighted)
    if self.highlighted and self.area then
        self.children.use_button =
            UIBox {
            definition = my_menu_function("Flote", self),
            config = {
                align = "cr",
                offset = {x = -0.4, y = 0},
                parent = self
            }
        }
    elseif self.children.use_button and self.highlighted then
        self.children.use_button:remove()
        self.children.use_button = nil
    end
    return ret
end
quick kraken
normal crest
worthy stirrup
#

thank you once more

quick kraken
normal crest
#

In your SMODS.Sound call, the key has to include "music" somewhere

#

For it to be treated as music

quick kraken
#

I'm using Penumbra, not managing music through Steamodded directly

frosty rampart
#

(the name of the music track should start with music_)

quick kraken
#

as in music_siiva_sanctuary?

limber blaze
#

yes

#

that

quick kraken
#

Ok that makes sense

limber blaze
#

thats like

normal crest
#

It can technically have the word "music" anywhere but yes

quick kraken
#

Anything else I might be doing wrong?

limber blaze
#

required right

#

and not just something i added for no reason

normal crest
#

for music tracks yes it's required

long sun
#

i love modding balatro ^u^ it's so rewarding to get something to work

misty radish
red flower
# misty radish Bump

you can do

if not G.GAME.modprefix_toggle then
  G.GAME.modprefix_toggle = true
  G.GAME.win_ante = G.GAME.win_ante + 2
end
#

or hook another function

wind steppe
#
    calculate = function(self, card, context)
        if context.before then
            for _, v in ipairs(context.scoring_hand) do
                v:set_ability(G.P_CENTERS["m_para_ashen"])
                v.ability.perma_x_chips = v.ability.perma_x_chips or 0
                v.ability.perma_x_chips = v.ability.perma_x_chips + card.ability.extra.xchips_gain
                v:juice_up()
            end
        end
    end
``` why is this joker code making the xnil chips appear
sonic cedar
#

Any of you guys good enough with messages to tell me why this doesnt show a message of the playing card's id?

wind steppe
#

(the xnil chips does nothing when held i just don't know why it shows that)

wind steppe
long sun
#

mm, weird -u-

wind steppe
red flower
#

yes but replace modprefix for your mod's prefix

misty radish
#

Thanks so much chat :3

wind steppe
#

also please fix your indentation

misty radish
normal crest
sonic cedar
normal crest
#

or tostring(kard:get_id())

#

hi tom

#

A

sonic cedar
#

hiii sro

#

ck

normal crest
#

hi N

red flower
#

oh i thought this was an smods bug but this text is just unlocalized in vanilla for some reason

sonic cedar
#

hi

#

N

normal crest
#

'

red flower
#

i dont know who either of you are

normal crest
#

Okay bye

sonic cedar
#

you will evil_plotting

#

very very soon

wintry solar
#

Why is the localize call commented out thunk

#

WHY

wind steppe
#

why tf does setting permanent played xchips make this show up

chrome widget
#

thunk hilarious

modern kindle
#

toma...

#

winter!

chrome widget
sonic cedar
#

why do you hate me

wind steppe
#
    calculate = function(self, card, context)
        if context.before then
            for _, v in ipairs(context.scoring_hand) do
                v:set_ability(G.P_CENTERS["m_para_ashen"])
                v.ability.perma_x_chips = v.ability.perma_x_chips or 0
                v.ability.perma_x_chips = v.ability.perma_x_chips + card.ability.extra.xchips_gain
                v:juice_up()
            end
        end
    end
sonic cedar
wintry solar
#

It automatically has a default btw

#

You just need to add to it

sonic cedar
#

me or paradox

wintry solar
#

Paradox

wind steppe
#

good to know but that doesn't fix it

#

i'm choosing to blame this on smods

sonic cedar
sonic cedar
#

one a

#

down

normal crest
#

idk, try message = kard:get_id() .. ""

#

i'm surprised it explodes and dies

sonic cedar
#

hold on something weird is going on

#

ill show you in a record

#

ing

red flower
#

yeah it doesnt like numbers

#

i found out the other day

chrome widget
#

Even still I wouldn't recommend using get_id either for this

normal crest
#

but why would it not show with tostring

sonic cedar
chrome widget
#

I don't think you want to put the IDs in a player-facing visual because I'm not sure the typical player is going to really associate Jack to Ace with 11-14

normal crest
# sonic cedar

oh cus you're trying to put the message on the played cards

#

that have gone off screen

sonic cedar
#

omfg

#

message_card...

normal crest
#

change the 2nd parameter of calculate_effect to just card

sonic cedar
#

yeah

#

THERE we go

#

now i gotta fix the timing

#

because why are they displaying after scoring

#

despite being in

#

context.before

#

is it cause it's in an event?

normal crest
#

yeah you're nesting two events, cus calculate_effect with message puts another

sonic cedar
#

so just take it out of the event?

normal crest
#

maybe

red flower
#

i think you can make the message immediate

sonic cedar
#

gonna try the immediate message thing (trigger)

#

and then if that doesnt work ill take it out of the event

#

and if THAT doesnt work ill do the reverse and take it out of the calc effect

normal crest
#

the immediate thing will work

sonic cedar
#

surely one will wokr

sonic cedar
normal crest
#

you can pass instant = true to the effect table

sonic cedar
#

oh ok i forgot about that one

#

yeah no that'll just work

#

ok no that passed all the messages at once lmfao

red flower
#

makes sense

sonic cedar
#

i think i need to move it to the repetition context?

normal crest
#

you can add a delay to the event i guess

#

or just try without instant and without event

#

wait no, it's cus you're looping through every card manually right

#

probably will have to add a delay

sonic cedar
#

of like what

#

0.1

normal crest
#

nah, too little, do like 0.8

sonic cedar
#

alr

sonic cedar
normal crest
#

what does your code look like rn?

sonic cedar
normal crest
#

you have to add trigger = 'after' to the event

sonic cedar
#

ohhhh ok

#

did not work

normal crest
#

what does that mean

sonic cedar
#

"yeah no that only delayed when theyd send all of them at once lmao" but again

normal crest
#

🤔

normal crest
sonic cedar
sonic cedar
normal crest
#

you didn't make it a string

sonic cedar
#

I DIDNT

#

GDI

#

ok yeah i do need to change the context

#

but it works better now!

#

yeah main_scoring should work

#

wait no individual lmfao

long sun
#

what might cause the second line of this extract of game.lua to cause a crash?

if G.FILE_HANDLER.run then
                G.SAVE_MANAGER.channel:push({
                    type = 'save_run',
                    save_table = G.ARGS.save_run,
                    profile_num = G.SETTINGS.profile})
                G.SAVED_GAME = nil
            end```
sonic cedar
#

the crash being?

long sun
#

this happens when selecting a blind or pressing Options

normal crest
#

i think that happens when you're trying to save a function

#

if any of your jokers has a function in their ability you should get rid of that

long sun
#

very weird 😭 i haven't done that

normal crest
#

what is your code that caused this crash to start happening

long sun
#

my last update was just removing content

#

i moved some of it to a new mod

#

and that new mod works fine

#

;u;

#

update was mentioned, so here's that

#
local update_ref = Game.update
function Game:update(dt)
  if not G.GAME.phanta_zodiac_rate_cache then G.GAME.phanta_zodiac_rate_cache = 0 end

  if Phanta.config["zodiac_enabled"] then
    G.GAME.phanta_zodiac_rate = G.GAME.phanta_zodiac_rate_cache
  else
    G.GAME.phanta_zodiac_rate = 0
  end

  if not Phanta.config["animations_disabled"] then
    for k, v in pairs(G.P_CENTERS) do
      if not v.default_pos then v.default_pos = v.pos end
      if not v.default_pos_extra then v.default_pos_extra = v.pos_extra end
      handle_phanta_anim(v, dt)
      handle_phanta_anim_extra(v, dt)
    end
  else
    for k, v in pairs(G.P_CENTERS) do
      if not v.default_pos then v.default_pos = v.pos end
      if not v.default_pos_extra then v.default_pos_extra = v.pos_extra end
      v.pos = v.default_pos
      v.pos_extra = v.default_pos_extra
    end
  end

  return update_ref(self, dt)
end```
normal crest
#

does it stop happening without your mod?

long sun
#

yes

normal crest
#

uhm

#

i'd say look for places where you assign functions

long sun
#

oh i found it ^^;

#


  for k, v in pairs(G.P_CENTERS) do
    v.phanta_set_anim_state = function(self, state)
      self.phanta_anim_current_state = state
      self.phanta_anim_t = 0
    end
    
    v.phanta_set_anim_extra_state = function(self, state)
      self.phanta_anim_extra_current_state = state
      self.phanta_anim_extra_t = 0
    end
  end```
#

no idea why this no longer works 😭

#

it was working before

normal crest
#

that shouldn't be a problem

#

centers can have functions

long sun
#

aye, but it tries to save that, i assume

#

regardless, removing it makes it work ^u^;

#

and i'm making util functions instead

#

thanks :D

normal crest
long sun
#

self:

normal crest
#

I mean what arguments did you pass to them

long sun
#

state

normal crest
#

yeah I know, what type was state

long sun
#

string

normal crest
#

very odd

long sun
#

am i doing this correctly 😭

quick kraken
#

I have a tag that isn't showing up

#

The other one is

#

But the first one isn't

broken rivet
#

is there any better way of cutting out the music like this

normal crest
quick kraken
#

It doesn't seem like there should be any reason it would not appear

final jewel
#

Two question how do I make my card create the thing only one time even if its retrigger and why the name of my seal is Error

quick kraken
plucky zenith
#

I was struggling to get my tag to trigger, and finally realized that while jokers use context.starting_shop, tags use context.type.shop_start - is there any difference between these that I should understand, or is it just a naming mismatch?

quick kraken
#

Tag context is not the same as joker context

#

They're different structures, and as such have different contexts

plucky zenith
#

But timing-wise they're both essentially "when the shop first opens"?

long sun
#

my tag doesn't work if two are present:

#

the first one yeps, but spawns the second Joker

#

and the second spawns the second Joker as well

plucky zenith
#

I'm having an issue with multiples of my tag too. Mine spawns all the boosters at once instead of processing one tag at a time.

    if context.type == 'shop_start' then
        local logger = adc_get_logger()
        local lock = tag.ID
        G.CONTROLLER.locks[lock] = true
        tag:yep('+', G.C.ADC.PLUM, function()
            local booster = SMODS.add_card( { set = 'Booster', area = G.play })
            booster.T.x = G.play.T.x + G.play.T.w / 2 - G.CARD_W * 1.27 / 2
            booster.T.y = G.play.T.y + G.play.T.h / 2 - G.CARD_H * 1.27 / 2
            booster.T.w = G.CARD_W * 1.27
            booster.T.h = G.CARD_H * 1.27
            booster.cost = 0
            booster.from_tag = true
            G.FUNCS.use_card({ config = { ref_table = booster } })
            booster:start_materialize()
            G.CONTROLLER.locks[lock] = nil
            return true
        end)
        tag.triggered = true
        return true
    end
end
sonic cedar
#

Trying to have the message not display on retriggers. Am I messing up the flag?

final jewel
plucky zenith
#

I think seals are like tags not jokers - essentially you use config instead of ability, so center.config.extra.mult

long sun
#

this isn't working either ^^;

#

i'm guessing it relates to the pseudorandom

plucky zenith
long sun
#

( @red flower hi hi hello please help ^^; )

#

( multiple Contestant Tags spawn the second card twice )

#

( and the first card 0 times )

#

i've reverted back to using SMODS.create_card, as it's not the issue

red flower
long sun
#

here's a visual btw

#

it doesn't happen with one contestant tag, one uncommon tag

#

i've tried both combinations of those too

normal crest
long sun
#

OH MY GOD WAITTTT

#

wait don't tell me it's just because i forgot a local

#

😭

normal crest
#

Was it the issue

long sun
#

i don't know yet, i'm testing that now ^^;

#

it was 😭

#

thanks ^^;

final jewel
#

Is it normal that my runs doesn't save anymore

modern kindle
#

Does it sound normal?

#

In my experience runs be saving after entering blind, playing a hand, and cashing out
So it not saving at all would naturally be strange

errant arrow
#

im looking at vre's blueprint code, trying to see how i would detect a joker to the immediate right/left, but i'm not getting it

frosty rampart
#

it's just this bit right at the start

local other_joker = nil
for i = 1, #G.jokers.cards do
  if G.jokers.cards[i] == card then other_joker = G.jokers.cards[i + 1] end
end

it loops through your whole set of jokers in order from left to right, and if it finds the joker that's doing the calculation (i.e. the blueprint), then it sets other_joker to the joker immediately to the right of the blueprint

#

if you want to get the joker to the left, then you'd have other_joker = G.jokers.cards[i - 1] instead

final jewel
rocky plaza
#

ok, i need help with getting my animated sprite to not crash Balatro when I enter the collections menu, when I did not have the atlas_table = "ANIMATION_ATLAS"I could see my new consumable in the collections menu but it didn't animate

#

is there another atlas I need to define or something?

distant junco
#

is it possible to detect when a joker has been bought?

final jewel
rocky plaza
distant junco
#

what does that context apply to

normal crest
#

Every card, you can filter jokers by doing if context.card.ability.set == "Joker"