#đŸ’»ăƒ»modding-dev

1 messages · Page 395 of 1

minor magnet
#

yes but being saved makes it so the blind gives no reward money

keen loom
#

how do you add a gradient to rarity?

summer furnace
#

where do I find saved in the source code?

daring fern
thorn furnace
#

How would I go about destroying all the cards in the scored hand

daring fern
thorn furnace
#

i tried just doing this but I didn't quite realize that was just all of the cards

pearl bane
#

How can I add keys to the current run's "save"? I want to store some data that is saved per-run

cinder cliff
#

What are the different types of 'sets' create_card can use?

#

Like that

#

But the others, like I want it to act like a standard pack, some base, and some enhanced

daring fern
cinder cliff
#

'Base' Makes them all base, Enhanced makes them all enhanced

#

I want a mix, like the standard packs

#

'Tarot_Planet' is a set type apparently

keen loom
daring fern
last sentinel
#

anyone know why this spectral is crashing upon use? must be something small cause this is pretty identical to how other mods implement this

last sentinel
#

It wasnt working for a modded seal im making but its still now not working even tho seal is just 'Red'

#

no idea why _seal is Green when thats nowhere in the code for the Spectral

daring fern
last sentinel
#

how do you mean?

daring fern
last sentinel
#

aha, in set_seal

#

which would make sense as a crash if _seal is Green

daring fern
last sentinel
#

I think i know what it is one sec

#

I was testing without recreating the card so it had the old seal info let me check recreating the card

#

yup

#

thanks for the help!

#

for a modded seal, would the {seal = } be modprefix_sealkey ?

daring fern
last sentinel
#

perfectg

keen loom
glad bough
daring fern
#

Did you forget to return true?

#

Try using mult and hand_chips instead of G.GAME.current_round.current_hand.chips

#

My mistake I meant hand_chips for chips.

thorn furnace
#

Just to clarify
How exactly does the tag thing work

#

not entirely sure

daring fern
thorn furnace
#

yeah

#

i have the things defined and everything but it doesn't work

glad bough
#

note: i only started modding balatro today ;)

how can i make a custom joker that halves the current mult? i tried this but the game crashed

daring fern
thorn furnace
modern kindle
#

good schmorning chat

glad bough
#

thanks lad

thorn furnace
daring fern
thorn furnace
daring fern
thorn furnace
#

I just don't know what "mostly" means here

unborn bay
#

self refers to the center object, in layman's terms, the card's base definition

#

card refers to the instance of that center in a card in the game

thorn furnace
#

gotcha

unborn bay
#

note: card is not a center

#

old code used to mistakely refer to them as centers originally

thorn furnace
#

The base joker I built this off of didn't use card at all which makes this confusing
Because it seems to break things when I start to use card

unborn bay
#

so keep an eye out for those

thorn furnace
thorn furnace
glad bough
#

how does the stupid uh

#

coloured text work

#

tryna replicate ts

spice wadi
#

But the short version is that anything between the 2 sets of {} gets changed

#

You specify what you want it to look like in the first set

#

And C: just means colour, and there's a list of colours you can put after

spice wadi
#

Can you show where lines 491 and 492 are as well

thorn furnace
thorn furnace
spice wadi
#

You didn't put card into the calculate function

thorn furnace
#

sorry i shouldve been less vague

#

they do this

spice wadi
#

It doesn't change that it's how you're supposed to use the calculate function

#

I'm not sure where the error is coming from

#

But you need to put card in there

thorn furnace
#

then i get this

red flower
#

where are you getting your example from

#

i think that's from an old smods version

thorn furnace
#

i got it from the examplejimbos mod

spice wadi
#

Found the issue

#

I think

#

Did you send the entire joker code

thorn furnace
#

i did yea

spice wadi
#

Because I don't see SMODS.joker at the start

red flower
#

that's what i mean

spice wadi
red flower
#

just start again using one of the modern examples like the smods examples repo or vanillaremade

#

you can copy the contents of calculate into the new one

thorn furnace
#

first mod is going well

spice wadi
#

Everyone makes mistakes the first time

thorn furnace
#

Honestly I've been going at this for like a full 8 hours now I'm probably just gonna try this tomorrow

spice wadi
glad bough
#

anyone know why the 1 and 3 appear as nil ingame?

#

yah

#

so how does loc_vars work?

spice wadi
glad bough
#

alright!

spice wadi
#

The short version is that it's a list of variables you want to use in places like the description

#

So #1# would be the first variable

tall wharf
#

can someone do this rq

glad bough
#

can card sprites be gifs

wintry solar
daring fern
glad bough
#

really wanted to add that one gif of a horse nodding as a card

tall wharf
#

I've been away from my PC like half the day because weather was unbearable inside my room without AC

wintry solar
#

I’m 99% sure it’s just a visual issue and the limit doesn’t actually persist

tall wharf
#

and i wake up super late in the day

wintry solar
#

I can test soon when kiddo is sleeping

tall wharf
#

also i saw that the limit is in the button

#

right

#

i think it being under the button might look better

wintry solar
#

Eh maybe but not worth the effort I think

tall wharf
#

i think the wording should change

#

maybe instead of limit it's "Up to x"

wintry solar
#

Hmmmm

#

