#💻・modding-dev

1 messages · Page 362 of 1

brisk rose
#

oh shit yeah

#

that's what happens when you modify the center

#

so, what you can do is change it to the defaults when a run ends

rustic swallow
#

maybe i can set it to default when its sold

rustic swallow
#

how do i detect when a run ends or when a new run is started

analog spoke
#

I think I'm getting a hand of this "shader" thing :333 hehehe

rustic swallow
#

lava jokers

analog spoke
#

(this was all made by editing negative, but still, lol)

analog spoke
manic rune
#

🤔 w

#

whats the difference between SMODS.GameObject:extend and SMODS.Center:extend?

daring fern
analog spoke
thorn flame
#

dude

sturdy compass
manic rune
#

-# does that even make sense

#

and i still

#

cant get this freaking badge done

#

ghhhh

daring fern
#

Is there a way to sort jokers by if they give chips, mult or xmult?

rough furnace
#

SMODS.Center is a SMODS.GameObject but SMODS.GameObject is not a SMODS.Center

manic rune
#

i see

#

-# i dont see

rough furnace
manic rune
#

like - what is this??? 😭

#

i thought changing rarity would work

#

but it doesnt work at all

daring fern
#

Does anybody have a premade list of every vanilla joker but in order of chips, mult, xmult?

manic rune
#

and i tried looking everywhere for a place that documents how to change that badge, couldnt find one either

rough furnace
manic rune
#

its a uhh center

rough furnace
#

How did you define it?

manic rune
rough furnace
#

I imagine that that is the same as the consumable type

manic rune
#

hm

#

so id need to define SMODS.ConsumableType and inject the object in there?

rough furnace
#

try setting a name in your localization

manic rune
#

🤔 what would the key be in the localization

#

k_ygg_mat?

rough furnace
#

idk

manic rune
#

:3 man

#

this localization stuff is killing me

rough furnace
#

does loc_txt work?

#
loc_txt = {
  name = "test",
},```
manic rune
#

i tested, nope

#

surely it will hit one of theese

rough furnace
#

what is this?

manic rune
#

localization

scarlet thorn
#

whats the problem?

rough furnace
#

no the type of the thing

manic rune
#

ah

#

misc, dictionary

rough furnace
scarlet thorn
#

ahh

manic rune
#

is that where im supposed to put that at?

#

well clearly not, oof :p

scarlet thorn
#

decscriptions

fair frost
#

Hi all, good evening, me once again
Would anyone be able to tell me whether Lovely can be used to change Smodded's own files? In the same patch patterning you'd use for Balatro's code

scarlet thorn
#

is where the rest of the center are

scarlet thorn
manic rune
#

you can patch p much all files, actually, even files from other mods

scarlet thorn
manic rune
#

ah

#

i see

fair frost
rough furnace
#

if you want more help for finding patrch names, you can add --dump-all to the command line flags and the lovely log will show all buffer names

scarlet thorn
rough furnace
fair frost
#

Sorry, that makes more sense
Thank you all! I'll give it a shot

manic rune
#

yeaaah idk, im not sure if thats even the place the badge is supposed to read from

rough furnace
#

try putting name under just YggMaterial

manic rune
#

like this, right?

rough furnace
#

Try it and see

fair frost
fair frost
#

Gah, my bad

#

I missed that twice

#

All working now
But this is clear indication I should go sleep
Thank you all for the help

manic rune
#

adding name crashes

#

i was uncertain that its actually because of the name so did a bit of testing just to be sure

#

though, the fact that it crashes does mean something is reading it 🤔

scarlet thorn
#

is that a rarity?

manic rune
#

nop

#

just a badge that seems to be auto-added to centers

scarlet thorn
#

what is creating it

#

ah

manic rune
#

it doesnt crash when this is a table, but doesnt really do anything to the badge so i guess this is not what i need

#

hm

crisp coral
#

actually cant u modify set_card_type_badge in the material declaration

manic rune
#

i

#

that exists????

#

oh my fucking god thank you

crisp coral
#

but also it should take k_YggMaterial as the badge key if you don't change it

scarlet thorn
#

i couldnt find a badge being added by default

#

cardsleeves uses extend on centers to do them, but it doesnt seem to get a badge added

daring fern
#

‎

crisp coral
#

because its in an event

#

lmao

daring fern
crisp coral
#

this looks like its directly during scoring steps so it's a lot more wack

manic rune
manic rune
analog spoke
#

made another shader here, seems to not like gradients for some reason tho, lmao

#

what is it about gluttonous joker that makes him an outlyier in every shader I try to make, lmao

sturdy compass
#

You are just a shader machine huh

hybrid shadow
#

if i have a .lua file that contains SMODS.Atlas for every atlas, are they global for any other .lua files to read in the folder?

daring fern
#

SMODS things are global across all mods I think.

hybrid shadow
#

alr cool

manic rune
#

well it removes the ERROR badge now but doesnt add the new one, hmm

daring fern
manic rune
#

ITS DONE

#

ITS OVER

wooden belfry
#

not entirely sure if its the best place to ask but i was wondering if its possible to like, make a joker that makes it so cards other than the first played/scored one still count as the first played/scored? i tried looking at stuff like how hanging chad works or pareidolia to see if i could kinda make sense of jokers that have smth to do with "first played card" or making all cards count as something else but i got very lost

manic rune
#

that sounds like a cryptid's joker if im not wrong

#

actually, nvm, they make the hands always count as "last played hand" so not really the same

personally, i think its possible but really hard (you would need to patch other mods' code), since they usually check G.play.cards[1] and you cant really modify that

wooden belfry
#

ohhhhh i see thank u lots and yeah i also was wondering if i was misremembering a cryptid one lol but thanks ^^

daring fern
manic rune
#

theoretically possible, but its likely that will cause bugs in some code 🤔

vale glen
#

Thanks to your comment and this [Joyous Spring](#💻・modding-dev message) snippet, the code works now!

else -- polychrome 2s
G.E_MANAGER:add_event(Event({
    trigger = 'immediate',
    func = function()
        for i = #G.shop_jokers.cards,1,-1 do
            local c = G.shop_jokers:remove_card(G.shop_jokers.cards[i])
            c:start_dissolve()
            c = nil
        end
        
        for i = 1, G.GAME.shop.joker_max - #G.shop_jokers.cards do
            -- local new_shop_card = create_card_for_shop(G.shop_jokers)
            -- local new_shop_card = SMODS.create_card({
                -- key = 'c_base',
                -- area = G.shop_jokers
            -- })
            local new_shop_card = create_playing_card({
                front = pseudorandom_element({G.P_CARDS.S_2,G.P_CARDS.H_2,G.P_CARDS.D_2,G.P_CARDS.C_2},pseudorandom('zohnathan')),
                center = G.P_CENTERS.c_base
            }, G.shop_jokers, true, true, nil, true)
            SMODS.change_base(new_shop_card, nil, '2')
            new_shop_card:set_edition('e_polychrome')
            new_shop_card.cost = 2
            create_shop_card_ui(new_shop_card, 'Joker', G.shop_jokers)
            new_shop_card.states.visible = false
            G.shop_jokers:emplace(new_shop_card)
            new_shop_card:start_materialize()
            -- new_shop_card:juice_up()
        end
        return true
    end
}))
end

Will upload video in a bit, once OBS loads.

manic rune
#

gay lv 1

vale glen
#

Hm... something weird is happening specifically in the shop, where the cards show up multiple times in the deck view.

#

During blinds they show up with the appropriate numberr of copies

crisp coral
#

create_playing_card already adds a copy of the card to the G.playing_cards global

#

buying it adds another copy

#

use SMODS.create_card instead, with type = "Base"

vale glen
#

Ah, the table.insert(G.playing_cards, card) line

#

Mkay

#

Running the following code gave the pictured result.

for i = 1, G.GAME.shop.joker_max - #G.shop_jokers.cards do
    -- local new_shop_card = create_card_for_shop(G.shop_jokers)
    local new_shop_card = SMODS.create_card({
        key = 'c_base'
    })
    -- local new_shop_card = create_playing_card({
        -- front = pseudorandom_element({G.P_CARDS.S_2,G.P_CARDS.H_2,G.P_CARDS.D_2,G.P_CARDS.C_2},pseudorandom('zohnathan')),
        -- center = G.P_CENTERS.c_base
    -- }, G.shop_jokers, true, true, nil, true)
    SMODS.change_base(new_shop_card, nil, '2')
    new_shop_card:set_edition('e_polychrome')
    new_shop_card.cost = 2
    create_shop_card_ui(new_shop_card, 'Joker', G.shop_jokers)
    new_shop_card.states.visible = false
    G.shop_jokers:emplace(new_shop_card)
    new_shop_card:start_materialize()
    -- new_shop_card:juice_up()
end
#

It didn't add it to the deck, at least.

#

Using type = "Base" alone causes the following crash.

vale glen
#

Reading Balatro's source code for create_card solved the problem, yay

crisp coral
#

oops

#

sorgy

vale glen
#

Hm... is there a way to make SMODS.create_card truly random, rather than based on a seed? There's no spot to place pseudorandom(os.time()), like with pseudorandom_element.

#

Oh wait, could just use SMODS.change_base, figure out where all suits are stored including custom ones, then pass that into the function as a parameter

#

Gotta install a mod that adds funny bases

#

Uhhhh

brazen tusk
#

copying from temperance here, will the G.jokers.cards[i].ability.set work fine here?

brisk rose
#

A return is equivalent to an identity

#

Afaik

vale glen
#

SMODS.create_card doesn't have anywhere to accept a numerical seed

brisk rose
#

I didn't look before

#

You could go a multistep route

vale glen
#

Uh... where does it use a string seed? Perhaps Axy isn't reading the code properly and missed it.

brisk rose
#

Idk what kay_append's description means. I'm probably the one reading it wrong

#

Yeah I am

#

Though I still don't understand it

#

It isn't what I thought I'm 99% sure

vale glen
#

Hm

brisk rose
#

Editions are pollable too

#

Even though it doesn't say for some reason?

#

And as for rank and suit, you can do what you said with psudorandon elements

thorn flame
#

am i missing something here?

#

im using basically the same code as another joker and it works fine

native zinc
manic rune
#

how does your loc vars look like

#

buddy what

native zinc
#

i keep forgetting how spammy polls are tbh

manic rune
#

your loc vars should be returning two values

thorn flame
#

oh DUH

#

holy shit

#

people say mistakes make you human im the most human person in the world

native zinc
#

untrue

manic rune
#

im more human than you

#

:3

vale glen
# brisk rose Can't you just poll everything?

We only need random suit, the rest should be polychrome and 2, with no other stickers or the like. The original idea had a random choice between Club/Diamond/Heart/Spade, but that won't extend to modded suits. An attempt to run

local potato = pseudorandom_element(SMODS.Suits, pseudorandom(os.time())).card_key
SMODS.change_base(new_shop_card, potato, '2')
``` caused cards with random ranks to appear instead of random suits, somehow.
thorn flame
native zinc
#

