#💻・modding-dev

1 messages · Page 338 of 1

zealous glen
#

Bongos binted

chilly hull
#

im really just going to wait till i can get a legendary item and earn 10 bucks

red flower
#

docs say it should work tho

rough verge
#

ok so im not great at modding and in the rules it says no console mods but I play on pc through xbox launcher. Would there be any way for me to still mod the game

red flower
#

not yet

chilly hull
#

im broke okay 😭

gusty iron
#

anyways

#

how do i make an effect for a stake

hard needle
#

its not one of those. clicker games where you resell your rare items for money on steam marketplace

placid star
#

@zealous glen what vanilla wording do you hate the most

gusty iron
#

i dont see any calculate() function

chilly hull
rough verge
#

Also what do you use to open the code, anytime i click on one of the files it asks what i want to open it with

red flower
#

vscode

chilly hull
#

i use vscode with lua extenstions

rough verge
#

thanks

zealous glen
placid star
zealous glen
placid star
rough verge
zealous glen
# hard needle those are fine

Individual wording usually conveys what cards do. I’m more against the specific templates chosen and the lack of consistency

chilly hull
#

someone made a guide on github explaining it really well

zealous glen
#

Like DNA is unnecessarily long

red flower
gusty iron
#

is this cursed

zealous glen
#

But it’s not confusing by itself

#

IIRC it is inconsistent with other similar effects

#

So maybe it could generate confusing that way, but in practice it doesn’t

red flower
#

i need to write a style guide for my own mod

#

i noticed a bunch of inconsistencies

zealous glen
#

I can accept inconsistency for clarity and flavor

#

But people treat vanilla Balatro wording like it’s MTG

chilly hull
#

it doesnt seem to be doing the if reset thenloop at all

red flower
#

it looks like it should work to me

