#💻・modding-dev

1 messages · Page 522 of 1

cursive gazelle
#

your atlas is wrong

agile path
#

oh, what should it be?

cursive gazelle
#
    key = "trans_joker",
    path = "placeholder.png",
    px = 0,
    py = 0,
})

SMODS.Joker({
    key = "trans_joker1",
    atlas = 'Trans_joker',
    pos = { x = 0, y = 0 },
    rarity = 1,
    discovered = true,
    blueprint_compat = false,
    eternal_compat = true,
    cost = 4,
})

here

agile path
#

what did the change do?

#

i see the one, but why

cursive gazelle
#

the atlas=""

#

should have your atlas key

agile path
#

under SMODS.Joker?

cursive gazelle
#

yes

#

keys should preferbly be unique , you can use them but you might

#

keyword might

#

get some bugs

agile path
#

i thought they had to match

#

i see

cursive gazelle
#

the joker key should be unique

#

but the atlas field should be the same as your atlas

agile path
#

do i need to make any file for said atlas?

cursive gazelle
#

you can also add your modprefix before it , if somehow someone has the same key as your atlas ,(very rare)

cursive gazelle
agile path
#

there's something that's been bugging me

cursive gazelle
#

and it is

agile path
#

does it just access the assets folder on it's own? i thought you had to specify it

cursive gazelle
#

its in the atlas

#

you just give it the image name

agile path
#

in smods.atlas, yes?

cursive gazelle
#

yes

fossil nebula
#

can I make a consumable that isn't in any of base game sets?

cursive gazelle
#

yes

#

i think smods.consumabletype

#

or something

agile path
#

can i show you the crash cscreen?

crystal spade
#

sorry its me again, I had it working but I don't know what changed lol

I updated my steammodded version to the latest release from gh and modified my code

SMODS.Jokers.j_lada.calculate = function(self, card, context)
        if context.joker_main then
            local left_effect, right_effect = nil, nil
            for i = 1, #G.jokers.cards do
                if G.jokers.cards[i] == card then
                    print('a')
                    local left_joker = G.jokers.cards[i - 1]
                    local right_joker = G.jokers.cards[i + 1]

                    if left_joker and left_joker ~= card and left_joker.config.center.blueprint_compat then
                        left_effect = SMODS.blueprint_effect(card, left_joker, context)
                    end

                    if right_joker and right_joker ~= card and right_joker.config.center.blueprint_compat then
                        right_effect = SMODS.blueprint_effect(card, right_joker, context)
                    end
                    break
                end
            end

            if left_effect or right_effect then
                local merged_effect = SMODS.merge_effects(
                    { message = "Divine touch!", card = card},
                    { left_effect or {} },
                    { right_effect or {} }
                )

                return merged_effect
            else
                return nil
            end
        end
    end```
this crashes and tells me that context is nil
vocal rampart
#

'-'

cursive gazelle
cursive gazelle
agile path
agile path
#

adding this back crashed, so it must be this no?
assert(SMODS.load_file("trans_joker.lua"))

cursive gazelle
agile path
cursive gazelle
agile path
cursive gazelle
crystal spade
cursive gazelle
crystal spade
#

i'm porting from an old steammodded version so there's probably api tweaks i don't know about

cursive gazelle
agile path
cursive gazelle
crystal spade
#

yeah

cursive gazelle
fossil nebula
#

what does it mean

crystal spade
crystal spade
#

lets see ur function

fossil nebula
#

i... don't have anything on line 820

frosty rampart
#

that crash is taking place in one of the vanilla functions

crystal spade
#

oh sorry you're right

#

post your stacktrace?

fossil nebula
red flower
#

it's the code i shared

crystal spade
#

oh big syntax overhaul

agile path
#

see? i'm telling you man, it's that file

crystal spade
#

do you have permission to open it?

rocky plaza
cursive gazelle
crystal spade
#

chmod 777 and try again?

agile path
#

ofc

fossil nebula
#

it might be because of the new consumable type being there

SMODS.ConsumableType({
    key="Special",
    primary_colour = G.C.BLUE,
    secondary_colour = G.C.BLUE,
    name = 'Special',
    loc_txt =      {
        name = 'Special',
        collection = 'Special', -- label for the button to access the collection
        undiscovered = { -- description for undiscovered cards in the collection
        name = 'Unknown',
        text = { 'Special!' },
        },
    },
    collection_rows = { 6, 6 }
})

agile path
fossil nebula
#

Is it becuse i was loading save file and didin't start a new run?

agile path
cursive gazelle
crystal spade
high sinew
#

Trying to readjust The Ride the bus ability to subtract 3 mult instead of reset it seems having a table for extra is making sum wonky not sure why. Not sure either if anyone will know since it deals withtaking ownership for joker

cursive gazelle
agile path
cursive gazelle
#

SMODS.Atlas({
key = "trans_joker",
path = "placeholder.png",
px = 0,
py = 0,
})

SMODS.Joker({
key = "trans_joker1",
atlas = 'trans_joker',
pos = { x = 0, y = 0 },
rarity = 1,
discovered = true,
blueprint_compat = false,
eternal_compat = true,
cost = 4,
})

#

replace this with your current code

rocky plaza
agile path
#

Oh, i'm struggling a bit with whole atlas part, thank you all for the patience ;-;

cursive gazelle
rocky plaza
stiff locust
rocky plaza
#

i am going crazy trying to implement a bajillion if statements to invert every vanilla boss blind lol

agile path
#

still crashing, damn

high sinew
cursive gazelle
#

also thunderEdge you should text me , i need some devs to plan a mod if you're intrested

stiff locust
#

just don't have the table be extra

rocky plaza
high sinew
#

ah ok didnt know that would work ill try tho

agile path
rocky plaza
agile path
#

yes ofc

stiff locust
#

config = {multloss = { mult = 3}, extra = 2} will work

red flower
stiff locust
#

that makes the table card.ability.multloss without changing card.ability.extra

agile path
high sinew
#

im trying to just use integer as name for param and see if this fixes it

stiff locust
#

the issue is that ride the bus is trying to add card.ability.extra to its mult

#

if extra is a table that's not good and it'll fuck up

high sinew
#

seeing if better approach imma try urs tho

red flower
high sinew
#

looking at it in game.lua gave me this

red flower
agile path
#

both 1x and 2x have the upscaled artworks

stiff locust
#

very confused

agile path
#

should i take it out of the jokers folder?

stiff locust
#

can you screenshot this line

#

at the top of your file explorer

agile path
#

ofc

#

any specific folder?

stiff locust
#

it shows the file path to the folder you're in

red flower
stiff locust
#

assets/1x should be in your mod's root folder

#

you define an atlas by giving it a key and a file name, the file name points to the file in assets/1x and the key is used in jokers to tell them which file to look at

cursive gazelle
#

i literally said you should add any subfolder to the joker path if you have one lmao

proven belfry
#

how can I make a joker that upgrades through triggered editions/enhancements

high sinew
#

like to cause effect outta curiosity

proven belfry
high sinew
#

Wdym?

#

your trying to create a joker that upgrades editions/enhancements right?

stiff locust
cursive gazelle
#

gains 0.1 xmult whenever an edition/enhancement triggers

high sinew
proven belfry
stiff locust
#

well that's how you check for enhancements/editions

#

that's half of it

proven belfry
high sinew
stiff locust
high sinew
#

Create a pool to reference

stiff locust
#

then it'd be likeee

frosty rampart
#

for any edition you could just check for if card.edition, because card.edition is nil if it's not editioned

proven belfry
high sinew
#

Make a global table for mod like Stickmin = {} and use it to build pools

stiff locust
#
if context.individual and context.cardarea == G.play then
if card.edition then
---do stuff if it's editioned
end
if card.config.center ~= G.P_centers.c_base then
---do stuff if it's enhanced
end
end
#

this

#

i think

high sinew
#

that works too

old epoch
#

How would i make a joker detect if a certain seal is played? I have if card.seal == 's_btct_SealCrimson' but i don't think it's working.

stiff locust
#

it might beG.P_centers.m_base instead

high sinew
#

oh ur prob right

stiff locust
#

but it's probably c_base

high sinew
#

i think vanilla uses c_base whoopsies

stiff locust
#

it is c_base I just checked

#

my code was right

frosty rampart
high sinew
proven belfry
frosty rampart
#

don't forget quotes around the e_negative but yes

stiff locust
high sinew
#

i always build pools as a manual workaround 😂

agile path
#

sooooo...

old epoch
stiff locust
#

you were close

proven belfry
stiff locust
old epoch
#

alright

agile path
#

good news: no crash

high sinew
#

@stiff locust Not sure if its even possible to do what u suggested since its same error i orignally faced thank you for help tho

red flower
agile path
#

cause moving it to the mod root folder didn't crash

red flower
#

yeah you were missing the folder in the load_file

frosty rampart
#

that's why smods recommends making a table out of extra

agile path
#

do i just add jokers/ before the name of the .lua then?

high sinew
stiff locust
high sinew
#

like i dont think you can use config this way sadly

#

but idk tbh

stiff locust
#

i used to do them all in card.ability.extra but i've been making a bunch of other jokers that just use the base tables

#

and they all work fine

frosty rampart
#

send code pls

high sinew
#

i did

frosty rampart
#

directed at marie

red flower
#

the base table should work fine afaik, extra is recommended to not have clashes with preexisting keys

stiff locust
#

let me find an example that I can share without spoiling anything i haven't shown yet

red flower
#

but idk how it works with take_ownership

stiff locust
#

tsunami uses card.ability.extra because I haven't made content for it in ages

high sinew
agile path
#

yes, thank you! it didn't crash

frosty rampart
stiff locust
#

most of* (i just checked) the jokers in splatro's current public release don't use an extra table and they work i think that's my only public example

red flower
high sinew
lament agate
#

what do i do to make jokers that specifically appear with certain mod installed

stiff locust
#

some mods will have a table you can check for to check if they're loaded

#

like if you're checking fo overflow you can do if Overflow then

#

but otherwise there's a way to check if a mod is loaded that is more convoluted

fossil nebula
#

How do i make a tooltip for a consumable?

crystal spade
#

if ur asking about debugging them

lament agate
#

nah

lament agate
#

like

#

code wise

lament agate
crystal spade
#

oh like make a joker spawn another joker?

lament agate
#

cross mod shit

fossil nebula
#

i want to have a similar effect to the fool, when i hover on my joker i see the consumable it will give me

crystal spade
#

shouldn't matter

agile path
#

I know this isn't much but please chat...
i did it ;u;

(loads of help involved, thank you all <3)

lament agate
red flower
stiff locust
lament agate
red flower
#

you can add dependencies to your objects

red flower
#

but you can just have it in the joker

agile path
# red flower great work

Thank you!

I will start working on the localization
That's how the text appears (such as jokers' names, description and etc, yeah?)

#

I'll try that on my own, if i have any doubts, I'll annoy you guys again lol

rocky plaza
#

basically a reference for the available colors and how to add your own colors

agile path
#

Ah, like how the word "mult" is in red for example?

rocky plaza
#

yeah

#

it has the colors for everything in the base game

#

so like the blue for chips, green for chance-based effects, etc.

crystal spade
#

i'm getting errors related to the atlas, i'm assuming that's another difference between the version i was developing on and this one
does the atlas replace this
SMODS.Sprite:new('j_fish', birthday_mod.path, 'Jokers.png', 71, 95, 'asset_atli'):register()
or is it in addition to?

neat leaf
#

In my mod's json file, what's the conflicts syntax for disallowing any version of a specific mod? My mod reimplements BetterTags and is therefore incompatible with BetterTags. I have ```
"conflicts": ["BetterTags"]

