#💻・modding-dev

1 messages · Page 245 of 1

zealous glen
tawdry coyote
#

I'm not sure why this doesn't work, but every time I try to play this modded card I made, it keeps saying mult_mod is nul

{
    config = {
        extra = {
            mult = 4,
            mult_mod = 4
        }
    },
    loc_vars = function(self,info_queue,card)
        return {vars = {card.ability.extra.mult, card.ability.extra.mult_mod}}
    end,
    calculate = function(self,card,context)
        if context.individual and context.cardarea == G.play then
            -- :get_id tests for the rank of the card. Other than 2-10, Jack is 11, Queen is 12, King is 13, and Ace is 14.
            if context.other_card:get_id() == 14 or context.other_card:get_id() == 10 then
                -- Specifically returning to context.other_card is fine with multiple values in a single return value, chips/mult are different from chip_mod and mult_mod, and automatically come with a message which plays in order of return.
                    card.ability.extra.mult = card.ability.extra.mult + card.ability.extra.mult_mod
                    return {
                    message = localize('k_upgrade_ex'),
                    colour = G.C.MULT,
                    card = card
                    }
                end
                if context.joker_main then
                return {
                    message = localize { type = 'variable', key = 'a_mult', vars = { card.ability.extra.mult } },
                    mult_mod = card.ability.extra.mult,
                    card = card
                }
            end
        end
end,
}```
dire palm
#

So, I started working on a boss blind for the first time and I'm wondering how I can affect cards in scoring hand. Here is what I have so far:

        for k, v in ipairs(context.scoring_hand) do
            local suit_prefix = string.sub(v.base.suit, 1, 1)..'_'
            local rank_suffix = v:get_id() - 1
            if rank_suffix < 10 and not rank_suffix == 1 then rank_suffix = tostring(rank_suffix)
            elseif rank_suffix == 10 then rank_suffix = 'T'
            elseif rank_suffix == 11 then rank_suffix = 'J'
            elseif rank_suffix == 12 then rank_suffix = 'Q'
            elseif rank_suffix == 13 then rank_suffix = 'K'
            elseif rank_suffix == 1 then 
                rank_suffix = '2'
                v.debuff = true
            end

            v:set_base(G.P_CARDS[suit_prefix..rank_suffix])
        end
        return true
    end```
I know the error comes from `context.scoring_hand` so what should I replace it with in this case?
maiden river
long urchin
#

how do i trigger a function when the game starts? I'm making a card similar to mail-in rebate, and it works by triggering reset_mail_rank() when the run starts, so how do i do that?

    if not saveTable then
        G.GAME.current_round.discards_left = G.GAME.round_resets.discards
        G.GAME.current_round.hands_left = G.GAME.round_resets.hands
        self.deck:shuffle()
        self.deck:hard_set_T()
        reset_idol_card()
        reset_mail_rank()
        self.GAME.current_round.ancient_card.suit = nil
        reset_ancient_card()
        reset_castle_card()
    end```
maiden river
long urchin
maiden river
#

dunno if that's the best option, but it's something

long urchin
#

so would it be if Game:start_run then?

sour marsh
#
AARVLO = {}
SMODS.Atlas {
    key = "aarvlo_ancient_suits",
    px = 71,
    py = 95,
    path = "aarvlo_ancient_suits.png",
    atlas_table = 'ASSET_ATLAS'
}

AARVLO.ancient_suits = {
    Clubs = Sprite(0, 0, G.CARD_W, G.CARD_H, G.ASSET_ATLAS["aarvlo_ancient_suits"], {x = 0,y = 0}),
    Spades = Sprite(0, 0, G.CARD_W, G.CARD_H, G.ASSET_ATLAS["aarvlo_ancient_suits"], {x = 1,y = 0}),
    Hearts = Sprite(0, 0, G.CARD_W, G.CARD_H, G.ASSET_ATLAS["aarvlo_ancient_suits"], {x = 2,y = 0}),
    Diamonds = Sprite(0, 0, G.CARD_W, G.CARD_H, G.ASSET_ATLAS["aarvlo_ancient_suits"], {x = 3,y = 0}),
}
SMODS.DrawStep {
    key = 'ancient_joker_clubs',
    order = 100,
    conditions = {facing = 'front'},
    func = function(card, layer)
        if card.ability.name == "Ancient Joker" and G.GAME.current_round.ancient_card.suit then
            AARVLO.ancient_suits[G.GAME.current_round.ancient_card.suit].role.draw_major = card
            AARVLO.ancient_suits[G.GAME.current_round.ancient_card.suit]:draw_shader('dissolve', nil, nil, nil, card.children.center)
        end
    end
}```
Still not working i have no idea why `attempt to index field 'atlas' (a nil value)`
dim ice
#

quick question : how do you delete a card mid play but without it being scored (like sixth sense if an example is need)? ive been able to remove it but for some reason it scores the destroyed card before moving on

frosty dock
frosty dock
zealous glen
maiden river
long urchin
#

tysm

dim ice
zealous glen
maiden river
#

or blinds in general, I guess

zealous glen
#

-# yet

maiden river
#

yet

zealous glen
#

-# jimbo_spin

#

-# look at SMODS’ PRs

dim ice
sour marsh
# frosty dock you need to include your mod prefix when referencing the atlas

ohhh so it's mod prefix+key like this?

AARVLO = {}
SMODS.Atlas {
    key = "ancient_suits",
    px = 71,
    py = 95,
    path = "ancient_suits.png",
    atlas_table = 'ASSET_ATLAS'
}

AARVLO.ancient_suits = {
    Clubs = Sprite(0, 0, G.CARD_W, G.CARD_H, G.ASSET_ATLAS["aarvlo_ancient_suits"], {x = 0,y = 0}),
    Spades = Sprite(0, 0, G.CARD_W, G.CARD_H, G.ASSET_ATLAS["aarvlo_ancient_suits"], {x = 1,y = 0}),
    Hearts = Sprite(0, 0, G.CARD_W, G.CARD_H, G.ASSET_ATLAS["aarvlo_ancient_suits"], {x = 2,y = 0}),
    Diamonds = Sprite(0, 0, G.CARD_W, G.CARD_H, G.ASSET_ATLAS["aarvlo_ancient_suits"], {x = 3,y = 0}),
}```
maiden river
zealous glen
long urchin
#

Oh I just realized the issue I think, but idk how to fix it

#

the problem is that i used card.ability.extra outside of the card...

#

but idk what id use instead?

long urchin
maiden river
#

holy indentation

long urchin
#

idk why its normally indented

maiden river
#

it's indented when you download it tho lmao

long urchin
#

i copy pasted it and then pressed upload message as text cuz it was too long

#

lemme tryyyyy

tepid crow
long urchin
#

oh nope

#

yeah its justed fucked like he said

maiden river
#

yeah the card.ability.extra stuff won't work without the card actually there

tepid crow
#

it is intendented just use the two expanding arrows to look at it (or download the file)

long urchin
#

cuz if i use a separate variable wouldnt it fuck up the text in the description?

maiden river
#

well I'm pretty sure you could use next(SMODS.find_card(...)) to see if you actually have one first

#

and then use the result from that

maiden river
#

line 482+

#

apparently john smods wrote that one

frosty dock
#

though it still won't have the indentation unless you click the arrows

maiden river
#

oh look
it's john smods

long urchin
frosty dock
#

oh I just didn't scroll up far enough, mb

#

yeah the indentation is messed up no matter what

#

doesn't compare to the mobile experience though

maiden river
#

we love mobile 🗣️

dire palm
maiden river
#

no clue balatrojoker

#

I'm sure it's in the docs tho

tawdry coyote
#

I'm not sure why this doesn't work, but every time I try to play this modded card I made, it keeps saying mult_mod is nul

{
    key = 'binary',
    loc_txt = {
        name = 'Binary',
        text = {
            'Gains {C:mult}+#1# {}Mult',
            'if played hand',
            'contains {C:attention}Ace{} or {C:attention}10{}',
            '{+:mult,C:white}+#1#{} Mult'
        }
    },
    atlas = 'Jokers',
    rarity = 2, --rarity: 1 = Common, 2 = Uncommon, 3 = Rare, 4 = Legendary
    
    cost = 5,
    unlocked = true, 
    discovered = true, 
    blueprint_compat = true, 
    eternal_compat = false, 
    perishable_compat = false, 
    pos = {x = 1, y = 0},
    config = {
        extra = {
            mult = 4,
            mult_mod = 4
        }
    },
    loc_vars = function(self,info_queue,card)
        return {vars = {card.ability.extra.mult, card.ability.extra.mult_mod}}
    end,
    calculate = function(self,card,context)
        if context.individual and context.cardarea == G.play then
            if context.other_card:get_id() == 14 or context.other_card:get_id() == 10 then

                    card.ability.extra.mult = card.ability.extra.mult + card.ability.extra.mult_mod
                    return {
                    message = localize('k_upgrade_ex'),
                    colour = G.C.MULT,
                    card = card
                    }
                end
                if context.joker_main then
                return {
                    message = localize { type = 'variable', key = 'a_mult', vars = { card.ability.extra.mult } },
                    mult_mod = card.ability.extra.mult,
                    card = card
                }
            end
        end
end,
}```
hushed field
#

