#💻・modding-dev

1 messages · Page 458 of 1

hidden sable
#

is there a way to change a jokers description when bught

fluid burrow
#

this works? kami_explosive_compat = false,

hidden sable
#

like make a joker read "X10 mult for every card played" and when bought it changes to like "haha you fell for it"

daring fern
hallow slate
#

Loop thru jokers, see if find joker finds the target card, if so then break and give the alt localization text

#

You do this in loc_vars I think.

hidden sable
#

or atually can i just detect when a joker is bought and then destroy that joker and spawn a different joker in

#

only for this specific joker

#

like once bought, destroy and create a new different joker

#

cant i detect being obught from shop with this?

wheat jewel
#

How can i get the rank value of a card from a scoring hand

tepid crow
#

does this code not work?

hidden sable
#

now i have an odd question

#

how can i make the screen turn black for a set amount of time before returning back

tepid crow
hidden sable
#

i dont need anything fancy

#

jsut cut to black and back again

tepid crow
#

seems possible, as long as thunk didn't place restrictions on the size/location of the ui box

#

be aware you can exit most ui boxes by pressing esc

sonic cedar
hidden sable
#

like a big ass rectangle

#

nothing attached

tepid crow
#

oh you didn't mean thunk's UIBox

hidden sable
#

anything thatll complete the job really

sonic cedar
#

yeah just a regular rectangle lmao

tepid crow
#

lmao

#

yeah

#

sounds like you're back at generic love2d question

wheat jewel
hidden sable
#

i would prefer to have a function that makes this black rectangle appear and another to dissapear

#

how do i destroy a card without it doing any effects

#

nvm found out how

#

how do i create a specific joker

sonic cedar
#

SMODS.add_card

sonic cedar
hidden sable
hard mica
# tepid crow does this code not work?

it works just only when im doing a objective inside the shop , if im doing an objective made to be completed inside a round , it doesnt spawn that buffoon pack

tepid crow
hidden sable
#

also is there a way to have a joker have no rarity

sonic cedar
#

I don’t believe so

tight notch
#

probably not but you can make one if you dont want it to appear in shop

hidden sable
#

like disable this part

#

i dont want that badge to show

tight notch
#

afaik you cant

wheat jewel
tight notch
#

why do you not want it?

wheat jewel
#

i'm not getting Xmult returned like it should

tepid crow
hidden sable
#

its fine if theres a rarity on the inside

hidden sable
#

but i jsut dont want any badges to be displayed on the joker

tight notch
tepid crow
hidden sable
#

is there a way to make a joker not appear in collection?

sonic cedar
tight notch
#

no_collection = false

tight notch
#

woops

tepid crow
hidden sable
daring fern
midnight coyote
#
if context.other_card.base.suit == 'Diamonds' then
                local ret_dollar = to_big(G.GAME.dollars) * to_big(card.ability.extra.xdollars - 1)
                return {
                    dollars = ret_dollar
                }
            end

why would this cause a talisman error

hidden sable
tight notch
#

my stupidity baffles me sometimes

midnight coyote
wheat jewel
#

Trying to get the rank value of the last card of a five card hand but it isn't return anything

midnight coyote
#

the people helping here are, well, people

hidden sable
midnight coyote
#

we cant answer everybody at once so it'd be much preferred to do some problem solving yourself before coming here

daring fern
midnight coyote
#

ykw

#

no its obviouis

#

dont even gotta ask

daring fern
hard mica
hidden sable
midnight coyote
#

like this or would i 'to_number' both

daring fern
tight notch
midnight coyote
midnight coyote
#

okay

tepid crow
hard mica
tepid crow
#

if current_objective_Completed then

hidden sable
#

idk how but it fixed itself after i reloaded again

hard mica
hidden sable
#

maybe the real horror was the atlas that decided it didnt wanna work

tepid crow
tepid crow
#

first of all move that keybind out of the joker block

hard mica
wind steppe
#

how would i recalculate a boss blind's debuffs upon creation or destruction of a joker

tepid crow
# hard mica sure here

You want something like what you did for calc_dollar_bonus. Find a specific timing on when you want the reward to happen (e.g. when user enters the shop), and then spawn the pack

scenic elm
#

How can i find a specific joker by key and call juice_up on it from the calculate method of an enhancement?

wheat jewel
#

I tried to implement the way that raised fist gets mult but with scored cards, but it crashed when putting "scored" in place of cards in hand

daring fern
wheat jewel
#

Idk how to properly get the rank value as xmult from a card

hard mica
glass scaffold
#

How do I summon a random Tarot card?

daring fern
tepid crow
sonic cedar
wind steppe
hard mica
tepid crow
#

I think so yeah, try it

hard mica
scenic elm
# daring fern ```lua for k, v in pairs(SMODS.find_card("j_modprefix_key")) do v:juice_up()...

it seems like the juice_up happens too soon compared to the return message. is there a way to make sure they sync up?

the calculate function in question:

calculate = function(_self, card, context) -- _ prefix for unused args
      local hasReinforcedGlassJoker = next(SMODS.find_card("j_mot_reinforcedGlassJ", true))

      if context.destroy_card and context.cardarea == G.play and context.destroy_card == card and pseudorandom('glass') < G.GAME.probabilities.normal / card.ability.extra then
        if hasReinforcedGlassJoker then
          for k, v in pairs(SMODS.find_card("j_mot_reinforcedGlassJ", true)) do
            v:juice_up()
          end

          return {
            message_card = card,
            -- TODO: add proper localization
            message = "Saved!"
          }
        end

        return { remove = true }
      end
    end,
wheat jewel
vast bough
#

does anybody know why does this code give me a crash

