#💻・modding-dev

1 messages · Page 198 of 1

kindred heron
#

Wants to add more

jovial harness
#

Just add another SMODS.Joker{} in the same file

kindred heron
#

You can do that

jovial harness
#

Yep

kindred heron
#

Oh sweet

woeful tusk
#

cant be stickers put on localization? it has to be with loc_txt?
i doubt it, how it is please?

normal crest
#

to put it in your localization put it under misc.labels.modprefix_key

#

that's for the label only

#

to put the name and description it goes under descriptions.Other.modprefix_key

sturdy compass
#

Alright something came up so I won’t be able to help for about another hour but I’d still be more than happy to when I can

onyx sonnet
#

ill still be up by then

kindred heron
hot island
#

what did you change in lovejs

#

all i changed was something to make it fullscreen

#

also did you end up getting seeds to be identical to love2d balatro

#

oh yeah for sure i just wanted to change as little as possible between updates

sonic cedar
#

why does this crash the game on startup?

tired marsh
#

hello! i am making a joker that draws a steel card from your deck after you've drawn cards or would have if your hand was full. i tried using context.hand_drawn, but if your hand is full it does not trigger, and i have not found another context that works with that same timing but regardless of if you've drawn cards or not. does anybody know a workaround/context that works here?

grim remnant
#

question! how do we change the ratio of a joker's card back, like square joker does? we have one joker that's stubbier than the others and we think it'd be fun if that smaller size appeared properly for amber acorn

frosty dock
quasi bison
#

are there any docs?

frosty dock
quasi bison
#

ty

onyx sonnet
#

aure do you have a macro for the smods wiki

kindred heron
# kindred heron Why

I tried using calculate_effect to make text appear when the card dies but it just crashes the game

frosty dock
sonic cedar
kindred heron
maiden river
frosty dock
#

<@&1133519078540185692>

maiden river
#

🤨

#

I think not

shy quest
#

🔫

frosty dock
#

ty header

quasi bison
maiden river
#

phishing links are the bane of my existence

dim lynx
#

wow i cant believe they giving out steam gift cards shocker

manic rune
#

i pressed the link chat

#

im getting free money

sonic cedar
manic rune
#

🤑

onyx sonnet
#

AW DANGIT

tired marsh
#

wait why are the mean moderators taking all of the free steam gift cards... 😢

onyx sonnet
#

i missed free money

manic rune
#

im rich yall, buying a lambo rn 🤑

onyx sonnet
#

buying ajimbo rn

maiden river
#

think of the steam card like an egg

jovial harness
jovial harness
sonic cedar
manic rune
#

$20 steam giftcard giveaway
egg.com

chrome widget
#

what the heck is a stencil buffer

#

I hate this

#

Has anyone here actually used the love2D stencil functions for a mod? Attempting to find specific examples for balatro, expectedly, leads me to many pages about Joker Stencil

frosty dock
frosty dock
chrome widget
#

Ah damn

manic rune
#

