#💻・modding-dev

1 messages · Page 454 of 1

drowsy heath
#

Well

hidden sable
#

G.GAME.blind.in_blind and G.STATE == G.STATES.SHOP

candid sleet
#

no clue what i did wrong here, tried adding a custom deck texture

drowsy heath
#

Hi ratmilk things still keeping clean

hidden sable
#

but first

#

i need to go back

#

and fix the config for all of my consumables

drowsy heath
#

Oh damn

#

I've been working on a few more think I'm on 15 jokers now

#

And my ass artist isn't replying 🥲

#

I would find someone else but this person is doing it for me for free sooooo ill be patient

hard mica
#

I might've found out how to fix the materializing when in round

candid sleet
#

what am i supposed to use instead of smods.init, i see its outdated

maiden phoenix
#

I love N so much wish I had a N in my username

maiden phoenix
#

This didn't work btw, maybe cuz both of them are on the same context? idk

red flower
#

can u show me the debug prints

#

oh

#

i meant inside merge_effects

maiden phoenix
#

I removed it, I just get repetitions warning spam

midnight coyote
#

how do i modify SMODS.joker itself

maiden phoenix
#

Oh oops

candid sleet
midnight coyote
wintry solar
#

this should only be from jokers that are giving bad returns in repetition contexts anyway

midnight coyote
#

SMODS.INIT = {}

maiden phoenix
#

funny enough it triggers on each context call

red flower
red flower
proud depot
#

how do i get a jokers rarity? tried card.ability.rarity but it says its nil

drowsy heath
#

The last thing I did this morning before I went to bed, was done so poorly 🤣 I need to not work on this when I'm abt to pass out

red flower
midnight coyote
#

hey how do i put code into vanilla jokers

red flower
#

take_ownership?

midnight coyote
#

i want to modify the calculate function of certain vanilla jokers to let them do things they couldn’t otherwise do

midnight coyote
#

i don’t intend to replace things, more so add on

red flower
#

it preserves anything you don't replace

maiden phoenix
#

Ok it works now thanks 👍 I'll record a video to demonstrate the thing

candid sleet
#

uh i tried this but i don't see any of my custom playing cards in game

midnight coyote
#

i need to mess with the calculate function

#

to add an extra thing

red flower
wintry solar
#

that's correct

midnight coyote
#

what i need is to have it check a condition and then turn itself into a different joker if that condition is fulfilled, preferably maintaining scaling

red flower
candid sleet
#

thanks

midnight coyote
#

can i have a joker just turn itself into a different one, and paste over the config values?

#

if i format it identically

maiden phoenix
#

The joker card message is weird tho

hidden sable
red flower
#

im glad people are using merge_effects

hidden sable
#

isit for hooks

#

because im still using the outdated stuff then

red flower
#

it's to combine calculate returns

hidden sable
#

oh

red flower
#

for example to blueprint two cards

maiden phoenix
maiden phoenix
#

This is their calculate func btw, first sapphire then the other

drowsy heath
#

would this be too op ?

hidden sable
#

you cna get mult after your previous mult

drowsy heath
#

exactly but is it too op for a common

hidden sable
#

so its good

drowsy heath
#

do i make it rare or uncommon maybe

hidden sable
north lodge
# drowsy heath would this be too op ?

No, this is worse than hanging chad in a lot of situations so I would not say it is OP. Especially when you consider that hanging chad is balanced in the multiplayer mod to be exactly this.

hidden sable
drowsy heath
#

i also wanted to make dusk but first hand so ill call it dawn

north lodge
#

(or rather, first two cards, not last two)

red flower
maiden phoenix
north lodge
maiden phoenix
red flower
#

you would need to order the tables

maiden phoenix
north lodge
#

That's the difference. Having 1 card to do the thing is a lot easier than having 2

#

And for the low price of just finding a justice card in the shop while you already have chad, it was incredibly strong in multiplayer.

drowsy heath
#

being last grants access to the rest of the mult

#

making it larger

north lodge
#

I would argue it is not stronger than hanging chad overall

hidden sable
drowsy heath
#

temp

#

i plan on making it look nicer later

hidden sable
#

ight

#

if its in the locale you can edit them really easility

formal parrot
#

Maybe you wanna edit that text

#

Aswell

hidden sable
drowsy heath
#

yeah thanks to gruelling labour last night im all gud

hidden sable
#

you can even send other people the locale to edit

#

or make a new locale in a different language

#

but the different language part is rearly used despite localization being made for it

drowsy heath
#

idk many languages only english french spanish and japanese

formal parrot
#

😭people really don’t take discord seriously,. Wtf is Ratmilk

drowsy heath
#

and im light on spanish and japanese

modern kindle
hidden sable
sweet nimbus
#

is there a way I can make Spectral Packs always contain a certain Spectral card?

formal parrot
#

Yeah dilly the dillster

drowsy heath
#

dilatro..... dihlatro hehehe

hidden sable
modern kindle
formal parrot
#

So you wanna code it to a joker

#

Or a voucher

modern kindle
hidden sable
#

that doesnt make my name sound any better i jsut wanted you to think of that

formal parrot
#

Or a consumable

sweet nimbus
#

A deck effect actually

formal parrot
#

Yeah that could work

hidden sable
drowsy heath
solid mesa
modern kindle
#

what it sound like in spanish

gleaming yew
#

Do these seem OP for Uncommon Jokers?
Each scored card with no Enhancement adds +3 Chips to this Joker. Each scored card with the Bonus or Glass Enhancement adds X1 Mult to this Joker.
Copies Chips of last played hand, adds the first 2 digits of that value to Mult. (i.e. 33333 adds 33)