gusty iron
#
SMODS.Stake {
    key = "aqua",
    applied_stakes = {'stake_orange'},  -- automatically applies orange yeah
    loc_txt = {
        name = "Aqua Stake",
        text = {
            "All things in the shop cost {C:attention}25% More{}.",
        }
    },
    atlas = "Stake",
    pos = {x = 0, y = 0}, -- 0
    sticker_atlas = "Stake",
    sticker_pos = {x = 0, y = 0}, -- make these later
    unlocked = false,
    colour = {0.203, 0.921, 0.91, 1}, -- g
    above_stake = "stake_orange",
    modifiers = function()
                G.E_MANAGER:add_event(Event({func = function()
            G.GAME.discount_percent = -25
            for k, v in pairs(G.I.CARD) do
                if v.set_cost then v:set_cost() end
            end
            return true end }))
    end
}
``` is anything wrong with this
chilly hull
#

but it doesnt :c

red flower
#

does it do the other branch of the if

chilly hull
#

i dont know

gusty iron
chilly hull
#

thats the only thing

#

nvm it doesnt havent saved my code

red flower
#

hmm no idea

gusty iron
#

so uh

#

any help

red flower
placid star
#

can jokers contain an in_pool function?

gusty iron
#

.

#

oh my god

#

i put stake instead of stakes

red flower
gusty iron
#

okay i fixed it

red flower
#

sorry read wrong

gusty iron
#

...small issue?

hard needle
# gusty iron ...small issue?

"All items in shop cost 25% more" why is more capitalized why is it referred to as things arghhtrfefgberigfbrjfb im becoming victin

gusty iron
#

13 DOLLAR VOUCHER OKAY

gilded goblet
#

yippee

#

the tarrifs have hit balatro

gusty iron
zealous glen
#

There was a Stake with this effect

#

It was reworked

willow plinth
red flower
#

"Everything in the shop costs."

gilded goblet
#

much cost

daring fern
gusty iron
#

OH

#

how do i kill vouchers

#

okay i should probably fix the placement issue

#

so

hard needle
gusty iron
#

its looking for stake_JCJ_stake_orange, when i just want it to look for stake_orange

#

how would

#

i do that

sturdy compass
#

Guess who's back

red flower
#

how did the bullet hell go

sturdy compass
#

I did in fact make it

red flower
#

your question is only 4 messages behind you don't need to shout for help so often lol

gusty iron
#

oh wait

#

sorry

#

i legit looked at cryptid and figured out im an idiot

#

im sorry

gilded goblet
primal echo
#

can i use these as the key if i want to replace them (without the extention of course)

gusty iron
#

okay i understand now

#

prefix_config = { applied_stakes = { mod = false } },

#

chat im starting to learn

daring fern
#

In the sound definition.

primal echo
#

oh okay

sturdy compass
#

Now it's my turn to ask a weird question:
How would I make a config option that makes it so vanilla jokers do not show up?

primal echo
daring fern
primal echo
red flower
gusty iron
#

gg, 2 more issues:

"Applies Orange Stake" nono good i need fix
Killing the discount vouchers we hate them 😡

sturdy compass
#

my goat Prayge

chilly hull
#

wait where is the name of the poker hand stored? is it context.poker_hands?

chilly hull
#

dang

chilly hull
#

okay i am not firguring out what wrong here

chilly hull
sturdy compass
gusty iron
#

okay this did not work

uh

any tips on fixing this

red flower
sturdy compass
red flower
#

i didnt have any legendaries at that point so i wanted the soul to not spawn jimbo

sturdy compass
#

Ah gotcha

#

So I could just take that out then

red flower
#

yeah

chilly hull
#

which contextt do i use if i want to copy a joker like brainstorms or blueprints' effect?

#

im going to give the jokera different effect

red flower
#

you need to use SMODS.blueprint_effect for that

#

dont ask me how to use it tho i have no idea yet

chilly hull
#

goddang

gusty iron
#

does C:money exist

rustic moth
#

Hi guys, does anyone know how to make a custom poker hand active only when using a certain deck?

red flower
unkempt thicket
#

Why doesn't this work T_T

chilly hull
red flower
#

yes

red flower
gusty iron
#

I LOVE THIS

regal ether
#

unpleasant gradient reference appreciated lmaooooo

gusty iron
#

wheres gold stake. 😡

primal echo
high sinew
#

That’s a niche idea I wouldn’t ever come up with XD I love that weird constraint

gusty iron
#

okay wait why isnt gold stake appearing

eager pendant
rough furnace
#

Is this your own shader?

eager pendant
red flower
#

nice balatro version

gusty iron
#

guys the tariffs hit balatro...

eager pendant
rough furnace
gusty iron
#

had to mess around with the order a bit.

eager pendant
rough furnace
#

The shader code

gusty iron
#

one final question.

#

how do i check what stake the player is playing on?

willow plinth
rough verge
#

Thanks to everyone for helping me earlier, finally able to mod my game through xbox launcher

willow plinth
#

i'm gonna seal the seal everything person with everything if they react again angry_villager

#

🦭 gold_seal OpenSea_Logo csgo_HappySealTeam6 @daring fern 🦭 gold_seal OpenSea_Logo csgo_HappySealTeam6

tepid crow
tepid crow
dapper sun
#

how do i add a playing card to hand?

daring fern
dapper sun
#

i already looked at marble joker, since it'll be with a enhancement that works similarly to stone cards, but i was wondering if smods added an easier way to do it

#

like they did with jokers

chrome widget
#

What's the best way to offset a sprite by a certain amount?

#

I was attempting to use a role to do this, but unfortunately it causes weird behavior when this card is destroyed/removed

heady siren
rough verge
#

how do you change joker textures, like I found the sprite sheet but dont know how to change it

rough furnace
rough verge
#

yeah

willow plinth
willow plinth
rough verge
willow plinth
heady siren
#

What would be the best method of making a card-shaped square appear on a card and then expand and fade out? Would it be using a card sized sprite, or using an actual UI element?

verbal hare
#

what yall think is the most important things to know how to do in lua for modding in balatro?

gusty iron
#

decided 5 was too easy. have fun!

heady siren
karmic arch
heady siren
#

And also learning how Balatro does it's own formatting, like doing things based on different contexts and using return tables

verbal hare
#

i would like learning lua but is hard, too many content creators are english and i speak spanish lmao

heady siren
red flower
#

i see some

verbal hare
#

im seeing one video of that rn

red flower
verbal hare
#

maybe i could ask gemini for teach me

verbal hare
#

thats my bad

oblique pond
willow plinth
heady siren
#

No Vagabond for you

heady siren
oblique pond
red flower
#

that's what the editor is for

heady siren
#

At least then you don't have to go into help chats and say "what wrong with code" and everybody might as well point at the missing syntax with a big red arrow

verbal hare
#

someone have a good content creator for learning? maybe i could try understand with my shitty english lmao

oblique pond
heady siren
heady siren
shut crater
oblique pond
gusty iron
#

OKAY YEP THIS WORKS

shut crater
#

Syntax for the syntax gods

red flower
#

ok but really that's what the editor is for

#

i dont get a single syntax error

chilly hull
#

how do you check if a card is blueprint compatible?

shut crater
flat sorrel
heady siren
grim remnant
#

hey, it's us again. it's been awhile but we figured we've got nothing better to do rn. this joker is still acting weird with DNA specifically. it's supposed to retrigger the joker to the right 3 times, and this works as normal with retrigger effects and scoring effects, but DNA's duplication? nope, it only retriggers it Once, yielding 2 cards when it should yield 4.

is there like... an easier way to do that that's been added in the time since we've been working on this mod, or what exactly should we do to make it so card duplication is also done 3 times?

heady siren
shut crater
chilly hull
red flower
verbal hare
#

what yall use for coding in lua? is better vscode or notepad++?

chilly hull
chilly hull
faint yacht
#

N++, though I did Lua stuff in SLADE back when I modded for SRB2.

flat sorrel
# chilly hull like this? im trying to make it copy a random compatible joker

Should probably do something like
local compatible_jokers = {}
for _, joker in ipairs(G.jokers.cards) do
if joker ~= card and joker.config.center.blueprint.compat then compatible_jokers[#compatible_jokers + 1] = joker end
end
if #compatible_jokers > 0 then
local joker = #compatible_jokers == 1 and compatible_jokers[1] or pseudorandom_element(compatible_jokers, seed)
end

chilly hull
#

yeah i dk when to use ipairs or pairs and stuff

#

where shoudl i put that code?

flat sorrel
#

I'm not a lua expert but afaik it's just syntactic sugar on iterating a dict: for key, value in pairs(dict), ipair for if the keys are ints
The code would replace the first 8 lines of inside of the if

faint yacht
red flower
chilly hull
#

wel i know what the generally mean just not how to use it and when

#

but i just need to keep writing and ill get it eventually

#

why yellow line

red flower
#

the local joker doesn't exist in that line

eager pendant
#

Why isn't it working?

chilly hull
#

oh

#

well then how should i copy that card?

willow plinth
quartz ravine
#

Trying to get a vibe check, do folks generally like Mods having locked or unlockable content, or just having everythign available from the get go

willow plinth
quartz ravine
grim remnant
quartz ravine
eager pendant
grim remnant
#

because i am. entirely unfamiliar with how blueprint_effect works

willow plinth
#

lmao

quartz ravine
#

I like that they have a spoiler tag on their readme, I will do the same thing! (I realized I was spoiling things by screenshotting it, so I deleted it!)

willow plinth
#

yeah, you could also add spoilers tags / collapsibles to your readme

quartz ravine
grim remnant
#

exponential mult is definitely a thing

#

in fact you should just be able to use emult in the latest versions of talisman???

willow plinth
#

yeah, but they are just assigning it to an unused local variable

grim remnant
#

at least, idk if it's in smodded but ik it's in talisman at least.

quartz ravine
grim remnant
red flower
#

yeah it's not documented yet it's somewhat new

verbal hare
#

how can i know in what pos put a deck?

grim remnant
faint yacht
grim remnant
#

do you mean message?

heady siren
chilly hull
#

since i now copied a random joker, how do i make this one activate with that effect?

heady siren
#

Unrelated but based pseudorandom seed [=

chilly hull
#

:3

old cairn
#

how can i add a probability-based effect (similar to wheel of fortune) to my joker? i don't have any experience with the randomizer so i don't know how i'd pull this off

high sinew
#

What’s the best way for adding +1 discard or hand? Is there a function?

red flower
flat sorrel
old cairn
#

thanks :3

high sinew
#

Anyone know +1discard or hand?

#

I wanna have a consumable give either temp +1 hand or discard

verbal hare
shut crater
shut crater
#

Here are some examples too

grim remnant
# faint yacht

okay, that works... DISGUSTINGLY easily; the only issues we've seen are "hanging chad/other such 'retrigger a playing card' effects don't get retriggered again", "obviously, now it's not tripling anything at all", also the game acts... Really weird if you sell the card being copied. how can we make sure playing card triggers actually happen/how can we make it so it retriggers the joker in question 3 times/make it. Not freak out if the target is sold?

verbal hare
shut crater
chilly hull
grim remnant
verbal hare
chilly hull
grim remnant
#

and given we just had the game crash on us so catastrophically that it didn't even load the proper crash handler, the game just quit out, it's safe to say we. Don't quite get it yet SGDFHJLK

shut crater
verbal hare
#

ohhh

#

so

#

pos is optional?

shut crater
#

I guess but it would default to the top left corner of the atlas

verbal hare
#

if i dont put a pos it will work anyway? and what is atlas? the image of the deck?

shut crater
#

Yeah there's a page for atlas too

faint yacht
verbal hare
shut crater
#

Atlas is just a way of having multiple images in a single image file and organizing them by size and position

#

But you have to make an atlas

#

And then your jokers and deck and everything can use it

quartz ravine
#

I just realized that I somehow accidentally committed a list of yugioh cards I wanted to buy. Into the base of my repository. Like three months ago

quartz ravine
red flower
#

i love melffys

hard flume
#

Hi

placid star
#

would it be easy at all to change this code to run on the start of a variable reaching a certain value?

hard flume
#

I really should work on my mod but like. I don't know...

quartz ravine
# red flower i love melffys

My first win was with a combo deck of Melffys and Epurrleys. When I got a fully loaded Melffy Mommy, she was practically invincible!

shut crater
placid star
shut crater
#

Oh if it's on a certain ante you can probably hook into whatever function increases the ante

quartz ravine
#

A easier idea might be 'context.leaving_shop` and check the ante there, then do stuff

