#💻・modding-dev

1 messages · Page 158 of 1

wintry solar
#

No it applies nothing

worthy stirrup
#

or can i leave it empty and it will just add no effects

#

oh

#

i must have misread or misunderstood

vital rapids
#

Yes

tepid crow
#

Like a wise man once said: "run and find out"

worthy stirrup
#

it was weirdly easy to make this work

#

wheres the crashes, i cant have made it work first try

wintry solar
#

stakes are pretty easy tbf if they're only simple

worthy stirrup
#

yea, but knowing me, theres a very niche crash out there

#

okay, its not appearing now, am i forgetting to close something? I only edited the loc_text and now its gone

cedar stream
#

how does one make it so a joker can appear multiple times even if you have on already

tepid crow
#

Should be in the docs

orchid thunder
#

How do playing cards work

#

Is I do



end```
#

Then is context.full_hand[i] the card object

worthy stirrup
tight thistle
#

the sound at the end might be a bit too loud

worthy stirrup
#

I dont understand, what iscausing it to not work

#

it was working just fine a minuite ago

#

wait

#

IT ADDED BACK THE FUCKING IGNORE

#

is G.GAME.edition_rate added or multiplied to base amount

violet void
#

I made it work, but I had to go the lovely patch way

[[patches]]
[patches.pattern]
target = "card.lua"
pattern = '''
                elseif self.config.center.consumeable and self.config.center.demo then 
                    self.children.center = Sprite(self.T.x, self.T.y, self.T.w, self.T.h, G.ASSET_ATLAS["Tarot"], G.c_locked.pos)
'''
position = "after"
payload = '''
                elseif not self.params.bypass_discovery_center and _center.set == 'Alignment' and not _center.discovered then 
                    self.children.center = Sprite(self.T.x, self.T.y, self.T.w, self.T.h, G.ASSET_ATLAS[_center.atlas or _center.set], 
                    (_center.set == 'Alignment' and {x=1,y=0}))
'''
match_indent = true




# Set Alignment undiscovered desc
[[patches]]
[patches.pattern]
target = "card.lua"
pattern = '''
    if not self.bypass_lock and self.config.center.unlocked ~= false and
    (self.ability.set == 'Joker' or self.ability.set == 'Edition' or self.ability.consumeable or self.ability.set == 'Voucher' or self.ability.set == 'Booster') and
    not self.config.center.discovered and 
    ((self.area ~= G.jokers and self.area ~= G.consumeables and self.area) or not self.area) then
        card_type = 'Undiscovered'
    end    
'''
position = "after"
payload = '''
    if not self.bypass_lock and self.config.center.unlocked ~= false and
    self.ability.set == 'Alignment' and
    not self.config.center.discovered and 
    ((self.area ~= G.cs_alignments and self.area) or not self.area) then
        card_type = 'Undiscovered'
    end    
'''
match_indent = true```

Do let me know if there's a better way (it wouldn't work before because vanilla code specifically checks if center is either Joker, booster, or consumable so my center being "alignment" never passed the if checks)
worthy stirrup
#

how could i replace the base game shaders with my own?

languid mirage
#

or hook Game:start_up()

#

and override self.SHADERS[shader_name]

#

for the ones you want

worthy stirrup
#

oh, im not sure if i want to try that in case i break something

#

thanks though

#

and also, is there a way to make it so Legendaries can be in the shop

tall wharf
#

uhm lmao

plush linden
#

whats 9 +10

tall wharf
#

910

mint totem
#

Can someone please help me I can’t get version.dll into the steam file been trying to fix it myself for 1.5 weeks now and I am officially lost

worthy stirrup
#

do you own a legit copy

mint totem
#

Of course I do

worthy stirrup
#

why not verify the integrity of the files

mint totem
#

I have done this every single day for the past 1.5 weeks and nothing has changed I tried reinstalling Balatro and changing the permissions on the Balatro steam files and nothing has worked so far

worthy stirrup
#

Can i see a photo of the files

wintry solar
#

Have you added the exclusion in your anti virus?

mint totem
#

Yes and yes

topaz sun
#

Is there a way to set an incompatibility with smods the same way you can set a dependency? As in make the mod not load itself if the specified mod is present?

candid cloak
#

What's the code for reserved parking jimbo

mint totem
worthy stirrup
wintry solar
#

Ah the classic phone camera screenshot

candid cloak
worthy stirrup
mint totem
#

2379780

candid cloak
#

Is the code long

worthy stirrup
#

and is there nothing under the .txt file

mint totem
#

No that’s all the files

worthy stirrup
#

when you first ran the game, did it ask for admin privileges

mint totem
#

No but when I try to insert version.dll it does

worthy stirrup
#

if you try to run it with it does it, or only when you try to insert it

mint totem
#

Only when inserting

worthy stirrup
#

are you able to insert it or does it not let you if you dont grant permission

mint totem
#

It starts inserting but doesn’t show up in the end

worthy stirrup
#

check if your anti virus is killing it

mint totem
#

Turned off antivirus completely and it still doesn’t work

worthy stirrup
#

im stumped

#

maybe contact steam support?

mint totem
#

I’ll try

edgy mountain
#

hi, so i wanted to add an animation to a joker effect?

#

looks like this now

#

i wanted the cards to flip and change rank before flipping back

#

had some difficulty with the event manager

#

wrong code wait

mint totem
#

What do I click

tall wharf
#

how do i spawn a ui box in play area

mint totem
#

It all brings me to the same Balatro merchandise website (except for the forum that brings me to Reddit)

tall wharf
#

like does it show

#

⚠️ virus detected

mint totem
#

No

tall wharf
#

or does the file just

#

disappear

mint totem
#

It just disappears

tall wharf
#

what antivirus do you use

mint totem
#

Bit defender

tall wharf
#

disable that then

#

make sure it is disabled

mint totem
#

I did

tall wharf
#

and also

#

windows defender might be doing it

mint totem
#

It doesn’t pop up anywhere

tall wharf
#

was the file removed by bitdefender or windows defender

#

do you know that

#

have you checked quarantined files in bitdefender and windows defender

mint totem
#

No it asks for admin permission and when I try to do it with admin permission it doesn’t work and when I try it without it disappears without notification

wintry solar
#

this is definitely defender eating it

tall wharf
#

defender moment i guess

