#💻・modding-dev

1 messages · Page 420 of 1

subtle merlin
#

G.GAME.dillards

hollow snow
#

G.GAME.dilleridoos

hybrid shadow
#

G.GAME.quid

sonic cedar
subtle merlin
hybrid shadow
sonic cedar
#

game.......squid........

hollow snow
#

thats it making joker that gives you 486 dollars on death (counts on mr bones)

pulsar furnace
#

How do I change the store's odds?

sonic cedar
#

the store's what

hollow snow
#

like making the store give you all rares? i think thats like something you should do on the game.probabilities thing

pulsar furnace
sonic cedar
#

i have no idea actually
can you even do that

hollow sphinx
#

getting this crash when trying to play a hand

daring fern
hollow sphinx
#

works perfectly thanks

brittle tide
#

I'm making a Joker that will give Xmult whenever a stone card triggers and has a 1/5 chance of destroying any triggered stone card improving the amount of Xmult gained for each triggered stone card but I can't make the Joker destroy any stone cards. This code feels like it should work so I'm wondering if there's a problem I'm missing?

subtle merlin
#

none of my other jokers trigger either so i can't skip this one and come back to it later bc it's an overarching issue 🫠

frigid cargo
#
    config = { extra = {xmult = 0.5, min = 0.5, max = 2}},

    loc_vars = function(self, info_queue, center)
        return { vars = {center.ability.extra.xmult, center.ability.extra.min, center.ability.extra.max}  }
    end,

    calculate = function(self, card, context)
    card.ability.extra.xmult = card.ability.extra.xmult
    if context.joker_main then
        return {
            xmult = card.ability.extra.xmult
        }
    end
    if context.setting_blind then
            xmult = pseudorandom('Craig', card.ability.extra.min, card.ability.extra.max)
        end
end,
}

I dont think i did psuedorandom correct, all i need it to do is change x mult between 0.5 and 2 at the start of each round

sonic cedar
hallow slate
#

Okay so the info queue only shows the title, no description

gentle rain
#

where in the localization file would i store the text for a custom consumable

hallow slate
#

I have a title and text

frigid cargo
#

thanks

red flower
sonic cedar
hollow snow
gentle rain
#

so it'd be like
descriptions = {
joey_Loot = {
joey_lootcardname = {

#

?

red flower
#

the last one should start with c_

gentle rain
#

i see

sonic cedar
#

c since it's a consumable

hybrid shadow
#

how would i have a joker give its effect when its added to the joker area and remove it when its removed from the joker area

sonic cedar
#

add_to_deck and remove_from_deck?

hollow snow
sonic cedar
#

yes

hybrid shadow
sonic cedar
tardy juniper
#

how can one use a joker to set money to 0?
would ease_dollars(-G.GAME.dollars, true) work, like wraith does?

brittle tide
daring fern
#

Is there a way to set an object types default area?

hollow snow
brittle tide
#

ohh

red flower
sonic cedar
#

it did not

hybrid shadow
#

is black hole just c_black_hole?

daring fern
daring fern
sonic cedar
hallow slate
#

There's no description, just a title

daring fern
sonic cedar
#

if context.other_card.lucky_trigger and not context.blueprint then

daring fern
coarse plank
#

how would I implement this? I can't find an example of destroying consumbles

sonic cedar
frigid cargo
# sonic cedar you gotta `return` the xmult change iirc
    config = { extra = {xmult = 0.5, min = 0.5, max = 2}},

    loc_vars = function(self, info_queue, center)
        return { vars = {center.ability.extra.xmult, center.ability.extra.min, center.ability.extra.max}  }
    end,

    calculate = function(self, card, context)
    card.ability.extra.xmult = card.ability.extra.xmult
    if context.joker_main then
        return {
            xmult = card.ability.extra.xmult
        }
    end
    if context.setting_blind then
        return {
            xmult = pseudorandom('Craig', card.ability.extra.min, card.ability.extra.max)
        }
        end
end,
}

i tried returning the xmult change but it just crashes and tells me about mult

daring fern
hallow slate
#

Yeah it's the same as playing cards and jokers

coarse plank
#

thank you.

#

what about this?

wind steppe
#

How would I check specifically in hooks of remove_from_deck and add_to_deck if the card is being removed or added to G.jokers?

sonic cedar
hybrid shadow
#

is this written right

daring fern
frigid cargo
sonic cedar
#

ahhh ok

#

let me look again

wise turtle
#

how do you actually remove the ability for a card to work on with blueprint

wind steppe
gentle rain
#

would these be hex colors or something like C:mult

wind steppe
hollow snow
wise turtle
#

nah for my custom ones

hollow snow
#

yeah just not context.blueprint on your calculate

wise turtle
#

👍

hollow snow
#

that will make it so blueprint doesn't copy that behaviour

frigid cargo
sonic cedar
subtle merlin
#

sigh It still isn't triggering, what's wrong this time?

daring fern
sonic cedar
# frigid cargo

isnt this the talisman compat thing or am i thinking of something else

sonic cedar
hollow snow
gentle rain
frigid cargo
daring fern
daring fern
sonic cedar
#

or should i check for context.indi-knew it

#

cool thanks

sonic cedar
sonic cedar
frigid cargo
hollow snow
#

so is a context.value a boolean that is either true or false? or is it a table and it check if it exists or not and may hold information inside it?

daring fern
frigid cargo
hallow slate
#

The info queue not showing the description is driving me nutsss

sonic cedar
#

then yeah it's the mult thing i mentioned earlier/what somecom mentioned now

daring fern
#

mult doesn't exist outside of scoring.

frigid cargo
#

so how would i set the xmult when the round starts

sonic cedar
#

separate variable probably

hallow slate
#

context.before?

daring fern
hallow slate
#

Oh

frigid cargo
sonic cedar
hallow slate
#
            set = "Chinese Food",
            key = str,
            vars = { card.ability.extra.effects[card.ability.immutable.mode] }
        }```
hybrid shadow
#

is soul_rate only not nil when booster packs are opened?

hallow slate
#
        local str = "null"
        if
            card.ability.immutable.mode > 0
            and card.ability.immutable.mode < 8
        then
             str = "effect"..tostring(card.ability.immutable.mode)
        end

        info_queue[#info_queue + 1] = {
            set = "Chinese Food",
            key = str,
            vars = { card.ability.extra.effects[card.ability.immutable.mode] }
        }

        return {
            vars = {
                number_format(card.ability.extra.rounds_remaining),
                number_format(card.ability.extra.effects[card.ability.immutable.mode])
            }
        }
    end,```
hybrid shadow
wind steppe
#

why does my game crash at the first if of both hooks?

local para_extra_slots = function(self)
    return self.ability.para_negativesticker or self.config.center_key == "j_para_cooledwater"
end
local para_card_removal_old = Card.remove_from_deck
local para_card_addition_old = Card.add_to_deck
Card.remove_from_deck = function(self, card, from_debuff)
     if para_extra_slots(self) and card.area == G.jokers then
         G.jokers.config.card_limit = G.jokers.config.card_limit - 1
    end
    return para_card_removal_old(self, card, from_debuff)
end
Card.add_to_deck = function(self, card, from_debuff)
     if para_extra_slots(self) and card.area == G.jokers then
         G.jokers.config.card_limit = G.jokers.config.card_limit + 1
    end
    return para_card_addition_old(self, card, from_debuff)
end
hollow snow
red flower
#

context.destroy_card is the card to destroy
context.hand_drawn is the cards drawn

hybrid shadow
#

is the rate of soul and black hole hardcoded

red flower
red flower
hybrid shadow
#

damn

red flower
#

yeah it is, in create_card

hybrid shadow
#

alr i gotta rework some jokers then

granite nymph
#

okay umm somthing went wrong here

wind steppe
dusk night
#

I don't understand the # notation used by talisman. For example, in e689#43 I think it's some kind of knuth up-arrow notation thing, so it means like e689 * 10 ^(43) 10 where ^(n) is n up-arrows. is that right?

wind steppe
#

i think at least

dusk night
#

that makes more sense

#

the source was unclear, but they talked a bunch about knuth arrows

frigid cargo
#
config = { extra = {xmult = 0.5, min = 0.5, max = 2}},

    loc_vars = function(self, info_queue, center)
        return { vars = {center.ability.extra.xmult, center.ability.extra.min, center.ability.extra.max}  }
    end,

    calculate = function(self, card, context)
    tempxmult = 0
    if context.setting_blind then
            tempxmult = pseudorandom(card.ability.extra.min, card.ability.extra.max)
            card.ability.extra.xmult = tempxmult
        end
    if context.joker_main then
    card.ability.extra.xmult = tempxmult
        return {
            xmult = card.ability.extra.xmult
        }
    end
end,
}
#

