#💻・modding-dev

1 messages · Page 520 of 1

chrome widget
#

Some teachers, unfortunately, actively want the benefit of a position that allows them to oppress and deligitimize children. Sorry that happened to you

rocky plaza
#

the t was just a dummy variable name to show a little bit about how table syntax works

split saddle
#

using that crashed my game

#

or do I have to add the extra.seal ability?

red flower
red flower
rocky plaza
agile path
#

i'm using visual studio code

#

and i got the lua plugin, yes

sturdy compass
#

Beautiful

agile path
#

that's how i been working on mt texture pack

#

except all the pack does is change stuff lol

#

not add

agile path
sturdy compass
#

Once again, I think you'll pick stuff up real quick

agile path
#

yessir!

rocky plaza
# agile path thank you thank you :>

i too recently picked up learning lua
i didnt know how to use lua until like a month ago
just dont be afraid to ask here, someone will have the answer to help you

modern kindle
#

Even if you get stuck there are very helpful people here as well! So dont be shy

agile path
#

even if i sound hella annoying, i will be bombarding yo guys lol

#

you*

chrome widget
#

Oh also trans_heart and ⛓️ we winning we winning

#

Glad to have you!!!!

rocky plaza
agile path
modern kindle
#

I always get scared I give bad advice helping people

chrome widget
#

AH

#

SCAREY

sturdy compass
rocky plaza
red flower
#

i have never made a mistake

chrome widget
#

this is true

modern kindle
#

N is perfect its true

sturdy compass
#

This is factual

rocky plaza
#

true

red flower
#

nooo

manic rune
#

i concur

red flower
#

now i feel bad

agile path
#

what do you guys think i start the mod from?
the mod id, name, author etc?

sturdy compass
#

Definitely

chrome widget
#

You'll need a json file with all your metadata, and then a main file

modern kindle
#

I should buy N another game to praise his perfection when im home from the game store

red flower
#

nooo

modern kindle
#

I wonder how long it would take me to buy Ns wishlist

agile path
sturdy compass
#

I know you've been pointed to the Starter Pack thread already but that will really help you get development off the ground

modern kindle
#

He got so many games on there

sturdy compass
#

I wish I had it when I got started

modern kindle
#

My beginning was the smods example mod
That lifted me right off the ground as initially I only did small edits

#

Vremade now is a fantastic tool for people

agile path
#

wait, can i ask something that is frying me?

rocky plaza
#

go ahead

split saddle
agile path
#

i think i have these installed, do i have to do any of these?

red flower
#

did you save?

split saddle
#

yes

rocky plaza
split saddle
#

reloaded twice

chrome widget
sturdy compass
chrome widget
#

Method A is preferred at high level, but also. Not everyone uses git with command line like I do cause im stupid and insane

agile path
rocky plaza
#

yes

modern kindle
#

I've never used method a

chrome widget
#

yep

agile path
#

oh

#

then i do have it

rocky plaza
red flower
#

my favorite mod manager

modern kindle
#

Fax

chrome widget
#

I should probably use vscode source control except, uhh, cd ../smods go brr

sturdy compass
#

I'm too used to GitHub Desktop atp Emoti_Shrug

chrome widget
#

git checkout -b dumbass-branch
git add .
git status
git commit -m "insane commit message depicting my failing sanity"
git push origin -u dumbass-branch

maiden phoenix
#

And 2 VanillaRemade

manic rune
#

am i dumb for not knowing how to connect github to my vsc

#

:3

red flower
maiden phoenix
#

Lol

sturdy compass
#

Speaking of SMODS there are so many PRs on deck that I can't wait to see pulled Prayge

agile path
rocky plaza
#

i should get more comfortable with the command line but i aint got time for that when im tryna read up on gradschool-level books on diff eqs

red flower
agile path
#

lmao, i didn't see

red flower
#

(thats just a fork tho)

sturdy compass
#

Just a lot of really nice stuff

agile path
#

can y'all resend the links for the basic starting stuff please?

#

if that's okay ofc

red flower
#

it should all be there

agile path
#

obrigada :3

chrome widget
#

At least according to Eremel, I wouldn't expect the scaling tracker to actually get into SMODS

#

Feel free to grab it and incorporate it for yourself tho

sturdy compass
#

Unfortunate but makes sense

red flower
#

I think haya had some problems with it

chrome widget
#

Haya?

red flower
#

haya of paya's terrible additions fame

chrome widget
#