calculate = function(self, card, context)
        -- Individual card scoring
        if context.individual and context.cardarea == G.play and not context.blueprint then
            if context.other_card:get_id() == 8 then
                if pseudorandom('effect_0_create_tarot_card') < G.GAME.probabilities.normal / card.ability.extra.odds then
                if #G.consumeables.cards + G.GAME.consumeable_buffer < G.consumeables.config.card_limit then
                G.GAME.consumeable_buffer = G.GAME.consumeable_buffer + 1
                G.E_MANAGER:add_event(Event({
                    func = function()
                        local tarot_card = create_card('Tarot', G.consumeables, nil, nil, nil, nil, nil, nil, nil, 'joker_forge_tarot')
                        tarot_card:add_to_deck()
                        G.consumeables:emplace(tarot_card)
                        G.GAME.consumeable_buffer = 0
                        return true
                    end
                }))
            end
                return {
                    message = localize('k_plus_tarot')
                }
            end
            end
        end
    end

but when i remove the line that checks probability, it works fine. ive been scratching my head at this for a good half-hour now. for reference the crash is:

card.lua:3401: attempt to perform arithmetic on field 'extra' (a table value)

i looked at the vanillaremade 8ball joker, that has the card creation in a different way, it uses add_card and it puts it within the return statement in and extra field, i cant do that here because the code has to be formatted in a certain way to be easily reproducable. just looking for more insight on what causes this

wheat jewel
scenic elm
wheat jewel
#

same logic applies then

daring fern
scenic elm
tepid crow
daring fern
tepid crow
wheat jewel
hidden sable
#

yknow how invisible joker shakes when its ready? how can i make that into a single fire event that increases shake power with each shake and shakes more rapidly?

vast bough
hidden sable
#

would spamming events like this be on the right track, minus the blockable

scenic elm
hard mica
hidden sable
tepid crow
midnight coyote
#

i may be blind but is there a context for when a playing card is modified

midnight coyote
#

or would i need to hook into set_ability or sm

formal parrot
#

SKULL EMOJI

midnight coyote
#

wait, i should just check bloodstone's unlock cond

#

hm

#

i need to make that into a contextt

#

where the deck is modified

hidden sable
midnight coyote
#

im basically checking for if theres >= 40 cards of a certain suit

hard mica
midnight coyote
#

so in theory i should check every time the deck is modified

tepid crow
midnight coyote
#

as overclock condition

hidden sable
#

is there a way of disabling selling of a joker without the eternal sticker

midnight coyote
#

i need the joker itself to check in calculate

hidden sable
daring fern
tepid crow
# midnight coyote as overclock condition

you could also check what bloodstone does internally, but that might slower

            if args.type == 'modify_deck' then
                if card.unlock_condition.extra and card.unlock_condition.extra.suit then
                    local count = 0
                    for _, v in pairs(G.playing_cards) do
                        if v.base.suit == card.unlock_condition.extra.suit then count = count + 1 end
                    end
                    if count >= card.unlock_condition.extra.count then
                        ret = true
                        unlock_card(card)
                    end
                end
midnight coyote
#

but what is args

#

i need args

#

calculate doesnt have args

hidden sable
daring fern
midnight coyote
#

thatts my main hangup

hidden sable
tepid crow
midnight coyote
#

i'll just calculate before scoring

#

if i find a better solution

#

then ill implement it

hard mica
#

so like i got 20 dollars this ante but the buffoon pack never spawned

hidden sable
midnight coyote
#

make either a utils file

midnight coyote
#

here ill give a demonstration

tepid crow
hard mica
midnight coyote
#
local card_sell_ref = Card.can_sell_card -- note how im not including parenthesis. I'm "saving" the function so i can return it later.

function Card:can_sell_card(context)
  if "condition" then -- replace condition with whatever you need
    return false
  end
  return card_sell_ref(self, context) -- return the original function if your special condition isnt fufilled
end

tepid crow
midnight coyote
#

hopefully tthis should be good? idk im nott too good at commentting

#

i just write self explanatory code

#

i only comment if its kind of hard to understand

#

otherwise

hard mica
midnight coyote
#

i shouldnt do that. that's bad practice

tepid crow
#

final return should include self

midnight coyote
daring fern
#

How would one make negative give ^1.2 Joker Slots instead?

tepid crow
# hard mica ?

I needed a reference, wasn't scrolling back up manually every time

tepid crow
midnight coyote
midnight coyote
#

its an example

hard mica
hidden sable
tepid crow
hidden sable
#

like how can i change the "condition"

midnight coyote
#

is self a card object

#

i dont remember

#

in a card method

vast bough
#

can someone tell me what is causing this code to crash when a hand is played

calculate = function(self, card, context)
        -- Individual card scoring
        if context.individual and context.cardarea == G.play and not context.blueprint then
            if context.other_card:is_face() then
                if pseudorandom('effect_0_add_dollars') < G.GAME.probabilities.normal / card.ability.extra.odds then
                    return {
                        dollars = card.ability.extra.dollars
                    }
                end
            end
        end
    end

this is literally just business card logic, i tried emulating the exact calculate function from business card, yet it still causes the same crash. removing the random check leaves no crash.

card.lua:3480: attempt to perform arithmetic on field 'extra' (a table value)

surely this is something very silly but ive been having issues with pseudorandom consistently, if someone has some good documentation on it that would be great lol

midnight coyote
#

would self be the card object

midnight coyote
hidden sable
#

only hooking ive ever done is this

midnight coyote
#

im not confident

#

but try that

hidden sable
midnight coyote
#

joker key can be replaced by the key of the joker that you want to be unsellable

hidden sable
#

OH WAIT IT JSUT HIT

#

what you meant by condition

hard mica
hidden sable
#

im so stupid smh

midnight coyote
#

not stupid, you just didnt understand and thats alright

tepid crow
hard mica
#

kinda annoying i have to beat a boss to reroll my stuff since idk how to do the keybind thing lmao

formal parrot
#

Code seems fine

vast bough
vast bough
formal parrot
#

Has an issue

#

Can i see it ?

