#💻・modding-dev

1 messages · Page 151 of 1

frosty dock
#

oh, i saw your message earlier but forgot about it, sorry jimbo_spin

#

what i would do is card.edition and card.edition.key == 'e_negative'

minor gyro
#

but I'm trying to use a for loop... shouldn't I? every time I use a for loop somebody tells me I wasn't supposed to do that

#

I think everything u want to see would be here

orchid thunder
#

how can i check if a joker ina for loop is a certin joker

frosty dock
orchid thunder
#

like if G.jokers.cards[i] == (joker) then

minor gyro
#

I want to check how many, cuz it's supposed to add 5 mult per negative joker

orchid thunder
#

i tried puting key but it crashed

frosty dock
#

yeah no you do use a for loop for that

orchid thunder
#

no i have a for loop but i need it to not do it for that joker

#

but every other joker

frosty dock
#
local negatives = 0
for _,v in ipairs(G.jokers.cards) do
  if v.edition and v.edition.key == 'e_negative' then negatives = negatives + 1 end
end
minor gyro
frosty dock
orchid thunder
#

oh

minor gyro
#

i'll try that

orchid thunder
#

that was very inconveniant of me

frosty dock
frosty dock
#

the thunk way is v.edition.negative as opposed to the v.edition.key == 'e_negative' i said before

#

which is discouraged in terms of modded

orchid thunder
frosty dock
#

ok nvm

orchid thunder
#

it was lierly just
if G.jokers.cards == j_(joker key) then
do stuff
end

frosty dock
#

if you literally mean j_(joker here), that seems wrong

#

I'd do like if G.jokers.cards[i].config.center.key == 'j_(joker_key)' if that's what you mean

orchid thunder
frosty dock
#

uh can you show me what you did

gritty dirge
#

yeah, was doing that because i was originally just planning on making it a direct injection and tried to make it a mod in a short time while waiting for some more assets in case some dont like the direct injection method, so i winged it a bit too much probably in wait to short of a time

orchid thunder
gritty dirge
#

you´re a goddamn saint 🙏

frosty dock
orchid thunder
frosty dock
#

this is comparing not G.jokers.cards[i] (probably false) to an undefined global (probably nil)

gritty dirge
#

i was fully ready to just shelf making it a modloader compatible mod for now for time constraint reasons and make a V2 way later

minor gyro
violet void
#

Never heard of "thunk"
The first member in the member list

frosty dock
minor gyro
#

OH

#

SORRY

#

LMAOOO

frosty dock
orchid thunder
#

now i need to know how to mute volume with joker

frosty dock
#

the crazy part is i don't know how many times I've seen someone use not x == y

obsidian nexus
#

pls i need help

tender gale
#

check how the plant does it?

frosty dock
#

the plant is literally a blind

orchid thunder
frosty dock
violet void
orchid thunder
violet void
#

not every keyboard can use them ç--ç

I keep googling it

frosty dock
#

but not (x == y) works

orchid thunder
#

i forgot that was a thing holy shit

frosty dock
# obsidian nexus pls i need help

there's a steamodded util function to do this, otherwise it would require patching

SMODS.current_mod.set_debuff = function(card)
  if next(SMODS.find_card('j_modprefix_key')) and card:is_face() then return true end
end
#

where modprefix is your mod's prefix and key is your joker's key as put into SMODS.Joker

obsidian nexus
#

okay i'll give it a try i'll tell you

frosty dock
#

?

ionic verge
#

how would i have a joker get its location in the jokers array

#

like G.jokers.hand

#

or whatever it is

orchid thunder
#

wait im a fucking idiot

frosty dock
ionic verge
#

danke

frosty dock
#

btw for this

#

i think you can just work with dt/G.SPEEDFACTOR

orchid thunder
#

whevener i refrence dt?

frosty dock
#

the dt gets multiplied by the speed factor when passed from Game.update into Card.update

lethal mural
#

i've asked this kinda before but i never got an answer
theoretically, if another mod adds the same ranks as my mod, is there any way to make it so it only adds one of them

frosty dock
#

so that should do

lethal mural
#

like if two mods add an "11" could i make it so theres only one of them

frosty dock
lethal mural
#

oo

#

yeah cus i was wanting to add compatibility with unstable

#

so i guess i do the same thing but rank instead of poker hands

frosty dock
#

mhm

#

you'll see there's this thing I do for keeping locals around of what these objects actually are and using the key of that object to ref it elsewhere instead of using my key directly

#

that's because i don't know what the key will be at runtime

tight thistle
#

quick question for anyone

#

why is stuff changing color when i scroll up and down?

#

okay disregard this it seems closing and opening the thing again fixed it nope, still happening

urban veldt
#

According to the game, this is the area fucking up my custom Joker.

urban veldt
#

Welp, solved that issue and a new popped up

#

Progress tho

#

AAAAAAAAAAAAA

tall cradle
#

Does anyone know why this code is crashing when the values get too large?

[[patches]]
[patches.pattern]
target = "functions/misc_functions.lua"
pattern = '''
    if min and max then return math.random(min, max)
    else return math.random() end
'''
position = "before"
payload = '''
    if G.GAME.selected_back.name == "Lucky Deck" then
        if min and max then
            local value = (math.random(min, max) * 10) or max
            print("[Soul] " .. value)

            return value
        else
            local value = (math.random() * 10) or 1
            print("[Soul] " .. value)

            return value
        end
    end
'''
match_indent = false
tepid crow
tall cradle
#

Where are they located?

tepid crow
#

mods/lovely/dump

tall cradle
#

Alright

#

All I can see is that the rarity is reassigned to SMODS.poll_rarity, does that function have any edge cases to make it, under any circumstance, return nil?

tepid crow
#

that's line 2055?

tall cradle
# tepid crow that's line 2055?

2053, it defines the rarity variable which, when it returns nil, attempts to get concatenated with a string, which you just can't do

#

This is 2055

tepid crow
#

ah

edgy reef
#

Which under normal circumstances should never happen to begin with.

tall cradle
#

1 or higher is interesting

#

Since I was clamping it to exactly 1, which caused the error

tepid crow
#

lol

tall cradle
#

of course, using return math.min(value,0.999) fixes it lmao

edgy reef
#

math.random can only return value between 0 and 0.9 repeating, so 1 is out of bounds.

#

At least I think

#

I know some languages work like that

tall cradle
ionic verge
#

how would i play a sound from my mod's assets?

#

file name is this

tepid crow
ionic verge
#

would i just set the sound to something like [modprefix]_[filename] like how its done for everything else?

faint yacht
#

Ye.

ionic verge
#

deal being my mod's prefix

tight thistle
#

does anyone have any idea as to why card:jcbb_add_speech_bubble and card:jcbb_say_stuff dont work when the events are formatted like this?

foggy carbon
#

does anyone know why the message isn't showing? The rest of this is working, but the message just isn't showing

ionic verge
#

alright i have a problem, i need this code to loop an x amount of times (hence the for loop)
the problem is the returns prevent it from looping
i presume the solution is to replace the returns with add_event()s, but before i do so i want to make sure that i dont have to change anything else to prevent it from breaking
any thoughts?

random sleet
#

are you on better calc

#

if so i believe you can nest returns by doing return = { message = "hello", ..., extra = { message = "world", ... } }

