#💻・modding-dev

1 messages · Page 580 of 1

vale grove
#

but there needs to be something inbetween no?

ionic cobalt
#

cant you just remove the id and value jank

lament agate
vale grove
#

otherwise the rest of my code also breaks

slim ferry
#

break just ends the current loop

ionic cobalt
#

since smods.modify rank is already doing thay

lament agate
#

far

#

ai

#

air

slim ferry
#

genius

vale grove
ionic cobalt
#

mf forgot to delete his original code

lament agate
#

better?

vale grove
#

doesnt that end the end the return aswell?

slim ferry
#

it shouldnt

daring fern
vale grove
#

oh i think isee

ionic cobalt
vale grove
#

i just have my ends misplaced

#

bcs now i end the for loop after the return

pastel kernel
#

How do you apply custom color to a splash test from a joker? (Where they say mult, chips or whatever during scoring)

slim ferry
#

en

vale grove
#

dutch reference

slim ferry
#

true/...

vale grove
slim ferry
#

werkelijk...

lament agate
vale grove
#

corect..

#

wait thats also english

#

top 10 slim

ashen drift
#

ok its nil now

#

wtf

slim ferry
# lament agate

theres no way this isnt an smods issue atp how does card become nil

lament agate
#

AUREEEEEEEEEEEEEE

vale grove
#

this "card" thing ur speaking of wtf is that?

lament agate
#

i would ping aure rn

ashen drift
#

card

#

like

#

the joker

slim ferry
daring fern
ashen drift
#

that is executing the calculate function

vale grove
daring fern
#

You need to put it in a variable.

vale grove
#

wait @daring fern where was the has stone = true supposed to go again?

slim ferry
#

why is lua stupid

ashen drift
#

nxkoo you should probably be using context.full_hand

#

and loop through all the cards

vale grove
#

because it currently looks like this and i know thats wrong

slim ferry
#

hit that alt shift F vro

ashen drift
#

for k v in ipairs context dot full hand

frosty dock
vale grove
lament agate
vale grove
lament agate
ashen drift
daring fern
lament agate
#

dont worry, its just lua fuckall

ashen drift
slim ferry
frosty dock
ashen drift
#

it just breaks when it finds a stone card

#

and does nothing

frosty dock
#

context.other_card gets nullified before you use it

vale grove
frosty dock
#

so you need to save it to a local var outside the event

pastel kernel
#

Can I write “colour = {HEX(‘123456’)}” in calculating?

slim ferry
lament agate
#

thats syupd

#

thanks yho

daring fern
vale grove
ashen drift
#

no

#

it should be in the for loop

vale grove
#

bcs it feels out of place when its not in the for loop lol

slim ferry
#

well it should be right before the break

#

yeah

lament agate
vale grove
slim ferry
#

juice_up is a method

ashen drift
#

idk what you want to do here

daring fern
ashen drift
#

cuz has stone does nothing

lament agate
#

ohhhh

#

okay

ashen drift
#

like absolutely nothing

#

maybe you want the function to return the things if has stone is true?

vale grove
#

okay spawning the joker in like this gives

#

which is this line

ashen drift
#

context. full hand doesnt exist

daring fern
ashen drift
#

put a if context.individual and context.cardarea == G.play then before

#

wrap it around the whole thing

vale grove
ashen drift
#

no?

#

it just means that your hand is scoring

#

what are you trying to do here im confused

lost spruce
#

im trying to make it double the poker level why does it always upgrade by 1

vale grove
slim ferry
lost spruce
#

yeah

slim ferry
#

okay that would be why

vale grove
slim ferry
#

talisman turns hand level into a table for bignum/omeganum

#

and if the amount in level_up_hand isnt a number it just becomes 1

vale grove
#

currently I have to do something so I'll be back in a couple hours

ocean sinew
#

just do to_number(G.GAME.hands["Pair"].level)

slim ferry
#

to_number works until the hand level exceeds the default limit

#

which will probably happen with a planet that doubles levels

ashen drift
vale grove
slim ferry
ashen drift
#

oh true

slim ferry
#

and local have_stone = false should be in the context check

#

also the xmult isnt in a context check

lost spruce
ashen drift
#

isnt have stone's position arbritrary

slim ferry
#

i guess

ashen drift
#

the scope is just bigger by a tad bit

#

also xmult should be in the context yeah

#

mb

wild escarp
#

How do I check for when a certain joker triggers?

strong plume
#

Tryign to do the restrictions on a challange, does anyone know why this isn't working? It works with {id ="v_wasteful"}. I have tried t_bstuck_scratch but it also didnt work; is the "t_bstuck" meant to be something else?

slim ferry
#

tags go in banned_tags

#

not banned_other

#

the key is correct

strong plume
#

ohhh, fair fair. thank you!

daring fern
strong plume
wild escarp
wild escarp
#

Nope, will do that now.

hushed field
#

@stiff locust can you show your code? Might be able to tell what's wrong by looking at it

stiff locust
hushed field
#

also, a screenshot of what it's currently drawing would be great!

stiff locust
#

it's drawing everything except the 16 nodes with colours = condition and g.c.green or g.c.red

#

they simply do not show up

hushed field
#

yes but I can't read this code and immediately imagine what it's gonna look like, haha

stiff locust
#

true

#

there's 6 buttons and they are all next to a description and there's a title at the top

#

there's a title at the top but i forgot to include it in the picture :)

#

i haven't balanced or implemented these effects yet

#

i want the 16 nodes to be a resource meter

#

and when you press the buttons the resource meter should go down by the number in brackets

wooden nexus
hushed field
#

Ah, but not animated, right? Just reloads it with less nodes filled up?

stiff locust
#

yeah

#

the buttons recalculate the UI

#

so the nodes should update their colours

#

if the nodes showed up at all

hushed field
#

i don't see why the colours wouldn't update. But you're saying the things don't get drawn at all, right?

stiff locust
#

yeah

hushed field
#

UI code is a bitch to read so give me a sec to parse it a bit more thoroughly, haha

stiff locust
#

gotcha

hushed field
#

if you remove the condition, and just make it green by default, does it get drawn? Because you mentioned it working without the colour change, no?

wild escarp
#

How would I check if a card is a playing card?

stiff locust
hushed field
daring fern
hushed field
#

as opposed to joker

#

oh whoops

#

should've realized there's an easier way, hahaha

plain gazelle
#

how do I set consumable type name in SMODS.ConsumableType so it won't be like that

hushed field
stiff locust
#

ye

daring fern
paper lava
#

real quick, how do i check if a playing card has no enhancement

daring fern
pastel kernel
hushed field
#