vast bough
# formal parrot Your config
SMODS.Joker{ --Business Card
    name = "Business Card",
    key = "businesscard",
    config = {
        extra = {
            odds = 2,
            dollars = 2
        }
    },
    loc_txt = {
        ['name'] = 'Business Card',
        ['text'] = {
            [1] = 'Played {C:orange}face{}',
            [2] = 'cards have a {C:green}1 in',
            [3] = '2{} chance to give',
            [4] = '{C:money}$2{} when scored'
        }
    },
    pos = {
        x = 0,
        y = 0
    },
    cost = 4,
    rarity = 1,
    blueprint_compat = true,
    eternal_compat = true,
    unlocked = true,
    discovered = true,
    atlas = 'CustomJokers',

    loc_vars = function(self, info_queue, card)
        return {vars = {}}
    end,

    calculate = function(self, card, context)
        -- Individual card scoring
        if context.individual and context.cardarea == G.play and not context.blueprint then
            if context.other_card:is_face() then
                if pseudorandom('effect_0_add_dollars') < G.GAME.probabilities.normal / card.ability.extra.odds then
                    return {
                        dollars = card.ability.extra.dollars
                    }
                end
            end
        end
    end
}

where tho

#

(ignore the description not being variables lol)

formal parrot
#

Wuuuu

#

Lemme see

vast bough
#

bro ive been trying to fix this kinda error with pseudorandom for the past couple hours, its been happening on loads of jokers that i generate with joker forge

sonic cedar
#

what’s the error

formal parrot
#

It loons

#

Looks fine

formal parrot
tepid crow
formal parrot
#

yeah restart the run

vast bough
formal parrot
#

Oh

sonic cedar
#

thank you 🙏

formal parrot
#

Thank

#

Who

vast bough
#

could it be incompatibility with mods? i swear this was working like days ago tho

sonic cedar
vast bough
#

goodmorning

sonic cedar
#

curses

vast bough
#

my balatro might be cursed

sonic cedar
#

maybe use ease_dollars?

tepid crow
# vast bough

are you sure this is your card crashing and not the actual vanilla business card?

#

OH

#

don't give your joker a name

tepid crow
#

in the top-level anyway, do give it a name in loc_txt

vast bough
#

but, it will share the same id as original

#

lemme change id and test

tepid crow
#

Well, it's both. Vanilla business card code is crashing on your business card

