#💻・modding-dev

1 messages · Page 557 of 1

rocky plaza
#

yeah u'd call ease_ante(-G.GAME.round_resets.ante + 1)

#

to set ante to 1

hollow horizon
#

Awesome

#

Thx

jolly pivot
#

how do people upscale it to have it not do that

#

people are mentioning aseprite causes that but im not using aseprite im using krita

red flower
#

ive never had problems with aseprite doing that anyway

frosty rampart
#

when you upscale it, make sure the interpolation method is set to none
i dunno if that's even an option in krita, but i use gimp and the upscale always looks perfectly fine

feral tree
#

Is it possible to have a blind detect when a joker is triggered?

jolly pivot
#

i thiiink i fixed it?

#

messed around with some export settings

frosty rampart
#

yea because it's pixel art, you don't want any interpolation at all

jolly pivot
#

theres no option for "none"

#

but shouldnt nearest neighbor effectively do nothing if the new resolution is a multiple of the previous one?

willow scroll
#

hooray

red flower
#

now check if it works with cardsleeves

willow scroll
rocky plaza
#

hey
is it possible to call a function when a certain card is clicked on? if so how would one do so

willow scroll
#

time to go back to the drawing board anyway because i wanted to make it a pseudosticker so that i could have info queue when hovered

#

but thats not how info queue works :clueless:

#

how does one info queue outside of loc_vars

red flower
#

i think you need to patch the generate ui function

#

i dont think it's called on facedown cards tho

willow scroll
red flower
#

i dont remember how i did it in my mod

willow scroll
#

i was going to nuke this anyway because this is slop

red flower
#

but it has descriptions on facedowns

willow scroll
#

(i assume?)

red flower
#

yeah

#

probably a card:highlight hook

rotund sable
willow scroll
#

i ❤️ using drawstep for the wrong purposes

frigid cargo
#

im tryna make a config ui, where would i write the code?

willow scroll
#

ill keep looking but damn am i a slow reader

red flower
#

i finished my lunch break so let me see if i can find it

#

it's card:hover sorry

#

in card_ui.lua

willow scroll
#

yeah just found it lmao

frigid cargo
#

hi N

red flower
#

hi

frigid cargo
#

did you have a good lunch?

red flower
#

it was ok, i always bring the same thing to work

modern kindle
#

he didnt give me any

frigid cargo
#

hi dilly

modern kindle
#

hello

#

ive been in the mines creating silly fun things

#

and then losing to my own creation

frigid cargo
#

im tryna figure out how to do config for my mod

#

idek where to put it

red flower
#

wdym where

frigid cargo
#

the code

red flower
frigid cargo
#

ah i am blind

#

thanks N

willow scroll
#

tbf i only want this one how would i hide the main thing

#

hm

red flower
willow scroll
#

currently looking into patching the mainbox out

hollow horizon
#

Hey, could somebody tell me what's wrong with my code? It changes the game speed to nil in settings and changes nothing in-game:

    key = 'madeinheaven',
  atlas = 'madeinheaven',
    loc_txt = {
        name = 'Made in Heaven',
        text = {
            "Adds {C:attention}X1.2{} to game speed,",
            "for every played hand",
 "{C:inactive}(Currently {C:attention}X#1#{})"
        },
    },
 config = { extra = { currentspeed = G.SETTINGS.GAMESPEED } },
loc_vars = function(self, info_queue, center)
        return { vars = { center.ability.extra.currentspeed}  }
    end,

    rarity = 2,
    cost = 3,
    unlocked = true,
    discovered = true,
    blueprint_compat = false,
    eternal_compat = false,
    perishable_compat = false,
    pos = {x = 0, y = 0},
add_to_deck = function(self, card, from_debuff)
    card._normalspeed = G.SETTINGS.GAMESPEED
end,
calculate = function(self, card, context)
        if context.joker_main then
currentspeed = G.SETTINGS.GAMESPEED
 G.SETTINGS.GAMESPEED =  G.SETTINGS.GAMESPEED + 0.2
        if G.SETTINGS.GAMESPEED > 17 then
ease_ante(-G.GAME.round_resets.ante + 1)
 card:start_dissolve({G.C.RED})
        card = nil
end
return {}
        end
    end,
remove_from_deck = function(self, card, from_debuff)
 G.SETTINGS.GAMESPEED = card._normalspeed
end
}
slim ferry
#

its because if the game speed is something that isnt an option for the setting it displays as nil in settings

#

as for it not doing anything i have no idea

candid prism
#

my shit crashed

rotund sable
#

I believe you have to use an animation atlas for the blinds

candid prism
#

oh

#

where the hell do i make that

red flower
candid prism
#

i hover over the blind and

red flower
#

maybe you need boss_colour

candid prism
willow scroll
#

now to refine this

#

yeah baby thats what im talking about

slim ferry
#

holy shit its deck stickers

willow scroll
#

its only minor amounts of jank

red flower
#

aside from the sticker it would actually be nice to be able to hover a deck to see the effect

#

specially for modded

frosty rampart
#

to be fair it does show the effect when you click the deck
but yea an info_queue for it would be nice too

red flower
#

it should be there at all times in a small window

#

call it DeckDisplay

modern kindle
#

next mod for N to make

rotund sable
#

can't wait for the RngDisplay mod

willow scroll
rotund sable
#

Have fun

frigid cargo
#
Batrocities = {config_file = {disable_tarotM = false, disable_planetM = false}}

SMODS.current_mod.config_tab = function()
    return {
        n = G.UIT.ROOT, 
        config = {
            align = "cm",
            minh = 6,
            minw = 10,
            padding = 0.2,
            r = 0.1,
            colour = G.C.BLACK
        },
        nodes = {
            {
                n = G.UIT.R,
                config = { align = "cm", },
                nodes = {
                    {
                        n=G.UIT.O, 
                        config={
                            object = DynaText({
                                string = localize("btct_string_A"), 
                                colours = {G.C.WHITE}, 
                                shadow = true, 
                                scale = 0.4
                            })
                        }
                    },
                }
            },
            create_toggle({
                label = localize("btct_string_B"), 
                ref_table = Batrocities.config_file, 
                ref_value = "disable_tarotM",
            }),
            create_toggle({
                label = localize("btct_string_C"), 
                ref_table = Batrocities.config_file, 
                ref_value = "disable_planetM",
            })
        }
    }
end

i know i have to add a way to access loc files, idk how to do that tho... what would i put to access en-us?

red flower
#

localize does that

#

you just need to put the keys in the loc file

#

like misc.dictionary.btct_string_C

frigid cargo
#

i have this, is this right?

red flower
#

no they have to be in misc dictionary

red cradle
#

why this return 0?

frigid cargo
#

ah

red flower
#

there's also joker:is_rarity(4) now

frigid cargo
red cradle
red flower
#

well i havent updated that :p

red flower
#

thats wrong then lol

red cradle
#

im just want to count leg jokers you have

distant junco
#

yo! how can i make a tarot thats like judgement but just for the jokers in my mod specifically?

red flower
slim ferry
distant junco
#

okie dokie

slim ferry
#

