#đŸ’»ăƒ»modding-dev

1 messages · Page 88 of 1

tepid eagle
#

world's shittiest lifeguard

hardy viper
#

in short: https://www.lua.org/manual/5.4/
in long: nobody here can help you if you barely know the language you're coding in and struggle to follow the help you're given

torn grove
hardy viper
#

so real

split creek
#

Does anyone know how to make a consumable open a pack?

torn grove
#

now what happened here

zealous glen
#

There’s probably a direct way but also the game might not be prepared to swap to the pack state from any other arbitrary state

#

Hence why tags wait to open at a state that makes sense

zealous glen
rough furnace
#

Honesy I thibk this is my favourite image in this channel

torn grove
zealous glen
#

No

torn grove
#

ok

elder vapor
#

am i cooking with the art

wintry solar
#

I’d be surprised if there wasn’t already one tbh

zealous glen
zealous glen
torn grove
wintry solar
elder vapor
tepid eagle
#

then your art cooking-ness is yet to be determined

wintry solar
fathom raven
#

Im out of town and need some help. Can anyone find the file for the suits and ranks of cards so I can make some custom ones? I need to know what the base looks like so I can follow the style

hardy viper
torn grove
#

No seriously, I genuinely don't know where to start, it's just an equals symbol

weary jungle
#

what is just an equals symbol?

hardy viper
#

i guarantee there's something 5 lines up that easily explains the problem

torn grove
#

Hmm... so where's the culprit?

rough furnace
#

Its not in a table

wintry solar
#

Line 102

#

Which to anyone who knows what they’re looking at is painfully obvious

hardy viper
#

im so done

weary jungle
#

why is my code not working? the devious close bracket:

torn grove
#

i may be stupid

zealous glen
elder vapor
zealous glen
#

“Ruby Gem Slot” to me sounds like a Slot that can only take Ruby Gems

#

And the Slot itself grants an ability

#

Rather than a Gem Slot with a Ruby Gem granting an ability

torn grove
#

still saying there's something wrong with this equals?

torn grove
#

is there another devious close bracket again

elder vapor
#

i had it as Gem Slot (Ruby) before

#

that better?

zealous glen
zealous glen
#

The card already says you need a Gem Slot

torn grove
zealous glen
#

Before loc_vars

torn grove
#

thanks

#

wait nvm, it says there's an error

zealous glen
#

Ah, maybe it wasn’t the comma

#

I thought everything was inside a table

#

Or maybe there are mismatched brackets again

tepid eagle
#

this bracket should be not there

weary jungle
zealous glen
tepid eagle
#

the tooltip saying "Ruby Gem Slot" is like if the tooltip for a joker said "Holographic Card Edition Slot" instead of "Holographic"

zealous glen
#

Perfect analogy

#

@elder vapor

elder vapor
#

hmm

torn grove
elder vapor
#

i'll shorten it to just the gem

tepid eagle
#

try putting that one back

torn grove
tepid eagle
#

that was not in fact what i was talking about

#

this one

hardy viper
#

that's how you're meant to structure a config

torn grove
#

ohh

#

thanks! it works now

wintry solar
#

config = { extra = 2 } works fine too

torn grove
#

when I spawn string theory it gives me this error

#

*spawn with DebugPlus

#

?

wintry solar
#

how about you read the error and try and solve the problem without any help

torn grove
#

okay

tepid eagle
#

please note that asking the people here to basically do everything for you is not an effective way to learn how to mod balatro, especially since there are like 5 people who are all saying different things every time

torn grove
#

okay

#

it works! all I needed to do was add .slots to the end of G.jokers.config.card_limit

tepid eagle
#

hooray!

torn grove
#

yippee!

#

Genuine question: How do I make something spawn a spectral card when blind is selected?

#

and how do I make a joker reduce hand size

tepid sky
tepid sky
torn grove
#

ok

torn grove
#

I've got the -1 hand size working, but I can't seem to make heads or tails of the spectral card creating.

#

hmm

hybrid iris
#

hi! sorry to ask, but im not sure what exactly is going wrong with this custom poker hand im trying to make

hybrid iris
#

hm,,

maiden phoenix
#

Oh wait

#

your key is deadman but below you call it deadhand?

hybrid iris
#

yeah--
it was working a while back but something broke

hybrid iris
#

or, is that not how it works? jsdhfksdfhj

maiden phoenix
#

Idk, never coded a poker hand.

hybrid iris
#

fair,,,

zealous glen
#

Also sorry for the question but @wintry solar can Steamodded Enhancements be configured to never show up randomly?

weary jungle
#

how do i make a shader for an edition?

zealous glen
#

Or also Eremel

#

I know they know

#

Other people might know

#

There might be a tutorial by now

weary jungle
#

i just need a purpley thing and like a broken thing

zealous glen
#

Or an example

#

In Steamodded

#

But shaders are math

#

Personally I think the math is the easy part and knowing what math to write is the hard part

#

But I reckon other people have a different opinion

shell tangle
# weary jungle i just need a purpley thing and like a broken thing

https://github.com/Steamopollys/Steamodded/tree/main/example_mods/Mods/EditionExamples

And, personally, I've stayed away from shaders because they absolutely just don't click for me, it doesn't feel like the same kind of logic you use to program most code.

GitHub

A Balatro ModLoader. Contribute to Steamopollys/Steamodded development by creating an account on GitHub.

zealous glen
#

I mean I don’t know shaders either

#

I don’t think the language Love2D uses for shaders is necessarily helpful

#

Since it’s like a modification of an outdated shader language

#

But outside of the language it really just seems like math

#

Except the math is describing how something looks so you need to know what equations describe what you want the shader to look like

#

(Which might incur additional programming, like defining a Particle class for a Particle shader)

#

But mostly: 1) knowing the description of what you want; and 2) writing the mathematics of it

shell tangle
#

