#đŸ’»ăƒ»modding-dev

1 messages · Page 547 of 1

frosty rampart
#

i'm 99.9% sure it's an unrelated talisman thing
update your Talisman to 2.3.4 and downgrade your steamodded to the latest release (0711a)

snow breach
#

Nope, Noodlemire is right

#

I ltierally am the dumbest person ever

frosty rampart
#

oh yea that makes sense too

#

i would still recommend doing the update + downgrade i mentioned

snow breach
#

It works now

#

Apparently I actually do look for zebras instead of horses 😭

royal badger
#

bump

gaunt thistle
#

it does nothing

#

hahahahahahahahahahahahahahahahahahahahahahaha

stiff locust
#

how did you find me

#

why are you in my house

gaunt thistle
#

you dont need to know that

stiff locust
#

check this shit out

#

im way too obsessed with how well this works

gaunt thistle
#

you are a very talent

stiff locust
#

:D

gaunt thistle
#

because the lovely dev is a moron

snow breach
#

I'm struggling to understand the steammodded documents

#

I'm gettin ERROR at the bottom of my packs and the document makes no sense

frosty rampart
#

VanillaRemade's wiki may be more helpful
but that text is a separate localization, gimme a minute to find where you need to put it

snow breach
#

It's undeer misc > dictionary

#

But passed that I've no clue where to put it

frosty rampart
#
  1. set a string as a group_key in the booster pack's definition. it should be the same key across all booster packs of the same type, and while you don't technically have to follow any specific formatting, it's recommended to set group_key = 'k_[mod prefix]_[booster name]'
  2. directly in misc > dictionary, add a new string assigned to what you set the group key to. e.g. for my Dice Bags in my dice mod, i set the group key to 'k_hrlr_dice_bag', so in misc > dictionary i define k_hrlr_dice_bag = 'Dice Bag'
snow breach
#

Ugh, thank you so much.

royal badger
gaunt thistle
#

uhhhhhhhhhhhhhhhhhhhhhhhh

#

your attempt doesnt make any sense, im sorry

royal badger
#

but how do I do it right then?dead

gaunt thistle
#

you can likely just call the play video code directly instead of putting it in the love2d game loop (because it already IS in the game loop).

#

jesus christ code blocks or you will be slain

royal badger
foggy ginkgo
#

One way to find out

red flower
wispy falcon
#

What's the best way to find the files that need to be patched?

red flower
#

you read the code until you find the part you want to patch

wispy falcon
#

Perfect

red flower
#

G.GAME.chips is not a table

#

... unless you have talisman but in that case getting the length would still be wrong

frigid cargo
#

Bump

wispy falcon
#

What is match_indent = true for?

#

And a more important question: How do I make it, so that when I patch a sound, it can find it? Because I can't put it in the game's folder, can I?

red flower
#

if you patch a sound in a function it will be after your mod has already loaded

#

match indent is to match the indent of where you're patching

red flower
#

the game calls (most) functions during gameplay not when the game starts

#

so at that point your sounds are already loaded and you can use your keys

#

this is to say you would use a sound the same way you would in your regular code

wispy falcon
red flower
#

show code

wispy falcon
#
version = "0.1.0"
priority = 0

[[patches]]
[patches.pattern]
target = 'card.lua'
pattern = '''
play_sound('whoosh2', math.random()*0.2 + 0.9,0.5)
play_sound('crumple'..math.random(1, 5), math.random()*0.2 + 0.9,0.5)
'''
position = "at"
payload = '''
play_sound('rippingPaper', math.random()*0.2 + 0.9,0.5)
'''
match_indent = true```
red flower
#

it needs your mod prefix

#

do you have an smods.sound

wispy falcon
#

Do I need to create one for that?

red flower
#

yes

wispy falcon
#

My bad

frigid cargo
#

bump

red flower
frigid cargo
#

no

red flower
#

well

gaunt folio
#

I made a custom gradient for a rarity, probably an easy question but how do I implement it

red flower
#

SMODS.Gradients["mvan_RainbowGradient"]

gaunt folio
#

thanks

versed swan
#

How do I make a playing card not score no matter what, under some condition?

#

...looking into the code im beginning to feel that this will need a patch

frigid cargo
versed swan
livid hill
crisp coral
#

never_scores real?

versed swan
#

idk, you tell me

#

(latest SMODS release)

outer basalt
#

is there a way to change the background to an image

wispy falcon
#

How do I spawn in a custom rank with SMODS.add_card?

red flower
wispy falcon
#

And what would the set be?

red flower
#

"Base", "Enhanced" or "Playing Card"

livid hill
wispy falcon
wispy falcon
#

Where am I doing that?

frosty rampart
#

in different file:

#

anyway my first guess is that you need to give at least a suit to SMODS.add_card as well

#

no nvm just checked vanilla remade

wispy falcon
#

So, any idea why it isn't spawning?

daring fern
wispy falcon
# daring fern Show the code where you're spawning the card.

It's in a consumable

    key = "split_chip",
    set = 'cstorm_tokens',
    atlas = "tokens",
    pos = { x = 4, y = 0},
    pixel_size = { w = 71, h = 71 },
    config = { max_highlighted = 1 },
    unlocked = true,
    discovered = true,
    cost = 3,

    use = function (self, card, area, copier)
        SMODS.add_card { set = "Base", rank = "cstorm_HalfJack"}
    end

}```
versed swan
red flower
#

we love undocumented functions

wispy falcon
outer basalt
red flower
#

Tangents does that

outer basalt
#

wdym

#

its been a second i need to brush up on the vocab 😭

red flower
#

the mod Tangents does that

outer basalt
#

ooh

outer basalt
#

now is there a way to make. ui boxes have custom sprites

#

i need to inflict my aesthetic preferences on every inch of balatro

frigid cargo
#

is there a way to make enhancements only activate once? Im tryna make an enhancement that upgrades hand if there are 3 or more played card with the enhancement, the problem is it upgrades with the amount of that enhancement played... how do i fix that?

wet crag
#
    add_to_deck = function(self, card, from_debuff)
        local death = G.P_CENTERS and G.P_CENTERS.c_death
        death.config.max_highlighted = death.config.max_highlighted + 1
    end,

    remove_from_deck = function(self, card, from_debuff)
        local death = G.P_CENTERS and G.P_CENTERS.c_death
        death.config.max_highlighted = death.config.max_highlighted - 1
    end,

any idea why the text of the death card updates properly when the value is increased but not when it's decreased? if i sell this joker the death card's description still says 3 even though it can only actually select 2

daring fern
wet crag
vague crest
#

whats the method to check if the player buys a voucher?

daring fern
vague crest
#

ohh wow i keep forgetting the ability.set thing exists it seems to keep being the answer to my weird shop stuff ty

wet crag
#

it's not that consequential to gameplay but it does bug me that it doesn't update existing cards

daring fern
wet crag
daring fern
next pivot
#

how do i remove a debuff from the boss blind

wet crag
sand sandal
#

Real excited to say that I finally wrote my first Lua module in rust

#

Doesn't use ffi though

daring fern
next pivot
daring fern
next pivot
daring fern
pastel kernel
#

Ok I’m awake

#

So, I have to first ask

#

What’s “set_consumable_usage”?

vague crest
#

been looking at obelisk to try and figure out how to only give mult if a hand has been played less than 5 times, but im a little confused on how obelisk itself implements it

vague crest
#

theyre putting me in the hydraulic press

pastel kernel
lament agate
#

if i wanted to take the current mult of the hand, is this correct

foggy ginkgo
#

One way to find out

#

Fuck it we ball

lament agate
lament agate
daring fern
maiden phoenix
lament agate
#

ahh okay

lament agate
stark berry
#

IS THAT GM CONSTRUCT

daring fern
lament agate
robust marsh
#

Having a problem where removing the eternal tag from something keeps it from being sold. I'm using j.config.center.eternal_compat to detect if a joker isn't eternal compatible and j:set_eternal(false) to remove the eternal sticker so using my consumable removes it. Sounds weird but it's just a part of how the deck works

crisp coral
#

check that flag when the card triggers

#

and reset it when hand finishes

unborn smelt
#