and then use that as the set in SMODS.add_card or whatever you use i think

distant junco
#

okay i gotcha

hollow horizon
#

Will if G.jokers and G.jokers.card.ability.name == 'j_prefix_key' then work? Is that even valid way of checking it or do I use some different properties?

distant junco
#

what are you trying to do?

slim ferry
slim ferry
#

also that

hollow horizon
distant junco
#

you can use SMODS.find_card('j_joker_key')

hollow horizon
#

Cause I'd want to do something like

    key = "key", 
    path = "music.ogg",
    pitch = 1,
    volume = 0.6,
    select_music_track = function()
        if HAS THIS SPECIFIC JOKER == 'j_prefix_key' then
            return true end
    end,
})
#

but I have no idea how to formulate this "if"

distant junco
#

yeah find_card would work there

hollow horizon
#

so how would I do that?

distant junco
#

if next(SMODS.find_card('j_joker_key')) then afaik

#

lmk if it doesnt work so i can punch myself as punishment

willow scroll
#

im stupid where in localisation are badges defined again

#

misc labels?

slim ferry
#

yeah

willow scroll
#

tnx

#

its still jank but its acceptable jank in my eyes now

willow scroll
frigid cargo
#

where can i find how to make config work? like what the configs are supposed to do cause i only have the ui and not what it does

frosty rampart
frigid cargo
red flower
#

you need to use ref_table and ref_value to point to the config

frigid cargo
#

Batrocities = {config_file = {disable_tarotM = false, disable_planetM = false, disable_malfunctionFlash = false, nerfHim = false}}
i have this but like how do i connect this to what its supposed to do

red flower
frigid cargo
#

ill try reading the code and try to figure out how to disable the voucher

red flower
#

to disable it just put the config in in_pool

rotund sable
#

And then the old table put into config.lua in the root directory

frigid cargo
rotund sable
#

as

return {
    ...
}
red flower
#

return not Balatrocities.config.no_voucher something like that

frigid cargo
red flower
#

SMODS.current_mod.config is the config

#

your config file is the default

frigid cargo
red flower
#

smods saves the player's somewhere else

red flower
frigid cargo
red flower
#

anywhere you want that's not the config

frigid cargo
#

ok

frigid cargo
rotund sable
#

This should go into the config.lua

frigid cargo
#

oh ok

rotund sable
frigid cargo
#

oh

#

i have the entire code in config.lua

red flower
#

oh

rotund sable
#

oh

frigid cargo
#

oh

red flower
#

yeah just check how i do it in jokerdisplay it was made by eremel so it's good

frigid cargo
#

i missread the doc

#

the wiki i meant

willow scroll
rotund sable
#

i've never seen so messed up ui at once

hollow horizon
willow scroll
#

but i think i found the culprit line

candid prism
#

basically im making mr bones that goes down in odds over time

slim ferry
#

mr bones??

#

do you mean oops??

red flower
#

im guessing the effect is mr bones

red flower
willow scroll
candid prism
candid prism
sonic cedar
#

how would i have a calculate_effect target a card added with SMODS.add_card?

rotund sable
red flower
sonic cedar
red flower
#

so you add a card and you want that card to have a message?

sonic cedar
#

yes

willow scroll
red flower
# sonic cedar yes
local added = SMODS.add_card{...}
SMODS.calculate_effect({message = ""}, added)
red flower
sonic cedar
#

oh ok thanks

mental nacelle
obtuse silo
#

Is there any way on a "variety" booster pack to make it so that some cards can be used immediately
but some cards have to be pulled into your consumeable slots?

willow scroll
#

or well "booster pack" its not actually a booster pack

#

it pretends to be

candid prism
red flower
#

i think saving it to a variable is better

#

like G.GAME.modprefix_mrbones_oods

candid prism
#

heres what the current code looks like

red flower
#

use card.ability.extra.odds * (G.GAME.modprefix_times_used or 1)

and then before you return do G.GAME.modprefix_times_used = (G.GAME.modprefix_times_used or 1) + 1

red flower
#

no in calculate

candid prism
#

kk

red flower
#

in loc_vars put the first part for the odds to show correctly in the description

sonic cedar
candid prism
#

it crashed and i wondered where i fucked up
i forgot the fucking image atlas

modern kindle
winter flower
#

why does this play in the main menu
i only want it to play on specific blinds

#

and it overwrites every song too

red flower
#

your condition logic is wrong

#

a == 'string1' or 'string2' doesn't work in lua

#

(it returns true because the string is truthy)

sonic cedar
slim ferry
#

not currently

#

since wether cards can be pulled/used is tied to the pack currently

modern kindle
obtuse silo
#

okay

slim ferry
#

though i remember allowing the functionality to be added to cards being discussed at some point

obtuse silo
#

mmm sorta like how Cryptid does the code cards, maybe?

modern kindle
#

as an example i just added an extra button to a card that you cant use and instead needs to be put in the consumable area
so you could do something similar to that

#

for packs specifically

willow scroll
#

"i sure do wonder why my patch isnt working"
the devious and obscured spelling mistake in the path:

#

wow and now everything works :clueless:

#

almost*

rotund sable
willow scroll
#

hm this tweak did not improve things

obtuse silo
willow scroll
#

after skipping/selecting a joker

#

its empty

#

but its also there

urban wasp
#

i'm confused on why this doesn't work when there are loads of jokers with the bulgoe set

SMODS.Joker {
    key = "bulgoe_candy",
    name = "Bulgoe Candy",
    config = { extra = { jokers = 2, money = 7 } },
    rarity = "cry_candy",
    atlas = "crp_placeholder",
    pos = { x = 2, y = 1 },
    cost = 3,
    blueprint_compat = true,
    demicoloncompat = true,
    eternal_compat = false,
    pools = { Bulgoe = true, Food = true },
    loc_vars = function(self, info_queue, card)
        return { vars = { lenient_bignum(card.ability.extra.jokers), lenient_bignum(card.ability.extra.money) } }
    end,
    calculate = function(self, card, context)
        if (context.selling_self or context.forcetrigger) then
            for i = 1, lenient_bignum(card.ability.extra.jokers) do
                SMODS.add_card({ set = "Bulgoe" })
            end
            ease_dollars(lenient_bignum(card.ability.extra.money))
        end
    end,
    crp_credits =  {
        idea = { "wilfredlam0418" },
        code = { "wilfredlm0418" }
    }
}
#

like is this not a part of the bulgoe set

SMODS.Joker {
    key = "bulgoe", -- my sweet little pumpkin
    name = "Bulgoe",
    config = { extra = { chips = 2.7 } },
    rarity = 1,
    atlas =  "crp_joker",
    blueprint_compat = true,
    demicoloncompat = true,
    pos = { x = 0, y = 0 },
    cost = 1,
    pools = { Bulgoe = true },
    loc_vars = function(self, info_queue, card)
        return { vars = { lenient_bignum(card.ability.extra.chips) } }
    end,
    calculate = function(self, card, context)
        if (context.joker_main) or context.forcetrigger then
            return {
                chips = lenient_bignum(card.ability.extra.chips) -- most overpowered shit you've ever seen
            }
        end
    end,
    crp_credits = {
        idea = { "Poker The Poker" },
        art = { "Poker The Poker" },
        code = { "Glitchkat10" },
        custom = { key = "everything", text = "Bulgoe" } -- everything is bulgoe
    }
}
wild escarp
#