formal parrot
#
    if context.individual and context.cardarea == G.play and not context.blueprint then
        if context.other_card and context.other_card:is_face() then
            if pseudorandom('businesscard_effect') < G.GAME.probabilities.normal/ card.ability.extra.odds then
                return {
                    dollars = card.ability.extra.dollars
                }
            end
        end
    end```
end
#

It WORKS FINE

#

I literally tested it

#

LOL

tight notch
#

why does this play the sound a lot and freeze the game?

tepid crow
#

the problem isn't in the calculate

#

it's in the name

formal parrot
#

Mhm

formal parrot
tight notch
#

name isnt used?

tepid crow
#

I was talking about goodmorning's code if you meant my message

tight notch
#

ah

vast bough
tight notch
#

wait no

#

name still isnt used

vast bough
#

i just changed it to something else and it works perfectly

rapid stag
#

is there anyone here who's made a super fancy custom replacement for a joker's description box?

sonic cedar
#

can you do that

formal parrot
#

Huh ?

tight notch
formal parrot
sonic cedar
#

oh you meant like that

formal parrot
tepid crow
formal parrot
#

Are you sure

vast bough
tight notch
#

didnt see it was vanilla lol

tight notch
formal parrot
#

You have an infinite loop

#

Going on

tight notch
#

how do i stop it?

hard mica
#

how can i check for a specific joker that is put in my joker slots for the first time?

vast bough
formal parrot
tight notch
#

that also does the same thing but doesnt play the sound

formal parrot
#

Thus works for calculate

#

Idk if it works there

tight notch
#

the game just freezes

formal parrot
#

Gotta love it

#

!help N

rapid stag
# red flower elaborate?

i recall seeing some very custom joker tooltips in here in the past and i was hoping i could see some of their generate_ui()'s UI code for direction on how to write my own

red flower
tight notch
#

yes

#

sometimes

red flower
#

well

tight notch
#

lil yachty computer gif

red flower
#

show the whole code

tight notch
#

forgot i had setting blind in the contexts

#

my own stupidity has be flabbergasted

#

*me not be 😭

sonic cedar
#

are we fr scrimblo

#

I keep opening this channel and forget to actually send my problem

#

let me fix that

formal parrot
#

In the meantime wait for the next smods update

sonic cedar
#

i found a temp fix called "remembering"

red flower
#

is it the joker itself checking? another one? is it yours or from vanilla/another mod?

hard mica
# red flower elaborate?

trying to check for when my joker is first put in the joker slot so i can reroll the stuff i need rather then rerolling on buying the joker

red flower
#

add_to_deck?

hard mica
red flower
#

no

#

it's a function on jokers

hard mica
#

how do i check if its added to my joker slots for the first time then

sonic cedar
#

why does this show up blank? it worked fine before

hidden sable
#

what are the play_sound parameters,i know theres one for pitch but is there one for speed

hard mica
red flower
#

no

hard mica
#

then how

red flower
hidden sable
#

but when it gets added to deck

#

and without context

rapid stag
#

additionally, what is c1 cirDerp

daring fern
red flower
#

c1 is the card bought

rapid stag
#

ah cirDerp

red flower
#

the docs use the internal names for some reason

#

its kinda confusing, you want to use context.card

hard mica
red flower
#

idk the logic of your mod

hard mica
red flower
#

that's how

#

but idk if your logic in the function is correct because idk your mod

hard mica
red flower
#

please do

rapid stag
hard mica
red flower
#

i have custom generate_ui's in my mod

#

they dont do anything too fancy with the description tho

red flower
hexed stump
untold palm
#

Is there any way to check if an specific Joker is on the Joker slots? And if so, is it possible to check how many there are of them and whether they are sold or destroyed? I'm trying to make a joker that scales with certain ones currently owned and another with food jokers that expire/are sold/"slashed"

rapid stag
#

i kinda have an idea for a joker effect that changes its odds based on which joker slot it's in (1 in [slot #] odds)

violet gulch
# hard mica here you go

Am I crazy or couldn't you move all your setup stuff within the if card.ability.extra.times_jonkler_application_added == 1 then logic section of the calculate function into the add_to_deck function?

rapid stag
#

but idk if there's a way to pick up on it being moved

hidden sable
hard mica
#

I spawned the joker with debugplus btw

red flower
rapid stag
red flower
violet gulch
red flower
red flower
#

check if that updates the objective

hexed stump
hard mica
red flower
#

then it worked?

#

or did you go into the blind after adding it

hard mica
#

im having a problem , now everytime i press something , it rerolls the objective and reward for some reason

hard mica
red flower
violet gulch
hard mica
#

oops

hard mica
#

that fixed it

rapid stag
#

@red flower actually while you're here i have a sort of vanillaremade question but not quite

i'm writing... basically imagine canio's effect, but when face cards are destroyed, it has a chance to create a negative version of that card (and draw it to hand if during a blind), so i'm looking at both the way you've written canio and dna and basically frankensteined them together-ish? but i feel like i've done something wrong cirDerp

my area of concern is the actual copy creation part, adding to deck and emplacing to hand, etc.

hard mica
#

now i gotta check for the buffon spawning code

hidden sable
#

not good with math, anyone know what do modify my percent to to avoid this error

rapid stag
red flower
#

i dont immediately see anything wrong no

violet gulch
red flower
#

idk why you're not using get_id or is_suit tho

hard mica
#

@red flower you know why this doesnt work btw?

red flower
#

isn't pseudorandom element missing a seed

hard mica
red flower
#

yeah i don't see anything else wrong

#

i still dont entirely know how the card works tho

rapid stag
hard mica
hard mica
red flower
rapid stag
#

how do i use get_id to determine a specific rank, then?

#

ah, fair

red flower
wheat jewel
#

Tried importing the code for blue seal into a joker, but it spawns two jokers instead of just one

hard mica
sonic cedar
daring fern
sonic cedar
daring fern
hard mica
#

@red flower tried something like this but it didnt work rip

sonic cedar
daring fern
sonic cedar
#

tf you mean no

#

it worked before 😭

daring fern
sonic cedar
#

it was rhetorical

#

but why would i suddenly have to add them now?

calm kiln
#

anyone know how to track spades and make it so that every 10 adds a discard?

sonic cedar
#

ykw if it works it works

sonic cedar
#

Like in your deck?

calm kiln
#

yeah

sonic cedar
#

look at cloud 9

hidden sable
#

how can i make a burst of particles around a card

calm kiln
#

i completely forgot about cloud 9 lmao thanks

sonic cedar
hard mica
sonic cedar
#

NO

#

IT ISNT

#

THERES ONE LINE IN THE LOCALIZATION THATS DIFFERENT

#

WHY

hidden sable
#

how can i turn off music completely while a joker is present

novel thistle
#

does anyone know why the animation for card receiving seals/editions happens before cards are scored, but the animation for enhancements has the correct timing?

daring fern
sonic cedar
#

realizing that said music and not sound

hidden sable
daring fern
hidden sable
#

going into pause menu is the only way to set music vol right

#

what if i hook exitting pause with setting music to 0

#

or actually

#

what if i just disallow pause

#

lol

rough furnace
#

you could probably hook what uses the volume

hidden sable
sonic cedar
#

I see that mf dolphin i know what you’re doing

#

I am NOT turning my volume on 😭

hidden sable
#

turn it like 1 percent

violet gulch
#

It wasnt that bad, even with headphones

sonic cedar
#

I have sensitive ears

modern kindle
violet gulch
hidden sable
buoyant shard
#

Is there a list somewhere of all the tag names to be used in the add_tag(tag('')) function?

formal parrot
buoyant shard
formal parrot
#

My ear dumps are obliterated

daring fern
hidden sable
modern kindle
formal parrot
wild escarp
#

I want this joker to gain xmult for every unscoring card, but this plays the message multiple times (no huge deal), and the xmult it gained doesn't count until the next hand, how would I fix it?

if context.main_eval and context.cardarea == "unscored" and not context.blueprint then
    card.ability.extra.x_mult = card.ability.extra.x_mult + card.ability.extra.xmult_gain
    card.ability.extra.message = true
end
if context.main_eval and card.ability.extra.message == true then
    card.ability.extra.message = false
    return {
        message = localize('k_upgrade_ex'),
        colour = G.C.MULT
    }
end
thorn furnace
#

I'm probably missing something obvious here

red flower
#

the loc_vars arguments are wrong

thorn furnace
#

oh

sonic cedar
#

yeah

violet gulch
#

loc_vars = function(self, info_queue, card)

thorn furnace
#

I feel very embarrassed

red flower
#

i recommend using vscode or another better code editor to get lsp autocomplete

thorn furnace
#

I can't stand vsc SALADWENTBAD

red flower
red flower
thorn furnace
red flower
#

that's fair i would still look into something that is compatible with the lua lsp

thorn furnace
#

i mean notepad++ does a relatively good job
about as good as it can do

#

It has autocomplete

red flower
#

does it let you use the lsp defs from smods?

wild escarp
red flower
#

message_card = card

#

or use another context

thorn furnace
thorn furnace
calm kiln
#

is there any way to make a sound play when clicking an editioned card?

unborn bay
#

lsp is a program

#

thats hooked up to a code editor

#

n++ doesn't reallt have lsp capabilities

#

maybe try vim idk

thorn furnace
hexed stump
#

So I'm having a little trouble with a custom card area saving it's contents between saves and loads. I'm hooking start_run to make the area, and what I'm doing with it is grabbing unbought cards out of the shop to store for later. However the card just lingers to the title screen nd is gone on load

vast bough
#

another meta question. if you wanted to create a joker with a custom message associated with its effect, would you still want that custom message to play regardless on if the effect was successful? for example, you have a joker that creates tarot cards and your message was "boom", would you still want that to play everytime it attempts to create a tarot card, even if one is not created due to no room?

red flower
thorn furnace
hexed stump
red flower
hexed stump
#

what do I need to hook for that?

normal crest
#

removes all need for shortcuts if you are willing to take 1 o 2 more seconds to type

pallid sleet
#

Heres code, the crash says there's a problem with atlas being a nil value?
I triple checks the asstets and they are all the same values as in code.

SMODS.Atlas{
    key = 'dishsoapblueflavored',
    path = 'dishsoapblueflavored.png',
    px = 71,
    py = 95,
}

SMODS.Joker{
    key = 'dishsoapblueflavored',
    blueprint_compat = false,
    eternal_compat = true,
    rarity = 3,
    cost = 8,
    loc_txt = {
        name = 'Dishsoap Blue Flavored',
        text = {
            'Creates two',
            '{C:dark_edition}Negative{} Blue Bubbles',
            'Jokers every {C:attention} round{}'
        }
    },
    atlas = 'dishsoapblueflavored',
    config = {odds = 2},
    pos = {x = 0, y = 0},
            calculate = function(self, card, context)
        if context.setting_blind then
            SMODS.add_card({key = "j_loljk_bluebubbles", edition = 'e_negative'})
            SMODS.add_card({key = "j_loljk_bluebubbles", edition = 'e_negative'})
        end
    end

}
thorn furnace
red flower
pallid sleet
red flower
thorn furnace
normal crest
#

I literally use it all the time lol, mostly to swap between different files

red flower
pallid sleet
thorn furnace
pallid sleet
#

got it

normal crest
#

(cus I usually have like 4-5 files opened so I'd have to press ctrl + tab multiple times)

thorn furnace
#

fair

vast bough
red flower
pallid sleet
#

alright thats fine

thorn furnace
#

I guess I've never really thought about switching tabs all that much
I'm never really focused on more than 2-3 tabs at a time and I have monitors for that

pallid sleet
#

i did this one the same way as the other jokers I have and they work but this one for some reason likes to be different

#

lmao

red flower
#

i have like a million tabs opened because my mod has a million files 😭

thorn furnace
#

i mean i have all my tabs open but I don't like
actively use more than a couple at a time

normal crest
#

Personally I have the lovely dumps added to my workspace as well, so whenever I need to look smt I just type the name of its file in the cmd panel

thorn furnace
#

so i just slap them on each monitor and then have like youtube/discord on the third/fourth monitor

red flower
#

i switch out constantly, specially for looking at vanilla/smods code

normal crest
#

Also I have one monitor, tho I don't really see how more than one would help me here

normal crest
static dagger
#

Is there a way to retrigger jokers?

thorn furnace
red flower
static dagger
#

thanks!

buoyant shard
#

This code snippet applies to all cards in deck and not just scoring cards and I don't know how to fix it:

            if context.other_card:get_id() == 13 then
                assert(SMODS.modify_rank(context.other_card, -1))
            end
            if context.other_card:get_id() == 11 then
                assert(SMODS.modify_rank(context.other_card, 1))
            end
        end```
