#💻・modding-dev

1 messages · Page 211 of 1

sacred lily
#

(other than ideas, of which i have already)

clear epoch
#

this code polls together all base cards from a card area and then chooses one and applies a certain enhancement

spring lantern
sacred lily
#

ah ok

#

thanks

spring lantern
#

somebody should pin a link to the wiki

#

as in smods wiki

ivory coral
#

Is there a way to use a voucher to affect shop items? like all x type booster packs are replaced by y type booster packs?

clear epoch
clear epoch
manic rune
#

nice, thanks

clear epoch
#

then that table is safe to use

spring lantern
#

again completely untested just a theory

clear epoch
spring lantern
#

that too

clear epoch
ivory coral
manic rune
#

real quick, does ease_hands() change perm or temporary hands?

formal parrot
#

Chat i’m so fucking lost

clear epoch
formal parrot
#

Everyone has great mods and i’l struggling to make a simple joker

#

LOL

manic rune
#

no no its fine, we all start somwhere lol

forest ivy
#

gng, what was the mod that was making this look better

#

like 12 decks per page

clear epoch
manic rune
#

Malverk, i think

#

or smt like that

forest ivy
#

malverk?

faint yacht
#

Malverk is textures, Galdur is the deck menu.

clear epoch
forest ivy
#

ty fr

#

this one right ?

faint yacht
#

Yes.

forest ivy
#

peak

#

ty

ivory coral
clear epoch
manic rune
#

if you dont have any idea at all

#

go to suggestions

#

❤️

manic rune
#

fanarts can also have some pretty neat ideas too actually

clear epoch
#

ctrl + F is the way

forest ivy
#

7 pages of blinds is so peak

clear epoch
forest ivy
clear epoch
#

u got the wiki and the examples

formal parrot
maiden river
#

is there a way to tell if a run has been resumed
kinda like how the throwback unlock works

fresh swallow
#

Chat any suggestions to make my ui look better?

maiden river
#

balatro everywhere huh 😭

forest ivy
manic rune
fresh swallow
#

Balatro running in a 2$ micro controller and 6 AA batteries is the goal

forest ivy
#

and im getting another mfing error

lyric wadi
#

everyone is talking code i havent even start coding

#

im still at the idea phase

#

anyway speaking of idea here's another one

#

e.g. if you're at +36 Mult, there's a 36 in 100 chance it resets to +1 Mult

#

so on average you're gonna be mostly about at 10 to 30 mult

#

maybe touching 45 if you're quite lucky

#

but also very easy to be hardstuck at below 10 mult for a couple ante

earnest oracle
maiden river
#

would oops all 6s affect it?

spring lantern
#

would probably pick it up any day over something like misprint

lyric wadi
#

depends on how oops is coded

#

is oops +1 to the 1 in chance or is it always double

spring lantern
#

it always doubles the odds

lyric wadi
#

okay

lyric wadi
#

so i think the funnier answer is yes oops affects it

spring lantern
#

if not it does nothing

#

:L

lyric wadi
#

damn

fresh swallow
spring lantern
#

basically there's this value inthe game, G.GAME.probabilities.normal, oops doubles that and then all odds based stuff uses it as a baseline

lyric wadi
#

reminds me of like the couple of people doing physical ktane builds

lyric skiff
#

hi, im early in the process of learning to mod the game. im trying to make a simple deck that starts you with three vouchers to familiarize myself with making decks but i'm having some trouble getting it to work. if anyone could review my code id appreciate it a lot!