the most human person is John Humanity

manic rune
#

-# why do you use pseudorandom(os.time()), btw?

vale glen
#

To have true random, not based on a seed

#

Which is what the card maker wanted

manic rune
#

i see

vale glen
#

Dun worry, other cards in the mod are based on a seed since they're more reasonable

manic rune
#

couldve just used math.random, but i guess that works too 🤔

vale glen
#

...is that loaded into Lua by default or something

brisk rose
#

It's a very by the books way of getting an advancing seed

manic rune
#

mhm

vale glen
#

:o

brisk rose
manic rune
#

true

vale glen
#

So just pseudorandom(math.random()), or?

daring fern
#

‎

manic rune
#

you need to define something in math.random(a,b), it returns a random whole number from a to b, pretty much the same as pseudorandom(seed,a,b) except its always random

vale glen
#

Mhm

manic rune
#

but your current approach is honestly fine, too, so theres no need to change it lol

vale glen
#

Ouh

manic rune
#

-# unless someone finds out a way to manipulate time then idk

vale glen
#

xD

brazen tusk
#

he's real

brisk rose
manic rune
#

yeah but its funny to think that someone might go so far as to manipulate time to get the desired outcome :p

brisk rose
iron haven
#

Debugplus isn't cheating if you are testing your mod stuff.

brisk rose
#

yeah ofc, but it can be used as such, not that there's a real competition to cheat in

#

just like gamesharks were never real cheating

#

it's 'playing with your toys wrong'

#

which is valid

#

you can only really cheat in online games or tourneys

vale glen
#

Hmmm...

#

Doing a two-step process with SMODS.change_base causes the rank and suit to not change. Does it not change the card in-place?

#

looks up the function

#

It seems to change it in-place

brisk rose
daring fern
vale glen
#

Changing it

#
for i = 1, G.GAME.shop.joker_max - #G.shop_jokers.cards do
    -- local new_shop_card = create_card_for_shop(G.shop_jokers)
    local new_shop_card = SMODS.create_card({
        set = "Base",
        no_edition = true,
        edition = 'e_polychrome',
        bypass_discovery_center = true,
        discover = true,
        skip_materialize = true
    })
    -- local new_shop_card = create_playing_card({
        -- front = pseudorandom_element({G.P_CARDS.S_2,G.P_CARDS.H_2,G.P_CARDS.D_2,G.P_CARDS.C_2},pseudorandom('zohnathan')),
        -- center = G.P_CENTERS.c_base
    -- }, G.shop_jokers, true, true, nil, true)
    local potato = pseudorandom_element(SMODS.Suits, pseudorandom(os.time())).card_key
    sendDebugMessage(tprint({potato, type(potato)}))
    SMODS.change_base(new_shop_card, potato, 2)
    -- new_shop_card:set_edition('e_polychrome')
    new_shop_card.cost = 2
    create_shop_card_ui(new_shop_card, 'Joker', G.shop_jokers)
    new_shop_card.states.visible = false
    G.shop_jokers:emplace(new_shop_card)
    new_shop_card:start_materialize(nil, true)
    -- new_shop_card:juice_up()
end
#

Ignore the commented out lines, but the rest of it is the code being executed

brisk rose
#

oh ncm

#

nvm

#

it doesn't have one?

vale glen
#

...There's a suit section?

#

Didn't see one when looking at the function earlier

brisk rose
#

there's an undocumented create_playing_card I think

vale glen
#

So what Axy was using earlier

#

But that function emplaces in the deck without a parameter to change that

#

Unless Axy wanted to patch that function to add a parameter that does so

brisk rose
#

ah i see

#

what if you just put a suit thing on create_card and see if it works?

#

lol

vale glen
#

Heck it, Axy will just call Card() directly and pass in the appropriate parameters

vale glen
manic rune
#

i dont think so, since func runs like every frame or something

runic pecan
#

Would it be necessary to add a mod prefix or something on keys of custom contexts? (in case for mod conflicts)