mint totem
#

But I turned it off completely

#

It’s also not in the quarantine or anywhere

wintry solar
#

are you sure you turned defender off

mint totem
#

I deactivated everything

tall wharf
#

i do need some help regarding adding UI to the play area

last sentinel
#

Is there a good native way to add a card TO the played hand before scoring? (like a DNA type but it adds to the played hand not the held hand)

last sentinel
#

yeah, if played hand is 4 cards or less add copy of random played card into played hand

cedar stream
#

oh like add it to the hand that is being played

last sentinel
#

yes, pre-score

cedar stream
#

so like if you are playing a 4oak it would become a 5oak

last sentinel
#

or a two pair would become a full house

#

or a high card would become a pair, possibilities are endless 🥳 (EDIT: not endless, like 12 possibilities max)

cedar stream
#

well if we do it in steps have you know how to create a copy of a random card in played hand to hand

faint yacht
#

Create said _card, _card:add_to_deck() table.insert(G.playing_cards, _card), G.play.cards:emplace(_card) would be the gist of it... but for recalculating the played poker hand, not so sure-

cedar stream
#

^^^

last sentinel
#

Yeah i could maybe just manually change the hand-type instead of recalculating?

violet void
#

you dont need to recalculate if you add a context before the calculation

cedar stream
#

is there a mod that adds a ui box above the consumable area, or occupies that small space?

violet void
#

above the consumable area is out of screen

#

ah I see that small gap

cedar stream
#

no as in here

violet void
#

none that I know of

cedar stream
#

ok

maiden phoenix
#

Unless it's between the joker and consumable area I forgot

tall wharf
#

how do i add discarded card back into the deck

old bane
#

okay so i'm trying to think up ideas for a joker replacement mod (based off of paper mario enemies), and since there are so many spiked enemies, I wanted them all to have some trait that they share, so they can synergize off of each other. Are there examples of mods that have a similar sort of idea to mine that can give me some pointers?

cursive glade
#

I feel like I'm overcomplicating things here. Is there a simple way to check if a joker is available, then put it in the joker slots? I'm trying to make a deck that always starts with a specific joker if it's been unlocked & discovered.
I've tried create_card(), add_card(), and G.jokers.emplace(), but nothing seems to be working so far.

cedar stream
cursive glade
#

I'll take a look. thanks!

viral stream
#

i've been trying to make an edition that retriggers a joker if it has this edition and i just can't get it to work, i was told about the retrigger_joker_check = true flag but i have no idea where to place it

    loc_vars = function(self, info_queue)
        return { vars = { self.config.repetitions} }
    end,
    calculate = function(self, card, context)
        if context.retrigger_joker_check then
            return {
                message = localize('k_again_ex'),
                repetitions = self.config.repetitions,
                card = self
            }
        end
    end
fallen pelican
#

trying to make a joker that checks held glass cards in hand and retriggers cards for each glass card... probably an order of things issue but rn my local variable updates too late, like it updates after the check in the repetitions context is already made

long sun
old bane
#

Would it be possible to differentiate when a Lucky card triggers its $20 effect vs its +20 Mult effect?

tall wharf
summer shard
tall wharf
summer shard
cedar stream
#

yes

#

it is on their github

summer shard
#

Ohhh I see in the bio, sick

old bane
#

Also what do y'all think of the wording of this Joker:

Change the rank and suit of all played cards into the rank and suit of the leftmost played Steel card. (Only activates if at least one Steel card is played)

summer shard
cedar stream
#

has a discord and the latest commit is only compatible with new calc, but if you play old calc, i would appreciate it if you test the 0.8.4 release as after i push out the 0.8.5 release i need to fix stuff in 0.8.4 so it works with old calc

modern kindle
# tall wharf

How are you handling existing words or not? Are you making it so if a word doesn't exist in your dict it doesn't eat a hand or is it just kaput

tall wharf
#

it becomes a high card

modern kindle
#

Icic
And to win i presume you just have to guess the word in 6 hands or however many hands you have

summer shard
cedar stream
#

if you run old calc yes, or join the discord server so then others would also be aware that it is known

summer shard
#

Also thank you guys for putting all this work in for free mods, it's pretty cool of y'all to give stuff like this to the community. I appreciate it heavily

cedar stream
#

or the thread for cross mod content in the cryptid server

tall wharf
#

maybe when i figure out how to put the card back in the deck

tight thistle
#

anyone know how to make an event give a specific joker?

tall wharf
#

i think i should add "if letter in word keep as many copy as needed in the deck when play/discard"

#

notice the score having fire but round is still not over

modern kindle
#

Yea i see that, maybe you could add a on discard just add those cards to deck
But I suppose with so many discards that bloats the deck
Or could make it so cards discarded are destroyed and you just create new ones that are added to deck

tall wharf
#

i don't know how this behaves with the mod that allows you to continue playing even when you achieve the scoring

tall wharf
#

idea

#

creates negative copied of alphabet cards for every letter played

#

perfect for mass deck manip

modern kindle
#

That's works actually yea

#

On round end just destroy all negative letters

#

Ezpz

#

Lmao

viral stream
tall wharf
#

idea

snow valve
#

does anyone know where tarot odds are stored? say I want death to appear twice as often

tall wharf
#

making a new sticker just for those

#

self destructs at the end of the round

modern kindle
#

Hell yea
We love things that explode themselves

tall wharf
#

i can get more creative with this thing

#

just you wait

modern kindle
#

Yea I've been glancing there as you've been working
You're doing a stellar job so far I wish I could help with your questions when you have them lmfao

tall wharf
#

need feedback

snow valve
modern kindle
#

I'm only 3 days into modding this myself so I'm still learning
I'll take a gander at playing it soon ™️ to give you some proper feedback

tall wharf
#

letter deck sleeves

#

the letter deck is kinda difficult tho

#

it doesn't scale that well

#

because not enough jokers support it

modern kindle
#

Then you just gotta make some so if people build around letters it's easier

tall wharf
#

i already implemented a joker that gives you what you spelled

modern kindle
#

You can have some that mult for consonants, vowels used
For length of word
'Complexity' of word
Or if the letter is a less common letter used for words
You can have quirky things like if they spell something it'll take x% from the blind

old bane
modern kindle
#

All sorts of ideas