so how does the pools parameter work?
Can I just create a new pool right there, or do I have to create it somewhere else first?
And is there a way to pull jokers out of this pool directly with add_card?

pools = { ['dinosaurs'] = true },

faint yacht
#

Create the pool as ObjectType, then you can set its' key for pools and such.

unborn smelt
#

yea I think i figured it out.
Thank god for vanillaremades wiki

daring fern
slim ferry
#

Everything on everything đŸ€Ż

manic rune
#

wtf.....

wispy falcon
cursive gazelle
#

Everything on everything only gets you to e20

zealous glen
# daring fern

Can you put a smaller playable version of Balatro on a card

slim ferry
#

Balatro on everything

gray void
#

Everytro on balathing

knotty orchid
#

Is there any GAME variable that counts the ammount of cards played?

faint yacht
#

Total or round?

#

G.GAME.round_scores.cards_played.amt exists.

knotty orchid
#

total in game

#

that's just for a round right?

glossy sky
#

is there a way to check if when a joker is sold if its the first one sold that round?

honest bridge
#

Does anyone know how to add a second spritesheet for jokers to the game or some way to fit more into the same one? Help would be greatly appreciated!

faint yacht
#

You expand the resolution of the sheet or start a new one, registering it too.

honest bridge
#

(the resolution one)

faint yacht
#

Any image editing software - GIMP, Paint.NET-- hell, even original mspaint.exe can do it.

honest bridge
#

cool thx man!

robust marsh
#

I'm making a deck which is supposed to track two different suits and perform actions based on how many scoring cards of a specific suit you had in your played hand. Is there a way for this to work?

wintry solar
#

What kind of actions?

robust marsh
# wintry solar What kind of actions?

the whole premise is shifting between two "states", and if your hand (for example a full house) scores 3 diamonds and 2 clubs you'll enter the "diamond" state. That's as simple as it gets

clever lodge
#

does joker have shop rate?

vale ravine
#

I don't mean to sound like a dumbass, but how do I add a secondary dependency for a mod?

wintry solar
wispy falcon
cursive gazelle
#

Add a , and a string for the next mod dependency

#

,”Cryptid”

robust marsh
red flower
wintry solar
#

Okay still not really what I asked, but you can just give it a calculate function and count the suits in context before

robust marsh
cursive gazelle
#

I think aikoyori has a joker with a high shop rate idk if it’s a custom rarity

wintry solar
#

Individual item weights coming soon tm

zealous glen
#

I had a Joker have its own rate to spawn by replacing whatever card would be created

red flower
#

i had a joker have its own rate to spawn by replacing get current pool entirely

zealous glen
cursive gazelle
#

Do decks have a calculate function?

red flower
#

yes

robust marsh
candid sleet
#

is there a way to have a joker check to see if you're on a specifc boss blind?

daring fern
candid sleet
#

ah thanks, if it's just a vanilla boss do i just do 'bl_key' ?

robust marsh
#

yep

candid sleet
#

gotcha thanks

wispy falcon
wispy falcon
# wispy falcon bump3

OMFG I FOUND THE PROBLEM! The file that has the ranks doesn't get loaded because I had a brainfart or so when I added it to my main file TwT

#

Nvm, it still doesn't spawn

#

Okay, why is it saying ERROR and has the wrong sprite?

daring fern
wispy falcon
#

What exactly?

slim ferry
#

The text for the rank

wispy falcon
#

I put cstorm_HalfJack = { name = "Half Jack", text = { "Test Jack" } },

into Other{}

daring fern
wispy falcon
#

Okay but why does my sprite not get used?

ebon shell
#

is there a way to access a card's chips? like say i want my joker to add double a card's rank to its variable, and i play an ace, if i use context.other_card:get_id() it'll add +14 instead of +11, so i want it to access the card's chips rather than its rank

daring fern
manic rune
#

yeah that

ebon shell
manic rune
#

the former

ebon shell
#

is there a way to make it not do that? i only want the initial chips since they represent the card's rank

manic rune
#

card.base.nominal

ebon shell
#

like context.other_card.card.base.nominal or do i just put card.base.nominal

manic rune
#

context.other_card.base.nominal

robust marsh
#

is there a way to temporarily store keys of currently held jokers

wispy falcon
#

An Ace has the id 14, right?

ebon shell
daring fern
wispy falcon
# ebon shell yeah

So if I were to do SMODS.add_card { set 'Base', rank = 14 } it should add an Ace?

wispy falcon
daring fern
wispy falcon
#

So I would need to use "Ace" instead?

daring fern
sonic cedar
#

-# hi somecommm hiiii I missed you Hiiii waveFumo

robust marsh
pale holly
#

Hey i would like some help about something, my joker works but isn't exactl working correctly with 'Oops All 6's !' basically it's meant to add +1 or +2 of luck but the problem is that the added luck doesn't get doubled, it only double the default original luck (1) so for exemple in a 14/70 chance, All 6 will simply make it 15/70, i would appreciate any help possible !

        config = { extra = { odds = 70, prayluck = 0} },

    loc_vars = function(self, info_queue, card)
        return { vars = { G.GAME and (G.GAME.probabilities.normal + card.ability.extra.prayluck or 1 + card.ability.extra.prayluck), card.ability.extra.odds } }
    end,

    calculate = function(self, card, context)
     if context.using_consumeable and not context.blueprint then
     if context.consumeable.ability.set == "Tarot" then
    card.ability.extra.prayluck = card.ability.extra.prayluck + 1
    elseif context.consumeable.ability.set == "Spectral" then
    card.ability.extra.prayluck = card.ability.extra.prayluck + 2
        end
        end
        
        if context.end_of_round and context.game_over and context.main_eval and not context.blueprint then
            if pseudorandom('cymbal_solSister') < (G.GAME.probabilities.normal + card.ability.extra.prayluck) / card.ability.extra.odds then
            card.ability.extra.prayluck = 0
                return {
                    message = "Prayers answered.",
                    saved = 'j_cymbal_solSister'
                }
            end
        end
    end
}```
daring fern
pale holly
#

Must SMODS pseudorandom replace the game probablities one or something else ?

daring fern
pale holly
#

oh wait i've a older version of smods (smods-1.0.0-beta-0509c), i should update that first probably

#

and thanks for the help

hallow slate
#

Best way to record how many of a tarot/spectral/third card type I use in a run?

daring fern
robust marsh
#

can i detect a run reset? I know -1 exists but that's just the transition screen and it fucks up a lot of things.

daring fern
robust marsh
#

yes

daring fern
cursive gazelle
#

Simply make a global table and reset it every round start
And when a joker is sold just add it to the table and check if the table size is 1 if it’s 1 then it’s the first one sold

robust marsh
glossy sky
daring fern
cursive gazelle
#

Table still work Lol

daring fern
cursive gazelle
#

Why wouldn’t it save

daring fern
candid sleet
#

how would i change this tarot from being change 1 selected card into a cloud card to instead being all cards in hand, i know some spectrals do all cards held in hand become suit/rank but it's confusing me a bit

#

cloud card being a custom enhancement

pale holly
#

oh wait i missreaded it

candid sleet
#

Yeah

pale holly
candid sleet
#

It's okay I found something different that was easier to code and I honestly like it more

pale holly
#

should help

frosty rampart
#

the spectrals.lua page would probably help more

#

in particular sigil converts all cards in hand to a random suit, so you can see how it does that

modern kindle
#

within standard packs do they not use set_edition to set editions?

i have an edition that i specifically dont allow on playing cards but somehow one of my buddies still pulled it from the pack

pale holly
#

Hey so, i'm trying to use the smods pseudoluck but i think i only half understand it, i would like some help please ?


         config = { extra = { odds = 70, praylucktarot = 1, prayluckspectral = 2} },

    loc_vars = function(self, info_queue, card)
    local new_numerator, new_denominator = SMODS.get_probability_vars(card, numerator, demoninator, 'luckpray')
return {vars = {new_numerator, new_denominator, other_value}}
--[[
        return { vars = { G.GAME and (G.GAME.probabilities.normal + card.ability.extra.prayluck or 1 + card.ability.extra.prayluck), card.ability.extra.odds } }
        --]]
    end,

    calculate = function(self, card, context)
     if context.using_consumeable and context.mod_probability and not context.blueprint then
     if context.consumeable.ability.set == "Tarot" then
    numerator = context.numerator + card.ability.extra.praylucktarot
    elseif context.consumeable.ability.set == "Spectral" then
    numerator = context.numerator + card.ability.extra.prayluckspectral
        end
        end
        
        if context.end_of_round and context.game_over and context.main_eval and not context.blueprint then
            if SMODS.pseudorandom_probability(card, 'cymbal_solSister', numerator, denominator, 'luckpray')  then
            numerator = 1
                return {
                    message = "Prayers answered.",
                    saved = 'j_cymbal_solSister'
                }
            end
        end
    end
}```
frosty rampart
modern kindle
drowsy acorn
#

