#💻・modding-dev

1 messages · Page 260 of 1

vocal cedar
#

Like I made a joker a while ago that basically does the exact same thing as boredom from cryptd

#

just remade the art to make it comepletely different

#

and yeah boom thats pretty good

#

it DOES look good.

And I can tell that you still put your own personal twist on it, though, I personally think you should go for it as long as the joker does not do exactly the same thing, and if it does, maybe just say that you got the idea from Crypton?

#

Cryptdi

#

idk man art is a scary thing

lethal ridge
#

Hmm okay

#

Ill credit to cryptid for the art reference

#

But ill make the ability different

turbid maple
#

I'm really not sure how your mod is referencing cryptid but if it's like, a weaker version of the circular pie in latin you could keep the aesthetics and the design but have it be like a slice of pie

lethal ridge
#

Okay ill make a slice of pie instead

#

🔥

turbid maple
#

i think that'd be neater if you're going for the reference angle than completely copying the sprite

unkempt kestrel
#

how can i change the enhancement of a card? like theres card:set_seal and card:set_edition but no card:set_enhancement

stray warren
#

set_ability

unkempt kestrel
#

oh wait yeah i just found that

vast fractal
#

WARN - [♥] Pattern 'mult = mod_mult(mult + effects[ii].mult)' on target 'functions/state_events.lua' for pattern patch from SurtrMod\lovely\boss_blind_switch.toml resulted in no matches

why it is resulted in no matches for some reason?

gaunt thistle
#

sanity check is to make sure it's not being modified by a different patch before yours

vast fractal
marble flint
#

pretty sure smods new calc nukes that

#

in smods/lovely/better_calc.toml

vast fractal
#

time to suffer again 😭

daring fern
#

Is there anyway to make vouchers in the consumable slots not calculate?

lethal ridge
#

Pi

chrome widget
#

For reasons that escape me, attempting to hook G.FUNCS.evaluate_play results in an indefinite hang

#
G.FUNCS.evaluate_play = function(e)
    local ret = ref_evaluate_play(e)
    G.E_MANAGER:add_event(Event({
        trigger = 'immediate',
        func = function()     
            if math.floor(hand_chips*mult) >= G.GAME.blind.chips then
                G.GAME.chip_novas = G.GAME.chip_novas + 1
                check_for_unlock({type = 'chip_nova', total_novas = G.GAME.chip_novas})
            end
            return true 
        end
    }))
    return ret
