#💻・modding-dev

1 messages · Page 340 of 1

manic rune
#

very hard to achieve

vocal cedar
#

i would need to make them like

#

say

#

retrigger if played

#

or something

#

i might

daring fern
#

Why did you nerf them though?

vocal cedar
#

because otherwise there is NO reason to use them except eclusivelt strenghening them to a king plopping a red seal on and then running the same boring ass mime baron run

#

they also make reaching ante 39 absolutely a cakewalk

#

no skill required

manic rune
#

you need to make it so negative cards give something when played too

vocal cedar
#

just perkeo and a death lol

#

have fun kids

daring fern
vocal cedar
#

atm

#

i dont really give a damm about other peoples mods just yet

#

sure

#

i want compatability eventually

#

but rn

thorn flame
#

they can

vocal cedar
#

this is just for me and my buds lol

thorn flame
#

megative is an edition

vocal cedar
#

my b

#

most likely

my mods presence will make negative cards ALWAYS score (think like a stone card) and nerd their interactions with mime and baron in some way

hushed field
#

I think negative playing cards are inherently a very Cryptid design. Hard to play design around due to in any card game, drawing more cards is always the most powerful thing you can do

vocal cedar
#

yeo

#

i want to balance them somehow

#

ill figure it out

manic rune
#

thats likely why negative playing cards never made it to vanilla

manic rune
#

they are busted

vocal cedar
#

making them always score is a start

#

but making them less effective as steels or with baron will hopefully keep ante 39 an actual challenge

#

im also redoing the legendaries to make them scale much better in endgame so they stick around for longer

#

and are less busted earlues

manic rune
vocal cedar
#

well i just ran a 100 wheel of fortune test

#

about 85 of the wheels hit foil holo, 9 hit poly 6 hit irid

#

thats pretty okay for me

vocal cedar
#

might nerf bro to 2 cards negative

#

i gotta play another game with him

#

anyway

#

either 1 in 2 chance to retrigger negative played cards or make negative played cards always score

manic rune
#

you could make it so cards that copy neg cards wont receive the neg edition

vocal cedar
#

now thats a good fucking idea

#

like death and cryptid wouldnt copy negative?

#

oooh shit

manic rune
#

mhm

vocal cedar
#

thats GREAT

#

i can leave mime and baron unchanged

#

and still buff them when played as well

#

ooooh

#

might make them slightly more prevalent in standards too then

#

i already have a joker that has a 1 in 10 chance to turn played cards negative as well lol

#

anyway

#

i

#

i go bed

#

night fellas

manic rune
#

nighty

brisk rose
# vocal cedar i go bed

I'm finna be up like 30+ hours myself. I've been up since 3pm yesterday and it's 8an with a whole day and night ahead of me

chilly hull
#

trying to make a sixth sense -esque card but it creates a negative spectral on an 8 instead, but it crashes when playing an 8

daring fern
chilly hull
#

yeah i did but then the timing is wrong, it destroyes before the score is even counted

chilly hull
#

same time as sixth sense does

daring fern
chilly hull
#

but the source code for it is incomprehensible

red flower
#

return { remove = true }

chilly hull
#

does it play the dissolve animation too?

red flower
#

yes

chilly hull
#

how do i get it to target the 8?

red flower
#

context.destroy_card:get_id() == 8

shut crater
#

It's absolutely cursed but actually kinda balanced

manic rune
lapis gorge
#

how in the actual fuck do you make a button

#

and how do i position it

manic rune
#

for a card, or for uis?

lapis gorge
#

i need a button below where it says the ante

manic rune
#

if the former then i suggest looking into how joyousspring does it

#

oh

#

try checking almanac then

#

the code is in its lovely patch

#

-# good luck btw

lapis gorge
#

why is ui so confusing???!??!?

manic rune
#

ui

#

:3

lapis gorge
modern kindle
#

i see besties in chat rn

red flower
#

hi dilly

modern kindle
#

hi N =]

manic rune
#

hi dilly

modern kindle
#

hi bepis!

shut crater
#

I didn't read the whole 8 hours I missed so I might be missing context

manic rune
shut crater
#

Ah

manic rune
#

if their mod were to nerf neg cards, then it would also affect those mods

#

thats not a good thing imo

shut crater
#

Then just add a separate half-negative edition 🧠

#

(I understand the design problem at hand)

red flower
#

