#💻・modding-dev

1 messages · Page 424 of 1

lament agate
#

i have that in my mod

hasty mist
#

to_big will be a thing of the past

sage crater
#

where do you change chips?

subtle merlin
#

That's the thing, the modded stuff shouldn't affect chips, only mult

sage crater
hasty mist
#

alrighty so it no longer crashes

subtle merlin
hasty mist
#

however it also does not work ingame

sage crater
maiden phoenix
lament agate
#

question, i can just write their description in the loc file right?

#

i can just delete the text

sage crater
#

here's a simple version of a loc file

wintry solar
hasty mist
#

OH

#

its so late 😭

#

im making really silly mistakes

lament agate
#

@maiden phoenix should the custom tooltips stay out of the jokers loc?

#

nevermind

#

its Others

maiden phoenix
#

Yea

sage crater
#

ignis

sage crater
lament agate
#

this will shoe right?

#

show

sage crater
lament agate
sage crater
#

ah ok

#

then yeah, it should work perfectly fine

maiden phoenix
hasty mist
maiden phoenix
#

Ithink it will show an error if you dont

lament agate
#

it works!!!

stoic fulcrum
#

this code seems to be printing this error, what would the fix be here?
i recently updated steammodded to the version that adds destroycards but i can't seem to get it to work

red flower
subtle merlin
#

Hai N'

red flower
#

hiii

stoic fulcrum
# red flower is that the entire code? context.other_card doesn't exist in every calculate cal...

here's the whole thing

    key = "kuromisr",
    loc_txt = {
        name = 'Kuromi',
        text = {"Each scoring {C:spades}Spade{} or",
            "{C:clubs}Club{} card gives {X:mult,C:white}X1.5{} Mult.",
            "Retrigger each played {C:gold}6{}.",
            "If {C:mult}My Melody{} is in your deck,",
            "this Joker disables itself.",
            "If {C:mult}My Melody{} is sold or",
            "destroyed, this Joker gains extra",
            "{X:mult,C:white}X1.5{} Mult."}
    },
    pos = { x = 0, y = 0 },
    rarity = 2,
    atlas = 'sanriocards',
    blueprint_compat = true,
    cost = 12,
    config = { extra = { Xmult = 1.5, repetitions = 1 } },
    loc_vars = function(self, info_queue, card)
        return { vars = { card.ability.extra.Xmult } }
    end,
   calculate = function(self, card, context)
        if next(SMODS.find_card("j_srio_kuromisr")) and next(SMODS.find_card("j_srio_mymelodysr")) and not context.blueprint then
            card:set_debuff(true)
        end
        if not next(SMODS.find_card("j_srio_kuromisr")) and next(SMODS.find_card("j_srio_mymelodysr")) and not context.blueprint and card.ability.extra.chips == 90 then
            card:set_debuff(false)
        end
        local dmymelo = 0
        if SMODS.destroy_cards(context.other_card) and context.other_card.config.center.key == 'j_srio_mymelodysr' then
            return {
                message = localize('k_upgrade_ex'),
                colour = G.C.SPADES,
                dmymelo = dmymelo + 1.5
            }
        end
        if context.individual and context.cardarea == G.play then
            if context.other_card:is_suit("Spades") or context.other_card:is_suit("Clubs") then
                return {
                    xmult = card.ability.extra.Xmult + dmymelo
                }
            end
        end
        if context.repetition and context.cardarea == G.play then
            if context.other_card:get_id() == 6 then
                return {
                    repetitions = card.ability.extra.repetitions
                }
            end
        end
    end,
}```
red flower
#

yeah you need to specify a stricter context like context.individual

#

also returning dmymelo = dmymelo + 1.5 is not doing what you think it does (it does nothing)

stoic fulcrum
#

isn't it increasing the value of dmymelo?

#

if not then how would i do that

unborn bay
#

no because that applies to nothing in the context

#

you need to separate it first

stoic fulcrum
#

it's already separated i thought Thinking

red flower
unborn bay
#

^

red flower
#

hi haya

stoic fulcrum
#

well it's not doing nothing, it's softlocking the game when i try to sell the card holyfuck

unborn bay
#

hi n

#

i updated joyousspring count today

#

fuck

red flower
#

outdated again u.u

#

hi dilly

modern kindle
#

hello

#

smiley face

primal robin
subtle merlin
#

How can I tell when a card is retriggered?

sage crater
#

iirc, context.retriggered exists

stoic fulcrum
#

ok i think my code isn't working because the joker doesn't get properly debuffed
i'm assuming card:set_debuff(false) doesn't work at all if the card is already debuffed right

subtle merlin
stoic fulcrum
#

like since the joker's debuffed it's not running any code at all

sage crater
subtle merlin
#

When a playing card is retriggered by anything

sage crater
#

oh, neat

#

ok one second

#

ok, here's my thoughts

#

so context.repetition exists

#

I'm thinking basically just do something like ```lua
local reps = 0
if context.repetition then
reps = reps +1
end

#

this may not work, but it's the best that I could come up with from looking at the wiki and repos

wintry solar
subtle merlin
#

Nvm, ignore me I didn't read it all

sage crater
#

ok cool haha

subtle merlin
#

Wait, retrigger_card exists...

wintry solar
#

hold on let me grab the actual retrigger notes for you

subtle merlin
#

Please do, I can't find them in the wiki

wintry solar
manic rune
#

eremel im gonna barge into your house just for the new documentation

wintry solar
#

🤣 I just cba doing all the contexts, I want to set them out in a slightly more useful way but I'm still workshopping what they should be like

manic rune
#

-# i never knew you could return no_retrigger actually

red flower
#

shouldn't it be and not context.retrigger_joker there at the end

wintry solar
#

this is what they currently look like at the start but I'm not 100% happy with it

manic rune
#

question, did you cover the optional features 🤔

wintry solar
#

yes

manic rune
#

nice

wintry solar
#

it also covers adding new contexts and calculation areas

sage crater
wintry solar
#

I'm pretty happy with all that stuff, it's just how to set out the contexts I'm not sure on

manic rune
#

:3 im bad at web designing so i will double this and give it to sleepy or someone else who actually knows how to do it