shut crater
#

But context requires a calculate function which requires a card

#

Or a hook in the right place

hard flume
#

Pikmin Poker seems like a really fun idea until I realize I have to program taking the Pikmin out and also assigning them to different Squadrons and then my head starts hurting

#

It'll be worth it though

#

After all, me and Pikmin share a namesake

#

(Carrots)

quartz ravine
placid star
eager pendant
#

And how do I add a name and description to my edition?

willow plinth
quartz ravine
#

ok, I would modify common_events or state_events to listen for ante 4, and proceed from there. You'd need to setup a Lovely patch to do it

willow plinth
wise walrus
#

ngl i was just looking for a similar thing to apply to a challenge im doing, just opted to have the game start at ante 4 and end at 8

iron haven
#

it's doing the thing AGAIN!

willow plinth
#

@glad osprey

glad osprey
#

@red flower

red flower
#

what

iron haven
#

what the?

brisk rose
#

oh the 5eo

#

I'm blind

iron haven
#

why is it level 0 now?

brisk rose
iron haven
#

And now I can't play a card.

#

I mean click on it like I want to play it.

brisk rose
iron haven
#

I changed nothing.

quartz ravine
iron haven
#

and now when I click on a card, it closes the game.

grim remnant
grim remnant
iron haven
#

how do I update talisman?

grim remnant
#

wait, do you not have talisman mod?

iron haven
#

I do.

grim remnant
#

oh. just, delete your current talisman folder, and grab the latest release and install that like you would an ordinary mod.

iron haven
#

Where's the updated version?

grim remnant
#

should just be on their github.

willow plinth
hard flume
#

God, I just realized I also have to make Pikmin flower over time as well. Why is my first foray back into modding Pikmin again?
Oh right. I'm autistic. /silly /lh

iron haven
#

ok, it works now.

faint yacht
high sinew
#

my game for some reason isnt showing cosumable why is that?

#

i got the consumables to load in now name still isnt right

#

thats local

brisk rose
high sinew
#

ad

brisk rose
high sinew
#

sometimes man...

#

the silly mistakes

brisk rose
#

Lol it happens

high sinew
#

ik but like i hate getting trippedc over somethign that literally is so simple 😭

sage crater
#

growth deck

#

probably would have some gimmick about exponential growth

high sinew
#

im pretty sure i defined that right

iron haven
#

ERROR is my favorite consumable type.

brisk rose
high sinew
#

ah

#

good call

#

didnt work :/

heady siren
#

Well, as a different question, is it possible to color sprites based on G.C colors?

glad osprey
heady siren
long sun
#

hihi, question :D

#

so, i'm making a Joker that retriggers played + unscored cards (cards that have been both played and not scored), but it's not working