Are there variables somewhere for the current mult and chips of a poker hand?

faint yacht
#

hand_chips and mult globals.

urban wasp
# faint yacht `hand_chips` and `mult` globals.

example of such:

...
            local current_mult = lenient_bignum(mult)
            return {
                xmult = 0,
                extra = { -- altered to be kinda like chibidoki's return bc of some weird shit
                    mult= 2 ^ current_mult,
                    remove_default_message = true,
                    message = "=2^" .. current_mult .. " Mult",
                    colour = G.C.DARK_EDITION,
                    sound = "talisman_emult"
                }
            }
...
#

but erm yeah i don't like crashes guys

willow scroll
#

wait a second yes i can actually

#

add another janky hack on top of it mate but that works now

#

oh my god i focvused too hard on this dumb idiot that i forgot how to use consumables

#

"why is use greyed out?!" as i am trying to use the devil in the shop 💀

frigid cargo
#

Did i do this right? Also im confused on how to make the stuff activate. would i make a code in config_tab.lua?

red flower
#

no, remove the first line

#

and put this in another file Balatrocities = SMODS.current_mod

final jewel
#

How do I make a custom color for in the loc files I want to make a {C:Giga_Food} that has the color F7070BFF

red flower
urban wasp
wild escarp
#

How do I make this talisman compatible? Seems to be just the return that it doesn't like.

calculate = function(self, card, context)
    card.ability.extra.chips = G.GAME.hands["Straight"].chips
    card.ability.extra.mult = G.GAME.hands["Straight"].mult

    if context.individual and context.cardarea == G.play and context.other_card:get_id() == 14 then
        return {
            chips = card.ability.extra.chips,
            mult = card.ability.extra.mult
        }
    end
end
rotund sable
#

What's your talisman version

wild escarp
#

2.2.0b

faint yacht
#

Ouch.

#

-# Get 2.4.

rotund sable
#

Damn that's old

#

Please tell me you're on the newest steamodded release

frigid cargo
wild escarp
#

I'm on steamodded 0731a, probably need that updated as well.

urban wasp
#

just update everything 😭

rotund sable
#

That's not even a release 🥺

frosty dock
#

use dev versions at your own risk, but at least update them regularly lmao

urban wasp
#

imo pretty much always use dev versions

#

if you get a crash or bug with that version, update

#

if that doesn't work, get release

#

if it still doesn't work... uhhhh

rotund sable
#

If you get a crash or bug report it *

frosty dock
urban wasp
frosty dock
#

even then releases only make sense if they fit together and mods don't randomly depend on dev versions or not

urban wasp
#

it's kinda iffy

frosty dock
#

for players, the easiest option is to use releases

#

and that's what should always work

urban wasp
#

like take polterworx when it was still a thing it needed kinda specific mod versions and it was a bit hard to play with other more updated mods

frosty dock
#

breaking changes aren't that common, using a newer version is unlikely to cause you trouble for most mods

urban wasp
#

yea

frosty dock
#

it's just unfortunate when mods depend on dev versions

#

it makes players get the current dev version but then they'll forget about it

urban wasp
#

i think it makes sense if dev versions of mods require dev versions of other mods, but the release version should almost never

frigid cargo
#

how do i make these actually work?

frosty dock
#

of course

rotund sable
#

For this file at least

frigid cargo
#

ok

frigid cargo
rotund sable
#

You can

#

The rest is just organisation

frigid cargo
rotund sable
#

I stole borrowed code from N

frigid cargo
#

real

willow scroll
rotund sable
#

:clueless:

willow scroll
#

:clueless:

rotund sable
frigid cargo
red flower
wild escarp
#

How would I prevent a joker from being debuffed or flipped?

red flower
#

SMODS.debuff_card(card, "prevent_debuff", "source") for the first, hook Card:flip for the second

wispy falcon
#

Why is local idol_card = G.GAME.current_round.vremade_idol_card or { rank = 'Ace', suit = 'Spades' } in the loc_vars of the idol and what does it do?

red flower
#

if the first table is nil it defaults to the second table

wispy falcon
#

How would I choose a random card like it does? I don't really understand the code of it right now

cursive gazelle
#

Pick a card

#

You can do this without a for loop

red flower
wispy falcon
red flower
#

which part is the problem

wispy falcon
#

I don't know what G.GAME.round_resets.ante is/does. The same goes for

G.GAME.current_round.vremade_idol_card.suit = idol_card.base.suit
G.GAME.current_round.vremade_idol_card.id = idol_card.base.id```
red flower
#

the first where the current ante is stored

#

the other ones are just storing a global variable with the card's data

#

you can't store the card directly because balatro doesn't like saving objects

wispy falcon
#

Okay, idol changes every round, right? How would I make it every ante instead?

red flower
#

if you want the card to be shared between copies then you would need to use the global calculate probably. if you don't care about that you can just put the logic in your joker's calculate and use the new ante changed context

frigid cargo
#

How do i make a function for config to disable a specific voucher 😭 either im really stupid and im missing where im supposed to read or its just really wierd and needs elite knowledge to figure out
-# its prob the first one

red flower
#

Does the config menu work?

frigid cargo
#

It exists

robust falcon
#

I can't figure out how to properly add support to Joker Display for jokers with the new probability functions added to SMODS, anyone here done it before?

red flower
#

ah it was a jokerdisplay thing?

frigid cargo
wispy falcon
red flower
frigid cargo
red flower
# frigid cargo Yeah

can you eval Balatrocities.config in the console before and after selecting the option?

frigid cargo
#

Not sure

#

I can try… would i just print it or what?

red flower
#

that command prints it

#

just to make sure it's working

frigid cargo
#

Ok

#

where would i put that code?

red flower
#

in the debugplus console

#

press /

frigid cargo
#

ah ok

#

it doesnt

red flower
#

can i see the code for the UI

frigid cargo
#
--Config Tab
SMODS.current_mod.config_tab = function()
    return {
        n = G.UIT.ROOT, 
        config = {
            align = "cm",
            minh = 6,
            minw = 10,
            padding = 0.2,
            r = 0.1,
            colour = G.C.BLACK
        },
        nodes = {
            {
                n = G.UIT.R,
                config = { align = "cm", },
                nodes = {
                    {
                        n=G.UIT.O, 
                        config={
                            object = DynaText({
                                string = localize("btct_string_A"), 
                                colours = {G.C.WHITE}, 
                                shadow = true, 
                                scale = 0.4
                            })
                        }
                    },
                }
            },
            create_toggle({
                label = localize("btct_string_B"), 
                ref_table = Batrocities.config_file, 
                ref_value = "disable_tarotM",
            }),
            create_toggle({
                label = localize("btct_string_C"), 
                ref_table = Batrocities.config_file, 
                ref_value = "disable_planetM",
            }),
            create_toggle({
                label = localize("btct_string_D"), 
                ref_table = Batrocities.config_file, 
                ref_value = "disable_malfunctionFlash",
            })
        }
    }
end
#

or do you want the full thing?

red flower
#

can i see where you define Balatrocities.config_file

frigid cargo
#

or location?

red flower
#

well that's the problem

#

it should be config not config_file

frigid cargo
#

ahhhhh

#

it works now thanks

#

now the second part

#

which is how to code it

red flower
#

ok then add this to the voucher

in_pool = function(self, args)
     return not Balatrocities.config.disable_malfunctionFlash
end
#

if that's the config for the voucher of course

frigid cargo
#

Oh ok thanks

#

If i was to activate it before a new run, and then activate it during a run, will it still spawn?

willow scroll
#

how does one modify the blind requirements

high verge
#
        key = 'shop_sign',
        px = 226,
        py = 57,
        path = "pvz_store_sign.png",
        prefix_config = {key = false},
    }```

