#💻・modding-dev

1 messages · Page 444 of 1

daring fern
#

You mean you want the hand to not sort?

hidden sable
#

if it requires anything complex like patching or whatever then nvm

hidden sable
nova eagle
#

now what

#

this is a headache

quiet bear
#

where is the code to draw the modification textures (for cards) located?

daring fern
nova eagle
#

oh no

#

uhhh

hidden sable
nova eagle
#

thats bad for me,

#

uh.. how do i correct it?

daring fern
nova eagle
#

no

#

can i get a link?

daring fern
hidden sable
#

also this

daring fern
nova eagle
#

cool, thx

quiet bear
#

why does trying to call a shader crash the game if there is no edition present? trying to apply multiple edition shaders as proof of concept.

#

specifically,

#

if i remove the 'or 1 == 1' then it works

pastel kernel
#

question, how do you make it so you can spawn something like the soul spectral?

#

minos was made with the intention to spawn all spectral cards, and even spawn something like the soul spectral

#

and a pointer if you believe it

quiet bear
#

that sounds a little broken

daring fern
daring fern
thorn bough
#

bumping this

pastel kernel
quiet bear
#

sounds fun

nova eagle
#

i couldnt find this in the smods wiki, but how do i tell the thing to look in scripts -> jokers.lua to find the code for jokers?

daring fern
nova eagle
#

thx

daring fern
quiet bear
#

when using self.children to do draw_shader, it can only do 3 with back, center and front. is there a way to draw more layers?

quiet bear
#

darn, I never thought it could ever be that simple.

pastel kernel
daring fern
pastel kernel
#

c_gateway and c_pointer?

#

nevermind

daring fern
hidden sable
#

any way to discard all cards in hand

#

using code

daring fern
hidden sable
#

how

pastel kernel
#

if i speak

subtle merlin
hidden sable
#

