#💻・modding-dev

1 messages · Page 572 of 1

feral tree
#

damn

gusty compass
#

I'm not so sure how the cards would get that behaviour in the first place

#

Eh

timid zinc
#

is there an example of how to add a new perma bonus on a card?

#

that is

#

not one of the existing ones

red flower
#

i dont think so

#

let me see if i can find the perma_repetitions commit

gusty compass
#

Excluding bonus chips here I assume?

red flower
#

check how that does it

timid zinc
#

perma_d_dollars time

brave blade
#

What's the difference between table.insert(table, value) and table[#table+1] = value?

frosty rampart
#

barely anything
in terms of performance, table[#table + 1] = value is slightly faster because you don't have to interact with the table module, but it's pretty much negligible
table.insert mainly exists because you can provide an optional position parameter to insert to an arbitrary location in the table, e.g. table.insert(table, 1, value) appends value to the front of table

brave blade
#

Ah, ok

#

Good to know

umbral zodiac
#

insert is technically cleaner but if you don't trust passing by reference (me) then the latter is pretty much the same

brave blade
#

I realized it doesn't actually matter for what I'm doing, but that's good to know in the future, thank you!

#

Actually nevermind it does matter lol

brave blade
#

Does mod calculate() function go before or after Joker calculate()?

red flower
#

after

brave blade
#

Ok, good to know, thanks!

#

How is that a nil value, I literally defined it as 0 on line 549

red flower
#

the other hand_size

#

the one in extra

brave blade
#

That should be defined as 1

#

Let me test something

vapid pawn
#

mod idea: a mod where whenever a hand is played a buff or debuff is gained

#

right

charred widget
#

Hello friends (if anyone's here at this hour). I'm having trouble with a joker acting up. It doesn't work as intended, but it also hasn't crashed at all.

charred widget
#

Necrozma here is supposed to check if Solgaleo or Lunala are directly to its left or right at the end of the shop, destroy itself and the other Joker, and create Dusk Mane Necrozma or Dawn Wings Necrozma respectively. However, it does nothing.

#

although the code I used doesn't actually destroy the other joker yet, I was going to ask about that anyways

median oriole
#

I understand totally

#

👍

#

I'll check it out later

#

I'm on my phone rn

wild escarp
#

How could I make a certain joker spawn in a pack less often, similar to black hole or the soul? I'm currently just spawning the cards for the pack based off rarity.

median oriole
#

This is crazy

wild escarp
#

lmao, yep.

median oriole
#

Gng this is wild

wild escarp
#

There are dozens of us, dozens!

loud summit
#

how do i figure out which mod is taking so much goddam memory

#

i keep getting oom crashes

#

its DEFINITELY something in the actual save game

#

since loading a saved game instantly drops ths fps

real crown
#

What's the order of cards in G.playing_cards? Are the new ones added always at the end?

high verge
#

Can one mod add in more than one deck to the customize menu?

robust marsh
#
    calculate = function(self, blind, context)
        if context.post_trigger then
            if SMODS.pseudorandom_probability(self, 'ghostly', 1, 3) then
                if context.other_card.config.center ~= G.P_CENTERS.j_tdec_photoquestion then
                context.other_ret.jokers = {}
                return {
                    message = "Fading",
                    colour = G.C.WHITE
                }
            end
        end
    end
end

This crashes the game when oops is present so I suppose I should add it to context.other_card as well

#

nevermind it crashed again gemmytroll

robust marsh
daring fern
robust marsh
#

gotcha

daring fern
#

The reason why context.other_ret = {} doesn't work is because context.other_ret is just a reference to the actual ret.

robust marsh
#
    calculate = function(self, blind, context)
        if context.post_trigger then
            if SMODS.pseudorandom_probability(self, 'ghostly', 1, 3) then
                if context.other_context.mod_probability and not context.other_context.fix_probability then
                    if context.other_card.config.center ~= G.P_CENTERS.j_tdec_photoquestion then
                        EMPTY(context.other_ret)
                        return {
                            message = "Fading",
                            colour = G.C.WHITE
                        }
                    end
                end
            end
        end
    end

Something like this I assume?

daring fern
robust marsh
#

oh

#

oh, mb

#

just woke up droidcry

rough frigate
#

i hate to interrupt but
i am at my wit's end...
i'm trying to inject code with lovely,
i have the exact code i want to replace, copy-pasted, properly formatted, word-for-word, into the pattern field.
it SHOULD work, but it just DOESN'T.
it refuses to recognize the code that's RIGHT THERE. :(
i'm so close to having this work, if anyone can assist me, please please let me know.
i can send the mod files if it would help.

umbral zodiac
#

wtf lucky

daring fern
umbral zodiac
#

do you need to be replacing the whole entire block

umbral zodiac
rough frigate
#

oooh true. i should do that.
how do i do that,

robust marsh
umbral zodiac
#

if another mod patches it at all [notably smods, probably] then your patch wont go through

#

since itll change the very specific requirements that your patch already has since it needs all those lines to be the same lmao

umbral zodiac
#

that's basically just the game's code after lovely patches have been applied

rough frigate
#

ahhh thank you thank you

umbral zodiac
#

out of curiosity what are you doing

rough frigate
#

i'm making it so when you use wheel of fortune it plays the funny flipnote gamblecore meme

daring fern
robust marsh
#

ah..

umbral zodiac
#

i think it would be a lot easier to use an smods mod and a global calculate function to do that

rough frigate
#

easier maybe
but i have no idea how to do any of that i am like a level 1 programmer

robust marsh
umbral zodiac
#

but if you do stick with a lovely patch i would try and shorten the required pattern because unless you need to replace all of those lines it just makes it more susceptible to being broken by other mods

rough frigate
#

level 0 even

daring fern
umbral zodiac
rough frigate
umbral zodiac
#

smods is great

lofty elm
#

hey team, anyone know how to get the pool of a card from just it's key? I'm trying to make a showman effect but only for planets. Right now I'm hacking it in a really goofy way that feels bad

local smods_showman_ref = SMODS.showman
function SMODS.showman(card_key)
if next(SMODS.find_card('j_aij_void')) and not next(SMODS.find_card('j_vremade_ring_master')) and card_key:find("^" .. "p_") then
return true
end
return smods_showman_ref(card_key)
end

#

the joker in question is the void one

umbral zodiac
#

also all consumables are prefaced with c_ so this would unfortunately not work because of searching for "p"

lofty elm
#

sweet, thank you! also is there any way to distiguish if the player is opening a pack? if I can I'd like it to only happen in the shop

lofty elm
umbral zodiac
#

strange but if it works lmao

umbral zodiac
#

i am not immediately aware of it

lofty elm
#

fair lol

#

ill see what I can find

#

thx again

fathom star
#

does it usually take this long?

#

its been like 4 minutes....

keen atlas
#

why is my red sub-uibox is on the bottom right. am i missing something?

robust marsh
#
local old_update_shop = Game.update_shop
function Game:update_shop(dt)
    old_update_shop(self, dt)

    if not G.GAME.Insert_Photo
        and G.GAME.round_resets
        and G.GAME.round_resets.ante == 8
        and G.GAME.round_resets.blind_states
        and G.GAME.round_resets.blind_states.Small == 'Upcoming'
        and G.shop_jokers then
        G.GAME.Insert_Photo = true

        local card = SMODS.create_card {
            set  = "Joker",
            area = G.shop_jokers,
            key  = "j_tdec_photoquestion"
        }

        create_shop_card_ui(card, 'Joker', G.shop_jokers)
        card.states.visible = false

        G.E_MANAGER:add_event(Event({
            trigger = 'after',
            delay = 0.2,
            func = function()
                card:start_materialize()
                card.ability.couponed = true
                card:set_cost()
                return true
            end
        }))
        G.shop_jokers:emplace(card)
    end
end

How would I make this joker appear alongside the other jokers instead of replacing one of them? I've tried tinkering with how tags do it but I realized they replace one of the joker slots

daring fern
robust marsh
#

I genuinely found no other way

#

at least from what I've tried

keen atlas
robust marsh
# daring fern Why are you doing this in `Game:update_shop`?

i tried doing

SMODS.current_mod.calculate = function(self, context)
    if G.GAME.round_resets.ante == 8 and G.GAME.round_resets.blind_states.Small == 'Upcoming' then
        if context.starting_shop then
            local card = SMODS.add_card {
                set = "Joker",
                area = G.shop_jokers,
                key_append = "v",
                key = "j_tdec_photoquestion"
            }
            create_shop_card_ui(card, 'Joker', G.shop_jokers)
        end
    end
end
#

it works

#

turns out i was overcomplicating things

#

although i'd like to ask if there's a way to make it so the cards don't appear so bunched up

daring fern
# robust marsh

G.shop_jokers.T.w = math.min((G.GAME.shop.joker_max+1)*1.02*G.CARD_W,4.08*G.CARD_W); G.shop:recalculate()?

daring fern
#

fathom star
#

How do I make one of those tutorial cutscenes

hollow horizon
#

Hi! I have this problem where the label for edition is shown up as "ERROR" in game. Other labels work just fine. So does name and desc for edition. It's just the label for edition that doesn't work. Does anyone see the problem?

daring fern
hollow horizon
#

oh

#

so just the mod prefix and key?

daring fern
hollow horizon
#

great

#

thanks

sage zealot
#

Is there a channel for crash logs?

hollow horizon
#

How do I make custom background image for a blind? Do I have to make a shader for it or can I just somehow draw an image over the original one?

stiff locust
#

s did you lose a role

#

i couldve sworn you used to be colored

hollow horizon
#

I saw people do that but I can't find any documentation on background images what so ever

cursive gazelle
cursive gazelle
#

The shader is unnecessary

stiff locust
#

ah

cursive gazelle
#

How are you doing btw marie

cursive gazelle
stiff locust
#

i wanna do so much in terms of balatro modding and I just can't do all of it

#

I'm juggling 3 major projects and 1 minor project at once and I don't want to drop any of them

#

and three of them require me to do art and I can't do art

#

i feel like tsunami should've been done by now if I got my shit together but it just sucks cause there's no art on 90% of the things and people don't like that
jokebox is really underwhelming in terms of fulfillment but I still feel like I should commit to it

splatro is going fine in terms of production but in terms of gameplay it's not going fine

#

and there's that secret project I have that hasn't gotten done because it keeps getting feature crept and overshadowed by everything else I'm doing

#

I want to make things for people that people will see that's what makes this worth doing but that just doesn't happen

#

I don't feel like I should give up considering sunk cost fallacy or whatever I learned a whole coding language for this I don't want to just drop it right now

cursive gazelle
#

You’re a good modder marie

#

Maybe consider getting an artist to help

stiff locust
#

that's not easy to do especially not in good morals
I would feel like shit asking for art from people if they didn't come to me first because it just feels unfair to them as if they're doing it of obligation

cursive gazelle
#

Maybe there’s some people out there who can do art but can’t code and looking to make a cool mod

#

Or be a part of one

stiff locust
#

discord just put me in fucking limited access i'm gonna lose my shit what is this

#

what did I do????

#

i'll figure it out

#

later

cursive gazelle
#

Are you associated with war crimes in the past 50 years bychance 😭

stiff locust
cursive gazelle
#

I would’ve wanted to help but I’m terrible at art myself

stiff locust
#

art is really difficult

#

i've been trying to learn it and I don't know how they do it
I can shade cylinders and spheres so I can shade a mean peanits if I felt like it but that's about it really

cursive gazelle
#

I make digital art for fun i would say i’m decent but it doesn’t translate well , anyways this is not the channel for this discussion

stiff locust
#

that's true

#

coding would be easy if not for the art I could probably finish tsunami in like a week if it was just coding now that I know my way around shit
still despise SMODS.change_base() though

#

if there are no change_base haters I am dead

hollow horizon
stiff locust
#

context.setting_blind

hollow horizon
#

yeah but like to get all that background changer code inside if? or just some part of it?

robust marsh
#

sorry if it looks scuffed I'm on my phone

hollow horizon
#

yeah yeah I may have just phrased that wrong. I know how to check for a blind. I don't know WHERE to check for it here

robust marsh
# hollow horizon yeah yeah I may have just phrased that wrong. I know how to check for a blind. I...
local update_ref = Game.update
function Game:update(dt)
    update_ref(self, dt)

    if G.GAME.round_resets.ante == 0 and G.jokers and G.jokers.cards then
        for _, j in ipairs(G.jokers.cards) do
            if j.config and j.config.center and j.config.center.key == "j_tdec_photoquestion" then
                if G.GAME.blind.config.blind.key == "bl_tdec_famine" or G.GAME.blind.config.blind.key == "bl_tdec_pestilence" or G.GAME.blind.config.blind.key == "bl_tdec_war" or G.GAME.blind.config.blind.key == "bl_tdec_death" or G.GAME.blind.config.blind.key == "bl_tdec_beast" then
                    local blind_def = G.GAME.blind.config.blind
                    if blind_def.boss_colour then
                        ease_background_colour { new_colour = blind_def.boss_colour, contrast = 1 }
                    end
                end
            end
        end
    end
end

Idk how relevant this is, but it's what I use to change my blind's backgrounds, although it's conditional it is basically the same premise

fathom star
#

why wont it work?

#

oh wait

#

forgot to name it

wispy falcon
willow scroll
#

you need an entry in uhh misc/labels(?) for the rarity name

#

uhh where do i need to hook the game to add new globals "properly" a la G.GAME.[myglobal]?

slim ferry
#

if you want stuff thats reset every run, use SMODS.current_mod.reset_game_globals

primal terrace
#

I feel like there should be an easier way to retrieve the second from last card in the scored hand

willow scroll
slim ferry
#

yeah

willow scroll
#

noted thank you

runic pecan
#

I need help.
Those 3 nodes are suppose to show in purple, light blue and navy (like Tarot, Planet and Spectral), yet they are all text-black for some reason I couldn't diagnose.

willow scroll
#

is it possible to let something calculate on a card (a.e a seal) even if a card itself is debuffed easily

#

i already have a workaround im wondering if im missing smth again :clueless:

red flower
primal terrace
red flower
#

yeah that's how it should be done

#

you don't need so many nil checks

wispy falcon
daring fern
wild berry
#

whats the global variable to check the current chips scored?

wild berry
#

ty

wispy falcon
daring fern
fathom star
#

dude what

wispy falcon
daring fern
wispy falcon
# daring fern Yes.

Literally card:set_sprites(card.config.center) or replacing card with c_cstorm_aries?

daring fern
wispy falcon
#

Okay, something that shouldn't take long: Can I change 'Joker' to 'Consumable' without patching?

daring fern
#

It seems to only work for vouchers and jokers.

wispy falcon
# daring fern No.

So I would need to patch that? If so, you don't happen to know where that is located in the game files, do you?

robust marsh
#

I'd imagine it's in ui definitions, don't quote me on that though

#

I'd check if i could

daring fern
wispy falcon
quick scarab
#

Making a joker that is basically the horse from Yahimod but its not working, it keeps crashing whenever it spawns

#
local upd = Game.update
function Game:update(dt)
    upd(self, dt)
    if G.jokers then
        for i = 1, #G.jokers.cards do
            if G.jokers.cards[i].ability.name == 'j_fnaf_balloon_boy' then
                local _bb = G.jokers.cards[i]
                local _bbc = G.P_CENTERS.j_fnaf_balloon_boy
                if _bb.ability.extra.round < _bb.ability.extra.maxround and _bb.ability.eternal ~= true then
                    _bb.ability.eternal = true
                end
            end
        end
    end
end

SMODS.Joker {
    key = 'bb',
    atlas = 'Joker',
    pos = { x = 0, y = 0 },
    rarity = 1,
    cost = 3,
    unlocked = true,
    discovered = false,
    blueprint_compat = false,
    eternal_compat = false,
    perishable_compat = false,
    loc_vars = function(self, info_queue, card)
        info_queue[#info_queue + 1] = { key = "fnaf_sprite_WIP", set = "Other" }
    end,
    add_to_deck = function(self, card, from_debuff)
        SMODS.add_card('j_fnaf_balloon_boy')
        card:start_dissolve({G.C.RED})
        card = nil
    end,
}
#
SMODS.Joker {
    key = 'balloon_boy',
    atlas = 'Joker',
    pos = { x = 0, y = 0 },
    rarity = 1,
    cost = 3,
    unlocked = true,
    discovered = false,
    blueprint_compat = true,
    eternal_compat = true,
    perishable_compat = false,
    no_collection = true,
    config = { extra = { x_chips = 0.5, round = 0, maxround = 3}},
    loc_vars = function(self, info_queue, card)
        info_queue[#info_queue + 1] = { key = "fnaf_sprite_WIP", set = "Other" }
        return { vars = { card.ability.extra.x_chips, center.ability.extra.round, center.ability.extra.maxround}}
    end,
    calculate = function(self, card, context)
        if context.joker_main then
            local bb_voice = math.random(1, 3)
            return {
                x_chips = card.ability.extra.x_chips,
                func = function()
                    if (pseudorandom('fnaf_bb_voice') < 1 / 3) then
                        card:juice_up(0.1, 0.2)
                        if bb_voice == 1 then
                            play_sound('fnaf_bb_voice1')
                        elseif bb_voice == 2 then
                            play_sound('fnaf_bb_voice2')
                        elseif bb_voice == 3 then
                            play_sound('fnaf_bb_voice3')
                        end
                    end
                end
            }
        end

        if context.setting_blind and not context.blueprint then
            card.ability.extra.round = card.ability.extra.round + 1
            if card.ability.extra.round >= card.ability.extra.maxround then
                card.ability.eternal = nil
            end
        end
    end,
}
daring fern
quick scarab
#

the card is spawning

#

but still crashes

quick scarab
#

different crash report

#

this might help

daring fern
# quick scarab

You're trying to index center which doesn't exist, because it's card

wispy falcon
#

How do I give undiscovered consumables a description?

frosty rampart
#

or check vanillaremade (if you use a localization file, it goes in descriptions -> Other -> undiscovered_modprefix_consumabletypekey)

still cedar
#

How to make a copying of a random joker

frosty rampart
#

pseudorandom_element(table, 'seed') returns a random element of the table you pass to it
so do this

local copied = pseudorandom_element(G.jokers.cards, 'seed')
local ret = SMODS.blueprint_effect(card, copied, context)
...

(probably replace the seed with something relevant to this joker, like its key or whatever)

hearty mesa
#

why is my G.UIT.T appearing only when i click into the text input?

scr = SMODS.current_mod

-- there are conditions here, ommitted for brevity
G.FUNCS.overlay_menu{
        definition = create_UIBox_generic_options{
            back_func = "scr_go_back",
            contents = {
                {n = G.UIT.C, config = {align = "cm", padding = 0.1}, nodes = {
                    {n = G.UIT.T, config = {text = "Enter Up Keybind", scale = 0.5}},
                    create_text_input{
                        prompt_text = "...",
                        max_length = 12,
                        all_caps = true,
                        ref_table = scr.config,
                        ref_value = "up_keybind",
                        align = "cm",
                        callback = function()
                            scr.config["up_keybind"] = scr.config["up_keybind"]:lower()
                            SMODS.save_mod_config(scr)
                        end,
                        w = 3,
                        h = 1,
                        text_scale = 0.5
                    },
                    }
                }
            }
        }
    }
end
floral marsh
#

where can I get a list of the ingame booster packs. I had found it at some point but I forgot (I need it to make a table including only the mega variants)

#

like for example for a list of editions I just grab them from G.P_CENTERS and then it starts with e

#

nvm

#

it started with p not b

#

🗿

frosty rampart
#

yea
(b is for decks, because they're "Backs". i.e. the back of the card)

red flower
#

G.P_CENTER_POOLS.Booster should work too

slim ferry
floral marsh
lofty elm
#

hiya, I've found that when enhacing a card to stone, specifically before the round, it visually loses it's rank and suit and becomes just a white card for a second before becoming stone. Anyone know if theres a workaround?

slim ferry
#

put it in an event if it isnt already

lofty elm
#

got it, I'll try doing that

#

uhh, did I do it right? Now it just turns white
G.E_MANAGER:add_event(Event({
func = function()
v:set_ability(G.P_CENTERS.m_stone,nil,true)
v:juice_up()
return true
end
}))

#

sorry for wack code pasting, idk how to send it nice like people do sometimes

#

v is the card, i'm in a loop

slim ferry
#

but that should be correct yeah

lofty elm
#
there we go
#

damn

daring fern
slim ferry
#

oh ok

lofty elm
#

just so I don't do this again, what are those last two arguments for?

wispy falcon
#

Anyone know what this is called in the game's code?

daring fern
fair osprey
#

Is there a way to block a player from skipping a blind? Would it require a patch?

hearty mesa
#

any good mod to look at for creating popup menus?

lofty elm
fair osprey
lofty elm
#

but yeah I think it requires a patch

hearty mesa
hardy viper
slim ferry
#

step 1: learn ui

#

😨

hearty mesa
hearty mesa
hardy viper
#

if you just want to know how to overlay some ui then you can look at vanilla

slim ferry
#

UI is great fun if you have done html before otherwise its "waaa nested tables"

ocean sinew
#

blue frog what I need to do to improve

hearty mesa
slim ferry
#

fair

#

but ive heard complaints about nested tables with i personally disagree with, thats like the least bad part of ui

hearty mesa
#

yeah

#

the most fun part is when your stuff just doesnt show up

hardy viper
#

at least nested tables are avoidable by splitting stuff up between functions

hearty mesa
#

thats great to troubleshoot

hardy viper
#

well deeply nested tables that is

slim ferry
#

i mean its very much like html in the sense that its more likely to just not work instead of crash

#

(except html doesnt crash at all from what i know but yk what i mean

lofty elm
#

quick question if anyone knows it off the top of their head, if I have a context for after buying something, will that happen before a consumable is used if someone hits buy and use

#

I can go and test it if no one knows but I thought I'd check

slim ferry
#

im pretty sure it happens before the consumable is used

#

also just say context.buying_card lol

hearty mesa
lofty elm
fair osprey
lofty elm
#

sweet, glad it worked :)

#

Where would I go to find what all the paramaters of smt like create_card are for

frosty rampart
#

if it's a new smods function like create_card, there's a good chance it's documented on the "Utility" page on the smods wiki. if it's not there, or if it's a vanilla function, then there should be a bit of documentation for the function in the SMODS lsp_def folder (vanilla functions would be in vanilla), but it's not super readable because it's in a format designed for the language server protocol
you can, of course, also just dig around until you find the original source code for the function

lofty elm
#

awesome thank you, that utility page was one of the ones I hadn't explored yet and it seems super useful

dapper sun
#

does anyone know why this isn't working? (for custom enhancement)

frosty rampart
#

what's "not working" exactly

dapper sun
#

it's supposed to retrigger neighbouring cards but nothing's getting retriggered

#

the print is printing the context.other_card's stuff just fine

frosty rampart
#

hm
what happens if you take out the message and card from the return?

#

because if it's getting into the innermost if statement then the issue has to be something with the return i think

dapper sun
#

isn't the card the thing that'll get retriggered?

frosty rampart
#

no, it automatically applies the retriggers to context.other_card

wintry solar
#

Does it display the message?

slim ferry
#

playing cards can only retrigger themselves though

dapper sun
dapper sun
#

how would i have playing cards retrigger other cards then

slim ferry
#

use a global mod calculate for it

#

or steal from entropy crimson seal

lofty elm
#

Sorry to butt in, anyone know how to get a key in this scenario? It's probably just me misunderstanding what context.consumeable is but I'm not sure how else to get the key

if context.using_consumeable then
    local used_planet = context.consumeable.config.center.key
slim ferry
#

im fairly sure that would be the key

#

what issue are you running into?

lofty elm
#

hm

#

uh, this

if context.using_consumeable then
  if area == G.pack_cards or true then
      local used_planet = context.consumeable.config.center.key
      G.E_MANAGER:add_event(Event({
        func = function()
          local card = create_card('Planet',G.consumeables, nil, nil, nil, nil, used_planet)
          card:set_edition("e_negative", true)
          card:add_to_deck()
          G.consumeables:emplace(copied_card)
          return true
        end
        }))
    end
end
timid zinc
#

My joker that creates jokers doesn't create them with stickers in challenges that make all jokers have stickers, like Riff-Raff does

dapper sun
#

have you tried looking at riff-raff's code?

lofty elm
slim ferry
#

copied_card doesnt exist

dapper sun
red flower
dapper sun
#

(scary)

lofty elm
#

oh im just stupid thx, thats leftover from perkeo code

slim ferry
dapper sun
#

?

lofty elm
dapper sun
#

i'm saying it uses context.crimson_trigger

slim ferry
#

yes

#

look through the entropy files

frosty rampart
slim ferry
#

for SMODS.calculate_context

dapper sun
#

it does that in the seal

timid zinc
#

obv i can't do that but yeah that's it

red flower
lofty elm
#

oh cool, good to know

#

sorry just copying stuff from other stuff so I never know which is the better way to do things

dapper sun
#

honestly tempted to just make a different effect, now that i know entropy has the same thing as a seal

slim ferry
red flower
#

copy from vanillaremade :3

lofty elm
#

Actually this is from vanillaremade

#

from perkeo

#

maybe I have one thats out of date

red flower
#

yeah but perkeo doesn't create a card

slim ferry
#

i thought vanillaremade always used add_card when possible

red flower
#

it copies it

slim ferry
#

ohhhh

#

right

lofty elm
#

ohhhh

#

got it

red flower
#

that doesn't have an smods utility (yet)

lofty elm
#

yeah I just wanted smt negative so I assumed I should look at perkeo but that makes sense

timid zinc
#

Or i could patch the game and have it apply for the 'Food' set too

robust marsh
#

this might not be the question for this channel but do you guys know about any mods with interesting blind effects? I'm working on a 5-phase boss blind and I'm struggling to make fair and fun effects for each one of them. This is more about creativity rather than code

#

I need some more inspiration

frosty rampart
#

uuuu entropy maybe?
paperback has a set of blinds all themed around musical notation

robust marsh
#

I'll take a look, thank you

frosty rampart
#

there are actually more music blinds planned for future updates too (taupe treble is only implemented in the latest beta)

robust marsh
#

all of them seem pretty interesting actually

slim ferry
#

it looks like google spreadsheets

cursive gazelle
dapper sun
scarlet lion
#

Can someone help me test my mod? Or just play it?

burnt tide
#

I know it's possible to disable Jokers, but can I do it with everything in the game ? And how do I do it ?

slim ferry
#

if you want to ban something you can do G.GAME.banned_keys[key] = true

#

thats the same way challenges do their bans

burnt tide
#

thanks

frosty rampart
real crown
#

When you make a custom deck, how do you set the cards it contains? I saw in the abandoned deck there was a tag for no face cards, and erratic had a tag for it, but can you manually define the whole deck?

frosty rampart
rough frigate
# daring fern ```lua SMODS.current_mod.calculate = function(self, context) if context.usin...

ok so i'm trying to use this code, but it doesn't seem to do anything at all.

SMODS.gamblecore2.calculate = function(self, context)
    if context.using_consumeable and context.consumeable.config.center.key == 'c_wheel_of_fortune' then
        return {func = function()
            G.E_MANAGER:add_event(Event({
                func = function()
                    play_sound('gamblecore2_gamble1')
                    delay(1.2*G.SETTINGS.GAMESPEED)
                end
            }))
        end}
    end
end
slim ferry
#

yes, it should be SMODS.current_mod.calculate

rough frigate
#

ohhh i see

frosty rampart
#

chat is G.playing_cards guaranteed to be your full deck even in the middle of a round?

slim ferry
#

isnt G.playing_cards just the amount of cards in your deck

robust marsh
#

i thought G.deck.cards is that

frosty rampart
slim ferry
#

ive definitely gotten a number value error before when trying to loop over G.playing_cards before i thought

real crown
#

Does anyone know if there's a way to manually declare a deck when you make a custom SMODS.Back? From the Abandoned deck and Erratic references, they both have tags and aren't defined card by card

slim ferry
#

oh

#

OHHHHH

#

that makes

#

sense

#

actually

wintry solar
frosty rampart
#

thanks all

red flower
#

but maybe the challenge configs work

real crown
burnt tide
red cradle
#

Is it possible to prevent flipping card when it discarded?

slim ferry
#

G.GAME.banned_keys.<key> = true

#

that bans the object with that key

burnt tide
#

oh okay

#

i'm stupid

robust marsh
#

is context.after for when a hand is done scoring?

slim ferry
#

yes

robust marsh
#

oki

rough frigate
#

how would i go about replacing a vanilla consumable entirely with an smods consumable? i'm not sure how i would do it with take_ownership

red flower
#

depends on what you mean by replacing

robust marsh
#

uhh how do i do attention text, similarly to plasma's balanced one

red flower
slim ferry
#

is major the thing its "attached" to?

red flower
#

yeah

robust marsh
slim ferry
#

and hold is how long it stays on screen i assume?

red flower
#

i think so

round lion
#

how does dependencies work

#

as in how do i specify a modid for it instead of a item

slim ferry
#

the same way as for any object

#

except in your mod metadata

burnt tide
rough frigate
# red flower depends on what you mean by replacing

i'm making a custom wheel of fortune card that i want to replace the vanilla wheel of fortune with, i have the code modified from vanillaremade, would i be able to just shove it into a take_ownership function like this?

slim ferry
round lion
red flower
slim ferry
rough frigate
rigid solar
#

Hi people
I wanna do a joker that does something when a pack is skipped while no items from it have been taken (matters for a Mega Arcana pack where you can pick 1 and then skip for example). How can I check how many cards you can select while in a pack? There's probably a variable out there that tracks that but idk which it is

burnt tide
slim ferry
#

im pretty sure you can check if an object is from a mod/which mod its from but i forget where thats stored

rotund sable
#

Wasn't it just .mod

#

Where it's nil if it's from vanilla

slim ferry
#

i know its called original_mod

#

idk if its in a subtable though

red flower
#

object.config.prototype.mod

#

or original_mod

#

so like card.config.center.mod

prisma loom
#

Is this too vague of a descp?

#

or easily understandable?

dapper sun
#

Sell this card to create
a random Common Editioned Joker

#

you could do that

prisma loom
#

No I mean is the function of the effect is clear

#

that's my question

#

the last line

red flower
#

upgrade is kinda vague

rigid solar
# burnt tide I want to disable everything in the base game (jokers, vouchers, consumables, .....

Based on Pokermon (which removes all og jokers from the game, leaving only the pokermon ones), and assuming v.config.center.mod is correct, putting this in your lovely.toml file should work

[[patches]]
[patches.pattern]
target = "functions/common_events.lua"
pattern = "if v.yes_pool_flag and not G.GAME.pool_flags[v.yes_pool_flag] then add = nil end"
position = "after"
payload = '''
if not v.config.center.mod then add = nil end
'''
match_indent = true```
dapper sun
#

you could add what it upgrades into in the info queue

slim ferry
#

yeah but rarities dont have descriptions

#

so how would that even work

dapper sun
#

ohh

prisma loom
#

Oh hey Nova!

slim ferry
#

hello

dapper sun
#

Rarity upgrades every 3 rounds

slim ferry
#

yeah probably smth like that

prisma loom
#

yes but that's a very very long line

slim ferry
#

also im called eris smh

red flower
#

hey H.

slim ferry
#

FUCK

dapper sun
#

also you could

every 3[0] rounds

#

to save a line

prisma loom
slim ferry
prisma loom
#

xd

slim ferry
prisma loom
#

wait what

slim ferry
#

like yorick does for example

cursive gazelle
#

Why are you H

slim ferry
#

it says like every 23[x] discards

robust marsh
slim ferry
#

H'

prisma loom
#

Im confused

slim ferry
#

removes a line

prisma loom
#

oh

#

the last one

cursive gazelle
#

You can do 3[x]

red flower
#

for counters I always do "Does this every 3 rounds. (0/3)"

dapper sun
#

like yorick

rigid solar
#

I'd just say "Upgrades in X rounds" and change X when needed (so every round)

prisma loom
#

Guys I might sound insane but I want the text look alinged by word count preferrable, so lines wont look like this:

ssssssssssssssss
sssssssss
ssssssssssss
ssss

#

that looks bad

#

ssssssssssss
sssssssssssss
sssssssssss
ssssssss

slim ferry
#

i mean thats how most things do it

prisma loom
#

sure

rigid solar
#

Upgrades every 3 [x] rounds wouldn't change the alignement

prisma loom
#

Vanilla does all sorts of things actually

#

inconsistently

slim ferry
#

how the lines are organized is like the one consistent thing

#

usually most lines are of similar length

red flower
#

imo i think the text looking like a square looks bad

#

a bit of imbalance makes it easier to read

prisma loom
slim ferry
#

yeah true

cursive gazelle
#

Rick : yo

prisma loom
#

imo

rigid solar
prisma loom
slim ferry
#

theres mods that have upgrading editions

prisma loom
#

Im not sure

red flower
rigid solar
#

then wait 3 rounds and find out

#

experiment

#

you don't have to babysit players on every single little effect 😭

chrome widget
red flower
#

while I usually agree with that sentiment i dont think adding rarity to be more clear there would ruin anything

prisma loom
#

but it might be wrong

#

for new player experience

rigid solar
#

do you think new players will play your mod

prisma loom
#

There a lot of ppl that download random mods without a back thought

red flower
#

have you seen experienced balatro players playing mods

#

they dont read either

prisma loom
#

:^)

slim ferry
#

why are you L'

#

😭

rigid solar
#

their issue not mine smiley_face

broken rivet
#

does anyone know how i could hide the ui element that normally has the player's currently hand here

tepid crow
prisma loom
#

fun coincidence

red flower
glossy comet
#

i am having weird issues with creating a joker from a custom pool (CardJoker) added by my mod, which returns the error of bad argument #1 to ipairs, but if i replaced it with a different pool, it would work without any issues
this is the code, and it is located inside of SMODS.Back, if that helps

prisma loom
#

@slim ferry Should we use Yorick's variant of counting?

#

or keep as is?

slim ferry
#

idk, i think its just fine already imo

modern kindle
#

woah another letter enters the ring, we have N and H

prisma loom
#

kk

slim ferry
#

smh

modern kindle
#

no '

rigid solar
#

does anyone know which variable i need to check to access this value while in a pack (i know how to get the selection amount of a pack outside the pack, but idk how to do it during the pack)

modern kindle
#

its N' and H'

#

there is my N bestie

red flower
# broken rivet yes
# CardArea:draw()
[[patches]]
[patches.pattern]
target = "cardarea.lua"
pattern = "(self.config.type == 'deck' and self ~= G.deck) or"
position = "before"
payload = '''
(self.config.type == 'hand' and state == G.STATES.JOY_SIDE_DECK) or''' # change this for whatever state
match_indent = true
red flower
modern kindle
#

hi N

rigid solar
#

lemme test that rq

burnt tide
red flower
#

i would look at how pokermon does it

#

i would share how i do it in my mod but its very convoluted

rigid solar
#

scroll up

#

i didnt test it but it should work

burnt tide
slim ferry
#

in your mod files

chrome widget
#

Hey Dilly

modern kindle
#

hi winter

#

i hope youve been well

chrome widget
#

Doing okay. Been distracted by rl stuff so only made incremental progress on modstuff recently

rigid solar
burnt tide
rigid solar
#

yes

#

and you put that in your mod folder

modern kindle
red flower
broken rivet
#

also curious if it's possible to apply shaders to ui elements

frosty rampart
chrome widget
#

My current in progress art is this, though I've made more progress since I posted this shitty draft

burnt tide
#

something like that ?

red flower
#

yeah

burnt tide
rigid solar
red cradle
#

How can I lower my hand with the cards, as it happens when you play hand?

red flower
#

in a pool it should be v.mod

#

because youre checking the prototype

robust marsh
#

how would I make cards get drawn back into the deck when you discard/play them so you can use them again in the same blind?

#

I no clue how to pull that off

rough frigate
#

so i'm multiplying the delay by the game speed,
thinking it would make it the same 1.2 seconds on each game speed,
but it's still ever so slightly faster on faster speeds than 1.
i'm not sure what to do about this?
everything is working perfectly except the timing is off :(

rigid solar
burnt tide
rigid solar
#

nice

burnt tide
#

just i says me that when I'm trying to open a card booster :D

slim ferry
#

ah

#

thats seals lacking a default

burnt tide
#

(btw thanks)

slim ferry
#

so it uses the global default but that isnt a seal

burnt tide
rigid solar
#

uuh

#

wdym seal j_joker 😭

slim ferry
#

its what i said above

#

seals dont have a default so if there are no available options it tries the global default instead

robust marsh
#

is there something like G.FUNCS.draw_from_discard_to_deck() but for played hands?

burnt tide
red cradle
#

as i know

robust marsh
#

oh

slim ferry
rigid solar
#

yeah

red cradle
red flower
burnt tide
red cradle
#

it include G.STATE = G.STATES.HAND_PLAYED and G.STATE_COMPLETE but i don't understand how they work

rigid solar
#

any modded stuff will stay

red flower
burnt tide
#

thank you

red cradle
desert ore
#

do you guys know where in the code pack hand size is handled? I know I need to make a hook I just can't find it

frosty rampart
#

what are you trying to do

slim ferry
#

there isnt any pack hand size it just uses your normal hand size and draws cards the same way as anywhere else

desert ore
#

I want a joker that increases hand size only in booster packs

#

there's probably some jank way to do that with like increasing hand size only when round ends and then goes back to normal when exiting shop but that probably has issues

red flower
#

that's how i would do it honestly

#

you can also do it in the open booster and end booster contexts

slim ferry
#

theres an ending booster context?

red flower
#

or because you cant discard (usually) you can also draw more cards when the booster is opened

red flower
desert ore
#

what are those contexts? also like I still don't know where all the contexts are in source code it would be nice to just be able to look at all of them

red cradle
red flower
#

let me check what it was called

#

open_booster and ending_booster

#

idk if ending_booster is called when the booster is skipped so maybe check that one too

desert ore
#

alright cool thanks

charred widget
#

Hello friends! I'm having a bit of trouble with a joker i'm working on

#

Necrozma here is supposed to check if Solgaleo or Lunala are directly to its left or right at the end of the shop, destroy itself and the other Joker, and create Dusk Mane Necrozma or Dawn Wings Necrozma respectively. However, it does nothing.

#

Although I don't know what the code would be to destroy the other joker involved

slim ferry
#

you should put it in a context check first of all

#

ohhh

charred widget
#

you're probably right lol

slim ferry
#

yeah probably just. put the whole block inside the context check instead of checking for it 4 times

#

also you could probably turn the checks for the same key into a single check so its not as long

rigid solar
charred widget
rigid solar
#

you have an accessible list of all contexts in this file, it's pretty useful

slim ferry
#

paste the two checks into a single if statement and use the hit or statement so you have like (check 1) or (check 2)

charred widget
slim ferry
#

just do a little (if right and right.config.center.key == "legendar_lunala") or (right and right.config.center.key == "legendar_lunala") then ... end

#

also i dont have a mic so call wouldnt change much lol

charred widget
#

i see

rough frigate
#

what's weird is that it worked when it wasn't in that func = function() but it has to be in the G.E_MANAGER:add_event(Event({ so that the delay works

red flower
#

because editionless_jokers seems to be empty

slim ferry
#

oh i

charred widget
#

wait

slim ferry
#

move over the opening bracket

#

to after the if

#

i forgor

rough frigate
red flower
#

i know i wrote vremade lol

rough frigate
#

oh oops

red flower
#

but that checks if there are any in can_use

charred widget
slim ferry
#

whats it look like now

charred widget
slim ferry
#

i

#

fuck

#

get rid of the second if in the lines

rough frigate
#

yeah i dunno, i had something that was working before anyway i was just trying to simplify things a little
i'll just go back to what i WAS doing

charred widget
#

oh

round lion
#

how do i set generate_ui to the default one for jokers

red flower
charred widget
slim ferry
#

try getting rid of the context.ending_shop in the individual checks and put everything in if context.ending_shop then ... end

rigid solar
charred widget
rigid solar
#

also ever heard about pokermon lol

charred widget
slim ferry
idle plaza
red flower
rigid solar
#

oh ok

charred widget
#

wait

#

if i'm only putting the code inside the context.ending_shop check

#

it wouldn't check for the specific jokers next to it

slim ferry
#

well yeah you

charred widget
#

unless i am sorely mistaken

slim ferry
#

still need that inside the context check

rotund sable
#

guys what's wrong here 🥺

slim ferry
rotund sable
#

are you sure tho

#

it doesnt give a error!

slim ferry
#

are you sure gif

red flower
rotund sable
slim ferry
#

😭

median oriole
idle plaza
# rotund sable it doesnt give a error!

Else on the wrong IF statement does not cause errors. Instead, in this case, your else code will run in EVERY CONTEXT except for Joker Main in the G.jokers card area.

slim ferry
#

its a joke

#

lmao

rotund sable
slim ferry
#

lmao

charred widget
round lion
#

if you still need xchips you can try to manually set the chips value i think

slim ferry
#
if context.ending_shop then
  --all the code you have currently
end
rotund sable
#

yk what im changing my nick here

slim ferry
#

E 🔥

red flower
rigid solar
#

where can i find all the names of scoring variables you can put in the "return" of a card?
by searching among a bunch of different jokers I found these (i dunno if the versions with caps all work, i wrote them just in case), but idk if that's all of them or im missing some

#

i just want the names that influence chips and mult, idc about money or anything else

slim ferry
#

one moment

charred widget
slim ferry
charred widget
#

i don't think it would be right to put the code for both of them in the context.ending_shop check

rigid solar
#

yeah i made up a lot of these lol i just assumed stuff

rigid solar
slim ferry
#

you can do as much code as you want in any given context check

charred widget
#

ok but im probably gonna implement it wrong

slim ferry
#

learning experience

rigid solar
#

i will totally steal that thx

rotund sable
#

There's no stealing in this industry

red flower
#

i dont think people should ever copy from any of my mods and specially not vanillaremade

slim ferry
#

so true

#

a nuke perhaps

rigid solar
#

hides all the lines i took from vanillaremade

charred widget
slim ferry
#

whats the code look like

charred widget
slim ferry
#

thats

#

the same as before no

#

ohh

#

no like

charred widget
#

there's probably a really simple miscommunication that i'm misunderstanding with our conversation

rotund sable
#

At the start I believe I had vremade in my random seed for weeks

slim ferry
#

you should have EVERYTHING in the context.ending_shop check, not just the card creation

charred widget
#

but you said i'm not putting "if" statements inside "if" statements

#

what do you want me to do here

slim ferry
#

ohhh

#

i

#

think i misunderstood what you meant then

#

just put the context check around the whole code

charred widget
#

alright'

#

wait

slim ferry
#

lol

charred widget
slim ferry
#

what does the code look like now

charred widget
rigid solar
#

inside the function not outside 😭

slim ferry
#

also that

#

yeah

#

but also missing then

charred widget
#

is it not IN the function???

slim ferry
#

no you put it before calculate = function(bla bla bla)

#

when it should be after it

idle plaza
#
    if context.ending_shop
    calculate = function(self, card, context)

Means the if is outside the function. Just swap their positions. And add a then to the end of the if line.

charred widget
slim ferry
#

its

#

mostly right

#

missing an end though

#

put another end at the end right before the function end

idle plaza
#

It's not missing the end, the end is too early.

rigid solar
#

nah it's not too early

slim ferry
#

no

charred widget
#

????

slim ferry
#

thats just because of wierd formatting

rigid solar
#

it's an indent issue you're looking at, which the code doesnt care about

idle plaza
#

Ah, I see.

rigid solar
#

just add another end before that end and it should be good

#

unless there are other bugs

charred widget
#

what????

#

from what little i know about LUA i don't think that's right

#

but again i could be misunderstanding

slim ferry
#

youre just missing an end for the context.ending_shop check

#

so you gotta add an extra one before the end of the function

rigid solar
charred widget
#

you mean like this????????

rigid solar
#

yes

charred widget
#

WHAT????????????????

dapper sun
idle plaza
#
    calculate = function(self, card, context)
        if context.ending_shop then
            local my_pos
            for i = 1, #G.jokers.cards do --find own position
                if G.jokers.cards[i] == card then
                    my_pos = i
                    break
                end
            end
            local left = G.jokers.cards[my_pos-1] --left joker
            local right = G.jokers.cards[my_pos+1] --right joker
            if (left and left.config.center.key == "J_legendar_solgaleo") or (right and right.config.center.key == "J_legendar_solgaleo") then
                card.ability.extra.is_destroyed = true
                G.E_MANAGER:add_event(Event({
                    func = function()
                        SMODS.add_card {key = "j_legendar_duskmanenecrozma"}
                        SMODS.destroy_cards(card, true, true)
                        return true
                    end
                }))
            end
            if (left and left.config.center.key == "J_legendar_lunala") or (right and right.config.center.key == "legendar_lunala") then 
                card.ability.extra.is_destroyed = true
                G.E_MANAGER:add_event(Event({
                    func = function()
                        SMODS.add_card {key = "j_legendar_dawnwingsnecrozma"}
                        SMODS.destroy_cards(card, true, true)
                        return true
                    end
                }))
            end
    end,

^ With proper indentation, that's how your funciton looks. The difference between the two final end statements makes it clear where the missing end is.

dapper sun
#

any advice on this?

charred widget
#

THERE'S ALREADY AN END THERE ON THE SAME INDENT

slim ferry
#

yeah because

rigid solar
#

the code doesn't give a shit about indent lol

charred widget
#

LUA IS SO STUPID

rigid solar
#

it's just visual for us humans

slim ferry
#

format document gets confused when you have missing ends

dapper sun
#

indent makes code easier to read

rigid solar
#

you could write your whole code on a single line

slim ferry
#

🔥

rigid solar
#

only language i know that actually cares about indent is python

slim ferry
charred widget
idle plaza
#

99% of programming languages allow single-line coding.

charred widget
#

FUCK THIS STUPID PROGRAMMING LANGUAGE

#

IT WORKED

rigid solar
charred widget
#

IT DIDNT CRASH

rigid solar
#

you just didn't indent your code properly, so for you the code looks fucked but for lua it's fine

red cradle
charred widget
#

and you know what the best part about this is?

rigid solar
#

it still doesnt work as intended

charred widget
#

IT STILL HASN'T DONE ANYTHING

slim ferry
#

well what does the code look like now

rigid solar
#

you should use an IDE to code, so you can check code errors more easily

red cradle
charred widget
#

should be the last time as i sent it here

idle plaza
#

Just to be clear, what is the intended effect of this Joker?

rigid solar
#

if you have necrozma + solgaleo or lunala, it deletes both and creates dawn wings or dusk mane

#

if you have all 3, probably only works with the one on the left, ig

slim ferry
#

would help a lot with coding

charred widget
#

i'm pretty sure i have a LUA lsp

idle plaza
#

I see one issue: Your joker keys are wrong.

What's your mod prefix? It should be "j_modprefix_legendar_solgaleo", also all in lowercase. Sometimes your Js are uppercase.

slim ferry
#

modprefix is legendar i assume

idle plaza
#

Right whoops. Then the issue is just the J thing.

slim ferry
#

oh yeah uppercase js

charred widget
charred widget
red cradle
rigid solar
slim ferry
idle plaza
rigid solar
#

so i add ../ before so it leaves the .vscode file?

charred widget
#

OF COURSE IT WORKS NOW

slim ferry
#

assuming the steamodded folder is there

rigid solar
#

it's in the screenshot lol

charred widget
#

ok now that the fusion works how do i delete the other joker that isn't necrozma

rigid solar
#

smods.destroy_cards but instead of card you put left or right depending on the one you need

idle plaza
charred widget
rigid solar
#

well separate the code by left and right

slim ferry
#

guys do you like the joker

primal robin
#

text

#

skip

rotund sable
slim ferry
#

:3

rigid solar
#

instead of doing if it's on the right or on the left then you do if it's on the right then else if it's on the left then

dapper sun
#

how do i make my custom enhancement's config.extra values work with quantum enhancements

slim ferry
idle plaza
slim ferry
#

no?

#

because the code is inside the check for the type of joker

#

oh

#

wait nvm

#

uhhhhhhhhh

#

fuck

#

idk

charred widget
#

i hope you guys find this fun

dapper sun
#

why not just put the SMODS.destroy_cards inside an if statement

charred widget
#

because i would hate to be dragging you through so much grief for something I might be the only one playing for

idle plaza
# charred widget i hope you guys find this fun

Right now, your two if statements check for solgaleo, then lunala.

You can instead check if left and (left.config.center.key == "j_legendar_solgaleo" or left.config.center.key == "j_legendar_lunala") then then do the same for the right. The way, the first if statment can destroy left, and the second can destroy right

slim ferry
#

such as:
not knowing how to set a variable

charred widget
#

wait

robust marsh
#
        if context.after then
            if context.card and card:get_id() == G.GAME.current_round.tdec_beast_card.id then

I have no cluewhy this isnt working, the id is valid but anything below this if statement just isnt triggering

slim ferry
#

context.card doesnt exist in context.after

robust marsh
#

gg

slim ferry
#

WHY ARE YOU M

robust marsh
#

what would I use instead, since this is a blind effect

slim ferry
#

wtf

robust marsh
robust marsh
#

ight

red flower
#

why is everyone me

robust marsh
#

we stole your identity

red flower
#

damn

pseudo furnace
#

How do I get something to trigger on the card when the card is played in the calculation function? Return card = self doesn't seem right cuz it references the joker.

slim ferry
#

what do you mean.

red flower
#

message_card = card

#

im assuming

slim ferry
#

ohh

#

yeah message card changes message position

rigid solar
#
calculate = function(self, card, context)
        if context.ending_shop then
            local my_pos
            for i = 1, #G.jokers.cards do --find own position
                if G.jokers.cards[i] == card then
                    my_pos = i
                    break
                end
            end
            local left = G.jokers.cards[my_pos-1] --left joker
            local right = G.jokers.cards[my_pos+1] --right joker
            if left and (left.config.center.key == "J_legendar_solgaleo" or left.config.center.key == "J_legendar_lunala") then
                card.ability.extra.is_destroyed = true
                local key = (left.config.center.key == "J_legendar_solgaleo" and "j_legendar_duskmanenecrozma") or "j_legendar_dawnwingsnecrozma"
                G.E_MANAGER:add_event(Event({
                    func = function()
                        SMODS.add_card {key = key}
                        SMODS.destroy_cards(card, true, true)
                        SMODS.destroy_cards(left, true, true)
                        return true
                    end
                }))
            elseif right and (right.config.center.key == "J_legendar_solgaleo" or right.config.center.key == "J_legendar_lunala") then
                card.ability.extra.is_destroyed = true
                local key = (right.config.center.key == "J_legendar_solgaleo" and "j_legendar_duskmanenecrozma") or "j_legendar_dawnwingsnecrozma"
                G.E_MANAGER:add_event(Event({
                    func = function()
                        SMODS.add_card {key = key}
                        SMODS.destroy_cards(card, true, true)
                        SMODS.destroy_cards(right, true, true)
                        return true
                    end
                }))
            end
        end
    end```
#

esz can you try this

dapper sun
daring fern
charred widget
rigid solar
#

wait i forgot the additionnal destroy
edit i fixed it

dapper sun
daring fern
dapper sun
slim ferry
#

it checks which of the two it is

charred widget
rigid solar
#

yes

idle plaza
charred widget
#

alright

#

we ball ig

rigid solar
#

i removed the , at the last end, add it back

idle plaza
slim ferry
#

js you say?

#

like

#

javascript

dapper sun
# daring fern Code?

-# elle_prob is just so it has cryptid support without messing with cryptid-less behaviour

red cradle
#

How to check if card is not destroyed?

rigid solar
charred widget
idle plaza
rigid solar
#

did you put back the coma on the last end like i said

charred widget
#

oh

slim ferry
idle plaza
# rigid solar here

I only noticed the issue after I pointed that out later in this conversation

dapper sun
charred widget
#

i'm willing to bet that it's because of the extra end before the one with the comma

idle plaza
daring fern
slim ferry
#

the joke is that js stands for javascript

charred widget
#

I WAS RIGHT

slim ferry
#

funy

charred widget
#

IT WAS THE OTHER ONE

#

I DIDNT NEED THE OTHER END AFTER ALL

#

I ONLY NEEDED ONE

slim ferry
#

what,

rigid solar
#

i dunno my code as the right amount of end

dapper sun
charred widget
#

you can check!!!!!!

rigid solar
#

i think you kept one extra end on your side when copy pasting

charred widget
slim ferry
charred widget
#

WE HAD ESTABLISHED THIS PREVIOUSLY

slim ferry
#

yeah but here you were replacing the entire code you already had right

rigid solar
#

because you had an issue
i fixed it

slim ferry
#

you just got given working code

charred widget
rigid solar
#

lol

#

anyway is it working now

#

like, the joker effect

charred widget
#

hold on lemme see

rigid solar
#

if no it might be due to the upper case J on J_legendar_solgaleo and J_legendar_lunala, just make them lower case j instead

idle plaza
charred widget
#

it's not doing anything

idle plaza
#

Yeah

rigid solar
#

i should've fixed that before giving you the code but i just didnt notice

pseudo furnace
charred widget
#

oh ok

robust marsh
#

how does the psychic add the text which tells you that you can't play your hand?

charred widget
#

guys

#

it works

slim ferry
#

because i only know the latter

charred widget
#

congratulations!!!! now one of the core mechanics of the fucking mod works as intended

dapper sun
charred widget
#

and it's all thanks to Maelmc

rigid solar
#

nice

slim ferry
#

swag

rigid solar
#

i love that variable = (boolean and string) or string works, it's so useful

charred widget
#

actually there's one more thing i want to do with it

slim ferry
desert ore
slim ferry
#

😭

charred widget
#

how would i make it so if BOTH of them are next to necrozma, all three of them fuse to make Ultra Necrozma, skipping the Dusk Mane and Dawn Wings forms

daring fern
robust marsh
# red flower what do you need it for

My blind is supposed to pick out a random rank and you need to use that rank to "damage" the blind, effectively reducing its score requirement in real time. I want the text to just stay there and always tell you which rank is currently effective

dapper sun
red flower
rigid solar
robust marsh
charred widget
robust marsh
#

huh

#

i can't exactly find where they're displaying the text

red flower
#

Blind:alert_debuff

robust marsh
#

oh

slim ferry
#

btw guys

#

fun blind hand debuffing fact

#

theres an unused line in the base game's localization files for a confirmation to play your hand if it would be debuffed by the blind

#

which wouldve required you to press play twice

#

before it let you play the debuffed hand

red flower
#

another fun fact, the not allowed message is not localized in vanilla balatro

robust marsh
#

this is iffy

red flower