willow plinth
long sun
#

i have a deck that gives $1 per unscored card, but this ability doesn't happen, and instead, my Joker says again

#

can you see why?

willow plinth
#

@heady siren i wish i could share my code but it's garbage and typescript transpiled to lua

maybe ask @daring fern

gilded narwhal
#

bump

quartz ravine
# long sun can you see why?

I don't see it giving money, and it is calling repetitions = 1 so that would make it repeat

If you want it to give money, then you need to add ease_dollars I believe

long sun
#

oh, no this is the Joker's code, not the deck

#

also, that'd be return { dollars = 1 }

quartz ravine
#

return {
dollars = self.ability.extra,
card = self
}

#

there we go, thats what it should do

long sun
#

that won't work :)

red flower
#

you never need the card = stuff

quartz ravine
#

Ohh I understand now!

long sun
#

surely it's return { dollars = card.ability.extra.money_given }

willow plinth
gilded goblet
#

Lol

red flower
#

reasonable take

edgy reef
#

That's actually kinda wild.

#

Being written in TypeScript I mean

long sun
#

hmm, my deck suddenly stopped working

#

but i got the Joker working :D

#

the deck doesn't do anything, whereas before, it gave $1 per unscored card

old cairn
eager pendant
#

How do I add text here?

brisk rose
eager pendant
brisk rose
azure stone
#

Is there anything wrong with this? The game keeps crashing every time I try to load this

#

. This right?

brisk rose
#

Like name

oblique pond
# azure stone . This right?

well there's a lot missing from that, no loc_vars to fill in the variables (and config), and no atlas to load the joker's graphics
filling that in should do the trick (also gabriel joker peak..)

red flower
azure stone
#

It does

#

Hold up, let me try and get it real quick

red flower
#

you are missing the Jokers.png files probably

azure stone
azure stone
red flower
#

can i see the folders?

azure stone
#

Like attach it to discord real quick?

brisk rose
# azure stone

One thing I saw another mod do that caused this same crash was having an 'assets' and 'Assets' folder

red flower
#

no i mean the folder structure

azure stone
#

Oh

azure stone
#

Let me see if that's it

azure stone
brisk rose
#

They managed to have both

azure stone
#

Nah, same crash

red flower
#

open the folder with vscode and screenshot the contents with everything unfolded

brisk rose
brisk rose
azure stone
#

@red flower

red flower
#

if you open the mod folder you're going to see all the files inside in the sidebar

#

i want to see that

azure stone
#

Ohhh

#

Blurry af

red flower
#

ok what's inside assets

azure stone
#

1x and 2x

rough furnace
azure stone
#

71 x 95 and 142 x 190

brisk rose
frosty rampart
# azure stone

please
win+shift+s to screenshot
it will copy it automatically so you can just paste it in discord

brisk rose
rough furnace
#

Some laptops don't have it

red flower
rough furnace
#

Yeah and also screenshit inside the 1x/2x folder

azure stone
#

got it

#

one min

rough furnace
#

I remember I spent like half an hour troubleshooting someone's Atlas one time and the problem was they made x1 and x2 instead of 1x and 2x

brisk rose
#

But fair

rough furnace
#

Mine has print screen on the alt of some other key I don't use

azure stone
#

(its the same in both, just resized)

frosty rampart
brisk rose
rough furnace
azure stone
#

Which thing do you need?

rough furnace
#

Just send the window

azure stone
vast bough
#

might be a silly question does anybody know if theres a way to check specifically small blinds? i know 'G.GAME.blind.boss' checks boss blinds, and therefore 'not G.GAME.blind.boss' checks small/big blinds, but is there a way to specifically check either one of them? from my understanding G.GAME.blind.small or G.GAME.blind.big doesnt exist does it?

quartz ravine
#

you can also go to the folder, in the titlebar type 'cmd', and then in the command prompt, type 'tree'. it gives a very good view of the contents

red flower
vast bough
#

thank you i will give it a go

red flower
quartz ravine
#

does anyone here know of a mod which did progressive unlocking. I am not sure how to hook things up to unlock cards on x or y condition

azure stone
#

its good, just as confused as yall are

high sinew
#

for some reason this inst applying for my enhacement

#

similar to hiker creep enhancement

vast bough
quartz ravine
vast bough
#

it works

quartz ravine
#

Also your joker isn't using the atlas

azure stone
#

correct, and sized properly

#

also correct, i think

azure stone
quartz ravine
#

Every one of my jokers references an atlas.

Now it might be possible not to do it

azure stone
#

ok, what would I reference here?

quartz ravine
#

when you load an asset, you set the name and file path like this (or something similar)

SMODS.Atlas{ key = "FoxModJokers", path = "foxModJokers.png", px = 71, py = 95, atlas_table = "ASSET_ATLAS" }

Your joker then references the key value.

In your case, your key is 'Jokers' or 'jokers', whatever you put in the Smods.Atlas line

quartz ravine
# azure stone Also fuck yeah, Yugioh

Thanks I really like my Yugi! He picks a random hand (actually the same as Todo list) and then if you play that hand, it unlocks 'heart of the cards!' and the joker flips to reveal grown up Yugi, and then all cards scored for 2x a piece. It increases in strength the more times you play the chosen hand. But it resets back to base after the shop and you have to play another chosen hand to get the xmult back each round

eager pendant
#

Why does it work on regular cards but not on jokers?

azure stone
quartz ravine
#

Change key to Jokers

frosty rampart
azure stone
#

still nun

#

after fixing both

quartz ravine
#

Can you do us a favor? Go to your mod folder, and type 'cmd' into the address bar, then type tree and copy/paste that here. I am guessing the file is slightly in the wrong place

azure stone
#

where is the adress bar?

eager pendant
#