drowsy heath
#

maybe a rare idk

hidden sable
formal parrot
#

This is how “telescope” does ir

#

You need to change it up a little

drowsy heath
#

damn yk i cant lie thats a better story than mine

hidden sable
#

how balanced ylal think ts is

primal robin
#

Oh no again

modern kindle
#

<@&1133519078540185692>

solid mesa
hidden sable
#

YES KING!!!!!!!!!!

modern kindle
#

shoot him

primal robin
#

gottem

formal parrot
#

Chat i was reading that was rude

karmic creek
#

i made a glass card and purchased two oops all sixes him

modern kindle
#

thanks my shooter youre my goat

drowsy heath
hidden sable
modern kindle
formal parrot
hidden sable
modern kindle
#

i take ownership of glass so, should negate that

drowsy heath
#

how does one become creative and think of new ideas

formal parrot
hidden sable
#

my mod just destroys the card

solid mesa
maiden phoenix
hidden sable
#

no increasing chances, it just destroys it

maiden phoenix
#

Btw ty message_card worked

drowsy heath
hidden sable
#

make a consumable called coffee beans that gives X1 mult to any coffee joker in hand when used

gaunt thistle
#

evening chat

#

how goes your days

drowsy heath
#

then i just make different coffee cards like latte and frape

hidden sable
gaunt thistle
solid mesa
maiden phoenix
gaunt thistle
hidden sable
drowsy heath
#

only thing is how do i define them as coffee cards

maiden phoenix
#

Pretty proud of myself w this one (tho I was heavily helped)

hidden sable
#

like decaf is like popcorn but +60 mult

gaunt thistle
solid mesa
gaunt thistle
gaunt thistle
#

late night at work so

solid mesa
drowsy heath
#

ofc ofc

gaunt thistle
hidden sable
gaunt thistle
#

oh wait this is dev chat

#

im sorry

formal parrot
#

In this economy ?

solid mesa
hidden sable
solid mesa
#

they probably got tired

drowsy heath
# hidden sable wdym

so for the coffee beans card to work it needs to have detected a coffee card, how would it know what is and what isnt

hidden sable
#

never used groups before so

#

we need to contact a trusted developer

drowsy heath
#

yes we do i need this its a gud gud idea

hidden sable
#

my idea for the coffee beans is

#

multiply a coffee cards stat by x1.5

#

on use

#

all coffee held in hand

#

man i need to add more jokers

#

welp

#

holojobo cmere

#

im turning you into a card

modern kindle
hidden sable
hidden sable
modern kindle
#

yea the game balatro cause thats what youre modding

#

silly

hidden sable
#

thats it

red flower
#

has anyone made a balatro inspired mod

hidden sable
modern kindle
#

i want to make a N inspired mod

drowsy heath
#

same

red flower
hidden sable
#

adds 50 slightly different variations of the letter N

#

normal n, upside down n, sideways n, slightly transparent n, invisible n

modern kindle
# red flower i love pokemon

ive never actually played a pokemon game beyond like a very beginning

i do intend to start soon since my game collection is on its way to handhelds now

hidden sable
#

small n, big n, wide n, tall n

drowsy heath
#

so how does one define the action of playing the first hand

modern kindle
#

but the gba pokemon games are so costly

hidden sable
drowsy heath
#

of the round yeah

hidden sable
#

whast the end goal, ill go look for the context

drowsy heath
#

to make a reverse dusk called dawn instead of last hand its first hand

modern kindle
hidden sable
#

or copy dna

drowsy heath
#

... idk how

hidden sable
#

if context.before and context.main_eval and G.GAME.current_round.hands_played == 0 and #context.full_hand == 1 then

#

copied right from N'

red flower
#

only the hands_played part

hidden sable
#

yeah

#

like just if context.before and context.main_eval and G.GAME.current_round.hands_played == 0 then

#

that means first hand

drowsy heath
#

thank you

hard mica
pure salmon
#

can i make a challnge such that you can't play specific hands

red flower
#

you can but i don't think it's very straightforward because i dont think challenges have calculate

maiden phoenix
#

No they don't sadly

drowsy heath
#

so erm dawn isnt working

#

want no hold on

modern kindle
#

challenge calculate smods when

red flower
#

mod calculate when

drowsy heath
#

nope it not working for some reason

#

ill try figure ts out fgs

stiff quiver
#

how rare is a weight of 0.005 for a pack?

hidden sable
hidden sable
#

this a channel for helping developers

#

not for uhhh

#

saying we have problems

drowsy heath
hidden sable
#

man we really need a flowchart for solving issues

#

send code

#

and describe what it IS doing

