#💻・modding-dev

1 messages · Page 247 of 1

upbeat bronze
#

Dont know where i'd even put it in my file, dont know how i'd fill it with jokers, dont know why im even doing this if im so dumb where i need help every simple step of the way ngl

frosty dock
#

i don't think so

tall salmon
#

is there a context that's after a consumable resolves? like context.consumeable and context.using_consumeable are before the actual effect of the consumable triggers

frosty dock
#

pretty sure you can use an event in context.using_consumeable

manic rune
#

this is smt i wrote about tables

#

not sure if it will help with explaining that much

frosty dock
#

there's no post-consumable context

frosty dock
manic rune
#

cards are also just a huge table, you can see them that way

manic rune
red flower
#

the game is a huge table

manic rune
#

balatro the table

next timber
#

dinner will be ready soon can you help set the Balatro

manic rune
#

balatro with the fine china would be perfect

#

"babe the guests are coming, bring out the fine china"

next timber
#

(puts a scribbled on napkin and a blueprint for a clown on the table)

upbeat bronze
#

wait would this be useful to what im trying to do?

red flower
#

what are you trying to do

onyx sonnet
upbeat bronze
#

make this effect work

onyx sonnet
#

i think they need to also enable post_trigger, right?

red flower
#

probably not, you don't need to find the joker you need to find when it triggers

hard flume
#

i still dont know why this isnt working

upbeat bronze
#

at this point im just diving through the github to see if i can find anything i can yoink that'll get me vaguely close to what im trying to do and its not working

#

maybe i am just actually dumb

red flower
#

I mean, it's a somewhat complicated effect. I wouldn't know how to do it without diving into the code

frosty dock
hard flume
hard flume
#

I think I know how to do that.

upbeat bronze
#

time for me to start drinking lmao

frosty dock
#

you need to check the enhancement on context.destroy_card, not some other card

manic rune
#

don't drink too much

hard flume
#

Oh

frosty dock
#

also that's not exactly the effect your description claims, it says it destroys the first played dream card, shouldn't matter if it's leftmost in the played hand

scarlet spire
#

still wondering this

frosty dock
frosty dock
scarlet spire
#

I see, thanks! i'll have to figure out what i'm doing wrong here

frosty dock
#

what smods version are you running?

scarlet spire
#

most recent, just installed it earlier today after noticing the blindcalc commit

frosty dock
#

kk

#

i can try to help if you show your code

scarlet spire
#

here it is

next timber
#

so why isn't this giving me a hand size of 12?

rapid stag
#

...how's your UI knowledge? cirThink

i've actually been bashing my head against a wall trying to figure out how to properly get my mod config UI to not act the way it is and failing, it's been giving me no end of grief. no matter what it try to do, it always wants to be all the way to the left. and if i don't restrain the size, it tries to be unnecessarily huge. and i don't understand why. anll i want is for this to be in the middle and to fit on the screen. that's it.

shown code gets returned directly into SMODS.current_mod.config_tab by way of an assert(SMODS.load_file()) so as a result, this thing is its own file that gets to sit in the corner because of what it's doing cirBlech i'm happy to share it if it means reining this endless annoyance in

thorn ridge
#

How do I properly set up a deck?

sturdy compass
thorn ridge
#

Unfamiliar with how decks work

thorn ridge
paper zealot
tall salmon
#

thank you

sturdy compass
thorn ridge
#

just wasn't sure and im a lil stupid

sturdy compass
#

All g

thorn ridge
rapid stag
next timber
paper zealot
#

In your case just changing the options column wrappers to R might do the trick

high eagle
#

does anyone here have an understanding of how "set bae' works?

#

base*

unkempt thicket
#

How do i edit base game objects pool settings?

rapid stag
#

you might have to take ownership of them for that

tall salmon
glad osprey
onyx sonnet
#

hmmm

#

something's a little wrong with this

sturdy compass
#

hmmmmmmmmm

glad osprey
#

help

knotty copper
#

For organization is possible to split the code in the main lua file into multiple lua files which are referenced in the main one?

glad osprey
#

yes

sturdy compass
#

yes

knotty copper
#

How do I do that?

glad osprey
#

assert(SMODS.load_file("filepath.lua"))()

paper zealot
#

Or separate Lovely modules, which i would argue is a neater way to do it

knotty copper
#

👍 k will take a look at that later

unkempt thicket
#

How do i use this correctly?

glad osprey
#

how do i force shop to open

glad osprey
minor furnace
#

that's cursed

hard flume
#

how do i return a card to hand?

glad osprey
#

how do i check if a card is scoring

#

nvrm

glad osprey
zealous glen
hard flume
zealous glen
#

Reminds me of the demo's Gold Seal

#

Anyways, you can just use oneof the draw functions

#

not those draw functions the other draw functions

#

There's CardArea:draw_card_from

#

(or was it CardArea:draw_card_to?)

#

and another one whose name I forget

onyx sonnet
#

Im trying to make a joker like blueprint, but this doesnt seem to be doing anything, any idea why?

zealous glen
#

The timing can be annoying though

#

You'll probably need some Event manipulation

zealous glen
noble schooner
#

how do I make a joker give a seal to played cards?

hard flume
#

I can also just use G.hand:emplace

onyx sonnet
#

yes, that is what im doing

noble schooner
#

there's nothing in the wiki about doing that lol

onyx sonnet
noble schooner
#

where?

#

smods.seal says nothing

zealous glen
onyx sonnet
#

oh wait its not in the wiki?

hard flume
noble schooner
zealous glen
noble schooner
#

not giving it

#

so nope

onyx sonnet
#

give me a sec

zealous glen
hard flume
#

I'll need to look at the code to see how to apply it though

onyx sonnet
#

card:set_seal('Purple'/'Red'/Whatever, true)

#

where card is the playing card you're modifying

fallen osprey
#

what is the variable for gaining xmult

zealous glen
fallen osprey
#

oh

#

zoinks

#

then how

onyx sonnet
#

yeah thats the text that shows up inthe joker description

fallen osprey
#

im assuming i have to calculate it

onyx sonnet
#

does your joker calculation have a return table

noble schooner
fallen osprey
#

but how do I do so

#

im new btw so it will be like explaining to a toddler

onyx sonnet
#

what are you trying to do exactly

zealous glen
fallen osprey
#

Every ante gain xmult

onyx sonnet
onyx sonnet
#

like did the round end, is this a boss blind

fallen osprey
#

so there isnt a setting_blind but for antes I assume

zealous glen
onyx sonnet
#
            card.ability.extra.active = true
            card.ability.extra.text= "active"
            juice_card_until(card,function(card02) return card02.ability.extra.active == true end, true)
        end
    end
}```
zealous glen
onyx sonnet
#

this is a codeblock for an effect i have when an ante increases

#

you're just gonna use those same if conditions and instead of my activation stuff, you'll have something like

fallen osprey
#

do the gain for xmult

onyx sonnet
#

card.ability.extra.xmult= card.ability.extra.xmult + card.ability.extra.scaling

fallen osprey
#

tysm

onyx sonnet
#

np

glad osprey
onyx sonnet
#

i have no idea how to help you

glad osprey
#

sob

onyx sonnet
onyx sonnet
#

Do you just want to display text or do you want to display the value

fallen osprey
#

Display Value

onyx sonnet
#
      card.ability.extra.x_mult = card.ability.extra.x_mult + card.ability.extra.scaling
      return {
          message = "X"..card.ability.extra.x_mult,
          colour = G.C.MULT,
      }
    end``` this is some code i use for upgrading a joker, you're gonna want to look at the stuff after return
#

what those two dots do is they concateante the X with the numerical value of your Xmult

#

So you get X3 for example

#

colour can be whatever, although typically for Xmult its red

fallen osprey
#

