#💻・modding-dev

1 messages · Page 209 of 1

red flower
#

whats line 149

worthy stirrup
#

for k, v in (context.scoring_hand) do

red flower
#

oh yeah

worthy stirrup
#

should i call for ipair

red flower
#

it's ipairs

worthy stirrup
#

okay, ill try that

#

it doesnt change after scoring but instead its doing it before

hushed field
#

yeah, you want to use the eventmanager to solve that

worthy stirrup
#

aw shit, something new i gotta learn

hushed field
#

the animations and the calculations are separate concepts, so even if you change the suits in after, they will visually change before, even though they get scored afterwards

worthy stirrup
#

ten bucks if you do it for me /j

hushed field
#

If you can't find a mod that does it better, you can check Kino's code for the Benjamin Button joker, which changes ranks after cards are played, but it's a finnicky thing to make look really smooth. Though most people that play mods play on speeds so high they'd barely notice anyway 😛

strong jacinth
#

Erm, guysh. I need hewp.

#

-# please understand this is a joke.

worthy stirrup
hushed field
#

I can't say I fully understand the timing of events, so I wouldn't trust my words too much, haha

worthy stirrup
#

ill do it later, i need a little nap bc i did so good today :3

hushed field
#

but really it's just a tool to help with timing

strong jacinth
#

Is it in smods?

hushed field
#

on an entirely different note, has someone messed around a lot with tags? I'm implementing variations for confections, which currently function by creating tags, so I'm wondering if SMODS already has systems to take care of passing information on to tags or if that's something I'd have to whip up

strong jacinth
#

You can check here. Not sire if everything will be there

buoyant shard
hushed field
buoyant shard
strong jacinth
tepid crow
#

huh

#

anyway, show the pngs its trying to read?

buoyant shard
tepid crow
#

I meant like in the file explorer haha

buoyant shard
#

[mod folder] \ assets \ 1x

tepid crow
#

also in 2x?

strong jacinth
buoyant shard
#

yes

tepid crow
#

oh that was more meant as a general warning? I thought it was more of an accusation haha

tepid crow
tepid crow
#

yeah that makes more sense then haha

#

should reply with something like

...\assets>dir /s /b

...\assets\1x
...\assets\2x
...\assets\1x\icon.png
...\assets\1x\sleeves.png
...\assets\2x\icon.png
...\assets\2x\sleeves.png
buoyant shard
#

...\assets> dir /s /b
dir : Cannot find path 'C:\s' because it does not exist.
At line:1 char:1

  • dir /s /b
  •   + CategoryInfo          : ObjectNotFound: (C:\s:String) [Get-ChildItem], ItemNotFoundException
      + FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.GetChildItemCommand
tepid crow
#

no not powershell, the command prompt

#

(at least, I'm assuming that's powershell?)

buoyant shard
#

how do I do command prompt?

#

I hit right click > open in terminal and it gave me powershell

tepid crow
#

if you go to your assets folder in windows explorer, go to the url bar and type cmd, then press enter

buoyant shard
#

the 2x png had the wrong name this whole time

#

man I love comp sci

tepid crow
#

yeah it was gonna be something like that

minor furnace
#

I love when people send me error logs and I'm unable to reproduce the issue

sturdy compass
#

fr

#

I personally love it when people report errors without even sending logs

tepid crow
#

I've gotten into the habit of asking people to please reproduce it themselves

#

since sometimes I just get error logs with 40+ mods

lapis matrix
sturdy compass
#

LMAO

lapis matrix
#

lmfao

sturdy compass
#

I would at least get a good laugh out of that

hushed field
tepid crow
#

yeah that's always fun

sturdy compass
#

Dimserene's pack is a cool idea but it's so hard to make a modpack work if you're not gonna edit the hook/patch code to play nice with eachother

minor furnace
lapis matrix
#

i personally have like (1) experience with Lua and 0 clue wtf im doing but im gonna make... something work

#

trust me

sturdy compass
#

Do you have experience with other languages?

lapis matrix
#

very minimal LOL

sturdy compass
#

Anything helps honestly

hushed field
#

I do wanna find a suite of mods to make Kino really compatible with at some point, but I honestly wonder what the experience is for people playing Dimserene and finding Kino jokers. I guess most of them are just jokers with pixelated art, and then some are so tied to kino mechanics that they're just useless haha

lapis matrix
#

most ive got experience with is roblox's version of Lua and then http/css/python/js shenanigans

#

but in reality im Trash at all of the above

sturdy compass
#

Ah I see

lapis matrix
#

but dw... im here to cook.

lyric wadi
#

python is like decently close to lua

sturdy compass
#

Lua is pretty easy to pick up regardless

lyric wadi
#

lua is like python but even more words

tepid crow
lyric wadi
#

which might help cuz words do what it says it do

sturdy compass
lapis matrix
#

my adventure using Lua on roblox ended when i got to metatables because wtf... im not built for turning Lua into an OOP language

#

lmao

minor furnace
#

and now I return to: figuring out how to destroy a card as a blind effect

sturdy compass
#

...Lua is an OOP language?

lapis matrix
tepid crow
#

with metatables you can pretend it is

lapis matrix
#

yeah

sturdy compass
#

Interesting'

tepid crow
lapis matrix
#

i keep forgetting its LuaU so i just say roblox's Lua 😭

sturdy compass
#

iirc Dimserene was looking at adding Maximus and with the amount of patches I do with that mod I'm scared of how it interacts with other mods

hushed field
#

Okay, so I'm trying to mess around with my Confection consumeable so they can be enhanced. Those consumeables are really just tag spawners, so I'm passing on info to a Tag:set_ability(), but it keeps reading the integer I pass into it as a table. Or rather, I'm passing a table somewhere but I'm not smart enough to see where

clear epoch
#

is there a SMODS table that stores all consumable cards like SMODS.Stickers is? i feel like it should be SMODS.Consumables but it seems to return nil for me

sturdy compass
lapis matrix
#

anyways, is there documentation handy anywhere for starting with delving into balat modding

sturdy compass
#

Absolutely

hushed field
sturdy compass
clear epoch
sturdy compass
#

HA

#

BEAT YA

lapis matrix
#

thank you kind cat(s)