(if people have problems with it they should comment so I can fix it lmao. I've not gotten any other feedback aside from the key blacklist feature that I added)

red flower
#

people dont like reporting bugs sadly

chrome widget
#

genuinely the first time i'm hearing of it so like

#

💅

#

not my problem

sturdy compass
#

Felt

agile path
#

so, for starters, i need a .json file with the 'identification" of my mod, correct?

red flower
#

yes

sturdy compass
#

Who wants software to be bug free?: 🖐️ 🖐️ 🖐️ 🖐️ 🖐️ 🖐️

Who wants to report bugs?: 🦗

agile path
#

would it be considered... laziness if i used some templates...?

sturdy compass
#

No

red flower
#

no

rocky plaza
modern kindle
chrome widget
#

copying code is not laziness and is actually praxis for development

agile path
#

bless

chrome widget
#

you should always steal from everyone

rocky plaza
#

especially with open source stuff

agile path
#

the only place where plagiarism is acceptable

#

lol

red flower
#

i made mods specifically for people to steal from me

sturdy compass
#

You'd be surprised how much code is "stolen" on the regular

agile path
rocky plaza
#

assuming the approprate license
also please credit even if u steal, its just good practice
but realistically not many people are going to be offended

modern kindle
#

Im stealing Ns joker graveyard as we speak and making a yugioh mod called joyous spring

chrome widget
#

Nah I think plagiarism is generally acceptable in most cases and is only hightened as a problem by the vested interest of copyright, but that's typically a take Too Woke for people

red flower
#

very different from JoyousSpring

chrome widget
#

That said like giving credit is fun so people can see and point to your inspirations

red flower
#

can we abolish copyright

agile path
#

do i need anything on vscode to make the jason file

chrome widget
#

I want to so fucking bad

modern kindle
#

I love Jason file

rocky plaza
red flower
#

just make the file

chrome widget
#

just create a new file, name it smth.json

agile path
#

jason smith goes hard 🗣️

#

got it

red flower
#

json stands for joyousspring is on

rocky plaza
agile path
#

wait, so i should name metada.json?

#

medatada

#

fuck

red flower
#

it can be named anything

#

.json of course

agile path
#

oh, smods detects it either way?

red flower
#

yes

chrome widget
#

Yeah it doesn't need to be named anything specific, it's just the only json in the top level folder

#

I just typically give it the mod name

agile path
#

jeson smith it is

chrome widget
#

so mine is Fanworks.json

agile path
#

json*

red flower
#

smods tries to load all my json config files

chrome widget
#

<@&1133519078540185692>

#

Sorry for whoever got autocorrected lmao

unkempt thicket
#

mods don't come up which i type @ mods

sturdy compass
#

Same link too

agile path
#

on "dependancies", that's like
stuff that my mod depends on to work right?

sturdy compass
#

blegh

#

Correct

chrome widget
#

Feel free to put the most recent release version of smods, because people who use it should be keeping up to date

agile path
#

got it

sturdy compass
#

iirc most recent is 0711a rn?

unkempt thicket
#

I think so

chrome widget
#
"dependencies": [
    "Steamodded (>=1.0.0~BETA-0711a)"
    "Lovely (>=0.8)"
],```
unkempt thicket
#

I still don't have lovely 0.8

agile path
#

can i get some info on some of these parameters?

like, priority, the badge stuff and prefix mainly

red flower
#

my mod needs lovely 0.8 because of cross mod patches on mac

proven belfry
#

what's the resolution for blind icons

sturdy compass
#

The metadata page should give you the info you need

agile path
sturdy compass
#

98% strikes again

rocky plaza
sturdy compass
#

98% of Balatro players/modders do not know how to read

rocky plaza
sturdy compass
#

Bro Ded

#

I cannot escape this game man

proven belfry
agile path
#

checkls out

chrome widget
# agile path can i get some info on some of these parameters? like, priority, the badge stuf...
  • id is the identification for the mod within smods
  • name is just a general readable name in the SMODS mod menu
  • authors is an array of the author names, shown in the SMODS mod menu
  • description is self explanatory
  • prefix is what smods uses to index keys for added items unless specifically turned off, to prevent conflicts. so whereas a vanilla joker is 'j_joker', your jokers will by default be 'j_prefix_joker'
  • priority is the order in which a mod is loaded. For most use cases this should be 0, but you can set it higher or lower if you absolutely need to load before or after other mods
  • badge_colour and badge_text_colour are used to add little badges on your added items to show what mod they're from, as a little flair. These can also be disabled if you want, but it's useful for organization
  • display_name is what's shown on the mod badge (and a few other places)
  • version is the internal version numbering for your mod. 1.0 is typically used for first public releases
agile path
#

gf today lost a run cause she forgot to read too

sturdy compass
#

rip

proven belfry
chrome widget
#

@proven belfry btw 34x34

proven belfry
agile path
sturdy compass
#

yes

agile path
#

time to pink-ify this mf

sturdy compass
#

also don't include the #

chrome widget
agile path
chrome widget
#

We pink!!!!!!!!

agile path
sturdy compass
#

That's also like 98% of the dev community 😭

chrome widget
#

I already got my lesbian joker

versed swan
#

How do you reach this card area? (i.e which G key)

chrome widget
#

It's only valid when a booster pack is opened, otherwise it's nil

versed swan
#

gotcha, thank you

sturdy compass
agile path
#

so, for now it should be empty, i assume

#

i have nothing lol

sturdy compass
#

the value for that is just a string of the file's name, i.e. "main.lua"

agile path
#

so it has to match the name, so it can access it, yes?

chrome widget
#

main.lua is the typical practice for program entry files in lua, but you can technically name it anything here

#

(also a lot of other languages)

agile path
#

i'll keep it simple and keep main
i'm alread naming my metadata jason_smith

#

CHAT

#

it is working

#

i need to update it tho lol

chrome widget
#

JGBT

#

LMAOOOO

agile path
#

yes lol

chrome widget
#

Also ugh Galdur................

agile path
#

j stands for jokers lol

sturdy compass
#

Joker sexuality goes crazy

chrome widget
#

I'll have to do smth here to properly add my mod badges because it maintains no_mod_badges by default

agile path
chrome widget
#

clowns are hot

rocky plaza
sturdy compass
#

Meh, not my type

chrome widget
#

this is why I have four girlfriends obviously

#

honk honk

agile path
#

mods, exile them

red flower
sturdy compass
#

LMFAO

versed swan
chrome widget
#

all my partners are fat so unfortunately probably not

sturdy compass
#

Not real clowns smh

agile path
#

okay, after the json file, is there anything else i should do?

rocky plaza
sturdy compass
#

Assuming you've made your main file, start blazing your path

agile path
#

obviously, i'd like to try adding a joker, so i can get things started

#

nothing too complex

rocky plaza
agile path
#

i'll need a folder for the images, 1x and 2x i assume?

chrome widget
#

yep

sturdy compass
agile path
#

danke!

chrome widget
#

assets/1x and assets/2x

sturdy compass
#

Also yeah an assets folder is a definite

agile path
#

i don't plan on adding sounds, do i need the folder too?

sturdy compass
#

nope

chrome widget
#

Nope

agile path
#

i'm so lucky i'm cracked at the artstyle department

chrome widget
#

You need the sounds and shaders folders only if you're using the SMODS.Sound and SMODS.Shader APIs

agile path
#

what does api stand for?

chrome widget
#

application programming interface

#

Its a term that basically means a set of functions used to interface with some platform

#

In this case, the "platform" is Balatro

agile path
#

interesting

#

but since i won't add sounds, no need to do anything with that, yes?

sturdy compass
#

correct

agile path
#

am i able to make joker artwork individually?

#

like

#

individual files instead of all smushed together?

red flower
#

yes

sturdy compass
#

You can do that but it is not recommended

agile path
#

oh*

red flower
#

i mean it's an organization thing, having them all together is more organized and you need to copy paste less code

#

but you can just have them separated

rocky plaza
#

i would recommend making them individually then combining them all together into a spritesheet

chrome widget
#

Are individual files not recommended? Lmao

sturdy compass
agile path
#

i might use the original game files and go from there

red flower
#

i have like 30 atlases

chrome widget
#

I found larger atlases typically more clunky to manage, though a lot of my jokers use larger atlases for multiple effects

agile path
#

wait, what is the difference in game of 1x and 2x? is the smooth pixelart option?

red flower
#

yes

agile path
#

ah

#

so, no copy n pasting artwork lol

#

i can, i'd just need to rescale really

red flower
#

you can just scale it by 2x

rocky plaza
chrome widget
#

Based on my total number of additions, I have 176 atlases in the game at minimum

sturdy compass
red flower
#

hi something

chrome widget
#

Genuinely though idk most people considered that odd. It means I can have a basic assumption that almost all of my items start at 0,0 sprite pos

sturdy compass
#

I like my organization lol

rocky plaza
#

i just counted the atlases in my mod, i have 8 😭

#

baby numbers smh

chrome widget
#

I do wonder what the actual file size difference for a combined atlas would be

red flower
#

as long as i dont have to read anyone's code they can organize it how they want :3

sturdy compass
#

I have 13 atlases for way too many objects to count

agile path
#

done, next

sturdy compass
#

Hello hodler glagglegreeting

agile path
#

💀

chrome widget
red flower
#

i got told today that mine wasn't

#

so

rocky plaza
#

lmao here's my placeholder art

agile path
#

can i steal use that?

sturdy compass
#

No

Tarot

#

I pressed enter too early 😭

agile path
#

nah, i already made mine lol

#

i'm using placehodler

rocky plaza
sturdy compass
#

Knowing how things happen here, Place Hodler will appear as an actual Joker in your mod eventually

agile path
#

STFU

#

...maybe it will

#

lol

sturdy compass
#

Nah probably not that

agile path
# agile path STFU

disclaimer: i don't actual mean this stuff, but if anyone dislikes my love language, do tell me and i'll stop

sturdy compass
#

Sarcasm is usually picked up pretty consistently here

agile path
#

perfect

#

those server ads posted earlier were also sarcasm /j

sturdy compass
#

oh nah SKUL

agile path
#

so, do i make the texture in 1x and upscale it to 2x?

#

or the other way around?

rocky plaza
agile path
#

got it

rocky plaza
#

so i dont screw up the downscaling

sturdy compass
#

I know there's a script floating around that automatically makes 2x assets from files in the 1x folder. I think it might be in the starter pack thread

rocky plaza
#

cuz you have to remember that if u start at 2x then ur gonna have to remember that every 2x2 area of pixels corresponds to a single pixel at 1x

agile path
#

i might actually make the artstyle individually... i know you all recommended to do the spreadsheet stuff but...

rocky plaza
agile path
#

adhd man....

sturdy compass
#

I'm also adhd and I do a sheet 😭

agile path
#

brain already focused on doing individually, fuck 😰

chrome widget
#

fear my power

agile path
#

yup, this

vernal path
#

atlas, who's she

sturdy compass
chrome widget
#

But yeah I do have a ton of atlases that are multiple units wide

#

I'm thinking to combine some of them that are currently split up, I have some in separate atlases because I just didn't write whatever shaders I was using well and they don't respect atlas sizes as much as they could

sturdy compass
#

Ok but this is just very nice to me

#

Holy shit this is how I notice a dupe file

#

lmao

agile path
#

4d joker?

sturdy compass
#

No

agile path
#

no no

#

like

#

wdym 4d joker

#

does it spin

sturdy compass
#

Not quite

rocky plaza
#

backs and modifiers lol

rocky plaza
sturdy compass
chrome widget
#

Cardsauce does some internal animation for some of its jokers like Sprunk

agile path
#

upscaling is just...

#

duplicating the height and the width by 2x essentially, no?

chrome widget
#

Yeah, nearest neighbor scaling by 200%

agile path
#

i use ibis paint to do my art, do i just

#

double the canvas size

#

lol

modern kindle
chrome widget
#

Most paint programs have a resize option

agile path
#

yup, mine does

errant talon
#

Hello, new to making jokers, trying to learn soemthing new, apparently my atlas is a nil value

agile path
#

each one of these is a pixel, yes? so i can use the proper brush

chrome widget
errant talon
# rocky plaza whats ur joker code

SMODS.Joker { key = 'test', loc_txt = { name = 'test', text = { "Retrigger all", "played {C:attention}Ace's}" } }, config = { extra = { repetitions = 1 } }, rarity = 2, atlas = 'MAKMOD', pos = { x = 0, y = 0 }, cost = 5, calculate = function(self, card, context) if context.cardarea == G.play and context.repetition and not context.repetition_only then if context.other_card:is_Ace() then return { message = 'Sog!', repetitions = card.ability.extra.repetitions, } end end end }

errant talon
#

Ah I see

#

Atlas is set incorrectly

chrome widget
modern kindle
#

I should steal everyone's animation stuff

errant talon
#

atlas = 'MAKMOD', since the atlas png is called differently

rocky plaza
errant talon
rocky plaza
agile path
#

what's a hook?

errant talon
#

one more thing i am going to ask, what is the context.other_card:() for aces?

red flower
#

context.other_card:get_id() == 14

errant talon
#

Thank you

rocky plaza
# agile path what's a hook?

so basically (assuming you got to overriding functions in java) its like overriding where you can change what a function does by making it do new things before or after the original was called

agile path
#

ah, i see

#

so, i just did placeholder art for both 1x and 2x

71 x 95
142 x 195

rocky plaza
agile path
#

wait, what about 1x?

frigid cargo
#

Math aint mathing

rocky plaza
#

1x is correct

agile path
#

...i added a 5

#

from somewhere

frigid cargo
#

95x2 is 190

rocky plaza
#

you prob messed up upscaling somewhere

agile path
#

typo, oops

rocky plaza
#

oh

frigid cargo
#

Lol

rocky plaza
#

well hopefully it upscaled properly

agile path
rocky plaza
#

yep

agile path
#

see? i just did a typo lol

rocky plaza
#

👍

agile path
#

bless

rocky plaza
#

i thought it was bad mental maths lol

agile path
#

no no, just a typo really

rocky plaza
#

tbf a lot of people are bad at mental math so cant fault them

agile path
#

if it was bad math, i'd have to tell you to complain to my calculator

modern kindle
#

math sure is mental alright
drives me insane

rocky plaza
#

bro those videos of people having 200 numbers flashed on screen for 0.1 seconds each then having to give the sum of all those numbers at the end makes me jealous

modern kindle
#

i learned early on math is not my calling
yet here i am, programming

#

idk what it is but the math i do in this sort of thing comes to me easy versus math in a class

rocky plaza
#

also math in high school often is just fancy arithmetic at its core, doesnt really get to what makes math interesting

modern kindle
#

they arent mutually exclusive obviously but you are still getting a general format together in both
there are very clearly similar applications within it which i can solve in a programming format to get my result than i could if you put the paper in front of me and told me to solve it

rocky plaza
#

its unfortunate that most geometry classes (which is where proofs are usually introduced) dont teach proofs in an interesting way
and really, high-level math is a lot about being able to figure out what we can, especially since it's not all solvable

sturdy compass
modern kindle
sturdy compass
#

interesting

modern kindle
#

you hate me and want me to explode

sturdy compass
#

😭

modern kindle
sturdy compass
modern kindle
#

hows hot potato going

sturdy compass
#

The first team just got their hands on it today

#

They've had it for around 7 hours now

modern kindle
#

i was pondering joining but im so inconsistent at even working on my own mod

#

but hope it turns out epic

sturdy compass
#

It's gonna be an epic mess that's for sure

#

We love our soon-to-be codebase from hell

modern kindle
#

i shouldve joined to make one joker be 467 lines

sturdy compass
#

Lmfao

#

Also even tho ur not participating you're still more than welcome to join the server and hang out with the cool dev people

modern kindle
#

i might do that, i know alot of you guys are very cool
(yes even u)

sturdy compass
#

I know a few were asking if you were in there at some point

modern kindle
#

:0

thats awesome of people to ask

#

where is the link anyway i assume theres a thread yea

sturdy compass
#

yeah

agile path
#

After hyperfocusing

#

I'm still working on it

#

Something i came up with
may differ from the finished version

#

Still ain't done as you can see

sturdy compass
#

yass joker

agile path
#

Something like that

sturdy compass
#

lmao

#

This is Jina instead of Jimbo

agile path
#

I present to you...

#

Bimbo

sturdy compass
#

😭

#

That's not very nice

agile path
#

I will obviously make the artwork better

modern kindle
#

bimbo nation represent

agile path
#

Since i made a placeholder, can i just tell my jokers file to access the placeholder texture in the meantime?

sturdy compass
#

Yeah changing what asset your joker points to is pretty easy

proven belfry
#

how do I make a blind debuff ALL jokers (including Chicot and Matador)

#

hello?

red flower
#

hi

spice wadi
#

Maybe look at an example of a blind that debuffs all jokers
Study and copy it

azure laurel
#

someone could tell me how use the utility functions please?

ocean sinew
azure laurel
ocean sinew
azure laurel
ocean sinew
#

SMODS.create_card?

azure laurel
ocean sinew
#

it take params like set(the set of the card Joker Tarot Spectral etc)
area (the area the card will be emplaced into)
key(the key of the card If you wanna generate a specific one)
and other stuff like edition enchancement seal

#

what are you not understanding though?

azure laurel
#

how to integrate it in the returns or context.smth then

#

like make a joker that when sold, creates a specific card (ik how to make the context)

ocean sinew
#

you do:
SMODS.create_card({
key="<card_key_here">
area="<area_here">
edition={}(editions inside the table if it has any example:{"e_negative"})
stickers={}(same as above)
})

#

like

azure laurel
#

that goes where?

ocean sinew
#

if context.selling_card then
SMODS.create_card({
key = "j_greedy_joker",
area = G.jokers,
})
end
this creates a greedy joker whenever a card is sold

azure laurel
#

ok and i can do the same with every function?

ocean sinew
#

but

#

you need to put it at the right place

ocean sinew
#

cuz of if context.selling_card

#

If u wanted to do it whenever YOUR card is sold for example you would do:
if context.selling_card and context.card == card then
--rest of code here
end

#

did you understand now??

azure laurel
ocean sinew
#

both works though

#

but yeah

azure laurel
ocean sinew
#

np

#

If you have any questions you can dm me or ping me

#

If I'm able to I'll respond

azure laurel
#

thx

spice wadi
azure laurel
#

i tried to make a new consumable and the game crashed fuck

#

@ocean sinew srry if its been like five minutes but could you help me?

ocean sinew
#

yes

#

try key = "v_blank" instead

#

@azure laurel

azure laurel
#

nope, still crashed

spice wadi
#

It's at like 1031

#

You misspelled consumeable I'm guessing? Check the spelling in the docs

ocean sinew
#

oh

#

@azure laurel

#

did you change it to SMODS.Consumable{

}
instead

#

and If you did whats the crash now?

azure laurel
#

THERE

red flower
proven belfry
#

debuff = { is_face = true } isnt debuffing face cards

red flower
azure laurel
proven belfry
red flower
#

i meant the SMODS.add_voucher_to_shop

azure laurel
azure laurel
ocean sinew
#

this

azure laurel
#

and this is a key = ()?

ocean sinew
#

no

#

the key parameter is a string

proven belfry
red flower
azure laurel
ocean sinew
#

or map

#

but in lua you call it a table

red flower
proven belfry
red flower
#

you will need to also add a check for face cards there I'm guessing

proven belfry
#

so toss the if_face stuff

red flower
#

yeah

#

and remove the disable and defeat too

proven belfry
#

k

azure laurel
#

yay it works

proven belfry
#

i already assumed i dont need the disable stuff cuz chicot and matador cant save you

wind steppe
#

how would i get celestial packs to draw cards only if you have a specific joker?

ocean sinew
#

idk as well

proven belfry
wind steppe
#

could i, theoretically, repeatedly take ownership of celestial packs in add_to_deck and remove_from_deck?

#

so that when i get it it's true and when i sell it it's false (with a check to check if i still had more of that joker)

ocean sinew
#

idk if booster packs uses add_to_deck and remove_from_deck but If It does couldn't you just hook Card:add_to_deck?

wind steppe
#

no in the joker

ocean sinew
#

Idk

distant junco
#

can i has some help? (card.ability.extra.suit = 'Heart' atm)

ocean sinew
#

though If you want to not draw cards to booster packs you can hook Card:open()

ocean sinew
wind steppe
distant junco
#

ahhhhh

#

that makes sense thanks

wind steppe
#

also i don't think debuff_card is called for jokers?

proven belfry
wind steppe
#

if thats what youre doing

distant junco
#

well we'll see

proven belfry
#

how do i do lua formatting

wind steppe
#

context.debuff_card:is_face()

proven belfry
#

in discord

wind steppe
#

`

ocean sinew
#

Am trying to make a edit button

proven belfry
#

ahhhhhh

wind steppe
#

that's the character you need

#

```lua
would look like this (i escaped it with backslashes to show you)
```

distant junco
azure laurel
#

how i make that in the collection, this consumables had name, they just appear as ERROR in black

wind steppe
#

let me test if this actually works

ocean sinew
#

one is outside

#

and you need a ["default"] one too when it has no loc_txt for a set language

#

also is es_419 a valid language prefix??

wind steppe
azure laurel
#

that is what happen

ocean sinew
#

["es_419"] is outside

azure laurel
wind steppe
ocean sinew
azure laurel
ocean sinew
#

and ["es_419"] is also outside

proven belfry
azure laurel
#

outside where?

ocean sinew
ocean sinew
errant talon
#

Hi, I am trying to make a joker that changes played face card into queen
calculate = function(self, card, context) if context.individual and context.cardarea == G.play then if context.other_card:get_id() == 13 or context.other_card:get_id() == 11 then return { message = 'Queen!', assert(SMODS.change_base(played_card, "12")), } end
however, assert triggers before hand is played, crashing, is there G.play that happens before scoring but not after hand is played?

wind steppe
ocean sinew
#

It's structured like this rn
{
loc_txt = {
["en_us"] = {
},
["es_418"] = {

}

}
}

wind steppe
#

take it out

errant talon
wind steppe
#

also you might be looking for context.before?

azure laurel
ocean sinew
#

nice

azure laurel
wild escarp
#

Is there a way to have a booster pack just pick from a table of joker keys?

wind steppe
#

and you make the set your objecttype's key

distant junco
misty radish
#

How do I center the background image?

proven belfry
wind steppe
proven belfry
#

ahhhhhhhhh

wind steppe
#

it'll only apply in blinds though

distant junco
wind steppe
#

update steamodded

distant junco
#

ive got the most recent videos

#

videos????

#

version

wind steppe
# distant junco it doesnt >:(

if context.debuff_card and context.debuff_card.area ~= G.jokers and context.debuff_card:is_suit(card.ability.extra.suit)

distant junco
#

still nothing??

wind steppe
distant junco
#

yep

#

what is "is_suit" expecting

wind steppe
distant junco
#

would it be 'Hearts' or 'Heart'

wind steppe
#

"Hearts"

distant junco
#

ahh okay

unkempt thicket
#

How can i modify the winning hand of a blind?

distant junco
# wind steppe "Hearts"

ok its debuffing for the first blind, it then debuffs the next one in the shop, and then when the blind starts, gets rid of the debuff

wind steppe
distant junco
#

thats what im doing

wind steppe
#

vanillaremade has a couple jokers that do that

#

how would i get celestial packs to draw cards only if you have a specific joker?

versed swan
#

is there a context for after cards are drawn?

faint yacht
#

context.hand_drawn?

ocean sinew
#
local function create_placeholder(align,colour,extra)
    align=align or "tm"
    colour=colour or G.C.CLEAR
    extra = extra or {}
    return {n=G.UIT.C,config={align="tm",colour=colour,button=extra.button,ref_table=extra.ref_table,},nodes={},}
end 

function enter_edit_page(ref,target)
   local contents = {
    create_placeholder()
   }
   --create_edit_prompts(target, contents)
   local edit_page=create_UIBox_generic_options({
    contents=contents,
   })
   --G.FUNCS.exit_overlay_menu()
   print("overlaying?")
   G.FUNCS.overlay_menu({
    definiton = edit_page,
   })
   print('overlay?')
end
#

why is this crashing?

versed swan
chrome widget
#

Modding dev might enjoy learning that I'm gonna make a lot of the experimental, custom features I use in my mod in a publicly available API mod

#

(I will document it well dw)

red flower
#

i love me some apis

#

we need more of those

unborn bay
chrome widget
#

easily fixable afaik

unborn bay
#

I just hooked pairs for that 🚎

chrome widget
#

I mean yeah. If we had Lua 5.2 there's apparently a metamethod thing for it

#

But alas, stuck in the 5.1 mines

ocean sinew
#

I'm just curious sorry

#

and what metamethod

chrome widget
#

that said I can update my PR for it

ocean sinew
#

__ipairs metamethod

#

__pairs metamethod??

#

smth like that

chrome widget
#

yeah, they're relatively recent additions

ocean sinew
#

you can do it though

chrome widget
#

But in general we're talking about an SMODS PR I put up to track scaling changes

ocean sinew
#
local o_pairs = t
pairs = function(t)
    if t then
        local mt = getmetatable(t)
        if mt and mt.__pairs then
            return mt.__pairs(t)
        end
    end
    return o_pairs(t)
end
#

this works

chrome widget
#

it............ shouldn't

ocean sinew
#

I use it in my scaling_mod class

#

for some stuff

chrome widget
#

Unless Love2D 11.5 doesn't actually use Lua 5.1

ocean sinew
#

meta.__pairs = function(t)
--print("pairs called")
return next,reference,nil
end

ocean sinew
#

but you can just hook the pairs function

#

and then add it yourself

chrome widget
#

Oh sorry I misread

#

No yeah that's what I mea

ocean sinew
#

you can do the same for ipairs

red flower
#

overwriting ipairs to always do one less iteration

short girder
#

what context calculates selling a card with a specific key

ocean sinew
red flower
ocean sinew
#
G.FUNCS.bl_utils_back_to_last_edit_page = function (e)
   print("current page:",this_variables.current_page)
   local last_page = this_variables.pages[this_variables.current_page-1]
   print("last page:",last_page)
   G.FUNCS.overlay_menu{
    definition=last_page
   }
   print("overlayed")
   for i = this_variables.current_page,#this_variables.pages do
      this_variables.pages[i] = nil
   end
   this_variables.current_page=this_variables.current_page-1
end

why this doesnt work 😔

#

last page is valid

#
G.FUNCS.edit = function (e)
  local card = e.config.ref_table
  local this_menu = create_edit_menu(card)
  G.FUNCS.overlay_menu({
    definition=this_menu
  })
  table.insert(this_variables.pages, this_menu)
  this_variables.current_page=this_variables.current_page+1
end
#

I'mma show error wait

wind steppe
#

is there a way to trigger something that isn't an unlock condition when continuing a run from the menu?

ocean sinew
#

I just had to clone the table

wind steppe
#
local runstartold = Game.start_run
Game.start_run = function(args)
    local ret = runstartold(args)
    if next(SMODS.find_card("j_para_garagefork", false)) then
        SMODS.Booster:take_ownership_by_kind('Celestial', {draw_hand = true}, true)
    else
        SMODS.Booster:take_ownership_by_kind('Celestial', {draw_hand = false}, true)
    end
    return ret
end
#

why does this hook crash on the third line

red flower
#

you're missing the self

#

also i forgot to answer before because i had to go out but i think the easiest way to do your effect is to literally make the joker draw cards

wind steppe
#

(without significant patching/hooking)

red flower
#

this is all draw_hand does

#

you can probably just put that in context.open_booster

#

but i haven't tried it

modern kindle
#

N go to sleep

red flower
#

no

#

u

wind steppe
modern kindle
ocean sinew
#

I was very focused then my cat randomly jumps into the desks and starts pressing the keyboard keys

#

😭

#

how do I put this green thing down?

manic rune
dense ginkgo
#
config = {
        extra = 2,
        choose = 1, 
    },

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

    weight = 0.9,
    cost = 4,
    kind = "BTCTPack",
    
    create_card = function(self, card, i)
        ease_background_colour(HEX("2a61eb"))
        return SMODS.create_card({
            set = "Batrocities",
            area = G.pack_cards,
            skip_materialize = true,
            soulable = false,
        })
    end,
    select_card = 'jokers',

    in_pool = function() return true end
}