need to convert a bit too many things to set it up and I need to leave in a sec, so can't use debugplus to watch the file atm, sadly

daring fern
hushed field
#

But could you do something for me, Marie? If you make 2/3 colours (I'd personally just set them in the function itself), and alternate them for each subsequent node, it'd be a lot easier to see which ones are getting drawn and which ones aren't

pastel kernel
#

Oh wait

#

I’m fucking stupid 😭

hushed field
#

Because I'm assuming the main issue won't be that nothing gets through. In my experience, UI stuff is mostly just incorrect nesting or syntax, and it just takes some tricks to find the place where you're missing brackets for example

pastel kernel
#

I think it should work now

hushed field
#

Because it'd be very handy to know up to which node does get drawn, and where it gives up

pastel kernel
#

“the guy wrote self, info_queue, card instead of self, card, context, laugh at him”

stiff locust
strong plume
#

ough last question regarding challanges: someone know why this voucher ain't getting banned?

stiff locust
#

i couldn't get all 16 on screen but none of them draw

pastel kernel
#

“THE GUY ALSO FORGOT TO ADD CONTEXT.MAIN_EVAL 😭”

pastel kernel
#

I’m so fucking stupid bruh

strong plume
slim ferry
#

all centers go into banned_cards afaik

pastel kernel
#

In what situation would I not include main_eval in an end_of_round thing

stiff locust
#

when you want it to trigger 8 times for the funny

slim ferry
#

for effects on playing cards at the end of round

keen atlas
slim ferry
#

main_eval is true when no secondary cards are being evaluated

stiff locust
#

whuh

red flower
#

you should always use either main_eval, individual or repetition

stiff locust
keen atlas
#

you are meant to put the G.UIT.R inside the node or the content, depending on what you need

#

or, you misplaced the bracket

pastel kernel
#

Why is my XChips not xchipsing

stiff locust
#

oh

#

I did misplace a bracket

#

ah shit

#

okay progress

#

the box has rendered

#

the box is empty but it's working

daring fern
slim ferry
#

thats effectively the same

#

i cant think of anywhere where that would be different from no secondary card

stiff locust
#

well that's progress but none of the colour nodes are showing up

daring fern
slim ferry
#

e.g. context.other_card

#

like another card being used in calculation

#

im just stealing the wording from here though idk if it has a better term

#

and the lsp definition also gives the same description

stiff locust
#

yeah okay now it's definitely the colours' fault

pastel kernel
#

I'm doing something wrong but what?

    calculate = function(self, card, context)
        if context.joker_main then
            return {
                Xchips = card.ability.extra.Xchips
            }
        end
        if context.end_of_round and context.main_eval then
            if context.ante_change and context.ante_end then
                card.ability.extra.Xchipsincrement = card.ability.extra.Xchipsincrement * card.ability.extra.Xchipsincrementmultiplier
                return {
                message = localize { type = 'variable', key = 'a_xmult', vars = { card.ability.extra.Xchipsincrementmultiplier } },
                colour = HEX('00FFFF')
                }
            else
            card.ability.extra.Xchips = card.ability.extra.Xchips + card.ability.extra.Xchipsincrement
                return {
                message = localize { type = 'variable', key = 'a_xmult', vars = { card.ability.extra.Xchips } },
                colour = HEX('00FFFF')
            }
            end
        end
daring fern
slim ferry
#

main_eval would always be false there

#

or nil since i dont think its even passed into the calculation

#

because post_trigger always has another card

daring fern
hushed field
stiff locust
#

i don't know what else to check other than

lavish elm
#

how to modify the current values of a joker in your joker slots

stiff locust
#

I guess these are all R nodes?

#

if I set them all to C will they appear above each other

#

that's not what I want

pastel kernel
#

fuck did i do wrong now

slim ferry
daring fern
pastel kernel
slim ferry
#

the actual description i imagine is just for contexts where both main_eval and not main_eval would be possible

#

since in contexts where theres always/never a secondary card it doesnt make sense

daring fern
hushed field
pastel kernel
# daring fern Remove `if context.end_of_round and context.main_eval`
 },
    loc_txt = {
        name = "{V:1,s:2}Stultus Astronomicus{}",
        text = {
            "Gains {X:chips,C:white}X#2#{} chips at the end of the round.",
            "Multiply gained {X:chips,C:white}XChips{} by {B:1,C:white}#3#{} at the end of the ante.",
            "{C:inactive}(Currently {X:chips,C:white}X#1#{C:inactive} chips){}"
        }
    },
hushed field
#

Always alternate 'm

stiff locust
#

but if i make them C nodes do they go vertical

hushed field
#

Otherwise you'll get them being drawn in unexpected places

frosty rampart
hushed field
#

No, because they're in a row. Stuff inside of 'm would be sorted in a column, but the nodes wouldn't

frosty rampart
pastel kernel
#

but it doesn't seem to work either

stiff locust
slim ferry
#

you cant stack C nodes in C nodes either if thats what youre doing

stiff locust
#

im not

#

i have an R node that contains sixteen C nodes

#

the sixteen C nodes arent there

#

but the R node is

#

even if I remove the variable colours it doesn't show up

pastel kernel
#
calculate = function(self, card, context)
        if context.joker_main then
            return {
                xchips = card.ability.extra.Xchips
            }
        end
        if context.end_of_round and context.main_eval then
                card.ability.extra.Xchips = card.ability.extra.Xchips + card.ability.extra.Xchipsincrement
                return {
                message = localize { type = 'variable', key = 'a_xmult', vars = { card.ability.extra.Xchipsincrementmultiplier } },
                colour = HEX('00FFFF')
                }
            end
        if context.ante_change and context.ante_end then
            card.ability.extra.Xchipsincrement = card.ability.extra.Xchipsincrement * card.ability.extra.Xchipsincrementmultiplier
                return {
                message = localize { type = 'variable', key = 'a_xmult', vars = { card.ability.extra.Xchips } },
                colour = HEX('00FFFF')
                }
            end
        end
stiff locust
#

waaait

pastel kernel
#

like this?

stiff locust
#

I didn't assign a min height

pastel kernel
slim ferry
#

also why are you doing HEX("00FFFF") every time instead of like G.C.CHIPS

slim ferry
#

okay

stiff locust
#

okay the nodes appear now

#

thats progress

pastel kernel
#

again

#

the incrementer is not affected by the multiplier

stiff locust
#

the variable colours still aren't working

#

even after I recalculate the UI

slim ferry
#

to modify other jokers that is

#

a joker can modify itself quite easily

daring fern
slim ferry
#

wtf

lavish elm
slim ferry
#

seals on everything has value manip?

slim ferry
#

also not every api is like smods

pastel kernel
slim ferry
#