Most programming languages, even if I don't know the language beforehand, I can read through and get a pretty good understanding of what's going on, like if stuff is variables, classes, tables, all that, but with shaders, and probably graphical code in general, it's just a lot harder to intrinsically understand.

rough furnace
#

I don't know much about shaders but I did build a shader watcher into DebugPlus's dev branch to help with develo0pment

zealous glen
rough furnace
#

I mean I was able to understand some basics at a glance, but the shader as a whole I didn't quite get

zealous glen
#

So at least when I look up references

#

The references don’t look like the language

#

Because they’re either for the original, unmodified language or for the update

#

And not for whatever Love2D has baked in

zealous glen
#

It has vectors, whose entries you access in quirky ways

tepid crow
zealous glen
#

Floats and numbers

#

And some shader parameters

#

I think those are the classes I remember

shell tangle
zealous glen
tepid crow
zealous glen
#

Like vec.x is the first coordinate

#

As is vec.u I think

#

And I think there’s a third one too

tepid crow
#

there's x, y, z, w and r, g, b, a and also a third one iirc yeah

zealous glen
tepid crow
#

đŸ€Ș

#

you're not wrong

#

I have no idea why the developers of love did that

weary jungle
#

man... now i gotta learn shaders... i just wanted a purple......

rough furnace
#

iirc crytptid has a purply shader

weary jungle
#

cryptid save me

zealous glen
#

Eremel had perception-adjusted monochromatic shaders for Ortalab I think

#

And stupid made the Blueprint shader for the Blueprint mod

#

So again I think they can help

weary jungle
#

ill just do astral

zealous glen
weary jungle
#

but... itd be awesome if it faded in the center........

#

ugh

zealous glen
#

Someone had made a phantom shader

#

Either stupid or

#

Whoever made the active items and

#

A bunch of vouchers

lethal stratus
zealous glen
#

Betmma?

zealous glen
lethal stratus
#

only reason I'm not is because I'm on my phone

wintry solar
weary jungle
#
A common error is to define but not use the variable.```
```SMODS.Shader{
    key = "CursedE",
    path = "CursedEdition.fs",
}

SMODS.Edition{
    --0.75X mult
    key = "Cursed",
    shader = "CursedE",
    loc_txt = {
        name = "Cursed!",
        label = "Cursed!",
        text = {"{X:mult,C:white} X0.75{} mult"}
    },
    unlocked = true,
    discovered = true,
    config = {
        x_mult = 0.75
    }
}``` i font think its working
zealous glen
weary jungle
#

whick key

zealous glen
#

Actually rereading the error maybe I don’t know what I’m talking about

#

Take it from me oh wise fox of the shaders

weary jungle
#

i directly copied astral shader TO LEARN not to copy

wintry solar
#

I’m pretty sure the game uses pools for enhancements, it just adds them all regardless

zealous glen
#

Like uhhh Familiar

#

And the other Spectrals

#

There’s an “if not m_stone”

#

So Steamodded would need to modify those instances

#

Otherwise you could generate them from Familiar and the other Spectrals

#

Or whatever else

wintry solar
#

I might have patched them, I don’t remember

zealous glen
wintry solar
#

I can look properly tomorrow, but it’s a simple patch wherever it needs to go

split creek
#

is there like a card.to_string() function?

tepid crow
#

why would you want such a thing

split creek
#

I'm making a joker that tells you the top card of your deck

wintry solar
#

Can’t you have it just flip the top card instead?

hybrid iris
#

you could probably hardcode the id number and name but i think there might be a really complex way of doing it somewhere

weary jungle
#

how do i fix this... i cant even learn shader... shader hates me...

zealous glen
#

Also doesn’t Misprint do it

weary jungle
#

this is not giving me hope for making my own shader if i cant even load one that works

zealous glen
#

You can probably look at how Misprint gets the code for the card

#

There’s a localization function which can probably translate the name

#

High Card mod does something similar but it just shows the whole deck

#

The Homestuck mod showed the top three cards in a tooltip

#

An older mod showed shrunk down versions of the top three cards

#

Those are the four implementations I know of

lethal stratus
#

is this card able to generate

#

because me and another person have had issues finding this card

zealous glen
zealous glen
lethal stratus
#

?

zealous glen
# split creek thanks

It might be more useful to see if you can find where card tooltips are generated to see how it generates the name, because the actual usage of localize is probably hidden there, but the tooltips might be difficult to read

zealous glen
zealous glen
#

The debugger is in a folder inside your Steamodded installation and you can run it, I think just calling the Python script from the terminal?

split creek
#

Also, is it possible to get the base chips of a playing card?

zealous glen
#

I mean probably yeah see how the game does it balatrojoker

#

Maybe Raised Fist helps

elder vapor
#

that might be it

tepid crow
zealous glen
#

I remember when people found out that about Misprint

#

Woe be me who read Misprint’s tooltip code and completely ignored the secret

tepid crow
#

alas, poor Victin

weary jungle
#

how do i fix shader

lethal stratus
#

😭

#

also wanna make this only trigger on player discard

weary jungle
#

random end and missing } too easy

elder vapor
lethal stratus
#

ohhh

elder vapor
#

missing end as well

weary jungle
#

missing a } for thwe return

lethal stratus
#

:(

weary jungle
#

mn

#

mb

lethal stratus
#

this empty table idea

#

does not work

#

😭

weary jungle
#

wouldnt the handTable = {} in calculate clear handTable every time it calculates?

lethal stratus
#

good point

#

i need to clear it after round ends though

#

ill worry about it when this works

weary jungle
#

id do something with for k,v in pairs handtable

#

like

#

idk

lethal stratus
#

ik you mean key value pairs

#

but

#

im trying to make it so when I play a new hand, it makes that new hand the hand the card wants

#

I will eventually also display this hand for ease of use sake

#

but

#

how do i keep track of this hand

hybrid iris
#

set it as a value in config?

lethal stratus
#

well its not a consistent hand

weary jungle
#

also on another thing, in your loc_txt, i think you are missing a {} after #1#

lethal stratus
#

the person has to play it

hybrid iris
#

well yeah

#

you can change what the value is

#

in the thing

lethal stratus
#

@weary jungle not necessary

weary jungle
#

for the color

#

the {C:mult}

lethal stratus
#

does it go after or before

weary jungle
#

after

hybrid iris
#

both

#

well

#

{C:mult}#1#{}

#

yea

weary jungle
#

yea

lethal stratus
#

gotchaaa

hybrid iris
#

just so that Mult doesnt get colored too

#

its not exactly a requirement just like a styling guide thingy

weary jungle
hybrid iris
#

ah right

#

sorry, i dont know how to use shaders 😭

lethal stratus
#

did i bungle this

hybrid iris
#

maybe you need to add your mod prefix?

weary jungle
#

hmm....

weary jungle
hybrid iris
#

but liek otherwise nah

lethal stratus
#

i want it to blend into balatro style

#

so

hybrid iris
#

fair enough

#

yeah something like that!

#

I would add the + though for the 40 but like yeah radical

#

i dont, quite get the ability but neat

weary jungle
#

If we are going by balatro, this is banner

lethal stratus
#

should i make the plus blue too

#

i feel like it looks better black...

hybrid iris
#

balatro's style has it blue

#

but, like, its up to you

weary jungle
hybrid iris
#

ooh true

lethal stratus
#

thats... not the card idea

hybrid iris
#

wait

#

oh

#

oohhh!!

lethal stratus
#

its so braindead easy

weary jungle
#

is it like full house 4oak?

lethal stratus
#

NO

hybrid iris
#

nono its like

weary jungle
#

or opposite of banner

lethal stratus
hybrid iris
#

at end of round, gains chips for each unused hand

lethal stratus
#

not that either!

hybrid iris
#

wait huh?

weary jungle
#

opposite banner?

lethal stratus
hybrid iris
#

,,,????

weary jungle
#

yea

lethal stratus
hybrid iris
#

also yeah thats right

weary jungle
#

its banner but with hands instead of discards

hybrid iris
hybrid iris
lethal stratus
#

...

#

sorry i was confused upon what was confusing you

#

😭

hybrid iris
#

jkdfhsdkfjh

#

I was asking what the card concept was

lethal stratus
#

ohhhh

hybrid iris
#

but then in that case

lethal stratus
#

Nurse fully functions

weary jungle
#

i am now really confused, i changed the shader key in the edition but the error didnt change?

hybrid iris
#

then yeah the more balatro style is

each remaining {C:attention}hand{}```
hybrid iris
weary jungle
lethal stratus
#