modern kindle
#

ill quad it and return it to bepis

manic rune
#

what the hell

#

-# hi dilly

modern kindle
#

hello

#

ive finally gotten around to fixing some things while im in a adequate mood

subtle merlin
red flower
#

i just mean that the text is wrong

subtle merlin
#

oh

midnight briar
#

Hey everyone!
I'm new to modding balatro and currently working on a mod and I'm trying to figure out how to get the current number of consumables (Tarot cards, Planet cards, Spectral cards, etc.) that the player currently has "in hand" / in the consumable slots.
Does anyone know which variable or function in the game's code handles this information?
Thanks in advance for the help!

red flower
#

#G.consumeables.cards

midnight briar
#

Thanks!

subtle merlin
glass scaffold
daring fern
#

Is it possible for a patch to be conditional?

lament agate
#

how do you guys changes your font in vscode?

#

or atleast a fork of it

#

actually nevermind im stupid

wintry solar
vast night
#

hi again

#

does some1 know how i can have a context that happens when another joker triggers?

lament agate
#

good enough

wintry solar
lament agate
#

just need to change the bg to a fucking paper 🥀

maiden river
#

tbh I didn't even think that was code for a sec

lament agate
#

LMAO

#

insyaallah we shall find the bug

#

actually, i can use this font for the hood irony joker

#

hold on

vast night
bold gyro
#

Hey y'all, I've encountered a problem where if cards change rank during scoring, they become debuffed by The Pillar. Is this a common problem or would it be a problem with my code?

willow nimbus
#

is there a way to make a joker unable to be targeted by invisible joker

willow nimbus
#

How do you do it?

daring fern
willow nimbus
#

ah okay

#

haven't done that before

daring fern
red flower
wise terrace
#

hi, is there a way to check if scroing is taking place, I can think of checking context.scoring_name but is it guaranteed to not be set if scoring is not taking place

#

ohh I can just use before and after to track the state myself sorry

hushed field
#

When a consumable is constructed, what information is taken from the consumable type? I'm not sure I know what needs to be set per object versus on the entire category

north swallow
#

anyone know how to do start_dissolve() with an specific joker? like joker:start_dissolve() where joker = "j_prefix_joker"?

daring fern
hushed field
#

What's the specific effect you're after?

thorn furnace
#

Is it possible to make some items impossible to buy in the shop until a certain Joker is held

#

Like they just won't show up

signal rose
#

insert into the pool whenever the joker is put into hand?

thorn furnace
#

Yea
How would I go about doing that

thorn furnace
#

Huh
Neat

Thanks :>

signal rose
#

couldnt find it in docs for a minute lol

thorn furnace
#

Was thinking about it because I have a couple items that only do anything if you have a certain Joker

#

And it's kinda annoying to just have those around

thorn furnace
# daring fern

Question about this
Does this still allow SMODS.add_card({ set = the_set_of_the_card_in_question }) to spawn it

thorn furnace
#

Unfortunate

red flower
thorn furnace
#

Oh true

#

Thanks :>

hardy wasp
#

I'm getting an error whenever I load Balatro using one of my mods. Could someone help out?
I've attached the error I'm getting, along with my main.lua and anything else that could be relevant.