end```
#

It just hangs here after scoring?

#

WHOOP found the problem. It was in another function entirely lol

daring fern
fickle stag
#

how do I debug this crash lmfao

minor furnace
small moon
#

Getting this crash when trying to view the Achievements tab in-game for my mod
These are the two Achievements I've added:

minor furnace
#

because currently I'm setting the new blind in Game:update_hand_played()

#

it's probably some STATE transition thing I need to figure out

chrome widget
#

Hmm now I'm trying out how to determine if you played a card that was face down

#

It seems like the facing and ability.wheel_flipped properties are both set before any of the regular hand contexts are fired

daring fern
#

Is it possible to make a showman but for vouchers?

chrome widget
#

You'll probably have to do some edits to default vouchers to make sure voucher copies work properly, but it's not impossible with a lovely patch probably

azure pilot
chrome widget
#

That's intentional and wouldn't cause recursion

#

It's saving the existing function saved in the key, then overwriting it, and then calling the original within the function body. It's essentially the same as calling an the base of an overidden method in more properly OOP languages

azure pilot
#

Oh I think I see, its originally bound to the vanilla Balatro function, and then you make your own and call the original, kind of like using super()

chrome widget
#

Yep, basically

azure pilot
#

Neat

chrome widget
#

But no the reason for the hang was bcause I had also overridden the end_round function, but the event I queued inside it didn't return true

#

If you don't intentionally return true from events, they play indefinitely

azure pilot
#

I see, good to know

#

I'm a little unfamiliar with Lua, but I like how its structured, its so easy to navigate when it's basically just a bunch of functions lol

small moon
#

I half feel like I need a localization file for this and it's crashing because it's not finding one

covert scroll
#

Is there a index for all the color codes in this format like {X:mult,C:white} X#1# {} Mult for loc_text it would be nice to know ones for like money, chips, etc

small moon
chrome widget
#

That function indexes shorthands for colors stored in the G.C table (colors)

small moon
#

Is it not also what the C:white and stuff reference?

red flower
small moon
#

If you want an image for easier reference I made this a bit ago

daring fern
#

Is there a way to force jimbos voice to be half the speed and pitch?

foggy carbon
#

when does Card:set_debuff( actually get run? If I made it so that certain bosses only had a chance to debuff, when would that RNG be rolled?

#

when the card is drawn, or when the boss blind is selected?

vocal cedar
#

a joker a day keeps the depression at bay!

#

thus i begin to mod my fourth joker ever

#

adding all my buddies as jokers to start

#

then once im comfortable

#

doing an ACTUAL good mod that reworks the legendary jokers significantly

gaunt thistle
#

The legendary joker rework sounds interesting

#

We'll be watching your progress intently

old bane
#

do sticker effects not calculate anymore when a Joker is disabled?

#

because in an earlier version of smods they did and now they do

solar eagle
#

some dont do anything if redeemed multiple times

daring fern
solar eagle
#

mess with in_pool and allow_duplicates maybe? idk

lethal ridge
#

3 layers

#

Pi joker

#

!!!

solar eagle
#

what function displays the text here?

#

bc its set by G.FUNCS.evaluate_play once you click Play Hand but i cant figure out what does beforehand

teal belfry
#

crash upon starting a run, any deck breaks it, no sleeve, white stake

solar eagle
#

ok

teal belfry
#

thanks very helpful

solar eagle
#

is this cause of a mod youre creating?

teal belfry
solar eagle
#

this is for mod development mostly

#

we arent ur free troubleshooters

runic pecan
#

Am cooking rn

solar eagle
#

PARSE_HIGHLIGHTED GOTCHA

tall wharf
#

hi

runic pecan
teal belfry
daring fern
paper zealot
runic pecan
gaunt thistle
#

My presumption is that you could lovely patch this function

#

in card_character.lua

#

or just call play_sound directly with your own pitch and volume values

tall wharf
#

wtf jimbo has 11 voices

gaunt thistle
#

jimbo is a talented vocalist

runic pecan
vocal cedar
gaunt thistle
heady siren
#

I wanna override the played poker hand, and I'm doing so by changing the played hand text and then setting the chips and mult to the new poker hand values, but when it gets past the before context it forcibly sets the chips and mult back to the original values, is there any way to make them stay that way without exiting the before context?

tall wharf
#

thunk spitting fax

heady siren
#

I don't know how I'd make it not reset to the original values, the text stays changed, but not the actual chip and mult values

#

I also wanna find a way to increment the played count for the new poker hand and reverse the played count for the original poker hand

daring fern
tall wharf
#

can poker hand set score value directly

heady siren
#

How?

tall wharf
heady siren
#

Oh you're asking a question

runic pecan
runic pecan
tall wharf
heady siren
#

It resets the chips / mult to the original hand value

pale venture
#

Is there a way to check if the cards in your full deck have changed in any way? I'd want to avoid running a function that iterates through the deck every frame balatrojoker

heady siren
tall wharf
#

hmmmm

simple mural
#

Dynamic description for joker vedalUUH

heady siren
#

You can set local variables to be strings

#

That's how triggers on [hand] works in descriptions

simple mural
heady siren
#

Yeh

#

You can put an empty string in the description and then change the string in the joker logic

simple mural
simple mural
heady siren
#

The description local variables are put in within the string so probably not

#

You can try it if you want to

simple mural
heady siren
#

Yeah

simple mural
#

Oke

heady siren
#

Just with strings instead of numbers

long sun
#

is there a way of setting the number of chips directly?

daring fern
#

I'm not certain though.

#

I just checked and it should work.

heady siren
hushed field
# heady siren This is the current code in the before context

I'm not sure about the exact details, because this is a pretty specific idea you're implementing, but I reckon you may need to hook or patch the eval code, as I suspect the actual base chips and mult are set a bit later, so get overridden. Let me check when boss blinds change that

long sun
heady siren
hushed field
#

I have no clue how cryptid approaches it, sorry

tall wharf
#

omg ghost

long sun
#

haiiiii :D

hushed field
#

<@&1133519078540185692>

vocal cedar
#

<@&1133519078540185692> oh moderators!!!!

#

:)

lethal ridge
#

what was that

#

💀

heady siren
vocal cedar
#

just another day in balatro discord

lethal ridge
#

not again

#

💀

vocal cedar
#

lmfao

long sun
#

:P

hushed field
#

prepare for trouble and make it double, huh

vocal cedar
#

<@&1133519078540185692>

heady siren
#

I have a feeling it's spreading immediately to all DMs, and immediately takes over accounts somehow

heady siren
#

And that person fell for it

lethal ridge
#

i once got hacked by some steam giftcard link

#

it sent it to all my dms and servers

heady siren
vocal cedar
hushed field
lethal ridge
#

imma make a blackhole joker

heady siren
vocal cedar
heady siren
#

That function hooks into the evaluate_play function, which is where the stuff it returns is actually referenced

hushed field
lethal ridge
#

i have that gif somehow saved

long sun
hushed field
#

but as I said, just copy that implementation into a global function, and inject it to run right before when the blind version of it gets called

lethal ridge
long sun
#

aware

hushed field
#

or create a context that gets called there

long sun
#

but i don't know what that implies

heady siren
lethal ridge
#

send code

heady siren
# lethal ridge send code

The code is likely referencing a base game file, and doesn't reference back to their own file directly

long sun
#

well, the exception wasn't thrown in my code, but okay

long sun
#
SMODS.Joker {
  key = 'goo',
  config = { extra = { chips = 200 } },
  rarity = 2,
  atlas = 'Phanta',
  pos = { x = 1, y = 9 },
  cost = 7,
  blueprint_compat = false,
  loc_vars = function(self, info_queue, card)
    return { vars = { card.ability.extra.added_xmult, card.ability.extra.current_xmult } }
  end,
  calculate = function(self, card, context)
    if context.joker_main then
      hand_chips = mod_chips(chips)
    end
  end
}```
heady siren
#

Something in their file is trying to reference something in a base game file and the base game file is the one that got confused

long sun
#

ah wait is it because i forgot a localisation entry

#

sjdkfgn waitwait

#

no i see it -w-

#

chips

#

fsdngdjkgnkdf this code is garbage, sorry 😭

hushed field
heady siren
forest ivy
#

ig thats first joker ever made by ai

long sun
#

ah, so the chip setting code worked, but it didn't display that on the left

lethal ridge
forest ivy
#

ai.

heady siren
# zealous glen How so