...

hybrid iris
#

you okay?

hybrid iris
weary jungle
#

cryptid might be wierd or something

lethal stratus
#

how should i do it here?

weary jungle
hybrid iris
#

i would do it like

 C:attention}poker hand{} hasn't
been played this round```
#

but thats also good!

#

conveys all it needs to

elder vapor
#

hasn't

#

small grammar error

hybrid iris
#

right

weary jungle
#

owned

lethal stratus
#

the card itself crashes on landing

#

but

#

the colors batman

hybrid iris
#

oop

#

the Colors!!!!

lethal stratus
#

😭

hybrid iris
#

put it under config next to mult?

#

jsdhskdfjhsdf

#

if you want to make a variable for a joker

#

its like mostly advised to have it in
config = {extra = {*insert variable* = value }}
or something

weary jungle
#

why is both shader refrences i have all structured wierdly

hybrid iris
#

and then accessing it is like
card.ability.extra.variable

weary jungle
#

is it bad that i dont use config at all

hybrid iris
#

i wonder if i could emplace a joker in the consumable area and have it act normally

lethal stratus
#

?

weary jungle
#

,Z?

#

after loc.txt?

lethal stratus
#

typo..

hybrid iris
#

instead of writing config, replace it with card.ability, i believe

#

woops

#

thats how you usually access the variables skdfjhskdfjh

lethal stratus
#

?

hybrid iris
#

as in

#

card.ability.extra.handTable
instead of just
config.extra.handTable

weary jungle
#

i am going to give up on shader

#

s

lethal stratus
#

AGAIN

crisp coral
#

card.ability.extra.handTable[hand], hand is nil

lethal stratus
#

when i click play it crashes

crisp coral
#

you need to use context.scoring_name

lethal stratus
#

where?

#

instead of hand?

weary jungle
#

should i use config? i think im setting myself up for failure

#

im just plugging in numbers

lethal stratus
#

when selecting blind

weary jungle
lethal stratus
#

its the same line every time

#

but sure

weary jungle
#

i think its easier if it looks like the right

weary jungle
#

like this

#

but its context.joker_main i think

#
--Code
end```
lethal stratus
#

IT WORKS

weary jungle
#

yay

#

we did it!!!

lethal stratus
#

OH HOLD ON

#

FUCK

weary jungle
#

nvm

lethal stratus
#

it doesnt work after the second hand

weary jungle
#

we didnt it !!!!

lethal stratus
#

trying to understand why it does work sometimes, and not others

weary jungle
#

i think its time for my favorite part

#

putting print() everywhere

hybrid iris
#

are you
playing the same hand twice?

lethal stratus
#

i play high card, high card, pair, and then pair

#

it only works on 1 and 4

hybrid iris
#

okay, hm,

#

h u h

#

that is, strange

lethal stratus
#

then, playing a high card at the beginning of one round

#

IT DOESNT WORK

hybrid iris
#

i can, understand why it wouldnt work across rounds

#

you may have to clear the table upon end of round

#

but??? huh????

weary jungle
#

