#💻・modding-dev

1 messages · Page 335 of 1

manic rune
#

WHY ARE YOU DEBUFFED, THE BLIND IS OVER 😭

red flower
#

maybe you need to call that function that recalculates debuffs? idk

manic rune
#

hm

modern kindle
#

bepis

manic rune
#

hi dilly

modern kindle
#

hi bestie

manic rune
daring heron
#

How would one go about creating a new deck?

modern kindle
manic rune
red flower
#

SMODS.Front when

shell timber
#

the SMODS.Center in question:

#

actually back inherits from center right

red flower
#

center is different from front

#

yeah

daring heron
#

So.. how do i make a deck?

red flower
brisk rose
#

y'know fair

#

the smods.back documentation blows

#

I'm getting bodied, lol

daring heron
#

Nah i agree

brisk rose
#

It's actually not as bad as I thought

maiden river
#

my blind text isn't showing up 😒
I have the keys right in the localization file and the object itself

brisk rose
maiden river
#
Blind = {
        bl_fvb_the_jam = {
            name = "The Jam",
            text = { "All Weapons are debuffed"}
        }
    },

here's the code

#

indentation 💀

#
SMODS.Blind({
    key = "the_jam",
    atlas = "the_jam",
    boss = { min = 2 },
    boss_colour = HEX("E0569B"),
    discovered = false,
    recalc_debuff = function (self, card, from_blind)
        if (card.area == G.weapons) and not G.GAME.blind.disabled then
            return true
        end
    end,
})
#

also this

daring heron
#

How would i for example create a deck that includes 26 random lucky cards

#

Not like the suit or number to be random

#

Just which cards are lucky

red flower
daring heron
#

Barely

red flower
#

you would need to add a pseudorandom("seed") < G.GAME.probabilities.normal / odds for it to be applied randomly

daring heron
#

How could i make it always only apply to 26?

brisk rose
brisk rose
daring heron
#

Yeah

red flower
brisk rose
#

Maybe do a 50/50 chance and have a counter that stops at 26

red flower
#

or you can do pseudorandom_element 26 times

faint yacht
#

Just gotta make sure said pseudorandom_element doesn't choose the same card.

#

Which sounds like a repeat until loop.

red flower
#

yeah i would remove the card from the list each time

daring heron
#

Alright, could anyone show kinda where i should put what?

faint yacht
#

Was more thinking of initializing a blank table, then have the pseudorandom_element occur in the repeat until loop which also contains an iteration over the current table to check if the chosen card is already added to the table... if not, add it. until is the # of the table equal to the desired amount of cards.

red flower
#

kinda hard to do without coding it for you haha

daring heron
#

Fair enough

#

I mean, if you’d like, thatd save me a headache or 2 hah

maiden river
#

are custom cardareas not included in recalc_debuff?

recalc_debuff = function (self, card, from_blind)
  if (card.area == G.weapons) and not G.GAME.blind.disabled then
      print("hi")
      return true
  end
end,

this doesn't do anything

daring heron
#

Where could i even start

#

I barely even know how to format the code

maiden river
#

how much programming do you know?

daring heron
#

Lua?

#

Pretty much 0

#

I know a little bit of gdscript

maiden river
#

oh
you should check out something that goes over the basics
you don't need a lot of knowledge about the whole language, but for modding balatro having a basic foundation is enough

daring heron
#

Yeah i followed a tutorial on how to create a custom joker

red flower
# daring heron I mean, if you’d like, thatd save me a headache or 2 hah

something like this


local cards = {}
for i, card in ipairs(G.playing_cards) do -- this is to copy the table without modifying it
    cards[#cards+1] = card
end

for i = 1, 26 do
    local chosen, index = pseudorandom_element(cards, pseudoseed("seed"))
    chosen:set_ability("m_lucky")
    table.remove(cards, index)
end
daring heron
#

But i cant find a tutorial for a custom deck sadly

maiden river
#

I mean the basics of lua egg

daring heron
#

Where could i find that

maiden river
#

uh
you could read the lua documentation

red flower
maiden river
#

I'm sure there are videos on it too

faint yacht
#

I have a deck that leaves only the Aces out of the 52 cards available, if that is of help.

hushed field
hushed field
#

I should've scrolled up just ever so slightly, haha

daring heron
#

Real

hushed field
#

But yeah, that's how I do it too

red flower
#

damn im just copying ice..

maiden river
#

at least my swirl color works stevie_not_bald

faint yacht
# daring heron

Oh, actually, you should pseudoshuffle(cards, pseudoseed('lucky')) the table before doing the for loop.

red flower
#

what does that do

wintry solar
#

That seems unnecessary

faint yacht
#

-# That's what I do for my SPB Spectral targeting random cards.

red flower
#

you could do that instead of the for loop and just change the first 26 cards

#

but its basically the same

crystal flicker
#

i want to check if a specific tarot is being used. am i doing something wrong here syntactically?

daring fern
daring heron
#

yeah lol

crystal flicker
#

thats insane

daring heron
#

notepad goes hard trust

red flower
#

please use a code editor lol

daring heron
#

which one

red flower
#

also you would replace this part of the example with my code

#

vscode

glad osprey
#

how do i make a custom center render like a tag

daring heron
daring heron
#

wait nvm

#

i think i got it

maiden river
#

or do you have something else in mind

glad osprey
#

i think?

#

idk im trying to make a menu that shows every perk you currently have active

daring heron
#

can i remove this config?

#

or is it neccesary

modern kindle
maiden river
#

god damn it 😭

#

not again

red flower
graceful magnet
#

is there a cardarea or such for booster packs?

maiden river
maiden river
unborn bay
glad osprey
unborn bay
#

dammir

graceful magnet
#

sweet

maiden river
#

I'm too fast

modern kindle
#

whatever u like works cause its ur mod

#

:)

maiden river
#

thank you 😭

red flower
#

+5% accuracy -5% miss chance

modern kindle
#

peak

maiden river
#

someone was writing a damn dissertation in the other chat

modern kindle
#

people take moddin too srs

maiden river
#

the main reason I like the text like that is because I get to avoid Big Number Go Brr

unborn bay
daring heron
#

so, would this do?

--- STEAMODDED HEADER
--- MOD_NAME: Extra Decks
--- MOD_ID: ExtraDecks
--- MOD_AUTHOR: [CebeeDrawz]
--- MOD_DESCRIPTION: Test Adds a multitude of new decks to the game
--- PREFIX: xmpl

----- MOD CODE-----

SMODS.Atlas{
    key = 'Decks',
    path = 'Decks.png',
    px = 71,
    py = 95
}

SMODS.Back{
    name = "Lucky Deck",
    key = "Decks",
    pos = {x = 0, y = 0},
    loc_txt = {
        name = "Lucky Deck",
        text ={
            "Start run with",
            "13 cards converted to Lucky cards"
        },
    },
    apply = function()
        G.E_MANAGER:add_event(Event({
            func = function()
                for i = 1, 26 do
                    local chosen, index = pseudorandom_element(cards, pseudoseed("seed"))
                    chosen:set_ability("m_lucky")
                    table.remove(cards, index)
                end
                return true
            end
        }))
    end
}