does anybody know why this booster pack crashes the game?

daring fern
frosty rampart
#

don't return an SMODS.create_card call, just return the table that you passed as the argument

dense ginkgo
daring fern
daring fern
frosty rampart
dense ginkgo
daring fern
dense ginkgo
daring fern
#

Did you make a SMODS.ObjectType with the key Batrocities?

dense ginkgo
#

how do you tell if something is a valid object type? My friend coded most of the mod and I'm unsure if he did.

ocean sinew
daring fern
ocean sinew
#

ohh

#

fixed

daring fern
#

Consumable types can't have jokers.

frigid elm
#

Does anybody know exactly what function is used to sort Jokers when you drag a Joker?

dense ginkgo
#
-- Batrocity joker pool
SMODS.ObjectType({
    key = "Batrocity",
    default = "j_btct_MichaelWave",
    cards = {},
    inject = function(self)
        SMODS.ObjectType.inject(self)
    end,
})

like this?

ocean sinew
#

yes

#

the set is Batrocities but it should be Batrocity instead @dense ginkgo

#

@dense ginkgo just do this

#
SMODS.ObjectType({
    key = "Batrocities",
    default = "j_btct_MichaelWave",
    cards = {},
    inject = function(self)
        SMODS.ObjectType.inject(self)
    end,
})
#