hexed stump
red flower
red flower
vocal bramble
#

does smods have native support for xchips?

red flower
#

yes

hexed stump
#

I may have figured out my problem hold up

faint yacht
red flower
#

like, that's a screenshot of it being instantiated before load

hexed stump
#

Well, it seems to be working now, it might have been a cardarea type problem? just need to see if I can emplace back into the shop out of it

red flower
#

afaik the cardarea type is just for how the area displays itself, but i might be wrong

hexed stump
#

I was looking at the code and I think it affects how align and stuff affect it

red flower
#

yeah

marble yoke
#

hi

red flower
hexed stump
red flower
hexed stump
#

Oh also N, joyous spring was a huge help in tracking how the hell buttons work on ui elements

hidden sable
hexed stump
#

vanilla was a pain in the ass tracking things

chrome widget
static dagger
#

I'm trying to change a value when the player buys/sells blueprint/brainstorm, but it's crashing and saying that other_card is a null value, how might I fix this?

        if context.buying_card then
            if context.cardarea == G.jokers then
                local name = context.other_card.ability and context.other_card.ability.name
                if name == "Blueprint" or name == "Brainstorm" then
                    card.ability.extra.ForestRetriggers = card.ability.extra.ForestRetriggers + 1
                end
            end
        elseif context.selling_card then
            if context.cardarea == G.jokers then
                local name = context.other_card.ability and context.other_card.ability.name
                if name == "Blueprint" or name == "Brainstorm" then
                    card.ability.extra.ForestRetriggers = card.ability.extra.ForestRetriggers - 1
                end
            end
        end
wind steppe
static dagger
#

ah ok, thank you!

hidden sable
#

btw this didnt work

red flower
hidden sable
#

is key what i should be looking for?

runic pecan
#

The goal: "adds 3 random Enhanced Diamond cards in your hand"
The bug: "added cards are not all with Diamond suit"
Does anyone know where I did wrong?

hidden sable
spark owl
#

what is THAT

hidden sable
spark owl
#

Sorry i was just about to come in and ask how do i rename jokers in Malverk

#

But

hexed stump
#

okay, turns out the highlighting issue is bigger than I thought lmao, it's not a highlight limit thing

spark owl
#

WHAT IS THAT

hidden sable
spark owl
sonic cedar
daring fern
spark owl
#

well

red flower
hidden sable
spark owl
#

anywhom so does anyone know how to rename the jokers using Malverk perchance?

chrome widget
hidden sable
spark owl
#

I've tried it last night but it kinda failed

hidden sable
#

i wanna do something silly 😝

chrome widget
#

It's accessing an invalid key rather than the one you want, specifically for 10 - Ace

red flower
hidden sable
red flower
daring fern
hidden sable
daring fern
hidden sable
spark owl
#

It didnt work??

hidden sable
#

isnt there like a open_pause i can just hook too and reject

daring fern
spark owl
#

To be fair, i havent renamed most of them yet