I'm trying to brute force a poker hand to be considered a different poker hand, by changing the hand text and adding the difference between the original poker hand and the replacement poker hand in chips and mult

long sun
#

ai? why?

forest ivy
daring fern
zealous glen
long sun
#

like. why is ai better than making it yourself

zealous glen
#

conditionally of course

heady siren
forest ivy
heady siren
zealous glen
long sun
#

you implied that when you used AI instead of making it yourself

lethal ridge
#

wait

lethal ridge
#

this just gave me a cool idea

#

proceedurally generated jokers

heady siren
zealous glen
#

Someone has done it before IIRC

lethal ridge
#

so it might be possible

zealous glen
#

I think someone else was trying to do something similar yesterday

heady siren
#

You could make randomized effects pulled from a list in a single joker when it's acquired but I think that's about it

long sun
#

perfect, that works, thanks!! :D

lethal ridge
#

true

zealous glen
#

That’s procedural generation ;P

heady siren
zealous glen
#

I know it’s called when you highlight cards

#

And it calls something like get_flush for the different poker hands

heady siren
#

There's two functions that I've seen that directly modify the played hand but they are self referential and I can't really hook into them easily

zealous glen
#

You don’t want to modify the played hand, you want to change the poker hand type as it’s calculated

#

It returns a table containing every hand contained in your hand

#

So you can just add the entire hand to the correct place in that table

#

Or replace the output

heady siren
#

It's a miracle I've gotten 5 jokers to work so far

lethal ridge
#

how do i put 3 layers on a joker

#

like soul_pos for the second one

#

but how with the third?

tall wharf
lethal ridge
tall wharf
#

???????

lethal ridge
#

like

#

a joker that gets created randomly

#

with random effects and art

#

like it got ai generated

runic pecan
#
  • which context its effect triggers
  • which kind of effect it has
    Randomly generating combinations
    You mean like that?
tall wharf
#

o i i a

lethal ridge
#

i looked into cryptid mod

#

i saw it used

#

soul_pos.extra

#

i tried that too but it doesnt work

zealous glen
#

Cryptid adds its own third layer to be handled automatically

tall wharf
#

they have extra code

lethal ridge
#

ohh

tall wharf
#

"คุณพี่กำลังทำอะไร"

lethal ridge
tall wharf
#

youll have to handle

#

draw steps

runic pecan
tall wharf
#

n shit

lethal ridge
#

thanks

runic pecan
#

I do have an idea about generating random art, though.

#

Just stacking stickers.

lethal ridge
runic pecan
#

Like those online character creator stuff

lethal ridge
#

like a mix and match

zealous glen
lethal ridge
runic pecan
lethal ridge
#

i might need it on multiple jokers

zealous glen
lethal ridge
#

good thing this exists

zealous glen
#

Currently I only have it on two

lethal ridge
#

i can now go search how people do it

lethal ridge
#

woahhh

#

thats sick

zealous glen
#

Thank you

zealous glen
vocal cedar
#

hey chatters

working on a specratl card

any good pixel artists here know how to like

"de-smooth" the pixels? when i try to double the size of the background it turns all smooth and blurry

lethal ridge
vocal cedar
zealous glen
zealous glen
lethal ridge
#

in this case make a third layer of soulpos

lethal ridge
zealous glen
#

I reckon it’s in most popular relevant art softwares

lyric wadi
heady siren
#

I DID IT, BY GOD I DID IT

lyric wadi
lethal ridge
vocal cedar
paper zealot
#

That's totally unnecessary

#

Just scale it up in whatever program you're using

heady siren
paper zealot
#

I guarantee there's a setting to not use interpolation

lyric wadi
#

yeah you see

#

the problem is that i use gimp

lethal ridge
#

without joker?

paper zealot
heady siren
zealous glen
lethal ridge
#

what is vortex in drawstep?

lyric wadi
paper zealot
#

I exclusively use Gimp

lyric wadi
#

my condolences

paper zealot
#

Gimp 3 is great if you haven't updated, by the way

lethal ridge
#

how does the order work in drawstep

#

its a bit confusing

zealous glen
#

It’s on the wiki

#

It just draws each step in order

lethal ridge
#

ohh over here

vocal cedar
tall wharf
#

force of habit to say RC

vocal cedar
#

not quite done

#

but by god thank you

lethal ridge
#

SMODS.DrawStep{
key = 'shs_thirdsoul_pos',
order = 59,
func = function(card, layer)

end

}

#

a bit confusing

#

how should i proceed

#

do i say that

#

if card.ability.soul_pos.extra then

#

something like that

paper zealot
vocal cedar
#

2x is so hard to edit

tall wharf
vocal cedar
#

@paper zealot this is day three for me king

lethal ridge
#

if i print in my code

#

it will go in the command thing right

paper zealot
lethal ridge
#

thanks

#

uhoh i guess im cooked

#

i fixed it :D

manic rune
#

good morning everyone

lethal ridge
#

hello

lethal ridge
tall wharf
manic rune
#

:3 whats that

manic rune
tall wharf
manic rune
#

:3

#

jesus

vocal cedar
#

ITS FUCKING DONE!

Ghost: Convert up to 5 selected cards to become Negative
-1 Discard

literally did the entire fucking thing by hand actually took me 4 hours

lethal ridge
tall wharf
#

I'm going to add math deck

lethal ridge
#

my code just broke randomly

manic rune
#

-# wdym u dont know

vocal cedar
tall wharf
#

i think the background is too busy

lethal ridge
#