add a ```for k, v in pairs(card.ability.extra.handTable)
print(k, v)
end

#

we NEED info

lethal stratus
#

im not making a print test

#

ughhh fine

weary jungle
#

lets go

lethal stratus
#

whre

weary jungle
#

after if context.jokermain

lethal stratus
#

?

weary jungle
#

i forgot a do

elder vapor
#

is there a way to have an option to send a card to the consumables area from a booster pack?

weary jungle
#
print(k, v)
end
hybrid iris
weary jungle
lethal stratus
#

where do i read the

#

print

#

?

hybrid iris
#

terminal iirc

weary jungle
#

do you have debug +

lethal stratus
#

yea

weary jungle
#

set your setting

lethal stratus
#

wha

hybrid iris
#

oh right

#

shift c i think?

weary jungle
#

now correct me if im wrong, but i think its this

lethal stratus
#

not quite

weary jungle
#

whatr

lethal stratus
#

shift + c

#

lmao

weary jungle
#

when you open balatro, do you get a terminal thing?

lethal stratus
#

no

crimson fern
#

hey could someone help me with something wrong with one of my mods

weary jungle
#

like this?

lethal stratus
#

ohh

#

uh

#

ys

weary jungle
#

ok it should be in there

crimson fern
#

i can’t fuse my jokers using fusion jokers

#

my game just crashes

weary jungle
#

itd look like this

lethal stratus
weary jungle
lethal stratus
#

nothing

weary jungle
#

press / in balatro?

lethal stratus
#

there it is

weary jungle
#

what does it say!

lethal stratus
#

it didnt activate until the second hand

#

and it said "true"

weary jungle
#

ok

lethal stratus
#

i didnt play two pair, i played 3oal

#

3opak

#

its always a hand behind

weary jungle
#

so at first there wasnt anything in it, then it added pair in

lethal stratus
#

the printing is a hand behind

weary jungle
#

the printing happens after you play a hand right?

lethal stratus
#

yes

#

it works it just doesnt reset per round

#

fixing

elder vapor
lethal stratus
#

how to do that actually...?

weary jungle
lethal stratus
#

i just want to do like

#

if end_round = true or somethjing

weary jungle
#

i dont think you can do that

lethal stratus
#

:(

weary jungle
#

WAIT

lethal stratus
#

I can?!

weary jungle
#

so id be if context.end_of_round i think

lethal stratus
#

on discarding

#

what do I add to the if statement

weary jungle
#

I think you forgot to put them in if statements

lethal stratus
#

?

#

there's indentation

#

what

weary jungle
lethal stratus
#

oh I deleted that

#

oops

weary jungle
#

Its important

#

Also you have 2 different times, context.joker_main and context.end_of_round

lethal stratus
#

gotcha

weary jungle
#

Or you should have

lethal stratus
#

???

#

sorry wrong pic

#

ARD.ABILITY

#

BRUH

#

IT WORKS

#

blueprint doesnt copy it properly

#

😭

#

how do i make blueprint... work

#

😭

#

blueprint checks the table, and the table doesnt work because it was already indexed

weary jungle
#

maybe set the list after?

elder vapor
#

how am i supposed to make good pixel art 😭

weary jungle
weary jungle
elder vapor
#

also should i make my cards in 1x then scale them up to 2x?

weary jungle
#

yes

lethal stratus
#

yeah i can do that

weary jungle
elder vapor
#

searched on youtube for a good free pixel art program and found graphicsgale

weary jungle
#

aseprite is goofd

elder vapor
#

aseprite is paid

weary jungle
#

not if you build it yourself

elder vapor
#

oh you can build it yourself

weary jungle
#

this is a REAL pixel art i made

#

guess what it is

elder vapor
#

well time to compile aseprite

weary jungle
#

(this was 4 years ago)

#

dont stress if you feel you are bad, you will get better with time

#

this is an animation i made over 4 years ago 😭

#

do you like the shift up because i didnt have any more space

lethal stratus
#

how to make a card only reset on human discard and not boss blind idsc

#

disc*

weary jungle
#

wdym

#

what does the card do?

lethal stratus
weary jungle
#

what is difference between human discard and boss discard, thats the first question\

lethal stratus
#

one of them changes the discard number

#

the other does not

weary jungle
#

probably check for that

#

this is how you use config right

faint yacht
#

That'd work if it was {extra = {Curse = 5}} for the config.

weary jungle
#

i fixed that

#

how do i do a probability

#

its something with probability normal

faint yacht
#

It is a global.

weary jungle
#

i figured it out

#

also, is there a variable that shows how many dollars = 1 intrest

#

like normally its 5$ = 1 intrest

#

trying to make my mod more compatible

split creek
#

Are packs with both consumables and jokers possible?

weary jungle
#

ok somethings wrong

#

why is there nils

split creek
#

return { vars = {ALL THE VARS} }

weary jungle
#

what

#

oh ok

split creek
#

In loc_vars

weary jungle
#

i di d it!!!

#
    set_ability = function(self, card, initial, delay_sprites)
        card:set_edition("e_negative")
    end,
    unlocked = true,
    discovered = true,
    loc_txt = {
        name = "NAME",
        text = {"DESC"}
    },
    loc_vars = function(self, info_queue, card)
        return {vars = {}}
    end,
    config = {extra = {}},
    atlas = "runes",
    set = "Runes",
    name = "runes-NAME",
    key = "name",
    pos = {x = 0, y = 0},
    cost = 4,
    order = 1,
    can_use = function(self, card)
        CONDITION FOR USING
    end,
    use = function(self, card, area, copier)
        G.E_MANAGER:add_event(Event({trigger = 'after',delay = 0.3,func = function()
            ON USE
        return true end }))
    end,
}```is anything wrong with this base for consumables?
weary jungle
#

im going to sleep, ping me for above and ill see it when i wake up

#

oh wow

#

its a new dat

#

ok bye

weary jungle
#

Awesome

#

I forhoy i gotta go to sle

stray warren
#

Is adding new ranks something that's documented somewhere, or is that relatively unexplored territory?

rough furnace
#

You can do it

#

I've never done it and don't know any mods that do it off the top of my head

#

but SMODS has the classes for it

stray warren
#

Okay, so I just need to scour a little bit more for that code