I'm trying to change the shop sign texture but for some reason this doesn't appear to be working. Anyone know what I'm doing wrong?
willow scroll
#

this just creates a new atlas with the key shop_sign

#

you have to actually change the atlas of the shop sign (no idea how)

high verge
#

This is the kind of code that I use to replace the ui elements.

#
            key = 'ui_1',
            px = 18,
            py = 18,
            path = "ui_assets.png",
            prefix_config = {key = false},
        }``` Like this one works.
willow scroll
#

then i might not know how replacing ui works 💀

#

mb

high verge
#

My only thoughts are maybe the key is wrong but as far as I can tell it's the right code?

#

Or maybe the code needs to be different since it's an animation

frigid cargo
obtuse silo
#

is there a gamestate for winning?

#

winning the run, not just a blind

wispy falcon
#

Why do I keep getting this error? I can't figure it out...

robust falcon
#

Is it not possible to add gradients as a color in JokerDisplays?

bold sleet
#

Is there a way to tell balatro to recalculate the hand to display before actually playing it?

robust falcon
obtuse silo
#

ok this code causes the hand to still appear on the round evaluation screen
any way to fix it?

high verge
#

Pay dirt.

#
        key = 'shop_sign',
        atlas_table = 'ANIMATION_ATLAS',
        px = 113,
        py = 57,
        path = "pvz_store_sign.png",
        prefix_config = {key = false},
        frames = 4,
    }``` Here's the code if anyone wants it. I was missing the atlas table
robust falcon
obtuse silo
# obtuse silo

to clarify
when i use the consumable this is attached to
it ends up ending the round as normal
but it has the odd side-effect of drawing more cards to your hand after the previous cards have re-entered the deck.

#

i think it might be tied to it being a used consumable since this doesn't happen with the DebugPlus "win this blind" button.

wild escarp
#

Is there a better way to look through balatro's source code than just searching through each file individually?

plain ember
#

Guys i've been checking the smods docs about booster packs creation, and im not sure if its intended that way, but first example is wrong?

#

Should be newcard instead of getcard right?

cursive gazelle
#

Check vanilla remade examples

#

And wiki

#

It has

plain ember
#

Theres not booster packs iirc

#

wiki?

cursive gazelle
#

Wiki*

plain ember
#

Sorry im pretty new at modding this game so i'm trying to get used to the enviroment, lmao

cursive gazelle
#

It’s alright feel free to ask

#

You sometimes get late response due to either your questions being hard or time zones

#

But feel free to also bump it

red flower
wispy falcon
cursive gazelle
wispy falcon
frigid cargo
#
create_option_cycle({
                label = localize("btct_string_B"), 
                scale = 0.8,
                w = 6,
                ref_table = Batrocities.config, 
                ref_value = "tarotM_rateChange",
                options = { 1, 2, 3, 4, 5, 6 },
                current_option = Batrocities.config.tarotM_rateChange,
            }),

how do i make the option stay what they picked? it just restarts...

cursive gazelle
hexed saffron
#

I used the example code for card faces on steammodded and it doesn't seem to be working when I launch it but it also hasn't crashed anything

cursive gazelle
#

Does steamodded load your mod ?

hexed saffron
#

yes

cursive gazelle
#

Can you find your deck skin in the customize tab ?

hexed saffron
#

oh I see now ty, do I just copy and paste the hearts suit and change them to like spades diamonds and spades?

cursive gazelle
hexed saffron
#

I mean the lua so that it exists for all suits

#

like copy this but change the suit to say the other suits

cursive gazelle
#

Yes

hexed saffron
#

alrighty tysm

bold sleet
#

hold on, let me grab some code

#

Here.

#

You need like, a table, a number and a string. The table is for the options, the number is for the current selected option, and the string is for the value of the selected option.

hexed saffron
cursive gazelle
obtuse silo
#

is there any way to forcibly draw cards into hand (e.g. like the Serpent?)

cursive gazelle
hexed saffron
cursive gazelle
solemn shuttle
#

what determines the amount of times a consumable does the juice up animation in the middle

noting how planet cards do it like 3 times and i was wondering if i could tie that amount to a variable

wispy falcon
#