viral stream
# snow valve can I see your code for question 1
    config = { extra = { Xmult = 1.6} },
    loc_vars = function(self, info_queue, card)
        return { vars = { card.ability.extra.Xmult} }
    end,
    calculate = function(self, card, context)
        if context.individual and context.cardarea == G.play then
            if context.other_card:get_id() == 6 then
                return {
                    card = context.other_card,
                    x_mult = card.ability.extra.Xmult
                }
            end
        end
    end
tall wharf
old bane
snow valve
#

try putting your juice command in this if statement

#

"if context.other_card:get_id() == 6 then"

tall wharf
snow valve
#

check if it's a six, if it is, juice

modern kindle
tall wharf
tall wharf
#

but how about

#

spell Gardevoir

#

that's a bit specific

#

maybe

#

name a psychic type Pokémon

viral stream
modern kindle
#

If the word is long are you granting hand size by default?
Or can it only be as long as the hand size you have

#

As example gardevior is 9, but you only got 8 cards

tall wharf
#

word length +3

modern kindle
#

That makes sense

tall wharf
#

adding Scrabble to Balatro

modern kindle
#

Good lord

tall wharf
#

more boss blind coming

#

oh yeah btw my boss blinds are written in Japanese Kanjis

mint totem
#

Thanks I got it fixed

modern kindle
tall wharf
modern kindle
#

I can barely make things in English and you out here in kanjis

tall wharf
#

it's only for the boss blind chips

modern kindle
#

Gotcha gotcha

tall wharf
#

it's fineeee

modern kindle
#

Lmfao

snow valve
#

that's checking for each individual card so idk why it would only trigger once on main scoring

whole sand
#

any idea on how not to make the config tab do this?

  1. base
  2. strangely both are selected?
  3. after clicking enter...
viral stream
snow valve
#

i think it might be because of this

#

context.cardarea == G.play

#

i think G.play is just the generic score timing

#

so maybe nest your ifs?

#

if context is individual and card id is 6 juice, then if context is play do xmult

#

not certain that will work but worth a shot

coral cobalt
#

I had a really cool idea for a Chess themed balatro mod but I honestly dont know where to get started with modding this game, if anyone has a good video or can point me in the right direction it would be super appreciated

snow valve
#

reading this and all the api doumentation on the right will definitely get you off the ground a little

coral cobalt
#

huge thanks akrone

snow valve
#

np fella

coral cobalt
old bane
#

are there examples of Stickers in any mod? i want to make a new Sticker type for my mod and I don't know where to start

coral cobalt
#

has banana perishable sticker i think

#

i think thats in cryptid

#

i can check after this scores

viral stream
#

thanks anyways

snow valve
#

Happens to the best of us

viral stream
#

any idea on the second part though?

#

if not that's fine

old bane
# coral cobalt cryptid?

i also think editions could work for my thing, cause I'm trying to make it so that Jokers will have a large chance to spawn with "Drained" which disables its ability for 3 rounds. The drained would cause it to be like a greyscale version of the Joker.

coral cobalt
#

sorry im blind

#

i have a lot of shop rerolls surely itll just show up

#

ill find it eventually no way it can evade me forever lol

old bane
#

would i be able to make a greyscale with shaders tho 🤔 or would i just have to use whole new sprites

hardy viper
#

greyscale with shaders is absolutely possible yeah

old bane
#

okay cool

coral cobalt
#

@old bane

#

This joker

#

Adds banana perishable sticker onto the joker

old bane
#

ty

#

tempted to make a deck where all of the cards are just PMCS battle cards

coral cobalt
#

im gonna try and make a chess mod where theres a tarot card that turns a few numbers into face cards but are still like the same chip value, so like 10s would become bishops, 9s become knights, 8s become rooks and then everything 7 and lower stays the same, might make aces pawns or might do something different with pawns like theyre own unique 1 card

old bane
coral cobalt
#

maybe but aces have a lot of unique and cool jokers, might make a way to make them face cards while staying aces

#

but that may be out of my coding skill set which is not much lol

#

only modding ive worked on were some old among us stuff 💀

minor magnet
#

how much mult should i give the lord

old bane
minor magnet
#

which is about 3.81X

#

i did the math

#

not that much

spring lantern
#

make it so selling 1 jim kills all the jims

minor magnet
#

yes it does

spring lantern
#

fikre

old bane
spring lantern
#

make it say if one jim goes away then cos i didn't quite understand that was the thinjg

spring lantern
#

i thought it was like selling the original destroy the copies

minor magnet
#

nono selling any jim destroys all jims

spring lantern
#

perfect

minor magnet
#

ok 1.5 feels right

#

maybe even a little weak

#

but 2 is way too much

#

and 1.75 feels way too random

mystic river
spring lantern
#

god that first joker has been in a dire need for a redraw for weeks

ionic timber
#

I still don't get how I'm supposed to use debuff_hand() , can anyone enlighten me ? (by "how to use it" I mean, on what and with which args ?)

spring lantern
#

just gotta fix jimbo switch and make these 4 and my first ever balamod is officially done i think..

wooden nexus
minor magnet
#

chat what do we think of surmacchio

topaz sun
#

is there a way to make SMODS.calculate_effect trigger in an enhancement after the enhanced card adds their rank's chip value?

topaz sun
minor magnet
minor magnet
wintry solar
#

what are you trying to do?

tight thistle
topaz sun
topaz sun
#

The key should be something like j_prefix_key where prefix is the joker's mod prefix and key is the key for that joker. If it's a vanilla joker you dont need the prefix part

tight thistle
#

oh yeah, im familiar with the joker key stuff, whats the 3-letter string though? anything specific?

frosty dock
topaz sun
frosty dock
#

it just provides a cleaner interface

tight thistle
topaz sun
frosty dock
#

SMODS.add_card{ key = 'j_blablabla' } is all you need to create a joker with a certain key for example

frosty dock
topaz sun
#

Yeah, smods is the best way

frosty dock
#

that's why we don't like functions with like 8 arguments

wintry solar
frosty dock
#

that string is a randomness seed used to make card queues distinct on the same seed

#

it doesn't do a thing for making a specific joker

topaz sun
#

Makes sense. So it only actually does something when you're creating a set of random cards?

frosty dock
#

yes

wintry solar
#

you only need to lovely patch once iirc, the rest can be done in a hook

topaz sun
#