cryptlib requires smods

floral marsh
#

where can I grab already spawned vouchers in the shop
so that I can destroy them with :shatter() or smth

daring fern
pastel kernel
lavish elm
#

so where do I find crptidlib?

pastel kernel
daring fern
wooden nexus
#

I can't figure out why my challenge is crashing

daring fern
wooden nexus
pastel kernel
daring fern
pastel kernel
daring fern
lost spruce
floral marsh
#

I love the minecraft map

slim ferry
#

what do they do

#

also where secret hands...

lost spruce
lavish elm
#

so do I just put the folder in the mods folder?

slim ferry
#

yes, its a mod

daring fern
slim ferry
#

though you can also just

#

copy the function

lost spruce
slim ferry
#

since using a library for 1 function is like

#

not really needed

floral marsh
#

omg

pastel kernel
#
        if context.end_of_round and context.main_eval then
                card.ability.extra.Xchips = card.ability.extra.Xchips + card.ability.extra.Xchipsincrement
                return {
                message = localize { type = 'variable', key = 'a_xmult', vars = { card.ability.extra.Xchipsincrementmultiplier } },
                colour = HEX('00FFFF')
                }
            end
        if context.ante_change and context.ante_end then
            card.ability.extra.Xchipsincrement = card.ability.extra.Xchipsincrement * card.ability.extra.Xchipsincrementmultiplier
                return {
                message = localize { type = 'variable', key = 'a_xmult', vars = { card.ability.extra.Xchips } },
                colour = HEX('00FFFF')
                }
floral marsh
#

my favorite hand leveled up by ^2

pastel kernel
#

i still have problem

wooden nexus
#

though tbf, i'm using lovely to implement the challenge

ashen drift
#

what do i need to patch to edit the shop

wooden nexus
slim ferry
#

banned_cards can also be a function that returns a table

#

fyi

#

you dont gotta do allat

floral marsh
#

anyways hum guys how do I get a list of all shop cards

lavish elm
#

how to use manipulate?

wooden nexus
floral marsh
#

so I can destroy all vouchers in a specific case

ashen drift
#

nvm im just gonna copy entropy code

slim ferry
wooden nexus
#

What? Code it in smods

slim ferry
#

no

#

make it a function

daring fern
slim ferry
#

you should be able to make it a function unless it just isnt an smods mod at all

floral marsh
#

how did I miss that

wooden nexus
#

I'm still rusty, wdym make it a function

slim ferry
wooden nexus
#

no i can't do that

slim ferry
#

why not

wooden nexus
#

it's lovely not smods

slim ferry
#

are you just not using smods at all

wooden nexus
#

not for the challenge, no

slim ferry
#

well

#

you can still do that as long as smods is there

#

because smods adds the ability for challenges to use functions for bans

ashen drift
#

nvm i have no idea where ruby put the thing

ashen drift
lavish elm
slim ferry
#

the challenge doesnt need to be made with smods

#

to do the function thing

pastel kernel
#

GRRRRRRR

#

I FUCKING HATE THIS

wooden nexus
#

Why would i need banned_cards as a function anyway

slim ferry
#

because

#

thats easier than manually putting in every key?

pastel kernel
#

YOU'RE NOT DOING ANYTHING, "END OF ANTE" CONTEXT

if context.ante_change and context.ante_end then
wooden nexus
#

yeah i'm not understanding ya with what the smods.challenge is saying

#

restrictions.banned_cards: Expects a list of tables with keys to ban in their id fields.

ashen drift
slim ferry
#

its smods docs though

#

i know about the function thing from N'

wooden nexus
slim ferry
#

yes

pastel kernel
daring fern
pastel kernel
#

Cryptid.

#

Ascensio.

#

Entropy.

#

Jest.

#

SUMod.

#

Starspace

slim ferry
#

why are you testing with so many mods on

pastel kernel
#

3x Credits

stiff locust
#

but I need the variable colours

daring fern
stiff locust
#

how did you get it to work

pastel kernel
slim ferry
#

well

#

its not like this joker is going to break other mods

#

and you wont know if its your mod or another mod if you have like 10 other mods installed

wooden nexus
#

Yeah, H'. I'm not getting this. Something must've changed in the updates that's causing my stuff to break so I'm just gonna just try something

daring fern
pastel kernel
slim ferry
#

just

#

dont have entropy

pastel kernel
#

But I love entropy

slim ferry
#

well yeah but its actively making your joker not work

pastel kernel
#

Then i’ll change it

slim ferry
#

plus

#

entropy will probably have that fixed in an update anyway

daring fern
#

Which is only in the dev version.

lavish elm
#

hey so I downloaded cryptlib and added its path my to my libraries in my luarc. is there anything else I should do?

slim ferry
#

its still an issue with entropy though no?

#

if its just removing a whole context

wooden nexus
#

Okay so it's literally a bug with me implementing the challenge through lovely

#

I got an idea

pastel kernel
#

Can I still just ante_change?

wooden nexus
#

I'm gonna use my jank method of implementing it through lovely then take ownership in smods

slim ferry
#

yeah ante_change should still work

pastel kernel
#

It’s more broken that way

wooden nexus
#

I know it works with jokers at least so it's gotta work with challenges

#

HAH. MY JANK METHOD WORKED

pastel kernel
#

IT WORK

wintry solar
pastel kernel
#

ASTRO WORKS

#

Ante_change better

pastel kernel
robust marsh
#

How do achievement atlases work? I've seen there are atlases for when the achievement is locked and unlocked and idk where to start exactly since I do wanna make a sprite sheet first

stiff locust
#

they're a specific size

#

66 by 66

robust marsh
#

i know that much

stiff locust
#

other than that they work like any other atlas

#

you assign a sprite for when an achievement is locked or unlocked

#

hidden_pos is the locked sprite and pos is the unlocked sprite

#

those are defined inside each achievement

robust marsh
#

thank you

lost spruce
pseudo furnace
#

I want to detect alternating suits but it's not working, any ideas?

red flower
#

im looking at this one in a sec but in the other screenshot you posted not fivewhatever == {} is wrong

#

btw

pseudo furnace
#

Oh really?

#

I'll go check 😅

#

Ahh I think I had that fixed 😛 thanks

red flower
pseudo furnace
#

This somehow sounds like a beginner coding error 😅

#

On it!

pseudo furnace
#

I separated all the ors into their elseif statements and changed the smod part

red flower
#

can i see how it looks

daring fern
pseudo furnace
#

Lemme double check my code first before I make a fool 🤪

pseudo furnace
red flower
#

oh yeah something is right

daring fern
pseudo furnace
#

Hmm, still nope

#

Getting a lil large to screenshot