wait

#

my values are xnil now

#

wtf

onyx sonnet
#

show me your uh

#

extra variables

fallen osprey
#

oh

onyx sonnet
#

the ones in config

fallen osprey
#

i fucked it up

#

oopsie

#

holy fuck m y pc is so slow

#

imma restart

unkempt thicket
#

what pool are suits in the base ones

dense adder
#

Does anyone know of a way to make sure the card.ability.extra.money = card.ability.extra.money - card.ability.extra.money_gain triggers after the gold card counts in hand, currently it keeps triggering before the gold increase

        if SMODS.has_enhancement(context.other_card, 'm_gold') then
          return {
              dollars = card.ability.extra.money
          }
        end
      end
      if context.end_of_round and context.cardarea == G.jokers then
        card.ability.extra.money = card.ability.extra.money - card.ability.extra.money_gain
      end```
onyx sonnet
dense adder
#

that should work, its needed anyways when the bonus hits 0 and the joker implodes

tawdry coyote
#

Does anyone know how I could make a wee joker but for multiplier? I've been trying but I'm struggeling a bit

minor furnace
#

like, it gains Mult for every 2 scored?

#

also the easiest solution: look at the code for Wee Joker and modify it

errant fulcrum
#

I dont have any "juice_up" in my code, does anyone know whats happening?

onyx sonnet
fallen osprey
#

like in dm or just here?

onyx sonnet
onyx sonnet
#

so if i say anything stupid someone smarter can correct me

frosty dock
errant fulcrum
#

Oh my god

#

Yup

frosty dock
#

card = card would be correct but is also not needed, you can just remove it

fallen osprey
onyx sonnet
#

the message return has x_mult instead of Xmult

tawdry coyote
onyx sonnet
#

it technically doesnt matter which of the two you use, but it needs to be consistent

tawdry coyote
#

Give me a minute, I can bring up the code in a second

fallen osprey
frosty dock
#

also this should just be return { x_mult = card.ability.extra.Xmult }

unkempt thicket
#

what pool are suits in the base ones

onyx sonnet
#

even the message part?

tawdry coyote
#
{
    key = 'binary',
    loc_txt = {
        name = 'Binary',
        text = {
            'Gains {C:mult}+#1# {}Mult',
            'if played hand',
            'contains {C:attention}Ace{} or {C:attention}10{}',
            '{+:mult,C:white}+#1#{} Mult'
        }
    },
    atlas = 'Jokers',
    rarity = 2, --rarity: 1 = Common, 2 = Uncommon, 3 = Rare, 4 = Legendary
    
    cost = 5,
    unlocked = true, 
    discovered = true, 
    blueprint_compat = true, 
    eternal_compat = false, 
    perishable_compat = false, 
    pos = {x = 1, y = 0},
    config = {
        extra = {
            mult = 4,
            mult_mod = 4
        }
    },
    loc_vars = function(self,info_queue,card)
        return {vars = {card.ability.extra.mult, card.ability.extra.mult_mod}}
    end,
    calculate = function(self,card,context)
        if context.individual and context.cardarea == G.play then
            if context.other_card:get_id() == 14 or context.other_card:get_id() == 10 then

                    card.ability.extra.mult = card.ability.extra.mult + card.ability.extra.mult_mod
                    return {
                    message = localize('k_upgrade_ex'),
                    colour = G.C.MULT,
                    card = card
                    }
                end
                if context.joker_main then
                return {
                    message = localize { type = 'variable', key = 'a_mult', vars = { card.ability.extra.mult } },
                    mult_mod = card.ability.extra.mult,
                    card = card
                }
            end
        end
end,
}```
frosty dock
#

yeah, it has an automatic message

tawdry coyote
#

Give me a second for the message

onyx sonnet
#

oh wait thats for applying Xmult

frosty dock
#

the one that only has a message is fine, it just needs to use the correctly spelled ability value

onyx sonnet
#

mhm

#

aure could you help me with a blueprint joker?

tawdry coyote
#

Wait

onyx sonnet
#

i cant figure out why it isnt doing anything

fallen osprey
#

still not working

tawdry coyote
#

Wait i'm actually so confused, it's literally working now

onyx sonnet
fallen osprey
#

same one

tawdry coyote
#

Okay, don't mind my problem, keep helping others!@onyx sonnet

frosty dock
onyx sonnet
#

you're still using xmult instead of the correct one, Xmult

#

its case sensitive

fallen osprey
#

bro

#

i edited the wrong file

#

oopsie daisy

onyx sonnet
frosty dock
onyx sonnet
#

what's the correct way to use it?

fallen osprey
frosty dock
#

it does most of the code you have here for you, and you just return the result

onyx sonnet
#

only Xmult

fallen osprey
#

oopsie daisy (part 3)

onyx sonnet
#

add it to the config.extra table

fallen osprey
#

do I just do scaling = 1 or something else

frosty dock
#

