#💻・modding-dev

1 messages · Page 96 of 1

gaunt thistle
#

I was initially confused because this shouldn't be a problem

#

all lovely does is it compares the path provided to it to the target path

#

if they match then it applies the patch

languid mirage
#

you mean my PR?

gaunt thistle
#

so yeah, I was talking about something else

crisp coral
#

larswijns question

languid mirage
#

literally me

gaunt thistle
#

have you confirmed that your target patch matches the path of the file within the game's executable?

vivid glade
#

does lovely not check that?

crisp coral
#

also happened to me so i can confirm

languid mirage
#

.

tepid crow
#

I don't think lovely does a sanity check on the path you provide in target

crisp coral
#

but can't recreate rn since im bed

tepid crow
#

if it fails it fails silently

gaunt thistle
#

mostly because it doesn't have a way of knowing what is and isn't a valid path

#

for the same reason that lovely can't know when it's done applying all of the patches

vivid glade
#

and yes, it should be a valid path

#

attention on "should"

languid mirage
#

what if you start removing things

#

to make it crash

#

would it crash

vivid glade
#

yeah, it exists

crisp coral
#

no, there's a 1 in 6 chance to bring up the ACE

languid mirage
tepid crow
#

moMent

gaunt thistle
vivid glade
#

no, src is a folder within the game executable

languid mirage
#

I dont think you should include that

gaunt thistle
#

hm

vivid glade
#

it's like

main.lua
other_file.lua
src/
  menu/
    ...
gaunt thistle
#

what game is this?

languid mirage
#

oh

tepid crow
#

switchblade

#

