#💻・modding-dev

1 messages · Page 106 of 1

autumn coral
#

oh that killed it

#

oh no

#

me makes stupid mistake

wintry solar
#

update smods

autumn coral
#

wait actually all i need is the thing that does the -1

#

i'm so stupid

tidal ice
#

ok so small problem

spades are considered clubs, I only want diamonds to be considered clubs and spades

autumn coral
#

change the and to an or?

#

i.e. (suit == spades or suit == clubs)

#

sorry if this is a shitty suggestion

tidal ice
#

that may actually work

#

lemme test

autumn coral
#

trust me it will

#

actually

#

hm

#

it should work but let me double check

tidal ice
#

nope

autumn coral
#

yeah

#

no clue sorry

#

id idn't even need to do this btw i just called it normally with -1

wintry solar
#

if next(SMODS.find_card('j_dnm_blacktie')) and self.base.suit == 'Diamonds' and (suit == 'Spades' or suit == 'Clubs') then should work

tidal ice
#

oki doki

autumn coral
#

is that not like

#

what i said

#

😭

tidal ice
#

its slightly different

autumn coral
#

thats what i meant

#

OH

#

the and is there

#

yeah

#

that makes sense actually

gilded narwhal
#

Hey can anyone please lmk how I make it so that it updates every blind instead of giving me 16 hands every blind

frosty dock
#

set_ability only gets called when you get the joker

bold sleet
frosty dock
#

so just reassign to card.ability.extra probs in both calculate and loc_vars

wintry solar
frosty dock
bold sleet
#

god dammit

gilded narwhal
#

And also just general reference because usually the calculate function doesn't override the original, is there a way to change that?

bold sleet
#

Guess I am meant to update it every second

frosty dock
#

context.setting_blind and context.joker_main don't occur together

#

so that does nothing

elder vapor
#

me waiting for the day smods has auto update capabilities

gilded narwhal
frosty dock
#

yeah

bold sleet
#

Adquired new

#

so uh... now what

frosty dock
wintry solar
#

now look at your enhancement

#

and your problem is gone

scenic sphinx
#

why doesnt it become the right file

elder vapor
#

do you have the extension preview enabled in file explorer?

tepid crow
#

Thats a main.lua.txt file

elder vapor
#

that text file still has .txt at the end which would explain why its a text document

bold sleet
#

So uh...

faint yacht
scenic sphinx
bold sleet
#

It now works.

scenic sphinx
tepid crow
#

Go into your windows file explorer options and find that setting

frosty dock
#

kid named vscode:

faint yacht
scenic sphinx
#

ahh thank you that worked

tepid crow
#

Mostly because it doesn't actually teach them anything

scenic sphinx
faint yacht
#

Tossing my two cents in with options, take all with a pinch of salt. ¯_(ツ)_/¯

scenic sphinx
#

now the question do i open the lua file in something like visual studie or?

faint yacht
#

VSCode or Notepad++ can work. Hell, even basic Notepad will do.

frosty dock
#