Why does it not run this part of the code?

            G.GAME.current_round.cstorm_captcha_card and
            context.other_card:get_id() == G.GAME.current_round.cstorm_captcha_card.id and
            context.other_card:is_suit(G.GAME.current_round.cstorm_captcha_card.suit) then
                print("Works")
            return {
                repetitions = card.ability.extra.repetitions
            }
        end```
obtuse silo
obtuse silo
obtuse silo
red flower
#

this is not how you would draw extra cards btw

obtuse silo
#

oh
what i want is to draw 3 additional cards into the player hand regardless of their hand size, a la The Serpent through using a consumable

red flower
#

just do SMODS.draw_cards(3)

obtuse silo
#

ah
thank you

#

it was really that simple wtf-

sonic cedar
#

hey so doing this now causes a stack overflow
-# also leaving this as a note for @chrome widget since it was her i originally did it with, but here's the code in case someone else can figure it

chrome widget
#

Where is this code block?

#

This probably isn't enough context for me to debug

sonic cedar
chrome widget
#

It being in the update function is the reason why

sonic cedar
#

wait but that was ok before

#

then again it has been 2 months lmao]

chrome widget
#

You probably had/removed some form of check

#

But if it's determining it simply by game states, then it's going to send one of those events every single frame that the transformation is valid

sonic cedar
#

and im guessing a flag wont help here cause i tried that and got the same crash

chrome widget
#

I mean you could flag it as card.hpfx_transforming or smth

sonic cedar
#

oh so not as like a card.ability

chrome widget
#

Yeah card.ability is gonna get reset by the transform itself (I assume)

sonic cedar
#

cause before i just did a (quick mockup since i reverted it)

chrome widget
#

Regardless more than anything I'd just recommend never using update for anything that's not purely visual

sonic cedar
#

oh ok

#

how can i have that persistent check then without update

chrome widget
#

It basically just transforms whenever something is to the right of it?

#

Does it transform back when that's also not true?

sonic cedar
#

nope when it's not true it just doesnt transform

#

but its supposed to be a troll type thing

#

"oh let me rearrange my blueprint targeting"
"oh"

#

transforming mid drag is really funny but id understand if that wont be possible

chrome widget
#

It's entirely possible yeah

sonic cedar
#

hooray!

fallow urchin
#

when coding a challenge where do I put the name? I've got a en-us.lua under a localization folder that just has

return {
misc = {
challenge_names = {
bccp_commoners = 'Commoners Deck',
}
}
}

but I'm just getting an error for the challenge name in game, do I need to explicitly load the en-us file somewhere?

chrome widget
#

then yeah just put a flag on it like card.hpfx_[joker_name]_transformed or smth like that

sonic cedar
#

but i still need to move it out of the update fucntion?

chrome widget
#

no

#

If you have multiple jokers doing gameplay shit in update, it's probably preferrable you set up a custom context for card order changed

#

But it's not strictly necessary

sonic cedar
#

oh ok let me do that

chrome widget
#

I made one for this already before lemme find it

sonic cedar
#

....do you happen to know where that det--oh my goodness

wild escarp
#

What would be the best way to prevent cards from flipping? I've got this hooked in Card:flip() to put the cards in a table, but idk where to go from here.

if G.jokers then
    for i = 1, #G.jokers.cards do
        if G.jokers.cards[i].config.center.key == "j_willatro_skin" then
            immune[#immune+1] = G.jokers.cards[i]
            if i > 1 then
                immune[#immune+1] = G.jokers.cards[i-1]
            end
            if i < #G.jokers.cards then
                immune[#immune+1] = G.jokers.cards[i+1]
            end
        end
    end
end
chrome widget
#

Oh wait......

#

you were the one I wrote this code for

#

I wrote a generic context one that you could use for multiple jokers and a joker specific one. If you actually have multiple jokers that the generic context one would benefit from, use that one instead. It's in your DMs

#
local ref_card_update = Card.update
function Card:update(dt)
    local ret = ref_card_update(self, dt)

    if type(self.ability.current_area) ~= 'table' then
        self.ability.current_area = self.area
    end

    if not self.area then
        self.ability.current_area = nil
        return
    end
    
    local joker_idx = 1
    if not self.ability.current_cards then self.ability.current_cards = {} end
    local size_changed = #self.area.cards ~= #self.ability.current_cards
    local order_changed = false

    for i, v in ipairs(self.area.cards) do
        if v == self then
            joker_idx = i
            if order_changed then
                return
            end
        end

        if not order_changed and v.ID ~= self.ability.current_cards[i] then
            order_changed = true
        end
    end
    
    -- don't do potentially expensive sprite creation if nothing has changed
    if not size_changed and not order_changed and self.ability.current_area == self.area and joker_idx == self.ability.last_index then
        return
    end

    local eval = eval_card(self, {card_pos_changed = true, new_pos = joker_idx, order_changed = true, size_changed = true})
    SMODS.trigger_effects({eval}, self)

    self.ability.current_cards = {}
    for _, v in ipairs(self.ability.current_area.cards) do
        self.ability.current_area.cards[#self.ability.current_area.cards+1] = v.ID
    end

    self.ability.current_area = self.area
    self.ability.last_index = joker_idx

    return ret
end```
sonic cedar
#

oh my god 😭

#

it all comes back lmao

chrome widget
#