gotcha

#

thanks!

wintry solar
#

SMODS.calculate_individual_effect this is the function you hook to do the actual calculation, and then you patch SMODS.calculation_keys to put 'xchips' in the correct place

#

then you can just return xchips

topaz sun
#

You can patch SMODS stuff? I thought that could only be done to the vanilla functions

wintry solar
#

with lovely 0.7.1 you can, yes

topaz sun
#

awesome

cedar bronze
#

anyone know why my mod icon isnt loading? i'm just using the reroll tag icon for the moment but that doesnt seem to be showing up

topaz sun
#

Do you have the icon's 2x version as well?

cedar bronze
#

i do, yeah

#

correctly named too

topaz sun
#

It has to be 34x34, I think

cedar bronze
#

oooh

#

ill try that

tepid crow
#

I'm pretty sure there isn't a forced size requirement and you can do whatever 🤔

cedar bronze
#

no change

#

for some reason it feels like it just isnt going through

topaz sun
#

Damn :/

cedar bronze
#

it doesnt feel like ive done anything different to other mods code im looking at

#

it just isnt going through

faint yacht
#

Lovely & SMODS versions?

tepid crow
#

I mean what I'm assuming is debugplus above it seems fine

cedar bronze
#

ya debug plus above is fine

tepid crow
#

but give your lovely & smods versions anyway

cedar bronze
#

lovely is 1.0.0 and smods is 1.0.0 alpha i think

tepid crow
#

lovely version aint 1.0.0

#

check the command line prompt, it should say the lovely version in the first line

cedar bronze
tepid crow
#

I believe that's the "API version"?

cedar bronze
#

oooh

tepid crow
#

to support breaking changes etc?

cedar bronze
#

i can try do a new install

tepid crow
#

no just check the first line in the cmd prompt 😭

cedar bronze
#

ah! sorry LOL

tepid crow
cedar bronze
#

oh lovely 0.6.0

#

didnt know where to check it lmaooo

tepid crow
#

lovely 0.6.0 should be recent enough afaik - how about your exact smods version? after the ~

cedar bronze
#

"1.0.0~ALPHA-1219e-STEAMODDED"

modern kindle
#

i see that cerulean bell does forced hands so im assuming it can read what card was selected, can i use that to allow a player to select a card for a specific joker ability or is it just highlighting a position of the card in hand?

im looking to make a +4 card where players can select the suit to add 4 cards of at start of round, but im not too certain on how to allow players to just select the suit without playing the card itself

tepid crow
#

eh should be fine too

cedar bronze
# tepid crow eh should be fine too

it feels weird cause all the other mods i load are fine but mine, and the rest of my mod works, but the icon just seems insistent on not changing

tepid crow
tepid crow
cedar bronze
#

only other one i have atm is debug plus but ill give it a shot

topaz sun
modern kindle
modern kindle
cedar bronze
#

gonna install the newer lovely version just incase that fixes it

topaz sun
tepid crow
cedar bronze
#

o7 will give it a shot

modern kindle
wintry solar
cedar bronze
#

the image file?

tepid crow
#

I'm assuming the code

cedar bronze
#

ah! yeah can do in just a sec

wintry solar
#

Yeah the code file

topaz sun
cedar bronze
#

also newer lovely version didnt fix it

modern kindle
tepid crow
#

oh hey good catch eremel

tepid crow
cedar bronze
#

ooooh does that mess w it

tepid crow
#

it's old steamodded code, and if you include it steamodded will attempt to load your file in "compatibility mode"

cedar bronze
#

ah! gotcha

tepid crow
#

which messes with stuff like the modicon

cedar bronze
#

i got that code from an older video on how to mod the deck images

wintry solar
#

I spy ortalab artist bubbles 👀

topaz sun
modern kindle
topaz sun
modern kindle
#

awesome will do

topaz sun
#

Just look at the code for the tarots like death and stuff like lars said

modern kindle
#

affirm

topaz sun
#

its in card.lua

#

Inside the game files (you gotta unzip the game .exe)

modern kindle
#

yep, already there
ive done about 20 other jokers before this, i just didnt think about tarots at all for some reasin cause i was thinking about the consumable use ability being useless to me rn, but neglected entirely that i dont need to utilize it being a consumable lmao

thank you for point me int he right direction both of you =]

cedar bronze
tight thistle
zealous glen
#

How does Steamodded handle cards without ranks with respect to their id/nominal value?

#

Negative numbers too or… ?

tepid crow
tight thistle
#

oh let me try that

tepid crow
#

(wait, what even is the difference 🤔)

zealous glen
#

Does add_card exist?

topaz sun
tepid crow
#

SMODS.add_card(t) -> Card
This function replaces add_joker. It takes the same input parameters as SMODS.create_card (below) and additionally emplaces the generated card into its area and evaluates add_to_deck effects.
seems like it

tight thistle
#

doesnt seem to be creating anything on its own, though

#

oh wait

zealous glen
#

also what's the automatic juice return

#

card = card?

tepid crow
#

hmm seems like add_card should actually work by looking at the code

tight thistle
#

whats with the -> Card

zealous glen
#

It seems like it returns a Card

tender gale
#

how do you get a mod to load an extra .lua file again?

tepid crow
tepid crow
faint plank
#

been trying to access joker descriptions, but i dont think im doing it right, im somewhat new to lua, any pointers?

card.ability.extra.word_count = 0 for i = 1, #G.jokers.cards do local key = G.jokers.cards[i].config.center.key local _joker = G.P_CENTERS[key] local word_count = select(2, _joker:gsub("%S+", "")) card.ability.extra.word_count = card.ability.extra.word_count + word_count end return { mult = card.ability.extra.word_count }

tepid crow
tender gale
#

Ok thanks!

normal crest
#

Any way to delay the sprite of a card becoming debuffed if turned wild in a suit debuffing boss blind

tight thistle
#

thank you for the help!

zealous glen
#

I think the easiest way is to look at how Spinagogue does it in Cosmos and figure out how to patch

surreal mason
zealous glen
#

doesn't sound very hard

surreal mason
#

Idk lua

zealous glen
#

My own evaluation was that this seemed too strong, but I got a divergent opinion 🤔

faint plank
tender gale
#

How can you always apply a shader to a consumable type, such as the shiny Spectral shader