Maybe Limit: 6 cards

tall wharf
#

i personally think using the : makes it a bit murky

#

and up to feels more natural

spice wadi
glad bough
#

do i have to upload every single frame or something

wintry solar
tall wharf
#

the problem with adding cards at the end is that it might get too long

spice wadi
glad bough
#

yeah righto

wintry solar
#

I’ll see what Up to looks like

tall wharf
#

i think this makes more sense

#

i think if it's more than hand size it should show like Up to hand size

keen loom
#

what do y'all think about these consumable ideas?

  • pet cards, which adds one-time bonuses and would unlock a second buff for a specific eligible cookie
  • item cards, which would give an extra buff/debuff to specific cookies, or cookies of certain elements
red flower
#

even in vanilla

tall wharf
#

ah

#

well i guess up to entire hand

#

not hand size

wintry solar
#

I wouldn’t want to cap the number

tall wharf
#

and instead of hand size it counts number of cards present in hand

wintry solar
#

I think it’s important to know if it’s higher and you can afford to lower it

tall wharf
#

alright

#

does this display anywhere else in the run other than play button

wintry solar
#

-# though it does cap at the other end of the scale

#

It doesn’t

tall wharf
#

maybe some general info should be in run info window

#

in case certain parts of the run isn't present but is important

#

but i digress

#

i think Up to works fine

wintry solar
#

I’m still not convinced it doesn’t need cards

tall wharf
#

which is fair

wintry solar
#

Intuitively when I read “play hand up to 6” I think it means I have six hands to play

tall wharf
#

hmmm

#

Max 6 cards

wintry solar
#

Maybe it could just be “X cards”

tall wharf
#

I think the clarification that it's the hand limit should be there

#

also yeah it's a visual bug

#

(new run)

wintry solar
#

Yeah I’ll get that cleaned up in a couple of minutes

#

Max X cards should work

tall wharf
#

yeah max X cards works for me

cyan lagoon
#

any way to spawn a card wherever i want?

daring fern
glad bough
#

is there a way to smoothly "replace" a card

glad bough
cyan lagoon
daring fern
daring fern
glad bough
cyan lagoon
glad bough
#

also where are sound files stored?

daring fern
glad bough
daring fern
cyan lagoon
#

i believe @daring fern wrote it

glad bough
cyan lagoon
daring fern
daring fern
glad bough
faint yacht
#

j_

cyan lagoon
glad bough
#

oh alright

daring fern
lyric blade
#

Is it possible to create a card with an individual sprite? Like a text on it

tall wharf
#

ah right.

glad bough
#

:uglycat

#

oh

lyric blade
# glad bough wdym?

Like create a playing card, but it has text as a texture. Since it can be infinite it has to create the sprite via code

#

Well I think I go an idea I guess nevermind maybe

lyric blade
#

Should be possible just gotta know how lol

glad bough
#

well shucks what do i do here

lyric blade
#

Create the file fool

glad bough
#

i did

lyric blade
#

Isn't recource/sounds/ and mods/TestCard/assets/sounds different places?

#

Maybe it doesn't look for it in the mods dictionary

daring fern
glad bough
#

ah i see what i need to do

lyric blade
#

Gotta maybe manually tell from where it uses that sound

glad bough
#

progress

unborn bay
#

is it a wav

#

is it a ogg

glad bough
#

it is a ogg

unborn bay
#

reexport it or smth

glad bough
#

does .wav work too?

daring fern
glad bough
#

yeah righto

#

argh i hate to ask a lotta questions all at once but i would go about adding a custom ui message, that text that appears underneath a joker

cinder cliff
#

Do you mean just a message?

#

Or a fully custom thing?

red flower
#

yes

cinder cliff
#

Anyways, how do I make it so when a custom boosterpack is opened, it has a mix of base and enhanced cards?

#

'Base' makes it all base

#

and 'Enhanced' is all enhanced

#

Just wondering if there is a mix

glad bough
red flower
glad bough
#

but instead of like "mult" or "chips" it would be a string

glad bough
cinder cliff
#

Lemme find my code

daring fern
glad bough
#

cheers lad

cinder cliff
#

As far as I know, it just does all the cards at once

red flower
#

it doesnt

#

it goes through each card

#

thats why it has a i argument

cinder cliff
#

oh yeah

daring fern
red flower
#

replace self for card

cinder cliff
glad bough
#

would something like this work for changing the image of a card?

tall wharf
#

i believe self actually refers to the thing you define

red flower
#

we should change the standard to calculate(_, card, context) lol

cinder cliff
cinder cliff
#

ah

hard mica
#

whats the key for the main menu balatro logo for the atlas

cinder cliff
#