What determines which items get saved and which don't?

long urchin
#

here lemme send it like this so it looks normal

maiden river
#

you only need to return one thing in vars

long urchin
#

didnt fix it :(

maiden river
#

oh it's that localize function you're using

#

something's up with that

long urchin
#

but its what the example used??

    loc_vars = function(self, info_queue, card)
        return {
            vars = {
                card.ability.extra.chip_mod,
                localize(G.GAME.current_round.castle2_card.suit, 'suits_singular'), -- gets the localized name of the suit
                card.ability.extra.chips,
                colours = { G.C.SUITS[G.GAME.current_round.castle2_card.suit] } -- sets the colour of the text affected by `{V:1}`
            }
        }
    end,```
hushed field
#

raevyn, you're working with custom cardareas, right?

maiden river
#

I'm not too sure of the usage of the localize function beyond the more basic stuff
-# (would be awesome if there was some notes about it in the SMODS wiki. just sayin)

hushed field
#

My cards are moved into it, but they don't seem to be visually appearing the cardarea at all. I can't find anything about needing to explicitely ensuring that happens, would you know if that's something I'd need to actually set up?

maiden river
#

hmm

#

lemme see

hushed field
#

oh wait, nevermind, I'm realizing what's going wrong, haha

maiden river
#

😭 what is it

hushed field
#

they are being rendered, I think, but of screen, accidentally added a 0 to the width of the cardarea so it's huge and mostly off screen

maiden river
#

😭

hushed field
#

I just assumed my placement had put it slighty further left than I wanted, haha

maiden river
#

that would do it

hushed field
#

you only realize dumb mistakes like that once you start asking for help. It's the universe's way to ensure you tell people about the dumb mistkaes you make, ofc

maiden river
#

fr

frosty dock
#

fr

hushed field
#

oh, no wait, they're still not rendering, though that was causing me problems still, haha

maiden river
#

interesting

#

is your code up on github?

hushed field
#

this isn't yet

maiden river
#

I see
well I can't really tell you what's going on without that
so if it gets up there let me know

#

I'll take a look

mossy ivy
#

Anyone know what verifying the integrity of game files do?

#

I'm trying to troubleshoot and I'm not sure if I'm in the right direction

wintry solar
maiden river
#

true

frosty dock
# mossy ivy Anyone know what verifying the integrity of game files do?

it restores your game files to be the same as what steam provides, basically a forced update even if the version hasn't changed. it resets any kind of tampering that you've done to the game files. These days no mods need you to mess with those files anymore, so unless you're coming off a really old modded version it shouldn't be needed

hushed field
wintry solar
#

Have you defined all the behaviours for your custom type?

mossy ivy
#

Thank you

hushed field
#

yes, I have, but that's plural and this type isn't 🥲 Though you're also making me aware that I don't think there's a need for me to have a custom cardarea type

wintry solar
#

Yeah I don’t remember what they default too but that might be why they aren’t showing up

knotty copper
#

Is there a list of key names for SMODS.Atlas?

sour marsh
#

i literally cannot figure this out, i tried injecting this to game.lua and it doesn't work, i tried putting it directly on my mod's main.lua and it doesn't work

#

i may be stupid

hushed field
sour marsh
#

im coming back to it tomorrow maybe i realize my mistake

knotty copper
maiden river
subtle mason
#

How does one make a lovely mod run after another lovely mod has finished running?

hushed field
wintry solar
#

🥳

knotty copper
maiden river
chrome widget
#

How do you check the current cost of a reroll given the reroll_shop context?

knotty copper
chrome widget
#

Huh. It doesn't list that in the calculate functions docs

wintry solar
#

I know

#

They’re slightly outdated

#

Rereading your question that might not be what you’re looking for though

#

Do you want the cost of the reroll that just happened or the next one?

chrome widget
#

the reroll that just happened

wintry solar
#

Yeah cost is fine then

chrome widget
#

Cool

mossy ivy
#

Anyone know what is needed for Malverk to work? I dragged and dropped my texture into Assets>1x and 2x and nothing shows up

glad osprey
#

how would one force all cards to be permanently flipped

sour marsh
knotty copper
#

Okay getting this error with malverk
Not entirely sure what I screwed up

#

Okay now it is say it can't find the texture

#

I have the texture stored in a folder called "default" in the assets folder

wintry solar
#

You need the mod prefix on the key in the textures table

sturdy compass
knotty copper
mossy ivy
knotty copper
#

the main one?

chrome widget
#

Hm, a recent update to smods seems to have broken a bunch of my shader code but I'm not certain why

mossy ivy
#

Theres like, no information to work with for noobs

#

Crazy

rapid stag
#

how can i change the colour of the planet cards button in the collections menu? cirThink

knotty copper
old bane
chrome widget
#

Okay yeah I'm really confused here

charred halo
#

anyone know how to prevent a joker from showing in shop

modern kindle
charred halo
#

goat thanks

chrome widget
#

I have this bit of shader code inside Card:draw(layer), which handles a custom water shader effect if a card has these values set. And for some reason it's just never reaching this code despite all the conditions being true? It broke from a recent update

    sendDebugMessage('drawing water shader')
    local cursor_pos = {}
    cursor_pos[1] = self.tilt_var and self.tilt_var.mx*G.CANV_SCALE or G.CONTROLLER.cursor_position.x*G.CANV_SCALE
    cursor_pos[2] = self.tilt_var and self.tilt_var.my*G.CANV_SCALE or G.CONTROLLER.cursor_position.y*G.CANV_SCALE
    local screen_scale = G.TILESCALE*G.TILESIZE*(self.children.center.mouse_damping or 1)*G.CANV_SCALE
    local shader_args = {}
    local hovering = (self.hover_tilt or 0)
            
    shader_args[1] = { name = 'time', val = self.ability.water_time}
    shader_args[2] = { name = 'water', val = G.ASSET_ATLAS[self.ability.water_atlas].image}
    shader_args[3] = { name = 'mouse_screen_pos', val = cursor_pos }
    shader_args[4] = { name = 'screen_scale', val = screen_scale }
    shader_args[5] = { name = 'hovering', val = hovering }
    self.children.center:draw_shader('fnwk_water_mask', nil, shader_args, false, nil, nil, nil, nil, nil, true)
end```
#

I assume it's part of the new SMODS.DrawStep thing?

#

Hmm yeah guess I'll have to update a buncha stuff to use this now

tall wharf
#

YEAHHH

knotty copper
old bane
#

The holy trifecta of making Stone Cards viable
Morton: makes stone cards count as a flush and flushes with stone cards give X3 mult
Bone: makes face cards Stone and makes Stone cards held in hand give +50 chips

chrome widget
noble schooner
#

Is there a set_enhancement function that's just not on the wiki?

#

or do I just use poll_enchancement?

chrome widget
#

It's the vanilla Card:set_ability() function

noble schooner
#

ah, got it

noble schooner
zinc forum
#

I've found enhancements to be a bit weird to work with

chrome widget
#

Easiest way is to just look at the source code directly, typically in your Lovely dump

knotty copper
#

I doubled checked to make sure I had the folder routes right

zinc forum
#

v:set_ability(G.P_CENTERS["m_stone"]) is how you'd make a Stone card for instance

chrome widget
#

For setting enhancements, it works like this:
card:set_ability(G.P_CENTERS[key])

#

So you use the key of whatever enhancement center, which are all formatted like m_stone, m_gold, m_lucky, etc

noble schooner
#

alrighty!

chrome widget
#

If you want to set it back to base, it's c_base

tall wharf
#

yooooooo\

dense vector
#

c

tall wharf
#

wild card

glad osprey
#

someone should make a crafting mod

tall wharf
#

damn it

#

there goes my idea

glad osprey
#

what

knotty copper
tall wharf
glad osprey
#

i just said someone should

#

you can

old bane
#

can i get the score from the previous round or no?

glad osprey
#

saving it would probably be the easiest way to get it

old bane
#

thats what i was thinking

glad osprey
#

unless there is already one

old bane
#

would it be like

#

G.GAME.chips and then i store it at the end of the round?

glad osprey
#

probably not chips but ya

dreamy thunder
#

G.GAME.blind.chips iirc

old bane
dreamy thunder
#

requirement

#

oh wait

#

thats not wht you want

#

mb

old bane
#

i mean technically yes it is

#

cause i wanna get the current blind's requirement but also save the last blind's player score

mossy ivy
#

Anyone got a list of alt_tex keys

glad osprey
old bane
#

okay

dreamy thunder
knotty copper
#

For Malverk which wiki is it referring to?

neat plover
#

how do i check the enhancement of a card????

sturdy compass
#

SMODS.has_enhancement

zealous glen
#

even before the update

mossy ivy
neat plover
mossy ivy
#

Malverk is a pain in the ass

#

For a pea brain like myself at least

sturdy compass
neat plover
#

how do i format that then???

sturdy compass
#

That's the function

neat plover
#

like that??

sturdy compass
#

no, the function returns a boolean. You pass in the card and the key of the enhancement you want to check for

neat plover
#

oh

glad osprey
#

who was the one who made that daily double joker

neat plover
#

so like that

glad osprey
#

oh wait nevermind

sturdy compass
#

I think just 'm_wild' is what you want for the key

neat plover
#

oki

glad osprey
#

alternatively does anyone know how to make custom format things

glad osprey
#

mainly the tooltips

neat plover
sturdy compass
#

put m_wild should be a string

neat plover
sturdy compass
mossy ivy
tall wharf
knotty copper
mossy ivy
#

Gotchya

tall wharf
sturdy compass
#

wdym by tooltips

tall wharf
#

which one

knotty copper
#

For malverk to change the texture of a deck what do you put as the set value?

glad osprey
tall wharf
#

i think you just do that

sturdy compass
#

I have never seen that before

knotty copper
#

nvm found it

glad osprey
glad osprey
knotty copper
#

Ye Back was the thing which worked

neat plover
glad osprey
#

the enhancement check isnt in a context

#

wait nvrm

tall wharf
glad osprey
#

like create an original one

tall wharf
#

i believe you can put whatever keys you want in place of that

glad osprey
#

yea but how do i make one

#

of the keys

tall wharf
#

it's done when you make new things in the mod

glad osprey
#

i would like to add something that is not already exsisting without making a new joker or edition or anything

red flower
#

you can add it to descriptions.Other

#

in the loc file

tall wharf
glad osprey
red flower
neat plover
glad osprey
mossy ivy
glad osprey
#

random guessing

#

bcus backs are what decks are called internally

mossy ivy
#

Well dang

#

So I just have to guess for my case

zealous glen
thorn ridge
#

back after school and taking some rest to tackle the boosters problem.
Decided the best way was the reformat my entire mod and make it actually neat.
(i had it all in one singular lua file)

red flower
#

we love restructuring and refactoring

thorn ridge
#

so far its working well

neat plover
tall wharf
#

i use source control properly

red flower
#

i just barely have a dev branch

minor furnace
#

anybody here have experience with making a deck skin for a suit?

noble schooner
#

oh, that's strange

glad osprey
noble schooner
#

the new talisman update broke my mod

red flower
glad osprey
#

forever

#

its a deck

noble schooner
#

I have modified literally nothing about the joker causing the crash, yet it still crashes lol

red flower
# glad osprey forever

you probably need to add some property to the card and then hook card:flip() so that it doesn't get called for them

minor furnace
#

something here is giving me attempt to get length of local 'd_ranks' (nil) in smods src/utils.lua

    key = "Purple_Spades",
    path = "purple_spades.png",
    px = 71,
    py = 95
}
SMODS.DeckSkin{
    key = "purple_spade",
    suit = "Spades",
    loc_txt ={
        name = "Purple Spades",
        text = "Spades but ourple"
    },
    palettes = {
        key = "hc",
        ranks = {"2", "3", "4", "5", "6", "7", "8", "9", "10", "Jack", "Queen", "King", "Ace"},
        display_ranks = {"2", "3", "4", "5", "6", "7", "8", "9", "10", "Jack", "Queen", "King", "Ace"},
        atlas = "Purple_Spades",
        pos_style = "suit",
        colour = "6E36B6"
    }
}
glad osprey
#