(I'm assuming)

gaunt thistle
#

duh

tepid crow
#

🤣

gaunt thistle
#

if it's free then I would like a link so I can poke around at it

vivid glade
#

it's in playtest lol

crisp coral
#

there's another game you can try

#

beatblock

gaunt thistle
#

o7 heard

#

open the game with 7z and share a screenshot of the contents

crisp coral
#

i'm once again in bed lmao

#

teesh can you help with this

vivid glade
#

yeah i will give me a sec

gaunt thistle
#

where's the src/ or menu/ directory?

crisp coral
#

if you poke around a bit, the editor events are 3 folders deep

crisp coral
vivid glade
gaunt thistle
#

HAH

#

reading comprehension is dead

crisp coral
#

just a similar l2d game

#

-# (ok im going sleep gn)

gaunt thistle
#

I don't get the joke

tepid crow
#

the joke is that for some reason, reading comprehension has always sucked in any discord related to balatro

gaunt thistle
#

what??

#

I'm just seeing words

#

what do they mean

vivid glade
#

you missed the joke

tepid crow
#

I can take a look at beatblock

vivid glade
#

even THIS (imo the most basic lovely patch) technically gets recognized by lovely (it throws errors when necesairy) but i dont see the print!:

#
[manifest]
version = "0.0.1"
dump_lua = true
priority = 0

[[patches]]
[patches.pattern]
target = 'main.lua'
pattern = "function love.load()"
position = 'after'
payload = """
print("this is a test for lovely!")
"""
match_indent = true
gaunt thistle
#

that's odd. the print appears in the dump, right?

vivid glade
#

there IS no dump!

gaunt thistle
#

uhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh

vivid glade
hardy viper
#

does io.write work at least

#

does lovely print even go through io.write or does it use the C lib for that

gaunt thistle
#

it won't create the dump directory if no patches were applied

hardy viper
#

oh there's no dump

vivid glade
#

WAIT...

hardy viper
#

that makes sense 😭

vivid glade
weary jungle
#

how do you print a list

#

i forgot

tepid crow
#

there's tprint for tables

weary jungle
#

thanke

hardy viper
#

i imagine if not it'd panic

#

so probably?

vivid glade
#

i think it's """ for multilines in toml

tepid crow
#

both work-ish in my experience

hardy viper
#

ive always used '''

hardy viper
hardy viper
weary jungle
#

what does that do?

vivid glade
#

WAIT A MINUTE, GOOD CLUE:
even if i change it to nonsense, the game starts up!

[manifest]
version = "0.0.1"
dump_lua = true
priority = 0

[[patches]]
[patches.pattern]
target = 'main.lua'
pattern = "function totally_real_100precent_love.load()"
position = 'after'
payload = """
print("test!")
"""
match_indent = true```
hardy viper
#

there's also inspectDepth, and jenlib has an infinite depth recursion avoidance one

weary jungle
#

are my values deseased? (what does healthier values mean)

weary jungle
#

so true

tepid crow
#

inspect sucks, use inspectDepth

weary jungle
#

im gonna use tprint

hardy viper
#

inspectDepth also sucks use the jenlib one clearly

tepid crow
#

already made my own egg

weary jungle
#

you can just joker.ability.debuff = true rigt

hardy viper
tepid crow
#

actually didn't you help me rewrite mine or was that someone else

#

oh nope that was Djynasty

hardy viper
#

i don't believe i did

tepid crow
#

you did reply to my tprint though

gaunt thistle
#

no error or anything from lovely?

#

(when the game doesn't start)

vivid glade
#

nope

#

the game DOES start, that's the weird part

#

and there is no error from lovely

hardy viper
#

make the patch file entirely nonsense and see if it panics

vivid glade
#

which means that either my patch is broken, lovely is broken or the game defines totally_real_100precent_love (which i know is not true)

hardy viper
#

in console that is

vivid glade
#

...which it dosent!

INFO - [♥] Lovely 0.6.0
INFO - [♥] Game directory is at "C:\\Program Files (x86)\\Steam\\steamapps\\common\\Switchblade"
INFO - [♥] Writing logs to "C:\\Users\\ilayl\\AppData\\Roaming\\switchblade\\Mods\\lovely\\log"
INFO - [♥] Using mod directory at "C:\\Users\\ilayl\\AppData\\Roaming\\switchblade\\Mods"
INFO - [♥] Initialization complete in 42ms
gaunt thistle
#

it'll print out the paths to the console

vivid glade
#

okay, ima try and update

gaunt thistle
hardy viper
#

ah true

weary jungle
#

ok i made a rune

#

we did it

rough furnace
#

did this before with balatro to see if anything interesting was being loaded

vivid glade
# gaunt thistle it'll print out the paths to the console

just the normal lovely output

INFO - [♥] Lovely 0.6.0
INFO - [♥] Game directory is at "C:\\Program Files (x86)\\Steam\\steamapps\\common\\Switchblade"
INFO - [♥] Writing logs to "C:\\Users\\ilayl\\AppData\\Roaming\\switchblade\\Mods\\lovely\\log"
INFO - [♥] Using mod directory at "C:\\Users\\ilayl\\AppData\\Roaming\\switchblade\\Mods"
INFO - [♥] Initialization complete in 7ms
gaunt thistle
hardy viper
#

peak debugging right here

vivid glade
#

debugging moment

#

certified "this is a dangerous download" period of time

tepid crow
#

anti-virus go brrrr

rough furnace
zenith sage
#

hey sorry to be a bother
i tried running that end of round context through an individual context
and now they proc less often but still more than once

vivid glade
#

and still, normal lovely output

INFO - [♥] Lovely 0.6.0
INFO - [♥] Game directory is at "C:\\Program Files (x86)\\Steam\\steamapps\\common\\Switchblade"
INFO - [♥] Writing logs to "C:\\Users\\ilayl\\AppData\\Roaming\\switchblade\\Mods\\lovely\\log"
INFO - [♥] Using mod directory at "C:\\Users\\ilayl\\AppData\\Roaming\\switchblade\\Mods"
INFO - [♥] Initialization complete in 6ms
zenith sage
#
        elseif context.end_of_round then
            if context.individual and not context.blueprint then
                if self.ability.name == 'Perpetual Stew' then

is this the right order and way to check individual

rough furnace
#

Do I need to go and compile lovely?

tepid crow
zenith sage
#

thank you i will try that

hardy viper
#

you are using if context.individual

tepid crow
#

good point lol

hardy viper
#

i actually prepared for this to happen a day ago

#

i could've told you but i didn't egg

zenith sage
#

yeah i didnt know if it was supposed to be with or against

#

my bad gang

#

but that did it

wintry solar
#

I even wrote it into the context guide 😭

zenith sage
#

theres a context guide??

#

ive just been figuring it out

tepid crow
#

on the steamodded wiki

zenith sage
#

no docs

#

this is most enlightening

weary jungle
#

why is it on 2 pages

rough furnace
vivid glade
#

ima try

weary jungle
#

dont tell me...

#

is it {5,5}?

wintry solar
wintry solar
#

Oh yes

#

Those are numbers for each row

weary jungle
#

dumb dumb smaods and balatew

#

ro

rough furnace
#

oh is my lovely only work on my system

tepid crow
#

it was about half the size of methrul's

vivid glade
zenith sage
#

please mount your machine to the rack

rough furnace
#

I might have just made the most cursed change to my machine to get htis to work

vivid glade
#

oh god what did bro do

hardy viper
#

this lovely build is about 40% the size of the one meth provided

rough furnace
#

mine's release where meth's might be a debug build

hardy viper
#

perchance

vivid glade
#

so it starts up, but then dosent do anything special

rough furnace
#

send logs

gaunt thistle
#

apply_buffer_patches isn't being called

#

which seems to imply that the hooked function is never called

rough furnace
#

different lua version?

vivid glade
# rough furnace send logs
INFO - [♥] Lovely 0.6.0
INFO - [♥] Game directory is at "C:\\Program Files (x86)\\Steam\\steamapps\\common\\Switchblade"
INFO - [♥] Writing logs to "C:\\Users\\ilayl\\AppData\\Roaming\\switchblade\\Mods\\lovely\\log"
INFO - [♥] Using mod directory at "C:\\Users\\ilayl\\AppData\\Roaming\\switchblade\\Mods"
INFO - [♥] Initialization complete in 4ms
gaunt thistle
#

possibly

#

does the game have a lua51.dll?

vivid glade
#

same old same old

vivid glade
tepid crow
#

I've also been trying to lovely patch beatblock files and while most work and create a dump, some do not for some reason. I don't see any pattern in whether it'll dump or not either

rough furnace
#

is it patching but not dumping?

tepid crow
#

ugh that'd be a pain to check

#

uhhh

rough furnace
#

take the build I just send (or probably meth's) and see if the path you're looking for is there

vivid glade
#

it is not

tepid sky
#

wha? but this should be ok right?

vivid glade
#

this is the only thing it's showing, same old same old

INFO - [♥] Lovely 0.6.0
INFO - [♥] Game directory is at "C:\\Program Files (x86)\\Steam\\steamapps\\common\\Switchblade"
INFO - [♥] Writing logs to "C:\\Users\\ilayl\\AppData\\Roaming\\switchblade\\Mods\\lovely\\log"
INFO - [♥] Using mod directory at "C:\\Users\\ilayl\\AppData\\Roaming\\switchblade\\Mods"
INFO - [♥] Initialization complete in 4ms
tepid sky
gritty valley
#

What rank and suit do the cards that marble joker produces have?

tepid crow
hardy viper
weary jungle
#

?

tepid sky
#

ah ._.

#

thanks

vivid glade
#

@rough furnace maybe try to make it always dump (even if nothing was patched)?

rough furnace
hardy viper
#

oh that too

rough furnace
tepid sky
vivid glade
rough furnace
#

well there wouldn't be anything to dump cause it's not hooking properly

#

@vivid glade if you can manually modify a file to get it show some text somehow, can you get the result of string.format("Version %d.%d.%d - %s", love.getVersion())

vivid glade
#

11.5 - mysterious mysteries

rough furnace
#

thats the same build as balatro uses

#

so idk why it wouldn't be working

tepid crow
bronze thunder
tepid crow
bronze thunder
#

i'm just building off of someone's 8 month old texture pack template so i don't really know what that means

mystic river
bronze thunder
bronze thunder
#

what does prefix_config do?

wintry solar
bronze thunder
#

malverk is ungoogleable unfortunately

wintry solar
weary jungle
#

i just realized how much whitespace i have here? what was i doing??

tepid sky
#

DAYUM

#

thats one big block

bronze thunder
#

yurrrp

tepid sky
#

rip 🙏 I tried to give 3 voucher the same requirement 😭

zenith sage
#

is there a consistent cause for
card.lua:254 attempt to index local variable center with nil value
where i can be like "oh that means i did ___ wrong"

hardy viper
#

uhm

#

what's the actual error

zenith sage
#

damn now i gotta launch the game

hardy viper
#

that doesn't seem like a real error

zenith sage
#

yeah i wrote it from memory its worded poorly

hardy viper
#

attempt to index a nil value and attempt to index value with nil are two very different things

hardy viper
zenith sage
#
INFO - [G] 2024-12-11 13:23:50 :: ERROR :: StackTrace :: Oops! The game crashed
card.lua:254: attempt to index local 'center' (a nil value)
Stack Traceback
===============
(1) Lua local 'handler' at file 'main.lua:590'
        Local variables:
         msg = string: "card.lua:254: attempt to index local 'center' (a nil value)"
         (*temporary) = Lua function '?' (defined at line 39 of chunk [SMODS _ "debug/debug.lua"])
         (*temporary) = string: "Oops! The game crashed\
hardy viper
#

you can just post the lovely dump

wintry solar
#

Some context as to what you’re trying to do would help too

zenith sage
#
                elseif self.ability.name == 'Magi' then
                    if self.ability.extra.round >= self.ability.extra.req then
                        self.ability.extra.round = 0
                        self.ability.extra.req = self.ability.extra.req + 1
                        self.ability.mult = self.ability.mult + self.ability.extra.mod
                    else
                        self.ability.extra.round = self.ability.extra.round + 1
                    end
                end

this is what i changed before it crashed
attempt to start challenge with the joker who uses this code

hardy viper
zenith sage
#

i think i figured it out

#

challenge had outdated name so it was attempting to give a joker that did not exist

hardy viper
#

figures yeah im just wondering why that happened in set ability and not create card

wintry solar
#

The game uses set ability to determine what joker it is

zenith sage
#

that makes sense

nocturne garnet
#

Fake...

#

Photoshopped...

zenith sage
#

pretty neat

#

a shame that theres no way make it display upgrading the correct hand type but thats a creative idea

nocturne garnet
zenith sage
#

even cooler

#

you should update when you get that working

zenith sage
#

i have one more foolish question, and forgive me for being a noob
i had a joker that is supposed to add mult (and im like 99% sure it was working before)
which displays that it should on the card, and h_mult is the correct number
but it simply does not

nocturne garnet
#

a joker that adds mult to a playing card

#

if so h_mult is mult that is given when the card is held

zenith sage
#

no like

#

it should just add mult

#

and it doesnt

#

like to your score

#

and im fairly certain it was before

#

in fact i have 2 jokers that do that in different ways and both stopped working recently

nocturne garnet
#

show the code.....

zenith sage
#

yessir

#
        elseif context.individual then
            if context.cardarea == G.play then
            end
            if context.cardarea == G.hand then
                if self.ability.name == "Coup D'etat" then
                    local temp_Mult, temp_ID = 0, 0
                    local raised_card = nil
                    for i=1, #G.hand.cards do
                        if temp_ID <= G.hand.cards[i].base.id and G.hand.cards[i].ability.effect ~= 'Stone Card' then temp_Mult = G.hand.cards[i].base.nominal; temp_ID = G.hand.cards[i].base.id; raised_card = G.hand.cards[i] end
                    end
                    if raised_card == context.other_card then 
                        if context.other_card.debuff then
                            return {
                                message = localize('k_debuffed'),
                                colour = G.C.RED,
                                card = self,
                            }
                        else
                            return {
                                h_mult = 2*temp_Mult,
                                card = self,
                            }
                        end
                    end
                end
            end
                ...
#
    add_item(MOD_ID, "Joker", "j_coup", {
        unlocked = true,
        discovered = true,
        rarity = 2,
        cost = 5,
        name = "Coup D'etat",
        set = "Joker",
        eternal_compat = true,
        config = {
        },
    }, {
        name = "Coup D'etat",
        text = {
                "Adds {C:attention}double{} the rank",
                "of {C:attention}highest{} ranked card",
                "held in hand to {C:red}Mult"
        }
    });
#

and no local vars

nocturne garnet
#

probably

zenith sage
#

huh

#

i could be stupid but im certain they must have changed that in an update

nocturne garnet
#

not correct

#

is this old steamodded or something

#

wth is "add_item"

hardy viper
#

probably 0.9.8 yeah

zenith sage
#

i started writing this like 6+ months ago

rough furnace
#

add_item could be a custom function

zenith sage
#

in fact i think balatro didnt even use steammodded at the time

rough furnace
#

tbh this feels like it's even before SMODS 0.9.8

#

the era before SMODS had a joker api

#

and every joker mod broke every other joker mod

zenith sage
#

yeah

#

i remember bunco and morefluff were incompatible

gaunt thistle
#

and mods modified the executable directly

#

scary times

rough furnace
#

I rember when the first step in troublshooting crahses was asking if they had JellyMod installed

zenith sage
#

i do remember this

#

tried it and immediately deleted it

#

so do i need to like

#

restart entirely

rough furnace
#

That is the sole reason I added mod list to the crash handler

zenith sage
#

is my code so outdated its not worth iterating on

mystic river
rough furnace
#

to be fair it won't be that hard to transfer this format to SMODS 1.0.0 formart

#

if you did want to do it

#

the calcualte is probably just fine

azure bane
#

how do i copy crash text?

#

i want ALL of it

rough furnace
#

ctrl + c

#

or go into the lovely log in Mods/lovely/logs

bronze thunder
#

oh it's because of the atlas table names

#

okay everything except the seals are working again

frosty dock
bronze thunder
bronze thunder
frosty dock
#

you can change the atlas, it just doesn't affect the sprites that already exist

bronze thunder
#

why not

#

what makes seal sprites different

frosty dock
#

the game creates a Sprite object once and then just keeps using it, so you need to reassign that object if you change the atlas, otherwise it won't take effect

#

it's kept in G.shared_seals

bronze thunder
#

and that only applies to the seals?

#

that seems like a strange decision so i have to ask to make sure i'm not just doing things wrong

rough furnace
#

I know soul does something similar for it's soul

frosty dock
#

iirc it's also stickers

#

truly a thunk moment

bronze thunder
bronze thunder
wintry solar
#

That’s why Malverk is bis 😉

bronze thunder
#

the stickers actually do seem to be working right out of the bat

bronze thunder
rough furnace
#

could just bundle it in your download like cryptid with SMODS and talisman

wintry solar
#

It also has the benefit of giving users customisation within your texture pack and the option of using additional ones, whilst your method doesn’t really allow that

wooden nexus
#

Liking how this turned out

#

I ported my card fronts from my game over to Balatro for fun

zenith sage
#

but one of the first things i notice

#

is the function to generate the card ui box no longer necesary?

exotic hedge
#

Are there any mods that have branching level two vouchers? Like you can choose 1 of 2 level 2 vouchers for different effects on each

#

My friend is tryna implement it and we have no idea how to do it 💔

nocturne garnet
#

no idea

#

i dont use their mods

rough furnace
#

I'm not too familiar with vouchers but see if they have an in_pool or whatever

edgy reef
tepid sky
#

atp? 😭

edgy reef
#

dw we still finding edgecases where centers don't respect in_pool (see hidden consumables PR)

#

In fact it should be everything after that PR.

tepid sky
#

hmm

#

i love it whenever smods gets a update :D

frosty dock
wintry solar
#

I noticed the config file seems to have gone missing, won’t that break fresh installs?

lyric urchin
#

Hi, is there any updated modding documentation for Steamodded?

teal estuary
#

its being updated, not all of it

#

but theres some big gains (LIKE CONTEXTS)

frosty dock
#

trying to get some more of it done to move to a beta release

nocturne garnet
#

like extra context types for jokers?

#

you know you can make your own right

teal estuary
#
  1. you can WHAT
#
  1. the documentation for contexts
nocturne garnet
teal estuary
#

good to know

weary jungle
#

G.GAME.blind.chips = G.GAME.blind.chips * (1 + (card.ability.extra.BlindInc / 100)) do i have to tobig() some stuff?

zealous glen
teal estuary
#

i shall, i usually use prefixes anyway (apart from joker keys, because no need too)

zealous glen
#

Joker keys get them automatically

#

I think usually Steamodded appends prefixes to keys automatically

wintry solar
nocturne garnet
#

@tepid sky example joker: only appears if you have 0 joker slots

SMODS.Joker{
    key = 'rarest',
    loc_txt = {
        name = "Rarest Joker",
        text = {
            "Only appears with", '0 Joker slots'
        }
    },
    rarity = 4,
    cost = 50000,
    blueprint_compat = false,
    eternal_compat = true,
    perishable_compat = true,
    in_pool = function(self)
        if G and G.jokers and #G.jokers.cards == 0 then
            return true
        end
        return false
    end,
}```
#

this is how you use in_pool

tepid sky
#

whats wawa 😭

#

but thats easy then-

nocturne garnet
tepid sky
#

lol

#

damn

nocturne garnet
#

its supposed to be card

tepid sky
#

random question, do you know if smods find card can also find a voucher?

nocturne garnet
#

i honestly just forgot what was used in in_pool

tepid sky
#

damn

nocturne garnet
tepid sky
#

ooh thanks!

tepid sky
teal estuary
#

wh

#

i was about to ask what wawa and wawa2 meant, but it dissapeared :(

tepid sky
#

not usefull

#

apparently

teal estuary
#

:(

nocturne garnet
#

so i just

teal estuary
#

fair enough 😭

nocturne garnet
#

replaced it with wawa and wawa2

nocturne garnet
teal estuary
#

got a question, how could you effect the shop price of things with a joker? im not sure what the thing you'd call for it would be 😭

tepid sky
nocturne garnet
tepid sky
#

thats why i asked

zealous glen
tepid sky
#

otherwise i would've lol

teal estuary
#

well, everything in shop

nocturne garnet
tepid sky
#

real

zealous glen
#

Keep an eye out for the correct ordering inside the function whether you hook or inject into it

#

Also if you want it to apply immediately you might need to recalculate the prices of shop items although future items should automatically update

#

Balance-wise, I think the discount could be higher

nocturne garnet
#

or hook...

hardy viper
#

naw don't think you can there

zealous glen
#

I think it’s one where you usually need to inject

hardy viper
#

pretty sure it doesn't return just does everything in the function

zealous glen
#

Because of how it works internally

nocturne garnet
hardy viper
#

not unless the text uses a ref value

#

which i doubt

nocturne garnet
zealous glen
zealous glen
#

And so you need to add some changes to the right place if you want them to work

nocturne garnet
#

just the cost

hardy viper
#

regardless in this instance a patch is better for readability/visibility/debugging/etc

#

/performance egg

#

those 8 cpu instructions are gonna save a lot of time trust

weak depot
#

is there a function like "SMODS.upgrade_hand(hand)?" something that would just upgrade any hand input

#

and if not, how would one go about upgrading a specified hand

zealous glen
#

See how Planets and Astronaut do it

rough furnace
#

@tepid sky do vouchers have an in_pool function? If so just check there. Theres a few edge cases such as if both are spawned such as using a voucher tag, but that is probably ignorable

weak depot
tepid sky
weak depot
wintry solar
zenith sage
#

so when converting to smods format, should i move my calculate code into each joker? or does it not matter

rough furnace
#

yeah you should. I assume right now you're hooking card.calculate_joker and it's not very compatible rn

zenith sage
#

heard

#

i also have a hook on card:is_suit

#
function Card:is_suit(suit, bypass_debuff, flush_calc)
    if flush_calc then
        if next(find_joker('Plaid Joker')) and (self.base.suit == 'Hearts' or self.base.suit == 'Spades') == (suit == 'Hearts' or suit == 'Spades') then
            return true
        end
        if next(find_joker('Plaid Joker')) and next(find_joker('Smeared Joker')) then
            return true
        end
        return self.base.suit == suit
    else
        if self.debuff and not bypass_debuff then return end
        if next(find_joker('Plaid Joker')) and (self.base.suit == 'Hearts' or self.base.suit == 'Spades') == (suit == 'Hearts' or suit == 'Spades') then
            return true
        end
        if next(find_joker('Plaid Joker')) and next(find_joker('Smeared Joker')) then
            return true
        end
        return self.base.suit == suit
    end
end
#

should that go in that jokers section reformatted or stay outside like so

hardy viper
zenith sage
#

i see

teal estuary
#

the only reason it starts at 0.1 is because of its reference

weak depot
wintry solar
#

Look at how the game does it

rough furnace
#

intresting

weak depot
# wintry solar Look at how the game does it

i'm trying, but i'm sure how to get update_hand_text({sound = 'button', volume = 0.7, pitch = 0.8, delay = 0.3}, {handname=G.GAE.current_round.most_played_poker_hand,chips = G.GAME.hands[text].chips, mult = G.GAME.hands[text].mult, level=G.GAME.hands[text].level}) to target G.GAME.current_round.most_played_poker_hand.

full code:

enhancement.calculate = function(self, card, context, effect)
    if context.cardarea == G.play and not context.repetition then
        if pseudorandom(self.key) < G.GAME.probabilities.normal/self.config.rand_planet_odds then
            update_hand_text({sound = 'button', volume = 0.7, pitch = 0.8, delay = 0.3}, {handname=G.GAE.current_round.most_played_poker_hand,chips = G.GAME.hands[text].chips, mult = G.GAME.hands[text].mult, level=G.GAME.hands[text].level})
            level_up_hand(self, G.GAME.current_round.most_played_poker_hand, true)
            sendInfoMessage("Cosmic roll succeeded", "Shellular's Deck of Cards")
        else
            sendInfoMessage("Cosmic roll failed", "Shellular's Deck of Cards")
        end
    end
end
wintry solar
#

change text to G.GAME.current_round.most_played_poker_hand

zenith sage
#

is

return {
    message = 'Upgraded!',
    colour = G.C.MULT,
    card = card
}

more up to date than

G.E_MANAGER:add_event(Event({
    func = function() card_eval_status_text(card, 'extra', nil, nil, nil, {message = localize('k_upgrade_ex')}); return true
    end}))
return
nocturne garnet
#

i mean you can still do it

#

but like

#

would you rather do that

zenith sage
#

no true

#

thank you

#

what would be the check for cards with editions, as to #G.jokers.cards for jokers

nocturne garnet
hardy viper
#

if you want cards then you can loop through every area

worldly moss
#

ok so im having issues figuring out how the HELL im supposed to make a custom deck...

#

I was able to just raw edit the exe code to put a deck in the game, but I want to make it into an actual mod

worldly moss
#

is there any specific function im supposed to put this in?

#

game:start_up?

rough furnace
#

in your steamodded mod

fading pier
#

If I wanted to make it so if I sold the joker "x" it would give -1 ante for example how could I achieve this? I wasn't sure what the effect or variable for that would be.

rough furnace
#

ease_ante probably

fading pier
#

thanks!

hardy viper
fading pier
#

thank you

stiff locust
worldly coyote
#

Hello! Are the example mods intended to work out of the box? (Assuming they are copied out of the example_mods dir and into the root /Balatro/Mods/... dir)

I'm trying to diagnose why I'm unable to load mods.

I believe that the lovely injection is happening because if I've only ever gotten the console to launch when the injected version.dll is present alongside the the other Balatro binaries.

The lua files for the mods are located at the directory specified in the logs so I'm not sure what I'm missing

hardy viper
#

some do not work anymore

#

which one are you specifically trying to use

worldly coyote
#

I've tried the shipped

--- MOD_NAME: CustomKeybinds
--- MOD_ID: CKeybinds
--- MOD_AUTHOR: [stupxd]
--- MOD_DESCRIPTION: Custom keybinds example!
--- DEPENDENCIES: [Steamodded>=1.0.0~ALPHA-0812d]
--- STEAMODDED HEADER
--- MOD_NAME: Achievements Enabler
--- MOD_ID: AchievementsEnabler
--- MOD_AUTHOR: [Steamo]
--- MOD_DESCRIPTION: Mod to activate Achievements
--- DEPENDENCIES: [Steamodded>=1.0.0~ALPHA-0812d]

And I've also tried this third-third party (lol) keybind mod
https://github.com/DorkDad141/keyboard-shortcuts/blob/main/keyboard_dorkdad.lua

#

If the console launches is that a fair assumption that injection occurred? Is there a debug flag to get more information from the logs?

hardy viper
#

just realized lol

worldly coyote
pearl bane
#

can loc_txt be changed per card?

#

as in, I want to change the description of a joker after it's added to the deck

tepid crow
#

you can dynamically update loc_txt yes

pearl bane
#

in add_to_deck?

#

also how to do a joker pop up/wiggle/message in add_to_deck?

tepid crow
#

You probably could update it within add_to_deck. I wouldn't do that though

pearl bane
#

I mean I can just put a ternary to choose between nil and the text I want ¯_(ツ)_/¯

tepid crow
frosty dock
#

loc_vars to change the keys is preferable to anything else

#

changing loc_txt doesn't do anything because it doesn't update localization

tepid crow
#

(you could try to update and reparse loc_txt if you're a masochist)

pearl bane
#

hmmmm
the problem is that I want it to have an entirely new text

tepid crow
#

DID YOU READ THE DOCS I LINKED

frosty dock
mellow sable
#

loc_vars lets you change the loc_txt you use on the fly

#

you can return a completely different key to use

pearl bane
mellow sable
#

it's how I set it up with Cryptid's gameset system

tepid crow
# pearl bane YES I DID

what do you think

You can force the use of a different description entirely (key).
means???

mellow sable
#
loc_vars = function(self, info_queue, center)
        local gameset = Card.get_gameset(center)
        if gameset == 'disabled' then gameset = 'mainline' end --still show description
        return { vars = { center.ability.extra.chips }, key = "j_cry_test_"..gameset }
    end,
#

then I have loc_txt for j_cry_test_mainline, j_cry_test_madness, etc.

#

you also need to use the localization file system for that

frosty dock
#

what is that arg naming

mellow sable
#

idk, that's how I have it set up :jimball:

pearl bane
#

oh ok thanks

frosty dock
#

naming a Card object center is hideous

pearl bane
#

is this additional tooltip done by appending to info_queue?

tepid crow
pearl bane
#

wait so does SMODS work localization out or should I implement code for it?

frosty dock
pearl bane
#

under descriptions?

#

yeah got it thx

fading pier
#

I have this code for a basic joker but in game it looks like this. Is there something wrong with my assets?

cerulean rose
#

you haven't discovered it yet?????

rough furnace
#

yeah you have to discover it

#

you can press 2 to do so

#

since you have DebugPlus

fading pier
#

I tried to set it so it should be discovered by default

#

the other jokers work like that. Or if I load mods they are all available right away

#

if I discover it using the debug mod the art is replaced with the regular jimbo

edgy reef
#

Please don't tell me I screwed up yet another PR

#

Oh no I think I did

#

😭

#

ON THE DAY OF MY FINALS OF ALL TIMES TO NOTICE

swift saffron
#

wait im new to love2d, does it hotload? like if i change text, will it change while the game is open?

mystic river
#

i don't believe so

edgy reef
#

You'd need to use a specific function in DebugPlus to do that (not built into Balatro nor Steamodded).

weary jungle
#

oh it is mb

swift saffron
#

dang, it would be helpful if textures were steamed live, or at least an option to enable that, so texture packs would be a bit easier

orchid thunder
#

can you lovely patch into another mod?

elder vapor
#

nope?

tepid crow
#

I think lovely 0.6.0 might have support for it?

wooden nexus
#

How do I fix this, if possible

#

this is for something else but you ain't gonna see what it's actually for

#

I'm using all this as temporary stuff

rough furnace
short jasper
#

Are there any in depth guides on youtube or other sites that can help me start out making a mod that people could share?

cold peak
#

This was working to animate the soul portion of the soul card before the update/before I pulled new steammodded (I did both at the same time because I'm silly) but now its not (just the default soul icon)

AnimatedElements = {}

local soulAtlas = SMODS.Atlas {
    key = "soul",
    path = "slime_soul_trans.png",
    px = 71,
    py = 95
}

--Update animated sprites
local upd = Game.update

function AnimatedElements.update_soul(dt, anim)
    local next_frame = false

    if anim.initiated then
        G.shared_soul = Sprite(0, 0, G.CARD_W, G.CARD_H, soulAtlas, { x = 0, y = 0 } )
        anim.initiated = true
    end

    if not G.shared_soul.t then G.shared_soul.t = 0 end

    G.shared_soul.t = G.shared_soul.t + dt
    if G.shared_soul.t > 1/(anim.fps or 10) then
        G.shared_soul.t = G.shared_soul.t - 1/(anim.fps or 10)
        next_frame = true
    end

    if next_frame then
        local loc = G.shared_soul.sprite_pos.y * getRow(anim) + G.shared_soul.sprite_pos.x + 1

        if loc >= anim.frames then 
            loc = 0 
        end

        local pos = { x = loc % getRow(anim), y = math.floor(loc / getRow(anim)) }
        G.shared_soul = Sprite(0, 0, G.CARD_W, G.CARD_H, soulAtlas, pos)
    end
end

function Game:update(dt)
    upd(self,dt)

    for jkr, anim in pairs(anims) do
        if anim.play then
            if jkr == 'anim_c_soul' then AnimatedElements.update_soul(dt, anim)
            else AnimatedElements.update_frame(dt, jkr, anim, G.P_CENTERS[jkr]) end
        end
    end
end
placid frigate
#

Don't know why I'm getting an error when playing cards and crashing when playing heart cards could someone help me

pearl bane
#
    calculate = function (self, card, context)
        if G.GAME.blind.in_blind and context.selling_card then
            ease_dollars(card.ability.extra.dollars)
            G.GAME.dollar_buffer = (G.GAME.dollar_buffer or 0) + card.ability.extra.dollars
            return {
                message = localize('$')..card.ability.extra.dollars,
                dollars = card.ability.extra.dollars,
                colour = G.C.MONEY
            }
        end
    end,

any reason this is not making a pop-up?

frosty dock
#

use card_eval_status_text or SMODS.eval_this

pearl bane
#

hold on, is selling_card when the joker itself is sold or when any other card is sold?

#

SMODS.eval_this
Funny looking name

hidden timber
#

Should I create a repo, where every mod for Balatro should be listed? So like an Index, which the Balatro Mod Manager could use

pearl bane
#

the WHAT

hidden timber
#

And so its filled with JSON files (or something else) and a thumbnail file, looking like this:

{
  "title": "Extended Cards",
  "category": "Gameplay",
  "repo":"https://github.com/joemama/extended-cards",
  "downloadURL": "https://github.com/joemama/extended-cards/releases/latest/extended-cards.tar.gz",
}
spare elk
#

oh yeah i remember hearing about the balatro mod manager

#

yeah that could be cool

tidal edge
#

i dont have a mod but im answering yes to drive up votes

pearl bane
#

BROTHER WHAT IS THE <- OPERATOR BRUH

hidden timber
hardy viper
#

but it's usually an assignment operator

pearl bane
pearl bane
hardy viper
#

x <- 3

pearl bane
#

text = (amt <-0.01 and '-' or '')..localize("$")..tostring(math.abs(amt))
vanilla code btw

#

oh yeah got it

hardy viper
#

amt < -0.01

pearl bane
#

oh lol

#

stupid ligatures

frosty dock
frosty dock
hidden timber
hardy viper
#

ah wait

#

im thinking of another person nvm

#

aure is indeed active i lied

frosty dock
hardy viper
#

yeahhhh

#

forgor....

#

anyways ofc nobody contributes to that because nobody knows about it

hidden timber
#

@frosty dock Would you be able to maintain it?

frosty dock
#

it's set up in a way where I don't really need to, at least not constantly. it has workflows set up to auto-merge PRs

#

github restricts workflow runs for new users at minimum so it's not fully automatic, but I can handle that

#

I can also add more maintainers

hardy viper
#

balatro elves

frosty dock
frosty dock
frosty dock
hidden timber
frosty dock
#

it doesn't have to match exactly, but I still think it's convenient to have common fields use matching keys so you can just throw in the same file

#

not to mention most mods use steamodded, and almost all others just use lovely

#

do as you please though, my repo is not populated so there's not much of an advantage of using it over anything else

#

use any workflow code from it if you want

hidden timber
#

Thanks, will look into it

crisp coral
#

how do you pass vars into an info_queue of any card again

hardy viper
#

ive proudly never touched an info_queue

crisp coral
#

okay i have thought of a workaround

#

AND GUESS WHAT TIME IT IS

#

THAT'S RIGHT WELCOME BACK TO NODES[1] HELL

hardy viper
#

so real

hidden timber
#

@orchid cargo Is there a way to contact localthunk? I know he wouldn't reply on discord, but something like an email or contact to his manager?

crisp coral
weary jungle
#

how would i make an edition that doesnt allow the joker to be blueprinted

#

i think it would be like context manipulation right

gritty valley
#

I'm pretty sure you'd just have to change blueprint_compat to false on the joker

#

Though the issue is changing it back to it's previous value when the edition is removed

crisp coral
#

that only changes the display, the blueprint check needs to be manually changed

gritty valley
#

Oh wait you could just prevent the blueprint context from ever being passed down actually

#

When a card has the edition

crisp coral
#

mhm

gritty valley
#

But you'd probably also have to change the blueprint check func if you want the UI to make sense

gritty valley
weary jungle
#

do i use lovely here...

#

this seems like a lovely thing

gritty valley
#

Yeah?

#

Lovely isn't hard it's basically just find and replace/append

hardy viper
#

lovely is easy until you need to do a regex patch

#

at which point i start hating myself

crisp coral
#

lovely regex is 90% "did i miss a dot" and 10% actual regex

maiden phoenix
#

1% "Screw you Cryptid"

gritty valley
crisp coral
#

regexr does NOT help when your pattern looks like this

gritty valley
#

Ok 1. Font hell 2. Wtf is that for

crisp coral
#
  1. i love 04b03
  2. support for blinds with more than 2 lines of description
gritty valley
#

Non monospaced bitmap font gddeadinside

crisp coral
#

cry

gritty valley
#

I am

hardy viper
crisp coral
#

so true

orchid cargo
gritty valley
#

Where the fuck is the odds field on a tag's config used

#

I'm going insane how are tags made rarer

tepid crow
#

odds might be from when tags had a chance to nope on you

#

really unpopular mechanic, so thunk removed it

#

there are still other remnants of it in the code too

gritty valley
#

Wait do all tags have equal pull chances

tepid crow
#

some can't show up in ante 1 but apart from that yeah I believe so

gritty valley
tepid crow
#

some tags also have unlock conditions that the game doesn't tell you about :))))

gritty valley
tepid crow
#

ah, nice. pretty sure the wiki also mentions that all tags are equally likely though

tepid crow
#

fun fact

gritty valley
#

Huh that is such a weird design idea

tepid crow
#

yeah that's the one

gritty valley
#

Time to add it back trollface

weary jungle
#

how do i make a edition not able to be removed

#

i dont think it really matters

#

ok nvm im not doing that

#

this works for ui right

frosty dock
weary jungle
#

how do i save whether a joker was blueprintable per joker

#

is there anywhere that has a base that i can refrence?

frosty dock
#

it's just baked into the calculate function, there's no way to change it dynamically for any given joker the way it's set up

weary jungle
#

no like the blueprint_compat

#

there is a base for the jokers right

hardy viper
#

hook calculate_joker and just make it return nil if context.blueprint

weary jungle
#

yea but on_remove it has to be set back to original blueprint_compat

nocturne garnet
#

i hate it

#

i hate ui

tepid sky
#

i love ui, not the making of it 😫

weary jungle
#

how do i check if a joker is blueprint compatible without spawning it

wintry solar
#

I wonder if building in a blueprint compat check to the blueprint context calls would make sense

weary jungle
#

i mean it would make more sense

#

but i think it rarely comes up

#

when does blueprint_compat really differ from what the modder inteded?

#

where is the joker caluation files

#

i found it

#

so id append the function like if context.blueprint and joker edition == pure then return nil end?

#

also what is the context for retriggers

teal estuary
#

context.repetition?

hardy viper
#

^

weary jungle
#

ok it did not work

hardy viper
#

post code

weary jungle
#
if (context.blueprint or context.repitition) and (self.ability.edition and self.ability.edition.e_TGTM_Purified) then return nil end``` After lovely patch
#

maybe i messed up the edition

hardy viper
#

repetition

#

not repitition

weary jungle
frosty dock
#

repetitititition

weary jungle
#

how do you check for a modded edition

frosty dock
#

iirc you check edition.key

weary jungle
#

ok so thats what i messed up

zenith sage
#

message just displays "error"
in my infinite wisdom i have determined that the "x_mult" key does not exist
however i am too lazy to scour the smods docs for the localization keys

#

        if context.joker_main then
            return {
                x_mult = card.ability.x_mult,
                message = localize { type = 'variable', key = 'x_mult', vars = { card.ability.x_mult } }
            }
        end
#

what perchance might be the key for displaying xmult

teal estuary
#

isnt it a_xmult?

zenith sage
#

that would make sense

teal estuary
arctic lion
#

how can i check how much money the user currently has?

maiden phoenix
#

G.GAME.dollars

arctic lion
#

thank

nocturne garnet
#

thank

vivid forge
#

thunk

arctic lion
#

i'm trying to raw dog my code but i gave up with the wild goose chase of trying to find variable names

rough furnace
#

If you want to test variables DebugPlus's eval is handy for that

arctic lion
#

i haven't fully utilised it yet, only to unlock and spawn my joker

#

baby steps

nocturne garnet
#

thunks

#

localthunks for helping

rough furnace
#

thunk you

autumn coral
#

hi guys can i change the meta for mods rq

#

reading save files is the new meta apparently

#

yes it actually works

#

i need to set in the config though i want it to be configurable per save file

#

some cards are going to be locked behind certain completion marks from isaac as well

arctic lion
#

has anyone done time/date cards yet, bonuses based on time of day or day of the year

#

seasonal bonus jokers lmao

autumn coral
#

probably honestly

#

tbh though the isaac save data was a PAIN in the ASS to get lol

arctic lion
#

halloween joker that has a mediocre buff on normal days but halloween it's CRACKED

autumn coral
#

it's all byte data 💀

arctic lion
#

obviously you could cheese it but like fundamentally speaking not crazy right

#

surely there's a lua library out there already that gets time and date then it's just fiddling with whatever output

rough furnace
arctic lion
rough furnace
#

yeah theres a lua api

arctic lion
#

knew it

#

why do the heavy lifting when someone else has done the work already better than you ever could

rough furnace
#

you can do this os.date("%d%m") == "2412" for example for christmas day

arctic lion
#

i might have a fiddle see how far i can take it

tepid crow
arctic lion
#

so many silly ideas bouncing around in my head based on time, like a night owl card that becomes more powerful depending on how late at night it is

#

or a card that buffs a card based on what time it is, so 3pm would buff 3s

autumn coral
#

can you make a joker usable like a consumable?

#

like specifically i need the "use" tab

#

i probably have to patch the main game tbh

rough furnace
#

Irs been done but yeah I think you need a loclwt parch

wintry solar
#

whats the dependcy string for a specific smods version in the manifest file?

autumn coral
#

has it been done*

#

it'd be nice to just reference someone else's code lol

wintry solar
#

the one I just pushed xD

#

I got it working by just throwing the whole version string in there

#

(>=1.*) didn't work though

frosty dock
#

yeah that only covers non-beta versions

wintry solar
#

I might be misunderstanding the ordering of versioning though

#

ah right yeah

frosty dock
#

you can always put >= the specific version to be precise

wintry solar
#

so "Steamodded (>=1.0.0~ALPHA-1213a)" this is the way to do it?

frosty dock
#

yep, no more concise way to require a specific version or newer

rough furnace
wintry solar
#

that's cool

rough furnace
#

I've just seen screenshots a long time ago with stuff

wintry solar
#

it's not like it affects anyone else

frosty dock
#

if you're not as particular, could go for (>=1~)

#

I guess that's implicitly >= the recent json dep change

#

as previous versions will fail to recognize it

rough furnace
#

I forget does >=1.0 match 1.1~

worldly moss
#

bro why does deck adding have to be confusing....

#

Im seeing people use stuff that Im seeing NO where in the wiki

#

all the mods ive seen that are decks are all using the deprecated sprite stuff and the SMODS.Deck instead of Back so I have no clue what to base any of this on

#

the docs tell me a good amount, but theres little things missing that make it a lot harder

#
function SMODS.INIT.SoulDeck()
    local soulback = SMODS.Atlas('SoulBack',
        71,
        95,
        'SoulBack.png'
    )
    local souldeck = SMODS.Back('Soul Deck',
        {name = 'Soul Deck', text = {'A Really Stupid Deck.'}},
        config = {},
        pos = {x=0,y=0},
        atlas = 'SoulBack',
        unlocked = true,
        discovered = false
    )
end

This is about what I have for what I think it should look like?? I dont really know cause I havent loaded it but

autumn coral
#

i got it to work btw

weak depot
#

am i going insane or should this work? it's getting mad at the set_ability thing but i don't know what i'm overlooking. is there a different thing for putting in custom enhancements that i'm missing?

consumable.use = function(self, card, area, copier)
    for i = 1, #G.hand.highlighted do
        G.hand.highlighted[i]:set_ability(G.P_CENTERS.cosmic, nil, true)
    end
end
crisp coral
#

prefix?

weak depot
#

so G.P_CENTERS.sdoc_cosmic?

crisp coral
#

presumably, i don't know much about enhancements

weak depot
#

okay, i'll try it

frosty dock
weak depot
#

shoot, okay

#

THERE WE GO

#

thank you so much :>

#

ironically i tried both m_ and sdoc_ seperately

tepid crow
worldly moss
#
function SMODS.INIT.SoulDeck()
    local loc_def = {
        ["name"] = "Soul Deck",
        ["text"] = {
            [1] = "A Really Stupid Deck",
        },
    }
    local mymod = SMODS.findModByID("SoulDeck")
    local soulSprite = SMODS.Sprite:new("soulSprite", mymod.path, "SoulAtlas.png", 71, 95, "asset_atli")
    local soulConfig = {hand_size = 75, joker_slot = 100, consumable_slot = 100, dollars = 100, spectral_rate = 100, consumables = {"c_soul", "c_soul", "c_soul", "c_soul", "c_soul", "c_soul", "c_soul"}}
    local soulDeck = SMODS.Deck:new("Soul Deck", "souldeck", soulConfig, loc_def)
    soulDeck:register()
    soulSprite:register()
end
#

ended up with just that

frosty dock
#

well this is 0.9.8 code

#

which 1.0 still supports, but it's heavily deprecated

tepid crow
#

yeah you probably shouldn't be using 0.9.8

frosty dock
worldly moss
#

ah alright, I had just kinda ran with 0.9.8 since R2 never got 1.0 for whatever reason

wintry solar
#

people are also very unlikely to help you with 0.9.8 code

frosty dock
#

also given only OG modders (like myself being heavily involved with its development) actually know the ways of 0.9.8, it's hard getting support for it

#

most of the time even I won't be willing to help with it, it's just that terrible in several ways

worldly moss
#

I feel like I need more explanation as to what the atlas thing is

#

I feel like im not understanding something thats trivially easy but im just glancing over it?

#

like im seeing people using sprites in 0.9.8, and im understanding that, but atlases im just kinda blank on

frosty dock
#

SMODS.Sprite in 0.9.8 and SMODS.Atlas in newer versions have the same purpose

#

it's just that the old version was poorly named, so we changed it

#

both are just sprite sheets

worldly moss
#

so in the backs, where it says atlas = 'centers',, if im using a custom sprite, what would I do wit hthat??

#

cause I cant tell if centers is like a global atlas for all the base game content?

frosty dock
#

there's several base game atlases. you can find the corresponding files by extracting the game executable with 7-zip

#

somewhere in the code, there's a section that relates these file names to atlas keys

#

0.9.8 docs have a reference, actually

worldly moss
#

so If I wanted to make my own atlas, it would just be lua SMODS.Atlas{ key = "soulAtlas", px = 71, py = 95, path = "SoulAtlas.png" }

#

then plug soulAtlas in for the key in the SMODS.Back?

#

or

#

not the key

#

the atlas

frosty dock
#

yeah

worldly moss
#

oh alr, cool

frosty dock
#

note that you can't regularly specify base game atlases this way without an additional argument, this is needed to avoid conflicts

#

also means you don't need to worry about your keys being unique from other mods (that was not the case in 0.9.8)

worldly moss
#

alrighty, thank you!

frosty dock
# worldly moss ah alright, I had just kinda ran with 0.9.8 since R2 never got 1.0 for whatever ...

just saw i forgot to answer this. mostly the reason is that thunderstore was always kind of unpopular with our modding community, and even if we started uploading newer versions of steamodded, it won't work because it needs a newer version of lovely than is present on there (not a huge deal admittedly, we could always ask metherul to update), but also it's been in ongoing (alpha) development for a while and maintaining that on TS would mean always having to keep it updated or have people use outdated versions

worldly moss
#

oh so do I also need to install the newer lovely?

frosty dock
#

yeah, steamodded doesn't strictly require the very latest version feature-wise, but the one on r2mm is way too ancient

arctic lion
#

ok yeah very simple to set up

worldly moss
#

one day of the year is REALLY op... other than that its a ok joker

arctic lion
#

obviously very niche but could be balanced, especially with having them appear conditionally

#

could always add a special card that let's you change your season

worldly moss
#

oh ! doesnt work as a not in this framework

#

whoopsies

arctic lion
#

yep made that mistake seconds ago haha

worldly moss
#

if == !Halloween then return false end

arctic lion
#

i'm rusty on my lua, the formatting has really jumbled my wires

arctic lion
worldly moss
#

honestly this lua framework scared me for a minute, but looking at it for a bit it got easier on the eyes

arctic lion
#
    calculate = function(self, card, context)
        local current_date = os.date("*t", os.time())
        local is_halloween = (current_date.month == 10 and current_date.day == 31)
        if context.joker_main and is_halloween then
            return {
                message = localize{type='variable', key='a_xmult', vars = {card.ability.extra.halloween_Xmult}},
                Xmult_mod = card.ability.extra.halloween_Xmult
            }
        elseif context.joker_main and not is_halloween then
            return {
                message = localize{type='variable', key='a_mult', vars = {card.ability.extra.default_mult}},
                mult_mod = card.ability.extra.default_mult
            }
        end
    end
worldly moss
#

oh yea

#

oh no

#

what did I do

#

theres two

arctic lion
#

still quite crude but it's truly just get date and apply whatever

#

you've made a friend

worldly moss
#

one of them can't find the main file...

#

strange

#

the other one loads fine tho

#

OH

#

IM STUPID

#

I left the legacy header in my main file

#

which probably confused it

#

which is why theres one

#

with no version

#

(legacy header one)

#

and one with a version

#

from the JSON manifest

#

would this be the correct file structure?

nocturne garnet
arctic lion
#

i think having users glance at their time and date and be shocked it's christmas in the middle of july might be a bit much egg

arctic lion
worldly moss
#

and lets certain checks pass anyways

#

the spooky joker

#

literally just makes it halloween

#

nothing else

arctic lion
#

i was thinking a tier 2 voucher maybe

worldly moss
#

ooh

arctic lion
#

depends how op they are really

worldly moss
#

would be cool

#

my boy... hes ALIVE

arctic lion
#

maybe tier 1 it chooses a random season each ante, tier 2 you decide which to pick or something

gaunt thistle
worldly moss
#

3x mult because its 3pm

arctic lion
#

making one called night owl

worldly moss
#

actually, might have to work off a 24 hr clock

brisk quartz
#

me changing my time to abuse this joker

worldly moss
#

yea

gaunt thistle
#

wicked

arctic lion
#

closer to unsociable hours you are the more powerful it gets

gaunt thistle
#

use the http lua module and ping time.gov

#

that way you can't cheat it

worldly moss
#

so playing at around midnight would be a 12x mult

arctic lion
#

eh people will find a way to cheese it regardless, it's inconvenient enough where people won't bother unless they're properly sweating it

worldly moss
#

I mean this jokerset isnt really like... balanced is it?

arctic lion
#

yeah but you don't want it to be unfun by being too easy or too hard

worldly moss
#

spot the problems (:

gaunt thistle
worldly moss
#

almost forgot to show the best part

brisk quartz
autumn coral
#

how can i poll the edition of a consumeable

arctic lion
#

imagine making a card based on a smart watch where the mult is decided by health goals like steps taken and how much sleep you got

autumn coral
#

like let's say i want to know if card[1] is negative or not

#

in the consumeable area

autumn coral
arctic lion
#

you walked 12000 steps today here's +120 mult

brisk quartz
#

what next, a joker that gives {10,001} mult? /j

autumn coral
#

i ALREADY have instances of these cards, but for some reason, it isn't working lol

worldly moss
#

force the player to plug in a garmin watch to play the game, and make it so their BPM = their xmult

#

artificial adrenaline just for optimized mult

autumn coral
#

wait

#

i might just be stupid

gaunt thistle
#

each 0.1 degree over your baseline body temp is a x2 multiplier

arctic lion
#

link the user's spotify account and mult is based on their taste in music

worldly moss
arctic lion
#

balatro ost most listened to, x10000 mult

autumn coral
#

IT'S ALIVE

worldly moss
#

quicj question, how would I do something like checkered deck does except with all spades?

rough furnace
worldly moss
#

I just want nothing but spades

weak depot
#

do y'all know why this crashes, but only when more than 1 card is played?

code: ```lua
consumable.use = function(self, card, area, copier)

G.E_MANAGER:add_event(Event({trigger = 'after', delay = 0.4, func = function()
    play_sound('tarot1')
    card:juice_up(0.3, 0.5)
return true end }))

for i = 1, #G.hand.highlighted do
    G.E_MANAGER:add_event(Event({trigger = 'after',delay = 0.15,func = function()
        G.hand.highlighted[i]:flip()
        play_sound('card1')
        G.hand.highlighted[i]:juice_up(0.3, 0.3);
        return true end }))

        G.hand.highlighted[i]:set_ability(G.P_CENTERS.m_sdoc_cosmic, nil, true)
end

for i = 1, #G.hand.highlighted do
    G.E_MANAGER:add_event(Event({trigger = 'after',delay = 0.35,func = function()
        G.hand.highlighted[i]:flip()
        play_sound('tarot2')
        G.hand.highlighted[i]:juice_up(0.3, 0.3)
        G.hand:remove_from_highlighted(G.hand.highlighted[i])
        return true end }))

end

end

gaunt thistle
worldly moss
#

could be when using tarot cards, they technically aren't highlighted while they're being flipped or whatever?

arctic lion
rough furnace
gaunt thistle
#

it's legitimately impossible

arctic lion
#

try with a local variable instead

weak depot
#

okay

worldly moss
#

how would I make my deck act kinda like the checkered deck?

#

except all the suits are spades

#

I just want if not spade then make spade

#
apply = function()
        G.E_MANAGER:add_event(Event({
            func = function()
                for k, v in pairs(G.playing_cards) do
                    if v.base.suit == not "Spades" then
                        v:change_suit("Spades")
                    end
                end
            return true
            end
        }))
    end

I kinda tried here, but I have no clue what the apply thing does

#

I just saw it in an example and kinda threw it at the wall

worldly moss
weak depot
worldly moss
#

but yea, I have no clue what the apply thing is doing there, im assuming its acting like the Back:apply_to_run function in the src code?

#

cause thats what triggers the checkered deck aswell

weak depot
#

yeah, it's triggered at the start of the game

worldly moss
#

apply is?

weak depot
#

yeah

#

it's about the same thing

#

iirc

#

so if you want to do something at the start of the game you'd use the apply() function

worldly moss
#

how would I call it at the start of the game?

#

like ensuring they're actually selecting my deck and not any others

weak depot
#

for instance here's something i made that sets all heart suits to wild cards

deck.apply = function(self)
    G.E_MANAGER:add_event(Event({
    
        func = function()
            for _, card in ipairs(G.playing_cards) do
                if card.base.suit == 'Hearts' then
                    card:set_ability(G.P_CENTERS.m_wild, nil, true)
                end
            end
            return true
        end
    }))
end

presuming they're a part of your selected deck (so like a function within it) the game should do that by itself

worldly moss
#

idk, this is just kinda what i've had from when I modded this deck straight in to source code

#

I dont know if the change_suit function works here? I dont even know if im using apply correctly

weak depot
worldly moss
weak depot
#

try ipairs() instead of pairs()

worldly moss
#

this is in the middle of a run, thats why theres like 7 king spades

worldly moss
weak depot
#

glad to help!!!

worldly moss
#

thank you!

weak depot
#

i find generally in modding if you're trying to iterate through a table with a for loop you want ipairs() instead

wintry solar
#

it entirely depends on the table

#

ipairs is for indexed tables, pairs is for key-value tables

weak depot
#

yeah

#

i dunno i'm a little dumb but i do know that if you're messing with playing cards you're probably gonna want ipairs, i'm not an expert giggle

worldly moss
#

a WONDERFUL spread of cards

#

he did post a gif

gaunt thistle
#

gif themed jokerpack?

#

do it

#

sure you can

arctic lion
#

programmer art is best art

arctic lion
#

can anyone figure out why this is firing 4 times at the end of the round?

am i missing an extra check or something, it's always exactly 4 times regardless of triggers or jokers activating

don't worry about the scrappy code it's just so i can see the odds when it prints for debugging

        if context.end_of_round and not context.repetition and not context.game_over and not context.blueprint then
            local rand = pseudorandom('Test_J')
            local pOdds = G.GAME.probabilities.normal / currentOdds
            print(rand, pOdds)
            if rand <= pOdds then
                bonus = card.ability.extra.money
                if bonus > 0 then return bonus end
            end
        end
thick panther
#

Anyone know what the code is for referencing a gold seal in the text section under the loc_txt in SMODS:Back?

"a deck of {C:attention,T:m_gold}Gold{} cards with {C:attention,T:m_}Gold Seals.",
rough furnace
rough furnace
#

I just stole the check from the wiki

arctic lion
#

mate that wiki baffles me

#

i'm so bad at navigating wips

rough furnace
#

it's not that bad

arctic lion
#

it's not, i'm the bad one

rough furnace
arctic lion
#

yeah just need to use it more

zenith sage
#

i think i saw someone else with this issue earlier today but selling cards is not proc'ing the upgrade localization for a joker

#

i think i saw that "theres no architecture for it because base game doesnt need it" but like what about campfire?

tidal ice
#

yeah idk what im doing uh for future reference how would I detect if a played hand has an exact amount of cards

hybrid iris
#

try looking in the code for square joker

tidal ice
#

I would do that but idk how to like, extract the game's files

hybrid iris
#

oh

#

its as simple as using winrar or 7zip on the game's exe file

#

the joker code is contained in a file called "card.lua"

tidal ice
#

got it, for some reason searching up told me that winrar will not work

#

reddit being dumb I suppose

hybrid iris
#

strange

faint yacht
#

...does making a specific card type count as a wild card require Lovely patches directly or replacing the original functions is unavoidable? Don't want to break compatibility of other mods and what not.

placid frigate
#

what does Oops! The game crashed: engine/moveable.lua:263: attempt to index field 'VT' (a nil value) mean and is it related to my mod or the game engine file?

gritty valley
placid frigate
#

what is the field VT?

gritty valley
#

Idk. This is a moment when you have to go look at the lovely dump for yourself

placid frigate
#

once I'm in Movely dump in Balatro -> Mods -> Lovley -> Dump-> where should I look