#

But the ones i did rename didn't have their new names

hidden sable
spark owl
red flower
spark owl
daring fern
spark owl
#

Will ya still be up until then?

red flower
#

i will be profoundly asleep

spark owl
#

Just give me a time

red flower
#

i think it's better for you to post it here regardless a lot of people know their stuff here

spark owl
#

I'll come back when i have my PC

hexed stump
#

swapping the order of the remove and emplace fixed my problem? weird

hidden sable
#

also as far as i know its only the esc key and this that makes the pause menu pop up

#

i only need it while its ingame so

spark owl
#

IT JUST CHANGED INTO THAT???

hidden sable
spark owl
sullen brook
#

Where does an SMODS.Back calculate which cards are available within it? ie, "A deck of all spades"

hidden sable
untold palm
#

I'm trying to make a joker that sets probabilities to 0, but i'm having trouble getting probability to where it shoud be if the card is sold with a Oops all 6s in hand, but everything i've been trying has crashed, any idea on how to fix this:

median veldt
#

yeah ok so my mod is having very weird issues

#

and heres the thing

#

the person testing doesnt even have any of these jokers but for some reason the issue happens when the mod is enabled

#

its also not that hyperspecific some cards just fuck up

#

causing this error

red flower
untold palm
median veldt
#

wait wait what is that joker even supposed to do besides set all probablilities to 0

untold palm
#

since currently, selling this joker with Oops in hand and then selling oops changes probabilities to 0.5

untold palm
#

basically glass card support + a few other jokers i'm working on

median veldt
#

ohh ok
yeah it sounded kinda bad but that might be good depending on what the other jokers are

red flower
median veldt
#

elaborate

#

wait

hidden sable
#

whats the best way to display a number that the player will have to keep track of

median veldt
hidden sable
#

like a discard counter

untold palm
median veldt
#

What

#

How does THAT work

tawny onyx
#

Hi I'm new to the modding thing, uuh I was wondering if there was a way to make something give a random seal to a card

red flower
tawny onyx
#

Oh okay thank you so much!

serene granite
#

i need a little help if you guys dont mind, i am trying to make a custom joker similar to invisible joker where after 2 rounds i sell it to create another joker, but instead of making a copy of another joker, it spawns in a specific joker,

i have the mechanics working with the rounds and stuff but everytime i try to spawn the joker it crashes

is there an easy way to just have a card spawn a specific joker?

red flower
sturdy compass
#

Started helping someone with a mod that isn't Maximus and made some pretty cool tech for it. Basically it's arbitrary consumable logic

median veldt
#

ok i really like those card designs for the consumables

hasty mist
#

i am extremely lost, im just trying to target every joker to the right of this one, everything about this seems completely wrong

hidden sable
hybrid shadow
hasty mist
#

im essentially sleepwalking through coding this

#

some help would be very appreciated

#

i do not understand loops at all despite putting considerable effort into learning them

tall wharf
#

you have to store the index outside the loop

#

then check if loop index is more than the index you sture

#

this index you are going to store will store index of the current card that is being calculated

hasty mist
#

so just

#

local i = 0?

tall wharf
#

before the loop you just

#

local cardind = 0

#

and if gjokercards[i] == card then cardind = i end

hidden sable
#

how can i set the games gamespeed

hasty mist
#

something like this

daring fern
hidden sable
tall wharf
#

you can do the table insert thing still

hexed stump
#

Hmm, is there an easy way to check when a joker is unhighlighted short of doing it in update?

hidden sable
#

is there a way to randomize the game windows position

hasty mist
hasty mist
#

or is

tall wharf
#

you just need original logic

#

and you need to check if the i is more than cardind

hidden sable
tall wharf
#

which will be all the cards to the right

hasty mist
#

i might be lost now

tall wharf
#

i am sleepyu as fuck

hidden sable
#

get the current windows position and randomly add coordiantes to it?

tall wharf
#

no you just set it a few times

#

with small offsets

#

you pick

#

a position

#

then you add some offset to that position a bit

#

set window pos to that

hexed stump
# daring fern Yes.

A specific instance of said joker? That's where I've been running into trouble, and I don't want to hook highlight to move my card area around every single time I unhighlight a joker

tall wharf
#

do it a few times

hasty mist
#

this genuinely makes no sense to me 😭

hidden sable
true jasper
#

with debugplus

hasty mist
tall wharf
#

you need to define a table before the loop called that

hasty mist
#

this is the code i have atm

tall wharf
#

:<

hasty mist
#

i feel like im close im just

#

missing something

#

i cant make a for loop to save my life

tall wharf
#

😭

hasty mist
#

its genuinely the most egregious gap in my coding knowledge

#

i have tried and tried

#

and yet every time i try to make one my code is thought bubble gif worthy

hexed stump
hasty mist
#

i have

#

its so frustrating

sonic cedar
#

how can i stop a specific file from being loaded

daring fern
sonic cedar
daring fern
hidden sable
#

man if only i could jsut call :juice_up on the game window lol

sonic cedar
faint yacht
# hidden sable if i wanted it to shake how could i make that effect?

...I hope you are not going full hog like some other stuff does?

Download link: https://gamebanana.com/mods/599931

5 MONTHS OF WORK (2-3 years for @springlessmusic and jasper) HAVE FINALLY LED TO THIS, VS REWRITE ROUND 2 IS FINALLY HERE!

It's been an honor working with the dev team to make this a reality, it was extremely fun!!! (and stressful lmao)

Programmed in collaboration with @DaPootisBird, I am not ...

▶ Play video
wind steppe
sonic cedar
hidden sable
sonic cedar
hasty mist
#

i think my problem now lies in the G.jokers.cards[i]

#

should i be cardind?

faint yacht
hasty mist
#

or something else

hidden sable
wind steppe
hasty mist
#

or am i going about this incorrectly

sonic cedar
#

i love basil