i can add extra info to cards right

#

aslong as it doesnt conflict

minor furnace
#

I've probably misdefinied a field somewhere

old bane
#

does SMODS.Enhancements work as a list of all enhancements? if so, can I grab a random one from that list and use it to enhance a card with a random enhancement

red flower
mossy ivy
#

Can someone explain what a key is in this case? I'm planning to use this mod as a base so I can finally be done with this crap

wintry solar
#

a key is just a name

mossy ivy
#

Oh

#

What's the set then?

wintry solar
#

the type of object

old bane
mossy ivy
#

Ty

red flower
minor furnace
#

I have ranks and display_ranks defined though?? so why is it telling me d_ranks is nil

    key = "purple_spade",
    suit = "Spades",
    loc_txt ={
        ["en-us"] = "Purple Spades",
    },
    palettes = {
        key = "hc",
        ranks = {"2", "3", "4", "5", "6", "7", "8", "9", "10", "Jack", "Queen", "King", "Ace"},
        display_ranks = {"2", "3", "4", "5", "6", "7", "8", "9", "10", "Jack", "Queen", "King", "Ace"},
        atlas = "Purple_Spades",
        pos_style = "suit",
        colour = "6E36B6"
    }
}```
mossy ivy
wintry solar
#

yes

neat plover
#

whyyyyyyyyyy??? the code seems good

#

its like the fifth time it isnt working and i dont know whyyyy

noble schooner
#

thank you smods, that really narrows it down /s
(this is line 448, for reference)
pcard:set_ability(G.P_CENTERS[poll_enhancements("SERAPH", "SERAPH", 100%, true, {{name = "m_lucky", weight = 1,}, {name = "m_mult", weight = 1,}, {name = "m_bonus", weight = 1,}, {name = "m_wild", weight = 1,}, {name = "m_steel", weight = 1,}, {name = "m_gold", weight = 1,}, {name = "m_cry_echo", weight = 1,}, })]

knotty copper
#

How do you change the texture of the logo on the main screen and the shop sign logo?

mossy ivy
#

Man I give up, if anyone wants to get $ for fixing this dm me

neat plover
#

please dont, else i will

#

ive spent way too much time on this

mossy ivy
#

How long have you been at it

#

And what are you trying to do

neat plover
#

10 hrs i think soon 11

mossy ivy
#

Ive been doing this for 5 days so far

neat plover
mossy ivy
#

You should definitely keep going

neat plover
mossy ivy
#

Trying to get a texture to work☠️

#

Wild right

neat plover
#

yes

mossy ivy
#

What took me 2 minutes to do on windows, is now taking me 5 days to do on a steam deck

#

I'll never not hate linux

old bane
#

so with {V:1} I can change the text colors of things, right? how would i make it so that the variable color can be either something like {X:red,C:white} or {C:red}

neat plover
#

i think the universe just doesnt want me finishing this joker

warm canyon
#

hey everyone, is anyone able to make saturn mod work on macos? brainstorm mod works but not saturn for some reason

minor furnace
#

well, it doesn't crash, but it isn't using my file either

noble schooner
#

AAAAAAAAAAAAAA

#

WHAT THE FUCK DO YOU WANT ME TO DO ABOUT THIS GAME

#

sighhh

#

I hate dev sm

neat plover
minor furnace
#

I actually don't know...

#

I am not a Knower

glad osprey
#

why are they blue mixed with red

minor furnace
#

why not, I suppose

neat plover
mossy ivy
#

I think I need to wait for a certain person to go online to help me with my problem

#

I rarely even see them online in the first place

neat plover
#

me too

hard flume
#

I've been planning ™️

noble schooner
#

okay so apparently smods just doesn't wanna work anymore

#

fuuuuuuuuuuuuuuuuuuuuuck

thorn ridge
#

Im trying to ban a bunch of boosters from a challenge, whats to ids for the base game boosters

knotty copper
#

Trying to change the shop sign texture but it keeps bugging out when played
What do I change to make it play the animation properly?

zealous glen
#

put in the correct size

#

71 by 95 are Jokers

minor furnace
#

arghhhhh

#

why is it not taking my file

neat plover
#

please work 🔥 🔥🔥🔥🔥🔥

minor furnace
#

I literally copy/pasted an existing deckskin file I found, edited the values, and it still doesn't work

#

I'm certain I typed the name of the png right

#

so why

#

literally
local atlas_path = "purple_spades.png" -- Filename for the image in the asset folder

#

it does not get simpler than this

glad osprey
#

why does this crashhhhhhh

mossy ivy
neat plover
#

i was talking about the image

minor furnace
#

byeah

#

I'm descending into madness

#

I have the 1x and 2x versions in my mod folder

#

they are the correct size

#

this is the full deckskin file

-- See end of file for notes
local atlas_path = "purple_spades.png" -- Filename for the image in the asset folder
local atlas_path_hc = nil -- Filename for the high-contrast version of the texture, if existing

local suits = {"spades"} -- Which suits to replace
local ranks = {"2", "3", "4", "5", "6", "7", "8", "9", "10", "Jack", "Queen", "King", "Ace"} -- Which ranks to replace

local description = "Please Work" -- English-language description, also used as default

-----------------------------------------------------------
-- You should only need to change things above this line --
-----------------------------------------------------------

SMODS.Atlas{  
    key = atlas_key .. "_lc",
    px = 71,
    py = 95,
    path = atlas_path,
    prefix_config = {key = false}, -- See end of file for notes
}

if atlas_path_hc then
    SMODS.Atlas{  
        key = atlas_key .. "_hc",
        px = 71,
        py = 95,
        path = atlas_path_hc,
        prefix_config = {key = false}, -- See end of file for notes
    }
end

for _, suit in ipairs(suits) do
    SMODS.DeckSkin{
        key = suit .. "_skin",
        suit = suit:gsub("^%l", string.upper),
        ranks = ranks,
        lc_atlas = atlas_key .. "_lc",
        hc_atlas = atlas_path_hc and atlas_key .. "_hc",
        loc_txt = {
            ["en-us"] = description
        },
        posStyle = "deck"
    }
end```
#