im tryna change the xmult every round start but its just always at 0

daring fern
#

How does one show UI like poker hands?

modern kindle
#

You mean like the examples? Or clicking the button to open the ui

gentle rain
#

teehee

daring fern
modern kindle
chrome widget
#

Ough what huh

modern kindle
#

Hi bestie

chrome widget
#

I've been dragged from the depths hello

modern kindle
#

Want to take a gander at somethings query

chrome widget
#

Unfortunately I'm eepy in bed and have to get up to make dinner so likely not able to

modern kindle
#

This is okay be sure to give me a plate and all is well smiley face

wind steppe
#
local para_extra_slots = function(self)
    return self.ability.para_negativesticker or self.config.center_key == "j_para_cooledwater"
end
local para_card_removal_old = Card.remove_from_deck
local para_card_addition_old = Card.add_to_deck
Card.remove_from_deck = function(self, card, from_debuff)
     if para_extra_slots(self) and card.area == G.jokers then -- Crashes here
         G.jokers.config.card_limit = G.jokers.config.card_limit - 1
    end
    return para_card_removal_old(self, card, from_debuff)
end
Card.add_to_deck = function(self, card, from_debuff)
     if para_extra_slots(self) and card.area == G.jokers then -- And here too
         G.jokers.config.card_limit = G.jokers.config.card_limit + 1
    end
    return para_card_addition_old(self, card, from_debuff)
end

why does this crash

frigid cargo
coarse plank
#

Does anyone know why I get this error message?

daring fern
#

Also your event is missing a func

spice wadi
wind steppe
# frigid cargo does anyone have any solution to help me?
config = { extra = {xmult = 0.5, min = 0.5, max = 2}},
loc_vars = function(self, info_queue, center)
    return { vars = {card.ability.extra.xmult, card.ability.extra.min, card.ability.extra.max}  } -- it should be card and not center
end,
calculate = function(self, card, context)
    local tempxmult = 0 -- Don't use global variables! Use local ones instead.
    if context.setting_blind then
            tempxmult = pseudorandom("seed",card.ability.extra.min, card.ability.extra.max) -- You didn't seed the pseudorandom, so it took the minimum as the seed, the max as the minimum, and nothing as the maximum
            card.ability.extra.xmult = tempxmult
    elseif context.joker_main then -- Better to use elseif than two separate ifs.
    card.ability.extra.xmult = tempxmult
        return {
            xmult = card.ability.extra.xmult
        }
    end