red flower
#

i think you misunderstood the or thing

pseudo furnace
#

Oh

red flower
#

the suit condition was fine

#

the 'any' or 'black' is wrong

daring fern
pseudo furnace
#

Ohhhh

#

My bad

#

Heeeyy! It's working now, thanks so much

#

This chat is amazing really

lavish elm
#

hey is there any resources for cryptlib or am I just screwed?

slim ferry
#

there arent

#

also 99% of the time youre better off just stealing its functions

#

because dependencies are annoying as of now

wintry swallow
#

im trying to make a meme joker for a test to get better before doing a full mod and when i run this piece of code could you please explain why the joker gives 0X mult here is the code "SMODS.Atlas {
key = "Jokers",
path = "Jokers.png",
px = 71, py=95
}
SMODS.Joker {
key = "Gay_Joker",
cost = 1,
loc_txt = {
name = "Gay Joker",
text = {
"Adds {X:mult,C:white} X#1# {} Mult",
" for each Gay Joker.", "If a straight is played,",
"you lose the run instantly."
}
},
atlas = "Jokers",
pos = { x = 0, y =0 },
config = {
extra = { Xmult = 628 }
},
loc_vars = function (self, info_queue, center)
return {
vars = {center.ability.extra.Xmult}
}
end,
calculate = function (self, card, context)
if context.joker_main then
local gays = SMODS.find_card("Gay_Joker")
local count = #gays
return {
card = card,
Xmult_mod = card.ability.extra.Xmult * count,
message = "X" .. card.ability.extra.Xmult * count,
colour = G.C.MULT
}
end
end
}"

daring fern
gusty iron
#

how would i change the enhancement of a card?

daring fern
wintry swallow
floral marsh
#

what do I hook if I want to lower the final score of every hand played if I cannot use a calculate function

still cedar
#

Why this error appear?

daring fern
frosty rampart
#

vremade is the mod prefix for vanillaremade. you need to use the prefix for your own mod

daring fern
frosty rampart
#

ah right

still cedar
#

Thanks

vale grove
#

i dont really understand why but i have it so every joker is 71 by 95, however when following this there's always a little bit of the other joker that laps into the next one

idle plaza
vale grove
#

heres my atlas btw

vale grove
idle plaza
#

The Atlas looks correct, so I can only assume it's an issue with the image. But if you don't show the image itself, there's no way to know what's wrong, if anything.

vale grove
#

this is currently my amazing selection of jokers

#

in 2x

wintry solar
#

Jokers are actually 69x93

vale grove
#

wait i do see an issue

wintry solar
#

With a 1px border

#

Otherwise you get bleeding

vale grove
#

okay ill just make every joker 2x by 2x smaller then?

slim ferry
#

yeah

#

apparently theres like

#

rendering issues with taking up the full 71x95

stiff locust
#

hey chaat

#

i'm still trying to do variable colours in a uibox and it's almost working

#

but the menu recalculate function doesn't appear to be working

#

even when I run it manually the UI doesn't update when the colours are supposed to change

#

idk what to doo

#

is there another way I can get it to redraw the UI

#

currently using G.OVERLAY_MENU:recalculate() and it's doing nothing

wild berry
#

why doesnt this work?

faint yacht
#

"11"

wild berry
stiff locust
#

all my homies hate smods.chnage_base

wild berry
#

i did "Jack" and it worked

faint yacht
#

Right, that takes a "key", not numerical ID.

vale grove
#

the full joker including border

#

should be 71x95?

slim ferry
#

yes

vale grove
#

okay than the past hour of styling

#

wasnt for nothing

slim ferry
#

well

#

there should be a 1 pixel gap between the edge of the 71x95 area ofc

wintry swallow
#

is there anyway i can add a button on the options screen as i want to make a mod with completley different gameplay so i would like to use the balatro window without any balatro on it.

vale grove
#

taking this one as example

#

you can see it has like 1/2 px border from the other joker right?

slim ferry
#

yeah

vale grove
#

this is what the border inbetween them looks like

#

isnt this what im supposed to do ?

slim ferry
#

no the one on the left is touching the edge of its area

#

it should be moved one pixel over to the left

vale grove
#

with one border

slim ferry
#

no?

vale grove
#

wdym?

#

currently its 71

#

with one space in between

slim ferry
#

the full area is 71x95 and you should be using 69x93 of it

vale grove
#

what youre suggesting is making it 70 with one in between right

vale grove
slim ferry
#

thats like 1 grid space in the atlas

vale grove
#

im so confused

rotund sable
#

Full area as in the sprite by itself is taking that

#

And sprites are next to eachother without any border to separate them

vale grove
#

bcs i dont understand ts

slim ferry
#

that

#

wont work

#

you only need to cut off 1 pixel off the right of the rightmost sprite

vale grove
#

no i mean like

slim ferry
#

i meant

#

leftmost

#

the sprite in the top left

vale grove
#

oh

slim ferry
#

uh

idle plaza
#

Here, just look at the vanilla jokers.png as an example of how yours should be laid out.

slim ferry
#

yeah theres 2 pixels between each card

vale grove
#

(and all the others except the left most)

wild escarp
#

How could I make a challenge start off with one random card? I tried removing all but one card in apply, but it seems like G.deck and G.playing_cards don't exist yet when apply runs.

slim ferry
#

that should work

vale grove
#

okay

slim ferry
vale grove
#

im praying this works bcs im sick and tired of sprite things its been over an hour 😭

wild escarp
slim ferry
#

you know how events work right?

wild escarp
#

Uh, not really, I just use them based off when they're used in vanilla remade.

slim ferry
#

well

#

you can just

#

copy your current code for changing the deck

#

and put it in an event

wild escarp
#

Alright, got it

vale grove
#

okay so completely different question i have a joker that functions almost entirely the same as drunkard

#

how do i make it play a stupid sound at the start of the round

true jasper
vale grove
#

do you happen to know?

idle plaza
#

if context.setting_blind then

true jasper
true jasper
idle plaza
#

lol

vale grove
#

do you also happen to know the one for purchasing/obtaining the joker?

#

(obtaining as in pulling it from judgement buying it as in yk)

idle plaza
#

if context.card_added and context.cardarea == G.jokers then

frosty rampart
#

outside of the calculate function, you can do stuff in an add_to_deck function which runs when the card is first obtained in any way. make sure to check if not from_debuff unless you want it to also play the sound whenever it gets undebuffed
https://github.com/Steamodded/smods/wiki/SMODS.Joker

frosty rampart
vale grove
frosty rampart
#

sure if you want that

vale grove
#

the joker im making this for a gravity coil from roblox

#

it going boioioioing when you buy a joker is low kfunny