surreal mason
topaz sun
tepid crow
#

it's e.g. src/core.lua

zealous glen
surreal mason
#

Have I got your hamster on the wheel, Victin?

topaz sun
#

thanks

zealous glen
surreal mason
#

I mean with my placeholder joker idea

tender gale
zealous glen
zealous glen
surreal mason
tender gale
#

these guys in negative look cool though

surreal mason
modern kindle
#

very carefully

surreal mason
#

Vertical or horizontal slice?

modern kindle
#

dealers choice typically

vital rapids
#

TOML parse error at line 1, column 1
|
1 | [manifest]
| ^
missing field `patch

#

what does this mean for me

surreal mason
vital rapids
#

i fixed it

#

nvm i lied

#

im stumped here

old bane
#

how do i make an english localization?

#

like what is the id for the english locale

#

oh wait im dum >_<

vital rapids
#

either en-us or default

old bane
#

whats the difference between chip_mod and chips for cards?

vital rapids
#

wdym?

old bane
#

so i'm trying to make it so that each played card of a certain suit gives + chips (similar to how it's done for the various suit jokers) and I found two different mods using different methods for chip gain:

  • Pokermon used chips = extra chips + total chips
  • The example just used chips_mod = extra chips
#

im asking what difference this makes

#

if any

vital rapids
#

i wouldn't know

stiff locust
#

is there a way i can run code when you start a new run

#

not with a specific joker or anything just in general

#

is there a function i can hook or smthn

vital rapids
#

like running a specific part of your code?

#

giving yourself the item and using it would work no?

stiff locust
#

i just need to reset a global when the player starts a new run

#

thats all

tepid crow
stiff locust
#

i need it to only happen on starting a new run

#

not continuing a run

tepid crow
#

just check the args then

tepid crow
stiff locust
#

a variable

#

i need it to go back to 1 when you start a new run

tepid crow
#

so what's it keeping track of if I may ask

foggy carbon
#

if I am looking at a randomly-selected joker, how would I go about finding out if it has a variable with a specific name?

stiff locust
#

someone wanted polymorph (my spectral) to scale handsize reductions per use of the spectral like ectoplasm so i'm making a config that makes it happen

#

but my current code for it has the value persisting between runs

tepid crow
#

what's wrong with copy-pasting Ectoplasm's code?

stiff locust
#

i completely forgot that was an option

foggy carbon
stiff locust
zealous glen
#

How do I get the horizontal position of a card again?

tepid crow
#

in x/y coords?

zealous glen
#

yes

tepid crow
#

.T.x I think?

#

all the position stuff should be stored in .T anyway

stiff locust
vital rapids
#

My lovely.toml file is require in my mod yes?

#

like in your sprtesheet?

#

uhm

#

open it in your art editor and see what pixel the far corner is on

stiff locust
#

G.GAME.ecto_minus

tepid crow
#

yeah G.GAME.ecto_minus

#

which conveniently gets reset since G.GAME gets reset at the start of each run

stiff locust
#

so yeah I can't exactly do that unless I like

#

hook G.GAME somehow and put the variable there

tepid crow
#

you don't need to

stiff locust
#

that would be pretty nice actually

tepid crow
#

ectoplasm just does

G.GAME.ecto_minus = G.GAME.ecto_minus or 1
G.hand:change_size(-G.GAME.ecto_minus)
G.GAME.ecto_minus = G.GAME.ecto_minus + 1

so it doesn't even need to be defined beforehand

stiff locust
#

oh

#

wait so I can just

#

write G.GAME.and then anything and it'll just

#

work?

tepid crow
#

the or 1 makes sure it has a definition

tepid crow
#

and meant the spritesheet or smth

gilded narwhal
#

god it looks SO COOL

molten ice
#

Is there a way to return multiple set of values from joker calculation
It's for a blueprint-like jokers but its copying more than 1 joker at once, so I can't keep hardcoding the value or use stuff like SMODS.calculate_effect because it would mess up the calculation timing

#

I think thats pretty much what Infinite Fusion does but it's completely discontinued under new calc sooo

zealous glen
#

What color does the game use for face down cards in the deck UI?

#

I think it's orange but which orange

stiff locust
#

however the card description doesn't update with the new handsize reduction

#

wait it's a spectral do I have to use self.config.extra instead of card.ability.extra

tepid crow
stiff locust
#

that was the issue it seems to work now

tepid crow
#

so just make sure to return that in the loc_vars

stiff locust
#

even with the or 1

tepid crow
#

hmm, weird

#

possible it was trying to index G.GAME which was nil?

stiff locust
#

probably, it happened on boot

tepid crow
#

yeah you could try G.GAME and G.GAME.<your_spectral_minus> or 1

zealous glen
stiff locust
#

closing and reopening the game and continuing a run resets the value

#

fucks sake

tepid crow
#

you're not storing anything relating to the minus in the spectral right?

stiff locust
#

i fixed it

vital rapids
#

i'm still unable to get my mod to load

#

im going back to pixelart

stiff locust
#

okay then

#

if joker.card.ability.extra ~= nil then
but also i think you'd need to check if extra is a table or variable?

#

idk how to do that

#

cause some people assign a variable as card.ability.extra = 0 but others do it inside extra

zealous glen
gilded narwhal
#

Hey what is the thing you need to call in order for the UI to zoom off screen to the top

zealous glen
#

also for my future reference:

Skyscraper
Scoring cards give +1 Chip per card of lower rank in your full deck

vital rapids
zealous glen
#

another ouroboros joins the ring

autumn geode
#

does anyone have any example code for adding shaders to a joker that i could take a look at

zealous glen
#

You can do it in Card:draw

#

As in, built into Steamodded

#

I had an old patch to do it but I don't think it's necessary nowadays

#

But I know 2.5 people who have ever used Card:draw

autumn geode
#

i saw on the wiki about using the draw func but doesnt really say how exactly and all example jokers and stuff ive taken a look at dont do it

zealous glen
#

ask aure

old bane
#

how do i make it so that only the jokers from my mod will spawn? (config option would be appreciated as well, so that I can toggle it on and off)

vital rapids
zealous glen
#

ouroboros

vital rapids
#

should have known i wouldnt be the first to think of that

zealous glen
#

I haven't put it in-game yet

#

nevermind the old effect

vital rapids
#

cant veiw that embed

zealous glen
#

It's another message in this server

vital rapids
#

im probaly gonna do +2 mult when scored

zealous glen
vital rapids
#

ahhh

vital rapids
zealous glen
#

Background could be better, though I remember just not finishing it

vital rapids
#

looks great to me

#

im practivally just reusing the inscryption sprite

zealous glen
woeful tundra
#

whos that .5

#

👀

vital rapids
#

incomplete friends

old bane
#

wait does anyone know how to make it so that only the jokers from my mod will spawn

#

cause I know pokermon does it but idk how they did it

vital rapids
#

ouro and friends

#

i wonder why balatro has translucent sprites for its consumables?
is it used anywhere?

zealous glen
#

maybe undiscovered?

vital rapids
#

hmmm

#

since ive done sprite of the day its back to code

#

hey do you have any ideas why i cant get my mod to even load?

#

its definitely in my lovely.toml but i genuinely dont know what to even put in there

#

is lovely.toml even required?

zealous glen
#

no

ionic verge
#

how would i make a joker give discards / other constant things like how juggler, andy, etc do?

vital rapids
zealous glen
ionic verge
#

and thats outside of the calculate function, right?

zealous glen
#

yes

ionic verge
#

ok

vital rapids
#

without lovely.toml it wont load either

#

at least the game doesnt crash on startup

vital rapids
ionic verge
zealous glen
#

my your or your my

zealous glen
ionic verge
#

yep, found it

old bane
#

how do i make a config ui for my mod?

foggy carbon
#

making sure that even when buffed, Fibo's mult is a fibonacci number

old bane
#

Guys I keep on getting a "tried to compare a string with a number" error and idk wtf i'm doing wrong ;-;

calculate = function(self, card, context)
        if context.cardarea == G.jokers and context.scoring_hand then
            if context.joker_main and next(context.poker_hands['Flush']) then
                return {
                    chips = card.ability.extra.chips,
                    colour = G.C.CHIPS,
                    message = localize { type = 'variable', key = 'a_chips', vars = { card.ability.extra.chips } }
                }
            end
        end
    end
#

btw this is for a joker that gives chips for any hand that contains a flush

faint yacht
#

At least specify which line it errors on.

old bane
#

it errors on a common lua function (line 894) so idk

#

yeah function/common_events.lua (line 894)

#

oh nvm i got it

#

used someone's previous solutoin

lucid owl
#

how do you prevent ghost cards? i'm trying to remove an entire played hand but the only cards being removed are scored ones, and the non-scored cards become ghost cards. they're all visually destroyed, but only scored ones are taken from the deck (ignore the jankiness of my effect stuff)

vital rapids
#

im going to ask again because i feel like ive tried everything, why cant i get this mod to load

dusk harness
#

heelo friends, im looking for the function that gets called when cards are modified in hand

#

does it have to do with the update_play_tarot function or is there another one

gilded narwhal
vital rapids
#

I'm going to sleep on this

#

Everything LOOKS okay but somehow it isn't

#

And no error messages too

wintry swallow
#

i think you need to create lovely.toml and inject your main.lua

vital rapids
#

Ill try again

crisp coral
#

you don't

vital rapids
#

Whats my solution 😭

#

How am i stuck on the first step

#

I've been closing and opening balatro for 6 hours 😭

dusk harness
#

whats happening?

dusk harness
vital rapids
#

i had just deleted everything in an attempt to start over

tall wharf
#

did the mod appear in the menu at all

vital rapids
#

i managed to mess that up though

#

somehow

dusk harness
#

do you remember what you had in it then?

#

cause the only thing i had to add for it to show up was

vital rapids
#

quick question some mods dont have a "main.lua"
or is that just a colloquial name for the main mod file

dusk harness
#
TO = {} -- my mod id

SMODS.Atlas({
  key = "TO",
  path = "TwitchOverlay.png",
  px = 34,
  py = 34,
})```
vital rapids
#