end,
}
spice wadi
#

oh wow

#

nevermind that works too 😭

frigid cargo
#

oh wow

#

thanks

wind steppe
#

still remove the second line though, it's redundant/possibly harmful

frigid cargo
gentle rain
#

how would one go about putting a variable in reminder text like this?

wind steppe
frigid cargo
#

oh

wind steppe
#

idk why its there just use card in loc_vars

frigid cargo
daring fern
gentle rain
# daring fern `loc_vars`

how would i do loc_vars for something that isn't an object? this is just text that appears on the side of a card like this

daring fern
wind steppe
frigid cargo
thorn furnace
#

not entirely sure where I'm going wrong here; card.ability should exist

wind steppe
thorn furnace
#

yea that's why I did next()

#

so it's the first one in the list

wind steppe
#

seems like next() here is giving you a tuple of an index and value and still not a joker

thorn furnace
#

darn

wind steppe
#

im not sure though i didnt know next was a thing until just now

thorn furnace
wind steppe
thorn furnace
#

o

wise terrace
#

can I return formatted text with loc_vars, for example if I do

{
    loc_txt = {
        text = { "#1#" }
    }
    loc_vars = function()
      return { vars = { "{C:attention}lmao{}" } }
    end
}

would the text be formatted, I'm not on my pc rn so just asking to make sure

thorn furnace
thorn furnace
pulsar furnace
#

How do I change the probability of rarities in the shop? Does anyone know?

wind steppe
wise terrace
pulsar furnace
wise terrace
#

maybe that or lovely injection, though I've never tried the latter

wind steppe
wise terrace
wind steppe
#

how would i check in remove_from_deck or add_to_deck if it's being removed/added from G.jokers specifically?

sonic cedar
#

also is str a variable

subtle merlin
#

It's been long enough of trying to figure this out so i ask again: can anyone tell why this just doesn't trigger?

wind steppe
subtle merlin
#

that definitely was an issue, and i fixed it (ty), but that isn't the only issue bc it still does nothing

sonic cedar
#

what does this even do

subtle merlin
#

"If the played hand is all the same Void buff, grant x2 mult",
"and chips but destroy a played card."

wind steppe
sonic cedar
#

was gonna ask if that was an enhancement because why arent you using SMODS.has_enhancement()

hollow sphinx
#

making a joker that's pretty much just canio but for an enhancement, but this crash happens.

wind steppe
#

wait nvm

#

show us the whole crash report

hybrid shadow
#

is there a way to increase the number of cards/choices in a booster pack

hollow sphinx
daring fern
sonic cedar
long sun
#

world's most broken Tarot card ;u;

hollow sphinx
hybrid shadow
subtle merlin
daring fern
wind steppe
long sun
#

it tried to mod_conv an edition dfjkgndfjkgnfdk

hybrid shadow
long sun
#

wait weird, the text is different too ;u;

daring fern
# long sun code

You have to do it manually because tarots don't usually apply editions.

long sun
#

i might've added localisation already

#

grand

sonic cedar
zinc violet
#

i need help

sonic cedar
#

yeah what somecom said

long sun
#

grand

sonic cedar
wind steppe
#

dont ask if someone can help you

zinc violet
#

What would be the line of code to be able to put a sound that does not belong to balatro in the code?

wind steppe
#
local para_extra_slots = function(self)
    return self.ability.para_negativesticker or self.config.center_key == "j_para_cooledwater"
end
local para_card_removal_old = Card.remove_from_deck
local para_card_addition_old = Card.add_to_deck
Card.remove_from_deck = function(self, card, from_debuff)
     if para_extra_slots(self) and card.area == G.jokers then -- Crashes here
         G.jokers.config.card_limit = G.jokers.config.card_limit - 1
    end
    return para_card_removal_old(self, card, from_debuff)
end
Card.add_to_deck = function(self, card, from_debuff)
     if para_extra_slots(self) and card.area == G.jokers then -- And here too
         G.jokers.config.card_limit = G.jokers.config.card_limit + 1
    end
    return para_card_addition_old(self, card, from_debuff)
end

why does this crash

hybrid shadow
#

SMODS.Sound?

zinc violet
sonic cedar
daring fern
#

How would I hook/patch create_card so that I can have a chance to replace a card with another?

wind steppe
wind steppe
sturdy compass
wind steppe
# daring fern Yes.

is this only created in stuff from your mod or is it something like a joker that can appear in the shop?

sonic cedar
#

-# hi astra Wave

daring fern
sturdy compass
sturdy compass
sonic cedar
subtle merlin
sonic cedar
#

always go with ur gut

wind steppe
sonic cedar
#

hi smods sound

wind steppe
#

that is the wrong link

sonic cedar
#

bye smods sound

sturdy compass
daring fern
wind steppe
daring fern
wind steppe
#

hook that as well then

daring fern
wind steppe
#

is there an add_card in vanilla? if so you hook that too

daring fern
wind steppe
sonic cedar
sturdy compass
#

Double mult gain?

sonic cedar
# sturdy compass Double mult gain?

you were there
you know exactly who im talking about
(chud joker gains xmult twice whenever the condition is fulfilled instead of once)
(2->200 instead of 2->20)
(no, adding not context.repetition did not make a difference)

wind steppe
# daring fern Yes.

so you'd check set to see if its a consumable (tarot spectral planet) then if the chance succeeds call the old create_card with a new key