stray warren
#

Oh cool, Thank you!

humble hound
# lethal stratus how to make a card only reset on human discard and not boss blind idsc

Try using context.pre_discard and context.hook
For reference, this is the vanilla code for Burnt Joker:

function Card:calculate_joker(context)
    -- [...]
        elseif context.pre_discard then
            if self.ability.name == 'Burnt Joker' and G.GAME.current_round.discards_used <= 0 and not context.hook then
                local text,disp_text = G.FUNCS.get_poker_hand_info(G.hand.highlighted)
                card_eval_status_text(context.blueprint_card or self, 'extra', nil, nil, nil, {message = localize('k_upgrade_ex')})
                update_hand_text({sound = 'button', volume = 0.7, pitch = 0.8, delay = 0.3}, {handname=localize(text, 'poker_hands'),chips = G.GAME.hands[text].chips, mult = G.GAME.hands[text].mult, level=G.GAME.hands[text].level})
                level_up_hand(context.blueprint_card or self, text, nil, 1)
                update_hand_text({sound = 'button', volume = 0.7, pitch = 1.1, delay = 0}, {mult = 0, chips = 0, handname = '', level = ''})
            end
    -- [...]
end
hybrid iris
#

is there a way to make a card act like both a consumable and a joker?

maiden phoenix
#

With all the mods doing booster pack count modifications I really wish there was a cleaner way to do it

tidal edge
#

hey! trying to code something that has a 1 in 4 chance to NOT be destroyed

#

meaning 3 in 4 to be

#

heres the code; it isnt destroying anything, i've played 10 total cards with this enhancement and they didnt destroy

#

shatter chance in this is 4

teal estuary
#

is there a way to make a joker unsellable and/or unable to be destroyed?

silent pawn
#

yes

#

force an eternal sticker on it gg

teal estuary
#

i was gonna say that yeah

#

do you know how đŸ€š

silent pawn
#

whenever its spawned just put a sticker on it

crisp coral
#

card.ability.eternal = true

teal estuary
#

oh, thats super easy 😭

#

is that like in the calculate function or đŸ€š

hardy viper
#

anywhere

silent pawn
#

or what

hardy viper
#

or add to deck

#

maybe add to deck yeah

teal estuary
#

BHJBYU

#

my cat 😭

hardy viper
teal estuary
#

😔

teal estuary
hardy viper
hardy viper
teal estuary
#

oooh, ty

hardy viper
nocturne garnet
silent pawn
#

how do you declare jokers undiscovered or not unlocked now

#

or can you just not

weary jungle
#

i think it was discovered and unlocked

#

i dont know why it says that, i have it in my joker and it works

silent pawn
#

yeah but if its unsupported its not going to give out an error it just wont do anything

weary jungle
hardy viper
nocturne garnet
silent pawn
#

L change

#

so pointless

teal estuary
#

but why make it harder to do đŸ€š

weary jungle
nocturne garnet
#

its a thing in my mod

#

curses are bad

#

purified curses are good

weary jungle
#

ok got it

silent pawn
#

doesnt it make more sense to call them blessings

#

or are purified curses like regular curses but converted

weary jungle
#
    set_ability = function(self, card, initial, delay_sprites)
        card:set_edition("e_negative")
    end,
    unlocked = true,
    discovered = true,
    loc_txt = {
        name = "NAME",
        text = {"DESC"}
    },
    loc_vars = function(self, info_queue, card)
        return {vars = {}}
    end,
    config = {extra = {}},
    atlas = "runes",
    set = "Runes",
    name = "runes-NAME",
    key = "name",
    pos = {x = 0, y = 0},
    cost = 4,
    order = 1,
    can_use = function(self, card)
        CONDITION FOR USING
    end,
    use = function(self, card, area, copier)
        G.E_MANAGER:add_event(Event({trigger = 'after',delay = 0.3,func = function()
            ON USE
        return true end }))
    end,
}``` I made this template to help me make runes easier, is there anything wrong/i should change?
weary jungle
#

if i want cryptid support, is there anything i have to do, or is it good straight out of the box

#

Im making consumables, is there anything that needs to be done for code cards or something?

weary jungle
#

good

nocturne garnet
#

how do sprites work

#

they are

#

confusing

#

i want to make a sprite appear in the middle of the screen when i use this spectral

#

unfortunately i do not know how

weak brook
#

Any Steammodded devs/contributors active rn? Found a bug relating to the implementation of DeckSkins that needs fixing.

Line 58 in loader.lua detects instances of SMODS.DeckSkin in the code and identifies it as SMODS.Deck, and falsely flags the mod as outdated. This causes serious problems for mods that use prefixes, as all the objects that use prefixes get their prefixes removed and their keys change

outdated = { pattern = { 'SMODS%.INIT', 'SMODS%.Deck' } },

I wanna implement a fix for this locally for my own purposes for the time being until it gets fixed but im not sure how exactly

#

adding a curly bracket after Deck fixes it but that seems a bit hacky

jade gorge
#

is there like a template to coding balala jonklerss
i have minimal Coding experience but have many ideas

wintry solar
weak brook
#

just feels like such a simple fix that there might be a better way to do it but i mean hey

#

i guess it works

#

im writing an issue page for this on the github page rn

hardy viper
jade gorge
#

waow

weak brook
hardy viper
#

regardless you could just do SMODS%.Deck[{(]

#

oh wait no

#

SMODS%.Deck[{\(]

#

fuck discord

weak brook
#

yeah i dunno the pattern syntax and stuff so i had no idea what to put for that

#

thanks

hardy viper
#

wait why is

#

fuck idk the lua regex engine

hardy viper
tepid crow
#

might also want to match optional whitespace

rough furnace
#

I don't think you need to escape ( in a []

#

not sure

hardy viper
#

probably safer anyways

hardy viper
#

i don't have too much regex experience widecatstare2

edgy reef
#

I'm not sure trying to target SMODS.Deck{ or SMODS.Deck({ will work since 0.9.8 API declaration is SMODS.Deck:new(

tepid crow
#

Flowwey's right actually

#

the match would be SMODS.Deck[:.]new

torn grove
#

I'm genuinely lost, I just can't see it

tepid crow
torn grove
tepid crow
#

you forgot a comma

wintry solar
#

I mean, the error message tells you what line is wrong

torn grove
#

oh yeah

tepid crow
#

just... try and solve it on your own next time

torn grove
#

I did try, but I just couldn't make heads or tails of it

#

also I added a comma to line 78 (the one the error said was bad) and it still gives the same error

#

I removed this entire part and it still says the same thing; maybe it isn't line 78 then

torn grove
#

did some tinkering and got it to work! had to copy some code off of NLM but I'm sure the creator will be fine with that.

#

also, I kinda want getting a second dream catcher to reduce hand size by 2, like how ectoplasm does

split creek
#

Trying to get multiples of a single joker to work, but it doesn't seem to be doing anything

[[patches]]
[patches.pattern]
target = "functions/common_events.lua"
pattern = '''elseif not (G.GAME.used_jokers[v.key] and not next(find_joker("Showman"))) and'''
position = 'at'
match_indent = true
payload = '''elseif not (G.GAME.used_jokers[v.key] and (not next(find_joker("Showman")) or not v.ability.name == "mtg-relentlessrats")) and'''```
any thoughts?
wintry solar
#