replace this with ```lua
if pseudorandom('bad photocopy') < G.GAME.probabilities.normal / card.ability.extra.odds then
return SMODS.blueprint_effect(card, other_joker, context)
end

onyx sonnet
#

will do, thanks aure 🫡

onyx sonnet
#

so you choose whatever

unkempt thicket
#

what pool are the base suits in?

fallen osprey
#

yeah i wasnt sure wether it was like +1 or somehting

onyx sonnet
#

well you have it as addition in your code

frosty dock
onyx sonnet
#

so you could have any number in existence probably

unkempt thicket
#

like spades, hearts, clubs, and diamonds. i want to know so i can remove them

covert scroll
#

Whats the easiest way to make something blueprint compatiable, I just have a basic mod that does x mult on certain cards

frosty dock
#

i know what you mean by base suits

onyx sonnet
#

since its xmult = xmult + scaling
xmult = 1 + 1 = 2
next ante its gonna be xmult = 2 + 1 = 3

#

if you have scaling as 1 that is

fallen osprey
#

i have it like this but its still throwing the error did i miss something

onyx sonnet
#

did you save the file before launching the game

frosty dock
fallen osprey
#

yeah

frosty dock
#

for the display, set blueprint_compat = true on the joker

sonic cedar
#

guys how can i set up an options menu
like turning certain jokers on and off (i have two separate joker files)

onyx sonnet
#

wait

#

did you copy my upgrade code 😭

#

that has variables that dont exist in base game

fallen osprey
#

oh

onyx sonnet
#

ofc its gonna give you errors

fallen osprey
#

shit

#

oopsie daisy

frosty dock
onyx sonnet
#

instead of copying the if

#

just copu the return table

#

copy

chrome widget
#

Is there a way to force a card to skip a red seal repetition?

#

Actually hmm I think it's easier to just not do it on cards that already have seals tbh

unkempt thicket
frosty dock
#

in_pool isn't specific to something being modded

tall tangle
#

POUNDS, YUAN, EUROS, AND DOLLARS AS SUITS???

frosty dock
#

you can just declare one on the base suit by taking ownership

tall tangle
#

Or is that Yen... I can never tell.

unkempt thicket
#

But doesn't taking ownership mess with stuff?

frosty dock
#

how so

unkempt thicket
frosty dock
#

it just changes a value

fallen osprey
frosty dock
#

in this case, the in_pool function

onyx sonnet
frosty dock
#

having it return false during the initial deck check also removes the base suits from being added to your starting deck

onyx sonnet
#

just add the return after the xmult = xmult + scaling part

unkempt thicket
#

Oh, i thought it could have some cross-mod incompatibility

frosty dock
#

i guess so, if another mod also changes the same value and doesn't do so in a compatible way

#

you can do something similar to hooking the in_pool function by referencing the previous function, should it exist

#

but it won't mess with anything other than this specific function

scarlet spire
#

is there a way to manually trigger debuffs to recalculate? like if I have a blind that changes which cards are debuffed mid-blind

noble schooner
#

sigh

#

I hate github

#

shit's not letting me delete old files

scarlet spire
#

it seems like debuffs are only updated at the start of the blind and then at the end to remove them

noble schooner
#

anyone have a better alternative to github?

hushed field
fallen osprey
frosty dock
scarlet spire
#

oh, alright thanks

frosty dock
onyx sonnet
noble schooner
#

I tried deleting them, github said they were deleted

#

reloaded and the files were back

frosty dock
#

I'm not sure what you're using for github to be in your files or if you just mean git

noble schooner
#

nonono

#

I meant

#

in the repo

frosty dock
#

are you doing that on the github website or what

noble schooner
#

yeah

frosty dock
#

do you not have a local repo

noble schooner
#

wdym

frosty dock
#

a git repo on your machine tracking the remote github repo

noble schooner
#

h u h

#

brain isn't braining rn

frosty dock
#

oh so you don't know git

errant fulcrum
#

This is supposed to add chips to the joker but it stays at 0. What am I doing wrong?

frosty dock
#

yeah i wouldn't exclusively use the github website to manage a repo

frosty dock
#

move it out and remove the excess =

errant fulcrum
#

Oh

zealous glen
fallen osprey
frosty dock
#

using git on your machine locally is much more practical, but working with git can take some getting used to

zealous glen
sonic cedar
frosty dock
#

besides uploads, at least. there's an edit button

frosty dock
#

this is the only file I ever use it for

fallen osprey
#

IT WORKS

#

wait

#

hol up

#

imma make it so it says the right thing

onyx sonnet
#

add scaling to your loc vars

fallen osprey
#

i did

#

just gotta fix color now

onyx sonnet
#

👍

sonic cedar
fallen osprey
sonic cedar
#

oh k

fallen osprey
#

how do i make the currently grey, what is the color

fallen osprey
#

have it like this rn

tall salmon
#

inactive

manic rune
#

C:inactive

fallen osprey
#

ty

sonic cedar
fallen osprey
minor furnace
#

what is that joker next to it that looks like blueprint + lusty + gluttonous etc.

minor furnace
#

x1 mult lmao

fallen osprey
#

not supposed to be that

#

gotta fix it

minor furnace
#

what's the sprite all the way to the right? I know the others

fallen osprey
#

Icecream

tall salmon
#

ice cream prolly

#

with the 100 chips

minor furnace
#

ohhh you're definitely right

unkempt thicket
#

How do I return the value from the original function instead of true?

#

When taking ownership

fallen osprey
#

my test run is dead bruh

tall salmon
#

card sharp the eye

#

ender of many

fallen osprey
#

exactly

fallen osprey
#

still lost bruH 😭😭

tall salmon
#

what the

#

what mod is that

fallen osprey
#

debug plus

gentle rain
#

currently trying to think of how to implement a joker that turns into a random uncommon joker each round
initially, i thought that when a blind is selected, it would destroy itself, create an uncommon joker, and give that joker the same ability of self destruction and uncommon creation, but then i checked the perma-bonuses page of the smods wiki and realized all it does is change values like chips n mult

fallen osprey
chrome widget
#

Can you delay debuff sprites in the same way you can delay sprite changes for setting the card's center?

gentle rain
#

would it be considered bad practice to look at the code of other people's mods for the sake of reference

tall salmon
chrome widget
tall salmon
#

nice to have an all in one

chrome widget
#

Intellectual property is a sham, yada yada

#

Go wild

gentle rain
chrome widget
#

No

gentle rain
#

oh hi keku

weak brook
#

it's fine so long as you credit it imo

gentle rain
#

yeah i plan to

weak brook
#

you could just like have a lil comment above the code you imported

weak brook
#

-- This is from such and such

gentle rain
#

yeye

manic rune
#

id be going to jail if its bad

gentle rain
#

was gonna look at how odious joker did it

#

turnin into another joker

weak brook
#

odious joker isnt turning into another joker so much as it is switching modes

gentle rain
#

ohhhh

weak brook
#

i have actually made code for transforming jokers directly though

#

but it wouldnt be reliable for what you're doing cause i havent figured out a way to get it to be able to transform itself once its already been transformed, cause all its calculation code gets rewritten to the new form's

quartz ravine
#

This is weird, I am supposed to be playing a sound when we review a card held in hand but it is is playing like all of my sound effects at once

weak brook
#

actually to be completely clear i didnt make the code it was repurposed from ortalab

gentle rain
#

i had an idea of like, creating a custom sticker that has the ability of turning into another uncommon joker with the same sticker

weak brook
#

oh that's definitely doable then

gentle rain
#

so you dont need the headache of applying the ability recursively

weak brook
#

the transforming code i've used retains editions and stuff so the sticker can run the code to transform it again and again

gentle rain
#

could i see it please

#

i didnt consider editions and other stickers thatd be useful

weak brook
#

yeah it's on the cardsauce repo, search for G.FUNCS.transform_card in main.lua

gentle rain
#

ty!

next timber
#

how do i colour the square behind a message return? like how with the ice cream joker the losing chips message has a blue square instead of yellow

weak brook
next timber
#

awesome

#

thx

#

love that this game is written in non-american english for once

weak brook
#

it was difficult for me to get used to writing that as a non-canadian pain_snap

raw geyser
#

Got a mac user that can't get the SMODS patches to work. They're just not patching any SMODS files

next timber
tepid crow
gentle rain
#

so looking through the code, G.P_CENTERS refers to properties that a given card has, right? (edition, enhancement, seal, sticker)

#

specifically balatro's card.lua i'm looking through

weak brook
#

they have most of the critical info for initializing them

gentle rain
#

mm

versed swan
#

Where are lovely crash logs located?

#

Something in my mod is crashing the game, but it just closes entirely without displaying the crash screen

quartz ravine
versed swan
#

thank you

scarlet spire
#

is there a way to check when a consumable is created? I want a blind to destroy all consumables that are created during the round

quartz ravine
#

I recommend using the CMtrace log viewer, it will stream in real time and highlights lines with warning and error

scarlet spire
#

I currently have it destroying them when the blind starts, but this doesn't account for consumables that get created mid-round

main mica
#

hey chat what would the correct pattern be if i want to change pseudoseed('boss')?
I tried pseudoseed\(\'boss\'\) and it didnt match

red flower
#

if it's a pattern then just pseudoseed('boss')

main mica
#

with " commas?

#

that doesn't work

red flower
#

i mean both should work so maybe the target is not right?

#

what line are you targeting?

main mica
#

line ~2621 in common_events

#

it looks the same in the vanilla code and my lovely dump

frosty dock
#

if you have a pattern patch, you need to target the full line

glad osprey
frosty dock
#

if you have a regex patch, you need to escape the parentheses but not the quotes

main mica
humble dagger
#

So I am trying to set up an enhancement for a card and I have the code for it all set up... BUT I have no idea how to code the consumable that is going to give said enhancement, like what lines do i have to put so the consumable applies the enhancement?

#

all i know is MAYBE i put something like with a seal like this but beyond that i have no idea (the example mod i have been using to help has no enhancement example sadly)

gaunt thistle
glad osprey
maiden phoenix
#

Cryptid has a code card that does that iirc

glad osprey
#

it does

#

and i tried looking at their code

glad osprey
modern kindle
#

i presume they have a patch, did you implement that as well

glad osprey
#

i could not find anything

#

patch wise

chrome widget
#

Hmm... I'm trying to figure out how to pre-empt glass breaks.

chrome widget
#

The card effect I'm working on adds a retrigger to a glass card if it's going to shatter

#

there's a shattered context I think, so I guess I can just try retriggering it from there?

zealous glen
#

any reason the card itself can't destroy Glass

#

-# You could try simulating the random seed with the vanilla feature to do so

chrome widget
#

I added a more robust prediction feature because the vanilla one isn't useful for anything except its one use case

#

I might have to use it, the main issue with it is that I think it would still be dependent on evaluation order, because the joker could only know the shatter will occur after the effects table has already been put together

#

at least, if glass cards work like lucky cards

zealous glen
chrome widget
#

Hmm yeah probably true. Just manually do the calculation myself and then flag it for destruction

#

Seems simple enough

covert scroll
#

Any mods that let me spawn in jokers for testing and anyway to restart the game or reload scripts without closing it

gaunt thistle
#

DebugPlus!!!!!

zealous glen
#

that's like hyper^2 factorial^3 DebugPlus

covert scroll
#

Way better than what i was doing before

minor furnace
#

time to figure out why this doesn't trigger Glass Joker...

        local destroyed_cards = {}
        local temp_hand = {}
        for k, v in ipairs(G.hand.cards) do temp_hand[#temp_hand+1] = v end
        table.sort(temp_hand, function (a, b) return not a.playing_card or not b.playing_card or a.playing_card < b.playing_card end)
        pseudoshuffle(temp_hand, pseudoseed('leo'))
        for i = 1, 3 do destroyed_cards[#destroyed_cards+1] = temp_hand[i] end
        G.E_MANAGER:add_event(Event({trigger = 'after', delay = 0.4, func = function()
            play_sound('tarot1')
            card:juice_up(0.3, 0.5)
            return true end }))
        G.E_MANAGER:add_event(Event({
            trigger = 'after',
            delay = 0.1,
            func = function() 
                for i=#destroyed_cards, 1, -1 do
                    local _card = destroyed_cards[i]
                    if SMODS.shatters(_card) then
                        _card:shatter()
                    else
                        _card:start_dissolve(nil, i == #destroyed_cards)
                    end
                end
                return true end }))
        delay(0.5)
        SMODS.calculate_context({ remove_playing_cards = true, removed = destroyed_cards })
    end```