----- MOD CODE END -----
red flower
#

youre missing the first part of what i posted

daring heron
#

so this?

eager pendant
#

Can you tell me how to output card.ability.extra.emult in a message?

maiden river
#

indentation AUGGGGGGHHHHH

manic rune
#

oh god that indentation

maiden river
daring heron
#

???

red flower
#

also yeah fix your indentation

maiden river
#

if so you could just print it with print

daring heron
eager pendant
daring heron
#

like this?

manic rune
#

much cleaner, yeah

red flower
#

yes but now you're missing the return true

daring heron
#

how do i fix that

#

sorry im pretty

#

stupid sometimes lol

red flower
#

you need this part before the }))

zealous glen
daring heron
#

okay, so this?

zealous glen
red flower
manic rune
zealous glen
red flower
daring heron
#

no, i just imported that into it

eager pendant
#

How to output Emult in messages when counting?

daring heron
#

this gotta be it right?

--- STEAMODDED HEADER
--- MOD_NAME: Extra Decks
--- MOD_ID: ExtraDecks
--- MOD_AUTHOR: [CebeeDrawz]
--- MOD_DESCRIPTION: Test Adds a multitude of new decks to the game
--- PREFIX: xmpl

----- MOD CODE-----

SMODS.Atlas{
    key = 'Decks',
    path = 'JokersTest.png',
    px = 71,
    py = 95
}

