#💻・modding-dev

1 messages · Page 566 of 1

robust depot
#

well different error means progress

true jasper
robust depot
#

SMODS.Atlas{
key = 'Jokers',
path = 'Jokers.png',
px = 71,
py = 95
}
SMODS.current_mod.optional_features = function()
return {
retrigger_joker = true
}
end
SMODS.Joker {
key = 'Doofed',
loc_txt = {
name = 'Doofenshmirtz',
text = {
'Each played {C:purple}5{},',
'gives {X:red,C:white}X1.5{} Mult when scored.',
'{C:green}1 in 5{} chance to Retrigger{}',
'{s:0.6}"its weird that it happened twice..."'
} },
atlas = 'Jokers',
rarity = 3,
cost = 6,
blueprint_compat = true,
eternal_compat = true,
perishable_compat = true,
unlocked = true,
discovered = true,
pos = {x = 0, y = 0},
config = { extra = { Xmult = 1.5, repetitions = 1, odds = 5 } },
loc_vars = function(self,info_queue,card)
local numerator, denominator = SMODS.get_probability_vars(card, 1, card.ability.extra.odds, 'Doofed')
return {vars = {card.ability.extra.Xmult, numerator, denominator,}}
end,
calculate = function(self, card, context)
if context.individual and context.cardarea == G.play then
if context.other_card:get_id() == 5 then
return { Xmult = card.ability.extra.Xmult }
end
end
if context.mod_probability and not context.blueprint then
return { numerator = card.ability.extra.numerator * 2 }
end
if context.retrigger_joker_check and context.other_card == card and
SMODS.pseudorandom_probability(card, 'Doofed', 1, card.ability.extra.odds) then
return {
message = 'Again!',
repetitions = card.ability.extra.repetitions,
card = context.other_card }
end
}

true jasper
robust depot
true jasper
faint yacht
#

...that's for VSCode - and that's Notepad++, you silly.

true jasper
faint yacht
#

If they will, that'll be that.

#

-# I'll stick to N++.

robust depot
#

i already had vs

#

somehow formating in VS fixed the OG bug, but now we got a new one!

#

it was as the hand was played, it was fine without a 5 in it but when i played a 5 it went kaput

distant junco
#

how can i use has_enhancement() to check for any enhancement?

faint yacht
#
if next(SMODS.get_enhancements(card)) then ... end

could work?

daring fern
#

manic rune
#

did i do everything right here

#

asking since G.P_CENTER_POOLS.BSRRelic is empty rn

#

oh the atlas is fucked up

hidden mirage
#

is there a context for when money is earned?

cursive gazelle
#

Yes i think it came with the latest smods version

hidden mirage
#

do you know when that came out and if the docs have been updated?

daring fern
stiff locust
#

where do i find info about pools
the last time i asked i ended up procrastinating so hard i never actually used pools

violet void
#

Hello, is there a simple way I can give different cards different overlay sprites without using UndiscoveredSprite?

#

I managed with the basic sprite but no luck the overlay

hidden mirage
daring fern
daring fern
hidden mirage
hidden mirage
#

is it possible to award money like when discarding but in other contexts

slim ferry
#

why wouldnt it be

faint yacht
#

return { dollars = number }

#

Or ease_dollars(number).

hidden mirage
slim ferry
#

what the fuck is intellisense

hidden mirage
#

vs code autocomplete or some shit i dont really know

#

it says dollars is undefined so thats fun

hidden mirage
slim ferry
hidden mirage
#

yeah

#
rules = {
        modifiers = {dollars = 20}
    }
``` why i start with $4
faint yacht
#

<@&1133519078540185692>

slim ferry
#

why do i get this crash when viewing my deck? card definitely does exist

manic rune
slim ferry
#

well yeah the crash says that

manic rune
#

add a nil check there then

slim ferry
#

but guhh

#

sure

#

ohh

#

im supposed to be using self and not card

hidden mirage
#

is blueprint_compat just for ui

slim ferry
#

yeah

high verge
#

How do we do an error check for nil to skip something?

    {
        path = 'helluvasleeves.png', 
    },
    true
)
SMODS.Atlases['casl_sleeve_atlas'].mod = SMODS.current_mod``` I have this bit of code to put card sleeves but if a user doesn't have the card sleeves mod it gives a nil error.
slim ferry
#

why are you using take ownership on atlases instead of just using malverk anyway..
anyway the check would be if CardSleeves then since that checks for the global table that cardsleeves creates

high verge
#

Oh funny you guys are already discussing nil checks xD

#
    {
        path = 'helluvasleeves.png', 
    },
    true
)
if casl_sleeve_atlas == nil then
else
SMODS.Atlases['casl_sleeve_atlas'].mod = SMODS.current_mod
end``` I changed it to this and I'm not sure if it's right but the error left so, I think it's working?
#

Nope

slim ferry
#

interesting way of doing that check

#

just do if casl_sleeve_atlas

high verge
#

It's wrong

#

xD

#

I'll try that

slim ferry
#

okay what am i even doing wrong here, im trying to make a sleeve but it always does the default effect regardless of what deck i have. i did the exact same check for another sleeve but it works there

high verge
#
    {
        path = 'helluvasleeves.png', 
    },
    true
)
if casl_sleeve_atlas then

else
SMODS.Atlases['casl_sleeve_atlas'].mod = SMODS.current_mod
end``` This still doesn't work right OTL
slim ferry
#

dont do the else

#

currently youre just effectively doing a wierd way of if not casl_sleeve_atlas

high verge
#

Without the else instead it crashes if the mod is present

daring fern
#

high verge
#

Hi Something

faint leaf
#

this may sound like the stupidest thing ever but how do i put in the image for a blind 😭

#

balatro crashes every time i try to do the same thing as for the jokers with the atlas and such

high verge
#

You'll want to use Malverk

faint leaf
#

theres really no way to do it using smods .. ?

high verge
#

Malverk uses smods

faint leaf
#

yeah well like base smods is what i meant

high verge
#

It also allows for texture swapping to be more modular so you can mix and match

faint leaf
#

hmme

#

oh wait i think i found whats up

#

okay lol i was using atlas instead of atlas_table

slim ferry
#

why does this just straight up close my game? lovely log doesnt even have a crash message. previously i just had v instead of table[k] but those should just be the same value right??

#

also when i used v it just didnt do anything at all

daring fern
slim ferry
#

i see

#

rightttt

high verge
waxen shard
#

all i did was add ruina decks card sleeves and 3 other mods now i cant figure out whats causing the discoverymanager error

#

i wanted to use whatver mod added sleeves and stuff

slim ferry
#