#

I merely want to destroy 3 random cards in hand

#

and they do destroy, but Glass Joker does not scale if this destroys a glass card

#

I essentially just copied the code from immolate and modified a few things

#

WAIT WHAT

#

Using Immolate on a Glass Card does not proc Glass Joker???

#

since when

glad osprey
#

how does one use a .toml

minor furnace
#

did people know this?

minor furnace
# glad osprey how does one use a .toml
[patches.pattern]
target = "file_path.lua"
pattern = '''line to match here'''
position = "after" #after, at, or before
payload = '''code to insert here'''
match_indent = true
times = 1# of instances to replace```
glad osprey
#

what the fuck is cryptid doing here

minor furnace
#

inserting their own code after that line

glad osprey
#

ok why do they do
if true then --Cryptid.enabled["menu"]

#

doesn't that just do nothing

fallen osprey
#

whati s the thing that gives something a chance to happen

#

I want to make my joker have a 1/3 Chance to give X7 Mult, but I don't know how

glad osprey
#

pseudorandom("seed")

#

then check if it's less than G.GAME.probabilities.normal divided by the chance of happening

#

so for that it would be
if pseudorandom("7mult"<this field doesn't matter that much>) < (G.GAME.probabilities.normal or 1) / 3 then

fallen osprey
#

thanks man

#

i pasted that in and what is goin on

glad osprey
minor furnace
#

I just tested it

fallen osprey
#

oh wait I see what happened

minor furnace
fallen osprey
fallen osprey
glad osprey
#

it was just a note telling you that the seed isn't that necessary

fallen osprey
#

Ok

glad osprey
#

you can make it whatever you want and it would still work fine

minor furnace
fallen osprey
#

but why is the function not getting the end, makes no sense

scarlet spire
#

yeah the seed is important, but what it is doesn't matter as long as it's different from other seeds in the game

fallen osprey
#

wait

minor furnace
fallen osprey
#

not that end i highlighted but there still is an end'

scarlet spire
#

the if statement also needs an end

#

so

   end
end
fallen osprey
#

im so dumb

#

thank you

scarlet spire
#

lua syntax is quite verbose and specific sometimes

fallen osprey
#

Also, I want this joker to enhance played 7s to lucky, how would I do so, with SMODS.PokerHand? or SMODS.Rank?

minor furnace
scarlet spire
fallen osprey
#

i have this but have a strong feeling this is very wrong

#

oh

#

yeah i was way off

scarlet spire
#

context.individual activates per card, context.cardarea == G.play narrows it down to just played cards
context.other_card is the card the context is activated on, get_id() gets the card's value

fallen osprey
#

thank you

rapid stag
#

is this just not the correct implementation of create_toggle()?

fallen osprey
#

yo

#

im learning

#

i made it so it only does mult when it has a 7 in the hand

#

and i fixed it not making them lucky on my own

paper zealot
paper zealot
#

Nope, that's regular UIElement Tezt

rapid stag
#

i mean, i guess it doesn't matter, it's a text object either way. but it is being given a colour

does it have to be an array?

rapid stag
#

well the only other text is the create_toggle()s cirLost

paper zealot
#

It could also be caused by a missing set of brackets, all nodes should be a double-nested table

#

...i think? Or maybe create_toggle already returns a table

#

Let me check

rapid stag
#

ohhh

#

yeah, i think the nesting of create_toggle() is the issue. it shouldn't be nested

paper zealot
rapid stag
#

oh, you made systemclock! are you aware of a weird issue with it & malverk in which, if you have malverk and systemclock loaded texturepacks don't immediately load on start and you have to force load them via the malverk ui? cirBox

paper zealot
#

That sounds like the issue with 1.6.0 - 1.6.2, fixed a few weeks ago. I'd hooked the wrong main menu function and broke all other proper main menu hooks for mods that loaded after SystemClock... Not my proudest moment, haha

rapid stag
#

ahhhh

paper zealot
#

Also notably caused the Multiplayer mod to disconnect after the first ante

rapid stag
#

so this is what it looks like now after taking the create_toggle()s out of the nest

paper zealot
#

Could you post the whole file?

rapid stag
minor furnace
#

btw you can do a multiline comment with


]]```
rapid stag
#

ahhh that's how you do it, thanks

#

too used to //* *// in C#

paper zealot
#

I'm on mobile at the moment and can't type up a full table, but i think your understanding is a little off based on the comment about rows arranged inside the column.

Any element that you want to be arranged has to be contained inside either a UIT.C or a UIT.R.
To arrange a group of say 6 UIT.T objects in a column as rows the way you want, you need one UIT.C element, containing 6 child UIT.R elements, and each of those UIT.R elements should contain their individual UIT.T.

#

So the Options column container should be a UIT.R, containing 2 UIT.Cs

rapid stag
#

ah, so i have them backwards?

paper zealot
#

Then those UIT.Cs should contain however many UIT.Rs are needed for your text, and each of those UIT.Rs should have one UIT.T child

rapid stag
#

oh, i've seen that diagram. makes no sense to me cirDerp

paper zealot
#

There's also the obscure print_topology() function that all UIElements have, if you're unsure about the tree structure

rapid stag
steady smelt
#

do playing cards have an internal sell value? and if so what is it and how do i get it

paper zealot
#
ROOT (
  R (
    C (
      R ( T ),
      R (
        C (
          R ( T ),
          R ( T ),
          R ( T ), ...
        ),
        C (
          R ( T ),
          R ( T ),
          R ( T ), ...
        )
     )
  )
)
main mica
#

silly joker that predicts next blind ^^ (placeholder art)

steady smelt
main mica
#

hold tab with debugplus

#

just calculated the next seed

steady smelt
#

might need to look into that, could be useful for a lot of things

main mica
#

seems like prediction jokers arent really popular
i snooped around turns out predict_seed was talked about only once here

#

not that i used it, but it seems like the logical thing to ask here if youre making this sorta thing

steady smelt
#

you didn't use predict_seed or you didn't use the other conversations about it?

tepid crow
#

most predictions aren't that useful tbh

#

and I can't even think of one of the top of my head that'd be worth a joker slot

main mica
#

yeaaah my one is kinda dookie too

steady smelt
#

view contents of selected pack?

main mica
#

the rare is temporary it's defintely uncommon

main mica
#

.

dense adder
#

is there a way to check for last card in hand such as a context.scoring_hand[-1] or does lua not have a -1 to check last in array

steady smelt
#

it'd have to be executed right since jokers aren't supposed to add ui elements according to localthunk's design stuff

tepid crow
main mica
steady smelt
#

i might add that to my mod sometime

tepid crow
steady smelt
#

actually predict_seed is way more useful for something i'm doing in a worse way rn so ty anyways

main mica
steady smelt
#

i thought of that too

tepid crow
#

I guess you could do a joker that shows the next cards you'll draw yeah

main mica
#

predict_seed is only used in vanilla for finding the first legendary

steady smelt
# main mica oh? what might that be?

replacing certain tarots with certain other ones as they're generated
currently mine breaks the 'no repeats' rule if it rolls into the same thing after the first one is replaced, then the second one is replaced too

#

but with this i should be able to just do predict_seed to replace instead so it doesn't affect the next pull

#

i think

#

ac tu a ly

#

idk if that works

main mica
#

i still havent entirely figured out how predict_seed works, so if youre stuck on it i can chuck at you the two lines i wrote for it

steady smelt
#

was more just asking if it existed or not since they aren't sellable

main mica
# steady smelt yes pls
  local key = 'boss'
  local newseed = nil
  
  if not G.GAME.pseudorandom[key] then 
    newseed = pseudohash(key..(G.GAME.pseudorandom.seed or ''))
  else
    newseed = G.GAME.pseudorandom[key]
  end

  newseed = math.abs(tonumber(string.format("%.13f", (2.134453429141+newseed*1.72431234)%1)))
  newseed = (newseed + (G.GAME.pseudorandom.hashed_seed or 0))/2

  local _, boss = pseudorandom_element(eligible_bosses, newseed)
#

change first line and last line

#

oh,

#

though, keep in mind

#

this can only predict the next step in the seed

steady smelt
#

interesting

main mica
#

uhh i guess i can package it more neatly hold on

#

yeah no im lazy nvm, this is what you get, use newseed instead of pseudoseed(' '), if it wasnt clear

quartz ravine
#

Very weird!

It looks like loc_vars behaves differently when a card has a special edition, depending on if it is in your hand or in the overall deck view

#

Then compared to overall deck view

stray warren
#

What does your loc_vars function look like?

quartz ravine
#
  loc_txt = {
        name = "Akashic",
        label = "akashic",
        text = {
            "Weakens then strengthens the afflicted card",
            "Applies {X:mult}x 0.5{} mult to begin",
            "Increases by {c:attention} 0.1{} when scored",
            '{s:0.9,C:inactive}Currently {X:mult} #1#{}{}',
        }
    },    
    on_apply = function(self, card,context)
        sendInfoMessage("triggering on pickup logic for this card", self.key)
        self.ability.x_mult = 0.5
        -- self:set_edition('e_holo', false)
        -- card.cost = 10
    end,
    apply_to_float = true,
    loc_vars = function(self,card,context)
        -- local thunk= inspectDepth(context)
        -- sendInfoMessage(thunk)
        if nil ~=context and nil~= context.ability then
        return {            
            vars = {                
                context.ability.x_mult }
        }
    end
#

I found that self refers to the editions own vars, while card is actually empty, but context does contain a handle back to the base card. Maybe the overall view does actually populate card

paper zealot
#

Not sure why LocalThunk didn't just include the white text colour with the X command, since it's only ever used in that one way everywhere

quartz ravine
#

i knew mine looked wrong!

paper zealot
#

The very first R container is unnecessary for structure, but useful for padding distances

rapid stag
quartz ravine
#

@stray warren

rapid stag
stray warren
#

also, your parameters for loc_vars are misnomers. It should be loc_vars = function(self, info_queue, card)

#

on_apply should only be on_apply = function(card)

stray warren
rapid stag
quartz ravine
paper zealot
#

Reducing padding and scale is the way to squish things into place

quartz ravine
#

I think these cards power up way too fast. If you get a joker with this edition, it ends up being very strong. Of course it is a low hit rate edition

plain apex
#

been trying to make this suggestion but this isnt doing anything

SMODS.Enhancement({
    loc_txt = {
        name = "Modified",
        text = {
            'Reduces blind requirement by {X:mult,C:white}X#1#{} when {C:attention}Scored{}',
        },
    },
    key = "Modified",
    atlas = "Jokers",
    pos = { x = 1, y = 21 },
    discovered = false,
    no_rank = false,
    no_suit = false,
    replace_base_card = false,
    always_scores = false,
    config = { extra = { reduce = 0.9 } },

    loc_vars = function(self, info_queue, card)
        return {
            vars = { 
                card and card.ability.extra.reduce or self.config.extra.reduce, 
            }
        }
    end,

    calculate = function(self, card, context)
        if context.main_scoring and context.cardarea == G.play then
            return {
                G.E_MANAGER:add_event(Event({
                    func = function()
                        G.GAME.blind.chips = math.floor(G.GAME.blind.chips * card.ability.extra.reduce)
                        G.GAME.blind.chip_text = number_format(G.GAME.blind.chips)
                        G.FUNCS.blind_chip_UI_scale(G.hand_text_area.blind_chips)
                        G.HUD_blind:recalculate() 
                        G.hand_text_area.blind_chips:juice_up()
                        G.FUNCS.juice_up()  -- Fixing missing juice_up function call
                        return true
                    end
                }))
            }
        end
    end
})
quartz ravine
#

does it throw, or does nothing happen

plain apex
#

nothing happens

#

just scores like any other card

covert scroll
#

How would i check if a certain joker exists by checking from another joker, (Ex: Lets just say the joker checks if there is a lusty joker or something)

stray warren
#

I believe you would use SMODS.find_card() for that

rapid stag
# paper zealot Reducing padding and scale is the way to squish things into place

it's now how i want it, thanks cirComfy do you happen to remember the arguments for create_option_cycle() off the top of your head? cirThink

i've been thumbing through your config_ui.lua for insight, but it doesn't really elucidate what exactly the function expects as a lot of the variables you call it with are inherent to your mod and i'd have to be looking back and forth to figure out the full context

quartz ravine
#

I have done a lot with editions but not touched enhancements

covert scroll
plain apex
#

i haven't done editions i would do editions if i knew how to do the shader stuff for them lol

quartz ravine
#

read the book of shaders then start copying and pasting random crap is my advice!

stray warren
covert scroll
stray warren
#

It's all documented on the wiki

paper zealot
dense adder
#

can next(context.poker_hands["Straight"]) only be done with context.before each time i try and use it a second time to upgrade a card in scoring its giveing me a nil error

covert scroll
quartz ravine
tall salmon
#

i'm trying to organize my code into different .lua files so i dont go crazy

paper zealot
# rapid stag it's now how i want it, thanks <:cirComfy:896523461881651220> do you happen to r...

Briefly, label is the top text above the cycle, options should be an array of name strings that it will display (typically a list defined in a localization file), current_option is the index number of the default pip, and opt_callback is the name of a function it will try to call on every cycle change. This function needs to be defined as G.FUNCS.<function name>(e), but opt_callback should just be the function name part.

quartz ravine
stray warren
plain apex
tall salmon
#

but it's having the opposite effect because i cant figure out why my require calls dont work

#

i'm doing this in lovely.tmol and requiring each one in the main mod .lua but it only works with the rares

version = "1.0.0"
priority = 0

[[patches]]
[patches.module]
source = 'jokars/rare.lua'
before = 'main.lua'
name = 'rarejokars'

[[patches]]
[patches.module]
source = 'jokars/uncommon.lua'
before = 'main.lua'
name = 'uncommonjokars'

[[patches]]
[patches.module]
source = 'jokars/common.lua'
before = 'main.lua'
name = 'commonjokars'```
plain apex
#