daring fern
wind steppe
daring fern
wind steppe
#

prefix is c

coarse plank
#

Anyone know why I get this message? Copying the code from bugerlar so not familar with it

daring fern
daring fern
sonic cedar
zinc violet
#

missing the prefix?

coarse plank
sonic cedar
coarse plank
#

just adding card to calculate

daring fern
sonic cedar
#

why is blind there

lament agate
#

how do you use xchips function

coarse plank
#

thank you

daring fern
lament agate
#

xchips is a thing right

daring fern
sonic cedar
#

yes

lament agate
#

and the color will be {X:blue,C:white} ?

daring fern
lament agate
#

alright

zinc violet
#

Is this okay?

daring fern
sweet pelican
#

I changed the money value to equal 10 but it's still giving 4 dollars on round end, is he stupid??? 😭

lament agate
zinc violet
#

this is the error

coarse plank
sonic cedar
sonic cedar
#

leave the context

zinc violet
sweet pelican
sonic cedar
sweet pelican
#

yeah it is

#

the name is different at least 😭

sonic cedar
coarse plank
#

wait

sweet pelican
coarse plank
#

i am stupid

sweet pelican
#

I was starting the run from a save not starting a new one

sonic cedar
#

why is it discards

coarse plank
#

yeah trying to add discard

#

relized i never changed the code

sturdy compass
#

Something tells me they're not too educated on calculate contexts

sonic cedar
#

🤏

sonic cedar
pulsar furnace
#

how do i apply this into a deck

sturdy compass
#

I have never seen that crash report

sonic cedar
wind steppe
lament agate
#

here's my plan

If talisman installed, gives ^4 Mult

#

how do you check if Talisman is installed

#

in a Joker

subtle merlin
sonic cedar
sonic cedar
subtle merlin
lament agate
zinc violet
#

I put the end where it wasn't, right?

daring fern
sonic cedar
sonic cedar
#

(and way simpler)

lament agate
daring fern
lament agate
#

i mean

#

like

#

smods recognize that?

daring fern
lament agate
#

okay

wind steppe
daring fern
subtle merlin
ivory coral
#

how do i get hand text while a hand is playing? i have an effect that levels up a hand during scoring and i need to reset the text to what it was before the level up text, so i need to get what's actually in the text beforehand

sonic cedar
sonic cedar
zenith sage
#

is there a context that covers when a card is created
so i can check for when a planet card is bought or created (added to consumable area)

wind steppe
ivory coral
#

after its done leveling up

daring fern
ivory coral
subtle merlin
ivory coral
# sonic cedar this text? wdym "reset"

yes that
ill try to explain
select hand to play -> play hand -> level up hand (which changes that text since leveling up hands uses that space) -> set the text there back to the hand text of the hand that was played -> continue scoring

ivory coral
#

how do i get the chips and mult values though

#

i can get its level easily enough too i think

sonic cedar
ivory coral
#

let me try it

subtle merlin
daring fern
ivory coral
daring fern
lucid owl
#

how could i make sure the played hand contains at least one spade before scoring? this doesn't work

daring fern
pulsar furnace
#

how do i apply this into a deck?

lucid owl
ivory coral
# daring fern

oh my god yes exactly that lol
so often theres just already a built in function for the wackiest things i try to do lol
thanks

daring fern
sonic cedar
lucid owl
wind steppe
#

also who would play that

daring fern
pulsar furnace
subtle merlin
wind steppe
zinc violet
#

uuuuuuuh

serene granite
#

hey, just wanted to ask if there is a way to make like a judgment type card with your own custom jokers? i am trying to make a consumable that creates a joker from a pool of my modded jokers but i cant seem to get it to work.. any advice?

zinc violet
#

but the audio is there

wind steppe
pulsar furnace
lucid owl
coarse plank
#

why won't this draw the amount of cards I want?

hollow sphinx
#

pretty sure I just need to replace context.other_card.seal with something that actually checks the seal for this to work.

#

I'm just not sure what that would be

modern kindle
wind steppe
zinc violet
#

the same error

wind steppe
#

because i don't think it exists

coarse plank
#

it works when context is set to cards_to_draw

wind steppe
#

and ig find a way to check if you discarded recently

zinc violet
#

so

#

what would I do?

modern kindle
#

Hi N!

red flower
#

cards_to_draw only works in drawing_cards yes

sturdy compass
#

N has arrived

zinc violet
#

I moved the folder from sounds to resources and I get the same error.

sonic cedar
#

hi n

red flower
#

hii

sonic cedar
daring fern
ivory coral
# daring fern

ok so this works but it keeps the level from the leveled up hand on the actual played hand
for example if i play a levl 1 3oak and it levels up flush it incorrectly shows a level 2 3oak

zinc violet
hybrid shadow
#

is SMODS.poll_seal a default but not SMODS.poll_edition?

subtle merlin
sturdy compass
#

poll_edition is a vanilla function

#

oddly

red flower
thorn furnace
#

Is there something specific I should be doing in order to make sure this still works

ivory coral
ivory coral
#

so it displays wrong if they arent

sturdy compass
#

I have never seen that function 😭

ivory coral
red flower
#

update

hybrid shadow
ivory coral
#

its not an update thing its literally in the code of the repo

#

i will update regardless though

red flower
ivory coral
#

fr?

#

let me try then

wind steppe
#
local para_extra_slots = function(self)
    return self.ability.para_negativesticker or self.config.center_key == "j_para_cooledwater"