hmm

vital rapids
#

let me try that

dusk harness
#

TwitchOverlay.png is inside the assets folder of my mod, in both folder 1x and 2x

vital rapids
#

we are jonkling

#

thanks

#

okay so now

dusk harness
#

so

/TwitchOverlay
|---/assets
|    |--/1x
|        |-- TwitchOverlay.png
|    |--/2x
|        |-- TwitchOverlay.png
|---main.lua```
tall wharf
#

I'm going to work on more boss blinds

vital rapids
vital rapids
#

why would it only open once?

dusk harness
#

your folder hierarchy sould look like what i posted earlier

dusk harness
#

no

vital rapids
#

oh lol

#

im slow

dusk harness
#

its ok

#

its hard to describe folder structure in text form

vital rapids
#

we seem to be jonkling again

#

i lied

#

sigh

#

okay its failing to collect data from the atlas

#

meaning what set my key as is probably wrong

dusk harness
#

show me whats in yuour main.lua

vital rapids
dusk harness
#

change TO to dul in the first one

#

same thing for the key

vital rapids
#

did i read TO as to? yes

dusk harness
#

TO is my key

#

TwitchOverlay -> TO

vital rapids
#

i figured

#

i should change my key to dul yes?

dusk harness
#

make sure you have a consumnable.png file where my TwtichOverlay.png are

dusk harness
vital rapids
#

same error but i cant find dul_dul

dusk harness
#

whats in your json file

dusk harness
#

i dont have dependencies in mine

vital rapids
#

hmm

dusk harness
#

i dunno if it changes anything

vital rapids
#

nope

#

nothing same error

dusk harness
#

ok show me the main.lua now

vital rapids
#

everything seems to be in order

dusk harness
#

px and py are the size of the image

#

just making sure

vital rapids
#

give me a sec

dusk harness
#

it might not have anything to do

vital rapids
#

Yeah nothing to do with it

vital rapids
dusk harness
#

what i tought

#

show me your folder structure, you can minimize the assets folder

vital rapids
#

watch it be something stupid

dusk harness
#

in id in the json put RelCol, im trying something, im pretty sure it wont do anything

#

but at this point

#

TwitchOverlay.json

{
    "id": "TwitchOverlay",
    "name": "Twitch Overlay",
    "display_name": "Twitch Overlay",
    "author": ["PILIX123"],
    "description": "A mod that reads the game state to transmit it to Twitch.",
    "prefix": "TO",
    "main_file": "main.lua",
    "priority": -10,
    "badge_colour": "",
    "badge_text_colour": "",
    "version": "0.0.1",
    "dependencies": [],
}

main.lua

TO = {}

SMODS.Atlas({
    key = "TO",
    path = "TwitchOverlay.png",
    px = 34,
    py = 34,
})
#

in a folder named TwitchOverlay

vital rapids
#

i should reacreate your mod and see if it works?

dusk harness
#

why not at this point

vital rapids
#

okay lemme try

dusk harness
#

what platform are you on

vital rapids
#

windows

dusk harness
#

ok

#

also try updating steamodded

vital rapids
#

i was using old calc before

dusk harness
#

dunno what that is

vital rapids
dusk harness
#

im using smods "1.0.0~ALPHA-1312a-STEAMODDED"

vital rapids
#

didnt work anyway, same error but this time it cant find to_to

dusk harness
#

i know you are on 1.0.0 alpha 1304a

vital rapids
#

nope

dusk harness
#

thats what youre logs were saying

vital rapids
#

just updated

dusk harness
#

ok

vital rapids
#

and tried it

dusk harness
#

so im the one behind now

vital rapids
#

yup

dusk harness
#

ok, thats what i used,

#

i dunno then

#

maybe lovely isnt injecting your mod correctly

#

i cant think of anything else

vital rapids
#

hold on lemme try smth

#

see if it works for you

dusk harness
#

good idea

vital rapids
#

if it does then i'll just reinstall everything

dusk harness
#

ok so it dont load on my side either

#

imma try somethings

woeful tundra
#

How would one go about deactivat ing/activating a blinds ability?

#

similar to how luchador works, where you sell the joker to deactivate the blind

dusk harness
#

you can probably find the code of luchador somewhere, but except that i have no clue

vital rapids
dusk harness
#

did you clone the smods repo into youre mods folder or did yhou install it normally?

#

both smods and talisman would need to be from source but still

vital rapids
#

clone?

dusk harness
#

git clone

vital rapids
#

i extracted both from the zip after downloading

dusk harness
#

but still it should work on my computer

#

ok so about same

tall wharf
#

simple feature

vital rapids
dusk harness
#

@vital rapids i think i found it

#

rename your folder from x1 to 1x and x2 to 2x

vital rapids
#

no way 😭

dusk harness
#

YUP

#

it loads now

vital rapids
#

man i love coding

#

really

dusk harness
#

welcome to programming

vital rapids
#

im a gungeon modder and a software engineering student

#

i know this battle i just dont know the first thing about lua

#

😭

dusk harness
#

this aint even lua

#

its just a file structure issue

#

i would have struggled finding it if i was on my own too

#

im glad i could help

dusk shoal
#

i know stone joker counts the amount of stone cards in your deck, is there a solid way to copy that for other enhancements?

dusk harness
#

i still need to figure out the event that gets triggered when cards get changed from normal to something like steel/lucky

vital rapids
dusk harness
vital rapids
#

imma reinstall steamodded

dusk shoal
dusk harness
#

i dunno

dusk harness
dusk shoal
#

i know how stone joker does it but its very specifically for stone cards

dusk harness
dusk shoal
#

ok i checked steel card

vital rapids
#

what do i use to comment out an entire section of code?

dusk harness
#

--[[comented text]]--

dusk shoal
#

both of them have a variable called "self.ability.steel_tally" and "self.ability.stone_tally" respectively

vital rapids
#

ahh thanks

dusk shoal
#

i could try wild_tally or something but

#

i imagine since no joker uses it it wouldnt work

dusk harness
#

maybe

#

try it and come back

#

cause i might use that for my own mod

dusk shoal
#

ok !

vital rapids
#

jonkling grand re-opening

#

okay now

dusk harness
#

LETS GOOOOOOOOOOO

vital rapids
#

these consumable cards

gaunt thistle
#

lyman reference

vital rapids
#

since youve seen the code for the occult cards do you have any idea why it throws errors

dusk harness
#

let me just redownload

vital rapids
#

i dont think lua works like this

#

the i++ at the end

placid frigate
#

where do you get a list of custom rule for challenges like "double_ante" and fast_scaling"

vital rapids
#

wait hold on

tall wharf
#

this might seem stupid but how do i make the sticker work properly

#

SMODS.Sticker{
    key = "self_destructs",
    default_compat = true,
    atlas = "lettersStickers",
    pos = {x = 0, y = 3},
    rate = 0,
    badge_colour = G.C.RED,
    sets =  all_sets,
    calculate = function(self, card, context)
        if context.end_of_round and context.individual and card.ability.akyr_self_destructs then
            card:start_dissolve({G.C.RED}, nil, 1.6)
        end
    end,
}
#

i am probabl stupid

vital rapids
#

you know what ill do consumables after jokers

dusk harness
vital rapids
#

what i want it for the summon card to give two more occult cards

dusk harness
#

its gonna loop until the min between the two values in the min function

vital rapids
#

hmm

#

what if i did i <= 2?

dusk harness
#

dunno didnt do much lua still

#

im still figuring out where the data comes from for what i need to do

#

so i usually loop over the hand and joker roster

vital rapids
#

hmmm

#

it would be funny if i finished this mod without actually learning lua

#

im going to do that

dusk shoal
#

why does it hate this

#

im confused mode

dusk harness
#

i wont learn any lua out of this, well i probably will because imma have to do http requests but like still might not undersand any of it

dusk harness
#

its gonna be much easier for you to spot all the errors

dusk shoal
#

yes sir

dusk harness
#

i can show you what it looks like

dusk shoal
#

no i got it

#

ok its just saying what vs code says

dusk harness
#

yeah but inline instead of like hidden

#

so i can know whats going on if you share another screenshot

dusk shoal
#

i added an extra = sign

#

im not sure why i needed to??

#

i feel like 1 shouldve worked

dusk harness
dusk shoal
#

no no i added it

#

stil freaked

dusk harness
#

parens arounf the expression?

wintry swallow
#

because = doesnt return anything and == return true or false

dusk shoal
#

i see

#

i was pulling from the example of

#

runner

#

with how it increased a variable

faint plank
#

im so painfully close to reading the card's description, ive managed to read the card's name with "name_text" as the type, but i cant figure out what the description type is

dusk harness
#

you cant do assignation in the return i think, if you do the assignation line before the start of youre return does it complain?

dusk shoal
#

yeah it crashed

dusk shoal
#

do you mean in calculate?

#

out of calculate it crashed

crisp coral
#

wait

#

actually

#

why are you using localize

dusk harness
dusk shoal
#

yells at me in yellow

#

so not too bad

dusk harness
#

yellow is fine

dusk shoal
#

what does it even mean

dusk harness
#

dunno dont mean anything to me

faint plank
dusk shoal
#

ok

#

didnt crash

#

ok it crashed on calculation

dusk harness
#

i still need to figure out how to get the updated state of a card after using a consumable

faint plank
#

im new to lua so im learning that simultaniously

dusk harness
wicked hedge
#

anyone know the best way i can start making a translation mod to add another language to the game?

#

(moved this here because it's related to mod dev)

crisp coral
dusk shoal
#

alright yeah heres the problem

#

wild_tally doesnt exist

crisp coral
woeful tundra
#

How does the rate work for items to appear ina shop, like am I putting in a percentage, like .5? or is it needing a whole number, how does it scale this?

dusk shoal
#

theres no built in way to track how many wild cards you have in deck

dusk harness
vital rapids
dusk shoal
#

peering through the code

#

found something

#

i think this is what sets stone and steel tally

faint plank
wintry swallow
woeful tundra
#

so its rolling to see what type to sell first, then rolls again to determine out of that type, which one to sell?

wintry swallow
#

i suppose

crisp coral
#

yea

vital rapids
#

is it okay to have all my joker code in main.lua?

#

yes?

dusk shoal
#

apparently when doing this, wild_tally returns as a nil value

vital rapids
#

and what about consumables

dusk shoal
#

i assume that its because m_wild isnt a thinggg

vital rapids
#

actually does anything actually require its own lua file?

random sleet
#

localization does if you use the handy smods localization loading

rough furnace
#

it doesn't need it

#

but its nice having its own files

tall wharf
crisp coral
#

💀

woeful tundra
#

is there a function to add a consumable card manuall, similar to add_joker()?

rough furnace
#

add_joker works on consumables

#

but also SMODS.add_card

#

iirc

cerulean rose
faint plank
#

i got it working! (ignore the temp art, or dont lol)

tall wharf
#

this is what i did

#

local card = create_card('Alphabet',G.consumeables, nil, nil, nil, nil, "c_akyrs_"..k)

dusk shoal
#

where would this be like

#

more in depth?

#

is it on the github

vital rapids
#

looking good so far?

#

apparently not

#

someone here is causing a crash

iron iron
woeful tundra
#

key = "ancients",
primary_colour = G.C.RED,
secondary_colour = G.C.BLACK,
name = "Ancient Gifts",

}


SMODS.Consumable{

key = "ancient_clarity",
set = "ancients",
atlas = "leapfrog",
pos = {x = 0, y = 0},
loc_text = {
    name = "Ancient Clarity",
    text = {
        "Disables boss Blind for 1 turn",

    }
},



    use = function(self, card, area)
        G.GAME.blind.name:disable()
    end

}``` any idea why the game says the set name is "error" but the card displays properly with artwork, title and desxriptions are not there...
#