otherwise probably just getting thrown to the pile of stuff that could be cool but idk how to make work

quartz ravine
covert scroll
#

Ok im searching but i cant find this, does anyone know how to make the joker do like the invisible joker shake animation when its active

quartz ravine
#

try removing the wrapping return and curly braces, if you check this example which I know works, they don't have such braces. I also didn't use them in my editions which are functionally similar

if card.ability.set == 'Joker' then

stray warren
#

You could check Invisible Joker's code in card.lua if you haven't already

quartz ravine
#

in your code, set a card variable that will turn false when you want the jiggling to end

local eval = function(card) return (card.ability.ready == true) end
juice_card_until(card, eval, true)

--will jiggle forever until the end of the round or asomething sets card.ability.ready to false
hard flume
#

Hihi

plain apex
# quartz ravine Why is it all in a return {} block? That is not how I did mine, nor some exampl...

idk removing the return {} didn't fix it tho

SMODS.Enhancement({
    loc_txt = {
        name = "Modified",
        text = {
            'Reduces blind requirement by {X:mult,C:white}X#1#{} when {C:attention}Scored{}',
        },
    },
    key = "Modified",
    atlas = "Jokers",
    pos = { x = 1, y = 21 },
    discovered = false,
    no_rank = false,
    no_suit = false,
    replace_base_card = false,
    always_scores = false,
    config = { extra = { reduce = 0.9 } },

    loc_vars = function(self, info_queue, card)
        return {
            vars = { 
                card and card.ability.extra.reduce or self.config.extra.reduce, 
            }
        }
    end,

    calculate = function(self, card, context)
        if context.main_scoring and context.cardarea == G.play then
            sendInfoMessage("Got scoring!", "MyEnhancement")
            G.E_MANAGER:add_event(Event({
                func = function()
                    G.GAME.blind.chips = math.floor(G.GAME.blind.chips * card.ability.extra.reduce)
                    sendInfoMessage("Got blind!", "MyEnhancement")
                    G.GAME.blind.chip_text = number_format(G.GAME.blind.chips)
                    sendInfoMessage("Got blind chips!", "MyEnhancement")
                    G.FUNCS.blind_chip_UI_scale(G.hand_text_area.blind_chips)
                    sendInfoMessage("Got blind ui!", "MyEnhancement")
                    G.HUD_blind:recalculate() 
                    sendInfoMessage("Got recalculate!", "MyEnhancement")
                    G.hand_text_area.blind_chips:juice_up()
                    sendInfoMessage("Got juice!", "MyEnhancement")
                    G.FUNCS.juice_up()  -- Fixing missing juice_up function call
                    sendInfoMessage("Got to end!", "MyEnhancement")
                end
            }))
        end
    end
})
quartz ravine
#