but that doesn't seem to work right (as in, I don't get an error if both mods are already enabled).
rocky plaza
crystal spade
#

yes i was on a very old version loll

#

i had initially forked another mod to learn

rapid stag
#

is context.initial_scoring_step called with the G.hand cardarea?

crystal spade
#

where do you specify the dimensions of the sprite?

rocky plaza
crystal spade
#

thanks

neat leaf
#

...that'd be the reason. Thank you.

agile path
#

What would g.c.gold be used for, for example? Indicate card ranks?

red flower
#

i think gold is barely used

rocky plaza
#

yeah, for money use {C:money}

red flower
#

ranks use attention (G.C.FILTER)

faint yacht
distant junco
#

trying to destroy first card in hand and its doing a big nothing (this tends to happen a lot with me i swear)

if card.ability.extra.man == 'Hamster' then
            if context.destroy_card and context.cardarea == G.play and context.other_card == context.scoring_hand[1] and not context.blueprint then
                return {
                    remove = true
                }
            end
        end
``` something wrong with my syntax?? id be suprised because if have code that looks just like this amd it works great
red flower
#

there's no other_card in context.destroy_card

#

it's also destroy_card

distant junco
#

how would i do it properly then

red flower
distant junco
#

context.destroy_card == context.scoring_hand[1]

#

?

red flower
#

yes

distant junco
#

that makes sense

whole jungle
#

I modded an existing image in a mod and got this error: Could not decode PNG image (invalid CRC encountered (checking CRC can be disabled))

How do I disable CRC or potentially fix the check?

vernal path
#

Looks like the CRC check is embedded in the LÖVE C++ code. CRC is basically a checksum to make sure the png isnt corrupt. How are you replacing the png?

distant junco
# red flower yes

if context.cardarea == G.play and context.destroy_card == context.scoring_hand[1] guhh?

maiden phoenix
#

Scoring_hand might not exists during that context check, add and context.scoring_hand before the destroy_card check

#

Sorry Thermo lol

faint yacht
whole jungle
red flower
#

instead of context.scoring_hand

#

it's a proper check

distant junco
#

if context.destroy_card and context.scoring_hand and context.cardarea == G.play and context.destroy_card == context.scoring_hand[1] like this?

faint yacht
#

context.scoring_hand doesn't appear to be ever defined for that call?

agile path
#

working on the localization file

old epoch
#

How would i detect player money and maximum interest?

red flower
#

scoring i mean

maiden phoenix
old epoch
#

alright, thank you!

agile path
#

i based it off of the text file i edited in my pack, but i'm assuming it's not the same lol

distant junco
agile path
#
    descriptions{
        Joker={
            j_jgbt_trans_joker={
                name="Trans Joker",
                text="test",
            }
        }
    }
}

this is what i have

frosty rampart
#

it should be descriptions = {

agile path
#

yes
i did get a new crash tho oops

chrome widget
#

Hmmm having trouble setting up this dependency. It says Arrow loaded correctly but both of my mods seem to lack the dependency? And I'm not sure what defines something as a lovely mod vs a steamodded mod

agile path
#

hi winter :3

chrome widget
#

Hello!!!!

agile path
#

what table?

frosty rampart
#

oh the text probably also has to be a table, even if it's only one line
(so i.e. text = { "test" },)

agile path
#

ah, so these fuckers {}

distant junco
#

yuh

agile path
#

i thought it could just be a string

frosty rampart
#

most descriptions end up being at least two lines anyway, so there's not much of a reason to account for it lol

agile path
#

good news: no crash

#

bad news: joker still has no text D:

red flower
distant junco
#

alright

agile path
chrome widget
#

hmmm okay. I tried to use "ArrowAPI" but I also got a different lack of dependency before

red flower
frosty rampart
# agile path

yaaaay
i was about to ask if it was a key mismatch issue, i assume that was the case?

distant junco
#
if card.ability.extra.man == 'Hamster' then
            if context.destroy_card and context.scoring_hand and context.cardarea == G.play and context.destroy_card == context.scoring_hand[1] or context.destroy_card == context.scoring_hand[2] and not context.blueprint then
                return {
                    remove = true
                }
            end
        end
agile path
#

wait,
1 is common
2 is uncommon
3 is rare
4 legendary?
for rarities

frosty rampart
# agile path yes it was lol

anyway now that you have a bunch of the framework stuff out of the way, future additions should hopefully be much less problematic

red flower
distant junco
#

is that everything?

red flower
#

idk test it

agile path
distant junco
cursive gazelle
#

wait i just lagged lol

agile path
#

all good :3

frosty rampart
chrome widget
#

Also does higher priority order mean loads after or before?

agile path
#

wait, we have N and s
crash bandicoot reference

cursive gazelle
#

good luck modding

cursive gazelle
#

/j

agile path
#

depends /j

cursive gazelle
#

smods has 0

#

and all mods use smods framework

distant junco
frosty rampart
# cursive gazelle after logically

it's not super intuitive
you can have negative priority (in lovely patches at least, don't remember if mods themselves can off the top of my head but it's probably not great to do if smods is 0), and "bigger number = higher priority = load first" doesn't sound wrong either

red flower
#

smods is not 0

#

it doesn't have one

cursive gazelle
#

can you even go lower than 0

red flower
#

yes

cursive gazelle
#

lol

red flower
#

0 is the default

cursive gazelle
#

so before even the game loads

chrome widget
#

Its seeming to me that higher priority loads first

red flower
cursive gazelle
red flower
#

lower number loads first but everything after the game loads

cursive gazelle
frigid cargo
#
if G.GAME.dollars >= G.GAME.interest_cap * 5 then

Is interest_cap a table or smth like what?

red flower
#

jokerdisplay has like -100000 for example

#

because it's an API mod

frigid cargo
#

ah

red flower
#

with talisman

frigid cargo
#

what do i use to get the current money of player then?

red flower
#

that

frigid cargo
#

oh G.GAME.current_money?

red flower
distant junco
#

TIL you can put -card.ability.extra.whatever to make it a negative number because of course you can

red flower
frigid cargo
#

oh

#

ok

whole jungle
#

Is there a way to setup rainbow text? Like, each text character gradients?

chrome widget
#

hm. For whatever reason it's saying one part of the ArrowAPI table isnt defined by the time one of my dependant mods loads

#

Puzzling

rocky plaza
#

does SMODS have any plan of implementing animated sprites for other cards (not just blinds)?
I am thinking about creating a public github repo to help others with implementing animated jokers, consumables, etc.

rocky plaza
#

okok good to know

red flower
#

there's a PR about it in the smods repo

fossil nebula
#

is there a context for when a joker is sold?

daring fern
fossil nebula
#

but like

#

this specific joker

frosty rampart
#

wdym

daring fern
frigid cargo
agile path
#

Chat, imma take a break for today

#

I need to fix some of the text too

#

I hate
That
It
Looks
Like this yknow

frigid cargo
frigid cargo
# red flower may i see the code
calculate = function(self, card, context)
        if context.cardarea == G.play then
            if context.other_card:get_id() == 14 or
                context.other_card:get_id() == 9 or
                context.other_card:get_id() == 7 then
                    if to_big(G.GAME.dollars) >= G.GAME.interest_cap * 5 then
                    return {
                        xmult = card.ability.extra.Xmultcap
                    }
                else
                    return {
                        xmult = card.ability.extra.Xmultbase
                    }
                end
            end
        end
    end
frosty rampart
# agile path I need to fix some of the text too

i assume you're starting a new set of quotes for each color, you don't need to do that. the color tags can appear in the middle of a string, and you can turn it off (back to default black) with an empty set of {} in the string

red flower
agile path
fossil nebula
#
config={extra={stonecards=2}},
    rarity = 2,
    atlas = 'gfy',
    pos = { x = 7, y = 0 },
    cost = 8,
    pools = { ["gfy"] = true },

    calculate = function(self, card, context, hand, planet, consumeable)
        if context.selling_self then
            G.E_MANAGER:add_event(Event({
    func = function()
    for i = 1, card.ability.extra.stonecards do
        SMODS.add_card({ enchantment = "m_stone" })
    end
        return true
    end
}))
            return{}

        end
    if context.end_of_round and context.main_eval and context.game_over == false then
            card.ability.extra.stonecards = card.ability.extra.stonecards + 1    
            return
            {
            message = "+stone",
            play_sound('gfy_sandvichmake',1.3,0.8),

            }
        end
    end

}
#

can someone help

rocky plaza
chrome widget
#

Another issue I'm trying to fix is that for whatever reason, the atlas here isn't loading correctly? At the top of the file I load the stand_stickers atlas so I assume I'm missing something really simple

#

prefix config isn't set to off, seemingly

fossil nebula
agile path
frosty rampart
sturdy compass
chrome widget
#

I'd remove the word "both" for conciseness too

red flower
frigid cargo
red flower
#

you need a more strict context check

#

read the calculation docs and use one that would be appropriate from there

frigid cargo
#

ok thanks

agile path
#

"Both Kings and Queens are treated as each other"

#

With "kings" and "queens" being orange

red flower
#

btw, that's a really really hard effect to do lol

sturdy compass
#

Can confirm

agile path
#

We'll get there lmfao

agile path
#

Can confirm transitioning is very hard to do too

red flower
#

as in, I wouldn't recommend anyone do it even if they were good at modding

frosty rampart
#

it's a "wait until SMODS gets quantum ranks done on their end" type of thing

agile path
#

Fuck

sturdy compass
#

I've tried and somewhat succeeded but it's so jank and relies on patching so heavily that I also would not recommend it

frosty rampart
agile path
#

I was thinking it could be done the same way smeared joker was done, no?

frosty rampart
#

unfortunately ranks and suits do not behave the same

rocky plaza
#

unfortunately no

agile path
#

Ah, damn it :(

sturdy compass
#

Suits are a lot easier to do that with than ranks

wooden nexus
#

Let's see if i implemented +Score without Talisman properly

frosty rampart
#

there's a has_suit() function in vanilla, which has smeared joker built into it essentially, but all of vanilla's rank checks are hardcoded instead of being a similar has_rank() check

you also need to handle straight calculation for quantum rank stuff, which is very complicated

wooden nexus
lament agate
#

@maiden phoenix technically speaking, how would i use other sprites in the same atlas for the description's sprite?

wooden nexus
unborn bay
#

i love 10

maiden phoenix
rocky plaza
# agile path Ah, damn it :(

hmm maybe you could have a toggleable joker where if it is in one mode, turns all kings into queens and in another mode, turns all queens into kings

wooden nexus
#

It's not supposed to be 10

#

supposed to be 1010

lament agate
#

i got this working

rotund sable
agile path
lament agate
#

it just crashes your game btw

#

by talisman

rocky plaza
wooden nexus
#

lemme try again, maybe it's case sensitive

maiden phoenix
#

modify the G.ASSET_ATLAS, and the center.pos

wooden nexus
rocky plaza
# agile path How would that be done?

i know others in here have added buttons to jokers that do things
its pretty advanced but not "kings and queens are treated as each other" kind of advanced

lament agate
wooden nexus
agile path
#

So, anything that has to do with suit and suit changing is... Really hard

rocky plaza
frosty rampart
#

*rank, and specifically making one card count as multiple ranks
an even simpler option would be to just transform all kings into queens, and vice versa, when played and scored

agile path
#

NOT SUIT, RANK AAAAA

fossil nebula
agile path
rocky plaza
frosty rampart
#

yea

agile path
#

Originally, i was going with that lol
But i decided to try and be more egregious lol

rocky plaza
#

ofc when quantum ranks gets added to SMODS doing the whole kings and queens are treated as each other will be a lot easier

wooden nexus
#

I realized the error of my code, I didn't even port the actual addScore part

frosty rampart
#

oh how i long for quantum ranks
(i will immediately be adding a "stone cards count as all ranks" joker to my stone mod)

rocky plaza
agile path
#

Stone mod?

...are there any weed related jokers

frosty rampart
#

(sigh) yes /lh

agile path
#

Stoned joker...?

#

Beautiful

#

Bro's too far gone

rocky plaza
#

ah yes 420 joker

whole jungle
#

Anyone know how to do gradient colors for text or backgrounds?

frosty rampart
rocky plaza
#

i dont remember off the top of my head

agile path
#

I got a mod that added planet cards level up hands individually
Like, either mult or chips
Is that hard to do?

lament agate
rocky plaza
#

i do know mods that modify the +mult of a hand individually tho

agile path
frosty rampart
#

yea
looking at the code, it just sort of copies the vanilla level up hand function into two different functions. one levels up chips for a given hand only, the other does only mult. then the planet cards call one of those custom functions upon use

neat leaf
#

Is it possible to determine the final width of a UIBox?

median veldt
#

i have NO idea how to make poker hands, is it possible to check for specific suits

oblique lotus
#

Does anyone know how to disable the sound of an edition when it is applied to a card?

willow scroll
#
calculate = function(self, card, context)
        if context.individual and context.cardarea == G.play then
            if SMODS.get_enhancements(context.other_card)["m_mult"] == true then
                context.other_card.ability.mult = card.ability.extra.mult
                return
            end
        end
    end,

im sleeping on the job how can i make this effect apply to the card before it scores?

median veldt
median veldt
#

from parts or hand

#

-# id assume hand but yk

#

and also what property like
something like for card in hand or something?

red flower
#

for _, card in ipairs(hand) do

#

yes

cursive gazelle
#

Isn’t it G.hand

red flower
#

this is for a poker hand

cursive gazelle
#

Oh i see

median veldt
#

although i wanna check if the hand contains 1 of each of the specified suits

willow scroll
wooden nexus
#

So I realized the +Score from Astronomica is actually a talisman version of the original card_eval_status_text in the base game, so I decide to use that instead

willow scroll
#

oh wait i have to cycle through the hand dont i

rocky plaza
median veldt
#

wait also that return isn't right either ignore that

#

i forgot it has to return the scored cards

#

wait i might have an idea

wooden nexus
#

Huh...

#

Is it bad my thought went to lucky charms

#

Hearts stars and horseshoes, clovers and balloons

median veldt
#

lmfao

maiden phoenix
willow scroll
wooden nexus
#

Is that not what it is?

rocky plaza
#

that loop u gave should work

median veldt
#

did u even read my message 😭

rocky plaza
#

ehh but if u need exactly one of each then id suggest using a table that maps suits to occurences

willow scroll
chrome widget
median veldt
willow scroll
#

currently doing it by applying it before the hand scores and removing it after because i have no idea how to properly do it (or attempting to)

median veldt
#

and honestly

#

if it works it works and someone else can improve it

rocky plaza
willow scroll
maiden phoenix
agile path
median veldt
#

i meant that i knew multiple returns dont work

rocky plaza
frosty rampart
#

it also doesn't apply to straight calculations and is really gross in implementation

lament agate
#

@maiden phoenix doesnt work

maiden phoenix
#

Why did you redo the same lovely patch 😭

median veldt
#

theyre mutiplying

willow scroll
agile path
#

Imma stick with the conversion

maiden phoenix
lament agate
median veldt
#

should I have an else condition that just like returns {} or something`

