#💻・modding-dev

1 messages · Page 609 of 1

glass scaffold
#

The "Red" enhancement (not sure of which mod) couldn't be found or applied correctly to what it needed to be.

This is probably that specific mod's fault, so see if an update is available or ask the devs to fix.

unkempt bronze
#

figure out which mod it is

glass scaffold
#

But you can also employ what I call The Sims method:

Take 50% of mods and set them aside in a separate folder, test. No crash? Add some mods back in. Rinse and repeat until your bad mod is found.

clever wasp
#

im using the balatro mod manager, i can just turn off the mods right?

unkempt bronze
#

yep!

clever wasp
#

thanks

unkempt bronze
#

is it okay if I load it as it's own file after another?

glass scaffold
slim ferry
#

is fixed on later versions of handsome devils

dark roost
#

do you know if there's any way to see the chips of the currently played hand before it's added to the total score? bcause if that's possible I could just add them up in my check and that should fix it.

wind steppe
slim ferry
#

theres a function for it now

#

since scoring calculations exist

#

i forgor what its called exactly

unkempt bronze
#

(couldn't read it)

unkempt bronze
copper perch
#

So, I'd want a custom spectral card to remove a joker slot when used, how would I go about that?

faint yacht
faint yacht
unkempt bronze
#

Can I have some help?

slim ferry
#

the file should never matter

unkempt bronze
# slim ferry do elaborate
        {n = G.UIT.R, config = {w = 400, h = 100, colour = G.C.RED, padding = 0.15}, nodes = {
            {n = G.UIT.C, config = {w = 150, h = 50, colour = G.C.WHITE, padding = 0.15}}, nodes = {
                 {n = G.UIT.T, config = {text = 'Just a test', colour = G.C.BLUE, padding = 0.15}}    
            }
            {n = G.UIT.C, config = {w = 150, h = 50, colour = G.C.WHITE, padding = 0.15}}, nodes = {
                 {n = G.UIT.T, config = {text = 'Just a test again', colour = G.C.BLUE, padding = 0.15}}    
            }
        }},
        
        {n = G.UIT.R, config = {w = 400, h = 100, colour = G.C.RED, padding = 0.15}, nodes = {
            {n = G.UIT.C, config = {w = 150, h = 50, colour = G.C.WHITE, padding = 0.15}}, nodes = {
                 {n = G.UIT.T, config = {text = 'Just a test once more', colour = G.C.BLUE, padding = 0.15}}    
            },
            {n = G.UIT.C, config = {w = 150, h = 50, colour = G.C.WHITE, padding = 0.15}}, nodes = {
                 {n = G.UIT.T, config = {text = 'Just a test for the last time', colour = G.C.BLUE, padding = 0.15}}    
            }
        }}
}}```
Says the following error
copper perch
slim ferry
faint yacht
slim ferry
#

you forgot a bracket somewhere

#

or did some other wierd thing

#

but ui is nested table hell so its hard to read where the issue is

unkempt bronze
#

Might not know about n?

slim ferry
#

well it says unexpected sumbol near '{'

#

so probably look for that near a '{'

unkempt bronze
#

n is near {

copper perch
slim ferry
unkempt bronze
#

nothing's before it

slim ferry
#

well yeah it isnt saying that the bracket isnt closed

#

also the crash says line 7

unkempt bronze
slim ferry
#

then thats not even an issue with your ui

#

wait

#

no its not your localization file

unkempt bronze
#

I meant my json file

slim ferry
#

it doesnt even say .json

#

how

unkempt bronze
unkempt bronze
# slim ferry also the crash says line 7
assert(SMODS.load_file("src/Challengecode.lua"))()
assert(SMODS.load_file("src/config.lua"))()
assert(SMODS.load_file("src/Elemental.lua"))()
assert(SMODS.load_file("src/Pack.lua"))()
assert(SMODS.load_file("src/Edition.lua"))()
assert(SMODS.load_file("src/just_the_splapp_boss.lua"))()```
7th line here
slim ferry
#

thats

#

not a json

unkempt bronze
slim ferry
#

ok

#

point still stands

#

its not your json file

dark roost
unkempt bronze
slim ferry
#

well one of them

unkempt bronze
#

Which one

slim ferry
#

every G.UIT.C

clever wasp
unkempt bronze
# slim ferry every G.UIT.C
        {n = G.UIT.R, config = {w = 400, h = 100, colour = G.C.RED, padding = 0.15}, nodes = {
            {n = G.UIT.C, config = {w = 150, h = 50, colour = G.C.WHITE, padding = 0.15}, nodes = {
                 {n = G.UIT.T, config = {text = 'Just a test', colour = G.C.BLUE, padding = 0.15}}    
            }}
            {n = G.UIT.C, config = {w = 150, h = 50, colour = G.C.WHITE, padding = 0.15}, nodes = {
                 {n = G.UIT.T, config = {text = 'Just a test again', colour = G.C.BLUE, padding = 0.15}}    
            }}
        }},
        
        {n = G.UIT.R, config = {w = 400, h = 100, colour = G.C.RED, padding = 0.15}, nodes = {
            {n = G.UIT.C, config = {w = 150, h = 50, colour = G.C.WHITE, padding = 0.15}, nodes = {
                 {n = G.UIT.T, config = {text = 'Just a test once more', colour = G.C.BLUE, padding = 0.15}}    
            }},
            {n = G.UIT.C, config = {w = 150, h = 50, colour = G.C.WHITE, padding = 0.15}, nodes = {
                 {n = G.UIT.T, config = {text = 'Just a test for the last time', colour = G.C.BLUE, padding = 0.15}}
            }}
        }}
}}```
Like so?
slim ferry
#

apart from the missing commas, yes

#

or well one missing

unkempt bronze
slim ferry
#

after the first G.UIT.C

#

also do you not have the vscode lua extension or smth

#

it should definitely tell you that

unkempt bronze
gusty compass
#

what is this meant to mean 🥀

slim ferry
unkempt bronze
slim ferry
#

well it broke a line earlier so like idk

#

it doesnt appear like you changed anything there

unkempt bronze
#

All I did was clear the opening blank line. It breaks on the first character, it might be the n

#

it always has a red line under it in the editing software...

#

that n at the top

slim ferry
#

well

#

theres clearly something wierd going on

#

since it should be green normally

#

as in the text colour of every table element

unkempt bronze
#

none of the other n's have that

slim ferry
#

well yeah

#

because the entire table appears to be broken

unkempt bronze
#

How did I break it? I copied it from the UI guide!

slim ferry
#

wait

#

can you show the full screenshot

unkempt bronze
slim ferry
#

yeah your issue is that you arent assigning the whole thing to a variable

#

currently youre just dropping a random table in the code

unkempt bronze
#

Oh. So remove the outmost paren?

slim ferry
#

no

#

assign the whole ui table to an actual value

unkempt bronze
#

like ui_v?

slim ferry
#

what

unkempt bronze
#

you said set it to a value, can I set it to that?

slim ferry
#

variable

#

i meant assign it to a variable

#

its your mod though you can name your variables whatever you want

unkempt bronze
#

Set that first in the file?

slim ferry
#

just start the file with <something> = <the whole ui table>

unkempt bronze
#

Okay, Balatro is opening. How do I check if the UI works as it should?

#

Because, if it's half the nested table hell you claim it to be, I should check it every edit!

slim ferry
#

i mean its more just dont ever hit format document or vscode expands the entire thing to all hell

#

it shouldnt be an issue outside of being hard to read

unkempt bronze
#

Well, how do I see if my UI coding works?

slim ferry
#

idk how to just create ui though all ive done is like a mod config tab

#

though you could just return it in SMODS.current_mod.config_tab for testing ig

#

probably not the best method but thats all i know

unkempt bronze
#

You know anyone versed in UI?

slim ferry
#

not particularly

#

but someone will probably show up

unkempt bronze
#

I'll ask around. (and try not to be a bother)

copper perch
#

Sorry to jump in but my consumable is not working, I'm trying to make it so it enhances a playing card to my modded enhancement

config = { max_highlighted = 1, mod_conv = 'm_DRY_oddity' },
    loc_vars = function(self, info_queue, card)
        info_queue[#info_queue + 1] = G.P_CENTERS[card.ability.mod_conv]
        return { vars = { card.ability.max_highlighted, localize { type = 'name_text', set = 'Enhanced', key = card.ability.mod_conv } } }
    end,
unkempt bronze
#

Hmm. I think I have similar consumables, hang on.

#
            local xiferp_up_a_step = SMODS.poll_enhancement({guaranteed = true, type_key = 'shuffletheseed'})
            local card_to_change = pseudorandom_element(G.hand.cards, 'shufflethedeck')
                      G.E_MANAGER:add_event(Event({
                           func = function()
                                card_to_change:set_ability(xiferp_up_a_step, nil, true)
                           return true
                     end
             }))  
        end   
}```
Mine looks like this, but this changes a random card to have a random enhancement
slim ferry
copper perch
slim ferry
#