:(

sonic cedar
chrome widget
#

I'm basically attempting to procedurally create a negative space in whatever texture I pass into it and I should be able to use the built-in stencil functions for that, but I'm getting really weird results probably because of other stuff that's built in to prepare graphics drawing

#

will continue research

old bane
granite kettle
edgy reef
frosty dock
# sonic cedar im still really bad with hooks how would i start setting this up
local cuc = Card.use_consumeable
Card.use_consumeable = function(self, area, copier)
  local odds_mod = 1
  for _,v in ipairs(SMODS.find_card('j_mod_yourjoker')) do odds_mod = odds_mod * v.ability.extra.odds_mod end
  if self.config.center.key == 'c_wheel' then G.GAME.probabilities.normal = G.GAME.probabilities.normal * odds_mod end
  cuc(self, area, copier)
  if self.config.center.key == 'c_wheel' then G.GAME.probabilities.normal = G.GAME.probabilities.normal / odds_mod end
end

something along the lines of this

rough furnace
chrome widget
#

flying blind is fun

old bane
#

So i'm trying to make a matador+ luchador hybrid but it doesn't work... if I just do G.GAME.blind.triggered, it increases cur_hands to 3 already, but if i do this, it doesn't increase at all. Any advice?

        if context.debuffed_hand then 
            if G.GAME.blind.triggered then
                if card.ability.extra.cur_hands >= card.ability.extra.hands then
                    if G.GAME.blind and ((not G.GAME.blind.disabled) and (G.GAME.blind:get_type() == 'Boss')) then 
                        card_eval_status_text(context.blueprint_card or card, 'extra', nil, nil, nil, {message = localize('ph_boss_disabled')})
                        G.GAME.blind:disable()
                        card.ability.extra.active = true
                    end
                else
                    card.ability.extra.cur_hands = card.ability.extra.cur_hands + 1
                    return{
                        message = localize("pm_upgraded"),
                        card = card
                    }
                end
            end
        elseif context.cardarea == G.jokers and context.before then 
            if G.GAME.blind.triggered then
                if card.ability.extra.cur_hands >= card.ability.extra.hands then
                    if G.GAME.blind and ((not G.GAME.blind.disabled) and (G.GAME.blind:get_type() == 'Boss')) then 
                        card_eval_status_text(context.blueprint_card or card, 'extra', nil, nil, nil, {message = localize('ph_boss_disabled')})
                        G.GAME.blind:disable()
                        card.ability.extra.active = true
                    end
                else
                    card.ability.extra.cur_hands = card.ability.extra.cur_hands + 1
                    return{
                        message = localize("pm_upgraded"),
                        card = card
                    }
                end
            end
        end
frosty dock
#

then you'd need to setup a custom loc_vars function that does similar things for the wheel so it actually displays

edgy reef
#

There's a whole Shape API (prob for love.physics)

rough furnace
#

Somone should add physics to moveables

frosty dock
#

moveable physics

frosty dock
#

as opposed to stationary physics-?how does that work

sonic cedar
frosty dock
#

I'm talking about the physics itself being moveable/stationary

sonic cedar
#

ohhhh

#

oh what the hell

frosty dock
#

exactly

manic rune
#

is it possible to render 3D objects in balatro

edgy reef
#

Not easily

frosty dock
#

it's in the name

#

Love2D

sonic cedar
#

drop love3d

frosty dock
#

(disregard that's not actually the name)

#

it's actually LÖVE

manic rune
#

i mean, ive seen 2D stuff rendering 3D

edgy reef
sonic cedar
#

drop love4d

manic rune
#

would we even be able to comprehend that

sonic cedar
#

no

frosty dock
#

drop love5dchesswithmultiversetimetravel

sonic cedar
#

peak

manic rune
#

loveoopsall6D

frosty dock
#

cba

manic rune
#

hh

frosty dock
#

what

manic rune
#

what

frosty dock
#

chess battle advanced

manic rune
#

hello hello

sonic cedar
#

add fps mechanics to balatro

#

let me bhop a blind

frosty dock
manic rune
#

no i swear i understood what cba was, and totally didnt just send random letters

tardy wind
#

Is the game able to handle multiple suits per card ? Or should I turn to something like seals to add additional attributes to cards

red flower
#

can you can buy cavendish by having gros michel expire in another run in multiverse time travel balatro

rough furnace
#

No hut you can take that runs Cavendish and put it in your run

frosty dock
red flower
#

you create another timeline for every lucky card triggered

manic rune
#

you would somehow buy both cavendish and gros michel in which case, as there's another timeline when both are hooked to each other, so you brought the two jokers from two different timelines into one

manic rune
#

when glass cards shatter, reality shatters too

frosty dock
#

cards can also only have one seal, something that can stack is stickers

tardy wind
#

whats stickers

rough furnace
#

Like eternal, perishable and rental

frosty dock
#

extension of eternal perishable and rental

tardy wind
#

never seen those yet imma look them up but stickers might be what im looking for

rough furnace
#

They only appear on higher stakes

#

In vanilla

tardy wind
#

idea is adding elements (fire air etc) to individual cards through tarots and whatnot but without taking a seal spot or changing the base suit (tho changing base suit could be an idea)

#

so stickers could be good

manic rune
#

i swear someone added elements before

tardy wind
#

since they stack

tardy wind
manic rune
#

TheAutumn uhh something

frosty dock
#

yeah you want stickers if they should stack, but be warned they're still a bit jank on steamodded's side

tardy wind
#

I guess I gotta implement and see what makes the most sense

manic rune
tardy wind
manic rune
#

yup

#

they r elements too

tardy wind
#

wheres that from

manic rune
#

though its completely fine if you still want to add your ideas, even when they r already done by someone else

#

its your mod after all lol

modern kindle
#

with how many people are modding this mf chances are having a totally original idea is slim, so may as well just do your best to incorporate your own idea :D

sonic cedar
# manic rune

add a time sticker so i can say by the card of agamotto

modern kindle
#

i know ive had the same idea as a few other people but it aint stopped me, i just do it a bit diff

tardy wind
#

My ideas arent even original anyway in the grand scheme of things

#

so

rough furnace
modern kindle
#

hang on let me go to ur mod and copy paste everything rq

#

its important

manic rune
#

i claimed j_hawktuah as mine

#

please don't steal the idea.

modern kindle
#

erm, i literally just wrote it in a text doc

#

too late

manic rune
#

grrrrrr

onyx sonnet
#

joke tuah

modern kindle
#

mine is different tho trust, its j_hawktuahgold

onyx sonnet
#

mult on that thing

red flower
manic rune
#

😭

modern kindle
#

we could try but it depends who claimed it first

sonic cedar
manic rune
#

development pauses tomorrow.

onyx sonnet
#

implementing pluey into balatro rn

red flower
#

development continues until morale improves

tardy wind
modern kindle
#

That's the secret cap, as long as there's development there can never be any morale

onyx sonnet
#

@sturdy compass 👉👈

sturdy compass
#

Yep I just got back

#

perfect timing

#

So where are you sitting now

onyx sonnet
#

Joyous egg

#

I added the patch you showed me to the lovely.toml, i dont really have much context on how it operates so i couldnt do much from there

sturdy compass
#

gotcha

#

So if I'm interpreting correctly, this joker will increase the number of cards you can choose from Arcana packs?

onyx sonnet
#

Mhm

sonic cedar
sturdy compass
#

Would multiple copies of the card in hand increase it further?

onyx sonnet
#

yeah

sturdy compass
#

ok cool

frosty dock
onyx sonnet
#

FYI im not going to allow this to be blueprint compatible

sturdy compass
#

I imagined so

novel violet
#

so i'm working on a consumable that draws 2 random diamonds to deck - it's just about fully functional & even properly checks to make sure there are diamonds to draw before attempting to draw each one, sends a message and ends otherwise
issue is that, exactly once per testing session among like 5, one of the cards drawn ended up being a phantom card like this. I have exactly no idea how this is happening

    use = function(self, card, area, copier)
        local DiamondIsUnbreakable = {}
        for _, k in ipairs(G.deck.cards) do
            if k:is_suit('Diamonds') then
                table.insert(DiamondIsUnbreakable, k)
            end
        end
        local j = #DiamondIsUnbreakable or 0
        if j > 0 then
            for i = 1, 2, 1 do
                if j == 0 then
                    SMODS.calculate_effect({
                        message = "No Diamonds?",
                        colour = G.C.PURPLE,
                        card = card
                    }, card)
                    break
                end
                local selection = pseudorandom_element(DiamondIsUnbreakable,
                                                       pseudoseed('KQSkill'))
                if selection then
                    draw_card(G.deck, G.hand, nil, 'up', false, selection)
                    DiamondIsUnbreakable = {}
                    for _, k in ipairs(G.deck.cards) do
                        if k:is_suit('Diamonds') then
                            table.insert(DiamondIsUnbreakable, k)
                        end
                    end
                end
                j = j - 1
            end
        else
            SMODS.calculate_effect({
                message = "No Diamonds?",
                colour = G.C.PURPLE,
                card = card
            }, card)
        end
        return true
    end,
...
sturdy compass
# onyx sonnet FYI im not going to allow this to be blueprint compatible

Ok try this on for size. Replace anything you might want

    # Apply modifier to pack choice
[[patches]]
[patches.pattern]
target = "card.lua"
pattern = "G.GAME.pack_choices = self.ability.choose or self.config.center.config.choose or 1"
position = "after"
payload = '''
local cards = SMODS.find_card('YOUR JOKER KEY') -- local variable name can be changed
if self.kind == 'Arcana' and next(cards) then
    G.GAME.pack_choices = math.min(G.GAME.pack_choices + #cards, self.config.center.config.extra)
end
'''
match_indent = true
times = 1
onyx sonnet
#

will do

sonic cedar
sturdy compass
# onyx sonnet will do

To give you a more technical explanation, "cards" holds a table of cards that are in your hand and match the given key. Afterwards, it's checking if the pack being opened is of kind 'Arcana' and if "cards" is actually populated. If both are true, it will add #cards to G.GAME.pack_choices. There's also a math.min that makes it so the choice count can't go over however many cards are in the booster

crimson dune
#

I'm currently programming a Boss Blind that will generate 3 Cursed (will always harm you in some way) Jokers on blind selection. Problem is, it keeps on spamming Jokers after selection (quickly spawning Jimbos instead cause there are only 4 Cursed Jokers, 3 in Cryptid, one made by me), where it should just spawn 3 on select. Is there a method to avoid repeating this function or is Spawning Cursed Jokers out of the question for Boss Blinds outside of Hooks or Patches? Here's part of the code for the Boss Blind:

SMODS.Blind{
    key = 'unik_purple_pentagram',
    boss = {min = 1, showdown = true}, 
    atlas = "unik_showdown_blinds",
    pos = { x = 0, y = 0},
    boss_colour= HEX("7b00ff"),
    dollars = 6,
    mult = 2,
    config = {},
    set_blind = function(self, reset, silent)
        if not reset then
            G.GAME.unik_killed_by_pentagram = true
            for i = 1, 3 do
                local card = create_card("Joker", G.jokers, nil, "cry_cursed", nil, nil, nil, "unik_pentagram_curse")
                card:add_to_deck()
                G.jokers:emplace(card)
                card:start_materialize()
                G.GAME.blind.triggered = true
                G.GAME.blind:wiggle()
            end
        end
    end,
frosty dock
sonic cedar
#

ok that's the part i dont get
taking ownership i mean

tall wharf
#

how do i make consumable set not give Jimbo by default when nothing is valid in the pool

novel violet
sturdy compass
novel violet
#

never in my life have i seen so many jimbos

manic rune
tepid crow
crimson dune
#

In my case, it should just spawn 3, not spam much more after selection endlessly (as funny as it looks initially)
should I just use hooks/patches to manually add a one-time function linked to this or can it be (somehow) done just inside SMODS.blind?

tardy wind
novel violet
tepid crow
manic rune
#

im on phone so i cant read your code 😭

novel violet
#

i think that it's somehow getting a null reference and drawing that

#

which... shouldn't be possible?

#

stale reference more like

sturdy compass
novel violet
#

it iterates through every diamond in the deck and adds that to an array, then it randomly selects one diamond from this array and draws that card
after drawing a card, it completely remakes the diamonds array such that it won't include the one that was just drawn, just as a failsafe

#

what i'm failing to understand is how at any point it's drawing an invalid card

tepid crow
novel violet
#

that'd be sick tbh

tardy wind
#

You could iterate through array elements and print them...

tepid crow
novel violet
tepid crow
#

I'd also like to mention I am very annoyed every time I have to code in a language that doesn't even have a function like that built-in

novel violet
#

i'll do it

novel violet
tardy wind
# novel violet are you able to have it print an entire array...?
function Utils.tableToString(tbl, indent)
    if not indent then indent = 0 end
    if type(tbl) ~= "table" then return tostring(tbl) end

    local str = ""
    for k, v in pairs(tbl) do
        local formatting = string.rep("  ", indent) .. k .. ": "
        if type(v) == "table" then
            str = str .. formatting .. "\n" .. Utils.tableToString(v, indent+1)
        else
            str = str .. formatting .. tostring(v) .. "\n"
        end
    end
    return str
end

sendDebugMessage(Utils.tableToString(), "Logger")

i got that. should work ?

#

though tis for tables

tepid crow
#

Lua doesn't have arrays, strictly speaking

#

the built-in ones should also be good enough for 99% of use cases

tardy wind
#

its all tables

manic rune
#

how are those tables

#

theres no table emoji????

tall wharf
#

hii

#

🚰

#

OMG TETO

novel violet
#

:3

manic rune
#

teto my beloved

#

ngl im still reminded of mesmerizer whenever i see teto now

tepid crow
tall wharf
#

yeah this has art now

manic rune
#

TETO

sturdy compass
#

banger

tall wharf
#

the observer is judging you

manic rune
#

what do the redstone jokers do?

tardy wind
#

they allow joker to the right to function

tall wharf
#

these are individual component

manic rune
#

looks like redstone

tall wharf
#

no correlation

#

just standalone

manic rune
#

aw

#

:(

onyx sonnet
sturdy compass
#

ur fine

onyx sonnet
#

i tried this with multiple keys but it doesnt seem to be working

#

i tried the one i use for localization "j_snaz_tealeaves" and the one from the joker itself "tealeaves" but neither worked

sturdy compass
#

the first one should be the one you use. Can I see the edits you've made?

#

Also try self.config.kind instead of self.kind

onyx sonnet
#

i dont think i changed any after i changed the name itself

onyx sonnet
sturdy compass
#

hmm

onyx sonnet
#

do i need to add something to the joker itself?

sturdy compass
#

no you should be fine with just this

#

Take a look in your logs, double check that the patch is being applied properly

tepid crow
#

try self.config.center.kind and definitely use j_snaz_tealeaves

sturdy compass
#

That could be it too

#

I'm so bad with accessing card constants lmao

tepid crow
#

I just bruteforce that stuff

sturdy compass
#

real

tepid crow
#

💯

onyx sonnet
#

@sturdy compass works perfectly!

sturdy compass
#

hell yeah

tepid crow
#

oh, it was self.config.kind? nice

onyx sonnet
#

@sturdy compass if i wanted to do something similar but for pack size, how would i do that? you said pack choices is a custom variable so im not sure how exactly that fits into the packs changing?

sturdy compass
#

I said choice_mod was custom, pack_choices is vanilla

novel violet
onyx sonnet
#

so it would be pack_extra for increasing the size of it?

sturdy compass
sturdy compass
#

Ok no, the variable you'd want to change to modify pack size is self.ability.extra, and do that before changing pack_choices

onyx sonnet
#

🫡

#

ty so much

sturdy compass
#

np

tired marsh
rose dragon
#

why is this crashing?

hasty ravine
#

For colored text, what's the C: tags for the suits?

#

Is it just C:Hearts

sturdy compass
long sun
#

baaaaaaaaack!

sturdy compass
#

wb

sturdy compass
hasty ravine
#

Tyty

rose dragon
tardy wind
#

looks related to your blinds

#

so its not the atlas

sturdy compass
#

Yeah that's not an atlas issue. It looks like one of your blind colors are not properly defined

long sun
#

hokai, still trying to figure out the error, and i think it's here:

elseif context.remove_playing_cards and not context.blueprint then
    local count = 0
        for k, v in ipairs(context.removed) do
            if v:is_suit("Diamonds") then count = count + 1 end
        end
        
        if count > 0 then
            card.ability.extra.current_xmult = card.ability.extra.current_xmult + (card.ability.extra.added_xmult * count)
            return
            {
                message = card.ability.extra.current_xmult,
                color = G.C.RED,
                card = card
            }
        end
    end```
#

specfically here:

elseif context.remove_playing_cards and not context.blueprint then
    local count = 0
        for k, v in ipairs(context.removed) do
            if v:is_suit("Diamonds") then count = count + 1 end
        end```
normal crest
#

does it stop happening if you remove that code

sturdy compass
#

what's your error again?

long sun
#

_ _

long sun
#

lemme give that a go

wintry solar
#

your message isn't a string

#

that's why it's complaining about the string being a number

long sun
#

...oh =w=

sturdy compass
#

I was wondering if that was the case

long sun
#

waiiiiit but why did it work above?

#

well, this'll probably work :D

wintry solar
#

where's the code that did work?

long sun
#
if context.cards_destroyed and not context.blueprint then
        local count = 0
        for k, v in ipairs(context.glass_shattered) do
            if v:is_suit("Diamonds") then count = count + 1 end
        end
        
        if count > 0 then
            card.ability.extra.current_xmult = card.ability.extra.current_xmult + (card.ability.extra.added_xmult * count)
            return
            {
                message = card.ability.extra.current_xmult,
                color = G.C.RED,
                card = card
            }
        end```
#

also yaaaaa it works now! :D

#

thanks ^^

wintry solar
#

probably some jank with adding 0 to a number

long sun
#

oh observing how it acts now, it didn't work before, but it didn't crash

sturdy compass
wintry solar
#

I don't think context.glass_shattered ever triggers

long sun
#

i've observed it triggering just now

wintry solar
#

oh actually yeah it says > 0

sturdy compass
long sun
#

confused as to why it's in yellow though, did i get the wrong colour name?

#

oh ya nevermind i did =w=

wintry solar
#

yeah glass_shattered isn't a thing

#

so your count never incremented

#

which is why it wouldn't crash

long sun
#

i'm so used to using the american spelling that i forgot how it should be spelled :)))

sturdy compass
#

colour trollbriish1

long sun
#

what? but it does work, i'm confused

#

lemme test by removing the bottom code

tardy wind
#

there is no bug.

normal crest
dreamy thunder
#

isnt glass_shattered a vanilla thing

long sun
#

oh yeah you're right, i was mistaken somehow :P

normal crest
#

yeah it most definitely is a vanilla thing

dreamy thunder
#

and its used for canio

wintry solar
#

yeah but smods removes it

dreamy thunder
#

oh

rapid stag
#

hey, i'm trying to make a challenge where you start with 5 debuffed stencil jokers and from ante 2 onwards, beating a boss blind will undebuff one - but i'm having trouble trying to detect that the challenge is active to trip my (un)debuffing code? because checking for G.GAME.modifiers.(my challenge id) doesn't work, so i don't know what variable i can look at to see the currently active challenge

does anyone have any advice

rapid stag
long sun
#

no wait no it's stopped working??

#

what?

long sun
#

maybe i'm not up to date on this computer though

#

i'll update the big 3

wintry solar
#

actually, context.glass_shattered isn't even a vanilla thing from what I see in my local code

tardy wind
#

maybe glass_shattered is the friends we made along the way

sturdy compass
#

oop you already got a response

#

my bad

long sun
spring lantern
#

aight i wanna try to implement this challenge... think i chose something a wee bit complex for my first attempt at one tho lol

wintry solar
#

it isnt

#

it's never created and sent to the calc functions

#

theres lots of remnants there that don't exist anymore

long sun
#

oh weeeeeird

#

i getcha

spring lantern
long sun
#

must be a timing issue then

manic rune
long sun
#

i have a joker that creates and destroys glass cards in one hand

#

but that didn't trigger my other joker

spring lantern
#

i can also just make it lik 1.5x or smn

#

if i can even figure out how to implement it

tardy wind
#

start simple

#

I feel like adding a multiplicator to score amount is the simplest (The Wall exists)

long sun
#

oh now it triggers

#

what

wintry solar
#

oh and it doesn't crash from the nil table in ipairs because context.cards_destroyed also isn't a thing that exists

long sun
#

ohhhhhhh waitwaitwait

#

lemme describe the bug i'm experiencing

normal crest
#

Oh lol

#

context.remove_playing_cards

long sun
#

i think the joker that creates and destroys the glass does that in joker_main, but my other joker also scores there

#

i have a different one that just gives money and doesn't score, and it works

#

ohhhhhh so i guess it's returning before it's incremented itself

#

right. ughhh.

wintry solar
#

whats the intended effect?

long sun
#

glass created > Eraser gives XMult > glass breaks > Eraser upgrades > Coiny gives money

#

what actually happens:
glass created > Eraser gives XMult > glass breaks > Coiny gives money

#

oh no it triggers here instead [Blocky]:
if context.destroying_card and context.destroying_card.ability.name == 'Glass Card' then

#

also it's weird that Coiny gives his money before the cards break

normal crest
#

context.destroying_card is for marking cards as destroyed

long sun
#

lemme take a recording

normal crest
#

not for them actually breaking

long sun
#

ah =w=

normal crest
#

use this to check for destroyed cards

keen coral
#
    key = 'bearmarket',
    loc_txt = {
        name = 'Bear Market',
        text = {
            "{C:green}#1# in #2#{} chance to give {C:money}$#3# {}at", 
            "the end of round",
            "{C:red}SELF-DESTRUCTS{} in #4# rounds"
        }
    },
    config = {extra = {odds = 2, dollars = 1, extra = 4}},
    loc_vars = function(self, info_queue, card)
        return { vars = {(G.GAME.probabilities.normal or 1), card.ability.extra.odds, card.ability.extra.dollars, card.ability.extra}}
    end,```

is there any existing var similar to `card.ability.extra` that can be used to just store a value that counts down? i can't use `card.ability.extra` because it then displays as a table when playing.
long sun
#

oh i'm already doing that in both jokers

#

Blocky uses it to actually destroy the cards

#
if context.destroying_card and context.destroying_card.ability.name == 'Glass Card' then
      G.E_MANAGER:add_event(Event({
        func = function()
          if card.ability.extra.will_play_sound then
            play_sound("bfdi_blocky", 1, 0.75)
            card.ability.extra.will_play_sound = false
          end
          return true
        end
      }))
      return {remove = true}
    end```
normal crest
#

So anything you put in config will be in card.ability and will be stored along with the joker

#

So what I'm saying is... just add another value to extra which is the counter you want

keen coral
#

ah, so adding smth like countdown = 4 as the 4th value in extra will make #4# pull 4?

normal crest
#

Not at all

#

That is entirely based on the order you return values in loc_vars

#

So if you wanted a countdown in your card do something like config = { extra = { whatever else was here before, countdown = 4 } }, then in loc_vars you pass card.ability.extra.countdown

keen coral
#

oh damn i can call a card.ability whatever i want? i misinterpreted card.abilities as smth the game already had defined and that you had to pull from an existing card.ability or make a new one yourself in a directory somewhere.

#

got it, makes sense now. tysm!

keen coral
#

i pull a lot of my programming/modding knowledge from emerald-decomp, where if you wanted to add a var that was pulled universally you needed to add it to a #globals directory.

tardy wind
#

besides im pretty sure you can add whatever you want to any table in the game

keen coral
#

that's super sick

tardy wind
#

(cause lua)

keen coral
#

lua goated

tardy wind
#

not really

#

its just fine

#

sure makes everything a hell lot easier tho

long sun
#

okay got it working! i reordered everything, and used a status text call instead of a return

#

thanks!

spring lantern
#

hey so uh i assume you can make your own custom rules for challenges? what's the best way of going about it

junior sierra
#

Where would I figure out how to affect the editions of cards that show up in the shop?

tardy wind
spring lantern
#

i mean yeah but where do i actually implement the rule

tardy wind
#

the custom thing doesnt do anything by itself... its just for you to use, and also to create a text reference to insert text

#

so the custom doesnt really matter by itself (unless you attach a value), you just write code for the challenge itself

junior sierra
spring lantern
#

i think that might be a bit complex for a first card

junior sierra
#

That's sorta what i'm going for yea

spring lantern
#

like usually i'd recommend trying out a classic mult type joker to get used to working with the smods framework

#

then you can go for more original stuff when you get a grasp of whats possible

tardy wind
#

You can also use code pathcing with lovely.toml or hooks directly to add any custom code you might need

spring lantern
#

as a beginner that might also be a bit much unless you have good experience with programming other stuff

#

so i guess if you feel confident go for it

junior sierra
#

I don't think what i'm going for is particularly too complicated

#

It's just something I want to do where I check for a specific card in a shop and if it's there then I want to change it's edition

tardy wind
#

(protip: you are allowed to look at other mods source code. cryptid does a lot that can be used as template)

frosty dock
#

(cryptid also does a lot that you should not use as template)

ivory coral
#

maybe dumb quetion but whats the context steel cards score in? im trying to make an enhancement that gives an effect while its held in hand like steel cards

spring lantern
#

context.individual and context.cardarea == G.hand i think

rapid stag
#

does anyone have the structure of a joker as it appears in the G.jokers.cards table?
for some reason, G.jokers.cards[#].key is always nil despite there being jokers present and i feel like i'm doing something wrong

spring lantern
#

haven't checked in a bit but try G.jokers.cards[#].config.center.key

rapid stag
#

...ahhhh cirDerp thanks

spring lantern
#

yeah the structure of cards is a bit of a maze sometimes

wintry solar
#

it's because a card object is made up of a lot of different things

ivory coral
spring lantern
#

oh wait ur doing an enhancement mb

ivory coral
#

that i am

dreamy thunder
#

if context.main_scoring and context.cardarea == G.hand then

iirc

spring lantern
#

yea i havent worked with enhancements before but readin thru the wiki and i was about to suggest that

#

i think it should work

tardy wind
#

if context.cardarea == G.hand

ivory coral
dreamy thunder
#

no worries

tardy wind
#

But if you want a steel card enhancement-like thing, steel cards set h_x_mult in card.ability

#

but i guess you want custom stuff

wintry solar
#

calculate gives you more control

tardy wind
#

true

junior sierra
next pivot
#

How would I do ^2 mult/chips in my joker code?
Edit: it’s Emult_mod and Echip_mod

tardy wind
next pivot
ivory coral
next pivot
#

I don’t think that worked.

#

Also how would I get the chips/mult amount? I’m not exactly sure how.

tardy wind
#

GAME.current_round object

#

(i believe0

#

game.current_round.current_hand.mult and game.current_round.current_hand.chip_total

spring lantern
#

what the fuck have i done

next pivot
#

alr I’ll check

sturdy compass
spring lantern
#

tell that to the base game code

#

like i have no idea where the fuck this came from

next pivot
spring lantern
#

all i know is it's caused by me adding this to my localization table

tardy wind
#

also theres a g.

next pivot
tardy wind
#

G.GAME.current_round.current_hand.mult

#

this is the correct syntax

next pivot
#

oh okay

junior sierra
spring lantern
#

why is my challenge called ERROR

tardy wind
#

no title ?

next pivot
spring lantern
#

did i write somethin wrong

next pivot
#

*loc_txt

spring lantern
#

im using a localization file rather than loc_txt

next pivot
#

ok well I thought you still needed to do that iirc?

spring lantern
#

not with a loc file no

next pivot
#

ah oke

spring lantern
#

you do need loc_vars for dynamic variables & colors & info cards

tardy wind
#

Also, I think I was wrong on the mult variable. the one I linked you was for the hand type being played, the mult amount is calculated and changed dynamically when evaluating play

#

in G.FUNCS.evaluate_play thats where joker effects (and card effects) are applied, updating local variable mult... you'd have to use lovely toml code injection stuff to mess with it I think ?

old bane
#

how do i hook into card functions? I wanna do something like

local get_chip_mult_ref = get_chip_mult
function Card:get_chip_mult()
    local result = get_chip_mult_ref()

but i don't think that's how it works. if I do

local get_chip_mult_ref = get_chip_mult
function get_chip_mult()
    local result = get_chip_mult_ref()

then it doesn't do anything

red flower
plush cove
old bane
red flower
#

Card:get_chip_mult() is the same as writing Card.get_chip_mult(self)

#

there you're passing 2 self

old bane
#

oh

#

so then how?

spring lantern
#
function Card:get_chip_mult()
  local result = get_chip_mult_ref(self)```
#

wait

red flower
#

also wrong lol self doesn't have a get_chip_mult_ref

junior sierra
#

Wait you can reference functions from Balatro's code in your mod like that? How do you do that

spring lantern
#

incredible showcase of my thinking skills

red flower
# junior sierra Wait you can reference functions from Balatro's code in your mod like that? How ...
Klei Entertainment Forums

In LUA, it is a very important concept to understand that everything is a variable and all variables may be edited in runtime. This includes functions. With modding other peoples' LUA files, like Klei's basegame code, you may find yourself wanting to run your code before or after the original fun...

hasty ravine
#

I'm not sure why the game crashe dhere. It said that it expects a '}', but the } is at the end of the code. Does anyone here see the problem?

red flower
#

missing a comma after loc_txt

hasty ravine
#

Ah, that'd do it

spring lantern
#

how do i get the rarity of a joker card again?

#

was it in config.center

red flower
#

yeah

old bane
#

Me when I'm trying to make a Joker that modifies booster packs in a similar way to Cryptid but lovely says theres no match 😦

target = "card.lua"
pattern = "G.GAME.pack_choices = self.config.center.config.choose or 1"
spring lantern
#

bro i forgot base game does rarity using decimals sober

#

localthunk moment

old bane
#

bruh i knew i was forgetting something

red flower
#

this might be one of the recent booster changes

junior sierra
#

I see that the set cost function uses #find_joker('Astronomer') > 1 to check if you have Astronomer in your current joker slots, right? Is there a way to check what Jokers are in your shop however

red flower
#

iterating through G.shop_jokers probably

junior sierra
#

What file is that in?

#

Game.lua? Or

red flower
junior sierra
#

So how would I check a joker's name through that?

cerulean rose
#

and class prefix

junior sierra
#

(My experience in this is very low)

red flower
#
for _, card in ipairs(G.shop_jokers.cards) do
    if card.config.center.key == "j_key" then
cerulean rose
frosty dock
#

congiof

junior sierra
#

But i'm looking for one specific joker?

red flower
#

im bad at typing

cerulean rose
#

yeah

#

key is better to look for a specific joker

junior sierra
cerulean rose
#

thats a thunkism

junior sierra
#

Ahhhh gotcha

cerulean rose
#

will cause issues if multiple mods have a joker with the same name

#

also name isn't a required parameter in smods

junior sierra
#

Alr!

#

Where do I find a joker's key from the base game?

red flower
junior sierra
#

Ah gotcha it's the translation key

red flower
#

yeah

cerulean rose
junior sierra
#

I just crashed it 💔

#

No clue what I did wrong

red flower
#

anyone has the show the crash log sticker

junior sierra
#

The crash log has my name in it 💔

red flower
#

yeah but please show that and the code

#

unless you're just venting

junior sierra
#

Nah i'll show it I just gotta censor the irl name in it

#

What I wrote (I expect this to be highly incorrect in every way possible but i'm just not understanding it so far)

red flower
#

yeah, I'm not sure how to do what you want but that's not it

junior sierra
#

Yeah I definitely knew i'm doing a million things wrong

wintry solar
#

what do you want to do?

junior sierra
#

I want to set all Diet Colas to turn negative when they appear if you have the Joker I made

#

Just as a test

wintry solar
#

you should be able to do something like that using the shop and booster contexts in a calculate function

junior sierra
#

Thing is I know nothing about that kind of thing

#

So this is what i'm using to learn

wispy elk
#

I have 2 questions, as I'm writing my first Balatro mod.

  • How can I find the most played hand (like Supernova), or will I have to track that myself?
  • Is there an easy way to force my new joker when I start a new run, or some way to disable other jokers so that I can test it without having to play a run and rely on RNG?
wintry solar
#

well hooking set edition is almost certainly not the function you should be using to do that

sonic cedar
#

does anyone know why this doesnt work?

normal crest
old bane
#

if Card:set_debuff returns true, does that mean a card is debuffed?

wintry solar
#

just throw it in a calculate function that checks the shop when it loads/rolls

#

set ability works too

normal crest
#

Well that only takes into account if they're in the shop

#

what if it gets spawned with judgement

#

for example

wintry solar
#

that is true

manic rune
#

isnt there a context to check if a joker gets added to your joker area

junior sierra
manic rune
#

or maybe im confusing it with smt else

junior sierra
#

I know Nothing quite literally

normal crest
#

I do not think there is one in smods tho

manic rune
#

oh, thats a good idea

wintry solar
#

I don't remember adding one unless aure added it

manic rune
#

its probably just me mixing it with the context which adds playing cards

normal crest
manic rune
#

...that one actually exists right

wintry solar
#

yes

manic rune
#

phew, good to know im not just making up new contexts right on the spot

junior sierra
normal crest
#

just without the loop through shop jokers

hasty ravine
#

I'm trying to write a card that gains +Mult equal to the number of Hearts cards in your deck. Is there a variable in the code that tracks this by default?

junior sierra
#

So would I put #SMODS.find_card('Negative Cola') or ? ('Negative Cola' is the custom Joker)

normal crest
#

in find_card you use the key of your card

#

so it'd be 'j_modprefix_key'

junior sierra
#

Alr!

hasty ravine
#

Ah, I see

#

I'm not sure how to implement that then. Maybe I'll just switch it to where it gains Mult every time a Hearts card enters your hand.

red flower
#

Check how the vanilla jokers do it

#

like cloud 9

#

but check for suits instead of rank

junior sierra
#

Oops forgot to replace the

#

Keep the #?

cerulean rose
#

wait no im stupid and cant read

normal crest
#

make sure to properly copy the parameters of the original function

old bane
#

i wonder how i can modify a steel card's X mult 🤔

normal crest
#

Also card would not be defined there, use self

junior sierra
cerulean rose
red flower
old bane
# cerulean rose bruh.

in like a joker's ability cause I wanna add to specifically played Steel card's XMult so eventually when they're in hand they multiply more

junior sierra
cerulean rose
junior sierra
#

So this ?

normal crest
#

At this point we're just making the code for you lol

cerulean rose
#

actually here i would reccomend SMODS.Joker:take_ownership

red flower
#

remember to call card_set_ability(self, center, initial, delay_sprites) after

junior sierra
old bane
normal crest
#

you don't want to modify the center

old bane
#

oh

cerulean rose
#

right, use the ability table like i said

normal crest
#

also steel cards update their xmult in the update function so setting their ability won't actually work

#

since it will get updated like immediately

cerulean rose
#

c.ability.h_x_mult

normal crest
#

Wait no

#

I was thinking of the steel joker

#

Nvm

cerulean rose
old bane
red flower
junior sierra
red flower
#

at the beginning for set_ability probably

junior sierra
#

So do I just put.. local card_set_ability(self, center, initial, delay_sprites) above the if statement .. ?

red flower
#

no local, you're calling a function

junior sierra
#

Alr

cerulean rose
#

yeah also depends on whether you want to call the original before or after

junior sierra
#

I think before ?

normal crest
#

Probably before for set_ability

junior sierra
#

Would this work?

normal crest
#

you need to pass self as the first argument when calling the original

hasty ravine
# red flower but check for suits instead of rank

Looking at the code, this function seems to be what keeps track of the tally. If I wanted to replicate this in my code, I'd keep the for k,v (G.playing_cards) bit, right? I think the suit equivelant for get_id() would be is_suit(), correct?

junior sierra
hasty ravine
#

Okay yay

old bane
normal crest
junior sierra
red flower
#

yes

normal crest
#

also to set the edition you need to do self:set_edition('e_negative')

junior sierra
#

Oh gotcha!

#

Is that all I need to do then?

red flower
#

try it and find out

junior sierra
#

Crash !

red flower
#

what's the crash

junior sierra
red flower
#

what's the code?

junior sierra
#

Tis right there

red flower
#

you don't need the = true

junior sierra
#

Alr

#

Oh seems I also needed a second end

#

Is there something I can use to test this joker by giving it to myself or something?

junior sierra
#

Ty

hasty ravine
red flower
#

no, you probably don't want to do exactly the same as that because it does it every frame

#

You can do it in joker_main

#

and in loc_vars so the tooltip updates when you hover

#

(you don't need anything from the second screenshot because smods already checks for that)

hasty ravine
#

Got it. Like this?

junior sierra
#

This crash seems to be caused when any Diet Cola card is on screen

hasty ravine
#

Wait no not like that my game crashed

red flower
#

and you need to return it in vars

hasty ravine
#

Oh right, I forgot to change that one

red flower
#

and it's card, not self

#

and you should probably modify something in ability.extra rather than just ability so it stays between loads

red flower
junior sierra
#

Ty

#

Oh my gawd it works

hasty ravine
red flower
#

replace all the self inside the function with card

#

self is the center

normal crest
#

self is not a card, that's why you have a different parameter called card

hasty ravine
#

Ohhh

#

So like this?

#

Oh wait I forgot one

glad osprey
#

how do i change the mult and chip values before totalling

normal crest
#

now that it's in extra you gotta do card.ability.extra.socks_mult

glad osprey
cerulean rose
hasty ravine
#

For some reason the mult counter isnt right. Did I forget something?

normal crest
#

you only put the extra in one place

hasty ravine
#

Oh right

tall wharf
#

ok yeah makes sense

junior sierra
hasty ravine
#

Its working perfectly now! Thank you all so much for the help!

cerulean rose
#

also if you want to do the count there you could use a local variable

glad osprey
#

how do i get the chip and mult count

junior sierra
cerulean rose
glad osprey
#

ok follow up how do i set the chips and mult

cerulean rose
#

same

glad osprey
#

ty

#

also is it hand_mult or just mult

cerulean rose
cerulean rose
junior sierra
#

And then the one in the collection is negative for some reason

chrome widget
#

The point of the stencil being the skull shape that appears on the replaced joker, so I don't have to make a unique texture for every joker to which it applies

glad osprey
#

why is this not setting mult to 1

hasty ravine
#

Quick question. I'm writing a card similar to Caino. Do I need to include the if context.remove_playing_cards or am I only supposed to include the for k, val in ipairs()

wispy elk
#

Is there an easy way to check what hand the cards that are being discarded make?

cerulean rose
hasty ravine
#

Got it

normal crest
normal crest
#

update_hand_text or smt

plush cove
glad osprey
#

no its just not setting mult

sonic cedar
# sonic cedar does anyone know why this doesnt work?

hi, i went out to dinner after posting this, and now i've realized upon returning i just didnt explain what the code is supposed to do? the joker itself starts with a base 30 chips, and gains 3 with every consecutive hand that triggers the Boss Blind. Not only does it not do that, but it doesn't even give me the chips either. Or, if it is, it isn't providing notice. How can i fix this?

cerulean rose
sonic cedar
#

that's why im,,, here,,,, because i dont know what went wrong

normal crest
# glad osprey

idk maybe remove your 0 check and do mult = math.max(1, mult - (mult % 6))

#

I am not sure why mult isn't getting updated but chips are

wintry solar
#

how on earth do you read your code my friend

glad osprey
#

oh i didnt know that was a thing

junior sierra
sonic cedar
red flower
junior sierra
#

The ones in the collection and the ones spawned by debug, but not the ones in shop or pack

glad osprey
#

oops

red flower
#

very helpful jokerdisplay from me

glad osprey
#

thank you for that

sonic cedar
#

oh you’re kidding me

normal crest
sonic cedar
#

it’s outside of the message

cerulean rose
#

also you're using SMODS.calculate_effect instead of returning

#

also its written like old calc

sonic cedar
sturdy compass
#

Does anyone know exactly how get_straight works? I've been staring at it for like 10 minutes and I have no idea how it's comparing numbers within its IDS array

junior sierra
red flower
#

probably set_ability was the wrong hook

#

I tested hooking create_card and it worked

cerulean rose
#

you should take ownership

junior sierra
#

How so

junior sierra
#

So do I hook create_card, take ownership, or both ?

red flower
#

take ownership is probably cleaner but I've never done it 🙂

junior sierra
#

Alr

cerulean rose
glad osprey
#

to add extra cards to a custom deck would i just use the create_card thing

cerulean rose
#

use SMODS.add_card

glad osprey
#

cool

red flower
#

I thought it didn't

normal crest
#

I don't think it does either

cerulean rose
#

pretty sure it does

#

hm it doesnt

red flower
#

It's create_playing_card

#

i love undocumented functions

cerulean rose
#

thats a base balatro function

red flower
#

i know

normal crest
#

still undocumented

red flower
#

some of them are documented at least

#

like I would have had a much harder time if the UI ones were not documented lol

junior sierra
red flower
#

yes

junior sierra
#

And ones spawned by hitting 3?

red flower
#

I didn't test that honestly, I rolled it in the shop

#

and the boosters

sonic cedar
junior sierra
#

Yea i'm testing it rn i'm just getting bad luck on rolling one lol

glad osprey
#

i just want to add 14 6's to the deck

red flower
#

nvm i just got it

sonic cedar
glad osprey
sonic cedar
#

ah

red flower
glad osprey
#

it's so big

#

and long

normal crest
#

Oh god I didn't know about ctrl + c with debug mode

red flower
#

thats what she said

glad osprey
red flower
#

i have never seen a woman

cerulean rose
#

your mom

#

*you're mom

red flower
#

thank you

sonic cedar
#

yro'ue

cerulean rose
sonic cedar
#

misprint

junior sierra
#

In MIS we PRINT

#

Hallefuckinglujah

#

Tis the worked

sonic cedar
red flower
#

can I see the entire joker

sonic cedar
#

are you on pc or mobile

red flower
#

pc

sonic cedar
#

ill just paste then

#
SMODS.Joker{ --Iscariot/Judas
    key = 'iscariot',
    config = {extra = {chips = 30, chip_gain = 3}},
    rarity = 2,
    atlas = 'IsaacJokers',
    pos = {x = 4, y = 1},
    cost = 3,
    unlocked = false,
    discovered = false,
    blueprint_compat = true,
    eternal_compat = true,
    perishable_compat = true,
    ScoreReset = true,
    loc_vars = function(self, info_queue, card)
        return {vars = {card.ability.extra.chips, card.ability.extra.chip_gain}}
    end,
    calculate = function (self, card, context)
        if context.joker_main and (to_big{card.ability.extra.chips, card.ability.extra.mult} > to_big(1)) then
            SMODS.calculate_effect(context.blueprint_card or card, {
            } )
            return{
                chip_mod = card.ability.extra.chips,
                message = localize{type = 'variable', key = 'a_chips', vars = {card.ability.extra.chips}},
            card = card
            }
        end    
        if context.debuffed_hand then
            card.ability.extra.chips = card.ability.extra.chips + card.ability.extra.chip_gain
            ScoreReset = false
            return {
                message = 'Silver!',
                colour = G.C.CHIPS,
                card = card
            }
        end

        if context.end_of_round then
            local blind_keys = {
                bl_window = true,
                bl_head = true,
                bl_club = true,
                bl_goad = true,
                bl_plant = true,
                bl_tooth = true,
                bl_pillar = true,
                bl_flint = true,
                bl_eye = true,
                bl_mouth = true,
                bl_psychic = true,
                bl_arm = true,
                bl_ox = true,
                bl_final_leaf = true
            }  
            if blind_keys[G.GAME.blind.config.blind.key] then
                if ScoreReset then
                    print(ScoreReset)
                    return {
                        message = 'Oops!',
                        card = card
                    }
                end  
            else
                print(ScoreReset)
                return {
                    message = 'Greedy!',
                    card = card
                }
            end
            ScoreReset = false
        end
    end
}
red flower
#

damn im sleepy

sonic cedar
#

youre killing me 😭

cerulean rose
#

remove the SMODS.calculate_effect in context.joker_main

#

does the message appear when playing a debuffed hand

sonic cedar
#

i think it's just leftover yeah there's nothing in it

cerulean rose
#

which boss are you testing with

sonic cedar
#

the club

cerulean rose
#

yeah that doesn't debuff hands, just cards

#

check matador's code balatrojoker

sonic cedar
#

if i had a nickel lmao

wintry solar
#

The calc effect is backwards

cerulean rose
#

and also still old calc

wintry solar
#

No?

cerulean rose
#

chip_mod is definitely old calc

sonic cedar
#

no?

wintry solar
#

It’s fine to use chip mod you just have to do the message yourself

sonic cedar
#

yeah i need it for the message

sonic cedar
cerulean rose
#

if you use chips it does the message for you

wintry solar
#

I mean you’re just creating the message yourself anyway you don’t need chip mod

sonic cedar
wintry solar
#

Your code isn’t a custom message though

#

It’s just the chip message

cerulean rose
#

its a copy of the default one

sonic cedar
#

it's supposed to be it just
doesnt/

cerulean rose
#

what is to_big{card.ability.extra.chips, card.ability.extra.mult}?

sonic cedar
#

talisman

wintry solar
#

Yes you’re calling calc effect wrong

#

It’s (effect, card)

cerulean rose
#

you havent defined card.ability.extra.mult anywhere

sonic cedar
sonic cedar
wintry solar
#

What

#

Calc effect never has a self

sonic cedar
#

where are you looking

cerulean rose
#

calc effect is empty wtf

#

but yeah its backwards

wintry solar
#

Oh it is empty

#

Damn mobile code blocks being jank

sonic cedar
normal crest
#

the effect goes first, then the card

sonic cedar
#

the effect of the joker
and then the

#

or

red flower
#

whats this check for

sonic cedar
#

talisman

red flower
#

yeah I got that but why

sonic cedar
#

ignore the mult part i forgot to change it back to chip_gain

wintry solar
#

You don’t need that check anyway

red flower
#

I'm asking genuinely, I don't understand why you're checking if it's bigger than 1

sonic cedar
sonic cedar
glad osprey
cerulean rose
#

prolly cus ur calculate effect is wrong

sturdy compass
#

I'm looking for some help with working in get_straight. The effect I'm trying to get is allowing any Ace or Face card to fill a gap in a straight. This is what I currently have, but it's not being detected as a straight, most likely due to my confusion with how the function is structured in general. Anyone have any ideas?

wintry solar
#

Are you patching the smods override?

sonic cedar
wintry solar
#

Helping people mod this game would be so much easier if talisman didn’t exist

cerulean rose
sturdy compass
cerulean rose
#

and idk wtf theyre doing

sonic cedar
cerulean rose
#

remove the weird talisman crap and SMODS.calculate_effect(…)

wintry solar
#

You shouldn’t need to ever check a value is bigger than 1

sonic cedar
#

but then it wont work with talisman

cerulean rose
#

wrong.

sonic cedar
#

wdym "wrong"

cerulean rose
#

what your saying isnt true

wintry solar
#

This isn’t even to do with talisman

#

You’re just randomly checking your values are bigger than 1

normal crest
wintry solar
#

You’re not comparing them with anything that talisman deals with

sonic cedar
#

talisman changes how mult works so if i dont deal with that itll crash because

#

yes comparison table with number

normal crest
#

so your mod NEEDS talisman to work

cerulean rose
#

is that the error you get when you remove it?

wintry solar
#

Show me the crash

sonic cedar
sonic cedar
normal crest
sonic cedar
hasty ravine
#

I'm getting this error, and I'm not sure whats causing it. Does anyone see the problem?

red flower
#

you're missing a comma between k v

#

in both for

hasty ravine
#

Oops

#

Thatll do it

glad osprey
red flower
#

6

cerulean rose
sonic cedar
tall wharf
#

6

hasty ravine
#

I'm getting another error. Am I not supposed to use 'context' in this situation?

normal crest
#

correct, loc_vars does not get any context passed to it

red flower
#

there's no context in loc vars

hasty ravine
#

I see. So what should I be doing instead for it to do this when a card is destroyed?

red flower
#

update it in calculate

normal crest
#

Not do it in loc_vars

hasty ravine
#

Okay

red flower
#

btw the other one you posted before you also had to do the calculation in calculate if you didn't

#

the hearts one

hasty ravine
#

Oh the card I posted previously?

#

This one?

red flower
#

yes, if you only calculate the hearts in loc_vars it's not going to update unless you hover it

hasty ravine
#

Ohh

#

Okay

red flower
#

you need to do it in both

sonic cedar
hasty ravine
#

Do you put this in the if joker_main statement or before it?

normal crest
sonic cedar
red flower
#

what's in line 268

sonic cedar
#

why didnt i just

#
if (to_big and to_big(new_mult):lt(to_big(last_mult))) or (not to_big and new_mult < last_mult) then
red flower
#

the first one should probably be Big and blah blah

#

instead of to_big

#

to_big is always true because you created a dummy one

sonic cedar
#

replace the to_big's with "Big"?

red flower
#

yeah, not entirely sure but I think that was the tasliman table

sonic cedar
#

has it changed since then?

red flower
#

i dont think so

red flower
sonic cedar
#

so just if Big

#

leave the others as to_big

#

if (Big and to_big(new_mult):lt(to_big(last_mult))) or (not to_big and new_mult < last_mult) then

red flower
#
if (Big and to_big(new_mult):lt(to_big(last_mult))) or (new_mult < last_mult) then
sonic cedar
#

ohhh

#

so i dont need the not?

old bane
#

would i be able to make a new variable to store into the Card class and then use that for later? Cause I want to implement bonus mult specifically for one joker and I think I've seen other mods do something where they make a new variable somehow

red flower
sonic cedar
#

oh ok

glad osprey
red flower
hasty ravine
#

For some reason, whenever I use Hanged Man to delete a Hearts card, it doesn't add to the mult. I'm not sure whats causing this

red flower
#

joker_main and remove_playing_cards are not true at the same time

hasty ravine
#

Oh

old bane
# red flower can you explain what the effect you want is?

so i already have it set up where i hook into get_chip_mult() and it'll return the value stored in the new variable i want. All I have to do is just have Card store this new variable in itself then i can reference it whenever i want

#

i wonder if i can just lovely inject it 🤔

hasty ravine
sonic cedar
red flower
hasty ravine
#

Like this?

sonic cedar
red flower
# hasty ravine Like this?

no, all of it should go in the remove_playing_cards except the event
and you should replace that event with return { mult = card.ability.extra.skull_mult }

hasty ravine
#

Like this?

old bane
red flower
hasty ravine
#

Okay, then if everythings fine I'll just do the same for cards_destroyed too then

sturdy compass
hasty ravine
#

Messed up implementation again 😓

#

I'm not sure what I did wrong this time though

edgy reef
#

Syntax error

#

if context.remove_playing_cards does not have an end

hasty ravine
#

Oops

#

Its so hard to keep track of all those sometimes

sonic cedar
glad osprey
#

how do i make this work

sonic cedar
red flower
hasty ravine
#

Oh good point

#

Ill go figure out how to do that in vs

wispy elk
#

is there a good definition of what is in context somewhere?

red flower
sonic cedar
wispy elk
red flower
#

the only info it's missing are very new contexts that you can probably only find looking at the code

#

or asking here

near elm
#

Anyone know why this is the case? im trying to make a joker that eats other food jokers, it works perfectly when i put in jokers from the main game but does not when I try to effect my own

red flower
#

the keys should be j_modprefix_jokerkey

sonic cedar
#

damn

near elm
glad osprey
wispy elk
#

I want to trigger an action when the most played hand (similar to the Telescope) is discarded, is the most played hand data somewhere accessible?
Is the type of hand being discarded available or do I need to figure out the hand type myself?

sonic cedar
# red flower ```lua if (Big and to_big(new_mult):lt(to_big(last_mult))) or (new_mult < last_m...

but yeah this crashes it now, in conjunction with this calculate effect

    calculate = function (self, card, context)
        if context.joker_main then
            return{
                chips = card.ability.extra.chips,
            card = card
            }
        end
        if context.hyperfixation_mod_mult_decrease and (to_big(card.ability.extra.chips) > to_big(1)) and not context.blueprint_card then
            card.ability.extra.chips = card.ability.extra.chips + (context.hyperfixation_mod_mult_decrease*10)
            return{
                message = 'Soul...',
                colour = G.C.CHIPS,
                card = card
            }
        end
    end
#

oh right i was supposed to send that crash to eremel

sonic cedar
red flower
red flower
#

but not Big instead of not to_big

sonic cedar
#

oh ok

minor furnace
#

I did not think about how involved this would be to implement when I came up with the concept
The Blank - Triggers a different Boss Blind effect every hand (not compatible with all)

sonic cedar
#

obviously testing this with blindTheFlint

red flower
#

idk what it's supposed to be doing so I can't help on that front

red flower
#

I don't understand the code

hasty ravine
#

When I tried to use a planet card, the game crashed. I'm not sure what 'juiced_up' is for.

red flower
#

juice_up shakes the card a bit, it's called in card_eval_status_text

normal crest
wispy elk
#

I need to store a value for the full run and reset on a new run, should I store that on the joker itself or is there somewhere better?