drowsy heath
#
    key = "joker18",
    blueprint_compat = true,
    atlas = 'joker',
    rarity = 2,
    cost = 5,
    pos = { x = 4, y = 7 },
    config = { extra = { repetitions = 1 } },
    calculate = function(self, card, context)
        if context.before and context.main_eval and G.GAME.current_round.hands_played == 0 then
            return {
                repetitions = card.ability.extra.repetitions
            }
        end
    end
}
``` quite litterally nothing its acting as a plaseholder rn
red flower
#

repetitions have to be in the repetition context

hidden sable
drowsy heath
#

where would i put it then

#

coz im confused abt this,

red flower
#

check how dusk does it

drowsy heath
#

THE COMMAS ARE GETTING TO MY TYPING

hidden sable
#

@red flower cant he define context.repetitions along with context.before?

drowsy heath
red flower
#

no

hidden sable
#

damn

drowsy heath
#

i was abt to type that

hidden sable
#

@drowsy heath looks like you can jsut edit that last part to be G.GAME.current_round.hands_played == 0

drowsy heath
#

doesnt sound like a bad idea ill lyk if it works

median grove
#

is there a way to have an enhancement sprite that draws over parts of the card? i want to cover the card's suit icon thats right under its rank

drowsy heath
#

im gunna order some ice cream i need somet to cool me down

#

and dawn works now

wintry solar
#

oh mod calculate was a thing, right

gaunt thistle
hard mica
#

so im trying to make it so a buffon pack materializes after a blind if the objective is completed during a blind but not sure how to postpone that buffon pack until the player ended the blind n stuff

#

just got this

#

not sure how to continue

maiden phoenix
#

Why not save it in a variable and trigger it when in shop?

modern kindle
#

we do have context.starting_shop dont we

hard mica
maiden phoenix
#

You could create a free booster in the shop

hard mica
#

i guess

#

how do i do that ?

hidden sable
maiden phoenix
#

It's how I do it but with arcana packs

                G.E_MANAGER:add_event(Event{
                    func = function()
                    local _booster = SMODS.add_booster_to_shop('p_arcana_normal_'..(math.random(1,4)))
                    _booster.cost = 0
                    return true
                end})
#

Wow discord destroyed that code

hidden sable
#

yeah

#

just screenshot it atp

drowsy heath
#

does the vanilla remade have an example of groups ?

maiden phoenix
#

It was for easy copy/paste

hard mica
#

and for buffon pack is just p_buffoon_normal?

drowsy heath
#

so i can do the coffee thing

red flower
hidden sable
#

also chat i just got done fixing all of my consumables so now i can start work on shit

maiden phoenix
hidden sable
#

he wants to "group" his coffee jokers to refer to them

red flower
#

yeah ObjectTypes

hard mica
red flower
#

there's no example of that in vanillaremade

drowsy heath
#

yeah i was gunna explain it very crappy

drowsy heath
#

where would i find that

maiden phoenix
hard mica
#

alright thank you

red flower
drowsy heath
#

wait could i use cryptid as an example with the candy jokers

#

i think its cryptid that has it

red flower
#

yeah cryptid has the food jokers too

drowsy heath
#

okok ill do that then

#

okay i cant find anything about how the thing was made

#

i found where the spooky jokers are

red flower
#

search for SMODS.ObjectType in the code

drowsy heath
#

oh wait you can do that

red flower
#

you can literally search the entirety of github for it

hidden sable
red flower
#

group_key? for boosters?

buoyant shard
#

How do you create a random tag? Do I use add_tag() or create_card()?

faint yacht
#

kind = 'string' to group Booster Packs.

hidden sable
red flower
#

yeah
objecttypes

#

maybe you're thinking of pools but that uses objecttypes

real night
#

like from cryptid

#

cause it's not really it's own hand it's just an Ascension. of 5oak

faint yacht
#

...does the context.scoring_name internally remain the same?

tall wharf
#

shadering

hidden sable
hidden sable
broken cliff
hidden sable
midnight coyote
#

how do i set different loc_txt if the card is locked

broken cliff
hidden sable
#

i think there's an example in localizations

tawdry oriole
#

how can you check if there's a specific rank in your deck?

hidden sable
daring fern
midnight coyote
#

found it

tawdry oriole
#

thanks a lot

drowsy heath
#

okat so i have a card defined as a coffee card now how do i make my joker detect that and gain 1x mult per coffee joker owned

#

coz i dont think cryptid has an example

red flower
#

card.config.center.pools.objecttypekey iirc

hidden sable
#

and have beans multiply the coffee boost

hidden sable
#

it gives +60 mult

drowsy heath
#

yeah

hidden sable
#

every hand you play substracy 5 mult

#

make the mult into the config

#

so when you use coffee beans

#

you can make the consumable give the coffee cards more mult

#

by multiplying the config coffeeboost by 1.5

drowsy heath
#

THATS A REALLY GUD IDEA WTF

#

i am lost on where to start that but cryo is out the window here comes coffee jars

hidden sable
drowsy heath
#

ill just use the cryo consumable and change it out

#

easier to make 1 than 2 consumable types

#

keep it simple

pastel torrent
#
    if context.individual and context.cardarea == G.play and context.other_card then
        local v = context.other_card
        if v.key == 'v1' then
            return {xmult = 2}

            if #SMODS.find_card("j_dark_joker", true) > 0 then
                result.mult = (result.mult or 0) + 50
                result.chips = (result.chips or 0) + 100
            end
        end
    end
end,
}```

im lost lol
hidden sable
#

and make like 1 coffee bean give 1.5 and enforcer give 2

daring fern
pastel torrent
#

so the return all at the bottom

#

lemme try

pastel torrent
primal robin
#

trash That's crazy, imagine making videos about development in Roblox in Lua, and then make mistakes like this

daring fern
#

Also v.key includes j_ and mod prefix.

pastel torrent
pastel torrent
#

ty

pastel torrent
daring fern
pastel torrent
#

not this kind of stuff

pastel torrent
primal robin
#

Well, let me fix it for you.

local v = context.other_card

local result = {}
if v.key == "j_dark_v1" then
  result.xmult = 2
end
if #SMODS.find_card("j_dark_v1") > 0 then
  result.mult = (result.mult or 0) + 50
  result.chips = (result.mult or 0) + 50
end

return result
pastel torrent
#

thanks lol

primal robin
#