think I spotted it, name needs to be inside of loc_text... lol

vital rapids
woeful tundra
#

correction, did not fix it

#

something must have been off with the formatting, copied it from another working one and tis working now:

fallen pelican
#

you can detect such errors from the first line of crash itself

dusk shoal
vital rapids
dusk shoal
#

LOL

vital rapids
#

if i find out theres a goth joker im going back to enter the gungeon

dusk shoal
#

LOL x2

#

honestly

#

gungeon jokers

#

would be kinda fire

vital rapids
dusk shoal
#

PEAK??

vital rapids
#

there will be more

fallen pelican
#

oh u cooking

vital rapids
#

later...

#

i have consumable cards to do after the first like 10 jokers

dusk shoal
#

these look sick

vital rapids
#

its dark

#

and he's bleeding

#

did i do it wrong? this pixel is x 70 y 94

#

hex code for balatro black?

royal ridge
#

joker atlas is 71x95 i believe

stray warren
#

69x93 for the actual card texture, with a 1px transparent border. So 71x95 total

tall wharf
#

really none of these are of use to me

tall wharf
#

ok how do i return every played card to the deck

#

in a blind

#
  • every discarded cards
vital rapids
faint plank
#

these are the first three jokers ive made, still a wip (the novelist was a friend's idea)

#

open to feedback too :)