am I just stupid?

neat plover
#

who knows, you might?

minor furnace
#

so true bestie

rapid stag
minor furnace
#

as in the mod prefix?

rapid stag
#

for example, the mod i'm working on, the mod prefix is cir. the playing card atlas in its deckskin is thus called cir_CardAtlas. you need to change your atlas_key to [YOUR MOD'S PREFIX]_purple_spades

knotty copper
minor furnace
#

is this literally just for deck skins?

rapid stag
glad osprey
#

how do i get if a card is a playing card

minor furnace
#

well I added the prefix and now it's doing this lmao

neat plover
#

gn everyone, the fucking enhancement functions are gonne be in my nightmares for sure. im gonna wake up in sweat cause i forgot an end or smth

minor furnace
#

this is actually driving me crazy lol

mossy ivy
#

I can't rap my head around how a card game can be so hard to mod

#

Literally doesn't make sense

rapid stag
minor furnace
stray warren
#

This game is actually pretty easy to mod once you actually understand the code a little bit

zealous glen
#

so it was made to avoid the bug

mossy ivy
zealous glen
#

Ironically, the template and the bugfix were added to Steamodded in the same update

neat plover
stray warren
#

I mean you can say that about any game, not just a card game

minor furnace
#

so what is the proper implementation of it then?

zealous glen
zealous glen
minor furnace
mossy ivy
zealous glen
zealous glen
# mossy ivy Wym by user friendly way?

If you just replace the vanilla texture files, it would display the new textures, but they'd be delete when the game updated. Also, for partial texture replacements, you'd need to include part of the original textures, and distributing a file with the original textures is arguably a violation of the rules

#

also

#

mods make choosing and managing textures easier

minor furnace
#

My laptop just crashed 💀

zealous glen
#

so you can mix-and-match them in-game

mossy ivy
high eagle
#

...idk why this happened

minor furnace
#

We love bluescreening our machines 🙃

zealous glen
zealous glen
high eagle
#

yeah

#

then it crashed

zealous glen
#

probably tried to do something while the hand didn't exist

high eagle
#

ohhhhh

zealous glen
#

I ran into this issue yesterday

high eagle
#

mzybr

high eagle
#

trueeeeeeeeee

mossy ivy
zealous glen
#

