#đŸ’»ăƒ»modding-dev

1 messages · Page 317 of 1

crisp coral
#

that is not a character

midnight coyote
#

please

#

help me

wintry solar
#

There’s an easy fix for this that I can add later

midnight coyote
#

;-;

hearty mesa
#

bonk

zealous glen
midnight coyote
#

PLEASE

reef belfry
#

this DOES check if the consumable being used is not a planet right

midnight coyote
#

wait

zealous glen
#

Ability is a table isn’t it

midnight coyote
#

i don’t know

hasty mist
zealous glen
#

Then why did you check equality with something you don’t know

midnight coyote
#

because i’m making educated guesses

reef belfry
#

isnt that the dude from cryptid

shell timber
red flower
zealous glen
shell timber
#

i suppose

midnight coyote
#

ugh

#

what the fuck am i even doing

#

let me do some debug print statements

#

lets figure out whats in ability

zealous glen
#

SMODS provides a function to see if a card has an enhancement

red flower
midnight coyote
hearty mesa
#

bump

zealous glen
midnight coyote
#

hm alright

#

could i be englightened?

zealous glen
#

I think so. I think that it’s SMODS.current_mod.reset_game_globals

hearty mesa
#

I'll try that

red flower
midnight coyote
#

thanks

#

so that would be SMODS.has_enhancement(G.cards.highlighted[i],"m_astropulvis_cursed"

#

if im correct

hearty mesa
#

i am so stupid

zealous glen
unborn bay
#

hi n creator of joyousspring

zealous glen
midnight coyote
#

or g.hand

#

whatever

red flower
unborn bay
#

you should play joyousspring

red flower
#

you should play joyousspring

zealous glen
#

;P

hard needle
#

temu pareidolia

icy oak
#

thats

#

actually interesting

midnight coyote
#

i’m curious

crisp coral
# zealous glen

that character is not among us, nor a character from among us

hard needle
#

i'll see how it works with the plant

icy oak
#

imagine it just keeps flipping like misprint

#

thatd be funny

zealous glen
hard needle
unborn bay
#

this is scary

icy oak
#

face cards dont change it seems(?)

reef belfry
#

how would you stop a planet card from leveling up a hand

hard needle
#

like king, queen and jack are obviously face cards

#

although maybe i should've worded that a little bit better

icy oak
#

^

hushed field
hard needle
icy oak
#

maybe

#

i was thinking like "every card has a 1 in 2 chance of being a face card sounds like a funny idea"

#

J of diamonds doesnt proc photochad but 2 of spades does

unborn bay
#

spades numero uno

icy oak
#

how do i make the uh

#

joker noise

#

i guess the hanging chad/mime noise to be more specific

midnight coyote
rapid stag
#

what am i doing wrong?
the main_end goes into the first box instead of the last as intended, and i don't think i'm setting the colour right...?

red flower
rapid stag
#

ohhhh forgot about that cirDerp

#

what do i do about my sprite being in the wrong place?

red flower
faint yacht
#

...this looks about right or am I tripping?

rapid stag
red flower
#

it says end of main box

red flower
faint yacht
#

Right, then figured out the proper way for that.

rapid stag
# red flower it says end of main box

i figured 'main box' referred to the description as a whole. it wouldn't make sense for it to refer just to the first box given what i showed in prior screenshots and stated what i wanted, for something to be stated that was counter to what i was asking for

red flower
#

i agree
but also you can use generate_ui just for that bit probably

#

instead of the whole thing

rapid stag
red flower
#

i mean you would have to do it in a different way than what you were doing before
i couldnt tell you how because this feature was literally released yesterday and i havent looked too much into it yet

rapid stag
hushed field
red flower
rapid stag
red flower
#

did you add a colours table to loc_vars after using B:1

stark geode
#

hey does anyone know how to make a joker output a custom mr bones message without modifying the loc files

hushed field
red flower
rapid stag
#

oh it takes a colours table
...ok, so maybe i am not capable of reading the wiki page cirDerp

stark geode
red flower
#

hmm it might need to be a loc key let me check

thin anchor
#

is this correct for applying a shader to an edition?
(testing with vanilla shaders)

red flower
#

like "k_mod_saved"

heady glen
#

To answer your question, yes, it does say joker

#

Could you elaborate on this?

rapid stag
#

figured it out girldmSad

you need to append to an element in .multi_box and not to .main

willow plinth
heady glen
#

Gotcha

rapid stag
#

red car 🚗 cirPoint

willow plinth
#

here's a state diagram of balatro, in case anyone else needs it

#

btw: is it normal that SMODS_BOOSTER_OPENED overrides the other booster pack states?

#

just realized the diagram is garbage because handPlayed can also lead to drawToHand - will fix it when i'm sane again

hushed field
willow plinth
#

i can remind myself to do that once it's fixed yes :D

#

didn't even realize that thread existed, discord is so blobwaaaaa

lunar briar
#

is there any documentation about how to spawn a joker in? (similar to riff raff ig)

faint yacht
#

SMODS.add_card({ set = 'Joker' }) is the shortest way.

lunar briar
#

is that random?

red flower
lunar briar
#

❀ thanks

faint yacht
#

For SMODS.Back's calculate, how do I access the config of the deck, assuming calculate = function(self, back, context)? Don't want to modify the actual initial prototype object for this.

#

back.effect.config it was.

crisp coral
fossil ore
#

how can i make a joker with a use button

red flower
#

hook card:highlight

fossil ore
#

i see

heady glen
#

How's this?

willow plinth
heady glen
#

sweet! I'll get to the clock now rq

willow plinth
heady glen
#

I'm aware, I just thought your advice would make my card designs better actually

hearty mesa
#

is there a way to trigger effects from a tag without destroying it?

#

i'm trying to do a "decrease blind size by 25% for the next two blinds" sorta thing

willow plinth
heady siren
willow plinth
#

2 looks like only the bottom left is glowing

#

but in the other ones the bottom left color clashes with the similar background imo

lunar briar
#

is there also a list of like contexts? like if i wanted to do something at the begining of the round?

heady siren
#

I personally think the first one looks the best

#

First one uses text colors, second one uses the playing card colors, and the third one uses the suit mult joker colors directly

hearty mesa
willow plinth
heady siren
willow plinth
#

and if the colors of the center are "fixed" than maybe the background could change?

willow plinth
willow plinth
#

but i definitely like the concept all in all

hearty mesa
#

yw

willow plinth
heady siren
#

This is a joker that adds up to 4 temporary aces to your hand on first draw, one of each suit, that's the main concept I'm trying to convey

#

While editing it, I ended up with just the background while organizing variants, how does this look?

#

Honestly just the background looks kinda good

hushed field
hearty mesa
willow plinth
hushed field
hearty mesa
#

thx

heady glen
#

Solution: make the image double the size (the game has an option to trigger a high graphic resolution that you’ll need to create bigger jokers for regardless)

heady siren
#

In-game there's also a color filter though, so I might as well show it with that

willow plinth
heady siren
#

They're the colors from already existing jokers

#

And I wanna try to stay true to that

#

So I'd change the dark background rather than the ace colors

hushed field
# hearty mesa thx

sorry, i was giving wrong information. You're right, it is apply! This is some old code of mine of a tag that retriggers the first card of each suit, which only disappears if the hand's fully done or all suits have been triggered.

    config = {type = 'repetition_check', type_end = 'hand_played', retriggers = 1},
    set_ability = function(self, tag)
        tag.ability.suits = {}
    end,
    apply = function(self, tag, context)

        -- Check for right context.
        if context.type == tag.config.type then

            -- Check for suits already encountered
            local _is_viable = true
            for i = 1, #tag.ability.suits do
                if context.card.config.card.suit == tag.ability.suits[i] then
                    _is_viable = false
                    break
                end 
            end

            if _is_viable and 
            context.card.config.center ~= G.P_CENTERS.m_stone then
                tag.ability.suits[#tag.ability.suits + 1] = context.card.config.card.suit

                return {
                    card = context.card,
                    effect = nil,
                    repetitions = tag.config.retriggers,
                    message = localize('k_again_ex')
                }
            end
        end

        -- after hand is played, disappear
        if context.type == tag.config.type_end and context.after then
            tag:yep('+', G.C.GOLD,function() 
                return true
            end)
            tag.triggered = true
            return true
        end
    end,
    no_collection = true,
    in_pool = function()
        return false
    end,
    set_chocolate_bonus = function(self, chocolate_bonus)
        
        if chocolate_bonus then
            self.config.retriggers = self.config.retriggers + chocolate_bonus
        end

    end
}```
hearty mesa
#

ahhh, tysm

#

i assume this is because i'm not doing a card-specific effect, but nothing happens lol

heady siren
#

Which one looks the best?

brazen tusk
#

Last one imo

#

Just a lot cleaner

heady siren
#

Do you think it would look better with a full white outline, no outline, or how it is right now with the white lines in the center?

brazen tusk
#

I’d definitely try the full outline

hearty mesa
# hearty mesa (the burn one is the only one that has any code lol)

this is my code btw (i replaced the variable names for brevity)

SMODS.Tag {
    config = {type = "after"},
    apply = function(self, tag, context)
        if context.type == tag.ability.type then
            modify_blind((100 - [POTENCY]) / 100)
            [COUNT] = [COUNT] - 1
            if [COUNT] == 0 then [POTENCY] = 0 end
            tag:juice_up()
            return {}
        end
    end
subtle hawk
#

My non-coder ass is so confused right now, just now this thing was working in the game just fine but now it doesn't return the message and I don't think I even did anything???

willow plinth
heady siren
#

Full outline vs no outline

#

I'm honestly not sure between these two

#

No outlines looks real classy

willow plinth
shell timber
#

i like the no outline more

hearty mesa
#

also you probably shouldn't capitalise message, just convention tho

brazen tusk
shell timber
#

also that outline seems unusually thin?

subtle hawk
brazen tusk
#

I think no outline is looking better rn though

shell timber
#

what resolution is the art at?

brazen tusk
#

Oh true

subtle hawk
hearty mesa
#

strange xD

hearty mesa
heady siren
#

Here's with the 2 wide outline, and I filled the shapes because otherwise it looks terrible

#

I'm torn between this one and the no outline one

willow plinth
heady siren
#

The no outline one has a certain simplicity to it

willow plinth
#

yes but the outline one has contrast to it xD (maybe i'm just colorblind)

heady siren
#

I could change the background color

#

Full brightness outline

willow plinth
#

the edge looks jagged somehow but i like it a lot

wintry solar
stark geode
#

how would i remove somthing form a pool

heady siren
#

Also here's a slightly cursed joker [=

crisp coral
stark geode
#

like removing a voucher from the voucher pool

manic rune
orchid nest
#

trying to prevent jokers from being destroyed,
i tried injecting this and got this error:
engine/object.lua:35: attempt to call method 'init' (a nil value)

manic rune
orchid nest
#

i just started a couple days ago

#

so im unfamiliar with the best ways to look for jokers/optimize :p

manic rune
#

for _,joker in ipairs (G.jokers.cards) do

orchid nest
#

oh shit that's right

#

you use cards

#

😭

manic rune
#

no wait i got the order wrong

#

there

#

but also - ur probably better off checking for the joker's key instead

orchid nest
#

what's the difference between x in table vs _, x in ipairs(table) again?

orchid nest
#

im guessing i need my mod prefix too?

#

so
mod_prefix_jokerkey

manic rune
orchid nest
#

no clue

manic rune
orchid nest
#

i'll try it and take your word for it

lunar briar
#

how does one use a joker to destroy a joker (ig like madness?)

orchid nest
#

tyvm

manic rune
#

no probs

orchid nest
# lunar briar how does one use a joker to destroy a joker (ig like madness?)

here! the code for madness. i needed to find it myself :)

 if self.ability.name == 'Madness' and not context.blueprint and not context.blind.boss then
    self.ability.x_mult = self.ability.x_mult + self.ability.extra
    local destructable_jokers = {}
    for i = 1, #G.jokers.cards do
        if G.jokers.cards[i] ~= self and not G.jokers.cards[i].ability.eternal and not G.jokers.cards[i].getting_sliced then destructable_jokers[#destructable_jokers+1] = G.jokers.cards[i] end
    end
    local joker_to_destroy = #destructable_jokers > 0 and pseudorandom_element(destructable_jokers, pseudoseed('madness')) or nil

    if joker_to_destroy and not (context.blueprint_card or self).getting_sliced then 
        joker_to_destroy.getting_sliced = true
        G.E_MANAGER:add_event(Event({func = function()
            (context.blueprint_card or self):juice_up(0.8, 0.8)
            joker_to_destroy:start_dissolve({G.C.RED}, nil, 1.6)
        return true end }))
    end
    if not (context.blueprint_card or self).getting_sliced then
        card_eval_status_text((context.blueprint_card or self), 'extra', nil, nil, nil, {message = localize{type = 'variable', key = 'a_xmult', vars = {self.ability.x_mult}}})
    end
end
#

getting the game's source code is a really good way to figure out how to write jokers and understand how the game's code flows

lunar briar
#

yeah i have been looking through the smod docs but not looked much through the game code itself

orchid nest
#

that's because it uses a different format

heady siren
#

Went with the base game double outline effect, and added some very light shading, I think I've got a zinger here

orchid nest
#

looks nice!!

#

my friend made this joker sprite design and it looks super nice

heady siren
#

Very colorful

gentle rain
heady siren
# gentle rain

I think that's one of the coolest full size jokers I've seen before

orchid nest
#

so sick

brazen tusk
#

Looks great

orchid nest
orchid nest
red flower
brazen tusk
lunar briar
subtle hawk
orchid nest
lunar briar
#

lmao that bad?

orchid nest
#

i haven't messed with repentagon yet, but base is so ass.

#

the more i mess with balatro, which i only started a few days ago, the more i love the lovely injector over proper support atm

heady siren
willow plinth
orchid nest
#

j esus

heady siren
#

-# On this account alone, it's about double that across all of my old accounts

#

This game was my childhood and is now a large part of my adulthood

#

For better or for worse

lunar briar
#

i mean i played a fair bit of gmod but holy

willow plinth
#

i don't even understand garry's mod, always sounded like roblox for pre gen-zers to me but you have ten thousand and seven hundred hours on whaaat

formal parrot
#

@wintry solar hello mr eremel sorry for ping but i wanna ask

heady siren
#

Most Roblox games encourage you to engage with their systems and mechanics above all else, but Garry's Mod encourages you to engage with people above all else, if you boil it down Garry's Mod is more of a social game than anything

formal parrot
#

Or do i just stick with smods.joker

wintry solar
#

donmt use cryptids code as a reference

formal parrot
heady siren
#

Cryptid is broken from a balance standpoint and a code standpoint, but that's a given with how insane that mod is

wintry solar
#

a lot of it is written in a needlessly complicated way

heady siren
#

Still a very good mod, but held together with duct tape and popsicle sticks

formal parrot
#

Mhm

#

So i just stick to the smods

wintry solar
#

100%

heady siren
#

That's what has the most documentation and will be the most compatible with other mods

wintry solar
#

cryptid is fine to reference for specific effects, but generally I dont recommend it

formal parrot
heady siren
#

That and it won't break with updates as often as Cryptid references probably will

formal parrot
#

Like Tables

wintry solar
#

I would advise against it

#

jank ass mod

formal parrot
#

Against?

#

Wow

#

Why’s that

heady siren
#

It's jank but fun

#

There's a reason Cryptid breaks so many mods, and is best used by itself

wintry solar
#

the way it handles big numbers isn't compatible with other mods and it forces any other mods to specifically cater for it, I don't like that at all

formal parrot
#

Does ortalab not use talisman

wintry solar
#

no

formal parrot
#

Thanks for the advice

#

I’ll keep it in mind

wintry solar
#

I also don't find "big number go brrr" fun so there's that too

willow plinth
#

fwiw you can write mods to be compatible with and without talisman afaik

wintry solar
#

if you do want to make ridiculously large numbers feel free to use it

heady siren
formal parrot
wintry solar
#

forcing other mods to change how they do something as basic as comparing numbers is not good design

red flower
#

A library doesn't force other libraries to comply to it most of the time

heady siren
#

If it was built into Steamodded as the default it would be much better

wintry solar
#

no it wouldnt

#

it would still be a problemm

#

having to wrap every number comparison in tobig() is not a good standard

heady siren
#

I should clarify, built into Steamodded from the start

willow plinth
#

yeah it's not forcing anyone, also how else would you implement something like that?

heady siren
wintry solar
#

they should just do that on their own end

#

if they do I wouldn't have a problem with it

subtle hawk
#

Brrr how do I make it only trigger for one joker only and not all of the jokers to right my head is kinda melting

wintry solar
#

but in it's current state it's too aggressive in what it modifies for a library

heady siren
#

It's only a problem because mods aren't made to be compatible with it by default

formal parrot
#

Can i make my mod compatible with cryptid without talisman ?

heady siren
subtle hawk
heady siren
#

Then again I've been wrong about what Cryptid requires before, so take that with a grain of salt

red flower
midnight coyote
#

how do i clear an edition/enhancement/seal off of a card

heady siren
red flower
#

but they can just add that to talisman if it was possible

icy oak
red flower
# midnight coyote ?

:set_ability("c_base") for enhancements, :set_edition(nil) for edition, :set_seal(nil) for seals

#

im pretty sure, never did the last 2

midnight coyote
#

thanks

stark geode
#

Does anyone know the name of the card area for the vouchers in shop

zealous glen
#

Maybe shop_vouchers

red flower
#

G.shop_vouchers yeah

maiden phoenix
broken rivet
zealous glen
#

How do I access one or all of a playing card's suits?

broken rivet
zealous glen
#

I'm wondering if there's a more versatile method in SMODS to account for Smeared-like effects

broken rivet
#

:is_suit()?

zealous glen
#

But I'm not asking if it is a specific suit

broken rivet
#

ah

zealous glen
#

I just want all of them

maiden phoenix
#

SMODS has recently made an util function for smeared effect

broken rivet
#

i'm pretty sure you can just check if it's smeared

#

oh

maiden phoenix
#

Idk if it's what you want

zealous glen
maiden phoenix
#

It has smeared in it, just ctrl+shift+f it

red flower
#

SMODS.smeared_check

zealous glen
#

I know I could do what I want by iterating over the list of suits and checking each one with is_suit manually

red flower
#

?

zealous glen
#

I want to know if SMODS makes that easier because it sounds like it should

zealous glen
red flower
#

i dont think it does

broken rivet
#

i think the game has all of the suits stored somewhere

zealous glen
#

Do you know how to access the list of all Suits?

#

SMODS.Suits?

red flower
#

yeah that should be it

zealous glen
#

Should it have a callback or not?

midnight coyote
#

how do i do the flint thing

#

where jt plays the anim and sound

#

i wanna do it for my blind

#

is it like a event

zealous glen
#

What exactly

midnight coyote
#

more pressing issues

#

like how this doesnt work

#

why doesnt this work

zealous glen
midnight coyote
#

hm

#

why aren’t they defined?

zealous glen
#

are these chips and mult in the room with us right now

midnight coyote
#

this is after scoring so they should be there?

zealous glen
#

no

midnight coyote
#

or right before the end of scoring

zealous glen
#

the function doesn't receive them as an input

#

and they aren't global variables

midnight coyote
#

so how do i manipulate them?

zealous glen
#

so the function doesn't know what you're talking about

#

So either you use the vanilla, non-calculate method or you try to see if the context provides them, or if SMODS makes them accessible somewhere else

midnight coyote
#

okay

#

vanilla method

#

let’s do that

#

urgh

zealous glen
midnight coyote
#

hm

zealous glen
#

Ah you're doing it after scoring

#

Not on Flint's timing

midnight coyote
#

yeah the whole gimmick is that it takes a bite out of it right at the end

zealous glen
#

Try reading the wiki to see if SMODS provides what you want there

#

Otherwise you might need a hook or something

heady glen
#

Mobil 1, you put it in your engines

red flower
midnight coyote
#

it just doesn’t do what it’s supposed to do

red flower
#

what does it do

midnight coyote
#

nothing

red flower
#

did you test if it enters the if

#

the cardarea check might not be needed

midnight coyote
#

should i use a print to test this

red flower
#

always

midnight coyote
#

never reached

#

let me

#

omit the last bit

#

now it crashes

#

so the code is reached but i need to pull chips from somewhere

red flower
#

ok yes i think it's hand_chips

stark geode
#

i hate modding this game some times

midnight coyote
#

like in both parts of the equation for the return

red flower
#

chips = hand_chips * value

midnight coyote
#

mult stays the same?

red flower
#

yes

heady glen
#

bruh

red flower
#

<@&1133519078540185692>

midnight coyote
#

we got another on

#

alright it works but not as intended

#

i need it to subtract mult

#

not give it

#

or divide mult i mean

red flower
#

then do the opposite calculation

stark geode
#

😭 so may tabels

midnight coyote
#

so have it subtract x0.25 mult?

#

and chips

red flower
#

yeah

#

im pretty sure that should work

midnight coyote
#

can i just put a subtraction symbol on my parenthesis

red flower
#

idk where you mean

zealous glen
midnight coyote
#

let me just try it

red flower
zealous glen
red flower
#

i dont understand what the callback is for

zealous glen
midnight coyote
#

how do i do the flint animation where it juices up the chips and mult as it takes it away

#

and plays a sound

red flower
#

specially when table order is not guaranteed

zealous glen
#

so instead of going over the whole list it just breaks and exits early

#

I have the same issue with SMODS.find_card where sometimes I don't care how many cards there are, just that there is one

red flower
#

oh i feel like that's too specific of a case for a callback in that function and it also has the problem of order not being guaranteed

#

i dont think the performance matters that much

zealous glen
#

I guess I PR without the callback

midnight coyote
#

hey so if i wanted to temporarily remove the suit of the entire deck would i need to store the entire deck’s suits for the blind

zealous glen
#

you could hook SMODS.has_no_suit

midnight coyote
#

i don’t understand what hook means in this instance

#

apologies

#

OH MY GOD

#

<@&1133519078540185692> sorry

red flower
#

you dont know what hook means or you dont know what he's telling you to hook for?

midnight coyote
#

don’t know what hook means in this context

red flower
scarlet spire
#

its variables and tables all the way down

midnight coyote
#

okay

#

so hooking is when you like

#

intercept a function?

#

letting you alter the game without modifying source code

maiden wraith
#

quick question to yall, which one do you prefer to refer to jokers? (don't mind the actual joker, just the part at the bottom)

maiden wraith
midnight coyote
#

so you redefine a function

#

so how would this be relevant in the context of SMODS.has_no_suit

red flower
#

the idea is to hook it so it always return true when your blind is active

#

i think

midnight coyote
#

OH

#

I GET IT!

#

it just clicked

#

this is so cool ONG

#

OMG

burnt cairn
#

whats the format for making differently sized jokers like photograph?

zealous glen
#

one changes the size of the image the other the size you can hover over I think

burnt cairn
#

đŸ«Ą thanks

midnight coyote
#

what are the args for has_no_suit

#

i’m trying to hook but it’s crashing when i do it

zealous glen
#

is this illegal

zealous glen
midnight coyote
#

so this is bad

#

and this is good

red flower
red flower
midnight coyote
red flower
#

you should hook outside a function

midnight coyote
zealous glen
red flower
zealous glen
midnight coyote
#

well i’m temporarily overwriting the function, yes?

red flower
midnight coyote
#

hm

#

a hook calls the original function as well

#

right

red flower
#

yes

midnight coyote
#

so i would call the original function

#

so what do i do with the return value of that

#

so let’s say

#

this function has more than one return

#

which it probably does

#

i have no idea, i don’t see it in documentation

#

how would i control just the one that gets me to where i want

red flower
#
local smods_has_no_suit_ref = SMODS.has_no_suit
function SMODS.has_no_suit(card)
  if your blind is active then
     return true
  end
  return smods_has_no_suit_ref(card)
end

this is what you want to do

midnight coyote
#

i see

#

so i intercept only if it fills the condition

#

should i put this in like a

#

utilities.lua file

#

like make it into its own thing

red flower
#

if you want

midnight coyote
#

so now i need to check to see if the dip is active

#

can i make a second, optional parameter

#

to the hooked function

#

or is this bad practice

urban wasp
#

question: i am currently coding a joker that i wish to have this effect

Pigmentum Joker
When Blind selected, destroy Joker to the right and add its rarity value to n
Retrigger all Jokers n times
-# (Common/Uncommon = 0, Uncommon = 1, Rare = 2, etc)
(Currently 0 Retriggers)
Exotic Ascended Canvas

the code that i am using will be posted in a moment, but the main issue with it is that it simply isn't gaining any retriggers for some reason; any help is appreciated
also, a lot of the code to destroy stuff was borrowed from the dagger jokers from cryptid

#

also, no effect is done when destroying the joker to the right

#

sob

red flower
midnight coyote
burnt cairn
red flower
midnight coyote
#

alright

#

would it be prefix first

#

i’d assume so

#

but just checking

red flower
#

bl_modprefix_key i think

midnight coyote
#

okay

#

function hooked

#

now what do i do

#

just try it out?

red flower
#

yeah

midnight coyote
#

if the check is hooked then they should all be suitless i think

#

YEP!!

#

I CANT PLAY A FLUSH

#

OH MY GOD

#

THIS IS GREAT

lucid owl
#

why is my legendary consumable not being added into packs with this exact set? if i remove the line it appears just fine in spectral packs but not the card's base set (that being "Silly")

gusty iron
#

is there anyway to make your own deck using smods?

midnight coyote
gusty iron
#

thanks

regal ether
#

ugh..,. im trying to make a challenge that starts you out with the custom stuff im making so i dont have to keep rerolling searching for my one joker and it's giving me Attempt to index local center (nil)
1: joker code
2: challenge code

midnight coyote
#

just use this

#

3 to spawn joker

#

2 to discover it

#

in the collection

regal ether
#

i was aware there was likely a tool to just give you stuff but this is also teaching me how to make challenges that dont crash lol

#

ty though

burnt cairn
#

trying to make make a differently sized joker like photograph. i have no idea where on the wiki i should be looking can i get a hand

#

i dunno if its just me but i canNOT navigate the wiki like at all

regal ether
#

what seems to be the problem

regal ether
#

okay yeah i forgor

limber blaze
#

is it possible to hide a consumabletype from the collection

high sinew
#

one of my jokers systems is a leviling thing so i basically remove the previous joker its on and add new one is this the best way to remove it? my first two jokers of system worked but crashed on a later on having same code

red flower
limber blaze
#

ive done some patches for now anyway

hushed field
#

Individual object rarity for jokers and consumables wasn't something someone was already making an smods feature, right?

wild escarp
#

Trying to make played 6s get permanent +2 mult, someone tell me how dumb I am.

    loc_vars = function(self, info_queue, card)
        return { vars = { card.ability.extra.perma_mult, card.ability.extra_mult}}
    end,

    calculate = function(self, card, context)
      if context.cardarea == G.play  and card:get_id() == 6 then
        context.card.ability.perma_mult = context.other_card.ability.perma_mult + context.card.ability.extra_mult
        return{
          extra = { message = localized('upgrade'), colour = G.C.Mult},
          card = card
        }
      end


    end```
zealous glen
#

@red flower @hushed field do either of you check wht are a card's suits

zealous glen
#

@hushed field this but like a version of it that works

carmine burrow
#

how can i make info queue boxes actually have the variables filled in?

hushed field
#

I haven't accounted for modded suits, but my set up for that is just iterating over SMODS.Suits as pairs, and passing the key to the is_suit function

zealous glen
carmine burrow
hushed field
#

In this case, you're trying to set up a function that adds the card's suit to a list of found suits, right?

crystal perch
#

game crashing when trying to index 'other_card' (a nil value)

#

not sure why as this is pretty much the same implementation as something like baron and shoot the moon

hushed field
#

If you're basing this on source code, the structure of it may obfuscation that does checks happen inside of another context!

crystal perch
#

should i move the context.other_card to within the cardarea == g.hand context

hushed field
#

(context.individual for both of those)

hushed field
hushed field
zealous glen
crystal perch
#

so then how would i fix this

#

oh i fixed it actually by just puttin everything under an if context.individual

quick kraken
#

Quick question about seals, specifically their appearance

crystal perch
#

what's up

quick kraken
#

Is it fixed to be necessarily in the seal position and shape, or can it be any texture theoretically?

#

If so, can it also be a texture that visually removes part of a card?

crystal perch
#

uhhh

#

so here's the atlas where seals are stored

#

as you can see their position is determined entirely by the texture

#

so as long as it's within the bounds of the card area it can be whatever and wherever you want

quick kraken
#

The big question is if it can be a texture that removes part of a card instead of adds on top

crystal perch
#

as for a texture that removes part of a card i'm not sure, you'd have to replace the card base much like the enhancement textures

quick kraken
#

Like a hole in the place of a seal

crystal perch
#

yes and no

#

it would have to be an enhancement

#

to my knowledge

quick kraken
#

Issue is that the idea makes sense if it specifically is a seal, not an enhancement

crystal perch
#

there may or may not be a colour code in balatro that it recognizes as empty space or true 0 alpha on render

#

but i am not aware of its existence if there is one

quick kraken
#

I'm gonna try asking somewhere else too, thanks for the input

zealous glen
crystal perch
#

much like how gold seal has its own shader

high sinew
crystal perch
#

a shader which would just render as transparent

high sinew
#

And having transparency

quick kraken
#

In any case, where does one find how shaders work?

zealous glen
#

The Book of Shaders maybe

crystal perch
#

message = localize { type = 'variable', key = 'a_xmult', vars = { card.ability.extra.Xmult } },

#

whoops

#

linked the working with shaders part

unborn bay
#

book of shaders, shadertoy, etc.

wild escarp
#

Does anyone have experience with adding permanent mult to cards?

crystal perch
#

use the Runner 2 as reference (starting at line 88)

#

it adds perm chips but it's the same for mult

wild escarp
#

Runner adds chips to itself, I'm talking about adding it to playing cards.

#

Which would be like hiker.

crystal perch
#

oh then just copy the runner code

wild escarp
#

What do you mean? Runner doesn't relate at all to what I want.

crystal perch
#

sorry i meant hiker

#

though i think perma_bonus is only for chips,,

wild escarp
#

Yeah, perma_mult for mult, that I learned already.

crystal perch
#

oh just use that then

wild escarp
#

What's the self.ability.extra? I'm not familiar with that.

crystal perch
#

you set that in the card's ability config

#

just have this in your joker's smods definition

config = {
        extra = {
            perm_mult = 1
        }
    },
#

and then use

card.ability.extra.perm_mult
wild escarp
#

Oh, got it.

high sinew
#

I think it mainly is how you structure the calc function tho

crystal perch
#

you can name your extra abilities whatever you want and as long as you call it properly it'll work

high sinew
#

Yea that def sound right

#

I just usually call it what it’s doing lol

crystal perch
#

yeah that's why i called it perm_mult because it's for adding perm_mult to playing cards

#

not to the joker

high sinew
#

Since my joker gained mult on certain hands scored why I did it XD

#

that’s smart

#

I might take that idea if I do for cards đŸ„č

marsh radish
#

awesome

cobalt vector
#

how do I stop this from giving my Joker X0.5 mult multiple times when a Boss Blind ends, instead of just once?

        if context.end_of_round and G.GAME.blind.boss and not context.blueprint then
            card.ability.extra.Xmult = card.ability.extra.Xmult + card.ability.extra.Xmult_mod,
            card_eval_status_text(card, "extra", nil, nil, nil, {
                message = localize({ type = "variable", key = "a_xmult", vars = { card.ability.extra.Xmult } }),
                colour = G.C.MULT
            })
        end
high sinew
crystal perch
#

you could have a config value that increments on boss blind end, and if it's < 1 set the xmult

#

then on round start you set it to 0

midnight coyote
#

when does recalc_debuff go off

gilded narwhal
#

Okay guys if I say a jokers xmult is doubled, and I have something like X1.5 should that turn into X3 or X2

high sinew
#

3 if you are physically doubting in calc function

gilded narwhal
#

The X3 is literally just 1.5 × 2, but the 2 is 1 + (0.5 × 2)

high sinew
#

Depends on how ur scaling it

gilded narwhal
#

I just mean like for balancing

high sinew
#

That should give u 3

#

Yea that is more linear than doubling so you’re not exponentially doing it from glance

#

Keep your equation linear you’ll be good

midnight coyote
cobalt vector
# crystal perch you could have a config value that increments on boss blind end, and if it's < 1...

Would it be something like this?

  calculate = function(self, card, context)
      if context.joker_main then
    return{
        message = localize({ type = "variable", key = "a_xmult", vars = { card.ability.extra.Xmult } }),
        Xmult_mod = card.ability.extra.Xmult,
    }
end
if context.end_of_round and G.GAME.blind.boss and card.ability.extra.dewit < 1 and not context.blueprint then
    card.ability.extra.Xmult = card.ability.extra.Xmult + card.ability.extra.Xmult_mod,
    card.ability.extra.dewit = card.ability.extra.dewit + 1,
    card_eval_status_text(card, "extra", nil, nil, nil, {
        message = localize({ type = "variable", key = "a_xmult", vars = { card.ability.extra.Xmult } }),
        colour = G.C.MULT,
    })
end
if context.setting_blind and card.ability.extra.dewit == 1 then
    card.ability.extra.dewit = 0
end
  end,
crystal perch
#

instead of incremembing it by 1 just set card.ability.extra.dewit to 1

#

because you're looking for if it is == 1

cobalt vector
#

I use = to assign a value, and == to see if it is that value, right?

crystal perch
#

yeah

cobalt vector
#

That would be

            card.ability.extra.dewit = 1,
crystal perch
#

send a screenshot

#

of the whole calc function

cobalt vector
crystal perch
#

you don't need to comma that line

#

example

cobalt vector
#

Looks like it works :D

#

Thanks!

crystal perch
hollow birch
#

i'm trying to add a custom enhancement and a tarot that creates it, but I'm struggling to figure out what to put as the first argument for set_ability. this is from the blue_seal example but instead of set_seal i'm doing set_ability.

#

any advice?

#

i guess i just don't know what to put for the key, cause currently i have m_credit and it doesnt work

wintry solar
#

The key you define will have m_modprefix_ added to it

hollow birch
#

got it, thanks

midnight coyote
#

is there a way to put cards back in the deck without discarding them

wild escarp
#

What would I do for copying the rightmost card?

#

There's gotta be a million people that have made reverse brainstorm, right?

placid star
#

is there a G.GAME thingy to check what the current antes base chip score is?

midnight coyote
#

go look at utility functions

placid star
hollow birch
#

does card.base.nominal factor in other modifications to chip value? i assume not, and if it doesn't then how would i get the chip value after all other calculations?

hollow birch
#

ye

daring fern
regal ether
#

pretty sure this game has dementia rn

#

it thinks self.ability is nil for the joker

shut crater
#

card.ability

sturdy compass
#

in an SMODS joker object, you should never be using self

hollow birch
#

what would be the best way to give a temporary modifier to a card's chips? like for only a round

daring fern
hollow birch
#

ye thats what i am doing currently, just was wondering if there was a better way

regal ether
# regal ether

also cant read chip_mod or Xmult_mod, hence the definitions

sturdy compass
#

What are chip_mod and Xmult_mod supposed to be ?

native zinc
#

_mod just adds the values without displaying a message

regal ether
rapid stag
#

ok, has anyone here drawn a star? like a 5-pointed star. really small. smallest possible scale. like i'm struggling trying to work this out and i end up drawing a house girldmSad

#

i also remember seeing one in a sprite somewhere but i can't for the life of me remember where

daring fern
#

How could one make blue seals on jokers retriggerable?

rapid stag
#

blue + red seal, call that a purple se- wait

scarlet spire
#

or maybe this, if you're desperate for it to be as tiny as possible

rapid stag
scarlet spire
#

bigger than this but smaller than a large star is actually harder I think

#

it's this specific size where the angles are hard to make work

rapid stag
#

i know for fact that i've seen something around the range of a 7x7 star before cirBlech

placid star
#

does anyone have an example of how to find the next items in a shop queue?

rapid stag
#

figured it out

sturdy compass
placid star
sturdy compass
#

no

rapid stag
#

i remember someone making a joker that predicted what would appear in booster packs
are the cards in booster packs determined when the pack is opened? cirThink

daring fern
placid star
#

fuuuuuuuuckkkk

scarlet spire
sturdy compass
#

I guess that's possible but it seems like a lot of work to get working lol

rapid stag
#

yeah, i would try seeking out whoever made that joker that predicts the content of booster packs as iirc it does something like that, they might have some insight for you as to how to do that

regal ether
#

okay i got my thing working

#

(finally)

placid star
sturdy compass
#

That is very doable

#

boosters are also classified as "cards" so you could use the open_booster context and take the costs of it from there

placid star
#

omd im looking on the smods wiki anbd i cant find how to find the cost of a booster

sturdy compass
#

So context.open_booster returns with these values

#

the card value returned (being context.card) is the booster object

#

so you could do context.card.cost to get the cost easy peasy

placid star
#

ahh okayyy

lucid owl
#

how could i only get the tag's info_queue popup? i would rather not also have the descriptions of the packs themselves

daring fern
rustic swallow
#

why does this not work

red flower
#

also you might want to be more clear about what's not working and what your effect is in the future

rustic swallow
#

its like ceremonial dagger but goes both ways

#

and destroying the jokers doesnt work

red flower
#

yeah replace self with card inside the function

rustic swallow
#

do i also replace the "if G.jokeers.cards[i] = self?

#

with card

#

it worked thanks

#

if you could also help with this one, why does this not make the cards be triggered even when i made it a 100% chance

daring fern
rustic swallow
#

did that but it still doesnt do anything

daring fern
rustic swallow
red flower
#

also the return is wrong

rustic swallow
#

so i remove the context.individual

#

and what do i do for the return

red flower
#

just do return { remove = true }

#

add the message if you want

regal ether
#

is there a way to check if a skipped booster was mega in a joker's calculate

#

or even just to check the pack's id

#

that's actually easier probably

rustic swallow
regal ether
#

makin a joker that upgrades whenever a mega pack is skipped...

red flower
regal ether
#

YIPPEE

red flower
#

took me a bit because it's not documented lol

wild escarp
#

Someone here has to know how to mod reverse brainstorm, right?

red flower
#

like brainstorm that copies the right card?

wild escarp
#

Yes

red flower
#

you need to return ret i think too

#

but maybe not

violet oasis
#

Is there something like G.GAME.blind.boss that is set only when you win a stake (during the VICTORY screen)? I'm trying to add a music using SMODS.Sound that plays only during that screen, but I'm not having success with G.GAME.won for example

gentle rain
#

is there any doccumentation for the different colors

rustic swallow
gentle rain
#

ooo didnt catch that

#

tyty

rustic swallow
#

np

urban wasp
#

what's the prefix for a tag? i tried t, but it didn't seem to work
on another note, what's the hex value of the common rarity?

wild escarp
red flower
urban wasp
#

oh, okay

#

do you know the answer to the second question?

regal ether
urban wasp
#

thank you

red flower
rapid stag
#

question, does the game stack overflow if i add an object's own center to its info_queue

red flower
#

yes

rapid stag
#

why can't it just recurse a maximum amount of times

red flower
#

you need to check if not card.fake_card

rapid stag
#

what is card.fake_card cirThink

red flower
#

smods creates a fake card when it adds a tooltip

#

so if you check that the tooltip is not making it's own tooltip

rapid stag
#

what if i want to let it make its own tooltip, but only so many times cirThink

red flower
#

idk

#

add it manually

tepid crow
#

you might be able to check the current tooltip count?

red flower
#

just add the center to info_queue as many times as you want the tooltips

tepid crow
#

that'd also work yeah

rapid stag
#

truuue. i could do something like

for i = 1, [however many i want] do
  if not card.fake_card then
    info_queue[#info_queue + 1] = [card center]
  end
end
red flower
#

yeah

violet oasis
# red flower G.STATE == G.STATES.ROUND_EVAL?

Doesn't work, unfortunately. Unless I'm doing something wrong: SMODS.Sound({ vol = 0.6, pitch = 0.7, key = "music_win_theme", path = "win_theme.ogg", select_music_track = function() return (G.STATE == G.STATES.ROUND_EVAL) and 0 or false end, })

tepid crow
#

don't you need higher priority than 0 for music?

#

(I have no idea, I just automatically assumed that for when I added my music)

violet oasis
#

I think so, but I'm also adding the same condition to stop the current music that is also at 0 priority

tepid crow
#

why not just put it to 1 regardless?

violet oasis
#

Since it's neither stopping the previous track or starting the new one, I assume it's not working

violet oasis
#

yeah, same thing

#

worth a shot tho

#

For reference, the current track that is playing is this one: SMODS.Sound({ vol = 0.6, pitch = 0.7, key = "music_ncorp_normal", path = "NCorpNormal.ogg", select_music_track = function() return (G.GAME.selected_back.name == 'Erratic Deck' and G.GAME.blind and not G.shop) and 0 or false end, sync = { pmost_music_shop_default = true, } })

tepid crow
#

are you sure that's the correct state?

rigid hare
#

does anyone know what functions/misc_functions.lua:818 refers to? trying to help diagnose a crash

tepid crow
#

depends entirely on their lovely patches; ask for their mods/lovely/dump/functions/misc_functions.lua

red flower
tepid crow
#

tbf that's a debugplus win, so it might be in a different state than expected

violet oasis
rigid hare
violet oasis
#

thank you, I'll see if it helps

tepid crow
#

balatro no have debug console

#

winning properly does indeed give the proper state (though this state also gets hit constantly when winning other rounds lol)

violet oasis
#

Actually G.STATE == G.STATES.ROUND_EVAL works, it's just that the "Win this Run" button didn't really trigger it. I'd just had to win a round for real

#

It's for every round win, but it's a start

#

Thanks you two!

tepid crow
#

(though this funnily enough also doesn't seem to work with the debug "win this run" button)

#

Oh because win_game doesn't set that variable, and thunk normally manually sets it when calling that function

win_game()
G.GAME.won = true
steady smelt
#

logical

#

actually unironically probably smart

tepid crow
#

is it? must be above my paygrade then

#

cuz I can't think of a reason why you wouldn't want win_game to set it

violet oasis
#

Thanks a lot 🙏

steady smelt
#

he probably just calls win_game() and there's something to check if the game has actually been won regarding mr bones

#

i'd have to check tho

tepid crow
#

I don't think so

steady smelt
#

or specifically for the debug mode win button

tepid crow
#

he only calls win_game when not game_over haha

steady smelt
#

i mean he aint wrong

tepid crow
steady smelt
#

debugplus just adds the default balatro debug menu plus some keybinds tho no?

#

so if it's like that in base game not sure why they'd change it

tepid crow
#

it adds a lot of buttons etc in the debug menu too

steady smelt
#

if they added the win game button and feature then yeah they should fix it but i think that's in the normal debug menu

tepid crow
#

including the amazing "win blind" button which is SOMEHOW not in the default debug menu

steady smelt
#

oh rlly

#

nvm then

tepid crow
#

I mean "win game" button is by Thunk but

random sphinx
#

texture and mod id are still WIP because i'm mostly just fucking around but does this seem balanced?

regal ether
#

ooo interesting idea

tepid crow
#

does purchasing booster packs count?

random sphinx
#

not as it's currently implemented, but it could

tepid crow
#

I mean that makes a big difference

random sphinx
#

i guess so since anything chip-based is more of an early-game joker than anything

regal ether
#

texture and mod id are still WIP because i'm mostly just fucking around but does this seem balanced? (genuinely lol)

#

oh wait shit it needs to start at X1

#

hold on i know exactly what to do for this

random sphinx
#

is it possible to get the purchase price of a booster pack?

regal ether
red flower
#

yes booster.cost

random sphinx
regal ether
#

(for now the event is skipping a booster)

rigid hare
#

does anyone know what functions/misc_functions.lua:818 refers to? trying to help diagnose a crash that's being real nasty.

steady smelt
#

does the secret criteria change per run or is it random from a pool ooor

regal ether
tepid crow
steady smelt
#

because what the criteria is and can be definitely changes if it's balanced

rigid hare
#

ah, must of not seen that sorry

regal ether
steady smelt
#

i think gaining x0.5 might be more balanced depending what the secrets are

regal ether
#

i think skipping a mega booster or something like that is a good idea

steady smelt
#

because it could be like canio or hit the road or hologram

#

i think some hard ones some easy ones, rlly just probably add all the base game things that trigger gaining x mult then go from there

regal ether
#

mmm

steady smelt
#

but lower yorick's down a bit and other balance stuff like that

#

changing per run is rlly interesting tho

#

if it doesn't it might as well just be a joker that gains x0.5 mult when you skip a booster or w/e which is usually worth taking no matter what

#

early enough at least

regal ether
#

In science, computing, and engineering, a black box is a system which can be viewed in terms of its inputs and outputs (or transfer characteristics), without any knowledge of its internal workings. Its implementation is "opaque" (black). The term can be used to refer to many inner workings, such as those of a transistor, an engine, an algorithm,...

#

perhaps a more accurate implementation would be to hide the fact that it does xmult and xchips but

#

this has nothing to do with the trigger changing it's just a fun fact

steady smelt
#

mhm it's definitely a cool concept

#

but i think the trigger being hidden doesn't matter if it doesn't change

regal ether
#

right

steady smelt
#

also dumb question is that orange colour you used for x0.5 built in?

regal ether
#

yup!

steady smelt
#

i don't recognise it from any text colours

#

unless it's just attention

regal ether
#

it's attention

steady smelt
#

ah okok

regal ether
#

yeah lol

#

it's X:attention

steady smelt
#

could add a unique one if you wanted to

#

purple probably

regal ether
#

shrug

steady smelt
#

like plasma colour

#

the orange is nice though

regal ether
#

oooo i like that plasma idea

steady smelt
#

yeag like the lavender

regal ether
#

is rare an apt rarity for this one

steady smelt
#

actually i think that's built in somewhere lemme check

#

rare seems fine yeah esp for x0.5

regal ether
#

i would think since it's xmult AND xchips ngl it could fit well if balala already had something between rare and legend

#

seeing as none of the vanilla jokers actually do xchips iirc

steady smelt
#

correct

#

xchips is modded only for now

random sphinx
#

i think i've improved the texture a bit: i made the background and the text on the nameplate a bit lighter while leaving the joker itself the same

#

(dunno if this is the right place for texture discussion?)

steady smelt
regal ether
#

pretty cool joker ngl

steady smelt
#

oh yeah interesting concept

unborn bay
#

going insane

steady smelt
#

i'd expect silver to be shinier myself tbh

regal ether
#

exponential chips 😹

#

i love the xx_rainbow_xx though lol

#

is that a seal? ed? enhance?

random sphinx
lucid owl
steady smelt
peak obsidian
#

how would i make a consumable add perma-bonuses to selected cards

steady smelt
random sphinx
#

someone significantly more skilled than me could but i can't

#

i'm used to texturing for minecraft mods and i'm 100% not cut out for this

steady smelt
random sphinx
#

doing it anyway though because it's funny

steady smelt
steady smelt
#

oh i hate it

lucid owl
#

i fixed it to just show the tag descriptions luckily

steady smelt
#

i think it's funnier if they stack but fair

lucid owl
#

the wall of info boxes was very funny at first and quickly got horrifying

steady smelt
#

it tends to organise them in really dumb ways when you start stacking them

lucid owl
#

yeah it's weird

steady smelt
#

like they spiral inwards or smth

lucid owl
#

pretty funny though

unborn bay
#

yes it lists every edition available

steady smelt
#

me when absurd modlist

lucid owl
#

so does it just get bigger as you add more mods

#

that's amazing

steady smelt
#

i just registered that that's monopoly

unborn bay
#

yes

regal ether
#

well shit i just tried renaming everything in my code and it infexes field INIT (a nil value)

#

i think im done with this for tonight,..,

steady smelt
#

i just made the greatest thing ever

#

it's an aseprite script that applies the negative colour filter to your sprite when run

#

since it's not just inverted colours

#

and i'm about 80% sure it actually works

#

it looks right at least

regal ether
#

i replaced all instances of ivylatro with the new mod name, like all of them

#

renamed the mod folder also even though that's probably not essential

steady smelt
#

did you change your main_file in mod.json?

#

or prefix

regal ether
#

yeah

#

both actually

steady smelt
#

id probably def you did

#

not sure what else it could be without digging

#

why do all the other vouchers look so cool negative

#

esp clearance/liquidation

regal ether
#

like idk this seems like everything

#

ignore placeholders lol

steady smelt
#

i don't even have an init function

regal ether
#

thats fair

#

i doubt i need anything it uses rn ngl

#

not using that atlas, nor localization stuff

tepid crow
#

don't use SMODS.INIT anymore

steady smelt
#

i literally looked at smods docs for the first time yesterday i've just been using balatro as code ref

woeful tusk
#

How can I check if a run has already been won?

regal ether
#

YIPPEE i will do the texture in the morning

woeful tusk
#

damn that easy, thanks