hidden sable
daring fern
# hidden sable can you send the text version?
local function juice_up_game()
    local animtimer = 50
    while animtimer > 0 do
        local x, y, displayindex = love.window.getPosition()
        local d_width, d_height = love.window.getDesktopDimensions( displayindex )
        local w_width, w_height, flags = love.window.getMode( )
        animtimer = animtimer - 0.5
        local m_width = d_width - w_width
        local m_height = d_height - w_height
        if not flags.fullscreen then
            love.window.setPosition( (math.sin( animtimer ) + 1) / 7 * (m_width - 224) + 112, (math.cos( animtimer ) + 1) / 7 * (m_height - 224) + 112)
        end
    end
end
hallow forge
gilded blaze
#

having the game window move around without consent is peak

median veldt
gilded blaze
#

yea I'm not gonna do that crap of abomination
disruptions are just annoying to deal with

#

it discourages the fun of playing modded Balatro

sonic cedar
#

joy and whimsy

#

consider

tall wharf
#

i am picky about what i add to my mod

sonic cedar
#

you heard someone mention disruptions

hidden sable
#

how do i make it so when you buy a joker it cant show up in the run ever again even if you sell it

true jasper
#

for whatever reason a stake I added above gold isnt applying previous stakes

hidden sable
#

wait would i have a config that changes it?

hasty mist
hidden sable
#

like a config pointing to a bool and the in pool looks at it

#

so how would i get card over here

#

unless self suffies

sonic cedar
#

in_pool uses args

#

i believe you can think of it like unlock

daring fern
hasty mist
#

i dont understand

daring fern
sonic cedar
# hidden sable so how would i get card over here

i havent done this myself so fair warning, but maybe something like

in_pool = function(self, args)
  if args.type == 'insertyourargsthinghere' then
    return false else return true 
  end
end

and then you'd hook into add_to_deck probably

hasty mist
#

or should they be embedded or something

daring fern
hasty mist
#

oh wow it works

#

thank you so much

hidden sable
#

im a wee bit stupid so bear with me

#

actually wait

#

cant i jsut make a pool flag

sonic cedar
#

maybe

hidden sable
#

whats the function that gets called when a joker gets initilized

sonic cedar
hidden sable
#

isnt it just init

hybrid shadow
#

random question, do individual tarot cards have different weights?

hidden sable
#

oh wait isnt that cryptid shit

hybrid shadow
hidden sable
#

mb gang

hidden sable
#

im kidding

#

i dont think so

#

im pretty sure all consumables have equal weights

#

except for

#

soul cards

#

those are defined separately

hybrid shadow
#

true

#

alr then, im not changing the rate of upgrade cards

#

theyre already set to show up less often than some other types of cards (that is, so long as vanillaremade is accurate to the actual rate of tarot cards in shop)

hidden sable
#

how do i make a card sell for 0, i tried setting its cost to 0

hallow forge
#

hook/patch Card:set_cost

hidden sable
#

alright ill do it

hallow forge
#

you are going to hate modding then

hexed stump
hidden sable
#

no params just call it?

hexed stump
#

Oh you also need a card.ability.extra_value right before it

gilded blaze
#

just hook/patch Card:set_cost

hidden sable
hexed stump
#

why would you hook it when you can do it in two lines of code on the card

hidden sable
gilded blaze
#

don't use ability.extra_cost, it's inconsistent because sell cost is affected by Clearance Sale and Liquidation while ability.extra_cost isn't

hidden sable
abstract ingot
#

Trying to figure out why when I destroy 2+ clubs or spades it only registers as one instance of mult increase than 2. Is it something with the removed_card section?

hidden sable
gilded blaze
#

since buy and sell cost cannot go below 1

hexed stump
#

It can

gilded blaze
#

Card:set_cost doesn't allow it

modern kindle
#

Sell_cost does however
Because I do that

hexed stump
#

give me a second and I can show you it does

gilded blaze
#

sell_cost is affected by ability.extra_cost

hidden sable
#

i think i did something wrong

gilded blaze
#

but still
I wouldn't recommend that

hidden sable
#

like this?

hexed stump
#

Jokers have a base cost of 1

#

Any card does I'm p sure

hidden sable
worthy stirrup
hidden sable
#

just tried hooking it as well and it didnt work

sturdy compass
#

wtf

hidden sable
sturdy compass
#

the creature

hidden sable
sturdy compass
#

ow

hidden sable
gilded blaze
# hidden sable what would the hook look like?

if it's related to one object, I recommend setting the condition that that object
e.g. for joker:

local set_cost_ref = Card.set_cost
function Card:set_cost()
    set_cost_ref(self)
    if self.config.center.key == "j_modprefix_key" then
        self.sell_cost = 0
    end
end
#

lunch h_

worthy stirrup
hidden sable
hexed stump
worthy stirrup
hidden sable
# hexed stump

thats cooler than whatever god awful thing im doing lol

worthy stirrup
hidden sable
worthy stirrup
#

I wish he would learn boundaries

hidden sable
#

hes 9 seconds old

worthy stirrup
#

I do not care

hidden sable
#

anyone know how to change this setting?

#

like

#

with code

hasty mist
median veldt
#

give me a minute i could try figuring it out maybe

faint yacht
#

G.SETTINGS.play_button_pos

median veldt
#

or not

#

i figured it was gonna be there

hidden sable
faint yacht
hidden sable
#

oh its a 1 or 2

untold palm
#

does anybody know the function to call to increase joker slots in the shop? i've tried consulting a few mods as reference and got how to increase the other slots i wished, but the joker slots for shop has been my bane.

hidden sable
#

no G.GAME

#

is there a juice up for the whole screen that makes it shake

#

i know it gets triggered when you press a button

#

yknow what would be really fucked up

#

if my joker looks at your steam games and launches a random one

#

that would be funny af

untold palm
untold palm
sleek cliff
#

Is there a way to sense if a specific card has been created

maiden phoenix
#

add_to_deck function

sleek cliff
#

does that work with tarot and spectrals too?

pastel kernel
#

How do you retrigger rightmost joker?

sleek cliff
#

