#💻・modding-dev

1 messages · Page 537 of 1

jolly shadow
#

i believe this should do

glass crown
#

ohhh i didnt know there was a context for debuffing cards, i shouldve looked for that, thank you!

livid hill
#

whats the best mods for balatro

jolly shadow
#

edward robinson

zealous scaffold
#

but every time I explore I find more good and fun mods

livid hill
#

hmm

#

k thx i will be sure to check them out

#

first time using mods

zealous scaffold
#

If you like high points, Cryptid might be interesting.

livid hill
#

uh and can i all these mods togehter

subtle merlin
# livid hill whats the best mods for balatro

Opinions vary wildly and a lot of people will just say their mod

If you're willing to deal with cryptid:
Entropy
Vallkarri

If not:
Paperback
Ortalab
HouseRules
Grab Bag
TheAutumnCircus
Tangents

Quality of Life mods:
Handy
DebugPlus
(I can't overstate how good these two mods are)

livid hill
#

or they wont work togeter

subtle merlin
livid hill
#

k

#

thx a lot

subtle merlin
#

Unless the mod specifically says "conflicts with [mod]"

livid hill
#

ohk

zealous scaffold
#

I didn't declare conflicts in my mod but it conflicts with everything 😎

subtle merlin
rotund sable
#

should've been javascript

knotty orchid
#

so this line is crashing:

                    G.shared_stickers[v.key].role.draw_major = self

When trying to change

local main_menu = Game.main_menu
function Game:main_menu(context)
    self.shared_stickers = {
        White = Sprite(0, 0, self.CARD_W, self.CARD_H, self.ASSET_ATLAS["ina_stake_stickers"], { x = 1, y = 0 }),
        Red = Sprite(0, 0, self.CARD_W, self.CARD_H, self.ASSET_ATLAS["ina_stake_stickers"], { x = 2, y = 0 }),
        Green = Sprite(0, 0, self.CARD_W, self.CARD_H, self.ASSET_ATLAS["ina_stake_stickers"], { x = 3, y = 0 }),
        Black = Sprite(0, 0, self.CARD_W, self.CARD_H, self.ASSET_ATLAS["ina_stake_stickers"], { x = 0, y = 1 }),
        Blue = Sprite(0, 0, self.CARD_W, self.CARD_H, self.ASSET_ATLAS["ina_stake_stickers"], { x = 4, y = 0 }),
        Purple = Sprite(0, 0, self.CARD_W, self.CARD_H, self.ASSET_ATLAS["ina_stake_stickers"], { x = 1, y = 1 }),
        Orange = Sprite(0, 0, self.CARD_W, self.CARD_H, self.ASSET_ATLAS["ina_stake_stickers"], { x = 2, y = 1 }),
        Gold = Sprite(0, 0, self.CARD_W, self.CARD_H, self.ASSET_ATLAS["ina_stake_stickers"], { x = 3, y = 1 })
    }
    main_menu(self, context)
end

Don't really understand what's happening

livid hill
#

huhhh

#

got this

#

i have like 13 mods enebed

#

and tried to run the game

#

what to do

wind steppe
#

if i have multiple lovely files what order do their patches load in?

wind steppe
livid hill
#

why tho

subtle merlin
livid hill
#

ohk

#

so do i just disable that

#

and move on

subtle merlin
#

you can try that, yea

livid hill
#

k

wind steppe
#

dont do that now though

subtle merlin
#

how do i make it so that boss blinds award no money outside of challenges? G.GAME.modifiers.no_blind_reward gives the first crash for some reason (if i append .Small, .Big, and .Boss to three different lines it's the second crash)

livid hill
#

Yoo its working, i disabled card sauce

livid hill
languid canopy
languid canopy
#

uh okey right

#

i need to put it where tho

subtle merlin
languid canopy
#

i may have found it

subtle merlin
languid canopy
#

nvm i didnt

wind steppe
languid canopy
#

yes vscode

#

also a new error shoed up wait

knotty orchid
#
    "dependencies": [
        "Steamodded (>=1.0.0~BETA-0323a)",
        "Talisman (>=2.3.0)",
        "Lovely (>=0.6)",
        "Malverk (>=1.0.0)"
    ]
}

Why is malverk dependency always throwing error if I have latest release?

languid canopy
subtle merlin
#

if not, get it

languid canopy
#

how

wind steppe
#

you click the link

subtle merlin
languid canopy
#

me being blind

#

mb

subtle merlin
subtle merlin
#

it lets you know where things went wrong in your code before you try playing it

languid canopy
#

uh it does that ?

#

nothing changed tho

wind steppe
#

is it not all colorful now

languid canopy
#

ok wait

subtle merlin
#

look for the red lines and it tells you smth like this when hovering over it

#

then you just

#

look

languid canopy
#

ok the thing is

#

it doesnt happen

wind steppe
#

did you actually install it

subtle merlin
#

send a screenshot of your vscode

languid canopy
#

duh

#

i may have found sm

subtle merlin
#

yeah

#

the issues are in red

#

and it says what the issues are

#

you just need to

#

yk, fix them

languid canopy
#

its so ass...

#

abismal dogshit

wind steppe
#

if it's about the theme colors you can get a different theme

languid canopy
#

not what im saying

subtle merlin
#

(these are 3 different links, 2 of which are wikis, please use all of them as they are all useful)

languid canopy
#

ok nvm this joker ill redo everything from the start

wind steppe
subtle merlin
#

that worked (i need to remember to look through the SMODS src more), ty!

timid zinc
#

is there a way to see more values?

#

from a print statement

faint yacht
#

inspect(table) or, for depth, inspectDepth(table).

knotty orchid
#

For malverk, how do I define new textures for perishable, rental...

torpid mantle
#

does anyone know the demension of the tarot cards

#

i think its 63x93

#

but i not sure

surreal knot
#

71x95 if i remember it right

#

Yep

torpid mantle
umbral zodiac
#

71x95 including 1px of padding on all sides, 69x93 of actual size

surreal knot
#

Oh okay

umbral zodiac
#

not 63, 69 but ya

torpid mantle
#

and the outer box was okay

#

the internal art looked all fucked up

umbral zodiac
#

yeha if you were using 63x93 then itd be wrong, its 69x93 when you dont include the padding

torpid mantle
#

69x93 looking even more fucked up tho?

#

maybe its the img im using as refernce

umbral zodiac
#

did you just stretch it out to be wider

torpid mantle
umbral zodiac
#

oh wait im sorry im a fucking idiot

wind steppe
#

is the default can_use behavior (involving max_highlighted) implemented in vanilla or smods

umbral zodiac
#

consumables have way more padding than jokers

rotund sable
#

i feel accomplished

umbral zodiac
#

yeah doxy that was my fault you were right about the resolution
on the spritesheet they take up 71x95 but their actual size (including padding) is 65x95

torpid mantle
umbral zodiac
#

this is a placeholder tarot as an example

torpid mantle
wind steppe
#

wtf is mod_num

slim ferry
#

i think thats supposed to be like an equivalent of min_highlighted?

wind steppe
#

no that's definitely max_highlighted

#

but it's not called that for some reason

slim ferry
#

i guess death just uses a wierd name for it

mossy orbit
#

I wonder if this definity is okay.

--[[ Flush Mansion ]]--
SMODS.PokerHand({
    key = 'flush_mansion',
    -- visible = false,
    mult = 28,
    chips = 240,
    l_mult = 8,
    l_chips = 80,
    above_hand = 'cpp_six_of_a_kind',
    example = {
        { 'S_J', true },
        { 'S_J', true },
        { 'S_J', true },
        { 'S_J', true },
        { 'S_4', true },
        { 'S_4', true },
    },
    evaluate = function(parts, hand)
        if #parts._4 < 1 or #parts._2 < 2 or not next(parts._flusher) then
            return {}
        end
        return { SMODS.merge_lists(parts._4, parts._2, parts.cpp_flusher) }
    end
})
#

With the flusher coming from:

SMODS.PokerHandPart({
    key = '_flusher',
    func = function(hand)
        return get_flusher(hand)
    end
})
#

Oh, looks like I don't need the _ at it is added to the poker hand part

knotty orchid
#

Can you create custom stickers (rental and so) on malverk?

mossy orbit
#

How to increase max number of played cards to six? D:

hybrid shadow
#

can i place an effect twice in the same return to have that effect happen twice in one go or will there be overrides happening if i do that

knotty orchid
#

I'm trying to

#

But I don't find the way

#

I've managed to create stake stickers

#

but not rental or perishable

slim ferry
#

uh try asking the malverk thread? im not too experienced with malverk

subtle merlin
mossy orbit
slim ferry
#

whenever you want to change it

mossy orbit
#

So I guess using:

SMODS.change_play_limit(6)
SMODS.change_discard_limit(6)

Is fine?

rocky plaza
mossy orbit
rocky plaza
mossy orbit
#

Yup yup

subtle merlin
slim ferry
rocky plaza
#

you'd have to hook the function that starts a run and do
SMODS.change_play_limit(1)
the number parameter is how much to increase th limit by

mossy orbit
ocean sinew
#

I made contexts manipulate

subtle merlin
jolly shadow
#

or card

rocky plaza
slim ferry
# hybrid shadow doing smth twice

for any scoring effects you can just add/multiply the values depending on what it is for the same effect, same with any money effects. though you could probably also use SMODS.merge_effects or whatever its called maybe

hybrid shadow
#

idk if thatll let it happen twice visually tho

slim ferry
#

you could use SMODS.calculate_effect multiple times instead then maybe?

hybrid shadow
#

maybe

mossy orbit
wind steppe
#

does anyone know what function passes loc_vars to the joker description

subtle merlin
rocky plaza
mossy orbit
mossy orbit
wind steppe
mossy orbit
subtle merlin
# mossy orbit

G.start_run hooks need (self, args), at least from what i gathered from another mod's hook of it

mossy orbit
#

Gotcha

rocky plaza
subtle merlin
#

oh, good to know

rocky plaza
faint yacht
#

If the increased selection limit is for a deck, do it in an event under apply of it instead.

subtle merlin
#

my only idea left as to what's wrong is that one of these variables don't exist in start_run

mossy orbit
#

Hmmmmm

subtle merlin
#

yep

#

G.hand doesn't exist in G.start_run

mossy orbit
#

mr_bones oh no

subtle merlin
#

maybe you can check other mods to see when they do it?

mossy orbit
#

I was checking it :/

subtle merlin
#

hold on, wait a second

#

i want you to try smth

#
local start_run_hook = G.start_run
function G:start_run(args)
  start_run_hook(args)
  SMODS.change_play_limit(1)
  SMODS.change_discard_limit(1)
end
mossy orbit
#

Okay uwu

subtle merlin
#

im trying to juggle 3 different things excuse me for fucking up once

slim ferry
#

its funny tho

mossy orbit
#

start_run_hook(args)

#

Let me pass the self this time

wind steppe
#
local start_run_hook = G.start_run
function G.start_run(self, args)
  ret = start_run_hook(self, args)
  SMODS.change_play_limit(1)
  SMODS.change_discard_limit(1)
  return ret
end
#

try that

mossy orbit
#

On it

#

Okay, game didn't crash at the start but

#

When I tried to pick the six card, it went oooof

#

But now it is a different error at my custom poker hand

red flower
#

shouldnt it be Game:start_run

mossy orbit
#

I dont see my cpp_flusher inside parts

red flower
mossy orbit
#

Okay, looks like I missed the mod prefix when using the parts inside the evaluate of my PokerHand

#

Oh wow, it works!

#

cat kiss gif

subtle merlin
mossy orbit
#

Wait a minute....

subtle merlin
mossy orbit
#

Why I can select 7 cards lol

mossy orbit
wind steppe
#

how do i implement a custom challenge rule?

subtle merlin
#

why does the hook i have (right) work on some jokers, but not others (left)? shouldn't it always set the joker to perishable no matter what?

mossy orbit
#

Well, I will keep the 7 discard and play card in the meantime as no clue why that happened. Thank you creature uwu

wind steppe
#

runner can't be perishable because it's a scaling joker so it doesn't get the sticker

subtle merlin
#

i see that now

#

-# what if, to be extra evil, i patched it to make an exception if this rule is active :3

mossy orbit
#

That would be too much evilness

slim ferry
subtle merlin
mossy orbit
#

Gotcha 🙂

subtle merlin
#

wait i could just do this lmao

#

My last issue before oaths are done:

For some reason, this doesn't destroy cards that have been played twice this ante, but idk why. I dont want to use SMODS.destroy_cards because that tends to mess things up when destroying playing cards
-# (before you may ask, yes this is in a calculate)

red flower
#

remove = true only works on context.destroy_card or context.discard

knotty orchid
#
      local create_args = {
        set = 'Joker',
        key = 'j_ina_Shadow',
        edition = 'e_negative',
        loc_vars = function(self, info_queue, center)
          return {
            key = 'j_ina_Shadow_clone',
            vars = {}
          }
        end
      }

      local _card = SMODS.create_card(create_args)

So the loc_vars attribute does not work here right?

red flower
#

no

knotty orchid
#

So Is there any way to change the text of the newly generated card?

red flower
#

it's your own joker so you can just put that in its own loc_vars and set a flag when you create it to use that key

knotty orchid
#

yeah I just figured it

#

hahaha

soft echo
#

how would one go about changing the background colors on the title screen

soft echo
#

oh hell yeah

#

thank you

#

making a mod themed around splatoon

willow scroll
#

how would a close a UI i created? i have a consumable that pops a ui up on use, and id like it to close after a button in the ui was clicked

willow scroll
rotund sable
#

G.FUNCS.exit_overlay_menu()

#

well at least the back button is usually bound to it

#

iirc

willow scroll
#

let me see

#

yup thanks

#

lingo in balatro is almost real

distant junco
#

yo im trying to make a tarot card to use my new enhacement. i know the enhancement works fine, but when i use the tarot to make the cards into that enhancement it crashes with this:

rotund sable
#

maybe the key is wrong

distant junco
#

shall i send the tarot and enhancement code?

rocky plaza
distant junco
#
-- Tarot Cards
SMODS.Consumable {
    key = 'miner',
    loc_txt = {
        name = {
            'Miner'
        },
        text = {
            "Enhances {C:attention}#1#{} selected",
            "card into a",
            "{C:attention}Diamond Card",
        }
    },
    set = 'Tarot',
    atlas = 'jam_tarot',
    pos = { x = 0, y = 0 },
    discovered = true,
    config = { max_highlighted = 3, mod_conv = 'jammbo_diamond' },
    loc_vars = function(self, info_queue, card)
        info_queue[#info_queue + 1] = G.P_CENTERS[card.ability.mod_conv]
        return { vars = { card.ability.max_highlighted, 'Diamond Card' } }
    end,
}

--Enhanced Cards
SMODS.Enhancement {
    key = 'diamond',
    loc_txt = {
        name = "Diamond Card",
        text = {
            "{X:chips,C:white} X#1# {} Mult",
            "while this card",
            "stays in hand",
        }
    },
    atlas = 'jam_enhancements',
    pos = { x = 0, y = 0 },
    config = { h_x_chips = 1.7 },
    loc_vars = function(self, info_queue, card)
        return { vars = { card.ability.h_x_chips } }
    end,
}

here ya go

rocky plaza
distant junco
#

yup

red flower
#

you're missing the m_

distant junco
#

where

red flower
#

the enhacement

distant junco
#

m_jammbo_diamond

red flower
#

yes

rocky plaza
distant junco
#

ahh okay

rocky plaza
#

yep

distant junco
#

so j for joker and m for enhancement and t for tarot got it

rocky plaza
#

should be the only thing

rocky plaza
distant junco
#

oh

rocky plaza
#

theres no t prefix for tarots

distant junco
#

close enough

short girder
#

^^

rocky plaza
#

planets, spectrals, and tarots all have a c_ as a prefix

red flower
subtle merlin
short girder
red flower
#

for what reason

short girder
#

That's what the joker does!

red flower
#

the joker is designed to crash the game?

#

or is adding one to extra supposed to do something

short girder
#

No uhm the joker is supposed to add 1 or subtract 1 to each of the joker's values

candid prism
#

does anyone just have like an example of an SMODS.deckskin the wiki just gives me a list and im very confused

red flower
#

the smods examples repo

red flower
# short girder No uhm the joker is supposed to add 1 or subtract 1 to each of the joker's value...

personally I wouldn't recommend adding to values indiscriminately but if you want to do it anyway you would need to first check if extra exists and it's a table, # won't work because extra is usually not integer-indexed so the length is 0 (it will crash if it's not a table as well)
then you need to iterate extra using pairs for the aforementioned reason and for each value in extra you need to check if it's a number and then add one to it

keep in mind most vanilla jokers and many modded jokers don't exclusively use extra to store values and not all values stored in extra are score related

modern kindle
#

its actually where i discovered joker had a base 1 for xmult and xchips

red flower
#

i think that's heresy personally

modern kindle
#

then make me a better way to do it smh

red flower
#

i believe modifying jokers values without consent is bad

modern kindle
#

they consent by the edition existing

red flower
#

im going to turn u polychrome

modern kindle
#

i would evolve

ocean sinew
short girder
#

Yes

ocean sinew
#

wouldn't it be -0.95

#

😈

short girder
real night
#
SMODS.Joker {
    key = "hermit_joker",
    config = { extra = { Xmult = 2, mult = 20 } },
    rarity = 1,
    atlas = "pok_jokers",
    pos = { x = 0, y = 0 },
    cost = 5,
    blueprint_compat = true,
    loc_vars = function(self, info_queue, card)
        return { vars = { card.ability.extra.Xmult, card.ability.extra.mult } }
    end,
    calculate = function(self, card, context)
        if context.joker_main and mult * card.ability.extra.Xmult <= ( card.ability.extra.mult * 2 ) then
            return {
                mult = card.ability.extra.Xmult
            }
        else
            return {
                mult = card.ability.extra.mult
            }
        end
    end,
}

this crashed when i selected the blind with a failed attempt to perform arithmetic on "mult" (or something like that), how do i fix this

red flower
ocean sinew
red flower
#

the reason modded is recommended to use extra is not to clash with the ability table

ocean sinew
#

you can restricts the values you're gonna increase by looping through the values in the config center when increasing vanilla joker values

clear ocean
#

a good friend is helping with the russian localisation and their translation of the mod name made me wonder if that is a possiblity or it is tied to the folder or metadata name

#

and if anyone is curious

red flower
#

idk if it affects the badge

clear ocean
#

the name = string,?

cursive gazelle
#

Ofc it’s a string

#

“Your voucher name”

clear ocean
#

i am talking about the mod name itself

#

any documention on G.PROFILES[G.SETTINGS.profile].career_stats?

cursive gazelle
#

Only thing i can think of is joyous springs

ornate meteor
#

ts was prolly asked up in chat but how do i get the custom joker names for my mod bc I got a whole ass table set up and it js aint loading

clear ocean
#

do you have a loc_txt table or a loc file of the language you use

cursive gazelle
#

J_modprefix_jokerkey

rotund sable
cursive gazelle
#

I have auto uppercase

#

Lol

clear ocean
#

do booster packs use a loc colour

rotund sable
clear ocean
#

red card has the attention/yellow colour but my voucher already has +1 as attention/yellow

cursive gazelle
#

Like for the background?

clear ocean
#

thinking on either keeping it the standard colour or maybe blue or red?

cursive gazelle
#

Oh you mean in the loc_txt

clear ocean
#

yeah

cursive gazelle
#

I think it’s depends on the booster type

clear ocean
#

yeah it is

cursive gazelle
#

I would just make it PURPLE

clear ocean
#

like maybe this is good enough

cursive gazelle
#

Good enough

subtle merlin
#

Okay so it crashes for some reason cool cool cool cool

cursive gazelle
#

It’s always like that

ornate meteor
#

i'm still very lost about making balatro mods but I'm js hoping ts works when I put it in the code

#

bad news chat it didn't work

#

i'm gonna kms and see if that fixes it

#

I think I put the code in wrong actually 1 sec

mossy orbit
ornate meteor
ornate meteor
mossy orbit
#

There is also a tutorial in YouTube

ornate meteor
#

every tutorial I look up tells me to change it in the game's files itself but I plan on sharing this mod and want the joker names to stick

#

if I change it in the game's files for myself then it will only apply to my game

mossy orbit
#

And make it shared as your mod

clear ocean
mossy orbit
#

How do I change the icon of the mod? Instead of a green jester, use my own png or something

red flower
mossy orbit
#

Thank you!

red flower
bold sleet
#

Hey, question: Is there a way to make so a button in a UI sends the user to the mod config page?

ornate meteor
red flower
clear ocean
#

thinking that a better way to improve the idea of the booster pack limit is instead have the second more expended one being where you can select or spawns another card so in a mega pack it can be either 3 of up to 5 or 2 of up to 6

ornate meteor
#

still ain't goin well but I think I'm getting somewhere?????

#

fucked my mod up so bad it ain't even load anything anymore I may be cooked gng 💔

#

ong I'm boutta js give up on the renaming part n js make ts a reskin mod

clear ocean
#

which one is more balanced

sturdy compass
#

The second one would be +1 choice instead of size btw

clear ocean
#

i know i am prototyping if i do the second

#

im asking which one is more balanced

#

if you want i could do one and then the other

sturdy compass
#

I think the size is more balanced ever so slightly because of more booster skipping opportunities on the choice one

#

But that's literally it

clear ocean
#

you have a point not fully sure how to do that

#

not even the other

#

looks like both are config/loc vars but is there a way to permanently edit those to increment by one

clear ocean
#

i think? like for example of a normal size you get four cards

red flower
#

in the next version of smods you just modify
G.GAME.modifiers.booster_choice_mod and G.GAME.modifiers.booster_size_mod

clear ocean
#

next version? 👀

red flower
#

yes

#

or download dev

#

but the next version should probably be out soon

clear ocean
#

thought about it and i think both can work, i'll leave their redeem function empty for now but thanks

zealous glen
#

I was wondering how to do it recently

zealous glen
#

I only wanted to change some specific ones ;P

clear ocean
#

pretty sure you can do an if statement for the kind of booster pack (either it would be a new kind of easy return or you can brute force with a for if contain loop) and THEN modify the booster

zealous glen
#

I mean I imagine it’s doable I’m curious how other people are doing it

red flower
clear ocean
compact valve
#

Build-Your-Own Joker

feral tree
#

any possible reason this isn't working? the png is 138 x 744 and the atlas is set to 138 x 186

clear ocean
feral tree
#

for some reason i can't change the soul pos of this joker specifically

#

okay wait i can

#

If the soul is at y2 then it changes, shows that post_joker is working but the set_sprite_post for joker_main and pre_joker aren't

#

what gives?

rotund sable
clear ocean
subtle merlin
#

we love hooks

clear ocean
# clear ocean

not sure if i did this right i skipped 12 booster packs and it hasn't updated maybe it needs to be a saved variable?

soft echo
#

can you change the logo thats on the title screen? if so how would i do that

azure valley
#

Does anyone have an example of inserting a stake between two vanilla stakes?

#

Previously asked: #💻・modding-dev message and #💻・modding-dev message without an answer.

I have the following code:

SMODS.Stake {
    name = "Silver Stake",
    key = "silver",
    applied_stakes = { "orange" },
    unlocked_stake = "gold",

    atlas = "Chips",
    pos = { x = 0, y = 0 },

    sticker_atlas = "Stickers",
    sticker_pos = { x = 1, y = 0 },

    modifiers = function()
        G.GAME.modifiers.enable_preorder = true
    end,
    colour = G.C.GREY,
    shiny = true,
    loc_txt = {},
    above_stake = "orange"
}

SMODS.Stake:take_ownership('gold', {
    name = "Gold Stake",
    key = "gold",
    applied_stakes = { "silver" },

    pos = { x = 2, y = 1 },
    sticker_pos = { x = 3, y = 1 },
    modifiers = function()
      G.GAME.modifiers.enable_rentals_in_shop = true
    end,
    colour = G.C.GOLD,
    shiny = true,
    loc_txt = {},
    above_stake = "silver"
  }
)

But it still shows up at the end of the list and does not unlock correctly.

#

I added orange stake to the above code to chain to the silver:

SMODS.Stake:take_ownership('orange', {
    name = "Orange Stake",
    key = "orange",
    unlocked_stake = "silver",
    applied_stakes = { "purple" },
    pos = { x = 1, y = 1 },
    sticker_pos = { x = 2, y = 1 },
    modifiers = function()
      G.GAME.modifiers.enable_perishables_in_shop = true
    end,
    colour = G.C.ORANGE,
    loc_txt = {},
  }
)

This changed the behavior I am experiencing. Now Gold Stake no longer works, (it tops out at Orange.)

sturdy compass
subtle merlin
#

would this be relevant?

#

that's what i used for mine to apply a vanilla stake and for it to be above gold

sturdy compass
#

Also, you do not have to recreate the entire stake object from scratch, you can remove everything that you didn't change

final jewel
#

context.identifier and context.identifier == 'soul'
is that checking if a soul is use

sturdy compass
#

no

#

context.identifier is primarily used with probability contexts

final jewel
#

oh ok

ornate meteor
#

js here checking in, still struggling w/ getting the text implemented (The 2 examples and all the helpful replies did nothing asides from break my mod and make me recode half of it < / 3)

final jewel
sturdy compass
#

if context.using_consumeable and context.consumeable.config.center.key == 'c_soul' then

ornate meteor
#

Astra has Hot Potato begun

sturdy compass
ornate meteor
#

I guess we'll never know

sturdy compass
vernal path
#

Okay, i must be stupit: why cant it find this enhancement center:
scored_card:set_ability('mode_m_flesh_zygote', nil, true)

SMODS.Enhancement { -- Zygote
    key = 'flesh_zygote',```
#

mod key is mode

red flower
#

m goes first

vernal path
#

i am stupit

faint harbor
#

this code makes all the cards in the deck lucky cards, how do I change it to only apply to specific ranks like aces or face cards?

for i = #G.playing_cards, 1, -1 do
  G.playing_cards[i]:set_ability(G.P_CENTERS.m_lucky)
end
gray void
vernal path
#

I thought, after reading the enhancement wiki that this should work, but it doesn't appear to? Am I misinterpreting x_mult?

SMODS.Enhancement { -- Smooth
    key = 'flesh_smooth',
    pos = { x = 3, y = 0 },
    atlas = "ModeEnhancements",
    config = { x_mult = 1.75},
    replace_base_card = true,
    no_rank = true,
    no_suit = true,
    always_scores = true,
    loc_vars = function(self, info_queue, card)
        return { vars = { card.ability.x_mult}}
    end,
}```
azure valley
ornate meteor
#

yo gng I think I've tracked down the issue of my mod not loading the custom text for the jokers but js wanna check with ppl who know how to do ts stuff
right after alt_texture I put Joker because that's the same thing as the key = "Joker" but idk if that's right

azure valley
sturdy compass
#

correct

#

There's a good example of it on the wiki

ornate meteor
#

Im js gonna keep brute forcing it ig i'll check back in later

ornate meteor
#

it works gng dw

sturdy compass
#

Please use VSCode 😭

ornate meteor
#

the postal service

#

????

manic rune
ornate meteor
#

gng it WORKS DW

manic rune
#

nah but on a serious note, using visual studio code is much more efficient than notepad lol

#

theres, really no reason why you gotta torture yourself like this 😭

sturdy compass
#

It does work, but it doesn't work well

manic rune
#

just because it works doesnt mean you should

ornate meteor
#

guys i looked up vscode and now my discord is grey what curse have ye layed upon me

manic rune
#

-# is discord not gray

sturdy compass
#

wtf 😭

ornate meteor
#

im back

manic rune
#

am i colorblind

ornate meteor
#

it was like full screen grey

#

like i could nae see jack shite lad

manic rune
#

oh

#

lol

#

yeah that usually happens to me when my pc gets really laggy lol

ornate meteor
#

i thought it happened again but no vscode just has the worst website background ever I think I just hit two frames per second

crystal perch
#

btw i'm retriggering it through a "red joker seal"

#

this also happens when i try to retrigger it through other modded avenues, such as "the normal joker" from paperback mod (which retriggers all common jokers)

final jewel
#

How do I prevent this like I want my consumable to be rare in my packs but I don't want them to spawn in spectral pack

crystal perch
#

so likely soul_set = 'Giga_Food'

final jewel
#

do I remode the hidden = true

crystal perch
#

no need

final jewel
crystal perch
#

yeah

final jewel
#

thx

frosty rampart
#

soul_set consumables can still appear in spectral packs (e.g. The Soul is soul_set to Tarot packs)

ornate meteor
#

i got vscode but i don't think it rlly mattered because even after moving my text into the right file it still ain't workin < / 3

crystal perch
#

if they're part of the same set it should be fine?

frosty rampart
#

actually yea you're prob right

final jewel
#

I'll test it out for seeing who's right

#

I oppened thes same pack that I my consumable and it didn't appear in it

#

so thx

crystal perch
#

very cool

ornate meteor
#

at ts point im js figuring ts out on my own but this is tripping me up is it supposed to be this or nah

crystal perch
#

it should just be

descriptions = {
  Joker = {
    j_textestingmod_joker = {
ornate meteor
#

ah

#

thank you

#

js to make sure the text + { "Description placeholder..." } part being in {} is not the issue?

crystal perch
#

no that's how it should be

ornate meteor
#

alr thx gng < 3

#

still not loading, I will figure this out before it makes me kill myself thank you for the help

ornate meteor
#

here's the main.lua it may b a lil autistic but i love it all the same

#

edward i dropped me feckin main respond lad

jolly shadow
#

i can't help u I just told u to post it so someone could

#

I'm off my pc for the night

ornate meteor
#

💔

#

honestly same here I'm kinda tired of balatro modding for tnight

spice wadi
#

What's the problem

ornate meteor
#

me mod text is nae loadin in lad

#

i cannae get it ta work i been swappin around statements n shite all night

spice wadi
#

Can you show the localisation file

#

And maybe the metadata file

#

As well as what's showing ingame

ornate meteor
#

it's just showing the base balatro names and descriptions in game

#

this is the localisation file

celest aspen
#

Ayone know if its possible to have a joker cost money to sell? I see people a few months back used card.sell_cost but I keep getting crashes when using it. Do I just put into the calculate function or is there something specific I need to do beforehand?

spice wadi
#

Are you trying to change vanilla jokers?

ornate meteor
#

yes

#

i am

#

i know literally nothing about code btw

spice wadi
#

Okay well you should probably learn the basics

ornate meteor
#

i have frankensteined 30 guides, 30 of which were useless, together with like 2.5 mods

#

and this came out

#

istg if I spent 2 days tryna make ts work and it's been doing nothing this whole time I'm gonna crash out so hard mao zhedong will cry himself to sleep in his grave

spice wadi
jolly shadow
#

Joker

#

no s

spice wadi
ornate meteor
#

hey that was the same fix for when my main.lua wasn't loading my image files

#

I had Jokers instead of Joker

spice wadi
#

You should only do what when changing vanilla content btw

#

When making custom content you should generally make an atlas with a different name

ornate meteor
#

imma head to bed and get back to switching stuff around in the morning

#

gn gng

vernal path
#

This enhancement is supposed to give +12 Mult before cards are scored, but it does nothing instead. I know scoring is a little different for enhancements, did I do something wrong here? lua SMODS.Enhancement { -- Fat key = 'flesh_fat', pos = { x = 4, y = 0 }, atlas = "ModeEnhancements", config = { extra = { mult = 12}}, replace_base_card = true, no_rank = true, no_suit = true, always_scores = true, loc_vars = function(self, info_queue, card) return { vars = { card.ability.extra.mult}} end, calculate = function (self, card, context) if context.initial_scoring_step and context.cardarea == G.hand then return { mult = card.ability.extra.mult} end end }

glass scaffold
vernal path
#

No but context.before specifically happens before scoring, and clears all the scoring stuff when scoring happens. I mean, i can try it, but its literally why context.initial_scoring_step exists

#

It also does nothing

glass scaffold
vernal path
#

I'm well aware of the calculate functions here. I tested it with a print and it's not even passing the if statement.

#

Oh, it was because it was in G.hand, not G.play

hybrid shadow
#

G.hand moment

vernal path
#

this truly is a G.hand moment

faint yacht
#

context.initial_scoring_step was made for doing stuff to Chips and Mult before the actual scoring begins, whilst context.before is for checking the hand, modifying cards, etc iirc.

#

This triggers on that context.

vernal path
#

unbalances!? alpharadLOL

faint yacht
#

Adds the two values together, then rolls for % of it to go to Chips and the rest to Mult.

#

So 35 x 4 can become 39 x 1... or 1 x 39.

timid zinc
#

What's the easiest way to go from rarity (number) to rarity (string)?

#

a.k.a i am trying to get the rarity from a joker using joker.config.center.rarity and pass that into SMODS.add_card

#

When I tried passing a number into that, it only would create Rares

#

I know I can define a numbered table with the number being an index to a string but honestly i would prefer not to because it'll not support custom rarities

celest aspen
#

Hey Thermo I saw you talk about changing sell cost. I have this snippet that I think should work but idk. Where exactly should this be put? Should I put it in the calculate function or is there a specific function that would handle it? (Im unfamiliar how to format code on discord and I dont wanna spam with a huge wall of unformatted text )

vernal path
#

You can put it wherever you want, although I suggest either putting it directly near the joker or with other hooks in a utilities file. It shouldn't be in an object definition, though, so keep it out of a SMODS.Joker {}

#

also, for formatting code you can place it in between ``` code ```, which works in multiple lines, and you can put a code language after the first one, like:
```lua
code
```

glass scaffold
#

Is there a way to change the values displayed on a Joker if a certain Joker is held?

gleaming crescent
stiff locust
#

there's a variable system for loc_vars but i've only used it for color
you don't really need to use it for this though, you can just change the values that are returned by loc_vars

glass scaffold
#

This is PROBABLY not gonna work, but let's try it.

celest aspen
gleaming crescent
glass scaffold
#

(That disc needs to double the values shown cosmetically.)

gleaming crescent
#

Ok

stiff locust
glass scaffold
stiff locust
#

do you own the mod that the disc is from

glass scaffold
#

The Jokers are from Wildcard Collection, while the discs are from Wildcards' Music

stiff locust
#

if not i'm pretty sure you can take_ownership of the disc anyway as a modded object and add the add_to_deck in that way, assuming said disc doesn't already use an add_to_deck
(if it does use an add_to_deck, you can take_ownership and overwrite its add_to_deck with the same one + your extra code)

glass scaffold
stiff locust
#

they're very easy i'll run you through it

#

add_to_deck is like the calculate function

#

but it uses self, card, from_debuff instead of self, card, context

#

it runs 1 time whenever the joker is added to your joker slots, or undebuffed
(you can make it not trigger when undebuffed by checking if not from_debuff

#

it has an accompanying function remove_from_deck which is identical, but it runs when the joker is debuffed or removed from your joker slots

glass scaffold
#

So is there a way to have the Wildcard Music mod do all this or do I need additional code inside WC Collection?

stiff locust
#

the disc can do all of the code itself yeah

glass scaffold
#

Thank GOD

stiff locust
#

during the disc's add_to_deck, iterate over your joker slots (for index, value in ipairs(G.jokers.cards) do)

#

check if value is the joker whose effects need to double
double its effects and add value.ability.modprefix_doubled = true
do not double it if the joker already has that flag, to prevent the doubles stacking

#

and then do the inverse during remove_from_deck

stiff locust
#

in its own add_to_deck, it should check if the disc exists and double its own values and add value.ability.modprefix_doubled = true to itself there

#

but it doesn't have to do anything in remove_from_deck

#

that should make it so

  1. when the disc is added to deck, it doubles all the values of the joker that needs to be doubled
  2. when the disc is removed from your deck, it halves the values that it doubled
  3. if the other joker is added to your deck after the disc, it will still double its own values
#

i think that covers all bases?

glass scaffold
#
        for k, v in pairs(G.jokers.cards) do
            if (something to find the Joker) = (modded joker key here) then
                
            end
        end
    end,```

Ok, here's all I definitely know so far.
#

now how would I go through and check for the Joker matching the exact one?

wispy falcon
#

How do I use blocking and blockable from G.E_MANAGER:add_event(Event({})) to stop the scoring hand to wait for something to finish happening? And how do I continue the scoring hand?

rancid kindle
#

hey, how do you change the number of hands or discards with a joker

Example: Merry Andy.... Merry Andy......

glass scaffold
rancid kindle
#

thank you!

Speaking of, where does one find the code for the base game jokers? I extracted balatro but couldn't find hwere

glass scaffold
rancid kindle
#

epic! thank you

glass scaffold
#

Needing some help. How do I:

find a specific Joker with this loop
double the values of the Joker from a completely different mod?

for k, v in pairs(G.jokers.cards) do
            if (something to find the Joker) = "j_WCCO_common_arya" then
                -- code to double the values
                value.ability.modprefix_doubled = true
            end
        end
    end```
blazing helm
#

is these a way to use a specific hex code for the color attribute? if not what colors are available?

blazing helm
blazing helm
#

oh?

glass scaffold
manic rune
#
local loc_colour_ref = loc_colour
function loc_colour(_c, _default)
    if not G.ARGS.LOC_COLOURS then
        loc_colour_ref()
    end

    G.ARGS.LOC_COLOURS["idk"] = HEX("something")

    return loc_colour_ref(_c, _default)
end
manic rune
#

this makes it so {C:idk} should use your new color

rotund sable
blazing helm
#

ah ok thx <3

manic rune
rotund sable
#

I agree but if they want just one time off it's also nice to mention the V: tag

manic rune
#

mhm

blazing helm
#

yay pink :D thx for the help

manic rune
#

the event should already stop the scoring hand by default if your timing is correct

#

aka context.before or something similar

blazing helm
#

new question, whats the id of Overstock? i thought it would be 'v_overstock' but the game crashes when i use that :/

blazing helm
#

ahh i see, weird inconsistency but ok. thx

gleaming crescent
#

Do I really have to use lovely patches to make alt variants for regular blinds?

molten relic
#

what do i do to remove this crash

#

it appears once i open my custom boosterpack

glass scaffold
molten relic
#
    key = 'p_bali_itempack1',
    loc_txt = {
        ['name'] = 'Item Pack',
        ['text'] = {
            "Choose {C:attention}1{} out of {C:attention}3{} {C:gold}Item Cards{}"
        }
    },
    atlas = 'customBoosters',
    pos = {
        x = 0,
        y = 0
    },
    config = {
        extra = 3,
        choose = 1
    },
    pools = {
        ["bali_itempool"] = true
    },
    discovered = false,
    draw_hand = false,
    group_key = "bali_itempacks",
    cost = 4,
}     ```
molten relic
manic rune
glass scaffold
rotund sable
molten relic
#

could you explain

wispy falcon
manic rune
#

huh

rotund sable
manic rune
#

i dont think you need an event there, then?

#

try G.SETTINGS.paused = true

#

that should pause the scoring animation until you set it to false

rotund sable
#

I think you meant to use

create_card = function(self, card)
     ...
 end,
wispy falcon
rotund sable
manic rune
#

and set it to false after the video ends

wispy falcon
manic rune
#

no

#

that literally does nothing lmao

#

it will stop pausing the game immediately after the ui is created

rotund sable
wispy falcon
#

Where do I put it then?

rotund sable
#

It unpauses automatically

#

Should

molten relic
wispy falcon
rotund sable
molten relic
#

oh okay

rotund sable
gleaming crescent
#

How to add a non-boss blind?

wispy falcon
rotund sable
#

Probably the function you're calling then

#

I created UI using

    G.SETTINGS.paused = true
    G.FUNCS.overlay_menu{
        definition = EF.FUNCS.UIDEF.minesweeper_score(),
    }

And it worked fine

wispy falcon
molten relic
#

can i replace Joker in set = "Joker" which the key to an object type of my own?

rotund sable
#

I think so

molten relic
#

ill try

#

THERES A BOOSTER PACK IN MY BOOSTER PACK

#

<@&1133519078540185692>

rotund sable
wispy falcon
#

Can someone else help me with that error?

molten relic
#
        return {
            set = "bali_itempool", area = G.pack_cards, skip_materialize = true, soulable = true, key_append = "bali"
        }
  end,```
rotund sable
molten relic
#

yes

#

all my custom jokers

wispy falcon
gleaming crescent
#

This code looks way too complicated

rotund sable
#

Does video even work in sprites?

molten relic
#
    key = 'bali_itempool',
    cards = {
        ['j_bali_sadonion'] = true,
        ['j_bali_innereye'] = true,
        ['j_bali_spoonbender'] = true,
        ['j_bali_cricketshead'] = true,
        ['j_bali_myreflection'] = true,
        ['j_bali_numberone'] = true,
        ['j_bali_bloodmartyr'] = true,
        ['j_bali_brotherbob'] = true,
        ['j_bali_skatole'] = true,
        ['j_bali_haloflies'] = true,
        ['j_bali_magicmush'] = true,
        ['j_bali_thevirus'] = true,
        ['j_bali_roidrage'] = true,
        ['j_bali_heart'] = true,
        ['j_bali_rawliver'] = true,
        ['j_bali_skelekey'] = true,
        ['j_bali_dollar'] = true,
        ['j_bali_boom'] = true,
        ['j_bali_trans'] = true,
        ['j_bali_compass'] = true,
        ['j_bali_lunch'] = true,
        ['j_bali_dinner'] = true,
        ['j_bali_dessert'] = true,
        ['j_bali_breakfast'] = true,
        ['j_bali_rotten'] = true,
        ['j_bali_woodenspoon'] = true
    },
rotund sable
molten relic
#

this is my objecttype

wispy falcon
gleaming crescent
rotund sable
gleaming crescent
wispy falcon
molten relic
gleaming crescent
#

I think it's due to how Balatro's UI works

wispy falcon
gleaming crescent
#

You're trying to insert love ui into balatro ui and i'm not sure they are compatible

molten relic
rotund sable
wispy falcon
rotund sable
#

Yeah

molten relic
#

ill try

#

how do i type something into that thingy

gleaming crescent
rotund sable
#

I think paste also works

molten relic
molten relic
rotund sable
#

-# No idea

molten relic
gleaming crescent
# wispy falcon Did

Uhh, It says that G.GAME.hands.<played hand> is somehow equal to nil and I'm not sure why this even happened

wispy falcon
#

Wtf

gleaming crescent
#

Idk

wispy falcon
#

<_>

rotund sable
mystic river
rotund sable
#

That's just a default I think

molten relic
#

but its not bad?

#

so what am i doing wrong 😭

rotund sable
#

It's just the fact that the modprefix is not present

#

That's the default

gleaming crescent
rotund sable
# molten relic so what am i doing wrong 😭

Did you look at the link I sent?
Basically everyone is using

SMODS.ObjectType({
        key = "Food",
        default = "j_reserved_parking",
        cards = {},
        inject = function(self)
                SMODS.ObjectType.inject(self)
                -- insert base game food jokers
                self:inject_card(G.P_CENTERS.j_gros_michel)

        end,
})
wispy falcon
manic rune
gleaming crescent
#

Nah, I just did a little logical-thinking stuff

manic rune
#

and besides, using an event to do this also doesnt really prevent other blockable = false events from running too

gleaming crescent
#

Maybe the timings are off

#

Probably, try to put G.SETTINGS.paused = true somewhere else

manic rune
#

im guessing you want to add G.SETTINGS.paused = true within the ui's code itself

#

since there might be stuff that runs on events in the ui's code

#

and since you are pausing the game before creating the ui, they dont run?

wispy falcon
#

So where in my code?

gleaming crescent
manic rune
#

maybe its because pausing during scoring animation causes it to crash, idk

pastel kernel
#

How do I make it so that an object spawns any joker but it cannot spawn jokers from a specific rarity? (Say it can’t spawn any from the common category but it spawns any from the exotic category)

manic rune
#

you can probably try moving the line to here instead

gleaming crescent
manic rune
#

-# though i kinda doubt thats the problem

manic rune
gleaming crescent
manic rune
#

i think pausing the game doesnt stop those functions from running, bleg

#

maybe try using an event with G.SETTINGS.paused = true in it?

#

hopefully that works

wispy falcon
manic rune
#

event with that in the func

gleaming crescent
molten relic
wispy falcon
manic rune
#

mhm

gleaming crescent
manic rune
#

oh yeah, that too

wispy falcon
#

And I put that in the if statement?

wispy falcon
manic rune
#

if my guess is right it should allow the functions to run first before pausing the game, which shouldnt crash anymore

manic rune
wispy falcon
#

IT WORKS

#

THANK YOU BOTH

gleaming crescent
#

Why the hell would SMODS add an option to make a blind non-boss if it wouldn't even work that way

cursive gazelle
molten relic
#

@rotund sable

        key = "Passive Items",
        default = "j_bali_breakfast",
        cards = {},
        inject = function(self)
            SMODS.ObjectType.inject(self)
                self:inject_card(G.P_CENTERS.j_bali_sadonion)
                self:inject_card(G.P_CENTERS.j_bali_innereye)
                self:inject_card(G.P_CENTERS.j_bali_spoonbender)
                self:inject_card(G.P_CENTERS.j_bali_cricketshead)
                self:inject_card(G.P_CENTERS.j_bali_myreflection)
                self:inject_card(G.P_CENTERS.j_bali_numberone)
                self:inject_card(G.P_CENTERS.j_bali_bloodmartyr)
                self:inject_card(G.P_CENTERS.j_bali_brotherbob)
                self:inject_card(G.P_CENTERS.j_bali_skatole)
                self:inject_card(G.P_CENTERS.j_bali_haloflies)
                self:inject_card(G.P_CENTERS.j_bali_magicmush)
                self:inject_card(G.P_CENTERS.j_bali_thevirus)
                self:inject_card(G.P_CENTERS.j_bali_roidrage)
                self:inject_card(G.P_CENTERS.j_bali_heart)
                self:inject_card(G.P_CENTERS.j_bali_rawliver)
                self:inject_card(G.P_CENTERS.j_bali_skelekey)
                self:inject_card(G.P_CENTERS.j_bali_dollar)
                self:inject_card(G.P_CENTERS.j_bali_boom)
                self:inject_card(G.P_CENTERS.j_bali_trans)
                self:inject_card(G.P_CENTERS.j_bali_compass)
                self:inject_card(G.P_CENTERS.j_bali_lunch)
                self:inject_card(G.P_CENTERS.j_bali_dinner)
                self:inject_card(G.P_CENTERS.j_bali_dessert)
                self:inject_card(G.P_CENTERS.j_bali_breakfast)
                self:inject_card(G.P_CENTERS.j_bali_rotten)
                self:inject_card(G.P_CENTERS.j_bali_spoon)
        end,
})```
#

is this good

rotund sable
#

Looks ok

#

But are the jokers loaded before the object type

molten relic
#

should i put the code for the jokers before the object type?

rotund sable
#

...

#

Probably

#

At least I assume so

molten relic
#

it crashes

rotund sable
#

Did you move the joker code before the object type

#

Or object type after the joker code

wispy falcon
#

In what contexts do G.STATES.GAME_OVER = true and G.STATE_COMPLETE = false work?

tropic hawk
#

ok since i want to art where are the templates for just a joker card but not like buried in a thread

languid canopy
#

hello hi, how do i make so when a specific joker is in possession, a custom music plays ?

tropic hawk
gleaming crescent
cursive gazelle
#

There’s no context like that

slim ferry
#

you should be able to do it anywhere since it just ends the run

#

idk why there would be a context where forcing a game over wouldnt work

cursive gazelle
#

Should work anywhere

wispy falcon
slim ferry
#

how did you come to that conclusion

#

also it doesnt matter what object it is they all use the same contexts

#

if its a blind or not doesnt matter

wispy falcon
#

I tried some stuff the other day and it didn't work

slim ferry
#

what context did you use

red flower
#

changing states in the middle of scoring might not work because it probably gets changed immediately after

cursive gazelle
#

Try doing context.after maybe

wispy falcon
ebon shell
#

when I refer to a custom enhancement do I need to add that m_ like the game does with m_glass or m_steel or can it just be modprefix_enhancement?

slim ferry
#

m_modprefix_enhancement

cursive gazelle
wispy falcon
cursive gazelle
#

After context

wispy falcon
#

For what?

cursive gazelle
wispy falcon
#

Wait, what do you mean by event? I feel like I'm not understanding this right

cursive gazelle
#

Thanks eris

wispy falcon
#

Okay, so i am understanding this right. Why do I need to put an event there?

cursive gazelle
#

Changing game state is an event

red flower
#

not really

#

the reason you want an event is for it to happen after all the scoring animations

cursive gazelle
#

Whatever boss it works

wispy falcon
#

So I write it in the function of the Event?

cursive gazelle
#

Yes

wispy falcon
#

This doesn't do anything in my calculate (RNGesus is my pseudorandom)

            if RNGesus == 3 then
                G.E_MANAGER:add_event(Event({
                func = function()
                    G.STATES.GAME_OVER = true
                    G.STATE_COMPLETE = false
                    return true
                end
            }))
            end
        end```
carmine kiln
#

i have a question:
i have created some jokers for my mod and can see them ingame,
why is the Textbox blank for the Joker, even if i have inputted text for it in a localization file?

wispy falcon
cursive gazelle
carmine kiln
#

SMODS.Joker{ key = 'hammah', rarity = 2, eternal_compat = false, perishable_compat = false, atlas = 'Jokers', pos = {x = 3,y = 0}, unlocked = true, config = { extra = { odds = 3 } }, }
do you mean the code for the joker or localization?

wispy falcon
#

Localization

carmine kiln
#

here ye go

wispy falcon
#

I think you're missing a } if I'm seeing that right

carmine kiln
#

well i added a s to despriction didn't work.
imma look which } is missin

cursive gazelle
#

Is missing a }

#

Wait no

wispy falcon
#

No, hammah's text is missing one

#

Like after the text

cursive gazelle
#

Oh

#

Got it

daring heron
#

would like to make a mod again sometime but like

cursive gazelle
#

Yo see

#

Your hammer text

daring heron
#

i just have absolutely no ideas 😭

cursive gazelle
#

Is missing a ,

#

To end the table

carmine kiln
#

ah

cursive gazelle
#

Wait i’ll fix it

#

Can you send the code ?

#
return {
    description = {
        Joker = {
            j_km_thatcher_effect = {
                name = 'Thatcher Effect',
                text = {
                    "This Joker gains",
                    "(X:mult,C:white) X#1# {} Mult every time", -- [[0.1]]--
                    "when {C:attention} #2# {} is discarded",
                    "face-rank changes every round",
                    "{C:inactive}(Currently {X:mult,C:white} X#3# {C:inactive} Mult)"
                }
            },

            j_km_tax_collector_bones = {
                name = 'Tax-Collector Bones',
                text = {
                    "Prevents Death",
                    "if Money in bank",
                    "is at least {C:attention}Dollar per Percent",
                    "of the amount that is missing for the required chips",
                    "{$:1.1,C:red,E:2}self destructs and taxes thy tried death()."
                }
            },

            j_km_fatal_curtain = {
                name = 'Fatal Curtain',
                text = {
                    "Retrigger all",
                    "played {C:attention}face{} cards",
                    "and destroy them afterwards."
                }
            },

            j_km_hammah = {
                name = 'Smithing Hammer',
                text = {
                    "If a {C:attention}steel{} card is played",
                    "{C:green}#1# in #2# {} chance to",
                    "upgrade level of",
                    "played {C:attention}poker hand()"
                }
            }
        }
    }
}```
#

Nvm got it

carmine kiln
cursive gazelle
carmine kiln
#

well i know that if a bracket was missin the game just goes crashin

cursive gazelle
#

It’s just cooked

#

I hate lua

carmine kiln
#

wait... is there a code needed to connect the mod's localization with the mod itself?

cursive gazelle
#

No it’s automatically set

#

Just like the modicon

red cradle
#

how can i destroy random card in full deck?

carmine kiln
#

it would be stupidly funny if i misstyped my mod's prefix

#

guess what

#

that was it

red cradle
#

lol

carmine kiln
#

i had my prefix in uppercase not lowercase. Lmao problem solved

candid elbow
#

And context.remove i think

red cradle
#

oh

#

thanks

candid elbow
#

(I may be stupid)

red cradle
#

you mean context.destroy_card or what?

candid elbow
#

Use the removal function hanged man uses

#

Check vanilla remade

slim ferry
#

also math.random doesnt take arguments from what i know

candid elbow
#

Why

#

What

slim ferry
#

because

#

seeds

candid elbow
#

I love planting seeds

slim ferry
#

if you use math.random the outcome will change

#

every time you play the same seed

#

also math.random is just a random float from 0-1

candid elbow
#

OHHHHH

candid elbow
slim ferry
#

no

candid elbow
#

It does tho

slim ferry
#

what do they do tho

#

also in this case you can just do pseudorandom_element since G.playing_cards is a table

red cradle
#

I didn't understand anything)

wispy falcon
#

Why does it only do my print? I don't get it...

            if RNGesus == 3 then
                G.E_MANAGER:add_event(Event({
                    func = function()
                        print("EVENT is happening!")
                        G.STATES.GAME_OVER = true
                        G.STATE_COMPLETE = false
                        return true
                    end
                }))
            end
        end```
red flower
slim ferry
# red cradle I didn't understand anything)
local card = pseudorandom_element(G.playing_cards, "idk whatever you want this is just a seed")
card:start_dissolve()

this should work for destroying a random card i think

red cradle
#

and why i cant just use math.random?

slim ferry
#

you can but that will make it be independent from the run seed

wispy falcon
slim ferry
#

so running the same seed will have a different outcome each time

#

i think thats the difference

red flower
red cradle
candid elbow
wispy falcon
red flower
#

why the effort to recreate what pseudorandom already does lol

candid elbow
#

[all i know is C++]

slim ferry
#

will anything bad happen if a global mod calculate exists in an smods version that doesnt support it or will it just do nothing

candid elbow
#

It would be so cool if someone made an smods fork and made it like 10 times better

red flower
# wispy falcon Nothing either

ok last idea, go back to context.after and do this

G.E_MANAGER:add_event(Event({
    blocking = false,
    func = function()
        if G.STATE == G.STATES.SELECTING_HAND then
            -- your code here
            return true
        end
    end
}))
candid elbow
#

Idk i’m just being silly

candid elbow
#

-<

slim ferry
#

nice

candid elbow
#

Idk anything about coding i’m here for the vibes

#

And to spread misinformation

red flower
#

youre in a bad place for the vibes

candid elbow
#

I like the vibes here

wispy falcon
dreamy basin
#

Hello! I'm new here and it's been two months I've been playing Balatro on mobile. But recently I really wanted to start playing mod to see new things.
After a bit of thinking I really have a lot of jokers and consumables ideas so I want to try coding some mods. I have one precise idea of a first thing to do but I don't know a thing about modding (I don't even have the PC version yet) so I'm here to ask if anyone want to help me with modding and codding :D

red cradle
#

you need C

#

PC*

solid mesa
dreamy basin
red cradle
#

Its my PC problem lol

dreamy basin
solid mesa
red cradle
dreamy basin
#

Sorry I'm not great at explaning (and I'm french so excuse my bad english)