maiden phoenix
#

(eom is an util func for my loc)

lament agate
#

ah

maiden phoenix
#

But yea you can put whatever key inside

wooden nexus
maiden phoenix
#

Tho it only works on sprite from center objects

lament agate
#

i uses the same atlas as yours

median veldt
wooden nexus
#

.

median veldt
#

mb

maiden phoenix
#

Can you show me your consumable's localization?

wooden nexus
#

Trying to figure out a way to add score to card_eval_status_text

lament agate
maiden phoenix
#

yes for the susie idea

lament agate
maiden phoenix
#

Whatever just show me the desc

median veldt
#

i can't believe my stupid fucking code worked

lament agate
wooden nexus
#

Harmony

#

Yeah... i don't get it

median veldt
#

-# it's my little pony

#

-# lmao

maiden phoenix
lament agate
#

WHAT WHY

wooden nexus
#

-# oh fml

maiden phoenix
#

Wtf is tngt_I and why do you use j_joker as a key

median veldt
#

-# dw its meant to be subtle

maiden phoenix
#

I feel like you completly misunderstood what my lovely patch does

lament agate
#

-# IM NEW

median veldt
lament agate
#

-# IM NEW ;<;

median veldt
#

its ok 🙏

maiden phoenix
#

Sorry Nxkoo it's 2am for me rn I don't wanna go over a long tutorial for this 😅