end
local para_card_removal_old = Card.remove_from_deck
local para_card_addition_old = Card.add_to_deck
Card.remove_from_deck = function(self, card, from_debuff)
     if para_extra_slots(self) and card.area == G.jokers then -- Crashes here
         G.jokers.config.card_limit = G.jokers.config.card_limit - 1
    end
    return para_card_removal_old(self, card, from_debuff)
end
Card.add_to_deck = function(self, card, from_debuff)
     if para_extra_slots(self) and card.area == G.jokers then -- And here too
         G.jokers.config.card_limit = G.jokers.config.card_limit + 1
    end
    return para_card_addition_old(self, card, from_debuff)
end

why does this crash

sturdy compass
#

Sending your crash report woiuld help a lot

sonic cedar
red flower
ivory coral
red flower
#

can i see your code

sturdy compass
ivory coral
#

this is the issue

red flower
#

yeah that's the function
i don't see it doing what you ssaid

ivory coral
#

i think

red flower
#

hand is the argument not the played hand

ivory coral
#

it gets the level of the hand its told to upgrade

#

and uses it for the played hand

#

after leveling up is done

red flower
#

hmm let me try it

hollow snow
#

can i get the blueprint that's copying my joker with context.blueprint?

ivory coral
#

whats happening is
play hand -> poker hand other than played hand is leveled -> it sets the hand text values back but keeps the level of the leveled hand -> scoring continues

hollow snow
#

ty

ivory coral
#

i can try sending like a video recording

red flower
ivory coral
#

if i play a straight and it levels up pair it still shows the straight at level 2

red flower
#

yep

zinc violet
red flower
#

same here

subtle merlin
#

I'm figuring things out, idk what's still wrong but i know that the highlighted if section that isn't triggering

thorn furnace
ivory coral
#

alright at least its an smods issue and not something i did wrong lol

sonic cedar
#

just had a revelation
what if i just put it in an event

red flower
#

yeah i would just wait for it to get fixed

#

i will see if i can do it rn

ivory coral
#

sweet

#

i think its vals_after_level not storing the hands level

red flower
#

yes

#

it has a different name

ivory coral
#

the value i mean

ivory coral
#

hm

thorn furnace
ivory coral
#

hm
are you sure its context.card for the card being added

#

im not sure myself but it seems weird to me

hybrid shadow
# thorn furnace

what is context.card_added for here? when the consumable is added?

thorn furnace
#

when it's added to your hand the values are doubled

granite nymph
thorn furnace
gentle rain
#

made a balatro themed pack that never released

wind steppe
#

How would I check specifically in hooks of remove_from_deck and add_to_deck if the card is being removed or added to my joker slots?

granite nymph
#

ive spend probably over 100 bucks on four souls

gentle rain
#

i'm in four souls

#

i made era walk and holy greed

#

originally oops all 6s and charon from hades

hollow snow
#

to activate an effect when blueprint triggers my joker is it enough with context.blueprint?

gentle rain
sonic cedar
sturdy compass
lucid owl
#

how can you check if a card has a seal?

#

probably a really easy question lol

gentle rain
# hollow snow ty, best explanation

so for example
if context.before and not context.blueprint
[scaling effect]
end
if context.joker_main
[chips or mult or whatever, is copied by blueprint]

#

blueprint copies all calculate effects that are not under and not context.blueprint

hollow snow
#

yes what im trying to do is if a blueprint is copying my joker, on hand played it will erase the blueprint

ivory coral
# thorn furnace

shot in the dark here but try using context.card_added instead of context.card for the card being added?
and if not maybe context.self?
the doc is a bit unclear and the code doesnt help much

zinc violet
#

ohh common

gentle rain
lucid owl
thorn furnace
#

I'll give it a shot tho

ivory coral
#

yeah im not sure

red flower
zinc violet
#

I recorded the sound and nothing

ivory coral
thorn furnace
gentle rain
zinc violet
#

What can I try now?

gentle rain
thorn furnace
# thorn furnace yea

The weird thing is that even if I allow for context.card.ability.consumeable, it still messes up the selection limit
And if I only do context.card.ability.extra, it works perfectly fine with my custom consumables, but the tarots break it

#

but if I do context.card.ability, neither works

ivory coral
#

hm
maybe for debugging add some print()s into the code
like have it print key and entry and see what it returns
just a sanity check

wind steppe
gentle rain
granite nymph
#

does anytone know how to create a negative card with local card = create_card

wind steppe
gentle rain
#

it does??

#

guh

ivory coral
gentle rain
thorn furnace
ivory coral
subtle merlin
#

I found it, the issue is the highlighted if statement, it isn't true despite it's condition being true. I know that the key is correct for all 3, so what's wrong?

ivory coral
thorn furnace
ivory coral
#

importantly though max_highligted is changed from 2 to 4

ivory coral
thorn furnace
thorn furnace
#

I spend like 2 hours staring at Cryptid source code and yet I still have no idea how they got it to work SALADWENTBAD

sonic cedar
subtle merlin
granite nymph
#

does anyone know how i make this negatibe

ivory coral
ivory coral
#

but it only lets you select 2

thorn furnace
#

indeed

sonic cedar
ivory coral
#

huh

subtle merlin
ivory coral
#

thats very strange

red flower
sonic cedar
thorn furnace
ivory coral
granite nymph
subtle merlin
sonic cedar
#

what is your mod's prefix

sonic cedar
ivory coral
#

is that also 4

thorn furnace
#

That one is 2

ivory coral
#

okay thats probably the issue then
i think its getting the max selection from that

#

but its in a subtable

#

so if the subtables being broken is fixed it should work

thorn furnace
# thorn furnace That one is 2