manic rune
#

-# am i wrong 😭

daring fern
manic rune
daring fern
runic pecan
manic rune
manic rune
daring fern
#

@manic rune

runic pecan
daring fern
manic rune
#

holy

#

do you have footage of how it looks like rn?

daring fern
manic rune
#

mmmmmmm

#

does func run after or before things like return {mult = 5}?

#

my theory is this, but im not sure 🤔

#

wait fuck

#

its sprite, not spirte

#

iaofmoam

brisk rose
#

do suits have centers?

#

if not where is the suit pool stored?

#

the one that's loaded on boot, not the in-run one

#

or is there not one at all?

daring fern
brisk rose
vale glen
daring fern
brisk rose
#

smods reimplements them all as SMODS suits

manic rune
manic rune
#

i have to make the crafting ui

#

oh my god im so cooked

manic rune
#

newQuad?

daring fern
manic rune
#

huh

brisk rose
#

love.[] ,methods are actually kinda nice and modders should use them more

#

random aside

shell timber
#

true in some scenarios

brisk rose
#

we tend to only look up the lus docs when love has really nice docs and is more specialized for well... working with love games

#

lol

brisk rose
#

here's where I het cauhht talking out of my ass

shell timber
#

i use love.graphics.draw for unregistered hypercam 2 but most of the time the methods that balala uses are better

brisk rose
#

ngl I have messed with the love.graphics routines, but as notmario said, in most cases balatro and smods have that covered

#

but in general there's a lot of stuff there

#

i don't think you should use them over game methods unless there's a reason, but yes over built in lua functions, if it makes sense to

zealous glen
#

I mean yeah the graphical interface is the only example I could think of

daring fern
zealous glen
#

Although Balatro and SMODS have hooks for the Love methods so

#

I imagine any delays are due to Event timing

brisk rose
#

seems to provide nice helper functions

#

and if you want to handle input, i think love functions are the only option besides smods.keybind

zealous glen
brisk rose
#

like more methods that can tell you shit about your directory

#

just look at the page, lol

#

maybe i'm full of shit

#

very possible

zealous glen
#

No I don’t think I will

vale glen
faint yacht
#

How do I add an image to the config tab?

daring fern
willow plinth
#

also according to this you can just remove the getDimensions call

daring fern
willow plinth
#

then idk, getDimensions should never return nothin

willow plinth
daring fern
willow plinth
daring fern
#

I was working on the every joker, then I thought of something more effectient(ish).

willow plinth
#

so it changes joker on every trigger?

this might be a reach but i also experienced a somewhat weird crash when some mod was transforming planets to black holes, while the planet had no floating_sprite but black hole did...feels similar

https://github.com/Steamodded/smods/pull/689

#

i think current smods/vanilla don't like it when swapping out centers (with different sprite stuff) in place, but then again i'm not that experienced with this stuff yet

wintry solar
#

It seems to work fine with trib though 🤔

cursive sentinel
#

is it possible to use consumeable_usage_total on a specific card by calling it G.GAME.consumeable_usage_total and G.GAME.consumeable_usage_total.c_neptune or 0 for example?

#

i seem to always have 0 printed when i use that

cursive sentinel
#

so how could i store the number of a specific planet or tarot card used, it is not at all anywhere in the game?

daring fern
cursive sentinel
#

with a hook?

daring fern
cursive sentinel
#

okay, thank you !

zealous glen
#

Planet tracking even includes different Planets

#

But I’m not sure if that includes individual numbers

wintry solar
#

I’m pretty sure they’re stored somewhere

daring heron
#

how do i give the player a joker again if it has enough room?

cursive sentinel
daring fern
daring heron
#

also why is this showing nil?

#

it should say x2

daring fern
#

Also chips_mod doesn't exist either.

daring heron
#

huh?

#

i mean it works

#

just the description doesnt

zealous glen
#

Because the variables you pass don’t exist

zealous glen
daring heron
#

so should i just change it into xchips and elapsed_round?

daring heron
#

like this?

daring fern
daring heron
#

okay i dont understand anymore

daring fern
daring heron
#

instead of all this?

#

because that wont work

daring fern
daring heron
#

i need the last bit of code to make it check if it should be round or rounds

daring fern
daring fern
daring heron
#

yah i found it

#

it works now

#

this should say x0.5 mult and 1 in 3 chance tho

daring fern
daring heron
#

i mean the 1st one doesnt work even though it should

daring fern
daring heron
#

yeah i know

#

What about it?

daring fern
woeful stratus
daring fern
woeful stratus
#

yeah

#

but it should be

daring heron
#

why or 1?

woeful stratus
#

#2# in #3# instead on 1 in #2#

daring fern
faint yacht
#

If G.GAME.probabilities.normal isn't a truthy value, the or 1 is used instead.

daring heron
#

oh

#

that makes sense

daring fern
icy oak
#

how do i check the current score so far while calculating joker

daring fern
icy oak
#

so like G.GAME.hand_chips or something

cursive sentinel
daring fern
#

I would have said so elsewise.

icy oak
#

are they like global variables

daring fern
icy oak
#

oh ic

daring heron
#

i want this joker to turn into cavendish after the 1 in 3 chance hits

#

but this doesnt work

woeful stratus
#

you should probably use card:set_ability

daring heron
#

instead of?

daring fern
woeful stratus
#

this is how i did it in prism for one joker

faint yacht
#

Instead of removing and adding cards, directly transform the Joker into Cavendish with :set_ability.

daring heron
#

nvm i need it to only add cavendish

#

would this work?

daring fern
#

There is no Cavendish set.

faint yacht
#

{ key = 'j_cavendish' }

manic rune
daring heron
#

i am making a banana themed mod

#

funnily enough

manic rune
#

🤔

#

is it me or is there a mod about bananas already

daring heron
manic rune
#

though it would be nice to have two lol

daring fern
manic rune
#

maybe? i havent played it yet :p

faint yacht
#

SMODS.add_card{ key = 'j_cavendish' }

daring heron
#

alright

#

also i have no idea how messages work

#

this just says ERROR

daring fern
#

Also why is extinct backwards?

daring heron
#

and how do i make a custom message?

daring heron
daring fern
daring heron
#

alright

faint yacht
#
{n = G.UIT.O, config = { w = 1, h = 1, object = AnimatedSprite(128, 128, 128, 128, G.ANIMATION_ATLAS['toga_TOGAExperiment'], { x = 0, y = 0 }) } },

Huh, that doesn't produce an animated image in the UI...

daring heron
#

okay thats a really weird bug, when i have my joker slots full it just doesnt give cavendish and it doesnt clear the slot

#

so the game thinks theres still cards there even though there arent

daring fern
daring heron
#

fair

#

but even if i have multiple it doesnt give any

#

like if i have 5 it should give 4 cavendish but it doesnt

#

oh and it just doesnt apply the mult

daring fern
daring heron
#

well then how do i make it calculate it again

#

so that if i have 5 of them it gives me 4 because after the first one gets destroyed you have an extra slot

#

etc etc

#

like, you have 5

#

1 gets destroyed, so you have 1 free slot

#

so then you have room for 1 more, and then 1 gets destroyed again

#

and you get a free slot

#

etc

#

btw right now it replaces the joker with crumbledish, and i want it to keep it

#

how do i make it give crumbledish but also not get destroyed

faint yacht
daring heron
#

but how do i make it not replace the card?

crisp coral
#

but it's extremely wonky

faint yacht
#