change that line

dense ginkgo
#

The key changing worked but the pack is only spawning the fallback joker.

dense ginkgo
daring fern
dense ginkgo
daring fern
daring fern
dense ginkgo
oak meadow
#
    key = 'catner',
    blueprint_compat = true,
    loc_txt = {
        name = 'catner',
        text = {
            "Gives {C:money}+$1{}, {C:chips}+20 Chips{},",
            "{C:mult}+15 Mult{}, and {C:mult}+x0.2 Mult{}",
            "for each cat joker.",
            "{C:inactive}Currently #1# cats.",
            "{C:inactive, s:0.8}' 'catner catner catner; catns the amount of catners that catn catners in this encatner' when'"
        }
    },
    cost = 5,
    rarity = "cry_epic",
    pools = {
        ["cat_shop"] = true,
        ["cat"] = true
    },
    atlas = 'spr',
    pos = { x = 3, y = 0, },
    config = { extra = { cats = 0 } },
    calculate = function(self, card, context)
        if context.joker_main then
            local catcount = 0
            for _, J in ipairs(G.jokers.cards) do
                if J.config.center.pools and J.config.center.pools.cat then
                    catcount = catcount + 1
                end
            end
-- here is where it sets
            card.ability.extra.cats = catcount
            return {
                dollars = catcount,
                chips = catcount * 20,
                mult = catcount * 15,
                xmult = (catcount / 5) + 1
            }
        end
    end
}```
why does the 'cats' local variable not get set to catcount every check (everything else about the card works as intended)
daring fern
oak meadow
#

oh dang im stupid

#

thanks

versed swan
#

Is there a way to temporarily disable card selection?

daring fern
earnest stratus
#

can anyone help me understand why the ankh mod isn't working? It's showing as activated in my mods list but no menus/settings available for it. Timer doesn't start either

foggy ginkgo
#

Hi something 👋

versed swan
mystic river
#

hey does anyone know why the hell this tarot flip is happening in the wrong order?

use = function(self, card, area, copier)
        for i=1, #G.hand.highlighted do --Flip to back
            local percent = 1.15 - (i-0.999)/(#G.hand.highlighted-0.998)*0.3
            local target = G.hand.highlighted[i]
            G.E_MANAGER:add_event(Event({
                trigger = 'after',
                delay = 0.15,
                func = function()
                    target:flip()
                    play_sound('card1', percent)
                    target:juice_up(0.3, 0.3)
                    return true
                end
            }))
        end
        delay(0.2)
        for i=1, #G.hand.highlighted do --Change enhancement (should be while still flipped back but it's not?)
            local target = G.hand.highlighted[i]
            G.E_MANAGER:add_event(Event({
                trigger = 'after',
                delay = 0.1,
                func = function()
                    target:set_ability(G.P_CENTERS[card.ability.enh_conv], nil, true)
                    return true
                end
            }))
        end
        for i=1, #G.hand.highlighted do --Flip back (should be after the enhancement happens but it's before????)
            local percent = 0.85 + ( i - 0.999 ) / ( #G.hand.highlighted - 0.998 ) * 0.3
            local target = G.hand.highlighted[i]
            G.E_MANAGER:add_event(Event({
                trigger = 'after',
                delay = 0.15,
                func = function()
                    target:flip()
                    play_sound('tarot2', percent, 0.6)
                    target:juice_up(0.3, 0.3)
                    return true
                end
            }))
        end
        G.E_MANAGER:add_event(Event({
            trigger = 'after',
            delay = 0.2,
            func = function()
                G.hand:unhighlight_all()
                return true
            end
        }))
        delay(0.5)
    end,
#

i'm comparing it to the vanilla function and i can't see where the difference is

#

what if i just swapped their order. maybe the event manager just does things in the order of 1 3 2 and nobody mentioned this anywhere ever. that's not insane to think

#

-# can you tell i've been frustrated about this for quite some time

manic rune
#

when its true another event is added

#

which will be after all the events below

mystic river
#

... HUH
i
have no idea why that is there

#

both in my code and in the function

manic rune
#

shrug

ripe thicket
#

I tried creating a booster pack for my custom consumables but for some reason I can't get the name or description for it to show up in game

daring fern
ripe thicket
mystic river
# mystic river ~~both in my code and in the function~~

that argument is used in vanilla for vampire and midas mask
... i think i figured out how i got here. lol. i copied that line all the way back when from the bucket of cement. the joker that acts like vampire and midas mask.
thanks past me for not even making a comment "i don't know what this delay_sprites thing does but vanilla did it in these contexts"

daring fern
ripe thicket
#

just tried that, it didn't work

gleaming crescent
#

Guys, is translating consumable type possible? I have a consumable type "Fruit" and I don't know how to translate it's label to other languages

gleaming crescent
#

It translates anything but consumable type

daring fern
#

In Localization > misc > dictionary

#

And b_consumabletypekey_cards = "Consumable Type Name Cards"

gleaming crescent
#

Oh, I accidentally added mod prefix inside of key. Thank you very much

hardy ibex
#

Theres a way to add animated jokers? And if so, how can i do it?

flint fern
#

how do u replace a texture (not something u can do with malverk like jokers, i meant like the title screen logo)

gleaming crescent
#

Found it in SMODS wiki

gleaming crescent
#

Now I don't trust SMODS wiki

daring fern
flint fern
#

whats the key to the logo in the main menu screen

daring fern
vestal magnet
#

how do i make a joker retrigger itself specifically 9 times

daring fern
gleaming crescent
gilded blaze
#

SMODS.current_mod.optional_features = {retrigger_joker = true}

vestal magnet
#

ok

red flower
#

how do i retrigger a joker 10 times

distant junco
#

bumping from last night: trying to debuff certain suits and its behaving really weirdly

if context.debuff_card and context.debuff_card:is_suit(card.ability.extra.suit) then
  return {
    debuff = true
  }
end

card.ability.extra.suit has a random suit chosen at the end of the round and that works fine.
however, it will debuff on the first blind, then it will debuff in the shop and remove the debuff for the next blind, then it will add the debuff for the next blind but for the wrong suit and from then on it does the debuff in the shop but not in the blind thing

distant junco
red flower
#

what about 11 times

distant junco
#

dunno

red flower
distant junco
#

yes

red flower
#

try context.starting_shop

distant junco
#

alright

#

does the context.debuff_card need to be inside another context

red flower
#

no

distant junco
#

ok

distant junco
distant junco
#

i wonder why the timing needs to be specific you'd think it would just work huh

red flower
#

debuff_card is also called at end of round and it undebuffs whatever was debuffed, if you change the suit it will instead debuff the other suit during the shop basically

#

so you need to change the suit after that debuff_card

distant junco
#

ahhh okay

oak meadow
#

could i do
G.consumables.config.card_limit
to change consumable limit

manic rune
#

consumeables*, but yes

oak meadow
#

ty

foggy ginkgo
#

How do you add japanese characters in text

rotund sable
#

Custom font

#

As far as I'm aware

foggy ginkgo
#

Do yknow how to do that or

distant junco
rotund sable
rotund sable
distant junco
#

ah fair enough

red flower
rotund sable
#

Is it really that simple 😭

red flower
#

yes

foggy ginkgo
#

Wow

red flower
#

5 is the default japanese font

#

iirc

foggy ginkgo
#

Thank you N

rotund sable
#

N' the modding-dev legend

foggy ginkgo
#

Indeed

agile path
#

good morning chat

red flower
#

good morning!

zealous glen
#

Good morning!

agile path
#

my head hurts

#

but only on the right side

#

maybe cause i'm left handed

#

time to go work on the artwork

manic rune
#

good morning

bold sleet
#

help how do I make this actually work?

#

i.e. just change the spawn rate thing of rarities.

#

both vanilla and modded

primal robin
#

get_weight function

oak meadow
#

how would i make something not appear in shops

bold sleet
daring fern
red flower
#

(read the docs)

bold sleet
#

Which one

red flower
#

rarity

bold sleet
#

not helpful

daring fern
bold sleet
#

I need to change that value dynamically, as well as vanilla rarities.

#

Can I modify directly default weight?

wintry solar
#

why can't you just change the value in G.GAME like N said?

bold sleet
#

whatever, I'll just do the _mod thing

#

If it clashes with other mods, oh well

wintry solar
#

why would it clash

#

what are you trying to do

bold sleet
#

Multiply certain rarities weight by 0.95, others by 0.05

#

those numbers can change via a voucher

agile path
#

oh yeah?
yassifies your jimbo

wintry solar
#

so why would it clash with other mods if you change the _mod value?

bold sleet
#

idk, I figured they would change the silly mod number and the fine-tuned bs would break

gleaming crescent
#

Am I doing it wrong?

agile path
red flower
gleaming crescent
#

I don't think it's a good implementation

red flower
#

it looks fine
it would be better with an SMODS.ObjectType but that basically does the same thing

oak meadow
#

is there a way to add certain things to pools
not as in cards, like effects on the cards (such as doing things to them like forcing editions or setting cost)

red flower
#

there's no pool calculate functions or anything like that if that's what you're asking

oak meadow
#

what abt the other 2 things

manic rune
#

:3

agile path
#

upscalling was... horrendous
why are things never easy

manic rune
#

i need my glasses

agile path
#

shit, so do i

red flower
oak meadow
#

wrong pic

manic rune
#

what does "forcing editions" even mean

#

like, forcing them to have 1 edition that cant be changed?

oak meadow
#

ye kinda like that
and also spawning w/ that

barren egret
#

Can someone give me a simple example code for creating ui boxes with squares and text?

oak meadow
#

look i got emperor glitched that had 13 on it, and i thought it was funny

manic rune
#

hook to :set_ability (or create_card) and :set_edition i think

red flower
manic rune
#

the former hooks are there to give the joker that edition

barren egret
manic rune
#

you then want to hook to :set_edition to make sure they cant get other editions

oak meadow
#

ne way i just wanted to ask because i could have gotten some really funny ideas from that
also i have no clue how to hook currently and dont want to learn :P

manic rune
#

sob

#

hooks are simple though

#

the whole idea, basically, is just making your code run whenever a function you hook to runs

red flower
agile path
#

fixed the scalling issue

oak meadow
#

to me it seems the 2 hard parts about balatro modding is 1. hooks and 2. patching
its probably more something else for the first one but ive also heard stuff abt patching

manic rune
#

so you can directly modify what the function does

oak meadow
#

hm neet

gleaming crescent
manic rune
#

the real beasts of modding are ui, using love2d functions and shaders lol

red flower
#

you can add the key when you create the pool

gleaming crescent
#

Uh, does Lua have something like .contains? Or should I make my own search?

red flower
#

you have to make your own

#

but also what are you trying to do

#

<@&1133519078540185692>

gleaming crescent
red flower
#

it's better to save it as an index in that case

lament agate
#

hihihihihihihihihihihi

#

🥺

agile path
#

woah, another doggo person

rotund sable
lament agate
#

hawk tuah bro!

manic rune
lament agate
barren egret
#

How do I only show a button/text during a run (not in shop, or when selectief blinds)?

#

Selecting*

red flower
#

you would need to add a func field to the config that points to a G.FUNCS function that hides it

#

sorry i dont have any examples on hand

agile path
#

for jokers, do i need a jokers.lua or

distant junco
red flower
#

no it can be named whatever you want and you can add whatever other stuff there

distant junco
#

i've just got all of my stuff in one lua file lol

spice wadi
agile path
#

i might divide the jonklers, consumables, etc into different stuff

red flower
spice wadi
#

Ohhh my bad

#

I forgot those are separate things 💀

#

I need to lock in on UI dev

spice wadi
distant junco
#

ohhhh thats not right

if context.debuff_card and not context.debuff_card:is_suit(card.ability.extra.suit) and not context.debuff_card:is_suit() then
    return {
        debuff = true
    }
end
#

worked for the first blind

agile path
spice wadi
#

Fair

spice wadi
#

I did that too at first then switched to the 3rd option

#

Cos I made smth that skips broken files/items instead of crashing

red flower
distant junco
#

stopping it from debuffing jokers

red flower
#

then the not is wrong

gleaming crescent
red flower
#

but also idk if that works

spice wadi
distant junco
red flower
distant junco
gleaming crescent
distant junco
#

how do

red flower
#

idk how the not works there

red flower
buoyant thorn
#

hello!

gleaming crescent
buoyant thorn
#

im working on a deck that causes changes to ante to also effect the total joker slots

#

I don't actually know how to code in lua so i wanna ask to make sure this isnt gonna cause a
memory leak
or something
calculate = function(self, back, context, card) self.config.extra.current_ante = G.GAME.round_resets.blind_ante or G.GAME.round_resets.ante if self.config.extra.current_ante != self.config.extra.last_ante then G.jokers.config.card_limit = G.jokers.config.card_limit + (self.config.extra.current_ante - self.config.extra.last_ante) self.config.extra.last_ante = self.config.extra.current_ante end end

#

wow thats hard to read

#

since im checking for != instead of == like usual

#

it should be fine right?

cursive gazelle
#

not !=

buoyant thorn
#

i wont be able to test this until la-

distant junco
buoyant thorn
#

ah thank you
most of my coding experience is python

distant junco
#

ok

red flower
# buoyant thorn

this looks fine, I usually wouldn't recommend doing stuff in calculate outside a context check but this one will work

buoyant thorn
gleaming crescent
distant junco
red flower
buoyant thorn
#

i dont really know what calculate is (i cant read im an undertale fan!!)
but okay!

cursive gazelle
distant junco
buoyant thorn
red flower
distant junco
#

oh my fucking god

red flower
#

not a == b
is wrong

cursive gazelle
red flower
#

(unless b is boolean)

distant junco
#

ok

#

gotcha

distant junco
red flower
buoyant thorn
#

i have a bunch of context checks for beating the boss, hieroglyph, petroglyph, and even antimatter because i felt like nerfing it at first but changed my mind

#

and then i thought
maybe i should just not bother checking and it might work?

#

anyway thanks for the help

red flower
distant junco
gilded blaze
buoyant thorn
red flower
#

yes

distant junco
red flower
#

hmm

#

no idea

#

debuffing is hard

distant junco
#

you're telling me