(I have a feeling it could be something with the main.lua file since it's only one line)

signal rose
#

isnt it done with assert(SMODS.load_file())

hardy wasp
#

let me try that, I've been referencing other people's mods to try to get multi-joker mods working and I havent seen assert(SMODS.load_file()) yet

#

still getting the same error

#

unfortunately :(

signal rose
#

oh wait no yeah that wouldnt really do anything here

#

ive just really gotten up, being slow there

hardy wasp
#

same with me

#

i was trying to fix this for hours last night

signal rose
#

is the folder content in the same folder as main.lua

orchid nest
#

Does anyone know how to score Xchips with calculate?

signal rose
#

remove the YummyPlus, its relative branch

hardy wasp
#

okay let me try that

signal rose
#

should just be content/jokers/wineJoker.lua")()

stiff quiver
#

is there a way to check if a joker is modded, and if so, what is it?

hardy wasp
#

that fixed that error, but now I have an error about a missing atlas, which I might know how to fix fixed, you need to define the atlas in your main.lua file

orchid nest
hushed field
#

Man, the button UI for cards is set up weirdly, huh. Lots of hard coding things in. Think I'm managing to work around it though

coarse plank
#

can playing cards have pershiable? Trying to make this joker

pure salmon
#

you could make an enhancement with a timer that goes down every round and then sets card.ability.perma_debuff = true once it hits 0. if you do that, i would use info_queue to display info about that enhancement in this joker description

coarse plank
#

would I just use info_queue instead of C:inactive to do that?

#

not sure how info_queue works

daring fern
#

You have to implement it though.

pure salmon
#

might as well just make the perishing part of the enhancement if you also want the spreading behaviour and the X3 Mult

coarse plank
daring fern
pure salmon
# coarse plank not sure how info_queue works

here's how i add info_queue in loc_vars to a joker if i want the wooden enhancement description to appear beside the card (my mod prefix is gb). just sub in your own prefix and enhancement key

info_queue[#info_queue + 1] = G.P_CENTERS.m_gb_wooden
signal rose
#

Having an issue with create_slider, attached video of the issue, from what i understand its because it keeps running G.FUNCS.slider(e) and then breaks when backing out because e doesn't exist
im mainly confused because it was working fine before but now breaks

create_slider({label = "Contrast", scale = 0.5, label_scale = 0.5, ref_table = palette.config.PACKS.BUFFOON, ref_value = 'CONTRAST', w = 3, min = 0.1, max = 8, step = 0.1, decimal_places = 1, colour = G.C.BLUE})

  local c = e.children[1]
  e.states.drag.can = true
  c.states.drag.can = true < Breaking Here```

Code: https://github.com/BlackoutMaiming/Palette/tree/main
orchid nest
#

how do you check if the hand exceeds the blind requirement? making it for this enhancement here.

signal rose
#

if G.GAME.chips >= G.GAME.blind.chips then ?

orchid nest
#

ah

#

ty

#

o no nvm

#

that didnt work :p

signal rose
#

error or just non functional

daring fern
orchid nest
#

non functional

orchid nest
daring fern
# orchid nest

You would then do if hand_chips * mult >= G.GAME.blind.chips in context.final_scoring_step I think.

pure salmon
orchid nest
#

ghweufnewquiofnwefwqk

long sun
#

is there a way to get the starting deck configuration?

daring fern
orchid nest
long sun
#

yep

long sun
#

skjdfnkjsdngsd ya you saw techno joker, you put your wee 🤔 on it

#

i see there's G.GAME.starting_deck_size

#

but that's for how many cards are in the deck

daring fern
long sun
#

right, gotcha, thanks ^^

stiff quiver
#

hi, i made this code to multiply a joker's values by a number, but instead of that it just completely changes the joker's ability to giving xmult, so i'd like to know what i did wrong. lua for key, effect in pairs(G.jokers.cards[card.ability.extra.sel_joker].ability) do if type(effect) == "number" then G.jokers.cards[card.ability.extra.sel_joker].ability[key] = effect * card.ability.extra.multiplier end end

daring fern
pure salmon
#

hey @red flower ease_discard does not ease hands here

#

(how do i do this for hands)

daring fern
pure salmon
#

thank you

stiff quiver
red flower
pure salmon
#

happens to the best of us

daring fern
stiff quiver
daring fern
stiff quiver
daring fern
#

Either you copy Cryptid or you miss compatibility for most jokers.

stiff quiver
#

then i'll try copying cryptid, i remember looking at its code for a short while and not fully understunding most of it lol

#

thanks!

signal rose
midnight briar
#

How do I get the current mult value of the hand when a joker scores? (not the base mult of the hand, but the current mult e. g. after glass cards, etc.)

midnight briar
#

I'm trying to make a joker multiplies the current mult of the hand by it's logarithm (base 10). How would that look like? Thanks in advance!

whole lava
#

how can i make play card destroyed after scoring?

daring fern
whole lava
#

idk if this one working ? (im making a deck that destroy play hand if the play hand have multiple suits)

blazing salmon
#

hello, where in the game files can i see the descriptions for all the jokers as a reference?

whole lava
blazing salmon
ionic breach
#

does anyone have any tips for reskinning face cards? im new and wanted to make a pack for my partner and i :)

daring fern
ionic breach
#

tysm 🙏

formal parrot
#

CHAT

#

IM TIRED OF OPENING THE GAME EVERY TIME I WANT TO PREVIEW MY SHADER CAN SOMEONE PLEASE MAKE A RELOAD SHADER BUTTON 😭

signal rose
#

you can add a button to the menu that just runs SMODS.restart_game() ?

formal parrot
#

Is there no option for only reloading shaders

signal rose
#

they're loaded in during startup so i doubt it

#

i might be able to make a mod for it actually

manic rune
#

you can

#

theres the update thingy that debug plus provides

#

though i dont know how to use it :p

signal rose
#

i was thinking just bind the shaders section of smods itself to a function keybind

normal crest
formal parrot
#

Bless me with your arcane information

normal crest
#

watch shader Mods/your mod/assets/shaders/name.fs

formal parrot
#

So does this load the shader again ?

#

Or displays it

normal crest
#

it will update ingame whenever you save the file

formal parrot
#

You saved my life

normal crest
#

thank debugplus not me

signal rose
hollow snow
#

how do i do a random pitch for play_sound? and give lower and upper limits, because if i just use pseudorandom it ends sounding like croaking wood

coarse plank
#

Whats the pixel size for enhancements?

daring fern
hybrid shadow
#

would taking ownership and pasting in vanillaremade code (for calculate/use functions) be a good way to try and see what works when messing around with stuff like if/return statements

whole lava
#

why this one doesn't destroy played hand when i played multiple suits ? (im making a deck that destroy play hand if the play hand have multiple suits)

daring fern
#

Neither does card.suit

#

Neither does G.FUNCS.G_Update_HUD_Cards()

#

Neither does context.played_cards

#

Neither does context.in_scoring

whole lava
#

how can i fix that? (cause i'm new to this)

slate token
#

I have a problem with displaying numerical data in the card description. I just recently started making mods and I can't really find how to solve this problem. In theory, this card should do x4 with a 1 in 4 chance if 4 is counted, but instead of numbers it says nil. Maybe you know how to fix this?

daring fern
slate token
#

And how do i name it?

#

As i can see i have only 3 values with ##

granite nymph
hybrid shadow
granite nymph
#

let me check

daring fern
slate token
hybrid shadow
hybrid shadow
daring fern
#

Xmult_mod is valid.

#

Xmult is also valid.

granite nymph
#

couldnt you use card.ability.extra.xmult in loc vars

hybrid shadow
thorn furnace
#

If i may ask just out of curiosity
What exactly does the "mod" in xmult_mod mean

hybrid shadow
hybrid shadow
thorn furnace
hybrid shadow
thorn furnace
#

Why "mod"

#

And not any other word

granite nymph
#

modification?

#

thats what i think of

thorn furnace
#

Isnt it just for flat xmult tho

hybrid shadow
thorn furnace
slate token
hybrid shadow
slate token
granite nymph
#

how do i fix (or at least get rid of) these warnings?

manic rune
#

does your workplace include smods-main (or the smods folder, basically)

hybrid shadow
manic rune
#

include it in there then :3

daring fern
#

Also the lovely dump.

manic rune
#

i gotta go sleep early so i will let factwixard handle that, ur doing a good job helping others btw 👍

granite nymph
#

which file should i open

hybrid shadow
granite nymph
#

do i just openm the folder?

hybrid shadow
#

i dont use lua workplace but i think you just have to include the folder

granite nymph
#

i cant just import an entire folder

#

it has to be a specific file

hybrid shadow
#

are you trying to open a file

granite nymph
#

im trying to put smods in my workspace

hollow snow
#

can i add properties to other jokers? like if i wanted my joker to select other jokers could i do other_joker.locked = true and it would be added as a property?

red flower
hybrid shadow
#

hey n

red flower
#

hii

hollow snow
red flower
hollow snow
#

oh, ok then that's dop[e

red flower
#

vanillaremade should be equivalent to vanilla code

#

but i cant promise anything

coarse plank
#

Whats the atlas for making enchancments 😭

hybrid shadow
hybrid shadow
coarse plank
#

i dont know what it is and I get a crash everytime i try to see my enchanment

hybrid shadow
coarse plank
#

no just trying to add a new enhancment but I cant find an example of an enchancment in its entirerty only the functional code for base game ones

#

so i dont know how to format enchantments

red flower
#

atlas is the key for the SMODS.Atlas you made

if you don't have one then you can remove that line to use the vanilla atlas

hybrid shadow
coarse plank
#

if your talking about the smods wiki it only has the code for making your enchancment functional not the art part of it

vast night
#

Hey im dying inside. How does it not make EVERY card negative? (Ill add the card type condition later)

    calculate = function(self, card, context)
        print(context.playing_card_added)
        if context.playing_card_added then
            other_card = cards[0] or nil
            print(other_card)
            if other_card then
                other_card:set_edition('e_negative')
            end
        end
    end,
coarse plank
#

this is what i got going on

hybrid shadow
vast night
coarse plank
#

i dont know if i do or how to do that 😭

#

it works for my jokers that all i know

hybrid shadow
red flower
vast night
red flower
#

also please don't make global variables

vast night
#

oop forgot

coarse plank
#

is this what I need?

red flower
vast night
#

oh my fucking go

hybrid shadow
vast night
#

oh my wtf

#

lmfao

#

sry

red flower
coarse plank
#

yup it has everything

hybrid shadow
coarse plank
#

oh do i need different files for making enchantments

coarse plank
#

can i not mix them in the code with my jokers

hybrid shadow
coarse plank
#

i got it working

#

thank you for putting up with me

red flower
vast night
#

k

#

bruh

hollow snow
#

how do you insert an info_queue?

vast night
# red flower oh also lua starts indexing at 1

well context.cards dosen't work, but context.other_card does
this wont make the card negative tho

    calculate = function(self, card, context)
        if context.playing_card_added then
            local other_card = context.other_card
            if other_card then
                other_card:set_edition('e_negative')
            end
        end
    end,
vast night
hollow snow
red flower
gilded blaze
#

help how do I DrawStep 💀

pure salmon
#

is there a blind context for discarding like context.press_play

vast night
vast night
vast night
#

where

#

its not in the wiki

pure salmon
#

blinds

vast night
#

😭

red flower
vast night
#

i hate myself

red flower
pure salmon
#

so would context.pre_discard be a good context for this?

gilded blaze
coarse plank
#

How do i check for the enhancment of played card

daring fern
primal robin
#

Holy fuck, I guess I found something

#

We cannot set metatable for numbers, it has no effect

#

BUT we can set metatable for string

#

And perform ariphmetic operations on a string

tepid crow
#

thanks I hate it

coarse plank
primal robin
#

This code actually works

rapid stag
#

i might be dumb, but is there a way to check for if a card... has no rank? cirLost like a kind of check that catches any enhancement that makes the card rankless like stone joker, but picks up any other enhancement that does the same thing

faint yacht
# vast night context.press_play does not exist of my knowledge check https://github.com/Steam...
context.after
context.area
context.before
context.blind
context.blueprint
context.blueprint_card
context.buying_card
context.card
context.card_effects
context.cardarea
context.cards
context.cards_destroyed
context.check_enhancement
context.consumeable
context.cursor_pos
context.debuffed_hand
context.destroy_card
context.destroying_card
context.discard
context.drawing_cards
context.edition
context.end_of_round
context.ending_shop
context.extra_enhancement
context.final_scoring_step
context.first_hand_drawn
context.full_hand
context.game_over
context.glass_shattered
context.hand_space
context.hook
context.ignore_debuff
context.individual
context.interrupt
context.joker_main
context.layer
context.main_eval
context.main_scoring
context.no_blueprint
context.open_booster
context.other_card
context.other_consumeable
context.other_joker
context.other_something
context.playing_card_added
context.playing_card_end_of_round
context.poker_hands
context.post_joker
context.pre_discard
context.remove_playing_cards
context.removed
context.repetition
context.repetition_only
context.reroll_shop
context.retrigger_joker
context.retrigger_joker_check
context.scoring_hand
context.scoring_name
context.selling_card
context.selling_self
context.setting_blind
context.skip_blind
context.skipping_booster
context.stack
context.starting_shop
context.tag
context.type
context.using_consumeable
hybrid shadow
#

possibly odd question but can an if statement go inside of an event

red flower
#

yes

#

inside the function to be more specific

wintry solar
#

That list has non standard contexts in right?

primal robin
#

So, Lua doesn't allow you to compare table and number, but you can compare string a number.
So, if we'll use string as method for storing big numbers, we a gucci... right?

faint yacht
#

I've regexed contents of the lovely\dump folder for that list. Some still may not be in it.

hollow snow
wintry solar
hybrid shadow
#

messing around with familiar's code by taking ownership, how would i avoid destroying said card if it has a mod sticker

primal robin
faint yacht
hybrid shadow
# hybrid shadow how

i was told SMODS.find_card was the way to check if a player had a certain joker

primal robin
#

Yes, but what if you don't?

hybrid shadow
primal robin
#

Game will stuck forever in this check until this joker appears from somewhere, which it isn't because game stuck

red flower
# hybrid shadow wdym

you need the return true if you want the event to end so it will keep checking if it finds nothing

#

not SMODS.find_card(...) is always false also

hybrid shadow
#

how do i better check for said jokers existence then

red flower
#

not next(SMODS.find_card(...))

#

and put the return after the if

hybrid shadow
red flower
#

it will just keep queuing the event if it finds the card

hybrid shadow
red flower
#

i would make a new list and add the cards_to_destroy that dont have the stickers to it

hybrid shadow
#

what

red flower
#
local new_list = {}
for _, pcard in ipairs(cards_to_destroy) do
  if not has sticker then -- idk how to do this :3
    new_list[#new_list+1] = pcard
  end
end
SMODS.destroy_cards(new_list)
runic pecan
#

Consumeable idea. Would this be too complicated, or should I only pick one between them?

daring fern
runic pecan
zealous glen
#

@minor magnet wants to add minigames, I think @chrome widget or @weak brook could help

granite nymph
#

does anyone know the weight of spectral packs?\

chrome widget
#

Keku is the one who outright programmed a scratch Tetris game for a card so she's probably more in line to ask, but it really does depend on your scope

zealous glen
#

I mean you added Donkey Kong

#

Someone else did the original work but still you attached it to a Joker

red flower
hybrid shadow
red flower
#

yes

zealous glen
red flower
#

that's rude to ask

granite nymph
#

thanks

chrome widget
#

Uhhhh

zealous glen
#

I can’t tell if you’re saying “Uhhhh” or if it’s because Tavros says that a lot

pure salmon
#

how do i get the base X1 blind size for the current ante

mild oak
#

is it normal for my LOCALIZATION FILE to crash balatro what 😭

red flower
#

yes, it's a lua file like any other

mild oak
red flower
#

yes look at line 2722

mild oak
#

OH

#

you know... i couldve seen that myself

#

thanks

stable pollen
#

is it possible to get the sell value of a joker that was just sold and activates context.selling_card

#

ive been just looking through anything i can im starting to think its just not possible

signal rose
#

what are you trying to do

stable pollen
#

one sec

red flower
#

context.card.sell_cost iirc

stable pollen
outer basalt
#

So I have a card that breaks on repetitions. How would I make it repeat until it breaks ?

stable pollen
#

code snippet

#
   calculate = function(self, card, context)
        if context.selling_card and not context.blueprint then
            card.ability.extra.xmult = card.ability.extra.xmult + card.ability.extra.xmultgain
            return {
                cardarea = G.jokers,
                message = 'Upgraded!',
                colour = G.C.MULT,
                card = card
            }
        end
         if context.joker_main then
            return {
                message = localize { type = 'variable', key = 'a_xmult', vars = { card.ability.extra.xmult } },
                Xmult_mod = card.ability.extra.xmult
            }
        end
    end
red flower
outer basalt
#

heres what I did in my code. it doesnt add to the XMULT but rather checks if the sellcost is higher than the current mult added

ripe kestrel
#

how can i create a specific tarot like hierophant?

outer basalt
#

create_card(key = 'heirophant')

#

I believe

ripe kestrel
#

thx

daring fern
daring fern
stable pollen
#

i spent like an hour trying to figure it out on my own 😭

outer basalt
stable pollen
#

should have just asked fr

outer basalt
#

I was the same way when I started out

vagrant cedar
#

DISCLAIMER: This post contains AI generated art. AI generated art is NOT endorsed by LocalThunk or the server mod team. This post has been okayed by the mods - see below
Hey guys, I was joking around and curious as to how poorly-made a Joker would be if it was solely made by AI. I can confirm, though the Joker seems to work as intended, it's coded absolutely awful, and the art looks atrocious (can't even get the letters right.) Wanted to share with the community, so here's what I ended up with.

daring fern
outer basalt
#

ah

karmic creek
red flower
vagrant cedar
red flower
scarlet imp
#

how can I take control of a vanilla Joker to modify its code?

vagrant cedar
red flower
#

the text should be "Gives X2 Mult if a Queen is scored"

scarlet imp
vagrant cedar
red flower
#

yeah it doesn't give X2 for each queen like the text implies, just once

vagrant cedar
chrome widget
granite nymph
#

does it matter what the psuedoseed is?

red flower
#

yes and no, depends on what you want with your randomness

#

the string itself doesn't matter but you want cards with the same "source" of randomness to have the same one

wintry solar
vagrant cedar
#

Smods wiki only so it knew the commands

wintry solar
#

I’m surprised it did so well tbh, it’s a lot better than a lot of AI attempts I’ve seen

#

How specific was your prompt?

wintry swallow
#

Is there any way to get the id and name of a random common joker?

wintry swallow
daring fern
daring fern
#

Then get .key and put that key into G.localization.descriptions.Joker[key].name

daring fern
north lodge
#

I once again have returned to gather the minds to see if we can collectively figure out how to make an options ui element (option_cycle page) be changed by another element (uibox_button)

pulsar furnace
#

what are the vanilla seals keys?

red flower
#

"Red", "Gold", etc

pulsar furnace
#

oh

#

thanks

signal rose
daring fern
wintry swallow
signal rose
hybrid shadow
signal rose
#

thats fair i didnt see you had replied, mb

#

was looking at my other monitor and it went past

hybrid shadow
# daring fern

maybe point that out and use your words instead of question mark reacting

serene linden
#

is there a context for when in a boss blind, i cant find anything and context.boss_blind doesnt work

pure salmon
#

this function freaks out if you discard (because it's calling itself), is there another context i can use that isn't pre_discard to stop this

pulsar furnace
#

how do i make that the seal animation doesnt play (deck)

pure salmon
#

context.press_play exists but context.press_discard does not. do i have to patch that in

wintry swallow
#

how do I check when the joker is created?

daring fern
#

Checking if it's not the hook and calculating a context.

wintry solar
pure salmon
wintry solar
ripe kestrel
#

how can i add a card thats a custom consumable

serene linden
pulsar furnace
wintry solar
#

Make nil true too for silent

#

Silent night stop the animation too actually

sonic cedar
#

good afternoon all
hi somecom
holy shit john lovely hi

daring fern
#

Also button_events doesn't exist.

pure salmon
#

yeah i mean button_callbacks

chrome widget
#

Admittedly Something you'd probably be better served directly presenting what you're confused about rather than just a vague emoji react

#

For me at least, I basically completely ignore reactions as a part of conversation since they don't really say anything specific

red flower
#

I usually use reactions to end the conversation haha

wintry solar
#

Yeah, they’re like a final tick on a chain

outer basalt
#

I know I sometimes use reactions for nonverbal communications

#

Autism and things

pure salmon
#

i can't find an SMODS.calculate_context call for press_play in the lovely dumps

brittle tide
#

I'm trying to make a joker that has a 1/5 chance of destroying a card and improving the Xmult_mod whenever a stone card is triggered but I can't figure out how to get the card to be destroyed. I've gotten all the other code working and I was wondering if anyone knew how to get it to destroy the stone cards?

wintry solar
#

fwiw, I also find the one word responses with a full stop at the end come off as very passive aggressive

chrome widget
signal rose
pure salmon
outer basalt
#

For me, I sometimes like typing in full capitalization/punctuation so I'm not being passive aggressive it's just how I type sometimes. The same for some others as well.

red flower
signal rose
wintry solar
frigid cargo
#
    config = { extra = {xmult = 1.35} },

    loc_vars = function(self, info_queue, card)
        return { vars = { card.ability.extra.xmult } }
    end,
    calculate = function(self, card, context)
        if context.other_joker then
            if G.P_CENTER_POOLS["Shape"][context.other_joker.config.center.key] then
                return {
                    xmult = card.ability.extra.xmult
                }
            end
        end
    end,

can someone help me figure out what im doing wrong? it just doesnt work

modern kindle
#

Sowwy I wasnt reading cause I just woke up hi @chrome widget :D

#

Instead of my reaction you get an image

chrome widget
#

Hi hi!!!

modern kindle
#

My image of voice

scarlet imp
#
SMODS.Joker:take_ownership("j_joker",
    {
        config = {
            extra = {
                mult = 8
            }
        },
        calculate = function(self, card, context)
            return {
                mult = card.ability.extra.mult
            }
        end
    }
)

I wrote this code to take control of Jimbo but its not working. I had just joker before instead of j_joker but neither works

outer basalt
signal rose
wintry solar
#

Saying just “Yes.” comes across to a lot of people like you’re done answering the question

outer basalt
#

I don't see it?

red flower
modern kindle
#

N my goat

wintry swallow
#

Is there any way to check when a joker is added?

red flower
#

hi

modern kindle
#

How are you feeling n

red flower
#

bad becasue im in the office

daring fern
signal rose
sonic cedar
#

i tried changing the #1# to a #2# (as shown), yet the description still isn't formatting properly?

wintry swallow
modern kindle
sonic cedar
red flower
red flower
blazing salmon
#

hey, how can i keep track of a value throughout the course of a run (like throwback)
in this case i'm trying to track how many food jokers (ice cream, popcorn, gros michel, etc.) have been consumed throughout the run

sonic cedar
red flower
#

so nothing will show

#

you need to return outside that if block

sonic cedar
#

ohhh ok

#

this is collection btw, so you're not supposed to see that grey text

#

ill move the return

pure salmon
#

G.GAME.blind.mult returns 0 if you're not in a blind, is there an equivalent for it for the whole ante?

minor magnet
sonic cedar
#

is this not outside the if
it collapses like it is

red flower
sonic cedar
#

OH RIGHT

pure salmon
sonic cedar
#

ok everything works now thanks n

red flower
#

self.config.mult?

#

or self.mult rather

pure salmon
#

would that not just grab 8

chrome widget
sonic cedar
hybrid shadow
red flower
minor magnet
#

deltarune ch3 spoiler below
||during the tenna fight, minigames are used as the main win condition, taking what you usually do with the game and stretching it in a warioware style, i'd love to have a tenna joker that lets you play a minigame before playing each hand in a bossblind, with a reward of some sort for getting them right, like it gaining mult||

hybrid shadow
minor magnet
#

the minigames could use other jokers as textures

pure salmon
modern kindle
granite nymph
#

boosters keep having this effect and dont spawn any cards

#

(i know the name is error i havent put a name down)

minor magnet
sonic cedar
# sonic cedar i spoke too soon

it's supposed to transform instead of copying but instead it just

(it shouldnt have even transformed in this case there werent any other jokers 😭 )

scarlet imp
#

like I modified the config but the effect and item description aren't changing

wintry swallow
#

I'm trying to change variables using add_to_deck, but nothing happends :(

granite nymph
# minor magnet looks like a creepypasta

"i was playing balatro and i openeed up a booster pack. no cards spawned and then there was hyuperrelaistic blood and my jokers were killed and there was blood. edb teof the stroy"

hybrid shadow
hybrid shadow
signal rose
wise terrace
#

is there a way for a joker to know if its about to be destroyed

subtle merlin
hybrid shadow
scarlet imp
#

same lol

minor magnet
scarlet imp
#

just trying to figure it out for the first time

signal rose
hybrid shadow
wise terrace
#

I mean I could override the card:start_dissolve for that specific card, does lua allow that

daring fern
scarlet imp
minor magnet
wise terrace
wise terrace
minor magnet
sonic cedar
wise terrace
wise terrace
daring fern
minor magnet
pure salmon
#

how do i debuff a card outside of context.debuff_card without using perma_debuff

wise terrace
minor magnet
hybrid shadow
#

if n is still here i would like to point out minor mistake in vanillaremade incantation

wise terrace
granite nymph
#

those particles are there forever

#

thats my issue

hybrid shadow
granite nymph
# daring fern Code?

SMODS.Booster({
draw_hand = true,
key = "reversepack",
atlas = "Booster",
pos = { x = 0, y = 0 },
discovered = true,
loc_vars = function(self, info_queue, card)
return { vars = { card.ability.choose, card.ability.extra } }
end,
config = {
choose = 1,
extra = 2
},
cost = 4,
weight = 1,
kind = "reversetarot",
group_key = "k_yip_reversetarot",
create_card = function(self, card)
return SMODS.create_card({
set = "reversetarot",
area = G.pack_cards,
})
end,
ease_background_colour = function(self)
local choices = {
HEX("a56767"),
HEX("773e3e")
}
local color = pseudorandom_element(choices, pseudoseed("reversepack"))
ease_colour(G.C.DYN_UI.MAIN, color or HEX("a56767"))
ease_background_colour({ new_colour = color, special_colour = G.C.BLACK, contrast = 2 })
end,
})

pure salmon
daring fern
subtle merlin
daring fern
north lodge
pure salmon
daring fern
subtle merlin
pure salmon
daring fern
serene linden
#

im trying to make a joker that gives some mult when a stone card is scored, but it isnt adding the mult, any ideas why? i addapted it from the walkie talkie example

local shell = SMODS.Joker {
    key = 'Shell',
    loc_txt = {
        name = 'Shell',
        text = {
            "Each played {C:attention}Stone Card{}",
            "gives {C:mult}+#1#{} Mult when scored"
        }
    },

    config = { extra = { mult = 4 } },

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

    rarity = 1,

    atlas = 'crabro',
    pos = { x = 2, y = 0 },

    cost = 4,

    calculate = function(self, card, context)
        if context.joker_main then
            if context.individual and context.cardarea == G.play then
                if SMODS.has_enhancement(context.other_card, "m_stone") then
                    return {
                        mult = card.ability.extra.mult,
                        card = context.other_card
                    }
                end
            end
        end
    end
}
serene linden
#

oh yeah oops

#

thanks

granite nymph
frigid cargo
#

is there a way to prevent a joker into being debuffed by the blind?

stiff quiver
#

does G.P_CENTER_POOLS.Joker include modded jokers?

daring fern
daring fern
subtle merlin
pure salmon
#

ohhhh i finally found context.hook. this works now, but it only selects cards up to the card selection limit. is there any way to bypass this

daring fern
pure salmon
#

smods has a new api for that, right? not sure how to use it

subtle merlin
daring fern
pure salmon
pure salmon
frigid cargo
daring fern
daring fern
boreal vale
#

How can I get the edition of a Joker?

daring fern
boreal vale
#

So to check for negative it would be card.edition.negative?

daring fern
wise terrace
#

hi sorry, what exactly is context.main_eval

daring fern
wise terrace
frigid cargo
wintry solar
frigid cargo
brittle tide
#

Shouldnt this code give a 1/5 chance of destroying a stone card when triggered or did I mess something up

subtle merlin
daring fern
brittle tide
#

alright thank you

sonic cedar
pure salmon
north lodge
#

What can I use to refresh/reopen the ui that is currently open? (In the settings)
This might be the only way I can get my visuals to update 😅

wintry solar
subtle merlin
#

I'm still confused, check if what's the same or not?

pure salmon
#

how do i force all highlighted cards to deselect?

daring fern
pure salmon
#

the highlighted cards are in the deck

daring fern
pure salmon
#

that shouldn't happen but it does, so i'm using a hacky solution

wintry solar
faint yacht
wintry solar
#

So if you store what it is in your joker, you can just check if it’s the same as the current triggering card, which would imply a retrigger

pure salmon
# daring fern `G.deck:unhighlight_all()`?

doesn't work. i know it's a highlighted card in the deck because the poker hand won't show until played (flipped card highlighted) and it gets pulled from the deck when i play the hand

subtle merlin
brittle tide
#

it functions properly after replacing those two but its visually difficult to tell what its doing

daring fern
wintry solar
subtle merlin
plain gazelle
#

spawning negative consumables (using SMODS.create_card({})) finally works but for some reason they don't have "use" button and do not return to consumable slots when dragged around?

tepid crow
#

use add_card instead no?

daring fern
plain gazelle
#

Works now, thanks

scarlet imp
#

if I want to find what Jokers the player has, I use next() and pass in the card area and the Joker's key, right?

daring fern
#

next(SMODS.find_card("j_modprefix_key"))?

scarlet imp
#

ok, thanks

zenith hedge
#

how do i fix this

subtle merlin
zenith hedge
#

hold on let me get it

frigid cargo
#

what does context.retrigger_joker_check do?

daring fern
zenith hedge
#

yea i have it installed and its not telling me anything

#

i think its somewhere around here

daring fern
zenith hedge
#

the file is a .lua

daring fern
zenith hedge
keen totem
#

how do i get if a card is in a certain cardarea?

zenith hedge
subtle merlin
keen totem
#

(as in not in collection to be specific)

daring fern
cobalt vector
#

I wanna make a Joker that gives itself mult if a discard only contains heart cards. How can I detect if there are only heart cards being discarded?

frigid cargo
#

how do i check if a scored card or joker is foil?

keen totem
#

how do i get the position of a joker in G.jokers?

#

like what slot theyre in

daring fern
daring fern
keen totem
#

check if card.edition exists first

zenith hedge
frigid cargo
frigid cargo
keen totem
#

same thing

#

card just means the card

daring fern
keen totem
#

card is a joker if youre in a joker's calculate

zenith hedge
frigid cargo
zenith hedge
#

damn my code has a lot of syntax errors

long sun
#

hi! i have a bug with my Copper Grate cards, where if you play a Weathered Copper Grate card with an Oxidised one, both get destroyed

#

this only happens if the cards are the same rank and suit, and i know why this is happening — the Oxidised card is destroying both, as they're identical cards

zenith hedge
long sun
#

but, i've got no clue how to fix it -u-

#

ideas?

nova cedar
#

tried a run with only jokers i added

cobalt vector
#

That's one mythical looking scholar

nova cedar
#

thats an upgraded scholar

cobalt vector
#

ooo, upgraded jokers?

#

i like that idea

nova cedar
#

my idea is theres gonna be a consumable that u can use on various existing jokers to upgrade them into Attuned Jokers

#

im gonna call it like The Rune or something

scarlet imp
#

what context should I use when the player acquires a new joker

subtle merlin
daring fern
nova cedar
nova cedar
#

u could set a variable in the card's config

#

then check for the variable

#

if ur not already doing that

#

if u are then idk

daring fern
long sun
#

not the issue, and that crashes the game -u-

#

wait lemme do a little more testing

daring fern
nova cedar
#

ohh wait yeah if ur using self.config to tell the game information about specific instances of a card that probably wont work

long sun
#

sure, hold on

long sun
#

which i added so Weathered cards don't self destruct once turned into Oxidised cards

#

as iirc the destroy_card context comes after final_scoring_step

nova cedar
#

do you need primed to be different between different grate cards

long sun
#

okay so the way i'm using it

#

when a card becomes Oxidised, its primed variable is false

#

and it's only true if context.before happens, and it'll only self destruct if primed is true

nova cedar
#

if you want multiple of your cards to have different values of the same variable, then youd need to access that variable from card.ability, otherwise if im not mistaken it will only access the default variable you set in Joker:config

normal crest
daring fern
nova cedar
long sun
#

gotcha

#

ah i see

#

ya also, testing revealed that i was wrong about the cause, as different cards also don't function properly

nova cedar
#

also, if you update the default value, it wont change the value of an instance of ur joker mid-run

#

you'll have to sell your joker and spawn a new copy

daring fern
normal crest
#

Whenever you modify config you have to start a new run, otherwise they'll keep the old config they had

nova cedar
#

^

nova cedar
#

or am i mistaken about that

scarlet imp
long sun
#

ah i've got it working now :D

normal crest
#

you're not mistaken, but saying starting a new run is easier

daring fern
long sun
#

thanks :D

nova cedar
normal crest
subtle merlin
#

How would i add a counter to all cards using a joker?

long sun
#

i still love how these look :3

sage crater
#

woah those are amazing

daring fern
sage crater
#

the bug

scarlet imp
#

I might make the suit a little brighter though, I have a little trouble with the first two in particular

long sun
#

ya, it was as ENNWAY said, i was accessing the wrong thing ^^

subtle merlin
long sun
#

you would not believe your eyes

#

-# yes :)

daring fern
daring fern
scarlet imp
daring fern
#

You cannot check that the card would give mult.

#

Or where it would be.

scarlet imp
#

I tried that but card refers to this Joker, since I have this code inside of a calculate function

#

ideally I'd be using other_card or something but nothing I've tried has given me the results I want

nova cedar
daring fern
normal crest
#

context.card

#

Oops

red flower
#

context.card

normal crest
#

I forgot to scroll down

red flower
#

happens

normal crest
#

once in a blue moon

#

hi N

red flower
#

hiii

#

how are u doing

normal crest
#

not bad

#

Could be better

slender bay
#

I get this crash notification when I use the card, any way to fix this?

red flower
#

card is the consumable not the card highlighted

#

you want G.hand.highlighted[1]

obtuse silo
#

need some help with creating a Booster Pack type
one that contains specific jokers, and has two variants, a Jumbo variant and a Mega variant

#

i'm saying this because VanillaRemade doesn't have a page for boosters

subtle merlin
normal crest
#

set it to 0 initially

#

not true

subtle merlin
#

tried that, same crash

#

wait i didn't save it before trying-

#

nvm

subtle merlin
normal crest
#

did you start a new run

cobalt vector
#

I wanna make a Joker that gives itself mult if a discard only contains heart cards. How can I detect if there are only heart cards being discarded?

subtle merlin
normal crest
#

uhm, from what i see the cards will only have the count if you select a blind while you have your joker

hybrid shadow
#

"ability" is nil somewhere in here apparently (i think i may know where it is but have no clue what else i could put there)

crude kite
#

Does anybody know if there is a function in SMODS to change the sprite of a joker with an event?

crude kite
obtuse silo
red flower
tardy juniper
#

how can i get the count for current and max amount of hands and discards?

crude kite
obtuse silo
tardy juniper
crude kite
red flower
crude kite
hybrid shadow
chrome widget
#

Can you hook the object init functions?

crude kite
chrome widget
#

Do you know which one off the top of your head?

crude kite
mild oak
#

guys, how can i learn how to read crash logs 😭

red flower
mild oak
#

all im doing is modifying a localization file

cobalt vector
crude kite
chrome widget
#

Ohhh sorry, this wasn't what I mean

cobalt vector
mild oak
chrome widget
#

The init function for the object class in the vanilla code. Last timeI tried I had some issued b/c the initialization stuff is like slightly more complex or smth? Idk

crude kite
chrome widget
#

I could just try it again

red flower
mild oak
red flower
crude kite
red flower
#

init_game_object is not the same as the init on an object ironically enough

cobalt vector
chrome widget
#

the reason I was curious is becase init_game_object is a more specifed function, whereas CardArea:init is layered multiple times on the object init functions and does some metatable bullshit

crude kite
red flower
obtuse silo
red flower
#

yes

#

i do it automatically in my mod if you want an example of that

#

wait no nvm my example doesnt work with other mods i changed it

chrome widget
#

Basically I'm having to do some fun surgery to see if I can have hidden cards in the Joker slots be calculated as if they're regular jokers and minding the event queue, while never visibly displaying them (because they represented by a different card that sits in the consumeeable slots)

#

Weirdness on weirdness

#

But I'll figure it out

red flower
#

good luck

chrome widget
#

Anyway I hope hooking CardArea:init doesn't cause something to blow up

obtuse silo
# red flower yes

like

j_modprefix_key1 = true
j_modprefix_key2 = true```
etc. etc.?
red flower
#

yes

slender bay
daring fern
slender bay
#

oh

#

all instances or a specific one?

crude kite
#

if #G.hand.highlighted == 1 not if G.hand.highlighted == 1

cobalt vector
red flower
#

uhh let me reread the logic

red flower
cobalt vector
#

yeah, I caught that too

cobalt vector
hybrid shadow
blazing salmon
# cobalt vector

if you discarded 2 spades and then 3 hearts it would count as 3 heart cards cause it checks each card individually

cobalt vector
blazing salmon
#

maybe you could use some sort of bool value if the card is not a heart then set it to false so it doesnt add the mult

red flower
#

ok yeah i see that

blazing salmon
#

for the entire discarded hand

crude kite
cobalt vector
#

gotta figure out how to use bool values then :D

#

wait, are they just true or false?

crude kite
blazing salmon
red flower
#
local has_only_hearts = true
for _, pcard in ipairs(context.full_hand) do
    if not pcard:is_suit("Hearts") then
        has_only_hearts = false
        break
    end
end
crude kite
red flower
#

nil is not bool

crude kite
#

mb

#

true/false

blazing salmon
#

anybody know how i could scale mult on a joker when food jokers are fully consumed and destroyed throughout a run

#

kinda like throwback

crude kite
pure salmon
#

maximus has a similar card (leftovers), poke around and see what they did

scarlet imp
#

i think they want it to be retroactive as well, you'd probably need a global variable of some kind

red flower
#

context.destroying_card is to destroy playing cards, not to check cards destroyed

red flower
#

no

pure salmon
#

why does this result in cards being selected in the deck after a discard