the fuck

#

then how N do this

#

if not changing the ret

red flower
#

i did just change the ret yes

slim ferry
#

wtf

#

it does nothing for me

#

at all

red flower
#

🤷

slim ferry
#

ok

modest cradle
#

How hard is it to make a balatro mod as a beginner

red flower
#

i did only check for other_context.individual it might not work in all contexts?

slim ferry
#

idk the joker i tested with used context.individual

slim ferry
viral ember
#

Any way to have my "Overlays" in a seperate category?

slim ferry
modest cradle
viral ember
red flower
#

yeah this works

slim ferry
slim ferry
#

oh wait

#

nvm

#

im oupid

slim ferry
waxen shard
#

ok so the issue was cardsleeves but how else am i gonna use card sleeves if the mod gives me a error

vocal helm
#

Is there any way to call G.FUNCS.reroll_boss() without losing money?

slim ferry
#

okay somehow i managed to make every instance of the colour red completely white but uhhh who cares

#

oh

#

wait

#

im probably changing the colours when they appear i just realized

viral ember
#

RAHHH IT DID SOMETHING

#

I LOVE CODING

slim ferry
#

type shit

viral ember
#

It's not working.
I hate coding.

primal robin
#

Back

slim ferry
#

Back

waxen shard
#

cryptid i beg

#

i just enabled you

#

like i understand lua, but not this much

#

this is line 44

#

what do you want me to do

red flower
#

what's the function

waxen shard
#

i just enabled cryptid and it gave me the ret error

red flower
#

i think this might be a wrong cryptid install

waxen shard
#

0.5.12a

red flower
#

it's not able to load a file so either the files are missing or there's an extra file there

waxen shard
#

fuck

#

is that the latest or not

red flower
#

dunno i dont play cryptid

waxen shard
#

ok it is its from last week

#

which wants me to use steammodded 0827c which i am

red flower
#

yeah like i said there's an extra file

waxen shard
#

yeah mb i misunderstood, i dont know what the right install would be or the extra file, im not knowledgeable at all in coding stuff like this

red flower
#

remove the .lovelyignore from the items folder

#

idk if they accidentally included it in cryptid

waxen shard
#

that worked for some reason

#

i think they just forgot by accident

strong terrace
#

is there a .lua file for vanilla jokers?

slim ferry
#

also vanillaremade is like the best thing ever made

daring fern
#

thorn basin
#

why when I try instance my custom boss blind this error appears?

daring fern
#

Also card.base.value is the key of the rank, not a table.

thorn basin
# daring fern Also `card.base.value` is the key of the rank, not a table.

what I wanna do is that this boss blind, debuffs one random rank of the full deck.
after you play a hand the blind changes what rank should it debuff.
What should I do in order to get the avaiable rank in the full deck to pass it to the blind to debuff it?
I tried by doing card.base.rank but it does nothing.

thorn basin
#

so what should I do is define a table of the random rank chosen in order to debuff all cards of said rank?

daring fern
cursive gazelle
#

how would i go to fetch info from a wiki page

cyan lagoon
#

heya, so i changed the chance value to 10 but it still shows 15. anyone knows how i can fix that?

#

(yes, i did change lucky cards to use a config value)

cyan lagoon
#

and here's the function

daring fern
cyan lagoon
#

sooooo...

daring fern
cyan lagoon
#

how do i go about changing the loc_var now?

slim ferry
#

patch the smods take_ownership instead i would imagine

cyan lagoon
#

uhm, yea- how do i do that?

#

all the lovely patches i did affect the game, not the mods

daring fern
cyan lagoon
#

alright

#

is it cfg.extra or _c.extra?

#

cause cfg crashes

#

right, it's card.ability.

#

duh

cyan lagoon
#

thank you

robust marsh
#

how would I make a sound effect just keep on looping until the condition isn't true?

cyan lagoon
#

is that sound a part of a joker?

robust marsh
#

i started saying consumeable instead of consumable, thank you thunk i love you

cyan lagoon
#

ok i see that consumables have an 'update' property. you can may be use that

#

like such

robust marsh
#

alrighty

#

thank you : )

cyan lagoon
#

you are welcome

strong terrace
#

this crash log shows up after trying to open the game with my mod (the joker mentioned there is made by me)

thorn basin
cyan lagoon
#

second, your loc_vars use center instead of card

#

third, that's how you do loc_txt (at least in my case)

slim ferry
cyan lagoon
#

also, instead of check_for_unlock you can just do unlocked = true

#

which you did

cyan lagoon
strong terrace
cyan lagoon
strong terrace
cyan lagoon
#

you only need 1

manic rune
#

or yesterday

cyan lagoon
#

alright you know what? lemme fix that

manic rune
#

honestly the primary issue rn is that you do need to know how to work with lua first 😭

#

i would highly recommend starting with the basics before jumping straight into modding

strong terrace
manic rune
#

yeah no you definitely removed it wrong again

strong terrace
robust marsh
# cyan lagoon like such

trying it out and it seems to just keep spamming because I don't have a proper check for it. I'm wondering if there's something that would let you check when the sound stops playing but that's rather obscure

#

built in sound effect looping one day

lofty elm
#

sorry to jump in, does anyone happen to know if there's a context for the time when gold cards give their money? Honestly I'm just trying to do what is essentially a gold quantum enhancement but I've been encountering weird issues with death interacting with quantum enhancements that seem to be encountered by other people as well

#

I've got this right now in my joker's calculate which doesn't work.
if context.individual and context.cardarea == G.hand and context.end_of_round and SMODS.get_enhancements(context.other_card)["m_steel"] == true then
if not context.other_card.debuff then
return {
dollars = card.ability.extra.dollars,
card = context.other_card
}
end
end
end

robust marsh
cyan lagoon
lofty elm
#

oh sorry, this is for steel cards to give the money. I'm just redoing alloy from extra credit bc it's buggy and the devs say its bc of quantum enhancements

robust marsh
#

ah

strong terrace
keen totem
#

What did smods.sticker do to you

#

I see you typing

robust marsh
#

thank u

cyan lagoon
#

np

lofty elm
#

sorry, I'm sure this is in the wiki somehwere but I cant find it for the life of me

#

its not particularly easy to navigate

cyan lagoon
#

you gonna need to use context.individual and context.end_of_round with context.cardarea == G.hand

#

and see if the card scoring is a gold card

lofty elm
#