Why does it work on regular cards but not on jokers?

quartz ravine
#

FWIW, all of mine are in this folder

Or the 2x variant

quartz ravine
red flower
#

reminder

glad osprey
#

oh thanks

#

reminder

rough furnace
#

Thanns

#

I'm still at work

#

But I don't think I'll forget at this point

azure stone
#

Folder PATH listing for volume Windows
Volume serial number is 4E97-6172
C:.
└───assets
├───1x
└───2x

red flower
#

damn i hope that's going ok

quartz ravine
#

To be very direct your joker file should be here

Mods<YourModFolder>\assets\1x\yourFile.ext

azure stone
#

it is

red flower
#

it looked ok to me

azure stone
#

wait, the lua part or just the texture/

#

?

eager pendant
#

Why does it work on regular cards but not on jokers?

quartz ravine
#

Most people put lua files in the root of their mod folder, or in the src folder, while textures / joker art always goes in the assets\1x and \2x folders

reef belfry
#

How would one go about destroying cards offered by a booster pack

red flower
#

use joker_main

azure stone
quartz ravine
azure stone
#

Okay, I'll do that after I eat

brisk rose
azure stone
#

Been doing this for a few hours

quartz ravine
#

Sorry man, it can be frustrating to get started

I actually began by sliding my own jokers into the very mod I linked you, I found it easy to understand their code.

After a week or so I understood what I was doing and started over in my own project

eager pendant
azure stone
#

Besides, spent most of that time brainstorming

#

Because I'm doing a ultra kill inspired mod

reef belfry
quartz ravine
old cairn
#

i was hoping it wouldn't come to that lol

#

it looks daunting

red flower
#

yeah you need to use events

quartz ravine
# old cairn it looks daunting

Check this out, for unscored cards, this joker decreases the value of those cards

       for _, thisUnscoredCard in ipairs(unscoredCards) do
                sendInfoMessage("confirming would be modifying card " .. thisUnscoredCard:get_id(), self.key)
                if thisUnscoredCard:get_id() > 10 or thisUnscoredCard:get_id() == 2 then
                    sendInfoMessage("This card is too high or a 2, skipping " .. thisUnscoredCard:get_id(), self.key)
                else
                    G.E_MANAGER:add_event(Event({
                        trigger = 'after',
                        delay = 0.3,
                        func = function()
                            local suit_prefix = string.sub(thisUnscoredCard.base.suit, 1, 1) .. '_'
                            local rank_suffix = card.base.id == 2 and 14 or math.max(thisUnscoredCard.base.id - 1, 2)
                            rank_suffix = tostring(rank_suffix)
                            thisUnscoredCard:flip();
                            if FoxModConfig.playSounds then
                                play_sound("Fox_yoshiEat", 1.05)
                            end
                            thisUnscoredCard:set_base(G.P_CARDS[suit_prefix .. rank_suffix])
                            return true
                        end
                    }))

                    G.E_MANAGER:add_event(Event({
                        trigger = 'after',
                        delay = 0.15,
                        func = function()
                            thisUnscoredCard:flip(); play_sound('tarot2', 0.6);
                            thisUnscoredCard:juice_up(0.3, 0.3);
                            return true
                        end
                    }))
                end
            end

Hopefully that helps you

eager pendant
reef belfry
reef belfry
eager pendant
reef belfry
#

Maybe just change it to context.pre_joker

eager pendant
last sentinel
#

Whats a good way to have a consumable only show up in packs conditionally (e.g. if theres a glass card in the deck)

red flower
#

in_pool

chrome widget
#

If you want to specifically filter it from packs and nowhere else, you could probably make something conditional based on the game state (there are individual states for packs being open)

red flower
#

the game also has prefixes for the packs you can check doing args.source == prefix

last sentinel
#

thanks!

hasty mist
#

how do you change a card sprite's xpos/ypos when a condition is met

chrome widget
#

Modded packs will use unique ones based on your implementation

red flower
#

i will save this

sonic cedar
#

for some reason the chip gain wont trigger when i play a debuffed hand? i looked at matador, and this should be right?

#

this is in the main file:

sonic cedar
rough furnace
last sentinel
# red flower in_pool

During consumable booster packs, are playing cards drawn determinable with G.play before in_pool is checked? Would love if my card was only picked if a selected card is available in G.play

#

mmm jk thats not very vanilla

verbal hare
#

how can i put plasma deck effect on my deck?

last sentinel
#

you can write it in the back's calculate function