vale grove
#

this works when obtaining another joker

#

not itself

#

however

#

i do like that it works when obtaining other jokers

#

its funny

#

the only issue is it doesnt do it when obtaining itself

#
        if context.setting_blind then

and this also doesnt work

#

(for context if it matters my joker gives +2 discards -1hands)

idle plaza
#

What's your full calculate function for the joker right now?

frosty rampart
#

for obtaining itself do the add_to_deck thing i told you about

vale grove
#

this thing lol

#

add_to_deck is outside of it

#

wait no

#

this is outside of it

vale grove
frosty rampart
#

yea just add a play_sound call to the add_to_deck function

vale grove
#

i was making a seperate function

#

but thats so much easier

idle plaza
# vale grove this thing lol

Instead of a second if you can just do

if (context.card_added and context.cardarea == G.jokers) or context.setting_blind then

Since both contexts lead to the same result.

(Your issue is that with how your calculate function is laid out currently, your second if is actually inside the first if, in such a way that it can never trigger.)

vale grove
#

yeah ur so right i completely forgot thats how that works

#

summer break no programming projects really made me forget alot

snow breach
#

What's the function that triggers when a joker is being destroyed, and is there a way to identify the joker that destroyed it?

snow breach
#

So if madness destroys my joker, I can't do anything to alter the madness?

paper lava
#

right so i have a weird issue
im making a boss blind that changes the suits of played card

#

the issue is, the cards are changing suit before the cards/blind wiggle

#

if i put the :change_suit inside the event, then the cards look like they've changed, but jokers will act on the suit prior to change
i.e.

club flush
boss scrambles suits into complete random
onyx agate does +7 on all 5 cards

nova orchid
#

how do i put my consumables into my booster thing? (i also do not want them to be immediately used)

daring fern
frosty rampart
#

change_base can take a fourth argument? it's totally undocumented on the wiki or even in the lsp_def

#

ope yea i see it in the source code for the function itself

nova orchid
#

how do i do what i asked

frosty rampart
nova orchid
#

how the heck do i make a pool

#

i'm new to this

#

also i read the docs but they make no sense to me

#

or atleast this one

frosty rampart
#

ok i assume you do just have some custom tarots/spectrals/planets that you want to have their own booster pack
you'll want to create a new SMODS.ObjectType, set the key to whatever you want to name the pool and set the cards table to include all your consumables (the full key, i.e. c_yourmodprefix_yourconsumablekey)

then, copy example 2 from the screenshot i showed into your SMODS.Booster object, remove the edition part and fill in your mod prefix for the key_append, and change set to equal the key you gave your ObjectType

loud summit
#

hi

#

how do you apply a seal to 1/3 of the deck in a challenge?

#

how do you run a function when starting a challenge deck

loud summit
#

thx

#

i assume using pseudorandom_shuffle(G.deck) and looping through it x times would functionally apply a seal to that many cards right

loud summit
paper lava
#

instead of randomizing suits, it changes a card to stone

daring fern
paper lava
#

the issue is, the sprite of the card dissapears when the enhancement is changed internaly

paper lava
#

yeah, but can i make the card sprite not dissapear until i explicitly update it (line 403)

loud summit
#

how do you make a challenge unlocked by default

daring fern
paper lava
#

hook?

loud summit
# daring fern `apply`

is using challenge apply to modify the deck bad form? should i go the long way and add a game modifier?

daring fern
loud summit
#

that was fasrt

robust marsh
#

How would I replace the atlas for the Balatro logo? Not the card, but the logo specifically

loud summit
#

look at how ortalab does it