Lua in Roblox also controlled by Lua

pastel torrent
#

modified version

#

but

#

same thing that's true

primal robin
#

Core the same basically

pastel torrent
primal robin
#

Like how did you manage make UI with mistakes like this, it's basic level of understanding how language works

#

Nothings against, just curious

hidden sable
pastel torrent
#

prob fatigue

#

lol

primal robin
#

Fair enough for me

pastel torrent
drowsy heath
tall wharf
#

😭

hidden sable
hidden sable
hidden sable
tawdry oriole
#

how can i make a custom deck start with a custom suit?

tall wharf
midnight coyote
#

my overclock unlocking function works!!

#

woohoo

modern kindle
#

granting it boosts it otherwise would not have?

midnight coyote
#

how do i turn a joker into a different one

#

do i just have to add the new card and remove the existing one

#

i want to do it to where the card flips, and then comes back as something else

faint yacht
#

:set_ability

midnight coyote
#

could you explain

#

card:set_ability('j_new_joker_key')

#

?

red flower
#

yes

midnight coyote
#

okay

#

thanks

#

will it finish calculate despite being considered a 'new card'

#
SMODS.Joker:take_ownership('smiley',
        {

            config = {ext_ovr = {faces_destroyed = 0},
            calculate = function(self,card,context)
                if context.remove_playing_cards and not context.blueprint then
                    for _,removed_card in ipairs(context.removed) do
                        if removed_card:is_face() then

                            card.ability.ext_ovr.faces_destroyed = card.ability.ext_ovr.faces_destroyed + 1
                        end

                    end
                    if card.ability.ext_ovr.faces_destroyed >= 20 then
                        card:flip()

                        
                        end


                end

            end,


        },
        true,
)
#

is there a syntax error in this im missing

#

OH

#

im missing a bracket

#

so how would i add to the config table

#

rather than overwrite it

daring fern
midnight coyote
#

i need to add a value that tracks face cards destroyed for the overclock condition

#
SMODS.Joker:take_ownership('smiley',
        {


                      calculate = function(self,card,context)
                          if context.remove_playing_cards and not context.blueprint then
                              for _,removed_card in ipairs(context.removed) do
                                  if removed_card:is_face() then

                                      card.ability.ext_ovr.faces_destroyed = card.ability.ext_ovr.faces_destroyed + 1
                                  end

                              end
                              if card.ability.ext_ovr.faces_destroyed >= 20 then
                                  card:flip()
                                  card:set_ability('j_charcuterie_ferocious_grin')
                                  card:flip()


                              end


                          end

                      end,


        },
        true,



)

and theres a syntax error here but i dont know where

plush jewel
#

How to make joker check if player used a discard, destroyed card or sold/destroyed joker itself

midnight coyote
daring fern
midnight coyote
#

should have all you need in there

drowsy heath
#

MY ARTIST IS ALIVE YESS I CAN SOON HAVE ART FOR MY JOKERS

plush jewel
drowsy heath
#

Thats evil

#

But funny

plush jewel
#

rn i can't manage it to make it detect destroyed crads or discrads

drowsy heath
#

What about using cryptid as an example, they have selling cards to make one and replacing cards

plush jewel
#

hmm which one

drowsy heath
#

Like erm the one that replaces all sold cards with a jolly joker

#

I cant remember the name of it for the life of me tho

#

I think it is that anyway

plush jewel
#

ill check

drowsy heath
#

This one has kinda the idea

floral spindle
#
            if SMODS.has_enhancement(context.other_card, "m_lucky") then -- if card is lucky then
                if pseudorandom('Bord') < G.GAME.probabilities.normal / card.ability.extra.odds then --if odds succeeds then
                    if SMODS.Edition:get_edition_cards(G.jokers, true) then
                        editionless_jokers = SMODS.Edition:get_edition_cards(G.jokers, true)
                        eligible_card = pseudorandom_element(editionless_jokers, pseudoseed('bord')) -- this whole thing just finds jokers without an edition
                        return {                        
                            message = "Negative!", -- makes a funny message to signify that a card is negative
                            
                            func = function()
                            G.E_MANAGER:add_event(Event({
                                func = function()
                                eligible_card:set_edition('e_negative', true)

                                    return true
                                end

                            }))
                        end
                        }
                    end
                end
            end
        end
drowsy heath
#

What exactly is happening ?

floral spindle
#

lucky cards have a 1 in 100 chance to make a random joker negative

drowsy heath
#

Instead they all said negative and didn't do anything ?

tall wharf
floral spindle
#

all the lucky cards attempted to apply negative to one joker

tall wharf
#

i love writing shaders

drowsy heath
#

Oh

#

Erm was it a one time event or have you tested it multiple times, could be that they all just set on one joker

floral spindle
drowsy heath
#

Weird

plush jewel
#

Okay I fixed discards and destroys. now I need to detect when joker itself is sold

drowsy heath
#

Could be thay the joker is decided before play and then they all do that and its not random person lucky card maybe idk I've never done that before so I've not got a clue

#

Per*

#

Not person wtf is autocorrect doing

floral spindle
#

wait

#

I think I fixed it

drowsy heath
#

What was wrong with it?

floral spindle
#

I simply ran the thingy to find editionless jokers inside of the return{}

drowsy heath
#

Ohhh okok

#

Also by any chance do you know how I could make a joker detect another joker from a object type to gain a mult value

#

I have the object type set up

#

And a joker within it

#

But how do I make it so that my other joker detects I have that in hand and gains a mult value

#

Coz I'm like lost

#

Wait hold on i can base it on cryptids m jokers

daring fern
drowsy heath
#

Oh I was gunna say base it on the m joker which gains mult per jolly but that works too

daring fern
drowsy heath
#

Oh I thought they were

tall wharf
#

isn't the pool just M

faint yacht
#
-- checks for Jolly Jokers or cards that are supposed to be treated as jolly jokers
function Card:is_jolly()
    if self.ability.name == "Jolly Joker" or self.ability.name == "cry-jollysus Joker" then
        return true
    end
    if self.edition and self.edition.key == "e_cry_m" then
        return true
    end
    return false
end

?

midnight coyote
#

can i not use card within an event

plush jewel
red flower
midnight coyote
#

why doesnt it work then

red flower
#

idk why are you assuming it's that

midnight coyote
#

'attempt to index local card (a nil value)'

red flower
#

calculate_effect is missing the card

hidden sable
#

what is calculate for in consumables

midnight coyote
#

ohh

faint yacht
midnight coyote
#

is card the first or last argument

red flower
red flower
hidden sable
midnight coyote
#

works now

#

thanks

hidden sable
drowsy heath
#

I havnt done that yet

#

I dont think I will tbf

hidden sable
#

@red flower can you detect if a joker has a certain config

drowsy heath
#

I think ima leave it as just the coffee cards and stat boosts from the coffee consumable

red flower
#

yes that's how i do it in my mod for the yugioh cards

hidden sable
#

you don't need to do pool shenanigans

red flower
#

i think pool shenanigans is better

#

if you already have the pool made

hidden sable
drowsy heath
#

I cant figure out the last bit of this code to make it work o forgot how to do it

red flower
hidden sable
#

i feel like instead of doing if joker is in pool, just set its config

drowsy heath
#
    key = 'joker19',
    atlas = 'joker',
    pos = {
        x = 7 ,
        y = 4 
    },
    rarity = 2,
    cost = 5,
    blueprint_compat = true,
    config = { extra = { xmult = 1 } },
    loc_vars = function (self, info_queue, card)
        return { vars = {card.ability.extra.xmult} }
    end,
    calculate =function (self, card, context)
        if joker.config.center.pools.coffee then
            return {
                
            }
        end
    end
}``` what goes in the final return for it to give the extra 1x per coffee joker
hidden sable
solid grotto
#

How do I make a joker change a cards edition/enhancement when scored?
Referencing midas mask doesn't work because it applies before the hand is played

hidden sable
drowsy heath
#

yeah ill just let it do that, its still readable tho

hidden sable
#

change context

red flower
hidden sable
#

doesn't have to be the same context

faint yacht
#
local coffee = 1
for i, v in ipairs(G.jokers.cards) do
  if v.config.center.pools.coffee then coffee = coffee + 1 end
end
return coffee
solid grotto
#

What does ipairs mean

#

Just wondering

solid grotto
#

"for _, scored_card in ipairs(context.scoring_hand) do"

faint yacht
#

Iterates over the numbered entries in a given table up until a break in the numbering occurs or reach end of table.

hidden sable
#

wait nvm im dumb

#

that's for the consumable

faint yacht
#

Meanwhile pairs will iterate over every table entry, numbered or not.

drowsy heath
#

so am i, i got no clue how do this

drowsy heath
#

where do i put that

hidden sable
drowsy heath
#

nvm

#

i got it

hidden sable
#

i still think it's easier for him to just check for a config and set the config

red flower
#

why

drowsy heath
#

got a type mismatch error

hidden sable
solid grotto
#

How would I change this to give cards the negative edition instead? Do I just change m_gold to m_negative or something

red flower
hidden sable
red flower
#

it's the same thing

daring fern
red flower
#

you're replacing v.center.config.pools for v.ability.extra

hidden sable
#

oh pool uses config?

#

can you define pool in config table?

red flower
#

no

#

it's a pools table

#

but you need an objecttype defined

#

this is in the docs btw

hidden sable
#

compared to just, config = { extra = { coffeeboost } }

#

that seems excessive

red flower
#

but they already did the hard part

#

and that also helps with add_card and stuff

drowsy heath
#

okay so pools has a nil alue

#

crashed

hidden sable
#

did they? seems like they are having lots of issues

red flower
#

well ok im not helping anymore

hidden sable
red flower
#

yes

red flower
hidden sable
red flower
#

I'd rather teach people to do things properly instead of ending up with cryptid-like code

drowsy heath
#

where do i find my smods version

solid grotto
#

If steam is telling me it's unable to sync my balatro saves with the steam cloud is that like

#

Bad

red flower
#

open the game and it's in the top right

solid grotto
#

Do I just open it anyway

faint yacht
#

It'll sync later.

drowsy heath
#

1.0.0 beta 0506a

solid grotto
faint yacht
#

Just continue starting.

solid grotto
#

Cool

red flower
unkempt thicket
#

How can i give a card a badge based on if it has a certain ability, I'm doing this and it gives one with the proper info quene but not badge name or color.

drowsy heath
#

still the same crash

hidden sable
drowsy heath
#

yes

#

it painful i tried finding a referance and got lost very quick

hidden sable
#

i used it to make my skateboard item

red flower
red flower
#

i didn't say it was cryptic

#

some of it is

#

like whatever doble scalae does

hidden sable
hybrid shadow
#

i remember sync catalyst was incredibly complicated in how it balanced chips/mult before i made it just do balance = true

hidden sable
#

because it's called cryptid

#

and the word

#

cryptic

drowsy heath
#

its not crashing but the joker isnt doing the action or updating the valua

#

value *

red flower
drowsy heath
#

yep

#

ill send it

red flower
#

yeah that was meant as a general function not to put directly

drowsy heath
red flower
#

what's the goal?

#

x1 mult for each?

drowsy heath
#

gain + 1x mult per coffee card

#

yes i just formatted before you tell me

red flower
#

what does gain mean in this context? permanently? only when you have them?

drowsy heath
#

when you ave them

maiden phoenix
#

Like Baseball?

red flower
#

yeah that was going to be my next question

drowsy heath
#

yeah

#

but i want it to be all triggered on that one card so instead of on the jokers its on the coffee beans

#

so its not 1.5^x its a bse xmult

red flower
#

so not like baseball card

drowsy heath
#

yeah....

hidden sable
red flower
# drowsy heath yeah....
if context.joker_main then
   -- TOGA's code without the return
   return { xmult = 1 + coffee }
end
hidden sable
#

since it's going to act like popcorn

red flower
hidden sable
red flower
hidden sable
#

well since it's like popcorn if it hits zero just eat the card

#

no need for the +1

red flower
#

well idk they can make that change later im just helping them make it work

hidden sable
#

k

drowsy heath
hidden sable
#

id help more but im not at my pc right now

hidden sable
drowsy heath
#

ignore that

#

i was mid mesg then relised i was wrong

#

forgot i had it typed

hidden sable
#

lol

drowsy heath
#

but what idea

hidden sable
drowsy heath
#

idk yet

#

so it detects the latte but only once no matter how many i have

red flower
#

what's the code

hidden sable
#

i feel you are doing the wrong thing for the right thing idk

drowsy heath
red flower
#

coffee should start at 0 probably

#

what's the objecttype code

drowsy heath
red flower
#

yeah because it's not detecting anything

drowsy heath
red flower
#

you're missing the mod's prefix

drowsy heath
#

oh

red flower
#

j_modprefix_key

drowsy heath
#

fgs

#

i need that for the default or the inject card

solid grotto
#

Whenever a trigger happens, it just makes the first scored card negative instead of the scored wild card? Not sure why this is happening

red flower
solid grotto
#

It's supposed to be a 1/5 chance that scored wild cards become negative

drowsy heath
#

no its mm

plush jewel
#

Guys I cant fucking crack it. How can joker check if itself was sold/destroyed?

plush jewel
#

I just gave up and asked GPT, he says SMODS.Hook bullshit

red flower
#

yeah don't

plush jewel
#

which does not exists

red flower
drowsy heath
#

still only a flat 2x

solid grotto
#

I'd be looking at gros michael because whenever it expires it logs that

red flower
plush jewel
solid grotto
#

Does the joker like, get buffed every time it's been sold?

drowsy heath
#

oh yeah forgot to do that mb

red flower
drowsy heath
#

still only 2x

red flower
drowsy heath
#

yes

solid grotto
#

My coding experience rn is super abstracted. I don't like, actually know what all the functions do under the hood

#

Didn't even know context.individual had that function lol

#

I'm working off other jokers completely

red flower
#

i would recommend looking at the vanilla jokers

solid grotto
#

I am

red flower
# drowsy heath yes

uhh might be an smods bug lol
can you try putting j_mm_joker20 = true in the ObjectType cards

solid grotto
#

Anyway how do I check if a scored card already has an edition?
I'm assuming it's something like "if SMODS.has_edition(context.other_card, 'e_negative')"

#

But not sure

red flower
#

for a specific one context.other_card.edition.negative

solid grotto
#

I used "if SMODS.has_enhancement(context.other_card, 'm_wild')" to check for wild cards

drowsy heath
#

well you are not gunna be happy bcoz its still flat 2x and was a fresh run

solid grotto
#

Stolen from golden ticket

red flower
solid grotto
#

Is there an easier way to do that

red flower
drowsy heath
#

wait

#

i think ik

#

hold on

#

for some reason i had coffee_beans as my key but even changing that to the right key didnt work

red flower
#

are you sure mm is your mod's prefix?

drowsy heath
#

yep

#

same one used for localisation

#

and if that works then it should be mm

red flower
#

yeah

drowsy heath
#

is it something to do with the coffee beans code

red flower
#

can you do me a favor and do print(v.config.center) in that loop in your joker

#

and send me the log

solid grotto
#

Unsure why this is wrong

red flower
#

scored_card is not defined?

solid grotto
#

This was working earlier albeit editioning the wrong card

red flower
#

please send more context

solid grotto
#

Should it be other card

red flower
#

yeah scored_card is not defined

#

local scored_card = context.other_card

solid grotto
#

Can't I just change both instances of scored card to other card

#

Or context.other_card

red flower
#

no because you can't use context in an event

drowsy heath
#

i did some fixing of my own an got this

solid grotto
#

What's the code

drowsy heath
#

ima feel stupid when i tell you this but i wasnt loading the content.lua file when testing before

drowsy heath
red flower
drowsy heath
red flower
# drowsy heath

remove the whole inject thing and put the thing in cards in it again, see if it works

solid grotto
# solid grotto

Okay now it's happening before scoring happens like midas mask 😅
I added local scored_card = context.other_card right above "scored_card:set_edition('e_negative', nil, true)

#

Is that the wrong spot am I being dumb

hidden sable
#

full context

red flower
#

oh if you want it before you might need context.before

drowsy heath
#

that worked but the 1x on the card descrption should update right ?

solid grotto
#

I want it to happen on scoring

#

It's happening before and I don't want that

hidden sable
red flower
#

did everything else work?

solid grotto
drowsy heath
#

yeah

wintry solar
#

at the end

red flower
hidden sable
solid grotto
hidden sable
#

egg took me this long to realize the egg has a drawn on joker face

red flower
#

set_edition has an argument to delay the application

hidden sable
#

i always thought the egg was just evil and fucked up

drowsy heath
#

how do i count the jokers and make it show as a mult in the discription

solid grotto
#

Take a look at abstract joker

red flower
#

im making so many typos today

#

maybe because it's cold

wintry solar
river apex
#

How to make a new counter like the extension of cryptid ?
I would like to interact with it and some joker to be modified depending on the value
I guess I could start in "config" but other than that I have no idea

drowsy heath
drowsy heath
#

yeah thats what i put in and it showed red

red flower
#

may i see

solid grotto
drowsy heath
#

this is str8 after i put it in no changes

solid grotto
#

It happens the instant the card is scored, before the chips even come up

frigid cargo
#
for i = 1, #G.jokers.cards do
        if G.jokers.cards[i].config.center.pools and G.jokers.cards[i].config.center.pools.Shape then
            shapecount = shapecount + 1
        end
    end

Im tryna do this piece of code but i dont want the joker itself to be counted even though its part of the pool
what would the code be?

red flower
hard mica
#

how can i check if im hovering over a specific joker and that im clicking a key

midnight coyote
#

how can i manually remove a joker from the pool as if you had it

drowsy heath
midnight coyote
#

i need it to still be findable using showman

#

but not otherwise

frigid cargo
daring fern
red flower
red flower
red flower
#

because i know how to check in the other order

drowsy heath
#

the context comes up as an undefined global

#

or did i not need that bit

hard mica
red flower
drowsy heath
#

no yellow or red lets see what the game says

red flower
drowsy heath
#

change it to what

red flower
#

return { vars = { 1 + coffee } }

drowsy heath
#

why is lua so confusing

#

i found my funny card

river apex
red flower
#

there isn't

#

i would recommend just copying that code

river apex
#

The repo is not availiable until the 1.0 of the mod

red flower
#

oh is that polterworx

river apex
#

yes

red flower
#

uhhh

#

well i think other mods edit that part

drowsy heath
#

so N' the counter either says 2 and only counts the coffee itself + its flat mult or it says 5 and counts itself +fkatmult +latte

red flower
#

like paya's terrible additions iirc

drowsy heath
#

i cant get it to only see the latte

#

well not see itself basically

red flower
#

instead of 1

drowsy heath
#

i tried that and it said 2x

red flower
#

can i see

river apex
drowsy heath
red flower
#

i mean local coffee = 0

drowsy heath
#

oh

#

mb

solid grotto
#

If I want to remove the edition of a card do I just use "scored_card:set_edition(nil, nil, true, true)"

#

Or is there a variable for not having an edition

river apex
#

Ho by the way
Is there a place where all the attributes of context and G are explained ?
In the SMODS wiki there is only like 2 or 3 examples but for example not many things about context.full_hand etc...

drowsy heath
#

now we are at 4x but its still counting itself i only have 3 lattes in hand

#

what if instead of 0 and overcomlicating things i just do -1

red flower
umbral zodiac
#

is there a way to change the weights of rarities mid-run (specifically ones that are usually not obtainable in the shop)

unkempt thicket
#

How can i give a card a badge based on if it has a certain ability, I'm doing this and it gives one with the proper info quene but not badge name or color.

hidden sable
#

how can i turn a config value into a string

red flower
hidden sable
#

tostring()

#

is that a thing here?

red flower
#

yeah either that or to_string

#

one of the two

drowsy heath
#

okay problem solved it still counts itself but the base mult starts at -1

#

gud enough for me

red flower
solid grotto
#

Doesn't do anything

#

Scratching chin

red flower
#

not 'm_wild' is not correct

solid grotto
#

What should I use for that

normal crest
#

you want not SMODS.has_enhancement(context.other_card, 'm_wild')

drowsy heath
#

lua makes me feel things i dont like

solid grotto
#

Oh lol

hidden sable
red flower
solid grotto
#

Working with lua is frying my brain and I'm forgetting how to do basic coding

hybrid shadow
#

how would i make a conditional description for a joker in a localization file (or is it only possible in loc_txt)

drowsy heath
red flower
hidden sable
#

how can i check if the player owns a certain joker

red flower
drowsy heath
#

yeah but idk them ik lua so i will hate while i can

red flower
hybrid shadow
red flower
#

you can change descriptions dynamically by returning a key in loc_vars

solid grotto
#

Removing the edition happens before scoring? Even though I copied the code from the part that creates the edition and it worked on scoring?

#

Full context

#

Applying the edition happens on scoring, removing the edition happens before scoring like midas mask

normal crest
#

return a localization key thru loc_vars and it'll use that instead

red flower
red flower
torpid glade
#

Question: How come it says Nil, something up with my code?

solid grotto
#

Because it works

red flower
solid grotto
#

It's just the timing that's off tbf

#

Once I add all the jokers I want and get them working at their bare minimum I'll neaten them up

torpid glade
solid grotto
#

Bugs can be tolerated

umbral zodiac
#

is there any difference between a default_weight of 0 and not having it at all in a rarity definition

drowsy heath
#

trying to sort out some art for my cards a couple of them were finishes

umbral zodiac
#

cool

red flower
#

the syntax is at least, idk if the profiles thing is correct

hybrid shadow
red flower
#

yes

hybrid shadow
#

k

#

would wrapping the condition and the alt key in parenthesis do anything

red flower
#

i don't think so but it also doesn't hurt

wintry solar
plush jewel
#

Where Cryptid mod has joker code?

wintry solar
#

Or changing an edition actually

plush jewel
#

Im so fucking done trying to make joker register when itself gets sold/destroyed

sonic cedar
#

how can i make it so this patch only applies to a specific joker?
i tried card.config.center.key, but that caused it to not trigger at all..

#

pardon my manners, good evening all

hidden sable
#

so wouldnt a for loopbe better

#

sorry i forgot to mention that

red flower
#

#SMODS.find_card("...")

hidden sable
#

oh that works?

red flower
#

yes

hidden sable
#

can i also get a reference to those jokers from that

red flower
#

yes it's an array

normal crest
drowsy heath
#

N' coffee beans is playing up again even tho nothing has changed

drowsy heath
#

crashes saying line 9 jokers have been given a nil value

normal crest
#

fine I'll check

sonic cedar
#

alternatively, can someone tell me why the quip would show up blank for some people? is that an issue with their games, or an issue with my code?

hidden sable
hybrid shadow
#

apparently G.PROFILES[G.SETTINGS.profile] is nil anyway?

hidden sable
#

so if i want to do stuff to the jokers id put it through a for loop?

red flower
normal crest
drowsy heath
#

for i, v in ipairs(G.jokers.cards) do

red flower
#

oh yeah makes sense

#

this is in the collection right

drowsy heath
#

in the coffee beans joker code

normal crest
red flower
drowsy heath
#

yeah

#

it worked fine b4 why did it decide not to now

normal crest
#

check that it's not nil

red flower
drowsy heath
#

adding an if makes it glow red

floral spindle
#
            if SMODS.has_enhancement(context.other_card, "m_lucky") then -- if card is lucky then
                if pseudorandom('Bord') < G.GAME.probabilities.normal / card.ability.extra.odds then --if odds succeeds then
                    if SMODS.Edition:get_edition_cards(G.jokers, true) then
                        editionless_jokers = SMODS.Edition:get_edition_cards(G.jokers, true)
                        eligible_card = pseudorandom_element(editionless_jokers, pseudoseed('bord')) -- this whole thing just finds jokers without an edition
                        return {                        
                            message = "Negative!", -- makes a funny message to signify that a card is negative
                            
                            func = function()
                            G.E_MANAGER:add_event(Event({
                                func = function()
                                eligible_card:set_edition('e_negative', true)

                                    return true
                                end

                            }))
                        end
                        }
                    end
                end
            end
        end``` This code crashes my game when It attempts to apply negative when all jokers are negative