#

(and recursively thereof)

ionic verge
random sleet
#

poggers

ionic verge
#

and i dont need the events?

random sleet
#

i believe so

#

i haven't actually used this feature yet myself so

#

🤞

ionic verge
#

i think an important thing to note though is it loops a variable amounts of time

random sleet
#

yeah so you'd build the return table in a variable

ionic verge
#

wait ok im a little confused

#

can you elaborate?

random sleet
#

rather than talk out my ass i'm testing something real quick lmao give me a few

ionic verge
#

ok

random sleet
#

ok so i just reimplemented my old joker tarot with the new system

#

recursion is fun

ionic verge
#

nice odds lol

random sleet
#

lmao oops i return the ret way too early

#

pretend the return ret in the for loop is after it

quaint latch
random sleet
#

append_extra is recursion

#

hence it being a nested function

quaint latch
#

OH

#

I didn't see the top function definition lmao

random sleet
#

yeah if you laid out the ret table

#

it'd be 1004 "extra" deep

quaint latch
#

Rest in ripperoni performance

#

🫡

random sleet
#

it's not even unperformant

quaint latch
#

How

ionic verge
#

ill be honest i still dont know what to do

random sleet
#

because computers are good at things

ionic verge
#

i still need help as i absolutely have no idea what to do

random sleet
#

so you want to have multiple effects

ionic verge
#

yeah

random sleet
#

so make a table that you're going to return

#

and stuff it with the effects

#

it'll evaluate like this

#
ret
ret.extra
ret.extra.extra
ret.extra.extra.extra```
#

until it runs out of extras

ionic verge
#

how do i define those extras though

random sleet
#

feel free to copy that append_extra function from above

ionic verge
#

mhm

random sleet
#
                    if ret.extra then return append_extra(ret.extra, append) end
                    ret.extra = append
                    return ret
                end```
#

essentially what this does is it looks for the first "empty" extra slot and fills it with the "append" table

#

which should be the "next" return

#

and can be structured exactly like the table you would normally return from a joker calculation

runic pecan
#

[Quick Opinion Seeks]
Are these three effects too much to pack together?

random sleet
#

i think making 3card straight flushes not only is extremely powerful but also would require completely reimplementing straight flushes if you dont want the effect to apply to straights and flushes independantly

#

as-is i believe straight flush is literally just defined as adding a straight and a flush together

#

hence why it has strange function with four fingers

ionic verge
#

(also it worked, thanks so much!)

#

now the only problem is i kinda wanted each mult update to happen with the lives/blanks

random sleet
#

whats the current code

ionic verge
random sleet
#

..... huh

ionic verge
#

also i tried it again, 3 lives hit, and i got 10k instead of 300
funny

foggy carbon
#

here's a weird question - can I send text to the debug console? When working on Pokemon Essentials I can use Console.echo_li(

random sleet
#

print

#

ummmm

#

Rad are you on latest smods?

#

tried replicating it and it seems to work fine here

#

despite obviously it doesnt work on yours

ionic verge
#

at this point its about a week old

#

(sorry i would have posted about but ill be real i got sidetracked by funny gun noise)

random sleet
#

huh

ionic verge
#

i updated it and everything

random sleet
#

i genuinely dont know why thats happening, sorry

ionic verge
#

grabbed it straight from this

tight thistle
#

not to derail from the conversation but seeing a changed suit art hit me like a semi truck

random sleet
#

unless its some weird mod incompatibility but yeah idk

ionic verge
#

i dont have any other mods besides a music mod and the deck skins

#

my mod
music
debug
deck skins
lovely
deck skins
smods

random sleet
#

maybe eremel or aure would know if you see em around i dont wanna ping anyone 😓

ionic verge
#

mhm

#

ill look into this tonight

crisp coral
#

because looking at the code this seems correct? ish?

ionic verge
#

lemme pull up its stats rq

crisp coral
#

i guess the extra table just fires all at once?

#

try using calculate effects

ionic verge
random sleet
#

the issue is that for my joker tarot it's not working that way and idk why the difference

foggy carbon
# random sleet print