daring fern
loud summit
#
SMODS.Challenge {
    key = "moderntech",
    unlocked = function() return true end,

    rules = {
        custom = {
            {id = "no_shop_jokers"}
        }
    },
    jokers = {
        {id = "j_nflame_opensource", eternal = true}
    },
    consumeables = {
        { id = "c_judgement" },
        { id = "c_judgement" }
    },

    apply = function(self)
        local deckfix = G.deck
        pseudoshuffle(deckfix, "nflame_moderntech")

        local affected = 17
        for _, v in ipairs(deckfix) do
            v:set_seal("cry_green_seal")
            affected = affected - 1
            if affected < 0 then break end
        end
    end
}``` does anything stand out
#

my challenge either isnt showing up or is locked

#

creating a challenge?

daring fern
mystic river
#

last i checked challenge unlock functions don't actually work

#

or booleans for that matter

ivory citrus
#

Hi, i'm doing a challange and i attempt set the tarot and planet rate to 0 but i dont know how to do it

#

I try this but dont work

daring fern
loud summit
#

how do you spawn a perishable joker to a challenge

cursive gazelle
#

Work

loud summit
#

yeah

ivory citrus
loud summit
#

the word perishable ONLY appears in the non perishable challenge

cursive gazelle
#

There’s a challenge that adds a pinned dagger

#

Change the joker key and sticker

loud summit
#

pinned is a supported argument tho

#

    id (required): The key of the joker to create.
    edition: The edition of the joker, if any, given without the e_ prefix.
    eternal: If the joker is eternal.
    pinned: If the joker is pinned.

#

perishable isnt

gusty iron
#

The evil deck

cursive gazelle
#

Change eternal to perishable

loud summit
#

oh

#

its just that?

gusty iron
#

How would I give all playing cards that appear in the shop an edition?

cursive gazelle
ivory citrus
daring fern
ivory citrus
loud summit
daring fern
daring fern
rotund sable
#

Idk why I have a feeling this question will pop-up

cursive gazelle
#

You saw through it honestly

ivory citrus
daring fern
gusty iron
#

how do i get the current deck again?

robust marsh
gusty iron
daring fern
robust marsh
ivory citrus
gusty iron
#

okay

#

NOW TO MAKE A TABLE OF ALL THE INCREMENTAL ENHANCEMENTS!!

daring fern
robust marsh
#

i'm slow i just realized G.GAME.selected_back just checks if you have a deck selected

rotund sable
loud summit
#

OH ITS JUST STICKERS = {}

cursive gazelle
#

Idk why would perishable not work when eternal and pinned does

loud summit
#

its just not a native switch like eternal and pinned is

#

you have to apply it directly with stickers = {} apparently

sonic cedar
#

good evening modding dev i had forgotten to say i finally released the new version of hpfx

#

thanks for all the help

ivory citrus
gusty iron
#
function CardArea:emplace(card, location, stay_flipped)
    if G.GAME.selected_back.effect.center.key == "b_JCJ_incremental_pack" then
      
        local roll = pseudorandom('incremental_pack')

        
        local pool
        if roll <= 0.05 then
            pool = rares
        else
            pool = normal_gains
        end

      
        local ability, index = pseudorandom_element(pool, 'incremental_pack')
        card:set_ability(ability)
    else
        return cae(card, location, stay_flipped)
    end
end

this is bugging for some reason, ive attached what it says is crashing, any help?

gusty iron
frosty rampart
#

if it has the colon i don't think you need to pass self

rotund sable
frosty rampart
#

oh that yea

rotund sable
gusty iron
#

where do i put the self

#

as the first?

rotund sable
#

Yes

gusty iron
#

think i mightve did something...

daring fern
daring fern
gusty iron
#

or well

#

an enhancement from a list i have

daring fern
# gusty iron every card generated has a randomly selected enhancement
local oldcardareaemplace = CardArea.emplace
function CardArea:emplace(card, location, stay_flipped)
    local g = oldcardareaemplace(self, card, location, stay_flipped)
    if (self == G.shop_jokers or self == G.shop_vouchers or self == G.shop_booster) and card.playing_card and (G.GAME.selected_back and G.GAME.selected_back.effect and G.GAME.selected_back.effect.center and G.GAME.selected_back.effect.center.key == 'b_modprefix_key') then
        card:set_ability(SMODS.poll_enhancement({guaranteed = true}))
    end
    return g
end
gusty iron
#

wait how would i exclude cards from the deck from having this

daring fern
gusty iron
#

i have a starting set of 52 cards with enhancements

clear ocean
daring fern
clear ocean
#

is it the same for booster size mod

daring fern
clear ocean
#

it works thank you 👍

daring fern
gusty iron
rigid solar
#

Does anyone know if there's an equivalent to the set_sprite_pos function but for the soul sprite?

gusty iron
daring fern
rigid solar
daring fern
rigid solar
#

ah floating sprite ok

wispy falcon
#

I know this isn't really the right channel but I asked in modding chat and they ran out of ideas why my game crashes when I start it with Talisman activated. All other mods are deactivated, I reinstalled Talisman, the folder isn't nested and I'm using the newest releases but I stil get this crash every time

rotund sable
wispy falcon
gusty iron
#

...small issue.

wispy falcon
stiff locust
clear ocean
rotund sable
wispy falcon
rotund sable
#

¯_(ツ)_/¯

stiff locust
#

go check it and see what it says and we might be able to trace back the problem

#

main.lua line 1476

daring fern
gusty iron
rotund sable
gusty iron
rotund sable
#

Uhh

jolly shadow
#

pack_cards

#

i think

#

<@&1133519078540185692>

rotund sable
frosty rampart
#

yea G.pack_cards

rotund sable
#

No embed

#

<@&1133519078540185692> ²

#

Smh

wispy falcon
# stiff locust go check it and see what it says and we might be able to trace back the problem

if not check then
                        if not Talisman or not Talisman.config_file.disable_anims then
                            G.E_MANAGER:add_event(Event({
                                func = function() 
                                    local new_card = copy_card(card, nil)
                                    new_card.ability.immutable.overflow_amount = 1
                                    new_card:set_edition("e_negative", true)
                                    new_card:add_to_deck()
                                    new_card.ability.split = true
                                    G.consumeables:emplace(new_card) 
                                    new_card.split = nil
                                    return true
                                end
                            }))
                        else    
                            local new_card = copy_card(card, nil)
                            new_card.ability.immutable.overflow_amount = 1
                            new_card:set_edition("e_negative", true)
                            new_card:add_to_deck()
                            new_card.ability.split = true
                            G.consumeables:emplace(new_card)
                            new_card.split = nil --This line is 1476
                        end
                    end

--stuff```
frosty rampart
#

wow you're really trying huh buddy
i'm sure it'll embed the third time :3

stiff locust
#

take a screenshot of the lines around it

gusty iron
#

same thing.

rotund sable
wispy falcon
daring fern
gusty iron
# daring fern Code?

i played around with some of the formatting so randomization would be easier, but here:

local oldcardareaemplace = CardArea.emplace

function CardArea:emplace(card, location, stay_flipped)

    local g = oldcardareaemplace(self, card, location, stay_flipped)


    if (self == G.shop_jokers or self == G.shop_vouchers or self == G.shop_booster or self == G.pack_cards) 
        and card.playing_card 
        and G.GAME.selected_back 
        and G.GAME.selected_back.effect 
        and G.GAME.selected_back.effect.center 
        and G.GAME.selected_back.effect.center.key == 'b_JCJ_incremental_pack' then


        local roll = pseudorandom('incremental_pack')
        local pool = (roll <= 0.05) and rares or normal_gains

        local ability = pseudorandom_element(pool, 'incremental_pack')


        card:set_ability(ability)
    end

    return g
end
wispy falcon
stiff locust
#

gifs are blocked i hate this place

gusty iron
wispy falcon
ivory citrus
#

I banned all the tarots and planets but the strength and pluto still appearing

true jasper
ivory citrus
#

oh, then i must set the planet and tarot rate to 0

true jasper
#

Set the consumable types weight to 0 to make them not show up

ivory citrus
timid zinc
#

How do i access a consumable's key?

daring fern
timid zinc
long sun
#

how can i get all cards that didn't score, in context.before?

daring fern
long sun
#

awesome, thanks :D

wispy falcon
#

Wait, line 1476 changed. It's now attempt to call nil value with this line: Notations = nativefs.load(talisman_path.."/big-num/notations.lua")(). Why is that a nil value when I start the game with talisman?

static valley
#

figured out how to make it instantly win if you collect all 5 pieces of exodia
(they're all each uncommon, so it would be a pretty low chance you'd actually end up getting them all)

gusty iron
daring fern
gusty iron
urban wasp
#

this always plays for some reason