and my game just broke randomly

#

i removed all my drawstep stuff

#

and it is still broken

vocal cedar
manic rune
#

but the ghost sprite looks really cute

vocal cedar
manic rune
tall wharf
#

if that's the case

vocal cedar
manic rune
#

try removing pieces of your code to identify the problem

tall wharf
manic rune
#

i dont have anything much to work with here, sorry

lethal ridge
manic rune
#

what

#

remove your mod folder

manic rune
long sun
tall wharf
long sun
#

lil' guyyyy

#

aware :3

tall wharf
#

i do not claim it as mine

long sun
lethal ridge
long sun
tall wharf
lethal ridge
#

i removed my mods folder

#

wait it fixed by itself

#

so weird

prisma loom
#

Is it possible to adjust pitch and volume in return?

vocal cedar
#

removed the border

#

see how he looks kinda like

#

thin tho

tall wharf
#

are you using layers

vocal cedar
#

mhm

manic rune
vocal cedar
manic rune
vocal cedar
#

heres bro by himself

manic rune
#

is this how i do it

tall wharf
vocal cedar
#

should i just 2x border him

vocal cedar
manic rune
#

-# im getting a crash rn, it says the colour is wrong

tall wharf
vocal cedar
#

anyway

#

plastic surgery

tall wharf
#

the other side too

paper zealot
vocal cedar
#

oh thats ass one sec

vocal cedar
#

i dont know what that means

#

😭

tall wharf
#

in essence you're not using consistent pixel size

#

some pixels are smaller than the rest

paper zealot
#

If you scoot the ghost down by 1, then resize the image down by half, it'll be good

vocal cedar
#

yeah bc i originally started on the 2x template on accident

tall wharf
#

scale it down 😭

vocal cedar
marble finch
#

quick question, even though ive seen there is the option to influence reroll costs, i havent really seen the option to force a reroll, does anyone know where i could start looking into it?

paper zealot
#

Making sure to use no (or "nearest neighbour") interpolation

manic rune
#

is this wrong?

azure pilot
#

What is the next() function/Where is its definition?

vocal cedar
paper zealot
# manic rune mmmm

This is probably from missing brackets in a node definition, or a text/DynaText object without a colour

manic rune
#

...im actually not sure what that means 😭

#

all i did was putting a new rarity key in my joker

#

thats weird

#

orrrr does it not require the mod prefix

#

and its just 3stars?

zealous glen
#

Blind idea:

Discard unselected cards instead of selected card

vocal cedar
manic rune
#

hmmm

#

yeah, that looks much nicer

vocal cedar
#

yeah

#

thats

#

easier on the eyes

#

lol

zealous glen
paper zealot
# vocal cedar

Definitely an improvement. Also looks like the middle layer between the ghost and the background is offset by 1 pixel, both horizontally and vertically

zealous glen
#

And I expect it’s definitely one people will mess up out of instinctual motion

brazen notch
#

in my opinion your biggest issue here is mixeling, which means mixing different pixel sizes
in other words, you're drawing on a 2x version of the card with a 1px brush

paper zealot
# vocal cedar

Look close at the little gaps between the middle layer and the background, you can see inconsistency where half pixels are peeking through

zealous glen
manic rune
# manic rune

alright so hsr_3stars is definitely the correct key

i just dont know whats with the colour crash

vocal cedar
#

😭

#

ooooooh fuck

paper zealot
vocal cedar
#

heard you like half pixels

manic rune
#

mhm, i know that

zealous glen
#

I think they’re working with a badge

manic rune
#

but whats the cause 💔

zealous glen
#

Because it’s a custom rarity

manic rune
#

yeah

zealous glen
#

So it needs a badge color

paper zealot
vocal cedar
#

problem for tomorrow me

#

man i havent even coded ts yet

#

shouldnt be too bad tho

#

thanks for all the art advice @paper zealot

#

i have

#

never touched a pencil let alone a pixel in my life!

paper zealot
zealous glen
#

Crayon-only run

vocal cedar
zealous glen
#

I also basically started doing art by editing Balatro Jokers

vocal cedar
#

pixel art is fun

#

im a programmer by name and school so i was like i might as well try doing the art as well right

manic rune
#

i should def get into pixel art at one point too

long sun
#

my Joker's crashing when i play a hand, does anyone know why?

SMODS.Joker {
  key = 'apollosbracelet',
  config = { extra = {  } },
  rarity = 2,
  atlas = 'Phanta',
  pos = { x = 4, y = 10 },
  cost = 6,
  blueprint_compat = true,
  calculate = function(self, card, context)
    if context.joker_main then
      local temp_chips = hand_chips
      hand_chips = mod_chips(hand_mult)
      hand_mult = mod_chips(temp_chips)
      update_hand_text({delay = 0}, {chips = hand_chips, mult = hand_mult})
      return { message = localize("swapped"), colour = G.C.FILTER, card = card }
    end
  end
}```
zealous glen
#

Just return swap = true I think

long sun
#

oh that exists??

#

whaaaa??

zealous glen
long sun
#

whar!!

zealous glen
long sun
#

was it used in vanilla?

zealous glen
#

The old Gold Seal code is still in the game too, at least partially

long sun
#

oh? what did it do before?

zealous glen
#

Returned a played card to the hand

long sun
#

ah icic ^^

#

aha swap = true works :DDD

maiden river
zealous glen
#

The only way to get it was on a random card

#

So it was absolutely useless

maiden river
#

Oh 😭

daring fern
#

Is there a way to get current tags?

hushed field
#

finished the third legendary joker for Kino. Only 7 more to go

warped marsh
#
    calculate = function(self, card, context)
        if context.joker_main and (context.poker_hands['Three of a Kind']) then
            return{
                dollars = 8
            }
        end
        if context.cardarea == G.play and (context.poker_hands['Three of a Kind']) and context.destroy_card then
            return{
                remove = true
            }
        end
    end
``` I have simple problem, here the game is checking for a 3 of a kind but it also checks 4 of a kind,  and it still gives money and destroys the card, etc but i want to be only 3 of a kind
hushed field
warped marsh
#