Found... had W and H too large. Can't speed it up, though, can I...

crisp coral
#

think it's a hardcoded 10fps

faint yacht
#

G.ANIMATION_FPS is 10, yeah.

daring fern
rugged pier
#

how do i create a new card area? and can i make it so that only certain type of cards go there?

zealous glen
#

Any card can go to any card area

rugged pier
#

consumables cant go in joker area can they?

manic rune
#

they can

crisp coral
#

not normally but with mods yes

rugged pier
#

i c

manic rune
#

hell, you can insert any "card" in there afaik

rugged pier
#

i suppose you define the area a card goes to upon creating?

manic rune
#

yes

rugged pier
#

okay back to original question, how do i create another area

manic rune
rugged pier
#

tysm <3

manic rune
#

its in the zodiac patch

daring heron
#

but how do i make this not replace my joker?

#

right now it replaces it with cavendish, i just want it to add cavendish

manic rune
#

show the entire code, please

#

that part just shows the card creation

daring heron
#

would but it's too long

manic rune
#

its fine

daring heron
#

this is the best i could do

manic rune
#

remove these

spark owl
#

ruh rohj

#

wait

daring heron
#

how do i make it so it sends the top message when it succeeds the 1 in 3 chance and has room for another joker, and the bottom one if it doesnt hit the chance or you dont have any space

#

oh also, how do i make a tarot card that creates one of the few select jokers?

#

like, in a pool

#

i don't know how to create a pool or if that's even a thing ngl

valid dove
rugged pier
valid dove
manic rune
rugged pier
#

ooo gotcha ty

manic rune
#

remember to credit victin btw

rugged pier
#

ofc

cyan lagoon
#

what should i put instead of card.ability?

red flower
#

SMOS.has_enhancement(card, "m_key")

cyan lagoon
#

ok, but what about 'card.ability.mult = '? what do i change there?

#

'cause right now, the function only changes the value on tarots and not cards

red flower
#

idk what you're trying to do

cyan lagoon
#

well, this is a function to change edition values that i want to slap enhancements into

daring fern
daring heron
#

how do i make it so it does -15 mult but for example if i have 8 mult it just does -8 instead

#

so that it doesnt break

red flower
#

mult = math.max(card.ability.extra.mult, -mult)
maybe

cyan lagoon
#

you want me to replace card.ability.mult and others with it, right

red flower
#

that was for cebee, idk how to solve your thing
i would take_ownership instead

cyan lagoon
#

i see

daring heron
#

oh wait i uh.. fixed the bug i had earlier somehow

daring heron
#

or could i just set mult to 1 if its less than 1?

red flower
#

it gets the maximum between -15 and negative the current mult and subtracts that
so if -mult > -15 (like -8 > -15) then it uses that

#

math

daring heron
#

but like, where would i put that?

red flower
#

in the return

daring heron
#

like this?

red flower
#

yes

#

you can do -mult+1 if you want it to be reduced to 1

daring heron
#

i went into mult debt 😔

#

well it works, right now it just stops the others from activating, is it possible to make them still activate but just give 0 mult?

valid dove
# daring heron like this?

dont you go into debt cause mult is never defined here? you'd need to get the mult from the score but idk how to do that

#

like the mult variable in math.max

daring heron
#

nah just cuz negative mult

#

it just doesnt show up

red flower
daring heron
#

how do i do that?

valid dove
#

oh wait i didnt read haha mb

red flower
#

you can either check if the mult you're going to give is 0 and use message in the return or use mult_mod instead of mult and add the message yourself like vanilla does

daring fern
daring heron
#

wait, how do i check mult again?

#

it's not this haha

#

is it literally just mult?

#

nope

#

what is it then?

daring fern
daring heron
#

no like, what it gives

#

like how much the joker gives when it triggers

red flower
#

you also need to localize it if you want the mult text

daring heron
#

like just this?

red flower
#

no

daring heron
red flower
#

the same thing after the =

red flower
#