the first problem is to solve why you can't hit your log message. Oh yeah, be sure you enabled info level logging if you haven't yet! you get that for free with debugPlus

rapid stag
stray warren
#

It should be 1-based

minor furnace
#

Is there a global that holds the name of every seal, including modded ones? I want to call pseudorandom_element() on it

stray warren
#

G.P_SEALS

plain apex
#

yeah i have info level logging

stray warren
#

in game.lua

minor furnace
#

yk that would be a good name for it lol

covert scroll
#

im a little confused, am i using the function wrong local search = SMODS.find_card('benjoker', false) print(#search), doing this always results in 0 even if the joker with the key exists

stray warren
#

it uses the key, so you need to prepend j_MODPREFIX_X

#

in your case, it would be j_X_benjoker, where X = your mod's prefix

chrome widget
#

Hmm...... I need to keep cards perpetually debuffed, but I know blinds reset debuffs whenever they need to, so I'm not sure I can set it once and be done with it

plain apex
#

why they gotta be this like whole other code langague and not just like a gif or something

stray warren
#

shaders are complicated

daring fern
#

How could one move jokers from the jokers category to the "other" tab?

#

In the collection?

rapid stag
# paper zealot Briefly, `label` is the top text above the cycle, `options` should be an array o...

...what exactly is it doing when it tries to call the function name i specify in opt_callback? cirLost because unlike with create_toggle(), using ref_table and ref_value to link the cycle to the config option doesn't work, so i'm trying to get it to call a function to set the config value to the new value, but i can't figure out the proper syntax because i don't know where and how it's looknig for the function it's trying to call oh, i see it HAS to be G.FUNCS

chrome widget
#

What's the best thing to use to identify an instance? Just card.ID?

hard flume
#

If I wanted an event to trigger after scoring, how would I go about doing that?

sonic cedar
#
Hyperglobal = {} 
Hyperglobal.config = SMODS.current_mod.config

SMODS.current_mod.config_tab = function ()
    return {n = G.UIT.ROOT, config = {r = 0.1, align = "cm", padding = 0.1, colour = G.C.BLACK, minw = 8, minh = 4},
        {n = G.UIT.R, config = {align = "cl", padding = 0}, nodes = {
            {n = G.UIT.C, config = {align = "cl", padding = 0.05}, nodes = {
                create_toggle{ col = true, label = "", scale = 0.85, w = 0, shadow = true, ref_table = Hyperglobal.config, ref_value = "Isaac" },
            }},
            {n = G.UIT.C, config = {align = "c", padding = 0 }, nodes = {
                {n = G.UIT.T, config = {text = localize('hpfx_isaac_option'), scale = 0.35, colour = G.C.UI.TEXT_LIGHT }},
            }},
        }},
        {n = G.UIT.R, config = {align = "cl", padding = 0}, nodes = {
            {n = G.UIT.C, config = {align = "cl", padding = 0.05}, nodes = {
                create_toggle{col = true, label = "", scale = 0.85, w = 0, shadow = true, ref_table = Hyperglobal.config, ref_value = "Ijiraq" },
            }},
            {n = G.UIT.C, config = {align = "c", padding = 0}, nodes = {
                {n = G.UIT.T, config = {text = localize('hpfx_ijiraq_option'), scale = 0.35, colour = G.C.RED}},
            }},
        }}
    }
end

i believe i have this set up correctly? but how do i link the toggle to whether or not SMODS asserts a file?
edit: i messed up somewhere and now the box is empty

edit 2: actually i’ll ask in the morning when i’m not so TIRED

tall wharf
scarlet spire
#

what's the easiest way to make a new context? I wanna patch ease_dollars to make a money_changed context

#

I'm partially aware of how the contexts system works but I'm not sure how to add onto it

covert scroll
#

is there a function that destroys a certain joker in your hand

dense adder
rapid stag
dense adder
#

Im running into an issue of i can't put the permanant chip bonus after the if context.before and next(context.poker_hands['Straight']) since it is doing the calculation before the score but if i do a if next(context.poker_hands['Straight']) with context.scoring_hand an nil error. anyone know or see something i dont

      --level up code
      if context.before and next(context.poker_hands['Straight']) and not context.blueprint then
        if pseudorandom('LAGN') < G.GAME.probabilities.normal / card.ability.extra.odds then
          return{level_up = true,
            message = 'Insured!'}
        end
        --permanant +10 to last card
        return {Flag_LAGN = true}
      end
        --permanant +10 to last card
        if Flag_LAGN == true then
          if context.cardarea == G.play and context.individual and context.scoring_hand then
            if context.other_card == context.scoring_hand[#context.scoring_hand] then
                context.other_card.ability.perma_bonus = context.other_card.ability.perma_bonus or 0
                context.other_card.ability.perma_bonus = context.other_card.ability.perma_bonus + card.ability.extra.chips_extra
                return {
                    extra = { message = localize('k_upgrade_ex'), colour = G.C.CHIPS },
                    card = card
                }
            end
          end
          return{Flag_LAGN = false}
        end
    --calc end
    end```
#

i tried using a boolean Flag to get around it but it had not worked

paper zealot
paper zealot
rapid stag
#

that's why i'm asking cirBlech

#

i set the value in a way that i confirmed sets it to the table. close config menu. close balatro. re-open balatro. re-open config menu. cycle is set to the normal default option - which is loaded from the config table

#

...actually...

paper zealot
#

Hrm. Okay. Make sure you've got a local or global variable (depending on your situation) called something like mod_instance or my_mod or whatever makes sense to you. Then assign that mod_instance = SMODS.current_mod at the start of your mod initialization

paper zealot
#

Then i believe the SMODS config table will be accessible with mod_instance.config

rapid stag
#

that's what i do

#

i set the var in the table

paper zealot
#

There might be a load_config function to run at the start also, I'm running on memory right now

rapid stag
#

the more perplexing thing is that now i'm sanity checking by changing the var and closing the config menu

#

it is not updating the file.

paper zealot
#

Are you looking at your local config.lua file, or in the %AppData%/Balatro/config/YourMod.jkr file?

rapid stag
#

the latter

scarlet spire
paper zealot
# rapid stag it is not updating the file.

I remember running into a problem where it seemed like SMODS was checking the type of the default variable set in config.lua and discarding the new value if the types mismatched. Could it be something like that?

rapid stag
#

not like, in runtime

#

but this config value used to be a boolean value, but i'm making it a number value now cirDerp if that makes sense

paper zealot
#

That might be an issue, yes. That's the type mismatch that I'm referring to

dense adder
rapid stag
#

do i really have to make a whole new variable in the config table just to use a different type cirBlech

paper zealot
#

Whatever you think is easier and more reliable for your use case

stiff locust
#

how do i change the rank of a card again

fast lily
#

I am absolutely new to modding in general, but have some programming experience and want to try and make something little for a friend. How exactly do I start modding?

#

I'd imagine I'd need to download a lua environment and maybe even steamodded?

rapid stag
#

does anyone know how to exit a for loop prematurely?

paper zealot
#

Or move your loop to its own function and return. Different people have different preferences

plush cove
# paper zealot `break`

similar question: what's the best way to ignore a value in a for loop, but have it still continue regardless? is the only way to have an "if" statement?

paper zealot
tall wharf
#

i just use label for that

paper zealot
paper zealot
fast lily
#

ty

paper zealot
steady smelt
#

how can i display attention_text over a played card with an enhancement in that enhancement's calculate() function? it keeps showing up in the wrong place and idk what i'm doing that much

harsh marten
#

how do I check if the player has a joker selected?

tall wharf
#

cards gone™️

halcyon osprey
#

somehow caused a crash? card = nil somehow

scarlet spire
#

are these values from the card's config?

#

use self.config.extra instead

halcyon osprey
#

not ability set, and it worked in the past

#

im essentially only wanting it to upgrade if a Joker has been sold

rapid stag
#

it's not steam cloud sync bs (esp. because i disabled steam cloud just to rule it out), it's not weird file bs.
SMODS literally just isn't saving the value

#

wtf why didn't it record the console window

#

oh right, i dragged it in

#

balatro just doesn't like being recorded

#

this is the function the cycle calls

#

i just can't understand what's wrong

daring fern
#

I tried that and couldn't get it to work

rapid stag
#

wait

#

that's my problem

copy table.

#

hhhhhhhhhhhhhhhhhhhhh

#

yep. fixed it.

paper zealot
# rapid stag that's my problem copy table.

Careful where you put this, as SMODS.current_mod will only point to your own mod for a brief period on loading before moving onto another mod. This might well destroy or overwrite other mod's config files

rapid stag
#

is there a better way to guarantee that it'll be this specific mod that it's getting

plush cove
#

I have it initialized like this

paper zealot
rapid stag
plush cove
rotund ridge
#

im trying to make it work for every hand played but it only does it one time every game i dont know how it works

stiff locust
#

the reason it is triggering once per game is because of card.ability.extra.triggered not being properly reset to false

#

if you want it to be once per hand, set it to false during context.before

#

if you want it to be once per blind, set it to false during context.setting_blind

#

i assume it is meant to be one of those two

rotund ridge
#

i wanted it not once per hand just it plays it every hand like i play a 4 and 7 it trigger in the same round i play a another 4 and 7 and it triggers etc etc

stiff locust
rotund ridge
#

im just taking code and hoping it work ngl 😭 💀

stiff locust
#

yeah you don't need the card.ability.extra.triggered blocks then

#

you can js get rid of those

stiff locust
#

replace played_card in your checks with context.other_card and remove the for _, played_card in... loop (and its corresponding end)

#

and then move the line local has_4, has7 = false, false inside the if has_4 and has_7 block
this will make it play every time a 4 and 7 are played regardless of how far apart they are, even across different hands and different rounds
if you want it to reset after a hand anyway you can re-add the false changes under context.after which is after a hand is played

daring fern
#

Is there a way for a print command to print everything instead of "+x more values"?

stiff locust
rotund ridge
#

im changing it hold on

stiff locust
#

alright

rotund ridge
stiff locust
#

you don't need to return anything during this block

rotund ridge
#

the one on at the if has_4, has_7 ?

stiff locust
#

both of them inside the if context.individual and ... block

#

the first is redundant and the second is causing the crash

#

if you want a message then there's two other ways of doing it that do not involve a return

#

one of which is apparently better but i don't know how to do the better version

#

so card_eval_status_text it is

#

although this doesn't seem like an ability that should have a text popup when triggering

#

balatro standard would be to use card:juice_up at this point
-# this is way simpler than the message stuff anyway, this is the line of code that makes the card do a little shake animation

#

but there's nothing stopping you from doing a message if you still want one

rotund ridge
#

? is it good

primal robin
stiff locust
stiff locust
#

you do need to return the message or use another method

rotund ridge
#

i want the message yes

#

on the joker

stiff locust
#

okay then you should also localize it

#

hard coding a message to english isn't good practice for future translation but you can handle that later probably

#

remove the on_hand_start section it's no longer needed

#

also what is this joker actually supposed to do

#

i notice you're trying to make it give mult during joker_main but also during the other context check?

rotund ridge
stiff locust
#

so

#

why are you using xmult_mod

#

and the way you phrase it, it sounds like it should be once per hand

rotund ridge
#

this is second card i ever coded

stiff locust
#

okay but conceptually for the joker

#

should it be once per hand

tall wharf
#

wtf

#

what happened to SMODS.current_mod

plush cove
tall wharf
#

how

manic rune
#

maybe its foreshadowing the fact astrapboy doesn't own Mistigris...

tall wharf
#

nahhhhh

rotund ridge
tall wharf
#

that can't be

#

right????

manic rune
#

we just dont know...

stiff locust
rotund ridge
#

oh

stiff locust
#

the joker's effect is as described by you gives +10 mult if a 4 AND 7 are played and scored
which implies that, after a hand is played, if the hand contains a 4 and a 7 that score, it gives +10 mult once

#

but the way you code it makes it seem like it should be gives +10 mult after a 4 and 7 have both been scored

#

which could activate infinite times per hand, activating immediately once a 4 and 7 have been scored

#

so is it the first one or the second one

plush cove
# tall wharf right????

[SMODS mistigris "src/startup/smod_hooks.lua"]:9: attempt to index field 'current_mod' (a nil value)
the incriminating code in question:

stiff locust
#

alright then

primal robin
#

Is there any function to define own mod description UI?

stiff locust
# rotund ridge

change card.ability.extra.xmult to card.ability.extra.mult
go to the joker's config = { extra = { xmult = X } } line and change it to config = { extra = { mult = 10 } }
change the xmult_mod = on line 61 to mult =
add a return { that starts after line 60 and ends with } after the colour = line

tall wharf
stiff locust
rotund ridge
stiff locust
#

ctrl + h to do find and replace btw

rotund ridge
#

ok

stiff locust
#

maybe don't do that actually it could fuck up your other joker

#

if it also uses card.ability.extra.xmult

tall wharf
#

time to make a release

#

at least alpha release

manic rune
stiff locust
#

that opens the search bar in vscode

manic rune
#

mhm

#

theres a bar below for you to type in what you want to replace the thingy with

stiff locust
#

the return should start 1 line lower

#

do not put the local has_4... inside it

#

you removed the code that sets has_4 and has_7

#

put it back

#

remove the return and end on the lines directly below context.individual
-# i've said this twice now

tall wharf
#

@manic rune

manic rune
rotund ridge
stiff locust
#

before

#

you can't execute code after a return

tall wharf
manic rune
#

i copied from google

rotund ridge
stiff locust
#

you moved the return up???

#

move it to the line above mult =

make a new line to put it on

manic rune
#

💔

#

maybe you need to type out the entire code for them

stiff locust
#

you know i think that's probably easier

plush cove
#

backseat programming

stiff locust
#

i give help that gets overridden when someone better than me shows up
that's my joker balatrojoker

frosty dock
#

😭

stiff locust
#

like you

frosty dock
#

no im having breakfast rn

manic rune
#

lets summon aure to help with simple code :3

stiff locust
#

alright great i can preach card_eval_status_text quickly

plush cove
#

@frosty dock how do I print to console help me

frosty dock
#

it's pretty simple actually

#
local console = { log = print }
console.log('Hello World')
tall wharf
#

😭😭😭😭😭

manic rune
#

wtf 😭

#

unnecessarily complicating code with aure™️

tall wharf
#

we are java scripting in lua now???

tall wharf
manic rune
#

-# i dont

#

i heard its hard

#

so im not even gonna bother

tall wharf
#

do you want to be a developer

manic rune
#

i want to

onyx sonnet
#

Fuck JavaScript

tall wharf
#

insanity

stiff locust
# rotund ridge 😭
calculate = function(self,card,context)
    if context.individual and context.cardarea == G.play then
        if context.other_card:get_id() == 4 then john_has_4 = true end
        if context.other_card:get_id() == 7 then john_has_7 = true end

        if john_has_4 and john_has_7 then
            return {
                mult = card.ability.extra.mult,
            }
        end
    end
    if context.after then
        john_has_4 = false
        john_has_7 = false
    end
end

this is yours now replace your ENTIRE calculate function with this code
there is no message because i think it shouldn't have a message because a message is already output by the mult being output
it doesn't have and not context.blueprint because this code is perfectly blueprintable and it's not an end of round effect so it has no reason not to be blueprint compatible
make sure you change blueprint_compat to true though

tall wharf
#

this should kill a lot of Cryptid runs tho

onyx sonnet
#

Finally, a way to kill negative deck

tall wharf
#

i don't kill editions

stiff locust
#

yes you do

#

you just killed negative

#

the edition

tall wharf
#

i don't specifically kill negatives

stiff locust
#

yes you do (you just did)

tall wharf
#

i kill jamming cards into your area

stiff locust
#

which is mainly done with

#

negatives

#

negative is dead

tall wharf
#

sometimes cards are just jammed into your area

plush cove
stiff locust
#

but you have 5 joker slots

primal robin
stiff locust
tall wharf
#

exactly why you need chicot for this one actually

stiff locust
#

i've been wondering if it is possible to make my chicot fusion automatically win blinds that include disable, disabling or disabled in their descriptions (or by a hardcoded list of blinds that do stuff when disabled)

plush cove
primal robin
stiff locust
#

you know just to send a message back at the anti chicot blinds

#

is that a thing i can do

tall wharf
#

true

#

even tho i have "Disabling this blind sets requirement to some big number"

#

i have this bullshit

maiden phoenix
#

This is so stupid lmao

tall wharf
#

i think it evens out

stiff locust
#

im also gonna make it return saved = true so a blind can't pull "disabling this blind instantly loses your run"

#

it's going to take you a lot of shit to get rid of me

#

you are up against the wall and I am the wall

#

uhh payload juggernaut said that i think

tall wharf
#

how about "Disabling this boss blind starts a new run entirely"

stiff locust
maiden phoenix
#

I read "I'm going to pin you against the wall" and was confused lol

rotund ridge
tall wharf
stiff locust
#

i'm also very busy with other projects at the moment

maiden phoenix
#

Marie drama

rotund ridge
#

what happend?

stiff locust
#

squid games

tall wharf
#

is this a trap set by Playstack 😭😭

maiden phoenix
#

Marie drama would be like "She got caught selling the splash card"

tall wharf
#

marie

stiff locust
#

like on red/blue/green deck splash sleeve

maiden phoenix
#

What

#

Im reporting you to mods

manic rune
#

splash...

tall wharf
#

helo 46 year old from somali selling wife for internet connection

native zinc
#

i got fucked up by my own joker. thanks Judgement

stiff locust
manic rune
#

wtf

native zinc
#

"oops"

stiff locust
#

splash is inherently splashable

manic rune
#

why would you want that 😭

native zinc
#

blame judgement

manic rune
#

you know what

onyx sonnet
manic rune
#

might as well buy invisible joker for 60 bonus cards

tall wharf
onyx sonnet
#

And hologram scaling

maiden phoenix
onyx sonnet
#

And sooooooo much blue joker value

stiff locust
#

at most points while running my mod if you have a regular splash for too long it becomes a burden
-# which is also why i'm making ripple count as splash in fusions as per the polls because this is actually a really big problem when running my mod

manic rune
#

yes, but

your deck is fucked after that

onyx sonnet
#

Clearly this is the best joker ever

tall wharf
#

sell this card to double your deck size right now

native zinc
#

oh

#

someone already said it

stiff locust
#

the card demanding "Right now"

tall wharf
onyx sonnet
#

It has limited application and a stupidly absurd drawback

manic rune
#

i swear to god i cant be the only one reading "deck size" as smt else.

stiff locust
#

imagine diet cola with "sell this card to create a double tag Right Now!!!!!"

plush cove
stiff locust
#

someone make a mod that changes all the jokers to be aggressive

onyx sonnet
#

Unless you're playing some fucked up plasma build with splash

native zinc
#

oh i gotta go get madness and cere now

#

thanks

onyx sonnet
#

I 💙 splash

native zinc
#

i love playtesting my own mod

maiden phoenix
rotund ridge
#

Holy shit i feel like yandere dev💀

stiff locust
#

jimbo gives +#$%! Mult

plush cove
stiff locust
#

because you listen to feedback and let people help you

onyx sonnet
#

What if Jimbo drank alcohol and said BITCH!

stiff locust
#

like a reasonable human being

manic rune
rotund ridge
#

stop it guys you are going to make me blush

manic rune
#

-# what

stiff locust
#

yeah okay we're gonna stay very away from this actually

#

i'm just gonna put this ocean between us and communicate to you via message bottles

manic rune
#

it seems we both agree on something there

stiff locust
#

i hope that's not an inconvenience