sorry I might be misunderstanding, is this different from that?
if context.individual and context.cardarea == G.hand and context.end_of_round and SMODS.get_enhancements(context.other_card)["m_steel"] == true then
this is what I have now but it doesnt work :(

cyan lagoon
#

try SMODS.has_enhancement(context.other_card, "m_gold")

#

also, if you need gold cards why are you looking for steel?

lofty elm
#

Sorry, I'm trying to make steel cards give money like they're gold, without just doing a quantum enhancement

cyan lagoon
#

it's a joker right?

lofty elm
#

Alloy from extra credit is buggy and the devs say it's bc of quantum enhancements so I thought I'd just do this

#

yea

cyan lagoon
#

then you can have a joker give money if a steel card is scored

lofty elm
#

True but then it would give every hand, not just at the end

#

and tbh I was hoping it would be able to happen at the same time and in order with the gold cards

slim ferry
lofty elm
#

will do

#

didnt work unfortunately

robust marsh
slim ferry
#

you were supposed to replace those values

cyan lagoon
slim ferry
#

i imagine

robust marsh
#

i know

lofty elm
cyan lagoon
#

yeah

slim ferry
cyan lagoon
lofty elm
#

i can double check but I belive it works if I don't include the end of round check

cyan lagoon
lofty elm
#

wdym, sorry

robust marsh
#

I never used timer at all, i'll try to figure it out

#

alright

#

i got it

gilded goblet
#

sorry to be asking about this again but what would that roughly look like?

SMODS.Sticker:take_ownership("eternal", {
  should_apply = function(self, card, center, area, bypass_roll) 
    -- ?
  end
})
lofty elm
#

oh wait maybe you're right, I removed the end of round check and its not working

#

i swear it was earlier

cyan lagoon
# lofty elm wdym, sorry

i'm not confirming nor denying that money adding is the problem. i'm just saying that's how i would do that

lofty elm
#

oh got it

#

i was just copying the way the extra credit mod did it

#

ill try that though

errant arrow
#

im lost on this one, is the code

local new_card = create_card('Joker', G.jokers, nil, nil, nil, nil, 'TBC_middlelittlesibling')
new_card:add_to_deck()
G.jokers:emplace(new_card)

not correct for adding a joker to the joker area?

#

TBC_middlelittlesibling is the joker im trying to add to the joker area

slim ferry
#

youre missing the j_ in the key

errant arrow
#

ah

slim ferry
#

also you should probably just use SMODS.add_card if youre adding the card immediately anyway

errant arrow
#

j_TBC_middlelittlesibling ?

slim ferry
#

yea

cyan lagoon
errant arrow
#

i tried using add_card, couldn't understand it

lofty elm
#

Because I don't trust myself that I definately did it right heres what I have lol

cyan lagoon
lofty elm
#

yeah, steel cards just do normal steel things

cyan lagoon
lofty elm
#

oh I missed that

lofty elm
#

didnt work though :(

cyan lagoon
#

alright give me a sec

lofty elm
#

thanks for helping by the way, I really appreciate it

wide chasm
#

bump

cyan lagoon
frosty rampart
wide chasm
#

yk like ancient joker

#

it changes the suit that scores

frosty rampart
#

check vanillaremade

slim ferry
#

have you tried looking at vanillaremade

wide chasm
#

yes

#

i have

#

and it kinda works but then doesnt

slim ferry
#

how so

wide chasm
#

like if i just copy and paste yeah sure it works

#

but if change like anything like the name of the card or smth like that

#

it crashes

slim ferry
#

if you change the name of the variable you gotta change it everywhere

wide chasm
#

yeah i tried doing that

slim ferry
#

what does the code look like?

wide chasm
#

well i deleted it cuz it didnt work in any way i tried

#

thats why i was asking how to do it

lofty elm
# cyan lagoon

oh shoot I think I'm stupid, gimme one second but I think I might've been wasting your time I'm sorry

cyan lagoon
slim ferry
wide chasm
#

i can kinda remake it

#

give me one second

round lion
#

can i genuinely get away with this and not be flintlocked by basic lua.

lofty elm
manic rune
#

whats cfp and current_hand_mult

lofty elm
#

thanks for helping! I've got it working now

cyan lagoon
#

np

robust depot
#

How can I make it so the description of a joker updates with the Xmult / odds

round lion
#

cfp is the cutoff point, aka. a constant of 1 which basically just prevents the variable from going under itself.

slim ferry
round lion
#

what im saying is can i get away with [math function] and [math function] ~= result without getting fried

slim ferry
#

yeah that looks like a correct if statement there

robust depot
#

i think so

wide chasm
# slim ferry well seeing how you were trying to do it before would probably help
SMODS.Joker {
    key = "galaxy",
    blueprint_compat = true,
    rarity = 3,
    cost = 8,
    pos = { x = 1, y = 4 },
    config = { extra = { xmult = 1.5 } },
    loc_vars = function(self, info_queue, card) nebula_galaxy
        local suit = (G.GAME.current_round.nebula_galaxy_card or {}).suit or 'Spades'
        return { vars = { card.ability.extra.xmult, localize(suit, 'suits_singular'), colours = { G.C.SUITS[suit] } } }
    end,
    calculate = function(self, card, context)
        if context.individual and context.cardarea == G.play and context.other_card:is_suit(G.GAME.current_round.nebula_galaxy_card.suit) then
            return {
                xmult = card.ability.extra.xmult
            }
        end
    end
}

--- This changes vremade_ancient_card every round so every instance of Ancient Joker shares the same card.
--- You could replace this with a context.end_of_round reset instead if you want the variables to be local.
--- See SMODS.current_mod.reset_game_globals at the bottom of this file for when this function is called.
local function reset_nebula_galaxy_card()
    G.GAME.current_round.nebula_galaxy_card = G.GAME.current_round.nebula_galaxy_card or { suit = 'Spades' }
    local galaxy_suits = {}
    for k, v in ipairs({ 'Spades', 'Hearts', 'Clubs', 'Diamonds' }) do
        if v ~= G.GAME.current_round.nebula_galaxy_card.suit then galaxy_suits[#galaxy_suits + 1] = v end
    end
    local galaxy_card = pseudorandom_element(galaxy_suits, 'nebula_galaxy' .. G.GAME.round_resets.ante)
    G.GAME.current_round.nebula_galaxy_card.suit = galaxy_card
end


function SMODS.current_mod.reset_game_globals(run_start) 
    reset_nebula_galaxy_card() -- See Ancient Joker
end

``` i believe it was like this? basically just renamed all the ``vremade_ancient``/``ancient`` with ``nebula_galaxy``/``galaxy``
errant arrow
#

can someone confirm or deny this for me?
If i were to use the code

 if context.final_scoreing_step and context.cardarea == G.play then

would the effect after this be played after everything else, but before Mult and Chips combine?

slim ferry
#

yeah

#

its the same context that plasma deck uses

errant arrow
#

noice

modern kindle
#

Isn't it final_scoring_step
Bit of a-

#

Yea

errant arrow
#

im making a joker that does both Xmult and ^mult, but i want the power to happen last since it's... strong.

robust marsh
#

yeah i have no clue how to set up the timer, it just plays the sound whenever i play a card and that's it satono_diamond_freaky

faint yacht
#
{
  emult = ...
  extra = {
    xmult = ...
  }
}
wide chasm
slim ferry
#

well i cant really tell why it crashes without seeing a crash log because thats what tells you why it crashed

wide chasm
#

fair

#

line 399 being local suit = (G.GAME.current_round.nebula_galaxy_card or {}).suit or 'Spades'

slim ferry
#

what is that doing there

#

that definitely shouldnt be there

wide chasm
#

omfg how did i not see that

manic rune
#

nebula galaxy

wide chasm
#

i put that there so i could ctrl c

slim ferry
#

nebula galaxy

wide chasm
#

lmaoo

tender pond
#

hi gusy

robust marsh
#

will my joker work

wide chasm
#

ofc

tender pond
#

can anyone help me

#

i want to balance something

manic rune
#

insert dont ask to ask website stuff

slim ferry
manic rune
#

but yeah what is it

robust marsh
tender pond
#

i made a seal and it gives +6$ and retriggers card, I want to balance it

#

it's too good

manic rune
#

yeah no shit its red seal + gold seal and still better somehow

slim ferry
#

i mean you cant really balance 1 retrigger and without the money its just a red seal

manic rune
#

😭

slim ferry
#

and with the money its just better red seal

gilded goblet
#

it's like a double gold seal red seal

manic rune
#

yeah

gilded goblet
#

+$1 retrigger

#

idfk

errant arrow
#

make it expire after x rounds

gilded goblet
#

that'd be cool

manic rune
#

debuff the card after x rounds would be cool yeah

errant arrow
#

i was thinking just remove the seal from the card

manic rune
#

still feels a bit too strong imo

tender pond
#

I also made negative planets

manic rune
#

i feel like straight up debuffing the card would balance it out better

tender pond
#

so they remove planet levels

errant arrow
#

oooh

tender pond
#

like you can get to lvl 0 hands

robust marsh
#

make it eat all of your money after each blind that would balance it just fine gemmytroll

manic rune
#

you get a really strong card for both scoring and econ, but you will have a dead card after a few rounds

robust marsh
tender pond
#

oh

gilded goblet
round lion
#

every time i try to code one of these cards i feel like it's gonna instantly crash the game

manic rune
tender pond
errant arrow
tender pond
#

i will do it and I will make other seals too

errant arrow
#

burnt joker kinda negates the downside if you can get it to retrigger...

manic rune
#

how do u retrigger a joker with a seal lmao

errant arrow
#

🤷

manic rune
#

-# unless u have seals on everything i guess

robust marsh
reef ocean
#

hi! im super new to this so im sorry if its just a silly mistake but im trying to make a tarot card that changes cards to a modded enhancement i have. ive gotten it to work but for some reason when it changes enhancements it like flashes another card or flashes transparent first before showing the new enhanced card? does anyone know why that may be? again so sorry if this is a question that is obvious lol

wide chasm
#

how could i make it sync up with the vanilla ancient joker tho

round lion
#

does anyone have a joker image template i have to do something

slim ferry
wide chasm
#

cool.. and what does that mean..

slim ferry
#

use the same variable as the one that ancient joker uses in vanilla

wide chasm
#

what variable where

slim ferry
#

idfk i dont know what variable the vanilla ancient suit is from memory

#

but it is what you have to use

wide chasm
#

what in my code do i replace with the vanilla ancient joker thing tho

#

like the last part where it changes the suit?

slim ferry
#

the suit in the joker

#

you wont need the entire suit changing thing if copying the ancient suit since it already changes

wide chasm
#

ok so the resetting thing is gone, the fuck do i do now

reef ocean
# wide chasm like this?

do you possibly have a higher res image for booster packs? ive been having trouble making them because i cant find a high resolution template or image!

slim ferry
#

and use that where it is

slim ferry
#

its prolly somewhere in round resets

reef ocean
cyan lagoon
#

did i hook this correctly?

slim ferry
#

it looks correct

#

but what the fuck is marts_in_play

cyan lagoon
#

my custom G.GAME value

slim ferry
#

well yeah but

#

what does it track

cyan lagoon
#

it's how much of a certain joker you have

#

it's weird but it works

reef ocean
cyan lagoon
wide chasm
#
    if not saveTable then
        G.GAME.current_round.discards_left = G.GAME.round_resets.discards
        G.GAME.current_round.hands_left = G.GAME.round_resets.hands
        self.deck:shuffle()
        self.deck:hard_set_T()
        reset_idol_card()
        reset_mail_rank()
        self.GAME.current_round.ancient_card.suit = nil
        reset_ancient_card()
        reset_castle_card()
    end
#

self.GAME.current_round.ancient_card.suit

slim ferry
#

i assume self is G in this case

wide chasm
#

yeah

#

ok so thats easy

#
local suit = (G.GAME.current_round.ancient_card.suit or {}).suit or 'Spades'
slim ferry
#

yea

wide chasm
#

makes sense to me

#

uhhhh

#

oh i didnt change it on the other lines

#

it is not synced.

slim ferry
#

show code?

wide chasm
#

nevermind

#

i think its just the localization

#

yup

frosty rampart
wide chasm
#

makes sense yeah

#

mb

cyan dust
#

also im sure {}.suit will not cause any 'trying to access nil value' errors in the future

#

🤔

slim ferry
#

{}.suit = nil

#

so the or "Spades" kicks in

reef ocean
#

does anyone know why the cursed cards lay on smooth and the other ones dont??? im so confused as to why its flashing at me before applying lmao

wide chasm
#

alr thats working perfectly thanks yall 🙏

cyan dust
#

ok yeah lua doesnt require value to exist when doing dot access

#

so (... or {}).suit or "Spades" is valid

slim ferry
#

issues only arise when you index that value further

robust marsh
#
local timer1, timer2 = 0, 0
local old_update = Game.update

function Game:update(card, dt)
    old_update(self, card, dt)

    dt = dt or 1/60

    if G.GAME.FervencyCounter then
        if G.GAME.FervencyCounter <= 50 and G.GAME.FervencyCounter > 30 then
            timer1 = timer1 + dt
            if timer1 >= 1 then
                play_sound('tdec_hbeat1')
                timer1 = 0
            end
        end

        if G.GAME.FervencyCounter <= 30 and G.GAME.FervencyCounter > 15 then
            timer2 = timer2 + dt
            if timer2 >= 0.4 then
                play_sound('tdec_hbeat2')
                timer2 = 0
            end
        end
    end
end

alt tabbing speeds up the rate at which the sound effects are repeated, any way to get around this or is it just not fixable? Besides that this works just fine

sturdy compass
#

My guess is the dt = dt or 1/60 is defaulting to 1/60 when alt tabbed

#

No real reason to have a backup for dt anyways

robust marsh
sturdy compass
#

dt shouldn't ever be a nil value guh

robust marsh
#

not sure why it is droidcry

sturdy compass
#

I suppose instead of doing a fallback you could just wrap everything in an if dt then

robust marsh
#

alright

#

that should work

#

or not

#

now it's just not firing off

#

strange

sturdy compass
#

interesting

robust marsh
#

nvm i think i know what's going on

sturdy compass
#

What's the deal then lol

#

I'm genuinely curious

frosty rampart
sturdy compass
#

Yeah but 0 is not nil

#

You can still perform arithmatic with 0 Emoti_Shrug

robust marsh
#

nvm i thought i was calling old_update too early

sturdy compass
#

Nah your old_update is in the right spot

robust marsh
#

can't really figure this one out

#

strange

sturdy compass
#

Can I see the crashlog with the nil value error?

robust marsh
#

oh i

#

i fixed it

#

i'm stupid

#
function Game:update(card, dt)
    old_update(self, card, dt)

I forgot to ditch card from these

#

the more you know

vocal helm
#

Using context.destroy_card, how would I destroy all cards in my full hand aside from the first?

#
if context.destroy_card and context.cardarea == G.play and not context.blueprint then
            local should_remove = false
            for i, hand_card in ipairs(context.full_hand) do
                if i > 1 then
                    should_remove = true
                end
            end
            if should_remove then
                return { remove = true }
            end
        end

this currently destroys all of them

frosty rampart
#

context.destroy_card is like context.individual, it runs once on every card. don't loop through the full hand, just check if context.destroy_card ~= context.full_hand[1]

vocal helm
#

thanks!

#

and duly noted!

winter flower
#

how do i make it so that some jokers spawn with a config toggle
because im just getting hit with this now

final jewel
#

is there a thing to make a card undebuffable ?

slim ferry
#

return prevent_debuff = true in context.debuff_card

final jewel
#

oh ok thx Eris

#

Is it gonna work for an enhancement

slim ferry
#

you should check if context.debuff_card == card

#

is what i assume you want

#

also individual and debuff_card are never called at the same time

#

or during context.before

#

debuff_card is only calculated when calculating card debuffs

final jewel
#

like that ?

frosty rampart
#

individual and debuff_card are never called at the same time

final jewel
#

yeah but its an enhancement that prevent the debuff for him and card in the same card area

frosty rampart
#

the point is that you don't need context.individual at all. debuff_card is called on every card like individual is

#

debuff_card is called on a card whenever something attempts to debuff that card

final jewel
#

so if my card is held in hand, every card held in hand will be prevent from debuff?

slim ferry
#

you should do if context.cardarea == card.area

#

i think

#

and context.cardarea ~= G.deck

final jewel
#

yeah but is the deck a card area

#

oh

#

is there other card area

slim ferry
#

G.discard i guess but thats an optional feature

frosty rampart
#

if you only want to have it work in held hand, then it should be if context.cardarea == G.hand and context.cardarea == card.area. having both G.play and G.hand let through means that it'll have a similar effect if your card is in played hand

slim ferry
#

im pretty sure its intended to allow both

#

also

#

debuffs might not recalculate for this card

#

so you would probably need to do recalc_debuff stuff

#

or whatever the method is called

next timber
#

is there a way to make a joker pinned to the right side of the joker area?

final jewel
slim ferry
#

but ive seen mods make cards not draggable

#

so you could also do stuff with that maybe]

final jewel
#

my code look like this and it doesnt seems to work

#

btw thats the decription

slim ferry
#

try looping over G.playing_card (i think that contains every playing card) and calling :recalc_debuff or whatever its called on every card

#

in some context, probably like hand_drawn

next timber
slim ferry
#

no do it in a different context

#

this is infinite loop

#

once debuffs get calculated

#

hand_drawn is probably a good timing for it

final jewel
#

yeah

#

is it context.hand_drawn

slim ferry
#

yea

final jewel
#

kk

#

so like that

final jewel
slim ferry
#

recalculate debuffs > context.debuff_card gets calculated > recalculate debuffs > context.debuff_card gets calculated > ...

final jewel
#

oh yeah

slim ferry
# final jewel so like that

also this only works on the card that has the enhancement currently because of the context.debuff_card == card check

final jewel
#

so it's like context.debuff card == other_card

#

or it doesn't work

slim ferry
#

no just remove that check

final jewel
slim ferry
#

yeah i think this would work

final jewel
#

lets try

slim ferry
#

though probably put the for loop inside the event

#

so that you arent calling 52+ events with a 0.15 second delay each

final jewel
#

fact

#

but am I supposed to use an event or it isnt necessary

slim ferry
#

i dont think you need to

#

but itll probably look nicer

#

you can probably remove the trigger and delay though

final jewel
#

ok time to test it out

#

I got this crash

slim ferry
#

uhhh

#

hold on

#

you should also probably set up your balatro/smods lsp lmao

#

oh its

#

SMODS.recalc_debuff(<card>)

#

that explains

final jewel
#

oh

final jewel
slim ferry
#

that you like

#

that vscode actually knows the balatro/smods functions exist

modern kindle
#

i still havent done that lmao

slim ferry
#

also if you dont have a .vscode folder yet you probably want to add that to gitignore

final jewel
#

is there someone that already does that so I can copy it and just modify it so it work in my mod

slim ferry
#

i mean you can just copy the thing in the link

#

and then replace the paths with the absolute or relative path to your smods and lovely dump

#

and also if you dont have it yet

#

make a .gitignore file and then put .vscode in it

#

like in text

#

so it doesnt get pushed to github or tracked

robust marsh
#
        if G.GAME.FervencyCounter <= 0 then
            G.E_MANAGER:add_event(Event({
            blockable = false,
            trigger = 'after',
            func = function()
                G.STATE = G.STATES.GAME_OVER
                return true
            end
        }))
        end

I'm trying to make it so you just instantly lose once the counter on my card reaches 0. Normally it works fine but when the counter gets reduced at the end of the round and hits 0 the music will slow down but from there you won't be shown the loss screen and will be allowed to go on with the run. I tried slotting it into an event but I seem to be getting the same result. This is definitely a timing issue which idk how to fix

slim ferry
#

wh

#

i see

#

i didnt know you could just. ignore entire file types

final jewel
#

idk i just copied a .gitignored idk from where

slim ferry
#

you can probably just

#

delete everything except for the .vscode

#

.gitignore is just a list of file/folder names to ignore

lament agate
#

where do i put no_collection in Jokers code

slim ferry
#

fym where

#

it doesnt matter just put it anywhere

final jewel
#

I was just knowing that I alway need a gitignore in every project or it will fuckup the repo

#

btw the path for the smods is from where do I need to put like %appdata%/Balatro/...

slim ferry
#

you can do relative to the vscode settings file or just the absolute path (as in from the drive)

#

i just use absolute path because i cant be bothered to figure out the relative path

final jewel
#

ig its like that than

slim ferry
#

you gotta start from like

#

your drive if you do it like that

final jewel
#

oh

slim ferry
#

so like C:/Users/<user>/%appdata%/balatro...

final jewel
#

oh

#

long one

slim ferry
#

thats why i recommended gitignoring it lmao

final jewel
#

yeah

slim ferry
#

because i have like my actual name in my users thing

final jewel
#

oh

#

mine is mryam

#

lol

#

my first five letter

#

it with \ or /

slim ferry
#

/ because other slash makes json file kill you in real life

final jewel
#

oh

slim ferry
#

i love file types that go fucking insane over the slightest minor things

final jewel
#

but since its the day to prevent suicide its ok ig

#

in my region ig

slim ferry
#

also gotta

#

FUCK

slim ferry
final jewel
#

wait

#

Wasnt knowing that

#

thats disgusting

slim ferry
#

json is actually so fucking stupid 😭

#

its like the only language ever that doesnt support comments

final jewel
#

you can do a librairy in python i think but yeah fucking stupid

robust marsh
final jewel
#

oh for my Joker it doesnt do actually what I want but I kinda like the effect

slim ferry
#

what is it doing now

#

and what was it supposed to do

final jewel
#

now thats the effect

final jewel
slim ferry
#

ohhh

#

actually i think i know

#

why its not doing the thing

#

because debuffs dont get updated when you play it so the cards in hand just stay not debuffed

final jewel
#

is there an easy way to fix it or ...

slim ferry
#

just recalculate the debuffs in context.before as well

#

i think that would work

#

though

#

that might like make the played hand wierd

#

because like the poker hand has already been calculated by then

#

actually no because the cards in hand will be undebuffed anyway nvm

frosty rampart
#

why is it doing this in the collection

final jewel
#

is that going to work

slim ferry
#

i think

gilded goblet
#

im assuming you mean "Slots Used"?

slim ferry
#

probably remove the context.cardarea == G.play thpo

final jewel
#

yeah but if its stay in hand its the card held in hand that are undebuff

slim ferry
#

i dont think it matters tbh

#

the cardarea for the recalc

frosty rampart
# gilded goblet im assuming you mean "Slots Used"?

yea
the "Slots Used" is the generic infobox that pops up on any card that takes up extra slots (i'm using the new extra_slots_used feature from smods 0827), i want it to read "Gigantic" and "Takes up an extra slot" like other stickers do

first screenshot is in descriptions -> Other, second is misc -> labels

#

i think the best way to go about this is just to not apply the extra_slots_used adjustment if it's being applied to a fake card

#

but idk how to detect if a card is a fake card during the apply function

gilded goblet
#

yeah i thought "fake" (base) cards would have like only a few parameters but they have a lot

#

idk what i would do either

distant junco
#

yo chat, cant remember if i asked already but does anyone know how to check for "any" enhancement? i tried has_enhnacement() by itself but it applies to every card

slim ferry
#

if <card>.config.center.key ~= "c_base"

distant junco
#

ahh okay ill try that

#

works great, thanks!

gilded goblet
frosty rampart
#

yea lol i ran into that with the patches i'm working on for starspace (i wanted them to only apply if the card doesn't have the counterpart sticker, e.g. the generous patch can't be on a card at the same time as rental)

gilded goblet
#

what im doing right now is dynamically changing values with an Event in apply

#

it's so fucking ugly and awful

final jewel
#

I test it out in some way and it doesnt work

frosty rampart
#

even stone cards have something in card.children.front

gilded goblet
#

thats sick

slim ferry
violet void
#

does anyone know of a mod that uses SMODS.Gradient

final jewel
slim ferry
#

you should check for either

#

because otherwise like

#

its going to look wierd i think

final jewel
#

but it will undebuff card when its draw, isnt it?

slim ferry
#

yeah

#

and then itll stay like that until it leaves the hand

#

i think

final jewel
#

But I might do the thing that remove the debuff when drawn since wild card are never going to be good

#

So like you just want it to be drawn

#

And discard it after

slim ferry
#

you could also just make a global mod calculate

#

so its not every card with the enhancement recalculating the debuffs

#

and then have it recalculate debuffs in any context where a card changes areas

final jewel
#

Yeah I was thinking of that but I am not that advance in coding in lua\Smods

slim ferry
#

i mean you could just let the enhancement be jank for now

#

and thenfix later or smth

#

its really late for me now but i could maybe do a quick PR to fix it tomorrow

final jewel
#

Yeah could be cool

#

So I'll update my mod to 2.41.0

orchid thunder
#

how can i save a config to future cards

#

im trying to make a consumable do something diffrent every time its used

slim ferry
#

Use set_ability to run code when the card is created

round lion
#

1, how do i test out new additions without having to wait 4500 yars for rng to fall into my favor.

and 2, is there anything to help me for notepad ++

slim ferry
#
  1. Get debugplus

  2. Stop using notepad++ and start using vscode :3

round lion
#

but oficur my c drive doesnt look like it can handle it

rotund sable
#

Surely vim

wide chasm
#
--Twice In A Blue Moon
SMODS.Joker {
    key = "bluemoon",
    blueprint_compat = true,
    rarity = 2,
    cost = 6,
    atlas = 'nebula_atlas',
    pos = {x=1,y=2},
    config = {extra = {repetitions = 1}},
    loc_vars = function(self, info_queue, card)
        return {}
    end,
    calculate = function(self, card, context)
        if context.repetition and context.cardarea == G.play and not context.blueprint then
            return {
                repetitions = card.ability.extra.repetitions
            }
        end
            if context.individual and context.repetition and context.cardarea == G.play and context.other_card.lucky_trigger and not context.blueprint then
                return {
                    repetitions = card.ability.extra.repetitions + 1
                }
        end
    end
}
#

im tryna make this retrigger all lucky cards played, and then retrigger again if the lucky card hits

#

kinda struggling

round lion
#

i was given Missing required parameter for Joker declaration: key even though i clearly had key in joker decleration.

still crescent
wind steppe
#

should be main.lua

still crescent
#

o

wind steppe
#

also it's SMODS not SMOD

#

and you're missing a comma after key = "joker2"

still crescent
#

i didnt know that

#

ty

winter flower
#

here's an example of a joker if you need it

#

(ignore atlas for now if you dont have any joker sprites)

lofty elm
#

anyone know how to check what deck is selected?

wind steppe
lofty elm
#

tyy

round lion
#

can i even use vanilla atlases as placeholder sprites

winter flower
round lion
#

now im pretty sure it's haunted.

#

its still complaining about missing a key

#

when its right there

winter flower
#

can i see the code for the joker

round lion
rotund sable
round lion
#

im starting to think my machine's cursed.

#

first it suddenly aborted a shutdown

#

then it randomly assasinated both of my .json files i really liked

winter flower
# round lion

use loc_txt for name and text

key = 'joker',
loc_txt = {
  name = 'joker',
  text = '+4 mult'
}
round lion
#

now this

winter flower
round lion
#

said json files had export data from some bot

#

and they both randomly turned into null bytes

#

entirely.

rotund sable
winter flower
#

okay im no expert but im pretty sure you have malware or something
a balatro mod does NOT cause json files to die 😭

round lion
#

i dont even think it's win11's fault anymore

ocean sinew
#

quantum ranks with automatic code replacement W.I.P

#

now time to make Schrodinger's cat

#

"Ace's count as a Ace and 5 at the same time"

#

Y'all said it was hard but it was easy asf ngl

#

got bored decided to try took like 10 mins

round lion
ocean sinew
#

I just need some testing to make sure it works fine

round lion
#

and... it doesnt do anything

and by it, i meant the open as archive

ocean sinew
#

what's open as archive

round lion
#

joker im trying to make.

cursive gazelle
#

😭leave this dude for one month he’s gonna invent smods 2.0

lofty elm
lofty elm
#

I made this and checked G.GAME.selected_back.effect.center.key == "partnerdeck" but it doesn't do anything :(

#

I also tried with the b_partnerdeck

wind steppe
lofty elm
#

oh got it, uh I'm new to this where does that get put

wind steppe
#

b_modprefix_partnerdeck

frosty rampart
#

(replace "modprefix" with your mod's prefix)

lofty elm
#

got it, I'll see if that works

#

sweet that worked thank you

#

I'm routinely shocked at how crazy helpful this chat is

gilded goblet
#

Chat I'm gonna be honest with y'all idk what a self is

#

I think I know what a card is though

manic rune
gilded goblet
#

My bad gng 🥀

robust depot
#

what do i do to make Oops! affect the odds

#

i got it working at the 50% rate but after i fixed it up now oops doesnt work

warm umbra
#

how do i detect when the ui box is open

frosty rampart
#

it also won't visually update the probability until you interact with the probability api in loc_vars too. that's also documented in the link i posted

obtuse silo
#

don't mind me, just posting this here in the case someone has a solution whilst i try to work it out myself

umbral zodiac
obtuse silo
#

oh oke

umbral zodiac
#

oh i see the problem

#

you are checking context.other_card in smods.has_enhancement inside of context.joker_main

#

context.other_card does not exist because joker_main is for joker scoring effects usually

#

additionally you are checking if val (a card) is equal to a boolean (other_card having steel/lucky)

wind steppe
#

how do i get what mod a joker is from?

umbral zodiac
#

[center].original_mod

#

note that would return the whole mod table but that's also a good thing anyway

robust depot
#

but now i gotta figure out how to change its desc odds

umbral zodiac
#

tells you everything about probability api usage

#

and it is relatively simple its just a bit tedious

frosty rampart
round lion
frosty rampart
#

(to be clear that's how to do the probability check itself properly)

robust depot
#

thats what i have basically, just a little changed

#

for some reason it doesnt like putting numerator in that section

frosty rampart
#

ok you said you were using SMODS.get_probability_vars, which is the function meant to be used for the loc_vars

#

"numerator" and "denominator" are placeholder names for your actual base numerator and denominator

robust depot
#

no for that i put that on my odds

#

and yea i have it as 1 not numerator

wind steppe
frosty rampart
#

card.config.center

umbral zodiac
#

😭

#

i am actually shocked you did not learn this by now

#

at least u know now lmao

frosty rampart
#

use debug plus, eval dp.hovered while hovering over a joker, and dig through the tables there for a bit. please

umbral zodiac
#

yes do this always i love scrolling through massive tables and finding new information

robust depot
#

oh lets go its fully working now

umbral zodiac
#

nice

obtuse silo
frosty rampart
umbral zodiac
#

since other_card is the card thats being looped over by the contexts, and you're already looping over the scoring hand's cards

frosty rampart
#

it depends on the timing you want tbh

umbral zodiac
#

ya

#

it would work in a lot of different places

obtuse silo
#

i can just mark em as i go along, allow them to score and then destroy them after the hand's been scored or whatever

#

sorta like how glass cards break

mellow thunder
#

does anyone happen to know if I'm on the right track here? I'm trying to start with a simple skip tag for a dumb mod I have in mind, but my lack of coding knowledge is making things difficult and just winging it is crashing the game. The error code says something about an unexpected symbol near a ']' if that helps

obtuse silo
cursive gazelle
#

First just an advice
Use a code editor like vscode
It’s so cheap (it’s free l)
And it will make your life so much easier )

#

Second : your syntax is all messed up

#

Tho your code looks fine

#

It’s hard to tell without syntax highlighting

mellow thunder
#

yeahh I don't really know what I'm doing? It's basically just vanilla remade mashed together mr_bones

cursive gazelle
#

Fix your syntax then

#

It usually work

mellow thunder
#

but every time I try to actually learn coding I experience Brain Explode(tm) and give up

cursive gazelle
#

As long as you’re using stuff that ate available

cursive gazelle
#

What i always tell new beginners is just code a joker that give +1 mult and then x2 mult and then make it scale and make a joker that creates card then other stuff like leveling up hands etc

#

Like this you learn how everything works

#

From events to returns to context checks to modifying game variables

#

Like money / handsize /etc

mellow thunder
#

hmmm yeah I'll try? not sure where to start, a lot of my ideas are very different to the main game (so I wouldn't be able to copy/reference anything) and might be too hard lol

cursive gazelle
#

Yeah you can’t climb a mountain with one step

cursive gazelle
#

Copy a one of every kind

#

By this you also get better at fixing bugs and errors

mellow thunder
#

wouldn't copying the code mean I wouldn't learn anything? or am I misunderstanding

cursive gazelle
cursive gazelle
mellow thunder
#

oh yeah, duh

cursive gazelle
#

I mean try creating “banner” on your own

#

Find out your mistakes and when you see the code you’ll go “oh so this is how it’s made”

warm umbra
#

do you guys like my skip
tag

mellow thunder
#

Ok, I'll give that a shot. Thank you for pointing me in the right direction!

cursive gazelle
warm umbra
cursive gazelle
warm umbra
#

at least the tag is balanced for giving a legendary joker

#

❤️

cursive gazelle
#

Unskippable ?

frosty rampart
#

new skip tag that extracts your soul from your body and uses it to create a legendary joker

warm umbra
#

yeah you have to watch all of it for the joker

rocky plaza
warm umbra
cursive gazelle
#

Bro honestly i wouldn’t have minded if the quality was good

warm umbra
#

i was gonna use like something else but i couldnt think of anything

frosty rampart
#

bee movie tag when

warm umbra
rocky plaza
#

i honestly think its funnier if its lower quality

#

but yeah for 2 hrs would not be pleasant

cursive gazelle
#

10 hours of mommy asmr would’ve been more torturous

warm umbra
frosty rampart
warm umbra
#

31.9 mb mp4 to ogv

cursive gazelle
#

Bro this is not balanced

cursive gazelle
warm umbra
#

i will be reporting back in 2 hours

warm umbra
umbral zodiac
grim cove
#

hi how difficult is it to make a mod without knowing anything about programming?

warm umbra
#

we're gonna use it in multiplayer

cursive gazelle
umbral zodiac
cursive gazelle
#

Use jokerforge

#

It’s simple

#

You need no coding skills

warm umbra
#

i can do better at python

umbral zodiac
#

please do not use jokerforge to actually make a mod

#

use it as a learning tool

cursive gazelle
warm umbra
cursive gazelle
warm umbra
#

first lua project was a crappy roblox game where i looked through the docs for

#

😎

umbral zodiac
#

shrug

cursive gazelle
#

If people wanted to make more complex jokers then they can start coding

umbral zodiac
#

programming is a useful skill

cursive gazelle
#

Not for most people

warm umbra
cursive gazelle
#

I like it

#

It even tells you how patches work

warm umbra
#

ty

cursive gazelle
#

Np

#

The way N made it was so clever

#

He gathered some questions people mostly ask and answered them

warm umbra
#

wait there's so much stuff

#

this is great

cursive gazelle
#

Yeah

wild pine
#

is it possible to make a joker change its description? basically just trying to make it go from this to this

cursive gazelle
#

Yes

#

You just have it all as dyntatxt

sonic cedar
#

does anyone know how rendering in main_end works

#

wait that's literally what's being asked already

#

joining in on this question hi

round lion
#

does anyone know how shuffle works

red flower
wild pine
#

ah loc files

#

makes sense i should really set one of those up

#

ty

round lion
red flower
#

it's just area:shuffle("seed") afaik

#

wait it needs a seed too

sonic cedar
# red flower wdym

let's take this description for example
i want it to only render like this when i currently possess the joker
otherwise itll look like the second image

red flower
#

but if you want main end you can look at invis

#

in vanillaremade

jolly shadow
sonic cedar
sonic cedar
warm umbra
cursive gazelle
#

I thought you were joking 😭

warm umbra
#

❤️

lethal latch
warm umbra
cursive gazelle
warm umbra
#

i mean who doesn't love random audios in the background

pine dove
#

since the cryptid discord isnt helping me can someone help me fix this crash

winter flower
round lion
#

oh.

#

i could just draw from hand to deck.

warm umbra
red flower
# pine dove

is there a .lovelyignore in the cryptid items folder

pine dove
#

ah ok

red flower
#

then idk that's what i saw cause this crash before

sonic cedar
#

and this crash happens when it's in the shop, so it shouldnt even be trying to render it right
is there something i missed setting it up maybe?

#

wait brain blast

#

ok no that didnt work

#

smh

robust depot
#

dawg what does this mean

#

is this a my mod issue or what im confused

#

cause its crashing when i hover my joker when in a run, but not when in the main menu

gilded goblet
#

show code

robust depot
#

cause VS put itself on auto save and it wouldnt let me redo cause i was messing with a different joker, but i went too far back and i think i got it back to what it was before (when it was working fine) but I could have missed something

winter flower
#

im trying to get it so that "recluseblind" spawns after defeating "spkblind"
but after defeating spk it doesn't spawn, even after rerolling dozens of times

#

and also opening recluseblind crashes the game

sonic cedar
cursive gazelle
winter flower
#

god awful one it seems

cursive gazelle
#

I don’t blame tbh there are no examples anywhere

gilded goblet
# robust depot

okay, theres some weird things youve gone for, but lets start with loc_vars. do something like the following:

loc_vars = function(self, info_queue, card)
  local numerator, denominator = SMODS.get_probability_vars(card, 1, card.ability.extra.odds, "doofed")
  
  return {
    vars = {card.ability.extra.Xmult, numerator, denominator}
  }
end,

for text do something like this:

text = {
  'Each played {C:purple}5 gives',
  '{X:mult,C:white}X#1#{} Mult when scored',
  '',
  '{C:green}#2# in #3#{} chance to retrigger',
  '{s:0.6}its weird that it happened twice...',
}
#

see if it still crashes when you hover over it after doing this

gilded goblet
robust depot
gilded goblet
#

yeah

robust depot
#

well sadly it crashed on hover even on the main menu then

gilded goblet
#

could you show what the code looks like now?

#

thats not suppossed to be happening

#

ah wait i see what i did wrong

robust depot
#

its the lack of cfg.odds is my guess my code relies on that for the math

gilded goblet
#
loc_vars = function(self, info_queue, card)
  local numerator, denominator = SMODS.get_probability_vars(card, 1, card.ability.extra.odds, "doofed")
  
  return {
    vars = {
      card.ability.extra.Xmult, numerator, denominator
    }
  }
end,
#

could you try this?

sonic cedar
gilded goblet
#

i was doing it from memory and missed some steps lol

sonic cedar
red flower
# sonic cedar

i never tried main_end with localize, i would need to test to tell you

sonic cedar
red flower
#

the crash log tells me that the ui is nested too much

robust depot
red flower
#

but idk how to solve that in this situation

clear ocean
sonic cedar