clear epoch
tepid crow
sturdy compass
#

Yeah lol

clear epoch
tepid crow
#

good news is I can already see you can remove some of those patches lol

sturdy compass
#

Like what?

tepid crow
sturdy compass
#

I already phased that out lol

stiff locust
#

that's so nice

#

anyway when are they adding calc_dollar_bonus to decks

tepid crow
sturdy compass
wintry solar
sturdy compass
#

I'm so sorry Lars it was customary 😭

edgy reef
tepid crow
#

getting 98%'d for no reason I can't believe it

edgy reef
#

Dealing with homework rn

spring lantern
#

my game keeps crashing at end of round when i have talisman enabled...

tepid crow
sturdy compass
#

Which one?

tepid crow
#

https://github.com/the-Astra/Maximus/blob/dev/lovely/highlight_limit.toml#L16 and https://github.com/larswijn/CardSleeves/blob/main/lovely/expected_to_fail.toml#L18
aka

[[patches]]
[patches.pattern]
target = "functions/button_callbacks.lua"
pattern = "if #G.hand.highlighted <= 0 or G.GAME.blind.block_play or #G.hand.highlighted > 5 then "
position = "at"
payload = "if #G.hand.highlighted <= 0 or G.GAME.blind.block_play or #G.hand.highlighted > G.hand.config.highlighted_limit then "
match_indent = true
times = 1
sturdy compass
#

Ah yes the highlight limit

#

Very useful patch fr

tepid crow
#

yeah... honestly that wouldn't be bad to just include in smods itself

mighty trench
#

help me... modded balatro sages...

sturdy compass
#

It'd help a lotta people

tepid crow
#

the fact that the 5 is completely hardcoded sucks lol

mighty trench
#

I am trying to make a joker produce DNA joker when playing a hand with a scoring set of specific ranks

#

and yet it crashed every t time! ahh! how do i make it work please

tepid crow
sturdy compass
wintry solar
#

I’d rather it refer to a different variable rather than the highlight limit

tepid crow
#

🤔

#

why's that?

wintry solar
#

Allows you to decrease it more cleanly too

weak gate
#

are the cards I've already used or discarded in this round stored in some table?

wintry solar
#

Whilst not limiting discard size

tepid crow
#

can_discard doesn't even have a limit for some reason 😭

spring lantern
sturdy compass
#

felt

sturdy compass
wintry solar
#

It doesn’t, but if you wanted to limit played hand size to say 4, this patch would conflict with being able to discard 5 cards

hushed field
#

i'm sorry to big number enjoyers but i ain't doing talisman compat that'd kill me ❤️

wintry solar
#

I might take a look at making them easy to modify this week at some point

tepid crow
spring lantern
#

should start with an eternal squareman

tepid crow
wintry solar
#

It is

sturdy compass
#

I think I see what you mean now?

wintry solar
#

In theory you could have a blind that only allows you to play X cards at once

#

That shouldn’t change how many you can highlight

#

It just shouldn’t let you hit play if you have more highlighted

sturdy compass
#

Ah I see what you mean

#

Yeah that makes more sense

tepid crow
#

it'd be #G.hand.highlighted > G.hand.config.play_limit (or similar) instead then right

graceful magnet
#

is there a way to check for the target hand of a planet card? I'm trying to make something that has a chance to level up the Planet hand a second time after one is used

hushed field
#

So, the set_ability() does receive a 'chocolate_bonus', but somehow it's the tag itself that gets passed through. I'm not sure how that happens, and digging through the code's not really making that any clearer for me

zealous glen
sturdy compass
zealous glen
#

Because in principle Planet cards could do anything

wintry solar
#

I think it’d be G.GAME.modifiers.play_limit and discard_limit

spring lantern
#

so uh what's that lovely dump thing kids are doing these days and where can i get it

tepid crow
#

mods/lovely/dump

spring lantern
#

ah schweet

mighty trench
#

I am attempting to make my humble jokester my humble jester to make the dna AID ME when possible please :3

old bane
#

how do i remove a sticker >_<

minor furnace
spring lantern
#

bro talisman really out here breaking the game over function 😭

#

what the fuck

#

this is where the crash happens only if talisman is running

#

like 2569

minor furnace
#

turns out it's a lot easier to solve problems when you aren't burnt out from coding for a week and a half straight

wintry solar
#

Let’s normalise not using talisman

tepid crow
spring lantern
wintry solar
minor furnace
#

why do we hate talisman?

spring lantern
#

mostly just tryna fix some issues because a couple ppl tried my mod with cryptid soooo

tepid crow
wintry solar
wintry solar
tepid crow
#

I'd prefer to keep making individual mod makers to just patch that single line then

spring lantern
tepid crow
#

big sigh

tepid crow
frosty dock
#

luajit2 supremacy

spring lantern
sturdy compass
sturdy compass
#

which sucks but what are ya gonna do

tepid crow
spring lantern
#

hold on i think i'm the stupid one here

wintry solar
#

The amount of people who are trying to target it suggests it should probably have a proper implementation

stiff locust
#

big refernces bignum and saying to big is converting the number to bignum

#

but then they added omeganum because bignum wasn't enough for cryptid

frosty dock
#

it's still big though

#

just even bigger

stiff locust
#

yeah

sturdy compass
#

ok but what about to_bigger

spring lantern
#

im jus gonna go crawl into a corner

sturdy compass
tepid crow
stiff locust
graceful magnet
#

definitely doing the check wrong

spring lantern
#

shatters immediately

sturdy compass
stiff locust
#

ive never had to change either of my two patches

sturdy compass
#

I truly can't believe that tbh lol

stiff locust
#

splash logic rewrite/cleanup was not enough to stop me

tepid crow
stiff locust
#

the other one is for custom text on the "saved by mr bones" thing
that would be convenient to have as an inbuilt thing but i doubt it's highly requested

sturdy compass
#

That is very true I'll give you that

wintry solar
tepid crow
#

just a quick example of some breaking smods changes :)

hushed field
#

if start_up then
crash(404)
end

minor furnace
#

the really funny crashes are the ones that completely close out the game without giving you an error log

spring lantern
#

anyway i'm still getting that end of round crash with talisman do i just give up