Based on that DM you chose the per-joker one under the assumption that you only needed one use case and that was more performant (not sending the context to every card if i wasn't necessary)

#

But in general I discourage using update for non-visual behaviors, especially when using a scripting language. Discrete function calls are IMO a lot easier to debug and more performant compared to unique update code for every object

sonic cedar
#

i see i see okay

hexed saffron
sonic cedar
#

i might not be actually

#

yeah let me uh... add that

dreamy lodge
#

Is there a way to check if you beat a blind on your first hand?

faint yacht
#

SMODS.last_hand_oneshot as of 0827.

#

And G.GAME.current_round.hands_played.

frosty rampart
#

(to clarify: last_hand_oneshot doesn't necessarily mean you beat the blind on your first hand, but if it's true and current_round.hands_played == 1, then you have what you're looking for)

timid zinc
#

is it normal for my consumable to lose its name

sturdy compass
#

Not really!

timid zinc
#

it only happens sometimes but when it does happen its not fixed by re-hovering over it, it's consistent for that one card

daring fern
wild escarp
#

Prevent all adjacent cards as well as this joker from being flipped.

hexed saffron
#

what is the syntax for including all the suits?

daring fern
rocky plaza
#

how does one prevent a specific card from being dragged (assuming i have direct access to the card in a variable)?

rocky plaza
#

ah got it

cursive gazelle
#

My wifi still won’t connect

rocky plaza
#

lmao im tired
should go to bed soon but i wanna keep on programmin shit lol

cursive gazelle
wild escarp
#

I've got this to prevent cards adjacent to this joker from being debuffed, but it seems like they maintain that protection after they are no longer adjacent; how do I take away that protection?

for i = 1, #G.jokers.cards do
    if G.jokers.cards[i] == card then
        if i > 1 then
            SMODS.debuff_card(G.jokers.cards[i-1], "prevent_debuff", "j_willatro_skin")
        end
        if i < #G.jokers.cards then
            SMODS.debuff_card(G.jokers.cards[i+1], "prevent_debuff", "j_willatro_skin")
        end
    end
end
daring fern
#

And return {prevent_debuff = true}

chilly elk
#

I have never done anything like this so that's why Im super confused lol sorry bout the messages Im just trying to figure this out

obtuse wraith
#

I borrowed some code from that Half Life SFX Tonsmith port, the json of it.

tall wharf
rotund sable
#

Slowdown is enabled

manic rune
#

1 hour countdown

obtuse wraith
lament agate
#

hey guys, i got a problem with this code

daring fern
heady siren
urban wasp
#

what an unfortunate time to ask once again why this joker ain't creating a joker of the bulgoe pool and instead just crashes

SMODS.Joker {
    key = "bulgoe_candy",
    name = "Bulgoe Candy",
    config = { extra = { jokers = 2, money = 7 } },
    rarity = "cry_candy",
    atlas = "crp_placeholder",
    pos = { x = 2, y = 1 },
    cost = 3,
    blueprint_compat = true,
    demicoloncompat = true,
    eternal_compat = false,
    pools = { Bulgoe = true, Food = true },
    loc_vars = function(self, info_queue, card)
        return { vars = { lenient_bignum(card.ability.extra.jokers), lenient_bignum(card.ability.extra.money) } }
    end,
    calculate = function(self, card, context)
        if (context.selling_self) or context.forcetrigger then
            for i = 1, math.ceil(lenient_bignum(card.ability.extra.jokers)) do
                SMODS.add_card({ set = "Bulgoe" })
            end
            ease_dollars(lenient_bignum(card.ability.extra.money))
        end
    end,
    crp_credits =  {
        idea = { "wilfredlam0418" },
        code = { "wilfredlm0418", "Glitchkat10" }
    }
}
umbral zodiac
dreamy lodge
#

How do I add the "(Currently # <value> )" in the text of a joker? EDIT: why is there 1 hour slow mod in this chat

sturdy compass
viral ember
cyan dust
tawny perch
#

no one will hear your screams clueless
go to modding threads for free will

ill miss this when i get my free will back eventually
what happened to thunk chat by the way i was too busy drawing for ortalab at that time

mm well i can just wait for someone who still has their free pass to answer

versed swan
grand violet
#

5 seconds

stiff locust
#

the conch has spoken

grand violet
#

sorry, we still gotta be on alert

#

but I trust you all

stiff locust
#

all good

humble pawn
#

Don’t worry only coding nerds speak here

stiff locust
#

lois this reminds me of that time i was in the chernobyl disaster and the reactor broke down when a mod pinged @everyone

grand violet
#

(insert hard cut to peter griffin dead pose here)

stiff locust
#

i feel like a fucking schizophrenic right now

high verge
#

Is it possible to use a hex color in place of say C:attention in a text string?

stiff locust
#

I have a joker border with some custom joker text I wanna apply to a joker and it's the right size at 1x
but when i double its size, it's 1 pixel too tall for 2x??????????????

stiff locust
#

aseprite doubling the sprite size doesn't change the result it's still 1 pixel too tall after that

fickle stag
#

hey aikoyori!

stiff locust
chrome token
#

is there any way of making a joker give mult even if they're not designed to do that?

stiff locust
#

what

#

oh i know what you want but

#

the way it was described was very funny

#

you mean like baseball card (right?)

red flower
#

you would need to hook calculate_joker or something like that to add more effects

#

you can always do it like baseball card yeah

chrome token
#

😭
...yeah idk how to phrase this question i'm kinda stupid 😭
say i want to add mult to a card like blueprint-- how would i do that :P

chrome token
stiff locust
#

is it coming from a joker's effect

chrome token
stiff locust
#

why

chrome token
chrome token
red flower
#

then you would need to hook calculate_joker yes

stiff locust
#

out of the many people I have asked

#

and that is strangely impressive

chrome token
#

idk what to tell you man, i'm just trying to implement this joker lmao

stiff locust
#

laset

chrome token
chrome token
stiff locust
#

your description generally should be more concise methinks
depends what vibe your mod is going for

#

you dont need the flavour text of "fires a laser"

chrome token
#

my mod's purely for funsies-- it's not trying to go vanilla nor is it really trying to be unbalanced as all hell

#

kinda like aikoyori's shenanigans, the only difference being that a lot of the jokers have a lot to do with my closest online friend group that i have

#

with that being said there are still some cool things imo that are worth checking out 😅

stiff locust
#

so it's like jokebox I seee

chrome token
#

yeah you could say so! :)

stiff locust
#

do you know what jokebox is without me telling you

chrome token
#

i took a glimpse at it but i think it's just a collection of fun jokers right? without any particular rhyme or reason for each one?

#

i could be wrong on that though 🥲

chrome widget
red flower
#

that's so cool

stiff locust
chrome token
#

ah wait i didn't realize you made the mod 🥲 me stupid mr_bones

chrome token
stiff locust
#

it's really funny thats what it is

#

you should do stuff like that

#

make a joker spin around solely because you can

chrome token
#

the mod i'm working on has markiplier reacting to your gameplay

stiff locust
#

that's fucking amazing I love it

chrome token
#

hold on i can grab a clip lmaoooo
i voice acted that shit horribly and everything 😭

chrome token
stiff locust
chrome token
#

ikr lolll

#

there's also geometry dash as a blind

turbid pawn
#

LMFAO?

stiff locust
#

can you help me with something

chrome token
#

sure, what's up?

(editing it here because the slowdown bumped up :( )
well if you want it to look fancy i have no tbh... if that doesn't matter though you can just try to print text on the screen using love.graphics.print

stiff locust
#

I want text to appear in the top left of the screen when a condition is met

a second hour-long slowmode has hit the chatrooms

yeah it doesnt need to look fancy I just need there to be text

split thicket
#

Alright guess we’re moving here

Or not

turbid pawn
#

we highkey do not need a one hour long slowmode 💔 @grand violet if you could fix this that'd be appreciated

chrome widget
#

Love that I got 🇭 🇴 🇼 reacted

daring fern
tawny perch
#

clueless @grand violet

crisp coral
#

nothing they can do

tawny perch
#

i mean it works for a sec but if you dont type fast enough it just doesnt work

crisp coral
#

if you get hit with 1 hour and it changes you still have to go through the entire hour

tall wharf
#

the check is server side

vital crown
#

discord problem, nothing mods can do

tawny perch
#

i would guess so

tall wharf
#

client sometimes does desync

vast bridge
#

This channel is modding-chat-2 for hour

tawny perch
#

i cant read

bleak crane
#

do these boss blinds seem too op or are they fine (these are regular boss blinds)
(for a ror2 based mod)

vital crown
#

nah these are good as hell

vast bridge
#

And they are well designed.
I hate boss blinds that do nothing unless you have certain build, then you die.

vital crown
#

if anything imp overlord might be a little underwhelming

bleak crane
vital crown
#

I mean my thought was -5 but they can go into negatives (really funny) but I don't know if that's technically feasible

vital crown
bleak crane
#

negative chips 🥰

vital crown
bleak crane
#

that also makes it easier to code 🥰

#

fuck you -55 chips

vital crown
#

it's so funny

#

me doing my gimmick retrigger build and not paying attention to boss blinds so my polychrome red seal king now has -100 chips

hexed saffron
#

(I hate to keep asking but) why isn't this working? when I run this only one set works at once

stiff locust
#

switch off light mode and it will work

hexed saffron
bleak crane
stiff locust
#

-1 selection size

+6 hand size

#

that is all

bleak crane
bleak crane
vital crown
high verge
#

Is it possible to make a joker cause a discovered joker to be undiscovered again?

vital crown
high verge
#

Don't you fear react me the card's gimmick is that you forget about it xD

vital crown
#

oh okay it triggers on itself

daring fern
vital crown
high verge
#

One way or another I will figure out how to jam that into my code

bleak crane
#

elusive 150/151:

high verge
#

I guess in that respect the only way to complete your collection with that card is if you don't let it trigger.

bleak crane
#

joker that makes you ununlock brainstorm

#

(instantly wins run)

vital crown
#

joker that has some benefit but locks a bunch of random collection jokers

bleak crane
#

actually fuck you removes brainstorm from the game all together

high verge
#

Deletes the file xD

bleak crane
#

locks jimbo 😢

high verge
#

Deserved

vital crown
bleak crane
bleak crane
high verge
#

What's wrong with my server

bleak crane
#

poor jimbo 😢

vital crown
#

jimbo should try helping tbh

bleak crane
bleak crane
#

he IS that guy

vital crown
#

balatro but I have every joker banned except jimbo (I lose in ante 4)

tall wharf
bleak crane
#

@vital crown is this fire

Spinel Tonic - 1/2 chance to debuff all cards or give 2x mult for each (uneffect by oa6s) - lunar
#

lunar jokers btw cannot be sold

#

alcoholism 🥰

tough temple
#

hey does anyone have a link to the wiki i could bookmark?

bleak crane
#

now THIS is fire

#

ignore the one above that 🤫

red flower
high verge
#
                            if target_joker then
                            set center.discovered == false
                            else
                            end``` Gonna take a wild guess I'm doing this wrong
tough temple
red flower
high verge
#

I'm trying to make j_mor_nanafuse set itself to undiscovered

red flower
#
G.P_CENTERS.j_mor_nanafuse.discovered = false
#

that's it

wispy falcon
#

Quick random question: Why is there 1x and 2x by assets and does it make a difference if the image is the same size in both of them?

high verge
#

Thank you I'll give that a try!

red flower
wispy falcon
high verge
#

It's expecting a bigger picture so it'll show it wrong.

red flower
# wispy falcon Wrong how?

if both are 1x sized then the 2x one will include multiple sprites per card
if both are 2x sized then the 1x one will show part of the card

hollow horizon
#

Hi! Is there a way to reset the joker pool mid-game? I'd want to make to be able for jokers to reappear in shop even if bought earlier or are in deck

red flower
hollow horizon
#

thanks

high verge
#

Okay that worked but I broke something on it in the process so just gonna get that fixed and then I can sleep.

thorn basin
#

why do I have a 23 hours cooldown post 😭
I was offline

#

ah, but in this channel is only 5 seconds

#

If someone sees this post, please tell the mods or someone to fix the time limit 🥲

vital crown
#

if you have a slowmode cooldown, mods can't do anything about that

thorn basin
#

before it was just 1hr cooldown but after the cooldown ended someone put it on 23hr cooldown

vital crown
red flower
#

you will need to wait

thorn basin
#

😭

#

welp, cruelty wins again, cya in 1 day guys 🥲

hexed saffron
thorn basin
foggy ginkgo
#

How do I make a joker not spawn but still spawn from judgment

high verge
#

Okay somehow ended up with the card deleting itself and then saying his goodbye message but I think that actually might be more fitting so it stays.

#

But otherwise I now have a card that forgets itself let's go

foggy ginkgo
#

Fuck yeah

#

I was actually looking at the wiki before you sent that so

#

Thank you tho my goat

#

I should really read the wikis

#

They might actually help

thorn pumice
red flower
#

do you have a should_apply?

thorn pumice
#

yeah

red flower
#

it overrides them

thorn pumice
#

oh got it!

#

how should i rewrite this so it doesn't override them?

#

tysm btw

red flower
#

i dont think you can, you need to check manually for the set and the rate in should_apply

#

but never worked with stickers

bleak crane
#

do we fw this deck art (left) , based on this character (right)

#

better look at the deck art

thorn pumice
#

looks good :)

daring fern
robust marsh
bleak crane
#

🥰

robust marsh
#

he's cool :)

foggy ginkgo
thorn pumice
red flower
foggy ginkgo
#

Man

daring fern
foggy ginkgo
#

I'm not smart

#

Could this also work on a custom pool

red flower
#

wdym

foggy ginkgo
#

I have a joker (the top) turn into 1 of 4 random jokers, but I want those 4 jokers to not spawn anywhere but that

thorn pumice
thorn pumice
red flower
lament agate
#

okay like

#

blinds atlas needs to be animated, not static?

foggy ginkgo
#

Cause it's giving me this

red flower
#

are you sure the object type has things in it

vital crown
lament agate
red flower
#

i mean you can set it to animated and make it 1 frame

foggy ginkgo
red flower
#

i mean i see that but you should check if it's loaded correctly in-game

foggy ginkgo
#

Unless this is not how you do it

red flower
#

idk objecttypes are weird

foggy ginkgo
#

Yeah

lament agate
red flower
#

maybe you need to put the ObjectType after all the jokers not before

foggy ginkgo
#

My cookies

red flower
#

slowmode is very annoying..

lament agate
#

egg plz fix

foggy ginkgo
#

Still crashes

red flower
#

do you have debugplus

foggy ginkgo
#

Yes

#

Is that the problem

red flower
#

can you eval G.P_CENTER_POOLS.Dalgona in the console in the main menu

foggy ginkgo
#

And it's gonna reveal I'm actually stupid

red flower
#

huh weird then

keen atlas
red flower
#

maybe pseudorandom element respects in_pool?

foggy ginkgo
#

Lmao

#

Again it's saying this is the problem
-# ik you know but I just wanna say words

#

But yeah idk

red flower
#

oh yeah it does

foggy ginkgo
#

So how would a birdbrain like me go around this

daring fern
red flower
foggy ginkgo
#

You're welcome? 😭

robust marsh
foggy ginkgo
#

Yes

robust marsh
#

peak

foggy ginkgo
robust marsh
#

TETO JOKERS,.

daring fern
foggy ginkgo
#

Ou

#

Where exactly

foggy ginkgo
red flower
#

after 'dalgona'

robust marsh
foggy ginkgo
#

Probably gonna wait for awhile

#

Promised so many people and it's been a month

foggy ginkgo
daring fern
foggy ginkgo
#

Thank you Something and N

#

I feel so silly

manic rune
#

wat does AT in an uibox mean 🤔

red flower
#

attention text i think

keen atlas
#

AT?

wintry nimbus
plain ember
#
SMODS.ConsumableType {
    key = "Powerup",
    primary_colour = HEX("14b341"),
    secondary_colour = HEX("12f254"),
    collection_rows = { 4, 4 }, -- 4 pages for all code cards
    shop_rate = 99,
    default = "c_mush_mushroom",
    loc_txt = {
        -- The simplest option: use a single table
        label = 'Label',
        name = 'Name',
        text = { 'A moderately long', 'description of', 'your effect.' },
    },
    can_stack = true,
    can_divide = true,
}

SMODS.Consumable({
    key = "mushroom",
    set = "Powerup",
    object_type = "Consumable",
    name = "mushroom",
    loc_txt = {
        name = "Mushroom",
        text={
        "test",
        },
    },
    
    config = {},
    pos = {x=0, y= 0},
    order = 99,
    atlas = "mushpowerups",
    unlocked = true,
    cost = 4,
    hidden = false,

    use = function(self, card, area, copier)
        print("Hello worl")
    end,

    can_use = function(self, card)
        return true
    end,

    check_for_unlock = function(self, args)
        if args.type == "test" then
            unlock_card(self)
        else
            unlock_card(self)
        end
    end,
})

Morning guys, i'm not really sure what i'm doing wrong, i'm trying to create a new consumabletype and a consumable of the same type but it shows this instead 🫠

mental nacelle
#

object_type should be Powerup iirc?

#

unless i’m silly

plain ember
#

Idk tbh, that's why i'm here lmao

#

let me try

mental nacelle
#

wait set should be ”modprefix_Powerup”

#

-# i think

daring fern
daring fern
mental nacelle
#

oh

plain ember
mental nacelle
#

i forgot how to consumable mb

random sleet
#

it is undiscovered because you didnt put discovered = true and im willing to bet you dont have an undiscovered powerup description defined in localization

plain ember
#

Oh, yeah

#

Okay that worked HAHAHA

random sleet
#

loc_txt wants a "collection" entry

gusty iron
#

What function would i hook into so that levels had a 1 in 2 chance of not happening (for a stake im making)

plain ember
#

i did a mistake there?

#

Well, here it is, awesome

random sleet
#

for the consumabletype
thats why the collection shows ERROR

plain ember
#

Ooh

#

How can i fix that?

random sleet
#

next to label and name etc

plain ember
#

So, i just add collection = "name"?

plain ember
#

Pretty

#

thanks @random sleet

floral narwhal
#

why does it does nothing?

gusty iron
#

A main issue im having is the function doesnt seem to be hooking after i reload the game

stiff locust
#

how might I select a random common joker

#

I don't want to spawn it I just want to pick one

#

i figured it out

willow scroll
#

damn i was too slow to @ mods 😔

wispy falcon
#

Why does this just not get done? Not even the print goes through

            G.GAME.current_round.cstorm_captcha_card and
            context.other_card:get_id() == G.GAME.current_round.cstorm_captcha_card.id and
            context.other_card:is_suit(G.GAME.current_round.cstorm_captcha_card.suit) then
                print("Works")
            return {
                repetitions = card.ability.extra.repetitions
            }
        end```
obtuse silo
#

i want to ensure that the consumable can only be used when the hand is visible (e.g. in a blind and in a tarot pack), but this code allows it to be used at any time

red flower
#

check the code for the spectrals that add cards to hand

#

i think they check if the hand has a card

obtuse silo
#

i see
so basically since only in those two scenarios does the hand have cards in it
limiting it so that there has to be at least 1 card in hand ensures it only happens in those scenarios

red flower
#

yeah

#

everywhere else the hand still exists but it's hidden without cards

charred widget
#

Hello friends! I'm having trouble with a joker for my mod

#

yveltal here is supposed to display an xmult value in its description, but right now the value is just "nil", and whenever it tries to score the game crashes

#

so there's something missing and i don't know what it is

wispy falcon
red flower
charred widget
#

...so should i remove the other two

red flower
#

yes

charred widget
#

ok thank you!!

#

i genuinely wouldn't have noticed if you didn't point it out lol

red flower
#

this is why we use a good code editor

#

it makes it darker to let you know it's not used

cursive gazelle
charred widget
#

ok next thing

willow scroll
charred widget
#

ho-oh detects if you discard exactly three cards, destroy them, and replace them with three randomly enhanced face cards

wispy falcon
cursive gazelle
#

you can find it in fanart if you search my messages

#

it's still incomplete

willow scroll
#

small question, does SMODS change is so that for every pack you open G.STATE becomes 999?

charred widget
#

but right now it's only destroying the first card

willow scroll
#

ill probably have to rework this mess into a more general function but for now this works hooray

mortal herald
#

anyone have a tutorial on how to make a balatro mod?

red flower
wispy falcon
#

Do Jokers need to be 71x95 or can they also be different sizes, like wider and smaller?

lament agate
#

how do you alter the effect of enhancement with Joker

#

i.e Mult card gives +8 instead of +4 Mult

languid canopy
#

hello, is there a way to make like "folders" of hands in the run info section of the game ? i plan on adding new hands, but theres quite some and i want it to look clean

candid prism
#

i made a rarity and it simply displays as ERROR textwise

wispy falcon
languid canopy
#

you need both

wispy falcon
candid prism
languid canopy
wispy falcon
languid canopy
languid canopy
red flower
#

nope

#

or at least i havent seen one

wispy falcon
slim ferry
#

its possible, but you need a seperate atlas for it and need to specify the size in the joker

languid canopy
#

yes there is

charred widget
languid canopy
willow scroll
red flower
charred widget
red flower
languid canopy
#

oh pretty nice, whats the name of your mod ?

willow scroll
willow scroll
#

i think

hallow slate
#

If nobody's making quantum enhancements I'll fucking do it. I'm crazy like that. I'm straight up deranged

willow scroll
#

quantum enhancements exist but i hate them because having a stone quantum enhancement just fucks the card up

#

and i want a stone quantum enhancement but also have the damn front visible

willow scroll
#

if your stuff only happens on three cards, you could do

card.ability.extra.ad = false
end
#

instead of the current check

#

probably not the cleanest way but since the rest only triggers on 3 cards discarded i think its fine?

slim ferry
#

couldnt you just check if #context.full_hand == 3 in the conext.discard check? i imagine it also exists in context.discard

willow scroll
slim ferry
#

no?

#

why would it

willow scroll
#

wait no sorry hold up

#
            card.ability.extra.added = false
            return {
                remove = true,
            }
        end```
yeah this would work
#

im not braining rn

charred widget
#

so i replace the current context.discard function at the very end?

languid canopy
slim ferry
#

yeah

red flower
#

keep in mind they can still be played

charred widget
willow scroll
charred widget
#

thank both of you :3

wispy falcon
slim ferry
#

what did you put in?

wispy falcon
slim ferry
#

what about the atlas definition?

languid canopy
wispy falcon
slim ferry
#

i think you need to set the display_size on the joker to the same as the pixel_size

wispy falcon
chrome widget
# languid canopy im highkey ass at this, what does hook means, sry keeping you with this

Hooking is a redeclaration of an existing function, using the stored original function declaration as a primitive form of inheritance. Essentially, store the value of a function in a local variable, then declare it again, and inside the new function declaration, call the local value as a function. Then you can essentially add to that code in the new function declaration

languid canopy
#

oh okay right

#

SMODS.is_poker_hand_visible would be the function i have to redeclare if i understand well

willow scroll
wispy falcon
willow scroll
candid prism
charred widget
#

alright i've come with another tweak

languid canopy
ocean sinew
#

Someone help me make a talisman fix(there's only one thing missing but I'm having trouble figuring it out)

candid prism
#

how the [[FUCK]] do i define xchips

daring fern
ocean sinew
#

OH WAIT I FIGURED IT OUT

languid canopy
ocean sinew
#
transformed code: local create_number(h) =create_number(2)local create_number(x) =h+g

nvm 😔

candid prism
ocean sinew
#

ohhhh nice I did it

#

time to test again and see If there's something missing

thorn basin
#

I made an enhancement called "Dirt card" that should become a "Bloom card" if held in hand at the end of the round.
The problem is that it still doesn't do that, it doesn't do anything, how do I fix this?

wispy falcon
#

Why does my Joker look like this? It doesn't use the whole png but I've set it to the size of it

languid canopy
#

i think

charred widget
# charred widget alright i've come with another tweak

two jokers i'm working on, Koraidon and Miraidon, apply red and purple seals to played wild and steel cards respectively, but if you play the same cards it just applies again, without changing anything. can we make it check if there's already a red or purple seal and not apply it if there is?

daring fern
charred widget
languid canopy
#

at what point is it okey to put our own mod on the modding forum ?

thorn basin
daring fern
wispy falcon
thorn basin
charred widget
wispy falcon
#

Wait, doesn't cryptid have a joker that is bigger than normal?

daring fern
silent root
#

How do I go about starting to mod for balatro ?

daring fern
charred widget