SMODS.Back{
    name = "Lucky Deck",
    key = "Decks",
    pos = {x = 0, y = 0},
    loc_txt = {
        name = "Lucky Deck",
        text ={
            "Start run with",
            "13 cards converted to Lucky cards"
        },
    },
    apply = function()
        G.E_MANAGER:add_event(Event({
            func = function()
                local cards = {}
                local cards = {}
                for i, card in ipairs(G.playing_cards) do
                    cards[#cards+1] = card
                end
                
                for i = 1, 26 do
                    local chosen, index = pseudorandom_element(cards, pseudoseed("seed"))
                    chosen:set_ability("m_lucky")
                    table.remove(cards, index)
                end
                    return true    
            end
        }))
    end
}

----- MOD CODE END -----

maiden river
manic rune
#

why r there two local cards = {}

maiden river
#

So people can finally leave me alone skull_rotate

manic rune
#

am i tripping

chrome widget
#

Anyone here have knowledge about vertex shaders?

daring heron
#

nevermind, it still doesnt work

#

what did i do wrong 😔

manic rune
#

if it comes to shader, i doubt anyone except eremel and like, 5 other people know about it winter

#

😭

daring heron
#

hi paper >:0

#

i saw you

chrome widget
#

Great. I'm basically just trying to figure out the most effective way to determine which vertex of a quad I'm currently dealing with in a vertex shader

#

I don't know how to declare or identify that information unfortunately

eager pendant
#

How to output emult in the message when counting

manic rune
#

🥀

#

i cant help with shader at all, so good luck winter

manic rune
red flower
flint urchin
#

Sup!! im trying to make my first mod
im making a tarot card here but im not sure how to make a function for it like making it create random jokers on use
Is there mayhaps an IDE that can show these functions as i write the code??
also what would i need to write to make that exact function work lol i have no exeprience in lua-
( dont ask about the big atlas i am gonna fix that)

daring heron
red flower
#

no IDE is going to show you everything but some like vscode will show you what steamodded has documented

red flower
zealous glen
#

It doesn’t break just doesn’t work like you expect

hard needle
#

i used to use notepad++ i recommend using vscode though

flint urchin
zealous glen
#

Key identifies the card

#

Not the consumable type

flint urchin
flint urchin
graceful magnet
#

trying to make something create a copy of a consumable used from a pack, it isn't triggering though, I think I got the initial calculate check wrong

eager pendant
#

When scoring, if there is a Joker with X2 the message "x2" appears on the screen, how to do the same with emulsion only?

daring heron
shell timber
red flower
zealous glen
#

“Not equal”

flint urchin
daring heron
flint urchin
#

so do i go
key
the set tarot

shell timber
#

key is the key of the object

zealous glen
#

You specify a key

shell timber
#

so here it would be paper

zealous glen
#

But yeah

#

The key identifies the card

#

It can be anything

shell timber
#

or the_paper or whatever

graceful magnet
zealous glen
#

It can even be caino

red flower
zealous glen
#

Or gluttenous

zealous glen
#

Or

flint urchin
zealous glen
#

.config.center_key

eager pendant
graceful magnet
#

yep cool now it works

flint urchin
#

does this work mayhaps?

zealous glen
#

Syntax error

graceful magnet
#

now I'm having trouble with the other one

which is also just not triggering

zealous glen
#

Missing a comma

graceful magnet
flint urchin
zealous glen
#

Judgement

flint urchin
#

oh right

#

thats a good

zealous glen
#

Although SMODS provides an easier to use utility function

flint urchin
#

reference

flint urchin
zealous glen
#

I recommend the latter

daring heron
#

also some of my code is yellow now??

flint urchin
red flower
daring heron
#

i have no idea what i'm doing

#

why are there 2k errors 😭

red flower
#

those are warnings

#

dont worry about them

chilly hull
#

i want to remove .25 xmult per card played, which works, but cards score mess it up, when playing a flush it counts wayy too many cards (from X10 to X3.25)
also i wan he extinct message to appear when the card reaches <1 but instead the message appears above the cards (once for evey scoring card) got the code from g ros michel in the example jokers by steammodded

daring heron
#

oh okay

flint urchin
daring heron
#

it still crashes tho

red flower
flint urchin
red flower
graceful magnet
#

warnings are usually inconsequential and just mean "hey you could be doing this" or "hey this might not necessarily work the expected way but it won't crash"

daring heron
#

same in 2x

#

but upscaled

#

okay different error

red flower
red flower
daring heron
#

nothing

red flower
#

ohh

#

it's SMODS.Back not Decks

#

idk where you got decks from

daring heron
#

oh

zealous glen
#

I’m pretty sure there was a debate

red flower
#

no my problem is that it was back before and suddenly it changed to decks lol

#

i agree that back is confusing and bad

daring heron
#

okay it runs now but it still doesnt show up

eager pendant
#

How to display emult on the screen when counting

zealous glen
shell timber
#

just emult should work(?) do you have a message in the return?

#

send your code

red flower
zealous glen
#

So true!

daring heron
#

how do i make the deck show up :>

red flower
daring heron
#

also it does give multiple warnings in my code

shell timber
#

instead of returning emult_mod just return emult and get rid of the message

daring heron
red flower
#

thats fine

#

its just warnings, you can right click to disable them

daring heron
#

why isnt it showing up though?

shell timber
#

the key shouldn't be Back

eager pendant
#

Thanks, it's working)

graceful magnet
#

okay well I couldn't figure out context.debuffed_hand so I tried doing it manually and okay well it's still not triggering

daring heron
shell timber
#

whatever the deck is called

#

the key is what identifies the object

daring fern
daring heron
#

it works now, but it crashes once i start a run with my deck

#

do i need to set pseudoseed to smth?

graceful magnet
#

pseudoseed("whatever")

daring fern
daring heron
#

alright, now this

graceful magnet
#

Show your full deck code

daring heron
#
--- STEAMODDED HEADER
--- MOD_NAME: Extra Decks
--- MOD_ID: ExtraDecks
--- MOD_AUTHOR: [CebeeDrawz]
--- MOD_DESCRIPTION: Test Adds a multitude of new decks to the game
--- PREFIX: xmpl

----- MOD CODE-----

SMODS.Atlas{
    key = 'Back',
    path = 'JokersTest.png',
    px = 71,
    py = 95
}

SMODS.Back{
    name = "Lucky Deck",
    key = "luckydeck",
    pos = {x = 0, y = 0},
    loc_txt = {
        name = "Lucky Deck",
        text ={
            "Start run with",
            "13 cards converted to Lucky cards"
        },
    },
    apply = function()
        G.E_MANAGER:add_event(Event({
            func = function()
                local cards = {}
                local cards = {}
                for i, card in ipairs(G.playing_cards) do
                    cards[#cards+1] = card
                end
                
                for i = 1, 26 do
                    local chosen, index = pseudorandom_element(cards, pseudoseed("seed"))
                    chosen:set_ability("m_lucky")
---@diagnostic disable-next-line: param-type-mismatch
                    table.remove(index, cards)
                end
                    return true    
            end
        }))
    end
}


----- MOD CODE END -----
daring fern
daring heron
#

my bad, removed it

#

still crashes tho

daring fern
eager pendant
daring heron
shell timber
#

i don't know how misprint works

daring heron
#

still doesnt show the correct deck image tho

chilly hull
#

this only works on scored cards, how do i make it so it loses X0.25 mult for every played card? like ice cream

hushed field
faint yacht
#

context.full_hand exists, was about to say.

daring fern
red flower
chilly hull
red flower
#

or main_start

daring heron
#

but how do i make it use the correct image?

red flower
daring heron
#

can i just rename it to anything?

#

or the image name

red flower
#

yes

daring heron
#

i tried and it crashed

#

do i need to rename it in the atlas too?

chilly hull
red flower
willow plinth
#

guys maybe i'm blind, i searched this discord and the wiki, is there a way to left align joker info text?

daring heron
#

the key in atlas?

#

or the one in the lucky deck

#

or this one

shell timber
#

it should still be SMODS.Back

faint yacht
daring fern
daring heron
#

okay i think i got it now?

#

it doesnt crash

#

still doesnt show the image tho

chilly hull
#

imo

daring heron
red flower
daring heron
#

like this?

red flower
#

lowercase atlas but yes

#

and a comma obviously

daring heron
#

now it crashes when i start a run again

willow plinth
# red flower like, the description?

yes...i want to have a numbered list in there which obviously looks ugly with the default center alignment

i see a lot of align=cm in the source code but i'm not really sure where the source code for the specific joker popup is

red flower
#

you can maybe do that with main_end

#

by making the UI for that manually

red flower
willow plinth
#

like it would probably enough to know where the text from loc_text get's processed and put into UI in the source

#

i'll look into main_end

daring heron
#

doesnt crash if its Atlas instead of atlas tho

#

but still doesnt show the right image

willow plinth
red flower
daring heron
#
SMODS.Atlas{
    key = 'Back',
    path = 'DeckBacks.png',
    px = 71,
    py = 95
}

SMODS.Back{
    atlas = "luckydeck",
    name = "Lucky Deck",
    key = "luckydeck",
    pos = {x = 0, y = 0},
    loc_txt = {
        name = "Lucky Deck",
        text ={
            "Start run with",
            "13 cards converted",
            "to {C:enhanced}Lucky {}cards"
        },
    },
    apply = function()
        G.E_MANAGER:add_event(Event({
            func = function()
                local cards = {}
                for i, card in ipairs(G.playing_cards) do
                    cards[#cards+1] = card
                end
                
                for i = 1, 13 do
                    local chosen, index = pseudorandom_element(cards, pseudoseed("pseudoseed"))
                    chosen:set_ability("m_lucky")
---@diagnostic disable-next-line: param-type-mismatch
                    table.remove(cards, index)
                end
                    return true    
            end
        }))
    end
}


----- MOD CODE END -----
red flower
#

the atlas should also say key = "luckydeck"

#

you are going back and forth with changes for no reason lol

frosty rampart
#

^ the "atlas = ___" line in your deck back should be using the same string as the key of the atlas you want to use

daring heron
#

there we go

#

thanks so much

chilly hull
willow plinth
#

how do i escape curly braces in loc_texts?

#

backslashes don't seem to work

hushed field
# chilly hull smth like this?

no, full_hand is actually a table that contains all the cards in your full hand! So you'll wanna do

if context.before then
  for _index, _playingcard in ipairs(context.full_hand) do
    card.ability.extra.Xmult = card.ability.extra.Xmult - 0.25
  end
end
chilly hull
#

what is ipairs?

tall wharf
#

integer pairs 😭

faint yacht
#

ipairs() returns index-value pairs and is mostly used for numeric tables.
pairs() returns key-value pairs and is mostly used for associative tables.

chilly hull
tall wharf
#

you use it to loop thru an int indexed array

unborn bay
#

everyone, ipairs

tall wharf
#

this is starting to get bloated

gilded narwhal
#

Dear god

hushed field
# chilly hull what is ipairs?

ipairs is what you use to loop through tables that only contain values, while pairs is used if it's a key-value set up

rapid stag
#

oh, is it unique ability per mod

zealous glen
#

So what about Fish?

zealous glen
tall wharf
#

all boss blinds are the fish

zealous glen
hushed field
#

The cards that get passed on to the context.full_hand (or context.scoring_hand, or any context, for that matter) are always just a table of cards by index, so there's no keys, which means you wanna use ipairs

zealous glen
#

For Victin’s Collection, I’d wait for new mechanics

hushed field
#

G.play, as you were checking there, is only ever passed along as a variable named area or cardarea. the context.cardarea variable will be the only one that ever contains whether a card is in G.play or in G.hand, etc. So you never need to compare another context with G.play

maiden phoenix
tall wharf
maiden phoenix
chilly hull
unborn bay
#

triple back ticks

hushed field
tall wharf
unborn bay
tall wharf
#

haya

frosty rampart
unborn bay
#

hi aikoyori can you add my mod to your joker

chilly hull
tall wharf
#

i need to look into the mod content

#

first

#

and see what i can adapt

dull wyvern
#

Currently trying to make my first mod to modify a few existing jokers

I managed to change the jokers themselves with lovely injection, but I'm not sure what is the best way to setup mod description

Right now I use <modname>.lua, which is essentially just a steammodded header with nothing else. Seems kinda jank, but maybe thats a fine way to do it?

hushed field
frosty rampart
# chilly hull i see thakns

you'll need to do a bit more work if you want the message to accurately show how much mult it loses, but that'll make the functionality work properly at least

dull wyvern
#

I looked through it, but its a bit overwhelming right now. I'm asking for some... On hands solution

#

Different mods have different ways of doing it

frosty rampart
# chilly hull yeah im looking for it

i forget how ramen behaves exactly, but i made an xChips counterpart joker that loses value for played cards as well, and i just keep track of how much is lost in a separate variable and then return that variable at the end

tall wharf
#

oh wow source modder please tell me how to use hammer for source

unborn bay
#

i feel like the right answer to that sounds like 'dont'

hushed field
#

i personally use card_eval_status_text to display messsages outside of the return, but I think the current adviced smods way is some form of a calculate call.

dull wyvern
tall wharf
#

😭😭😭😭

#

i wanna make portal 2 maps is it that complicated

maiden phoenix
#

Doesn't portal 2 have a level editor?

dull wyvern
#

Actually, idk if hammer++ have Portal 2 support. I mostly just do stuff for TF2

unborn bay
#

hmm

tall wharf
unborn bay
#

something with spelling out a profanity does something

tall wharf
#

you'll have to resort to hammer

maiden phoenix
#

Oh

dull wyvern
#

(and it stinks)

tall wharf
#

I'll need a list of profanities tho

unborn bay
#

'fuck' 'shit' 'bitch' all the common profanities ig

frosty rampart
faint yacht
# chilly hull yeah im looking for it

You'd probably want to put that return table into a SMODS.calculate_individual_effect() and pass the currently iterated card as the target... so, something like this, iirc.

local effects = {card = card, message = '-X0.25', colour = G.C.MULT}
SMODS.calculate_individual_effect(effects, context.full_hand[_index], 'message', effects.message, false)
#

-# I could also be completely wrong... but return-ing in that way would only target the first card.

chilly hull
#

ive made it work already!

#

yay

#

it just says -X1.25 when playing 5 cards

#

which is good enough for me

faint yacht
#

That works too.

rustic moth
#

Hi guys does anyone know what function gets called when you change the contrast options in the collabs tab?

chilly hull
#

i can try to make it look like ramen if you'd explain it a lil bit

faint yacht
chilly hull
willow plinth
#

thoughts?

zealous glen
willow plinth
zealous glen
#

I’ll be back in A + B months

hushed field
# willow plinth thoughts?

I think you might need to invest in some alternate ui options if these description blocks are common, haha

willow plinth
#

ahhhh i'm so cooked cringesmiley

hushed field
#

How are the A B and C picked or defined?

wintry solar
#

you should use the new multi box feature

#

where you have the big line breaks you should ahve a new box, but I think the bottom one should be at the top

#

it's the most important

#

<@&1133519078540185692>

hushed field
#

I mean, I assume that all the complexity largely comes from referencing mechanics that aren't on the card, haha

unborn bay
#

<@&1133519078540185692> kill him

oblique pond
#

voucher that took way too much effort (T2 is just 2x more of them)

willow plinth
zealous glen
#

<@&1133519078540185692>

karmic creek
#

pew pew

hushed field
#

Vonnegutted

zealous glen
rustic moth
# tall wharf why do you need this

well it's kinda complicated, basically I'm creating a deck that changes the appearance of your cards the moment you start a run with it and reverts back to your previous selected skin once you exit the run, it works just fine but I also wanted to change the suits colors dynamically but changing directly G.C.SUITS seems to overwrite G.C.SO_1 too... that's why I wanted to call the function responsible for changing the suits colors directly, but I don't know where it is

zealous glen
#

I used ALT

unborn bay
#

how many mods add periods to their descriptions and how many mods don't

hushed field
zealous glen
#

When I don’t use an empty line

willow plinth
wintry solar
#

its on the localization page

zealous glen
wintry solar
#

but to sum it up, you know how the current description is a table?

#

just make it a table of those tables

zealous glen
#

I think it’s better to have only part of the description there at a time

#

Especially the unlockable ones

willow plinth
zealous glen
#

I don’t think they should be visible until unlocked

#

Maybe you can hold ALT to preview them

zealous glen
#

You probably need new localization entries for those

#

That’s what I do at least

unborn bay
#

honestly this type of joker would be quite hard to follow and understand properly in a run

frosty rampart
#

if the tooltip already exists, the extra tooltips are done via adding to the info_queue table in the loc_vars function

unborn bay
#

unless thats the intention

oblique pond
willow plinth
willow plinth
zealous glen
#

You can just use main_end

zealous glen
willow plinth
zealous glen
#

Casual/fan projects usually have people trying to force ideas at all costs

#

Good designers just can them

frosty rampart
willow plinth
#

i'm open to everything here, i just want those five platonic solids to interact with eachother somehow, while also not being an exodia type of thing

oblique pond
zealous glen
#

Platonic solids wanting other Platonic solids is parasitism

willow plinth
frosty rampart
willow plinth
#

but in that case, it makes more sense

#

it's like a serendipity secondary use of an otherwise temporary joker

twin basin
#

How do i check if the player discards a specific suit?

willow plinth
# zealous glen Emergent design

hmmm i think i'll just go with that dnd dice suggestion, and make each of these platonic solids retrigger something randomly, and then they might synergize/snowball naturally

placid star
#

in this context, what would self be

daring fern
willow plinth
hard needle
#

G.

placid star
primal robin
#

no-no-no, no G

#

Only m

frosty rampart
unborn bay
#

so save the return table of Game.init_game_object in a hook, then add whatever values you want in G.GAME to that table, then return that table

placid star
#

i figured i could just use G.domain.config.card_slots

soft echo
#

are xchips automatically part of smods or would i need to implement that myself?

frosty rampart
#

yep, as of beta 0323b at least
works the same as chips/mult/xmult, just return { xchips = ... } and smods will handle the rest

soft echo
#

alright

#

now how would i add an edition to a card?

daring fern
soft echo
#

thank you

#

which are the edition keys?

daring fern
soft echo
#

alright that makes sense

#

i'm having a hard time finding this on the documentation on the github

young pollen
red flower
soft echo
#

ah

digital niche
#

for some reason i keep getting this crash, its supposed to add a random card out of one in the list to the deck

gusty iron
#

is there anyway to remove the edition/enhancement/sticker/whateverelseyoucanthave2ononecard limit?

daring fern
hushed field
#

There is no sticker limit, technically

#

They're all separate entities, some just preclude each other explicitly

willow plinth
#

4 in 6 chance to retrigger a random scored card 4 times - what would the rarity of this be? too OP for common?

hushed field
#

Yes, definitely too strong for common hahaha

willow plinth
#

(i know 4 in 6 is 2 in 3)

#

aight hmmmmmm

gusty iron
daring fern
gusty iron
#

okay then i guess ill tackle that another time

#

id probably just have to make enhancements that are combinations of two

hushed field
#

Somethingcom is the seal expert, so you might wanna drain some of their knowledge haha

willow plinth
#

still seems too strong somehow :((

crystal flicker
#

how do insert the card back into the deck? it's successfully in the deck but its just... chilling there 💀

iron haven
#

open a standard card pack and skip it.

hushed field
willow plinth
#

seems reasonable

crystal flicker
hushed field
frozen plinth
#

Quick question
Got this bug
Any ideas on how to remedy it?

frozen plinth
#

this is what started breaking it

gusty iron
#

how do i check how many times a hand has been played

frozen plinth
#

check telescope voucher code

daring fern
gusty iron
#

and how do i make a consumable only spawn after a condition is met? do i use in_pool(self, args)?

gusty iron
#

okay so

#

for example:

#

in_pool(self, args)
return G.GAME.hands["juh"].played > 0
end

#

like that?

daring fern
gusty iron
#

okay

frozen plinth
# daring fern Code?

apologies sent wrong code

SMODS.Joker
{
    key = "Joetube",
    loc_txt = 
    {
        name = "Joetube",
        text = 
        {
            "{C:chips}+300{} Chips",
            "If scored hand has only {C:spades}Spades{}",
            "and/or {C:clubs}Clubs{}"
        }
    },
    rarity = 1,
    cost = 5,
    unlocked = true,
    discovered = true,
    atlas = "jokers",
    pos = 
    {
        x = 8,
        y = 0,
    },
    
    config = {extra = {chips = 300}},

    calculate = function(self, card, context)
        if context.joker_main then 
            local heartsfound = 0
            local diamondsfound = 0
            for i = 1, #context.scoring_hand do
                if context.scoring_hand[i].is_suit('Diamonds') then
                    diamondsfound = 1 + diamondsfound
                end 
                if context.scoring_hand[i].is_suit('Hearts') then
                    heartsfound = 1 + heartsfound
                end 
            end
            if heartsfound == 0 and diamondsfound == 0 then

            end
            return
                {
                message = "I just LOVE Lucario",
                colour = G.C.BLUE,
                card = card,
                chips = card.ability.extra.chips
                }
            
        end
    end
}
#

its happens/crashes anytime i play a hand

tall wharf
pure shard
#

Does anyone know a mod that draws text on cards?

#

using SMODS.DrawStep?

gusty iron
#

suggested to me by a friend from school

rapid stag
#

what is the return value of take_ownership()? 🤔
is it the same as if you instantiated something of that class normally?

i.e. SMODS.Joker() and SMODS.Joker:take_ownership() return the same thing

willow plinth
#

can someone help me with thinking? i feel dumb

if there's a 1 in 12 (8.333%) chance of something happening, but an additional 1 in 20 (5%) chance of it happening twice, what is the combined chance?

#

or is there no real "combined chance"?

crystal flicker
#

i'm just following marble joker and it seems pretty similiar

rapid stag
keen tiger
#

Okay, I'm running into a frustrating event issue

#

I need an event to not execute until the blind select anim and the hand drawing anim is fully finished

keen tiger
#

Basically:

#

I'm manually calling G.FUNCS.select_blind in a standalone fn, not as part of an smods calculate fn @daring fern

#

So idk where context is

keen tiger
#

So I'm doing this in response to a socket message

#

nvm got it working

#

i just check for the draw_to_hand state

#

and keep relaunching events until its not

willow plinth
#

like once selecting_hand is the state, every anim should be finished

minor magnet
#

any idea why these aren't working?

#

patching straight hand calculation

celest timber
#

how can i do something each time you draw cards? i looked into certificate code, but i want it to be always, and idk how to get the context without jokers/cards

rare obsidian
#

can any1 help me make a mod? I need help with art, balance, ideas, and programming

#

so basically everything lol

rugged star
#

why does this not localize properly?

rare obsidian
#

the mod is called Scribbled, it adds an enhancement type only accessible via custom cards, It weakens the card, but allows you to de-scribble it with other cards, It will have synergies for being scribbled, and the scribbling cards it a more common way to dupe cards

minor magnet
minor magnet
#

wait ill link them if i can find them

rare obsidian
#

thx

#

This is the prototyping art i have so far, and i have broken code

rugged star
formal quest
#

What random elements are possible to access the outcome of before they happen?

#

I'm thinking of a Joker that tells you the outcome of some random events before they happen. The main things I want to access are wheel of fortune, judgement, sigil/ouija, and the top card of the deck. Also good would be the contents of booster packs.

rapid stag
minor magnet
#

still need help

high sinew
#

i wanna make this brown is there away to add colors besides one for G.C.()

minor magnet
#

try HEX(hexcode)

#

or add it as G.C.YOURCOLOR in main, which is usually better

high sinew
#

I have utility for mod so I could add In there somehow?

#

is there a way to
i have a define.lua so idk if thats what it is tech

#

would u consider colors utility or a definition in terms of where i put

soft echo
#

how does one create a joker from base balatro?

high sinew
soft echo
#

obelisk

high sinew
#

set it up where you have context checking hands

#

this joker i made checks for four of a kind

soft echo
#

i meant like

#

adding the joker to your joker slots

high sinew
#

then you can make a loop where if hand is the same reset it

soft echo
#

cause ik how to do it for my jokers

high sinew
#

not sure what u mean

#

hard to give u an answer when i have 0 indication of how youve built mod, sorry

soft echo
#

like this

high sinew
#

ah ok

soft echo
#

like ik how to get the joker i've made, but not the ones from base balatro.

high sinew
#

so its not making the card?

soft echo
#

this is throwing an error

high sinew
#

also i would not materialize jokers tbh

#

what error?

soft echo
high sinew
#

ad

#

ah

#

this might help you in how to build set up my guess is the way youve set up keys

#

try 'j_obelisk'

#

also it is spelled wrong in ur code too

#

that honestly might be ur error watch spelling errors

#

u have no e

soft echo
#

oh

#

my bad

glad osprey
#

holy fuck its brainstorm

soft echo
#

yeah i'm matching pfps with my girlfriend

glad osprey
#

i dont even have to ask what hers is

soft echo
#

also thank you for the help

high sinew
#

oive been there to where spelling breaks mod XD

rare obsidian
glad osprey
#

killing you...

rare obsidian
#

lol

quartz ravine
#

I just had a good idea. Add some config's to the mod so folks can enable or disable specific aspects of my mod. Seems like a nice to have

rare obsidian
#

how to fix???

#

oh...

#

im dum

minor magnet
#

it's usually better

soft echo
#

is that not what i'm using?

minor magnet
#

you're using the base game one, smods one is a bit simpler

#

SMODS.create_card{key = "j_obelisk"}

quartz ravine
#

How do most folks do attribution? I would like to add credits to the jokers that folks here made, and would like some ideas 🙂

I thought about trying to get jokers made by certain folks to have their names in place of my mod name, but I am not sure how to do that

soft echo
#

alright

quartz ravine
#

Or, it would be cool to add a INFO_QUEUE message. I will see if I can do that

rare obsidian
red flower
rare obsidian
#

...

#

maybe

#

yes, im redoing it

red flower
#

yeah i would recommend sticking to AI just for general programming questions and stuff rather than to code the entire thing because that's very incoherent

sturdy compass
#

AI does not know how to balatro mod lol

rare obsidian
#

lol fr i leard a lesson

quartz ravine
#

AI is fine for general common programming basic things but you reall have to have an idea of what you're doing, otherwise it will generate reasonable seeming garbage

#

I've had junior devs try to explain what a PR is doing and...it's been awkward when they can't explain things

rare obsidian
#

how do I make the squigglies go away

iron haven
#

What if you tell AI to make modded joker ideas?

red flower
#

you do you but I'm personally against using AI for the creative side of things, that's supposed to be the human part

chrome widget
#

Like so

thorn flame
#

Currently making big mistakes

#

what if instead of friends of jimbo it was enemies of jimbo? meet george bush

brisk rose
#

I wouldn't recommend replacing the mod badge

#

It'd defeat the purpose of the mod badge

faint yacht
#

...well, technically, you could edit the mod badge to include someone alongside the mod name, be it separated by - or mod name in brackets iirc.

hushed arrow
#

how can I make a mod that modifies the existing values of cards/jokers? like making jimbo make +20 mult instead of +4

sturdy compass
faint yacht
dense adder
#

Does it next require something special when use with not
if context.cardarea == G.play and context.individual and context.scoring_hand and not next(context.poker_hands["High Card"]) then

wintry solar
#

That will always be false

dense adder
#

indeed it has

#

i have realised my mistake

gentle rain
# thorn flame

:33< are red suits republicans and black suits democrats

high sinew
#

whats the way again for having context scoring to look for any hand with a pair instead of this where it checks if it is a pair

#

this code only triggers if hand is pair i want it to be any hand containing pair

gentle rain
high sinew
dense adder
#

card.lua

high sinew
#

thank you 🙂

thorn flame
#

there were two decks made

#

one for bush and one for kerry

gentle rain
gentle rain
high sinew
#

or wait u gotta do all hands dont u

hushed arrow
#

how do I find the object key of an existing card? for example is the object key for hanging chad "j_hanging_chad" or "Hanging Chad"?

thorn flame
#

To clarify

lethal stratus
#

how do i check for face cards?

#

(upgrade sequence not written, the if is just confusing me)

glad osprey
lethal stratus
glad osprey
lethal stratus
#

thats not

glad osprey
#

oh

lethal stratus
#

the question 😭

glad osprey
#

i see

#

card:is_face()

twin basin
#

im really confused on how to make a custom booster pack,
can someone send me example code?

glad osprey
#

best I can do is pray for you 🙏

red flower
twin basin
#

oh ;w;

#

thank you :)

brisk rose
#

This is one from prism I sent before as an example

glad osprey
#

booster packs are strangely difficult to make

lethal stratus
#

for card is face does it apply to all 5 cards, i need to check if any of the cards aren't face

red flower
#

no, you need to iterate through the list yourself

glad osprey
lethal stratus
#

what is the condition called for number of cards played

brisk rose
glad osprey
#

not :is_face()

lethal stratus
#

no i know that

glad osprey
#

oh wait

#

#G.play.cards

#

I thought you were asking how to check if a card was a numbered card

lethal stratus
#

the issue is iterating through play.cards

fluid lagoon
#

I had a thought, a deck customization that changes the face cards when they become wild card enhancement. Is there any way for that right now or no?

shut crater
glad osprey
lethal stratus
#

thank you

lethal stratus
#

uhh how do i type the loop specific check for a face card im tweaking

#

(specifically how do i check in general Card x)

glad osprey
#

G.play.cards[x]

fluid lagoon
glad osprey
#

there's no built in functionality for that but I'm sure it wouldn't be impossible to make it yourself

fluid lagoon
#

oh ok

quartz ravine
glad osprey
#

I got them working eventually I just have no clue how so I wouldn't ever be able to do it again

quartz ravine
#

I’d like to add a new ux call out tonahndle crediting folks who contributed joker art to my mod, does anyone have tips on adding new ux info queue items?

I was thinking something similar to the sticker callout

glad osprey
#

localization file

quartz ravine
twin basin
#

how do i add a custom rarity to a joker

glad osprey
#

rarity = "<mod prefix>_<rarity key>"

quartz ravine
lethal stratus
#

this if isnt working

glad osprey
#

not:is_face() does not exist

chrome widget
#

The localization string is this, under descriptions.Other

    name = "Artist",
    text = {
        "{E:1}#1#{}"
    },
},```
lethal stratus
chrome widget
#

And I'm just feeding in the artist as a variable from a table

red flower
lethal stratus
#

this isnt working at all atm

#

probably forgot to upgrade it 😭

glad osprey
#

do return not break

#

break simply leaves the for loop

lethal stratus
#

do i return mult = 0

glad osprey
#

Just dont return anything

#

also set the cards mult to 0 when a card is found to be face

#

assuming it works like obelisk

lethal stratus
#

no this is face cards increment

glad osprey
#

og tea

quartz ravine
lethal stratus
#

numbers do not

glad osprey
#

set mult to 0 when a number card is found

oblique pond
#

not sure what's going wrong here to make the joker's description not show up (the jokers effect works perfectly)
think i messed something up in the text or loc vars

glad osprey
#

like

#

Just no description?

oblique pond
#

pure white, ill get a screenshot rq

glad osprey
#

oh wait

#

loc_txt

#

not loc_text

oblique pond
#

thank you

lethal stratus
#

turns out the joker_main having the check is a bad place for it

#

at least i think so

glad osprey
#

look at how ride the bus works

#

that's basically what yours is right

lethal stratus
#

ye

#

i keep forgetting the base game code exists

glad osprey
#

how else do you think we're able to play it

lethal stratus
#

😭

brisk rose
#

So I have a question, if a mod's jokers don't have mod badges is it likely because they're suppressing it intentionally or just missing badge_color or smth?

#

I have some jokers without badges and I hate it

#

Idk why anyone would do that on ourpose

#

I mean in my mod load out, not made by me

glad osprey
#

are they vanilla jokers

brisk rose
brisk rose
#

I unlocked everything besides all the stakes for every deck

quartz ravine
#

@chrome widget

Thank you so much! I felt like getting attribution squared away was the last thing I neded to ship this thing!

chrome widget
#

Nods nods!!

brisk rose
glad osprey
#

dear modpack creators
please tell people who's mod your adding to your modpack that you are adding that mod to your modpack

quartz ravine
#

Cool, I hope you like it! 🦝

brisk rose
glad osprey
#

or else i will steal your teeth

brisk rose
hushed arrow
#
SMODS.Joker:take_ownership('hanging_chad', -- object key (class prefix not required)
    { -- table of properties to change from the existing object
    config = {extra = 5},
    },
    false -- silent | suppresses mod badge
)

why isnt this increasing the retrigger count of hanging chad?

quartz ravine
#

Dear god! 5 retriggers!!!

glad osprey
hushed arrow
glad osprey
twin basin
#

how do i make a specific list of jokers show up in a booster pack?

brisk rose
oblique pond
#

question: how would i go about updating a value on buying something (most importantly a voucher being redeemed)
currently trying to make a "current money given" thing\

lethal stratus
#

upgrades regardless, only sends mult if face card

#

idk why

hushed arrow
lethal stratus
#

doesnt reset either

quartz ravine
# quartz ravine gotchu fam

So I have a function to only get jokers I added in the mod. So this booster has only the jokers I created in my own mod


SMODS.Booster({
    object_type = "Booster",
    key = "FickleFoxCollection",
    kind = "Jokers",
    atlas = "FoxModBoosters",
    pos = { x = 0, y = 0 },
    config = { extra = 4, choose = 1 },
    cost = 10,
    order = 3,
    weight = 0.96,
    create_card = function(self, card)
        local randomFoxJoker = getRandomFoxJoker()
        print(randomFoxJoker)
        local getCard = create_card("Joker", G.pack_cards, nil, nil, true, true, randomFoxJoker, "Fox")
        sendInfoMessage("creating cards for this pack", self.key)               

        return getCard
    end,
    ease_background_colour = function(self)
        ease_colour(G.C.DYN_UI.MAIN, G.C.BLUE)
        ease_background_colour({ new_colour = G.C.SET.PURPLE, special_colour = G.C.BLACK, contrast = 2 })
    end,
    loc_vars = function(self, info_queue, card)
        return { vars = { card.config.center.config.choose, card.ability.extra } }
    end,
    loc_txt = {
        name = "Fickle Fox Booster",
        text = {
            "Choose {C:attention}#1#{} of",
            "up to {C:attention}#2# Fickle Fox Jokers{}",
        },
    },
    group_key = "FickleFoxBooster",
})
quartz ravine
#

If you want to do something similar, then you can use these two functions

function getResourceWithPrefix(s)
    local results = {}
    for k, v in pairs(G.P_CENTERS) do
        if StartsWith(k, s) then 
            print(k)
            table.insert(results ,k)
        end
    end
    return results
 end


function getRandomFoxJoker()
    print("getting a random fox joker")
    local allFoxJokers = getResourceWithPrefix("j_Fox")
    print ("received list of " .. #allFoxJokers)
    local randomJoker = allFoxJokers[math.random(#allFoxJokers)]

    print ("random joker shall be ".. randomJoker)

    return randomJoker
end
oblique pond
# brisk rose Can you be more specific?

specifically, trying to make it so when you buy a voucher, the joker will do a calcuate function to update the amount of money you're getting out of it (so essentially what context do i check for in a calculate() function for a voucher buy)

brisk rose
oblique pond
#

perhaps do a config for that, i'm pretty sure togas does that too

quartz ravine
#

If you want it to only have certain jokers, then you could do this, change the create_card to this. For this example, it would make a booster pack full of golden jokers, lol

local getCard = create_card("Joker", G.pack_cards, nil, nil, true, true, j_golden, "Fox")
  sendInfoMessage("creating cards for this pack", self.key)               

  return getCard
glad osprey
#

it does technically add other things but those are deck-specific

quartz ravine
brisk rose
oblique pond
glad osprey
#

this is how making ui feels

brisk rose
glad osprey
#

that wouldn't activate anything when a voucher is bought tho

brisk rose
glad osprey
#

from my understanding they wanted to calculate something when vouchers where bought

oblique pond
quartz ravine
#

You could write a lovely patch for common_events and patch in to line 1362

Just adding that onto to G.GAME as another var would be the easiest way. This is pretty much what I did to publish the ToDo list hand as a global variable

brisk rose
#

Makes sense

quartz ravine
#

oh, nevermind, sounds like you solved it!

oblique pond
#

making my one crash sacrifice to not adding a comma per change

brisk rose
hushed arrow
#
SMODS.Joker:take_ownership('hanging_chad',
    {
    config = {extra = 5},
    },
    false
)

why isnt this causing hanging chad to retrigger more times? the text on the joker doesnt change too unlike for jimbo

oblique pond
#

it doesn't crash when hovering over it so that's good

twin basin
brisk rose
oblique pond
#

had a slight issue with a crash upon exiting the blind but it works absolutely perfectly now, gg
it's also really strong especially with decks that give you vouchers like zodiac deck

sleek siren
#

How can I edit values of a joker in an outside function? I'm trying to make a joker animate

glad osprey
#

like an animated atlas?

brisk rose
glad osprey
#

or just swap it from one sprite to another when a condition is met

sleek siren
#

I did, although I'm still confused

#

It calls for SMODS.Jokers although it's a nil value for some reason

quartz ravine
glad osprey
#

@scarlet thorn

scarlet thorn
#

?

glad osprey
#

animated joker moment

scarlet thorn
#

yea

#

ive known about that

quartz ravine
# twin basin i got this :(

oh yeah, I also wrote a startsWith, since lua doesn't have one. Sorry.

function StartsWith(String,Start)
    return string.sub(String,1,string.len(Start))==Start
 end

quartz ravine
sleek siren
#

Sure! ^^ I'll likely use that later

#

This is what I was given

Oops! The game crashed:
[SMODS KRIS "Animation.lua"]:13: attempt to index field 'Jokers' (a nil value)

Additional Context:
Balatro Version: 1.0.1o-FULL
Modded Version: 1.0.0~BETA-0323b-STEAMODDED
LÖVE Version: 11.5.0
Lovely Version: 0.7.1
Platform: Windows
Steamodded Mods:
1: Weemy by Kris and co. [ID: KRIS, Version: 0.1.1]
2: Talisman by MathIsFun_, Mathguy24, jenwalter666, cg-223 [ID: Talisman, Version: 2.2.0~dev, Uses Lovely]
Break Infinity: omeganum
3: DebugPlus by WilsontheWolf [ID: DebugPlus, Version: 1.4.1, Uses Lovely]
Lovely Mods:

Stack Traceback

(3) Lua method 'update' at file 'Animation.lua:13' (from mod with id KRIS)
Local variables:
self = table: 0x096b9078 {F_GUIDE:false, F_CRASH_REPORTS:false, F_QUIT_BUTTON:true, F_ENGLISH_ONLY:false, F_VIDEO_SETTINGS:true, STAGE:1, F_MOBILE_UI:false, F_NO_SAVING:false (more...)}
dt = number: 0.00906116
(*temporary) = Lua function '(LÖVE Function)' (defined at line 144 of chunk [lovely debugplus.logger "debugplus/logger.lua"])
(*temporary) = nil
(*temporary) = number: 15
(*temporary) = string: "attempt to index field 'Jokers' (a nil value)"
(4) Lua upvalue 'oldupd' at file 'main.lua:999'
Local variables:
dt = number: 0.00906116
(5) Lua field 'update' at file 'main.lua:1846'
Local variables:
dt = number: 0.00906116
(6) Lua function '?' at file 'main.lua:938' (best guess)
(7) global C function 'xpcall'
(8) LÖVE function at file 'boot.lua:377' (best guess)
Local variables:
func = Lua function '?' (defined at line 909 of chunk main.lua)
inerror = boolean: true
deferErrhand = Lua function '(LÖVE Function)' (defined at line 348 of chunk [love "boot.lua"])
earlyinit = Lua function '(LÖVE Function)' (defined at line 355 of chunk [love "boot.lua"])

#

sorry for long message

quartz ravine
#

Ignore a lot of this, it has some pretty inefficient code but it works

The section that deals with swapping states is here

if context.cardarea == G.jokers and context.before and context.scoring_name == card.ability.to_do_poker_hand then
            sendInfoMessage("YU-GI_OH")
            local cards = context.scoring_hand
            
            G.E_MANAGER:add_event(Event({
                trigger = 'after',
                delay = 0.15,
                func = function()
                    card:flip(); play_sound('card1', percent);
                    card.config.center.pos.x = card.ability.activecoord
                    card:juice_up(0.3, 0.3); return true
                end
            }))
            play_sound('Fox_yourMove', 1);
            
            delay(0.3)
            card.ability.active = true
            
            G.E_MANAGER:add_event(Event({
                trigger = 'after',
                delay = 0.15,
                func = function()
                    card:flip(); play_sound('card1', percent);
                    card:juice_up(0.3, 0.3); return true
                end
            }))     
            delay(0.5)
        end
#

In my case, I flip the card, then change its texture and flip it back.

sleek siren
#

Thanks! ^^

quartz ravine
#

I store the two coords in the cards own config section so I am not dealing with setting coords in the body

scarlet thorn
fluid lagoon
#

so with stuff looks like it changed again for putting in custom deck customizations, how is it done now?

brisk rose
#

Y know I just realized it might be a bit strange that I use git itself exclusively through cli, but any actual github features like pull requests or releases, I just open my web browser though I'm almost sure you can do literally everything through either git or gh cli

fluid lagoon
#

is there a guild on how to do deck skins for deck customizations like the friend of jimbo?

sleek siren
#

How can I tell what position a joker is in the joker slots?

daring fern
sleek siren
#

Thanks! ^^

brisk rose
#

I was gonna say that was a hacky way to have to do it, but then I realized if the position was stored in the card, conflicts would very easily arise

manic rune
#

its not hacky, its literally how blueprint works

#

and brainstorm too

daring fern
manic rune
#

true, but it doesnt differ much from taking a position in G.jokers.cards

brisk rose
#

But then I realized it's better than the alternative

manic rune
#

they probably think that if the position gets switched around during scoring or something then it might cause conflicts and such, but it really wont

#

:p

brisk rose
#

I /was gonna/ say the way to do it was hacky until I reasoned the alternative is stupid

manic rune
#

oh, misunderstood what you said, my bad

#

i just woke up, sorry 🥀

brisk rose
#

You're good :3

crisp coral
#

its 12pm fym youve just woke up

manic rune
#

im literally brushing my teeth rn myst

brisk rose
manic rune
#

i love sleeping ❤️

brisk rose
manic rune
brisk rose
sturdy compass
#

Just gotta wait on art

manic rune
#

why did i think that was a joker showcase vid

sturdy compass
#

LMFAO

daring heron
#

tried to add another deck to my mod and now it broke


----- BONUS DECK -----

SMODS.Back{
    atlas = "bonusdeck",
    name = "Bonus Deck",
    key = "bonusdeck",
    pos = {x = 0, y = 0},
    loc_txt = {
        name = "Bonus Deck",
        text ={
            "Start run with",
            "{C:attention}13 {C:enhanced}Bonus {}cards"
        },
    },
    apply = function()
        G.E_MANAGER:add_event(Event({
            func = function()
                local cards = {}
                for i, card in ipairs(G.playing_cards) do
                    cards[#cards+1] = card
                end
                
                for i = 1, 13 do
                    local chosen, index = pseudorandom_element(cards, pseudoseed("pseudoseed"))
                    chosen:set_ability("m_bonus")
---@diagnostic disable-next-line: param-type-mismatch
                    table.remove(cards, index)
                end
                    return true    
            end
        }))
    end
}


----- LUCKY DECK -----

SMODS.Back{
    atlas = "luckydeck",
    name = "Lucky Deck",
    key = "luckydeck",
    pos = {x = 0, y = 0},
    loc_txt = {
        name = "Lucky Deck",
        text ={
            "Start run with",
            "{C:attention}13 {C:enhanced}Lucky {}cards"
        },
    },
    apply = function()
        G.E_MANAGER:add_event(Event({
            func = function()
                local cards = {}
                for i, card in ipairs(G.playing_cards) do
                    cards[#cards+1] = card
                end
                
                for i = 1, 13 do
                    local chosen, index = pseudorandom_element(cards, pseudoseed("pseudoseed"))
                    chosen:set_ability("m_lucky")
---@diagnostic disable-next-line: param-type-mismatch
                    table.remove(cards, index)
                end
                    return true    
            end
        }))
    end
}

----- MOD CODE END -----

#

do i need to make a new atlas per deck?

manic rune
#

did you create SMODS.Atlas for luckydeck and bonusdeck?

brisk rose
daring heron
#

oh alright

daring fern
#

How does one get the chip value of the playing cards to right if it is being blueprinted by more than 1 blueprint?

daring heron
#

so would it be better to create multiple?

brisk rose
brisk rose
daring heron
#

i will then, thanks

brisk rose
#

I like having multiple things on the sane atlas so I can just... look at them but probably more consistent to keep it seperate

daring fern
manic rune
#

🤔

#

u can try storing the card the blueprint is storing, then checks the stored card's chips?

manic rune
#

wha

#

HM

#

why doesn't it work though, thats weird

#

could it be because while the blueprint next to a playing card stores properly, the other blueprint stores the blueprint next to it instead of storing the playing card?

daring heron
#

wow, already have 270 lines of code

#

anyway, how would i replace this to make it give foil cards instead of lucky cards

manic rune
#

:set_edition("e_foil")

#

jnsns

#

dang im slow

daring heron
#

and how do i make the deck look like a foil card

brisk rose
#

Yknow... it's it even accurate to call Balatro.exe a binary? It's more just a folder full of code that luajit jit-compiles

#

Just a 'shower thought'

daring heron
#

oh god the sound when you start a run with foil deck

daring heron
daring fern
daring heron
#

idunno if people will find the sound of 13 foil cards annoying

brisk rose
daring fern
daring heron
#

nice, now how do i give the deck a foil shader

#

is that something you can even do?

daring fern
#

Cryptid does it.

daring heron
#

havent played cryptid much

#

so how do i do it?

daring fern
daring heron
#

i cant even read that 😭

#

thats so much code

#

hm..

daring fern
daring heron
#

hmm..

#

i still dont know which part of that applies the shader

daring heron
#

do i just add that to the code? or do i need smth else

#

this doesnt seem to crash it, but it also doesnt apply the shader

#

don't mind the negative, i just wanted to test that out

#

well, if anyone knows, please tell me

daring fern
#

Not your issue though.

daring heron
#

in the description?

daring fern
daring heron
#

i thought that was only for negatives

daring fern
daring fern
daring heron
#

then whats edition for

daring fern
daring heron
#

oh

daring heron
daring fern
daring heron
#

and how do i do that 😔

daring fern
daring heron
#

okay, but how and where do i put it

#

sorry lol, i started learning lua like 2 days ago

daring fern
daring heron
#

everything?

daring fern
daring heron
#

between here?

daring fern
daring heron
#

okay, well i still have no idea what to put there lol

daring fern
#

Is it possible to prevent cards from being destroyed?

brisk rose
daring heron
#

-# so does anyone know how i can apply the foil shader to one of my decks