#💻・modding-dev

1 messages · Page 448 of 1

tired kestrel
#

Thanks

hard mica
#

i did but it didnt give me anything

daring fern
hard mica
daring fern
#

daring fern
hard mica
tired kestrel
#

I forgot to record but I'll record later

sonic cedar
#

miniscule bumpage

north swallow
#

is there a reason why shop_rate isnt working?

sonic cedar
#

try taking out the default?

#

spitballing

formal parrot
north swallow
formal parrot
#

I have done a consumable type that works fine if you want i can send you the code :P

formal parrot
#

Sure

#

Kinda bad namings everything is hpr labeled so good luck lmao ,

north swallow
#

alr ill look into it

formal parrot
#

To clarify i’m using draw step to add shaders

#

And souls

#

To consumables but everything else should be fine

daring fern
#

sonic cedar
#

how's that supposed to work anyway?

snow vale
#

why could this happen?

plush depot
#

how do i make it so that when an enhancement scores on a small/big blind it does nothing, but on a boss blind it does x2 mult and x2 chips

north swallow
#

no clue what happened

formal parrot
#

Shit happens

violet gulch
# daring fern

Obviously not as well versed in this as you so I'm spitballing, but does key every become not nil?

formal parrot
#

For no reason when you code

#

Lol

north swallow
#

yeah

#

if i used the continue on the debug save slot it crashed and the moment i started a new run it worked

#

soo

formal parrot
#

Are you new ?

formal parrot
north swallow
formal parrot
#

Balatro yeah

north swallow
#

uh not really

#

been making a mod for like a month really

#

still suck but ive gotten a bit better at it

formal parrot
#

Don’t remember seeing you , maybe im just blind

north swallow
formal parrot
north swallow
#

soo makes sense

formal parrot
#

Mhm

#

Feel free to ask for anything

north swallow
daring fern
formal parrot
#

Or anyone

snow vale
#

why could this happen?

keen atlas
#

missing resources/sounds/red_seal.ogg

snow vale
daring fern
snow vale
daring fern
#

It's gold_seal

keen atlas
hard mica
valid leaf
#

anyone knows what I can do to make this work?

daring fern
plush depot
#

there is probably many mistakes here which is why im asking, first time trying to code somehing like this

sonic cedar
plush depot
#

why

#

ok i will how do i do that

daring fern
daring fern
plush depot
#

ok i did it

#

what do i do

vast night
#