G.FUNCS.draw_from_deck_to_hand(-#G.hand.cards)?

#

then how

thorn bough
#

Can someone please enlighten me as to the context for destroyed playing cards? I'm assuming it doesn't follow the same nomenclature as the consumable area.

local card_destroyed = Card.remove
function Card:remove(context)
if self.added_to_deck and not G.CONTROLLER.locks.selling_card then
local destroy_key = "destroying_" .. string.lower(self.ability.set or "")

-- Consumables
if self.ability.consumeable then
  SMODS.calculate_context{card = self, sriot = {[destroy_key] = true}}
  DRM.Increment()

-- Played cards (Base set or others)
elseif (context and context.cardarea == G.play) or self.area == G.play then
  SMODS.calculate_context{card = self, sriot = {[destroy_key] = true}}
  DRM.Increment()
end

end

return card_destroyed(self, context)
end

subtle merlin
thorn bough
daring fern
# hidden sable how
local thunk = G.hand.config.highlighted_limit
G.hand.config.highlighted_limit = 1e10
for k, v in pairs(G.hand.cards) do
    G.hand:add_to_highlighted(v)
end
G.FUNCS.discard_cards_from_highlighted(nil, true)
G.hand.config.highlighted_limit = thunk
hidden sable
daring fern
subtle merlin
daring fern
thorn bough
#

I'm doing it in a sort of weird way to prevent unintended bugs

daring fern
hidden sable
#

speaking of boosting the highlight limit, is there a way to boost the highlight limit by like say 3 for 1 hand then set it back?

thorn bough
hidden sable
# daring fern Yes.

how, i imagine to set the highlight limit its just G.hand.config.highlighted_limit = G.hand.config.highlighted_limit + 3

#

but how do i know when to set it back

thorn bough
# daring fern Yes.

I lied slightly, it DOES detect, but it only counts as one destruction, and it doesn't work with arsonist from cryptid

daring fern
#
SMODS.change_play_limit(3)
SMODS.change_discard_limit(3)
hidden sable
#

then how do i detect when the player has played a hand so i can set it back down

#

or discarded a hand

daring fern
hidden sable
#

you cant use context in a consumable

#

right

pastel kernel
#

Holy moly, free souls

#

But no gateway

#

Eh that’s fine

#

I can just use pointer

vague crest
#

its going badly

pastel kernel
#

GO PERKEO GO

daring fern
hidden sable
subtle merlin
daring fern
thorn bough
# daring fern `context.remove_playing_cards`

Okay, I did some light debugging. Using context.remove_playing_cards works mid-hand, but if a card is destroyed at the end of the blind, it doesn't detect. If it does detect, it only counts the destruction once, when it should work 5 times (IE: Immolate)

hidden sable
vague crest
#

i thought it was working yesterday and like it DOES work its just got a scary bug where every time you use it it (?) im not really sure but the deck starts getting Wrong

#

ive seen it before in other mods

#

the context here is i have a joker where if you discard one card it discards your whole hand

pastel kernel
vague crest
#

it even works with trading card! which took a bit of extra trickery

pastel kernel
#

I was using perkeo to clone pointer spectrals

#

Sorry if I sounded strange

vague crest
#

but it makes the deck weird every time you use it, when cards are added back to the deck at the end of the round it adds an extra one for each time you discarded and it leads to weird always face down cards and invisible cards

pastel kernel
hidden sable
#

how does one hook smods.calculate_context

vague crest
#

it can snowball fast if you have multiple of them but even with one its an issue

#

looks fine in the deck view!

#

but when you get into a blind it gets bad

#

it also interestingly brings up the deck mini-view if i mouse over one of the face down cards

fierce frost
hidden sable
manic rune
#

huh

#

i thought consumables have calculate?

hidden sable
#

they do but i want it used on use

manic rune
#

oh yeah, then you probably want to hook

hidden sable
#

how

manic rune
#

uh let me get up from bed rq

#

do u know how to hook yet

hidden sable
#

no

#

is it complex

manic rune
#

nope

hidden sable
#

ok

manic rune
hidden sable
#

basically just need to "hook" when the player discards or plays a hand

manic rune
#

yes

hidden sable
#

can you give me an example on how that would work here?

#

would i do

#

SMODS.calculate_context = function

#

confused

sterile minnow
#

whats wrong here?

#

oh I think i got it

#

G.consumables

#

well it still didnt work

wild escarp
#

As I understand it, G.GAME.current_round resets every round, so this code picks a new suit every round? If so, is there somewhere I can write to that resets after every hand?

local function reset_willatro_jokeinthebox()
    G.GAME.current_round.willatro_jokeinthebox = G.GAME.current_round.willatro_jokeinthebox or { suit = 'Spades' }
    local joke_suits = {}
    for k, v in ipairs({ 'Spades', 'Hearts', 'Clubs', 'Diamonds' }) do
        if v ~= G.GAME.current_round.willatro_jokeinthebox.suit then joke_suits[#joke_suits + 1] = v end
    end
    local jokeinthebox_card = pseudorandom_element(joke_suits, pseudoseed('willatro_jokeinthebox' .. G.GAME.round_resets.ante))
    G.GAME.current_round.willatro_jokeinthebox.suit = jokeinthebox_card
end
idle plaza
tranquil gull
#

how do you lovely patch other mods

rapid stag
#

i'm assuming that if i use set_ability([joker key]) to turn a joker into a different joker, it wipes the config table that was there, right? or does it carry over?

scarlet imp
#
if pseudorandom("tboi_midas_touch") < G.GAME.probabilities.normal / card.ability.extra.enhance_odds then
    local _card = context.other_card
    G.E_MANAGER:add_event(Event({
        func = function()
            card:juice_up(0.3, 0.5)
            return true
        end
    }))
    G.E_MANAGER:add_event(Event({
        delay = 0.2,
        func = function()
            _card:set_ability(G.P_CENTERS[card.ability.extra.mod_conv])
            return true
        end
    }))
end

trying to use this to enhance cards into gold cards based on RNG, but everytime it activates I get a crash, saying that 'center is nil'. Any ideas?

hidden sable
#

i might need a better explanation or an application example

subtle merlin
#

Omfg im stupid, consumables have a calculate function

rapid stag
#

oh wait

#

you want the joker to juice

scarlet imp
#

that part isn't wrong, I want the Joker to be the card that gets juiced up

#

ye

rapid stag
#

uhhh, put the joker into a local

#

like local jkrRef = card
and then juice_up that

hidden sable
pastel kernel
#

how do you add a joker to the soul pool?

rapid stag
#

indexing card from within an event is weird

subtle merlin
hidden sable
rapid stag
scarlet imp
#

the value is "Gold"

#

but that should be fine either way, right?

pastel kernel
#

if a joker's rarity is 4, does it automatically become part of the soul pool?

tranquil gull
rapid stag
#

wait no hold on

#

that might be the problem

pastel kernel
rapid stag
#

i don't think G.P_CENTERS.Gold is a thing

#

try "m_gold" instead

scarlet imp
#

ahhh you probably right ngl

unkempt thicket
#

How can i fix a soul layer being offset? It seems to be weighted to the left, it looks centered on the left most slot

subtle merlin
hidden sable
#

for example let's say i have an atlas with 2 sprites

#

pos 0,0 on that atlas would be the normal card

subtle merlin
#

again, never messed with souls before.

hidden sable
#

pos 1,0 would be the soul layer

rapid stag
#

no - the actual co-ordinates themselves aren't tied to whether it's soul or not, it's just the co-ords of that graphic based on the dimensions specified in the atlas of the sprites. that doesn't matter for layering

you can set pos and soul_pos in your item to whatever you want and it should just grab the respective sprites from that spritesheet, pos being the base and soul_pos being the floating sprite

hidden sable
#

yeah that's what i said

scarlet imp
hidden sable
#

but in stupid language

#

does anyone know how hooking works

#

i'm stupid and need assistance

loud gorge
#

I made a Modds folder when i started setting it up, and it keeps respawning even when i redownload the game, it has settings.jkr i believe from one the setup thingys, will it mess with mods?

rapid stag
#

is this not helpful for leaning hooking. i see it linked often

hidden sable
#

i think if i saw an example of it being used in a mod i might know how

rapid stag
#

makes sense, i've never read it because i understood hooking intuitively, but i couldn't explain it in a way that made sense

loud gorge
# hidden sable setting what up

The smods and lovely things, i made a folder in the Modds called things that make it work and its also appearing in the mods folder

rapid stag
hidden sable
loud gorge
hidden sable
hidden sable
loud gorge
hidden sable
loud gorge
hidden sable
hidden sable
loud gorge
hidden sable
loud gorge
#

do i need it?

hidden sable
#

if you want mods yes

#

if not no

loud gorge
#

where do i get version.dll agai-

hidden sable
#

it's in your balatro install

#

steam local

loud gorge
#

you said to delete it, will it show automatically when i open game?

hidden sable
#

you've asked this 3 times and i've responded the same every time, it shouldn't

loud gorge
#

then how do i get again

hidden sable
#

your steam local files

#

go to balatro on steam

#

click the gear icon

#

then click browse local files

#

in that folder that opens up

#

delete version.all

#

*dll

loud gorge
#

then how do i get it back?

hidden sable
loud gorge
#

ok

hidden sable
#

if all else fails

#

verify files on steam

loud gorge
#

it still appears and files are verified

rapid stag
# hidden sable i was told to hook SMODS.calculate_context, would hooking that work the same hoo...

i happen to hook that, too. this one's a bit more complex, though

basically - i have a joker that debuffs itself given a certain condition. since jokers don't calculate when debuffed, i need to handle undebuffing it outside of the joker. as it happens, the way SMODS.debuff_card() works based on source strings you make up and supply to the function, which gets stored on a table. so i just designated a source to always be undebuffed at the end of a round, check for that table and see if it contains my debuff source, then undebuffs it.

bear in mind that if you don't return the calculate return value, you break calculating. i only return it the way i do because it'll then always return nil, which i don't want in relation to another implementation

pastel kernel
#

Imagine if I stole from yahimod and made Lydia into Sans, which STOCKPILES XCHIPS

hidden sable
#

so if i put a hook on context inside of a consumable use and have it check for context.after and do a thing, to return do i just return return_table?

shell timber
pastel kernel
hidden sable
#

also to me this seems a lot like how they describe patching

hidden sable
#

i messed around and i think i made it work!

#
local old_calc = SMODS.calculate_context
        SMODS.calculate_context = function(context, return_table)
            if context.pre_discard or context.after then
                SMODS.change_play_limit(-3)
                SMODS.change_discard_limit(-3)
            end
            local ret = old_calc(context, return_table)
            if ret then
                return ret
            end
        end
#

i did this right, right?

#

i tested and it worked so

pastel kernel
#

How does soul_pos work?

hidden sable
pastel kernel
#

does it

hidden sable
#

yeah

#

like how you would use pos not nelly

#

*normally

pastel kernel
#

does it use the px and py as a reference?

hidden sable
#

if you don't know what pos is

pastel kernel
#

so if offset by 1, it uses the other part of the photo

pastel kernel
#

the entire other part

hidden sable
#

also do yall think this is a good header, not appealing, just basic for now

pastel kernel
#

i'm gonna draw a diagram

hidden sable
pastel kernel
#

The card is the main pos

hidden sable
#

yes

pastel kernel
#

The fork is the soul_pos

hidden sable
#

exactly like that

#

but i would have the atlas sideways

#

doesn't effect anything

#

personal preference

pastel kernel
#

I saw cryptid use 2 different soul pos

lament agate
#

either way, thats sick

hidden sable
lament agate
#

now i just need to add

#

Don Pollo and

#

idk

scarlet imp
#

if I want to add a custom table to descriptions in my localization files, how would I do that

scarlet imp
#

i figured it out, thanks tho

lament agate
#

i thought this was modding chat 😭

scarlet imp
#

lol

lament agate
#

im so sorry

unborn bay
lament agate
pastel kernel
#

Tryna make spectral background

scarlet imp
#

I don't think I ever visist any channels except for this one and occasionally fan art

hidden sable
#

is there any way to trigger a shop in the middle of a blind and come back to that blind

snow vale
#

wait nvm it's j_trousers lmao

urban wasp
#

is there any way to use a hex value in localization formatting? i tried {C:white,X:HEX(cc73d9)}X#1#{}, but it didn't work

hidden sable
unborn bay
scarlet imp
urban wasp
#

uhh b or v

unborn bay
#

B is for backgrounds

urban wasp
#

oh

#

gotcha

urban wasp
unborn bay
#

😭

#

no

#

colours works like an array

#

you specify the index

snow vale
#

what's the key for the two pair?

unborn bay
#

not a key

scarlet imp
unborn bay
snow vale
unborn bay
#

no

snow vale
#

.

unborn bay
#

just "Two Pair"

#

lmao

snow vale
#

vreh

urban wasp
snow vale
#

ok ig i found what was crashing

urban wasp
scarlet imp
#

no plasma = .
{C:white,B:[1]}X#1#{} i believe would be the correct way to do this

unborn bay
#

no [] lmao

#

i only added that to contain words

scarlet imp
#

never used B: though so tale that with a grain of salt

unborn bay
#

you just list the number as is

urban wasp
unborn bay
#

its the same format as V:

unborn bay
viral ember
#

what should graffiti Joker do?

unborn bay
#

keys work the same way, although they can generally be anything

scarlet imp
urban wasp
scarlet imp
viral ember
#

but I want it to still be good for the player

scarlet imp
#

I think any good mod buffs Wild Cards lol. They're super weak in vanilla so maybe make it also buff wild cards

urban wasp
#

all cards have the effect of wild

scarlet imp
urban wasp
scarlet imp
urban wasp
#

color is just balatro black

scarlet imp
#
colours = {
  HEX("cc73d9")
}

try this. No need to index the table manually

urban wasp
#

ah

#

that's probably it lol

#

bye chat

azure valley
#

How do I require another lua file from my entry point lua file?

scarlet imp
#

W

unborn bay
#

uhhhh handy has an example for that

maiden phoenix
unborn bay
#

but really you should just use SMODS.load_file unless your mod is lovely-compatible

#

yeah what the dripping chicken said

iron mantle
#

You can also create a lovely patch to modify the way cards are destroyed in function SMODS.calculate_destroying_cards(context, cards_destroyed, scoring_hand)

in smods/src/utils.lua

maiden phoenix
snow vale
#

how can i make Oops! All 6s affect my custom jokers?

maiden phoenix
#

Check jokers that uses probabilities on VanillaRemade like 8 ball

snow vale
#

ok

maiden phoenix
#

Shouod be G.GAME.probabilities smt like that

urban wasp
#

...and i'm already back
any way to make a joker make a specific sound when scoring without using a localize thing? i used

return {
    message = "X" .. lenient_bignum(card.ability.extra.Xchipsmult) .. " Chips and Mult",
    sound = "talisman_xchips",
    Xchip_mod = lenient_bignum(card.ability.extra.Xchipsmult),
    Xmult_mod = lenient_bignum(card.ability.extra.Xchipsmult),
    colour = { 0.8, 0.45, 0.85, 1 }, -- plasma deck colors
}

but it just crashes my game with the error attached

#

since i'm not going to use this very often, if at all, it would be nicer to have this specific crash just fixed instead of being told how to use the function altogether

viral ember
#

did you do SMODS.Sound

urban wasp
#

no, i would like it to use the sound in talisman's files

viral ember
viral ember
urban wasp
#

yeah

#

sob

viral ember
#

I think you're better off duping the sound

urban wasp
#

i'll try that i guess

urban wasp
#

okay well now the color isn't working 😭

return {
    message = "X" .. lenient_bignum(card.ability.extra.Xchipsmult) .. " Chips and Mult",
    sound = "xchips",
    Xchip_mod = lenient_bignum(card.ability.extra.Xchipsmult),
    Xmult_mod = lenient_bignum(card.ability.extra.Xchipsmult),
    colour = { 0.8, 0.45, 0.85, 1 }, -- plasma deck colors
}
formal parrot
#

Are you sure

urban wasp
#

yeah

formal parrot
#

Cute art

#

I’m kinda stewpid

urban wasp
#

real

lament agate
#

hope this wont be hell

thin plinth
#

I've been messing with SMODS.change_base but it seems to be crashing, oof. I'm basically trying to make an enhance change it's own rank and suit to a set of DUMMY suits and ranks I made but it seems to be failing despite me using the keys.

#

The dummy rank and suit themselves ARE registered as I can encounter them ingame as blank cards.

lament agate
#

does anyone has

#

the balatro github template

pastel kernel
subtle merlin
pastel kernel
shell timber
subtle merlin
subtle merlin
pastel kernel
subtle merlin
pastel kernel
#

oops

subtle merlin
#

it happens to the best of us

pastel kernel
#

I’m using the unnerfed version btw

#

The original Minos makes 2 negative spectrals every discard and x2 Mult per spectral created

#

This one makes 2 FOR EVERY CARD DISCARDED

subtle merlin
#

Jeez

#

are u making a full Ultrakill mod or...?

pastel kernel
#

No

#

It’s 5 jokers for a thing called The B.B.B. Mod

#

The Busted Buffoon Bundle

#

I finished making spinel, which is x6 Mult gained per 4 aces played

#

I’m remaking her sprites this time

#

And move on to my next joker… idk who though.

#

WAIT, WHAT IF I MADE IT INTO ONE OF TYLER, THE CREATOR'S PERSONAS?

#

Or alter egos

#

I could make them IGOR

#

Tron Cat

#

Flower Boy

#

Chur Bum

thorn basin
#

Question: how can I make an Xmult but for the chips?
I tried doing like this but it doesn't return the Xchips value...

maiden phoenix
#

Its "xchips"

#

Iirc

lyric maple
#

do you have to explicitly add omeganum support into your mod in order to use omeganum

unborn bay
#

no unless you're comparing against a bignum

lyric maple
#

ah

unborn bay
#

in which vigorously wrap them under to_big

lyric maple
#

ok good that saves me 5000 years of comparison checks

unborn bay
#

to_big(1e300) < to_big(G.GAME.chips)

thorn basin
lyric maple
# thorn basin ...omeganum?

"ah yes 1.8e308 such a high limit no one will EVER break this!"
"nuh uh i just did"
"ok fuck you i'm setting the limit to practically infinity"

thorn basin
#

lmao

viral ember
#

is there a better way to register tons of seperate sounds than to do SMODS.Sound for each of them?

viral ember
#

do tell!

#

wha

#

damn

#

hopes and dreams shattered

lament agate
#

greatest of all time

native zinc
#

it's saying card is a nil value which makes not a lot of sense

#

especially because the voucher in question isn't claimed

#

oh wait

#

i'm fucking stupid ain't i, god damn locals

#

huge L

#

it works now

modern schooner
#

hello guys ! I am trying to use the loc_vars function to load some descriptions for my joker but i can't understand the function... Can someone explain it to me or at least show what I have to do for the text to appear please ? (ps ignore the all the text it's a inside joke)

modern schooner
#

I already readed it but I can't understand the two lines that makes the description appear

#

do i just need to copy it and switch the stone from j_stone with my joker key ?

modern schooner
#

then what do i have to do ? xd

snow vale
#

how can i edit a config.extra variable when creating a joker through SMODS.add_card()?

daring fern
formal parrot
#

Hello gay devs

formal parrot
#

J_modprefix_jokerkey

#

Not sure , never did info_queue before

modern schooner
#

ok i am going to try that but more generaly what does the G.P_centers means ? I have seen it alot but i can't understand it

unborn bay
#

a center is a prototype for a card

#

aka its default values, and how its identified

daring fern
formal parrot
#

Smart haya

#

Does that include modded ?

daring fern
formal parrot
#

Thanks :3

subtle merlin
#

How can i tell if a specific consumable has already been used this hand?

formal parrot
#

This round you mean

formal parrot
#

Add key when consumable is used

daring fern
modern schooner
formal parrot
#

Wait let me check if i can find something on the wiki

river apex
#

Hello !
I am not sure this is the right place but I am looking for resources to start creating mods
I already looked up some git repo, but the structure is different each time, and the main structure of the code is a little confusing for me rn.
I found some online tuto but this is for very basic stuff and often the files arent even splitted across multiples folders
Do you now where I can find some resources or did I just need to lookup in every repo to learn ?

formal parrot
#

@modern schooner

#

Found it

modern schooner
modern schooner
formal parrot
#

info_queue[#info_queue+1] = { set = 'Other', key = 'my_key', vars = {card.ability.mult} }

formal parrot
#

Oh..

#

Didn’t notice that😭

#

Its outdated

#

@modern schooner

#

Let me check again

subtle merlin
formal parrot
#

You have to take ownership and make highlighted cards 0 or maybe a higher number than 5 , so you can’t use and when context.end_of_round revert it back , i think this should work

#

I recommend 0 but i think that can crash , idk give it a try

subtle merlin
formal parrot
#

You should be able to change them aswell , not sure how exactly

#

Ask @daring fern

viral ember
#

is there an easy way to make jokers take up 2 joker slots or would I have to do some lovely patching?

maiden phoenix
#

You could remove a joker slot when added and add 1 when removed

#

Using add_to_deck and remive_from_deck

viral ember
#

that would display weirdly I feel

formal parrot
#

@modern schooner

daring fern
formal parrot
#

This is the best I could find

#

Not sure if its correct

viral ember
formal parrot
#

What if you have 2 jokers ?

wintry solar
#

You could absolutely make it take up two slots, it’s just a bit of a pain to do

formal parrot
#

Hey eremel :P

#

Do you know how can i make info_queue for modded objects ?

#

(Ofc you know )

wintry solar
#

You mean just putting a modded item in an info queue, or custom info queues?

formal parrot
#

Custom info queues

#

I think both actually

#

I want to make an info_queue for credits on some jokers and also i wanna know how i can reference a joker (modded ) in an info_queue

wintry solar
#

info_queue[#info_queue + 1] = {set = 'Other', key = 'key'} or info_queue[#info_queue+1] = G.P_CENTERS['key']

formal parrot
#

I checked the wiki and it said [outdated] so i didn’t bother using it , turns out it hasn’t been changed , thanks <3

modern schooner
#

thank you for all your effort but i can't seem to find something that work...

#

i am just gonna stick with loc_text i think

merry raven
#

I'm making a Joker that will create a random enhanced card if you have two or less hands remaining
But why do the created cads have different ranks and suits compared to what's shown on the card sprite itself?

primal robin
merry raven
#

Also if I reload the game, the ranks and suits just disappear visually

#

I just had to pick this hour to continue coding didn't I

snow vale
#

how can i make so i can only sell if i have enough money? (the sell cost is -5 :P)

lament agate
#

how do you spawn a joker from

#

the food pool

hallow forge
#

well first

#

you'd need to invent the food pool

formal parrot
#

Make a food poll

#

Pool

#

And add all vanilla food joker keys

#

You can do spawning with create_card

#

Change this a little ⬆️

#

Don’t forget emplace and add_to_deck

lament agate
formal parrot
#

Random thi

#

Tho

#

You need add key

lament agate
#

let me

#

hold on

formal parrot
#

:>

#

You know how keys work right ?

#

J_modprefix_jokerkey

wintry solar
formal parrot
#

I love create_card

#

:D

wintry solar
#

But it’s just a less functional add card 😭

formal parrot
#

She’s doing her best 😾

lament agate
#

hold on

#

so like

#

set = "Joker", key = ?

formal parrot
lament agate
#

i know

#

but

#

i know how key works

formal parrot
#

I can give you an example

lament agate
#

is it like that

#

set and then key?

#

instead of edition?

formal parrot
#

Use smods.add_card

#

If you want

formal parrot
lament agate
#

so

#

j_cavendish

#

i just want don pollo to spawn food jokers 🥀

#

why is it so hard

formal parrot
#

Just use add card its easier

formal parrot
#

Its not hard

red flower
lament agate
#

IM NEW

formal parrot
#

He can make a pool

lament agate
#

😭

#

yeah im

#

doing it rn

lament agate
red flower
#

just copy it from cryptid

formal parrot
#

Are you gonna

#

Use it later ?

lament agate
formal parrot
#

Or just for thus joker

lament agate
formal parrot
red flower
lament agate
#

which lua tho

lament agate
#

someone REALLY needs to document G.P_CENTERS usage

#

god damn

red flower
#

it's a list of centers

#

what else do you need

lament agate
#

like

#

what centers

red flower
#

all of them

formal parrot
#

Can’t he make just make a table of all food joker keys

#

Because he just wants to spawn a random one

red flower
#

it's easier with an objecttype because then you can do SMODS.add_card{set = "modprefix_Food"}

#

maybe without the modprefix i dont remember

formal parrot
#

Mhm

#

Then you can use it for later

lament agate
#

what does this mean

#

why is parking there

red flower
#

if it runs out of jokers without showman it defaults to that one

#

idk why parking tho

formal parrot
#

I’m pretty sure parking is a food

maiden phoenix
#

Jevonn told me he selected a joker randomly for it

lament agate
#

no the FUCK its not

maiden phoenix
#

Iirc

formal parrot
#

Isn’t default optional ?

lament agate
#

well either way

#

thanks guys:3

maiden phoenix
formal parrot
#

Time to read ceyptid code to figure out how pointer works

lament agate
#

i use odds feature for random spawn right

red flower
#

elaborate?

lament agate
#

hold on

#

let me

formal parrot
#

Let him cook N'

red flower
#

not sure

lament agate
#

i dont think so

maiden phoenix
#

Yea it doesnt

lament agate
#

yall the goats

modern kindle
#

Good schmorning chat

formal parrot
#

@red flower can i access game information, if i want to run an outside script using python

#

I wanna make an ai that plays balatro for you ,

red flower
#

idk probably?

subtle hawk
#

Brraugh is 0.003 the same rate as the soul or is it just a random ass number

formal parrot
#

But i need to check for game objects, like $ , hands / discards

#

G.jokers

#

It would be a crazy project

subtle hawk
#

Tyy

formal parrot
#

I can’t think of economy farming logic

#

Yet ()

modern kindle
#

If money then yes(get)

lament agate
#

should be good?

modern kindle
#

There you go

lament agate
#

wait the color

#

fuck

formal parrot
#

Probably can make a calculate function, before you actually play the hand , not counting for variables

#

Problem now is with blinds

#

There’s noway i would be able to make this compatible with mods

lament agate
#

i might be demented, but can you mess player's setting with jokers?

formal parrot
#

You can change

#

Game speed

#

To 0.25

#

If you’re a mf

lament agate
#

WDYM IT DOESNT EXIST

#

FIXED

#

im a dumbass

tired kestrel
#

I don't know what went wrong

formal parrot
#

How would i add cross mod :P

lament agate
#

how do you detect

#

if a player played a secret

#

hand

formal parrot
#

I actually looked for this

#

There are 2 ways i think

#

I think you can compare hands not sure tho

#

Also

#

You might be able to make a table of all normal hands if played hand isn’t in the table then its a secret hand

#

@lament agate

lament agate
#

jokes aside

#

i might do that

#

how do you write tables again

formal parrot
#

Local table ={}

lament agate
# formal parrot Local table ={}

local standard_hands = {
High = true,
Pair = true,
TwoPair = true,
Three = true,
Straight = true,
Flush = true,
FullHouse = true,
Four = true,
StraightFlush = true,
Five = true

#

like this?

formal parrot
#

No

#

Put the hand key

lament agate
#

exactly

#

where do i find them

formal parrot
#

Vanilla remade

#

Under zany joker / jolly

#

Etc

#

They’re strings btw

#

“”

#

Local standard_hands={“High Card”,”Two Pair”…},

lament agate
#

using

#

the default table

#

poker_hands

#

wait

maiden phoenix
lament agate
#

imma give up, imma just use straight flush

#

who the hell plays straight flush

midnight coyote
#

how do i make an event unaffected by game speed

formal parrot
#

Don’t give uo

midnight coyote
#

i was thinking i multiply it

#

i multiply delay by game speed

#

so its 'effectively' always gonna be when i want it

#

whats the value for gamespeed

keen atlas
#

G.SETTINGS.GAMESPEED

midnight coyote
#

thx

candid sleet
#

i'm tryna make custom challenges that incorporate some of my custom jokers but the challenge i just made crashes if i use my custom jokers, yet it's fine with vanilla jokers. is there something i need to put into the joker id so it knows to look for my modded jokers?

formal parrot
#

Basil

#

#context.poker_hands[“Flush”] returns the order or flush right ?

#

In poker hands

midnight coyote
#

#context.poker_hands["Flush"] wouldnt return shit

#

because of the hashtag in the front

#

but yes

#

otherwise

#

it should return the table for flush

formal parrot
#

what does # even do

midnight coyote
#

it returns the length of that table

#

so for instance

#

if i have 5 jokers

#

#G.jokers.cards will return 5

gilded blaze
#

length of string, number of elements in a table

midnight coyote
lament agate
#

putting # in loc_txt also makes it disappear

formal parrot
#

Good information

lament agate
#

trust me, id know

formal parrot
lament agate
#

my bad on that one

formal parrot
#

Common gaymer moment

lament agate
#

i was drinking when i wrote that joker

formal parrot
#

I can tell

gilded blaze
#

lmao

lament agate
#

fucked up

formal parrot
#

Say that 5 quickly 5 times

gilded blaze
#

this joker is the result of me spending enough time here

formal parrot
#

Make a separate label for current effect

#

Or an info_queue

midnight coyote
#

im about to get to work on the window effects

formal parrot
#

Gl

candid sleet
formal parrot
gilded blaze
#

that's also the only joker in my mod that uses loc_txt
every other object uses a localization entry

formal parrot
midnight coyote
#

i wish i could make resolution changes faster

lament agate
#

i fucking

#

LOVE

#

loc_txt

midnight coyote
#

make a loc file

#

😭

lament agate
#

fuck that

#

pussy shit amigo

#

im loco

broken cliff
lament agate
#

prevent someone copying your code by messing it the fuck up

gilded blaze
#

also me using this crap instead of defining SMODS.ObjectType

#

peak coding

candid sleet
gilded blaze
#

as a multilingual, I don't like loc_txt except when I make objects purely for debugging purposes

formal parrot
#

Honestly localization file isn’t that good

#

Its

#

There

midnight coyote
#

and everythings in one place

gilded blaze
#

that's exactly what I mean

formal parrot
#

I’m never translating

midnight coyote
faint yacht
#

-# inb4 "that's their problem"--

gilded blaze
#

developing Balatro mods as a multilingual sure has an advantage
your mother tongue self simply won't allow you to stick to loc_txt

formal parrot
#

<Learn english asshole>

#

Sorry for my language

gilded blaze
#

actually, loc_txt also supports multi-language but loc files are better

faint yacht
#

...so do atlases.

lament agate
#

is it actually possible for a joker to copy their adjacent jokers?

#

or pussy is just a myth

red flower
#

blueprint?

lament agate
#

blueprint for both sides yeah

#

is it possible

red flower
#

yes

lament agate
#

okay cool

#

toodles

red flower
#

you can use the new SMODS.merge_effects function

lament agate
#

documentation whre

red flower
#

in the docs :3

lament agate
#

god

#

😭

red flower
#

under utility

lament agate
#

gotcha

#

thank you

modern kindle
#

hi N smiley face

red flower
#

hi

modern kindle
#

how do you fare

red flower
#

im doing better thankfully wbu

modern kindle
#

im okay
life has been a little less stressful lately

red flower
#

im sorry to hear that

modern kindle
#

D:

#

youre sorry to hear it has had less stress?

#

big meany

red flower
#

yes

#

also i misread but i wont take it back

modern kindle
#

lmfao

#

just for that im eating half of your dinner tonight

red flower
#

i wouldnt mind

modern kindle
#

im looking forward to getting groceries either today or tomorrow
thinking about getting some burgers and chicken and maybe some steaks

#

get some asparagus for em

gilded blaze
red flower
#

it was added in the last release

pure salmon
#

neither context.press_play nor context.before swap the chips and mult properly

red flower
#

try context.modify_hand

formal parrot
#

When will smods wiki be

#

Updated

red flower
pure salmon
red flower
#

its the flint context

gilded blaze
#

like, just plug in tables returned by SMODS.blueprint_effect?

lament agate
#

oh jeez um

#

oh it spawns the the collection version of them 😭

#

god damnit

unborn bay
#

teehee

lament agate
#

the hell happened 😭

#
calculate = function(self, card, context)
        if context.cardarea == G.play and not context.blueprint and context.full_hand then
            local all_above_five = true
            for _, v in ipairs(context.full_hand) do
                if v:get_id() <= 5 then
                    all_above_five = false
                    break
                end
            end
            if all_above_five and #context.full_hand == 5 then
                G.E_MANAGER:add_event(Event({
                    trigger = 'after',
                    delay = 0.4,
                    func = function()
                        create_card("Tarot", G.consumeables, nil, 0, 0, "c_justice")
                        return true
                    end
                }))
                return {
                    message = "Choco Chip Cookie.",
                    colour = G.C.TAROT
                }
            end
        end
    end
}
#

whats wrong with it

unborn bay
#

ok so first off you use create_card without doing anything with it

lament agate
#

oh shit

unborn bay
#

you usually do

local card = create_card(...)
card:add_to_deck()
area:emplace(card)
#

second
why not SMODS.add_card

lament agate
#

you know what

#

fair

#

hold on

unborn bay
#

also this context check will run whenever cardarea is G.play

#

which can mean many things

pastel kernel
unborn bay
#

when are you trying to call this

pastel kernel
#

"minos_die" works but judgement doesn't

lament agate
unborn bay
#

end of round? before scoring? or some secret third thing

lament agate
unborn bay
#

context.after then

lament agate
unborn bay
#
if context.after then
    ...
end
lament agate
gilded blaze
#

this thing

lament agate
#

i still dont get it tho

#

like

#

where do i put the sound

wild escarp
#

As I understand it, G.GAME.current_round resets every round, so this code picks a new suit every round? If so, is there somewhere I can write to that resets after every hand?

local function reset_willatro_jokeinthebox()
    G.GAME.current_round.willatro_jokeinthebox = G.GAME.current_round.willatro_jokeinthebox or { suit = 'Spades' }
    local joke_suits = {}
    for k, v in ipairs({ 'Spades', 'Hearts', 'Clubs', 'Diamonds' }) do
        if v ~= G.GAME.current_round.willatro_jokeinthebox.suit then joke_suits[#joke_suits + 1] = v end
    end
    local jokeinthebox_card = pseudorandom_element(joke_suits, pseudoseed('willatro_jokeinthebox' .. G.GAME.round_resets.ante))
    G.GAME.current_round.willatro_jokeinthebox.suit = jokeinthebox_card
end
gilded blaze
lament agate
#

sound and Xmult_mod in the same thing?

gilded blaze
#

and message

#

yea

lament agate
#

okay okay

#

i see

#

let me try

#

cuz i also have that problem too

pure salmon
#

is there a way to make a booster pack such that you only can add the selected consumable to your consumable area? my consumables can only be used in a blind

unborn bay
gilded blaze
lament agate
gilded blaze
lament agate
#

alice multiplier

gilded blaze
unborn bay
#

why would alice multiply

lament agate
#

what should i replace it with

lament agate
gilded blaze
#

whatever value stored for your xmult

#

e.g. card.ability.extra.xmult

gilded blaze
lament agate
#
message = localize{type="variable", key = "a_xmult", vars={card.ability.extra*card.ability.extra.xmult}},
Xmult_mod = card.ability.extra*card.ability.extra.xmult
gilded blaze
#

it's just a wacky thing that allows my mod to function without relying on Cryptid's misprintize

lament agate
#

this is how my code looks like btw

gilded blaze
lament agate
#

ohh okay

violet oasis
#

If there any command for checking what's on the Base event queue with DebugPlus?

lament agate
#

@red flower

red flower
#

update

formal parrot
lament agate
red flower
#

yes

lament agate
#

WHAT

#

oh my god

gilded blaze
#

lmao

lament agate
#

this is week old

formal parrot
red flower
#

i did say it was new

midnight coyote
#

would this workk

lament agate
formal parrot
midnight coyote
#

im trying to see if an odd number of cards are scored

red flower
midnight coyote
#

oh i meant to do #context.scoring_hand

#

would it work then

red flower
#

also no because all numbers are truthy

midnight coyote
#

okay

lament agate
midnight coyote
#

could i check to see if it returns a whole number

#

and if it doesnt, then go on

red flower
#

check if it's not equal to 0

violet oasis
#

I have this custom deck that I wanna make trigger an event. It works on its own, triggering the "Event worked" message as soon as I start a run with the deck. But once I add the G.GAME.blind condition, it stops working, even if I'm currently in a blind. Is there anything I'm missing?

midnight coyote
#

alright, im not too familiar with modulus (havent ever needed to use it) so this is appreciated

red flower
#

% 2 is always 0 or 1

#

(for whole numbers)

midnight coyote
#

alr

#

so would my logic after the condition work

#

for the upgrade

lament agate
gilded blaze
midnight coyote
lament agate
#

still occur

formal parrot
midnight coyote
violet oasis
#

I'll look up some alternatives then, thank you

red flower
lament agate
#

hold on

midnight coyote
#

how would i word this

lament agate
gilded blaze
midnight coyote
#

if number of cards scored is odd, gain X0.2 the combined ranks of scored cards in Xmult?

gilded blaze
#

all calculate contexts that work on jokers should also work on decks

red flower
lament agate
#

old

violet oasis
#

actually, now looking more closely, anaglyph works like that huh

gilded blaze
#

they don't have complex triggers

red flower
# lament agate

god how can you code with that font

i dont see anything wrong there, did you save?

lament agate
violet oasis
#

just goes to show I need to try more stuff before making assumptions, thanks again!

gilded blaze
#

actually, just take a look at smods api

#

there's a wiki for that

red flower
formal parrot
#

[enable autosave]

keen atlas
lament agate
#

okay so

#

it doesnt crash anymore

#

but now the joker doesnt work

#

the code

formal parrot
#

Ss

lament agate
daring fern
lament agate
#

?

red flower
#

no, like this

{left_effect or {}},
{right_effect or {}}
lament agate
#

ohhh

red flower
#

sorry edited

formal parrot
lament agate
red flower
#

you have an extra } on each

lament agate
#

huh

primal robin
#

syntax errors moment trash

lament agate
#

fuck

formal parrot
#

The }

#

After the effect

#

Dumbass

lament agate
#

the what

#

OH

daring fern
lament agate
#

thank you guys

#

let me lay down a bit

#

I've been squatting for 2 hours now

sterile minnow
#

hey does anybody know how would I make for a variable to appear in my jokers text?

formal parrot
#

#number#

sterile minnow
#

for example how the glass joker changes values everytime a glass card breaks

formal parrot
#

Loc_vars
{return {vars={your vars}}}

formal parrot
#

#1# is for first variable returned #2# for second etc

sterile minnow
#

bet

#

thx

gilded blaze
sterile minnow
#

bett thx yall

formal parrot
#

For reference

#

Big shoutout to N for this one

lament agate
#

it works now!!

#

thank you guys

formal parrot
#

Now add effects as infoqueues

gilded blaze
#

nice

formal parrot
#

(going insane)

lament agate
lament agate
#

how tho

formal parrot
#

Can you change infoqueue to right?

#

Instead of lest

#

Left *

lament agate
#

nah, i think

gilded blaze
# lament agate

finally
Cheshire Cat is a joker in my mod that initially would have this effect
but was changed to "copy a random joker at start of round"

formal parrot
#

Problem is how you gonna update them

#

(Scrap the idea )

lament agate
#

how do you add the compatible blueprint thing tho

gilded blaze
#

oh right, JokerDisplay

formal parrot
gilded blaze
#

it has a function that copies the copied joker's display

#

doubt it would also work on copying multiple jokers

formal parrot
#

(It can)

lament agate
#

blueprint

#

in a sea of