you want to check the key, not the name

split creek
#

so would it be v.key == "mtg-relentlessrats"?

wintry solar
#

j_mtg_relentlessrats, assuming mtg is your mod prefix and relentlessrats is your defined key in the joker

split creek
#

ok ok

edgy reef
#

Can't you use in_pool to allow your joker to allow itself to have duplicates?

#

I assume that's what this injection is meant to do.

split creek
edgy reef
#

It's a function.

#

Not a boolean

#

Something like this iirc?

in_pool = function(self)
  return true, { allow_duplicates = true }
end
torn grove
#

How do I make unlock conditions for Jokers? I want a certain joker to be unlocked if you have 10 joker slots at once.

split creek
#

Regarding this same joker, I want the duplicates in the shop to have negative, and this doesn't seem to be doing anything

[[patches]]
[patches.pattern]
target = "functions/common_events.lua"
pattern = "if card.ability.consumeable and not skip_materialize then card:start_materialize() end"
position = "after"
payload = '''
    if next(find_joker("mtg-relentlessrats")) and card.ability.name == "mtg-relentlessrats" then
        card:set_edition("e_negative", true, nil, true)
    end
'''
match_indent = true```
rough furnace
#

shouldn't the find_joker be j_mtg_relentlessrats

#

also probably SMODS.find_card

split creek
#

Didn't know smods has a find_card function

rough furnace
#

yeah idk

#

not sure what it does differently

split creek
#

just read the documentation, it's to prevent mod name conflicts

edgy reef
rough furnace
#

oh it doesn't really notice cause my key and name are the same

frosty dock
#

yep it usually doesn't matter, but names aren't always without collision (should you happen to specify one) and this version is consistent across modded and vanilla objects

weary jungle
#

how do i add a description with the name of the things

#

can you pass an edition into loc_vars

rough furnace
#

Like the tooltip

weary jungle
#

yep

rough furnace
#

With the key you want

weary jungle
maiden phoenix
#

Would be nice if the text was more fitting with Balatro's, there are a lot of mismatches in this picture (black xmult, mult not capitalized etc..)

weary jungle
#

i made it black because itsa like really bad

#

so its evil

placid frigate
#

is there a dictionary or glossary on where to find the variables and what each one does

zealous glen
#

What variables

#

Steamodded has a wiki

#

The scoring calculation has been broken down here and there

#

Other things not specifically

torn grove
#

How do I make it gain money for every Joker you have?

zealous glen
#

Count how many Jokers you have

placid frigate
zealous glen
#

Like an one time effect?

torn grove
#

I want it to gain $3 for every joker you have at the end of the round

zealous glen
placid frigate
zealous glen
#

There’s like a small number of built-in ones

#

So you track the current value yourself

placid frigate
#

ok

zealous glen
#

Note that it needs to go inside the extra table

torn grove
placid frigate
zealous glen
torn grove
#

vs code

#

anyway gtg

zealous glen
zealous glen
torn grove
#

ok

placid frigate
zealous glen
placid frigate
#

ok thank you

#

I look at that

weary jungle
#

when i open my runes section and go back out, the other consumables dont show until all of the consumables do the negative animation

rough furnace
#

sounds like a blocoking event

weary jungle
hardy viper
#

yup

#

add a wrapper for the back func to clear the event queue ig

weary jungle
#

the what on the huh?

hardy viper
#

exit_func in the uibox you made

weary jungle
#

i did not make a uibox

crisp coral
#

the events are from set_edition

#

which should have an instant field

weary jungle
#

wouldnt that make it so everytime you find it naturally itd also be instant?

crisp coral
#

i think that'd be better since it signifies that the negative is from itself and not a natural source

weary jungle
#

which would be silent = true, but then itd be really hard to tell that runes are negative

rough furnace
#

I mean in the collection they probab;y should be silent

weary jungle
#

how do i do things only in the collection?

rough furnace
#

you should be able to check if card.area.config.collection is true(?)

weary jungle
#

if it exists, its true right

rough furnace
#

in this case yes

hardy viper
rough furnace
#

SMODS does it for you

weary jungle
#

consumable type?

hardy viper
rough furnace
#

yeah

hardy viper
#

convenient

weary jungle
#

trust me, if i was supposed to make a ui i would not have made mods

rough furnace
weary jungle
#

card:set_edition("e_negative", card.area.config.collection, card.area.config.collection) This would work right?

rough furnace
#

¯_(ツ)_/¯

#

try it and see

weary jungle
#

table.insert(contents.nodes[1].nodes[1].nodes[1].nodes, #contents.nodes[1].nodes[1].nodes[1].nodes + 1, exit_button) i still dont understand this (Escape exit example mod)

rough furnace
#

the ui is like a tree

#

each element can have child nodes

weary jungle
#

i know its a tree, but there is like no labeling

rough furnace
#

yes

weary jungle
#

i dont know whats waht

rough furnace
#

the objects have a type on them

#

if your familar with the JS dom contents.nodes[1].nodes[1].nodes[1].nodes is like element.children[0].children[0].children[0].children

weary jungle
#

i can deduce that contents.nodes[1].nodes[1].nodes[1].nodes is the escape menu, but i dont know where any other ui element is

rough furnace
#

yep

#

we unlike in the dom we don't have good debug tools

weary jungle
#

aw man

rough furnace
#

they might not have the area when the edition is set yet then

weary jungle
#

im going to add and true and see if that works

tepid crow
rough furnace
#

I've thought of making one bhut I don't have the determination

weary jungle
#

nope...

rough furnace
#

maybe if I end up writing a good text system for DebugPlus I can see it happening

#

maybve

tepid crow
weary jungle
#

i do not know what dom is, so this is funny

rough furnace
#

dom is how javascript interacts with webpages

weary jungle
#

yea inspect all the doms i wont stop you

tepid crow
#

the DOM is basically the HTML/CSS/JS equivalent of the UI tree in balatro (?)

rough furnace
#

dom is how js interacts with html

weary jungle
#

i am a print() lover

rough furnace
#

but it works very similar to how balatro represents it's ui

#

it also has a super handy debugger

weary jungle
rough furnace
weary jungle
tepid crow
#

yeah

#

the HTML "tree"

tepid crow
weary jungle
#

aka the faking google searches menu

rough furnace
#

Balatro's UI could be represented in a similar system

#

but it would have to be made from scratch

#

and I don't want to make an baaltro ui inspecter with the balatro ui

#

sounds like pain

tepid crow
#

LMAO

#

just debug your debugger with your debugger

rough furnace
#

I think the dev tools are written with html and js

weary jungle
#

make the ui inspector with a HTML-like DOM inspector

rough furnace
#

well now I need to make an HTML like system in love2d

lethal stratus
#

making a card like ride the bus, but it increases only on face card use

weary jungle
#

ride the limo

lethal stratus
#

okihau express

#

from v/s

#

lol

rough furnace
#

but I have plans to make a semi-competent text system for DebugPlus's console

#

so something like that might make that bareable

weary jungle
#

i want to execute comands in debug+

rough furnace
#

okay switch to the dev branch

weary jungle
#

just like printing values or something

#

also is there a way to restart balatro without holding m? i always acidentally hold m for too long and type mmmmmmm

rough furnace
#

I just go to my terminal ctrl + c it then up and enter

tepid crow
#

I made a shortcut that automatically closes and restarts the game so I only have to click a single button

weary jungle
#

on windows

tepid crow
#

yea

weary jungle
#

maybe like control M

rough furnace
#

you can use smods keybind api and just call the restart function

#

I don't like that function its cursed and has weird behvaiours with a couple things

#

mostly screws up my terminal

#

we would have a better way if lovely didn't implode

weary jungle
#

ok quick swap mods to make debug + addons for myself

lethal stratus
#

resets every hand

weary jungle
#

debug + is lovely??? no1!!!!

weary jungle
rough furnace
weary jungle
#

its different....

rough furnace
#

how?

#

you already have lovely

weary jungle
#

you have to only use lua even if you are more comfortable with lovely and lovely gives you more freedom!!!!

#

(jokr)

rough furnace
#

I don't need any of the api's smods uses and I need to modfiy the middle of a few functions as well as some stuff thats run before smods loads mods

weary jungle
#

delete debug plus and start it all over again 😔

#

also where is the restart function

rough furnace
#

SMODS.restart_game() I think

split creek
#

Does anyone know the correct way to go about reducing the ranks of cards when using steamodded?

#

It seems like the ranks store which rank is next, but not which one is previous

rough furnace
#

I think you cna go through SMODS.rank and theres a property for next(?)

#

so find the one with yours as next

split creek
#

ah so loop through the whole thing like a linked list

#

ill try that

weary jungle
#

using my debug mod to debug the debug mod

rough furnace
#

I use DebugPlus to develop DebugPlus all the time

weary jungle
#

im calling my mod debugplusplus even though its more like debug plus|

#

(not even a full letter of plus)

rough furnace
#

what are you even doing extra?

weary jungle
#

control M instantly reboots game and sets a savestate in slot 0

#

thats it

rough furnace
#

ok fair

weary jungle
#

how do i control

#

if controller.held_keys["control"] then

#

is it like command or something

hardy viper
#

just use SMODS.Keybind

weary jungle
#

am i dumg?

rough furnace
#

it would be lctrl or rctrl iirc

weary jungle
#

can i just write "m", "rctrl" in key pressed?

hardy viper
#

look at the example mod

#

that uses keybinds

weary jungle
#

oh yeah

rough furnace
#

I wouldn't know I do keybinds manually cause I'm not a SMODS mod

weary jungle
#

you are lovely

#

(im using that as a pickup line)

rough furnace
weary jungle
#

i dont think you are a SMODS mod, because you are lovely

rough furnace
#

i dont think you are a SMODS mod, because you are a cursed script that modifes the executable directly

weary jungle
#

i dont think you are a SMODS mod, because i can see all of your uiboxes

gaunt thistle
#

thank

weary jungle
#

yw

lethal stratus
#

i dont know why its resetting every hand

split creek
rough furnace
weary jungle
#

diffwent

lethal stratus
#

:(

#

the card was working entirely fine until i added the hook check

#

is that check wrong?

rough furnace
weary jungle
#
    key = "RestBalatro",
    key_pressed = "m",
    held_keys = {'lctrl'},
    action = function(controller)

        if G.STAGE == G.STAGES.RUN then
            if not (G.STATE == G.STATES.TAROT_PACK or G.STATE == G.STATES.PLANET_PACK or G.STATE ==
                G.STATES.SPECTRAL_PACK or G.STATE == G.STATES.STANDARD_PACK or G.STATE == G.STATES.BUFFOON_PACK or
                G.STATE == G.STATES.SMODS_BOOSTER_OPENED) then
                save_run()
            end
            compress_and_save(G.SETTINGS.profile .. '/' .. 'debugsave' .. "0" .. '.jkr', G.ARGS.save_run)
            log("Saved to slot 0")
        end
        delay(0.5)
        SMODS.restart_game()

        
    end
}
```this is just not restarting
#