Where do I change this? (Won't let me screen snip for some reason)

glad bough
#

man i hate that theres a delay with calculate effect

wintry solar
#

wdym

hard mica
daring fern
open aspen
#

i know this is farfetched but does take_ownership create any kind of lovely log or dump?

cinder cliff
#

How do I fix it saying error?

red flower
cinder cliff
#

Which page is that on?

red flower
#

SMODS.Booster

cinder cliff
#

I swear I looked there earlier

#

Thank you

hard mica
spice wadi
glad bough
#

Weird

#

I use play sound then right after I use calculate effect to make a message and there is a massive delay between the two

glad bough
daring fern
glad bough
# daring fern Code?

I’m on mobile rn unfortunately but it’s the event that runs when all jokers and stuff have been played

daring fern
#

context.destroy_card?

daring fern
#

You need to return remove = true and you need to check if context.destroy_card == card

cyan lagoon
#

am i doing this right?

#

i'm trying to retrieve the key of the last joker in the custom cardarea

#

and put it into info_queue

daring fern
cyan lagoon
daring fern
cyan lagoon
#

oh, wait, the cards might not be 'Joker' set in that cardarea

#

wait, no

#

i specify 'Joker' set when creating them

wintry solar
#

use G.P_CENTERS[card1.config.center_key] as your infoqueue

cyan lagoon
#

i dont really want that

wintry solar
#

what are you trying to put in the info queue then?

cyan lagoon
#

key of the joker in a custom card area

wintry solar
#

the key in text form?

cyan lagoon
#

uhh... yea...? what you usually put there

#

a string or smth

wintry solar
#

then do what I said before

unborn bay
#

they're looking to avoid creating the info_queues of that center within the info_queue

open aspen
#

how do i give myself vouchers with debug plus?

#

need to test a bunch of consumables quickly and want to give myself crystal ball a ton

unborn bay
#

be in shop, hover over the voucher and press 3

open aspen
#

i see

#

wasnt in shop

#

ty

cyan lagoon
wintry solar
#

then you'd have to create your own info tooltips to avoid that

unborn bay
#

i think you can just get away with a custom generate_ui function for info_queue here

glad bough
glad bough
#

Interesting

#

I outta add that

cyan lagoon
frigid blaze
#

Can you tell me who can draw Jokers to order?

copper shell
#

anyone here know what a lua is?

glad bough
cyan lagoon
lucid owl
copper shell
copper shell
copper shell
#

where's the observatory?

glad bough
#

Aw man I can’t post gifs

#

Wrong image

copper shell
#

right image

glad bough
#

I captioned that image with “this is mf doom”

copper shell
#

who is that mf and why is there such dread around them

lucid owl
#

doesn't work like the other ones

glad bough
#

Right

lucid owl
glad bough
lucid owl
#

passed away in 2020, lots of memes about his musical style

copper shell
cyan lagoon
#

ok another question, how do i pass multiple blueprint_effect?

daring fern
unborn bay
#

nest extra tables together

cyan lagoon
unborn bay
#

nonono

#

return a single table, with an extra table, and in that extra table, have another extra table

#

hence 'nesting extra tables'

glad bough
cyan lagoon
daring fern
wintry solar
#
ret1.extra = ret2
ret1.extra.extra = ret3
return ret3```
#

that's the basic structure

spice wadi
#

Would SMODS.calculate_effect also work here?

wintry solar
#

yes

spice wadi
#

Alright thought so

wintry solar
#

though if you use calc effect on all 3 you should add return nil, true afterwards

spice wadi
#

Cos I switched to using that over nested tables cos it got messy

daring fern
wintry solar
scarlet thorn
#

SMODS.blueprint_effect

#

Cmon guys

#

It just works

#

Err wait, I'm reading my own code wrong

#

Yea something has the best solution

unborn bay
#

this is why my extra table nesting code has a check if it already has an extra table

cyan lagoon
unborn bay
#

if so nest into the extra table of that extra table

wintry solar
#

you'll need to make sure that the rets actually exist

cyan lagoon
#

so 'if ret1 then' and 'if ret1.extra then'?

wintry solar
#

it's probably easier to just do SMODS.calculate_effect(ret1, card)

cyan lagoon
#

so i was on the right track...

wintry solar
#

would still need the check for existance

#

if next(ret1) then ...

red flower
cyan lagoon
keen loom
#

does a legendary joker that turns scoring cards into stone cards and gives them a mult bonus too op?

cyan lagoon
keen loom
spice wadi
#

We live in a world where chicot is a legendary and photochad is common

#

Legendaries can be anything as long as they aren't chicot

daring fern
# cyan lagoon no?

You should probably remove the jokers that aren't being copied before the game starts lagging.

cyan lagoon
daring fern
cyan lagoon
#

every 4th joker gets removed

#

cause i only need 3

midnight coyote
#

does anyone know how to outright replace a boss blind with another one in the pool?

cyan lagoon
#

i dunno how that works, but that should be it

midnight coyote
#

that doesnt seem right

daring fern
midnight coyote
#

im not changing existing boss blinds

#

more just pushing the vanilla ones away and slotting mine in their place

midnight coyote
vale berry
cyan lagoon
midnight coyote
daring fern
midnight coyote
#

if thats current ante then thats rightg

verbal hare
faint yacht
shut crater
midnight coyote
faint acorn
#

Have some code that I simply ripped off a tutorial just to see if I can get something into the game, however it doesn't appear in the collection. Any help would be very nice

long sun
#

hiya! my Zodiac Packs have a bug, where you can take Zodiac cards from them, even if you don't have any free consumable slots

#

but, i can't see how i'd fix that. is there something i can add that would fix this bug?

faint acorn
#

tysm

daring fern
midnight coyote
#

how would i get rid of this odd particle effect around the cards in my ritual pack?

long sun
#

iirc, i adapted code from Cryptid, which isn't usually a good idea, but it mostly works

#

i don't remember exactly what i did when writing the code

faint acorn
#

found the error but got no idea what it does

tired kestrel
long sun
#

okay, progress update — i tried this, but selecting Zodiacs from packs now crashes

#

lemme grab the log

cyan lagoon
#
  • why not have 2?
hard mica
daring fern
long sun
#

right

#

mm, what should it be, then?

hard mica
daring fern
long sun
#

lemme try that

red flower
#

use_card is just the general name of the function that handles that button

long sun
#

ahh gotcha :D

daring fern
long sun
#

yay, perfect! thank you :D

#

mm, one more bug, but it's a visual bug

#

when selecting a Zodiac from a Mega Zodiac Pack, the bottom UI moves down, as it does when using a consumable, and immediately comes back up

long sun
#

that doesn't happen with Standard Packs, so is there a fix for that?

hard mica
#

the only thing i want to change is the card in the middle to match the green and purple

#

idk how to tho

keen loom
#

is it possible to add images in descriptions?

daring fern
keen loom
#

i kinda want to try adding small icons or something

snow vale
#

how can i count how many cards ive discarded over the round?

obsidian pagoda
#

like not in the menu

red flower
cyan lagoon
obsidian pagoda
#

Trajectory moment
When blind is selected, destroy a random consumable in your possesion and add it's sell value to xmult

cyan lagoon
#

#G.discard.cards should work

midnight coyote
#

do editions support calculate functions

daring fern
cyan lagoon
midnight coyote
#

okay

#

i assumed so but i didn’t see any documentation for it

wintry solar
#

almost everything supports calculate functions

red flower
#

oh i want to see if i can make mods have a global calculate

#

i need to see what victin wanted

midnight coyote
#

    
calculate = function (self,card,context)
        if context.joker_main then
            if CHAR.FUNC.negative_event_proc(G.GAME.Risk or 0) == false then
                local victim = card
                if not victim then
                    return
                end -- Safety check

                victim.getting_sliced = true
                G.GAME.joker_buffer = G.GAME.joker_buffer - 1

                -- Store reference in local variable for closure
                local dissolve_target = victim
                G.E_MANAGER:add_event(Event({
                    trigger = "immediate",
                    blockable = false,
                    func = function()
                        if dissolve_target and dissolve_target.start_dissolve then
                            dissolve_target:start_dissolve()
                        end
                        G.GAME.joker_buffer = 0
                        return true
                    end,
                }))
            else
                return {
                    xmult = self.config.extra.granted_mult
                }
            end
        end
    end
#

okay

wintry solar
#

I think mod objects themselves and stakes are the only ones missing now

midnight coyote
#

so why does this not work

wintry solar
#

shouldn't be difficult to implement those

midnight coyote
#

its not getting to the xmult part

#

also card.ability does not work for some reason

red flower
#

it's hard to specify like with areas

red flower
midnight coyote
#

of what

red flower
#

it's hard to read on phone

midnight coyote
#

oh

red flower
#

ty

wintry solar
red flower
#

I mean that's the easiest solution

hard mica
#

idk how to do it tho

red flower
midnight coyote
spice wadi
midnight coyote
#

oh wiat

#

wait

spice wadi
#

so you could see what that mod does

midnight coyote
#

nvm

#

thought i did smtn

#

carry on

red flower
midnight coyote
#

it's impossible, as the mechanic to alter risk always checks to see if its under 0 or over 1

red flower
#

i dont see it honestly

#

it probably has to do with card.ability not working

midnight coyote
#

hmm alright

#

let me change it to get it to show the problem

#

and ill give the crash log

wintry solar
#

card.ability won't work if this is an edition

#

it's card.edition

midnight coyote
#

is it still context.joker_main

#

oh hold on

wintry solar
#

what's the edition on?

midnight coyote
#

im just seeing what cryptid is doing

midnight coyote
#

it can be either

wintry solar
#

if context.pre_joker or (context.main_scoring and context.cardarea == G.play) then

#

use this

#

actually, use post_joker

#

that'll be correct for xmult

midnight coyote
#

got it

#

works now

scarlet imp
#

do you guys know if I can use context.context just anywhere?
trying to spawn tags the same way anaglyph deck does and the context doesn't seem to get triggered

daring fern
scarlet imp
#
calculate = function(self, card, context)
    if context.context == "eval" and G.GAME.last_blind and G.GAME.last_blind.boss     then
        G.E_MANAGER:add_event(Event({
            func = function()
                add_tag(Tag("tag_double"))
                play_sound("generic1", 0.9 + math.random() * 0.1, 0.8)
                play_sound("holo1", 1.2 + math.random() * 0.1, 0.4)
                return true
            end
        }))
    end
end

here's the calculate for this joker

red flower
#

yeah that's for decks only afaik

scarlet imp
#

mannnn

red flower
#

use context.end_of_round and not context.game_over and context.main_eval and G.GAME.blind.boss

scarlet imp
#

I tried something similar earlier, it seems like the end_of_round context has some unintended behavior when used in this way because the effect procs multiple times. I get given about 15 tags lol

#

trying this version now

red flower
pure salmon
#

+4 Mult for every Joker to the left of this one (Currently +0 Mult)
i want a Joker with this effect. i know how it'd work in calculate but the displayed Mult wouldn't update when you move the Joker around

latent raven
#

Help I want the joker to add a X0.8 mult (it removes mult) but instead it adds 0.8 to the mult.

faint yacht
#

Just xmult = card.ability.extra.Xmult .

latent raven
#

OH

#

I see what I did wrong.
Thank you

hybrid shadow
glad osprey
#

fuck this one line of code in particular

#

bitch would win in the world championship hide and seek game

pure salmon
# hybrid shadow did you use `loc_vars` in your code

yes, but it wouldn't matter, would it? if i'm only evaluating a new mult value in joker_main then it won't update until that code is run. i was asking of there was a context or something for when a joker is moved around

pure salmon
#

feels like a waste to have that code run every frame when it does nothing in 99.9% of them

hard mica
crisp coral
#

the description does not update until you recreate the ui by rehovering in the joker

latent raven
#

Is there a way where I can force a joker to always be on the very right joker slot?

latent raven
#

Is there a documentation on the github where I can look into?

wintry solar
#

You are very correct that it would be a waste in update

hard mica
#

is there a way to hide a joker ? im tryin gto make a special card just for the title but its not a real joker so i want to hide it

daring fern
wintry solar
hard mica
hard mica
wintry solar
#

Also need to set the in pool function to return false

misty gorge
#

How could I create a deck that only has for example 5 cards?

hard mica
daring fern
misty gorge
#

Ah, okie

sturdy compass
#

Or are you talking about your specific use case?

latent raven
#

about mine yeah

scarlet imp
#

can someone provide the documentation on how to implement patches?

red flower
vast night
#

hi again. how do i count a card as discarded whne its played?

daring fern
#

What are causes of the game hard crashing when reaching the main menu?

hard mica
spice wadi
vast night
#

and played too

misty gorge
#

Uhh how do I remove a playing card from the deck

#

I can't seem to figure it out

faint yacht
daring fern
daring fern
red flower
#

I had the game crash when it finished loading idk if that's the same

long sun
#

quick question, how do you check if a card is a consumable?

daring fern
scarlet imp
#

is it possible to disable the effect of a deck? like disabling the Anaglyph Deck or Plasma Deck's effects?

spice wadi
# hard mica im just seeing this

shit i forgot to update 😭
im using an older version because i had the download page open to get the new one but forgot to actually do it

long sun
faint yacht
vast night
daring fern
scarlet imp
daring fern
daring fern
faint yacht
vast night
long sun
vast night
#

like just put the "effects" without making any local effects = 'effect'

long sun
#
if context.selling_card and card.ability.consumeable then
      card.ability.extra.current_hands = card.ability.extra.current_hands + card.ability.extra.added_hands
      return { message = localize("k_upgrade_ex"), colour = G.C.FILTER }
    end```
#

ah wait no ignore

#

dfkjgnkdjfng

daring fern
long sun
#

aware

daring fern
# vast night bump
if context.individual and context.cardarea == G.play then
    SMODS.calculate_context({discard = true, other_card = context.other_card, full_hand = context.full_hand})
end
vast night
daring fern
last sentinel
#

Any clue as to why this ownership would crash when using the fool? crash log says that last_tarot_planet is being set to a table instead of a string but im not modifiying tarot_planet

red flower
#

name is not a table

#

and you're setting it as a table

last sentinel
#

well yeah that would cause the exact problem huh

#

lmfao thanks

vast night
#

hi can anyone tell me why my card dosent count as discarded?

calculate = function(self, card, context)
        if context.individual and context.cardarea == G.play then
            SMODS.calculate_context({discard = true, other_card = context.other_card, full_hand = context.full_hand})
        end
    end,
latent raven
rare moss
#

Does anybody know how I can make a joker retrigger itself? And then also allow that retrigger to retrigger it again? I'm trying to make like a weird missprint where it can trigger X amount of times

faint yacht
#

You'd probably want a nested table of extra = { ... } where the depth of said table is rolled for by the Joker, then return said table.

daring fern
spice wadi
#

if its a simple effect

rare moss
spice wadi
#

its what i used for my xmult joker that triggers a varying number of times

#

instead of nested tables or retriggering the entire joker

daring fern
rare moss
#

My ideas was just a joker with +Mult that has a 1/2 chance to retrigger. so it could either trigger once or if ur very lucky trigger 5 times

#

Cus in my head the retrigger would allow it to roll the 1/2 chance again for another trigger and so on

vast night
midnight coyote
#

how do i fetch current hand size

#

whats the variable

daring fern
midnight coyote
#

thanks

keen totem
#

how do people get the mod name on a joker cycling to show stuff like Idea: X, Code: Y, Art: Z, instead of always being the name of the mod?

midnight coyote
#

how can i check for all jokers of a certain objecttype

#

oh wait

#

i think i might know this one

keen totem
#

this was someone elses idea and i want to credit them without taking up space in the description

#

cryptid and polterworx do this (only mods ive actually played enough to notice it on)

#

idk if its custom coded or an SMODS thing

keen totem
daring fern
keen totem
#

if theres one thing ive learned while modding balatro

#

uh

#

idk

#

yea see

#

idk what any of that code means

#

or how to alter it to the credits i need

daring fern
midnight coyote
#

this never increments the xmult

glass scaffold
#

<@&1133519078540185692> AY WE GOT ONE

#

Oh. nvm.

exotic hedge
#

damn I missed it didn’t I

keen gorge
#

Gotcha

quick scarab
#

I tired to make it but it didn't work out

obtuse silo
#

i kinda wanna go back to vanilla balatro
is there any way i can do that?

glass scaffold
obtuse silo
#

so basically
just move the mods into a folder that the steamodded won't accesss

glass scaffold
#

I do that for Balatro MP matches.

obtuse silo
#

nah dw it's worked

#

just
wanted to ask around to make sure i don't do anything rash

#

tryna go for a completionist++ file

quick scarab
#

I'm trying to make a Joker where it adds +50 chips per Gold seal on deck, but it doesn't work, does anyone know the solution

daring fern
quick scarab
#

but I don't know how the game identify seals

daring fern
quick scarab
#

let me check

west prism
#

is there a cardarea that only refers to hards held in hand? G.hand seems to include played cards

#

can't really find a cardarea list to see all the options

west prism
#

oh dammit it's the same I asked last time lmao

#

ty ty

keen totem
#

how do i get other .lua files besides my main to run?

daring fern
pure salmon
keen totem
pure salmon
#

fixed. sorry for spreading misinformation online it will happen again

keen totem
#

SMODS.load_file("C:\Users\user\AppData\Roaming\Balatro\Mods\CGNik\overrides.lua") is an "invalid escape sequence"

daring fern
keen totem
#

ah

red flower
#

also no \

keen totem
#

so just SMODS.load_file("CGNik/overrides.lua")

#

or no CGNik/

daring fern
keen totem
#

also something

#

i copied the cryptid thing for the mod badges

#

it isnt working

#

obv i need to change some stuff

#

but i dont know what i have to change

strange wasp
#

Hi. I have a question. How do i put smods into vsc? I have the sumneko lua Extension, but Whenever i input smods, it underlines it.

pure salmon
#

i would also like to know this lol

strange wasp
#

Please note, I'm using the outdated YT video on how to create a joker. Found on the balatro modding guide

red flower
pure salmon
#

i have the full smods folder and the lua dump in my workspace but still no dice

red flower
#

yeah it says that there, apparently putting them in the workspace doesn't work

keen totem
#

whats with X: tags and not being able to use spaces

red flower
#

thunk

#

use B:

quick scarab
daring fern
wintry solar
#

seals aren't an enhancement

quick scarab
daring fern
quick scarab
#

like where do I put it

normal crest
#

Instead of has_enhancement

normal crest
red flower
quick scarab
#

oh yeah

red flower
#

ill fix it in a bit

quick scarab
#

I using vanilla remade as a base

red flower
#

i know that's my coding style :3

quick scarab
#

wait

#

wait a minute

#

are there any other typos on that code?

red flower
#

not that i see

quick scarab
#

it seen like stone joker works fine on vanilla remade

red flower
#

yeah G.playing_card is also a thing but that means the description may sometimes display wrong values

quick scarab
#

For me it is displaying +nil chips

#

On my card

red flower
#

what's the config

#

and the description text

hybrid shadow
#

is there a way for a joker to check what the base mult is for a played hand type before scoring gets added

red flower
#

yes, it should be somewhere inside G.GAME.hands[context.scoring_name]

quick scarab
#

With the the () part being from the vannila description

#

I can't acess it right now

wise terrace
#

hi I've recently been dabbling in modding balatro but I'm having a hard time understanding context.individual and context.repitition_only

daring fern
wise terrace
wise terrace
#

is individual also set during retriggers?

wise terrace
wise terrace
daring fern
#

Thats context.repetition

wise terrace
daring fern
#

It's still true if no retriggers are called.

twin vale
#

Hello

#

Is it possible to alter shop card spawning behaviour of a specific class of cards?

cyan lagoon
wise terrace
daring fern
cyan lagoon
#

question is there a way to make SMODS.add_card silent?

twin vale
# cyan lagoon i'm sorry can you rephrase that?

Right. I'm tinkering with the Steammodded framework (basically why I bought Balatro)
To specify, I'd like to enhance the behaviour of Telescope so that the first Planet card generated in the shop's main rack corresponds to that of your most played hand.

wise terrace
cyan lagoon
wise terrace
twin vale
cyan lagoon
twin vale
#

Oh, right, sorry.

daring fern
twin vale
daring fern
agile dew
#

is has_enhancement well implemented here?

hushed field
#

Yes

keen loom
#

made my stickers and seals

agile dew
#

oh i like them!

agile dew
#

for both checks

hushed field
hushed field
keen loom
hushed field
#

There are plenty of times where context.cardarea will be G.play, but context.other_card will be empty

agile dew
#

wait what?

#

so the i have to add the context that is during scoring?

#

cause it calculates directly after the cards are placed in g.play?

hushed field
#

Yes. Calculate is called by any calculate effect, which means it's called when a card is obtained, selected, drawn, discarded, when the shop is rerolled, when another card triggers, etc.

#

You need to narrow down the contexts. There's documentation for it on the smods' wiki!

agile dew
#

ill try to fix it

#

thanks!

scarlet imp
agile dew
hushed field
#

So you can have multiple contexts and they can be ordered in any way in your own code

red flower
#

the scoring ones are ordered yes

keen loom
#

i struggle more on coding rather than drawing

scarlet imp
agile dew
#

somehow the crash got fixed but now this part doesnt work

#

it just skips the if entirely

red flower
agile dew
#

yes

keen loom
red flower
#

main_scoring is for enhancements

#

jokers use joker_main

agile dew
#

but its the cards that are giving the xmult, not the joker

#

i think?

red flower
#

ok then you want context.individual

sudden cave
#

Does anyone know if there's a way to detect when a tab (created using create_tabs) is changed? I see that it has an opt_callback parameter but it doesn't seem to actually be calling the function

scarlet imp
scarlet storm
#

how do I add custom text under the rarity? I wanna add art credit under the rarity as done in this screenshot

red flower
agile dew
#

wait you cant update loc_vars in the calculate function?

scarlet storm
sudden cave
agile dew
zealous glen
#

you update before it

agile dew
#

oh shit it works!

#

thanks!

#

and can i stop a card held in hand from doing an effect?

#

like steel cards giving x1.5 mult

outer basalt
#

Hm. how would one go about making a new card area?

daring fern
red flower
agile dew
daring fern
outer basalt
# red flower depends for what purpose

I kinda want cards with an active ability. I don't think I can add a 'use' button to jokers so my next idea is to have a consumable to go with the card. These consumbles would go in the new card area

#

kinda like consumables 2 but I don't want it to be targeted by certain things

red flower
outer basalt
#

oh shit really

red flower
#

yeah

outer basalt
#

how

#

teach me your ways magic man

zealous glen
red flower
#

you need to hook either the sell_an_use_buttons function or card: highlight

outer basalt
#

oooo

#

thank you both

red flower
#

i would tell you to check out mine but the 6 different types of buttons make that a bit convoluted lol

outer basalt
#

ah

limber blaze
#

i would also tell you to check out mine but the function that does it is pure spaghetti code

outer basalt
#

😭

#

delish

scarlet imp
#

i would also tell you to check out mine but I don't actually have any buttons

zealous glen
#

I would tell you to check N's

outer basalt
#

at this point im in a recursive cycle of checking

limber blaze
#

its probably better to check theirs than mine, my code for it is kinda unreadable because i havent cleaned it up yet

red flower
signal rose
#

N you got any idea of how to do this?

gentle rain
#

for some reason this isn't resetting each round

#

and im not sure why

red flower
red flower
signal rose
#

what im intending to do is sort of have the column node then r nodes within it for each row, with multiple rows of inputs, i could put the text node and palette_create_text_input into a row node of their own for the same effect?

red flower
#

the problem with that is that R inside R does nothing

#

what you can do is put those in a C and change the bottom R to a C

signal rose
#

testing now

wintry solar
#

iirc you can nest same type nodes if you need to play with colours, it's just not particularly useful

red flower
#

yeah

signal rose
#

works near perfectly, the paste button is ever so slightly up from it but honestly this is so much better than anything ive managed

#

acc that might be the box element

#

yeah it was the box element, looks perfect now, thank you so much

outer basalt
gentle rain
outer basalt
gentle rain
#

it worked fine before

#

did SMODS.current_mod.reset_game_globals(run_start) get updated??

red flower
#

not as far as i know

gentle rain
#

blehhh

#

does anything look wrong with it

outer basalt
red flower
#

runs

gentle rain
#

...which it does neither of those

#

i have prints set up to tell me when it triggers, and it never triggers

outer basalt
#

hm. i have it in for one of my jokers and it only does run starts

gentle rain
#

that would be init_game_object

#

full code

outer basalt
#

let me see what i did

red flower
#

testing ancient joker in vanilla remade and it works fine in latest smods

outer basalt
gentle rain
#

like i see no issues

outer basalt
#

what were you doing last before it broke?

red flower
#

you're not overwriting it somewhere else or something?

gentle rain
red flower
#

well

gentle rain
#

oh

red flower
#

try deleting that

gentle rain
#

does having more than one brick it

#

i see

#

that makes sense

red flower
#

yes, it's just one for the whole mod

#

you can hook it tho

gentle rain
#

eh, ill just throw it at the beginning of my main.lua lol

#

yea works now

#

ty

red flower
#

you mean this?

wintry solar
#

no, not that, though that also needs fixing to use poll_edition

red flower
#

oh just poll_edition not using it then?

wintry solar
#

this bit yeah

#

I don't think get_current_pool supports editions at all though iirc

red flower
#

it doesn't yeah that's why I asked

umbral zodiac
#

anyone know if the balatro font is monospaced or not

red flower
#

thats dumb

wintry solar
#

because it creates the UI stuff for it

golden lake
#

It's a monospace font

umbral zodiac
#

so it is
hell yeah

golden lake
#

I'm unsure if Balatro preserves the monospace in kerning

primal robin
#

Of course it isn't

umbral zodiac
#

minesweeper in a joker will look a lot more eye.good. then

red flower
golden lake
#

But you can see

umbral zodiac
#

well that is a shame if it isn't because minesweeper is usually aligned

golden lake
#

again, you can check

#

and you can always learn the forbidden dark arts

#

balatro ui...

#

and just shove a ui object into main_end of the joker description

red flower
#

minesweeper balatro sounds like a job for aiko

golden lake
#

It's how I do my evil UI crimes

golden lake
red flower
#

thats not what i said lol

golden lake
#

let them eat cake or whatever

keen totem
golden lake
#

but yeah you can likely use Balatro's evil UI system to draw a minesweeper grid

paper zealot
golden lake
#

I'm pretty sure that when I use it in writing it's actually monospaced

#

Not in Balatro

#

But outside of it

umbral zodiac
golden lake
#

Because I've used the Daniel Linssen fonts in the past

paper zealot
#

The char widths are different in the font file, it would only appear monospaced if whatever program you were using forced it to be

vale glen
#

Minesweeper balatro :o

wintry solar
vale glen
#

Got this line of code working yesterday. It's not perfect, but it works with vanilla Planets and the ones in Cryptid that keep a hand_type value in their config table. Hooray.

#

Figuring out v.config.center.config took a long while, using many print() statements. qpFlatQueen

primal robin
wind steppe
#

How would I get Jimbo to show up when I lose a run under a specific circumstance (I can check for the circumstance already) even if I've already won the run and I'm in Endless?

#

I don't want him to be there if the condition isn't meant

stark geode
#

how do pools work

#

and how do i remove things from them

wheat pulsar
#

hey, how can i make my owns C:tarot, or C:money, etc?

daring fern
keen totem
#

is there a set for consumables as a whole?

daring fern
keen totem
#

just so i can make a random consumable of any type

daring fern
keen totem
#

also how do i check if a card is a consumable

daring fern
keen totem
#

alr

#

time to test

#

ok so i got 2 problems

#

how do i find the rarity of a joker

sturdy compass
#

Check how Baseball Card does it

daring fern
keen totem
#

yea uh

#

didnt work

wind steppe
#

also i cant see half the crash in balatro itself

keen totem
#
if context.selling_card then
            local points = 0

            if context.card.ability.consumeable then
                points = 5
            elseif card.ability.set == "Joker" then
                if card.config.center.rarity == 1 then
                    points = 10
                elseif card.config.center.rarity == 2 then
                    points = 15
                elseif card.config.center.rarity == 3 then
                    points = 25
                elseif card.config.center.rarity == 4 then
                    points = 100
                end
            end

if its a joker, its always rarity 2 for some reason

daring fern
keen totem
#

ah

#

another weird thing

glad bough
#

meow

keen totem
#
SMODS.add_card({set = "Consumeables",soulable = true})
#

puts the cards into my joker slots

#

which makes

#

no sense

unborn bay
#

you need to specify the area

keen totem
#

Default values are determined based on set.

sage crater
#

Are you able to change the visible name of a joker based on a returned variable?

Like can you do “#1# apples” and that updates to 3 apples, 4 apples, etc?

unborn bay
#

i believe the base "Consumables" set doesn't account for that

keen totem
#

i think it should

wild escarp
#

@red flower Really sorry if I'm bothering you, but are you able to help me out with my joker?

unborn bay
#

theres consumables that go on different areas though

unborn bay
#

like mine

keen totem
#

and also, thats the reason why area exists

#

to change the default

#

but the default should still be where they usually go

#

i can put a joker in my consumables, but that doesnt mean they should go there by default

#

@daring fern with modded placement

wintry solar
#

consumeables do automatically go to the consumeable area???

keen totem
#

like using area =

wintry solar
#

you're using set wrong

keen totem
wintry solar
#

Consumeables isn't a set

keen totem
#

someone said it was

wild escarp
# red flower depends

I've been working on that joker from yesterday so it works properly with hologram, and I think I've gotten somewhere. The only issue I have now is that it only ever increments hologram up by one, instead of once for every card added to deck.

calculate = function(self, card, context)
    if context.before then
        local new_cards = {}
        for i = 1, 2 do
            for k, v in ipairs(context.scoring_hand) do
                if v.seal or v.edition or next(SMODS.get_enhancements(v)) then
                    G.E_MANAGER:add_event(Event({
                        func = function()
                            G.playing_card = (G.playing_card and G.playing_card + 1) or 1
                            local copy_card = copy_card(v, nil, nil, G.playing_card)
                            copy_card:add_to_deck()
                            G.deck.config.card_limit = G.deck.config.card_limit + 1
                            table.insert(G.playing_cards, copy_card)
                            G.hand:emplace(copy_card)
                            copy_card.states.visible = nil
                            copy_card:start_materialize()
                            new_cards[#new_cards + 1] = copy_card
                            return true
                        end
                    }))
                end
            end
        end
        SMODS.calculate_context({ playing_card_added = true, cards = { new_cards } })
        return {
            message = localize('k_copied_ex'),
            colour = G.C.CHIPS
        }
    end
    if context.destroy_card and context.cardarea == G.play and 
    (context.destroy_card.seal or context.destroy_card.edition or next(SMODS.get_enhancements(context.destroy_card))) then
        return {
            remove = true
        }
    end
end
keen totem
daring fern
unborn bay
#

consumeables is generally more of a Pool

keen totem
#

anyways, i need to make a random consumable

#

like