solid mesa
dreamy basin
solid mesa
red cradle
#

whats the difference between chat and dev?

solid mesa
#

here is just code

red cradle
#

but we chat here)

solid mesa
#

another big difference:
chat is just to talk about problem with mods
here is to talk a problem with your mod

red cradle
#

Ok im just kidding

solid mesa
slim ferry
#

chat is just better game chat

solid mesa
#

like

red cradle
solid mesa
#

the words

#

when you can read tem

#

like

red cradle
#

omg

slim ferry
#

modding chat is just a better version of server chat because the people there are awesomer

solid mesa
red cradle
#

another question: how can i check for using for exemple Death card. I know about context.consumeable.ability.set but still dont know how to check for certain cards

solid mesa
#

wdym, like check when the card is used?

red cradle
#

yes

solid mesa
#

idk

#

the other day i tried to make a fool for spectrals and have a stroke with the code

slim ferry
slim ferry
#

oh no

#

its

#

consumeable

#

not other_card

red cradle
#

i see

wispy falcon
slim ferry
#

why wouldnt it work

#

its code

#

thats being run

#

why would it be different in a blind

wispy falcon
#

Every time I tried it, it just got 'skipped', like it was not there

slim ferry
#

i mean okay but then thats an issue with the code not with it being a blind

wispy falcon
#