SMODS.Sound({
    key = "music_22exomythic4mecipe",
    path = "music_22exomythic4mecipe.ogg",
    volume = 1.5,
    select_music_track = function()
        -- check if the music_22exomythic4mecipe setting is enabled
        --[[
        if not (cryptposting_config and cryptposting_config.music_22exomythic4mecipe) then
            return false
        end
        ]]--
        if (#Cryptid.advanced_find_joker(nil, "crp_22exomythic4mecipe", nil, nil, true))
        or (#Cryptid.advanced_find_joker(nil, "crp_exomythicepicawesomeuncommon2mexotic22exomythic4mecipe", nil, nil, true))
        or (#Cryptid.advanced_find_joker(nil, "crp_supa_rare", nil, nil, true)) ~= 0 then
            return 1.2e308
        --[[
        else
            return false
        ]]--
        end
    end,
})

ignore the commented out stuff was for config things but are now just waiting to be eventually fixed by procrastinating me

ivory citrus
#

I set all to 0 and still appearing 😔

daring fern
urban wasp
# daring fern It's `if next(Cryptid.advanced_find_joker(...))`

still always plays

SMODS.Sound({
    key = "music_22exomythic4mecipe",
    path = "music_22exomythic4mecipe.ogg",
    volume = 1.5,
    select_music_track = function()
        -- check if the music_22exomythic4mecipe setting is enabled
        --[[
        if not (cryptposting_config and cryptposting_config.music_22exomythic4mecipe) then
            return false
        end
        ]]--
        if next(Cryptid.advanced_find_joker(nil, "crp_22exomythic4mecipe", nil, nil, true))
        or next(Cryptid.advanced_find_joker(nil, "crp_exomythicepicawesomeuncommon2mexotic22exomythic4mecipe", nil, nil, true))
        or next(Cryptid.advanced_find_joker(nil, "crp_supa_rare", nil, nil, true)) ~= 0 then
            return 1.2e308
        --[[
        else
            return false
        ]]--
        end
    end,
})
urban wasp
#

ah

hidden mirage
#
        if context.after then
            for _, card in pairs(context.scoring_hand) do
                card:set_ability(G.P_CENTERS.m_stone, nil, true)
                G.E_MANAGER:add_event(Event({
                    func = function()
                        card:juice_up()
                        return true
                    end
                    
                }))
            end
        end
    end```hey,  how do i make the scoring cards not go blank during scoring?
willow scroll
#

if i see this upon booting up the game with a mod, did i fuck up or did the mod dev fuck up

hidden mirage
willow scroll
#

nope nvm

#

ignore me

daring fern
willow scroll
#

as far as im aware stone inherently hides the card front as soon as its applied

hidden mirage
#

which they do but then it oesnt make sense for them to look like tone when they arent stone yet

willow scroll
#

this is probably an event timing issue, return a func() with the transformation applied there

daring fern
willow scroll
#

okay i might not be reading correctly, is the problem that they visually become stone cards too early or some other shenanigans

hidden mirage
hidden mirage
willow scroll
#

ah well nice that it worked

nova orchid
#

what is the easiest way to test my mods

willow scroll
nova orchid
#

like if i added a new joker or consumable or booster pack, what would the easiest way to test that be

nova orchid
#

i have debugplus but i can't figure out how to do those with it

willow scroll
#

click 3 while hovering over the desired card in collections menu

#

better yet, in game, hold tab

#

youll see all debugplus shortcuts on the side

urban wasp
#

what's the key for the money/dollars sound?

hidden mirage
#

how to put a delay() after returning a message? im guessing with an event but i dont know how to put messages in there

daring fern
nova orchid
#

i'm making a custom enhancement, what should the texture look like??? i honestly have no idea how enhancement textures are formatted

urban wasp
#

as you see them in the collection

loud summit
#

so what are "badges" in the enhancement code

jolly shadow
#

badges are the lil text on a card that say what it is

#

like "planet" "tarot" etc

#

for enhancements thats steel, stone etc i think

faint yacht
#

Each one of these is a badge.

wild escarp
#

Anyone know why this doesn't let WoF give negative edition?

local oldpolledition = poll_edition
function poll_edition(_key, _mod, _no_neg, _guaranteed, _options)

    if _key == 'wheel_of_fortune' and G.GAME.used_vouchers['v_willatro_addict'] == true then
        _no_neg = false
    end

    return oldpolledition(_key, _mod, _no_neg, _guaranteed, _options)
end
frosty rampart
#

i think wheel of fortune passes an explicit table of editions as _options, which would bypass _no_neg entirely i imagine. this is done so that it's only foil/holo/polychrome even when other mods add other editions
you need to add e_negative (or whatever the key actually is) to the _options table in your if clause

wild escarp
#

Seems like wheel doesn't use _options at all.

frosty rampart
#

alr i was just checking vanillaremade, i figure the actual vanilla code for WoF is a bit different then

turbid tiger
#
    key = 'unus',
    loc_txt = {
        name = 'Unus',
        text = {

        }
    },
    no_pool_flag = 'unus_annus_assimilated',
    rarity = 3,
    cost = 7,
    atlas = 'Jokers',
    pos = { x = 0,  y = 0 },
    blueprint_compat = true,
    perishable_compat = true, 
    eternal_compat = false,
    config = { extra = { chips = 0, chip_mod = 35 } },
    loc_vars = function(self, info_queue, card)
        return { vars = { card.ability.extra.chips, card.ability.extra.chip_mod } }
    end,
    calculate = function(self, card, context)
        if context.remove_playing_cards and not context.blueprint then
        local removed_cards = 0
            for _, removed_card in ipairs(context.removed) do
            removed_cards = removed_cards + 1 end
        end
        if removed_cards > 0 then
        card.ability.extra.chips = card.ability.extra.chips + removed_cards * card.ability.extra.chip_mod
        return { message = localize { type = 'variable', key = 'chips', vars = { card.ability.extra.chips } } }
        end
    if context.joker_main then
            return {
                chips = card.ability.extra.chips
            }
        end
    if next(SMODS.find_card("j_tica_unus")) then
    G.E_MANAGER:add_event(Event({
                            trigger = 'after',
                            delay = 0.3,
                            blockable = false,
            func = function()
                G.jokers:remove_card(card)
                card:remove()
                card = nil
                return true
                end
            }))
            end
        end
}
#
            name = 'Unus',
            text = {
            "This Joker gains {X:chips,C:white}+35 {C:blue} Chips",
            "Whenever a card is destroyed.",
            "{C:inactive} (Currently {C:chips}+#35#{C:inactive} Chips)"
                },
            },```
#

I don't even know if the rest of this works to be honest.

#

Oh, I actually already see an error unrelated to the nil thing, so I'm just gonna go ahead and fix that really quick.

frosty rampart
#

first of all, you can get rid of the loc_txt table in the joker itself
then, in the localization file, use #1# and #2# to refer to the first and second variables you returned in the loc_vars function. so it'd be

text = {
  "This Joker gains {X:chips,C:white}+#2# {C:blue} Chips",
  "Whenever a card is destroyed.",
  "{C:inactive} (Currently {C:chips}+#1#{C:inactive} Chips)"
}

(also that's nonstandard formatting, the "gains +x chips" part should be formatted with just +x being blue text like you had in the (currently +y chips) line)

turbid tiger
#

pff... haha.

#

Okay, I understand completely what's going on now. That's silly.

#

That's a silly mistake. Yeah. Thanks for making me realize.

loud summit
hidden mirage
#

how to tell if context.drawing_cards is because of a hand or discard

loud summit
#

you could always set an internal variable on a discard or hand

loud summit
#

or context.cardarea == G.hand its not clear

stiff locust
#

still stuck on UI code is anyone around that knows about it

#

I am really close to getting the variable colours to work but it's not working

hidden mirage
loud summit
#

oh

vague crest
#

does anyone know why this wouldn't be properly adding the values to the array?

rocky plaza
hidden mirage
#

is there a table of cards to be drawn/were drawn

rocky plaza
#

so its trying to access the index of scoring hand that corresponds with that specific card

vague crest
#

ohhh i see

rocky plaza
vague crest
#

so itd just be adding like the number 2 or whatever lmao

rocky plaza
#

and then instead of v put i

rocky plaza
#

so its a table that maps a number to a card

vague crest
#

i see i see it works now, tysm!!

#

just 2 jokers left to code

loud summit
#

how do you apply an enhancement to a card with debugplus

cursive gazelle
#

I think

#

Hold tab for more info

loud summit
#

thx

civic frost
#

There are some Arabic Letters there, I'm translating it to Arabic, but the order is from Joker to Droll Joker

loud summit
#

is context.end_of_round and context.individual good for triggering end of round on held effects on a enhancement?

cursive gazelle
loud summit
#

do a conditional effect at the same context as gold cards

cursive gazelle
#

Yeah you could use that

loud summit
#

oke cool

cursive gazelle
#

Make sure to set cardarea to G.hand

#

And whatever you’re doing should be in an event (preferably)

loud summit
#

so context.end_of_round and context.individual and context.card_area == G.hand?

cursive gazelle
#

Yes

#

If context.other_card blah blah then
— event here

loud summit
#

how do you get the card the enhancement is on from the enhancements calc function

#

is the card passed in the calc function the card the enhancements on

cursive gazelle
#

It would be context.other_card

cursive gazelle
loud summit
#

and how can a joker have an enhancement

cursive gazelle
loud summit
#

uhh

cursive gazelle
#

I thought you were making a joker that does something with enhancements

rocky plaza
loud summit
rocky plaza
#

😭 why do i do this to myself

rocky plaza
civic frost
rocky plaza
#

debugging a 3k+ line loc doc 💀

cursive gazelle
#

Why would you thank him for everything inside you

stiff locust
#

98% of balatro players can't read

#

I need a UI knower 🙏 is anyone around like that

rocky plaza
stiff locust
#

I am trying to get a UI node to have a variable colour

civic frost
stiff locust
#

I've been trying for three days and right now I am VERY close

rocky plaza
civic frost
cursive gazelle
rocky plaza
stiff locust
#

I have everything working except 1 thing

#

and that 1 thing is that the UI refuses to update after being drawn
(yes I am running recalculate it doesn't work)

#

so i've got this bar

#

with 16 nodes on it which is like a meter

#

corresponding to a value of 16, and when it's 15, one of the nodes should turn to inactive colour

rocky plaza
#

uhuh

stiff locust
#

if I turn the value to 15 before opening the UI, everything works as intended

rocky plaza
#

i see

stiff locust
#

but I need it to change while the UI is open

#

which it won't do, even if I change the value while the UI is open and then run recalculate

rocky plaza
#

and their parent container

stiff locust
#

atp it's close enough to completion I don't really need to blur the content I'm not cool enough for people to want to steal from me

#
function Jokebox.uibox_variable_colour(i)
    if Jokebox.Quickhack.VRAM >= i then
        return {
            n = G.UIT.C, config = { minw = 0.6, minh = 0.9, colour = G.C.GREEN, align = "cm" }
        }
    else
        return {
            n = G.UIT.C, config = { minw = 0.6, minh = 0.9, colour = G.C.INACTIVE, align = "cm" }
        }
    end
end

I just run this 16 times with different values to put in all the nodes

#

the rendering of those nodes works, they just don't update when I run G.OVERLAY_MENU:recalculate()

#

and I feel like it would look ugly if I closed and reopened the entire UI because it comes in from the bottom again

#

unless I can make it show up instantly to cover up the closing/entering

#

idk how to do that

#

and yes, I tried a thousand other ways to make the variable colours work, nothing worked besides returning the same node with different static colour values

rocky plaza
stiff locust
#

it is

rocky plaza
#

hmmm

stiff locust
#

if I set VRAM to 8 before opening it, half the nodes turn to inactive as they should

#

the issue is that I need it to update while the UI is still open

#

that or I need to skip/remove the animation for the UI sliding in

#

so I can instantly make the updated UI appear

#

worst comes to worst I might be able to fast forward the ingame clock by a second to skip that

#

but that's obviously not an elegant solution

rocky plaza
stiff locust
#

0 to 16

#

I have code in place for it to never go below 0

#

it starts at 16 and is subtracted by 2/4/8 when you "spend" it on stuff in the menu

#

it won't let you put it into negatives

#

and the UI closes if it is ever <= 1

#

because you spent all the resource

#

after which the value resets for the next time

#

this code will only run once if you have the corresponding joker when the boss blind is selected, but it's easier to just run the function manually for testing purposes, so I do that with debugplus

#

nothing changes between those two entries

rocky plaza
#

in the config of the node whose children is the 16 ui boxes add
func = "update_quickhack_ui"
then outside that add

G.FUNCS.update_quickhack_ui = function(e)
    for i, child in ipairs(e.children) do
        child.config.colour = ((i <= Jokebox.Quickhack.VRAM) and G.C.GREEN) or G.C.INACTIVE
    end
end
#

this is based off of what I did for my dynamic ui

stiff locust
#

that just might work

rocky plaza
#

idk give it a shot

stiff locust
#

it didn't work

rocky plaza
#

ah

#

crashed?

stiff locust
#

maybe it's because these are now being defined by functions

#

if I change them back to regular nodes it might work

stiff locust
#

it just doesn't update the colours

cursive gazelle
#

This happened to me too when trying to update ui colors

stiff locust
#

they're all green still

#

waait

rocky plaza
stiff locust
#

shit I figured it out

rocky plaza
#

what was it

stiff locust
#

maybe

#

it's not a string lol

rocky plaza
#

ah'

stiff locust
#

trying again

rocky plaza
#

yeah it needs to be a string

stiff locust
#

that's not right.

#

it shouldn't be a solid bar

rocky plaza
#

ummmmm

#

idk at this point

#

i mean it changed something

stiff locust
#

it did change something yeah

#

maybe I fucked up the padding

#

yeah no it's still not updating and it should not be a solid bar

#

wait

#

i know why it's doing that

#

oops

rocky plaza
#

?

stiff locust
#

i put the func in the wrong node

rocky plaza
#

ah

#

yeah i shouldve been a lil more specific