(I don't understand the design problem at hand)

chilly hull
#

funny bug, it generates now but i can place them everywhere

manic rune
#

😭

#

you didnt emplace them

shut crater
#

Multiple mods implementing the same idea with different levels of impact on gameplay

red flower
red flower
chilly hull
#

wait it isnt SMODS.create_card?

red flower
#

add_card emplaces it for you

shut crater
#

Every time I see people making the same common mistakes I take another step closer toward making a balatro modding tutorial series

#

But docs 2.0 is a thing (?)

chilly hull
#

it is?

shut crater
#

Not yet but I think it's in the works

#

Maybe

#

Don't quote me on that

dapper sun
#

i'm trying to make my enhancement do something when played but it's triggering for every card instead of just itself

#

adding a context.other_card == card check just makes it not work at all

dapper sun
#

i'm too lazy to turn np++ dark mode on,, ,

manic rune
#

i wanted to make one a few weeks, or months ago - but my pc is so trash 😭

chilly hull
daring fern
red flower
chilly hull
#

yeah i put it there because i thoughtt it might lsolve the issue

wintry solar
#

Or use context.destroying_card

dapper sun
#

it's not updating the /52 in the corner

chilly hull
#

it works, but i only summon incantations

#

wait sixth sense also only summons incantations

dapper sun
#

what does ur spectral collection look like rn?

chilly hull
#

everything unlocked

manic rune
#

huh

dapper sun
#

damn idk then

manic rune
#

why does this take up one consumable slot??

#

😭

chilly hull
#

restarted with the same seed and its fixed now

manic rune
#

i mean

#

why doesnt it increase consumeable card limit by one

#

thats odd

brisk rose
manic rune
#

it doesnt decrease when i destroy the card too

dapper sun
manic rune
#

but it works WHEN i duplicate it

#

what.

#

??

brisk rose
manic rune
#

:set_edition("e_negative",true)

#

it works for the fool

dapper sun
brisk rose
manic rune
#

nop

#

it actually affects the emperor too

#

they both use this

#

...hm

#

im gonna try something

#

nvm this doesnt work too, whats going on 😭

#

my the fool's code uses create_card instead of SMODS.create_card, i wonder if theres any difference between those

worthy stirrup
#

How can i make sure my joker only checks for hand amount in game but not the menu?

#

I need to have my code be done in the update function so keep that in mind lol

maiden river
#

if you're just updating text, you don't actually need it to use update; you can just put the logic in loc_vars (assuming there's not a lot of logic)

worthy stirrup
#

I’m changing the art

maiden river
#

oh, I see

manic rune
#

oh hey

worthy stirrup
#

How do I check how many hands the player has

wintry solar
#

Most players have two hands

maiden river
#

that's G.GAME.round_resets.hands

maiden river
worthy stirrup
manic rune
#

wait

#

is it because i was missing card:add_to_deck() the entire time, actually

worthy stirrup
manic rune
#

oh

#

oh damn, you need :add_to_deck() for neg to register its effect

#

:p

daring fern
manic rune
#

i forgor

#

idk why i was using SMODS.create_card tbh, i think it was because i saw the add_joker and my head immediately said no since i thought it wasnt for that purpose :p

maiden river
maiden river
#

how do you add a shader to a card (like invis)
wanna make a card of mine a lil shiny

manic rune
#

im guessing card.children.center:draw_shader("voucher",nil,card.ARGS.send_to_shader)

maiden river
#

l-l-l-looking in the source code??????
I'm simply allergic

shell timber
#

you can put that in the draw function on your card

manic rune
#

dang

chilly hull
#

spectral cards are added as sooon as the 8 is played, instead they should be added when the 8 is destroyed

hard needle
#

how can i create a random tag 🤔

hard needle
#

oh wa

#

i

#

n vm

manic rune
maiden river
hard needle
#

whats the point of this lmao

maiden river
#

boredom

manic rune
#

stack on and on

maiden river
#

yup

manic rune
#

can you even die with that

maiden river
#

hmm

#

good question

#

time to find out

shut crater
manic rune
#

you could make it so that the card becomes eternal upon the first revival

maiden river
manic rune
#

then after reviving you 3 times or something

#

it stops reviving

#

:p

maiden river
#

we did it

manic rune
#

😭

#

that aint mr.bones 🥀

shut crater
#

Every time it revives it eats 15 cards, game ends when your deck is gone

maiden river
#

oh

#

or -1 hand size

shut crater
#

That works too

manic rune
#

is there a way to tell how much blind size the joker increased without needing to have it though

#

i think its nice to have a way to tell somehow

hard needle
#

Saves you from game over but 1 in 30 chance to game over at end of round

manic rune
#

that might as well be a legendary joker 🥀

maiden river
manic rune
#

😭

maiden river
#

it's just division

manic rune
#

b-but

#

maths

maiden river
#

you're playing balala 😭

shut crater
manic rune
#

-# who am i kidding, i literally got this

hard needle
red flower
#

what about add_tag(Tag(t.key))

manic rune
#

yeah, that

#

-# damn it i was about to say :(

red flower
#

too slow

hard needle
worthy stirrup
#

I get this crash whenever I try to load the joker in the middle of a game.

manic rune
#

can you show the code

worthy stirrup
#

i was about to

hard needle
#

hmm i wonder what happens if i make orbital tag

worthy stirrup
manic rune
#

uh

worthy stirrup
#

btw, i did leave out that } at the end, dw it is there in my code

manic rune
#

shouldnt you use card instead of self?

worthy stirrup
#

fuck

#

fair

#

i always forget lol

daring fern
manic rune
#

^

worthy stirrup
#

how do i get context then

daring fern
hard needle
#

uhhhhhhh that's not right xD

worthy stirrup
#

but i need my code to work on update, as it runs each frame

hard needle
#

i think i can loop through all visible hands then make it upgrade a random hand from that

#

arhrjghrkgejgegejgh

bold sleet
#

help, knowing the mod's prefix is fg and the enhancement is steel, how tf do I make this work?

manic rune
#

whats FG.cards.steel_mult

#

also - you should probably go through G.playing_cards instead of G.deck.cards

maiden river
hard needle
#

thats still 8 free saves

#

2-3 if youre being practical ig

manic rune
#

the punctuation

maiden river
#

old comma 😭

bold sleet
maiden river
#

first I can't spell, now I can't punctuate
damn I can't do anything

manic rune
#

something like G.GAME.fg_steel_mult should work just fine

bold sleet
#

I preffer having every variable used by the mod under its own list.

manic rune
#

have you checked if FG.cards.steel_mult is saved when you re-enter the run

runic pecan
#

Is it possible to make a joker that acts the same as Showman but only when conditions are met?

manic rune
#

and you can have a table in G.GAME, if thats what you prefer

bold sleet
#

Everything that is added by said mod is under FG.<something>

manic rune
#

and also, whats the issue you are facing?

bold sleet
manic rune
#

yeah, exactly

#

everything in G.GAME is saved

manic rune
#

so i think if you want to avoid the trouble of having to somehow figuring out a way to save that - you can put everything in G.GAME

runic pecan
manic rune
#

G.GAME.FG as a table, then just add what you want in there

glad osprey
manic rune
#

how u been?

bold sleet
manic rune
#

oof

bold sleet
maiden river
#

for the people

bold sleet
#

What if I don't have overwatch 2?

runic pecan
maiden river
hard needle
manic rune
daring fern
glad osprey
#

were too many cards added

runic pecan
#

OK, that got me a bit of chuckles.

maiden river
#

or your home dir

glad osprey
#

hacks the mcdonalds in the pentagon

maiden river
#

removes raevyn from balatro modding-dev

glad osprey
#

finally

#

thought they were supposed to be downsides /j

maiden river
#

perish.

#

😭 a bunny gif just got automodded

#

oh I guess I just can't send gifs?

shell timber
#

gifs are No More

glad osprey
#

THERES NO WAY

#

the roffle blight has been killed

shell timber
#

never mind roffle blight is chill

manic rune
#

wha

#

WHY IS THE BUNNY GIF BLOCKED

glad osprey
#

jokes on you moderators, I've got png's!

manic rune
#

its this one 😭

#

-# actually i cant tell if thats a bunny or a weird ass dawg

shell timber
#

they blocked tenor and giphy iirc

manic rune
#

huh

#

weird

hasty mist
#

yeah

shell timber
#

this is in an effort to make chat more chill or whatever, look in chill chat

glad osprey
hasty mist
#

ah

glad osprey
#

ok so I can still send the gif

#

Just not from the website

hasty mist
manic rune
#

more than half of my roffle blight gifs are gone

#

😭

sturdy compass
#

L

worthy stirrup
#

fr?

#

oh

manic rune
#

this one is fked up too

shell timber
#

just as a test

#

could you go to channels and roles and select "steam"

glad osprey
#

nothing changed

#

other then loosing the role

shell timber
#

get rid of all of those then try sending roffle blight

glad osprey
#

nada

shell timber
#

hm

glad osprey
#

it's not that deep 😭

brisk rose
#

Did they ban gifs?

gilded goblet
#

no more fun

hard needle
#

i think so yeah

manic rune
#

ack

hard needle
#

NOT EVEN STICKERS

rough furnace
brisk rose
wintry solar
#

why

gilded goblet
brisk rose
gilded goblet
#

gbonna have to do it manual mode

wintry solar
#

Now I can’t post my Elmo wizard 😭

brisk rose
gilded goblet
#

that is what's banned already lmao

agile dew
#

am i using other_card right or is it only used in repetition contexts?

sturdy compass
#

There is a lot to unpack here lol

#

First, you wouldn’t return a set_edition call. Just leave it in the conditional on its own

#

Second, you might want to check for context.individual as well (or loop through context.scoring_hand in context.before)

manic rune
#

god

#

ive been so sidetracked that i didnt get any new spectral skills working 😭

agile dew
exotic sluice
#

I want to make my own deck. But like a standard deck of all 7s. How can I do that?

daring fern
exotic sluice
modern kindle
#

hi something 👋

zealous glen
modern kindle
#

dont freakin think react me smh

#

hi vic!!!!

#

how are you!

digital niche
#

it isnt returning when held in hand

subtle hawk
#

Was there a context for card triggering when card is removed? Like for discards AND moving to deck at the end of the round

agile dew
#

context.destroy_card?

crystal perch
zealous glen
modern kindle
zealous glen
subtle hawk
modern kindle
crystal perch
#

anyone know how i can get the number of how many cards of a certain suit you have in hand

#

not something like context.individual, i need the number

manic rune
#

run through G.hand.cards, check each card manually

crystal perch
#

could i get an example of what that line would look like please

#

not the most familar with lua

manic rune
#
for _,v in ipairs(G.hand.cards) do
   --do stuff to check v's suit here
end
#

im on phone rn so cant help much, sorry

crystal perch
#

thank you

agile dew
daring fern
agile dew
#

stopping at poly

azure stone
#

First draft 👀

zealous glen
#

ohh

shut crater
agile dew
agile dew
#

im using if statements to check the edition individually

shut crater
#

I mean how are you trying to implement it

agile dew
shut crater
#

Do you just permanently want all stone cards to do this all the time?

agile dew
shut crater
#

Ok so you do want this to be from a joker

#

Got it

#

What does it do right now

#

Does any part of it work?

crystal perch
agile dew
#

but it does nothing

subtle hawk
#

Is there no documentation for SMODS.ConsumableType?

shut crater
#

Right now you're calling SMODS.has_enhancement with card, which refers to the joker. So you're checking if the joker has the stone enhancement

#

You need to pass in the played card instead

agile dew
maiden river
subtle hawk
#

Ah

#

Thanks!

agile dew
#

i tried this, nothing

daring fern
agile dew
daring fern
agile dew
#

this function

agile dew
#

maybe its because im somehow checking has_enhancement wrongly?

maiden phoenix
# agile dew

context.v doesn't exist, just check for v.edition

agile dew
#

adding the other two checks crashes the game with this message

daring fern
maiden phoenix
#

Same for edition.holographic, should be edition.holo

agile dew
#

oh damn

#

ill try it

#

it works!

#

i had to inverse the if statements so they wouldnt all trigger one after another

#

i forgot it was checking the card the entire time

#

this is the final code!

brisk rose
#

How hard do you think a palletizing shader would be to code. Just in general ignoring that I've never coded a mod let alone a shader

#

Specifically the idea is to snap the colors to the 256 color vga pallate

shell timber
#

uh, i guess you could go through the array of colours and select the closest one though that'd be pretty slow

#

this has probably been done before

brisk rose
#

Like this

karmic arch
#

ye (if i correct)

shell timber
#

the issue with that as written is that it calls an if a bunch of times which tends to be slow in shaders

languid mirage
#

*256, then cast to int (or round)
then /256

daring heron
#

how would i make a deck that doubles all the cards at the start?

#

pretty much just duplicating each card at the beginning

languid mirage
karmic arch
#

palette of 256 can be made easily by simply dividing the entire value of red, green, and blue into three pixels and then rounding it up

#

a

daring heron
#

???

#

wrong channel dude

worthy stirrup
#

my sound crashes the game, i dont know why

SMODS.Sound {
    key = "DoomHurt",
    path = {['Hurt'] = 'hurt.ogg'}
 }
-- skipping to where audio is played --
calculate = function(self, card, context)
        if context.joker_main then
            card.ability.extra.chips = (G.GAME.current_round.hands_left + 1) * 30
            return {
                chips = card.ability.extra.chips,
                play_sound("Hurt")
            }
        end
    end,
marble flint
karmic arch
#

prefix?

daring fern
worthy stirrup
#

ah, thank you

#

my prefix is FFF, im doing FFF_Hurt, but i hear no noise

#

oh, wait, doomhurt

#

oops

#

Still no noise

#

this is what i have now

SMODS.Sound {
    key = "DoomHurt",
    path = "hurt.ogg"
 }
-- once again skipping to when sound is played -- 
 calculate = function(self, card, context)
        if context.joker_main then
            card.ability.extra.chips = (G.GAME.current_round.hands_left + 1) * 30
            return {
                chips = card.ability.extra.chips,
                sound = "FFF_DoomHurt"
            }
        end
    end,
shut crater
# brisk rose So 8 bit rgb I guess

"authentic" 8 bit rgb would require you to quantize red, green, and blue separately to one of 2^3, 2^3, or 2^2 values, respectively. Which would look something like (int)(red * 7) / 7 or (int)(blue * 3) / 3 (accounting for 0 as one of the quantized values)

bold sleet
#

From G.joker.cards[i], how can I get the edition (key) of any given card?

shut crater
#

unless you plan on using a color palette in which case I have no idea how you'd find the nearest palette value on a per-pixel basis

daring fern
bold sleet
#

ty

shut crater
#

cause your path is just the filename

worthy stirrup
#

its in the right place

shut crater
#

that's all I got lol

celest timber
#

how can i show text on screen whenever you draw cards? just like the text below

daring fern
worthy stirrup
#

yes

primal echo
#

why is music pitch shifted and how much do i need to change it by to correct it?

daring fern
azure stone
#

Anyone have ideas on what this could do?

karmic arch
#

look like consumable

unborn bay
#

instant game over when obtained

dapper sun
#

<@&1133519078540185692> kill

#

how do i make a joker/consumable show a small thingy (such as consumable or enhancement) on the side

celest timber
#

is there any other way to reset the game than holding the M key? i tried alt+f5 and doesnt seems to work

dapper sun
#

it's alt f4 not f5

celest timber
#

hmmm

#

alt+f4?

dapper sun
#

yeah

celest timber
#

yeah ofc

sturdy compass
dapper sun
#

ty

crystal perch
#

joker's crashing when i try to juice it up, here's the error and code

#

i probably wrote the juice up function wrong, i low key just copied it from dna/invisible

#

joker itself works though

sturdy compass
crystal perch
#

also i should mention it only crashes when a spade is in hand

crystal perch
sturdy compass
#

I don’t think you’re passing in a value for your eval call either

#

I’d have to check my own code to see how you would do this but that’s definitely part of the issue, as v in eval is never defined

edgy reef
#

It's saying that v does not have the is_suit function.

willow plinth
#

chat is this fake news on newer smods versions? this never fires for me for some reason

#

my "full" code:

 local isContextForOdds = context.before and context.cardarea == G.play
  local isContextForVertex = context.final_scoring_step and context.cardarea ~= nil
  local isContextForEdge = context.cardarea == G.play and context.repetition and not context.repetition_only
  local isContextForFace1 = isContextForEdge
  local isContextForFace2 = isContextForVertex
  if isContextForOdds then
      print("isContextForOdds")
  end

"isContextForOdds" never gets logged

red flower
rapid stag
edgy reef
#

huh?

daring fern
willow plinth
#

i see, thanks

yeah, i just need to context to calculate roll my odds outcomes once because i need them a lot of times later, so i figured i'd use before for that

eager pendant
#

Tell me how to make the Joker appear only after you have certain jokers in your hand.

red flower
edgy reef
#

ohhhh

willow plinth
#

i'll try cardarea = G.jokers

red flower
#

you can also drop the area check, i think it's only relevant for playing cards

willow plinth
edgy reef
#

Yeah not every context iterates over all cardareas

willow plinth
#

i see

rapid stag
eager pendant
#

Tell me how to make the Joker appear only after you have certain jokers in your hand.

willow plinth
#

i mean i can just try in my usecase and report back

red flower
#

use context.main_eval

willow plinth
rapid stag
#

also, bump

digital niche
#

what am i doing wrong here? trying to add the bonus_dollars everytime card is held in hand, then get the dollars when scored

willow plinth
eager pendant
#

Tell me how to make the Joker appear only after you have certain jokers in your hand. Pls

willow plinth
#

i'm dumb i can just ensure initialization by doing if blabla = nil then dostuff

digital niche
#

meant to be final_scoring_step

daring fern
digital niche
#

but im using that in my other held in hand enhancements and is working?

brisk rose
still jacinth
#

how do you all have the balatro font in your code editor

daring fern
red flower
brisk rose
digital niche
willow plinth
rapid stag
willow plinth
digital niche
rapid stag
red flower
willow plinth
willow plinth
red flower
#

yeah yeah

rapid stag
#

...does context.before and context.main_eval work?

onyx sonnet
#

is there a way to access driver_tally from another joker?

willow plinth
red flower
#

context.main_eval is for when a context is called for multiple things so you only check the main trigger

willow plinth
#

i see, i misunderstood the whole context thing then, i thought only one is true at a time, but then again, someone smart at smods would make an enum instead of a table of booleans

rapid stag
#

i see

brisk rose
eager pendant
#

Guys, how do I make the Joker match itself when I have certain jokers in my hand?

red flower
red flower
#

also its a vanilla thing

willow plinth
#

oh

red flower
#

not main_eval specifically but the context system

rapid stag
#

yeah that one's a thunk moment

willow plinth
#

anyways thanks it works perfectly with both now, only issue left is animation timings

onyx sonnet
red flower
willow plinth
onyx sonnet
agile dew
sturdy compass
eager pendant
# still jacinth what do you mean

For example, I have in my hand 4 certain jokers and when they are in my hand, then to them spawns another who has in the conditions prescribed to have 4 of these ones

red flower
willow plinth
#

btw, did anything major break with the update or can i just update easily? how does this usually go for the modding people?

agile dew
#

what update?

red flower
#

im on the latest commit all the time

onyx sonnet
red flower
#

if something breaks everyone would be complaining

onyx sonnet
#

it doesnt update ingame

willow plinth
#

nvm i'm fucking stupid

#

read this as 2025 lmao

red flower
#

lol

brisk rose
sturdy compass
#

the fact we're on 1o now

#

same braincell coonie lmao

brisk rose
#

He stopped doing patch notes

red flower
#

yeah 1.1 is probably the one that will break stuff

willow plinth
#

yeah i know just big wet brain fart

brisk rose
red flower
eager pendant
# still jacinth what do you mean

For example, I have in my hand 4 certain jokers and when they are in my hand, then to them spawns another who has in the conditions prescribed to have 4 of these ones

willow plinth
#

some people would profit from AI rephrasing their question tbh

onyx sonnet
# red flower can i see the code
SMODS.Joker { 
    key = "licenseplate",
    config = {extra = {license_count = 0, scaling = 3, license_mult = 0}},
    unlocked = true,
    discovered = true, 
    blueprint_compat = true,
    eternal_compat = true,
    perishable_compat = true,
    rarity = 2,
    atlas = "EmeraldJokers",
    pos = { x = 1, y = 4 },
    cost = 6,

    loc_vars = function(self, info_queue, card)
        return { vars = {card.ability.extra.scaling, card.ability.extra.license_mult}}
      end,
    calculate = function(self, card, context)
      if context.joker_main and card.ability.extra.license_count > 1 then
        return {
            mult = card.ability.extra.license_mult,
            colour = G.C.MULT,
        }
      end
    if not context.blueprint then
      card.ability.license_count = 0
      for k, v in pairs(G.playing_cards) do
          if v.config.center ~= G.P_CENTERS.c_base then card.ability.license_count = card.ability.license_count + 1 end
      end
      card.ability.extra.license_mult = (card.ability.extra.license_count * card.ability.extra.scaling) or 0
      if card.ability.extra.license_mult < 1 then
        card.ability.extra.license_mult = 0
      end
    end
  end
}
eager pendant
#

How to add a condition when there is one Joker, another Joker appears

red flower
# onyx sonnet ```lua SMODS.Joker { key = "licenseplate", config = {extra = {license_c...

do it like this

SMODS.Joker {
    key = "licenseplate",
    config = { extra = { license_count = 0, scaling = 3, license_mult = 0 } },
    unlocked = true,
    discovered = true,
    blueprint_compat = true,
    eternal_compat = true,
    perishable_compat = true,
    rarity = 2,
    atlas = "EmeraldJokers",
    pos = { x = 1, y = 4 },
    cost = 6,
    loc_vars = function(self, info_queue, card)
        local count = 0
        for k, v in pairs(G.playing_cards) do
            if next(SMODS.get_enhancements(v)) then count = count + 1 end
        end
        return { vars = { card.ability.extra.scaling, count * card.ability.extra.scaling } }
    end,
    calculate = function(self, card, context)
        if context.joker_main then
            local count = 0
            for k, v in pairs(G.playing_cards) do
                if next(SMODS.get_enhancements(v)) then count = count + 1 end
            end

            return {
                mult = count * card.ability.extra.scaling
            }
        end
    end
}

brisk rose
onyx sonnet
#

ty btw, i just wanna understand the code

eager pendant
red flower
onyx sonnet
#

so if its not empty it returns true?

red flower
#

it returns the next value but that evaluates to true

onyx sonnet
#

ah, neat

#

thank you very much N'!

brisk rose
red flower
#

btw i just copied that from SMODS' license code

brisk rose
onyx sonnet
#

SMODS has rewrites for jokers?

#

i dont remember seeing driver's license in the example mods

red flower
#

no, jokers get patched in the code

#

look at the lovely/dump

onyx sonnet
#

oh wonderful

eager pendant
hard flume
#

Hi :3

#

Pikmin is actually going wonderfully!

brisk rose
eager pendant
willow plinth
#

this was just way too overkill after looking at other mods...isn't one event with delays in between enough here?

#

like kino does it here:

G.E_MANAGER:add_event(Event({trigger = 'after', delay = 0.3, func = function()
    i_card:juice_up(0.8, 0.5)
    card:juice_up(0.8, 0.5)
    card_eval_status_text(i_card, 'extra', nil, nil, nil,
    { message = localize('k_shazam'), colour = G.C.MULT })
    i_card.flip()
    delay(0.1)
    SMODS.change_base(i_card, nil, 'Jack')
    i_card.flip()
    delay(0.23)
return true end }))
eager pendant
agile dew
onyx sonnet
eager pendant
daring fern
brisk rose
red flower
brisk rose
onyx sonnet
#

thanks N

agile dew
red flower
daring fern
celest timber
#

I want to show/update text whenever you select/draw cards, but idk how to detect those events and change the text, how can i do that?

hardy viper
#

im sad i didnt see this message sooner

eager pendant
#

What is the correct way to write the appearance of the joker in add_to_deck ?

agile dew
agile dew
hardy viper
#

pinning certain cards to the top in my collection mod

agile dew
#

can you summon them with the debug mod?

hardy viper
#

ye

#

its like a sidebar that u can pull up and search and whatnot

eager pendant
#

What is the correct way to write the appearance of the joker in add_to_deck ?

hardy viper
#

and scroll

agile dew
hardy viper
#

i dont shill it as much as i probably should

agile dew
#

thaaank you

agile dew
hardy viper
#

tyty

quartz ravine
# eager pendant What is the correct way to write the appearance of the joker in add_to_deck ?

check this out

https://github.com/1RedOne/FickleFox/blob/master/src/jokers.lua#L1191

This is the function that's called when the joker appears, you would probably want to do something like this, but with 'add_to_deck'

Then when it is added, check for the other joker, and if there, then call SMODS.add_card({key = "j_golden"}) or whatever is the key of the joker you want to add

GitHub

An animal focused, vanilla-friendly mod for Balatro - 1RedOne/FickleFox

agile dew
chrome widget
#

do vanilla seals not have keys on them?

hardy viper
agile dew
#

beautiful

celest timber
daring fern
zealous glen
#

Do you mean an affix?

#

They don't have a prefix but they "have" a suffix

red flower
chrome widget
#

That's the thing, I'm not 100% sure the seal's key is accessible from the seal table. It doesn't actually have the property key = 'key'

#

For example, most centers have their keys as a property in their tables, in addition to being indexed in those tables by those keys

celest timber
zealous glen
chrome widget
#

They're not...

#

Which is why I used centers as a point of comparison

red flower
hard flume
#

Hi :3

#

I almost got Pikmin working :3

wintry solar
#

the seal key is just in card.seal

celest timber
chrome widget
#

Oh, weird. But thanks

eager pendant
celest timber
#

And i also tried using the offset option, and for some reason, it moved the text slowly offscreen

wintry solar
#

and seal config stuff is in card.ability.seal iirc

red flower
chrome widget
hard flume
#

I wonder if Custom Modifiers are possible yet. It would make making Pikmin flower overtime so much easier

chrome widget
#

I.E. usually objects delineate between a key and a readable name

wintry solar
#

is "Red" good enough for you?

chrome widget
#

No, I'd need it to be "Red Seal"

wintry solar
#

oh right

#

you should be able to just localize it

chrome widget
#

Nods

zealous glen
#

Usually you specify the key, the set, and the type of localization you want

#

Not sure if Seals also work like that

wintry solar
#

localize((type = 'name_text, key = card.seal, set = 'Seal'}) off the top of my head

#

or are seals in Other?

modern kindle
#

hi winter!

dapper sun
#

i have an enhancement that does something custom, and i want to have a joker do something when that triggers. how do i do this?

chrome widget
#

Seals are in other it looks like

red flower
hard flume
#

Programming joke name time

celest timber
willow plinth
#

man i'm so bad at animation timing, whyyyy does this not flip to the back first ;(

play_sound("card1")
card:juice_up(0.3, 0.4)
card:flip()
callback(nil, card)
delay(0.5)
card:flip()
play_sound("card1")
delay(0.2)
zealous glen
willow plinth
zealous glen
#

I don't think running it all inside the same Event would work

#

Doesn't delay create an Event?

#

So by the time the delay Events are processed, the Event flipping the card has already finished

zealous glen
#

If you want a reference, check out Training Weights

willow plinth
#

before it kinda looked like this (from revo's vault)

G.E_MANAGER:add_event(Event({
    trigger = "before",
    delay = 0.5,
    func = function()
        if v.base.id > 13 then
            v:flip()
            play_sound("card1")
            v:juice_up(0.3, 0.4)
            assert(SMODS.modify_rank(v, -1))
        elseif v.base.id < 13 then
            v:flip()
            play_sound("card1")
            v:juice_up(0.3, 0.4)
            assert(SMODS.modify_rank(v, 1))
        elseif v.base.id == 13 then
            v:flip()
            play_sound("card1")
        end
        return true
    end,
}))
G.E_MANAGER:add_event(Event({
    trigger = "after",
    delay = 1,
    func = function()
        v:flip()
        v:juice_up(0.3, 0.4)
        return true
    end,
}))
chrome widget
willow plinth
#

i badly need an await and promises in lua

chrome widget
#

Well that was mildly annoying:

red flower
eager pendant
#

Can you tell me how to make a check for the presence of a certain joker in the hand?

red flower
#

SMODS.find_card

eager pendant
red flower
hard flume
#

Learn coding instead of asking strangers to do it for you tbh

chrome widget
#

Strangely hostile response for a channel seemingly designed to ask strangers for help

hard flume
#

Yes, but if you read their responses earlier. They're not trying to learn, they specifically want free code done for them

modern kindle
chrome widget
#

Why not just ignore them then?

modern kindle
#

people are angy cause they see the same questions asked over and over if people are fresh getting into this
i just dont respond alot of times myself

red flower
#

I just ignore yeah but I can't say I don't agree with the sentiment

modern kindle
#

ive already said before i dont learn without taking code and then breaking it apart, i think asking for example code is a completely fine way to learn

#

they said 'example or ready made'

hard flume
#

I guess we interpret what that means differently then

willow plinth
modern kindle
#

everyone started somewhere, idk why it has to become some elitist aspect

red flower
#

I think that user has past behavior of asking for every step of code but that's the last I will say on this

chrome widget
#

B/c it's annoying to see people assume ill intent from strangers and if this user was actually a problem you'd ask server staff to talk to them

hard flume
hard flume
eager pendant
zealous glen
red flower
chrome widget
#

Wough, timing card changes with effect text from jokers/consumables is annoying

red flower
willow plinth
# modern kindle everyone started somewhere, idk why it has to become some elitist aspect

it's not elitist to ask for one second of searching either this discord or the wiki before asking here, sorry

i get asking searchable questions while ur already in some kind of discussion or as a follow up, but this is so far from it
#💻・modding-dev message
or this lol: #💻・modding-dev message

i get laziness, i get being a beginner, but then having this additional attitude like we are just their chatgpt window, nah

willow plinth
eager pendant
chrome widget
#

Like yeah I do understand the annoyance, it feels like talking to a brick wall, but it's way easier to just ignore or block someone

willow plinth
#

with that i agree, yes

#

but sometimes anger gets to one, i get that too

chrome widget
#

The main reason I point it out is because a lot of the times the poor communication can come from a bad grasp on the language from a non-native speaker, somebody really young, or somebody just anxious as hell and without having that assumption I just kinda block and move on

#

(which I have done here mind you)

zealous glen
chrome widget
#

I've just written the absolute worst loc vars code

chrome widget
#

Queen shit right here

modern kindle
#

thanks for the free code kiddo 😎

chrome widget
#

Okay wait this is hard to read and I don't need someone to parse this

modern kindle
#

ah shit its gone

red flower
chrome widget
#

Image has better formatting

bold sleet
#

Hello. I am having some trouble moving stuff to the localization file. Assuming the mod's prefix is fg, how should I work it out?

modern kindle
red flower
#

same

zealous glen
chrome widget
#

I get why they don't do it, b/c sometimes the lack of continuity of other people talking to the blocked person can cause more arguments and confusion, but like... I don't wanna see em

modern kindle
#

im just too lazy to block most times, i just ignore people

zealous glen
#

Maybe you could handle nil differently Idk maybe not

willow plinth
red flower
#

I don't think there's a place that explains how to localize ConsumableTypes? or am I missing something?

chrome widget
#

You have to do something specific for some reason but I don't know if it's explained anywhere, hold on

red flower
#

the objecttype page used loc_txt without explaining how to do it in loc files unlike other pages

chrome widget
#

The main thing to note is that at base, you need these boilerplate level references to your object type

chrome widget
#

so 'k_[type_key' and 'k_[type_key]_cards'

bold sleet
#

and shit is not working out ra

dapper sun
#

my game crashes when i select my custom poker hand,,

chrome widget
#

And then you have to put your loc strings (if you're using localization files) in a table under descriptions named as the type key

willow plinth
# bold sleet

i think you don't need the prefix here but i could be wrong

bold sleet
#

I tried without the prefix

red flower
zealous glen
rough furnace
#

I think the consumeable type doesn't have sprefix but the consumable does

zealous glen
#

That's how every mod defines the same Zodiac Consumable Type

chrome widget
#

Also I've got this working, the main thing I'm gonna have to figure out is how to to time the Stand attention text, and then probably splitting the loc into an alternate version if all three are in use to space it better

hard flume
#

Hi :3

frosty rampart
hard flume
#

Has anyone made a Homestuck Extended Zodiac Consumable Types?

dapper sun
#

i just didn't include it in the screenshot

zealous glen
dapper sun
zealous glen
#

Homestuck Zodiac there are three at least

hard flume
#

Fair

willow plinth
# dapper sun

i'm not sure the prefix is needed here, like just do key="flush_jess" maybe?

dapper sun
#

ok

#

i've been adding the prefix everywhere else lol

dapper sun
#

still crashes

willow plinth
brisk rose
red flower
brisk rose
chrome widget
#

It's a public server, so by default everyone is a stranger to me unless we start to talk in DMs. If I don't like you and have to coexist with you, blocked, because it's the easiest way to solve conflict without making it other people's problems

willow plinth
red flower
#

everyone is my friend here unless i have you blocked in which case you're my enemy

dapper sun
#

i found the problem

#

it's bc i changed the key name without making a new run

red flower
#

oh lol

modern kindle
dapper sun
#

now how do i add enhancements to the example cards?

red flower
modern kindle
#

hmmm, what is a moral thought u have

#

do u like dogs ill say i hate em ignoring my pfp

chrome widget
#

Uhh what are your throughts on Pinapple on Pizza

red flower
red flower
red flower
modern kindle
willow plinth
dapper sun
#

no

willow plinth
#

hm :D

dapper sun
#

i just had to make a new run lol

zealous glen
#

That will get 'en

modern kindle
chrome widget
#

I'm kinda basic, pepperoni and extra parmesan

red flower
eager pendant
modern kindle
red flower
red flower
chrome widget
#

But fr through the most effective way to get blocked by me is to say some transmisognyistic stuff or other uninterrogated reactionary rhetoric. You'd be surprised how often this happens even in queer friendly servers

rough furnace
modern kindle
modern kindle
dapper sun
#

it works, ty

eager pendant
chrome widget
#

Okay so I fixed the display thing, now I just need to figure out some better timing

eager pendant
red flower
#

something like

if next(SMODS.find_card("j_mod prefix_key")) then
    SMODS.add_card{key = "j_mod prefix_key2"}
end
rough furnace
rough furnace
willow plinth
red flower
#

yeah i think because before events run immediately the card was just flipping and unflipping immediately

quartz ravine
#

Wowwww! My artist just sent me the last card she was working on. Eldlich the Golden lord.

Oh my god I am in love!!!!

modern kindle
willow plinth
red flower
#

also it synergizes with eldlich in my mod

quartz ravine
#

Eldlich predates that guy by a long time (I think)!

modern kindle
#

very likely

#

i just thought the lord of all that is golden was funny :b

red flower
#

eldlich is 2020? i think

quartz ravine
willow plinth
#

modlich the golden lord

limber blaze
quartz ravine
dapper sun
#

flesh house,, ,

limber blaze
#

works for flush flush five and straight flush too

willow plinth
# limber blaze

i want to eat these cards even if they are not consumables

limber blaze
#

do not consume the flesh

dapper sun
#

yummy flesh

dapper sun
limber blaze
#

its just a modified name

#

like for royal flush

dapper sun
#

ok lol

eager pendant
rough furnace
#

What's the error?

eager pendant
rough furnace
#

Are you hovering on your joker when running it?

rough furnace
#

do so

eager pendant
red flower
verbal hare
#

Can I add a picture of my Joker without having to make an atlas?

willow plinth
red flower
# eager pendant

try next(SMODS.find_card("j_fut_lila")

but I don't really know why it doesn't work

willow plinth
#

you can always use native lua of course but why

verbal hare
willow plinth
#

what do you want to do in general? just a retexture or a mod?

verbal hare
#

a mod

willow plinth
#

okay, and what would be the problem with using an atlas?

verbal hare
willow plinth
#

an atlas is just a sprite sheet, where like multiple joker images are in rows and columns, and then pos describes which row and column to pick for a specific joker

zealous glen
willow plinth
#

look at literally any mod to get an idea

verbal hare
#

yall know were to made a sprite easy? i have an idea but i need a page or software

verbal hare
willow plinth
zealous glen
verbal hare
#

whats the difference between 1x and 2x?

willow plinth
verbal hare
#

thx to all of you, you are great

zealous glen
verbal hare
#

i understand now

#

😁

chrome widget
#

You'll want to scale your 1x version with nearest neighbor scaling unless you actively want to go through the trouble of making truly higher res versions

red flower
willow plinth
zealous glen
#

And the 2x version could be the 1x doubled

crystal perch
#

no vanilla asset is different in 2x

verbal hare
#

what is the jokers medition?

crystal perch
#

it is literally just for pixel smoothing

zealous glen
eager pendant
#

How do I make a check for a joker in my hand and if there is one, add another?

#

How do I make a check for a joker in my hand and if there is one, add another?

celest timber
#

does somebody knows the structure of context.hand_drawn?

brisk rose
#

I can tell you don't speak English well

heady siren
#

Is it possible to color sprites using G.C colors?

brisk rose
#

maybe drawstep could do it

#

but I kinda doubt it, but I also have no idea what it's capable of

heady siren
#

I'm using DrawSteps for my layered cards

#

And I have no idea how shaders work, so

brisk rose
#

tbh love.draw isn't all that daunting, if needed, but idk how well it plays on the actual game canvas

#

I've used it myself, strangely, but only to write to files

heady siren
#

I wanna make a custom card effect that has a colored outline of a card that expands outwards and fades out

#

And works on any card

brisk rose
edgy reef
#

Would be much easier to do that yea.

#

Generally I don't think you need to touch love graphic APIs in this game at all unless it's very specific.

#

LocalThunk already built good tools around it.

heady siren
#

I could probably make the actual card effect pretty easily, it's the color part that makes it complicated

brisk rose
brisk rose
#

So, to clarify I just see lovely patches as the least ideal way to do things because they tend to cause problems in large modpacks

gaunt thistle
#

yeah I feel like the whole "use lovely patches as a last resort" recommendation of mine has been lost to history

brisk rose
#

nothing against lovely

gaunt thistle
#

lovely is awful

red flower
#

so true

gaunt thistle
#

:p

heady siren
#

Meanwhile I've just kinda started using lovely patches semi-frequently

gaunt thistle
#

I've got personal beef with the dev

brisk rose
red flower
#

yeah I read a lot of lovely patches where I think "this could easily be a hook"

brisk rose
#

the man in the mirror is a bitch

heady siren
#

I'm tempted to just post my lovely patches and see if they can be hookified

gaunt thistle
#

in a lot of cases patches are just plain faster but you need to consider compatibility

brisk rose
gaunt thistle
#

in general I'm impressed that things are working as well as they have been

brisk rose
#

I manage to have 60+ mods, and it mostly work

gaunt thistle
#

jeez, that's wild to think about

brisk rose
#

like... I can and do play balatro like that, regularly

gaunt thistle
#

it means lovely is pretty optimized too

#

which is cool

brisk rose
gaunt thistle
#

considering how much work it does at patchtime

brisk rose
#

unless I boot up a run on android in my spare time

heady siren
#

I feel like these are the biggest offenders

brisk rose
#

that's impressive af

gaunt thistle
#

daaaaang that's sick

#

I'm very proud of lovely haha

brisk rose
gaunt thistle
#

and I've got support from amazing people too

#

very fun project

brisk rose
red flower