Though when I change that one, it just doesn't let me use it at all
Also it affects the base card, meaning it stacks when i get the same consumable more than once, permanently

ivory coral
#

ooh does it

thorn furnace
#

My first screenshot was an example of it

subtle merlin
hybrid shadow
zinc violet
#

mmmmmmmmmmm

ivory coral
zinc violet
ivory coral
#

also just chaning the first value also doesnt change anything

#

so its not your end

#

as in its not just you

zinc violet
#

What do I do?

ivory coral
#

not sure what it is then

red flower
zinc violet
thorn furnace
ivory coral
#

yeah

red flower
thorn furnace
ivory coral
#

so no way to do so without a patch i think

thorn furnace
#

eh, a patch can't hurt too much

#

where's the can_use() code?

ivory coral
#

yeah it shouldnt be hard
line 1564 of card.lua i think is where you wanna start

subtle merlin
hybrid shadow
#

message = localize("key")

red flower
zinc violet
red flower
zinc violet
#

can I give you the complete?

red flower
#

idk why you define it twice

red flower
zinc violet
sonic cedar
sturdy compass
zinc violet
#

the text works fine, I have the problem with the sound.

sonic cedar
#

gonna try putting it in an event again

red flower
hybrid shadow
#

your actual message key should be defined somewhere else

#

do you have a localization file

hybrid shadow
#

idk how to define messages without having a localization file

#

you could try doing message = "Text!"

subtle merlin
red flower
zinc violet
#

okkkk

hybrid shadow
zinc violet
#

I already modified it, let's see if it works.

hybrid shadow
#

np

zinc violet
#

YESSSSS

#

ITS WORKING

#

very very very thanks

subtle merlin
granite nymph
#

this is supposed to create two specific jokers

#

but it just makes a random one

hybrid shadow
hybrid shadow
subtle merlin
#

turns out that that's the only issue now

hybrid shadow
subtle merlin
#

yea

red flower
hybrid shadow
granite nymph
#

would it be
if G.consumeables then
SMODS.add_card(j_yip_blue_card)
card:set_edition("e_negative", true)
return true
end

manic rune
#

nop

sonic cedar
#

how do you message in an event

#

-# hi bepis

red flower
#

SMODS.add_card{key="j_yip_blue_card", edition="e_negative"}

manic rune
#