Okay

#

What can I do about that?

slim ferry
#

well i know that getting a game over during scoring isnt possible since scoring has to play out first

#

but besides that

#

uh idk

wispy falcon
#

I tried every context that's in a blind and not something with scoring and it doesn't game over

red cradle
#

game over never comes 😣

red flower
#

wait also it's not G.STATES.GAME_OVER = true

#

lol

#

it's G.STATE = G.STATES.GAME_OVER

carmine kiln
#

if i want to make a joker, that does it's action with a specific face card, and the face card needed changes every round.
i need to add a own randomizer for that, right?

wispy falcon
#

And I feel so stupid now but thank you xD

tropic hawk
#

my first joker

#

thoughts?

#

excuse the art please

#

im just starting

#

btw hand size is over 7

#

it cut that off

wispy falcon
#

Interesting but sounds too strong if you're trying to keep it balanced

tropic hawk
#

well

#

im not

modern kindle
#

Good schmorning chat

tropic hawk
#

its kinda meant to be crazy

#

just

#

not cryptid

#

but not

#

vanilla

wispy falcon
tropic hawk
modern kindle
#

Hello

wispy falcon
#

I wasted hours trying to find the error in my code, only to find out I used G.STATES.GAME_OVER = true instead of G.STATE = G.STATES.GAME_OVER

#

I blame the heat!