Does it just apply a different enhancement?

copper perch
#

It doesnt apply one, from what I can see at least

slim ferry
#

Does hovering over the enhanced card show anything

copper perch
#

No

slim ferry
#

Huh

copper perch
#

I use it, applies its use function, but does not change the enhancement

unkempt bronze
slim ferry
#

there isnt a use function because it uses the built in functionality i assume

copper perch
#

It does the reverse, does the use function but not using earlier code

#

I'll check without the use and see what happens, hold on

#

Its the use function.

#

If I have a card changing enhancement and also has a 'use' built in it bugs out

slim ferry
#

Well adding a use function overrides the default automatic mod_conv functionality

#

So that might be it?

copper perch
#

Has to be

gusty iron
#

i had an idea for a joker but i dont know if it would be possible so uh...

is it in anyway possible to get lovely to detect webcam data?

copper perch
unkempt bronze
gusty iron
slim ferry
unkempt bronze
slim ferry
#

I mean software for detecting expressions already exists tbf

copper perch
unkempt bronze
slim ferry
#

🤷

gusty iron
slim ferry
#

Webcam is probably the hard part but i cant imagine its entirely impossible

unkempt bronze
#

I mean, it's an app. Jokers have seen other apps before.

#

(There's a joker in one mod that gives xmult per crash log)

gusty iron
#

thats FILES, not apps

#

-# i too have a joker which accesses, and actually deletes files if you have them in a folder it tells you to make

#

-# it then gives ^mult based off of file size

gusty iron
thorn basin
#

does someone have the link for that github page that explains how to publish your Balatro mod?

#

I need it cuz there's also some other information I need for my mod

unkempt bronze
#

like what exactly?

unkempt bronze
#

Can't wait to see Scienceful!

thorn basin
#

it's an introduction page on how to make your mod

unkempt bronze
#

gimme a second...

#

should be there somewhere...

unkempt bronze
#

I'm pretty sure you can just like... upload it to github and that works?

thorn basin
unkempt bronze
#

I have no idea where I should be looking

gusty iron
#

how would i do sin cos and tan in talisman?

unkempt bronze
thorn basin
#

there was that info in the FAQ

unkempt bronze
#

Oh. That's, easy. I don;t know what that command is, but I know it's somewhere. Lemme try to find it

#

I don't know where to find it

native bone
#

What is the default in a SMODS.ObjectType? It cant be an icon, is it?

unkempt bronze
#

found it

thorn basin
#

it was this page

unkempt bronze
thorn basin
#

thx!

unkempt bronze
#

yw!

topaz berry
#

does the game keep track of a list of jokers sold in a run?

native bone
topaz berry
# native bone afaik no

i noticed jokers in the cryptid mod call G.GAME.jokers_sold but that seems to be a list made by the cryptid mod

native bone
#

This crashes whenever I get to the end of the shop. I think the problem lies at the SMODS.add_card, but I'm not entirely sure.

#

It also fucks up rendering too when it crashes, probably because it makes a Negative

atomic edge
#

is the game coded so that the first shop always has a buffoon pack?

vague crag
#

I think so

atomic edge
#

oh

#

okay thanks

topaz berry
#

I have created a joker that stores sold jokers. The joker is functional except that it crashed when duplicated through means such as ankh or invis. The sold jokers are stored in a table in the config
config = { extra = {sold_jokers = {}} }
This is the section that adds jokers to the table

if context.selling_card and (context.card.ability.set == "Joker") and not (card == context.card) and not context.blueprint then
            card.ability.extra.sold_jokers[#card.ability.extra.sold_jokers+1] = context.card
end

The error code is a stack overflow, there is some infinite recursion or loop. Do you know why this is happening, or how I could avoid it?

atomic edge
#

can you send crash screenshot?

topaz berry
#

Yes

#

One second

atomic edge
#

can you send the ingame one?

#

so i can see the line where it says what crashed it

topaz berry
atomic edge
#

bro im sorry but i cant think of what could cause it

#

sry for not being helpful

topaz berry
#

all good, im just lost, maybe the copycard function breaks if theres too much in the config

#

will work on a workaround implementation

atomic edge
#

did you test it with the ankh?

topaz berry
#

ankh and invisible joker

atomic edge
#

because invis joker being sold and your joker copying it might be a problem but if the ankh also does it than thats not it

topaz berry
#

oh interesting

#

it works if i debug more of the joker in, just not when copied

copper perch
#

So I got a general idea how the change information on a card, yet for some reason my game crashes on open. Any help??

    key = 'manufactured_darkness',
    set = 'Spectral',
    loc_txt = {
        name = 'Manufactured Darkness',
        text = {
            'Enhances {C:attention}#1#{} selected',
            'card into an',
            '{C:attention}Oddity Card,{}',
            '{C:red}-1{} Joker slot'
        }
    },
    atlas = 'oddity_card',
    pos = { x = 0, y = 0 },
    config = { max_highlighted = 1, mod_conv = 'm_DRY_oddity' },
    loc_vars = function(self, info_queue, card)
        if #SMODS.find_card("j_UTDR_shadow_crystal") > 0  then
                return {
                    key = "c_DRY_manufactured_darkness_crystal",
                    vars = { card.ability.max_highlighted }
                }
        end
        info_queue[#info_queue + 1] = G.P_CENTERS[card.ability.mod_conv]
        return { vars = { card.ability.max_highlighted, localize { type = 'name_text', set = 'Enhanced', key = card.ability.mod_conv } } }
    end,

-- So the name changes

key = "manufactured_darkness_crystal",
    loc_txt = {
        name = "Manufactured Darkness",
        text = {
            'Enhances {C:attention}#1#{} selected',
            'card into an',
            '{C:attention}Oddity Card{}',
        }
    },
    no_collection = true,
    in_pool = function(self, args)
        return false
    end,
atomic edge
#

you can dm it to me if its easier for you

topaz berry
#

yeah

#

SMODS.Joker {
    key = "oath_of_vengeance",
    blueprint_compat = true, 
    atlas = 'dnd',
    rarity = 4,
    cost = 10,
    pos = { x = 1, y = 1 },
    loc_txt = {
        name = 'Oath of Vengeance Joker',
        text = {
            "This Joker copies",
            "the abilities of all",
            "{C:attention}sold Jokers{}"
        }
    },
    config = { extra = {sold_jokers = {}} },
    calculate = function(self, card, context)
        local effects = {}
        if context.selling_card and (context.card.ability.set == "Joker") and (not (card == context.card)) and (not context.blueprint) and context.card.blueprint_compat then
            card.ability.extra.sold_jokers[#card.ability.extra.sold_jokers+1] = context.card
        end
        --edited out for debugging
        --[[
        for index, joker in ipairs(card.ability.extra.sold_jokers) do
            print("Adding effects")
            effects[#effects+1] = SMODS.blueprint_effect(card, joker, context)
        end
        
        return SMODS.merge_effects(effects)
        ]]--

    end,
}
atomic edge
#

okay so i checked the copy_card thing

#

and i think its just too much to copy a whole card

#

maybe try storing only the sold joker key

#

on your joker

#

and then use the key

frosty rampart
#

you shouldn't be storing whole cards inside other cards anyway
maybe look into how ortalab handles pinkprint (it copies the effect of the most recently sold joker)

topaz berry
#

DAMN SOMEONE BEAT ME TO IT

#

thats a good idea thank you

atomic edge
#

haha

#

do you guys know if there is a way to use lovely patch to patch into every line that matches?

#

with the pattern

frosty rampart
#

i think that happens already?

atomic edge
#

oh

#

i thought it only takes 1

#

thanks

copper perch
atomic edge
#

wait what do you want to do exactly?

#

you make to want a new card thats called manufactured_darkness_crystal

#

?

rapid stag
#

remind me, do i call SMODS.Game_Over() to instantly force gameover or cirDerp

#

i forget how to do
nvm, you just set the state

copper perch
atomic edge
#

then just replace the name and description in its code

#

these two

copper perch
#

In my case that wouldn't work, I wanna change it when a specific joker is in your joker slots (this being the shadow crystal in the code)

atomic edge
#

delete them and write what you want it to say

#

oh i dont know if you can dynamicaly change the name / key so im useless here sry

copper perch
#

So if the player doesnt have the Joker, its the base I have. If they do have it, I wanna change what it says, hopefully that clears up what i mean

wind steppe
#

move to localization files

wind steppe
#

then you can have the normal key and the special key separately

copper perch
# wind steppe move to localization files

I have had that recommended but I also found an easy way with Jokers, so figured I could copy paste that. That being:

-- Card 1
loc_vars = function(self, info_queue, card)
        if math.random() < 1/615 then
            return {
                key = "j_DRY_Westville",
                vars = { card.ability.xmult_gain, card.ability.xmult }
            }
        end
        return { vars = { card.ability.xmult_gain, card.ability.xmult } }
    end,

--Card 2
key = "Westville",
    loc_txt = {
        name = "Not Westville :D",
        text = {
            "Gains {X:mult,C:white}X#1#{} Mult for",
            "{C:attention}each{} discarded card",
            "{C:inactive}(Currently {X:mult,C:white}X#2#{C:inactive} Mult)"
        }
    },
    no_collection = true,
    in_pool = function(self, args)
        return false
    end,
wind steppe
#

there's no reason to initialize a whole other joker though. localization files are what you should be doing anyways

copper perch
#

Noted, thanks

charred widget
#

Hi friends! I'm getting this crash every time I click the options button for the Talisman mod. Is there a way to fix it?

wind steppe
#

wait thats your mod nvm

#

how old is deckcreatpr

charred widget
#

last updated in july

#

or at least that's what it says in my file directory

wind steppe
#

try disabling that

charred widget
wind steppe
#

update talisman and debugplus

charred widget
#

i installed talisman pretty recently

charred widget
wind steppe
#

where does your mod mess with ui

charred widget
#

wdym "mess with"

wind steppe
#

do anything with ui

charred widget
#

i don't think my mod does anything with UI at all

wind steppe
#

disable your mod

charred widget
#

unless joker descriptions also count as UI

charred widget
#

although mind you it doesn't crash on startup

#

it only crashes when I select "config" for talisman

wind steppe
#

hm

#

yeah idk report the issue to talisman

charred widget
#

ok another interesting development

#

so i've been having trouble with the game's intro playing the audio tracks one at a time

#

and the audio acts weird when i open the game

#

but when i disable MY mod it stops doing that

#

which is veeeeeeeery interesting

wind steppe
#

you probably have some code somewhere messing with audio

charred widget
stiff locust
charred widget
#

Oops! The game

stiff locust
#

Oops! The game

#

like what the fuck am I supposed to do with this

rapid stag
sturdy compass
#

Lmao

#

Deserved

stiff locust
#

not misprint deck or cryptid by the way

primal terrace
#

This line crashes the game if I hover over the Joker outside of the game, because #G.vouchers.cards is nil

#

Defining it as (#G.vouchers.cards or 0) also crashes it

rocky plaza
primal terrace
#

In the loc_vars area?

rocky plaza
#

yes

primal terrace
#

Makes sense

rocky plaza
#

so

local voucher_count = 0
if G.vouchers then
    voucher_count = #G.vouchers.cards
end
primal terrace
#

There should be more jokers that do something when you buy vouchers

rocky plaza
#

true

rocky plaza
feral tree
#

is it possible to make a skip tag not appear twice in the same ante?

willow scroll
tight pumice
#

Anyone know the sound code for glass breaking?

tight pumice
#

Making a piggy bank joker and I want it to make a shattering noise when its sold or destroyed

vale zinc
tight pumice
#

Interesting, so maybe the game picks randomly every time glass breaks

#

I'm just gonna pick the one that sounds the most like a piggy bank

#

Right now glass2 is looking pretty good

umbral zodiac
#

are redeemed vouchers stored in a cardarea and if so whats it called

#

unless it is g.vouchers and i just did something else wrong hold on

charred widget
#

Hi friends. Is it possible to hide a joker from the collection?

rocky plaza
charred widget
rocky plaza
charred widget
#

cool

#

thanks !

unkempt bronze
#

Say, any button-coding tricks?

unkempt bronze
#

Or any mods that mess with the UI?

hybrid iris
timid zinc
#

is there any way to check if a red seal actually retriggers anything when held in hand at end of round? it works just fine when a hand is played if the card isn't steel (doesn't return a trigger) but it always returns a trigger at end of round even if no effect is actually triggered

chrome widget
#

this is an existing cardsauce feature but I pushed it in an SMODS PR because it requires overriding vanilla code and it might as well be centralized

copper perch
#

Making a chip version of Loyalty Card, how would I get the number of hands remaining to work in the text? #2# returns 1 greater than every and #3# returns an error

key = "Martlet",
    loc_txt = {
        name = "Martlet",
        text = {
            "{C:chips}+#1#{} chips every",
            "{C:attention}#2#{} hands played",
            "{C:inactive}#2# remaining{}"
        }
    },
    config = {
        extra = {
            chips = 134,
            every = 1,
            birdbrain = 1
        }
    },
loc_vars = function(self, info_queue, card)
        return {
            vars = {
                card.ability.extra.chips,
                card.ability.extra.every + 1,
                localize { type = 'variable', key = (card.ability.extra.birdbrain == 0 and 'bird_play' or 'bird_forgot'), vars = { card.ability.extra.birdbrain } }
            }
        }
    end,
chrome widget
#

Hotfixes galore......

terse merlin
#

is there a simple way to set the Showdown Blind of a Challenge to a specific blind?

#

for example, i have a challenge themed around moving jokers around all the time, so i want the challenge to always end with Amber Acorn or Sorrowful Styx. i know i could ban all the other blinds, but that doesnt account for blinds added by other mods

stuck ore
#

I was curious is there is a way to reverse pareidolia so that face cards score as nonface cards, (10s) but I can't find anything

terse merlin
stuck ore
#

thats exactly like to a tee what I meant

#

thank you a bunch

civic solstice
#

hey guys i made a deck using jokerforge how do i port it into the game

mystic river
#

i don't think anything in vanilla actually uses that feature, but it's completely assembled and functional

civic solstice
#

i dont speak spaghetti code someone help LOL

#

what does this mean

mystic river
#

it means you typed your brackets and/or commas incorrectly

civic solstice
mystic river
#

or possibly you put an equals sign in the wrong place

#

okay, then joker forge did that

#

you might want to actually look at the code somewhat

civic solstice
#

i opened the script that was shitting itself in vscode idk what any of this means

#

as you can tell idk shit about lua or any programming languange lmao

mystic river
#

on line 19, you should -
what exactly is that supposed to be doing, actually

#

it looks like it's trying to reduce the money per hand by 5% of the money on hand

civic solstice
civic solstice
mystic river
#

okay well
that code's syntax is entirely wrong (you can't do variable assignment inside a return), and also wouldn't do that if it was fixed (you are modifying the "you get $1 per spare hand" variable, not the cash out total)

civic solstice
#

ohhhhhhh okay

civic solstice
#

so i shouldve used this instead right

mystic river
#

no, that just changes money directly, like hermit or wraith does
i don't think the thing you're trying to do is within joker forge's capability

civic solstice
#

o

#

ill try it anyways

#

since its set to when the round ends

#

oh wait that fixed it what

#

no it didnt LMAO

#

the game opened but when i tried going to the deck i made it crashed

mystic river
#

you defined an atlas wrong somewhere

civic solstice
#

idk what im doing man LOL

mystic river
#

did you define an atlas named "Deck" anywhere in your mod

civic solstice
#

found it

mystic river
#

well yes. did you define that atlas?

#

is that an atlas you created?

civic solstice
#

idk man

#

i assume so

mystic river
#

do you know what the phrase "create an atlas" refers to?

civic solstice
#

idek what an atlas is LOL

mystic river
#

assume you didn't do it, then

#

it's looking for the atlas yourmodprefix_Deck and not finding it

#

presumably because you never created it

civic solstice
mystic river
#

no

#

did any of what you did look even a little bit like what's going on here?

civic solstice
#

lemme read this rq

#

are you asking does the file structure look the same between the doc and the files?

#

because if so then yeah

mystic river
#

does the text SMODS.Atlas appear in any part of your mod's code

mystic river
#

okay
is that all of them? because none of them are "Deck"

civic solstice
#

seems it yeah

mystic river
#

one of them is CustomDecks
did you, perhaps, want that one?

civic solstice
#

i assume that is what would allow the deck to be functional so yes

mystic river
#

well it's an atlas that exists, instead of an atlas that doesn't exist

civic solstice
mystic river
#

well, i specifically drew your attention to that one, so i'm thinking probably
y'know, unless you gave your atlases misleading names on purpose

civic solstice
#

okay so it worked but uhh LOL

mystic river
#

yeah you gotta put your own line breaks in

terse merlin
civic solstice
#

okay aaand in playtesting the decks abilities doesnt even work

#

awesome

#

man this looks so fucking sick

mystic river
civic solstice
#

so how do i fix dat

mystic river
#

do you like
know what an if statement is

civic solstice
#

yea im not that ineducated lol

#

if x action happens activate y line(s) of code

mystic river
#

remove the if statement i described, which is both unnecessary and broken

#

(also remove the corresponding end, because that's how lua formats if statements)

civic solstice
#

are you talking about this

mystic river
#

yes

civic solstice
#

holy fuck it worked

#

lfg

#

thats awesome dude

#

oh yeah i should probably make some art for this

#

im so happy

#

the money removing doesnt work but omg i love this

elder rune
civic solstice
#

okay im realizing now with how easy it is to get money anyway with the negative jokers by selling them i think i should just remove all post round profits

civic solstice
#

lol

civic solstice
#

its actually a joke lmao

#

okay i changed up the coding a bit

#

i decided to make it so the money just gets set to 0 at the end of a round

#

if need be i can change it no problem

#

uhhhh what did i fuck up

#

i tried investing in likebreaks and it linebroke the entire thing

#

did bro just get hacked or smth

#

@terse merlin @mystic river hlep

mystic river
#

you have to put commas between items in a table

#

which in this case refers to the individual lines

civic solstice
#

so like that

mystic river
#

yes

civic solstice
#

except not in the last one i assume

mystic river
civic solstice
#

alr gotchu

#

tysm for helping btw

civic solstice
#

this if statement should be handling that but it doesnt for some reason

#

actually wait a sec

#

nvm

#

okay i changed it to this but it didnt fix anything

#

soooooooooooo idk

#

better ss

maiden phoenix
#

Is the context actually called shop_is_entered?

civic solstice
#

idk

#

it didnt crash upon opening so i assume so

maiden phoenix
#

It wont crash if a bool is false

civic solstice
#

shop_is_entered is set to true tho

plain apex
civic solstice
#

okay thatd explain my dumbassery

plain apex
#

you could check for when stuff in the shop is generated and then do something depending on if thats what you need

plain apex
civic solstice
#

this is the first time ive ever coded w lua

#

so i have next to no clue what im doing

plain apex
#

well what are you trying to do?

civic solstice
#

for the deck im making im tryna set the money to 0 when the shop is entered

#

since the gimmick of the deck atm makes it a joke to get money

plain apex
#

then id go for
if G.STATE == G.STATES.SHOP then
--code to set money to 0

maiden phoenix
#

Im sure theres a context for entering the shop but I dont have SMODS code available rn

plain apex
#

seems starting_shop is a thing

civic solstice
#

wait so how do i make a variable change its value in an if statement like this

#

is this correct

maiden phoenix
#

Also lua tip, to check if a boolean is true, typing "== true" is redundant

#

For == false you can do "and not context.blabla"

civic solstice
maiden phoenix
#

Shouldnt it be >= 1 if you're checking for greater or equal?

civic solstice
#

Oh.

#

a senior in highschool btw

plain apex
civic solstice
#

yea im tryna set the value to 0

maiden phoenix
#

current_dollars is G.GAME.dollars

plain apex
#

oh ok didn't read that

#

mb

civic solstice
#

you good

#

nope still nothing

maiden phoenix
#

Oh wait im stupid

#

Context.main_eval will always be false if you're checking for entering shop

#

Remove that context check

civic solstice
#

ohh okay that makes sense

maiden phoenix
#

The game over one is useless too

plain apex
#

me when i game over in the shop so i can't lose all my money

civic solstice
#

^

maiden phoenix
#

Replace the whole boolean check by "if context.starting_shop then"

civic solstice
#

i felt like thatd be funny enough to get a clip of

#

this was the error

stiff locust
#

chat help me

#

one of my jokers is ignoring eternal

#

like you can sell it even when its eternal

#

and i dont get it

plain apex
# civic solstice code update btw

i think this whole thing could be simplified to just this if its always going to remove your money

if context.entering_shop then
  G.GAME.dollars = 0
end
civic solstice
#

ah

#

fuck yes

plain apex
#

yw

civic solstice
#

ty

#

it kinda does it in a weird way where there isnt an animation for losing the money it kinda just

#

immediately sets itself to 0

#

but thats a problem for future me

daring fern
plain apex
#

yeah that would fix the display thing

civic solstice
#

ohh okay

#

gotchu

plain apex
#

anyway how do i use these new localization things for editions

#

do i just remove text and then put those in the localization somewhere or?

civic solstice
plain apex
#

well i thought it would

civic solstice
#

@daring fern

maiden phoenix
#

Do you have Talisman installed?

plain apex
#

i guess you could do the thing you were doing before and get the current_dollar value then ease_dollars(-current_dollars) instead of doing the return thing

civic solstice
maiden phoenix
#

Thats why its crashing

civic solstice
#

i see

maiden phoenix
#

It turns G.GAME.dollars into a table

civic solstice
#

okay that worked

#

lets fkin go bro

plain apex
#

nice

civic solstice
#

holy fuck im so happy rn lmfao

#

this is the first thing ive ever coded to actually work

plain apex
#

w

plain apex
maiden phoenix
# plain apex well it wasn't that

Editions are set in their own table under descriptions

return {
descriptions = {
Back={},
Blind={},
Edition={},
Enhanced={},
Joker={},
Other={},
Planet={},
Spectral={},
Stake={},
Tag={},
Tarot={},
Voucher={},
},

plain apex
#

ah

plain apex
hushed field
#

I assume it's due to the sprite being larger than the default 32x32 a blind is, but I'm not sure how to resolve this issue of scaling. Anyone have any insight?

plain apex
#

would it work to just scale it down to blind size?

hushed field
#

I'm not sure how I'd do that with it only affecting the blind during the round

#

I suspect I'd just need to patch something as the file gets loaded with an incorrect preset somehow, with the 32x32 being hardcoded in somewhere

plain apex
#

i mostly meant the actual art

#

as in compress poor pale man into 32x32

hushed field
#

It'd really mess up the sprite, so I'd have to redo it, but I could maybe look into having the hands be separate sprites, and just faking it 🤔

plain apex
#

damn

plain apex
solid salmon
#

does anyone know how to make gradients

daring fern
plain apex
daring fern
civic solstice
#

so heres my entire to-do list for this mod that is very much not finalized so much more is gonna get added onto here

umbral spire
#

why am i getting this crash?

SMODS.Blind {
    name = "myBlind",
    key = "myBlind",

    discovered = true,
    atlas = "blindatlas2",
    pos = { y = 13 },
    dollars = 5,
    mult = 2,
    boss = { min = 2 },
    boss_colour = HEX("67533D"), 

    calculate = function(self, blind, context)
        if not blind.disabled then
            if G.play.cards and context.before then
                for i, c in ipairs(G.play.cards) do
                    local t = pseudorandom('bc_mule', 1, 2)
                    if t == 1 then 
                        SMODS.modify_rank(c[i], 1)
                    else
                        SMODS.modify_rank(c[i], -1)
                    end
                end
            end
        end
    end 
}
civic solstice
#

quick question, if this is the context for creating a card then whats the context for destroying a card?

#

@maiden phoenix you know your shit with lua help me out here pls lmao

civic solstice
#

okay gotchu

slim ferry
#

context.removed being the list of removed cards

civic solstice
#

that didnt work lol

slim ferry
#

whats the code

civic solstice
slim ferry
#

probably because youre calling it as a function

civic solstice
#

do i add context. before it

slim ferry
#

well yes

#

but its also not a function

civic solstice
#

wdym

#

so what would i do to fix that

slim ferry
#

not call it as a function

#

what are you even trying to do

civic solstice
#

im tryna make it so when you play a card it destroys a random card in your deck

#

while giving xmult

slim ferry
#

then

#

why do you need the context for destroying a card...

civic solstice
slim ferry
#

also create_playing_card isnt a context its a function

civic solstice
#

i need it so i can destroy the random card

slim ferry
#

if you want the function for destroying a card then its SMODS.destroy_cards(cards), with cards being either a single card or a table of cards

civic solstice
#

alr thanks

#

so would i have to do smth like this to destroy a random card in the deck

#

or hand rather

slim ferry
#

where is random defined

civic solstice
#

sry if im asking too many questions i literally have never touched lua a day in my life before this

civic solstice
slim ferry
#

use pseudorandom_element(G.hand.cards, "seed") to get a random hand card

#

seed being whatever as long as its unique

civic solstice
#

so i can literally put seed as a random set of numbers and letters and itd be fine

slim ferry
#

yeah

civic solstice
#

alr

slim ferry
#

though usually people do have an actual naming convention for seeds

civic solstice
#

oh for FU

slim ferry
#

probably remove the whole thing in the ({ after the destroy_cards call

#

because thats probably not doing what you want it to be doing

civic solstice
slim ferry
#

can you just show the full code

#

also you should probably get the lua extension for vscode if you dont have that yet

civic solstice
#

i added the things back since those messed it up more

slim ferry
civic solstice
#

oh wait do i need those "" around the seed

slim ferry
#

yes but also

#

comma

#

not brackets

#

for seperating function arguments

civic solstice
#

ah

slim ferry
#

theres also

#

a bunch of stuff from when you still had create_playing_card there

primal robin
#

Even I didn't do that

slim ferry
#

ok but its very useful when youre new to coding

civic solstice
#

okay with the lua extension it now says the 'G' is an undefined global???

slim ferry
#

yeah read further in the thing

#

G is something from balatro and it doesnt know about things from balatro

civic solstice
#

thanks vscode

slim ferry
#

closing bracket

#

and the opening quotes

#

missign

civic solstice
#

how tf did i miss those LOL

slim ferry
#

idk lmao

#

but then you should be able to go into your mods folder and copy paste the file paths for steamodded and lovely/dump into there

#

and then replace all the slashes because windows uses the opposite one for some reason

slim ferry
#

in place of the path to smods and lovely dump

#

you can click on the file path at the top of file explorer to copy it

civic solstice
#

oh im blind

#

alr

#

okay im sorry this is too confusing for my square brain

slim ferry
#

is the file complaining about the slashes by any chance

civic solstice
#

this is my mods folder what do i have to move into where

slim ferry
#

oh

civic solstice
slim ferry
#

copy the file path of lovely/dump and steamodded

civic solstice
#

okay then what

slim ferry
#

then put them in that settings file

civic solstice
#

what settings file im so confused lmao

slim ferry
#

the one you created

slim ferry
civic solstice
#

ohhhhhh

#

sorry im dumb as fuck LOL

slim ferry
#

yeah replace the slashes with the other one

#

do ctrl f and replace all \ with /

civic solstice
#

oh right yea

slim ferry
#

because for some reason windows uses backslashes in file paths

#

well idk if its a windows thing

#

but its annoying regardless since JSON considers backslashes an escape character

civic solstice
#

it should be okay now right

slim ferry
#

works too lol

#

yeah

#

it might take a short bit but itll eventually recognize more variables

civic solstice
#

okay back to the variables to the jokers i think the problem might lie in these

slim ferry
#

you should be able to do just SMODS.add_card{ set = "Default", area = G.hand } in the event and itll do all the emplacing and G.playing_card stuff automatically

civic solstice
#

im gonna lose it

slim ferry
#

show the full code

civic solstice
slim ferry
#

remove all of this

civic solstice
#

how theres this

slim ferry
#

show more

civic solstice
slim ferry
#

what is above that

civic solstice
#

all dis

slim ferry
#

remove that {

#

at the end of line 40

civic solstice
#

alr

slim ferry
# civic solstice

also SMODS.add_card should be inside the function of the event here

civic solstice
#

oh gotcha

slim ferry
#

also you can remove the G.playing_card stuff and the emplace and materialize

#

since SMODS.add_card does basically everything related to creating cards for you

civic solstice
#

we just crashing over anything now 💔

slim ferry
#

yeah just remove all the stuff thats doing things with new_card

#

since it doesnt exist anymore

civic solstice
slim ferry
#

SMODS.destroy_cards doesnt return anything

civic solstice
#

oh alr

#

okay so it wont return any of the code that the new_card is in

#

got it

slim ferry
#

also probably remove the SMODS.add_card because i thought you were still trying to create a card

slim ferry
#

SMODS.destroy_cards doesnt pass out any value to assign to new_card

civic solstice
#

okay how do i disable this annoying ass backspace system

slim ferry
#

hit insert on your keyboard

civic solstice
#

just the add_card

slim ferry
#

yeah the whole line

civic solstice
#

anything else

slim ferry
#

there shouldnt be

civic solstice
#

IT WORKS

#

YIPPEEEEEEEEEEEE

#

tysm dawg i appreciate you putting up with with my tiny square brain

slim ferry
#

joker made 🎉

civic solstice
#

note to self: learn lua before trying something that requires having learned lua LOL

slim ferry
#

i mean first time for everything

civic solstice
#

fair

slim ferry
#

you only get better at it from here

vernal seal
#

quick question:
how do i make it that it gives the same amount of money as the number of round winned with the first most used joker

daring fern
wild berry
#

is there a table where all the cards in the shop are

daring fern
wild berry
#

ty

vernal seal
slim ferry
#

joker_usage still has data from mods you no longer hav installed iirc

vernal seal
next timber
#

you can check if its key exists in G.P_CENTERS i think

slim ferry
#

probably yeah

#

try checking if G.P_CENTERS[v.key] exists alongside the usage check

solid salmon
#

would this work for a gradient

next timber
#

lua uses ~=

#

not !=

slim ferry
#

also dont put another if

vernal seal
slim ferry
#

it should just be G.P_CENTERS[v.key]

vernal seal
solid salmon
#

im tryna make a gradient that goes between pink and red

#

(also do gradients work in descriptions?)

daring fern
daring fern
vernal seal
solid salmon
#

like this?

slim ferry
#

try k instead of v.key maybe

vernal seal
vernal seal
slim ferry
#

😨

vernal seal
vernal seal
daring fern
next timber
#

my edition's shader seems to be hiding the rank and suit of playing cards its applied to?

vernal seal
daring fern
vernal seal
vernal seal
daring fern
wild berry
#

how can i access the cards created from booster packs

median rose
#

Besides gimp or photoshop, does anyone recommend any software for creation for joker sprite sheets?

wild berry
daring fern
wild berry
#

ty

unkempt bronze
#

Anyone know how to make a button?

wild berry
#

create_UIBox_generic_options

unkempt bronze
#

...that all? Do I add a function?

wild berry
#

its a function

unkempt bronze
#

that makes a button?

wild berry
#

heres a snippet of code that should allow you to understand a bit more

#

back_delay is incase you want the button to be disabled for some time

#

back_label is for its text

#

the contents.config is to determine what it will close

#

if its a back button

#

n is the type

#

you can see more types in G.UIT

unkempt bronze
#

I just want a basic button that either ends the game on the spot or disables the boss it's in.

wild berry
#

use G.UIT.B

#

for its type

unkempt bronze
#

any changes?

slim ferry
#

it needs a button value in the config

#

which is a string reference to a function in G.FUNCS

#

and determines what happens when you click the button

wild berry
#

yeah

slim ferry
#

and like you can get it to pass arguments into the function with ref_table or ref_value or whatever but idrk how that works

unkempt bronze
#

Got it. I already made the base UI to stick the buttons in, so... that's almost everything handles for the Impossible Boss

#

(just need to make sure G.FUNCS points to the right value, make sure the buttons show up and work)

#

(and also disabling any scoring hands, but that's the Psychic extende)

umbral spire
#

how can i temporarily lock the game speed at X ? (for a blind)

vernal seal
solid salmon
#

Hey guys heres something a bit complicated, what if i want to make a stat that manipulates certain cards/enhancements description and stats

frosty rampart
daring fern
vernal seal
next timber
#

my edition's shader seems to be hiding the rank and suit of playing cards its applied to? what might be causing this/how could i stop it?

vernal seal
hallow slate
#

How would I get a random consumeable type and a random consumeable from that type pool?

red flower
slim ferry
#

pool is called Consumeables iirc

hushed field
#

Trying to set up a soundtrack to play if a specific deck has been chosen, but oops

frosty rampart
#

the key and the filename have to start with music
(i don't think it's actually both but i'm pretty sure it's at least one of them)

slim ferry
#

filename does i think unless its cryptid doing things for no reason

next timber
#

its not filename, all my music tracks start with mus_

#

i think it mught need a sync property?

slim ferry
#

no

#

sync is optional

next timber
#

ok yeah i just checked with my own music

#

the key does need to start with music

daring fern
next timber
#

oh fair

hushed field
#

It was music_ before at least one of them, but I just did botht o be save, haha

median rose
#

Is there a way to see how many total runs you have attempted on a specific profile?

copper perch
slim ferry
#

i think it might be returning 1 greater than every because youre adding 1 to every in the loc_vars

copper perch
slim ferry
#

well return an additional variable

#

where you dont add 1

copper perch
#

that would be the 'birdbrain' variable, its return doesnt work though

slim ferry
#

why dont you just return card.ability.extra.every again but without adding 1

copper perch
#

I need it to track like loyalty card does for how many hands are left, every isnt the thing changing, birdbrain is

slim ferry
#

oh i see

wild berry
#

how can i modify the chips of a card

slim ferry
slim ferry
wild berry
#

no like

#

modify it directly

slim ferry
#

wdym

#

does hiker not modify it directly

wild berry
#

dont think so

slim ferry
#

what is the goal

wild berry
#

change the chips of the card i want to change

#

like

#

able to subtract

#

and sum it

slim ferry
#

you can also do that

wild berry
#

but i ultimately want to multiply it

slim ferry
#

well if you multiply based on the base chips value too then just card.ability.perma_bonus = card.ability.perma_bonus + (card:get_chip_bonus() * <multiplier> - 1)

wild berry
#

oh

#

thanks

daring fern
copper perch
slim ferry
#

i said the localization entry doesnt exist

wild berry
#

how can i check if a card is a playing card

slim ferry
copper perch
slim ferry
#

or v_dictionary i forgot

frosty rampart
wild berry
#

ty

slim ferry
#

checking card.playing_card should work too i think?

#

i forget what its called

hushed field
#

still trying to solve why the blind gets rendered like this during the round. It's 54x54 instead of 34x34, and the slices in the animation here are definitely 34x34, so I guess it's hardcoded somewhere, but I haven't found a way to solve the issue yet

wild berry
daring fern
wild berry
#

kty

#

same thing

copper perch
rocky plaza
#

Is there a way to display arbitrary text in a config menu using localization such that stuff like {C:attention} or {X:mult,C:white} will apply their visual effects to the text?

slim ferry
slim ferry
#

but then you just do card.base.nominal = card.base.nominal * multiplier

#

if you want specifically base chips

median rose
#

I'm trying to set up a hook that triggers only if a file is deleted. Since the function that does so also handles the warning prompt, I only want the hook to trigger when the warning text is up. This is what I have, but I got a crash saying it doesn't understand what e is. What am I missing?

-- hook.lua
local delete_profile_ref =  G.FUNCS.delete_profile
function G.FUNCS:delete_profile(e)
    local warning_text = e.UIBox:get_UIE_by_ID('warning_text');
    print("Pressed deleting profile button");
    local actually_deleting_profile = warning_text.config.colour == G.C.WHITE

    if actually_deleting_profile then
        print("Actually deleting profile")
    else
        print("File not being deleted yet")
    end
    local ret = delete_profile_ref(self, e)
    -- print("Doing something after the original code")
    return ret
end    
-- button_callbacks.lua
G.FUNCS.delete_profile = function(e)
  local warning_text = e.UIBox:get_UIE_by_ID('warning_text')
  if warning_text.config.colour ~= G.C.WHITE then 
-- warning text appears
  else
-- profile is deleted
    else
      local tab_but = G.OVERLAY_MENU:get_UIE_by_ID('tab_but_'..G.focused_profile)
      G.FUNCS.change_tab(tab_but)
    end
  end
end
median rose
slim ferry
#

for the function creation

#

because using : is equivalent to creating a function with self as the first argument

median rose
#

Can that be changed that on the vanilla wiki?

slim ferry
#

no

tepid crow
#

Card:add_to_deck should have the :

slim ferry
#

yeah

#

Card.add_to_deck does actually have self as the first argument

#

because it is a method

median rose
# slim ferry no

No as in it's correct, or no as in nobody can change it. I'm very confused

slim ferry
#

no as in its correct

tepid crow
#

it can be changed, but it's correct

slim ferry
#

it could be turned into Card.add_to_deck(self, from_debuff) but its effectively the same

#

so theres not really a reason to

tepid crow
#

you could ask them to add a comment or explanation, but you're also getting very into explaining Lua at that point

median rose
#

I'm getting the same nil error as before with this code. Unless you're saying I need to add self as a the first paramter as the function. Sorry, I'm still learning lua while trying to mod at the same time

local delete_profile_ref =  G.FUNCS.delete_profile
function G.FUNCS.delete_profile(e)
    local warning_text = e.UIBox:get_UIE_by_ID('warning_text');
    print("Pressed deleting profile button");
    local actually_deleting_profile = warning_text.config.colour == G.C.WHITE

    if actually_deleting_profile then
        print("Actually deleting profile")
    else
        print("File not being deleted yet")
    end
    local ret = delete_profile_ref(self, e)
    -- print("Doing something after the original code")
    return ret
end    
tepid crow
#

the self in delete_profile_ref(self, e) doesn't belong there

slim ferry
#

how are you running the function

tepid crow
#

a function definition or call with : basically just means "define/call with the first argument being self"

slim ferry
#

are you using debugplus eval or actually pressing the button?

median rose
#

I am pressing the button

slim ferry
#

i see

#

oh yeah

#

the ref

tall wharf
#

what do people think about the reworked config UI

tepid crow
#

wtf are you guys on about

slim ferry
#

that shouldnt have the self either

tall wharf
#

also i can't do multibox here for some reason

hardy viper
slim ferry
#

im so informed

hardy viper
#

tis very cool

cunning valley
#

Any good way of playing a sound when a playing card is retriggered ? I'm going with context.repetition but it's only playing the sound once (when the repetitions starts i assume)

slim ferry
#

context.repetition happens only when the number of times to retrigger is calculated

#

so you would have to manually set a flag in context.individual on the card and then check if thats already there to see if its a retrigger

cunning valley
#

Makes sense, which of course is only once. What would be a possible context for the sound playing? if there even is one

slim ferry
cunning valley
#

Dang, that sounds too complicated for a simple sound effect.

im in

#

Tho I am going to need a bit of a hand here, how does one set flags to individual cards?

slim ferry
#

you can just set a variable of whatever name in the cards ability table

wintry solar
cunning valley
wintry solar
#

It should work

cunning valley
#

It only seems to play the sound once i play a hand, but not when the retriggers happen

wintry solar
#

Can you show the code?

cunning valley
wintry solar
#

Of what you changed it to

cunning valley
#

I tried adding the event in the return panel because I thought that would work, but it just crashed the game so I'm guessing it's not possible to do that

wintry solar
#

That’s not what I said though

cunning valley
#

Oh, what would it be like then?

cunning valley
#

OH

#

facepalm

#

lemme do that rq!!

wintry solar
#

If it doesn’t work I’d have to hop on my pc and check the code again, I am working from memory

cunning valley
wintry solar
#

It’s a bit more complicated that I’d definitely need to check to make it random each time

cunning valley
#

It worked! Though it obviously isn't random since it's looking through a singular audio file

#

I'm gonna experiment a bit see if I can get it to be random, but if you're able to, i'd love to have you give me a hand there

wintry solar
#

It’d be putting in in a func = … instead

wintry solar
#

I don’t remember if it needs the event or not

tall wharf
#

what makes controller input hover show tooltip

tall wharf
cunning valley
zealous glen
#

Yeah the sound key doesn’t play a sound

#

It replaces a scoring sound

#

Very unintuitive

median rose
# median rose I'm trying to set up a hook that triggers only if a file is deleted. Since the f...

So I had to change the function I attached the hook to bc delete_profile makes everything null, and calls load_profile. This code works how I want it to. However, I am now not getting the warning text when I press the reset profile button. It just does resets immeadlty. I'm not sure what I did considering this i all I have in src/hooks.lua I have already verified the files of the game

-- todo When the game loads, set games_played for all profiles to be 0 if it is nil
-- todo When the profile is deleted, set the games played to 0 for that profile
local load_profile_ref = G.FUNCS.load_profile
function G.FUNCS.delete_profile(delete_prof_data)
    local ret = load_profile_ref(delete_prof_data)
    if delete_prof_data then
        print("Actually deleting profile")
        print("Profile set is " .. G.SETTINGS.profile)
        G.PROFILES[G.SETTINGS.profile].career_stats.games_played = 0;
        print("The amount of game played on this file is now ".. G.PROFILES[G.SETTINGS.profile].career_stats.games_played)
    end
    return ret
end  
-- todo When the player starts a new game, increment games_played for that profile
ripe oak
#

Currently having the issue of where if I use a specific consumable during a blind, the game disallows me from doing anything after (can't play or discard, can't use other consumables, etc.), and if I reload back into the save I'm returned to before I used the consumable. Weird thing is it works perfectly fine when used from like a Booster Pack or something. Is there any way to prevent this from happening?

#

or at least force it to give back my controls

ripe oak
zealous glen
#

If it’s not an Event issue then Idk but I imagine you’re either not properly managing the player controls or the game state

ripe oak
#

gotta confess this is literally just the 'All in Jest' "select a card" ui function thing pasted onto a Spectral Card

#

and it works in every single other scenario except when used through a consumable during a blind

zealous glen
#

@gilded narwhal can you help

wintry solar
ripe oak
cunning valley
wintry solar
#

No, the function you put in the return table, put the event inside that

cunning valley
#

😮

#

GENIUS

cunning valley
wintry solar
#

Sort of

wintry solar
#

And put it inside the function

cunning valley
wintry solar
#

Yeah paste the code and will arrange it for you

cunning valley
#
if context.repetition and context.cardarea == G.play then
            func = function()
                G.E_MANAGER:add_event(Event({
                    return {
                        play_sound("jsm_retrigger" .. (math.random(5)), nil, 0.40)
                        repetitions = card.ability.extra.repetitions, -- This gives the amount of retriggers the card holds
                        message = 'Again??',
                    }
                end,
            }))
        end ```
#

Here!

wintry solar
#
if context.repetition and context.cardarea == G.play then
    return {
        repetitions = card.ability.extra.repetitions, -- This gives the amount of retriggers the card holds                        
        message = 'Again??',
        func = function()
            G.E_MANAGER:add_event(Event({                           
                play_sound("jsm_retrigger" .. (math.random(5)), nil, 0.40) 
                return true
            }))
        end,
    }
end ```
#

Badly typed mobile code might be jank

cunning valley
#

mobile code my beloved 🧡

#

This is much appreciated! I'll update you on the results

median rose
#

What is wrong with this code within the main script? the error is occurring on the if statement

-- todo When the game loads, set games_played for all profiles to be 0 if it is nil
for i = 1, 3 do
    print("index is ".. i)
    if(G.PROFILES[i].career_stats.games_played == nil) then
        print("profile " .. i.. "'s games_played is nil. Setting it to 0")
        G.PROFILES[i].career_stats.games_played = 0
    else
        print("profile " .. i"'s games_played is " .. G.PROFILES[i].career_stats.games_played)
    end
end
native bone
#

This has been crashing. I want to give a Negative Food Joker at the end of a shop. I am using Cryptid's Food Joker pool.

median rose
copper perch
# copper perch so would I need a localization file for this or would I be able to get by withou...

Follow up, I now have my localization file but its still bugged out saying 'error' on me calling #3# even though one exists in the localization.

-- Return
    loc_vars = function(self, info_queue, card)
        return {
            vars = {
                card.ability.extra.chips,
                card.ability.extra.every + 1,
                localize { type = 'variable', key = (card.ability.extra.birdbrain == 0 and 'bird_active' or 'bird_inactive'), vars = { card.ability.extra.birdbrain } }
            }
        }
    end,

-- Localization
return {
    descriptions = {
        Joker = {
            j_DRY_Martlet = {
                name = "Martlet",
                text = {
                    "{C:chips}+#1#{} chips every",
                    "{C:attention}#2#{} hands played",
                    "{C:inactive}#3#{}"
                }
            },
        }
    }
}
native bone
#

it was

#

i am going to crash out rn

rapid stag
#

is there a way i can set a custom game over death reason

daring fern
vale grove
#

how do i make a joker change the language of the game while you own/buy it

final jewel
vale grove
#

now im not entirely sure if thatll work

#

its what i do and it works for my guy

final jewel
#

it doesnt work

rapid stag
faint yacht
#

...what do you mean by "reason", exactly?

final jewel
#

It look like that now

rapid stag
solid salmon
#

hey guys

#

what if i wanted to make a stat called miracle rank

faint yacht
#

Ah, UI antics... see create_UIBox_game_over() for the UI table that's returned.

solid salmon
#

that affects all luck jokers

vale grove
daring fern
final jewel
vale grove
#

im not the best at this so maybe it makes sense

#

im just curios what it does here

rigid pebble
#

guys is 5 blinds per ante able to be modded in
asking for a friend

maiden phoenix
# final jewel It look like that now

This is how Cartomancer does it, you're missing a buffer check


            if self.ability.name == 'Cartomancer' and not (context.blueprint_card or self).getting_sliced and #G.consumeables.cards + G.GAME.consumeable_buffer < G.consumeables.config.card_limit then
                G.GAME.consumeable_buffer = G.GAME.consumeable_buffer + 1
                G.E_MANAGER:add_event(Event({
                    func = (function()
                        G.E_MANAGER:add_event(Event({
                            func = function() 
                                local card = create_card('Tarot',G.consumeables, nil, nil, nil, nil, nil, 'car')
                                card:add_to_deck()
                                G.consumeables:emplace(card)
                                G.GAME.consumeable_buffer = 0
                                return true
                            end}))   
                            card_eval_status_text(context.blueprint_card or self, 'extra', nil, nil, nil, {message = localize('k_plus_tarot'), colour = G.C.PURPLE})                       
                        return true
                    end)}))
            end
#

Should have prob sent the VanillaRemade one..

solid salmon
#

or something

#

a global variable

#

oh yeah

#

and i meant all luck related things

final jewel
solid salmon
#

(please help me im a victim of scope creep)

vale grove
#

ohh wait

#

i think i might know what you need

vale grove
#
                if #G.consumeables.cards < G.consumeables.config.card_limit then
                    G.E_MANAGER:add_event(Event({
                        func = function()
                            SMODS.add_card { set = "Tarot" }
                            G.GAME.consumeable_buffer = G.GAME.consumeable_buffer + 1
                            return true
                        end
                    }))
                end
#

i use this

#

for my tarot added

#

G.GAME.consumeable_buffer = G.GAME.consumeable_buffer + 1

#

i think youre missing this line

maiden phoenix
native bone
#

It doesnt crash, but it also doesnt trigger. The idea is to have a 1 in 2 chance of getting a Negative Sol card when using a Planet, but it isnt triggering, unless I am stupendously unlucky, and failed 7 coinflips in a row

#

And yes, that is really the key for Cryptid's Sol, I looked in the source code

midnight trellis
#

Random story: I remember someone struggling with Riff-Raff creating Jokers with stickers on it not too long ago. Today I faced the same issue and found out it's because the should_apply from my stickers was not checking for the proper CardAreas where stickers should be allowed on the Joker. Vanilla stickers are allowed only on Jokers in the shop's and booster packs' CardAreas. Hope it helps that bro and anyone else not lose their sanity.

solid salmon
#

i did something like this