gaunt phoenix
#

Does anyone knows what context check I could use to make a consumable unable to be "buy & used" in the shop ?

frosty rampart
lament agate
wooden nexus
#

I can't seem to figure out the stupid eval text thing

frosty rampart
#

any time

lament agate
#

gotta wait for tomorrow

#

to fix this

gaunt phoenix
lament agate
#

i was following his tutorial

normal crest
#

A function, which is probably

#

G.FUNCS.can_use, but i don't remember

willow scroll
# rocky plaza that loop u gave should work
calculate = function(self, card, context)
        if context.before and context.cardarea == G.play then
            for _, check_card in ipairs(context.scoring_hand) do
                if SMODS.get_enhancements(check_card)["m_mult"] == true then
                    check_card.ability.mult = card.ability.extra.mult
                end
            end
        end
    end,

but it doesnt want to? idk does this look wrong?

maiden phoenix
normal crest
maiden phoenix
#

so like if you had [yourmodprefix_S:j_jolly} it would show Jolly Joker instead

willow scroll
lament agate
willow scroll
#

weird the context in the documentation said to have that aswell

#

maybe i didnt get it what it said

maiden phoenix
lament agate
#

ohhhhhhh

#

okay i see

#

so i dont need the joker key?

maiden phoenix
#

I mean you need the key of whatever center sprite you want to show