Oh I did not know that!

#

Also Ice!!!

#

exciting news but I got someone to do all the descriptions for me!

#

and they actually got some good experience

azure pilot
#

Which joker context variable checks all five cards used for a play, regardless of if they score? full_hand or scoring_hand?

shell timber
#

for some reason when i use the chips xchips etc. effects in the before context the effects get overwritten immediately after

hushed field
hushed field
azure pilot
#

What would get all cards in play in that case? like played as hand and also the cards that you didn't use

shell timber
#

shame

#

how would i do it before cards are scored?

azure pilot
#

Or just the ones you don't use

hushed field
shell timber
#

something like this

hushed field
# shell timber something like this

you're going to want to add a new context that triggers before main joker scoring, but after before scoring, so that the hand setting doesn't override it

daring fern
brazen notch
hushed field
zinc forum
#

Anyone knows how SMODS configs work? I'm getting attempt to index field 'current_mod' (a nil value) trying to access SMODS.current_mod.config.language

#

For reference here's my config.lua

return {
    ["language"] = "en"
}```
#

And here's where I try to access it

SMODS.current_mod.config_tab = function()
    return {n = G.UIT.ROOT, config = {align = "cm"}, nodes = {
        create_option_cycle({
            label = "Language",
            scale = 0.8,
            w = 6,
            options = {"English", "Japanese", "French"},
            opt_callback = 'rh_update_language',
            ref_value = 'language',
            current_option = SMODS.current_mod.config.language, -- This is where it crashes
          })
    
    }}
end```
brazen notch
#

where are you calling this from?

zinc forum
#

My main mod file

warped marsh
#

SMODS.add_card({ key = "j_eof" }) Will this create that Joker?

zinc forum
zinc forum
#

j_something_eof is probably more like what you're looking for

warped marsh
#

okay okay ill try that

zinc forum
#

I'm on the latest SMODS, maybe it has something to do with it?

daring fern
zinc forum
#

Ok so yeah it's just my bad, SMODS.current_mod only exists on loading which makes sense why it would die then

maiden phoenix
#

You can save SMODS.current_mod in a variable

zinc forum
#

Yeah I got that after fumbling around a bit

#

Now the config tab doesn't crash! just need to learn how to actually save, hopefully it won't be too difficult

maiden phoenix
#

Did you make a config.lua?

simple mural
#

Is there any wiki on Balatro sources? About what is there and how it works.

zinc forum
#

I did yes

maiden phoenix
#

Normally it should save automatically

iron iron
#

square joker supreme

modern kindle
#

Good schmorning chat

thin anchor
#

mornighn

manic rune
#

hi dilly :D

modern kindle
#

Bepiisssss

#

How are you this day

manic rune
#

im goog

#

but adding custom rarities is KILLING me

#

💔

zinc forum
modern kindle
manic rune
#

no

#

just a custom rarity

#

i dunno why they are crashing 💔

sonic cedar
#

have you tried just

#

registering a new color

manic rune
#

what

#

so my color is invalid? 🥀

hushed field
#

no never mind, not finishing that joke

manic rune
#

im actually so confused

#

why is it crashing

#

like, what?

hushed field
#

My only instinct looking at that is that it might be capitalization?

modern kindle
#

Hi ice

hushed field
#

I always write my hex codes in lower case, but I don't know if love2d or balatro's code cares about it

#

yo yo dill

manic rune
#

so i dont think thats the problem

sonic cedar
#

it used both fr 😭

manic rune
#

we love inconsistency in our code 🗣️

modern kindle
#

teh age old addage of working...

paper zealot
# manic rune

I'm not able to check the code at the moment, but have you tried providing just a string instead of the colour table?

sonic cedar
#

oh right duh

#

it doesn’t like that right

hushed field
#

all other badge_colour arguments work with HEX(), does rarity parse it differently?

manic rune
#

-# are we sure this is correct

thin anchor
#

jo
ker

manic rune
#

aaaand nope

manic rune
thin anchor
#

yes i LOOVE SELF INSERTS!!!! YEAHHHH!!!

manic rune
#

we love self inserts... ✊

paper zealot
# manic rune

Is k_3stars defined in a localization file somewhere?

manic rune
#

mhm

sonic cedar
#

that

#

what if k_hsr_3stars

agile thistle
manic rune
#

no, its hsr_3stars

paper zealot
#

Might just need to be k_3stars or k_hsr_3stars depending on timing

agile thistle
#

that's useful info

manic rune
#

...

#

-# what the fuck

#

no, like

if i want to get the rarity to use in my jokers, i use hsr_3stars

#

but for anything else its k_hsr_3stars??

paper zealot
#

I'm speaking a bit out of my depth, just looking at the smods game_object.lua file now

manic rune
agile thistle
#

nah we're not going to ignore Marge Simpson's Joker Pack