hybrid shadow
normal crest
drowsy heath
#

thats what happens

red flower
drowsy heath
#

oh okok

#

i took it too litteral

hybrid shadow
#

how do i check if a joker is in G.PROFILES[G.SETTINGS.profile].joker_usage

normal crest
#
local usage = G.PROFILES[G.SETTINGS.profile].joker_usage.[your joker key]
if usage and next(usage.wins) then
    -- stuff
end
drowsy heath
#

in collection its fine for it to say xnil as in game it will work yeah ?

red flower
#

yes but also you can fix that by returning { vars = { 1 } } or something

drowsy heath
#

nah its fine my mod has tons of quirks its just like that

#

right now i have 2 arts sorted

#

the rest have their atlases removed since i was sick of the white box

#

and everything is working

#

im feeling great now

#

ig i can just make more coffee cards and then do a full playtest of the mod

hybrid shadow
drowsy heath
#

i plan on adding alot more but i havnt like rlly used them in a practical setting

gaunt thistle
hybrid shadow
gaunt thistle
#

When you don't have distinguishing features at a position you want to patch then you'll either needs to get smart about the times patch field or you'll need regex.

normal crest
#

well that doesn't belong there

#

the code i sent recently is all you need

hybrid shadow
sonic cedar
normal crest
#