#

But again if you want it to work on any sprite from any atlas you need to modify the lovely patch

#

Making center objects just to show their sprite in desc doesn't seem reasonable

lament agate
maiden phoenix
#

Since you use the key to get the object from G.P_CENTERS, I just fetch the pos from said center too 🤷

unborn bay
#

what even is nxkoo doing anymore bruh

maiden phoenix
#

So I don't have to look up the sprite in my atlas and manual hardcode it

#

He's trying to understand my lovely patch that adds sprites in description boxes

lament agate
#

trying to add the second one

maiden phoenix
#

Nxkoo worst case scenario, just update your atlas with Susie in it and I'll pr you a better version of the lovely patch

#

tomorrow tho

lament agate
#

you're so kind for my demented brain

lament agate
ivory widget
#

How would i retrigger only the last Gold card several times?

daring fern
# ivory widget How would i retrigger only the *last* Gold card several times?
if context.repetition and context.cardarea == G.hand and context.end_of_round then
    local other_card
    for i=#G.hand.cards, 1, -1 do
        if SMODS.has_enhancement(G.hand.cards[i], 'm_gold') then
            other_card = G.hand.cards[i]
            break
        end
    end
    if other_card and context.other_card == other_card then
        return {repetitions = number}
    end
end
vernal path
#

sorry for reply umbral, lol

normal crest
#

Damn

drifting lava
#

Guys, I've been wondering about something and pins suggested I ask here.

I'm pretty annoyed stumped playing on the black deck, and would like to get the fluff out of the way. I believe I saw a mod in Balatro University channel where Dr Spectre placed some parameters and the game rerolled until it found a seed where the parameters happened (Like starting with a mega arcana pack with legendary stone)

Could you let me know which mod that is and if so, am I able to use it without disabling achievements? I want these black deck wins to count for C+ so I can get the black deck out of the way. I'm already restarting a bunch until I get a good start so just want to save time and am already on the last 2 stakes

normal crest
#

That's the Brainstorm mod iirc

#

Tho there's a new version of it

#

With a different name

frosty rampart
#

for the other part: steamodded disables achievements by default but you should be able to re-enable them in the config tab of the Mods menu

ivory widget
normal crest
#

that change wasn't enough for the original code

#

But it looks fine now

versed swan
#

How do you change the weight of booster packs?

#

*after initialization

daring fern
azure laurel
#

hey, how i make to destroy a selected joker?

frigid cargo
#

how can i make a randomizer for sounds?

versed swan
daring fern
frigid cargo
chrome widget
#

I'm super confused

versed swan
rocky plaza
#

does balatro happen to have a list of all the keys of the boss blinds? I need to know if a boss blind is not vanilla so i can handle it with a default inversion

#

or do i have to make my own list of keys of vanilla boss blinds? 😭

red flower
#

search for P_BLINDS

#

or you can do eval for key, _ in pairs(G.P_BLINDS) do print(key) end in the debugplus console and copy it from the lovely console

daring fern
whole jungle
#

Anyone have any clue why my 2x asset would get CRC failure from an existing mod (but my 1x asset doesn't?)

#

How can I disable CRC checking?

frigid cargo
#

Cause i kinda just hard coded it and its kinda big lmao

whole jungle
#

Is it random from a list of sounds?

normal crest
#
local sound = pseudorandom_element(list_of_sounds, 'seed')
play_sound(sound)
frigid cargo
violet oasis
#

I'm trying to set up a config setting that changes the pitch of a particular song. I got it working so it switches between a slow and fast versions of the song, but everytime I switch inbetween them, it doesn't start the song form the beginning, it's like if both versions are playing at the same time, but I can only hear one at a time. This is what I have right now. Is there any way to fix this?

    vol = 0.6,
    pitch = 0.8,
    key = "music_middle_normal",
    path = "middleNormal.ogg",
    select_music_track = function()
        return (G.GAME.selected_back.name == 'The Middle Deck' and G.GAME.blind and not G.GAME.blind.boss and not G.shop) and 0 or false
    end,
})