can I do card:calculate( on my own with a custom context? If so, what do I use as the first argument (the one labeled self?

random sleet
#

yes but you have the wrong idea about how to go about it

hardy viper
#

card.calculate(card, foo, bar)
and
card:calculate(foo, bar)
are the same
the : instead of the . implies that the first argument given to the function is always the object it was called on

foggy carbon
#

okay

random sleet
ionic verge
random sleet
#

absolutely not

#

i dont even have talisman

#

because it doesnt work

ionic verge
#

ok

#

same here

lucid owl
#

any examples of consumable cards? looking for somewhere to base off of but i don't think there's anything in the example mods repo

#

actually this is a dumb question nvm lol

jagged sun
random sleet
lucid owl
#

hows it going

#

shit its been a long while

jagged sun
runic pecan
random sleet
#

1 retrigger if it's rare, 2 if it's legendary

#

i'd say

#

imo

lucid owl
# jagged sun good LOL

glad to hear :) i essentially largely stopped coding after like last year lol so i'm getting back in the groove by learning to mod this peak of a game

jagged sun
#

g o o d

random sleet
#

also i might reword the latter effects to just be like, "Upgrade Straight Flush when you use a Neptune, Jupiter, or Saturn planet card"

runic pecan
#

Nep is +3 lv. SF and Jup&Sat are +1 lv. SF

random sleet
#

oh i cant read

#

space joker says "upgrade level of" burnt joker says "upgrade the level of the" ugh

#

inconsistent ass terminology

atomic edge
#

Are there any guides to start with modding like how to make a simple joker?

runic pecan
atomic edge
#

Thank you so much

runic pecan
#

Is context.consumeable.ability.key == 'c_neptune' the correct expression?

random sleet
#

no, key isnt in ability

#

you want config.center.key i think

runic pecan
#

So context.consumeable.config.center.key ?

random sleet
#

ye

knotty olive
#

I want to disable certain jokers/planet cards/consumables / anything on a certain stakes, how do I go about that?

runic pecan
#

Is uncommon OK with this effect?

runic pecan
runic pecan
knotty olive
#

So I basically want to almost emulate a challenge on certain stakes. I'm looking through the source code and I think I need to do

            if _ch.restrictions then
                if _ch.restrictions.banned_cards then
                    for k, v in ipairs(_ch.restrictions.banned_cards) do
                        G.GAME.banned_keys[v.id] = true
                        if v.ids then
                            for kk, vv in ipairs(v.ids) do
                                G.GAME.banned_keys[vv] = true
                            end
                        end
                    end
                end
                if _ch.restrictions.banned_tags then
                    for k, v in ipairs(_ch.restrictions.banned_tags) do
                        G.GAME.banned_keys[v.id] = true
                    end
                end
                if _ch.restrictions.banned_other then
                    for k, v in ipairs(_ch.restrictions.banned_other) do
                        G.GAME.banned_keys[v.id] = true
                    end
                end
            end

I need to somehow trigger this code when I start a game on a specific stake

#

IE I want to remove soul cards from gold stake for example <- this is just an example

runic pecan
#

I guess you want to remove certain cards from the pool?

random sleet
#

you can take_ownership and add an in_pool function that checks if you're on that stake or not

knotty olive
# random sleet you can take_ownership and add an in_pool function that checks if you're on that...

Please elaborate, my first time looking at balatro source code and the lua language was like a couple hours ago, looking to learn as much as I can. I'm like 80% of the way there, here's what I have

# At the beginning of the game we disable all Cryptid elements unless G.GAME.modifiers.cry_ingame_enabled is set by Stake
[[patches]]
[patches.pattern]
target = "game.lua"
pattern = '''if self.GAME.stake >= 2 then'''
position = "before"
payload = '''
if not G.GAME.modifiers.cry_ingame_enabled then
    if not G.GAME.banned_keys then
        G.GAME.banned_keys = {}
    end
    -- Loop through and add all Cryptid items to banned_keys

end
'''
match_indent = true
hushed briar
#

where does new calc handle retriggers? state_events.lua doesnt contain the word repetition at all after smods modifies it, and thats where its normally done in vanilla, so i dont know where it passes the repetitions = true context

sleek wigeon
#

hi i don't have any modding experience and i was wondering how difficult it would be to extract the game's sound effects

#

i know a few of them are unlicensed sourced online but balatro has some post processing on it and it doesn't sound the same

hushed briar
sleek wigeon
#

oh really?

hushed briar
#

yeah its that easy lol

sleek wigeon
#

that's a lot simpiler than i thought

#

looks like the game does some speed manipulation on a few of the sounds but that can be easily fixed

stray warren
#

I'm trying to add a badge to a joker when the user hovers over it, but this doesn't seem to be working. It won't even print the debug message on hover

local generate_UIBox_ability_table_ref = Card.generate_UIBox_ability_table
function Card:generate_UIBox_ability_table()
    local generate_UIBox_ability_table_val = generate_UIBox_ability_table_ref(self)
    sendDebugMessage("Generated UI!")

    if generate_UIBox_ability_table_val == nil then
        return
    end

    if self.ability.set == 'Joker' and (self.area == G.I.CARDAREA[7] or self.area == G.pack_cards) then
        SMODS.Joker:take_ownership('joker',
            {
                set_badges = function(self, card, badges)
                    badges[#badges + 1] = create_badge("$" .. card.sell_cost, G.C.RED, G.C.BLACK, 1.2)
                end
            }, true)
    end

    return generate_UIBox_ability_table_val
end
orchid thunder
#

how can i set all sound volume to 0 useing the code

restive bronze
#

how do I check a cards enhancement? to give something when a card with a specific enhancement is scored for example

stray warren
misty cape
#

Finally got the config up and running!!!!! 😄 The only hang-up still is that for the tooltips colors to take effect, every time i open the game, i have to disable and re-enable High Contrast Cards in the Customize Deck tab and start a new run for those to change to their matching colors. Any way i could force the game to reload/check that option from my mod's end?

#

base game uses G.FUNCs.refresh_contrast_mode when enabling that button, so i figured it may be something along those lines but im stumped

#

this is currently how im modifying it to change those tool tip colors for suits

runic pecan
#

Is there a better way to get a random spectral key than local _spectral = G.P_CENTER_POOLS.Spectral[pseudorandom('ina',1,#G.P_CENTER_POOLS.Spectral)] ?

random sleet
#

theres pseudorandom_element

orchid thunder
#

No im fucking done

#

this is all i needed
G.SETTINGS.SOUND.volume = 0

misty cape
orchid thunder
misty cape
#

ahh makes sense!

glass scaffold
#

is there a way to have textures larger than 71 x 95 fit for a Joker?

#

I want clearer pictures for mine

misty cape
#

says that it cannot find init.lua..... its in the same directory so idk

wild patrol
#

Is there a way to give a random joker ability to a generated card?

#

Like when it's created it gets a random joker effect

ionic verge
#

whats the key for oops all sixes?

#

is it just 'j_oops_all_sixes'?

runic pecan
#

Just j_oops

ionic verge
restive bronze
#

for some reason this is giving mult and not Xmult

glass scaffold
#

Why is Balatro throwing this error?

#

Patched the bug!

context.cardarea == G.play added on 209

#

New issue: It's triggering twice. How do fix

ionic verge
wild patrol
#

Now do it with 100 jokers

#

And the one joker that triggers the on to the right

#

With a blueprint to copy it

ionic verge
#

the best part imo is if you cheat you also dont get to actually fire the shotgun

#

this stemmed from the fact that the dice still worked post mortem for that round

#

cant have a free X243 mult now can we?

random sleet
#

you could also simply not check G.GAME.probabilities.normal

ionic verge
foggy carbon
#

it is funnier

#

but if you use blueprint to copy oops, does iit kill the blueprint?

ionic verge
#

hmm
probably

#

ah well balatrojoker

random sleet
#

blueprint cant copy oops im like 90% sure

ionic verge
#

actually no

#

it works off of oops' key

#

so no it wont trigger a blueprint even if it was compatible

#

though the shotty itself is compatible with blueprint

#

go wild balatrojoker

random sleet
#

i might recommend not saying "retrigger" if you arent actually implementing it as joker retriggers

#

it might make how it would interact with actual joker retriggers unclear

ionic verge
#

mhmmm

#

fair nuff

#

what word would you use?

random sleet
#

even just like "triggers again"

ionic verge
#

mkay

random sleet
#

just specifically not the word "retrigger"

ionic verge
#

ill change that in the morning

glass scaffold
random sleet
glass scaffold
random sleet
#

thats all the base checks to score when a played card is scored

#

youll also want to throw on whatever you want context.other_card to match, which in this case looks like an Ace check

glass scaffold
random sleet
#

yes

#

its triggering in context.repetition too

glass scaffold
#

so where do I throwand not context.repetition

glass scaffold
#

Alright, that worked.

wintry solar
#

Oh what a sad if statement

foggy carbon
#

I was really confused as to why this was failing in the very specific case where the 2 was to the left of the King and the player had Splash, was coming really close to asking wtf. Right before posting, realized it's probably because Splash pushes full_hand into scoring_hand, and thus I can't just check scoring_hand[1]:card_id() == 13

glass scaffold
#

How do I make a Joker play music when it's acquired

maiden phoenix
glass scaffold
#

What's up with this part? (Sourced from: Music Albums mod)

foggy carbon
#

kinda

stiff locust
#

what do you mean kinda

#

you wrote the last line as though it is a fusion using fusionjokers

foggy carbon
#

okay, fair

stiff locust
#

the effect has nothing to do with shoot the moon or wee joker's effects outside including a queen and a 2

#

and would be absolutely terrible if you actually fused those two jokers into it

#

I hope it's not a fusion and you just wrote the last line for the funny or smthn

foggy carbon
#

but like, my mod is written so that if you have fusionjokers installed, you can get my jokers via fusion, but they're also in the main pool

stiff locust
#

wee joker gives +chips and shoot the moon gives +mult, both of those fusing into Xmult makes zero sense and can easily kill your run if you scaled wee joker to any degree

#

it actively gets rid of 2s from the deck which ruins the wee joker hack synergy and requires you to play 2s that turn into queens which ruins any of shoot the moon's synergies

#

fusions should retain at least some semblance of the effects of the jokers they're fused from

leaden orbit
#

hey uh, so, I would like to make my own deck of cards textures, is there a way to make it without changing the original ones? just add another one? Thanks :) (Btw I don't know how to code, although I can follow a tutorial if there's any d:)

maiden phoenix
#

Look for DeckSkinsLite

leaden orbit
#

awesome, THANKS! :3

marsh radish
#

How to mod textures?

#

Nvm

plain apex
royal ridge
nocturne garnet
plain apex
#

mfw i play joker of A♥Joker

plain apex
# plain apex

anyway what i was trying to fix is that this consumable creates a negative copy of 3 random cards in the deck which works but the copies do not appear in the deck preview and also say INFO - [G] [DebugPlus] Error: Trying to dup card without an area if i attempt to copy them with debug

    use = function(self, card, area, copier)
        if config.sfx ~= false then
            play_sound("fn_decoy")
        end

        -- Add an event to execute after a delay
        G.E_MANAGER:add_event(Event({
            trigger = 'after',
            delay = 0.1,
            func = function()
                local all_cards = G.deck.cards -- Get all cards in the deck
                if not all_cards or #all_cards == 0 then
                    return false -- Exit if the deck is empty
                end

                -- Shuffle the deck to randomize card selection
                math.randomseed(os.time()) -- Ensure random seed is set
                for i = #all_cards, 2, -1 do
                    local j = math.random(1, i)
                    all_cards[i], all_cards[j] = all_cards[j], all_cards[i]
                end

                -- Select the first `card.ability.extra.copies` random cards
                local selected_cards = {}
                for i = 1, math.min(#all_cards, card.ability.extra.copies) do
                    selected_cards[#selected_cards + 1] = all_cards[i]
                end

                -- Create negative copies of the selected cards
                for _, selected_card in ipairs(selected_cards) do
                    local new_card = copy_card(selected_card)
                    new_card:set_edition({negative = true}, true)
                    new_card:add_to_deck()
                    G.deck.config.card_limit = G.deck.config.card_limit + 1
                    G.hand:emplace(new_card)
                    playing_card_joker_effects({new_card})
                end

                return true
            end
        }))
    end,
}
nocturne garnet
#

Uhm what

#

i did it?

#

why did i never realize this before

#

you can just put a card's center in the info_queue and the loc_vars shit will be done automatically 😭

#

wait no

#

nvm

wintry solar
#

That’s a recent change

nocturne garnet
#

cool

obsidian nexus
#

how do i set my mod's prefix ?

maiden phoenix
#

Do you use a header or a metadata file?

obsidian nexus
#

no i currently just have a spaghetti file

#

with steamodded header comments

maiden phoenix
#

--- PREFIX: your_prefix

obsidian nexus
#

nice, ty !

wild patrol
#

is there a function to flip cards back facing forward

#

during those binds that flip ur cards

zealous glen
#

What happens when you flip a card

wild patrol
#

Just makes it hard to know what card it is

#

also add_to_deck is what u use when a card is added to the joker slots right?

zealous glen
wild patrol
#

nothing?

zealous glen
#

The function is a method: Card:flip

wild patrol
#

alright

slender island
#

guys, how do i create a texture pack for balatro?

wild patrol
#

thinking of adding swords of revealing light to yugioh mod

zealous glen
wild patrol
#

and using the flip function to disable that bind

#

speaking of bind disabling what's the function to do that?

slender island
wild patrol
#

G.GAME.blind:disable()?

zealous glen
#

it doesn't make Texture Packs

#

but it's a Texture Pack manager

#

How many Jokers

slender island
#

idk, from one to all of them

#

i want to make a texture pack for my favorite streamer

zealous glen
#

hmmm,

#

It's just that if it's a few, it's easier to do them in one way but if it's all it's easier to do in another

#

But for a reference of a Malverk texture mod I recommend Legendere

slender island
zealous glen
zealous glen
#

But if you install texture mods made for Malverk it allows you to manage them

#

like the Minecraft texture pack manager

slender island
#

oh i understand, something like CIT/optifine

zealous glen
#

IIRC no

#

just the built-in manager

#

Because you can have multiple texture packs active at once

#

But only the topmost applies in case of conflict

#

It's more visible when there's an update that adds new blocks, so the texture pack you're using doesn't have textures for it

slender island
#

oh okay

zealous glen
#

But maybe another one does, and is on the bottom, so it only applies those textures

#

Legendere only applies textures to the Legendary Jokers, so you could have other textures on the other Jokers

#

With a "normal" texture mod it wouldn't work because they're usually replacing the vanilla textures

#

you'd need to manually edit different textures into a single file

wild patrol
#
    if G.GAME.blind and ((not G.GAME.blind.disabled) and (G.GAME.blind:get_type() == 'Boss')) then 
        card_eval_status_text(context.blueprint_card or self, 'extra', nil, nil, nil, {message = localize('ph_boss_disabled')})
        G.GAME.blind:disable()
    end
end

function jinzo_removed(self, card, from_debuff)
    if G.GAME.blind then G.E_MANAGER:add_event(Event({ func = function() G.GAME.blind:set_blind(nil, true, nil); return true end })) 
    end
end```
#

would this work for a add_to_deck and remove_from_deck function?

wild patrol
zealous glen
#

I’m not sure there’s a generic way to do it

wild patrol
#

ok how would I disable a boss blind then?

#

I could probably figure the rest myself

storm kraken
#

how would you make a uhh blind debuff carads with a certain enhancment

tight thistle
#

hello! i need help with something
so i am making a joker that is supposed to trigger 5 text boxes in succession, and the best way to do so i was told was to make events unnested from eachother, however there is an issue with this
something about card: effects breaks and ceases to work while unnested, and only the card: effects in the final called event works
the card: effects are still called correctly however, the only thing that doesnt work is their function (add_speech_bubble and say_stuff dont work until the last called event)
i was wondering if anyone here would be able to help me figure out why this happens?

zealous glen
long sun
#

thoughts on these abilities?

Astra (Uncommon):
0 in 3 chance to give +50 Mult, held Tarot cards increase the odds
(Guaranteed if you have Lily)

Lily (Uncommon):
0 in 3 chance to give X2 Mult, held Planet cards increase the odds
(Guaranteed if you have Astra)```
minor gyro
wild patrol
zealous glen
#

Do you also have it on calculate?

long sun
#

well ya, if you have 2 Tarots you have a 2 in 3

crisp coral
wild patrol
long sun
#

with Crystal Ball you can guarantee it

minor gyro
crisp coral
#

you forgot the last half of the card 😭

wild patrol
#

I thought that was for calculating multis?

long sun
#

👍

zealous glen
minor gyro
crisp coral
#

but i do think 2 in 3 chance for 50 mult is quite weak

minor gyro
crisp coral
#

how often do you get oa6 + bloodstone

minor gyro
#

Nothing gets past my bow

long sun
#

fair!

#

would +100 be enough to justify it?

#

+75 maybe?

tall cradle
#

Where does the game check if a voucher is redeemed before serving it in the shop? (Tier 2 and 3)

minor gyro
tight thistle
#

this is an entirely different issue

minor gyro
minor gyro
#

I thought it was the same

tight thistle
#

i discovered why this isnt working thanks to john smods

crisp coral
#

just call him aure 😭

noble frigate
#

😭

minor gyro
noble frigate
#

cool tho !

tight thistle
crisp coral
#

yeah

tight thistle
#

noted

noble frigate
#

mr smods

minor gyro
#

yeeeeeeeeah

noble frigate
#

bonus round time

#

who knows how to access cards in deck

crisp coral
#

G.playing_cards for every card or #G.deck.cards for only in deck

noble frigate
#

and thats a list of cards?

minor gyro
#

a table

#

the # one

noble frigate
#

oh yeah lua

wild patrol
noble frigate
#

danke

#

makin my brainstorm fork xd

minor gyro
noble frigate
#

i dont speak german i just swear in it

tight thistle
#

its something weird that i cant seem to diagnose the cause of

minor gyro
#

my native language is portuguese tho

noble frigate
#

i have english and french

#

because

#

france apparently

storm kraken
bold sleet
#

help, the thing is not doing the thing.

noble frigate
#

i might be a little stupid but where is the erratic deck gen code

#

trying to use brainstorm auto reroll to filter by amount of suit

zealous glen
hardy viper
crisp coral
#

^

bold sleet
hardy viper
#

you need both

#

text in rows in columns in root

bold sleet
#

Ah

zealous glen
#

Text can be in columns

#

but you want text in rows in columns for them to align

knotty olive
#

Can anyone help me out?

    if not saveTable then 
        if true then
            print("test")
            print(G)
            print(G.GAME)
            print(G.GAME.banned_keys)
            print(self)
            print(self.GAME)
            print(self.GAME.banned_keys)
        end
        if false then
        if self.GAME.stake >= 2 then 
            self.GAME.modifiers.no_blind_reward = self.GAME.modifiers.no_blind_reward or {}
            self.GAME.modifiers.no_blind_reward.Small = true
        end
        if self.GAME.stake >= 3 then self.GAME.modifiers.scaling = 2 end
        if self.GAME.stake >= 4 then self.GAME.modifiers.enable_eternals_in_shop = true end
        if self.GAME.stake >= 5 then self.GAME.starting_params.discards = self.GAME.starting_params.discards - 1 end
        if self.GAME.stake >= 6 then self.GAME.modifiers.scaling = 3 end
        if self.GAME.stake >= 7 then self.GAME.modifiers.enable_perishables_in_shop = true end
        if self.GAME.stake >= 8 then self.GAME.modifiers.enable_rentals_in_shop = true end
        end SMODS.setup_stake(self.GAME.stake)

        self.GAME.selected_back:apply_to_run()

Does anyone know why printing G or self print nil here? Clearly the object should be defined? This is in game.lua. Literally just injected this small if statement. The statement "test" prints out normally and works

zealous glen
#

G is probably undefined but self is

knotty olive
#

self also returns nil

zealous glen
#

where is this

#

and when is this

knotty olive
#

line 2031 in game.lua

#

Executes whenever I start a new game

spring lantern
#

new jim

tall cradle
#

is there any way with the SMODS.Joker to make a legendary with 2 textures (one for bg, and one for the floating joker)

#

or does that behavior have to be manually implemented

knotty olive
#
function Game:start_run(args)
    args = args or {}

    local saveTable = args.savetext or nil
    G.SAVED_GAME = nil

    ...

    if not saveTable then 
        if true then
            print("test")
            print(G)
            print(G.GAME)
            print(G.GAME.banned_keys)
            print(self)
            print(self.GAME)
            print(self.GAME.banned_keys)
        end
        if false then
        if self.GAME.stake >= 2 then 
            self.GAME.modifiers.no_blind_reward = self.GAME.modifiers.no_blind_reward or {}
            self.GAME.modifiers.no_blind_reward.Small = true
        end
        if self.GAME.stake >= 3 then self.GAME.modifiers.scaling = 2 end
        if self.GAME.stake >= 4 then self.GAME.modifiers.enable_eternals_in_shop = true end
        if self.GAME.stake >= 5 then self.GAME.starting_params.discards = self.GAME.starting_params.discards - 1 end
        if self.GAME.stake >= 6 then self.GAME.modifiers.scaling = 3 end
        if self.GAME.stake >= 7 then self.GAME.modifiers.enable_perishables_in_shop = true end
        if self.GAME.stake >= 8 then self.GAME.modifiers.enable_rentals_in_shop = true end
        end SMODS.setup_stake(self.GAME.stake)

Here's the full code snippet it's in Game:start_run

#

I literally cannot move forward at all if I can't even manipulate the game object, any help would be appreciated

humble gale
zealous glen
knotty olive
#

lovely dump

#

I injected

        if true then
            print("test")
            print(G)
            print(G.GAME)
            print(G.GAME.banned_keys)
            print(self)
            print(self.GAME)
            print(self.GAME.banned_keys)
        end
#

Here's my injection

[manifest]
version = "1.0.0"
dump_lua = true
priority = -1

# At the beginning of the game we disable all Cryptid elements unless G.GAME.modifiers.cry_ingame_enabled is set by Stake
[[patches]]
[patches.pattern]
target = "game.lua"
pattern = '''if self.GAME.stake >= 2 then'''
position = "before"
payload = '''
if true then
    print("test")
    print(G)
    print(G.GAME)
    print(G.GAME.banned_keys)
    print(self)
    print(self.GAME)
    print(self.GAME.banned_keys)
end
'''
match_indent = true
zealous glen
knotty olive
#

yes a new game

knotty olive
#

The problem is that "test" is printing every time, but G is not nor is self

zealous glen
#

Does it not print an adress?

knotty olive
#

No it prints nil

#

😭

#
        if Cryptid.enabled["Progression Locks"] and not G.GAME.modifiers.cry_ingame_enabled then
            print("test")
            print(Cryptid)
            print(Cryptid.enabled)
            print(Cryptid.enabled["Progression Locks"])
            print(G)
            print(G.GAME)
            print(G.GAME.banned_keys)
            print(self)
            print(self.GAME)
            print(self.GAME.banned_keys)
            local tt = "test"
            print(tt)
        end

Alright I'm officially losing my mind. How the f can Cryptid.enabled["Progression Locks"] be nil if it literally HAD to be true to enter the if statement in the first place

#

Am I missing something here? Why can't I reference any variables outside the scope of the if statement? Is there some LUA garbage magic I don't know?

humble gale
#

Im trying to make a joker that opens the shop after skipping but when the skip is a booster it doesnt show anything.

#
if context.skip_blind then
            G.E_MANAGER:add_event(Event({
                trigger = "after",
                func = function()
                    G.STATE = G.STATES.SHOP
                    G.blind_select:remove()
                    G.blind_prompt_box:remove()
                    G.blind_select = nil
                    delay(0.2)
                    G.STATE_COMPLETE = false
                    return true
                end,
            }))
        end

code

knotty olive
#

I figured it out, some ass decided to override the print function in LUA. Print only works for numbers and strings. I ran print(true) and it returned nil LMFAO

spring lantern
#

my magnum opus

nocturne garnet
spring lantern
#

real shit

slender island
onyx silo
#

Is this the right channel to ask for help with making a mod?

humble gale
#

yea

slender island
#

is there balatro for PC outside of steam?

#

wait wrong channel

#

sorry

humble gale
#

Balatro is on GOG i think

#

wait nvm

slender island
#

i would be so happy if that were true

onyx silo
#

So I'm working on making a mod that replaces the card designs of the entire deck, but when I load the mod in-game there seems to be a tiny grey-ish outline around the cards. This doesn't occur on any of the mods I've downloaded online, and it's certainly not there in the textures. Is there any way to get rid of it? (I hope you can see the outline in the image, it's especially noticeable when you zoom in on the face cards or aces)

humble gale
#

did you try enlarging the sprite by a few pixels? maybe that will get rid of the outline.

onyx silo
night pagoda
ionic verge
long sun
#

WHAAAAAA WHERE CAN I GET THE CHANGED CARDS

ionic verge
long sun
#

THANKS

onyx silo
zealous glen
#

in the text I mean

ionic verge
#

nope its 'uneffected' by sixes

carmine burrow
ionic verge
zealous glen
#

I see

carmine burrow
zealous glen
#

Confusing template then

ionic verge
#

personally i think its fine

wintry solar
#

Is you change Xmult_mod to just xmult what happens?

ionic verge
#

trying it

onyx silo
zealous glen
#

You do need to create the 2x textures

#

but you can upscale the 1x textures

onyx silo
#

They're there in the files, but they're not simply the 1x files doubled in size. I completely remade the textures since they can look way nicer with the higher amount of pixels. Especially the face cards

zealous glen
#

Yes, that's why I said you upscale them

#

So they're the same doubled in size

ionic verge
zealous glen
#

I was expecting it to just add the value together

long sun
#

suggestion for the ability:

1 in 2 chance to give X3 Mult, else gives X0.5 Mult
Retriggers for each Joker left of this one (Currently # retriggers)```
ionic verge
wintry solar
# ionic verge no change

Oh there’s some wonkiness in how extr tables are calculated, will have to patch smods when I’m free in a bit

ionic verge
#

wait

wintry solar
#

What smods version are you on?

ionic verge
wintry solar
#

Curse you autocorrect

#

Xmult isn’t valid

ionic verge
#

kinda better

wintry solar
#

Yeah I thought that might happen now

ionic verge
wintry solar
#

Though I would have thought the messages would alternate

ionic verge
#

like 12 hours ago

wintry solar
#

This is extra tables being wonky though, don’t worry

ionic verge
#

ok

wintry solar
#

I’ll fix it soon, just don’t want to do it on mobile

ionic verge
#

as a final aside i think its backwards compared to how i built the table

wintry solar
#

Yeah

#

It will be

ionic verge
#

mhm

wintry solar
#

It’s not going through the keys in the table in the correct order, so it’ll mistime it all

ionic verge
#

i say that bc i have this piece of code that i want to happen last, but whenever it does trigger it happens first

restive bronze
#

why if I put 2 Xmult it gives X2 mult but if I put 1.25 Xmult it gives 1.25 mult instead?

ionic verge
#

because it checks for if they were all blanks or all lives

carmine burrow
ionic verge
#

just fucking shoots it instead

carmine burrow
#

i mean aren't there other (modded) jokers that mess with probability?

ionic verge
#

yeah there are

#

but this is funnier

onyx silo
carmine burrow
#

ok

faint yacht
carmine burrow
#

so it'd make sense if trying to use 2x graphics that weren't just upscaled versions of the 1x ones would result in errors

onyx silo
#

I know, I'm just hoping anyone does know a way around it

ionic verge
#

whats its t2 do?

wintry solar
#

Can you send code?

ionic verge
#

yeah

#

gonna be a little long tho

faint yacht
# ionic verge whats its t2 do?

Actually, that's it for that. The one to the right of it is unrelated. I'll probably change the white part to black later.

ionic verge
#

actually maybe i cant send it via text

#

sick

#

@wintry solar

#

cus i couldnt send it in discord directly

restive bronze
zealous glen
#

Also I’m not sure why you’re having this issue

#

I’ve hardly noticed it

onyx silo
#

It seems to be whenever the 2x version isnt the same as the 1x version made twice as big

zealous glen
#

I don’t know if that’s the cause

#

I don’t think it is

onyx silo
#

I'll run some more tests in a bit then

warm maple
#

never got an answer for this one...

solar eagle
#

look at the game source tbh

warm maple
#

i did and got nothing conclusive

#

blueprint and brainstorm are both two very specific contexts and i dont know how to recreate that

wintry solar
#

They literally just call the calculate function of the joker they are copying

warm maple
#

i tried that already

#

and it isnt working

#

is there anything that would kind of be like the steammodded vanilla joker lua file but for blueprint and copying jokers

frosty dock
#

I mean there's not a lot of changes required to smods-ize vanilla blueprint

warm maple
#

yeah but i really cant figure it out myself to be honest here

solar eagle
#

how would i check if a voucher's been redeemed?

warm maple
#

is it just this

faint yacht
#

if G.GAME.used_vouchers["v_voucher"] == true

frosty dock
#

== true

solar eagle
#

true

frosty dock
warm maple
#

can someone please just walk me through this, i have no idea what im doing

#

like if i wanted to recreate blueprint to a tee

onyx silo
# onyx silo I'll run some more tests in a bit then

I made an edit on 2x of one single card and the entire deck got an outline. But then I made that exact same edit on the 1x version, expecting it to fix the outline, and it didn't. Running the Python script again removed the outline again. I repeated the experiment and made absolutely sure that my edit and the output of the upscaler were the exact same, yet once again I got the outline on my version. The plot thickens...

wintry solar
#

It’s something to do with colour values of transparent pixels iirc

solar eagle
#

am i correct in guessing that if i want to increase the card selection limit of consumables by a fixed value i'd want to use lovely?

night pagoda
#

Yes, what the script does is it creates a fully-transparent outline of neighboring pixels

solar eagle
#

base game consumables use max_highlighted as a config value so i know i'd be going after this

#

just want to make sure i have the right idea

onyx silo
#

Let me try another test then

dry sun
#

Hey yall, I want to make a TAS for a theoretical “fastest naneinf” but am unsure on how I would do that. Is there a way to essentially doctor a balatro game to be able to guarantee outcomes?

solar eagle
#

seeds

#

its a base game feature

#

how to find the seed you desire i dont know

dry sun
# solar eagle seeds

The odds of this seed is beyond the amount of possible seeds balatro can generate. Is it theoretically possible? Yes. Will it happen? HELL NO.

#

like in minecraft seeded TAS’s, they modify the game to guarantee perfect luck. I would need something like that

tepid crow
#

you can figure it out

dry sun
#

or create it i guess

warm maple
#

at the risk of repeating myself, i Have looked at the source code. i cannot figure it out

tepid crow
#

I promise you it's not that difficult

onyx silo
#

I have done it!

tepid crow
# tepid crow I promise you it's not that difficult

this is brainstorm's code without the UI stuff (message on correct joker etc) or setting the blueprint contexts

local other_joker = G.jokers.cards[1]
if other_joker and other_joker ~= self then
    local other_joker_ret = other_joker:calculate_joker(context)
    if other_joker_ret then 
        return other_joker_ret
    end
end
onyx silo
restive bronze
#

where on the balatro files can I find the loc_txt of jokers?

faint yacht
hardy viper
#

localization/LANGUAGE_HERE.lua

warm maple
#

sorry, back again. how would i go about adding the little "Incompatible" stamp at the bottom of a joker's description

restive bronze
#

ok

zealous glen
#

It’s like a column with text inside

warm maple
#

how would i go about doing that

zealous glen
#

I have an example at home but you can also see how vanilla does it

#

It’s similar to xMult text IIRC

#

But with curved borders

warm maple
#

I have looked at the source code and i dont understand it

#

if im asking a question here it means ive looked through the source and couldnt figure it out

zealous glen
#

Some people don’t

#

People don’t even read the install instructions for SMODS

#

But you likely need to append to main_end

solar eagle
#

formatting stuff may also be in the uh

#

localization files

#

thats where i found how to properly display planet card colors

zealous glen
#

It’s similar but it needs to be done manually

#

For curved borders and such

warm maple
#

is it something i do in the loc_vars function?

#

like with the info queue

solar eagle
#

info_queue is the little side bubbles

#

that describe foil, holographic, negative, etc etc

#

loc_vars is used to set that and also return variables that you can then display in loc_txt

nocturne garnet
warm maple
#

im still confused on how id go about doing it :P

nocturne garnet
#

its ui code.......

#

you can look into how blueprint/brainstorm does it

warm maple
#

ive never done ui code in loc_vars function though so im entirely clueless

#

and ive already looked into how its done but balatro ui code is so esoteric to me

nocturne garnet
#

okay so basically

loc_vars = function(self, info_queue, center)
            --loc_vars shit
            return {
                vars = {your variable shit},
                main_end = ui code shit
            }
        end,```
warm maple
#

ohh

quaint latch
#

Finally released my first Jonker :D

ionic verge
#

how would i use this for giving money at the end of a boss blind?

#

i presume i cant just use context.blind.boss right?

#

ive never used this calc before

leaden wren
#

uhhh

#

should be able to do something like this, return X else return 0?

ionic verge
#

well the problem is it doesnt take context in its args

#

what i think ill do instead is set it in normal calculate and turn it off after the boss blind

solar eagle
#

how does one add a variable to G.GAME? like how you can access G.GAME.probabilities.normal, or discount_percent, etc etc

#

i assume with lovely but i havent been able to figure out how

ionic verge
#

if i were to immediately guess
a patch with lovely

solar eagle
#

yea same i just cant figure out how

ionic verge
#

find where G.GAME is in the files and patch there

#

(do you know how to patch or is that not the problem?)

solar eagle
#

i do not know how to patch is the problem

#

i know where G.GAME is

#

just never used lovely before

ionic verge
#

ok

#

if you plan on making just one patch, create the file lovely.toml in your mod, on the same level that main.lua is

#

(i.e. on this level)

solar eagle
#

mhm

ionic verge
#

if you plan on making multiple patches, replace that with the lovely folder, and place .toml files in there instead

#

this also has the benefit of allowing the toml files to be different names

solar eagle
#

yea i saw this structure in cryptid

ionic verge
#

ye

#

next up, to make a simple patch

#

(lemme open up my patch)

#

first up set this up at the top

#

priority is just in what order it gets patched compared to other things

#

it can be negative and the lower it is the earlier its patched

solar eagle
#

im not new to programming

ionic verge
#

ok

solar eagle
#

you dont have to go this simple

ionic verge
#

sorry

solar eagle
#

i get it

ionic verge
#

i just needed to when i first did like a week ago

solar eagle
#

yea makes sense

#

ty for helping

ionic verge
restive bronze
#

how could I check the rarity of a sold joker?

ionic verge
# ionic verge

after that set up patches and patches pattern, which i believe is the kind of patch you need

solar eagle
ionic verge
#

it finds a line of code and either

#

replaces it, inserts your code above it, or inserts below it

#

depending on what position is equal to

solar eagle
#

ok got it

#

so id just want to find some existing property of G.GAME and add my own line below it

ionic verge
solar eagle
#

i seeee

#

thank you!

ionic verge
#

this will also help

solar eagle
#

i was looking at the website but it wasnt making sense

ionic verge
#

mhm

#

think ya got it from here?

solar eagle
#

yep

#

this formatted properly!

minor gyro
#

is there a way to make a joker "non movable"?

solar eagle
#

pinned?

minor gyro
#

idk
i just want to make it so the player cannot change it's place

solar eagle
#

you can add a pinned sticker to it so it's always on the left

#

thats a default game thing

#

used only for the ceremonial dagger challenge i think?

ionic verge
#

it doesnt even have a graphic, its only used for that challenge

solar eagle
#

nop

minor gyro
#

not what i want... I know that it will be ""movable"" if somebody moves the jokers arround it, but i wanted to make it impossible for the player to move THAT joker

#

but thanks

tight thistle
#

we are trying everything but nothing seems to make it work

mossy mantle
#

does anyone know where I could find documentation on how to access specific values like hand size, total chips, etc.

wintry solar
#

there aren't any docs on that, you'll need to look in the game code

mossy mantle
#

unfortunate but fair enough

hushed briar
#

having the weirdest issue where other_joker (in this case it's Smiley Face) is giving a return on the first played face card but not for any subsequent ones

    if context.hand_card and context.hand_card:get_id() == 7 then
        local other_joker_ret = other_joker:calculate_joker(context)
        
        if other_joker_ret then
            print("return!")
            other_joker_ret.card = context.hand_card
            return other_joker_ret
        else
            print("no return")
        end
    end
end```
#

from what i can tell context is identical in each case other than other_card which obviously should be changing

wintry solar
#

@ionic verge fixed on latest now

ionic verge
#

cool, thanks!

wintry solar
worthy stirrup
#

is a mod able communicate data over to a python file

#

like, able to send a 1d list of the players hand to the python script

hushed briar
# wintry solar there's no `context.hand_card`

its a custom context passed into this, used because i needed to keep track of more than 2 cards at once
again, it works perfectly on the first played face card, but then doesnt on the second

wintry solar
#

oh yeah the mult messages

ionic verge
#

how hard would it to be to replace all of these with add_events()s?

wintry solar
#

you can swithc back to Xmult_mod or add remove_default_message

ionic verge
#

cus at this point it might be cleaner

wintry solar
#

nah this is the best way

vapid mango
#

gang

#

Does this look correct

wintry solar
#

events would make it more complicated

vapid mango
#

I simply added the "cards_2" line in here to add the custom high contrast cards

#

and now it's crashing on launch

#

wait

#

nvm, im dumb!

onyx inlet
#

That feeling when you realize you’ve been using “loc_text” instead of “loc_txt” for weeks.

#

I have had such a dumb

spring lantern
#

this might scale a wee bit too fast

#

this is me doing a test run it starts at 4

ionic verge
vapid mango
#

there was a damn space

ionic verge
#

(i.e. if they were all blanks or all lives)

faint yacht
#

After the scoring is done or..?

ionic verge
#

well im currently using recursive returns

#

using the return{ stuff, extra = { stuff, extra = { etc }}}

worthy stirrup
#

yea, i dont think thats it pal

wintry solar
ionic verge
#

oh

wintry solar
#

they should play in order now

ionic verge
#

damn ok

#

luckily i could just control+z to redo that stuff

onyx inlet
ionic verge
random sleet
#

eremel did you see the sins i committed against extra returns

random sleet
wintry solar
#

its very clever

random sleet
#

oh? ok

#

i thought it was a nasty dirty solution

tepid crow
wintry solar
#

nah I think its reasonbly clean

random sleet
#

oh ok apparently i can just scrawl whatever cave runes i want

spring lantern
#

okay yeah this might be a bit much

mossy mantle
#

does anyone know the variable that I should add to when I want to give a certain amount of chips to the player?

minor gyro
#

dumb ahh question here, how can i make sure a joker is ALWAYS negative? not only in shop, but in collection too

worthy stirrup
worthy stirrup
#

overall, i want to at least get a neural network to play "the best hand" it can

ionic verge
#

i have this on hand because i needed this exact same thing as well

#

dont put this in calculate, for the record

#

it goes on the outermost layer like cost = '' does

worthy stirrup
#

it got one card and then crashed

minor gyro
#

danke!

tepid crow
ionic verge
worthy stirrup
#

i really want to get a nerual network to learn to play balatro

ionic verge
#

i seeee

#

sounds cool, good luck!

spring lantern
#

behold

#

they would make such a cute couple

violet void
#

cool art

spring lantern
#

still gotta remake that first one and draw the legendary in the middle... only 5 more to complete the page tho so it's coming along nicely i think

hushed briar
#

chat why did i decide this was a good idea to try and code

#

too deep in the sunk cost to stop now

hardy viper
#

compat sticker is the hardest part

#

clearly you managed it

hushed briar
#

i thought it was gonna be the hardest part

#

it was not

#

well i didnt think it was gonna be at first

#

and then it was

#

and then it wasnt

hardy viper
#

is it not just local con2 = context con2.blueprint = true for i, v in pairs(handcards) do if v:get_id() == 7 then leftjoker:calculate_joker(con2) end end

hushed briar
#

no because of all the possible contexts a joker could trigger under

hardy viper
#

?

#

you're reusing the context

hushed briar
#

well this would work if you want the joker itself (hudson in this case) to trigger the copied effect

#

im trying to make the 7s trigger the effect

#

it would probably be a lot easier to do it that way though and maybe i should pivot lol

rocky pawn
#

hello! i'm trying to code an effect on a joker where it applies steel to specific cards played

#

is there any examples of mods out there i could reference for an effect like that

hushed briar
#

well that sounds like a very similar effect to midas mask from vanilla

#

you could probably reference that

rocky pawn
#

fair point

#

where can i find the info on that specifically

hushed briar
#

card.lua and then you can just ctrl+f for "midas mask"

leaden wren
#

managed to get a joker working the first time i loaded the code
that felt great

#

*besides a term i had to change, but shush

spring lantern
#

badabadabadaba, true?

spring lantern
#

POSE FOR THE FANS!

rocky pawn
#

genuinely though awesome joker - like the reference to the tall tappers in the bottom right of the card

mellow marsh
#

hii is this where i would ask for help with modding something?

#

trying to set up a custom color for test and it's crashing bc of alpha not being defined i think? but idk how that could be true

#

well hm i guess it's possible that there's no colors defined at all?

#

still though

rocky pawn
hushed briar
rocky pawn
#

thanks!!

#

i hope you have an excellent day

mellow marsh
regal ether
#

what language are mods coded in?

sturdy compass
#

lua

regal ether
#

why

sturdy compass
#

because that's what the game was made in

regal ether
#

WHYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY

#

roblox ass language

sturdy compass
#

idk I'm not localthunk

regal ether
#

c# >

sturdy compass
#

I agree but that's not stopping me

hushed briar
#

same lol

mellow marsh
#

i love c# but i also have only ever actually made games in love2d so i feel at home here

hushed briar
#

lua is so weird like i cant believe

return not bool and 4 or 6

is actual correct syntax and returns 4

mellow marsh
mellow marsh
#

which like. i guess i would have been more distressed if it didn't work

cedar stream
#

so is it just me or does Xchips not exist in the steamodded util.lua

#

or am i like just super blind

wintry solar
#

Xchips isn't provided by smods

minor gyro
cedar stream
#

why is it not provided

wintry solar
#

it's never been provided

cedar stream
#

that makes sense as to why MTJ doesnt have Xchips then

minor gyro
#

isn't there a way to inverse chips and mult? if u do that and then apply the Xmult... It may work

wintry solar
#

you can either do it manually within your calculate function, implement it yourself, or add talisman as a dependency

#

but whichever you choose, outside of plasma deck and niche ordering, it's effectively the same as xmult

vital rapids
#

Has anyone done a joker that increases the chances of other jokers being found?

#

I dont know lua and i dont know how to make that happen

cedar stream
#

so i can make some jank code to implement Xchips?!?

vital rapids
#

You can

hardy viper
tight thistle
hushed briar
hardy viper
hardy viper
hardy viper
#

much better

#

you can't even tell it's ruby and not lua how lovely

#

clearly they're just the same language

#

other than the fact it complains main.rb: warning: argument of top-level return is ignored

tender gale
#

whenever I check vanilla for how to code something it gives me an error message, since in Smods card.ability.extra is used instead of self.ability.extra

restive bronze
#

some jokers' code can be found in card.lua on the balatro files, but some can't, where's the code for those jokers?

tender gale
#

what joker are you referring to

restive bronze
#

juggler for example

tender gale
#

juggler uses the var h_size, if you search for h_size in card.lua you should find a related code

hardy viper
#

juggler?

#

am i crazy i have no clue what that is

#

like the tag?

edgy reef
#

vanilla joker, +1 hand size

hardy viper
#

ahh

#

that one

edgy reef
#

Neato jonkler

tight thistle
#

i can show the code if needed

lethal stratus
#

want to make a card trigger on 3s and only 3s

#

how do I make it do that using other_card?

#

i don't know how the context is written for determining whether a cards value matches or not

lethal stratus
random sleet
lethal stratus
#

woa

#

so thats... 1+3+3 7 triggers of triboulet?

#

per card?

random sleet
#

yep

lethal stratus
#

😨

random sleet
#

a joker?

lethal stratus
#

yea

#

i dont know how to check if a card is a specific value

random sleet
#

context.individual and not context.repetition and not context.end_of_round and context.other_card.get_id(context.other_card) == 3

tepid crow
#

should probably use :get_id()?

random sleet
#

should probably

tepid crow
#

probably should

lethal stratus
#

?

#

idk about this

tepid crow
#

<card>:get_id() == 3 to see if a card is a three

#

so for a joker that could be e.g. context.other_card:get_id() == 3

lethal stratus
#

(i asked for repetitions so you didn't fully code the thing for me, i can show the code though)

placid frigate
#

I'm trying to mod in a Challenge and while looking at other modded challenges I've if sdm_config.sdm_jokers then what does it mean?

lucid umbra
#

can anyone help me with this? i dunno how to download a downgraded version of steammodded

tender gale
#

could Hiker's effect be modified to permanently give Mult to cards? if so how, I want to make a Joker with an effect like that

placid frigate
glass scaffold
tender gale
#

well I'm looking at Hiker's actual code

restive bronze
#

what is context.blueprint???

tender gale
#

only for the colour and message is Chips actually mentioned