ok, so the add_to_deck is not seeming like the thing I need, I have a joker that if it creates a specific spectral it is destroyed

stiff quiver
#

why is this crashing my game?```lua
local _card = SMODS.add_card({set = "Playing_Card", suit = _suit, rank = "6", edition = edit_type, })

maiden phoenix
maiden phoenix
#

Use start_dissolve after the spectral is created

pure frigate
#

hey could anyone please help me with the steps to modding a very simple thought into the game? would be very much appreciated

pure frigate
#

the thought is it would fade an image in and out with and audio clip anytime a two of a kind is played

sleek cliff
maiden phoenix
#

Whats your code like so far

sleek cliff
#

I haven't added anything yet, but it does make the spectrals

maiden phoenix
sleek cliff
#

thanmks

pastel kernel
untold palm
#

Context: trying to do it so that this joker when bought becomes eternal and gives the player some money on buy, but makes the player lose money after beating 6 blinds while also losing its Eternal Sticker. Where i need HELP rn: i'm trying to first get the player to lose the money after the blinds beaten (currently testing with just 1), but i'm not having any sucess.

stiff quiver
#

you could make it return negative money at end of round, also iirc calc_dollar_bonus has to be outside the calculate function, so maybe thats why it doesnt work

drowsy heath
#

So I took the deserved day off of making the mod and I was bored all day n felt a bit lost. What am I gunna do when I've finished the mod im gunna have nothing to do all day

pastel kernel
#
config = { extra = { repetitions = 1 } },
    loc_vars = function(self, info_queue, card)
        return { vars = { 1, card.ability.extra.repetitions } }
    end,
    calculate = function(self, card, context)
        if context.end_of_round and context.game_over == false and context.main_eval and not context.blueprint and G.GAME.blind.boss then
            card.ability.extra.repetitions = card.ability.extra.repetitions + 1
            return {
                message = localize('k_upgrade_ex'),
                colour = G.C.FILTER,
                card = card
            }
        end
        if context.repetition and context.cardarea == G.jokers then
            local right_joker = nil
            for i = 1, #G.jokers.cards do
                if G.jokers.cards[i] == card then
                    if i < #G.jokers.cards and G.jokers.cards[i + 1].ability.set == 'Joker' then
                        right_joker = G.jokers.cards[i + 1]
                    end
                    break
                end
            end
            if right_joker then
                return {
                    repetitions = card.ability.extra.repetitions,
                    card = right_joker
                }
            end
        end
    end,
}

does it work like this?

#

retriggers the rightmost joker

drowsy heath
# stiff quiver do more mods

I mean i would rather do a mega mega mod and keep updating it, idc how large it gets rather than make loads of little bits

stiff quiver
#

makes sense

drowsy heath
#

That all stands on how much my artist is willing to commit

#

They are doing it for me for free rn with the stats I gave them

pastel kernel
stiff quiver
pastel kernel
#

for reference

drowsy heath
#

If you want the rightmost joker cant you base it on brainstorm and switch the left to right ?

#

Idk if I sound stupid

#

But thats what I would do

pastel kernel
#

hmm

drowsy heath
#

It worked for me with "droopy chad" which retriggers last played cards twice instead of first card

#

Card**

#

Idk of its same with retriggering jokers tho

stiff quiver
#

i believe context.repetition isnt used for retriggering jokers

#

but in cryptid mod theres a joker that retriggers the leftmost joker, so you could look at that one for the used context

untold palm
snow vale
#

how can i choose a random card from your hand that doesn't have an enhancement?

drowsy heath
pastel kernel
#

Wait, it’s written as context.retrigger_joker_check?

drowsy heath
#

Been up all night watching tv its like 8am now... gunna try and survive so I dont mess up the sleep schedule

untold palm
# pastel kernel i'm using vanilla remade

Basically, going by VanillaRemade's Brainstorm, i believe you'd simply need to find a way to get the last Joker in the array instead of the first, but other mods with such jokers might do the trick better

maiden phoenix
pastel kernel
#

Retriggers the leftmost joker 2 times

untold palm
maiden phoenix
stiff quiver
untold palm
lament agate
#

modders, what do you usually do when adding a talisman support?

primal robin
#

You see a number? to_big ehehe

primal robin
#

Well you need only for comparisions

lament agate
#

i will do the same after this

lament agate
#

i see

#

i dont see any documentations for it though

#

so im a bit lost

#

on adding a talisman support

maiden phoenix
#

Check how other mods do it, I have talisman compat in mine

#

Last part in utils.lua and wherever I use to_big

lament agate
lament agate
#

there should be a doc for it

unborn bay
#

simply dont support talisman

maiden phoenix
maiden phoenix
maiden phoenix
#

Im on phone so I can properly fetch where I use to_big elsewhere

lament agate
#

-# theres a difference between a dev that love their playerbase and not

lament agate
sleek cliff
#

I have the idea... its almost there... but its not there,,,

glass scaffold
#

I genuinely do not understand why I can't get the black-colored Joker to appear.

Every time I attempt to change it, it either goes back to the Violet one or nothing at all.

#

Please help me from crashing out.

lament agate
#

its just money thing?

red flower
#

read the last line

glass scaffold
lament agate
#

i wrap to_big to every

#

mults and chips?

glass scaffold
lament agate
#

too too

glass scaffold
#

Also, it was 1, 2

lament agate
glass scaffold
red flower
lament agate
#

okay

#

how do i do it tho

#

like

#

example

#

if i want to make a mult joker

#

talisman compat

viral ember
red flower
glass scaffold
viral ember
#

lol

#

I'm the opposite really

lament agate
#

okay

#

i understand it

#

son of a bitch

red flower
#

that's fine because it's your own value

#

it's only when comparing with values that the game has by default

lament agate
#

noted

pastel kernel
#

Has there ever been a joker that disables a boss blind whenever it gets debuffed?

red flower
#

not that i have seen

molten musk
#

morning

formal parrot
#

Morning izz

molten musk
#

hi heaven