Good but also it's useful to have access to the game's files like this

#

for referencing vanilla stuff

stray warren
#

You learn a lot by just looking at the card.lua file

zealous glen
mossy ivy
#

There's like, hardly any information out there that helps with Malverk problems

minor furnace
high eagle
#

how can i pull a specific value within a function for a hook?

zealous glen
#

what do you mean

high eagle
#

ok so

high eagle
#

im trying to make a joker that gains mult whenever a card changes suits via the "set base"
function

minor furnace
#

this deckskin thing is baffling

high eagle
#

and in the set_base function, it defines the original suit

#

(i think)

#

im trying to find how i would pull that for a new function

opal holly
neat plover
#

WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW

zealous glen
neat plover
#

I TRIED IT RANDOMLY

#

IT WORKS

#

I WANT TO DIE

#

WTF

#

AAAAAAAAAAAAAAAAAARRRRRRRRRRRRRRRRRGGGGGGGGGGGGGGGGGGGGHHHHHHHHH

high eagle
neat plover
#

WHY DOES THIS WLRK IT SHOULDNT

zealous glen
# high eagle how would i do that? /genq

well, Idk the function structure. Either you override the original function to give it a signature, use an existing argument to stowaway the value, or put it in a global

#

I imagine 2 is your best bet here

opal holly
mossy ivy
# zealous glen what's troubling you

So I have a Texture ready to go, is s Tarot.png, it replaces all textures for the tarot cards and spectral cards. Having this as a mod by itself without Malverk shows all the retextured tarots and only 1 retextured spectral(which I don't understand at all???)

and when copying and pasting my x1 and x2 texture into Malverks assets folder it does nothing

neat plover
#

yall, why does my joker work
its been 11hrs, and i dont even know why it works

opal holly
#

i made a rin penrose sprite a while ago and i want to put her in the game

zealous glen
zealous glen
mossy ivy
#

I think I'll just forget it

zealous glen
zealous glen
minor furnace
#

we are so close

high eagle
#

why he ourple

zealous glen
#

2222222222342

next timber
#

man i love the 2 of spades

#

got any more

#

uhhhhh

#

2 of spades

zealous glen
#

if 2 of spades is so good why isn't there a 2 of spades 2

mossy ivy
high eagle
next timber
high eagle
#

so true

next timber
#

if you play a card and it's sequel you get the hand type "electric boogaloo"

violet iris
#

does anyone know why my game keeps crashing?
used the brainstorm mod for a filtered seed but keeps crashing on when i click Ante 2 big blind

high eagle
#

a new sticker that just adds a "2"

zealous glen
zealous glen
mossy ivy
next timber
#

damn the condition for check_for_buy_space is kinda confusing

mossy ivy
zealous glen
zealous glen
mossy ivy
next timber
#

what is the point of and 1 or 0 in a condition???

zealous glen
zealous glen
#

(true and 1) or 0 -> 1
(false and 1) or 0 -> 0

frosty dock
#

it's effectively a ternary operator

#

condition and a or b -> a if condition is true, b otherwise

next timber
#

ahh i see

mossy ivy
minor furnace
#

I've finally done it 😭

zealous glen
#

🅱️in 🅱️enrose

minor furnace
#

In🅱️eed

#

I made these sprites today

zealous glen
next timber
#

how do i patch into the middle of a line? like if a line is print("hello world") how could i patch it to be print("hello new world") without replacing the whole line? trying to be as compatibility friendly as possible

minor furnace
zealous glen
next timber
#

ok so replacing the whole line is the best option

#

i mean realistically who's gonna be overwriting the code checking if you have space to buy a joker anyways

#

theres probably already a mod that does

#

wouldnt be surprised if like cryptid did

next timber
#

ive never actually played cryptid

frosty dock
minor furnace
#

very jokery indeed lol

#

looks cool!

opal holly
#

(also I would wanna do a self-insert into the game)

zealous glen
#

I wanted to do some HoloLive members

#

into Balatro Jokers

#

so far I've only done one indie

minor furnace
#

ok this looks a lot less cluttered now, much better

opal holly
#

i rmb theres a ID mod

frosty dock
zealous glen
#

because I was inspired

opal holly
#

snebby!

zealous glen
minor furnace
#

I feel like someone who's actually good at art could make Snebby look better, but I'm happy enough with how it looks for now

zealous glen
#

I like how they look

#

very clean

minor furnace
#

thank you 🙏

opal holly
minor furnace
#

man this started out as a reverse tarot mod and now I'm just kind of putting whatever I want into it

#

just for the fun of it

opal holly
#

i think i'll start working on sprites after like 15 jokers

minor furnace
#

are you just using placeholders for now?

opal holly
#

rn my placeholders are just like this

zinc forum
#

You guys use placeholders?

#

I just leave the default card x)

zealous glen
#

yes

minor furnace
zealous glen
#

I almost never do the art first

scarlet spire
#

getting around to splitting up my main lua file, how do I have the extra files be detected?

zealous glen
#

the art can fit the theme and effect later

minor furnace
#

my workflow goes concept -> art -> programming

upbeat bronze
opal holly
#

i feel like i have more inertia with the art lol

zealous glen
#

the other way around is hard

zealous glen
#

;P

opal holly
#

if i did the art first we will have gta 6 before my first mod

minor furnace
#

I'm stubborn, and will make the programming work. Case in point, Omnirank cards

zealous glen
zealous glen
zinc forum
#

Tbh I wanted to draw art for my cards, but I shared the mod in another server and immediately found an artist that basically made all the cards already x)

zealous glen
minor furnace
#

/s

zealous glen
#

exactly

zinc forum
#

I'm just lazy and don't implement the art

zealous glen
#

I think mod compatibility is important

#

that's why my mod auto deletes cryptid /j

minor furnace
zealous glen
#

also crossing fingers

glad osprey
#

how do I replace the splash screen jokers

zealous glen
#

will dog live again

zinc forum
#

Ok does anybody know how G.FUNCS.draw_from_deck_to_hand() works

#

Because apparently it does not draw from the deck to your hand

zealous glen
next timber
zealous glen
next timber
zinc forum
#