SMODS.Sound({
    vol = 0.6,
    pitch = 1.0,
    key = "music_middle_normal_f",
    path = "middleNormal.ogg",
    select_music_track = function()
        return (G.GAME.selected_back.name == 'The Middle Deck' and G.GAME.blind and not G.GAME.blind.boss and not G.shop and ProjectMoonMusic.config.enable_fast_music) and 1 or false
    end,
})```
#

I tried messing around with the priorities and adding a "and not" with the config to the slower version, but the result is the same

normal crest
#

I think that is exactly what's happening, both play at the same time and you can only hear one

#

I dunno if there's a way to stop that, but maybe try messing with sync?

violet oasis
#

Hm, that's a bummer. I can't really sync the tracks, as they have different lengths and I still want them to loop perfectly. The odd thing is that I also have a version of the track that plays during boss blinds, and when it switches between them it resets the track without issue. I dunno why specifically the config setting doesn't cause the same behaviour in this case

azure laurel
#

hey im having trouble with a consumable
the game let me use it although im not selecting any jokers, how can i make the game dont let me use it when any joker is selected?

frosty rampart
#

you'll want your can_use function to only return true if G.jokers and #G.jokers.highlighted <= card.config.max_highlighted and #G.jokers.highlighted > 0 i think

azure laurel
frosty rampart
#

assuming you want it to only work with a single joker selected (if you want more jokers to work, still do that but also increase the max_highlighted variable in its config)

manic rune
#

what do i change in SMODS.localize_box to reduce the height of text boxes

#

i tried adding minh = 0, reducing padding to 0, none worked

azure laurel
frosty rampart
#

what's the crash

manic rune
#

i wonder if its related to this

azure laurel
# frosty rampart what's the crash

it say that it was trying to compare a non-existing number, cuz the code had "card.config.max_highlighted" instead of "card.ability.max_highlighted"

frosty rampart
#

oh my bad lol
so it sounds like you fixed it

azure laurel
#

yep, thats would be doing if now happen this >: (

#

never mind, i fixed again

#

thx for the help anyway meta

mighty kiln
#

why does every resource include everything except decks

#

do you see something missing here?

daring fern
mighty kiln
#

does it include deck functions or just the way to make them look different

daring fern
mighty kiln
#

ok

#

well im stupid

warm dragon
#

In a mod challenge can I change the base chips and mult for each hand type?

normal crest
#

Is checking if card.playing_card then sufficient to tell if a card is a playing card

#

Or is there a scenario in which a non playing card might have that

neat leaf
#

How do I make something happen when a user interacts with my create_toggle{} config item? I have opt_callback = "kcr_config_updated" with G.FUNCS.kcr_config_updated defined, but it doesn't appear that function is being called.

normal crest
#

instead of opt_callback

neat leaf
#

callback = G.FUNCS.kcr_config_updated 🙂

#

That worked

normal crest
#

I guess it's just meant to be a function, not a string

#

Weird

warm dragon
#

The hook I tried to write for the second challenge in this file is wrong I think I want to set the base mult and chips for all hands to zero

#

I'm not sure if I am approaching this correctly

gilded blaze
#

there's already a syntax error in the file

mighty kiln
#

my mod dosent appear in the list of active mods in the menu

warm dragon
mighty kiln
frosty rampart
# warm dragon Where?

you missed a closing quote on the line restricting judgment in the spongebob-hard challenge

manic rune
mighty kiln
gilded blaze
# warm dragon Where?

I do not recommend asking for syntax errors since you'll have to do that every time you have one
instead, use Visual Studio Code and download Lua Language server extension

warm dragon
manic rune
#

wuh

rapid stag
#

how do i check if the played hand had an unscored card? i know i can just do cardarea == 'unscored' but i'm not sure about the exact implementation of my idea

frosty rampart
mighty kiln
manic rune
#

you dont need it if you have a .json file in your mod folder

frosty rampart
manic rune
warm dragon
brave blade
#

Is there a context for when any type of card is destroyed? (Joker, playing card, consumable, etc.)

frosty rampart
daring fern
brave blade
#

Does that include consumables? (I know consumables can't be destroyed in vanilla, I just want to make it mod-friendly)

warm dragon
mighty kiln
#

WHAT IS A HEADER

warm dragon
#

oh, I changed the wrong file

manic rune
warm dragon
#

Yeah the hook isn't working

manic rune
#

compare G.play.cards with context.scoring_hand, probably?

pastel kernel
#

What’s the context for if the played hand is the first played hand

daring fern
rapid stag
#

that makes sense, yeah

daring fern
unkempt thicket
#

Where does the hand text update when selecting a hand?

frigid cargo
#

how can i put multiple sounds into a list?

SMODS.Sound({key = "Spam1", path = "Spam1.ogg",})
SMODS.Sound({key = "Spam2", path = "Spam2.ogg",})
SMODS.Sound({key = "Spam3", path = "Spam3.ogg",})
SMODS.Sound({key = "Fingers", path = "Fingers(1st).ogg",})
SMODS.Sound({key = "Explain", path = "Explain(2nd).ogg",})
SMODS.Sound({key = "Strings", path = "Strings(3rd).ogg",})
SMODS.Sound({key = "Heart", path = "Heart(4th).ogg",})
pastel kernel
#

If I wanted to make the context “For every single unscoring card in played hand…” what would I write?

rapid stag
#

you would have to iterate through context.full_hand and check that the card is not in context.scoring_hand

#

and then apply your effect accordingly

manic rune
#

i wonder if im the only one who uses G.play.cards instead of context.full_hand

#

3:

pastel kernel
#

context.individual

#

Can I use this context?

rapid stag
#

oh, if you're going through context.individual, you can just check if context.other_card isn't in context.scoring_hand

manic rune
#

in that case you want to use context.cardarea == "unscored"

rapid stag
#

yes!

warm dragon
#

Why isn't the hook I wrote at the bottom of this file not correctly changing the base mult and base chips for the hands in my challenge?

pastel kernel
#

if context.individual and context.cardarea == “unscored” then
(Code for spawning a random negative consumable, I forgor)

#

It’s for Maxwell Scribblenauts

pastel kernel
#

Is it random or random seeded?

#

What’s the difference

warm dragon
median veldt
gilded blaze
#

because Game.init_game_object is only called at game launch and exiting to menu

median veldt
#

and thus it does not work at all

median veldt
daring fern
pastel kernel
#

I will at some point create a poker hand called “3 musketeers” which is just 3 aces, which gives 50 chips and 10 Mult, level up gives only half its base.

warm dragon
#

Thanks @gilded blaze

median veldt
subtle merlin
#

can cards get editions by applying them the same way you would a joker?

subtle merlin
#

yay! ty

median veldt
median veldt
#

in its current state, it scores the first occurrence of each of the suit

#

i want it to score the highest, no matter what the actual order of the hand is

unkempt thicket
#

Where does the hand text update when selecting a hand?

pastel kernel
#

The main purpose of Maxwell is to spawn define

#

How do I make a joker spawn a random rare negative consumable too?

faint yacht
pastel kernel
#

Ali

#

Do you know the code to spawn “any” negative consumable?

#

Even the rare ones

#

It’s for a joker

modern kindle
faint yacht
daring fern
modern kindle
#

oic

#

that could be itneresting

#

soon i wanna start messing with audio stuff on the user next

pastel kernel
#

Key is maxwell_notebook

#

So

modern kindle
#

also hi smt

faint yacht
pastel kernel
pastel kernel
#

So it’s untouched.

daring fern
faint yacht
#

...I should update the create_card contents of my Booster Packs from this...

return create_card("Consumeables", G.pack_cards, nil, nil, true, true, leg and 'c_soul' or togabalatro.getrandcons('rar'), 'toga')
pastel kernel
daring fern
pastel kernel
#

pseudoseed(‘maxwell’) does that work?

daring fern
pastel kernel
#

do I remove context.joker_main

frigid cargo
#
if to_big(G.GAME.dollars) >= to_big(G.GAME.interest_cap) then
                    if pseudorandom('Spamton') < G.GAME.probabilities.normal / card.ability.extra.Voiceodds then
                        local sound = pseudorandom_element("Fingers", "Explain", "Strings", "Heart", 'Spamton')
                        return {
                            play_sound(sound),
                            xmult = card.ability.extra.Xmultcap
                        }
                    else
                        local sound = pseudorandom_element("Spam1", "Spam2", "Spam3", 'Spamton')
                        return {
                            play_sound(sound),
                            xmult = card.ability.extra.Xmultcap
                        }
                    end
                else
                    if pseudorandom('Spamton') < G.GAME.probabilities.normal / card.ability.extra.Voiceodds then
                        local sound = pseudorandom_element("Fingers", "Explain", "Strings", "Heart", 'Spamton')
                        return {
                            play_sound(sound),
                            xmult = card.ability.extra.Xmultbase
                        }
                    else
                        local sound = pseudorandom_element("Spam1", "Spam2", "Spam3", 'Spamton')
                        return {
                            play_sound(sound),
                            xmult = card.ability.extra.Xmultbase
                        }
                    end
                end

uhhhh idk what i did wrong

daring fern
frigid cargo
#

How do i make table with sounds?
-# sorry ive never done it before

daring fern
frigid cargo
#

Oh ok thats

#

why does this happen if i have 3 of the same joker?

manic rune
frigid cargo
#

if pseudorandom('Spamton') < G.GAME.probabilities.normal / card.ability.extra.Voiceodds then

manic rune
#

seems like your card.ability.extra.Voiceodds is nil

#

make a new run and try again

#

🤔

pastel kernel
daring fern
pastel kernel
#

Maxwell

faint yacht
pastel kernel
#

i removed context.joker_main lua calculate = function(self, card, context) if context.individual and context.cardarea == "unscored" then local maxwell_notebook = pseudorandom_element(G.P_CENTER_POOLS.Consumables, pseudoseed('maxwell')).key SMODS.add_card ({key = maxwell_notebook, area = G.consumeables, edition = 'e_negative', key_append = "maxwell"}) end -- sell this joker to create a negative dream card. if context.selling_self then SMODS.add_card{ key = 'c_busterb_dream', area = G.consumeables, edition = 'e_negative' } end end

#

Dogshit code?

#

muh ```lua
-- Maxwell