hi again everyone :D
-# long time no see
does some1 know how i can see if the played hand is superior to the last one or inferior (like ik with the config etc, but i wanna know how i can check the rank or smtn like that of the hand, so it even works in modded

daring fern
plush depot
#

no

#

nvm had to reload

daring fern
valid leaf
plush depot
vast night
#

oop didnt see that

#

just hover over the line and see what it says

#

no

#

you are missing some brackets

daring fern
plush depot
#

now it looks like this is it good

vast night
plush depot
#

it dosent work (i added and G.GAME.blind.boss the game still loads)

#

but it dosent work on ONLY the boss blind

daring fern
# valid leaf what do I do?
if (#G.playing_cards - G.GAME.starting_deck_size) > 0 then
    local effects = {}
    for i=1, (#G.playing_cards - G.GAME.starting_deck_size) do
        local joker = pseudorandom_element(G.jokers.cards, "seed")
        table.insert(effects, SMODS.blueprint_effect(card, joker, context)
    end
    return SMODS.merge_effects(effects)
end
```?
plush depot
daring fern
vast night
plush depot
daring fern
vast night
# plush depot idk

you would need to check if its the boss bliind and return xmult (and does xchips exist? @daring fern )

daring fern
sonic cedar
#

Realized it's better to ask as a new question. How do I make this effect-copying with merge_effects work? The joker justraq is supposed to copy the effects of jokers, based on the keys of the jokers added to a table

daring fern
vast night
# plush depot

(also if you want to make your code look nicer and more readeable press shift + alt + f)

daring fern
sonic cedar
rapid stag
#

i want to make an effect that prevents jokers from being debuffed, but i want to interpose any debuff attempts with a 'not allowed' attention text - so since i imagine that the entirety of vanilla debuff sources are not convertd to use SMODS.debuff_card, is there some universal debuffing event i can look into? cirDerp

daring fern
rapid stag
daring fern
#

It just triggers on Card:set_debuff and you return 'prevent_debuff' to prevent debuffs.

rapid stag
daring fern
sonic cedar
sonic cedar
daring fern
# sonic cedar

No, I was referring to the function not literally the value of get_joker_return

sonic cedar
#

ohhhhhh

#

ok ok in that case hold

sonic cedar
daring fern
sonic cedar
sonic cedar
#

cause obv just putting the function in the print would just crash the game

daring fern
sonic cedar
wild escarp
#

How would I apply the soul's animation with a custom image?

wild escarp
#

What is G.shared_soul? I'm assuming it's that's the image?

daring fern
wild escarp
#

how would I insert my own image there?

daring fern
sonic cedar
daring fern
sonic cedar
daring fern
sonic cedar
sonic cedar
#

(this one uses self it's fine)

sonic cedar
wild escarp
# daring fern You would change the `atlas` and `pos`.

I must be doing something wrong here, because I get an error, attempt to perform arithmetic on field x, a nil value.

local image = Sprite(0, 0, self.CARD_W, self.CARD_H, "WillatroOrgans", {x = 1, y = 0})
image.role.draw_major = card
image:draw_shader('dissolve', 0, nil, nil, card.children.center, scale_mod, rotate_mod, nil,
    0.1 + 0.03 * math.sin(1.8 * G.TIMERS.REAL), nil, 0.6)
image:draw_shader('dissolve', nil, nil, nil, card.children.center, scale_mod, rotate_mod)
daring fern
solid grotto
#

How do I edit the "score at least" text at the end of a round?
My joker saves you like mr bones but idk how to make it say "saved by ___"

daring fern
solid grotto
#

Not sure what that means

#

Tbh

#

My joker is intended to save you multiple times

#

It works fine as is I just don't know where to put the return to edit the end of round

wild escarp
wild escarp
#
local image = Sprite(0, 0, self.CARD_W, self.CARD_H, G.ASSET_ATLAS["willatro_WillatroOrgans"], {x = 1, y = 0})
daring fern
solid grotto
#

Still new to modding how would this look in code

daring fern
solid grotto
#

I'm brain farting rn

hidden sable
#

why doesnt this work

daring fern
pallid sleet
#

Would this be how you write a action with a chance of happening

if pseudorandom('dishsoap') < G.GAME.probabilities.normal / card.ability.extra.odds then
             SMODS.add_card({key = "j_loljk_bubbles", edition = 'e_negative'})
        end

odds are set to 2 in config

hidden sable
solid grotto
#

What's the variable for the current money the player has

#

I want to subtract money per activation of a joker

hidden sable
daring fern
pallid sleet
daring fern
hidden sable
solid grotto
#

Is G.GAME just like, to get the current value of anything like money, chips, probability

daring fern
solid grotto
#

It's used for the oops check

#

G.GAME.probabilities.normal

#

What is it now

wintry solar
#

not yet

#

that's still dev build

#

pls don't recommend to new devs

solid grotto
#

Anyway

#

How do I change this so the money subtraction has an animation

#

Or at least is prominent

hidden sable
pure salmon
#

ease_dollars()

red flower
#

that or return dollars

hidden sable
#

ease_dollars(how much to give, negative if you want it to go down)

hidden sable
solid grotto
#

So does this do it

#

Is that all I need

hidden sable
daring fern
daring fern
solid grotto
#

It works perfectly now

#

Awesome

#

Thanks

hidden sable
daring fern
hidden sable
daring fern
solid grotto
#

Whenver my code says eaten, I die
Whenever my code says saved, the game doesn't progress to the results screen and permanently softlocks

#

Even though in both instances death should be prevented?

#

Shouldn't the "saved = j_cheese_wheel" prevent death by itself

red flower
#

can i see the full code

solid grotto
#

Card function

#

Btw the first saved bit works every time

#

I've had no issues with the first if statement

red flower
#

neither return works?

solid grotto
#

The first return works

pastel kernel
#

How do you define a mega arcana pack

solid grotto
#

The second return fails differently depending on the message I add

faint yacht
#

p_arcana_mega?

red flower
pastel kernel
#
    if context.joker_main and not card.ability.extra.triggered then
      SMODS.add_booster_to_shop({
        key = "p_arcana_mega",
        cost = 0,
        weight = 1,
      })
#

like this?

plush depot
red flower
plush depot
pastel kernel
solid grotto
#

In a bit

daring fern
pastel kernel
#

oh

plush depot
pastel kernel
#

can i make it free?

daring fern
red flower
plush depot
pure salmon
#

how do i make a consumable increase hand size for 1 blind?

pastel kernel
plush depot
#

it works now

daring fern
plush depot
daring fern
plush depot
#

wha

#

it works tho

daring fern
#

They're trying to create a free mega arcana pack in the shop, I think.

plush depot
#

oh

daring fern
plush depot
#

wait clarification

pastel kernel
plush depot
#

ah

pastel kernel
#

and gives xmult per skip

red flower
plush depot
#

so it creates a mega arcana pack and gains xmult per skip or gives

#

can i do this

#

would this work

#

would it give naneinf mult

daring fern
plush depot
#

aw

daring fern
#

Do math.huge

plush depot
#

lol

pastel kernel
#

can i share my joker code

daring fern
pastel kernel
daring fern
# pastel kernel

It's SMODS.add_booster_to_shop("p_arcana_mega") not SMODS.add_booster_to_shop({ "p_arcana_mega", cost = 0, weight = 1 })

pastel kernel
#

is it free by default?

daring fern
#

Also you can't add a booster to the shop in joker_main

sonic cedar
lucid owl
#

just curious, why do we leave an extra set of parentheses after SMODS.load_file() (when wrapped in assert())?

daring fern
lucid owl
sonic cedar
#

my framerate hit 0 😭

pastel kernel
daring fern
pastel kernel
#

Free mega arcana in the shop

daring fern
pastel kernel
#

Then double xmult every booster skip

sonic cedar
#

did my computer crash

#

does the print log help at least

#

this is after triggering a fake Fibonacci

daring fern
pastel kernel
daring fern
pastel kernel
#

"invalid booster key: p_arcana_mega"

sonic cedar
#

and I can’t change to two jokers at the same time

daring fern
pastel kernel
#

wdym invalid booster key: p_arcana_mega

daring fern
sonic cedar
pastel kernel
#

ok now how do you change the cost?

daring fern
sonic cedar
#

so if I wanted it to blueprint and brainstorm at the same time is it possible

#

for example

daring fern
#

The problem is, it doesn't work with events.

sonic cedar
#

im listening 👁️ 👁️

chrome widget
sonic cedar
#

I NEED THOSE MAN

hidden sable
#

now how do i make it do the flip effect

sonic cedar
daring fern
chrome widget
pastel kernel
#

how do you change the cost?

sonic cedar
hidden sable
pastel kernel
daring fern
hidden sable
daring fern
daring fern
sonic cedar
daring fern
errant fulcrum
daring fern
hidden sable
errant fulcrum
#

Oh sorry I mean why booster.cost instead of just cost

daring fern
#

This is a booster added to the shop?

sonic cedar
#

but I think that’s also post calculation?

sturdy compass
#

hello dev chgat

hidden sable
#

is there a simple way to just flip a card, with noises and everything

sturdy compass
#

card:flip()

daring fern
hidden sable
sturdy compass
#

Actually no it doesn't

hidden sable
#

is there a reason vremade uses so much G.E_MANAGER:add_event

sturdy compass
#

Yes

hidden sable
#

does it concern me?

daring fern
pastel kernel
#

is it booster_cost or booster.cost?

sturdy compass
#

Potentially

#

Depends on what they're tryna do lol

daring fern
sturdy compass
sonic cedar
hidden sable
#

only time ive ever had to use an event is for a single card

pastel kernel
hidden sable
sturdy compass
#

play_sound('card1')

pastel kernel
sonic cedar
#

the whole lua file is crazy

pastel kernel
#

of course it is

daring fern
sonic cedar
#

oh thank god it’s a pa—oh my god

#

“Something like?”

#

So I can still use the key table stuff with all that right

daring fern
sonic cedar
#

ah

#

…I need everything else huh…

daring fern
sonic cedar
daring fern
# sonic cedar Ohhhh ok ok cool

It's this with all of that removed: ```lua
if card.ability.soe_jokers and next(card.ability.soe_jokers) then
local old_ability, old_center, old_center_key, extra_jokers_list, jokers_table = copy_table(card.ability), card.config.center, card.config.center_key, SEALS.get_quantum_jokers(card), {}
table.sort(extra_jokers_list, function(a, b) return (G.P_CENTERS[a].order or 0) < (G.P_CENTERS[b].order or 0) end)
table.insert(extra_jokers_list, 1, card.config.center.key)
for _, k in ipairs(extra_jokers_list) do
SEALS.safe_set_ability(card, G.P_CENTERS[k])
local joker = card:calculate_joker(context)
if joker then
table.insert(jokers_table, joker)
end
end
card.ability, card.config.center, card.config.center_key, jokers = old_ability, old_center, old_center_key, SMODS.merge_effects(jokers_table)
else
local jokers, triggered = card:calculate_joker(context)
end

sonic cedar
#

oh that's
actually not that bad

pastel kernel
daring fern
pastel kernel
#

i have to give it a key?

hidden sable
#

what does juice_up do

sonic cedar
#

the little shake animation

sonic cedar
hidden sable
#

what is this doing

daring fern
sonic cedar
red flower
sonic cedar
daring fern
sonic cedar
#

and the get_quantum_jokers

sonic cedar
daring fern
sonic cedar
sonic cedar
daring fern
sonic cedar
#

👍

daring fern
sonic cedar
#

oh my god

chrome widget
#
    G.GAME.round_resets.free_rerolls = G.GAME.round_resets.free_rerolls + mod
    G.GAME.current_round.free_rerolls = math.max(G.GAME.current_round.free_rerolls + mod, 0)
    calculate_reroll_cost(true)
end```

So I'm not 100% certain why there's both `round_resets.free_rerolls` and `current_round.free_rerolls`
normal crest
#

current_round likely refers to the amount of free rerolls left

#

and round_resets to the amount you start with each shop, if I had to guess

chrome widget
#

Mmm, thanks

rapid stag
#

do gradient colours work on badges?

#

i can't imagine they do, right

daring fern
rapid stag
#

oh right, because edition badges are dark_edition

sonic cedar
rapid stag
#

does set_card_type_badge() also bypass creation the mod badge, or no?
i'm assuming no because the mod badge is always created afterward

daring fern
sonic cedar
#

ill put in the main for organization sake

pastel kernel
#
SMODS.add_voucher_to_shop(key)/SMODS.add_booster_to_shop(key)

    Adds a Voucher or a Booster to the current shop.
    key - the key of the object to be added. If no key is provided, the next seeded object will be used



oh... p_arcana_mega_1.cost = 0
#

no i'm just stupid

#

i swear i'm a dumbass

drowsy heath
#

So I got a question

#

Im so stumped

#

What is missing from this or wrong for my joker to say xnil, the add joker bit im working on after but the xmult shows as nil instead of giving rhe defined x2

#

If anyone can figure it out thank you, and no I dont have discord on that laptop so that's why before anyone asks

pastel kernel
drowsy heath
#

Where do i put that ? Im like rather new to this

#

Wait

#

No nvm the part where it is just center.extra.xmult I need to add ability yeah m

#

?**

red flower
#

yes

drowsy heath
#

Okok thank you

#

Still showing xnil in game

pastel kernel
#

there's nothing in smods wiki that talks about booster.cost

#

or whatever

red flower
#

boosters are cards and cards have a cost attribute

pastel kernel
#

i'm trying to make the mega arcana free
SMODS.add_booster_to_shop("p_arcana_mega_1")
someone suggested i use
booster.cost = 0
and they also said it depends on the variable

#

i don't know what variable they're talking about

#

it's kind of cryptic

sonic cedar
daring fern
daring fern
sonic cedar
#

oh thats the whole thing

sonic cedar
#

testing now

pastel kernel
#

how long does it take to finish reading the entire lua documentation?

hidden sable
#

is there a way to detect when a sound stopped playing

pastel kernel
#

because i'll be reading that all over again

#

word by word

#

again and again

sonic cedar
#

bro is trying to become the other 2%

red flower
#

i think reading the lua docs is good but they're kinda crappy

pastel kernel
#

i have self-esteem problems.

hidden sable
red flower
#

try adding a delay(seconds)

pastel kernel
#

what about the smods wiki?

#

how long does it take to read all that?

red flower
#

like an hour

hidden sable
sonic cedar
#

man what in the hell

errant fulcrum
sonic cedar
#

but it's literally just my hyperfixations (hence mod name)

errant fulcrum
#

So far I've added all the avian cards and took a break to figure out how to modify booster pack pools (what a mistake that was)

sonic cedar
#

that sounds so painful

errant fulcrum
#

Very

sonic cedar
drowsy heath
#

Can someone help, I'm new to this n I'm trying to get my joker to give an Xmult but nothing is working

drowsy heath
#

I have to take a picture dont have discord on the laptop

sonic cedar
#

what am I looking at Fear

hidden sable
#

what are the params for juice_up

drowsy heath
sonic cedar
drowsy heath
#

Non of the things I saw had it... 😅 how does one even do that

hidden sable
sonic cedar
drowsy heath
#

Thank you, I feel like a lost child in a Tesco rn 🥲

pastel kernel
#

What if

#

Boosters appear in shop rerolls now

drowsy heath
#

Well erm idk where to put it or anything it didn't rlly help but I did it, dont have any errors popping up and it didn't change the fact its still xnil

formal quest
#

Is code autocompletion possible for balatro modding? I'm used to terraria modding where you can just type and have a list of variable names come up.

formal quest
chrome widget
#

Does loc_vars for Backs not support info_queue?

daring fern
drowsy heath
#

The more I do this the more my brain hurts

red flower
chrome widget
#

Hmm...

#

I guess that's a decent compromise, but it's primarily for putting an artist credit on the backs

red flower
drowsy heath
#

Yes saved and restart

red flower
#

no idea then

#

oh wait no

#

center.extra doesn't exist still

drowsy heath
#

It does

red flower
#

no it doesn't

formal quest
red flower
#

center.ability.extra does

drowsy heath
red flower
drowsy heath
sonic cedar
# daring fern Does it work?
function Hyperglobal.safe_set_ability(self, center)
    if not self or not center then return nil end
    local oldcenter = self.config.center
    G.GAME.hpfx_ijiraq_savedvalues = G.GAME.hpfx_ijiraq_savedvalues or {}
    G.GAME.hpfx_ijiraq_savedvalues[self.sort_id] = G.GAME.hpfx_ijiraq_savedvalues[self.sort_id] or {}
    G.GAME.hpfx_ijiraq_savedvalues[self.sort_id][oldcenter.key] = copy_table(self.ability)
    for k, v in pairs(G.GAME.hpfx_ijiraq_savedvalues[self.sort_id][center.key] or center.config) do
        if type(v) == 'table' then self.ability[k] = copy_table(v) else self.ability[k] = v
            if k == "Xmult" then self.ability.x_mult = v end
        end
    end
    self.ability.x_mult = center.config.Xmult or center.config.x_mult or 1
    self.ability.name = center.name
    self.ability.set = center.set
    self.ability.effect = center.effect
    self.config.center = center
    for k, v in pairs(G.P_CENTERS) do
        if center == v then self.config.center.key = k end
    end
    if self.ability.name == "Invisible Joker" then
        self.ability.invis_rounds = 0
    end
    if self.ability.name == 'To Do List' then
        local _poker_hands = {}
        for k, v in pairs(G.GAME.hands) do
            if v.visible then _poker_hands[#_poker_hands+1] = k end
        end
        local old_hand = self.ability.to_do_poker_hand
        self.ability.to_do_poker_hand = nil
        while not self.ability.to_do_poker_hand do
            self.ability.to_do_poker_hand = pseudorandom_element(_poker_hands, pseudoseed((self.area and self.area.config.type == 'title') and 'false_to_do' or 'to_do'))
            if self.ability.to_do_poker_hand == old_hand then self.ability.to_do_poker_hand = nil end
        end
    end
    if self.ability.name == 'Caino' then
        self.ability.caino_xmult = 1
    end
    if self.ability.name == 'Yorick' then
        self.ability.yorick_discards = self.ability.extra.discards
    end
    if self.ability.name == 'Loyalty Card' then
        self.ability.burnt_hand = 0
        self.ability.loyalty_remaining = self.ability.extra.every
    end
end
drowsy heath
#

Can't remember why I put it there but it just kinda worked idk

merry raven
#

Is there a context to detect when cards are drawn
I'm making a Joker that has a 1 in 8 chance of debuffing a card when each one is drawn

red flower
drowsy heath
#

Oh where do i need to put it

red flower
#

you don't just return { vars = center.ability.extra.Xmult }

daring fern
red flower
red flower
merry raven
#

Gotcha

iron burrow
#

How do you pull a joker description from the game state in lua?

daring fern
red flower
hidden sable
#

is there a way to make it so pressing next round sends you into the next blind under a bool condition

#

and also change the text

sonic cedar
formal quest
iron burrow
# red flower what's the end goal?

I am making a bot to play the game and want my bot to know what joker it's going to purchase. I am pulling the name but want the description so I can scan for text like chips or do NLP to determine if that's an effective purchase.

sonic cedar
#

oh ok

sonic cedar
daring fern
crisp coral
drowsy heath
#

Ok so after I removed the center.extra it says I have ability a nil value ....

vague crest
#

is there a way to tell if something has been ignored in the shop?

#

specifically im looking into making a joker that scales when a rare joker is skipped

red flower
vague crest
#

qwherre would i find information on this

daring fern
crisp coral
#

context.ending_shop, iterate through all cards in G.shop_jokers

iron burrow
vague crest
#

waitttt thats smart ok

sonic cedar
formal quest
vague crest
#

and the same could be checked on reroll no issues?

crisp coral
# daring fern Yes.

it's better to just provide the answer here instead of just saying Yes and waiting for the other person to ask again

daring fern
drowsy heath
#

Full joker script i have

#

Ik somet is missing still

red flower
drowsy heath
#

Oh

daring fern
sonic cedar
#

I’ll look

merry raven
red flower
merry raven
#

Oh alright

drowsy heath
#

So with that change what else do I do

sonic cedar
red flower
daring fern
drowsy heath
#

Doesn't crash now but still nil

red flower
drowsy heath
#

That was me forgetting to hit shift when typing my bad

wooden nexus
#

Got a weird dev question: how do I remove the whole "Modded Orders go after the vanilla order"

...At least changing it for a specific mod

formal quest
red flower
drowsy heath
#

Now it says 2x mult but doesn't actually do anything

daring fern
sonic cedar
#

yes

red flower
drowsy heath
#

I think ik what I need to change the

#

Then*

merry raven
# red flower both context don't happen at the same time, that's why I said "instead" you wan...

It did debuff playing cards as they are drawn, but it also occasionally debuffs cards where I don't want them to like Jokers, how do I limit it to playing cards? context.cardarea == G.hand didn't work for me

if context.cardarea == G.hand and context.debuff_card and pseudorandom('splinter_of_dread') < (G.GAME.probabilities.normal / (card.ability.extra.denom or 8)) then
            return{
                debuff = true
            }
        end
sonic cedar
#

let me try something

wooden nexus
formal quest
red flower
merry raven
#

Oh damn you can stack contexts like that?

drowsy heath
#

So I changed the things and no errors hasn't crashed and then when I play a card it crashes

formal quest
red flower
red flower
sonic cedar
drowsy heath
#

I mean i changed what I thought needed changing

formal quest
red flower
merry raven
# red flower `context.debuff_card.area == G.hand` iirc

Still didn't really work, gave me an error attempt to index field 'debuff_card' (a nil value)

if context.debuff_card.area == G.hand and pseudorandom('splinter_of_dread') < (G.GAME.probabilities.normal / (card.ability.extra.denom or 8)) then
            return{
                debuff = true
            }
        end
red flower
drowsy heath
red flower
merry raven
#

Ohhhhh

drowsy heath
#

Funny story, ability now has a nil value

#

Again

red flower
#

are you using Card again instead of card

#

lua is case sensitive

drowsy heath
#

Ah

#

THANK YOU IT WORKED

red flower
#

i do recommend copying the structure from vanillaremade if you can

merry raven
# red flower you need `context.debuff_card and` before

Now it's getting very fucky

  • Drawing cards didn't make them debuffed, even with the help of OA6
  • However, cloning OA6 with the debug tool will preemptively debuff the cards already in hand, removing/selling those OA6 jokers will just remove the debuffs on some of them
drowsy heath
#

Yeah just gotta fix my image problem now coz the card art isn't working

formal quest
#

@red flower Where do I find the love2d annotation folder? And do I need the balatro directory in AppData or steamapps\local?

red flower
formal quest
hidden sable
#

how can i change the blinds needed score

#

like multiplying it by 1.5 in blind

red flower
sonic cedar
red flower
merry raven
#

Maybe I'll forgo context.debuff_card and just use SMODS.debuff_card

formal quest
pastel torrent
#

is there a method for giving random consumables to the player I can use?

red flower
red flower
pastel torrent
#

how should I do it

red flower
#

like any consumable?

pastel torrent
#

any

#

correct

red flower
#
local random_set = pseudorandom_element({"Tarot", "Planet", "Spectral"}, "seed")
SMODS.add_card{ set = random_set }
red flower
#

yeah

hidden sable
#

didnt work

red flower
#

you need to update the text too

hidden sable
#

unless it didnt update visually

hidden sable
red flower
formal quest
#

This is my .luarc.json, but I don't think I'm getting any real suggestions. It's just those "abc" suggestions with random words.

hidden sable
#

can i use juice_up on it?

#

on the text object

red flower
#

yes

hidden sable
#

basically how the chips and mult display shake

red flower
#

i think so at least

#

you would need to find where the text object is tho

merry raven
#

How do you make a Joker not available in shops and booster packs

hidden sable
hidden sable
red flower
sonic cedar
#

oh my god it’s over

#

taking out the print so I can test properly

hidden sable
formal quest
red flower
hidden sable
red flower
sonic cedar
#

the frame drop is painful whenever it triggers

#

actually yeah no just in general

#

as long as this guy’s on the screen it initiates superlag

I’ll bring that up tmr though I need sleeeeeep

(Ok the game crashed yeah Im going gn all)

formal quest
#

I assumed vscode came with it, but it doesn't

hidden sable
#

i checked blind.lua and surprisingly it doesnt look like its there

#

it looks like G.GAME.blind.chip_text SHOULD be the object

red flower
hidden sable
red flower
#

like the string text

hidden sable
#

yeah ik

#

where would i find the text object

#

any pointers?

#

i found blind:wiggle()

red flower
#

it's in create_UIBox_HUD

hidden sable
#

in UI_definitions?

red flower
#

it doesn't have an id so it's going to be hard to manipulate

red flower
pastel torrent
#

what's the method to like execute function when the hand only get played and not for every card already?

hidden sable
#

maybe i can just blind:wiggle

red flower
hidden sable
red flower
pastel torrent
#

lmao

hidden sable
red flower
#

damn

#

well it was worth a try

hidden sable
#

does this mean its incapable of movement?

pastel torrent
#

I use a function that triggers

#

every card

#

lets say I only want it to trigger once the hand is played

#

and not for every card

chrome widget
#

How do you add custom badges to tags?

red flower
pastel torrent
#

this will play it every card scored

hidden sable
pastel torrent
red flower
pastel torrent
#

its a passive card

#

the one that gives

#

consumables

#

lol

red flower
#

yeah before is fine then

hidden sable
#

is there any way to add SOME form of animation to show the player the blinds value just changed

pastel torrent
#

also is there a method to force loose the game?

red flower
#
G.STATE = G.STATES.GAME_OVER
G.STATE_COMPLETE = false
pastel torrent
#

thanks

#

do I switch it to true?

chrome widget
#

How do you access a pool created via SMODS.ObjectType?

red flower
pastel torrent
chrome widget
#

I would've thought it was in G.P_CENTER_POOLS but i'm getting that the pool is nil

pastel torrent
#

ty

chrome widget
#

Do pools not add prefixes by default?
G.P_CENTER_POOLS['fnwk_women']

pastel torrent
pastel torrent
#

for some reason I didnt find any methods for that too

hidden sable
red flower
hidden sable
pastel torrent
#

man im such a dummy

#

lol

#

thx

hidden sable
red flower
#

blind's*

#

also in my mod I use Blind's requirement but I think your text is clear as well

hidden sable
#

trying to keep my text as vanilla as possible

red flower
#

punctuation is a feature of the English language not balatro

#

it doesn't use periods

formal quest
#

I've got a text question too that I probably should have asked here

hidden sable
formal quest
#

How can I make this description shorter? "+2 Mult per rank difference between highest and lowest scored card"

red flower
#

except Driver's License i guess

#

but it makes the description harder to read

#

it does use commas tho

hidden sable
#

i guess the rules for formatting are off and on

red flower
#

no, it just doesn't use periods

hidden sable
#

impretty sure theres like 5 jokers that use commas

red flower
#

scrolling through the wiki I count several more

hidden sable
#

even text color formatting is off too

#

its not using inactive

chrome widget
#

Hmm, I'm trying to get my tag to create cards in the shop, but for whatever reason, if you have multiple, it creates both of them in the second slot and overwrites the other? hm

chrome widget
#

There should inherently be room. For example, if you use two or more rare tags, it spends rare tags up to your number of shop slots

red flower
#

i have one like that in my mod and it works fine

chrome widget
#

Basically trying to do the same as the rarity tags but using a custom pool

    local women_in_possession = {}
    local women_count = 0
    for _, v in ipairs(G.jokers.cards) do
        local results = FnwkFindWomen(new_item.key)
        if (results.girl or results.trans or results.woman) and not women_in_possession[v.config.center.key] then
            women_count = women_count + 1
            women_in_possession[v.config.center.key] = true
        end
    end

    if #G.P_CENTER_POOLS['fnwk_women'] > women_count then 
        new_woman = create_card('fnwk_women', context.area, nil, nil, nil, nil, nil, 'fnwk_biased_tag')
        create_shop_card_ui(new_woman, 'Joker', context.area)
        new_woman.states.visible = false
        tag:yep('+', G.C.RED, function()
            new_woman:start_materialize()
            new_woman.ability.couponed = true
            new_woman:set_cost()
            return true
        end)
        tag.triggered = true
        return new_woman
    else
        tag:nope()
        tag.triggered = true
        return nil
    end
end```
#

Config type is correct

hidden sable
chrome widget
#

The rare tag uses "Rares in Possession" so I decided to keep it because I thought it'd be funny

hidden sable
pastel torrent
#

method to detect if card are spade, diamond, ect?

#

anyone has it?

hidden sable
pastel torrent
red flower
hidden sable
#

local v = context.other_card
if v:is_suit("Hearts") or v:is_suit("Diamonds") then

hidden sable
#

only works in context.individual

chrome widget
#

OOP wait

hidden sable
#

since im scoring per card

chrome widget
#

it's probably because I declared new_woman as a global

#

Yep, that was it

hidden sable
#

how can i add custom badges

chrome widget
#

Women are now available for purchase

hidden sable
red flower
#

local new woman available

sonic cedar
#

in my area????

chrome widget
#

Objectively this shouldn't be a good tag but since you can get both Blueprint and Brainstorm from it..........

#

shrug

red flower
formal quest
#

How do I access the scored cards in hand?

hidden sable
#

this item isnt op right

red flower
formal quest
hidden sable
#

how does one change hand size again

red flower
#

G.hand:change_size(mod)

maiden phoenix
#

Me when I ask N how to find happiness in life and he tells me 'self.ability.happiness = true'

red flower
#

happiness*

#

unless thunk misspelled that too

merry raven
#

How do I change a Joker's pos in the calculate function

hidden sable
maiden phoenix
#

Thanks for fixing my code N 👍

hidden sable
#

dont queston the blueprint spot

#

i forgot to move it

red flower
merry raven
#

Ayy cheers

hidden sable
#

biggest lie ive ever been told

formal quest
#

I'm too used to C#

hidden sable
gilded narwhal
#

hey whats the variable for your current hand size

hidden sable
#

G.hand_size maybe?

#

dont count on it

#

hows my organization?

unkempt thicket
hidden sable
normal crest
manic rune
#

has someone figured this out yet? :3

chrome widget
#

My mod is roughly 90-95% done programming wise. Probably more like 85% on the art side

#

Very exciting!!!

hidden sable
unkempt thicket
#

I mean one is art wise

chrome widget
#

I'm primarily be a programmer so art is not my main contribution to my mod because art sucks and I hate it

hidden sable
#

i don't have any plans for my mod so idk how close i am to finishing lol

hidden sable
#

my art sucks so i mostly just import images into cards

unkempt thicket
chrome widget
#

I'm a decent ish artist but I hate drawing so I don't do it

unkempt thicket
#

I also consider my self a decent artist

hidden sable
#

i'm only good at art for very few things

#

like ui

#

dunno how to program it but i'm good at making it

chrome widget
#

I can do pretty good 2D illustrations, pixel art is new for me but I've made some solid attempts

unkempt thicket
#

I'd say i'm good at 3d design, and decent at 2d all together

chrome widget
#

Probably my favorite one I've done of the few I've contributed

unkempt thicket
#

But just design i can barely make a 3d asset T_T

hidden sable
#

this is my best art, really bad but decent

formal quest
#

I'm going in from C# with very little lua knowledge. Is this code right or is it complete nonsense?

unkempt thicket
#

The one that's my favorite and the best i think I've done i did a while a go for sdm_0's mod

chrome widget
chrome widget
#

Otherwise it looks pretty good? Though capitalizing local variables or parameters isn't typically the style for Lua (as with Card)

hidden sable
chrome widget
#

It conflicts with the greater object type, Card

chrome widget
formal quest
unkempt thicket
chrome widget
#

For rank, you need to do card.base.value for the key of the rank, or you can use card:get_id() to return an id for the rank that can be modified by hooking the function

#

The keys are 2-10, Jack, Queen, King, Ace, and the IDs are 2-14 (for vanilla)

formal quest
#

How can I get the numerical value of the rank, like the base chip value?

chrome widget
#

That would be SMODS.Ranks[card.base.value]. nominal I think

#

I think the nominal is also scored on the card itself but idr

gilded narwhal
formal quest
lyric maple
#

got this error while doing a rebate/idol-style rank check

local function reset_kls_magenta_rank() -- line 451
    G.GAME.current_round.kls_mg_card = { rank = 'Ace' }
    local valid_mg_cards = {}
    for _, playing_card in ipairs(G.playing_cards) do
        if not SMODS.has_no_rank(playing_card) then
            valid_mg_cards[#valid_mg_cards + 1] = playing_card
        end
    end
    local mg_card = pseudorandom_element(valid_mg_cards, 'magenta')
    if mg_card then
        G.GAME.current_round.kls_mg_card.rank = mg_card.base.value
        G.GAME.current_round.kls_mg_card.id = mg_card.base.id
    end
end -- line 464
chrome widget
#

Might be?

unkempt thicket
chrome widget
#

Also I was mistyping, it's card.base.value, not card.base.rank

gilded narwhal
unkempt thicket
formal quest
#

How do I use the debug mod? Trying to spawn my joker to test

sour garden
#

is it possible to have a joker blueprint multiple jokers at once? or is it limited to only 1

hidden sable
#

what's the weight to make my booster pack as rare as a spectral pack

formal quest
#

Well here's my first crash. "Attempted to index field 'base' (a nil value)"

sour garden
hidden sable
tranquil gull
#

how would i replace a child node of something in the node's config.func

sour garden
tranquil gull
#

but that doesn't seem to be actually doing anything question mark?

crisp coral
#

oh

vague crest
#

weird question but how would i check in a joker if a specific voucher is redeemed?

#

trying to fix an edge case

crisp coral
#

try removing Node and just having the table

tranquil gull
#

engine/ui.lua:541: attempt to call method 'draw' (a nil value)

unkempt thicket
tranquil gull
crisp coral
#

guh?

tranquil gull
#

when i'm doing Node, it doesn't crash, but also just. doesn't draw at all

formal quest
#

How do I get the rank of a card like Raised Fist does?

tranquil gull
#

.ability.nominal iirc

#

no

#

card.base.nominal

formal quest
tranquil gull
#

check you're indexing the right thing

crisp coral
#

try e.UIBox:add_child(table, e) after killing the child

tranquil gull
#

but i just set it to nil

#
e.children[1]:remove()
e.children[1].UIBox:add_child{...}
#

like this?

crisp coral
#

i fixed it

#

use e as the main one

formal quest
tranquil gull
crisp coral
#

??? what's the main object

formal quest
#

What could be causing this to give +0 mult?

tranquil gull
#

i'm adding func = "my_thing" to the config of a G.UIT.C containing the child i wanna replace

#

nevermind it's not e.UIBox?

formal quest
#

I'm defining both highest and lowest as nil initially, but it's supposed to set them to a number

crisp coral
#

huhhh i thought e would be the uibox of the column node

tranquil gull
#

define them as -math.huge adn math.huge

#

it is

#

uibox does exist i was wrong

#

something else is fucky

formal quest
#

What's the fastest way to reload after code changes?

crisp coral
#

hold m, which is the same as closing and reopening balala

formal quest
#

mmmm

tranquil gull
#

you know, i don't think that's right

vague crest
#

making a joker which stops planets and planet packs from appearing, but the booster pack specific code is crashing when i pick the joker up, what would the best way be to go about this?

crisp coral
formal quest
tranquil gull
#

no, swap those

hidden sable
#

any synergies yall can think of if you could put jokers in your consumable slots

#

only one i can think of is brainstorm

#

not taking up a joker slot to trigger

formal quest
tranquil gull
#

hm

#

idk then

tranquil gull
# crisp coral uhm... hooray???

i'm trying to replace the operator node (the X for multiplying mult and chips)

{n=G.UIT.C, config={align = "cm", func = "operator_node_shit"}, nodes={
  {n=G.UIT.T, config={text = "X", lang = G.LANGUAGES['en-us'], scale = scale*2, colour = G.C.UI_MULT, shadow = true}},
}},
#

operator_node_shit is what's being called here

#

<@&1133519078540185692>

formal quest
#

I take out the nil check and it gives me "attempt to compare nil with number"

tranquil gull
#

hm

formal quest
#

Even though it's never nil

tranquil gull
#

weird

#

i'd say double check that with an assert

formal quest
#

As soon as the card is selected btw

tranquil gull
#

it's probably not being done in context.scoring_hand then

#

look elsewhere

formal quest
#

Where else?

maiden phoenix
#

context.scoring_hand is too wide of a calculation check, it exists in many calculation contexts

formal quest
#

My entire mod is this one joker

loud loom
#

Chavales agreguen un mod donde ce pueda acer el amor zizi ai ke acerlo

#

🥵✋️

maiden phoenix
#

Try adding and context.joker_main

formal parrot
#

Card reference to the joker

maiden phoenix
#

Oh that too

formal parrot
#

Not playing catds

formal quest
formal parrot
#

What are you trying to do

formal quest
maiden phoenix
#

context.joker_main is generally when jokers give their values like chip and mult

formal parrot
#

?

formal quest
formal parrot
#

That sounds easy enough

#

1 second

#

You’ll use context.before to calculate and context .joker_main to give mult

formal quest
#

So before is before scoring but after hitting play hand?

formal parrot
#

So do you want scored cards ? Or just played card

formal quest
#

Scored

formal parrot
#

Okay

#
For _,v in impairs(context.scoring_hand) do
Card.ability.extra.mult= Card.ability.extra.mult+v.base.nominal,```
#

Use this to calculate the mult bonus

#

Have a variable in config called mult

maiden phoenix
#

Inpairs typo

formal parrot
#
Return {mult=card.ability.extra.mult,
}
Card.ability.extra.mult=0,
— for reset mult each hand :)```
solid grotto
#

This bug is happening that wasn't happening before and I can't figure out why. The joker is supposed to prevent death like mr bones but it softlocks

#

Any ideas would be appreciated

formal parrot
#

@formal quest

#

This should 100% work

hidden sable
#

is there any way to draw a selected card from the deck first before any other card

maiden phoenix
hidden sable
maiden phoenix
#

A lot of mods do it

#

So ig

#

Idr the names tho

hidden sable
#

praying it is then

solid grotto
#

The top card is always known so you probably just change that variable

hidden sable
#

can i change it mid draw

solid grotto
#

You know how misprint tells you the top card in your deck

#

Idk how exactly it works

hidden sable
#

like draw one card

#

change the top card

#

draw another

#

change top card again

solid grotto
#

Hmm

formal parrot
#

This is how aiko does it

solid grotto
#

If you look in some mod like cryptid with a billion jokers I bet it'll be in there somewhere lol

formal parrot
#

You need to find the draw function and edit it

#

Should be easy

hidden sable
#

my end goal is to have a card enhancement that makes sure it's always drawn first

formal parrot
#

Well

#

You see problem is

crisp coral
#
function(e)
    if e.children[1] and not e.children[1].config.is_thing then
        e.children[1]:remove()
        e.children[1] = nil
        e.UIBox:add_child({n=G.UIT.T, config={is_thing = true, text = "meow", scale = 0.8, colour = G.C.RED, shadow = true}}, e)
    end
end

@tranquil gull fuckin hell

formal parrot
#

Cards dont have unique ids so you can’t draw your specific card

#

You can do

#

Draw enhanced cards first

formal parrot
#

With check

#

Has_enhancement

formal quest
# formal parrot <@877618872113561610>

That's helpful but the main thing I'm trying to deal with is this. I get a "attempt to compare nil with number" before scoring starts. I think I need a different context

formal parrot
#

Because

#

Card is the joker

hidden sable
#

yeah i think im gonna just scan the full deck and if any cards have the enhancement draw them to hand, and after ive looped through every card ill resume the games normal events and draw the real cards to hand

formal parrot
#

Not the playing cards

crisp coral
hidden sable
formal parrot
#

(Might )😭

hidden sable
#

hook onto what though is the question

#

context?

#

is there a context for drawing cards to hand?

formal parrot
#

Check aiko’s

#

Definitely can find some shenanigans There

formal parrot
hidden sable
#

tbh

formal parrot
#

Its called shenanigans for a reason

#

It cycles through drawn

solid grotto
formal quest
#

Still getting nil with number

solid grotto
#

Lol yeah that makes it work

#

I know practically nothing under the hood with this game I'm going purely off of how vanilla jokers work
Idk what that return true even actually does

#

I should've noticed that though because it's in every other joker that expires

formal parrot
#

And lowest

formal quest
formal parrot