SMODS.add_card{key = "j_yip_blue_card", edition = "e

#

nvm

#

god im so slow on phone

red flower
#

im on phone too

sonic cedar
#

you fought hard

manic rune
#

also hu

#

hi

manic rune
sonic cedar
#

can i still do color

manic rune
#

you can put color in there, yeah

sonic cedar
manic rune
#

yes

sonic cedar
#

sick

sonic cedar
#

winning?

serene granite
#

hey, just wanted to ask if there is a way to make like a judgment type card with your own custom jokers? i am trying to make a consumable that creates a joker from a pool of my modded jokers but i cant seem to get it to work.. any advice?

ivory coral
red flower
#

i would make an ObjectType

subtle merlin
ivory coral
red flower
#

when are you leveling up

sonic cedar
red flower
#

what context

ivory coral
red flower
#

i think i know why it is

#

but im in bed :3

ivory coral
#

yeah i think its still "???" at that time

#

so it would need to check what hand it actually is and not what the text says it is

red flower
#

i would report it as an issue in the smods repo

ivory coral
#

i'll do that then

hybrid shadow
# subtle merlin *tap*

im unsure how to randomize what card is picked but if its among your scored hand you should start with context.cardarea == G.play rather than the other context.destroy_card thing

red flower
#

I'll look into it tomorrow after work if nobody does it by then

hybrid shadow
#

actually gimme a bit i might be able to reformat this where you dont have to set the card variable to false before returning (which may be kicking you out of the context)

thorn furnace
#

Has anyone ever told the spectral cards to just play nice when people are trying to modify them

#

Wondering if that usually works - to just yell at them until they work

hallow slate
#

Which function can I use to get the cards in the highlighted hand that will score when played?

hallow slate
#

Yeah before theyre played

hybrid shadow
sonic cedar
# sonic cedar reformatted is this allowed/correct

this didnt fix the double it just made it so i could watch it in real time
the messages go as follows
"x6.32 Mult", "x20 Mult", "x63.2 Mult", "x200 Mult"
(that 6.32 is due to the xmult gain being the square root of 10, 2*sqrt10 is 6.32)

thorn furnace
hybrid shadow
#

i gotta hope the destroy parts of familiar, grim, and incantation arent hardcoded

keen totem
#

big smoke joker

granite nymph
#

if you make a legendary joker does it automatically do the normal soul sutff (not appear in shops, show up when you use soul) or do you have to code that

keen totem
#

idk if i did this well or not

turbid crystal
#

im trying to use :is_suit(suit) to see if a given card matches a suit but it doesnt seem work when a card is debuffed, what can i do to get around that?

granite nymph
#

yes as in it does it automatically?

keen totem
#

legendary, as a rarity, cant show up in shops

#

and it just gets a random legendary for soul

#

so yea

turbid crystal
#

ok ty

hybrid shadow
gentle rain
#

how would i check what the current deck is?

sonic cedar
thorn furnace
lucid owl
#

what's wrong with SMODS.calculate_effect here?

#

full code for context

red flower
#

don't use context in an event, save it to a local

gentle rain
lucid owl
gentle rain
#

no clue what variable the current deck is

keen totem
#

how do i infoqueue an edition and a seal?

#

and a joker too actually

red flower
keen totem
#

and tags as well actually

red flower
gentle rain
red flower
keen totem
#

does vremade have localization files?

red flower
#

yes

lucid owl
keen totem
#

G.P_CENTERS["gold_seal"] would it just be this

red flower
#

no

#

check talisman

sonic cedar
red flower
#

(the card)

lucid owl
keen totem
red flower
#

no

#

"Gold"

keen totem
#

are editions the same as enhancements?

#

G.P_CENTERS["e_foil"] like this

red flower
#

i think so

keen totem
#

what about jokers tho

#

i can check cola for tags

red flower
#

i could write it

#

but it's literally the example in the docs

hybrid shadow
#

how do i turn a message into a file again

red flower
#

can you elaborate

hybrid shadow
#

i have a message on discord that i think may be too long to send here without burying smth so i wanna turn it into a file instead

#

should i just do that manually

red flower
#

ohh yeah no idea im bad at discord

sonic cedar
#

and then send the file

#

?

hybrid shadow
sonic cedar
#

cool

hybrid shadow
#

its a response to someone btw not an issue im having, though i do have an issue, how do i actually get poll_edition to work

thorn furnace
#

Not sure what's happened
Used immolate
tried to check my deck
this happened

hybrid shadow
golden lake
#

bizarro dimension balatrostuck...

#

do you need any help @hybrid shadow

keen totem
#

is it possible to get if a card is modified at all?

#

like edition, seal, and enhancements

red flower
#

AFAIK no without checking all of them

keen totem
#

i need to get all 3 anyways

#

are edition and seal just SMODS.has_enhancement() but with edition and seal instead of enhancement

red flower
#

no, it's card.edition and card.seal

keen totem
#

oh right

#

its has enhancement for enhancements cause of quantum enhancements

gentle rain
#

how do i do loc_vars with a deck

#

it keeps saying back is a nil value

#

on 1375

wind steppe
#

what gives enhancements special treatment

red flower
#

or self.config

gentle rain
#

im checking ortalab's dev code

#

btw @red flower youve been like absurdly helpful for all my questions with modding i wanna say thank you a lot

hybrid shadow
red flower
#

the second nil can be true if you don't want negatives

hybrid shadow
#

oh no im fine having negatives, does the last part being true guarantee that there is an edition?

red flower
#

yes

keen totem
#

wait how do i get if a card has any enhancement again

red flower
#

next(SMODS.get_enhancements(card))

subtle merlin
# hybrid shadow

I had an idea that makes the destroying a card irrelevant, for the other parts ty!

#

-# (why was that in a text file though?)

keen totem
#

whats the base edition and base seal?

hybrid shadow
sturdy compass
red flower
#

that means 25% more questions 😭

sturdy compass
#

VERY true

gentle rain
#

how come the tooltip text isn't showing?

keen totem
#

if context.individual and context.cardarea == G.play then
            local othercard = context.other_card
            local rank = othercard:get_id()
            
            if rank == 9 then
                if context.repetition and (next(SMODS.get_enhancements(othercard)) or othercard.edition ~= "" or othercard.seal ~= "") then
                    return {
                        mult = card.ability.extra.nine,
                        repetitions = 1
                    }

would this cause all modified 9s to infinitely retrigger?

gentle rain
hybrid shadow
#

i mean people are more likely to ask questions if there's someone actually answering them

red flower
gentle rain
#

or for tooltips i mean

#

thats so jank lol

red flower
subtle merlin
#

How do i get a joker to discard a card in hand?

red flower
gentle rain
#

aah

modern kindle
sturdy compass
# gentle rain aah

My suggestion to get around it is to make a dummy card object that doesn't appear in collections and reference that for your tooltip

red flower
modern kindle
#

Thats true also
I get most of my info by reading docs or more importantly searching what I'm doing in the channel

#

Most of my answers have been acquired from both sources

keen totem
#

either that or looking up what you need wont show it

modern kindle
#

If you know the general thing you're looking for docs arent that hard to search imo

modern kindle
#

Like when I was making consumables it was pretty self explanatory to look at that doc section

modern kindle
#

Damn 0 in 5

sturdy compass
#

read the tooltip 😭

red flower
modern kindle
#

Nobody reads in 2011

red flower
#

(and vanillaremade is in the docs so I'm including it)

sturdy compass
sonic cedar
keen totem
sturdy compass
#

98 right

gentle rain
keen totem
#

and SMODS has a lot of different stuff for different situations so there might not even be a vremade example of what you need to find

sturdy compass
#

I didn't know a lick of Lua but my background in other coding languages big time backpacked me lol

gentle rain
#

well i dont know any other languages either

#

:P

modern kindle
#

Well thats the thing, asking a question you may find stupid is okay when people like N or something are here
Ive even encouraged it
Its mostly just I was saying I don't have the personal patience to answer the same questions over and over

#

Hell I'll answer questions with simple answers if I'm here
But its definitely a nuisance when you know the answer is in the docs

keen totem
#

did i just find math.random in vremade

#

how dare you do this N

red flower
#

where is that

sturdy compass
#

WHaaaaaaaaaaaaaat

red flower
#

probably animation stuff

keen totem
#

yea

#

its sounds

sturdy compass
#

Well for sound stuff that's fine

red flower
#

yeah that's fine

modern kindle
#

Erm why not math.exact

keen totem
modern kindle
#

Yes

red flower
#

math.just_give_me_a_number_man()

sturdy compass
#

pseudorandom is only really for random mechanic values

modern kindle
#

Thats what I'm sayin

#

Wish we had gif perms

sturdy compass
#

real

#

thunk ruling with an iron fist

modern kindle
#

About to make a discord mod to submit to the discord workshop to mod this server

keen totem
#

is the card being sold for context.selling_card context.other_card?

hybrid shadow
red flower
#

^ in the docs btw

keen totem
#

well ye

#

but i forgot that those were in context.whatever

modern kindle
#

Do we have context.win yet so I can just context.win everything

sonic cedar
#

make one

modern kindle
#

If context.win then g.game.win = true then g.game.dollars = win

red flower
#

context.playing_balatro when

#

it fires when you play balatro

keen totem
#

is getting a cards key just card.config.CENTER.key?

red flower
#

yes
all lowercase tho

gentle rain
#

if context.thinking_about_boobs then
print('hell yeah')
end

modern kindle
#

All you'd see in my console is alot of hell yeah

gentle rain
#

got it working

gentle rain
#

didnt understand the successor token reminder had to be an actual defined object

granite nymph
#

why is my game saying context is a nil value?

serene granite
granite nymph
#

isnt that smods?

granite nymph
hybrid shadow
#

there should be a context for when blueprint is copying brainstorm called context.yuri /j

serene granite
keen totem
#

there is no way in hell this card works on the first try

modern kindle
#

Because N has made so many prs I'd like to have context.N that does something i wont know until something works

gentle rain
granite nymph
red flower
#

what's the code

#

you need to give more info

granite nymph
#

im sorry im asking so many qyestions im new to lua and im trying to learn how to code on the spot

#

for the most part at least

hybrid shadow
#

is v:has_ability more broad than doing has_enhancement or has_edition (and can cover if a card has a certain sticker)?

red flower
keen totem
#

how do i check if a card has a certain edition?

lucid owl
#

this card gives +1 hand size if a 1/3 chance procs on played clubs, however for some reason it gives an extra card?? like, it goes 8/8 -> 7/8 (played card) -> 10/9 (after everything is done)

keen totem
#

i thought card.edition == "e_foil" would work

red flower
#

card.edition.foil works

#

i dont remember for modded ones

lucid owl
keen totem
keen totem
#
if context.selling_card and context.other_card.config.center.key == "j_diet_cola" then
                return {
                    func = function()
                        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

why doesnt this make the joker give another double tag when diet colas are sold?

#

wait

#

im stupid

#

nvm

lucid owl
hybrid shadow
lucid owl
granite nymph
#

I sent the wrong file😭 😭 😭 😭 😭 😭

red flower
#

do you want to prevent the draw when hand size is increased?

granite nymph
#

im assuming around line 184

lucid owl
# red flower i dont get it

the joker is meant to increase hand size by 1, which it does fine, however it draws 2 cards, putting it over the max amount. it says 10/9, and i'd very much rather it be 9/9... it draws 1 card to replenish the played one, then for some reason draws an extra 2 more

red flower
#

you're using context.end_of_round in the middle of the code

red flower
#

that will probably not update the number tho

lucid owl
#

just changing the size updates the number from what i can tell

granite nymph
keen totem
#
if context.selling_card and context.card.config.center.key == "j_diet_cola" then
                return {
                    func = function()
                        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

why does this not make the joker give an extra double tag when diet colas are sold?

lucid owl
#

it's a bit delayed but otherwise works perfectly

red flower
subtle merlin
#

HOLY SHIT IT WORKS

#

I'M ACTUALLY SHAKING

granite nymph
hybrid shadow
granite nymph
#

from that point onwards its just ther same thuing

keen totem
#

cause this is basically copied from vremade

subtle merlin
#

wait, right i forgot there's one more thing i need to fix, celebrated too early

#

how can i multiply the chip count by 2?

red flower
keen totem
#

SMODS adds XChips

red flower
#

yeah all of that after the function is wrong

#

not the code itself (i havent read it) but the placement

subtle merlin
red flower
gentle rain
#

does anyone know off hand where the menu ui is stored in the code

sturdy compass
#

Which menu?

gentle rain
#

the new game menu i suppose

#

im tyring to make it so the PLAY button is greyed out if you have no successor tokens

sturdy compass
#

probably functions/UI_definitions.lua

gentle rain
#

i seeeee

#

ive been looking thru the Game:main_menu function fruitlessly

red flower
#

i would look for "seeded run" in the localization and then look for that key in the code

#

(or look at Galdur)

sturdy compass
#

Using localization keys to weed out UI Elements (and by extension, menus themselves) is such a useful strategy

gentle rain
granite nymph
red flower
#

no, you need to learn lua sadly

#

basically context doesn't exist outside calculate and anything you do with it outside of a joker doesn't do anything

hybrid shadow
willow nimbus
#

i feel like a bit of a dumbass for asking this but i'm struggling to make a joker that changes the background to black and yellow

#

i'm a bit lost on how to use define draw steps

sonic cedar
#

new new new (new) plan

hybrid shadow
sonic cedar
#

gains xmult when probabilities hit (I had to do this manually)

#

everything works except the Scoring type (think lucky card)

#

(Just lucky card)

#

(Glass works)

#

(It’s literally only lucky cards)

#

so Im testing this ver

gentle rain
#

cant you just use what lucky cat does

sonic cedar
#

you’ll never guess what this is

gentle rain
#

bluh im struggling to wrap my head around how to manage like. values stored inside your save

#

and its hard to test because it feels like no matter what my deck is gonna return nil values

#

im dum

sonic cedar
#

cant you just look at them through the save file editor

#

thats what I did for my custom save stuff

gentle rain
#

save file editor?

sonic cedar
#

balatro.shorty.systems

#

iirc