SMODS.Joker {
key = "maxwell",
atlas = "placeholder",
pos = { x = 0, y = 0 },
soul_pos = { x = 0, y = 0 },
pools = { ["Fantastic"] = true },
rarity = "busterb_Fantastic",
cost = 100,
blueprint_compat = true,
eternal_compat = true,
unlocked = true,
discovered = true,
loc_txt = {
name = "{C:blue,E:1,s:2}MAXWELL{}",
text = {
"For {C:attention}every unscored card{}, create a {C:attention}random{} {C:dark_edition}negative{} {C:attention}consumable{}.",
"Sell this joker to spawn a {C:dark_edition}negative{} {V:1,E:1,s:1.5}Dream{} {C:attention}card{}."
}
},
loc_vars = function(self, info_queue, card)
return { vars = { colours = {HEX('b00b69')} } }
end,
calculate = function(self, card, context)
-- For every unscored card, create a random negative consumable
if context.individual and context.cardarea == "unscored" then
local maxwell_notebook = pseudorandom_element(G.P_CENTER_POOLS.Consumables, pseudoseed('maxwell')).key
SMODS.add_card ({key = maxwell_notebook, edition = 'e_negative'})
end
-- sell this joker to create a negative dream card.
if context.selling_self then
SMODS.add_card{ key = "c_busterb_dream", edition = 'e_negative' }
end
end
}```

#

GRR

#

THIS SHIT IS FUCKIING ME OVER

#

can anybody help me?

#

i

#

i am going nowhere

frigid cargo
pastel kernel
#

i can't do this anymore.

#

nobody here can help me.

#

i'll just sit in this chair and wait for an answer

#

see if somebody here can tell me what's wrong with my code

daring fern
pastel kernel
#

It works.

chrome widget
manic rune
#

ooh very nice

pastel kernel
#

I should learn how to make a deck

#

And a deck sprite

#

And then moving on to sleeves

chrome widget
#

Oh yeah I gotta make sleeve versions of all my art

#

As a whole my API adds support for easy crediting so you can do a little less than copy paste in loc vars

ripe jacinth
#

does anyone offer one-on-one tutoring

#

for making balatro mods

sturdy compass
old epoch
#

I'm trying to make text with a custom color, but it keeps crashing saying:

Oops! The game crashed:
functions/misc_functions.lua:2025: attempt to index field 'colours' (a nil value)

Additional Context:
Balatro Version: 1.0.1o-FULL
Modded Version: 1.0.0~BETA-0615a-STEAMODDED

Here's my code:

loc_txt = {
        vars = {
         colours = { HEX('161616'), HEX('bdbdbd') },
        },
        name = "Duality",
        text={
        'Add a {V:1}White{} or {V:2}Black{}', 
        'seal to {C:attention}1{} selected',
        'card in your hand'
        },
    },

Could anyone help?

old epoch
#

oh, okay. thank you!

pastel kernel
#

Ok so it’s so stupidly unbusted, I’ll change the context from “unscoring card” to “held in hand”

manic rune
#

i mean what did u expect lmao

#

u can just play a high card hand with 4 unscored cards

pastel kernel
#

That’s all I want

#

I may not be guaranteed a soul, but the chances of getting it should be unrealistically high.

old epoch
# daring fern `colours` go in `loc_vars`

I did that, but its still giving the same crash. Here's my updated code:

loc_txt = {
        name = "Duality",
        text={
        'Add a {V:1}White{} or {V:2}Black{}', 
        'seal to {C:attention}1{} selected',
        'card in your hand'
        },
    },
    loc_vars = function(self, info_queue, card)
         colours = { HEX('161616'), HEX('bdbdbd') }
    end
}
pastel kernel
#

I believe individual works with cardarea == G.hand?

daring fern
old epoch
#

oh im dumb

daring fern
#

Also you need to return it.

old epoch
#

thanks

stiff quiver
#

how can i manually set a cards stickes like eternal or rental?

daring fern
stiff quiver
#

thanks!

#

and how do i check what stickers a joker has?

old epoch
#

Im trying to make a consumeable that gives either one seal or another, but every time i use it I get the crash:

Oops! The game crashed:
[SMODS Batrocities "items/consumables.lua"]:184: attempt to call upvalue 'seal' (a number value)

Additional Context:
Balatro Version: 1.0.1o-FULL
Modded Version: 1.0.0~BETA-0615a-STEAMODDED

Here's my code:

local seal = (pseudorandom("atlas_btct_consumeables_Duality",1, 2))
        G.E_MANAGER:add_event(Event({
            trigger = 'after',
            delay = 0.1,
            func = function()
                if seal('atlas_btct_consumeables_Duality') == 1 then -- this is line 184
                    conv_card:set_seal(card.ability.extra.whiteSeal, nil, true)
                else
                    conv_card:set_seal(card.ability.extra.blackSeal, nil, true)
                end    
                return true
            end
        }))

Could anyone help?

stiff quiver
#

just use if seal == 1 instead of if seal('atlas_btct_consumeables_Duality') == 1 im pretty sure

old epoch
#

oh, let me try that then

#

with that it now says it is attempting to index a nil value

stiff quiver
#

change the function for this and remove the local seal = ... at the start ```lua
func = function()
if pseudorandom("atlas_btct_consumeables_Duality",1, 2) == 1 then
conv_card:set_seal(card.ability.extra.whiteSeal, nil, true)
else
conv_card:set_seal(card.ability.extra.blackSeal, nil, true)
end
return true
end