(Here's my code btw

use = function(self, card, area, copier)   
        inc_flow_count()     
        local to_discard = {}
        for k, v in ipairs(G.hand.cards) do
            if v.highlighted ==false then
                to_discard[#to_discard+1] = v
            end
        end
        G.hand:unhighlight_all()
        for k, v in ipairs(to_discard) do
            G.hand:add_to_highlighted(v, true)
            G.FUNCS.discard_cards_from_highlighted(nil, true)
            G.hand:remove_from_highlighted(v, true)
        end
        G.FUNCS.draw_from_deck_to_hand()
    end,```
zealous glen
zinc forum
#

What it's supposed to do is keep the selected cards, discards everything else, and then redraw cards

#

And I can in fact see that it is mostly what's happening

#

Just, without the drawing part

zealous glen
glad osprey
next timber
#

they should let you pet jokers

zealous glen
#

I thought it was broken

zealous glen
maiden phoenix
#

That's it removes your reroll button

next timber
#

MA FUCKIN REROLL

worthy stirrup
#

How do I replace base game sounds with mods?

knotty copper
#

In malverk what are these errors from?
From configuring pack screen

glad osprey
maiden phoenix
knotty copper
#

Also with malverk is it possible to change the default jokers which appear for the editions screen with the joker of the selected mod pack?

zinc forum
#

I'm thinking setting G.STATE, then G.STATE_COMPLETE

rapid stag
fast tapir
#

Normally I’d start poking around in files to learn but my computer’s dead- How hard is it to make a mod to modify suit colors? Does it require manually making a bunch of assets, is it just tweaking some variables, what about the Friends of Jimbo alt arts?

rapid stag
fast tapir
#

I seeee
Thank you!

zinc forum
#

As for the Friends of Jimbo packs, each collab is its own file

opal holly
zinc forum
opal holly
#

so my thinking was the 3 7s have to be part of any hand that contains three of a kind

rapid stag
primal robin
opal holly
#

true

unkempt thicket
#

What does this do?

modern kindle
#

i dont think people should download that

#

tentative <@&1133519078540185692> ping

limber kraken
#

bang

modern kindle
#

quick on the draw, thanks goat

maiden phoenix
rapid stag
# unkempt thicket What does this do?

i believe it makes that selection option setting where it's two < & > buttons with a thing between that says whatever the current selected thing is and the buttons cycle it, ala things like the friends of jimbo deck customise screen

but i wish i knew the arguments for it cirPls

unkempt thicket
#

Then that is what i am looking for, and i also wish i knew the args. Am going to snoop in the smods code

maiden phoenix
crimson marlin
#

do you know how dna works? im trying to make a boss blind that duplicates your hand

maiden phoenix
#

Ah someone was faster

unkempt thicket
#

I'm trying to page deck preview

old bane
#

how do quantum enhancements, editions, and/or seals work?

neat plover
#

can anyone reformat my text?

#

"Creates 3 {C:attention}wild{} cards when {C:attention}blind{}",
"is selected. If the highest scored card",
"is a wild card, {X:mult,C:white}X#6#{} Mult",
"and gains {X:mult,C:white}X#4#{} Mult",
"{s:0.8}Currently {X:mult,C:white}X#5#{} Mult",
"{C:inactive,s:0.8}''P-Ranking this ante...''{}"

zealous glen
#

where are the wild cards created

neat plover
#

in your hand

zealous glen
#

When Blind is selected,
get 3 Wild cards

If the highest scoring card
in a hand is a Wild Card,
this Joker gains xMult

(Currently…)

neat plover
#

ok, ik this is hard to get, it gives X2 mult(every time) and GAINS X0.5 mult

rapid stag
#

is it possible to make a lovely.toml patch happen based on a condition? cirLost
like say, only do the patch if a certain variable is true

hushed field
#

how so?

zealous glen
#

the X2 only really matters at the start, and it can read "Currently X2…" in the shop

unkempt thicket
#

How can i remove the base suits from pool

old bane
#

i love applying editions

#

(this was cause i use set_ability and not set_edition)

neat plover
neat plover
#

ik

#

idc

rapid stag
#

ahhh i was gonna give my interpretation of the joker effect, but i didn't because i thought i was wrong. but i might not have been

neat plover
unkempt thicket
#

you could try only loading the file if x is true

charred halo
#

anyone know how to set hands to one

onyx sonnet
#

Is there a way to achieve "quantum" ranks?

zealous glen
#

not yet

onyx sonnet
#

Unfortunate...

zealous glen
#

@frosty dock the people yearn for the mines quantum ranks

onyx sonnet
#

Given how they needed to ban certain functions for quantum enhancing because of how easily it can recurse infinitely, they're probably having the same issue here

frosty dock
tepid crow
zealous glen
zealous glen
frosty dock
#

the people also yearn for cheap free labour by others
ftfy

zealous glen
#

the people also yearn for cheap free labour by others miners
ftfy

frosty dock
zealous glen
#

aure is still a miner ⬛ ⛏️

frosty dock
#

what do i mine

zealous glen
#

catch-22 upon ye

unkempt thicket
zealous glen
glad osprey
#

the people children also yearn for cheap free labour by others the miners
ftfy

onyx sonnet
zealous glen
#

the people children also yearn for cheap free labour by others the miners banana
ftfy

frosty dock
glad osprey
#

~~the people children also yearn for cheap free labour by others the miners banana ~~ the game
ftfy

maiden phoenix
frosty dock
#

the people children also yearn for cheap free labour by others the miners banana

frosty dock
#

wise words

glad osprey
iron mantle
#

Did you ever manage to figure out how to get this? I'm trying to figure this out myself and I can't quite seem to find anything concrete

zealous glen
rapid stag
# unkempt thicket you could try only loading the file if x is true

this doesn't make any sense within the context of what i'm trying to do. that is not a thing that is possible:

  • i am not loading any specific files for this. if you mean the patcher itself, then not only is that not possible within the context of what i'm trying to do, but also would brick the rest of the mod because entire patcher wouldn't be run dependant on one condition for which i am trying to do one thing for. if you mean globals.lua, then i'm fairly certain that just bricks the game.

  • the condition does not exist in the way i would normally check it at this point in runtime; to clarify, it exists, but what i normally check to check if x is true in this circumstance is not created yet. i don't know how to retrieve the condition in a way that works in this context

hushed field
glad osprey
#

how do i duplicate the first joker held

rapid stag
#

i'm just approaching this from the wrong direction. what's the code in the game that directly determines the colour of the planet cards button in collections

#

where can i expect to find it

unkempt thicket
#

That wasn't what i meant, but lovely files are automatically loaded which i forgot.

rapid stag
#

ah

tardy wind
#

did SMODS.https get a new definition or something ? trying to use it results into smods.https not found

zealous glen
hushed field
#

searching ' your_collection_planets' should get you there

frosty dock
#

G.C.SECONDARY_SET.Planet should be where that's stored

tardy wind
glad osprey
#

how do i check if the player is in a blind

hushed field
#

G.GAME.blind.in_blind

rapid stag
#

thanks! how do i write a lovely patch to target a file in another mod (i.e. what should target be)?

glad osprey
#

ty 🙏

zinc forum
#

Wait huh? Is it not G.STATES.SELECTING_HAND?

frosty dock
#

where that path is relative to the root folder of the mod you're patching, and the ID is replaced by an _ if you're patching steamodded's own files

rapid stag
#

thanks!

frosty dock
#

works for anything loaded using steamodded, for things like talisman that don't use steamodded to load files, this won't work

tepid crow
old bane
#

gaming

zinc elbow
#

If i were making a texture pack mod for malverk and i wanted to replace the textures for the playing cards (both normal and high contrast) which keys and sets should i use

glad osprey
#

how do i make sure copied cards have the correct back

rapid stag
#

...what am i doing wrooooooooooongggggggggggggggggggggggggggggggg

#

this should have worked

#

oh wait, the ui_definitions patch didn't take

#

...wait, why? why wouldn't it find that

tepid crow
rapid stag
#

i'd ask if pattern has to be the entire line but that's clearly not the case since my other patterns work and they're all partial

#

why can't lovely find something i directly copy-pasted from the ui_definitions.lua file

tepid crow
#

patterns should be the entire line

#

though you can omit whitespace

old bane
#

quantum car

rapid stag
#

oh, does lovely not return a couldn't find line when the target is '=[ SMODS [modid] "[filepath]"]'?

rapid stag
#

am i crazy or should this just not be happening

tepid crow
#

check out mods/lovely/dump

paper zealot
# rapid stag lovely still can't find the line

SMODS also patches this section so the code is different by the time your patch attempts to change it. Like Larswijn said, look at lovely/dump/functions/UI_definitions.lua to see how it's been changed

thorn ridge
#

why doing dis

paper zealot
#

SMODS patches a LOT, so it's a good general rule to double check the dump code alongside the source when writing new patches

tepid crow
#

can I use something to just auto-react "👆" to everything breeze says

red flower
paper zealot
glad osprey
zinc elbow
turbid maple
#

pretty sure properly implementing quantum ranks with all the conditions they want to support could warrant an entire academic paper

zinc elbow
#

alriight thank you

next timber
#

stupid question but how do i set the hand size of a deck?

shy wagon
dense adder
#

trying to read through the documentation on SMODS
is there a functional difference when using dollars and money when trying to return a calculation.
context wise i am trying to have a joker give 1$ per scoring lucky card.

turbid maple
#

400k? youre funny

shy wagon
#

well assuming five-card hands max

#

wouldn't it be 13^5+13^4+13^3+13^2+13?

#

oh wait

#

you're right, I forgot about suit

#

it's actually ~2.6 million

#

hey am I doing this right?

#

what else do I have to define besides the new edition?

rapid stag
long sun
#

hiya! sorry, i'm missing something in my code. here's a part of the code for one of my Jokers:

if context.cardarea == G.jokers and context.after and not context.blueprint then
        card.ability.extra.remaining_hands = card.ability.extra.remaining_hands - 1
      if card.ability.extra.remaining_hands == 0 then 
        G.E_MANAGER:add_event(Event({
          func = function()
            play_sound('tarot1')
            card.T.r = -0.2
            card:juice_up(0.3, 0.4)
            card.states.drag.is = true
            card.children.center.pinch.x = true
            G.E_MANAGER:add_event(Event({trigger = 'after', delay = 0.3, blockable = false,
              func = function()
                G.jokers:remove_card(card)
                card:remove()
                card = nil
              return true; end})) 
            return true
          end
        })) 
        return {
          message = "Drained!",
          colour = G.C.FILTER
        }
          else
        return {
          message = card.ability.extra.remaining_hands.."",
          colour = G.C.FILTER
        }
      end
    end```
#

but when being run, i get an error, telling me i'm probably missing an end somewhere

#

but i don't see where?

rapid stag
long sun
#

just that it found an unexpected symbol after my code

rapid stag
#

it usually says a line number when you get unexpected symbols

long sun
#

ya, that line was after my code

rapid stag
#

can we see the error you get? i don't notice any immediate issues with this cope snippet

long sun
#

okay, so adding an end to the end of my code lets it execute, but it doesn't work as expected

unkempt thicket
#

How can I remove the base suits from the pool?

long sun
#

(i think.)

#

okay no maybe this is unrelated?

#

hmmhmm. will send my whole code

#
if context.joker_main then
      return { xmult = card.ability.extra.given_xmult }
    end
    
    if context.cardarea == G.jokers and context.before and not context.blueprint then
      local kings = false
      local queens = false
      for i = 1, #context.scoring_hand do
        if context.scoring_hand[i]:get_id() == 12 then queens = true end
        if context.scoring_hand[i]:get_id() == 13 then kings = true end
      end
      if kings and queens then
        card.ability.extra.remaining_hands = card.ability.extra.remaining_hands + card.ability.extra.added_hands
          card_eval_status_text(card, 'extra', nil, nil, nil, { message = "+"..card.ability.extra.remaining_hands.." Hands" })
      end

    if context.cardarea == G.jokers and context.after and not context.blueprint then
        card.ability.extra.remaining_hands = card.ability.extra.remaining_hands - 1
      if card.ability.extra.remaining_hands == 0 then 
        G.E_MANAGER:add_event(Event({
          func = function()
            play_sound('tarot1')
            card.T.r = -0.2
            card:juice_up(0.3, 0.4)
            card.states.drag.is = true
            card.children.center.pinch.x = true
            G.E_MANAGER:add_event(Event({trigger = 'after', delay = 0.3, blockable = false,
              func = function()
                G.jokers:remove_card(card)
                card:remove()
                card = nil
              return true; end})) 
            return true
          end
        })) 
        return {
          message = "Drained!",
          colour = G.C.FILTER
        }
          else
        return {
          message = card.ability.extra.remaining_hands.."",
          colour = G.C.FILTER
        }
      end
    end
  end```
#

(sorry for codewalling)

paper zealot
long sun
#

the code within the if statement with context.after doesn't do anything, it seems

wintry solar
wintry solar
long sun
#

OH AHA THANKS YOU'RE A GENIUS 😭

#

thankyouthankyouthankyou i've been looking for that for hours 😭😭😭😭😭😭

minor furnace
old bane
#

we're in there

minor furnace
#

every seal, everywhere, all at once

old bane
#

all because of this one joker lmao

#

ignore the temp art

unkempt thicket
# old bane

I think you could do every with something similar to what I did with my enhancement.

old bane
#

he's in there

old bane
#

them all together just looks weird

#

at least king boo looks fine (not really this isn't actually what negative looks like

long sun
#

boo;;;;;

#

when does his ability activate?

old bane
#

end of round (prolly should like change that lmao)

long sun
#

rightright ^^

#

does he self destruct if the chance fails?

old bane
#

nope

#

only if it succeeds

long sun
#

grand

sour marsh
#

is there an easy way to make a sprite drawn on a card with DrawStep inherit all the shaders applied to the card?

rapid stag
sour marsh
minor furnace
sour marsh
manic rune
#

whats the function when you press Play Hand called

minor furnace
#

if you're in a blind, it's press_play(self)

#

if you're looking for a joker effect, I think the best approximation you can get is context.before?

rapid stag
#

is there a function that's called at the start of a shop phase?

minor furnace
#

ah

#

I think pressing the button may be an event handler

manic rune
#

this one?

#

or is it this one

#

-# i just found it earlier

minor furnace
manic rune
#

oh

#

i think its not good if theres chicot then

minor furnace
#

I think that's probably the one you'd want to hook into

manic rune
#

mhm, i see

#

thanks!

minor furnace
#

what are you trying to do?

manic rune
#

i decided to make it so that one hand = 1 turn

minor furnace
#

ooh ok

warped marsh
weak gate
#

what variable has the player's current money?

manic rune
#

G.GAME.dollars

warped marsh
manic rune
#

yeah i can see why :3

#

love the teto joker

warped marsh
warped marsh
minor furnace
#

something to do with Kings, I hope lol

warped marsh
#

It’s a little broken but turns every scored card into a King

#

Pain in the ass to program surprisingly

#

Especially the animation

minor furnace
#

I was going to guess gains x1 mult when turning a card into a king

warped marsh
#

That would’ve be cool as well, but have a lot of x1 multi in the mod so far

minor furnace
#

that is fair

warped marsh
#

The last jokers are mostly utility/money

minor furnace
#

I have way too much xmult in my mod rn too...

manic rune
#

yall think you have too many

#

i have eidolons which give xmult

#

:3

warped marsh
#

I find it easy to program

manic rune
#
  • equipments which make jokers give xmult
warped marsh
#

Like xmult

wide narwhal
#

hey so i'm working on a mod that just adds a bunch of jokers that are variations on the Egg, and one of them is supposed to increase sell value by 1.5x (adding half of current sell value) at end of round with a 1 in 4 chance of being destroyed at end of round. i got the self destruct working, that was basically just copied right from gros michel, but i don't know how to get the extra_value to increase by half the current sell value. i also have never programmed in lua before today so i have no idea what i'm doing. any help would be very appreciated !! :+)

warped marsh
#

Could you send the text file please? Just the snippet of it

manic rune
#

whats the state after scoring?

warped marsh
#

Or DM me the code I think I see the issue

wide narwhal
#

ya sure !!

vocal cedar
#

to all of you

minor furnace
manic rune
#

what if

#

i combine this with new_round

#

:3

#

it seems to work even when you dont draw after playing a hand

#

which is nice

#

-# surely theres no jokers that use this function

warped marsh
manic rune
#

🙏

#

adding ALL mods which use the function to incompat

#

:3

dense adder
#

is there a fix to context.scoring_hand and context.cardarea == G.play triggering the effect on the cards twice, once when they score and the other times when the hand is done

glad osprey
#

this keeps crashing what am i doing wrong

old bane
#

can i not shuffle the order of the played cards?

manic rune
#

you can, ive seen some mods doing that before

glad osprey
#

should be able to

manic rune
old bane
#

i just grabbed the code from amber acorn:
G.E_MANAGER:add_event(Event({ func = function() G.play:shuffle('aajk'); play_sound('cardSlide1', 0.85);return true end }))

glad osprey
#

yes

manic rune
#

hm

rapid stag
manic rune
#

do decks use "effect.config" instead of "ability"?

glad osprey
#

yea

manic rune
#

oh

#

hm

glad osprey
#

it prints the value just fine

manic rune
#

how did the print go

#

dang

glad osprey
manic rune
#

can you try returning dollars as just a number, like "1" to see if it works

#

-# im dumb so i cant figure out whatsa wrong immediately :(

glad osprey
#

already did and it works then

manic rune
#

gah

#

ok im confused, maybe try tonumber(card.effect.config.extra.payout)?

glad osprey
#

i am going to commit arson

#

it doesnt crash

#

but doesnt give any money

manic rune
#

what the fuck

glad osprey
manic rune
#

??

paper zealot
manic rune
#

i have no idea, i guess using math.floor() on smt makes it not a number??

#

let me check

glad osprey
#

it returns a number supposedly!!!!!

manic rune
#

yeah but

#

if you use tonumber(5) then it still prints 5

#

so its definitely not a number

#

😭

#

wtf

paper zealot
rapid stag
manic rune
#

???

#

WAIT

#

@glad osprey

#

ITS A FUCKING TABLE

paper zealot
manic rune
#

😭

glad osprey
rapid stag
glad osprey
#

OH WAIT NO

sour marsh
glad osprey
#

IS HAND_CHIPS A TABLE

paper zealot
manic rune
sour marsh
#

it's lua

paper zealot
manic rune
glad osprey
#

local thunk

manic rune
#

you would probably need to grab "v" from hand_chips

#

idfk

#

💔

edgy reef
#

I am knowledgeable on SMODS and LocAltHunk code

manic rune
#

yeah you need to run a for loop to grab the actual hand_chips from there

#

-# thats dumb, what

glad osprey
#

why doesnt this work??????

manic rune
manic rune
#

i tried too, it returned nil

native zinc
#

how does G.FUNCS.get_poker_hand_info() work

paper zealot
manic rune
#

@glad osprey

#

turned out, this is how you grab that

#

hand_chips["array"][1]

native zinc
#

oh i found the docs

manic rune
#

-# what the fuck

glad osprey
#

why did i have to be balatro autistic

manic rune
#

💔

#

i will add that to my thread

native zinc
#

oh how do you detect unscored cards

paper zealot
# paper zealot Run code once after main.lua finishes

As a lovely patch, it's just

[[patches]]
[patches.copy]
target = 'main.lua'
position = 'append'
```or 
```toml
[[patches]]
[patches.module]
source = 'my_code.lua'
after = 'main.lua'
name = 'mymod.my_module'
```or even
```toml
[[patches]]
[patches.pattern]
target = "main.lua"
match_indent = true
position = "after"
pattern = '''G.CANVAS:setFilter('linear', 'linear')
end
'''
payload = '''
--my_code_here
'''
manic rune
#

added

#

💔

native zinc
#

ah wait G.play.cards

#

array so for loop ok

paper zealot
manic rune
#

-# whats with the numbers

#

is that vector4

#

my brain is still cooked from trying to learn shaders yesterday

#

💔

edgy reef
rapid stag
edgy reef
#

Actually maybe not?

#

It might still reference G.C.SECONDARY_SET.Planet in the end

#

But regardless, your SMODS mod will always run once on load after everything is initialized, so you should be able to modify it in your mod's lua file.

paper zealot
edgy reef
old bane
#

would i be able to make it so that a hand with hearts is not allowed with a blind?

rapid stag
paper zealot
rapid stag
#

...wait a minute. i already override G.FUNCS.title_screen_card()

what if i just stuck it in there

paper zealot
rapid stag
#

oh duhh i'm already overriding this for another reason cirDerp

glad osprey
paper zealot
#

I should definitely read up on the SMODSian approach to see if there's a neater way than hooking existing vanilla functions though

manic rune
#

:3

paper zealot
#

My written code:read code ratio is way too high

manic rune
#

its in the common questions, figured quite a few features would need it

paper zealot
daring fern
#

Still looking for an answer to this.

rapid stag
paper zealot
rapid stag
paper zealot
#

The relevant lines are in game.lua:
{name = 'colour_1', ref_table = G.C, ref_value = 'RED'},
{name = 'colour_2', ref_table = G.C, ref_value = 'BLUE'},

old bane
#

i love this boss blind (even though the description is super small)

#

yippee

sour marsh
#

is there a way to predict pseudorandom_element without using it? when you use it it's gonna affect the next use right?

open aspen
#

whats the best place to start when it comes to learning modding

sour marsh
#

ok i give up, whatever, i'm picking this problem back up later

open aspen
# sour marsh is there a way to predict pseudorandom_element without using it? when you use it...

im not sure how balatro modding works (evidently), but for a lot of these random generators is there not a seed that determines all the choices (again im not 100% without knowing the code but it of course seems that way in vanilla balatro considering the seed system is a thing).

If so, would it not be possible to use the function and roll it back to the previous state it was at? or is that missing some fundamental understanding of how it would work

manic rune
open aspen
#

i feel like wanting to know the next value of a random generator is already a very niche thing to want to know so i wouldnt be surprised if the solution is a headache

#

also again thanks for the link 🙏

sour marsh
open aspen
#

oof

#

not fun

sour marsh
paper zealot
sour marsh
#

hmmmmmm

#

ok i need to figure out how to apply that to ancient joker, to do list, etc

#

because those updates happen like .5 seconds after context.end_of_round

#

thanks for the info i'll see if i can figure out how to use it

native zinc
#
calculate = function(self, card, context)
    if context.individual and context.cardarea == G.play then
        local rank = context.other_card:get_id()
        for i=1, #G.play.cards do
            local cards = G.play.cards[i]
            if cards == 11 and rank == 5 then
                card.ability.extra.mult = 0
                card.ability.extra.mult = card.ability.extra.mult + 15
            end
        end
    end
    return {
        mult = card.ability.extra.mult
    }
end
#

hm

#

wait

#

i am too sleep deprived for this

dense adder
#

when using SMOD.has_enhancement(card, key) is there documentation to see what the key is for base game enhancements and editions, as i am trying to reference lucky cards SMOD.has_enhancement(card, 'm_lucky') but that does not seem to work. Or have i done something wrong?

daring fern
#

Is something like this possible to do?

noble schooner
#

just realized that enhancements use textures, that makes my life easier lol

open aspen
#

where can i find source code on mac