it closes balstro but doesnt reopen it

humble gale
#

does anyone know how to check if a card has a modded edition?

weary jungle
#

modded editions have prefixes right

#

so its not e_name
its e_prefix_name right

humble gale
#

yea

#

wait i think i got an idea. ill report back

#

nvm it didnt work

#

checking if edition == "key" doesnt work

rough furnace
#

do you have the edition object?

#

cause I think they have a mod key if its from a mod

humble gale
#

its declared as SMODS.Edition so yeah

#

and its key is e_prefix_name

#

i can get the edition to apply and work. Im just checking if a joker has that edition with another joker and nothing will run

rough furnace
#

Yeah if you have the center, if it's from a mod it has a mod key on the cetner

#

These 2 were the examples

humble gale
#

well this didnt work either

for i, joker in ipairs(G.jokers) do
   if joker.edition.name == 'e_jojo_misfortune' then
     joker.set_edition(joker)
     break
   end
end
#

idk if im misunderstanding what your saying

rough furnace
#

what are you trying to do?

humble gale
#

i want to remove the edition if it is on the current joker

split creek
# rough furnace idk probably bring it up in <#1209564621644505158>
    SMODS.Ranks["2"].previous = { }
    SMODS.Ranks["3"].previous = { "2" }
    SMODS.Ranks["4"].previous = { "3" }
    SMODS.Ranks["5"].previous = { "4" }
    SMODS.Ranks["6"].previous = { "5" }
    SMODS.Ranks["7"].previous = { "6" }
    SMODS.Ranks["8"].previous = { "7" }
    SMODS.Ranks["9"].previous = { "8" }
    SMODS.Ranks["10"].previous = { "9" }
    SMODS.Ranks["Jack"].previous = { "10" }
    SMODS.Ranks["Queen"].previous = { "Jack" }
    SMODS.Ranks["King"].previous = { "Queen" }
    SMODS.Ranks["Ace"].previous = { "King" }