i also attached the crash error im getting at the moment. not really sure where im expected to close that bracket? (also i put the code in the mod's main file temporarily just so i can see what line is causing the crash so dont mind that)

lyric wadi
#

with modules that can be switched out of the casing

lyric wadi
#

one of them has a socket for a small co2 cartridge

#

so if you fail it bust the cartridge to make an explosion sound

lyric skiff
tall wharf
#

how does this look lol

lyric wadi
#

aapl

#

how do you make jonkler spirte

#

cuz i have the template i used to make joker-styled cards for tts

#

but like it's probably not the right size

floral vortex
#

hello everyone. i believe i know how to code. but one thing i have trouble getting right are the variable an function names. for example how was i supposed to know what G.GAME.probabilities does and what G.E_MANAGER does? is there some documentation explaining local thunk's commands or something?

thank you 😁

tall wharf
lyric wadi
#

in general i guess

#

whoever has recommendations

minor furnace
#

why does hooking functions feel illegal

tall wharf
#

i just do it at 71x95 with 1 pixel border

lyric wadi
#

mr sandman

#

man door hook hand

spring lantern
#

sand me a man

maiden river
floral vortex
minor furnace
#

the other thing that felt illegal was writing a patch to destroy a card in a played hand before it scores

tall wharf
#

take me by the hand lead me to the land that you understand

maiden river
spring lantern
#

oshanman

tall wharf
#

what if i draw catgirls for C

#

it would be so funny

lyric skiff
#

getting a crash with that says unexpected symbol near 'end' now

minor furnace
#

what is B a picture of?

ivory coral
#

how do i combine two strings into one? im trying to use poll_edition() to get a random edition but to actually use it later on i need to add 'e_' to the beginning of it, which is a separate string

dim lynx
#

i see the unexpected symbol

minor furnace
#

I think you have to do Loss for L

tall wharf
maiden river
#

you know what you have to do for e tho right

minor furnace
spring lantern
#

epicsauce

ivory coral
lyric skiff
spring lantern
earnest oracle
maiden river
grim remnant
#

hey, it's us again, yes it's that goshdarned blueprint-like joker again. it isn't copying DNA correctly. like, specifically DNA. we'd like it so it copies the card 3 additional times to what DNA does, but it just does it one extra time a-la normal blueprint. how could we add DNA compatibility for this thing?

spring lantern
maiden river
#

or estrogen, both are viable options

tall wharf
spring lantern
#

kimty

tall wharf
#

very abstract

#

i mean i am very capable of drawing anime girls

spring lantern
#

blueprint-like jokers are hell to make (source: i tried making one and right now it's a broken mess that does nothing right

lyric skiff
tall tangle
spring lantern
distant tendon
#

hey, sorry, can i ask about crashes here?

tall tangle
#

It's okay, you can only get three negative Blueprints from him before he FUCKING DIES

distant tendon
tall tangle
#

No need to apologize if you're not being a dick

distant tendon
#

on startup :d

spring lantern
#

this crash says the script InkColor.lua from InkAndColor has a bad instruction in line 184

#

now to know why it's a bad instruction you're gonna have to look in there

tall tangle
#

It's trying to grab a field
The "field" it's going for isn't a field at all. It's a table.

distant tendon
#

i have never touched lua

tall wharf
lyric skiff
distant tendon
#

what could this mean ?

spring lantern
tall tangle
#

I have no idea how to do anything that has to do with programming so the best I can do is look at some words that kinda make sense in the context they're in and hope for the best.

spring lantern
distant tendon
#

isn't that steammodded

#

cause i do have that

lyric wadi
#

im gonna try coding one of the joker idea i think

spring lantern
#

wait let me double check the mod list from the crash log

tall tangle
#

@spring lantern they have the latest smods version

dim lynx
sturdy compass
#

yeah it looks like they have 0301 BETA which is quite recent

tall tangle
#

wait no that's 0301a

distant tendon
spring lantern
#

ah okay i missed that

tall tangle
#

Latest is 0301b

#

right?

#

I think?

sturdy compass
tall tangle
#

I could be ENTIRELY wrong.

distant tendon
sturdy compass
#

yeah yours should be latest

clear epoch
dim lynx
#

atlas = 'Blind'

spring lantern
#

okay so why does the game not recognize SMODS.Blind

tall tangle
# dim lynx show me your atlas

line 184 is the opening of the command to grab the Blind for The Bleach, but smods is saying that's a table value, not a field

spring lantern
tall tangle
#

AH

#

Okay

#

so

#

lemme

#

hold on lemme think here

#

neanderthal discovering how fire works, gimme a sec

sturdy compass
dim lynx
#

youre all right i read too quickly sorry

tall wharf
tall tangle
#

Also yeah atlas = 'Blind' is line 189, not 184

spring lantern
distant tendon
tall tangle
#

Yeah no I got nothin, I just kinda understand vaguely how that SHOULD work and slightly less vaguely how it's NOT working.

distant grove
#

Quick question for blinds do we need a new SMODS.Atlas?

distant tendon
tall wharf
#

holy shit

distant grove
spring lantern
#

you can try disabling mods manually by adding a file like this inside the folder of the mod

#

.lovelyignore tells the injector to not inject the mods code into the game

clear epoch
sturdy compass
#

Another thing you can do is a clean wipe of your mods folder (not counting smods) and go from there

spring lantern
#

yeah

tall tangle
#

You could also ask in there.

distant tendon
sturdy compass
#

incrementally add mods til it starts fighting back

tall tangle
#

Toss down the crash log and see if you get an answer.

distant grove
#

So I get a different atlas for both jokers and blinds?

distant tendon
tall tangle
#

Oh so you just have a whole BUNCH of different suits mods don't you.

tall tangle
distant grove
#

That seems easy enough hopefully

ivory coral
#

This consumable im trying to make is giving me a lot of trouble, right now im getting the crash "attempt to index local 'p_edition' (a nil value), anybody can help? will send code in a sec

distant tendon
#

hold on i'll try disabling this one

#

might as well

ivory coral
# ivory coral This consumable im trying to make is giving me a lot of trouble, right now im ge...
    local randomenhance = SMODS.poll_enhancement('erudition', nil, true, true)
    local randomseal = SMODS.poll_seal('erudition', nil, true, true)
    local randomedition = 'e_' .. poll_edition('erudition', nil, false, true)

    G.E_MANAGER:add_event(Event({
        trigger = 'after', delay = 0.4, func = function()
        play_sound('tarot1')
        card:juice_up(0.3,0.5)
        return true end}))

    for i=1, #G.hand.highlighted do
        local percent = 1.15 - (i-0.999)/(#G.hand.highlighted-0.998)*0.3
        G.E_MANAGER:add_event(Event({trigger = 'after',delay = 0.15,func = function() G.hand.highlighted[i]:flip();play_sound('card1', percent);G.hand.highlighted[i]:juice_up(0.3, 0.3);return true end }))
    end
    delay(0.2)

    for i=1, #G.hand.highlighted do
        G.E_MANAGER:add_event(Event({trigger = 'after',delay = 0.1,func = function()
            G.hand.highlighted[i]:set_ability(G.P_CENTERS[randomenhance])
            return true end }))
    end
    for i=1, #G.hand.highlighted do
        G.E_MANAGER:add_event(Event({trigger = 'after',delay = 0.1,func = function()
            G.hand.highlighted[i]:set_seal(randomseal)
            return true end }))
    end
    for i=1, #G.hand.highlighted do
        G.E_MANAGER:add_event(Event({trigger = 'after',delay = 0.1,func = function()
            G.hand.highlighted[i]:set_edition(randomedition, true)
            return true end }))
    end

    for i=1, #G.hand.highlighted do
        local percent = 0.85 + (i-0.999)/(#G.hand.highlighted-0.998)*0.3
        G.E_MANAGER:add_event(Event({trigger = 'after',delay = 0.15,func = function() G.hand.highlighted[i]:flip();play_sound('tarot2', percent, 0.6);G.hand.highlighted[i]:juice_up(0.3, 0.3);return true end }))
    end
    G.E_MANAGER:add_event(Event({trigger = 'after', delay = 0.2,func = function() G.hand:unhighlight_all(); return true end }))
    delay(0.5)
end```
its supposed to add a random enhancement, seal, and edition
tall tangle
#

Has Bunco been fixed yet?

#

Because I see Bunco and that will likely lead to ✨problems™️✨ in the future.

spring lantern
lyric skiff
# lyric skiff yup we're in business

this does cause the game to crash upon starting a run though. did i code the logic for the vouchers wrong? is there something more i have to do than the config line?

spring lantern
#

show card.lua:260 rq

clear epoch
# distant tendon yay another error

you are using a LOT of mods after all, there's a big chance some aren't updated for recent steamodded/lovely versions
wait that mod is that 25th one?

spring lantern
#

yeah using too many mods can lead to many issues

distant tendon
spring lantern
#

unless you know what you're doing

spring lantern
#

i mean what line of code is it

ivory coral
#

i dont know i never wrote p_edition anywhere

spring lantern
#

oh it's an smods thing

clear epoch
spring lantern
#

what the

wintry solar
#

that also not how you use SMODS.poll_seal or SMODS.poll_enhancement

#

I'm surprised that isn't where you crash

ivory coral
#

oh is it not

lyric skiff
#

this is part of the base game's code though im pretty sure

spring lantern
#

is center a variable

ivory coral
spring lantern
#

did you make sure it's declared

wintry solar
#

no you didnt

forest ivy
ivory coral
lyric skiff
wintry solar
#

they take a table

tall tangle
forest ivy
#

what

ivory coral
wintry solar
#

no

distant tendon
wintry solar
#

the smods functions aren't like poll_edition

distant tendon
#

does anyone know what i can do :(

tall tangle
# forest ivy what

Concise answer, when in doubt... Bunco.
From there...
Good luck. You're gonna have to start kneecapping mods until it works.

spring lantern
forest ivy
#

and kneecapping wont work as

#

it happens in game

#

not when i just launch the game

ivory coral
forest ivy
#

but in round

tall tangle
#

I meant deleting mods until it works.

wintry solar
tall tangle
#

Or just moving them out of the mods folder.

forest ivy
#

im saying itll be impossible to do because it crashes in round

clear epoch
forest ivy
#

not in menu or when i just launch the game

#

and with a modded deck

clear epoch
forest ivy
#

so if ill delete the modded deck or something that i had in the run

#

it might get even worse

ivory coral
forest ivy
minor furnace
#

Is there a way to return another blind's description as one of the vars in loc_vars()?

        name = "The Beast",
        text = {
            "Face the gauntlet...",
            "#1#",
            "#2#"
        }
    },
    dollars = 5,
    mult = 2,
    discovered = false,
    boss = {showdown = true, min = 10, max = 10},
    boss_colour = HEX('C72A00'),
    loc_vars = function(self, info_queue, center)
        return {vars = {G.localization.descriptions.Blind[G.GAME.beast_wave].name, G.localization.descriptions.Blind[G.GAME.beast_wave].text}}
    end```
distant tendon
clear epoch
sturdy compass
forest ivy
#

:bro

#

💔

distant tendon
clear epoch
sturdy compass
#

lmao

forest ivy
#

man i should learn how to make balatro modsb

#

because i got no idea how

#

💔

ivory coral
clear epoch
lyric skiff
#

i dont think that part of the code is wrong tho its probably something with my deck's code since it only crashes when i start a run with it but i dont know where to start with fixing that

wintry solar
#

poll_edition returns a key, you don't need to prefix e_ to it

minor furnace
distant tendon
#

also hey turns out ink and color wasn't the issue

minor furnace
#

my motto in modding has been "it may not be elegant, but it gets the job done"

distant tendon
#

something else must've messed up Something and that messed up ink and color

sturdy compass
#

very likely

ivory coral
clear epoch
minor furnace
#

is the info queue something I can use for this?

clear epoch
#

info_queue is like when you hover over the empress and the mult card description appears as well

minor furnace
minor furnace
distant tendon
minor furnace
#

there is no info queue for blinds though

broken cliff
clear epoch
broken cliff
#

then append it to the table

#

then return it

sturdy compass
forest ivy
#

anything but just make smth that will check if ur mod can work with all version's of steammodded and lovely

minor furnace
spring lantern
#

i present my 100% original and legally distinct character: pokemon wearing hat

forest ivy
#

and return error's with version's if they appear

#

💔

broken cliff
#

so like this
for i,v in pairs(G.localization.descriptions.Blind[G.GAME.beast_wave].text do
-- code to add to ur table
end

broken cliff
distant tendon
broken cliff
#

wait

sturdy compass
#

cool

broken cliff
#

there also might be another problem

#

idk if the method WILL work since #2# will probably only end up displaying 1 text

#

so u can try concatonating the string to be one instead of putting them all in a table
or u can try to add like more #x# things idk.

#

or update the loc_txt itself...? idk how the game would react to that

minor furnace
# broken cliff so u can try concatonating the string to be one instead of putting them all in a...

yeah I just went with this

        name = "The Beast",
        text = {
            "Face the gauntlet...",
            "#1#",
            "#2#",
            "#3#"
        }
    },
    dollars = 5,
    mult = 2,
    discovered = false,
    boss = {showdown = true, min = 10, max = 10},
    boss_colour = HEX('C72A00'),
    loc_vars = function(self, info_queue, center)
        if #G.localization.descriptions.Blind[G.GAME.beast_wave].text == 1 then
            return {vars = {G.localization.descriptions.Blind[G.GAME.beast_wave].name, G.localization.descriptions.Blind[G.GAME.beast_wave].text[1], ""}}
        else
            return {vars = {G.localization.descriptions.Blind[G.GAME.beast_wave].name, G.localization.descriptions.Blind[G.GAME.beast_wave].text[1], G.localization.descriptions.Blind[G.GAME.beast_wave].text[2]}}
        end
    end,```
#

since my descriptions are at most two lines for this specific effect

broken cliff
#

aight

minor furnace
#

actually, I could probably reduce it to one return

#

do something like
"" or G.localization.descriptions.Blind[G.GAME.beast_wave].text[2]

broken cliff
#

this writing is Fire

clear epoch
tall wharf
#

wtf do i do for q

clear epoch
#

you should find it under the lovely directory

clear epoch
minor furnace
broken cliff
#

question

#

qrcode

#

quirk

tall wharf
#

i went with this

broken cliff
#

quip

sturdy compass
#

quill!

tall wharf
lyric skiff
broken cliff
#

for Ъ you should do Ъорошо

minor furnace
#

blue vowels

lyric skiff
#

had the keys for the vouchers wrong, i could not find documentation for what the keys actually are though so ill do some guesswork (found the keys in the game's source code we GOOD)

broken cliff
#

and for ш you should do Шорох

#

dont forget the д tho

spring lantern
#

this mod is one of the most autism coded things ive made in my life

broken cliff
#

bro does NOT know about 300+ if statements for all the vanilla joker abilities 🙏🏿 😭

spring lantern
#

oh no i've seen them with my own eyes

clear epoch
broken cliff
#

hey listen if u do not have a stockpile of if conditions in your indie game

tall wharf
broken cliff
#

are you really an indie dev?

spring lantern
#

yall talk about if else chains, i present to you, the vvvvvv giga switch statement

clear epoch
broken cliff
#

you go insane from the following

  1. you realize your code is inferior
    OR
  2. you get a sudden rush of anger from having someone do the worst possible code on the planet(it barely affects anything)
distant tendon
clear epoch
scarlet spire
#

how can I make the description text of an enhancement/joker change color based on a bool?

#

I know of the example case for changing text colors in the vanilla jokers example mod, but I don't quite understand it enough to know how to convert it to work with a boolean

turbid maple
#

your loc_var is just a function

#

have it return a dif color based on said boolean

clear epoch
#

the {V:} format changes the color for the one specified in the colour variable passed in loc_vars

#

use a "ternary" for the value you assign it

scarlet spire
#

okay wait yeah this was sort of what I was already doing

#

but, hmm
it only ever returns green, never red

#

the text itself returns correctly, but the color doesn't

red flower
#

then thats never true

strong jacinth
#

How would I draw a random card from deck, rotate 90 degrees, then after that renderthe deck on top. Like change the position of the deck

scarlet spire
#

why would the bit above ever return "will destroy" then? because that works fully as intended

red flower
#

that's weird then

#

how is the description written

scarlet spire
#

here's the full block

#

also, is it possible to use variable colors as the block behind the text (i.e. how Xmult is displayed), instead of for the text itself?

tall wharf
#

there we go

dim lynx
#

What’s hash for

tall wharf
#

wild card

red flower
dim lynx
#

So what if I play 5 wild cards

#

What would it spell

scarlet spire
turbid maple
dim lynx
#

Also why is Z a magnifying glass

#

Is there another name for them which is z

clear epoch
#

this is all there is on the wiki, so unless it's undocumented, small chance

clear epoch
dim lynx
#

Holy you’re so smart

scarlet spire
#

great, is there really not a variable color option for the X: text block

dim lynx
#

Sorry. I just tuned in

tall wharf
#

:3

dim lynx
#

Aiko what will it spell if I play just wilds

clear epoch
tall wharf
zealous glen
tall wharf
clear epoch
zealous glen
#

@tall wharf what do you think of this artwork (blood, or blood imagery)

tall wharf
#

omg

#

that one synthv i forgor

light gazelle
#

do you guys have any tips for making your pixel art look less fuzzy?

zealous glen
#

I think it's the Miku equivalent of the voice program they use

zealous glen
light gazelle
#

like the joker I made looks a little fuzzier than other similar jokers

#

yeah

#

maybe i saved the image incorrectly?

zealous glen
#

I think it's a filter the game applies

#

There's also some love stuff going on

#

Usually on the edges

#

Firch knows better

spring lantern
#

i will say some of the curves look a bit inconsistent in their shape

errant fulcrum
#

God bless those who have had bugs before me, I've been able to search this channel for every issue giving me a headache

spring lantern
#

especially the mag

light gazelle
zealous glen
#

No idea why it looks like that

light gazelle
spring lantern
zealous glen
graceful magnet
#

does SMODS or base game have something for checking when a card changes suits or enhancements?

light gazelle
#

how should I be? (I used paint.net and saved ti at double canvas size lol

errant fulcrum
zealous glen
zealous glen
#

Not interpolation

light gazelle
#

oh ok

light gazelle
#

I presume that's a setting when I save it at a larger canvas size

#

thanks

#

without pixel art smoothing on it looks like every other joker

zealous glen
spring lantern
light gazelle
zealous glen
spring lantern
#

as for enhancements im not sure maybe set_ability

light gazelle
zealous glen
graceful magnet
#

welp guess I'm gonna go do things in an incredibly stupid way

clear epoch
zealous glen
light gazelle
zealous glen
spring lantern
#

export for twitter 😭

#

never used aseprite is it worth it if im already doing fine with photoshop

light gazelle
zealous glen
#

I think the annoying part is not having automatic rotational symmetry

spring lantern
#

probably a good idea for when my student license runs out 🫠

zealous glen
spring lantern
#

right i forgot clones exist

clear epoch
#

literally my biggest gripe

zealous glen
#

I think it might be coming in an update

#

I couldn't find an extension that does it 😭

clear epoch
#

other than that, amazing software, worth my money

clear epoch
zealous glen
#

I compiled it for free but I should buy it sometime

light gazelle
#

oh yeah this looks so much better

#

thanks guys

#

now to try to code a joker that isn't just a walkie talkie reskin

zealous glen
#

interpolation gold_seal golden_joker balatrojoker

light gazelle
#

on god

#

<---- baby's first pixel art experience

zealous glen
#

if your profile picture was a gif of a cat looking at the screen it would be funnier

light gazelle
#

thanks pal, i've had it that way for like 5-6 years

zealous glen
#

I had an avatar and bio combo I kept for years

#

but not for positive reasons at first v_v

light gazelle
#

the beautiful gray

zealous glen
#

speaking of which

#

I need to put another Joker that's darker than Balatro grey into the game

graceful magnet
strong jacinth
#

How do you use a sprite sheet.

#

Like with smods.

scarlet spire
tall wharf
distant grove
#

whats the code that is needed to make the joker already discovered?

#

cause i forgot

stiff locust
#

is there an example mod for enhancements

#

cant find one on the smods example mods page

#

anyone got a reference

spring lantern
#

i know there's one for editions and seals but not enhancements afaik

stiff locust
#

yeah

spring lantern
#

unforchuinte

stiff locust
#

any small clean mods i can look at to get an idea

distant grove
zealous glen
zealous glen
#

Oh it just adds letters to the cards

#

Yeah I saw the video right after

sullen fern
runic pecan
#

Is it card.config.center.member or just card.member?

sullen fern
# sullen fern

guess what happened.
vscode spat out the alabell lua into the jokers folder.

#

but! now alabell is real

lyric wadi
#

hello code hepl pls

Intended Behaviour : After hand is scored, roll some RNG check.

  • If pass, Joker should say "Safe!"
  • If fail, Joker should say "Reset!", do the animation, and reset some variables

What's happening :
Sometimes the animation play, but no text is shown and the variable doesn't reset
The safe text also doesn't show up

distant grove
#

qucik question

lyric wadi
#

am i using the wrong trigger/context or

distant grove
#

hwo to make it actiavet

lyric wadi
#

oh oop

distant grove
#

when a high card happens?

lyric wadi
#

the docs has it i think

distant grove
#

oh yea

#

thanks

lyric wadi
#

the example mod has Runner

#

which checks for Straight

distant grove
#

k

lyric wadi
#

you can yoink that

distant grove
#

i just yoink the context.joker main and the context.before yea?

#

nvm

runic pecan
spring lantern
#

this aint even an oc mod anymore im jus adding random youtubers and shit

graceful magnet
#

so I'm saving cards to an extra table, but it's erroring out when it tries to compare to what's saved in the table

#

the saving to table code

spring lantern
#

whats the error?

sullen fern
graceful magnet
spring lantern
#

i think to access base you need to go into config.center

sullen fern
#

okay, now to code alabell

#

which is as follows.
add a self destruct seal to two selected cards

spring lantern
#

so like card.ability.extra.refHand[i].config.center.base

#

although you can also do is_suit() and get_id() directly from the card object

mellow marsh
#

how should i interpret errors like this? ive got a lot of mods installed so i'm not sure really where to narrow this down to

spring lantern
#

what the hell is a 7869

graceful magnet
spring lantern
#

huh

earnest oracle
#

anybody's ever changed the in-game music with create_option_cycle?

clear epoch
spring lantern
# graceful magnet

okay so whatever you're saving into the table has no config table, that's weird

runic pecan
graceful magnet
#

in a moment, trying something

mellow marsh
graceful magnet
mellow marsh
#

(granted the error is more likely pointing at a modded version of the file rather than the original one, but some mod i have installed makes --dump-all crash on startup so i dont have access to that either :( )

#

i guess before i put any energy into debugging further im just gonna go up-to-date on all of my mods

runic pecan
graceful magnet
sullen fern
#

i'm looking at the code for "obituary" from the pokermon mod to see if i can learn anything about adding seals to cards from it

runic pecan
graceful magnet
#

yeah might be best to store the suit

runic pecan
spring lantern
#

only a couple left

#

man im tired

zealous glen
spring lantern
#

not really thats jus meant to be L-6

zealous glen
spring lantern
#

L6*

zealous glen
#

6?

distant grove
#

am i doing this right?

#

for multiplying

spring lantern
zealous glen
spring lantern
#

culate

distant grove
#

Oh

spring lantern
#

t = 1,
ity = 1

zealous glen
distant grove
#

couldnt get the whole code

#

in img

zealous glen
#

I didn't know

distant grove
#

just asking if thats how your supposed to do multiplication or nah

spring lantern
#

i think it's type = 'var'

#

let me double check

distant grove
#

k

spring lantern
distant grove
#

k

runic pecan
# graceful magnet yeah might be best to store the suit

So what if, instead of store the suit, you store a truth table of each suit?
Like { Hearts = _card:is_suit("Hearts"), ...}
And then you compare with each element of the truth tables.
This way you don't need to worry about Wild cards.

spring lantern
#

also Xmult_mod rather than mult_mod

distant grove
#

where do you see the mult mod

spring lantern
#

i meant to send this one

distant grove
#

nvm

#

okay

#

and i think

#

the first joker in this dumb mod is done

#

hopefully

#

now to find it in my shop

frosty dock
spring lantern
#

man i forgot things are easier now

distant grove
spring lantern
#

i still do it the mod+msg way

distant grove
#

anymore??

frosty dock
#

yeah don't do that

distant grove
#

uh

frosty dock
#

you just do xmult=card.ability.extra.xmult or whatever

distant grove
#

ah

#

i think imma keep it for now

frosty dock
distant grove
#

and if any issues pop upo

#

i'll just change it

sullen fern
spring lantern
frosty dock
#

rip

edgy reef
#

former

frosty dock
#

card.config.center.member with what you did there

spring lantern
zealous glen
distant grove
#

how do i make it so that I start with the joker at the start of a run?

distant grove
graceful magnet
sullen fern
#

so, it begins

#

now, adding the code that creates the seal

runic pecan
# graceful magnet where should I put this and how do I use this
if context.before then
    cae.refHand = {}
    for i,v in ipairs(context.full_hand) do
        local _table = {}
        for _,_suit in ipairs([the pool for all suits in game]) do
            _table[_suit] = v:is_suit(_suit)
        end
        cae.refHand[i] = _table
    end
elseif context.after then
    for i,v in ipairs(context.full_hand) do
        local _tick = false
        for _,_suit in ipairs([the pool for all suits in game]) do
            if cae.refHand[i][_suit] ~= v:is_suit(_suit) then
                _tick = true
                break
            end
        end
        if _tick then
            [Gain +5 chips]
            [use SMODS.calculate_effect instead of return]
        end
    end
end```
#

I forgot the variable name of the pool for all suits in game.

solid surge
#

got two questions:

  1. how would i make a joker whose ability works when a players income is negative
  2. in the photo provided, if i switched out edition for enhancement, would it still work or is that a whole other story
mellow marsh
runic pecan
graceful magnet
runic pecan
graceful magnet
#

okay that's

a result (I played a 5 card hand)

graceful magnet
runic pecan
wintry solar
#

its not really for multiple messages

runic pecan
#

I know it's not its main purpose, but that part of functionality is currently what matters to me the most.

graceful magnet
runic pecan
wintry solar
#

in what situation are you using it for multiple messages?

maiden phoenix
runic pecan
wintry solar
wintry solar
maiden phoenix
wintry solar
#

yeah it should be

maiden phoenix
indigo mesa
#

how do i make a custom poker hand in smods? i have basically no programming knowledge and tried to make one with the RoyalFlush example mod and it appears in the poker hands tab but it isnt playable

maiden phoenix
indigo mesa
# maiden phoenix This might help: https://github.com/Steamodded/smods/wiki/SMODS.PokerHand

is this good?

    key = 'ManoAz',
    visible = false,
    chips = 903,
    mult = 93,
    l_chips = 90,
    l_mult = 3,
    example = {
        { 'S_4',    true },
        { 'H_K',    true },
        { 'D_7',    true },
        { 'D_3',    true },
        { 'C_Q',    true },
    },
    loc_txt = {
        ['en-us'] = {
            name = 'Mano de Az promedio',
            description = {
                'la mano maineada mas promedio del blud'
            }
        }
    },
    evaluate = function(parts, hand)
            return hand.ManoAz
    end
}```
maiden phoenix
#

Never made a poker hand, but I don't think that's how evaluate work

#

Check other mods that add poker hands like AutumnCircus

indigo mesa
#

bet, thank you :)

distant grove
#

anybody know how to make it so that you get a joker at the start of a run?

placid frigate
#

Is there a guide/selection code for making challenges have specific cards in a deck (deck if all kings or deck of all hearts cards)?

red flower
formal parrot
#

I just made my first modded joker 😭don’t mind the art i have no background in pixel art

distant grove
#

very nice

formal parrot
#

Thanks :3

distant grove
#

im still trying to get mine in a run bruh

#

😭 '

formal parrot
formal parrot
distant grove
#

its already at common

distant grove
#

👍

#

trying to mod lor

#

into balatro

#

its going

#

eh

formal parrot
distant grove
#

k

formal parrot
#

Good luck 💗

distant grove
#

you too

faint yacht
#

Remind me how to access the "center" of an existing card?

runic pecan
distant grove
#

how to give yoursel 700 dollars with debug plus?

#

actuallyy

#

yea idk how

runic pecan
distant grove
#

thx

#

uh holding tab

#

and dont see it?

runic pecan
distant grove
#

nvm

#

i see it now

#

I see it now

#

My lag😭

graceful magnet
fresh swallow
#

Hay, I have a message in my modding thread that I want to get pinned. Is there anyone here that can do that for me?

#

Just the one with the image

runic pecan
sonic cedar
runic pecan
distant grove
#

um

graceful magnet
distant grove
#

i cant see the jokers name

#

and what they do.

#

uhh

indigo mesa
#

i got my poker hand to work but now it detects anything as it

    key = 'ManoAz',
    chips = 903,
    mult = 93,
    l_chips = 90,
    l_mult = 3,
    example = {
        { 'S_4',    true },
        { 'H_K',    true },
        { 'D_7',    true },
        { 'D_3',    true },
        { 'C_Q',    true },
    },
    loc_txt = {
        ['en-us'] = {
            name = 'Mano de Az promedio',
            description = {
                'la mano main del blud'
            }
        }
    },
    evaluate = function(parts, hand)
            return { hand }
    end
}```
distant grove
#

weird

#

when debug isnt on i can see them

#

but when it is i cant

spring lantern
distant grove
#

k

#

but like i cant see the names of the jokers or their ability

runic pecan
distant grove
#

nvm

#

i can see them now

#

mb fellas

#

and ze crash

runic pecan
indigo mesa
#

and wym its condition?

runic pecan
indigo mesa
# indigo mesa lmaoo

its not a average ace hand, its Az's Average Hand cause he always be overcomplicating builds, if u cant tell, its a joke mod lmao

indigo mesa
runic pecan
indigo mesa
indigo mesa
#

i want to make it as odd as possible

runic pecan
graceful magnet
indigo mesa
distant grove
#

why did my crash happen?

#

trying to figue it out rn

scarlet spire
#

ignore the description, right now this enhancement is supposed to be playable once, and then the second time you play the card, it destroys itself.
for some reason, it's global between all cards, and playing one of them and then a second one destroys the second one, AND it saves between instances of the game and only resets on reload ???

#

I take a two day break from programming and I forget literally everything, the issue is probably obvious I don't know at this point

runic pecan
runic pecan
runic pecan
runic pecan
# graceful magnet

Sorry, my bad.
local suitChanger = Card.change_suit
Dot instead of colon.

indigo mesa
#

sorry i have 0 programming knowledge, ty for ur patience...

runic pecan
# indigo mesa ur right. so i gotta put the return {hand} inside an if, but how would it detect...
    local _tick = 0
    if hand[1]:is_suit("Spades") and hand[1]:get_id()==4 then
        _tick = _tick + 1
    end
    if hand[2]:is_suit("Hearts") and hand[2]:get_id()==13 then
        _tick = _tick + 1
    end
    if hand[3]:is_suit("Diamonds") and hand[3]:get_id()==7 then
        _tick = _tick + 1
    end
    if hand[4]:is_suit("Diamonds") and hand[4]:get_id()==3 then
        _tick = _tick + 1
    end
    if hand[5]:is_suit("Clubs") and hand[5]:get_id()==12 then
        _tick = _tick + 1
    end
    if _tick == 5 then
        return {hand}
    end
end```
indigo mesa
mystic river
runic pecan
indigo mesa
#

bet

scarlet spire
old bane
#

i wonder if it would be possible to add stickers to consumables. If not, I can most likely replicate the behavior of a specific sticker using the card's calculate function 🤔

runic pecan
indigo mesa
scarlet spire
#

oh god, right, it's card.ability instead of self.config

#

I forgot about that whole thing

#

I'd want it to be card.ability in the loc_vars too, right?

runic pecan
indigo mesa
#

tf

#

it still crashes, it crashes when i start up balatro

runic pecan
#

huh

indigo mesa
#

yea

scarlet spire
#

okay hmm, it now seems my new issue is how to get a card enhancement to do something at the end of every ante, regardless of position

#

if the card is in the deck, it seems it doesn't do anything during end of round context, which I guess makes sense

#

might just have to patch that behavior in? maybe that's overkill, not sure what other potential implementations of this could be

graceful magnet
#

where is the code for the functionality of the Enhancement Tarot cards stored? Trying to locate Lovers comes up with nothing in basically anywhere

runic pecan
indigo mesa
#

attempted to index a nil value

#

and the "if hand == nil then return {} end" matches the indent and is before local _tick = 0

runic pecan
#

wait, nvm

indigo mesa
distant grove
#

why doesnt my joker have a animation and the red and blue box for chips and mukt?

runic pecan
royal carbon
#

Is there something special I have to do to get SMODS.Ranks to not be nil?? I'm so confused, I can't seem to get anything out of it no matter what I do
At least I'm assuming it's nil cause I'm getting empty lines when I try to print anything, even a key which should by all rights just be a string

runic pecan
royal carbon
#

This is currently what I'm trying to do, I tried SMODS.Ranks[1] on its own and it also gave me nothing

runic pecan
royal carbon
#

I'm trying to upgrade scored cards (in a way that supports modded ranks) but I was kinda getting desperate

runic pecan
royal carbon
#

It would help, and I thought SMODS.Ranks was that

runic pecan
#

@frosty dock Which variable is the pool for all in-game suit/rank?

tepid crow
#

is it not SMODS.Ranks?

tepid crow
#

SMODS.Rank is the base class

runic pecan
#

Well I'll be damned.

tepid crow
#

yeah it's just a map indexed by card value instead of a lua """list"""

runic pecan
royal carbon
#

So how do I reference a specific rank then thinkvi would I have to use its key to get its key??

runic pecan
tepid crow
#

next time just try tprinting the entire table btw

royal carbon
#

I want to increase the rank of each scored card by 1

tepid crow
#

oh do NOT change SMODS.Ranks for that haha

runic pecan
royal carbon
#

Yes, pretty much

tepid crow
#

anyway take a look at SMODS implementation of Strength

royal carbon
#

Something I forgot to mention is I don't want the last rank to loop around to the lowest (like how aces become 2s with vanilla Strength), how would I go about doing that thinkvi

runic pecan
runic pecan
tepid crow
#

the hotel room paradox? 🤔

royal carbon
#

son of a bitch

tepid crow
#

the "fully occupied hotel with infinitely many rooms may still accommodate additional guests, even infinitely many of them" paradox?

runic pecan
# tepid crow the hotel room paradox? 🤔

A new customer walked in to the infinite hotel, but the infinite hotel is full.
So the new customer was arranged to Room 1, and the resident of Room 1 is rearranged to Room 2, and so on.

tepid crow
#

I mean, there's no internal definition (in vanilla or smods) that a rank is the "highest" as far as I can tell

#

unless...

#

sorting? 🤔

runic pecan
tepid crow
runic pecan
#

Unless you really want to register for Every Single Goddamned Positive Integers.

tepid crow
#

hmm, basegame uses Card:get_nominal to sort cards

#

you might be able to use that

#

(which in 99% of cases boils down to Card.base.nominal)

solid surge
#

how exactly is a modded enhancement formatted? cuz im tryna make one and i feel as if somethings in the wrong place

#

there we go

frigid elm
#

Ight, I've been flipping through the code for a while and while I'm finding some stuff detecting which hand is being played, but I don't see anything I could use to set the hand.

buoyant shard
#

context.remove_playing_cards and context.playing_card_added only triggers once when multiple cards are removed/added and I don't know why it's not triggering for each card

errant fulcrum
#

Is there a trigger for buying a voucher? I can't find anything about it

rough furnace
#

Card:redeem

#

unless you mean a context

#

if so unsure

errant fulcrum
#

Oh sorry I meant context

rough furnace
#

buying_card mqaybe works

errant fulcrum
#

won't that trigger for all purchases?

rough furnace
#

yes

red flower
#

you need to check that context.card is a voucher

errant fulcrum
#

ohhhhh

scarlet spire
#

really odd issue, Card:get_chip_x_mult returns X3 when used on a glass card? is it accidentally adding the X2 to what is presumably a card base value of X1 instead of multiplying it properly?

#

wait no, I see what's going on, nevermind, it was on my side

#

or.. is it? this might be an issue with the new(ish) hiker-style xmult accumulation
setting a regular card's ability.perma_x_mult to 2 gives it X3

tepid crow
#

yeah it's a bit weird like that

scarlet spire
#

doesn't seem intentional?

#

like, that just shouldn't happen, why is it adding xmult instead of multiplying it like it should

red flower
#

I'm guessing so you can easily have cards that say "add 0.1 mult"

scarlet spire
#

right, I guess it does make a little more sense from the accumulation perspective, actually

#

hmm

#

I guess I should just subtract 1 when setting?

tepid crow
#

wait why does it default to 0 but add 1

#

I thought it'd at least default to 1

scarlet spire
#

....oops

tepid crow
#

nice lol

scarlet spire
#

score nuke

#

oh that's what is extra confusing about this

#

actually I really don't know

#

why did this base card just return an xmult of 0 that's not right

graceful magnet
#

for some reason Boss Blinds activate the first part of this if instead of the other part

#

okay well now I know I'm using the wrong thing to check

red flower
#

I use G.GAME.blind.boss

graceful magnet
#

I just dunno what the right thing to check is

#

that's probably easier

errant fulcrum
#
if context.buying_card and context.card == ('Voucher') then
            return {
                card.ability.extra.Xmult = card.ability.extra.Xmult + 2,
                message = 'Upgrade!',
                colour = G.C.MULT
            }
        end
#

Am I missing something

graceful magnet
#

Vouchers are not cards

errant fulcrum
#

Oh

graceful magnet
#

and that is the extent I know how to help thumbeline

mystic river
#

this mostly works the way i want but the upgrade message happens after the upgraded cards get juiced up and i don't know how to fix the timing on that

calculate = function(self, card, context)
        if context.individual and context.cardarea == G.play then
            if context.other_card.ability.set == "Enhanced" then
                local buff = context.other_card.ability.name
                local gain = "unset"
                local buff_to_gain = {
                    ["Bonus"] = "chips",
                    ["Stone Card"] = "chips",
                    ["Mult Card"] = "mult",
                    ["Glass Card"] = "xmult",
                    ["Steel Card"] = "hxmult",
                    ["Lucky Card"] = "cash",
                    ["Gold Card"] = "hcash"
                }
                gain = buff_to_gain[buff] or "unset"

                if gain == "unset" and type(context.other_card.ability.extra) == "table" then -- Table check avoids crashing on glass cards, because :thunk: momence
                    gain = context.other_card.ability.extra.gymboost or "unset"
                end
                gain = gain:gsub("_", ""):lower() -- Remove underscores and force to lowercase
                local valid_gains = {
                    chips = true,
                    hchips = true,
                    xchips = true,
                    hxchips = true,
                    mult = true,
                    hmult = true,
                    xmult = true,
                    hxmult = true,
                    cash = true, money = true, dollars = true,
                    hcash = true, hmoney = true, hdollars = true,
                    none = true
                }
                if not valid_gains[gain] then gain = pseudorandom_element({
                        "chips", "xchips", "mult", "xmult", "cash", "hchips", "hxchips", "hmult", "hxmult", "hcash",
                    })
                end
                --mintySay("Gain is "..gain)
                for i = 1, #context.scoring_hand do
                    local juice = true
                    if context.scoring_hand[i].ability.name ~= buff then
                        local gain_map = {
                            chips = "perma_bonus",
                            hchips = "perma_h_chips",
                            xchips = "perma_x_chips",
                            hxchips = "perma_h_x_chips",
                            mult = "perma_mult",
                            hmult = "perma_h_mult",
                            xmult = "perma_x_mult",
                            hxmult = "perma_h_x_mult",
                            cash = "perma_p_dollars", money = "perma_p_dollars", dollars = "perma_p_dollars",
                            hcash = "perma_h_dollars", hmoney = "perma_h_dollars", hdollars = "perma_h_dollars"
                        }
                        local ability_key = gain_map[gain]
                        local extra_value = card.ability.extra[gain]
                        if ability_key then
                            local ability_table = context.scoring_hand[i].ability
                            ability_table[ability_key] = (ability_table[ability_key] or 0) + extra_value
                        else
                            juice = false
                        end
                        if juice then
                            G.E_MANAGER:add_event(Event({
                                func = function()
                                    context.scoring_hand[i]:juice_up()
                                    return true
                                end
                            }))
                        end
                    end
                end
                return {
                    extra = { message = localize('k_upgrade_ex'), colour = G.C.CHIPS },
                    card = card
                }
            end
        end
lavish lake
#

Yo guys, how do I make a consumable again in steamodded?

mystic river
lavish lake
mystic river
lavish lake
#

Oh shit

#

I had to change ObjectType to ConsumableType, but now the game is crashing when I enter the collection

opal spade
#

the thing going wrong is that you don't buy them

#

you redeem them

gusty python
#

Hi!, i was wondering wether it would be possible to make a joker give a specific tarot card at the start of a round

red flower
#

yes

faint heron
#

how do i get it to play the desired "ultrakillcoinsound"? im trying to replace the "xmult" sound with it

restive bronze
#

what could be the cause of this?

Oops! The game crashed:
[SMODS _ "src/utils.lua"]:949: attempt to index local 'card' (a nil value)

faint heron
red flower
#

return sound = 'soundname'

gusty python
#

I asked chatgpt in Web browsing mode and it came up with this code

SMODS.Joker{
    key = 'HERMIT_GIVER',
    loc_txt = {
        name = 'Blind Sage',
        text = {
            'Adds {C:attention}The Hermit{} Tarot card when entering a Blind'
        }
    },
    atlas = 'Jokers',
    pos = {x = , y = 0},
    config = {},
    
    calculate = function(self, card, context)
        if context.enter_blind then
            G.GAME:add_to_deck('tarot_hermit', 1) -- Adds "The Hermit" Tarot card
            return {
                message = 'The Hermit has joined your deck!',
                colour = G.C.TAROT
            }
        end
    end
}

It shows up in game and doesn't crash the game but it doesn't create a card when you enter a blind

red flower
#

because that's not a function that exists and 'tarot_hermit' also doesn't exist

#

I'm pretty sure it's setting_blind and not enter_blind as well

#

overall I wouldn't recommend chatgpt for coding in a very niche api

gusty python
#

Thanks for the advice, would you happen to know where i can see the actual ID for consumables?

faint heron
red flower
red flower
faint heron
red flower
#

do you have a steamodded header in your mod file or are you using the json

faint heron
#

i got the steamodded header

red flower
#

do you have a --- PREFIX: field

faint heron
#

nope

red flower
#

then your mod's prefix is the first four letters of your MOD_ID
it's used to identify things from your mod so there aren't any name conflicts

gusty python
red flower
#

that function doesn't exist

#

use
SMODS.add_card({key = 'c_hermit'})

faint heron
gusty python
red flower
errant fulcrum
#
if context.buying_card and context.card == G.vouchers then
            return {
                Xmult_mod = card.ability.extra.Xmult + 2,
                card = card,
                message = card.ability.extra.Xmult,
                colour = G.C.MULT
                }
        end
quasi comet
#

Is there a context for destroyed consumables? I'm trying to have a card upgrade when a consumable or joker is destroyed, but cards_destroyed doesn't work.

faint heron
errant fulcrum
restive bronze
#

a get_id is causing this, how could I fix it?

red flower
#

change that

red flower
red flower
faint heron
quasi comet
tall wharf
#

damn vgen

placid frigate
#

where would you put deck.yes_suits in your challenge code?

red flower
errant fulcrum
#

The syntax is killing me 😭

tall wharf
#

lua moment

red flower
placid frigate
red flower
#

i think its S C H D

lavish lake
red flower
#

so H

placid frigate
#

ok so just H didn't work

red flower
#

in the dump folder

#

also update your smods

red flower
#

or just H = true idk why i put the brackets

#

both work

placid frigate
#

would it be deck = { deck.yes.suits = 'H = {...} } })

red flower
#

no

red flower
lavish lake
red flower
#

latest is 304, if you're a dev I recommend updating from source if you run into any problems

#

also i said screenshot because i need a bit more context lol

placid frigate
lavish lake
red flower
placid frigate
red flower
placid frigate
#

ok it's working now thank you

lavish lake
tall wharf
#

try checking atlas

#

also balala reference?

lavish lake
placid frigate
#

i don't want to sound ungratefull but is there a way to add more card to a deck for a challenge, like 52 heart cards (4 aces of hearts, 4 kings of hearts, etc...)

tall wharf
#

can't check dawg I'm on phone

lavish lake
#

Who's not on phone

red flower
#

you need a 2x asset

placid frigate
#

i'm not but i'm not great at looking at the code ( i am having trouble myself)

red flower
lavish lake
placid frigate
#

or how ever you do it

lavish lake
wintry swallow
#

hypothetically how difficult would it be to make a mod altering the name of a single basegame joker? i’m assuming pretty simple

placid frigate
#

like re-making it but changing the name?

wintry swallow
#

my friends & i desperately want to rename Cavendish into Jokerpoker Banana

red flower
placid frigate
red flower
#

yes

runic pecan
#

What is the main difference between setting_blind and first_hand_drawn?

red flower
#

the wiki

placid frigate
wintry swallow
#

all good!

runic pecan
wintry swallow
#

yeah that probably works. thank you!

red flower
#

can you patch localization files?

manic rune
#

doesn't that one mod which balatro university uses changes the names of vanilla jokers

lyric wadi
#

hello code question

#

how do i get the combined rank/base chip of all scored card of a hand

#

like e.g. if you play a 7 7 7 9 9 full house i want to be able to get the value 39

#

or a K Q J 10 9 straight i'd get the number 49 (if chip) / 55 (if rank)

placid frigate
#

ok so I typed out all the cards so now there are 4 sets of hearts suit (4 aces of hearts, 4 kings of hearts, etc...) but now there are "ghosts cards"

scarlet spire
#

despite being lua files... lovely doesn't touch them at all, so you can't patch them

manic rune