manic rune
#

what the hell is that 😭

lethal ridge
#

i cant figure this out

manic rune
#

i remember the episode when Marge played poker

lethal ridge
#

im trying to use drawstep to get another layer

#

but drawstep documentation dont tell me much

manic rune
#

doesnt seem to be it

vast fractal
#

does everyone know where the function of displaying the thingy in the red circle in SMODS?
im trying to find it for like hours now

lethal ridge
#

isnt that message

#

when you calculate

manic rune
#

they mean the function handling that

#

but im pretty sure thats in the balatro source code

#

not smods

agile thistle
lethal ridge
#

how do i use drawstep ahh

manic rune
#

thanks 🙏

agile thistle
#

from my guess somehow colour isn't being passed??? somehow????

manic rune
#

i dont know.

#

🥀

agile thistle
#

not so much a you issue i think

manic rune
#

i made sure that the rarity file is loaded BEFORE the joker file too

vast fractal
agile thistle
#

also

#

wild thing

#

make sure to run your mod entirely by itself, too (and with dependencies, obviously)

manic rune
#

true true

agile thistle
#

could also happen via a weird compatibility crack

manic rune
#

i have the custom decks for testing my jokers

thin anchor
#

how would i create a joker that creates a temporary playing card for every scoring played card?

manic rune
#

but im pretty sure they shouldn't interfere with the rarities 💔

#

i will do that just to be sure though

paper zealot
# manic rune doesnt seem to be it

You also tried k_3stars? I'm not sure exactly when the process_loc_text function is called, but it's possible that it happens before the hsr_ prefix is added onto the key

manic rune
#

oh, without the mod prefix? i will try that, hol on

paper zealot
#

Seemed unlikely but wanted to check just in case

#

I'll stop offering bad advice now and wait for someone more experienced with SMODS to weigh in

manic rune
#

they are not bad advices at all, dw :3

frosty dock
#

none ofthe localization stuff should mess with colours unless there's literally colours encoded in the text

paper zealot
#

Man, i hate this syntax

shell timber
#

??? you can write it like that???

#

HEX is a function

frosty dock
#

stringcalls

manic rune
#

that actually looks so cursed

#

💔

shell timber
#

of course lua has stringcalls

frosty dock
#

print "Hello world!"

paper zealot
#

Yeah, it's a lua thing. Valid for function calls with only a single string, or a single table

#

It's also why function_to_call{ 1, 2, 3 } is valid, which I'm also not a big fan of

paper zealot
# frosty dock `print "Hello world!"`

Useless trivia: Python 2 supported this syntax for print explicitly through the interpreter, but turned print into a standard function in Py3 requiring parentheses like any other

thin anchor
#

all i did was change 1 line of perkeo (line 275)

manic rune
#

you shouldn't name that var "card"

paper zealot
#

Holy comments, Batman

thin anchor
#

yeah, its in the example jokers mod, lol

modern kindle
#

i mean hey, comments are good

thin anchor
#

very useful to be honest

manic rune
#

comments are very useful

#

especially for when you take a rest from your mod for like a few weeks

#

then come back

open aspen
#

Or, if your working on a mod with others

manic rune
#

"wtf r those for"

#

-# no kidding, that was my reaction reading my own code too

modern kindle
thin anchor
modern kindle
#

so my comments are there to remind me

manic rune
#

thats why i always have comments next to the functions

thin anchor
#

now i gotta figure out how to fix this darn it

hushed field
#

setting up a small new mod and god I've just straight up forgotten the basics. Here I go reading the basic tutorials again, haha

daring fern
#

Does perkeo not work in context.before?

modern kindle
manic rune
#

me too, but i think some of my functions lack that

thin anchor
hushed field
#

I theoretically wanna go through all my code and format it as readable as possible, but also, anyone that goes through that effort is a better person tha n me because laziness hits me immediately

manic rune
#

-# i mean, if other people were to make content based on my mod FOR SOME REASON, then i already provided every function they will need :3

quartz ravine
#

A set of glass jokers, in stained glass

One tracks the idol card rank to turn cards into glass,

another retriggers glass (while also reapplying the glass break risks, so be careful!)

the final card increases or decreases its own permanent mult bonus based on glass cards breaking or not

hushed field
#

That art is gorgeous, holy hell

daring fern
thin anchor
#

it crashes for me when it has nothing to do

quartz ravine
modern kindle
#

but hopefully comments help a little

quartz ravine
#

Thank you, I did terrible paper sketches then my wife went wild on the idea and made these ❤️

manic rune
#

i genuinely feel sorry and grateful for those who are helping me with the Rarity crash

#

💔

open aspen
#

Is there any way to access the sprite of a sticker? I want to rescale my sticker to be half the size

hushed field
#

i want my code to be able to be torn apart or used by others once I lose interest in Kino. Theoretically I'd want someone to be able to think 'oh, let's maintain that abandoned movie mod' without ever having to have me involved, haha

daring fern
modern kindle
paper zealot
manic rune
quartz ravine
manic rune
#

its the specific joker with that custom rarity that crashes whenever i try to hover my mouse on it

modern kindle
manic rune
#

"you cant read my code? not my problem smh"

#

🗣️

modern kindle
#

if you cant read my code then you dont deserve to use it

#

totally a fair logic

#

lmao

quartz ravine
#

My mindset is I will enjoy writing it, but I will put it online and hope others find it and can learn from it.

Write tools to be used by you, but be worthy of thousands of users.

#