tall wharf
faint plank
#

FIRSST

coral cobalt
#

So I have an idea for a mostly chess themed mod for Balatro, a bunch of jokers neat mechanics and a few tarot cards along with some other stuff. I just need help with the coding part of stuff, i can do the art for the jokers and come up with ideas i just am not very good at coding.

#

If your interest dm me and ill send all I got at the moment

#

If you have ideas for jokers i can also add those in the mod (tho its balanced around vanilla keep that in mind.)

tall wharf
#

thank fuck i can go play arcade now

coral cobalt
#

What mod even is this

coral cobalt
#

Neat

long sun
#

Bootleg (Common): +30 Chips, +2 Mult

coral cobalt
woeful tundra
#

trying to remove a consumable card with the return message, it plays the message, but does not destroy the card... elseif context.before and card.ability.extra.remaining == 1 then card.ability.extra.remaining = card.ability.extra.remaining - 1 return{ dollars = 1, focus = card, card = card, removed = card, destroy_card = card, message = "Depleted!", remove = true, }

sudden meadow
maiden phoenix
woeful tundra
#

yeah, that gets tricky, becasue doing it that way, I cant send a message with it, as sending the message needs to be done at the end of the function, so I wouldnt be able to send the message

maiden phoenix
#

You could use card_eval_status_text for that

#

If it appears too early maybe put it in a G.E_MANAGER event

#

Does the card self-destructs or it's a joker destroying it?

tall wharf
#

start dissolve and add remove card context?

woeful tundra
#

its going to self destruct, basically it gives one gold per hand played for the next x hands played

#

then when it hits 0 remaining hands, it self destructs

maiden phoenix
#

Damn you're lucky I'm working on something exactly the same

woeful tundra
#

lol

#

everything with it works, just wont destroy itself lol