#💻・modding-dev

1 messages · Page 503 of 1

clear ocean
#
return {
    descriptions = {
        Joker = {
            jg_cTerrorist = {
                name = 'Counter-Terrorist',
                text = {
                    'Retrigger all vanilla jokers'
                }
            }
        },
-- Counter-Terrorist
SMODS.Joker({
    key = 'cTerrorist',
    loc_vars = function(self, info_queue, card)
        info_queue[#info_queue+1] = { key = 'cTerroristConcept', set = 'Other' }
        info_queue[#info_queue+1] = { key = 'cTerroristArt', set = 'Other' }
        info_queue[#info_queue+1] = { key = 'cTerroristSource', set = 'Other' }
    end,
})

Did I miss something?

normal crest
#

joker keys start with j_

clear ocean
#

So, j_galore_cTerrorist?

normal crest
#

If galore is your prefix yeah, that's what you'd put in the loc file

lament agate
#

bum

red flower
#

same as jokers

lament agate
#

thanks

clear ocean
errant arrow
#

trying to get ^# into a joker, but it doesnt have an effect.
this is my calculate code

#

the message shows up, showing that it's effect is being detected, but it doesn't do it's desired effect

modern kindle
red flower
hushed field
errant arrow
#

yes

modern kindle
errant arrow
#

both are together

hushed field
#

Yo Dilly

clear ocean
modern kindle
#

did you see i appear to have gpu joker up and running

red flower
modern kindle
hushed field
#

Also, try it without the _mod in the return, as that's only needed if you don't want the message to display

errant arrow
#

i'll try both ideas

clear ocean
#

I don't plan on adding blinds as I don't think there is any I can come up with at the moment that would be fun to play

worthy stirrup
#

I dont remember, how do i make a variable that changes in the description

errant arrow
#

it worked, ty

worthy stirrup
#

heres what I got

#

I dont remember how to change viewer_total and also have it be a variable

clear ocean
#

I'm pretty sure I can look at the vanilla remake of blueprint or something to see.

hushed field
#

Blueprint and Retrigger effects are not the same effect!

wind steppe
#

how would i check how many cards would normally score in a hand? (can't use context.scoring_hand, my joker makes nothing score)

clear ocean
hushed field
#

No need to apologize, haha, I just mean to prevent you from setting up code and wondering why it doesn't work like you'd expect, haha

wind steppe
clear ocean
wind steppe
#

I have the first part but not the second part

red flower
wind steppe
red flower
#

it has context.scoring_hand

#

i assume that's the scoring hand pre return

clear ocean
#
    calculate = function(self, card, context)
        if context.other_joker and (--[[ context something?]])then
            return {
                -- retrigger
            }
        end
    end```
wind steppe
clear ocean
#

Something like this?

wind steppe
red flower
#

it's an argument in modify_scoeing_hand

wind steppe
red flower
#

yeah, i would only use the in_scoring check for the chips so the remove_from_hand works properly when selecting cards

clear ocean
#

I saw this, but not sure how to implement it.

red flower
#

that's so you can avoid retriggers

#

i dont think how to do retriggers is documented

wind steppe
clear ocean
#

of course cryptid does that

wind steppe
#

the joker youre retriggering is context.other_card

clear ocean
#
        if context.retrigger_joker_check and not context.retrigger_joker and context.other_card ~= self and (--[[ context something?]]) then
            return {
                -- retrigger
            }
        end
#

all i need is some sort of way to check if the joker is vanilla or modded and i can just do the inverse for t

wind steppe
red flower
clear ocean
#

that's for vanilla right?

red flower
#

yes

clear ocean
#

let's see if this works

wind steppe
#

also i think you have to turn on joker retriggers somewhere

red flower
#

yes

clear ocean
clear ocean
#

sorry if it's compressed to hell

lament agate
#

how do you change cards rank

#

or id

wind steppe
clear ocean
#

didn't want to risk it not being able to sent

lament agate
#

from 4 to 10 i.e

wind steppe
#

this is for strength-likes

lament agate
wind steppe
#

like with oujia?

red flower
red flower
clear ocean
red flower
#

no

clear ocean
#

rats

wind steppe
clear ocean
#

might go back to the drawing board for other ideas then

errant arrow
#

how would i make it to where either mult or chips is divided by something? trying to make a joker that harms chips, but boosts mult

red flower
wind steppe
clear ocean
#

Like this?

red flower
clear ocean
#

Thanks.

errant arrow
#

it's supposed to just divide chips once the joker is triggered, so i guess during calculation of a blind

clear ocean
red flower
#

idk if that works

clear ocean
#

i had an idea for an edition that's a "forgey" basically it's cheaper but less or no resell value

errant arrow
#

testing it

ocean sinew
clear ocean
clear ocean
red flower
#

i dont think so

clear ocean
#
-- Counter-Terrorist
SMODS.Joker({
    key = 'cTerrorist',
    loc_vars = function(self, info_queue, card)
        info_queue[#info_queue+1] = { key = 'terroristSource', set = 'Other' }
    end,
    calculate = function(self, card, context)
        if context.retrigger_joker_check and not context.retrigger_joker and context.other_card ~= self and not context.other_card.config.center.original_mod then
            return {
                message = localize("k_again_ex"),
                repetitions = 1,
                card = card,
            }
        end
    end
})

-- Terrorist
SMODS.Joker({
    key = 'terrorist',
    loc_vars = function(self, info_queue, card)
        info_queue[#info_queue+1] = { key = 'terroristSource', set = 'Other' }
    end,
    calculate = function(self, card, context)
        if context.retrigger_joker_check and not context.retrigger_joker and context.other_card ~= self and context.other_card.config.center.original_mod then
            return {
                message = localize("k_again_ex"),
                repetitions = 1,
                card = card,
            }
        end
    end
})
red flower
#

oh you mean for the other joker?

#

the problem is that self is not the joker, card is the joker

#

self is the prototype

clear ocean
#

i see

errant arrow
clear ocean
#

is Xchips supposed to be capitalised?

red flower
#

i think not

errant arrow
#

the Xmult works tho?

red flower
#

yeah but Xchips doesnt

errant arrow
#

the chips part fails

clear ocean
#

probably because in the base game there is Xmult but no xchips functionality

#

localthunk programmed it as Xmult and the smod devs programmed it as xchips

red flower
#

there are a couple of keys allowed for both

#

Xchips is not for some reason

errant arrow
#

okay, it worked, but the only thing that throws me off is that i have a joker that just boosts chips and is Xchip_mod

clear ocean
errant arrow
#

maybe it was the s

red flower
#

no the s is fine

#

it's just a weird list of keys

errant arrow
#

well, it worked, the chips now get halved, so i'm not worried about it anymore

wintry solar
#

The Xchips keys are just what talisman had

#

If it was my decision there’d be a single key for each effect

wintry solar
#

All of them

red flower
#

which key i mean

wintry solar
#

Oh

#

They’d be chips/mult/xchips/xmult

red flower
#

those are the good ones

wintry solar
#

I know 🤣

wicked crow
#

how can I generate a joker from a specific group of jokers?

#

like judgement

red flower
slim ferry
#

i dont think this is what erratic deck does?

#

why does it have double blind size

wintry solar
#

That looks like plasma deck code

slim ferry
#

its just a copy of the plasma deck code but with a different unlock text and code

#

and the commentary is for erratic deck

red flower
#

i did the unlock stuff so thats probably why

#

i didnt do the effect

modern kindle
#

hello eremel i hope you are well today

normal crest
#

hello dilly i hope you are well today

red flower
#

hello srockw i hope you are well today

modern kindle
#

hello N' i hope you are well today

normal crest
#

hello N i hope you are well today

red flower
#

hello i hope you are well today

modern kindle
#

i didnt do a ton of progress but i finally made extra files and moved shit over where they belong

so i now have an editions file, enhancements, consumables
next i need to actually do everything in my loc file again since i got lazy and kept adding stuff without putting it there

red flower
#

im asking egg for a modding-dev-off-topic

normal crest
#

today well hope you hello N are i

modern kindle
#

this is where i communicate with my fine fellows

red flower
#

i want to finish the new joyousspring release today or tomorrow

#

im missing a bunch of stuff i pushed for later :3

wintry solar
#

Hello dilly I am well how are you

modern kindle
#

i wish i could just have something move everything to localization for me

red flower
#

isnt there an smods function for that

wintry solar
#

I went to a big inflatable place this morning with my kid, it was fun

#

Yeah you can dump localizations

modern kindle
# wintry solar Hello dilly I am well how are you

im doing alright, i got that gpu joker in motion, my greatest concern relies on performance cause my first implementation brought my from 430 frames to 50, but now i hover at above 100, near 150 to 120
so ill have to test with people who dont have very great systems to see what the damage is

modern kindle
#

oh how do i dump localizations

normal crest
#

something in your metadata iirc

wintry solar
#

It’s a metadata argument

normal crest
#

But it only works for objects loc_txt, unless it was changed

chrome widget
#

Weh

normal crest
#

wah

red flower
#

hi winter!!!

modern kindle
#

gotcha, its the dump_loc right

#

hi winter

chrome widget
#

Hi N'!!!!

#

Hi Dilly!!!

normal crest
modern kindle
chrome widget
#

This blind is wearing on me so bad 😭

wintry solar
#

Turn all your other mods off first though

chrome widget
#

I once again can't tell if you're flirting or not Dilly

modern kindle
red flower
#

i love flirting with friends

modern kindle
#

i dont think theres a friend i havent flirted with

chrome widget
#

Honestly same

modern kindle
#

but i mean no true romantic intentions behind it

chrome widget
#

I flirt with all my friends dgjvnzndggsj

modern kindle
#

i just like making my freinds feel awesome and perfect cause they are

tepid crow
chrome widget
#

But that's just being poly and demi for you

modern kindle
#

i have in fact kissed a homie

clear ocean
#

Sorry if I stopped talking, I made some placeholders

modern kindle
chrome widget
#

Nods nods yes yes

#

Mwah

modern kindle
normal crest
#

But idk

chrome widget
#

You are perfect and awesome. Unrelated, sorry I haven't made more progress on that GPU thing or the weird rotation problem with the symbols

modern kindle
chrome widget
#

I'm going real slow on shit recently I think just because I'm feeling some fatigue at the end of the project

tepid crow
modern kindle
#

but i went from below 50 fps to over 120

#

so im improving the reading with perf

chrome widget
#

Hmmm yeah is whatever library you're using just notably slow?

#

Obviously there's an inherent issue in that the task manager has OS access in a way that external programs don't, and especially since Lua is itself a scripting language abstraction, there's multiple levels of access and speed removed from low level OS processes

modern kindle
#

im going through ffi as thats my only option and reading the dll
one issue was that i also wasnt just returning early if i found the correct gpu in use so i was profiling all possible gpus every like frame

#

so i changed that in a jiffy

clear ocean
modern kindle
#

but now i average around 150 with my fixes there

clear ocean
#
--Creates an atlas for cards to use
SMODS.Atlas {
    -- Key for code to find it with
    key = "jokers",
    -- The name of the file, for the code to pull the atlas from
    path = "jokers.png",
    -- Width of each sprite in 1x size
    px = 71,
    -- Height of each sprite in 1x size
    py = 95
}

-- Counter-Terrorist
SMODS.Joker({
    key = 'cTerrorist',
    atlas = 'jokers',
    pos = { x = 0, y = 0 },
    loc_vars = function(self, info_queue, card)
        info_queue[#info_queue+1] = { key = 'terroristSource', set = 'Other' }
    end,
    calculate = function(self, card, context)
        -- Thank you to nh6574 and unusedparadox for help with retriggering functionality
        if context.retrigger_joker_check and not context.retrigger_joker and context.other_card ~= self and not context.other_card.config.center.original_mod then
            return {
                message = localize("k_again_ex"),
                repetitions = 1,
                card = card,
            }
        end
    end
})

-- Terrorist
SMODS.Joker({
    key = 'terrorist',
    atlas = 'jokers',
    pos = { x = 1, y = 0 },
    loc_vars = function(self, info_queue, card)
        info_queue[#info_queue+1] = { key = 'terroristSource', set = 'Other' }
    end,
    calculate = function(self, card, context)
        if context.retrigger_joker_check and not context.retrigger_joker and context.other_card ~= self and context.other_card.config.center.original_mod then
            return {
                message = localize("k_again_ex"),
                repetitions = 1,
                card = card,
            }
        end
    end
})
modern kindle
#

which is you know, 3x better

umbral zodiac
#

time to make a joker that retriggers itself 2 times cluegi

modern kindle
#

make a joker that explodes itself

clear ocean
red flower
clear ocean
#

What do I change it to?

red flower
#

context.other_card ~= card

clear ocean
#

oh. OH

#

i'm so stupid

red flower
#

i dont think thats stopping it from working tho

errant arrow
#

im wondering, how would i set up my code to where i would be able to pull data from different lua files like with what cryptid did?
-# organization is painful if it's all in one file

slim ferry
#

depends on what you mean by data

clear ocean
chrome widget
#

I don't know your computer specs but I average around 160 in regular gameplay

clear ocean
#

okay, it might be because ct doesn't count let me make a mockup joker real quick?

red flower
#

oh yeah one is not going to retrigger the other

#

because youre checking for no retriggers

wintry solar
#

You can’t retrigger retriggers anyway

clear ocean
#

that makes sense now

#

probably to prevent a forever loop

wintry solar
#

Yup

clear ocean
#

are both blueprint compatible like the code itself should be fine

slim ferry
#

all calculate functions should be blueprint compatible as long as you dont do and not context.blueprint

wintry solar
#

I should really make the blueprint compat field actually do something other than ui too at some point

slim ferry
#

what else would it actually do

wintry solar
#

I mean if you set it to false you should also have to do and not context.blueprint

#

That’s just silly

slim ferry
#

that means you cant do trolling by faking blueprint incompatibility... 1984...

wintry solar
#

Oh no what a shame 🙃

unborn bay
clear ocean
#

Blueprint is working with both 👍

modern kindle
#

thank you for telling me about dump loc its so beautiful

#

i was previously manually entering everything

ocean sinew
#

why it choose that name 😭

#

joker name is crazy

clear ocean
#

Is it normal for modded jokers to have locked requirements

#

well how did you program it

#

that isn't the default it's either completely empty or ERROR if i can recall

#

if you used a tool like joker forge it mightve had that as a placeholder

red flower
#

it has locked jokers

clear ocean
#

i was asking seu pai but i can use those a refresher it is more if it's the norm if modded jokers are locked or already available

slim ferry
#

depends on what you want

#

not a lot of mods do it but i imagine its more because coming up with unlock requirements is hard than anything else

clear ocean
#

fair enough

#

maybe maybe not then

modern kindle
#

it mostly just depends on what you wanna do, right now i dont ahve any unlock conditions but of my 60 jokers most of them will eventually

clear ocean
slim ferry
#

garbshit has some pretty good unlocks for a bunch of jokers, but unlock conditions are mostly an extra thing imo as they arent actual content

slim ferry
clear ocean
#

aw man

#

not even a negative?

slim ferry
#

but i know that entropy has an edition with X0.5 shop cost

#

negative is +5$

clear ocean
#

negative number like -5

slim ferry
#

ohhh

#

well a adding a negative number would decrease it yeah

clear ocean
#

lmao (ill work on the art later) so im using the base graphics to differentiate

modern kindle
#

clowns are terrorists...get em guys..

clear ocean
#

"there's too many of them!"

slim ferry
#

no way source: counter-strike??? cs source reference???

clear ocean
#

it is indeed a counter strike reference...

clear ocean
#

any suggestions on a good price as well (democracy for the win)

modern kindle
#

considering its retriggering all modded or vanilla by default they probably should be rare

red flower
#

exotic

clear ocean
#

i'm not adding any extra rarities so i'll vote for rare as i agree

modern kindle
#

i want to add another rarity but i havent decided to dive into that yet

clear ocean
#

i think common - legendary is good enough for me espically since i want to keep this like vanillaequse if that makes sense

red flower
#

what would it be called

#

i dont think retriggers are vanillaesque

clear ocean
#

the holy grail

#

they aren't?

red flower
#

no thats why theyre an optional feature in smods lol

clear ocean
#

ohh

#

uh

#

i think this is the line in the sand for me then

red flower
#

i mean its fine you dont have to stick to vanilla

clear ocean
#

four rarities is enough i think

hidden notch
#

Can you return a message without playing a sound?
return(message = 'Bark!', sound = nil) obviously play's the generic1 sound ^^'

clear ocean
#

def more of a band aid fix, but an empty sound file? like nothing in it

modern kindle
# red flower what would it be called

i dont even know, i know some of my stuff is where we would want inbetweens
like stuff between common and uncommon, or rare and uncommon, or rare and legendary
just as examples
id have to remember or ask what people thought theyd be

hidden notch
hidden notch
#

Oh-- Well didn't think I would've been able to use that in the return lewxen_Teary_Laugh
Yeah that works perfectly fine, Thank you N'! CamotTHappy

red flower
#

there are some things in the message return that are not documented

wind steppe
#
SMODS.Joker:take_ownership{"splash", {
    calculate = function(self, card, context)
        if context.modify_scoring_hand and not context.blueprint then
            return {
                add_to_hand = true
            }
        end
    end
}, true}
``` why does my take ownership crash
red flower
#

whats the crash

#

also this wouldnt do much i dont think because i think splash is hardcoded

wind steppe
red flower
#

oh i have no idea what that crash is lol

real night
#
SMODS.Joker {
    key = "wheel_of_joker",
    config = { extra = { mult = 2, odds = 4 } },
    rarity = 1,
    atlas = "yap_jokers",
    pos = { x = 0, y = 0 },
    cost = 2,
    blueprint_compat = true,
    loc_vars = function(self, info_queue, card)
        return { vars = { card.ability.extra.mult, card.ability.extra.odds, (G.GAME and G.GAME.probabilities.normal or 1) } }
    end,
    calculate = function(self, card, context)
        if context.joker_main then
            do return {
                mult = card.ability.extra.mult
            } end
            if pseudorandom('vremade_gros_michel') < G.GAME.probabilities.normal / card.ability.extra.odds then
                return {
                    xmult = card.ability.extra.mult
                }
            end
        end
    end
}
#

oh wait

#

i did something wrong

#

im so cooked

slim ferry
#

old probability system spotted

#

also the seed you put into pseudorandom does not matter by the way

real night
#

what is the new system

slim ferry
#

read all this probability stuff

#

at least the parts that are relevant to your thingy

red flower
hardy viper
#

do return end spotted

rapid stag
#

what is do return end 😭

red flower
#

do end creates a block to limit scopes

#

i dont think returning there does anything

vernal path
#

Okay, I'm unfamiliar with Lua- If I were trying to keep track of a list of scored cards (or specifically, one value from them that I will just store as a number), how would I define it in config.extra?

clear ocean
#

Good idea?

slim ferry
#

worse green joker...

modern kindle
#

if you think about every card ever created is a worse version of every other card ever created which is a better worse version of the bettered

clear ocean
slim ferry
#

make it like 30 chips

#

also use multiple lines in your description

clear ocean
#

i will that's what im doing rn

#

just prototyping

modern kindle
#

could also just make it gain the chips of the cards played itself instead of a static

clear ocean
red flower
#

i like that

clear ocean
#

thanks

modern kindle
#

:D

#

sometimes i have good ideas

old epoch
#

How do i detect what ante and round it is?

slim ferry
#

current ante should be G.GAME.round_resets.ante

old epoch
#

Thanks, i assume for rounds i just swap ante for rounds?

slim ferry
#

not sure, never used the current round for anything before

old epoch
#

I'll test it out then, thanks for the help!

clear ocean
#

what do you think

#

I got to get ready for something, so I have to work on it later.

slim ferry
#

oh that sounds peak

clear ocean
#

idk if the self destruction condition is good in practice but i got to get ready for something

clear ocean
modern kindle
#

I dont mind, id say the desc looks a little wordy but im not sure how id personally change it

You can give credit in any way you deem sufficient :)

vestal magnet
#

ok so. i want a joker to trigger when using a SPECIFIC consumable
how do i specify the consumable

plucky zenith
#

When using Joker:calculate() can anyone help me understand the differences been these three context combos:

  1. context.end_of_round AND NOT context.individual AND NOT context.repetition -- This seems to happen only once
  2. context.end_of_round AND context.individual AND NOT context.repetition -- This seems to happen multiple times
  3. context.end_of_round AND NOT context.individual AND context.repetition -- This seems to happen multiple times

I want to do something at the end of the round, and using #1 works, but it took me a while to figure out I needed to also check individual and reptition...but I'm not sure WHY I need to check them.

slim ferry
vestal magnet
#

tnks

red flower
#

context.consumeable

#

"c_mars" too

red flower
plucky zenith
#

Ahhh, so the second and third will happen for each card played - once for one card played, 5x for a standard full hand

slim ferry
#

not played cards

#

cards held in hand at the end of round

#

like gold cards and blue seals

red flower
#

"playing card" as in the cards with ranks and suits lol

plucky zenith
#

Thank you! I'll go check out context.main_eval too. There's a note about it at the bottom of the calculation wiki, but I didn't notice it until just now

knotty orchid
#
calculate = function(self, blind, context)
        if not blind.disabled then
            if context.debuff_card and context.debuff_card.area == G.consumeables then
                return { debuff = true }
            end
        end
    end

I want the blind to debuff consumables, what's missing here?

red flower
#

debuff_card might not go through consumables but im not sure

knotty orchid
#

Oh, but using context.card here is not an option right?

wind steppe
#

how do i check a joker's key?

sonic cedar
#

card.config.center.key

#

would it be in a context, or in update if i wanted a consistent track within a joker?

#

my GUESS is update

#

but i could be wrong

sonic cedar
#

basically want the discard number to be increased while ijiraq has drunkard's ability since it doesn't do that automatically

#

putting it in add_to deck would have it trigger... only when it's added to the deck

red flower
#

yeah that might be an update thing but also you could make a context for it

sonic cedar
#

ooh ok! where would i call it?

#

maybe in the transformation function?

#

(hiiiii heaven)

formal parrot
#

Great github won’t let me log in

formal parrot
knotty orchid
#
recalc_debuff = function(self, card, from_blind)
        if card.area == G.consumeables then
            return true
        end
    end

This doesn't go through consumables too right?

sonic cedar
red flower
sonic cedar
near heart
#

am i able to make the text color in a textbox alternate/change? (not like a gradient, but like controlling the color through a variable that updates it)

chrome widget
#

Typically you'd have to attach an update function to the UI node

red flower
#

yes but you would need to patch i think unless you only want to update it on hover

chrome widget
#

which could change the color contextually

red flower
#

if it's only on hover you can use box_colours in loc_vars and return a different color based on conditions

clear ocean
#

Not sure how to word it right and still unsure if the self-destruct sequence is good

#

Like would it be fair especially if you used judgment or rift raft

modest dock
#

hi, what's the name of the sound effect that plays when a card with an edition is scored?

slim ferry
#

how would i actually do proper talisman compat, i hear a lot of to_big = to_big or function(x) return x end get thrown around but like thats it

maiden phoenix
slim ferry
#

i heard its not too hard so i would like to at least try

red flower
#

there's a note on it at the bottom of the vanillaremade joker file

maiden phoenix
#

to_big is usually used on dollars, pokerhands and I think chips too?

red flower
plucky zenith
#

I'm trying to have a joker create some cards at end of round. For individual cards it seems to work fine - I just put them right where they should be (cards going into the deck aren't super noticeable, but I can live with that). But when I create a pack and try to open it, the blind win screen with the Cash Out button pops up over it. Is there something I can do to cause synchronous handling here?
Simplified code:


    if context.end_of_round and context.main_eval then -- main_eval avoids firing extra times for individual, repitition, etc

        local booster = SMODS.add_card( { set = 'Booster', area = G.play })
        G.FUNCS.use_card({ config = { ref_table = booster } })

    end
end,```
slim ferry
red flower
#

yes

solemn shuttle
#

got around to testing this this afternoon, this fixed it ty :3

maiden phoenix
slim ferry
#

do i only need to do to_big for comparisons or also for mathematical operations?

red flower
#

specifically <, >, >= and <=

sonic cedar
red flower
#

that looks like it should

sonic cedar
#

red deck has 4 discards normally right

wind steppe
sonic cedar
#

well it's not going to 5

loud silo
#

what do i do to make a moded joker appear in shops like anything else would?

wind steppe
#

did you think it didnt orrr

loud silo
#

oh really?

#

ok

#

well i rerolled in debug hella times and just thought i needed to do somthing

#

ill just try again and see

#

thanks

red flower
sonic cedar
#

why isnt it- i forgot to set instant

red flower
#

did it work

#

you need to do both ease_discard and the other thing btw

sonic cedar
#

yeah that'll do it

sonic cedar
#

pretend that - is a +

red flower
#

yes

sonic cedar
#

testing then

sonic cedar
red flower
#

does it enter the context even

sonic cedar
modest dock
red flower
sonic cedar
#

ill run another print chec

sonic cedar
#

i guess it's a timing issue?

red flower
#

probably

sonic cedar
#

or even....

#

hold on let me try something

red flower
#

i dont know where that table gets updated

sonic cedar
#

all good
set_ability triggers add_to_deck, so i dont even need the custom

wintry solar
#

does.... does Ijiraq.... work?

modern kindle
#

are you thinking it should not

wintry solar
#

it feels like toma has been working on this card for months now 🤣

sonic cedar
chrome widget
#

Hmm how do I correctly call a function passed as an argument if the passed arguments (and therefore the arguments function signature) aren't a single table?

sonic cedar
#

so yes

#

i have

primal robin
#

Is it that hard to implement?

chrome widget
#

oh wait pcall does this

sonic cedar
red flower
#

the ijiraq bug tracker is insane

sonic cedar
#

oh no this is general

#

ijiraq is literally dominating it

chrome widget
#

okay wait how tf does pcall work

modern kindle
primal robin
#

First argument - function
All other arguments - will be passed to this function

Function executes.

If no error is thrown - first value is true, and rest is function's return values
If error occured, first value is false, second is error message

chrome widget
#

No yeah, I just can't find the direct implementation of pcall because it might be from a module somewhere so I don't know how to implement the similar passing variable arguments to the first argument function

primal robin
#

It's lua built in function

modern kindle
#

yea you can just use it

#

i use it for the gpu stuff

unborn bay
#

the gpu what now

modern kindle
#

i pull gpu utilization for a joker

chrome widget
#

is it just?

  func(...)
end```
modern kindle
#

as well as ram use and disks installed

chrome widget
#

I've never used the ... operator before lol

unborn bay
#

... is useful for hooking

#

some hooks add additional arguments that may get ommited by other hooks

chrome widget
#

ah, cool

primal robin
#

If you need modify values or extract them

local old_func = Game.do_smth
function Game:do_smth(...)
  local args = { ... }
  args[3] = true
  return old_func(self, unpack(args))
end
chrome widget
#

Oh, pcall actually has the first argument be declared directly as nillable

#

what's the difference in implementation?

#

whelp let's hope I did this right lol

#
    -- some code i need to do before the call

    local ret = {f(unpack(arg))}

    -- resetting the code after the call

    return unpack(ret)
end```
#

Okay so evidently this didn't work

sonic cedar
#

how can you modify a card's own probability values from within the card? trying to have a card's denominator increment by 1 each time its effect brings a successful result

modern kindle
# sonic cedar how can you modify a card's own probability values from within the card? trying ...

i do the reverse of this and lower it until its successful

in extra i have my current probability as denominator, then in calculate whenever your thing happens in success or fail i do

                if card.ability.extra.current_probability > 1 then
                    card.ability.extra.current_probability = card.ability.extra.current_probability - 1
                end

where instead whjatever your extra is say that and the addition instead of subtraction im doing

sonic cedar
#

let me set this up rq

#

dilly my goat

vernal path
#

i forget can you put formatting in the name of a jonkler

modern kindle
#

hey thats better than me i just forget

vernal path
#

nice thanks

granite nymph
sonic cedar
modern kindle
sonic cedar
modern kindle
#

hand it over if you be confused

sonic cedar
modern kindle
#

👍

normal crest
clear ocean
# clear ocean
poll_question_text

rarity for t and ct

victor_answer_votes

2

total_votes

2

victor_answer_id

2

victor_answer_text

rare

formal parrot
#

Toma im making deltarune chapter 5

upper junco
#

hello, im new to modding balatro, and i wanted to make a joker which affects the blinds chip requirement, how do i do it, or how can i reference the blind itself so i can learn my way trough it

chrome widget
#

Hmmmmm trying to figure out the most reasonable way to differentiate between cards used in gameplay and cards used for display

slim ferry
upper junco
#

fixed

slim ferry
#

and blind requirement is G.GAME.blind.chips

upper junco
#

thkx mate

ocean sinew
#

Don't forget to do G.GAME.blind.chip_text = number_format(G.GAME.blind.chips) afterwards

#

otherwise the text won't update

slim ferry
#

and G.HUD.blind:recalculate() too right?

#

after that

ocean sinew
#

@upper junco heres a example
local blind_value = G.GAME.blind.chips-50
G.GAME.blind.chips = blind_value
G.GAME.blind.chip_text = number_format(G.GAME.blind.chips)

sonic cedar
ocean sinew
#

that decreases the requirement blind value by 50

upper junco
#

alright thx

ocean sinew
#

Ik

slim ferry
#

you can just do G.GAME.blind.chips = G.GAME.blind.chips - 50

ocean sinew
#

but for me variable look cleaner

slim ferry
#

its probably already going to be a variable because generally you should have all numerical joker values in card.ability.extra

upper junco
#

can you do like G.GAME.blind.chips -= 50? or is it not possible in Lua

slim ferry
#

i dont think lua has -= and such

ocean sinew
#

but this is Lua

upper junco
#

damm

ocean sinew
#

only roblox studio uses LuaU from what I know

chrome widget
#

How to I determine whether the player is currently in the deck skin customization menu?

#

is there anything that internally identifies the current overlay menu?

normal crest
#

G.OVERLAY_MENU is the actual ui element, dunno if it has identifiable properties

foggy ginkgo
#

Wrong chat

#

My bad guys

solemn shuttle
#

-# whoops i forwarded smth to the wrong channel lol

upper junco
ocean sinew
#

could you send your code???

upper junco
#

sure

#

wait a sec

#

SMODS.Atlas {
key = "jokers",
path = "jokers.png",
px = 71,
py = 95
}

SMODS.Joker {
key = "rodri",
loc_txt = {
name = "Rodrigo, el delincuente",
text = {
'when Blind is selected,',
'weaken it by half its score target'
}
},
config = {extra = {
2
}},
rarity = 1,
atlas = 'jokers',
pos = {x = 0, y = 0},
cost = 3,
add_to_deck = function (self, card, from_debuff)
G.GAME.blind.chips = G.GAME.blind.chips / 2
end,
calculate = function (self,card,context)
if context.setting_blind then
G.GAME.blind.chips = G.GAME.blind.chips / 2
G.GAME.blind.chip_text = G.GAME.blind.chips
end

end

}

#

im doing shit till it works, sorry if its horrible code

ocean sinew
#

that code is good actually

ocean sinew
#

and add_to_deck u should do that too

upper junco
#

alr ill do it and tell u whatsup

#

i added/edited these 2 lines

ocean sinew
#

that only happens with your joker and even without other mods enabled?

upper junco
#

only with mine, and i got all the mods that adds joker n stuff disabled

#

do i enable em and check?

slim ferry
ocean sinew
upper junco
ocean sinew
#

for some reason mine work without G.HUD_blind:recalculate()

ocean sinew
upper junco
#

imma try

slim ferry
#

why do you even have the add to deck effect when youre also reducing blind size at the start of a blind

upper junco
#

same error

upper junco
#

im new to this sorry

#

idk if the order is good

slim ferry
#

should work

ocean sinew
#

it is fine idk whats giving error

slim ferry
#

oh

#

you need to return something

#

in the calculate function

upper junco
slim ferry
#

uninstall talisman

#

i think

ocean sinew
#

he has talisman disabled I think

slim ferry
#

then it wouldnt show up because its not loaded

ocean sinew
#

oh yeah

#

true

#

@upper junco disable all mods

#

except ur mods

upper junco
slim ferry
#

tbh for testing mods you should disable everything but your own mod and debugplus

ocean sinew
#

to test out If It's another mod doing some stuff

slim ferry
#

debugplus cant really break things anyway

#

and its only helpful

upper junco
#

works perfectly now

ocean sinew
#

yeah

#

It's some mod doing some stuff

upper junco
#

do i try enabling 1 by 1 to see which is the bad one

novel yarrow
#

Caralho é meu pai...

upper junco
#

alright

ocean sinew
slim ferry
ocean sinew
#

I have a talisman enabled in mine with a joker that does the same thing and it works fine

upper junco
#

talisman aint the problem

slim ferry
#

it doesnt automatically break everything

#

it just breaks a lot of things that dont account for it

ocean sinew
upper junco
#

it works good with these on

novel yarrow
#

So I'm having some problems with my code, I have this as my calculate function:

calculate = function(self, card, context)
        if context.pre_discard and not context.blueprint then
            local card_value
            local highest_value = 0
            for _, card in ipairs(G.hand.highlighted) do
                card_value = card.base.nominal 
                if card_value > highest_value then
                    highest_value = card_value
                    if not card.ability.extra then
                        card.ability.extra = {}
                    end
                    card.ability.extra.x_mult = highest_value 
                end
            end
            return {
                message = localize { type = 'variable', key = 'a_xmult', vars = { card.ability.extra.x_mult } }
            }
        end

I'm trying to get the highest value card out of the highleted cards before discarding them, but the mult on the joker is not updating, can someone help me find the reason why?

ocean sinew
#

card.ability.extra.perma_x_mult = highest_value

slim ferry
#

no??

#

thats just

#

not at all true

#

perma_x_mult is for adding permanent xmult to playing cards

ocean sinew
#

yep

slim ferry
#

how is that relevant here then?

ocean sinew
#

he wants to add x_mult to the card I think

novel yarrow
#

No, no

#

It's to the joker

ocean sinew
#

ohhhhh

#

It's to the joker

novel yarrow
#

I've had this version working before, but it got the value of each individual card

ocean sinew
#

It's not giving x_mult?

#

or It's not setting the new x_mult

slim ferry
#

theres no point in that, already exists

unborn bay
#

playing cards dont use the extra table

slim ferry
#

but this isnt playing cards

ocean sinew
unborn bay
slim ferry
#

card.ability.extra is the jokers extra field in the config

#

not the playing card

ocean sinew
unborn bay
#

actually wait i think i got it

#

you're overriding what card is in the context of the for loop

novel yarrow
#

OOoooooohhh....

ocean sinew
#

ohhhhh yeah true

unborn bay
#

yeah don't do that

clear ocean
novel yarrow
#

I'll try it, I mainly code in C# and this override doesn't happen there, guess it's different here

#

Thanks for the help!

ocean sinew
#

np

clear ocean
#

I have some other ideas but trying to keep things like simple and vanilla esque

#

Even if I don't keep any of the three in the final, I still appreciate all the advice and suggestions 👍 ❤️

#

Modding is fun and I mess around before with some other games

ivory coral
#

having an annoying blueprint compatibility issue, i have a joker that tallies the number of discarded cards and does an effect once it reaches a certain amount then resets the tally, but because it returns at the same time as its reset it would have issues when being copied especially by brainstorm since it would get reset by the joker itself before brainstorm does its calculation
is there any vanilla joker i can look at which solves this because i cant quite figure it out

novel yarrow
#

Hmmm... Still not working, I guess I'll just take the Burnt Joker route

last prairie
#

Hey quick question how does rarity rate relate to the actual chance of something being found? Like if default_rate is 0.2 whats the chance to find that type? 20%?

#

(people were yapping in the other modding chat 💀)

slim ferry
novel yarrow
#

Maybe I'm trying to get the value wrongly here?

clear ocean
novel yarrow
#

(of the card)

ivory coral
ivory coral
slim ferry
ivory coral
#

most jokers you can double up its effect but not its scaling but this joker has both in the same context

ivory coral
ocean sinew
# last prairie Hey quick question how does rarity rate relate to the actual chance of something...

I think It's like the following
we have two rates set to 1 like
{
1,
1,
0.2,
},
what it will do is
If weight is different subtract the highest one by lowest one
example:
{
1,
1,
0.2,
}
1-0.2=0.8
so all the weights with the number one value will now become 0.8
after that we do the following
If weight is same number then divide
example:
{
0.8,
0.8,
0.2,
}
result:
{
0.4,
0.4,
0.2,
}
each chance having different values based on other chances

slim ferry
ocean sinew
slim ferry
#

thats an extremely complicated explanation for something really simple

novel yarrow
#

Ok I fixed it lol

ocean sinew
slim ferry
#

yes it is?

ocean sinew
#

wait it is

#

I can explain better

novel yarrow
#

I had a misplaced context, thank you all for the help!

slim ferry
#

the chance of something appearing is (item's rate) in (total of all rates)

ocean sinew
#

has a table of weights
if weight is different then subtract weight by the lowest weight
if weight is same then divide the weight by all ocurrence of the same weight value

chrome widget
#

@modern kindle @sonic cedar @red flower
flops down onto the foor it's finally overrrrrrrrrrrrrrr

slim ferry
#

what?

last prairie
#

k cool that answers it

#

I comprehend

ocean sinew
last prairie
#

so if that extra rarity with weight (0.2) is the only one other than vanilla the total would be 1.2 so it would 0.2/1.2%??? (well not percent but yk

chrome widget
last prairie
#

cool!!

#

(trying to add mod support to immolate :))

sonic cedar
slim ferry
#

internally the game does a bunch of stuff but the chance will stay the same

ocean sinew
#

No

slim ferry
#

so you dont have to worry about what your rarities add up to

slim ferry
# ocean sinew No

the game changes the rates so that they add up to 1 properly im pretty sure, at least the smods wiki says it does

ocean sinew
#

If there's a rarity with the same weight number both the chances will be divided

ocean sinew
slim ferry
#

but that woudl change the chance of it appearing

ocean sinew
#

example:
{1,1,1}
1/3
{0.3333,0.3333,0.333,}

slim ferry
#

which it doesnt do

#

yes but thats

#

different

last prairie
#

so if the rarities are base + the 0.2 one whats the actual chance of each rarity im so confus

slim ferry
#

okay okay

ocean sinew
slim ferry
#

what the game does internally is

#

it just

#

divides all the weights by the sum of all weights

ocean sinew
#

yep

slim ferry
#

so that they add up to 1

ocean sinew
#

exactly

slim ferry
#

then

#

just say that

ocean sinew
#

but It's not that

#

It's almost

slim ferry
#

it is exactly that though, weighted chances arent that complex

#

and its not like you need to care for that anyway

last prairie
slim ferry
#

yeah

ocean sinew
#

{1,1,1,0.2,}
subtracts all the different weights by the weight lower than it so 1-0.2
divides all the equal weights by the ocurrence of all equal weights in that case 3

slim ferry
#

but

#

that doesnt

#

make the weights add up to 1

ocean sinew
red flower
#

the game just divides 1/3.2 i dont know what this equal weight stuff is

last prairie
slim ferry
#

yeah exactly

slim ferry
#

like this is just not what the game does

ocean sinew
slim ferry
#

THEN

#

dont try to explain things

#

when you dont actually know

#

how they work

#

maybe??

ocean sinew
#

I do though

#

I explained how a weighted chance system works

#

and thats how it works

slim ferry
#

this was about

#

balatro's

#

appearance rate parameter

#

in a rarity

#

not weighted chances in general

red flower
#

weighted chances in general also don't care about same weights so i don't understand that part

slim ferry
#

also again weighted chances dont work like that anyway, none of that make sense

#

if i multiply all the weights by 10

#

it should still give the same odds for every outcome

#

yet in whatever youre saying that wouldnt even be true

#

or like 99% of other situations that arent the one you described

ivory coral
slim ferry
#

weighted chances dont even care about the exact value of the weights or the total of all weights, the only thing that matters is the ratio between the weights and the total of all of them

#

weighted chances are in fact, very simple. just multiply all the weights until you get only whole numbers and you can explain an easy real-life equivalent where each weight represents the number of copies of an object, and then you randomly choose one of those objects. the chance for each object is the number of copies of itself divided by the total number of objects

ocean sinew
#

True I was just confused I think balatro just uses a pseudorandom variable and then a for loop inside the weights table to check the lowest one

#

atleast this would be the most efficient way

slim ferry
#

you dont need to check any specific one though?

#

just divide all weights by the current sum of all weights and then you have all weights that total to 1

ocean sinew
slim ferry
#

then...

#

okay

#

but if you dont actually know how balatro's rarity weights work then dont just start explaining them in some completely random way

#

also no it isnt

ocean sinew
#

1 is 100%

#

0.2 is 20%

slim ferry
#

not there

#

yes in a fraction sense it is 100%

#

but thats different

ocean sinew
#

the chance of each one of them being rolled is 1/3 1/3 1/3 and 20%

slim ferry
#

THAT ADDS TO 120%

red flower
#

did you fail maths

ocean sinew
#

wait true actually wrong

#

0.8/3 0.8/3 0.8/3 and 20%

slim ferry
#

NO

#

its

ocean sinew
#

yep

red flower
#

it's 1/3.2 and 0.2/3.2

ocean sinew
#

0.8/3 = 0,266666667

slim ferry
#

1/(1+1+1+0.2), 1/(1+1+1+0.2), 1/(1+1+1+0.2), 0.2/(1+1+1+0.2)

ocean sinew
#

0.8/3
*3
= 0.8

#

+0.2 = 1

slim ferry
#

uh cool

ocean sinew
#

total ups to 100%

slim ferry
#

you just completely changed the odds of all of them though

#

like cool they add up to 1 but thats not the chances

ocean sinew
slim ferry
#

THIS IS ABOUT ODDS THOUGH

ocean sinew
#

It's their chances for being rolled in percentage value

slim ferry
#

THATS ODDS

ocean sinew
#

but the chance is correct though

red flower
#

it's not

slim ferry
#

a percentage is literally the fraction multiplied by 100

#

its not that deep. at all.

ocean sinew
red flower
#

weights work how eris explained it, your system is nonsense

#

it doesn't even work to get the final odds

ocean sinew
#

wait true

#

how do I fix it btw?

slim ferry
#

remove your entire system and replace it with the correct one

red flower
#

uhh i dunno what the conversation was about even before this so i dont know what you're fixing

unborn bay
#

what the fuck happened here

ocean sinew
#

lemme explain

slim ferry
ocean sinew
#

{1,1,1,0.2}
this is a table with numbers representing chances 1 being 100%

slim ferry
#

but

ocean sinew
#

and 0.2 being 20%

slim ferry
#

you cant do that

ivory coral
ocean sinew
#

I want to get the chance for each one to be rolled

red flower
#

your system is flawed because you don't know what a weight is in the first place

#

1 is not 100%, it's just 1

slim ferry
red flower
#

the important part is the ratio

ocean sinew
slim ferry
#

cool

#

and?

ocean sinew
#

when I multiply by 100 it gives the percentage

slim ferry
#

no

red flower
#

no

slim ferry
#

not yet

red flower
#

if it was 100% it would be guaranteed

slim ferry
#

only once you normalize it to total to 1

#

then multiply by 100

#

thats the % chance

red flower
ocean sinew
#

I understand it now

ivory coral
# red flower reset it in an event?

thats also a solid idea
but ive also bit a snag like what if its copied by blueprint
i dont want it double incrementing either but if it only increments on itself the blueprint wont ever do anything

ocean sinew
#

I need to get the total

#

then add them

#

then divide the numbers

#

then multiply

ivory coral
# red flower can i see the code
        if context.discard then
            card.ability.extra.currentdisc = card.ability.extra.currentdisc + 1
            if card.ability.extra.currentdisc >= card.ability.extra.discreq then
                card.ability.extra.currentdisc = 0
                return {
                    dollars = card.ability.extra.dollarper
                }
            end
        end
ocean sinew
#

like this @slim ferry
{1,1,1,0.2}
total=320
{100/320,100/320,100/320,20/320}

#

then I multiply by 100 again

#

and I'll get the chance

#

?

red flower
#

yeah

ocean sinew
#

Thanks I understand now

#

I wasn't understanding this

red flower
ivory coral
#

that is an idea but wouldnt that not solve it
it would still have the same tallying problem

red flower
#

but yeah i would reset it in an event and only increment when not context.blueprint

ivory coral
#

but if it doesnt increment in context.blueprint then blueprint copying this would never do anything though

#

since it would never be equal

red flower
#

doesn't the number stay the same then

#

so it would trigger the same

#

i dont know how to explain it without coding and i dont like coding on phone

ivory coral
#

i need it to copy only the money effect not the tally or the tally reset
but once the tally is incremented its already calculated the blueprint card for the context calculation so it doesnt do anything

#

the tally would need to be counted before any of the jokers and the reset would have to happen after all of them

red flower
#

that's why the reset should be in an event

#

pre_discard solves the first issue too

#

and it's better if the tally rolls over twice

ivory coral
red flower
#

because pre_discard doesn't go card by card

#

you would need to return the dollars in discard tho i think

ivory coral
#

hmmm
so how would this work then
do the tally in pre_discard and not blueprint
return money in discard (which card though?)
create an event in discard to reset the tally if not blueprint

red flower
#

you probably wouldn't need to reset the tally

#

in an event i mean

#

you can save which index of cards trigger the dollar count and return it for those

#

and then reset that index the next time pre_discard comes around

ivory coral
#

so what youre saying is
run through cards in pre_discard, check which card makes the tally reach the specified value and save its index
find that card in discard and return money for it
then next time pre_discard is calculated reset it beforehand

red flower
#

yeah

#

i havent worked too much with blueprint tho so maybe there's something better

ivory coral
#

sounds reasonable enough
perhaps difficult to make work as a loc var to display on the card though

#

but ill give it a shot

red flower
#

you would just display the tally after pre_discard

ivory coral
#

true and since it uses the index instead of the tally for calculation the tally can just be like cosmetic

hidden sable
#

how can i check if the player is currently moving the mouse, pressing anything on the mouse, or pressing a key

#

like basically doing anything

rough furnace
#

is this a are you pressing a key at x time or you want to be let known when they do something?

hidden sable
#

like

#

i basically want to check a boolean if they are doing ANYTHING

#

pressing a key

#

moving their mouse

modern kindle
#

you can check love.mouse and love.keyboard

hidden sable
#

idk how never used love

#

might have to

#

dumb it down

rough furnace
#

balatro has an event system too

hidden sable
#

my main goal is to have a boss blind that at random intervals will tell you to stop moving and if you move the run loses

winter flower
#

i'm (really) new to this, and i have no idea why this keeps happening

rough furnace
#

a string is not a frawable

#

also this code won't work

#

ou;re first off overwirting love functions that balatro uses and also these are only being loadrd when your caculate tuns

#

what are you trying t odo?

winter flower
clear ocean
#
-- Thank you to nh6574, unusedparadox, and eremel_ for help with the Counter-Strike jokers
SMODS.Joker({ -- Counter-Terrorist
    key = 'cTerrorist',
    pos = { x = 0, y = 0 },
    rarity = 3,
    blueprint_compat = true,
    eternal_compat = true,
    perishable_compat = true,
    loc_vars = function(self, info_queue, card)
        info_queue[#info_queue+1] = { key = 'terroristSource', set = 'Other' }
    end,
    calculate = function(self, card, context)
        if context.retrigger_joker_check and not context.retrigger_joker and context.other_card ~= self and not context.other_card.config.center.original_mod then
            return {
                message = localize("k_again_ex"),
                repetitions = 1,
                card = card,
            }
        end
    end
})
SMODS.Joker({ -- Terrorist
    key = 'terrorist',
    pos = { x = 0, y = 0 },
    rarity = 3,
    blueprint_compat = true,
    eternal_compat = true,
    perishable_compat = true,
    loc_vars = function(self, info_queue, card)
        info_queue[#info_queue+1] = { key = 'terroristSource', set = 'Other' }
    end,
    calculate = function(self, card, context)
        if context.retrigger_joker_check and not context.retrigger_joker and context.other_card ~= card and context.other_card.config.center.original_mod then
            return {
                message = localize("k_again_ex"),
                repetitions = 1,
                card = card,
            }
        end
    end
})
``` i think these don't fit for what i'm going for in the long run, but didn't want it to go to waste. feel free to use them yourselves
rough furnace
clear ocean
#

what do you think? is the formatting correct? (i'll add the colours in a second)

modern kindle
#

prob add the colors to chips and such

rough furnace
#

it doesn;t make much sense

clear ocean
#

that's what i'll do i'm asking if the text itself is good

clear ocean
#

feel free to discuss i'm curious

rough furnace
#

"chips of the poker hand" mostly

modern kindle
#

gain chips from scored cards, resets on discard maybe

clear ocean
#

is there a better term? it's the total chips of a poker hand

clear ocean
#

tried to keep the formatting in line with the vanilla jokers

#

was trying to write it along the lines of this and runner

rough furnace
#

Probably more of
When hand is played, add the chips of the played poker hand to this joker's chips
Resets when discarding

#

it's a bit wordy

#

maybe you can get away with remviing the "When hand is played"

clear ocean
#

Gains the chips of the played poker hand and resets when discarding?

rough furnace
#

it's a bit diffuvlt because you have both the chips of the poker hand and the joker

rough furnace
clear ocean
#

thanks

winter flower
#

i got the image working but uhhh

normal crest
#

that adds up

clear ocean
#

@modern kindle @rough furnace what do you think

granite nymph
#

im tweakin

clear ocean
#
-- COMMON

SMODS.Joker({ -- Bubble Gum
    key = 'bubbleGum',
    config = { extra = { chips = 0 } },
    loc_vars = function(self, info_queue, card)
        info_queue[#info_queue+1] = { key = 'bubbleGum1', set = 'Other' }
        return { vars = { card.ability.extra.chips } }
    end,
    calculate = function(self, card, context)
        if context.before and context.main_eval and not context.blueprint then
            card.ability.extra.chips = card.ability.extra.chips + context.scoring_hand
            return {
                message = localize('k_upgrade_ex'),
                colour = G.C.CHIPS,
            }
        end
        if context.discard then
            local last_mult = card.ability.extra.mult
            card.ability.extra.mult = 0
            if last_mult > 0 then
                return {
                    message = localize('k_reset')
                }
            end
        end
        if context.joker_main then
            return {
                chips = card.ability.extra.chips
            }
        end
    end
})
#

outside of that error i think the rest i did right. kinda proud

#

is it something like

#

context.scoring_hand.chips? or something

#

fixed the discard problem, but that wasn't the crash

#

everything else works, but can't find much about how to get the chips from the scoring hand

#

looked on github and discord not much

red flower
#

like the base chips for the poker hand?

clear ocean
#

base chips of the played hands

red flower
#

or the chips the cards would score?

clear ocean
#

latter

#

currently looking over github wiki 😅 seeing if i missed something

sonic cedar
#

next on the list is these guys

red flower
# clear ocean latter

you need to iterate through context.scoring_hand and check each playing_card.base.nominal

clear ocean
#

so do a loop of adding points of each playing_card.base.nominal?

red flower
#

yeah

clear ocean
#

is there a way to get the size of the played hand for the loop?

#

like if it's a pair it'll equal two and if it's a straight it'll equal five

#
    calculate = function(self, card, context)
        if context.before and context.main_eval and not context.blueprint then
            local lChips = 0
            for i=1,5,1 do
                lChips = lChips + playing_card.base.nominal
            end
            card.ability.extra.chips = card.ability.extra.chips + lChips
            return {
                message = localize('k_upgrade_ex'),
                colour = G.C.CHIPS,
            }
        end
``` something like this? the five is a placeholder
red flower
#

#context.scoring_hand

#

you can also just do for _, playing_card in ipairs(context.scoring_hand) do

clear ocean
#

oh

#

thanks

#

let's give it a spin then

#

it works 👍 thank you

#

that was the last piece of the puzzle let me record to show yall

#

maybe i should record with a higher resolution

#

i just realised that this is level 3 boosts so don't have to deal with 8mb

regal sentinel
#

Quick question, is there a method that can be used in calculate to detect if my hand IS a three of a kind? I was looking around the steamodded wiki but couldn't find any.

clear ocean
# regal sentinel Quick question, is there a method that can be used in calculate to detect if my ...
-- The Trio
SMODS.Joker {
    key = "trio",
    unlocked = false,
    blueprint_compat = true,
    rarity = 3,
    cost = 8,
    pos = { x = 6, y = 4 },
    config = { extra = { Xmult = 3, type = 'Three of a Kind' } },
    loc_vars = function(self, info_queue, card)
        return { vars = { card.ability.extra.Xmult, localize(card.ability.extra.type, 'poker_hands') } }
    end,
    calculate = function(self, card, context)
        if context.joker_main and next(context.poker_hands[card.ability.extra.type]) then
            return {
                xmult = card.ability.extra.Xmult
            }
        end
    end,
    locked_loc_vars = function(self, info_queue, card)
        return { vars = { localize('Three of a Kind', 'poker_hands') } }
    end,
    check_for_unlock = function(self, args) -- equivalent to `unlock_condition = { type = 'win_no_hand', extra = 'Three of a Kind' }`
        return args.type == 'win_no_hand' and G.GAME.hands['Three of a Kind'].played == 0
    end
}
#

here's a reference for the trio joker which xmults if it's a three of a kind which counts four/five of a kinds and full houses if i can remember correctly

#

hm. for bubble gum should it be unlocked and needed to be obtained or should i come up with some condition

#

maybe have a food item perish or win a round, ante, or run with few or no discards?

red flower
#

if you want contains then what ken said

regal sentinel
red flower
#

it is there but i dont think theres an example

rough furnace
clear ocean
#

Is there any palatte for the joker cards I should be aware of?

rough furnace
clear ocean
#

set?

rough furnace
#

these three points

#

it's not a big deal people break rules all the time

#

idk I'm not an artisit

modern kindle
#

i breaking that all the time

clear ocean
#

progress

#

the question is... which one

modern kindle
#

dubble for shure

#

however, i offer an alternative

clear ocean
#

i can even use this as a reference

modern kindle
#

i remember as a kid i never cared for the taste of these ones but man are they memorable

#

so is dubble bubble but the case of hubba bubba is built different

clear ocean
#

i have an idea of having the gum stick extend through out the background like madness

foggy ginkgo
#

How does one make it so if you play 4 stone cards cards it's considered a four of a kind

clear ocean
#

wow i suck at this

sonic cedar
clear ocean
modern kindle
clear ocean
#

i'm not a good artist i did my best

modern kindle
#

you know
it might just be me but i think that would look sick if you could get pixel art of that and use it as a soul sprite or whatever theyre called

like the legendary jokers that have the thing floating over them

#

i think thatd look sick

ivory citrus
#

Hello, how can I remove the restriction that no more jokers are created when all slots are occupied?

clear ocean
#

it does but i believe there is a reason outside of hologram the legendary cards have that

#

makes it more unique

#

it might just be me but honestly i'm not a big fan on how this turned out

modern kindle
#

not to say its horrible or anything but it makes me think that this is some alien fella

and he has a lil face, and the yellow is his brain, and the gum coming out looks like a tail

clear ocean
#

yeah... at least i tried haha

#

i can see the lil face too haha

#

i'll go ahead and not use it but ill keep it as a project file

chrome widget
#

Having an issue where the game saving right after a consumable is used causes the consumable to be hanging in mid-air in a softlock upon reload

#

Does anyone know how to fix this?

clear ocean
#

regardless, i am proud of my work today. it's a solid vanilla like card

jolly shadow
clear ocean
#

correct

clear ocean
jolly shadow
#

i feel like itd be better to word it more specifically

#

but also that is a nice ability well done

clear ocean
#

the reason i choose gum to visualise is that you keep chewing on it and when you spit it out thats like discarding it

normal crest
clear ocean
#

is that more of a preference or you believe that's better in general

modern kindle
#

hi srock

normal crest
normal crest
clear ocean
#

wanted to make sure it's clear enough