and it's never nil

gaunt thistle
hybrid shadow
hidden sable
gaunt thistle
#

There's an example of a regex patch on the lovely repo. Regex by itself is challenging so also heavily consider if you can solve this problem in other ways.

#

Eg. can you inject this at runtime?

normal crest
sonic cedar
drowsy heath
normal crest
#

wins is only populated once you win, so when you never won it's an empty table

hidden sable
#

holy grammer

#

OMFG

red flower
drowsy heath
gaunt thistle
#

Ah yeah that's also true haha

drowsy heath
#

wont ***

sonic cedar
#

but then that brings my original question 😭

gaunt thistle
#

I didn't look at the actual code so

red flower
hidden sable
drowsy heath
#

ratmilk what is your favourite type of coffee

sonic cedar
hidden sable
drowsy heath
#

oh rlly

hidden sable
#

my code will work with any joker that has coffee in its config

#

therefore you can do stuff like...

drowsy heath
#

oh so it will work with my stuff then

red flower
hidden sable
drowsy heath
#

im a big fan of dalgona coffee

#

its niche

#

but tasty

drowsy heath
#

worth trying and you can make it decaf

#

the decaf coffee in my mod is called ratmilks decaf, YOU WILL TAKE THE CREDIT WHEN IT IS DUE

#

denied me last time but now its too late i already have everything done

hybrid shadow
#

now this doesnt work

red flower
normal crest
#

the code i sent wasn't decoration D:

hybrid shadow
normal crest
#

if usage and next(usage.wins) then

#

just like it was in the code i sent

#

idk why you removed it

hybrid shadow
drowsy heath
#

here he is all juiced up was +200 and loss of 10 played 2 hands