#💻・modding-dev

1 messages · Page 241 of 1

deft niche
#

no dwdw

unkempt thicket
#

It's not released yet, but i'll be part of familiar

deft niche
#

it's that in the source code I can't find it, so I'm assuming it's a mod only thing

noble schooner
#

(pleasedon'tsmitemeforaskingthis)
Anyone know any good tutorials for learning lua?

hushed field
neat plover
#

IT ACTUALLY TRIGGERED YIIPPPEEEE§§!!!!§§ but know i get this error after playing a hand

noble schooner
#

NOOO

hushed field
#

(I don't know of any good tutorials, but it's an entirely reasonable and worthwhile question to ask 😛 )

noble schooner
#

is vaporized

#

o, oki

agile thistle
hushed field
agile thistle
#

it sorta has the assumption you know a little programming background though

hushed field
hushed field
deft niche
#

what does calculate_effect do, roughly? so I can get a better idea of what I'm looking for

hushed field
#

I haven't ever used it I don't think 😬

red flower
neat plover
red flower
#

so for a message you do SMODS.calculate_effect({message = "hi"}, card)

hushed field
deft niche
deft niche
hushed field
red flower
deft niche
red flower
#

you haven't truly learned until the game has crashed on you 100 times

hushed field
#

It took me 2 days to get abductions to work and I still don't understand exactly why it didn't work in my earlier implementations 😛

deft niche
#

for example, how would I go about putting this inside a calculate_effect? wouldn't it defeat the point of having it be an event in the first place?

hard flume
neat plover
#

it is working now, but its triggering every turn

red flower
next timber
#

what the, how come for gold seal the ability.seal table is empty

hallow slate
#

How do I hide custom suits until they have been discovered in game?

next timber
deft niche
next timber
#

i guess i gotta hardcode gold seal support

deft niche
#

unless I'm misinterpreting

deft niche
# red flower wdym

like, the "chaos" message and the modifier changes would happen in the same frame as the card scoring its chips

red flower
#

events are queued and don't happen at the same time

deft niche
#

oh ok

#

I'll try then

next timber
#

im gonna. not include money in the black hole card

#

at least for now

deft niche
#

because here it does them at the same time (except the text popup)

red flower
#

i mean, try it maybe I'm wrong

#

I was just following up on what Ice said so I don't know the full context of what was discussed before

deft niche
#

the animations just happen at the same time

#

and the joker doesn't even juice up ahah

noble schooner
#

I'm just gonna smile and wave for now-

gentle rain
#

hypothetically could you just divide chips by 9999 and have it round up to 1 to achieve setting it to 1 chip

#

doesnt the flint divide and round up

deft niche
#

i tried adding a 1 second delay to the event but it just delays the text too

hushed field
#

i definitely used it before but I'm not finding it my code, what's the proper way to get the key for a card?

deft niche
#

and if I try to put the text before the event it crashes

hushed field
#

center.config.key, I remembered

noble schooner
#

me, having opened ModdedVanilla.lua and is now trying to modify the Perkeo example but doesn't know where the hell any of these keys are stored:

red flower
deft niche
#

like this?

noble schooner
#

the context.ending_shop and e_negative
where would I find a list of those

fallen osprey
red flower
#
return {
   message = ...,
   colour = ...,
   func = function()
       G.E_MANAGER:add_event(...)
   end
}
#

@deft niche

fallen osprey
#

oh sorry didnt realize somethin was goin on

rapid stag
#

does anyone have any insight as to why my take ownership isn't working as it should? cirDerp

red flower
red flower
#

how many of aure's cat can fit on the screen

deft niche
#

thank you so much

fallen osprey
red flower
fallen osprey
#

(i god the base code from a tutorial so 🤷‍♂️ )

#

ok

red flower
#

also use the joker's key instead of the name

deft niche
#

I'm still trying to understand why it works
like, it needs to execute the return function all at once, so it requires to wait until the text appears before changing the cards' properties???

#

or something

red flower
thorn ridge
hushed field
# thorn ridge

make the counter something you're storing on the card, not a global!

#

so in the confix.extra

#

like any other variable you want to keep consistent!

thorn ridge
#

tht makes sense

orchid thunder
thorn ridge
hushed field
#

yup 😄

stiff locust
#

alright chat how do I make a soul-like consumable

fallen osprey
#

Another thing im trying to fix, How do I make this display correctly

red flower
#

it's not +:mult it's just {C:mult}

fallen osprey
#

ok

#

thank you

#

you are a godsend istg

stiff locust
#

also is there a context.other_joker for consumables or nah

red flower
#

other_consumable

#

or consumeable one of the 2

thorn ridge
# hushed field yup 😄

The card won't trigger after 6 hands or take away money. The money part I get I did wrong. but im not sure why its not activating

hushed field
hushed field
stiff locust
#

right click and press format document and itll fix indents for you

hushed field
#

you're returning a value, but the game doesn't know what it is

fallen osprey
red flower
#

what's the code?

formal parrot
#

Just make it one

#

Or zero

fallen osprey
fallen osprey
dusty void
#

you need to make a loc_vars function to tell it what the values are

deft niche
#

sorry to bother yet again but I still don't understand how to give a joker class both the legendary background and the legendary's png

stiff locust
#

soul_pos for the front layer

#

assign a location in spritesheet the same as when you declare the pos of the regular joker sprite

chrome widget
#

I have no mods enabled except SMODS/Lovely, and I encounterd a regular Overstock in the shop after having already redeemed one?

shut crest
#

Can someone help me on This bug

#

Wrong chat

deft niche
#

ok now I got it I feel stupid

#

thanks

#

so it needs to be double the normal joker sprite in width?

stiff locust
#

no

#

why would it have to be

#

what

deft niche
#

ok then I don't get it

stiff locust
#

there is a separate sprite position on the atlas for the second layer

deft niche
#

how can the sprite contain both bg and character if i make it normal sized

stiff locust
zealous glen
chrome widget
#

Just as usual, bought it the ante just prior

deft niche
stiff locust
#

no that's correct

#

the second layer is not in the same position as the first layer

#

therefore the second layer is in a separate position

deft niche
#

oh ok
then we were both saying the same thing without understanding each other

zealous glen
chrome widget
#

I'm not certain this is a vanilla bug though

stiff locust
#

is there a way to override the badge for a consumable's type

zealous glen
stiff locust
#

i wanna give a particular set of consumables a different badge color and name

#

but i don't wanna have to make an entire new consumable type for that

zealous glen
#

you can probably remove specific Badges

stiff locust
#

well then how do I do that

#

is there any mod that does that

hushed field
zealous glen
#

I used to add a new Badge

#

but I forgot how

stiff locust
hushed field
#

lm check, I think I use it on some stickers

#

no wait, stickers have hide_badge ofc

stiff locust
#

well if i can hide the original badge and add a new one that works too

hushed field
#

set_card_type_badge = function(self, card, badges)
badges[#badges+1] = create_badge(localize('k_spell'), G.C.PURPLE, G.C.WHITE, 1.2 )
end,

is how I use it on a custom game object, but that's directly at the source. I suspect that if you use it on a specific item, it'd overrule it and not create that badge

#

it would also allow you to just kick things from the badges table, as it's exposed in that function

stiff locust
#

i will give it a shot

thorn ridge
#

How would I go about taking away money from the player

stiff locust
#

if you start it with badges[#badges+1]

#

couldn't you just do badges[1] to override the first badge

hushed field
#

yes

stiff locust
#

yeah okay this should work

hushed field
#

that's what I meant with kicking it, haha

stiff locust
#

oh isee

stiff locust
stiff locust
hushed field
#

😄

next timber
#

all current content for boplatro (name subject to change):

#

chat do i make the asbestos enhancement or the big edition next

dusty void
#

big edition sounds funny

next timber
#

asbestos enhancement: x3 mult, decrease by x0.1 every card played (can reach x0)
big edition: takes up 2 slots, all values doubled

minor furnace
#

how do I import a file into main?

quartz ravine
#

Lol, somehwo my legendary card has no foreground!

minor furnace
#

I am finally breaking my content into different files

red flower
minor furnace
#

thank you kindly

next timber
#

what language are shaders written in?

quartz ravine
thorn ridge
#

How do I minus from the players chips, but not like the total they have scored so far.

agile thistle
quartz ravine
#

It has a full longer name too, let me look it up

OpenGL has its own shading language: GLSL (openGL Shading Language). GLSL can be a little overwhelming and there are not alot of really basic 'get to know' GLSL out there, this article will help you grasp some of the fundamental concepts of this wonderfull language.

#

sorry

#

anyone have a working example of how to do the floating effect like Yorick and co have? I didn't see it listed in the smodded docs!

zealous glen
#

it's there

zealous glen
thorn ridge
zealous glen
#

no

#

Where is the effect coming from

quartz ravine
latent portal
#

hi chat

zealous glen
#

hello sylveon

thorn ridge
zealous glen
quartz ravine
zealous glen
#

I think returning {chips = …} should work most of the time

zealous glen
latent portal
#

does anyone know how to reference the description for negative consumables? i tried but it keeps crashing, and G.P_CENTERS.e_negative just puts the description of negative jokers

zealous glen
#

there is another key for negative consumeables

tardy wind
zealous glen
#

but Idk if you can access directy

zealous glen
latent portal
zealous glen
latent portal
tardy wind
#

ive never went over green stake

latent portal
#

it crashes

tardy wind
#

so perkeo i have never seen

zealous glen
thorn ridge
zealous glen
red flower
cursive ocean
#

Is there a way to do something like

SMODS.Joker:take_ownership('baron', {
    ...
    doSomething = function (self)
        print("hello cruel world")
        return true
    end
})

and then in another function do

if self.ability.name == 'Baron' then
  self.doSomething()

the function assignment works/doesnt throw any errors, and there is other code that currently runs correctly in the if statement

it throws

 attempt to call field 'doSomething'
thorn ridge
#

tbh

zealous glen
thorn ridge
zealous glen
latent portal
thorn ridge
# zealous glen

I was looking at the message you replied to, this was after it

red flower
zealous glen
red flower
chrome widget
#

Uhh curiosity, I'm working on UI for locked/undiscovered cards, and for whatever reason, my general mod badge doesn't show up on the undiscovered/locked tooltip, but the custom badges I added in addition to the main mod badge do. How do I enable the mod badge on the former or disable the custom badge on the latter?

zealous glen
thorn ridge
zealous glen
#

syntax error

#

You forgot something

chrome widget
#

I'm just more confused why I'd have to manually add the main mod badge back

zealous glen
#

a } or an end etc.

zealous glen
#

not that you should show the main badge

#

but whether that should be the logic is a different topic

thorn ridge
#

But im not noticing where

chrome widget
#

I'm thinking I'd prefer to show the main mod badge

zealous glen
chrome widget
#

Since the groups of badges for undiscovered cards makes collection a little more exciting (see: I've completed this group!!)

red flower
#

ok i went for the crazy route of adding a chain of extra to the return of every calculate

#

lets see if it works

zealous glen
deft niche
#

quick question, what's the {C:color}{} for light gray (the color scaling jokers have for text in brackets)

red flower
#

inactive

deft niche
#

thanks

noble schooner
#

I set up the json metadata for my mod but steamodded still isn't detecting it

#

nvm, I'm stupid lol

#

I forgot to rename my .lua file to the correct name 😭

#

...nevermind again, that didn't fix it

chrome widget
#

Whelp, I managed to force it by the same way I'm doing the other custom badges, which is technically not the best solution, but it is easier than patching the code

#

Seems SMODS doesn't do its normal badge code if it's undiscovered

#

But my custom ones don't check for it shrug

thorn ridge
noble schooner
zealous glen
noble schooner
#

Does it not like the version thingy?

thorn ridge
red flower
zealous glen
noble schooner
zealous glen
# thorn ridge

I didn't ask what Chips are, I asked how much you want to reduce it by

zealous glen
noble schooner
#

actually, wait a minute

#

is there a mod limit on Balatro?

#

because I have 30 mods but only 28 are loading

red flower
#

i dont think so

thorn ridge
zealous glen
#

you put chips-50

noble schooner
#

nope, that isn't it then

thorn ridge
zealous glen
#

as I said

noble schooner
#

wait wait wait, do I need a copy of lovely.toml in my mod's folder, or is that optional?

red flower
zealous glen
#

you didn't put -50

#

you put chips-50

zealous glen
#

write chips = -50

#

inside the brackets

noble schooner
#

OHH

zealous glen
#

that are returned

noble schooner
#

does the id have to be lowercase?

red flower
#

are you sure the problem is the json

noble schooner
#

I'm brand new to modding so I have no clue lol

#

er, brand new to making mods

zealous glen
noble schooner
#

my mod isn't loading

#

at all

zealous glen
#

does it detect your mod

noble schooner
#

no

zealous glen
#

do you have python

noble schooner
#

yep

#

3.12 and 3.13

#

should I do something on python?

zealous glen
#

go to the Steamodded folder and run tk_debug whatever .py

minor furnace
#

is there an smods parameter for custom undiscovered consumable sprites?

zealous glen
#

then open the game

hushed field
#

there's undiscoveredSprite, i think. lm see how i did it for confections

#

yeah, it's just a this. It will have the standard circle with a question mark in it, though

SMODS.UndiscoveredSprite {
key = "confection",
atlas = "kino_confections",
pos = {x = 0, y = 3}
}

noble schooner
zealous glen
noble schooner
#

I swear to god if it's the comma

zealous glen
#

there's threes of us! threes!

noble schooner
#

nope, wasn't the comma

#

WAIT A MINUTE

#

it complains that I have a comma on line 15 col 20, then complains that I should have a comma there when I remove it??

#

make up your damn mind 😭

#

OHHH

#

I forgot the brackets

#

OKAY THE GAME CRASHED, IT DETECTS THE MOD

thorn ridge
#

Where would I start looking if I wanted to setup a joker that only activates when you have a certain other joker.

chrome widget
#

Most effects based on having a speific joker would now use the condition if next(SMODS.find_card([key])) then

#

In vanilla, it's if next(find_joker([name])) then

hushed field
#

with _joker just being what I named my variable in the loop this is in

red flower
deft niche
#

it's giving me a nil error at this line

#

i've tried changing the syntax a couple times but same thing happens

minor furnace
noble schooner
hushed field
noble schooner
#

(also yes I'm using ModdedVanilla.lua as a base)

minor furnace
#

thanks! I'll see if I can dig around for it in your mod files then (if I can find your mod)

frosty dock
deft niche
noble schooner
#

aaand now it's not detecting my atlas

#

sigh

deft niche
#

oki

#

do I keep ability?

frosty dock
#

yeah

#

just replace self with card within the entire function

#

(also remove card = self)

noble schooner
#

fym failed to collect file data for Atlas GLX_Galaxia 😭

stiff locust
#

getting a thread error when trying to play a custom sound

next timber
#

trying and failing horribly to make a shader

deft niche
#

thanks fir your help btw

stiff locust
#

playing it with play_sound() properly and defined it properly but when i try to play the sound it just dies

frosty dock
#

replace all the others

noble schooner
frosty dock
noble schooner
#

oh

next timber
#

ok so the example ionized shader just. doesn't work anymore? fun

frosty dock
#

you have pixel smoothing on, so it looks for the 2x

frosty dock
stiff locust
noble schooner
#

HOLY CRAP IT BOOTED

stiff locust
#

i did the sound the same way i did my last custom sound and the other one works

frosty dock
stiff locust
#

the sound declaration i'm pretty sure i got right

frosty dock
stiff locust
#
SMODS.Sound({
    key = "probability_st",
    path = "probability.ogg"
})
#

and i add the mod prefix before the sound key when playing it

thorn ridge
stiff locust
#

because that's how it works

#

and it's in the sounds folder

frosty dock
stiff locust
#

yeah my other custom sound plays fine

#

idk what's up with this one

frosty dock
#

well something went wrong with getting the data of the sound

#

idk what would cause that other than incorrect path or malformed file

stiff locust
#

it might be the file? but idk how i'd check that

frosty dock
#

can i see the sounds folder

stiff locust
#

it looks fine to me and hasnt had trouble in any programs ive opened it in

thorn ridge
frosty dock
#

i'm just lazy

stiff locust
#

this is the only file in the sounds folder and the sounds folder is in the right place

frosty dock
#

that being inside assets

hushed field
minor furnace
stiff locust
#

right, yeah

thorn ridge
hushed field
stiff locust
#

totally didn't leave the sounds folder in the mod root or anything

#

haha

frosty dock
#

😭

minor furnace
#

well, I'm nearly there

noble schooner
#

why does this happen whenever I end the round with my joker

thorn ridge
frosty dock
noble schooner
#

?

frosty dock
#

but also you're developing on old calc ...?

noble schooner
#

ah right, forgot I was on old calc

#

I play on old calc because Jen's Almanac doesn't support new calc yet

frosty dock
#

on new calc, the correct check for a single end of round trigger is context.end_of_round and context.main_eval

next timber
#

ok so the example mod for shaders just does not seem to work anymore unless ive royally fucked it somehow. i dont suppose anybody happens to have a perfectly commented shader with full explanations on hand

frosty dock
noble schooner
#

I'll switch to new calc

red flower
noble schooner
#

so do I reinstall both lovely and smods or just smods?

paper zealot
# noble schooner I'll switch to new calc

If you create a copy of your Balatro installation somewhere else and rename the exe, you can have two entirely independent versions using different lovely, Steamodded, mods and saves

#

The folder in appdata uses the name of the exe

frosty dock
minor furnace
#

clearly I am missing a filed here of some sort

    key = "Zodiac",
    primary_colour = HEX("C61CBB"),
    secondary_colour = HEX("96108D"),
    loc_text = {
        name = "Zodiac",
        collection = "Zodiac Cards"
    },
    collection_row = {7, 2},
    shop_rate = 2,
    default = "c_reverse_aquarius",
}```
next timber
#

lol

minor furnace
#

isn't the name in loc_txt?

formal parrot
#

Damn you named you consumable error

#

Who does that

minor furnace
#

trueee

#

I got a little silly

formal parrot
#

LMFAO

minor furnace
#

sorry I eated the name

formal parrot
#

Don’t you need a “,” after collection “zoldiac cards”

frosty dock
minor furnace
#

oh shoot

minor furnace
frosty dock
#

I'll trade the e for an s at the end of collection_row

minor furnace
#

yeah that would do it

#

we're back in business

#

who would have thought spelling would be this hard

hushed field
#

hahaha i love that it's zodiac cards

frosty dock
#

how many zodiac sets does that make

minor furnace
#

idk, I haven't even checked to see if others exist

formal parrot
#

Yet?

zealous glen
minor furnace
formal parrot
#

How many zodiac signs there are ?

noble schooner
#

alright, got newcalc working

next timber
#

ice please learn shaders so i can steal more code from kino 🙏

minor furnace
hushed field
#

I literally don't understand anything about shaders ❤️

next timber
#

neither do i. which sucks when the error for a faulty shader is a big fat wall of nonsense

frosty dock
#

that makes 99.96% of us

minor furnace
#

top 10 reasons to never make a shader

next timber
#

i just want my joker to be big 😭

frosty dock
#

98% can't read, and 98% of those who can read don't understand shader code

next timber
#

literally thats all i need this shader to do. i need it to make the joker bigger

hushed field
#

Haha, I want to get into them, because I want some flair to add to abduction and spellcasting, but they I don't even know how to get started on shaders

minor furnace
#

shaders aren't real, they can't hurt you

next timber
#

ok what are some good recent mods with shaders i can rummage through the code of

#

cause im not entirely sure the example mod actually. works

noble schooner
#

AYY, it works!

hushed field
#

Aiko's been playing around with them, that's the only thing I know of that's recent

deft niche
#

less of a coding question and more of a logic question. The joker works as intended, except that it still gains 1 mult after being reset...

#

i don't understand what's making it do that

zealous glen
#

-# including Paperback's Dichrome

#

-# although they put another shader on top of mine

hushed field
#

Wait, you're hiding shader knowledge in that noggin, knuckles?

zealous glen
#

no

#

it was all from stupid's head

#

I just did the lobotomy

hushed field
#

Hahaha

zealous glen
#

well, myst did L corp not me

#

-# balatrojoker

zealous glen
#

"Who knows shader code?"
"stupid"
"well F you too buddy I'm just asking a question"

frosty dock
#

"stupxd"

deft niche
#

i was making it more complicated for myself than it needed to be

#

btw, every time I tweak anything in my code the required number of "end" changes, it's making me insane

#

lua really is the quantum language

next timber
#

ok i have stolen the fluorescent shader code from bunco and it is. not working

#

the shader does not display in the collection menu and after a few seconds it crashed

rapid stag
#

is there a way i can get the name of the currently active skin in 'customize deck'? cirThink

#

this text value at the bottom, basically

scarlet thorn
#

I am attempting to make a 1-to-1 copy of the "Raised Fist" joker from vanilla, however, once the blind is won, the round never ends. I am able to use all menus, I see no errors in console. I can provide the code used, but it is just a copy from vanilla, not context.end_of_round added.

quartz ravine
#

I have no idea how this fits into my mods theme now but I love it

deft niche
next timber
quartz ravine
scarlet thorn
next timber
#

man boplatro_big_shader is fun to say

deft niche
frosty dock
rapid stag
frosty dock
#

the former works but it makes you need an extra end

deft niche
next timber
#

its a funny joker effect i like it lol

deft niche
#

thanks

rapid stag
#

would also like some insight, if anyone has any, as to why my steamodded take_ownership() isn't working as intended cirLost

next timber
#

is it safe to have two objects of different classes with the same key? i'd presume not but idk maybe the prefixes save it or smth
for example, can i have an Edition with the key "big" and then have the corresponding shader's key also be "big"

#

wait bunco does it so i presume its ok

frosty dock
next timber
#

that almost unnerves me

frosty dock
#

centers are stored in a shared table but have different class prefixes, and anything else usually has its own map

stoic sedge
#

^ this

#

It's generally fine to do that unless you like, have some really odd edge case

next timber
#

ok the shader's working, now i just gut most of the effect stuff and make the joker 2x bigger lol

scarlet thorn
frosty dock
#

I say almost because of consumables, they all share a class prefix

#

So you can't have a tarot and a planet with the same key

#

however they're not fundamentally different objects either

noble schooner
gentle rain
#

uhm. how do you type out an apostrophe without it being syntax

#

lmao

gentle rain
#

ah

#

ty

mental nacelle
#

you could also use speech marks instead of apostrophes

gentle rain
# gentle rain

would doing return math.max(math.floor(hand_chips = 1), 1) work?

quartz ravine
gentle rain
gentle rain
faint yacht
#

math.max, yes.

gentle rain
#

right

mental nacelle
gentle rain
#

ohhh

#

yeah i guess but idk i use apostrophes

noble schooner
next timber
#

i am indeed struggling though

fallen osprey
#

im having an issue where the +Chips value is copying the +Mult, Im assuming its because the +#1# being the same for the two but i dont know

quartz ravine
#

Here’s some thing weird

I tried making a card partially see through and found you i could not make it transparent with a shader

The cards background texture was still there

next timber
#

PROGRESS

#

THE TEXUTRE IS BIG BUT ITS BEING CROPPED

mental nacelle
next timber
noble schooner
#

sigh

mental nacelle
#

it's ok, all part of learning

noble schooner
#

trying to find this stupid syntax error that Balatro is saying it's finding

#

despite the fact that I can't find it anywhere when I open the file in notepad++

#

oh

#

I had an extra end

#

anyone know where my save file is stored?

#

I wanna back it up because the card I made works like Gros Michel

quartz ravine
noble schooner
noble schooner
next timber
fallen osprey
quartz ravine
next timber
#

would i put the code in on_apply and on_load?

noble schooner
mental nacelle
#

ohhh i see why

#

(sorry forgot to reply to someone)

mental nacelle
fallen osprey
#

ohhhhh

#

ok

noble schooner
#

ohhh, I forgot about that LOL

mental nacelle
#

np

noble schooner
#

aaand it still crashed :///

#

oh, I need game.probability

#

IT STILL CRASHED WTF

mental nacelle
#

gimme a sec to read through the file you sent

noble schooner
#

new file btw

mental nacelle
#

could you put a #3# in your joker text and screenshot what shows up in game?

#

(that refers to your variable that should be card.ability.extra.odds, if it is nil then it should say

mental nacelle
#

wait does it crash on loading the game?

noble schooner
#

Nope

#

It crashes upon the end of the round

mental nacelle
#

could you show me the description of the joker (with the #3#)

#

in-game, i mean

noble schooner
#

1 in nil

#

I don't know why it's nil, I defined odds = 4

#

is it possible that it's a bug with smods?

tardy wind
mental nacelle
#

i have no idea, actually

noble schooner
tardy wind
#

Would it be possible to share the code snippets for the loc_vars

mental nacelle
#

this is a very patchy way of fixing it but if worst comes to worst just stick a card.ability.extra.odds = 4 before you check for it

tardy wind
#

rather than full file

fallen osprey
#

how can I make this happen? Also, for future reference, is there somewhere I can look to find what to put together because I dont want to be dependent on y'alls help

noble schooner
thorn ridge
#

How do I detect certain suites of playing cards and echancements in my current hand.
Im making a joker that will give a x3 multiplier if you have atleast 3 enchanced clubs in your hand.

tardy wind
#

dos card.ability.extra.odds have a value at this point ?

#

like in your config, how do you initialize the variable

noble schooner
#

I just did odds = 4

tardy wind
#

paste config object

noble schooner
#

config = {extra = {chips = 0, chip_gain = 1, odds = 4}},

#

given that chips = 0 and chip_gain = 1 work, I'd assume it'd just set card.ability.extra.odds to 4

tardy wind
#

yes

noble schooner
#

mhm

#

so why isn't it doing that

mental nacelle
tardy wind
#

gimme a min ill take a look once i get to the computer

tardy wind
#

or i wonder if theres a context for boos blind defeated

mental nacelle
thorn ridge
#

I know how to iterate through stuff but how do I get the hand and detect suites/enchancements

stiff locust
#

card:is_suit('Hearts') for suit

#

there's a few ways to get the enhancements

gentle rain
stiff locust
thorn ridge
stiff locust
# thorn ridge like?

if v.config.center == G.P_CENTERS.m_steel then
is how i do it, that one does it for steel

gentle rain
#

so i could just do math.max(1)?

stiff locust
#

math.max(1) is the same as 1

stiff locust
gentle rain
stiff locust
#

so like G.P.CENTERS["m_splat_mammalized"] for the mammalised cards from splatro

#

if it's a modded enhancement it needs the mod prefix

thorn ridge
stiff locust
#

where v is the card to check

next timber
#

damn it doesn't look like i'm gonna be able to make the big edition 😔 i literally just cannot find where a joker stores its display size, if it does at all

gentle rain
#

i thought math.max was the command that set what the chips or mult was :P

stiff locust
#

it chooses the largest number within its arguments

#

math.min also exists for the opposite, chooses smallest within its arguments

next timber
#

I FIGURED OUT HOW TO SCALE JOKERS

#

IT LOOKS GOOFY AF AND IS ALMOST DEFINITELY NOT WHAT YOURE MEANT TO DO

#

i feel like something as tucked away as card.role.draw_major.T.scale is something i should definitely not be messing with, but we'll just see how it goes

thorn ridge
next timber
#

but now im realising. is it actually possible to 'double all values' on a joker

stiff locust
#

do that

#

the index/value can be swapped with anything, a lot of people use i, v but i prefer writing them out fully

gentle rain
#

was told to put hand_chips before return

thorn ridge
#

aswell?

stiff locust
#

both need to be present but the variables can be anything

#

index is the numbered index you are checking
value is the current thing you are checking

thorn ridge
#

what do i put inplce of value

noble schooner
stiff locust
#

anything

#

whatever you want

stiff locust
thorn ridge
fallen osprey
#

Of course in the middle of bug fixing my power goes out

stiff locust
#

but you should probably keep it as i,v or index,value for readability

#

again value is the current thing in the loop so when you're checking cards here use value:is_suit("Hearts") for example

thorn ridge
#

still so confused

stiff locust
#

i'll break it down

noble schooner
# noble schooner

hey, marie, you seem like you know what you're doing
do you know why odds is nil even though I very clearly set it to 4-?

thorn ridge
#

Is it skipping the need for my if statement

stiff locust
#

i'll get to you

thorn ridge
#

So its just checking for the value on each one automitcally

tardy wind
noble schooner
#

...sigh

#

pulls up github issues page for smods

tardy wind
stiff locust
# thorn ridge still so confused

for index, value in ipairs(G.play.cards) do
will go through every card in G.play.cards in index order from left to right
G.play.cards is an indexed list, so you can refer to values in it with G.play.cards[1], G.play.cards[2], G.play.cards[3], which the loop iterates through with index
value is equal to G.play.cards[index], which is the current card being checked

noble schooner
stiff locust
noble schooner
#

the crash still happens either way, it seems to be unrelated to the crash

stiff locust
#

the or 1 prevents it from returning nil, it instead returns 1 if that value isn't there

thorn ridge
stiff locust
# noble schooner

add and context.main_eval to make the end of round only trigger once

#

unrelated bug but a bug nonetheless

noble schooner
#

that bug's actually present in the example mod, funnily enough

#

it's what broke the first function lol

stiff locust
#

that is because the example mod was made before that was a problem

noble schooner
#

ah, fair

stiff locust
#

and before we had context.main_eval to fix it

stiff locust
#

also you need to return the xmult at the end

hard flume
#

Yo :3

formal parrot
#

Hello

stiff locust
stiff locust
#

right click and press Format Document to fix indents

#

it doesn't change the functionality of the code so you don't have to

#

but it makes your code easier to read

thorn ridge
#

aight

hard flume
noble schooner
#

hmm, so odds = 4 seems to be the culprit
if I manually set line 60 (the crashing line) to if pseudorandom('andromeda0') < G.GAME.probabilities.normal/(card.ability.extra.odds or 4) then, the description still says 1 in nil but the actual function itself still works

thorn ridge
noble schooner
#

though actually the message doesn't appear properly

stiff locust
thorn ridge
#

This is the full code.

stiff locust
#

then hold on

noble schooner
stiff locust
#

oh also probabilities should use {C:green}

noble schooner
#

the card.ability.extra.odds is still nil

stiff locust
noble schooner
#

a w h a t

stiff locust
#

unrelated bug but bug nonetheless

stiff locust
#

remove the underscore from the config one

stiff locust
noble schooner
#

ah

#

so how would I go about doing that

stiff locust
#

it's like your calculate function

#

doesn't go inside any functions, just goes in the joker

noble schooner
#

oh, oki

stiff locust
#

here's an example of one from my rainstorm in tsunami

set_ability = function(self, card, initial, delay_sprites)
        card.ability.extra.nines = 0
        if G.playing_cards then
            for k, v in pairs(G.playing_cards) do
                if v:get_id() == 9 then card.ability.extra.nines = card.ability.extra.nines + card.ability.extra.moneys end
            end
        end
    end,
#

you need to end it with end, and the comma is VERY important it breaks otherwise

noble schooner
#

so should the first line be set_ability = function(self, card, initial) in this case?

stiff locust
#

no you still need delay_sprites

#

the first line should not ever be changed

#

even if you don't use those values

#

everything between the first and last line you can do whatever you want in there

noble schooner
#

alright, I got

  card.ability.extra.odds = 4
  end,```
stiff locust
#

yep that should do it

noble schooner
#

alrighty

stiff locust
#

i don't know why your value would be nil and someone more experienced can probably explain why

thorn ridge
stiff locust
#

but that should solve the problem indirectly

stiff locust
noble schooner
#

lemme try putting it above the text

stiff locust
#

and just write 4 instead of card.ability.extra.odds being used

noble schooner
#

fair

#

I might have to do that

stiff locust
#

this will make it incompatible with value modification, like cryptid's oil lamp and betmma's gameplay update

noble schooner
#

yeah, looks like I'll have to do that

#

that's a weird bug though

stiff locust
#

if you see john aure smods around he'll probably know what to do

#

he's like the god of smods

noble schooner
#

oh yeah, he was helping me earlier

thorn ridge
#

One last question, How do I make a joker make specific consumbable,

#

Like a certain tarot card

stiff locust
#

balatro is open source modding

#

go find something that does what you wanna do and borrow their homework

noble schooner
#

"Yo, what'd you get for number 8?"

hard flume
#

Hmm... How do I make it so a booster pack ALWAYS appears after a boss blind?

stiff locust
#

try looking at riff raft's code

#

there's a deck in there that forces a void pack to spawn in every shop

#

that's similar to what you wanna do

hard flume
#

Oki, oki got it.

thorn ridge
stiff locust
# thorn ridge any tips of where to look for what i want

cryptid has almost everything but its code can be kinda confusing to read
as a more simple example for creating a specific consumable, MoreFluff has a joker called Bad Legal Defense which creates a Death tarot when boss blind is selected

gentle rain
#

so how would i be able to reduce the chips before scoring then?

stiff locust
#

that reduces base chips and mult by half

noble schooner
#

THE JOKER WORKS WOOOOOO

gentle rain
#

i know ive been referencing it but it does it through Blind:modify_hands

next timber
#

is there any way to add custom conditions to whether a joker can be purchased/otherwise added to your jokers? i need to make sure Big jokers can't be obtained unless you have at least two free spaces left

stiff locust
#

you'd have to do a lovely patch

#

you can either modify the buy button to not work unless you have 2 free slots or you can try making big jokers take up 2 joker slots by default? maybe?

#

or they could just give -1 joker slot as an edition effect to simulate it

next timber
#

that is the effect it has

stiff locust
#

which would make you able to take one if you have only 1 slot free, but then you'd be 1 slot in the red

next timber
#

yeah you can still go 1 slot too far

#

thats the issue

stiff locust
#

uhhh maybe checkkk

#

morefluff's philosophical joker

#

that has code that allows it to be bought when your slots are full

#

like a negative joker

#

that might help? idk

thorn ridge
#

my jokers are still making duplicates for some reason

thorn ridge
# stiff locust uhhh maybe checkkk

Ive also been loking at the Smod docs and past chat history,
But still no way to just check if a card has ANY enchancement. Not just a specific one

stiff locust
stiff locust
#

should be it

#

if not, i'm misremembering, and the actual code for that should be in vampire's code

opal spade
#

if card.config.center.set == 'Enhanced' maybe?

thorn ridge
#

Vampires code is confusing cuz its not in SMODs format

stiff locust
#

¯_(ツ)_/¯

thorn ridge
#

Fair

#

I also still have my duping problem, I se that its making two mods but Im not sure how to get rid of it

glacial bloom
#

What software do you guys recommend for creating art for the jokers?

stiff locust
#

aseprite

stiff locust
#

remove the steamodded header from your mod's lua file and it'll fix that

gentle rain
#

setting the chips to 1 after context.before

thorn ridge
#

ahg, the check for enhancements still isn't working

stiff locust
#

you are checking for cards that do not have enhancements

#

either add not or change == to ~=

gentle rain
#

just crashes the game

#

buhhh

#

ok i have a solution, but it crashes saying "attempt to perform arithmetic on global 'hand_chips' [a nil value]"

#

essentially it triggers before the first card is scored but not on retriggers

thorn ridge
#

It pops with or without any enchancements

stiff locust
#

so it's currently counting every club card you will ever play

#

so once you play 3 it will always give mult forever

stiff locust
#

you

#

changed the suit to diamonds?

gentle rain
thorn ridge
stiff locust
#

right

#

no idea then

#

looks fine

noble schooner
#

Is ^Mult built into smods or would I have to program that myself?

thorn ridge
#

Any idea why its not detecting enchancements

solar eagle
red flower
#

please don't ping me for help, I help out when I'm lurking and I know the problem lol

noble schooner
solar eagle
#

target = '''=[SMODS _ "src/utils.lua"]'''
is this the proper format to lovely patch into smods? cause it is not working for me

gentle rain
#

where is hand_chips in the api documentation?

hard flume
#

Looking at rift rafts codes didn't help me

solar eagle
gentle rain
iron orchid
#

function CAL.BOSS.bosses_tab()
return {
label = "Bosses",
tab_definition_function = G.UIDEF.settings_tab,
nodes = {
n=G.UIT.T, config={text = "Bosses Completed", colour = G.C.UI.TEXT_LIGHT, align = "tm",
}
}
}

end

can someone tell me why my text injection is not working?

#

lua

#

toml:

#

anyone up lol?

next timber
#

i have discovered a new problem with the black hole enhancement
right now so it doesnt get super op super fast, when it consumes a card with xmult it add's the card's xmult to it's own
however, all cards have 1 xmult by default, so it just. goes up by 1 for every card it consumes no matter what
i dont think i need to say how broken this is. how do i solve this

iron orchid
#

anyways, I'm gonna do some runs for now. feel free to @ me if you know what I'm doing wrong

scarlet spire
#

I think that works properly

#

if it doesn't, just checking if the xmult of the consumed card == 1 and not adding it if so should work

stiff locust
next timber
#

true

stiff locust
#

oh the other guy already said it

gentle rain
# thorn ridge

bleh this wouldnt work anyways it happens after the hand plays

#

AAAA sorry wrong replyu

#

ijgjgirjgigrjg

#

imeant to reply to myself imso sorry aaaaaaaa

gentle rain
#

cause i have noooo clue how to translate the way the flint does it to this

#

(im trying to set the base chips of a hand to 1)

#

soooo the flint has THIS which is like exactly what i need,,,, only it isnt a hand function but is a blind function

#

is there no way i could like use a blind function as a jokers ability

#

sorry for asking so much abt this i just rly wanna know if what i wanna do is feasible,,,,,

#

and i know very very little about programming ,w,

iron orchid
red flower
iron orchid
#

@red flower hey joyous, I followed your lead but...well got stuck

gentle rain
#

ill leave this on the shelf for now then hehe

iron orchid
#

creating a new tab in the run info screen

#

and then filling it

#

For tonight I would feel really good to even get a label to show up

mental delta
#

trying to do a basic texture pack anyone know what might be wrong with this code of if I need to do something.
this happens on start

paper zealot
paper zealot
#

You also have standard-size assets in 1x?

gentle rain
#

now sets the chips to 1 during joker scoring
probably underpowered but whatevaaaaaaa its in

mental delta
paper zealot
#

You need to make two copies of all texture assets.
One at regular 1-to-1 pixel display size, located in /assets/1x, and a second 200% scale version in /assets/2x

thorn ridge
#

Why doesi t show up as nil

paper zealot
mental delta
scarlet spire
#

how can I do the description tag that blueprint and the fool have for their respective behaviors?

paper zealot
paper zealot
#

Then i've run out of ideas, sorry

scarlet spire
#

well, even then, #3# wouldn't pull from config, right? it'd pull from loc_vars

ivory coral
#

Hello guys, i have this bit of code thats supposed to make my joker juice continuously if it detects a specific card in hand, but with this it just keeps juicing after playing the card too and i have no clue why. I've tried debugging it and it sets potential to false correctly but it still just keeps on juicing anyway

        local potential = false
        if context.hand_drawn or context.after then
            for k, v in ipairs(G.hand.cards) do
                if (v:get_id() == G.GAME.current_round.osquo_ext_bountyhunter_card.id and v:is_suit(G.GAME.current_round.osquo_ext_bountyhunter_card.suit)) then
                    potential = true
                    break
                else potential = false end
            end
        end
        local eval = function() return potential == true end
        juice_card_until(card, eval, true)```
thorn ridge
paper zealot
# ivory coral Hello guys, i have this bit of code thats supposed to make my joker juice contin...

My guess is that it's because your eval function is only using whatever the value of potential was when you create it, not a reference to the variable potential.
Try making potential a member of the card config in card.config.extras.potential, then access it through the card argument provided to the eval func when it's called:

local eval = function(card) return card.config.extras.potential end
scarlet spire
# thorn ridge

what do you want current: to be? you're calling for #4# but you only have two variables in your loc vars

glad osprey
#

is it possible to force a shop open

ivory coral
paper zealot
#

It will juice until that eval function returns false, which it never will if potential is always nil

ivory coral
glad osprey
#

guys i need help making my deck actually possible to beat

paper zealot
# ivory coral ok yeah that did fix it actually i wonder why it starts off not juicing then tho...

It's to do with values vs references.
When you declare eval as lua local eval = function() return potential == true end it's creating a function that will return (the value of potential when the function was created == true)
If instead you declare it as lua local eval = function(card) return card.config.extras.potential end it's creating a function that will return (the current value of the reference of ...extras.potential == true)
Hope that makes sense

minor furnace
glad osprey
stiff locust
#

oh my god I need to make splash give moral support somewhere in tsunami

#

i'll find a place for it

glad osprey
#

I love splash

minor furnace
glad osprey
#

whats the small blinds blind at in ante-2

glad osprey
#

you cannot get a buffon skip ante one

minor furnace
#

so it's literally impossible

glad osprey
#

WRONG AGAIN

#

charm tags babeeee

minor furnace
#

🤨

glad osprey
#

judgement

minor furnace
#

oof

#

spectral packs don't appear ante 1 either do they?

glad osprey
#

nopw

minor furnace
#

so you need a charm tag, judgement + fool

#

and have god-tier luck

glad osprey
#

yea basically

#

also the best deck of my mod is locked behind that deck so :3

scarlet spire
#

I'm seeing the UI code that the fool/blueprint use for their description tags, but I'm not quite sure how to implement it into the smods format?

#

are there any references I can look at for this, or anyone who knows about this

noble schooner
#

just released the first public build of my mod :D

#

ty for the help, everyone! /gen

lilac tapir
#

Hi! I'm new to modding Balatro and I'm attempting to make my first joker. I'm a bit familiar with Lua but not to the point of understanding what's going on in mods :/

I'm just trying to make a joker that checks if the played hand has 4 cards, and if it does, retriggers scoring cards 3 extra times.

I'm currently trying to get the joker to detect a specific number of cards played without any luck

glad osprey
#

what you want is #context.scoring_hand

lilac tapir
#

so it'd be if #context.scoring_hand == 1?

glad osprey
#

also you want to check context.full_hand if you want the amount of card played regardless of scoring

glad osprey
rapid stag
#

is it just not possible to take ownership of consumeables?

glad osprey
#

ah gotcha

lilac tapir
# lilac tapir

also is that the right way to put a message under a triggering joker?

glad osprey
#

yes, but it won't retrigger the cards

lilac tapir
#

i know that much

glad osprey
#

oh wait

#

put it in a return

#
return {
message = "Again!"
}
lilac tapir
#

nice

#

gonna try that

#

oh a crash

glad osprey
#

also what you want is context.individual, not context.joker_main

lilac tapir
#

ah

glad osprey
lilac tapir
#

fixed it

#

It does do the text now!

#

now to make it repeat

#

I've been looking at the script for Neato's Hatsune Joku without much luck

acoustic sundial
#

Is there a function for checking if a playing card has an edition, or what edition is has? I've been looking for a bit and can't find anything

fickle stag
#

if it's empty it has nothing, if not it's edition = {negative = true}

acoustic sundial
#

omg you're a life saver and I'm an IDIOT.

#

ty ty

fickle stag
#

so just check if card.edition.negative / anything ==true

#

to set an edition just use card:set_edition

#

example

#

idk what the second arg does

acoustic sundial
#

all good, thank you so much

glacial bloom
#

So i'm completely new to coding all together. No prior experience. Trying to create my own joker. I understand everything I have down currently, but I'm not sure how to actually implement it from here, any advice? (It's not meant to be balanced, just a first time project)

paper zealot
paper zealot
glacial bloom
paper zealot
#

@mossy ivy Moving the convo here since this is more about "how to make a mod"
Briefly if you wanted to use them, you would make a mod for either Steamodded or Steamodded + Malverk.

For the pure Steamodded approach, you can provide alternative Localization files to overwrite the names - puten-us.lua file within the localization folder containing your new names, using this format:
https://github.com/Steamodded/smods/wiki/Localization
This could be as simple as

return {
    descriptions={
        Joker={
            j_vampire={ name="Werewolf" }
        }
    }
}
``` if you just wanted to rename the Vampire joker to Werewolf, for example.

Replacing textures with Steamodded is more complex, but you can read through the SMODS documentation here to find out more: 
https://github.com/Steamodded/smods/wiki/SMODS.Atlas


Alternatively, Malverk makes things way easier. It can replace both textures and localizations in one go, using something like:
```lua
AltTexture({
    key = 'joker',
    keys = { 'j_vampire' },
    set = 'Joker',
    path = 'MyMod_Joker.png',
    loc_txt = {
        name = 'My Custom Werewolf Joker',
        text = { 'Werewolves', 'not swearwolves' }
    },
    localization = {
        j_vampire={ name="Werewolf" }
})
mossy ivy
#

Oh dang

#

Much appreciated🙏

paper zealot
#

Only responding because I'm literally incapable of not answering questions, but for your purposes it's almost definitely easier to just replace the files in the exe and call it a day

lost oar
#

Quick question, is there a flag that checks if a Mr. Bones saved the player in the run? If not, is there a way to add events to existing jokers or replace them with a rewritten version of them?

mossy ivy
#

Fr

mossy ivy
#

I've tried to do the easy way and got an error

#

Which literally doesn't make any sense

paper zealot
#

Is this is you opening Balatro.exe as an archive and dragging the replacement files in?

mossy ivy
#

Yup

paper zealot
#

Balatro definitely isn't running? Ctrl+ESC doesn't show it?

mossy ivy
#

Nothing but peazip and dolphin

paper zealot
#

Hmm. I haven't tried this myself, but you could~~ try extracting Balatro.exe as an archive into a different folder, making your changes there, then creating a new .zip file from that folder and renaming it to change it's extension back to .exe~~

mossy ivy
#

That could work

#

Lemme see

paper zealot
#

Making sure that you create a zip archive specifically, not 7z, gzip, tarball or anything wacky

paper zealot
paper zealot
# mossy ivy

Try making a copy of Balatro.exe into a different location, double-checking your permissions, and possibly using a different archiver program

mossy ivy
#

Alrighty I'll try that. I honestly don't know of any other good archiver programs(not that the one i was using was even good in the first place)

halcyon osprey
#

How to make a joker function where each time an Earth card is used, it scales up?

carmine burrow
#

laziest possible "JOKER" text placement lmao

#

ways in which i cheated w/ this joker sprite:

  • used campfire's darkest color as well as normal black because i couldn't find a nice dark grey and i figured it's a different kind of card and all
  • shamelessly and messily copied the card design from seven different svgs (the claw thing has seen better days)
  • put the "JOKER" in some random empty space rather than considering how to incorporate it into the design in a more clever way
#

looks pretty cool as a negative though

#

just noticed the misplaced pixel in the bottom right. lmao

tall wharf
#

lazy? here
-# maxwell's notebook not by me

minor furnace
#

So uhh why is the last one not showing a 10 of diamonds

        {'S_2', true},
        {'H_2', true},
        {'C_6', true},
        {'C_8', true},
        {'D_T', true},
    },```
#

answer: I needed to start a new run for changes to take effect

sturdy compass
# halcyon osprey bump

Probably with context.using_consumeable and checking if context.consumeable is an earth card

halcyon osprey
sturdy compass
#

Honestly whatever method you see fit

halcyon osprey
#

i love the art i did for the card though, the negative looks amazing

tall wharf
glacial bloom
minor furnace
#

anybody know of a sample custom planet card I could look at?

tall wharf
#

i guess i got what i wanted