(don't use basic notepad)

#

(you'll have a terrible time)

scenic sphinx
tepid crow
frosty dock
#

arch users when they let everyone know they use arch btw

faint yacht
#

That's such an Archetype.

bold sleet
#

why it ain't workin'?

gilded narwhal
#

This still just gives 3 hands

scenic sphinx
frosty dock
bold sleet
frosty dock
#

not config.chips

bold sleet
#

me stoopid

frosty dock
#

also it's advisory to always use the card arg's ability table instead of self.config because it allows for card values to be changed

#

this way it always uses the default value of the prototype

#

which usually isn't what you want or need

bold sleet
#

i stupid

tidal ice
#

trying to make a Joker that functions like splash, how on earth am I supposed to do that

elder vapor
#

patch in functionality where splash is checked for

#

pokermon has a joker that behaves like splash (magikarp)

tidal ice
#

ah

gilded narwhal
#
poll_question_text

Mystic summit rework (32 discards for the whole run, not counting discard gains)

victor_answer_votes

3

total_votes

5

victor_answer_id

3

victor_answer_text

X3 mult when 0 discards remaining

victor_answer_emoji_name

3️⃣

bold sleet
gilded narwhal
#

Does the order of this matter?

frosty dock
#

yes

gilded narwhal
#

Damn

frosty dock
#

function params are ordered

gilded narwhal
#

I've been doing it wrong this whole time

#

Wonderful

frosty dock
#

you're lucky you weren't around for steamodded 0.9.8

#
SMODS.Joker:new(name, slug, config, spritePos, loc_txt, rarity, cost, unlocked, discovered, blueprint_compat, eternal_compat, effect, atlas, soul_pos)
wintry solar
#

aure, what do you think to building in some way of adding free rerolls to smods? they currently require a patch and I could foresee some clobber if people do it badly

frosty dock
#

i see nothing wrong with that

wintry solar
#

cool, I will get that sorted

#

after I'm done bashing my head against controllers 🎉

gilded narwhal
#

Okay so this works but also doesn't override the original burglar, it just does the 16 + 3 hands instead of just 16

frosty dock
#

add return {} or something in the calculate

#

if you don't return anything, it'll keep going into the original code

dull thorn
#

Hey I'm fairly new to all of this modding stuff, but I wanted to make a Joker that functions similar to Spare Trousers, but for Flushes, and all it seems to do when I specify a hand for it to detect is crash the game when that hand is played, so I was wondering if there's some cohesive guide somewhere on how to do stuff like this since the Steammodded Wiki stuff isn't super clear on how any of this works. Or if someone could point me to where the specific joker functions are stored in the source code so I can maybe copy and modify the code for Spare Trousers? Any help is appreciated as I haven't been able to accomplish much aside from making a Joker that either does nothing or just crashes the game a lot in the last few hours.

gilded narwhal
#

Gotcha

frosty dock
gilded narwhal
#

OKAY that works good

dull thorn
#

Well I extracted the exe, I was wondering what lua file the jokers were in or if they're somewhere else

frosty dock
#

it's not nicely in one place, joker metadata like cost, rarity, etc. are in game.lua while calculation code is in card.lua

violet void
#

with visual studio code you can do global search

tidal ice
#

I think I understand how to make a joker/consumeable create a Joker, but how to I make it where its only jokers of a specific rarity

frosty dock
# dull thorn Hey I'm fairly new to all of this modding stuff, but I wanted to make a Joker th...

when adapted to steamodded, it should look something like this

calculate = function(self, card, context)
  if context.before and next(context.poker_hands['Flush']) and not context.blueprint then
    card.ability.mult = card.ability.mult + card.ability.extra
      return {
        message = localize('k_upgrade_ex'),
        colour = G.C.RED,
        card = card
      }
  end
  if context.joker_main and card.ability.mult > 0 then
    return {
      message = localize{type='variable',key='a_mult',vars={card.ability.mult}},
      mult_mod = card.ability.mult
    }
  end
end
dull thorn
#

Well this looks a lot more complicated than the code I had so clearly I was doing something wrong

scarlet thorn
#

How could I get a # in a joker's description? ive tried escaping it, but it just errors out

dull thorn
frosty dock
#

this is assuming the same config structure that spare trousers has

scenic sphinx
#

okay so im either really dumb or something but i coppied a template to test something out for my first joker but idk why it doesnt show up (sorry for the bad sc idk how to put it into chat better)

frosty dock
#

if you have a different config, you have to change these accordingly

dull thorn
#

Gotcha

#

Thanks for your help, this has gotten me much farther already

#

I changed + card.ability.extra to +2 and it literally works perfectly

#

Insane, thank you so much

frosty dock
#

you could also add extra = 2 to the config but sure

dull thorn
#

Oh

#

That's probably smarter huh

violet void
# tidal ice I think I understand how to make a joker/consumeable create a Joker, but how to ...
                local jokers_to_create = math.min(2, G.jokers.config.card_limit - (#G.jokers.cards + G.GAME.joker_buffer))
                G.GAME.joker_buffer = G.GAME.joker_buffer + jokers_to_create
                G.E_MANAGER:add_event(Event({
                    func = function() 
                        for i = 1, jokers_to_create do
                            local card = create_card('Joker', G.jokers, nil, 0, nil, nil, nil, 'rif')
                            card:add_to_deck()
                            G.jokers:emplace(card)
                            card:start_materialize()
                            G.GAME.joker_buffer = 0
                        end
                        return true
                    end}))   
                    card_eval_status_text(context.blueprint_card or self, 'extra', nil, nil, nil, {message = localize('k_plus_joker'), colour = G.C.BLUE}) 
            end```

I found this in riff-raff code, the fourth value in create_card is for the rarity
frosty dock
#

more argument order jank

tidal ice
#

thats what I thought but I wanted to make sure

#

so is 2 for are jokers

frosty dock
#

that one doesn't work how you think it would

#

it doesn't actually take a rarity index like elsewhere

#

it takes a chance roll for a rarity

tidal ice
#

ah

#

so a 1 would mean a garenteed rare then yeah?

frosty dock
#

yes

#

anything up to 0.7 is common, above 0.7 but up to 0.95 is uncommon, above 0.95 is rare

gilded narwhal
frosty dock
#

SMODS.create_card should provide a better system for that tbh

violet void
#

hold on does that mean there's a 5% to get a rare joker in the shop

frosty dock
#

yes

violet void
#

thats awfully low

autumn coral
#

how can i get if the player is currently in a blind without using context

#

i'm using my custom use() function i added to my "active" jokers lol

#

i need it to know whether the player is in a blind or not before doing stuff

frosty dock
#

G.GAME.blind.in_blind iirc

autumn coral
#

that's hilarious

#

thanks

#

huh

#

i wonder why that's. not working

#

😭

frosty dock
#

might need to check G.GAME.blind exists first to be sure, not sure if that's necessary

autumn coral
#

is there something that checks if they're not in the select screen then

#

select screen or shop

#

i did do that tho

#

G.GAME and G.GAME.blind and G.GAME.blind.in_blind just skips it for some reason

#

WAIT

#

NEVERMIND

frosty dock
#

where did you put that tho

autumn coral
#

OH MY GOD

#

NEVERMIND IGNORE ME I'M SO STUPID

#

I MEANT TO CHECK IF THEY WEREN'T IN A BLIND NOT IF THEY WERE

frosty dock
#

lmao

autumn coral
#

😭

dull thorn
#

Okay so my custom joker is actually working well, the last thing I need is for the flavor text to accurately report the mult amount, and I'm having trouble figuring out how exactly I get that information into the text field

autumn coral
#

#1# and then locvars

#

i.e. ur loc_txt in the text part will be like

"Has +#1# mult"
#

#1# will grab the first value in loc_vars which you can set to whatever config variable has that mult

frosty dock
autumn coral
#

goddammit i broke the charging again on my jokers

#

whyyyy

#

maybe it's bc they're set to 1 rn

#

yyyup that's probably it

#

hm

dull thorn
wintry solar
autumn coral
#

my cards hate me

#

😭

#

i can't even ask how to fix this it's MY own fucking custom 1/1 gameplay mechanic

#

dobd

#

sobs*

#

OH MY GOD

#

I FIGURED IT OUT

autumn coral
#

yeah!

#

it's very wip, a lot of cards don't have textures yet, i think i'm onto 10 jokers now?

#

all of them (gfuel especially) are very high effort

#

my idea was to make a mod that doesn't feel like just another just like. balatro mod. i wanted it to feel like the binding of isaac had its own place in balatro without thinking inside the smaller box of balatro gameplay loop sorta

#

anyway my issue was that i forgot to fix all of the init_logic shit to be global when i changed them LMFAO

autumn coral
#

hehe

#

thank

#

i'm working rn on iv bag

#

it's almost ready

#

it's basically you trade 1 hand for 0-3 discards

#

it's only for the round though

#

ok cool i fixed it!

scenic sphinx
autumn coral
#

i'm the only mod that has "active" jokers though to my knowledge

#

they have charge bars that work with the battery functionality

scenic sphinx
#

if only my mod would show up between the rest cuz idk why that no work

autumn coral
#

but yeah, this is what it looks like with battery next to it (left is iv bag, right is the battery)

#

ik it's confusing, i don't really have a better placeholder

#

unfortunately i'm just 1 person and god decided to make me good at music, which is ironically the one thing in balatro that you can't really replace

#

not that i didn't try

wooden nexus
#

Playing with the new suit/rank fun

autumn coral
#

i think i need to add a blood bank foley sound though when you use iv bag

#

i need to remember what iv bag even sounds like

#

i think it has sound

#

if it doesn't i need to rember blood machines

scenic sphinx
#

do i need to do more idk what i need more

autumn coral
#

wait what's the folder in?

#

i meant what's in the folder for it

#

it should just be the mod stuff

#

if it crashes btw u might have to disable some other mods

#

i don't remember if cryptid still crashes it or not 😅

scenic sphinx
faint yacht
#

...if it's not loading, you don't have a header for Steamodded to read.

autumn coral
#

i do

#

lol

#

i promise i do i am literally. playing it right now

#

😭

scenic sphinx
autumn coral
#

oh ur mod

scenic sphinx
#

yeah lol

scenic sphinx
autumn coral
#

you are missing the end header

#
----------------------------------------------
------------MOD CODE END----------------------
#

place this at the bottom of ur file

#

OJH

#

WAIT NO I FIGURED IT OUT

#

sorry this is something they don't really um. tell you

#

you need to set your atlas to xmpl_Mythos instead inside of your joker

#

you need the prefix

#

and also that bottom end header if you don't have it already

violet void
autumn coral
#

lol

#

yeah i wasn't sure either

#

btw dw @scenic sphinx literally nobody told me for like 4 hours why shit wasn't working until i found out about prefixes

faint yacht
#

Weird, I don't have that for mine and I'm still using the legacy header... and my mod still loads just fine.

wintry solar
#

you dont need that block

#

you dont need to prefix your atlases

autumn coral
#

oh

#

wait what

#

ok then i have no idea

#

lmfao

#

is it the inconsistent space for "STEAMMODDED HEADER"?

faint yacht
#

May be.

autumn coral
#

oh

#

it so it

#

is*

#

@scenic sphinx change line 1 to be --- STEAMODDED HEADER

scenic sphinx
autumn coral
#

that's just another good practice honestly but also if ur gonna add sounds it helps to know about prefixes

frosty dock
autumn coral
#

or anything remotely advanced past mult lmfao

frosty dock
#

it does nothing, steamo just had early example mods that way and it stuck, idk

autumn coral
#

fix the header and let us know

#

should work

scenic sphinx
#

for now i just want it to show up in the mod list lol

frosty dock
#

i really recommend using json metadata files at this point tho

wintry solar
#

prefixes are kind of managed for you too unless you're doing more technical stuff

violet void
scenic sphinx
autumn coral
#

no clue then 😅 srry

#

i'm a very bad teacher when it comes to this kinda stuff

violet void
autumn coral
#

oh?

#

are they removing it in the next release>?

wintry solar
#

the author must be in square brackets

autumn coral
#

OHHHH

wintry solar
#

but you should use json regardless

autumn coral
#

right ur so right

#

what does the json metadata file look like then /gen

violet void
autumn coral
#

lol

wintry solar
autumn coral
#

ok anyway iv bank works

#

imma push to master lol

wintry solar
#

take this template and fill it in

autumn coral
#

okidoki

#

what's the um. file name?

#

oh nevermind

#

wait is this thing case sensitive?

scenic sphinx
autumn coral
#

no

#

make a file in ur directory i think called whatever ur mod file is called.json

#

for me it's wrenbind.json

scenic sphinx
#

ahh and put that in

autumn coral
#

at least that's what i'm assuming

#

let's see

#

yeah

#

this is what mine looks like

#

then u can just remove all of ur headers and stuff entirely

#

just make sure main_file is ur main code file

violet void
#

thats some high priority

autumn coral
#

u should see cryptid's

violet void
#

...lol

autumn coral
#

like i'm not joking her btw the binding of jimbo will be the next cryptid of balatro mods

#

i'm not planning on making this low-effort, unlike the mod for my friend that i'm doing when he's done spriting LMFAO

#

this is honestly just a fun project to learn a new language (i was INSANELY new to lua when I started this) and it's been really really fun

#

also just to like

#

derust

#

it's been a while since i've done a big programming project

#

last one i did was like 5 months ago and i did a fullstack on aws and everything

wintry solar
#

oh you've changed your name

autumn coral
#

oh!

#

yes i did sorry

#

😭

#

my music stuff is under hyperpup so i changed it globally to be hyperpup but my oc is wrench

violet void
autumn coral
#

speaking of which my pfp is not wrench rn but

#

that's besides the point

scenic sphinx
autumn coral
violet void
#

now i know slightly more than 0

autumn coral
#

shitty documentation writer forgot that you can't have empty commas in json

#

it's case sensitive

wintry solar
#

you need a badge_colour from what I remember

autumn coral
#

thiiis one right here

autumn coral
wintry solar
#

or maybe it defaults

autumn coral
#

it defaults

#

it's the comma

scenic sphinx
autumn coral
#

kewlll

#

ok iv bag implemented

#

time to scour the isaac wiki for a new active item to implement

#

one of these days i'll do do d6 and ed6 and finally start character decksp

#

good thing that's not today!

#

ig i'm streaming dev now lol

scenic sphinx
#

lost should start with the joker that makes sure you dont lose once lol

autumn coral
#

haven't figured out holy mantle yet

#

i think it'll prevent one blind death per room

#

maybe?

#

but like

#

you'll still have to finish the blind

#

it'll give u one more hand and discard to try

#

i think

#

but also all character decks start with an eternal negative active item based on the ones in isaac

#

i could do pills rn

#

hmmm

scenic sphinx
autumn coral
#

i'll figure it out

#

maybe soul shackles or smf

scenic sphinx
#

you start with a negative eternal bone

autumn coral
#

btw if ur a spriter i actually need someone who can do pixel art for jimbo

#

i'm not very good at anything that isn't typography...

scenic sphinx
#

a yes id call myself one lol

#

(ik it needs allot of work)

#

am i stupid? (thats the dependencies that was in the latest cryptid + jen modpack so it should work)

autumn coral
#

god.

#

dammit.

#

of course cryptid is my only reference for consumables

#

😭

scenic sphinx
#

this could help idk

autumn coral
#

oh wait ur so right

#

unfortunately i'm loading stuff like cryptid so it's probably for the better anyway LMFAO

scenic sphinx
#

yeah true

autumn coral
#

was WAY too big for one file

scenic sphinx
autumn coral
#

i did lol

wintry solar
#

you can look at ortalab too

autumn coral
#

you underestimate my power

#

nah it's alr

#

i'm using the cryptid loading system

#

makes more sense anyway

wintry solar
#

I might be slightly biased but it has a better loading system than cryptids

autumn coral
#

shrugs i'm not reprogramming my mod

scenic sphinx
#

ty game modding for making me feel dumb asf

wintry solar
#

"Steamodded (>=1.0.0~ALPHA-1216c)"

scenic sphinx
#

aha ty that worked now the crashes begin

#

like is aseprite not supported as a file option cuz tf does it mean

wintry solar
#

.aseprite isn't an image file

#

you need to export it as a png

scenic sphinx
#

ahh

#

bruh moment

#

im stupid fr

bold sleet
#

Is there a way to change the value of for example Chips for enhancements?
Like, it gives + chips depending on the number of cards in the deck.

scenic sphinx
#

ah yes another crash i dont get (sorry that im asking so many questions)

shell condor
#

Where can I find a repository of information on how to get started with modding? I might start fiddling with balatro modding on the side, seems fun

frosty dock
bold sleet
shell condor
#

Radical nhumbsup

wintry solar
bold sleet
#

Balatro probably can't open and read .aseprite files.

scenic sphinx
wintry solar
#

you need to update it in the code too

scenic sphinx
bold sleet
#

Doesn't look like it.

scenic sphinx
scenic sphinx
scenic sphinx
#

FINALLY IT WORKS

bold sleet
#

congrats

scenic sphinx
#

now only know why i cant open the debugger or just how i do it

bold sleet
#

Debug mode you hold TAB

scenic sphinx
#

thank you

#

okay so last question for now why doesnt the image show up

bold sleet
#

Can I see the spritesheet?

wooden nexus
bold sleet
#

m-hm..?

wooden nexus
#

We deleting suits

scenic sphinx
bold sleet
#

New suit™️

wooden nexus
#

Guess what time it is... Luigi Picture Poker time

bold sleet
#

no clue, idk what the soul pos thing is, as I don't have it in my jonclers

dull thorn
#

Hey last thing from me, anyone know the easiest way to destroy cards upon playing them, or for the case of what I'm trying to do, destroy a whole hand?

mystic river
#

during context.destroying_card return true

dull thorn
#

Where would I put that in the code exactly

scenic sphinx
mystic river
#

in the calculate function
like in my joker i have

        if context.destroying_card and not context.destroying_card.ability.eternal and context.destroying_card:get_id() ~= 7 and pseudorandom('eaten') < G.GAME.probabilities.normal/card.ability.extra.odds then
            return true
        end
#

... a lot of ands in there

mystic river
scenic sphinx
#

im very happy everything works

#

okay not yet

#

it says it gives me the score and doesnt lol

autumn coral
#

i think i got. pills working?

#

i'm literally not bothered enough to define them seperately, i'

#

i'm basically going to just define id-given effects at the start of every run for each id of the pills and save it

#

oh my god wait this is such a huge project

#

lmfao

#

WHAT DOES THIS THING WANT FROM MEEEE

scenic sphinx
#

okay so is there a reason it isnt working like making the chips actually happen

bold sleet
#

a sec...

scenic sphinx
#

take your time lol

bold sleet
#

I think you can guess what's wrong now.

scenic sphinx
#

put both on card ig

#

or center

#

ik they need to be the same

bold sleet
#

I use card.

scenic sphinx
#

alrighty

bold sleet
#

I don't know what center thing is about.

#

Personal choice, tho.

scenic sphinx
bold sleet
#

Fair.

autumn coral
bold sleet
#

I use templates most of the times.

autumn coral
#

GOD

#

kills steamodded

bold sleet
autumn coral
#

i don't even use self bc it has literally never worked

bold sleet
autumn coral
#

true as fuck probably

bold sleet
#

I use card.

autumn coral
#

anyway center is how the original game refers to it

#

and i have to use center sometimes

bold sleet
#

ah

autumn coral
#

i.e. with charged jokers, in order to change the position of the current extra atlas drawing the overlay, you have to do self.config.center.pos.extra.x

#

and also for my custom use() function as well

bold sleet
#

My question still stands: How can you modify a value in an enhancement?

autumn coral
#

oh dude that's above my pay grade i haven't done that shit yet

#

my shit's too advanced for steamodded half the time 😭

#

i've had to make so many patches of my own i basically have my own mod engine here

bold sleet
#

I've been tasked with this, tho...

#

I have no clue how to go about that.

hardy viper
autumn coral
#

iunno brb

bold sleet
#

My first idea was to get the whole deck (partly for testing purposes), but tht gives out an error when loading because there is no deck.

#

idk what to do.

#

jelp

hardy viper
#

it's implicitly given via center:calculate(card, context) so if it isn't working then that's a severe luajit bug

#

either that or for some reason it's not called as a method

#

but i highly doubt that

#

who knows but it should definitely work

scenic sphinx
autumn coral
#

i don't remember what i was bringing up here

#

oh u meant in self lmfao

#

self sometimes is buggy for me sometimes

#

iunno

autumn coral
#

anyway time to figure out why it says. no atlas

bold sleet
autumn coral
#

itz gonna be something stupid

wintry solar
autumn coral
#

i know that's really shitty but like

bold sleet
#

aw

#

Eh, fair enough.

scenic sphinx
bold sleet
#

Or just a way to do the thing.

autumn coral
#

real

#

there is no happiness in programming there is only satisfaction

#

and when shit works it feels better than sex to me

bold sleet
#

When shit works my brain goes "ah, finally. Time to move onto the next thing!"

autumn coral
#

yeah pretty much

#

willing to bet the reason this doesn't work is bc i left something out from the cryptid code

scenic sphinx
bold sleet
autumn coral
#

no i don't but i'm not stupid unfortunately and could figure it out relatively fast

bold sleet
autumn coral
#

i wish i was stupid though

#

being smart is a fucking burden

#

meanwhile i guess i'm done being a burnout loser

scenic sphinx
autumn coral
#

i figured it out i'm just stupid

bold sleet
#

Nah, you are certainly smarter than me, so don't worry.

#

U smort

autumn coral
#

i try

gilded narwhal
#

Hey does debugplus give you vouchers?

#

Or like are you able to get vouchers easily

hot drift
#

Yes

#

You have to be in a shop

#

Pressing 3 will add it to the voucher slot

#

Same thing works with booster packs

faint yacht
#

For the localization file... what's the naming layout for Booster Packs?

gilded narwhal
#

Gotcha

#

why wont it go away

#

oh nvm so I think whats happening is it's checking for a boss blind before it actually gets redeemed

#

That's problematic

wooden nexus
#

Hey all. I got something i wanna try but want your opinions on

twin terrace
dusk shoal
#

soooo since the game crashed

#

im guessing you cant have a gif as an atlas

scenic sphinx
#

tbh idk how does jimball do it

mellow sable
#

cursed balatro images

golden lake
gilded narwhal
# gilded narwhal

hey does anyone that works with vouchers a lot know how to make a voucher apply a passive effect like this? (gives 1 hand when boss blind is defeated)

scenic sphinx
golden lake
#

you would never use a gif for an animation in game development

dusk shoal
#

makes sense

#

now how do that

scenic sphinx
twin terrace
faint yacht
#

Shoot, whilst moving stuff from main script to localization file, I forgot the key where I was supposed to put the definition. 💀

twin terrace
#

I find it interesting that Hologram uses the same effect as legendary jokers do

mellow sable
#

yeah I was using the hologram sprite as a test sprite

#

this isn't a joker I'm adding btw, just testing some Steamodded API I'm working on

#

the reason why this happens is because ||all the cards act as wild and stone cards... and every other enhancement||

dusk shoal
scenic sphinx
#

is just cursed

shell condor
#

does the game store your last played hand for you or do i have to track that myself? asking bc im trying to make a card that works like this

faint yacht
#

Gotta store it yourself.

shell condor
#

can i store it like, agnostic of having the card?

#

or i suppose it wouldnt matter, since no matter what its starting from zero

dusk shoal
#

how would i like

#

track/change something every second or so?

#

i want a card to be animated basically

autumn coral
#

probably?

dusk shoal
#

so its changing the position of the card every second

dusk shoal
dusk shoal
#

since its not really an effect of the joker

#

just how it looks

#

orrr wait

#

maybe just an unblockable event

dreamy kindle
#

extremely new to modding and lua in general (sorry) and i have no clue on how to make this both not crash the game on startup and properly work i know its (probably) something to do with functions

faint yacht
#

play_sound needs the string with the mod's prefix in front.

#

As example, my prefix is toga and the sound I want to play is dorime.ogg with key set as dorime: play_sound('toga_dorime')

dreamy kindle
#

good to know

dusk shoal
#

is delay = an integer or a float

#

cuz its seconds

#

so im guessing a float

karmic kelp
#

does lua even let you make that kind of distinction? I thought they only had "number" on offer

dusk shoal
#

wait really? can i just make it 0.5 or whatever then

karmic kelp
#

should be able to yeah

#

I think in my stuff I've got a mix of 0.1 and 0.2 delays, maybe a 0.4

faint yacht
#

4, 0.4, 4.57e-3, 0.3e12, 5e+20 are all valid numbers for Lua.

dusk shoal
#

kk !

#

also

#
      G.E_MANAGER:add_event(idiot_event){     
        blocking = false,
        blockable = false,
        delay = 1,
        pause_force = true,
        no_delete = true,
        trigger = "after",
        func = function()
          if pos == { x = 0, y = 0 } then
            pos = { x = 1, y = 0 }
          else
            pos = { x = 0, y = 0 }
          end
        end,
      },```
#

this is my ramshackled line of code to try and make it change pictures each second

#

and obviously the game is crashing on launch

faint yacht
#

Joker, ye?

dusk shoal
#

mhm

faint yacht
#

Atlas has two images for this Joker, yes?

dusk shoal
#

im just using 2 that already exist on the atlas

#

placeholders

faint yacht
#

In the update function of the Joker, use

card.children.center:set_sprite_pos({x = math.random(0, 1), y = math.random(0, 1)})

if you really want to change the image every single frame.

dusk shoal
#

NOT every single frame lmao

#

it was everyyy

#

im checking

#

30 one hundredths of a second

#

or 35 unimportant

#

though i did use this from the github template and i copied it differently than was shown

#
event = Event {
    blockable = false,
    blocking = false,
    pause_force = true,
    no_delete = true,
    trigger = "after",
    delay = 5,
    func = function()
        print("Hi mom!")
        event.start_timer = false
    end
}
G.E_MANAGER:add_event(event)```
#

what it gave

faint yacht
#

The delay implies 5 seconds before the func executes.

dusk shoal
#

yeah no that seems fine, i'll just set it lower

#

problem is, when i place this into the code, "local event" at the top doesnt actually do anything

faint yacht
#

And it executes once.

dusk shoal
#

and is just an error

#

once? damn this said it looped

#

or at least, every 5 seconds

gilded narwhal
#

Would this work? The actual voucher code is pretty much blank but would this have the effect I want it to?

#

These are in trigger_effect for the deck btw

faint yacht
#

I'm not as well versed in this, so I may be talking out of my ass. Best to relegate this to someone who knows better of events... but you still may find the function I've sent useful regardless.

dusk shoal
#

alright !! thanks for trying at least

#

this joker does almost nothing helpful and its the most complicated one ive made LMAO

shell condor
#

how would one check which hand type is the highest listed scoring hand type in a played hand?

#

scoring_name?

#

im still trying to navigate my way around the documentation

shell condor
#

where can i find the game's localization files? for the life of me i cannot figure out what the localization key is for xmult

gilded narwhal
#

Hey so if I'm not wrong it's not possible to use loc_vars on a blind ownership to replace the description as of now, correct?

#

Because I'm pretty sure it only accepts vars when on a blind

dreamy kindle
autumn coral
#

it does all of this shit automatically and then all you do is type in your prefix in the file name

#

also you need to set a prefix in your metadata

#

my prefix is wrenbind.
i can call literally any sound in my assets/sounds folder by putting in the prefix_name (minus the extension)

#

i.e. "wrenbind_pills1"

#

um but

#

you are doing a lot of things wrong what are you even trying to do here

#

you know what's causing the crash?

#

context doesn't exist on a global level

#

you need to create a joker and then on calculate do

function calculate(self,card,context)
    if (context.poker_hands["full house"]) then
        play_sound("crabrave_fullhouse")
    end
end
dreamy kindle
#

again im very new and i just thought that would work L_L

autumn coral
#

i'd look at the example jokers mod in the steamodded folder

dreamy kindle
#

i'm not making a joker

autumn coral
#

what are you trying to do

dreamy kindle
#

_ _

autumn coral
#

hold on

#

you need to hook the event for played hands

#

let me find it

dreamy kindle
#

like you play full house and it goes "the player has... nuuhfullhaus"

autumn coral
#

um

dreamy kindle
#

thats just what it sounds like

autumn coral
#

probably this function evaluate_poker_hand(hand)

#

you have like

#

no idea how to do anything with steamodded though

#

i would start somewhere else

dreamy kindle
#

yeah sorry

autumn coral
#

no it's ok i'm just trying to be helpful

#

i'd try to make a joker or two first and learn patching before you try something like this /gen

#

especially if you're not familiar with lua

#

i threw myself into a huge project head-first but i had some elementary lua experience, even then it helps that i started with jokers. my entire codebase has completely shifted over the course of like. 2 weeks

#

if you ever need help, there'll be people here to help you, it's just that, yeah, this is a pretty big um. project whether you realize it or not 😭

dreamy kindle
#

ty for telling me this before i tried brute forcing this like a big dummy

autumn coral
#

no that's fair

#

listen i've been brute forcing shit all week

#

my entire mod is like. i have to basically invent my own game shit at this point because nothing i want to do is even supported by balatro itself, letalone steamodded or lovely

#

so i get the feeling

mystic river
#

how do you make a joker retrigger itself
-# and ideally without immediately entering an infinite loop, yes

dusk shoal
#

uhm youre gonna have to specify then

#

do you want it to retrigger once?

#

chance based?

mystic river
#

once per each previous joker trigger this hand
i'm basically copying the storm mechanic out of mtg

#

(legendary joker :v)

dusk shoal
#

right right, well

#

do you have a way to count how many time each joker has triggered?

mystic river
#

yes, though it isn't counting in the way i'm expecting it to

        if (context.post_trigger and context.other_joker ~= card) then
            card.ability.extra.stormcount = card.ability.extra.stormcount + 1
            sendDebugMessage('[Minty] Storm count: '..card.ability.extra.stormcount)
        end
dusk shoal
#

what exactly is it doing?

mystic river
#

the storm count is increasing higher than i think it should be, but then the joker doesn't retrigger itself
here's the whole calculate actually

    calculate = function(self, card, context)
        if context.joker_main and context.scoring_hand then
            sendDebugMessage('[Minty] Stormy Xmult')
            return {
                message = localize {
                    type = 'variable',
                    key = 'a_xmult',
                    vars = { card.ability.extra.Xmult }
                },
                colour = G.C.RED,
                Xmult_mod = card.ability.extra.xmult,
                card = card
            }
        end
        if context.retrigger_joker_check and not context.retrigger_joker and context.other_card == self and card.ability.extra.stormcount >= 1 then
            sendDebugMessage('[Minty] Stormy repetitions')
            local storm = card.ability.extra.stormcount
            card.ability.extra.stormcount = 0
            return {
                message = localize("k_storm_ex"),
                repetitions = storm,
                card = card,
            }
        end
        if (context.post_trigger and context.other_joker ~= card) then
            card.ability.extra.stormcount = card.ability.extra.stormcount + 1
            sendDebugMessage('[Minty] Storm count: '..card.ability.extra.stormcount)
        end
    end
dusk shoal
#

this may not help at all, but shouldnt the thing that checks for stormcount be BEFORE the thing that uses it ?

#

i dont know if order matters like that

#

since its based on when a thing happens

#

is it sending the repetitions debug message?

mystic river
#

hmm
i'll double-check, but i recall it not triggering xmult at all when that part was below the storm count part

#

and no, the repetitions debug message is never sending

dusk shoal
#

right, so the main problem is with the if statement then

mystic river
#

yeah
but i copied that context out of cryptid's chad, so in principle it should be right?

dusk shoal
#

as long as the contexts arent cryptid made or something lol

#

no clue what that mod does, its black magic

mystic river
#

okay, moving the xmult part down didn't change anything at all
and switching to a different joker to test seems to have avoided the issue with the count increasing too fast so i think that's actually an issue with the other joker

dusk shoal
#

i see

#

if i were you, try isolating the parts of the if statement

#

like, take 1 part of it out

#

see if it works

#

if it does, add the part back and remove a different one

#

go down the line just brute force bug testing

tall wharf
#

how do i scale up the poker hand text

#

i tried something in the UI definitions but didn't work

#

I'll try that again i guess

shell condor
#

stopping for the night bc nasty headache but this is proving to be really fun and a good excuse to learn lua

#

(the other one doesnt work yet lol)

mystic river
#

hm
disabling context.other_card == self lets it retrigger, but it does it wrong
it goes joker A, joker B (retrigger), Stormy (retrigger twice)
i don't want it to retrigger the other jokers. that's what that check was for. but i still want it to retrigger at all

dusk shoal
#

inter esting

#

have you tried everything else? or is it only that thats causing a problem

mystic river
#

currently that's the only issue i'm seeing

dusk shoal
#

probably the only problem anyways

#

yeah

#

im mostly out of my league here lol but

#

knowing that thats the problem is helpful

#

explain to me like im 5 what context.other_card == self is supposed to detect

#

sometimes saying code outwards helps

mystic river
#

it's supposed to detect which card it's trying to retrigger
since i only want it retriggering itself
in chad it was context.other_card ~= self which is presumably because chad wanted the opposite of that

dusk shoal
#

just to test, what happens when its ~= self ?

#

as in not itself

mystic river
#

hm, that has the same effect as removing it

#

which i guess makes sense

dusk shoal
#

so right now, what seems to be the problem, is that when it checks what the "other_card" is its not itself

#

even when it should be

mystic river
#

hm. sudden hunch. this is going to either fix everything or crash immediately

dusk shoal
#

both options equally awesome

mystic river
#

well! i don't know what i thought self referred to, but i changed it to card and it now works perfectly

#

though it's echoing Storm! every time and ideally it would only do that once
but eh. that's a minor detail

dusk shoal
#

woohoo ! glad i could help(?)

#

trying to figure out how to make a joker's image swap between another every second or so, this is what i have so far:

      G.E_MANAGER:add_event(Event({
        blockable = false,
        blocking = false,
        pause_force = true,
        no_delete = true,
        trigger = "after",
        delay = 1,
        func = function()
            if pos == { x = 0, y = 0 } then
              pos = { x = 1, y = 0 }
              sendDebugMessage('check1')
            else
              pos = { x = 0, y = 0 }
              sendDebugMessage('check2')
            end
        end
      })),```
#

its constantly displaying "check2"

#

so its clearly not switching

#

but i assume its just not repeating the event

gilded narwhal
#

Hey guys I need help

#

I'm trying to make it so that a blind's challenge is that every discard costs 3 discards instead of 1

#

But from what I see the only things that steamodded allows with blinds is stuff like debuffs and things that happen when cards are drawn to hand

#

Actually hold on

#

Lemme see if I can get this lovely patch to work

gilded narwhal
#

Does anyone who knows what they're doing see anything obvious that I'm missing?

#

Or am I going about this all wrong

timid parrot
#

hey I just installed the latest steamodded and suddenly my mod is no longer being detected properly. Any idea why?

mystic river
#

dependencies format changed

timid parrot
#

ah what to?

shell tangle
#

Something like:

"dependencies": [
  "Steamodded (>=1.0.0~ALPHA-1203b)"
]```
mystic river
#

i forget the exact details but it's on the smods wiki

thorny adder
#

Thats fire

#

Call the mod "Flipnote Jokers"

shell timber
#

holy shit yomi hustle mod

thorny adder
#

Wassup chat

analog cypress
#

How do I set up a scaling joker?

#

Currently I'm working with this

SMODS.Joker{
    key = 'profren',
    loc_txt = {
        name = 'Prof. Renderer',
        text = {
            '{X:chips,C:white}+#1#{} Chips per',
            'Spectral Card used this run'
        }
    },
    atlas = "Jokers",
    pos = {x = 0, y = 0},
    config = { 
        extra = {
            chips = 10
        }   
    },
    loc_vars = function(self,info_queue,center)
        return {vars = {center.ability.extra.chips}}
    end,
    calculate = function(self,card,context)
        if context.joker_main then
            return {
                card = card,
                chip_mod = card.ability.extra.chips,
                message = '+' .. card.ability.extra.chips .. ' Chips',
                colour = G.C.CHIPS
            }
        end
    end
}
crisp coral
#

the game does not keep track of spectrals used unlike tarots

#

actually i fucking lied

#

elseif card.config.center.set == 'Spectral' then G.GAME.consumeable_usage_total.spectral = G.GAME.consumeable_usage_total.spectral + 1

#

lmao

wintry solar
#

it tracks all consumables

analog cypress
#

And this I would have to put under context.consumables...? Or is it a different context

wintry solar
#

context.joker_main

#

just change where you have card.ability.extra.chips to card.ability.extra.chips * G.GAME.consumeable_usage_total.spectral

analog cypress
#

Okay so this is what I have so far. Obviously I need to add the current chip count

SMODS.Joker{
    key = 'profren',
    loc_txt = {
        name = 'Prof. Renderer',
        text = {
            '{C:chips}+#1#{} Chips per',
            '{C:attention}Spectral Card{} used this run',
            '(Currently {C:chips}+#2#{})'
        }
    },
    atlas = "Jokers",
    pos = {x = 0, y = 0},
    config = { 
        extra = {
            chips = 10
        }   
    },
    loc_vars = function(self,info_queue,center)
        return {vars = {center.ability.extra.chips}}
    end,
    calculate = function(self,card,context)
        if context.joker_main then
            return {
                card = card,
                chip_mod = card.ability.extra.chips * G.GAME.consumeable_usage_total.spectral,
                message = '+' .. card.ability.extra.chips * G.GAME.consumeable_usage_total.spectral .. ' Chips',
                colour = G.C.CHIPS
            }
        elseif card.config.center.set == 'Spectral' then  G.GAME.consumeable_usage_total.spectral = G.GAME.consumeable_usage_total.spectral + 1
        end
    end
}
wintry solar
#

oh, put it in the vars return of loc vars too

#

you don#t need the bit where you're checking for a spectral

#

that does nothing

analog cypress
#
    loc_vars = function(self,info_queue,center)
        return {vars = {center.ability.extra.chips,center.ability.extra.chips * G.GAME.consumeable_usage_total.spectral}}
    end,

Like that?

Edit: not like that, gives an attempt to index a nil value error

#

And I assume I'd need another context to show that you upgraded your chips upon using a spectral card as well (context.consumables?)

shell condor
wintry solar
#

^

analog cypress
#

After the *, yeah?

#

Alright, cool. So then for the upgrade text upon using a spectral card, that would be in a different context using similar formatting to context.joker_main? Or is it all in context.joker_main?

#

Yeah, so is it like, context.consumables or something like that?

zenith plover
#

i'm trying to make an avatar mod, when trying to make a fire enhancement i am prompted with this error

[SMODS _ "src/loader.lua"]:528: [SMODS Avatar "main.lua"]:25: '}' expected (to close '{' at line 23) near 'loc_txt'```
#

this is my code in main.lua

--- STEAMODDED HEADER
--- MOD_NAME: Avatar
--- MOD_ID: Avatar
--- PREFIX: avatar
--- MOD_AUTHOR: [Koenveck]
--- MOD_DESCRIPTION: Adds avatar cards.
--- BADGE_COLOUR: 708b91
--- DEPENDENCIES: [Steamodded>=1.0.0~ALPHA-1216c]
--- VERSION: 0.0.1
--- PRIORITY: 0

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


SMODS.Atlas{
    key = 'Enhancements',
    path = 'avatar_enhanc.png',
    px = 71,
    py=95
}

SMODS.Enhancements{
    key = "fire"
    loc_txt = {
        name = 'Fire card',
        text = 'This card has been enhanced with fire'
    },
    atlas = 'Enhancements',
    pos = {x=0, y=0}
}
#

🤦‍♂️

analog cypress
#

Yeah it's easy to miss a comma, I myself got hung up by it until I noticed it

zenith plover
#

now i get a crash because i attempt to call field enhancements [a nil value] surely its another stupid error but i dont know how to fix it

analog cypress
#
 calculate = function(self,card,context)
        if context.joker_main then
            return {
                card = card,
                chip_mod = card.ability.extra.chips * G.GAME.consumeable_usage_total.spectral,
                message = '+' .. card.ability.extra.chips * G.GAME.consumeable_usage_total.spectral .. ' Chips',
                colour = G.C.CHIPS
            }
        end
        if context.using_consumeable then
            return {
                card = card,
                
            }
        end
    end

I'm getting myself confused about context.using_consumeable after looking at the wiki, does it use the same metadata as context.joker_main or is it just a boolean?

wintry solar
#

you want ```lua
if context.using_consumeable and context.consumeable.config.center.set == 'Spectral' then
-- code to do your message upgrade here
end

analog cypress
#

And inside that code is just the same return {...} as context.joker_main, correct?

bold sleet
#
    if (context.using_consumeable and context.consumeable == "The Wheel of Fortune") or context.reroll_shop then
  -- random bullshit go!
end

jelp, sh*t not working

royal ridge
#

could be context.consumeable.ability.name == "The Wheel of Fortune"

bold sleet
#

Let me check...

#

Another question: How do I setup a localization file thing?

zenith plover
wintry solar
#

its SMODS.Enhancement

#

but also the text of loc_txt should be a table

frosty dock
#

not a string

analog cypress
#

Alright, I'll leave it at there and maybe after the holidays I'll work on it a little more. This is what I've got so far

zenith plover
#

because i thought i already had them in a table and now im lost

#

oh wait never mind

south folio
#

Hey guys! I'm new to modding and coding in general, I was wondering how I could make texture packs for balatro, and it seems like i keep having errors, can anyone here help me with it?

#

^the main folder

bold sleet
bold sleet
#

. _ _ . _ _ .

frosty dock
#

rename the default.lua file in your mod's localization folder to en-us.lua and add your strings there with the corresponding keys whenever you add something and remove all your loc_txt

bold sleet
#

Alright.

south folio
bold sleet
#
SMODS.Joker { -- Midspin
  key = 'midspin',
  rarity = 2,
  cost = 6,
  atlas = "adofai-jokers-1",
  pos = { x = 4 , y = 0},
  config = { extra = { mult = 0 , mult_gain = 3 , times_fired = 0 , timse_to_fire = 0} },
  loc_vars = function(self, info_queue, card)
    return { vars = {
        card.ability.extra.mult,
        card.ability.extra.mult_gain,
        card.ability.extra.times_fired,
        card.ability.extra.times_to_fire
    } }
  end,
  calculate = function(self, card, context)
    if context.before then
      card.ability.extra.times_fired = 0
      card.ability.extra.times_to_fire = #context.full_hand
    end
    if context.repetition and card.ability.extra.times_fired < card.ability.extra.times_to_fire and context.other_card == "Joker" then
      card.ability.extra.mult = card.ability.extra.mult + card.ability.extra.mult_gain
      card.ability.extra.times_fired = card.ability.extra.times_fired + 1
      card_eval_status_text(card, 'extra', nil, nil, nil, {message = "Upgrade!"})
    end
    if context.joker_main then
      return {
        mult_mod = card.ability.extra.mult,
        message = localize { type = 'variable', key = 'a_mult', vars = { card.ability.extra.mult } }
      }
    end
  end
}
nocturne garnet
violet void
#

missing a boss disabler joker for common rarity now

nocturne garnet
#

(literally useless)

violet void
# nocturne garnet

does it work like Madness where it disables the boss whether or not a joker is destroyed

nocturne garnet
violet void
#

yes thats why I was wondering, wording should be changed to "if a joker is destroyed, disable boss blind"

#

or something

nocturne garnet
frosty dock
#

it's consistent with vanilla wording

nocturne garnet
#

i mean

#

ceremonial dagger

frosty dock
#

madness is "gain mult and destroy joker"

violet void
#

fair enough, "and disable boss blind" just looked like it happens either way

frosty dock
#

the implied rule is to do the latter only if the former succeeds

#

you can see this in other places too, e.g. Sixth Sense

#

If you have two of them, the first one destroys the card and if you still consider the hand to be a single six (even though it's already destroyed), destroying it would fail so no spectral

nocturne garnet
violet void
frosty dock
drowsy tulip
#

i'm trying to draw a card face down, what's my mistake?
draw_card(G.deck,G.hand, 0, "down", true, G.deck[1], 0.07, false, true)

shell condor
#

hey, how would one try to make a card that functions like this? im kinda stumped trying to get the last played card in a usable way, or at all frankly lol

#

i will try this in a moment and get back to you, thank you so much! in the active of learning both lua and this games codebase so im still learning the limits of what i can and cant do

#

any help is appreciated

zenith plover
#

how do i make
{C:green}#2#{} in #3#{}
everything green instead of just #2#{} (only way i can come up with is putting the {C:green} in front of every word but there must be a better way)

#

that works thanks

drowsy tulip
#

didn't work

#

nope

#

yeah i was trying to go off of that

#

it didnt work :9

#

p sure im already doing that

#

no it's drawing the cards but face up

#

ohhhh nvm its supposed to be g.deck.cards

#

nvm it's still not working what do i do help

zenith plover
#

Where does one find all these definitions?

teal estuary
#

is there anyway to force only a specific chance-based thing to have higher chances? say, if i wanted a joker to always make wheel of fortune always trigger, would that be possible?

mystic river
bold sleet
#

How do I prevent a joker from triggering when looking for card retriggers and not joker re-triggers?
(Like, the joker should trigger when a playing card is triggered and not when any given joker is triggered)

mystic river
#

duplicare uses (context.individual and context.cardarea == G.play)

bold sleet
#

huh?

mystic river
#

are you looking for all triggers or only retriggers?

bold sleet
#

Retriggers of cards only.

#

For some reason it also fires when a joker gets triggered (i.e. upgraded because of x or y reason)

mystic river
#

i would try (context.repetition and context.cardarea == G.play) then

bold sleet
#

I'll try it.

#

Nope.

#

The joker gets triggered when a joker gets upgraded

#

Which isn't supposed to happen...

#

I just need to filter out joker triggers while in the repetition phase thing.

mystic river
bold sleet
#

context.other_card maybe could work, but I don't know what values it can take.

gilded narwhal
zenith plover
#

What file can i find them in

mystic river
#

most of them

#

being able to search all the files at once will help

zenith plover
#

And how would i do that?

teal estuary
bold sleet
#

Checing, but probably it won't work...

#

*I still don't know exactly when those contexts become true

bold sleet
teal estuary
bold sleet
#

It does not work, aw

cold grotto
#

how does the naming conventions for take ownership work, the example says 'joker' as an example, but does it mean the name or j_(joker's name)

bold sleet
zenith plover
#

where can i find the code for the glass card enhancement within source code

zealous glen
#

try searching for "glass" or m_glass

#

How can alternative localizations for SMODS.Center be given? The Wiki doesn't give any examples of it anymore

wintry solar
bold sleet
wintry solar
#

Then either go and learn or pick a different effect

bold sleet
#

go learn where

zealous glen
#

reading

bold sleet
#

smooth flat brain

teal estuary
#

its unfixable 😔

gilded narwhal
#

Hey I need some help with some stuff.

How do I make a voucher give a passive effect that activates throughout your run that isn't just increasing some value?

Is there a way to change the description of a blind with take_ownership?

Is there a way for a blind to activate something on discard instead of on played hand? I'm trying to make the water make discards cost 3 discards instead of 1 on T. Red deck

zenith plover
bold sleet
gilded narwhal
# gilded narwhal Hey I need some help with some stuff. How do I make a voucher give a passive ef...

This was the patch I tried to use for the third point

[patches.pattern]
target = 'functions/state_events.lua'
pattern = '''if G.GAME.modifiers.discard_cost then
               ease_dollars(-G.GAME.modifiers.discard_cost)
           end
           ease_discard(-1)'''
position = 'at'
match_indent = true
payload = '''
if G.GAME.modifiers.discard_cost then
       ease_dollars(-G.GAME.modifiers.discard_cost)
end
if G.GAME.selected_back.effect.config.ttr_red and (G.GAME.blind.config.blind.key == bl_water and not G.GAME.blind_disabled) then
   ease_discard(-3)
else
   ease_discard(-1)
end'''```
zealous glen
#

and looking for Glass Card returns card.lua among others

shell condor
# shell condor hey, how would one try to make a card that functions like this? im kinda stumped...

okay so im dropping the rng chance to retrigger last played card because for the life of me i cant figure it out
i am trying a different gimmick that might be a better nod to the source material and ironically might be easier despite it sounding a lot harder... however, im having a hard time storing the ID of cards (as in, the "10" part of a "10 of Spades") in a readable format for the card logic. context.other_card:get_id() just gives nil so I can't do anything off of that

#

anyone know a proper way to do that?

#

for context, this is what im trying to do:

#

this line appears in the console, but only once, which tells me like, there is a value being stored, but lua doesnt know how to print it out raw so it shows nil. i think thats whats happening because its not constantly reassigning it like the code implies it would

shell condor
#

okay, ive gotten to the point that first_card is assigned to something usable, but the retrigger criteria never activates, nor does the criteria to assign second_card. any advice?

gilded narwhal
#

Hey gang where are all the G.GAME stuff defined?

#

Or are they just globals that get changed as needed and they aren't really defined anywhere

gilded narwhal
#

Gotcha

#

I see it

shell condor
#

yes hello its me

shell condor
autumn coral
#

@mellow sable how did you make it so jokers were selectable for double sided cards?

#

looking through the buyuse ref isn't showing much

#

sorry for the sudden ping, you're the only person who's done the exact thing i'm trying to my knowledge

#

ohhhh

#

nevermind sorry for bothering 😭

#

i think i found it

stiff locust
#

you're in my domain now
-# i'm not actually that good at this

shell condor
#

yeah i figured it out

#

im still learning the rules of this codebase

#

unlike yomi it is very orderly and i cant get away with nonsense kek

stiff locust
#

there's one rule and it's spelled consumeable internally, not consumable

shell condor
#

amazing

stiff locust
#

that's it

shell condor
stiff locust
#

SPLASH

#

!!

shell condor
#

SPLASH HAS A USECASE LETS GO

stiff locust
#

woah hey you cant

#

say that

shell condor
#

yeah sorry splash that was mean

stiff locust
#

you want a use case i made a whole mod just for it

#

fusing splash with every joker

#

also

shell condor
#

pfft

stiff locust
#

yomi hustle balatro mod

shell condor
#

you damn right

stiff locust
#

lemme join your party

shell condor
#

ive got ninja working already, its basically a weaker jimball but slightly different, mostly because Cryptid is a guilty pleasure for me rather than a regular driver

#

(the joke is redwave spam)

stiff locust
#

so naturally wizard should "spam" chips and mult in an orderly fashion because people think wizard is a projectile zoner

shell condor
#

someone had a really good idea for wiz actually that i currently have NO idea how id do

stiff locust
#

oh rly

shell condor
#

the idea was like Certificate but instead of a seal it adds an enhancement called "Hovering" to a random card

stiff locust
#

what's it do

gilded narwhal
shell condor
#

and Hovering cards ignore restrictions like boss blinds that debuff suits

#

or the pillar

stiff locust
#

oh that's easy

shell condor
#

oh shit real?

stiff locust
#

i could probably do that yeah

shell condor
#

👀 i mean... i wont say no but also tell me the process while youre at it so i can learn

stiff locust
#

okay you're gonna wanna make a mod thread probably

#

for your mod

shell condor
#

makes sense, gimme a sec

stiff locust
#

and we use github commonly around here

shell condor
#

sure

stiff locust
#

you dont have to use a license but your code has to be open and viewable to others

shell condor
#

yeah that makes sense

#

gimme 5 minutes then

stiff locust
#

alriight

gilded narwhal
#

Hey guys why doesn't this work?

stiff locust
#

why are you lovely patching it and taking ownership of it

#

wouldn't you only need to take ownership of it to change how it works?

zenith plover
#

How would i make a enhancement that turns into another enhancement when used, i made like everything and i assume i have to do something in the calculate function but i cant find any examples or documentation of this already being done before

gilded narwhal
#

Although

#

Hold on

karmic kelp
#

Is there a checklist to verify if a mod should load or not? A mod I was working on is no longer even showing up in the in-game menu for some reason, and I can't figure out why...

stiff locust
#

I wish I could say I knew why

#

but one day it just

#

stopped happening

#

so maybe update steamodded, i don't know

karmic kelp
#

I updated it yesterday I think

stiff locust
#

update it again

karmic kelp
#

didn't do it unfortunately

#

now on 1.0.0~ALPHA-1224b-STEAMODDED

wintry solar
#

Are you using a header or json?

karmic kelp
#

every other mod I've got active (JokerDisplay, Card Sleeves, DebugPlus, Talisman, Drafting, Blueprint, Cryptid) seem to be working

#

json

#

does it need a specific name?

wintry solar
#

No

#

Can you share it?

karmic kelp
#
{
    "id": "rift_packs",
    "name": "Rift Packs",
    "display_name": "Packs from the Rift",
    "author": ["rft50", "Rithaniel"],
    "description": "",
    "prefix": "rift",
    "main_file": "main.lua",
    "priority": 0,
    "badge_colour": "",
    "badge_text_colour": "",
    "version": "0.0.1",
    "dependencies": [
        {
            "id": "Steamodded"
        }
    ]
}
wintry solar
#

The dependencies are formatted incorrectly

gilded narwhal
#

Cool or nah

karmic kelp
#

what's invalid about the dependency?

hardy viper
# karmic kelp what's invalid about the dependency?
"dependencies": [
        "Steamodded (>=1.*)", // Allows any version past a 1.0.0 stable version (but disallows 1.0.0 beta versions)
        "Lovely (>=0.6)", // Allows all versions past 0.6.0 stable, including future beta versions and major version breaks
        "SomeMod (==1.0.*)", // Allows all versions past 1.0.0 stable that are 1.0.x (1.1 and later are disallowed)
        "SomeOtherMod (==1.0.0~)", // Allows 1.0.0 versions of any revision, beta or not.
        "Balatro (==1.0.1m)", // Allows only the specified version and revision.
        "OneMoreMod (>>1.0~g) (<<2)", // << and >> are used for versions strictly less/greater than the specified one.
        "IRanOutOfIdeas (==1.*~)", // Combination of wildcard symbols. All 1.x versions are allowed, including beta.
        "Talisman | TalismanReplacement" // Multiple different mods can be used to fulfill this dependency. May want to use `provides` instead
    ], // ! All mods in the list must be installed and loaded (and must fulfill version requirements), else this mod will not load.
karmic kelp
#

ah that's why... when I started poking at this they were formatted differently

#

yup that was it, thanks!

gilded narwhal
#

Hey does anyone know how to change the description of a blind? I've tried loc_vars and that doesn't work

mystic river
#
GitHub

A mod for Balatro that adds a bunch of things I found amusing. - wingedcatgirl/MintysSillyMod

GitHub

A mod for Balatro that adds a bunch of things I found amusing. - wingedcatgirl/MintysSillyMod

#

... also loc_txt is a different thing from loc_vars

wintry solar
#

You can still use the keys in loc vars

gilded narwhal
#

I mean this doesn't work

#

Wait is it supposed to be bl_water instead of just water

karmic kelp
#

what do the primary and secondary colors of a pack mean?

mystic river
#

i would test that

gilded narwhal
#

Nah that still doesn't work

#

The reason I don't think it's possible is because normally key is the thing you use to replace the desc

#

Unless

#

I do return vars = {key = 'bl_water_red'} or smth like that

frosty dock
#

if I put it like that, it's probably unsupported or I forgot

shell condor
#

how would i make a joker destroy all scored cards of a specific enhancement after scoring has finished?

teal estuary
#

i’d presume take what vampire does, and replace its Xmult function with how you would delete a card

#

im not sure on the code of it, but i can say that

shell condor
#

right... where can i find how vampire works then

#

like is there source code available

teal estuary
#

card.lua, search for vampire

elder vapor
#

you have to decompile the source code

#

its easy

shell condor
#

assumed so, just havent found the method to do it somehow

teal estuary
elder vapor
#

(literally just copy the Balatro.exe, zip it, and unzip it somewhere)

shell condor
#

...seriously?

#

thats it?