end```
#

The solution

rough furnace
#

what about modded ranks?

rough furnace
rough furnace
split creek
#

This will have to do for now

rough furnace
#

Oh I didn't realize next was a table

split creek
#

Yeah, it is

#

I think it's used for the random option

rough furnace
#

Probably something like lua for k, v in pairs(SMODS.Ranks) do for _, r in ipairs(v.next) do local rank = SMODS.Ranks[r] if not rank.previous then rank.previous = {} end table.insert(rank.previous, v.key) end end would work

split creek
#

Whats the difference between pairs and ipairs?

#

Cause I was trying to do this but couldn't get it quite right

rough furnace
split creek
#

ooohhh

#

that makes a lot of sense

#

I was using ipairs for the first line, so it wasn't actually doing any iterating

#

Does anyone know how Suit objects are stored in SMODS.Suits? I'm trying to make a playing card of a custom suit, and I don't know how they're indexed

#

Grim can randomly select the custom suit, so I know that it's in that table

elder vapor
#

could look at the base game and see how those are stored

orchid thunder
#

Can I make a secret hand like royal flush

molten ice
# split creek Does anyone know how Suit objects are stored in SMODS.Suits? I'm trying to make ...

a table with the index using the suit's key (EX: 'Spades', 'bunc_Fleurons') iirc and the value being the actual SMODS.Suit object itself

Grim's generation involved a special implementation inside pseudorandom_element (SMODS's lovely patch to make it possible, the implementation can be viewed from lovely dump) that iterate through SMODS.Suits's own object buffer to make it a proper list + checking in_pool

zealous glen
stray warren
#

Oh cool, thank you. I was having that same issue with the nexts being identical with the Ace and the Apostle

azure bane
#

Is anyone interested in a making a mod that reskins face cards to monstergirls? I have a copy of Aseprite

hardy viper
#

i don't remember which mod is used for deck skins these days though

#

malverk? deckskinsplus? smods? who knows !

wintry solar
#

Smods has it built in but I believe deckskins refactored to use it so you can still use the old deckskins format

weary jungle
#

How do i see the current ante

#

is it G.GAME.round_resets.blind_ante

#

why dont i check actually

hybrid iris
#

ive got it in a semi-usable state

#

just ignore the fact that it doesnt work for returning variables for some reason

hardy viper
#

shouldn't need patches for this

hybrid iris
#

if there was an easier way to do this im going to actually explode

weary jungle
#

idk globals or something

hybrid iris
weary jungle
#

i did something similar and just spawned a joker

hybrid iris
#

sdkfjhsdkfjh

hardy viper
hybrid iris
weary jungle
#

but im lazy

hardy viper
#

i wouldn't know i don't do much smods stuff

hybrid iris
#

so why would you say it so confidently???

#

sdfjhskdfjh

weary jungle
hybrid iris
hardy viper
hybrid iris
#

,,,you'd think that

#

i did too on first glance

weary jungle
elder vapor
hybrid iris
#

not to mention contexts being a pain

weary jungle
#

why dont you keep on use, toggle a global variable, only allow consumable to be used if not variable and then do things?

weary jungle
#

im not that caring of formatting rn

elder vapor
weary jungle
#

is that a good sdkfjhsdfkjh or a bad sdkfjhsdfkjh