I blog about programming and managing giant environments, so I will write up a multi part series on learning lua and shaders when I am done here

long sun
#

is there a way to output to DebugPlus' console?

quartz ravine
#

sendInfoMessage(" Your message " .. someVariable, self.key)

manic rune
long sun
#

grand, thanks ^^

manic rune
#

orrrrr

#

just use print()

#

:3

modern kindle
#

im a big print enjoyer

paper zealot
manic rune
surreal mason
#

I wanna make an all-2s deck, how'd I get started?

modern kindle
#

i had a real fun bug i enconutered yesterday where i would crash with my mod but only on gold stake

#

which was an interesting discovery

surreal mason
hushed field
#

i fucking hate having to ask this, but what were to steps again to make a new mod readable by Balatro? I thought it was just a json file and the mere existence of a lua

paper zealot
quartz ravine
#

Have a json file like this

    "id": "foxsGarden",
    "name": "Pawlatro",
    "display_name": "Pawlatro",
    "author": ["FoxDeploy"],
    "description": "A collection of fun and balanced animal themed jokers and tarot cards.",
    "prefix": "Fox",
    "main_file": "config.lua",
    "priority": 1,
    "badge_colour": "0011EC",
    "badge_text_colour": "FBA105",
    "version": "0.0.2",
    "dependencies": [
        "Steamodded (>=1.0.0~ALPHA-1206c)"
    ]
}
``` @hushed field  then also a `lua` file in the same dir, named the value for what you have in  `main_file`
paper zealot
hushed field
#

That's what I have. I guess I'll have some dumb spelling error appear somewhere that's just breaking things, haha

manic rune
#

......

#

what the fuck is this fix

#

i deleted the lovely folder

#

then i run balatro again, it works now

paper zealot
manic rune
#

is that even supposed to work??

#

did i accidentally use dark magic 💔

modern kindle
#

youre a prodigy

manic rune
#

well its just the... uh, localization now

#

so in the SMODS.Joker, im supposed to use "hsr_3stars", but i guess thats not the same in localization

#

what the hell is this consistency :3

hushed field
#

it was an error in the json somewhere, but I can't see where it is. Scheduling an appointment for a severe dyslexia diagnosis now, I guess 😢

daring fern
thin anchor
#

oh

manic rune
#

-# thats dumb

thin anchor
#

ahhh

manic rune
#

its k_hsr_3stars in the localization file, but its hsr_3stars when you are setting the rarity

#

💔

opal spade
#

so just print(string)

#

you can use SMODS' logger or debugplus-specific logger too

surreal mason
#

The K is just the mod creator's shortening thingy, right?

hushed field
zealous glen
#

Minor spelling mistake: DespairDeath

thin anchor
daring fern
thin anchor
#

ahhh i see

manic rune
#

FINALLY GOT THE CUSTOM RARITIES IMPLEMENTED

#

ghhhh

thin anchor
#

goog gob

daring fern
#

Why when you have too many cards into your deck you draw a full hand of ghost cards?

open aspen
#

yes i know its a different game

zealous glen
#

You draw them because you put them into your deck

#

Which made it big

manic rune
manic rune
#

$500 for seele e1

#

crap

manic rune
daring fern
manic rune
#

you still need the .cards :3

thin anchor
#

oke

daring fern
thin anchor
#

once again... i love crashes
i have no idea how this happened

#

im going to slam my head into a brick wall

zealous glen
#

This creates a reference to a card that doesn’t exist

daring fern
thin anchor
#

oh

#

oops!

daring fern
tall apex
manic rune
#

trash :3

tall apex
#

im getting a weird crash and i cant figure out whatss causing it.,,

modern kindle
#

trash 3_

tall apex
#

anyone wanna take a quick looky?

thin anchor
#

what are you doing here

keen tiger
#

is it possible to add a new run configuration option

#

like another check box to "New Run" that allows me to enable the functionality im working on

tall apex
#

idk :3

keen tiger
#

if not ill just figure it out manually

#

man im going to have to build so much myself

#

im not making a conventional mod

daring fern
#

Also I reloaded the game and the cards came back.

thin anchor
#

how would you check all of the scoring cards youve played in a hand?

unkempt thicket
#

Deck Preview pages

daring fern
thin anchor
minor furnace
#

so you know how smods doesn't prefix consumeable types?

manic rune
#

hi tardis

minor furnace
#

hi!

minor furnace
# minor furnace

this is what happens if two mods use the same consumeable type key, apparently

manic rune
hushed field
#

why... why the hell does the spawning of vouchers in the shop work like that? I assumed they were just gonna be card objects

shell timber
minor furnace
manic rune
#

the theme fits, not the functionality :3

minor furnace
#

anyways, now I have to rekey every reference to them lol

daring fern
#

How does one copy a card from hand and play into hand without creating ghost cards?

open aspen
#

Is there any way to access the sprite of a sticker? I want to rescale my sticker to be half the size

next timber
#

if i want to make a texture animated, do i have to put the frames on a seperate atlas to the non-animated textures for the same card type?

open aspen
#

i guess this is how I would render the sticker. But I have no idea how to use the draw method.

#

I assume something like creating a sprite object

rain slate
#

is there a context that's triggered once per joker whenever a hand is discarded?

timid star
rain slate
timid star
#

wait nvm

#

nvm again it still has the same issue

dire palm
open aspen
timid star
next timber
#

why would you want that

shell timber
#

money

timid star
#

money

next timber
#

fair

timid star
#

i don't know why it isn't updating textures

#

since animated sprites should bypass events like how the boss blind sprite is still animated

open aspen
timid star
#

oh

#

i figured it out

#

i just had to move it out of the other runtime timer that i put in there sigh

#

somtimes you can forget your own code

dire palm
twilit cargo
twilit cargo
dire palm
open aspen
open aspen
#

or a way to access the stickers sprite without a draw method may work too

daring fern
#

How could I make it so when I change the edition when context.card_added it costs how much it would cost normally?

twilit cargo
#

wait no im stupid

#

ignore

#

💀

open aspen
#

anyone know

zealous glen
#

I remember having issues with shared sprites because of SMODS’ inject timing

open aspen
maiden river
#

why is your mod prefix so long 😭

open aspen
#

i can ctrl f it later

open aspen
long sun
#

hihi! is there a way to destroy all cards held in hand?

#

or, cards held in hand, in general?

maiden river
long sun
#

ya

maiden river
#

I'm pretty sure it'd just be if context.destroy_card and context.cardarea == G.hand then and you just return {remove = true}

long sun
#

ah, grand :D

#

thanks!

open aspen
# open aspen

could i potentially even use an event here? to wait until the asset_atlas entry exists?

#

idk

gentle rain
#

how does the idol decide its ranks?

maiden river
gentle rain
#

that i know

maiden river
#

in terms of actual code, I can whip something up rq

maiden river
gentle rain
open aspen
gentle rain
maiden river
gentle rain
gentle rain
open aspen
gentle rain
#

omg hi blueprint

open aspen
#

blueprint my goat

timid star
twilit cargo
open aspen
timid star
open aspen
#

what do the "attacks" do?

timid star
#

if a card has no more health then it dies

open aspen
#

OH

#

thats cool asf

timid star
#

i haven't seen other mods do this

#

(probably because i don't look up mods lol)

#

im just glad im able to get my own way of displaying custom animated sprites

timid star
hushed field
#

I can't remember which mod, but there's definitely one that does it, but not at all in the same way. I love the sound effects, btw, it really makes it all look very polished and impactful

timid star
#

i barely know what im doing but being able to add what's basically cutscene to my mod is going to bring it up a dimension

#

because i can also apply these to jokers trolling_moment

open aspen
#

ok this finally is a custom draw function for my sticker that works. now please does anyone know how to scale the damn sprite

#

i just want it to be half the size

frosty dock
open aspen
#

i will try again

#

i just set it to 0 and it shows the same as normal

#

i assume defining sprite in draw in the first place is wrong already anyways

frosty dock
#

tbh I'm not sure about creating sprites in draw functions, usually this isn't wanted

open aspen
#

yea

frosty dock
#

but you can try messing with the scale of the sprite directly i guess

open aspen
#

I tried creating it outside the function (still inside the sticker), that crashes the game tho (i assume it tries to access the atlas before it exists)

open aspen
#

unfortunate

frosty dock
#

might be that it's basing it on the other_obj (the center sprite)

timid star
open aspen
junior lily
open aspen
#

it does work

#

it also seems like a terrible idea

junior lily
daring fern
thin anchor
#

how would i check all of the scoring cards played in hand?

open aspen
#

G.TIMERS.REAL

what is the above variable?

#

can i use it to make procedural animation/movement

daring fern
thin anchor
#

also how would i copy playing cards for the blind

minor furnace
#

all right, time to lock in and figure out my blind wave issue

open aspen
onyx sonnet
#

The video is pure black on my end

open aspen
#

not on my end

#

or sky

#

i assume

minor furnace
#

yeah I can see it

modern kindle
#

fine for me too

modern kindle
#

snaz needs better interwebs

open aspen
gentle rain
open aspen
gentle rain
#

ah

open aspen
#

i recorded it that way because discord upload limit

gentle rain
#

yeaj

open aspen
#

i could use 8mb.video to compress it

#

but im lazy

forest ivy
#

i remember when discord made the limit equal to 50

#

for everybody

#

but it lasted just 1 day

#

smh

open aspen
daring fern
thin anchor
daring fern
thin anchor
#

ah

#

thanks

minor furnace
#

there's definitely either a state variable I'm missing that I need to modify, or a function that I need to prevent from being called

minor furnace
#

I'm gonna keep hunting for it myself, but in the meantime does anybody know what function removes/changes the shop/blind UI? since they're in the same spot, at least visually

daring fern
# thin anchor also how would i copy playing cards for the blind

This is how Cryptid the spectral does it ```lua
G.E_MANAGER:add_event(Event({
func = function()
local _first_dissolve = nil
local new_cards = {}
for i = 1, self.ability.extra do
G.playing_card = (G.playing_card and G.playing_card + 1) or 1
local _card = copy_card(G.hand.highlighted[1], nil, nil, G.playing_card)
_card:add_to_deck()
G.deck.config.card_limit = G.deck.config.card_limit + 1
table.insert(G.playing_cards, _card)
G.hand:emplace(_card)
_card:start_materialize(nil, _first_dissolve)
_first_dissolve = true
new_cards[#new_cards+1] = _card
end
playing_card_joker_effects(new_cards)
return true
end
}))

thin anchor
#

complicated
wow

#

wait where is the spectral card code

minor furnace
thin anchor
#

thanks

daring fern
open aspen
#

alright this code works for displaying my sticker

#

like so

#

but its really laggy

#

like 1 card is fine

#

if i use debug to dupe one of these stickered cards the lag pops off