tepid crow
# tepid crow Sure. If we actually properly notify any mods that target this line beforehand, ...

Very quick list of mods that seem to patch this line with the exact change I proposed (aka would no longer need to patch):

  • Aikoyoris' Shenanigans
  • CardSleeves
  • Grim
  • JamMod
  • Maximus

and a second very quick list of mods that seem to patch this line, with a different patch than I proposed (aka would need to be updated with a new patch):

  • Bunco
  • Cryptid
  • NoFantasy (seems unmaintained)

Neither of these lists are exhaustive; I didn't look that long.

spring lantern
#

i do wanna figure it out cos i still wanna play cryptid from time to time 😭

wintry solar
#

Do they all do the same patch?

analog spoke
#

how would I get this effect to work? (orange is the stuff I hadn't changed yet, first time making a joker in forever btw, also I'm in pre-calc I think, tho I'm not entirely sure what that means)

tepid crow
#

No, I just searched for #G.hand.highlighted > 5 in any toml file, on github and in Dim's modpack

sturdy compass
wintry solar
#

Sounds like a compat nightmare already 🤣

tepid crow
#

Not really

spring lantern
tepid crow
#

We announce we'll patch it in ~1 week (or longer?)

stiff locust
#

being able to play hands with more than 5 cards

wintry solar
#

I mean how do all those mods already work together if they all try and patch it differently

tepid crow
#

they dont lol

sturdy compass
#

lmfao

stiff locust
#

I hook a function for that in tsunami

#

put me on the list put me on the list

tepid crow
#

I'll look at that in a sec haha

analog spoke
spring lantern
analog spoke
#

I think, may have worded it wrong

tepid crow
spring lantern
#

just checked with talisman off and it's fine

tepid crow
mighty trench
#

chat the 'for' limit thing is going to be my downfall if someone could please aid, should it not be an issue

zealous glen
analog spoke
simple mural
#

Hi

pseudo cape
#

does anyone know of any resources outside of the smodded wiki where you can learn how the SMODS.calculate function works? I'm having a lot of trouble with it

zealous glen
simple mural
#

I want to make some idea

#

I need to increase the chances of Negative Edition by 2 times and make the same chance of Tarot and Spectral Cards with Negative Edition appearing in the store for it

tepid crow
wintry solar
stiff locust
#

i should probably still remove the hook after the patch is implemented though?

pseudo cape
tepid crow
simple mural
#

Can anyone help? I just don't know lua, much less the mod API, but I want to make it and play

tepid crow
pseudo cape
#

it might just come from me mostly not being used to the way lua is formatted, but it's just a bunch of garbled code to me

stiff locust
#

does that mean i get to go on the list

tepid crow
#

Why do you want to be on the list so badly 😭

stiff locust
#

all publicity is good publicity

chrome widget
#

How do I check that a card has any enhancement?

tepid crow
modern kindle
sturdy compass
#

Hopefully I will because the less patches in my gargantuan collection the better 😭

tepid crow
modern kindle
#

pro tip fellas if we target literally everything then nobody has to worry if something is patched, because the answer is always 'yes'

chrome widget
#

I'm looking at the docs, which is why I asked

#

has_enhancement asks for a specified enhancement

tepid crow
#

oh any

stiff locust
#

vampire

tepid crow
#

I thought you were asking "how to check if a card has a given enhancement", my bad

chrome widget
#

get_enhancements gives you a table, but also calls the context to add quantum enhancements, which is unnecessary overhead

stiff locust
#

check vampire code

chrome widget
#

Vampire checks if config.center does not equal base, and I wasn't entirely certain that holds true in SMODS code

zealous glen
# pseudo cape just like how to use the calculate funciton, how everything works and how to use...

When coding a Joker, you'll generally want to break down its effect in chunks comprised of a timing and an effect. Inside the calculate function, you'll have to:

  1. Check if the context is correct, to match the correct timing;
  2. Apply the effect itself.

Naturally, you also check for extra conditions.

Some basic effects are built into the larger processes of the game or SMODS, like Jokers granting a simple +Chips bonus, so they can be handled by returning a table with certain keys. More complex effects will need to be coded manually.

Sometimes, even if an effect sounds like it would comprise a single timing, it's easier to break it down into multiple ones.

wintry solar
#

You can do card.ability.set ~= “Enhanced”

pseudo cape
#

been like, looking at other code examples like from the smods examples and some other mods and all, and they're all yknow, fairly well written with everything condensed, I'm gonna try writing it out in more simple functions just to learn though

zealous glen
formal parrot
#

Guys what softwares yall use ?

pseudo cape
#

I use vscode and notepad++ depending on what for because I'm basic

chrome widget
#

VSCode, Git Bash, and the pure sludge within my skull

modern kindle
zealous glen
#

vscode, aseprite, openrct2, miktex,

maiden phoenix
zealous glen
#

I also use sublime text sometimes

modern kindle
#

oh man sublime, i remember using that

pseudo cape
#

also I'm just not used to it I guess

modern kindle
#

i think i was a notepad++ representer when i was doing stuff for gmod like 14 years ago
but then i went to sublime, and from sublime to visual studio, to vscode

pseudo cape
young dew
#

does someone know how i could put this bubble above the achievement text? (ignore the comment lol)

function Showdown.versatility_description(temp_achievement) -- HOLY SHIT this puts the bubble under the achievement text HOW DO I PUT IT ABOVE
    temp_achievement.config.speech_bubble_align = {align='bm', offset = {x=0,y=0},parent = temp_achievement}
    temp_achievement.children.speech_bubble = UIBox{
        definition = Showdown.speech_bubble('ach_showdown_versatility', { ach = true }, { 'belbelebelb' }),
        config = temp_achievement.config.speech_bubble_align
    }
    temp_achievement.children.speech_bubble:set_role{
        role_type = 'Major',
        xy_bond = 'Strong',
        r_bond = 'Strong',
        major = temp_achievement,
    }
end
zealous glen
analog spoke
pseudo cape
#

ooh

#

I didn't even know this was a thing

zealous glen
modern kindle
# analog spoke is this too crazy of an effect?

well when things like cryptid and shit exist 'crazy' has a fairly higher bar id wager

if its always giving a bonus and not chance based id definitely not make it common

this is assuming its always gaining and 0.75 isnt a reduction

analog spoke
#

so it'd be a 25% increase or 25% decrease

zealous glen
weak gate
#

will it restore the cards to 100% values after each round?
if not, in the very long run it'll make all cards weaker since 100 * 1.25 * 0.75 = something below 100

analog spoke
modern kindle
tepid crow
#

maybe cl or something? not sure

#

if you want top I think it's tm??

analog spoke
modern kindle
#

very fair, balance is something ive had to struggle a bit with myself as well
figuring out whats worth a specific tier or not or if something is busted, its only making it to x ante or only works with specific builds

#

im sure my shit is far from perfectly balanced but, theres effort lmao

zealous glen
analog spoke
#

I'll try checking it, I tried once, but was a tad confused

distant grove
#

i made the new thing

zealous glen
#

you could try asking MathIsFun

distant grove
#

{
"id": "",
"name": "",
"display_name": "",
"author": [""],
"description": "",
"prefix": "",
"main_file": "",
"priority": 0,
"badge_colour": "",
"badge_text_colour": "",
"version": "",
"dependencies": [],
}

#

i just copy this into that yea?

tepid crow
#

is that... a folder named Metadata.json?

spring lantern
#

what theç

zealous glen
#

what the cedilla

tepid crow
#

talk about subverting expectations

#

you need it to be a json file

quick moss
#

Hi, this is my first time doing this but I wanted to know what is the updated code so that every time a Tarot card is used, a sound is played

distant grove
#

I’m dumb AHHHHHHH

#

yea

#

what? did i do something wrong😭

#

im

tepid crow
#

ur wifi good? haha

distant grove
#

DUMB AHHHHHH

#

No.

#

Lagging the FUCK OUTTTT

#

Anyways

#

Wait

#

I’m supposed to put it in assets

#

I think

tepid crow
#

no

#

right there is good

distant grove
#

K

#

Now what?

calm dock
#

Im using a Update Function within a consumable to get some previews what Joker youll probably get.
But I currently have an issue, if you look at the Consumable within the Collection, it just crashes since Jokers are always nil.

Any suggestion to check if im within a run / collection view?

buoyant shard
#

what would you guys say is the best resource to learn how to program a mod?

analog spoke
#

I may need to start with something simpler lol
since my last joker made I actually learned a bit of coding (gdscript) and I think my main problem may just be not understanding the code system itself completely
I think it'd help a lot if I had a tool that let me see what a certain part of a line meant like gdscript has, lol

sturdy compass
#

I'm assuming you're using VSC?

simple mural
sturdy compass
analog spoke
tepid crow
distant grove
#

All I needed

#

Was that….

sturdy compass
tepid crow
#

assuming you populated the json file yes

distant grove
sturdy compass
tepid crow
#

as in you filled in the empty stuff in the json file

distant grove
#

How?

#

Oh wait

tepid crow
#

so instead of "author": [""], you have "author": ["PEAK"],

analog spoke
distant grove
#

Nvm

tepid crow
#

etc etc

distant grove
#

Okay

#

Thanks man

#

Time to see if this works

simple mural
#

How can i change the weight of edition? vedalBwaa SMODS

analog spoke
# sturdy compass

oh, I already have it apparently, but what's going on with that warning?

sturdy compass
#

When you open a folder it typically asks you to trust it, and it seems like you have not done that for whatever reason

analog spoke
#

oh 😭 I think I missed it

#

maybe autopilot clicked away from it lol

#

let me reopen them and try doing it then?

gleaming zealot
#

cash

analog spoke
sturdy compass
#

Sweet

#

Yeah definitely be working out of folders instead of individual files. Makes workflow sooooo much easier

analog spoke
#

uhhhhhh

#

why does everything have errors 😭

spring lantern
#

warnings everywhere

#

i kinda just let it be cos it doesnt cause issues

sturdy compass
#

Oh god you opened the entire mods folder? 😭

weak gate
#

what's the function in the code that is run when you win a blind and the game is about to fold all the cards into the deck? before the cashout screen appears

sturdy compass
#

But yeah basically they're just being caused because VSC doesn't realize a lot of things are globally accessible since they're not in the same project

analog spoke
#

ahh

spring lantern
#

such as the entirety of SMODS

#

or the entire game object

sturdy compass
#

or the entire source code

gleaming zealot
#

IntelliJ my beloved

spring lantern
#

so quick question, if i want to trigger a joker effect after all cards have been scored individually but before the main joker stage triggers, how should i go about it?

sturdy compass
#

Oh that's an odd one

spring lantern
#

this is what i just whipped up (completely untested)

zealous glen
spring lantern
calm dock
distant grove
#

why is it saying my comma is a trailing comma

gaunt thistle
#

because it is catHeyHello

#

json doesn't allow for trailing commas

#

for reasons that are beyond my human comprehension

distant grove
#

oh

slender mango
#

so i have this joker
the timer value decreases but when hovering the ui only updates once until i hover again
how should i patch this

rough furnace
#

(the json parser SMODS uses does work with them, but this violates the spec)

distant grove
#

so like how i fix this

rough furnace
#

delete the trailing comma

distant grove
#

Don’t I need a comma for the code?

rough furnace
#

only if theres another element after it

#

(a non-trailing comma)

distant grove
#

Well I need to put the name so uhhh

rough furnace
#

then write the name

distant grove
#

So no comma and we should be fine?

rough furnace
#

no comma on the last element

distant grove
#

Okay

#

Oh

spring marsh
#

Joker on left: Michelle
Create a random Legendary Joker when blind is selected (must have room) (intentionally unbalanced) (probably works better if you enable other mods)

rough furnace
#

(make it a common)

forest ivy
#

'Create a random Legendary Joker when blind is selected'

#

holy cow

#

make it mythical

#

💔

spring lantern
#

exotic

spring marsh
# spring marsh

Joker on right: Hyehehe
Wild cards count as all ranks (be careful around five of a kinds and flush fives)

spring lantern
#

do they not count as all suits already

spring marsh
#

oops mistyped

forest ivy
#

steel card's count as a steel card

spring lantern
#

ohh

spring marsh
#

Sorry for the miscommunication

spring lantern
#

hack my buskin actually viable with this joker

turbid maple
#

jimbus company!!!!!

distant grove
#

finally

#

pls fucking work

#

im begging

spring lantern
#

should probably remove those template dependencies

turbid maple
#

youre not supposed to actually have those deps

distant grove
#

...

#

oh

#

welp

spring marsh
spring lantern
#

just keep steamodded

distant grove
#

thats it?

#

thats probably what i just need

#

?

spring lantern
#

and remove conflicts and provides

#

oh and lovely mb

distant grove
#

ok

turbid maple
#

i mean this with zero snark but it will help if you try to understand what youre copying and pasting

distant grove
#

yea

#

fair

spring lantern
spring marsh
#

Making Michelle exotic would require me to add the exotic rarity and also gateway so

distant grove
#

much cleaner

#

well

#

damn

spring marsh
analog spoke
#

to put into fake code terms, so I know what I need to figure out how to do in Lua in order for this joker to work #💻・modding-dev message

Context.blindSelected
For each 1 in jokers_affected
Select 1 random joker without immutable from joker slots, = CurrentSelectedJoker
Random Roll 1 or 2
If Roll = 1, CurrentSelectedJoker.config.extra =* good_value
If Roll = 2, CurrentSelectedJoker.config.extra =* bad_value

spring marsh
#

Now I just need to learn how to mod Balatro

distant grove
#

hope you do better than me😭

spring marsh
#

Oh yeah and make some more jokers for the mod

spring lantern
#

the pain begins once again... my shit dont work

distant grove
#

is there any example metadata i can find

#

nvm

spring lantern
#

this is the same mf that had me stumped for over a week only for me to realise that i had to update smods 🥲

spring lantern
#

oh jesus

#

thanks

#

i'm still in the eval this mindset

quartz ravine
distant grove
wintry solar
#

That’s not even valid eval this though

distant grove
#

this look fine or no

spring lantern
valid stone
#

Is there someplace I can look for a crash-course intro to creating a balatro mod? I'm already an experienced developer in general

frosty dock
# distant grove

you misspelt dependencies. on that note, i would recommend setting a steamodded dependency of at least the version you developed the mod on, else there's no point in having it at all

distant grove
#

so like SMODS.dependcies?

frosty dock
#

no, i mean setting the steamodded dependency not as (>=1.*) but as the version you are using when making the mod

distant grove
#

OHHHH

#

IM DUMBB LOLLLL

frosty dock
#

e.g. (>=1.0.0~BETA-0303a)

distant grove
#

thats the current one?

frosty dock
#

yeah

distant grove
#

thank you👍

spring lantern
distant grove
#

idk

#

np

analog spoke
#

does anyone have a joker file for, like, the base 4 mult joker? I think it may be easier for me to work off of a simpler joker

turbid maple
#

There's some introductions and links to example mods that implement various things

valid stone
analog spoke
turbid maple
#

love the cat image that gets embedded always

valid stone
#

Thank you I'll check it out.

spring marsh
#

I don’t like how cryptid requires me to downgrade steammodded

turbid maple
#

Do note documentation is far from complete and often you'll be digging through source codes

spring marsh
analog spoke
#

what is loc_vars for? without context I'd assume it'd do what config does, but config exists and loc_vars has a tad more to it than just a list of variables it appears

frosty dock
frosty dock
#

the config table by itself doesn't come with any order, and sometimes you pass things as variables that are not just config values

buoyant shard
#

Both values show up in both spots instead of one and the other and I don't know how to fix it

SMODS.Joker {
key = 'swords',
loc_txt = {
name= "Swords",
text = {
"Spades held in hand add {X:mult,C:white}x#2#{} mult",
"Resets at the end of the round",
"{C:inactive}(Currently {X:mult,C:white}x#1#{C:inactive} mult)"
}
},
atlas = "WombatsObscure",
pos = {x = 0, y = 0},
soul_pos = {x = 1, y = 0},
rarity = 4,
cost = 20,
config = { extra = {Xmult = 1, Xmult_gain = 0.75}},

zealous glen
#

loc_vars?

buoyant shard
#

loc_vars = function(self,info_queue,center)
return {vars = {center.ability.extra.Xmult, center.ability.extra.Xmult}}

clear epoch
#

well there u go u used Xmult twice instead of Xmult_gain

ivory coral
buoyant shard
#

thanks guys

ivory coral
#

no worries it just happens

clear epoch
#

does smods override the cards_destroyed context and if so what should i use instead?

#

i have a joker that's similar to caino but it won't trigger no matter what

ivory coral
chrome widget
#

Hmm, I'm trying to implement a card behavior that "retriggers all scored enhancement effects". However, I'm not sure how possible this is to future proof it for mod compatibility

#

In vanilla, scoring enhanements are Glass, Lucky, Stone, Bonus, and Mult, so I could easily program those in by name

#

But that would be restrictive

clear epoch
#

and i just tried it and that's what ended up happening

ivory coral
clear epoch
#

that's why i asked if smods somehow overrides that

sturdy compass
#

I believe it does

ivory coral
clear epoch
ivory coral
#

im not sure if it exists but you could at least find out by adding something benign like a print() in context.cards_destroyed right

#

also maybe try context.remove_playing_cards

clear epoch
#

i just solved it myself by looking in smods source code, there's context.removed which is a table that holds destroyed cards

#

so i ended up just checking if context.removed which is honestly probably not the intended use case but works nonetheless i suppose

ivory coral
#

neat if it works it works

clear epoch
#

indeed

#

but why are there so many card removing contexts ;-;

woeful tusk
#

Is it possible to ban enhancements? like in a challenge deck ban glass cards appearing from standard packs or from incantation aside from just banning justice

clear epoch
#

i believe G.GAME.banned_keys is for that

#

and you put "m_glass" in there

distant grove
#

anybody know what to do next or to fix anything?

woeful tusk
distant grove
#

My lag

#

Is selling

#

I sent the img and msg two whole minutes agoegg

#

FINALLY

#

anything to uhh change or fix?

#

because the mod is still not appearing in the game

#

lol

turbid maple
#

¯\_(ツ)_/¯

#

whats the folder structure and do you see any error messages in the console

distant grove
#

nope

#

everything seems fine

ivory coral
# distant grove

i take it this is in your Balatro\Mods\jimborjulez
you can load other mods fine?

distant grove
#

yea

distant grove
#

wait

#

i might be a dumbass

ivory coral
#

i think it has to match the id

distant grove
#

im

#

uh

#

hmm

#

nope still dont see it

ivory coral
#

oh thats odd
youre sure theres no typos or anything

rough furnace
#

check logs

ivory coral
#

as long as the id in the folder name and the id in the json are the same it should work
just to be sure too, you have a steammodded version that supports the json metadata system, yes?

distant grove
rough furnace
#

when it fails it logs

distant grove
#

its just

#

not there

#

at all lol

rough furnace
#

show logs

ivory coral
# distant grove

this image seems to me like your file structure is still wrong
the folder that has your main.lua and json file should have the same name as your mod's id

rough furnace
#

the name doesn't need to match

ivory coral
#

oh does it not

rough furnace
#

no

ivory coral
#

nvm me then

distant grove
#

i press cmd shift p than type in show logs yea?

#

in vscode

rough furnace
#

no\

distant grove
#

oh

rough furnace
#

they should be in Mods > lovely > log or printed when running the game in the temrinal

distant grove
#

oh yea

rough furnace
distant grove
#

ah

rough furnace
#

you shouldn't have a header and json file

distant grove
#

i dont see a header in main.lua

rough furnace
#

did you save the file?

distant grove
#

which?

rough furnace
#

all of them

distant grove
#

i dont remeber

#

i can save them rn

ivory coral
#

double check main.lua that it doesnt have a header, then save it and reload the game

distant grove
#

k

analog spoke
#

the game isn't able to grab my joker's atlas for some reason (didn't finish the effect yet, just wanted to see if the joker appeared correctly ingame)
anything wrong here that you can notice?

rough furnace
#

the atlas would have your mods prefix on it

#

you can also save the result of calling SMODS.Atlas to a variable then go atlas.key

#

oh wait

distant grove
#

still doesnt appear in my mods

rough furnace
rough furnace
distant grove
analog spoke
#

this is what it says in game

rough furnace
distant grove
#

the latest one

#

i believe

#

wait

rough furnace
#

give the number

distant grove
#

oh

#

i think i left the older version ij

#

when i played cryptid

analog spoke
#

what it looks like after updating it to have my mod prefix (if i understood currectly lol)

distant grove
#

alr now it shows this

ivory coral
distant grove
#

im a dumbass

#

and forgot to switch😭

#

im sorry fellas

ivory coral
#

now its just fixing your code a bit
its SMODS.Atlas

ivory coral
distant grove
#

uhh

#

i replaced SMODS.ATLAS as SMODS.Atlas

#

and it happend.

#

again

ivory coral
#

also i think key, path, px, and py shouldnt be capitalized

distant grove
#

oh

ivory coral
distant grove
#

yea

ivory coral
#

because its still reading ATLAS apparently which is odd if you replaced it

rough furnace
#

also nice mod id

distant grove
#

alr now its saved

distant grove
rough furnace
#

you

distant grove
#

uh thanks?

rough furnace
#

I was being sarcastic

distant grove
#

ah

#

cant tell

analog spoke
tender python
#

hello I was wondering if theres code anywhere for blueprint/brainstorm effects?

distant grove
#

im getting closer

#

hopefully

analog spoke
distant grove
#

fr😭

#

you mod before?

ivory coral
#

convergent evolution of errors

distant grove
#

frfr

#

we burning out with this one

ivory coral
#

confirm that path is the directory of your spritesheet starting at assets?
so if its assets/Jokers.png your path should be path = 'Jokers.png'

analog spoke
# distant grove you mod before?

me? kind of, I tried before, and ended up making a single simple joker which I think gave mult whenever you scored a spades card but then I stopped lol 😭

distant grove
#

dont worry we'll get through this war

#

after i have 10 grand children

analog spoke
#

I believe in you/us

distant grove
#

the two same pngs but different width and heigh

#

should be in both of these yea?

ivory coral
distant grove
#

and both should be called Jokers.png

ivory coral
#

yes

distant grove
#

hmm

ivory coral
#

2x at 2x scale

distant grove
distant grove
#

this path SEEMS right

ivory coral
#

it does

buoyant shard
#

My joker that triggers on reroll isn't triggering

SMODS.Joker {
key = 'limbo',
loc_txt = {
name= "Limbo",
text = {
"Each joker gives +{C:chips}#1#{} chips",
"Creates a {C:attention}negative tag{}",
"after 4 shop rerolls",
"{C:inactive}(Currently {C:attention}#2#/4{})"
}
},
atlas = "WombatsObscure",
pos = {x = 4, y = 0},
rarity = 1,
cost = 2,
config = { extra = {chips = 30, cooldown = 0}},
loc_vars = function(self,info_queue,center)
return {vars = {center.ability.extra.chips, center.ability.extra.cooldown}}
end,
calculate = function(self,card,context)
if context.other_joker then
return {
chip_mod = card.ability.extra.chips,
message = '+' .. card.ability.extra.chips,
colour = G.C.CHIPS
}
end
if context.shop_reroll then
card.ability.extra.cooldown = card.ability.extra.cooldown + 1
if card.ability.extra.cooldown < 4 then
return {
message = 'Close The World!'
}
else if card.ability.extra.cooldown == 4 then
card.ability.extra.cooldown = 0
add_tag(Tag('tag_negative'))
return {
message = 'Open The Next!'
}
end
end
end
end
}

distant grove
#

holy moly

distant grove
#

uhh

distant grove
analog spoke
#

and atlas

distant grove
#

this is my png

#

loll

analog spoke
quartz ravine
#

Anyone mind reviewing one of my new jokers?

It is working to add new cards but it has two issues

A. The card gets added to the deck, not my hand, and the real issue
B. The animation is super weird.

The second the hand goes to be scored, I can see the count of cards in my deck increase. It doesn't go along with the joker saying 'COPIED'

analog spoke
#

my potion and her 14 mr bones

distant grove
#

i was going to do them individually

analog spoke
#

there's a couple ways I've seen it, but this is the most common

distant grove
#

huh

ivory coral
distant grove
#

ok

analog spoke
#

one I saw had a giant string of just 1 column of jokers

distant grove
#

but how would the game know to go to another picture for another joker?

quartz ravine
#

PEAK - you use pos x,y to say which picture to use.

distant grove
#

oh

quartz ravine
distant grove
#

OHHHHH

#

i see i see

quartz ravine
#

here's my card with the weird appearing logic problem if anyone ways to be a saint

analog spoke
#

here, so 0, 0 is the potion

ivory coral
#

you have a sheet of sprites, the atlas px and pytell how long and wide each individual sprite is, pos when defining jokers tells it which sprite to use

distant grove
#

waittt

#

did i not put pos.

#

💀

ivory coral
#

i think in theory you dont have to (it should still load just without a sprite) but you can try that

distant grove
#

k

ivory coral
#

atlas = '<your atlas key>
pos = {x = <x position>, y = <y position>}

#

in your SMODS.Joker{}

distant grove
#

thanks

analog spoke
#

mine from the atlas to the pos

buoyant shard
#

I'm playing a test run of that joker I posted earlier and I've been rerolling to my heart's content but now I have four copies

distant grove
#

so whats the problem with me and railgun ;lol

buoyant shard
#

two just showed up at the same time

#

how is this possible?

distant grove
#

yea

analog spoke
#

this is my crash

distant grove
#

seems like we're having the same thing LOL

ivory coral
#

imma try and read the files and see whats going wrong at line 363 one sec

distant grove
#

k

quartz ravine
#

Does anyone see what I am doing wrong here? The copied card ends up in my deck, not in my hand like DNA does

if context.cardarea == G.play and context.other_card and context.other_card.ability 
    and context.other_card.ability.name == 'Gold Card' and not context.repetition then
    --card is golden, roll to see if we copy it
    if pseudorandom('goldretriever') < G.GAME.probabilities.normal / card.ability.odds then
        --we are copying it
        sendInfoMessage("LuckY! Copying this card", "goldenRepeater")
        --old logic, restored
        G.playing_card = (G.playing_card and G.playing_card + 1) or 1
        local _card = copy_card(context.other_card, nil, nil, G.playing_card)
        _card:add_to_deck()
        G.deck.config.card_limit = G.deck.config.card_limit + 1
        G.deck:emplace(_card)
        table.insert(G.playing_cards, _card)
        playing_card_joker_effects({ true })
        card_eval_status_text(context.blueprint_card or card, 'extra', nil, nil, nil,
            { message = localize('k_copied_ex'), colour = G.C.FILTER })
mystic river
#

G.deck:emplace(_card) should be G.hand:emplace(_card)

#

i believe

buoyant shard
#

about my "bug" where I kept getting duplicate jokers... I forgot I had showman

woeful tusk
ivory coral
# distant grove k

ok so somewhere your atlas image isnt right
make absolutely sure that in Mods/<your mod>/assets/1x there is a file called Jokers.png

distant grove
#

both have the right names

ivory coral
#

theres no file extension stuff going on right

#

its not secretely .png.png

distant grove
#

nope

#

wait

#

what if it was

#

yea nope same crash

analog spoke
#

whatever this means

ivory coral
#

path wants the whole filepath including the extension (.png, .txt, whatever)
idk if you have it so that it shows those in your file explorer

ivory coral
analog spoke
#

for the .png.png thing

ivory coral
#

ooh
no that looks good to me i think

distant grove
#

my mac lets me have the choice to turn the thing into a png

#

so i dont think its with that

quartz ravine
analog spoke
#

the only thing I can think of that links us here might have to do with our steammodded version? as I recall PEAK saying that they had to lower their's to play cryptid and I play jens almanac

quartz ravine
#

I am still having a weird issue with the copied card appearing as soon as scoring starts, it does not wait until the individual card is being scored

#

OH I wasn't in context.individual

ivory coral
#

maybe having both new and old smods messed it up or something? i honestly have no clue

analog spoke
#

only thing on mind is, if that's the problem, why weren't the other mods doing it as well and only our own?

distant grove
#

hmm

ivory coral
#

well peak doesnt seem to have any other mods enabled atm but idk about you
cant hurt to try though
i went looking for this error in the server and apparently its fixed itself on at least one occasion so it cant hurt to try basically whatever

#

usually its because an image path or name was wrong though

#

but i dont see that here though

analog spoke
#

I honestly have thought of making the mod on a newer version first, tho I'd have to at least go to a version that still has cryptid and talisman, cuz they have certain features I'd like to be able to use

ivory coral
#

or so ive heard

errant fulcrum
#

I'm struggling to find resources on coding custom jokers / syntax for this game. Does anyone know where I can find something?

mellow sable
#

ye

#

Cryptid is no longer behind the curve

distant grove
#

i dont remeber

analog spoke
#

😭

distant grove
#

mhm

ivory coral
errant fulcrum
#

Wow, thats exactly what I've been looking for

analog spoke
#

uhh, ok so, I'll try moving to a new version and see if that works, then update y'all I guess?

#

tho it took so long to update the first time :<

distant grove
#

it does?

analog spoke
#

idk, maybe just a me problem lol

#

my 2 antiviruses fighting like animals over the peice of steak that is new versions of this mod loader lmao

ivory coral
analog spoke
#

welp, I'm off to check what the most recent cryptid uses

rough furnace
#

@analog spoke if you still are having issues can you try adding the following to your mod before the atlas and then showing what it prints:

print(NFS.newFileData(SMODS.current_mod.path .. "assets/2x/noitro_atlas.png"))
ivory coral
analog spoke
analog spoke
rough furnace
analog spoke
#

ok, it's in! where do I check for the print? I'm looking in the crash log but can't see it there

distant grove
#

like this yea?

rough furnace
distant grove
#

heres mine

analog spoke
red flower
buoyant shard
#

are there context for gaining and losing jokers?

ivory coral
red flower
buoyant shard
#

Now I have to redesign a joker I guess

red flower
#

I mean you can make your own

rough furnace
# analog spoke

are you able to update DebugPlus (it has a bug in the current version preventing me from seeing the log I need)

analog spoke
#

I think I can disable it

distant grove
#

i put debug plus in mods yea?

ivory coral
distant grove
#

ah

#

okay

analog spoke
#

😭 it's not wanting to upload it this time, it just says processing

distant grove
#

dang

analog spoke
#

oh hey!

analog spoke
rough furnace
#

yeah but it's not that helpful

#

ensure the path is C:\Users\colem\AppData\Roaming\Balatro\Mods/noita_cards/assets/2x/noitro_atlas.png

analog spoke
#

other than the reversed dash halfway through, yes

rough furnace
#

can you click properties on the file?

analog spoke
#

what I'm I doing/checking for inside?

rough furnace
#

send screenshot

analog spoke
rough furnace
analog spoke
#

not sure how much having it will help, but thought I'd send it in

distant grove
#

💀

ivory coral
distant grove
#

the minorest of spelling mistakes ruining 5 hours of my life moment

#

but my things are all 2x

#

so UHHH

analog spoke
distant grove
#

did it work

#

huh

analog spoke
#

it worked

#

it opened

distant grove
#

finally

#

now to uhh

#

fix mine.

ivory coral
#

one crash down one to go

analog spoke
#

it was literally minor spelling mistake lmao

ivory coral
ivory coral
#

but it should be Balatro/Mods/<your mod name>/assets/1x or 2x/Jokers.png

distant grove
#

and where do i put that

#

oh wait

ivory coral
#

you dont put that anywhere its just where it goes

distant grove
#

honestly yea

woeful tusk
#

Is it possible to ban enhancements? like in a challenge deck ban glass cards appearing from standard packs or from incantation, familiar or grim aside from just banning justice
i got helped on the balatro discord with G.GAME.banned_keys but that doesnt seem to work

analog spoke
#

non-crash related lol
something's off about this sprite right? something with the outline? can't put my finger on what exactly

distant grove
#

hmm

rough furnace
#

show assets folder

distant grove
#

ok

rough furnace
#

also that atlas in the jokers is invalid

distant grove
#

ah

#

what should it be?

analog spoke
#

just Jokers I believe, same as the key I think

#

no <>

distant grove
#

im a

rough furnace
distant grove
#

the 1x

#

the 2x

ivory coral
distant grove
#

okay

#

so erm

#

yea idk

rough furnace
#

and show the folder with assets in it

distant grove
rough furnace
#

like the contents of it

distant grove
#

oh

cunning bridge
#

Wilson's patience is beyond any I've ever seen 😭

distant grove
#

ong

#

im sorry for making you guys do this for hours😭

analog spoke
ivory coral
distant grove
#

yea

analog spoke
#

omg, that's my dream, can't wait till I'm at the "helping someone for hours" level of coding knowledge

cunning bridge
#

sounds awful

analog spoke
#

WHAGSHDAGWHAAHGA

ivory coral
# cunning bridge sounds awful

its strangely cathartic when it comes together though
theres something nice about helping someone out with something they want to do

distant grove
#

after this im finishing my hw

#

than going to bed

#

and finishing the other dumb jokers and blinds and consummables i wanna add

#

because i love lor

#

oh boy i hope i dont have the slightest spelling mistake

ivory coral
#

we'll be seeing you again soon then i presume lol
tip here though, try and take inspiration and knowledge from other mods and the vanilla code when you can, it can help you learn a lot

distant grove
#

okay

#

👍

#

now to uhh

#

fix this crash.

rough furnace
#

as a sanity check can you open the terminal and run find "/Users/icecreamking12e3/Library/Application Support/Balatro/Mods"

distant grove
#

ok

#

it just

#

uh

#

that

rough furnace
#

send me the entire thing

distant grove
#

permission...denied????

rough furnace
#

like the output of the command

distant grove
#

big ass

#

word

rough furnace
distant grove
#

eh?

rough furnace
#

2x.png

distant grove
#

.

ivory coral
#

2x.png...?

distant grove
#

the fuck

#

why is it 2x png😭

#

and how the fuck

#

did a file turn into a png😭

primal shoal
#

file it should be a folder right?

distant grove
#

yea

#

mb

#

too tired to fix my spelling mistakes

ivory coral
#

im not sure how exactly 2x is a png

sturdy compass
#

Anyone know off the top of their head of any mods with good config menus that I can reference? I think I just need a simple list of buttons/checkboxes for mine

tender python
#

hello, trying to make diamond suit count as all suits but its not being functional in game, any advice?

rough furnace
ivory coral
rough furnace
#

DebugPlus sounds more your style but I have a system to avoid writing config stuff

primal shoal
rough furnace
#

talsiman is probably a good one

tender python
distant grove
#

sisyphus moment

#

chat is this my punishment for something i dont remeber😭

analog spoke
#

maybe the folder is just named "2x .png"? if that's the case it may be fixable by just renaming it to "2x"

distant grove
#

nope

#

its 2x

#

just that

analog spoke
#

oh, huh... that's... bizarre

distant grove
#

through some will of god it manifested into a png

primal shoal
analog spoke
distant grove
#

oh no

#

nvm

rough furnace
#

I bet finder is doing some weird shit

distant grove
#

loaded safeuly yea

#

so yea.

tender python
primal shoal
#

oh your using it for the calulate

distant grove
#

me trying to figure out how the FUCK my folder turned into a png

tender python
rough furnace
#

you named it wrong

#

probably

distant grove
#

possibly

#

its seems to be just 2x in assets'

#

hmm

primal shoal
ivory coral
#

theres certainly a way to do that but idk how

quasi jewel
#

messing with enhancements
why is it error,,

distant grove
#

im going to listen to carmen and DISTORT

#

anyways uhh

ivory coral
weak gate
#

is there any event that is called when my joker changes position in the jokers list?

quasi jewel
ivory coral
#

should be smth like

  Enhanced = {
    m_<prefix>_<enhancement key> = {}
etc```
tender python
quasi jewel
#

forgot the loc_txt={}

ivory coral
#

in your localization file

quasi jewel
#

i should probably make a separate localization file

ivory coral
#

if it doesnt work then do that

ivory coral
#

your folders are just haunted

distant grove
#

idk

#

THIS LITTLE FUCK.

#

WHY THE FUCK

ivory coral
#

oh my god.

distant grove
#

I WILL ACTUALLY GO INSANE

distant grove
#

and it still

#

did not

#

FUCKING