#

that should work

#

oh, wait, in what line is saying the nil value

stiff quiver
old epoch
#

in card.lua:569

stiff quiver
#

then i think its that card.ability.extra.whiteSeal doesnt exist

#

and same with blackSeal

old epoch
#

ah

stiff quiver
#

you are supposed to put the key of the seal

old epoch
#

i have the key in the config

#

im going to try replacing the card.ability with the seal key

stiff quiver
#

<@&1133519078540185692>

#

thanks mods

old epoch
stiff quiver
#

did you ever set which card conv_card is?

old epoch
#

would local conv_card = G.hand.highlighted[1] count?

stiff quiver
#

yeah im pretty sure it would

#

I havent made many consumables though

old epoch
#

me neither, im mainly just the spriter for my mod

vast night
#

Hi everyone. I am creating a joker that copies the LAST card in the hand when the blind is beaten with 2x score. I have one problem, which is that apparently context.full_hand is not available in context.end_of_round and context.after is somehow broken, triggering before scoring even. Does someone know a fix for that?

old epoch
stiff quiver
#

np

stiff quiver
vast night
#

ty

stiff quiver
#

np

daring fern
stiff quiver
#

no?

daring fern
stiff quiver
#

i meant in card.ability.extra.something

vast night
daring fern
vast night
stiff quiver
#

im confused, cause i made a joker that creates the last two destroyed cards when hand is played and i just stored the cards in card.ability.extra

daring fern
vast night
daring fern
vast night
stiff quiver
#

oh yeah, i never tested reloading the game apparently

vast night
#

so slightly confused on why th it says G.play but in the context it says G.jokersfor context.cardarea

stiff quiver
daring fern
stiff quiver
#

oh, well thats a fix i can do, thanks for helping fixing something i didnt know was wrong lol

wintry solar
stiff quiver
#

btw, how can I check which stickers a card has?

vast night
stiff quiver
#

that didnt work no

vast night
#

so i have this

        if context.after
            and to_number(G.GAME.chips) >= to_number(G.GAME.blind.chips) * 2 then
            print('Yippe')

but i get this
-# sorry for the lag im currently on my laptop and not my pc

daring fern
vast night
daring fern
daring fern
vast night
vast night
vast night
#

ty

lament agate
#

@maiden phoenix im sorry for the folder naming 😭

maiden phoenix
#

I tried my hardest to ignore it

gilded blaze
#

context.after is in fact called immediately
if you really want to check for something after the evaluation, put the check inside an event

agile path
#

good morning chat

#

i tried my beloved with some editions, she looks fab as fuck

plain gazelle
#

what function do I need to hook to do something when money is added to player's money?

hushed field
#

ease_dollars

plain gazelle
#

thanks

ebon shell
#

is there a way to check if a card has a seal same way SMODS.has_enhancement() checks for enhancements?

ebon shell
agile path
#

Does the coding for my joker to activate its ability also go on the same file as the atlas and such?

ebon shell
agile path
#

Got it

spice wadi
agile path
#

this is what i have, all works well

pastel kernel
#

“Creates a red seal steel polychrome ace”

how do I make this brah

red flower
#

SMODS.add_card{ set = "Base", rank = "A", enhancement = "m_steel", edition = "e_polychrome", seal = "Red" }

agile path
#
    -- calculation code goes in here
end,

do i need SMODS.calculate?
also, is this a good start

red flower
cursive gazelle
#

not really some joker's effect triggers with add_to_deck

#

is this a good start ?

agile path
#

if context.cardarea == G.play and context.main_scoring is this the one to convert cards?

cursive gazelle
#

yes

wintry solar
#

it depends, but likely no

red flower
agile path
#

ah, thought if was, oops

red flower
#

for jokers it's joker_main

cursive gazelle
#

what you're gonna do inside the if statement will happen when all specified contexts are met

#

context.before as an example happens before scoring

agile path
#

one for kings and the other for queens?

cursive gazelle
#

what do you want to de exactly

wintry solar
#

when during the scoring do you want it to happen

agile path
#

if it's prior, doesn't it go into a loop?

cursive gazelle
#

no

#

you can de before or after scoring , i suppose before would be better

#

since you can add a flip and make it look slightly better

agile path
#

yes
i was thinking about vampire for example, it triggers before any scoring

wintry solar
#

before is more complicated if you want them to score as the other rank

#

I don't remember if SMODS.change_base has delay support yet or not

cursive gazelle
#

it didn't last time i checked

agile path
#

for now, i want something simple so i can practice. what do you recommend me?

cursive gazelle
#

also i believe it keeps the old chip value

wintry solar
#

use after then

proven belfry
#

how do I make the player immediately lose? making an active landmine joker that gives ^1.1 mult but if you play X rank you die

agile path
#

after it is

cursive gazelle
#

you can check code in vanilla remade

#

and reference it

agile path
#

i will do that, yes

cursive gazelle
#

also utils tab and calculate has a lot of useful contexts

red flower
cursive gazelle
#

and stuff that helps

red flower
proven belfry
red flower
#

yes, just mult

#

or install talisman and return emult

azure laurel
#

hey, how can i make a planet card of the most played hand with SMODS.create_card?

agile path
#

what is loc_vars?

cursive gazelle
#

your variables stored in the joker

agile path
#

i'm looking at the vanilla remade

#

ah, okay

azure laurel
red flower
agile path
#

is that how for example, you make scalling jokers?

cursive gazelle
#

yes

#

any jokers actually

#

loc_vars return the variables to be displayed in the desc

azure laurel
pastel kernel
#

i'm gonna add the susie laugh

red flower
agile path
agile path
#

thought so

red flower
#

you need to add explicit compatibility

azure laurel
red flower
#

you need to do a loop through all the planets and check which one it is

azure laurel
cursive gazelle
#

if you're having a hard time understanding code sw i'll be making a tutorial soon

red flower
azure laurel
red flower
#

oh if its a consumable then it should be in use

#

(but yes you can, not relevant to this tho)

pure verge
#

i need help fixing this code

cursive gazelle
#

what's the problem with the code ?

#

you're missing an atlas and a loc_txt

pure verge
#

balatro is crashing and it says that the atlas code has to end at path

cursive gazelle
#

it seems like the png couldn't be located

#

it should be under /yourmod/assets/1x