hey gang, im trying to make a joker that draws 1 additional card whenever you play or discard, and while having it draw the extra card from playing a hand works just fine, it doesnt do anything when, if you are over your handsize limit, discard down to your handsize. anybody got any idea how to fix it?

    key = 'amoeba',
    loc_txt = {
        name = 'Amoeba',
        text = {
            "After play or discard,",
            "draw {C:attention}#1#{} additional card"
        },
    },
    
    config = {extra = {additional_cards = 1, triggered = false}},
    rarity = 1,
    atlas = 'CosmicTomfoolery',
    pos = {x=0,y=0},
    cost = 3,
    blueprint_compat = true,

        loc_vars = function(self, info_queue, card)
        return {
            vars = {card.ability.extra.additional_cards}
        }
    end,
    calculate = function(self, card, context)        

    if context.before then
        card.ability.extra.triggered = false
    end     
        if context.hand_drawn then
        card.ability.extra.triggered = false
    end

    if G.STATES.SELECTING_HAND and (G.GAME.current_round.hands_played ~= 0 or G.GAME.current_round.discards_used ~= 0) 
        and not card.ability.extra.triggered and (#G.hand.cards >= G.hand.config.card_limit) and
        (#G.hand.cards - G.hand.config.card_limit ~= 1)  then
            G.E_MANAGER:add_event(Event({
            func = function ()
                draw_card(G.deck, G.hand, nil, nil, true)
            return true
            end
        }))
        card.ability.extra.triggered = true
     end

    if context.discard and context.other_card == context.full_hand[#context.full_hand] then
        card.ability.extra.triggered = false
        if G.STATES.SELECTING_HAND then
            card.ability.extra.triggered = true
        end
    end```
modern kindle
#

<@&1133519078540185692>

#

kill him

#

shoot him dead

#

i want his line obliterated

exotic hedge
#

boom

modern kindle
#

thanks goat

polar tulip
exotic hedge
polar tulip
#

I think we're getting there. I prefer to take things slow though

pale holly
# frosty rampart you can't just put "numerator" and "denominator" into the probability functions ...
          config = { extra = { numerator = 0, odds = 70, praylucktarot = 1, prayluckspectral = 2} },

    loc_vars = function(self, info_queue, card)
    local new_numerator, new_denominator = SMODS.get_probability_vars(card, card.ability.extra.numerator, card.ability.extra.odds, 'luckpray')
return {vars = {new_numerator, new_denominator, other_value}}

    end,

    calculate = function(self, card, context)
     if context.using_consumeable and context.mod_probability and not context.blueprint then
     if context.consumeable.ability.set == "Tarot" then
    card.ability.extra.numerator = card.ability.extra.numerator+ card.ability.extra.praylucktarot
    elseif context.consumeable.ability.set == "Spectral" then
    card.ability.extra.numerator = card.ability.extra.numerator + card.ability.extra.prayluckspectral
        end
        end
        
        if context.end_of_round and context.game_over and context.main_eval and not context.blueprint then
            if SMODS.pseudorandom_probability(card, 'cymbal_solSister', card.ability.extra.numerator, card.ability.extra.odds, 'luckpray')  then
            card.ability.extra.numerator = 0
                return {
                    message = "Prayers answered.",
                    saved = 'j_cymbal_solSister'
                }
            end
        end
    end
}``` 

So basically this then ?
frosty rampart
#

I dunno what the exact effect of this is meant to be but it shouldn't crash the game, yes

pale holly
#

Oh yeah i should explain it but it's meant to add +1 or +2 to the numerator if a tarot or spectral card is used

#

so far it doesn't crash yes but the number doesn't change

#

actually i should replace the card ability numerator at first by numerator itself

frosty rampart
#

no, "numerator" by itself doesn't exist anywhere

pale holly
#

Ah i see, this is getting somewhat confusing

#

i was thinking numerator = card.ability.extra.numerator * 0 and similar could help to change the numerator value

#

my main issue i had was the original code i set wouldn't make my joker work properly with oops all 6's, that why's i'm redoing this

frosty rampart
#

the issue is context.using_consumeable and context.mod_probability never happen at the same time. just remove context.mod_probability, you're not using it right (it's supposed to be for effects like oops all 6s itself, which modifies other probabilities)

pale holly
#

AH alright, maybe that's why, i'll try that

#

I just used context.mod_probability since it was said in the page's release

frosty rampart
#

yea i can see how you got that, but it's specifically for modifying other probabilities

pale holly
#

i should try to think of that

#

And normally oops all 6's should affect the entire probability of my joker no matter if added up right ?

frosty rampart
#

yes, by using the new SMODS probability api oops all 6s will properly have an effect on your joker now (as well as any other modded content that does probability-modifying stuff)

pale holly
#

YES IT WORKS

#

thanks

#

i've been only recently noticing now my joker wasn't working properly with the dice

#

and also realised i didn't updated my smods since a bit too

frosty rampart
#

yea the API is a new change from 0711a

pale holly
#

i'll need to change my other jokers though to adapt to the new smods now i suppose

worthy stirrup
#

Is there a way to have stickers be applied to specific types of cards, eg: if a card falls under a group called “autograph”, can a sticker be applied to that group

unreal cosmos
#

how do you open the debug plus console it not working for me

drowsy acorn
unreal cosmos
drowsy acorn
#

weird

pale holly
#

Oh and how to do the blueprint compatible/incompible text ?

frosty rampart
#

as per the documentation on the SMODS wiki, blueprint_compat = true as one of the parameters for the joker (i.e. not in any functions). it's set to false by default if you don't provide it for the joker

pale holly
#

I already know for that, i mean the green and red text the original blue print has

#

Since i've a joker similar to blueprint, i also want it to have the compatbility text

#
 

SMODS.Joker {
    key = "dprinter",
        loc_txt= {
        name = 'Dream Printer',
        text = { "Copy the abbilities of the joker on the {C:attention}right",
        "{C:green}#1# in 3 Chances{} to trigger it 2 more times",
        "{C:inactive} (How can this exist ?)"
    },},
    atlas = 'dprinter',
    pos = { x = 0, y = 0 },
    rarity = 3,
    cost = 15,
    pools = {["pseudoregamod"] = true},
    
        unlocked = true,
    discovered = false,
    blueprint_compat = true,
    eternal_compat = true,
    perishable_compat = true,
    
    
    
    
    config = { extra = { odds = 3}},
    
    --return { vars = { center.ability.extra.mainodds, center.ability.extra.totalodds}  }
    
    
--create  the 'other_joker' vallue as well of adding the 1/3 chance, normally
    loc_vars = function(self, info_queue, card)
        if card.area and card.area == G.jokers then
            local other_joker
            for i = 1, #G.jokers.cards do
                if G.jokers.cards[i] == card and G.jokers.cards[i + 1] then
                    other_joker = G.jokers.cards[i + 1]
                end
            end
        end
            return { vars = { (G.GAME and G.GAME.probabilities.normal or 1), card.ability.extra.odds } }
    end,
--gotta re-add the function of before

    calculate = function(self, card, context)
        local other_joker
        for i = 1, #G.jokers.cards do
            if G.jokers.cards[i] == card and G.jokers.cards[i + 1] then
                other_joker = G.jokers.cards[i + 1]
            end
        end
        
    if other_joker then
        local defaultblue = SMODS.blueprint_effect(card, other_joker, context)
        local stupidblue_effect = stupidblue(card, other_joker, context)
        return merge_effect({defaultblue}, {stupidblue_effect}) --merge_effect isn't a real thing, look up the local merge effect
    end
end
}```
modern kindle
# wintry solar Dilly did you fix this

i have no idea, i did see with smt i was just doing self.set instead of self.ability.set
but i havent been able to reproduce the conditions my buddy had and he didnt have the seed

#

it was just fascinating in my own testing i never had it occur

#

so hopefully its fixed now and ill simply see in the future

wintry solar
#

Can you send the edition definition anyway?

modern kindle
#

oh sure, i assumed it was my set edition hook

wintry solar
wind steppe
#

what do i access to get the current ante

red flower
#

G.GAME.round_resets.ante

median pendant
#

I'm creating a custom joker that copies the chip value onto mult.

red flower
modern kindle
#

i ahte u

modern kindle
#

i was getting the link

red flower
#

hi dilly

modern kindle
#

Hi N!

red flower
# drowsy acorn bump^3

instead of all of that try

if context.drawing_cards and (G.GAME.current_round.hands_played ~= 0 or G.GAME.current_round.discards_used ~= 0) then
   return {
        cards_to_draw = context.amount + 1
   }
end
#

<@&1133519078540185692>

exotic hedge
#

boom

crimson marlin
#

do you know where rounds played are stored?

#

cuz its not under G.GAME.round_resets

red flower
#

G.GAME.round i think

crimson marlin
#

oh ok ill try that

crimson marlin
drowsy acorn
red flower
#

oh yeah that should probably be fixed

#

try using SMODS.draw_cards(1) instead of the return

drowsy acorn
#

crashes lol

red flower
#

damn

#

what's the crash

drowsy acorn
#

no crash message, game closed itself immediately

#

lemme try again, see if it gives a message this time

red flower
#

oh wait it also calls the context lol

#

i will reread what you have then

drowsy acorn
#

yeah just closes the game

#

no message, nothing

#

man if only there was an easy way for me to check when you're in an "idle" state in a blind after playing or discarding (and you have your full hand/all cards drawn)

red flower
#

oh

drowsy acorn
#

closest i got is the jank ive got so far with G.STATES.SELECTING_HAND

red flower
#

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

drowsy acorn
#

not really

red flower
#

wdym not really

drowsy acorn
#

youre in the selecing hand state the moment you can select cards, which isnt the same as when you can play/discard cards

#

for example if you put the game on 0.5x speed, then discard some cards, try to click the cards in your hand

#

(if im correct,) the moment clicking on one of the cards in hand moves them up, selecting them, that's when youre in G.STATES.SELECTING_HAND

red flower
#

no

drowsy acorn
#

and that can happen BEFORE you're actually "idle"/able to play/discard

red flower
#

selecting_hand is the idle state

#

anyway

if context.drawing_cards and (G.GAME.current_round.hands_played ~= 0 or G.GAME.current_round.discards_used ~= 0) then
   return {
        cards_to_draw = context.amount + #SMODS.find_card("j_modprefix_key")
   }
end
#

that should be a quick hack

#

i will PR context.amnount to update properly

drowsy acorn
#

does this work with BP/BS copies?

red flower
#

no

drowsy acorn
#

dang, then i need to find a quick hack for the quick hack to get that to work

#

oh also this doesnt work when you have more cards in hand then your handsize cuz then context.drawing_cards wouldnt happen right

red flower
#

hmm I think then it's just easier to call SMODS.draw_cards(1) in context_after and context.pre_discard like this

G.E_MANAGER:add_event(Event({
    blocking = false,
    func = function()
        if G.STATE == G.STATES.SELECTING_HAND then
            SMODS.draw_cards(1)
            return true
        end
    end
}))
#

probably needs another check for end of round

#

drawing cards is called when the handsize is more

#

just checked

drowsy acorn
#

it works

#

oh my god it works finallyyyyy

red flower
#

check if it doesnt do anything weird when you win a round lol

drowsy acorn
#

thanks alot, if only i knew this function was a thing 😭

drowsy acorn
#

i replaced the 1 with card.ability.extra.additional_cards so other mods can mess with the value

robust marsh
#

How do you increase the appearance rate of a certain rarity?

#

Specifically talking about jokers

timid night
#

Yall think this is too OP? Also yes I cannot do art

crimson marlin
timid night
#

You think it just needs a rarity increase?

robust marsh
#

make the joker have a chance to break for the extra funny

knotty orchid
#

To increase a joker sell value I have to do card.sell_cost = value? I have an issue where buying the sales voucher resets all jokers sell value

red flower
red flower
#

or hook set_cost

knotty orchid
#

card.ability.extra_value = card.ability.extra_value + card.ability.extra.sell_value
something like this?

red flower
#

yeah

#

look at egg

knotty orchid
#

mmm seem's to work better but still reduces a little the sell cost for some reason

red flower
#

because it's based on the cost so if the cost lowers it will lower it

knotty orchid
#

Ohh

#

I see

#

Makes sense lol

crimson marlin
vague crest
#

whats a simple way to get the rank of the card scored? i know how to like, check if the card is a certain rank but i need to do a calculation based on what the rank is and it should be able to work on any rank

vague crest
#

ty !!

versed swan
#

How do you make a card or list of cards more likely to appear in shop?

robust marsh
worthy stirrup
#

Where would I begin with adding UI to the "hud" like what the Grim mod does

red flower
versed swan
#

damn, im working with specific consumables 😭

#

i think it would be cool if ObjectType (and not just ConsumableType) had a shop_rate

red flower
#

objecttypes dont appear in the shop by themselves

versed swan
#

yeah i know..

red flower
versed swan
#

soon................

worthy stirrup
#

Okay, How do I make a UI thing that spawns on its own during a run, just an overlay basically

#

Ill give detail if any is needed lol

robust marsh
red flower
#

i have individual weights in my mod but i just overwrite get_current_pool

worthy stirrup
#

It should spawn whenever a run is active, like what Grim used to do with its XP bar

red flower
#

then you just create it at the start of the game, by hooking Game:start_run for example

worthy stirrup
#

fuck, i gotta hook 😭

red flower
#

thats the least of your worries if youre making a UI mod

worthy stirrup
#

true tho

#

so like this?

function Game:start_run()
    print("Hooker, i hardly know her")
    return Game:start_run(self)
end
neat leaf
#

That'll lead to infinite recursion

worthy stirrup
#

so i shouldnt beopening my balatro rn and starting a run

neat leaf
#
local start_fun = Game.start_run
Game.start_run = function(self)
  print("Hi mom")
  return start_fun(self)
end
worthy stirrup
red flower
worthy stirrup
#

ill look into that, thank you

slim ferry
neat leaf
#

That template is how you override functions in general in Lua. Note that the obj:func syntax only works if you're calling the function. obj:func(...) is identical to obj.func(obj, ...)

worthy stirrup
#

cool, now lets start writing ui

[flote was never seen again]

neat leaf
#

gl

#

we've lost some great people to the grand ui war

#

some start fiddling with UI and are never seen again

#

be strong

worthy stirrup
#

theres too many words for my kitty mind bro

neat leaf
#

kitty mind? as in, the kitty I have in my lap at this very moment, or the level 19 cat tag I'm about to make?

worthy stirrup
#

meow

unkempt thicket
vague crest
#

hmm this is being weird i think, it's supposed to give mult if a scored card has more than 4 of its rank in your full deck, but it doesnt do anything when scored at the moment

elfin lark
#

If I wanted to do a rebalance mod of sorts, would I just like- copy the joker code of the already existing balatro and modify it or?

red flower
unkempt thicket
#

When i continue a run the Sprites are replaced by 'MANUAL_REPLACE' and no longer draw on cards, how can i prevent this?

worthy stirrup
#

i may be a little stupid, why would this cause a crash?

local start_fun = Game.start_run
Game.start_run = function(self, ...)
    print("Hi mom")
    self.test = UIBox(
    {n=G.UIT.C, config={align = "cm"}, nodes={
        {n = G.UIT.C, config = {minw=1, minh=1, colour = G.C.BLUE, padding = 0.15}}
    }})
    return start_fun(self, ...)
end
unkempt thicket
unkempt thicket
worthy stirrup
#

it gets the same issue when there still is stuff in the nodes

#

ill try again with a bit less bloat

#

yea, i added a node in it and still got the same crash

unkempt thicket
#

Try making test something like this {{n = G.UIT.R, config = {align = "cm"}, nodes = { {n = G.UIT.C, config = {align = "cm", padding = 0.02}, nodes = { {n = G.UIT.O, config = {object = DynaText({string = result, colours = {G.C.L_BLACK}, random_element = true, pop_in_rate = 9999999, silent = true, pop_delay = 0.2, scale = 0.32, min_cycle_time = 0})}}, }} }}} } with this before it local result = {'4','5'}

worthy stirrup
#

give me a sec, i think i might of fixed it

#

😩

red flower
#

as in do you need them to be saved

wintry solar
vague crest
#

currently in the process of making a thing based on ancient joker but for ranks (theres more to it but not in a way that matters for here) is there a convenient way to just grab all existing ranks in an array or should i just type like 9 10 J Q K etc

red flower
rotund sable
#

Do I have competition

vague crest
#

oh do you ?!

#

the gimmick is a certain rank gives0.5x mult and adjacent ranks give 2x mult but you have to discard ranks to definitively figure out which ones the evil rank

rotund sable
vague crest
rotund sable
#

That screenshot is old (~1.5 months) but I kinda stopped working on this for a while

#

Basically everything is implemented but the art is missing for the mod update so it isn't even published

vague crest
#

nooo 💔

#

art is so scary

#

wait so it should just be something like this right?

red flower
#

yeah

vague crest
#

oh i see what its doing

#

unrelated issue 😇

#

i do not see what it is doing i stand so corrected

worthy stirrup
timid night
#

where is calculate defined? Im trying to re-run the function but it is not card:calculate() nor is it global

vague crest
# vague crest wait so it should just be something like this right?

ok i feel like this should be simpler than im making it but im trying to have a completely random rank get chosen each round, and i cant figure out how to have a rank and id both be in the same variable if that makes sense, since the scoring part itself has to get id

#

i know how to make it happen based on what's in your deck but i need this one to function like ancient joker and thats really confusing me

vague crest
#

similar to that but not weighted based on the cards in your deck

red flower
vague crest
#

im gonna put it back rq so i can go over whats going wrong because theres kind of a lot that isnt happening one sec

red flower
#

keep in mind that's the entire rank object

vague crest
#

ohh

zealous glen
red flower
#

if things don't work i recommend printing the values

vague crest
#

so itd look more like this?

red flower
#

no

#

can you copy that here i will give you what it should be

vague crest
#

G.GAME.current_round.znm_minesweeper_rank = {}
G.GAME.current_round.znm_minesweeper_rank.rank = pseudorandom_element(SMODS.Ranks, pseudoseed('znm_minesweeper'))
G.GAME.current_round.znm_minesweeper_rank.id = pseudorandom_element(SMODS.Ranks, pseudoseed('znm_minesweeper'))

zealous glen
#

Recently I made this Joker that selects random Ranks:

#
    calculate = function(self, card, context)
        if context.setting_blind then
            local candidate_ranks = {}
            for k, _ in pairs(SMODS.Ranks) do
                candidate_ranks[#candidate_ranks + 1] = k
            end
            pseudoshuffle(candidate_ranks, pseudoseed("vic_hangman"))

            local selected_ranks = {}
            for i = 1, 5 do
                selected_ranks[i] = candidate_ranks[i]
                --sendDebugMessage(tprint(candidate_ranks[i]))
            end

            card.ability.extra.secret = selected_ranks
            card.ability.extra.seen = {}
            card.ability.extra.n_seen = 0
        elseif context.individual and context.cardarea == G.play then
            local id = context.other_card:get_id()
            for _, rank in ipairs(card.ability.extra.secret) do
                if id == SMODS.Ranks[rank].id and not card.ability.extra.seen[rank] then
                    card.ability.extra.seen[rank] = true
                    card.ability.extra.n_seen = card.ability.extra.n_seen + 1
                    return { dollars = card.ability.extra.dollars +
                    (card.ability.extra.n_seen >= 5 and card.ability.extra.dollars_extra or 0) }
                end
            end
        elseif context.end_of_round and context.cardarea == G.jokers then
        end
    end,
timid night
# zealous glen If you want to run calculation, SMODS provides functions to do that

What ive done for this card so far is create a fake context that I then feed into calculate_joker:

local handContent = {
                cardarea = G.hand,
                full_hand = G.play.cards,
                scoring_hand = context.scoring_hand,
                scoring_name = context.text,
                poker_hands = context.poker_hands,
                main_scoring = true
            }
            print("made new context, running")
            local eval = card:calculate_joker(card, handContent)

Is there a calculate function that would work for what im doing?
(also yes this card hasnt been balanced yet)

zealous glen
modern kindle
#

Hi vic

zealous glen
modern kindle
#

Im okay, ive felt really weird physically today but im laying down to see if that helps
How are you?

zealous glen
vague crest
red flower
modern kindle
#

Oh I hope you sleep awesomely

zealous glen
#

Thank you

vague crest
timid night
#

oooh

#

this is useful

zealous glen
#

Tip: don't reinvent the wheel

#

I'm sure there are at least two mods already implementing the same effect you're trying to, so take a look at them

red flower
#

btw if anyone has a wheel they don't want to be reinvented you're free to PR the snippets of code to the vanillaremade wiki :3

timid night
#

Could anybody tell me why this isnt working? dw if not

calculate = function (self, card, context)
        if context.individual and context.cardarea == G.play then
            -- make a new context where the cards that the game thinks are being held in hand is the scoring_hand
            local handContext = {
                cardarea = G.hand,
                full_hand = G.play.cards,
                scoring_hand = context.scoring_hand,
                scoring_name = context.text,
                poker_hands = context.poker_hands,
                main_scoring = true
            }
            print("made new context, running")
            local eval = SMODS.eval_individual(context.other_card, handContext)
            print(eval)
            return eval
        end
    end

The error is:
[SMODS _ "src/utils.lua"]:1995: attempt to index field 'object' (a nil value)"

#

also funny fact I dont think a game has ever made me feel so hacky modding it

#

I made a card that makes it so glass cards cannot break and I spent like an hour trying to get it to work

#

then I did the unholy of just overwriting psuedorandom

local truePseudorandom = pseudorandom
local preventedBreak = false
function pseudorandom(key)
    if key == "glass" and check_for_joker("j_arthur_jokerGlue") then
        if (pseudorandom("ArthurMod_glassTrue") < G.GAME.probabilities.normal/4) then
            preventedBreak = true
        end
        return 99 -- force "safe" roll
    end
    return truePseudorandom(key)
end

red flower
#

eval_individual expects an area i think

#

look at its uses in the code

red flower
#

you can also take_ownership of glass cards

harsh belfry
timid night
#

LMAO

red flower
#

because it takes_ownership of it

harsh belfry
#

mm

red flower
#

you can patch smods but there's no reason to with the new probability functions

harsh belfry
#
    SMODS.Enhancement:take_ownership('glass', {
        calculate = function(self, card, context)
            if context.destroy_card and context.cardarea == G.play and context.destroy_card == card and SMODS.pseudorandom_probability(card, 'glass', 1, card.ability.extra) then
                card.glass_trigger = true
                return { remove = true }
            end
        end,
    })

this is it so the ind would be 'glass'

timid night
crimson marlin
#

How do you add a dependency to your mod

frosty rampart
harsh belfry
#
{
    "id": "Tower",
    "name": "The Tower",
    "display_name": "The Tower",
    "author": ["jamirror", "pikaboy10", "cylink", "Cryptid Discord"],
    "description": "Very hard balatro.",
    "prefix": "tower",
    "main_file": "Tower.lua",
    "vvvvv": "chara reference real???",
    "priority": 9999,
    "badge_colour": "3f0e8b",
    "badge_text_colour": "ffffff",
    "version": "0.0.1-b",
    "dependencies": [
        "Steamodded (>=1.0.0~BETA-0711a)",
        "Talisman (>=2.2.0a)",
        "Cryptid (>=0.5)"
    ],
    "conflicts": [
        "NotJustYet"
    ]
}

add that funny deps field

crimson marlin
#

o

#

I didnt know you needed a json file thanks

#

how would you add a mod icon like cryptid though?

unkempt thicket
unkempt thicket
red flower
mystic river
timid night
#
if context.individual and context.cardarea == G.play then
            local eval;
            -- make a new context where the cards that the game thinks are being held in hand is the scoring_hand
            local handContext = {
                cardarea = G.hand,
                full_hand = context.scoring_hand,
                scoring_hand = context.scoring_hand,
                scoring_name = context.text,
                poker_hands = context.poker_hands,
                main_scoring = true
            }
            eval = context.other_card:calculate_joker(handContext)
            print(eval)
            return eval
        end

for some reason, eval is always nil, even if ive played a king and I have baron

red flower
#

oh calculate_joker is for jokers haha

timid night
#

yeah im trying to get it to work with jokers for now

red flower
#

ok then the follow up is that individual is for playing cards

wintry solar
#

what is going on here

timid night
#

This function is the calculate function for a joker

red flower
#

yes but context.other_card is a playing card
eremel knows more about calculation

timid night
#

ohhhhhh

#

yes then its a playing card

wintry solar
#

what are you trying to do

timid night
#

ultimately, im trying to get played cards trigger held in hand abilities, my method of doing that so far is creating a context where "full_hand" is set to the played one

#

e.g playing a king will trigger the 1.5x multiplier from baron

wintry solar
#

I will tell you now that this effect is difficult to code and a lot more involved than you think

timid night
#

oh great lmao

#

worst worst case which is a bit unholy is I could just re-code every interaction

gaunt folio
#

My mod keeps crashing failing to index other card, a nil value. What do i need to fix it? Its supposed to check if played card is a gold card or has a gold seal

#

bc im definitely doing something wrong

wintry solar
#

you have to rescore cards pretending they are in hand and also catch any effects that are based off cards in hand and also redefine the end of round calculations

timid night
#

ah lovely

wintry solar
#

if you don't understand how calculation works very well, I wouldn't recommend trying to do this effect

timid night
#

bruh I planned this card out thinking "shouldnt take too long to code" 😭 😭 😭

gaunt folio
#

cool concept ngl tho

red flower
# gaunt folio bc im definitely doing something wrong

you have if A and B and C or D and E which evaluates to if (A and B and C) or (D and E)
so you want (C or D) in parentheses

also has_enhancement should have context.other_card not card and the key is "m_gold" lowercase

gaunt folio
#

thanks

unkempt thicket
timid night
#

ooooh

#

thats a cool idea

unkempt thicket
#

Yea, unfortunately i don't come up with much of the ideas for all in jest, i think I've only made 2-3 ideas and there's almost 300 jokers, and a ton of other content.

timid night
#

oh wow that is a lot of jokers

#

i personally prefer not adding much or adding 'similar' ish jokers

#

so that I can always have a medium chance of getting a card I want

#

but having many seems to make your runs more diverse

unkempt thicket
#

All in jest is a surprisingly really balanced mod, it hasn't been out that long either. (4 months and 25 days)

timid night
#

oh thats good

#

im trying to get opinions on this card, too OP?

#

also yes I cannot draw

unkempt thicket
#

I cant draw as well as Nevernamed (artist for aij), but i think i'm decent. And theres a similar effect for a card in aij that has the same rarity so i'd say it's balanced.

gaunt folio
#

mines pretty unbalanced, but has some fun ones i believe, have made a custom rarity though for def op ones

unkempt thicket
gaunt folio
#

i know next to nothing for edition shaders but its probably easier than i think

timid night
#

One idea that ive had that I give to the world is adding "corrupted" variants of cards. If anybody has played RoR2 it would behave exactly like the void items from that game

timid night
#

you have a card, and then there is a tarot or a spectral card that corrupts it and turns it into a variant of that card

unkempt thicket
gaunt folio
#

this is a joker ive made earlier in my mods development when i didn't know too much about smodded coding but

timid night
#

thought i was original too

unkempt thicket
#

It's hard to be original this far into the community

gaunt folio
#

i did a cheap idea and made chip variants of gros michel and cavendish how fun

unkempt thicket
#

Just today i made an edition that has the same name and similar effect as one i made for another mod.

gaunt folio
#

is there some visual reference you use for editions? the ones listed in smods.edition don't really work to show it it keeps having errors ig but idk much so

timid night
gaunt folio
#

definitely not a ripoff here

#

might nerf the mult slightly but

timid night
#

that seems very good

unkempt thicket
#

I ripped these cards in half

timid night
#

dog ate my balatro

gaunt folio
#

to show you the power of steamodded!

I sawed these jokers in half!

timid night
#

If the effect i planned to make for echo chamber is too complicated, what effect do you think this card should have?

#

i made the art so I might as well use it (even though the art was me drawing circles in aseprite)

unkempt thicket
#

You could have a 1 in 3 chance for each held in hand card to score

timid night
#

oooh

#

I could do something with the previous round

unkempt thicket
timid night
#

like you get a percentage of the previous rounds mult

#

but that doesnt feel very vanilla

#

and I like having cards that feel like they could be in the base game

unkempt thicket
#

Me when

ocean sinew
#

this is true originality

timid night
#

yeah what is it with insanely unbalanced mods in balatro

unkempt thicket
#

Cryptid++

timid night
#

i mean i totally get big number get bigger

#

its fun

ocean sinew
timid night
#

but then when every run becomes a god run it stops becoming fun

ocean sinew
#

It's only fun when you need to play like 100 run's to get that godly run

#

If exotics were actually exotics maybe it could be fun

harsh belfry
unkempt thicket
ocean sinew
timid night
#

i like making cards that have risk to them

vale berry
timid night
#

wait wrong reply sorry

vale berry
#

iys ok !!

ocean sinew
#

My favorite mod is lovely ngl

timid night
#

steamodded slightly better

unkempt thicket
#

Actually it has more jokers than Cryptid now

timid night
#

but i love going into a run thinking ooh i could get a blueprint

ocean sinew
#

I didnt play all in jest yet maybe I'll give it a try

timid night
#

i feel like with 300 cards that just will never happen

#

but thats just my opinion - no hate

red flower
#

what about 400

ocean sinew
#

what about 2000

unkempt thicket
#

Theres other blueprint like stuff, also yea its more like 450 because of base jokers

ocean sinew
#

I have a modpack with joker 2000 cards 💀

#

130 decks

timid night
red flower
ocean sinew
timid night
#

wow

ocean sinew
#

If I die before that I'll pass the save to my son

timid night
#

LMAO

red flower
#

you wont get blueprint anyway because i disable vanilla jokers

unkempt thicket
red flower
#

pokermon has 6 more

unkempt thicket
#

The jokers are still being worked on

red flower
#

i am actually working on a system to get jokers for my next update instead of adding more for now haha

gilded goblet
#

rlly cool joker btw!

unkempt thicket
#

This update was supposed to be just not joker stuff, than i did 42 in two days because i felt like it

timid night
#

how do you do 42 jokers in one day

#

two days*

#

i cant read

unkempt thicket
#

I did 32 in one day than 10 the next

red flower
#

in my mod it's easy because my jokers work in groups so i can design one gimmick and make 20 jokers out of it. idk how aij manages haha

unkempt thicket
#

Aij is 90% unique jokers T_T

timid night
unkempt thicket
timid night
#

thats unhealthy

unkempt thicket
#

That was one of the 32

unkempt thicket
harsh belfry
timid night
#

how long did it take you to make each one?

unkempt thicket
#

~30 minutes each

#

Probably closer to 20

gilded goblet
#

fucking hell

harsh belfry
#

grindset

timid night
#

if you spent 20 minutes per joker

gilded goblet
#

not me spending 2 days coming up with an idea and 5 days to come up with the art for one joker

unkempt thicket
#

Beat my score of 30 with that 32

timid night
#

youd of spent 44% of 24 hours making 32 jokers

#

considering that you need to sleep

#

and lets say you sleep for 6 hours, to be generous

red flower
#

that sounds reasonable

harsh belfry
#

yes

gilded goblet
unkempt thicket
harsh belfry
#

*sigma person

gilded goblet
#

omega being

timid night
#

lets say you spend 2 hours eating total throughout the day

unkempt thicket
#

I spend far less than that but proceed

timid night
#

and ill give an extra hour just for using the bathroom etc

#

actually no

#

30 mins

gilded goblet
#

do you own a laptop perhaps

timid night
#

you roughly have 930 minutes in a day free

gilded goblet
#

because i can not imagine being able to do this with a desktop setup

unkempt thicket
#

I do but i was using my pc

gilded goblet
#

what the fuck 😭

unkempt thicket
#

I have 3 moniters

gilded goblet
#

sure that helps

unkempt thicket
#

I mean two at the time of coding

red flower
#

i cant code without my multiple monitors

timid night
#

which means you spent 68% of your free time making mod for balala

gilded goblet
#

ive been missing out then

#

damn

timid night
#

dont fact check that maths

#

i did very badly in school

gilded goblet
#

idk spending too much time on my computer makes me feel bad

harsh belfry
#

holy

modern kindle
#

I can idle a game for 28000 hours that dont mean nothing smh

red flower
#

i should step up my game

timid night
#

you have more hours on balatro then I do my steam library

#

and i only play steam games

unkempt thicket
#

Same, it's my most played game

modern kindle
timid night
#

hey for me thats a compliment

modern kindle
#

It is for sure lmao I waste way too much time gaming

gilded goblet
unkempt thicket
#

Nope, Nevernamed makes all the art so it was already done

gilded goblet
#

oh cool

#

i have been beating myself up over joker art and not coding as much

#

smh

unkempt thicket
#

I do want to get better at the art, and tbf on the jokers i have been here for almost a year and a half coding

timid night
#

people think this is good? Takes 20% of the chips from last round and adds them to the next, might need nerfing or buffing, and I think the text needs a change.
also I forgot to round the number

gilded goblet
#

Cool!

timid night
#

how do you think I could rewrite the text to feel "vanilla"?

#

I like making my mods as vanilla to the game theyre for as possible

rotund sable
#

Gain 20% of scored chips each round?

#

Something like that maybe

timid night
#

but its the round before that one

Round 1:
300 chips scored -> 60 chips stored
+0 chips

Round 2:
100 chips scored -> 20 chips stored
+60 chips

#

if that made sense

#

not sure it did

rotund sable
#

Gain 20% of scored chips at the end of the round

gaunt folio
#

my game does this trying to go into my editions and look at my edition. what is wrong here\

gaunt folio
#

ill check

#

im an idiot i did

crimson marlin
#

I dont think this is normal đŸ”„

gaunt folio
#

not really but man why did i forget that

#

yay small blind boss blind

crimson marlin
#

smol

#

:3

timid night
#

really simple question, but how could I get the amount of chips earnt in one hand? I was using G.GAME.chips but I have quickly learnt that thats wrong

timid night
#

woah

#

i never knew this existed

modern kindle
#

@red flower made a wonderful resource
His wiki and mod are great to learn from as well as the normal smods docs

timid night
#

think this card is finally done now

#

might need to buff it

#

but then also this card is prob OP in plasma decks

modern kindle
#

As long as its balanced enough in most scenarios I dont think you should worry too much about the outliers

timid night
#

only part im not sure about is that it removes the chips that it adds from the equation:
math.floor((hand_chips - card.ability.extra.stored) * (card.ability.extra.store_percent/100))
it led to the card scaling on-itself pretty uncontrollably

#

but ive ommitted that from the text

mossy quest
high verge
#

Trying to add an animated card to a deck. I'm specifically trying to replace the J of Diamonds but, I'm not fully sure how to do that...

#
    key = peasley,
    px = 71,
    py = 95,
    frames = 25,
    path = 'peasley.png',
    prefix_config = {key = false}, -- See end of file for notes
}```
red flower
#

cards dont accept animated atlas, you need to code the animation manually in update

high verge
#

Oh

#

Is there a code somewhere I can reference?

red flower
#

i dont know any for playing cards sorry

high verge
#

Rip, Peasley won't get to flex on the other cards

unkempt thicket
#

I think the joker and cards ones are very similar you just need the cards center. That's how i animated an enhancement.

high verge
#

So there's hope?

red flower
#

i think for playing cards it would be the front not the center

#

unless it's for an enhancement

high verge
#

Code greatly confuses me OTL

#

I'm definitely more on the graphics side

unkempt thicket
#

Hooking similar code in the games update could do it

gaunt folio
#

That’s really cool ngl

high verge
#

Any chance you'd be willing to help me out with the code for this? It's definitely beyond me it seems OTL

unkempt thicket
#

I might not have the time tonight, but i could tomorrow.

high verge
#

Awesome, I'll prepare the hc version then.

#

Which is potentially something to keep in mind making sure it matches the hc/lc

unkempt thicket
#

Thats fairly easy

royal badger
#

Is there a way to link an in-game skin to a mod? So that as soon as the mod is selected a certain in-game card skin is used?chi_comfy (as example my mod is on and the game switches to an in game card skin)

high verge
#

I mean you could make your deck replace the default cards instead of being an added deck.

daring fern
high verge
#

Yeah the frames are already ready I just don't know the code part.

daring fern
high verge
#

Let's take a peek at that

high verge
#

Yeah I'm just reminded of the fact I am not a coder xD

vague crest
#

the values are being returned as true and false properly when printed but they seem to always be true when it gets to the part at the bottom that scores the cards for some reason?

#

tghis is what it does for reference, if anyone has any better ideas to word this also im very open to it lolll this is so wordy 😭

frosty rampart
# vague crest the values are being returned as true and false properly when printed but they s...

the calculate function is run many times during scoring; in particular, it's run once while context.before is true and then another time when context.individual is true for the scored cards in the played hand
so in context.before, you set lownum and highnum to their correct values, and then the calculate function is run again, overwriting lownum and highnum with {} no matter what (which counts as true in lua i think)

vague crest
#

ohhhh thats just a true by itself i see

frosty rampart
#

you'll probably just need to have a flag in your card's ability table that you only set to true if you detect both high and low in context.before, and then reset it to false in context.after

vague crest
#

ah thatd do it

#

sick ty

deep arch
#

can someone help me download multiplayer i get this when i try

gusty iron
#

would there be any way to make it so that a stake makes a hand give 0 chips, 0 mult, and unable to be levveled up?

daring fern
gusty iron
#

ok tyty

supple comet
#

I don't know if this would count for modding dev
but
can someone tell me what caused this error (if possible)

#

I js switched files and it crashed

#

💔

daring fern
#

‎

#

Something like this, perhaps:

gilded blaze
#

basically hook Card:set_sprites to create a new sprite that renders the second half, then SMODS.DrawStep

daring fern
gilded blaze
#

that's exactly the problem 😭

versed swan
#

Could do a shader that only renders half a sprite, or see how balatro atlas mapping works - but AFAIK there's no currently established method to halving sprites

#

It might even involve Love2d image data manipulation but let's start with the optimistic options first

daring fern
#

It seems that this didn't work fully and the drawn sprite is offset more or less depending where it is on the screen.

vague crest
#

how would i check if a discarded hand contains something? specifically the context is i need to make sure it only contains a certain suit

daring fern
vague crest
#

context full hand is what i was looking for ty!!

robust marsh
#

Good morning guys, I'm making a deck in which you have to manage two joker rosters constantly (you unwillingly swap between the two at the end of round)

Currently everything seems to be working fine but my main problem is the fact that I am straight up destroying cards then replacing them so scaling jokers and jokers that tick down AND stickers and editions aren't preserved. Is there a cleaner way to go about this?

vague crest
#

i wonder if you could debuff them instead?

wintry solar
#

You would need to use some hidden cardareas to switch them between

vague crest
#

i guess no that works weird with swashbuckler

robust marsh
robust marsh
#

although i'm not 100% sure how to implement them

daring fern
robust marsh
daring fern
robust marsh
#

yeah it's working

#

that's great, thank you so much holy hell

#

i couldn't have figured this out on my own

umbral zodiac
#

anyone know if there's a function thats called after all centers are loaded?

#

nvm, hooking game:main_menu works fine in my usecase

vague crest
#

does anyone know why this would be crashing? trying to check in a discard if all cards are a specific suit

wet crag
#

Is there any way I could make all cards score like Splash but only for a specific hand type?

wet crag
#

At this point if I ever release my mod I'm going to have to credit you as the lead developer lmfao

#

I've been trying all sorts of variations:

    calculate = function(self, card, context)
        if context.modify_scoring_hand and not context.blueprint then
            if context.scoring_name == "Pair" and context.scoring_hand then
                return {
                    add_to_hand = true
                }
            end
        end
    end

But nothing has worked so far. As always I'm probably just putting something in the wrong place

daring fern
#

Have you tried doing: ```lua
calculate = function(self, card, context)
if context.modify_scoring_hand and not context.blueprint then
local text = G.FUNCS.get_poker_hand_info(G.play.cards)
if text == "Pair" then
return {
add_to_hand = true
}
end
end
end

wet crag
vague crest
#

how would i check to see if a discard contains a certain poker hand?

wintry solar
#

run it through G.FUNCS.get_poker_hand_info

vague crest
#

i am doing that yeah

#

im reworking my joker in a way that would more properly check for like modded hands and stuff and also excludes flushes from the list of things that level it up

#

wait hold on ive done this before

manic rune
#

whats context.hook

vague crest
#

i think its for the boss?

#

so the hook cant trigger the joker (doesnt matter in this case but)

daring fern
manic rune
#

yeah got it

vague crest
#

got it working btw! it turns out i was misusing the context of get poker hand info

manic rune
#

oof

vague crest
#

realized i had looked at similar stuff for a joker that checks if a two pair is held in hand

pure verge
#

what is wrong with this code

#

it says something about the atlas

#

SMODS.Atlas{
key = "irony",
path = "JokerIrony",
px = 71,
py = 95,
}
SMODS.Joker{
key = 'irony',
loc_txt = {
name = "Irony",
text = {
"Retriggers all steel cards",
}
},
atlas = "irony",
pos = {x = 0, y = 0},
}

daring fern
pure verge
#

is wsomething wrong with my code

#

it doesnt trigger

#

SMODS.Joker{
key = "irony",
blueprint_compact = true,
rarity = 2,
cost = 8,
pos = { x = 0, y = 0},
config = {extra = {repetitions = 1} },
calculate = function( self, card, context)
if context.individual and context.cardarea == SMODS.has_enhancement(context.other_card, "m_steel") then
return{ repetitions = 1 }
end
end
}

daring fern
hushed field
#

Cardarea stores the cardarea, not any information about enhancements

pure verge
#

so context card?

daring fern
# pure verge so context card?

No, it would be if context.repetition and context.cardarea == G.play and SMODS.has_enhancement(context.other_card, "m_steel")

pure verge
daring fern
wintry solar
daring fern
wintry solar
#

I think you could have a shader that you pass the total number of parts (x) and the position of the current part (y), and then just set the alpha of pixels outside of that range (it'd look something like if uv.x < (y-1)/x && uv.x > y/x { tex.a = 0; })

lofty elm
#

Hey sorry if yall are in the middle of something, I was wondering if anyone knew off the top of their head if it was possible to have a joker loaded that isn't shown on the collection screen. Specifially I'm trying to hide the stick jokers from the paperback mod

slim ferry
#

no_collection = true

lofty elm
#

oh ok cool, sorry I'm pretty new to this. I'll see if i can get that working

#

alright well I'll further prove that I'm new, I didn't know where to put that other than with like blueprint compatability but that caused the game to crash. If you've got the time to help I'd appreciate it :)

#

wait

#

nvm im dumb as a brick, ty I got it working

slim ferry
#

oh

#

okay

lofty elm
#

ty for help :)

rose lava
#

is there someone more advanced who knows if you can get a current mult at any time?

#

cause i dont want to use the base_mult

rose lava
#

wait its this simple

daring fern
rose lava
#

okay it works i have to actually learn something instead of listening to ai

#

its still in stone age in terms of coding

solid mesa
rose lava
#

i mean its pretty bad

solid mesa
#

what you making?

rose lava
#

custom joker

#

and rarity

solid mesa
#

oh idk how to make news rarities xd

slim ferry
#

how would i check a joker's eternal compatibility?

rose lava
plain gazelle
rose lava
#

and im stuck with "tried injecting into empty pool"

slim ferry
rotund sable
solid mesa
#

ok ty

rotund sable
#

Example from VanillaRemade

rotund sable
#

Did you put your modprefix before the rarity?

solid mesa
rose lava
rose lava
#

and its still exact same thing

rotund sable
#

modprefix_key right?

rose lava
slim ferry
#

could you send the code

wintry solar
slim ferry
#

well i want to apply eternal to a random joker but i dont want it to do nothing if it happens to target something incompatible

rose lava
#

wait a minute i have some potential fixes

#

ill be back if i get to something

wintry solar
#

SMODS.Stickers.eternal:should_apply(card, card.config.center, card.area, true)

plain gazelle
#

how to decrease a hand's level? like level_up_hand() but level_down_hand()

wintry solar
#

use level up hand with a negative number

rose lava
#

ok guys sorry for wasting your time turns out i used the wrong mod id for the prefix and didnt notice

#

thanks for the support

plain gazelle
wintry solar
#

the third

#

wiat no

#

the 4th

plain gazelle
#

oooh thanks

daring fern
#

Why might my game be lagging when a joker or consumable is highlighted also only when my mod is enabled?

stray swan
#

How does a boss blind access a final/winning hand of a round?

stray swan
sonic cedar
#

hello modding dev! I’ll be resuming development today,
Any important releases happen this last month I’ll need to grab?

red flower
#

grab the new joyousspring

sonic cedar
sonic cedar
rose lava
#

guys the default pitch is 0.7 right?

pure verge
#

how do check a jokers sprite code?

rose lava
mental nacelle
pure verge
#

the code that shows the jokers sprite

mental nacelle
#

oh draw functions?

#

that might be Card:draw(layer)

#

in card.lua

daring fern
rose lava
daring fern
rose lava
daring fern
pure verge
#

all of my jokers dont trigger

pure verge
#

SMODS.Joker{
key = "irony",
blueprint_compact = true,
rarity = 2,
cost = 8,
pos = { x = 0, y = 0},
config = {extra = {repetitions = 1} },
calculate = function( self, card, context)
if context.individual and (context.cardarea == G.play or context.cardarea == G.hand) and SMODS.has_enhancement(context.other_card, "m_steel") then
return{ repetitions = 1 }
end
end
}

daring fern
daring fern
pure verge
#

SMODS.Joker{
key = "sarcasm",
blueprint_compact = true,
rarity = 2,
cost = 8,
pos = { x = 0, y = 0},
config = {extra = {repetitions = 1} },
calculate = function( self, card, context)
if context.repetition and (context.cardarea == G.play or context.cardarea == G.hand) and SMODS.has_enhancement(context.other_card, "m_gold") then
return{ repetitions = 1 }
end
end
}

sonic cedar
#

like looking into it?

rose lava
#

anybody familiar with smods.gradient?

#

i cant figure out why its crashing when trying to render

#

SMODS.Gradient { key = 'godlikegrad', colours = {G.C.RED , G.C.PURPLE}, cycle = 5 }

red flower
#

whats the crash

rose lava
red flower
#

you can copypaste the crash here

red flower
#

where do you use it

rose lava
red flower
#

oh also update balatro

rose lava
#

its complicated

#

ok ill pass on the custom gradient

red flower
#

things wont work properly on older versions

daring fern
rose lava
daring fern
sonic cedar
#

I still don’t get quantum is that bad

#

like quantum period

daring fern
sonic cedar
#

ohhh

#

should I wait for that then

#

Since that’s kind of his whole thing lmao

placid star
placid star
manic rune
daring fern
rose lava
placid star
rose lava
#

so i have two custom sounds that can get triggered in the same moment, how do i make only one of them be played?

#

so that they dont overlap

daring fern
gilded goblet
#

reng

unkempt thicket
#

Jokerrengk

red flower
#

jokerXIrengk

solid mesa
red flower
#

<@&1133519078540185692>

knotty orchid
#

is there any way to change the scale of the soul on a card?

glossy sky
#

If I want to change a global's value at the start of each round, is there like an easy way to do that? Is there a function I can hook that triggers when a new round starts?