something something localize{type='variable'...

daring heron
#

honestly i have no idea where to look

daring fern
faint yacht
#
message = localize{type = 'variable', key = 'a_mult', vars = { ... } }
daring heron
#

what do i put instead of the dots?

red flower
#

the number

daring heron
#

so like this?

red flower
#

yes, you're missing a } there tho

daring heron
#

oops, good catch

#

it works now but it says +-0 mult for example

daring fern
glad osprey
red flower
daring fern
daring fern
red flower
daring heron
#

yeah it does say --3 mult now

glad osprey
long sun
#

hiya! how can i cap the score to the blind requirement - 1?

glad osprey
#

look at cryptids code

long sun
#

i have

glad osprey
#

the tax blind

unborn bay
#

this is terrible advice

long sun
#

it uses its own thing

glad osprey
#

fuck

long sun
#

cry_cap_score

#

and, besides, that won't help :)

unborn bay
#

~~i mean you can just use that and make your mod have cryptid as a requirement ~~

long sun
#

not even

daring heron
long sun
#

my Joker needs to cap the score to the requirement - 1 if the hand isn't the final hand

red flower
daring heron
#

so just message = localize{type = 'variable', key = 'a_mult_minus', vars = { (math.max(card.ability.extra.mult, -mult + 1)) - (math.max)} ?

red flower
#

no

#

just put a - at the beginning of the value

#

to make it positive

daring heron
#

oh okay

#

i wanted to make a new sound for -mult and -xmult, how do i make it not play the original sound and play the other version instead?

red flower
#

sound = "sound key" iirc

rugged pier
#

enhancement_gate = 'm_lucky' is this supported for SMODS currently to prevent a joker from spawning unless an enhancement is present?

#

in SMODS.Joker

red flower
#

it should work afaik

faint yacht
#

.enhancement_gate is a vanilla thing, so, should work with its' or modded enhancements.

rugged pier
#

gotchha ty guys

daring heron
#

why doesnt this work?

unborn bay
#

you forgot your mod prefix

red flower
#

it might need the mods prefix

rugged pier
#

how do i put evolution on the left side

daring heron
#

last time i used this code it worked

#

does the sounds folder have to be in assets?

tall wharf
daring heron
#

wide

unreal cosmos
#

can anyone help with this problem? it doesnt look like a mod is causing this problem. also can someone tell me what mod uses the "secret rare" shader

daring heron
#

yeah i really have no idea why it doesnt work, it should

red flower
rugged pier
daring heron
#

but how do i make it not crash when it attempts to play the sound?

unreal cosmos
#

oh its fickel fox

brisk rose
#

where does the key live on a created card object?

unreal cosmos
#

apparently fickel fox is calling a variable that doesnt exist

brisk rose
#

or actually better yet, where does a created card objet's Sprite object live in relation to it?

#

like I presume there's a ref to the Sprite object on the card object, what is it?

red flower
rugged pier
# red flower what's the code
SMODS.current_mod.config_tab = function()
    return {
        n = G.UIT.ROOT,
        config = {align = "cl", padding = 0.0, emboss = 0.05, r = 0.1, colour = G.C.BLACK},
        nodes = {
            {
                n = G.UIT.R,
                config = {align = "cm", minh = 1},
                nodes = {
                    {
                        n = G.UIT.T,
                        config = {text = localize("k_csmr_config_restart"), colour = G.C.RED, scale = 0.5}
                    }
                }
            },
            {
                n = G.UIT.R,
                nodes = {
                    {
                        n = G.UIT.C,
                        nodes = {
                            create_toggle {
                                label = localize("k_csmr_config_evolution"),
                                ref_table = config,
                                ref_value = "evolution_enabled"
                            },
                        }
                    },
                }
            }
        }
    }
end
daring heron
#

i just copied the code i used last time to play a sound but it doesnt work anymore, could anyone help?

brisk rose
# faint yacht ?

I mean the sprite that draws itself and can use methods from engine/Sprite. That one doesn't seem to be it, I tried it

red flower
daring heron
#

i keep getting this error

rugged pier
red flower
#

yeah does it work

faint yacht
rugged pier
#

i think if its just one toggle it defaults to right of screen?

#

seems weird

daring heron
#

and i did try this, but that didnt work either

red flower
rugged pier
#

tysm anyway <3

#

also do you prefer N' or nh6574 for credit?

red flower
#

no need for credit lol but both are fine

rugged pier
#

nah youve helped a ton on other stuff too

daring heron
faint yacht
primal robin
daring heron
#

still doesnt work

glad osprey
daring heron
#

oops

glad osprey
#

forgot the equal sign silly goose

daring heron
#

i do be a silly goose at times

dapper sun
#

how would i make the game treat a card as if it was the first scored card without changing the visible order?

shut crater
shut crater
next timber
#

i mean the use case for me was making every card count as first scored so

dapper sun
#

that's what i'm trying to do too lol

daring heron
#

well tried to add a second sound and now its broken

limber blaze
#

does that file actually exist

daring heron
#

yeah

limber blaze
#

cause this seems like an issue of the file not having the same name as the one specified or not existing

daring heron
#

it should exist

limber blaze
#

whats the exact filename

brisk rose
#

finally getting somewhere fixing the eiditon renderer in the card exporter

next timber
daring heron
limber blaze
#

idk

daring heron
#

oh uh, oops

brisk rose
daring heron
#

theyre .wav files

limber blaze
#

lol

brisk rose
brisk rose
#

lemme output everything including mod stuff for a better comparison

#

for the new one

next timber
#

i have a joker that's changing card ranks in context.before, but they're still scoring chips for their old ranks, is there a way to fix this or should i just move it to context.after?

daring heron
#

why doesnt this work anymore? it should trigger but it doesnt

zealous glen
next timber
#

ah yeah

#

ugh thats gonna screw up the animation

#

a solution could be to just set base.id i guess??

#

and then set the whole thing in the animation

brisk rose
#

strmnn is refactoring it because well... it didn't work anymore anyway

#

but the edition shit has always been broken

#

and I'm trying to fix it

next timber
#

black shadows are on black text.. eww

zealous glen
maiden phoenix
#

Oh it's nice to see elbe's list being updated

brisk rose
hybrid galleon
#

I'm planning to make a joker which have a similar effect to the Smeared Joker(treating two or more suits as the same suit). Is this possible without messing with the is_suit function or it's inevitable to be hardcoded into the function?

brisk rose
#

local function output_rendered_image(card)
    local file_path = output_root .. "images/" .. card.config.center.key:gsub("?", "_") .. ".png"
    local w = 71 * G.SETTINGS.GRAPHICS.texture_scaling
    local h = 95 * G.SETTINGS.GRAPHICS.texture_scaling

    local canvas = love.graphics.newCanvas(w, h, { type = '2d', readable = true })
    love.graphics.push()
    local oldCanvas = love.graphics.getCanvas()
    love.graphics.setCanvas(canvas)


    local shader = love.graphics.setShader()

    if card.edition and card.edition.type and G.SHADERS[card.edition.type] then
        shader = G.SHADERS[card.edition.type]
    else
        if card.edition then
            local edition_key = card.edition.key
            if edition_key and SMODS.Centers[edition_key] and G.SHADERS[SMODS.Centers[edition_key].shader] then
            shader = G.SHADERS[SMODS.Centers[edition_key].shader]
            end
        end
    end


local exportsprite = card.children.center

if shader then
        exportsprite.ARGS.send_to_shader = exportsprite.ARGS.send_to_shader or {}
       local _draw_major = exportsprite.role.draw_major or exportsprite

        exportsprite.ARGS.prep_shader = exportsprite.ARGS.prep_shader or {}
        exportsprite.ARGS.prep_shader.cursor_pos = exportsprite.ARGS.prep_shader.cursor_pos or {}
        exportsprite.ARGS.prep_shader.cursor_pos[1] = _draw_major.tilt_var and _draw_major.tilt_var.mx*G.CANV_SCALE or G.CONTROLLER.cursor_position.x*G.CANV_SCALE
        exportsprite.ARGS.prep_shader.cursor_pos[2] = _draw_major.tilt_var and _draw_major.tilt_var.my*G.CANV_SCALE or G.CONTROLLER.cursor_position.y*G.CANV_SCALE

         shader:send('screen_scale', G.TILESCALE*G.TILESIZE*(_draw_major.mouse_damping or 1)*G.CANV_SCALE)
        shader:send('hovering',((_shadow_height  and not tilt_shadow) or _no_tilt) and 0 or (_draw_major.hover_tilt or 0)*(tilt_shadow or 1))
        shader:send("dissolve",math.abs(_draw_major.dissolve or 0))
        shader:send("time",123.33412*(_draw_major.ID/1.14212 or 12.5123152)%3000)
        shader:send("texture_details",exportsprite:get_pos_pixel())
        shader:send("image_details",exportsprite:get_image_dims())
        shader:send("burn_colour_1",_draw_major.dissolve_colours and _draw_major.dissolve_colours[1] or G.C.CLEAR)
        shader:send("burn_colour_2",_draw_major.dissolve_colours and _draw_major.dissolve_colours[2] or G.C.CLEAR)
        shader:send("shadow",(not not _shadow_height))
    end

        

    love.graphics.setShader(shader)


    love.graphics.draw(
        card.children.center.atlas.image,
        card.children.center.sprite,
        0,0,0,2,2
        )


    love.graphics.setCanvas(oldCanvas)
    shader = love.graphics.setShader()
    love.graphics.setShader()
    love.graphics.pop()
    if love.filesystem.getInfo(file_path) then
        love.filesystem.remove(file_path)
    end
    canvas:newImageData():encode('png', file_path)
end

return output_rendered_image

here's the current code for this part of it. I'm the one who added all the shader:send stuff, which is what finally helped, after all night of nothing making an appreciable difference

#

if shader then
        exportsprite.ARGS.send_to_shader = exportsprite.ARGS.send_to_shader or {}
       local _draw_major = exportsprite.role.draw_major or exportsprite

        exportsprite.ARGS.prep_shader = exportsprite.ARGS.prep_shader or {}
        exportsprite.ARGS.prep_shader.cursor_pos = exportsprite.ARGS.prep_shader.cursor_pos or {}
        exportsprite.ARGS.prep_shader.cursor_pos[1] = _draw_major.tilt_var and _draw_major.tilt_var.mx*G.CANV_SCALE or G.CONTROLLER.cursor_position.x*G.CANV_SCALE
        exportsprite.ARGS.prep_shader.cursor_pos[2] = _draw_major.tilt_var and _draw_major.tilt_var.my*G.CANV_SCALE or G.CONTROLLER.cursor_position.y*G.CANV_SCALE

         shader:send('screen_scale', G.TILESCALE*G.TILESIZE*(_draw_major.mouse_damping or 1)*G.CANV_SCALE)
        shader:send('hovering',((_shadow_height  and not tilt_shadow) or _no_tilt) and 0 or (_draw_major.hover_tilt or 0)*(tilt_shadow or 1))
        shader:send("dissolve",math.abs(_draw_major.dissolve or 0))
        shader:send("time",123.33412*(_draw_major.ID/1.14212 or 12.5123152)%3000)
        shader:send("texture_details",exportsprite:get_pos_pixel())
        shader:send("image_details",exportsprite:get_image_dims())
        shader:send("burn_colour_1",_draw_major.dissolve_colours and _draw_major.dissolve_colours[1] or G.C.CLEAR)
        shader:send("burn_colour_2",_draw_major.dissolve_colours and _draw_major.dissolve_colours[2] or G.C.CLEAR)
        shader:send("shadow",(not not _shadow_height))
    end```

This whole block is all ~~stoled from the balatro source code by~~ me
zealous glen
hybrid galleon
daring heron
#

this joker just doesnt trigger anymore, how do i fix that?

#

all i did was add the sound

brisk rose
#

idk what's wrong with negative though

zealous glen
zealous glen
brisk rose
# brisk rose ayyy, that halped a lot

local function output_rendered_image(card)
    local file_path = output_root .. "images/" .. card.config.center.key:gsub("?", "_") .. ".png"
    local w = 71 * G.SETTINGS.GRAPHICS.texture_scaling
    local h = 95 * G.SETTINGS.GRAPHICS.texture_scaling

    local canvas = love.graphics.newCanvas(w, h, { type = '2d', readable = true })
    love.graphics.push()
    local oldCanvas = love.graphics.getCanvas()
    love.graphics.setCanvas(canvas)

        oldshader = love.graphics.getShader()


    love.graphics.draw(
        card.children.center.atlas.image,
        card.children.center.sprite,
        0,0,0,2,2
        )




    local shader = love.graphics.setShader()

    if card.edition and card.edition.type and G.SHADERS[card.edition.type] then
        shader = G.SHADERS[card.edition.type]
    else
        if card.edition then
            local edition_key = card.edition.key
            if edition_key and SMODS.Centers[edition_key] and G.SHADERS[SMODS.Centers[edition_key].shader] then
            shader = G.SHADERS[SMODS.Centers[edition_key].shader]
            end
        end
    end


local exportsprite = card.children.center

if shader then
        exportsprite.ARGS.send_to_shader = exportsprite.ARGS.send_to_shader or {}
       local _draw_major = exportsprite.role.draw_major or exportsprite

        exportsprite.ARGS.prep_shader = exportsprite.ARGS.prep_shader or {}
        exportsprite.ARGS.prep_shader.cursor_pos = exportsprite.ARGS.prep_shader.cursor_pos or {}
        exportsprite.ARGS.prep_shader.cursor_pos[1] = _draw_major.tilt_var and _draw_major.tilt_var.mx*G.CANV_SCALE or G.CONTROLLER.cursor_position.x*G.CANV_SCALE
        exportsprite.ARGS.prep_shader.cursor_pos[2] = _draw_major.tilt_var and _draw_major.tilt_var.my*G.CANV_SCALE or G.CONTROLLER.cursor_position.y*G.CANV_SCALE

         shader:send('screen_scale', G.TILESCALE*G.TILESIZE*(_draw_major.mouse_damping or 1)*G.CANV_SCALE)
        shader:send('hovering',((_shadow_height  and not tilt_shadow) or _no_tilt) and 0 or (_draw_major.hover_tilt or 0)*(tilt_shadow or 1))
        shader:send("dissolve",math.abs(_draw_major.dissolve or 0))
        shader:send("time",123.33412*(_draw_major.ID/1.14212 or 12.5123152)%3000)
        shader:send("texture_details",exportsprite:get_pos_pixel())
        shader:send("image_details",exportsprite:get_image_dims())
        shader:send("burn_colour_1",_draw_major.dissolve_colours and _draw_major.dissolve_colours[1] or G.C.CLEAR)
        shader:send("burn_colour_2",_draw_major.dissolve_colours and _draw_major.dissolve_colours[2] or G.C.CLEAR)
        shader:send("shadow",(not not _shadow_height))
    end

        

    love.graphics.setShader(shader)


    love.graphics.draw(
        card.children.center.atlas.image,
        card.children.center.sprite,
        0,0,0,2,2
        )


    love.graphics.setCanvas(oldCanvas)
    love.graphics.setShader(oldshader)
    shader = love.graphics.setShader()
    love.graphics.setShader()
    love.graphics.pop()
    if love.filesystem.getInfo(file_path) then
        love.filesystem.remove(file_path)
    end
    canvas:newImageData():encode('png', file_path)
end

return output_rendered_image

updated code

brisk rose
#

I don't even know how to make it do multipple for one edition, like I get how I'd do it, but not where they're stored

#

negative is a special case I guess

daring heron
brisk rose
#

lemme look how all the mod editions look now

wintry solar
#

the shine shader wouldn't make much difference I don think

daring heron
#

nevermind it works now

brisk rose
brisk rose
zealous glen
wintry solar
#

is that defaulting to just the shine?

zealous glen
#

It’s just that you don’t care about the other shader

brisk rose
#

can't quite figure it out

zealous glen
wintry solar
#

it looks like its just not applying negative properly to me

#

I don't recall the shine doing any colour changing stuff

brisk rose
daring heron
#

is there a better way to do this? it works now but it doesnt play the sound

brisk rose
daring heron
#

and it doesnt give an error, it just doesnt play

zealous glen
brisk rose
zealous glen
hybrid shadow
#

so a few questions

  1. the wiki isnt really clear on this, but what do i put in the loc_txt parameter if i have localization files?
  2. do i need to have a different return for each object in the localization file or can i group it all into one?
zealous glen
#

They put a shine shader on top

brisk rose
#

this might be as good as it gets, which is a hell of a lot better than it was

brisk rose
zealous glen
#

And only one return ever makes sense

rugged pier
#

hey @zealous glen sorry for the tag but something from your mod is crashing my game

#

context: i changed the global variable for alpha version to see the extra card area

#

and then deleted the mod after

#

but now everytime i try to start a run

#

i get this crash

zealous glen
#

Can you send a screenshot

rugged pier
#

but right before i get this crash

#

i get an error that says the following

hybrid shadow
zealous glen
#

Just don’t put it

flint urchin
rugged pier
#

wait

hybrid shadow
rugged pier
#

i figured out the problem

#

it was because it was an old run

#

that existed before the mod was deleted

#

sorry for the tag victin

#

great mod and art btw

zealous glen
cyan lagoon
#

how do i check if played hand is a winning hand (the one that ends the blind)

zealous glen
cyan lagoon
#

upgrade the winning hand

#

if you end the blind with a pair, the pair gets upgraded and so on

zealous glen
#

Just refer to the variable used by Blue Seal

#

At an end of round timing

cyan lagoon
#

aight, thanks

daring heron
#

do i even need 2 of these for 2 sounds?

#

i tried to add them together but that wouldnt work

#

for some reason the sound in one of my jokers wont play but the other will

#

(negativexmult.ogg wont play)

hybrid shadow
#

wait, realized what doesnt look right, fixed that

daring heron
#

can anyone help me?

zealous glen
#

Sorry I haven’t modded sounds into the game

zealous glen
hybrid shadow
hybrid shadow
hybrid shadow
daring heron
dapper sun
next timber
#

damn

hybrid shadow
# daring heron

could you send the code for the joker thats supposed to play the negativexmult sound (sorry if this is a bit excessive i just wanna see what might be going wrong)

daring heron
hybrid shadow
# daring heron

it looks like you're calling for the key of bananalatro_negativemult. first thing is you're calling negativemult and not negativexmult, second is wouldnt you need to have the prefix in the original key for the sound to read it properly (or am i just wrong abt that part)

daring heron
#

yeah i tried that as a test, but having it as bananalatro_negativexmult doesnt do anything either

faint yacht
#

...how do I bring these closer to the edge...

hybrid shadow
daring heron
#

yep

hybrid shadow
#

maybe try calling for just negativexmult?

daring heron
#

still nothing

hybrid shadow
#

damn

hybrid shadow
daring heron
#

yeah i did remove that, doesnt do anything

hybrid shadow
#

ah

valid dove
daring heron
#

and.. now the other one doesnt work either

#

probably just gonna leave the sounds for now

cyan lagoon
#

what am i missing? this destroys the card but leaves behind like a phantom card that does nothing but take up space

daring heron
#

had that same issue, no idea how to fix it tho

#

something in here probably

tall wharf
#

should this just work

valid dove
#

im pretty sure blinds dont have a calculate function

tall wharf
#

they do

valid dove
#

they do???

tall wharf
#

they do

#

when i change context.after to context.individual stuff was being done

valid dove
#

i didnt know blinds had a calculate function, wiki doesnt mention it on the smods.blind page

#

should work then i think

red flower
#

it's pretty new

tall wharf
#

it's a relatively new function

valid dove
#

ah ok, good to know at least

tall wharf
#

oh lmao

#

ok

hybrid shadow
#

if an atlas doesnt have multiple rows, do i still need to include y = 0 in the pos =

peak void
#

is there a context for when a joker triggers? not like what baseball card does, specifically when a joker triggers

hybrid shadow
tall wharf
#

can someone check if blind calc is bugged 😭

tranquil gull
#
You Are An Idiot:
+3 Chips, Create a Negative Copy of this Joker at end of round

idea that @woven stratus had that i really like

#

i will say all copies should sell for $0

#

but this is really good with abstract joker bc it blows up exponentially

broken cliff
#

All copies sell for 1 chip

tranquil gull
#

lol

tranquil gull
broken cliff
#

It's like an planet hand level up, slightly worse tho

tranquil gull
broken cliff
#

Oh it's like that, ok then

crisp coral
long sun
#

hiya! still trying to get these two Jokers to work -w-

#

The Apparition retriggers all played and unscored cards, whereas Will-o'-the-wisp gives the XMult of Ghost cards when they're played and unscored

#

they currently don't do anything

#

does anyone know why?

shut crater
#

Do you have the unscored cardarea feature enabled? Afaik it's something that must be manually enabled but I don't remember how

long sun
#

mhmhm

#

SMODS.current_mod.optional_features = { cardareas = { unscored = true } }

#

other things that use unscoring cards, like Knowledge of the College and Silver Deck, work

next timber
#

am i stupid why is my talisman patch not working

manic rune
#

isnt it ```

#

not """

#

in the pattern

#

turn off match indent too

hybrid galleon
#

made a joker making my mod suits also treated as vanilla suits, and the first thing it does is making my mod-suit-only deck be able to get debuffed by a vanilla boss.
g r e a t

long sun
#

hmm weird. so this works:

if context.individual and context.cardarea == "unscored" and context.other_card:get_id() == 14 then
      return { xmult = card.ability.extra.given_xmult }
    end```
#

but not this:

if context.repetition and context.cardarea == "unscored" then
      return {
        message = localize("k_again_ex"),
        repetitions = 1
      }
    end```
#

or this:

if context.individual and context.cardarea == "unscored" and context.other_card.ability.name == "Ghost Card" then
      return { xmult = context.other_card.ability.config.h_x_mult }
    end```
novel drum
#

i know there's a way to alter the game's music, but is there a way to change the music for only one specific stake? like rn i'm using SMODS.Sound but is there a way i could register that only when using a custom stake?

next timber
#

ive tried messing with the priority but neither -1 or 1 seem to change anything

quartz ravine
#

Don't forget to call your mom's or say thanks to your wive's today!

next timber
#

oh. oh talisman just adds all of talisman.lua into main.lua

#

i see

#

why the fuck does it do that

worthy stirrup
#

let me send the releveant code instead of all of it

#

1s

plain apex
#

how do i make this so that 2's and 10's both work as each other? like i have this and they count as the same card for like five of a kinds and stuff but if i try to play a straight that doesn't work

--binary joker functions
function Card:get_id()
    -- Check if this card is a Stone card (hidden identity)
    if self.config and self.config.center == G.P_CENTERS.m_stone then
        return -math.random(100, 1000000)
    end
    
    -- Check if the 'Binary Joker' is present
    local bin_card = next(SMODS.find_card('j_punch_bin'))

    -- If not present, return the normal ID
    if not bin_card then
        return self.base.id
    end

    -- If Binary Joker is present, force 2 and 10 to be treated as the same 
    if self.base.id == 2 or self.base.id == 10 then
        return 10 and 2
    end

    -- Default return
    return self.base.id
end


-- Define the Joker with its properties
SMODS.Joker {
    key = 'bin',
    loc_txt = {
        name = '01101010 01101111 01101011 01100101 01110010',  -- Binary name
        text = {
            "{X:punch_code_backg,C:punch_code_text}2s{}{X:punch_code_backg,C:punch_code_text}and{X:punch_code_backg,C:punch_code_text}10s{}{X:punch_code_backg,C:punch_code_text}are{X:punch_code_backg,C:punch_code_text}considered{X:punch_code_backg,C:punch_code_text}the{X:punch_code_backg,C:punch_code_text}same{X:punch_code_backg,C:punch_code_text}rank"
        }
    },
    rarity = 1,
    cost = 5,
    atlas = 'Jokers',
    pos = { x = 3, y = 2 },
    blueprint_compat = true
}
analog spoke
#

idk what I'm doing lmaooo 😭 how do I make this shader work w balatro lol

worthy stirrup
#

try working off the flipped/ionized shaders in the example smods to get started

analog spoke
#

okey, I guess, lol, asknmkf

#

I'll take a look over there

hybrid shadow
#

does the "prefix" defined in the .json file get automatically applied to any keys made?

analog spoke
#

omg, messing w shadertoy is so fun, I could spend hours just messing w the numbers on some of these

quartz ravine
#

Now this looks cool. I blended negative with polychrome and then drop the saturation of the channels down to get this cool effect

peak void
#

im trying to make a joker that only triggers if no other jokers triggered that round

wintry solar
#

Yeah post triggers are a thing

worthy stirrup
gentle rain
peak void
#

is there documentation for that anywhere

quartz ravine
#

Well I did something wrong here

next timber
#

ok so now why isnt this patch working

charred ledge
#

does anyone know how to access the save folder after installing mods? (I've tried %AppData%/Balatro/Mods)

cyan lagoon
#

as in?

charred ledge
#

wrong chat

#

my bad

fair frost
#

Good morning, all
I'm facing a tooltip ERROR, as shown in the image
This is probably a very simple mistake, but would anyone know where I have to set it up to work?

#

This is to make a unique Rank
Otherwise it works just fine

daring heron
#

okay, i'm new to tarot cards, how should i go about making one?

hybrid shadow
quartz ravine
#

Does anyone see why this recursively adds thousands of jokers?


    apply = function(self)
        G.E_MANAGER:add_event(Event({
            func = function()
                if G.jokers then
                
                -- SMODS.add_card({ key = "j_hiker", edition = "e_Fox_secretRare" })
                local jokers = getFoxJokers()
                print ("found " .. #jokers)
                
                for index = 1, #jokers, 1 do
                    local thisJoker = jokers[index]
                    print ("Adding joker index " .. index .. " who is " .. thisJoker)
                    local percent = 0.85 + (index - 0.999) / (#jokers - 0.998) * 0.3
                    delay(0.3)
                    G.E_MANAGER:add_event(Event({
                        trigger = 'after',
                        delay = percent,
                        func = function()
                            local edition = poll_with_custom_editions()
                            SMODS.add_card({ key = thisJoker, edition = edition })
                        end
                    }))                    
                end
                -- for index, thisJoker in ipairs(jokers) do
                    
                -- end
                return true
            end
        end,

the function getFoxJokers checks G.P.Centers and gets the list of jokers from my mod. It has 41 members

daring heron
#

okay, i have this

#

how do i make it give a random joker from a select pool of cards?

maiden phoenix
#

SMODS.add_card({set = "NameOfYourPool"})

daring heron
#

where do i put that?

#

and also i have no idea how to make pools

fair frost
quartz ravine
#

exactly!

maiden phoenix
# daring heron and also i have no idea how to make pools
GitHub

A Balatro Modding Framework. Contribute to Steamodded/smods development by creating an account on GitHub.

GitHub

Bunch of stuff I've modded into Balatro. Contribute to SDM0/SDM_0-s-Stuff development by creating an account on GitHub.

quartz ravine
#

I have other decks which do start you with two or three jokers around a theme. This one is the grand unlock for unlocking both the legendaries and maxing them out, so it's meant to be a funny victory lap

peak void
quartz ravine
#

I tried the same logic but I don't know why it doesn't process just a single time

onyx sonnet
#

Does anyone know how to give your card custom sticker positions and sizes? like Wee and Square Joker

dull sage
#

How would I go about getting something to happen when the blind is selected?

onyx sonnet
maiden phoenix
dull sage
#

I did try that but it didn't seem to do anything when it was inside the calculate function, which I assume is the incorrect place to put it

maiden phoenix
#

Can you show your code?

daring heron
#

i've never made a tarot card before

maiden phoenix
#

I wonder if VanillaRemade has consumables

fair frost
maiden phoenix
#

Darn it doesn't

daring heron
#

would this work?

maiden phoenix
daring heron
#

alright

maiden phoenix
#

It could work with calculate but it's unecessary

#

Another thing

#

If you want your consumable to be used under specific conditions, add a can_use(self,card) function

daring heron
#

okay

maiden phoenix
#

Every useful functions can be found in the API methods of the link I sent you

daring heron
#

do i just replace calculate = function(self, card, context) with use(self,card,area,copier)

maiden phoenix
#

Yes

daring heron
#

me when no work

maiden phoenix
#

use = function(self...

quartz ravine
#

Interesting!

@fair frost

daring heron
#

so how do i make a pool?

maiden phoenix
#

I sent you a link showing one I made for myself

daring heron
#

yeah but it doesnt explain what it does

#

so i can barely use it

maiden phoenix
onyx sonnet
dull sage
maiden phoenix
#

Oh you can't return a print

dull sage
#

I had it outside the return before and i still got nothing

maiden phoenix
#

Try

return {
  message = "Blind selected"
}
#

(I'm not sure if the message has to be a string or a table, try both)

daring heron
#

like this?

analog spoke
maiden phoenix
dull sage
maiden phoenix
#

Like message = {"Blind selected"}

daring heron
#

okay well this breaks

maiden phoenix
#

blue java and red dacca are jokers? If so they're missing the j_modprefix_ at the beginning

daring heron
#

yeah i made them

fair frost
dull sage
fair frost
quartz ravine
#

It was! I think the event manager adding the event was retriggering the apply(...if G.jokers catch over and over

daring heron
#

still breaks, do i need to put my modprefix here too?

quartz ravine
#

I changed it to not use eventManager and it works fine

fair frost
#

Good solution lol

maiden phoenix
daring heron
dull sage
#

I would be surprised if setting_blind didn't work on Seals...

daring heron
#

i did check line 237 but thats.. the desciption

brisk rose
# faint yacht ?

I forgot to say before. Turns out it is this, but the whole G.jokers.cards[1].children.center table

onyx sonnet
dull sage
#

Yup

onyx sonnet
#

not sure what you were expecting, cards arent drawn until after the blind has begun

maiden phoenix
daring heron
#

oh

maiden phoenix
#

I'm not sure what's wrong with your pool

daring heron
#

would be helpful if it showed any errors 😔

dull sage
#

Ok then I need another way of making something happen when the blind is selected

maiden phoenix
weary sentinel
#

ugh I've been trying to make my own mod and two hours in I can't figure out why my joker isn't working

daring heron
#

how do i do that without deleting code?

onyx sonnet
#

pretty sure that's not really all that possible, although you can make it happen when it's drawn

#

which is effectively the same thing

wintry solar
dull sage
onyx sonnet
#

eremel knows better than i do but im not really sure how that works

#

isnt the card still in the deck, how would the game calculate it

daring heron
#

do i need weights for each item in the pool?

dull sage
#

Maybe a work around would be to get it at the round end instead

wintry solar
#

just turn on deck calc

onyx sonnet
#

is that an smods optional feature like joker retrigger and quantum enhancements?

wintry solar
#

yes

lavish umbra
#

Hi, is it here i can ask for help on balatro modding error?

maiden phoenix
daring heron
#

aight lemme see

#

nope

#

still doesnt work

weary sentinel
#

Why does this joker do nothing?
Intended affect is adding +1 perma mult to scored 2s, 3s, 4s, and 5s

dull sage
#

Because that's kind of a problem for my idea

onyx sonnet
#

What exactly are you trying to do

daring heron
#

why isnt my pool working?

#

it's not giving any errors in the program

dull sage
#

For context I'm making an LGBTQ themed mod. Certain seals (Genderfluid in this case) will be changing their gender every round

maiden phoenix
daring heron
#

another joker in the mod

maiden phoenix
#

Show your pool code

daring heron
maiden phoenix
#

I told you to remove the modded entries from cards

#

Just keep gros michel and cavendish for now

daring heron
#

i tried

#

but that did nothing

onyx sonnet
#

@dull sage go to your mod's main lua file and add SMODS.current_mod.optional_features = {cardareas = {deck = true}} to the top

#

actually let me make it more readable

 SMODS.current_mod.optional_features ={
    cardareas = {
        deck = true
    }
 }

daring heron
maiden phoenix
#

Copy paste the whole crash log with just gros michel and cavendish

daring heron
dull sage
onyx sonnet
dull sage
#

I changed the message to a print to see it in the console instead but still nothing

maiden phoenix
# daring heron

Try this instead

cards = {},
inject = function(self)
    SMODS.ObjectType.inject(self)
    self:inject_card(G.P_CENTERS.j_gros_michel)
    self:inject_card(G.P_CENTERS.j_cavendish)
end,
onyx sonnet
#

show me what you're doing to print to console

dull sage
edgy reef
#

It's trying to inject c_bananalatro_fruit into a pool that doesn't exist.

#

Which iirc is usually an issue with the ConsumableType and/or consumable set.

dull sage
#

I have a print at the top of my file and that works when the game loads. And I've had prints in the calculate function before

maiden phoenix
#

Oh yea I didn't notice the consumable doesn't have a set

daring heron
#

huh?

onyx sonnet
#

did you reload the game after introducing the optional features?

daring heron
#

i do always reload the game yes