#
mult = (hand_chips * mult) / 2
update_hand_text({ delay = 0 }, { mult = mult, chips = hand_chips })```
#

theres other visual effects you'd need to implement but thats the main scoring operation change

sonic cedar
#

i reordered the if statement to see if it was an if issue (still no chip gain)

UPDATE 2: remembered that i dont need blind.triggered if im using debuffed_hand, so i deleted that part (this did not fix the chip gain)

red flower
high sinew
#

my consumable isnt getting a joker when i use from my pool why is that?

red flower
#

i dont know what the problem is because it looks complicated but don't use math.random for gameplay, use pseudorandom

#

or pseudorandom_element

high sinew
#

ok

high sinew
red flower
#

i mean that makes sense to me

high sinew
#

how cani use for the create tho

#

im not sure if im calling rigjt

hasty mist
#

why didn't this work?

red flower
red flower
high sinew
#

ur prbo right lol

hasty mist
#

ah

hasty mist
red flower
#

what's before update

#

also please get your editor to show syntax errors

sonic cedar
hasty mist
#

this is the full code

hasty mist
red flower
#

you need a comma before update

hasty mist
#

i see

sonic cedar
red flower
hasty mist
#

huh im still getting a syntax error

sonic cedar
high sinew
#

so weird

#

i have a define where the local is string of all of them

#

omg

#

i need j_key dont i

red flower
#

yes

sonic cedar
#

😭

red flower
high sinew
sonic cedar
red flower
# hasty mist

oh you're trying to set a function to a value, that won't work

#

i dont remember how set_pos is used tho

red flower
hasty mist
#

hm

high sinew
#

didnt see 'j_mills_'

#

so weird

hasty mist
#

is there documentation for it or something anywhere

#

im looking for it

red flower
#

i think it's vanilla so no probably

high sinew
hasty mist
#

wdym

high sinew
hasty mist
high sinew
#

ur file may i see

hasty mist
#

i figured it out though!

thorn pumice
#

meow

hasty mist
#

hm okay now my judgement is invisible ingame

#

and it crashes when set_pos is triggered

sonic cedar
red flower
#

that's a problem

sonic cedar
#

you dont say lmao

#

ok is this a steamodded issue should i update

red flower
#

try doing that

#

sadly im not on my pc to test but it might be an actual smods issue

sonic cedar
#

ok but to what though

red flower
#

latest commit

sonic cedar
#

🙏

hasty mist
#

no typos

#

i dont get whats wrong

rough furnace
#

How are you setting the sprite?

red flower
#

you need to specify a pos i think

#

you only specify the atlas

hasty mist
#

ah

red flower
#

and it uses the default judgement pos

rough furnace
#

But yeah the pos is probably its pos on the vanilla atlas

hasty mist
#

i thought i didnt need it because i was taking ownership

rough furnace
#

Well it doesn't need to be sleicifed if it'd not changed

#

But it is

hasty mist
#

i understand now

sonic cedar
red flower
#

damn

#

might be an smods issue honestly

hot island
hasty mist
#

it still crashes when its called though

#

but at least it shows ingame correctly

red flower
hasty mist
#

specifically when an edition is applied to it with

#

hold on

#

yeah

#

when ast_nil is applied to it

red flower
#

it's set_sprite_pos

hasty mist
#

ah

#

it works now

#

tysmm

sonic cedar
high sinew
#

card basically enahncement works where it switches x2 to x1 to x2 to x1

#

back and forth

red flower
sonic cedar
#

where

red flower
#

after the cardarea check

#

and context.main_eval

sonic cedar
#

so readd the cardarea

#

and dthen append a main eval

#

?

red flower
#

yeah

sonic cedar
#

alllllrighty

sonic cedar
sonic cedar
#

seems like that since i put it within the debuffed_hand context, it just doesnt get detected at all

hasty mist
#

is there a way to make a card only appear in the pool after a certain ante?

gilded narwhal
#

bump 2

sturdy compass
red flower
sonic cedar
#

you're telling me
is it an optional feature maybe?

sturdy compass
high sinew
#

i think i set up xmult right here

#

for it to see toggle

sturdy compass
high sinew
#

wdym

red flower
sturdy compass
red flower
high sinew
#

im not sure how i would set up a toggle mult all im asking

high sinew
#

to switch from x2 to x1 back and forth

gilded narwhal
#

It doesn't work no matter what I set the number to

#

Someone else got it before me tho actually so 😭

red flower
#

if you do rarity = 4 does it work

brisk rose
sturdy compass
brisk rose
sturdy compass
#

lmao

high sinew
#

its just a util function i set up

vocal cedar
#

wild how easy editions actuall are thanks bro this is legendary lol

sonic cedar
hasty mist
#

would this work

red flower
sonic cedar
willow plinth
#

yo, i think i'm too tired to code, why is this not retriggering the card?

SMODS.calculate_effect(
    {
        card = randomScoredCard,
        message = localize("landedOnFace"),
        repetitions = card.ability.extra.edgeRepetitions
    },
    card
)

it even shows the message so i really don't get it

dense adder
#

would SMODS.get_enhancements(v, true) return the enhancment name?

gilded narwhal
#

thats a lot of legendaries

hasty mist
#

how do you remove a ui element?

#

not game wide, just after a condition is met

willow plinth
brisk rose
brisk rose
reef belfry
#

how do you change the interest treshhold

willow plinth
unborn bay
#

what's the context here

#

like your full code

reef belfry
willow plinth
# unborn bay what's the context here

can't really share the full code unless you want to see transpiled garbage or typescript but the context is this

context.cardarea === G.play &&
context.repetition &&
!context.repetition_only
brisk rose
#

(For reference I know basically 0 of any language currently)

willow plinth
willow plinth
#

lemme fix this now and i'll show how my joker looks in typescript rn

#
const tetrahedron = Joker({
    atlas: "tetrahedron",

    /**
     *
     * @param card
     * @param context - The root object
     * @param context.after - The root object
     * @param context.cardarea - The root object
     * @param context.scoring_hand - The root object
     * @param context.final_scoring_step - The root object
     * @param context.repetition
     * @param context.repetition_only
     * @param context.other_card
     * @example
     */
    calculate: function (
        this: any,
        card: typeof SMODS.JokerType,
        context: {
            after?: boolean,
            cardarea?: any,
            final_scoring_step?: boolean,
            other_card?: any,
            repetition?: boolean,
            repetition_only?: boolean,
            scoring_hand?: any[]
        }
    ) {
        let returnValue;

        const isContextForVertex = (context.final_scoring_step && context.cardarea !== undefined);

        const isContextForEdge = (
            context.cardarea === G.play &&
            context.repetition &&
            !context.repetition_only
        );

        const isContextForFace1 = isContextForEdge;
        const isContextForFace2 = isContextForVertex;

        if (isContextForVertex) {
            calculateVertex({
                card,
                context
            });
        }

        if (isContextForEdge) {
            returnValue = calculateEdge({
                card,
                context
            });
        }

        if (isContextForEdge) {
            card.ability.extra.landedOnFace = rollWithOdds({
                odds: card.ability.extra.oddsFaces,
                seed: "tetrahedron"
            });
        }

        if (card.ability.extra.landedOnFace) {
            if (isContextForFace1) {
                const unmergedReturnValue = calculateFace1({
                    card,
                    context
                });

                if (returnValue !== undefined && unmergedReturnValue !== undefined) {
                    returnValue = {
                        ...returnValue,
                        ...unmergedReturnValue,
                        repetitions: returnValue.repetitions + unmergedReturnValue.repetitions
                    };
                }
                if (returnValue === undefined && unmergedReturnValue !== undefined) {
                    returnValue = unmergedReturnValue;
                }
            }

            if (isContextForFace2) {
                calculateFace2({
                    card,
                    context
                });

                card.ability.extra.landedOnFace = false;
            }
        }

        return returnValue;
    },
    config: {
        extra: {
            edgeRepetitions: 1,
            landedOnFace: false,
            oddsEdges: 6,
            oddsFaces: 4,
            oddsVertices: 4
        }
    },
    cost: 2,
    discovered: true,
    key: "tetrahedron",

    soul_pos: {
        x: 0,
        y: 0
    },

    /**
     *
     * @param info_queue
     * @param card
     * @example
     */
    loc_vars: function (info_queue: any[], card: any) {
        const variables: Record<string, any> & unknown[] = [
            G.GAME.probabilities.normal ?? defaultNumerator,
            card.ability.extra.oddsVertices,
            card.ability.extra.oddsEdges,
            card.ability.extra.oddsFaces
        ];

        return { vars: variables };
    },
    pos: {
        x: 0,
        y: 1
    },
    rarity: 1,
    unlocked: true
}) as {
    animation?: {
        fps?: number,
        frames: number,
        immediate: boolean,
        next_frame?: boolean,
        t?: number,
        target: number
    },
    soul_pos: {
        x: number,
        y: number
    }
} & ReturnType<typeof Joker>;
#

actually not that far off

#

from lua

manic rune
#

holy shit typescript??

brisk rose
edgy reef
#

Coonie has inherited the spelling demon.

hasty mist
#

holy shit what

#

you can just write a joker in typescript

willow plinth
#

yesss

hasty mist
#

damn

brisk rose
#

when I had friends

hasty mist
willow plinth
#

okay, new question: returning from calculate with repetitions=2 shows the same message twice...is there a mod or example out there that shows how to display two different messages there?

brisk rose
#

That'd still involve learning programming languages though

manic rune
#

one of them is a skinwalker

#

do not

brisk rose
#

Prolly both ngl

manic rune
#

true

willow plinth
#

i guess i need to use calculate_joker 💀

brisk rose
# manic rune true

I should just port Balatro to Bash ngl... can't be much less efficient then lua, right?... right...

manic rune
#

we just dont know

willow plinth
#

and yes i'm a glorp main now

dense adder
#

does anyone know what the table is that get_enhancments() returns?

thorn pumice
#

gleep main here

brisk rose
#

It's a perfect candidate

thorn pumice
unborn bay
#

glorpify roffle

dense adder
#

get glorped

brisk rose
#

Tfw you accidentally open the emoji pane and close it in a panic nevertheless you're paranoid of sending something super sus you didn't endnotes know you had

brisk rose
manic rune
#

im honestly very surprised that this only appears once in card.lua, considering the emperor

#

.

#

oh wait i didnt realize the emperor is right next to it

#

:p

unborn bay
#

dumdum

manic rune
#

im sorry 😭

brisk rose
#

Thunk didn't really orient around objects very well

manic rune
#

i have tunnel vision problem 🥀

brisk rose
#

So you get weird shit like that

unborn bay
brisk rose
#

This is why old mods checked name so much

#

Because it's what thunk does

manic rune
#

.ability.name refers to the actual name of the card, i think

#

:p

unborn bay
#

some cards don't have the name parameter anymore though

#

especially modern jokers

#

truly,

lucid owl
#

how could you modify a card based on a condition? as in, if a card shows up at any time, i'd like to replace it with another once conditions are met? so if you were to buy a booster pack and the card appears, it'd be replaced with something else, etc

manic rune
unborn bay
#

imitate code spaghetti

#

do you also set your tab size to 2 spaces

manic rune
#

whats with this random extra space here 😭

brisk rose
#

If only it wasn't way too late to just rewrite balatro in Smodded code

unborn bay
#

or are you a 4 spaces tab user

unborn bay
brisk rose
#

Because they patch into this nonsense

willow plinth
#

Bed me has arrived…I’ve slept like a combined 4 hours in the last 3 days, imagine the coziness I’m experiencing rn

brisk rose
#

Sleep doesn't real

manic rune
#

is there a reason why this doesnt work

#

🤔

lucid owl
#

because as of now i think it is

manic rune
#

mhm

lucid owl
#

hmm

brisk rose
lucid owl
manic rune
#

i want it to look something like this

#

but right now its just this

brisk rose
#

Lame

manic rune
#

im guessing its because the original code doesnt look like that

lucid owl
manic rune
#

so when my code is checking for the occurrence, theres none, so it cant replace anything

lucid owl
#

it'll have the full code with that patch applied

lucid owl
manic rune
#

it didnt add anything

willow plinth
brisk rose
#

I may be stupid

willow plinth
#

Coonie what are you talking about

brisk rose
#

I was just wondering why Espeon was a shoddy recolor

willow plinth
#

Pokémon?

brisk rose
#

Now I know

brisk rose
lucid owl
manic rune
#

lemme try

brisk rose
# brisk rose Yes

One is the green cats in the gif is a shiny espeon well... kinda it's a recolor that's a bit shoddy

willow plinth
#

I‘m sorry guys but once more

manic rune
#

and nope

lucid owl
#

so weird

brisk rose
manic rune
#

im gonna resort to another patch, then

lucid owl
#

here's one

brisk rose
#

I love both of them

lucid owl
brisk rose
#

I mean them both

manic rune
#

should be the same

brisk rose
#

Both of them is nice too tho

#

(Ignore my stroke) i thought I was being clever. I was not

manic rune
#

❤️

native zinc
#

i got so annoyed on my first day of playing balatro that loyalty card didn't punch the holes out over time so i'm making this just to appease myself

lucid owl
#

modding balatro while listening to jazz records is an other level of losercore

#

it's peak tho

lucid owl
#

🤓

native zinc
#

oh cool

brisk rose
native zinc
brisk rose
willow plinth
native zinc
#

i saw that one too but uhhhh

#

it's not what i want

willow plinth
#

Oh ok

native zinc
#

it still has like all the regular hole punch places

#

i want to visually see how many rounds i have left

#

as it stands it looks like aura just makes it punch when it hits the 2x

#

or 6x

brisk rose
#

I thought aura jokers did things like that?

native zinc
#

what's loyalty card again

native zinc
brisk rose
native zinc
#

and the animation in the mod thread has too many hole punch spots

#

maybe i can ask them to push my small fix

thorn pumice
lucid owl
#

i think conditional texture changing is still pretty finnicky to deal with which is why a lot of that stuff isn't implemented yet

brisk rose
sonic cedar
#

How do i make a sound effect pitch higher each time it plays consecutively? (then reset to its standard pitch once its done)

willow plinth
brisk rose
#

What i had before just used emojis as free assets

brisk rose
brisk rose
# brisk rose

This uh... approach still has much more potential ngl

willow plinth
#

I don’t know more sorry

sonic cedar
#

yeah i know about the pitch thing but thanks

manic rune
#

-# why do i feel like theres already a built-in function for this

#

i dont think it actually accounts for modded planet cards and hands right now, hm

brisk rose
manic rune
#

yeah, it is, but i havent seen any function that uses that to check for which planet cards are for that hand

#

actually

#

i should check telescope's code

brisk rose
manic rune
#

is that a mod?

#

if so, its not built in

brisk rose
#

But it might be using anything built in is the point

#

And tbh... it's best to use smodded ways to do things not thunkisms

unkempt thicket
#

The Harlet

manic rune
#

im pretty sure they made their own code for that

#

-# i think thats just telescope's code fully pasted in, actually

brisk rose
#

So yeah it's all the same in this case

unkempt thicket
#

What does the harlet and telescope do again?

manic rune
#

finding the planet card for the most played poker hand

#

im not sure about the harlet, never tried out that mod

brisk rose
unkempt thicket
#

Yea, i forgot

brisk rose
#

I swear I'm 26 not 13

gilded narwhal
unkempt thicket
tall wharf
manic rune
#

another benefit is that it still lets you use priestess even when your consumeable slots are full

gilded narwhal
manic rune
#

so you can stack up your negative planet cards for observatory or something else

sonic cedar
#

how can i make the joker pick between these three sounds to play when it's sold?

manic rune
#

"soundkey_"..pseudorandom("idfk",1,2)"

#

basically, uh

#

have them all using the same key with the only difference being the number at the end

#

so that you can use pseudorandom to randomly pick one of them

#

:p something like that

sonic cedar
#

gonna try to set that up (also hiiiii i only just realized it was you hi bepis hi)

manic rune
#

hi :3

sonic cedar
manic rune
#

you forgot the seed

#

pseudorandom(seed,min,max)

sonic cedar
#

the wha-ohhhhhhhhhh

#

how does that work

manic rune
#

nornally its just 0 to 1 right?

#

changing min and max change that too

#

that also means you want to use math.ceil, floor or something to round up the number

#

and i think you will want to make it from 1 to 4 instead, since if its only from 1 to 3 then the chance to get 3 is impossibly low, so maybe something like math.min(math.floor(pseudorandom("seed",1,4),3)?

sonic cedar
#

ok ok got it

#

sorry ive just not used the math functions like that

manic rune
#

its fine lel

sonic cedar
#

ok last thing before testing

#

does the "seed" not matter like

#

it can just be whatever?

manic rune
#

yeah

#

as long as its something that isnt used

sonic cedar
manic rune
#

that looks right

#

-# hopefully

sonic cedar
#

it chose the secret third option (play no sounds at all actually because i hate you)

#

is that not how the context works

verbal hare
sonic cedar
#

vscode

verbal hare
#

how do you get that fonts and colors? my code looks bored

manic rune
#

can u try printing the entire string

sonic cedar
sonic cedar
verbal hare
sonic cedar
#

m6x11plus

sonic cedar
manic rune
#

oh wait

#

hm

#

setting min and max actually doesn't print 3.48478483 anymore, its just the rounded number

sonic cedar
#

oh so

manic rune
#

"hpfx_death"..pseudorandom("isold",1,3)

#

that alone should work

#

and also, if it still doesnt work, maybe try (mod_prefix)_hpfx_death... instead 🤔

sonic cedar
#

ok testing time!!

daring heron
#

so i know how to add shaders like foil and polychrome to decks, but how would i add seals? are they shaders too?

regal ether
#

cryptid is lowkey the balatro modding bible

#

if only it used actual smods class definitions but that would probably break some unreasonably stupid backend

chrome widget
#

I read the source code (old testament)

regal ether
#

that too

#

although i copied hanged man's code for a consumable and it didnt work so idk what im doing wrong

chrome widget
#

Probably because of the original game using the self argument because the vanilla code is typically in Card table functions?

daring heron
daring fern
sonic cedar