#💻・modding-dev

1 messages · Page 365 of 1

red flower
#

check for context.final_scoring_step first and then do all the rest

minor magnet
#

they are genuinely insane

red flower
#

with the first effect or with the changed one

minor magnet
#

i implemented them completely differently

#

tbh i find how i did them to be quite clever

formal parrot
#

Hey N

minor magnet
#

Heaven!!!

red flower
#

hii

minor magnet
#

hi!!!!

formal parrot
#

Hey garbb !!!!

minor magnet
#

have you seen the jump cards

formal parrot
#

Jump cards

#

Do they bounce

#

I’ve seen the royal cards

minor magnet
#

i am so proud of these

formal parrot
minor magnet
#

thank you! i'm more proud of the code really

#

they work and they allow for FLUSH FIVE STRAIGHT

formal parrot
#

You always cook

formal parrot
lofty sand
minor magnet
#

yes FLUSH FIVE STRAIGHT is always uppercase

formal parrot
#

Flush five gay when

lofty sand
#

excuse me flush five straight?

minor magnet
formal parrot
#

Bro’s serious

minor magnet
minor magnet
lofty sand
#

devious poker hand

formal parrot
#

Poker hand i need to pull to pay my debt

minor magnet
#

flush five straight is balatro exodia

#

no wait

novel drum
#

is it possible to use a trance function in another mod to edit the colour scheme? trying to make a midnight-type mode for a custom stake and i want to see if i can set the palette when entering a run on that stake

minor magnet
#

more like

#

the infinity gauntlet

red flower
formal parrot
#

Mods bring me his head

minor magnet
#

jump cards are truly the first thing i make where i can confidently say no one has made before

red flower
formal parrot
#

Anyways chat you have an amazing rest of your day i’m gonna head to sleep now

red flower
#

gn

minor magnet
#

gn chat!!

formal parrot
next timber
#

i probably should sleep too

slender zenith
#

me too goodnight chat

next timber
#

but this mod is driving me insane

formal parrot
#

Take a chill pill

hybrid shadow
slender zenith
minor magnet
#

they have their normal rank

hybrid shadow
#

ah

minor magnet
#

this is why they allow for Straight Four, Straight Five and FLUSH FIVE STRAIGHT

next timber
#

god i wish there was an easy way to check the origin of an event

cunning barn
#

i just had a mini heart attack thinking i accidentally completely deleted my jokestar runner work but then i ralized i just moved it to an obliquely-named folder to prevent it from showing up in the mod list until i was ready to work on the darn thing again
so at some point i'm gonna try and rewrite my king of town joker code because i feel like i completely messed it up when trying to take code from hollow joker which works completely differently

hybrid shadow
#

i need to work on making an enhancement that turns cards blank

flat sorrel
cunning barn
#

yeah but it is not even REMOTELY ready for release yet and i'd have to update it incredibly oncstantly with how much i added

flat sorrel
#

you can just keep it private and only push it every so often, any backup is better than none

red flower
#

even if you dont want to upload it just having local git is really good

lofty sand
#

I don't think the return { balance = true } works for what I'm trying to do, or I'm missing something that I don't understand

red flower
#

what does it do compared to what you want to do

lofty sand
#

from what I can tell, it does nothing regardless of played hand, what I want it to do is balance when played hand contains only stone cards

red flower
#

can i see the code? if it does nothing the logic might be wrong

lofty sand
#

that's what I'm thinking

#

calculate function rn is at:

        if context.final_scoring_step then 
            for k, v in pairs(context.full_hand) 
            do if  not SMODS.has_enhancement(v, “m_stone”) 
                then stone = false 
        
        return { balance = true }
        end
    end```
red flower
#

yeah that's missing a ton of logic like i said

#

that will balance when you dont play a stone card

lofty sand
#

what's missing the logic? the stone card part or the balancing part of it?

red flower
#

the stone card part, the balance is just the return

flat sorrel
lofty sand
#

oh oops I forgot to save it again, that was an outdated one

flat sorrel
#

also if the return doesn't work you just need to manually copy what the plasma deck does in back.lua

lofty sand
#

that's what I did originally and it kinda worked, but N told me about the return { balance = true } thing

red flower
#

let me know if it still doesn't work and i will test it myself in a bit

#

it might be an smods bug/restriction

lofty sand
#

I'll give it a try using both here in a sec

wheat pulsar
#

hi, how can i make a custom message?, like the message = localize('k_gold')
but i want to do one with the lucky cards

inner hazel
#

I'm having some problems with installing cryptid and entropy. Cryptid says I dont have talisman when i do and entropy says i dont have cryptid. im installing from balatro mod manager btw.

red flower
wheat pulsar
torpid plume
#

i'm having an issue where the game is saying my lua file is calling on a nil value, but i don't see anything wrong with it. would anyone be willing to take a look at my code and see what the issue might be?

next timber
#

im going insane

#

for some reason

#

when i have no cards in my hand

#

my event queue gets filled up with what seems to be calls of ease_value??

#

at least, the event that's generated during ease_value

rugged helm
#
                    if
            (context.joker_main and context.scoring_name == card.ability.extra.type and context.scoring_hand[1].base.suit == "Hearts" and context.scoring_hand[2].base.suit == "Hearts")
            or context.forcetrigger
        then
            return {
                message = localize({
                    type = "variable",
                    key = "a_powmult",
                    vars = { number_format(card.ability.extra.mult) },
                }),
                colour = G.C.DARK_EDITION,
                Emult_mod = lenient_bignum(card.ability.extra.mult),
                                card = card,
            }
        end
   end,```
red flower
sonic cedar
#

cant find where cc is created? which file is it

rugged helm
#

should be a ^2 mult if played hand is a royal flush of hearts

red flower
next timber
hybrid shadow
#

how would i write out the name and description of a rarity in a localization file

sonic cedar
#

ok so where would consumable stuff be categorized here

lofty sand
#
            if not context or not context.final_scoring_step then
                return nil
            end
            if context.final_scoring_step then 
            for _, card in ipairs(context.full_hand) do
            if not SMODS.has_enhancement(card, “m_stone”) then
                return { balance = true }
            end
            end
            end
        end```
#

just tried this, balance does not work. going to try it out with the plasma code

next timber
#

the game seems eternally locked into the drawing hand state until it gets a card

#

that makes sense

#

but also sucks for me

flat sorrel
red flower
sonic cedar
#

oh literally ok

hybrid shadow
# sonic cedar

so i cant put in a description for a rarity like for enhancements

sonic cedar
#

rarities dont have descriptions

next timber
#

until then i kinda just gotta

#

deal with the issues it causes

red flower
shut crater
rugged helm
#

nope

next timber
#

CAUSE I PATCHED IT. AND ITS STILL HAPPENING

#

or wait did the patch not go through

lofty sand
#

hard crash

red flower
#

that seems like a different problem

#

can i see your entire code

patent reef
#

does modding work on the gamepass version yet?

lofty sand
#

sure, just a sec

red flower
nova eagle
#

i think im gonna need some help with this first joker... how do i actually make it functional?

patent reef
#

damn

nova eagle
#

no problem... im just new to lua and have no clue what anything does

next timber
nova eagle
#

i tried following a turorial, but it just didnt make sense

lofty sand
#

the joker that's broken is "dartboard"

nova eagle
#

i want to just start by giving the joker 5 mult

lofty sand
red flower
red flower
#

wait no

sonic cedar
#

wait actually?

#

DAMNIT

lofty sand
#

probably dogshit, but oh well

red flower
# sonic cedar DAMNIT

the logic is correct but you need to check for context.consumeable.ability.mod_conv or something like that

sonic cedar
#

oh my god i got the logic right

flat sorrel
# nova eagle i want to just start by giving the joker 5 mult
SMODS.Joker{
  key = "joker",
  
  name = "Joker",
  loc_txt = {
    name = "Joker",
    text = {
      "{C:mult}+#1#{} Mult",
    },
  },
  
  config = {
    extra = {
      mult = 5,
    }
  },
  
  loc_vars = function(self, info_queue, card)
    return {vars = {card.ability.extra.mult}}
  end,
  
  calculate = function(self, card, context)
    if context.cardarea == G.jokers and context.joker_main then
      return { mult = card.ability.extra.mult }
    end
  end,
}
red flower
red flower
nova eagle
#

what is all that loc_vars stuff?

slender zenith
red flower
slender zenith
#

read all the conments

#

helped me

red flower
#

yes

sonic cedar
lofty sand
flat sorrel
# nova eagle what is all that loc_vars stuff?

When you have a #n# in your description, it replaces that string with the nth variable returned in loc_vars, so loc_vars allows you to dynamically change the description. It's good practice to do it with constants like this, too

red flower
# sonic cedar so more like

or you can do context.consumeable.config.center.key == "c_devil" if you want the devil specifically and not every modded gold card tarot

red flower
lofty sand
#

how can I update it?

#

to fit the new way it's defined

rugged helm
red flower
#

(dont look at the rest it uses a lot of my mods exclusive stuff so it will confuse you)

lofty sand
#

what line am I looking to this shit is eldrich lmao

red flower
#

very top

lofty sand
#

just to line seven?

#

that little chunk?

nova eagle
#

now i have one more question

#

how do i make the card change its mult once ante 8 comes around?

red flower
nova eagle
#

these are the conditions... i just have no clue how to make it follow that condition

lofty sand
lofty sand
#

a nubbys reference in my funny joker game?

nova eagle
#

nubbys number factory reference

#

(im making a mod out of all the custom joker ideas i see on reddit)

lofty sand
#

wacky, have fun with that

#

can you make the old void perk jake the snake build possible in balatro?

nova eagle
#

question is would i make the void perk count negatives or no?

lofty sand
#

lmao well, does stencil?

nova eagle
#

although i guess jake wouldnt be too op in balatro

nova eagle
sonic cedar
red flower
nova eagle
#

once i get better at modding i might do some more nubbys jokers

nova eagle
#

for now though i want to keep it simple

hybrid shadow
#

does it matter whether you use ' or "

nova eagle
#

a dedicated nnf mod could be cool though

sonic cedar
#

thanks n

surreal coral
#

Trying to hook Card:use_consumable, and I'm not sure what I'm missing. Ankh is the only consumable that works now, the rest immediately crash the game. Anything obviously wrong?

local olduseconsumable = Card.use_consumeable
function Card:use_consumeable(area, copier)
    if self.ability.name == 'Ankh' then
      "code"
    else
      olduseconsumable(area, copier)
    end
end
lofty sand
rugged helm
#

:3333 GOT IT

nova eagle
#

how do i make my joker change to 50 mult after ante 8?

red flower
lofty sand
#

so I should leave that atlas up at the top like it's formatted in your lua file

red flower
#

i like putting it at the top but the order doesnt matter

hybrid shadow
flat sorrel
red flower
hybrid shadow
#

ah

willow plinth
#

balatro mod but it praises lebanese food

lofty sand
red flower
#

wdym

#

there's a path

lofty sand
#

but not for each joker, just in the atlas

#

how do I pull separate pngs from one file through the atlas?

red flower
#

you can't put the path for each joker

#

in that case I have this file with all the jokers
if i want the top left i do pos = {x=0,y=0}
if i want the 3rd purple one i do pos = {x=2,y=2}

nova eagle
#

theres probably something obvious im missing.. but i have no clue where to put the end statements here

lofty sand
red flower
flat sorrel
# nova eagle

those 2 lines should be inside the calculate function and behind a context check

lofty sand
#

my homie's currently in the process of pumping out cursed joker designs lol

hybrid shadow
red flower
#

i think you can do it with asesprite using tilesets

#

or something

hybrid shadow
#

i waited until i had all the jokers i wanted in the png before starting to code lol

lofty sand
red flower
#

i mean if all fails you can do an atlas for each

lofty sand
#

true, I'm just not sure how many jokers my homie plans on making lol

hybrid shadow
#

i know cryptid has like 3 different atlases, each with a diff key to it

red flower
#

i have like 25

flat sorrel
#

you can just expand your atlas and all you have to change is the atlas definition, very extendable

red flower
#

but i also have 330 jokers

hybrid shadow
#

lemme count up mine because i should have a list somewhere of whats planned on being added

flat sorrel
#

actually you don't even need to update the atlas def because that just takes the tile size, you just add more jokers onto the edges and use the new coords

surreal coral
hybrid shadow
nova eagle
#

so why is line 8 giving me trouble now?

flat sorrel
# nova eagle so why is line 8 giving me trouble now?

If there's an syntax issue there I can't see it, maybe something off-screen at the top? Couple other issues though: you don't need to do {C:black}, you can reset the color with just {}, like{C:color}colored text{}; and you aren't using loc_vars because you don't have any #n# vars in your description, it should be a calculate function instead

nova eagle
#

ohh

#

i didnt know about that

#

cool, that fixed the crash

hardy viper
nova eagle
#

possible, but im pretty sure i did save

hardy viper
nova eagle
#

i had one bad experience with a game i was making a while back, and now i save every time i make an edit

#

huh

#

well damn

hardy viper
#

that dot means file was modified and hasnt been saved yet

nova eagle
#

good to know

#

so now buying the joker crashes the game....

hardy viper
#

i believe its "self, card, info_queue" as the function parameters

#

you have info_queue and card swapped

flat sorrel
#

no, it's info_queue in the middle

hardy viper
#

ah hm

#

wait why is it named calculate

#

ah i see

#

change parameters to "self, card, context"

nova eagle
#

nope, that caused a crash

hardy viper
#

can u send code

nova eagle
#

SMODS.Joker {
key = 'joker2',
loc_txt = {
name = 'Cheese House',
text = {
'{C:red}+5 {}Mult.',
'If current {C:attention}Ante {}is {C:attention}8,{}or',
'higher, {C:red}+50 {}Mult instead'
}
},
atlas = 'cheese house',
pos = {x = 0, y = 0},
blueprint_compat = true,
rarity = 1,
cost = 4,
config = {
extra = {
early_mult = 5,
late_mult = 50
}
},
calculate = function(self, card, context)
local ante = G.GAME.round_resets.blind_ante or G.GAME.round_resets.ante
return { mult = card.ability.extra[ante >=8 and 'late_mult' or 'early_mult']}
end
}

#

uh

#

how do yall do the embed thing

hardy viper
#

```lua
<code>
```

nova eagle
#

?

hardy viper
#

thats how you embed the code in a code box, you put the code inside that kind of text

#

e.g.
```lua
while true do end
```

becomes

while true do end
flat sorrel
#

you need to put the code in the calculate function behind a context check
if context.joker_main then <those two lines> end

nova eagle
#
SMODS.Atlas {
    key = 'cheese house',
    path = 'cheese house.png',
    px = 71,
    py = 95
}

SMODS.Joker {
    key = 'joker2',
    loc_txt = {
        name = 'Cheese House',
        text = {
            '{C:red}+5 {}Mult.',
            'If current {C:attention}Ante {}is {C:attention}8,{}or',
            'higher, {C:red}+50 {}Mult instead'
        }
    },
    atlas = 'cheese house',
    pos = {x = 0, y = 0},
    blueprint_compat = true,
    rarity = 1,
    cost = 4,
    config = {
        extra = {
            early_mult = 5,
            late_mult = 50
        }
    },
    calculate = function(self, card, context)
        local ante = G.GAME.round_resets.blind_ante or G.GAME.round_resets.ante
        return { mult = card.ability.extra[ante >=8 and 'late_mult' or 'early_mult']}
    end
}


flat sorrel
#

idk if that will fix the crash, depends why it's crashing, but it is something you want

deft carbon
#

this is probably a dumb question, but is there a way to make an edition that uses an image file instead of a shader

nova eagle
#

is that what im understanding?

flat sorrel
#
calculate = function(yada)
  if context.joker_main then
    local ante = yada
    return yada
  end
end
novel drum
#

anyone know why my stake sticker is returning an error?

nova eagle
#

ok, so it is what i was thinking

nova eagle
#

but why 2 end statements?

novel drum
nova eagle
#

oh,,, i found out why

worldly frigate
#

is there a way to insert a picture into a custom joker?

flat sorrel
flat sorrel
lofty sand
#

for an atlas sprite sheet do you need both a 1x and 2x?

nova eagle
#

ok so the joker is half working again... but ante 8 is not giving 50 mult

#

it stays at 5

worldly frigate
#

i have 0 clue about programming or modding or anything lmao but i rly wanna create a custom mod for this game

celest timber
#

is there a way to change the text when hovered?

worldly frigate
#

and i been wondering if one can just put a picture on the joker while creating the joker

willow plinth
flat sorrel
celest timber
flat sorrel
worldly frigate
#

i mean do u make the art urself when u create jokers? or do u download pictures and put it as a layer

#

how does the process work

celest timber
nova eagle
flat sorrel
# worldly frigate how does the process work

the game takes an image, usually an atlas (a sprite sheet), and that's the image it uses for the joker. you create an Atlas object with SMODS and tell it what dimensions each tile on the tilesheet has (the default Joker dims are 71x95), and then when creating a Joker you point it to the right coordinate, like { x = 0, y = 0 } for the top-left-most tile. reference another mod as a base if you're unsure
the images themselves can be anything

worldly frigate
#

Oh hell yeah

nova eagle
#

btw amary, you are absolutely goated... your help is amazing to have

lofty sand
#

does anyone know where I should put sprite sheet for my atlas?

#

does 1x and 2x even matter when you're using an atlas?

flat sorrel
#

afaik you need 1x and 2x but I haven't tested it, just copied what Extra Credit was doing

red flower
#

you do, it crashes if you have pixel smoothing on/off

nova eagle
#

so... what is the fix if the print ante function only gives my nil?

flat sorrel
nova eagle
flat sorrel
lofty sand
flat sorrel
nova eagle
lofty sand
#

oh dope

worldly frigate
#

imma ask smth and i might sound rly stupid

#

how to open smods type shi type shi

vocal citrus
#

Is it okay if someone could help me out

flat sorrel
nova eagle
#

ih

#

oh...

#

whoops

red flower
vocal citrus
#

So I tried to install the Balatro Mod Manager on the steam deck to play the Balatro Mod but I can't seem to get it to work is it okay if someone could send me a already install version of it through a Zip File

worldly frigate
#

i have 0 idea about modding or programming but i rly wanna get into those stuff and make a mod for balatro

worldly frigate
red flower
flat sorrel
#

modding is honestly a pretty good way to learn programming if it's in your nature to throw yourself at a problem and figure it out yourself, since you have a pre-built reference to meddle with

worldly frigate
#

I mean we will see how it goes lmao

vocal citrus
worldly frigate
red flower
#

❤️

nova eagle
#

ima do a quick cheese house run to see if naturally reaching 8 does the thing

flat sorrel
#

hm, I don't think it should matter since it's getting evaluated when the jokers are being calculated, so there's no event to miss by bypassing it, but maybe?

lofty sand
#

fr tho thank you guys, I've gone from a blubering idiot who thought I might know what I'm doing to a blubering idiot who knows I have no idea what I'm doing

#

y'all have been a huge help

flat sorrel
#

naw you've got it, just gotta reference what other mods are doing and you'll be alright. Extra Credit is a good reference

slender zenith
#

i came into this channel earlier not knowing any lua and came out with a mod you guys are goated

nova eagle
#

sweet! cheese house is now fully functional

lofty sand
flat sorrel
nova eagle
#

indeed i can! thank you so much for your help! couldnt have done it without you

#

welp... off to reddit to find more jokers to make

red flower
#

i need to start working on my own mod again too..

flat sorrel
#

to the person who deleted their comment, if you add a new deck for debugging, you can set a bunch of options really easily, like ante_scaling = 0.5 in the config

wind steppe
#

does anyone know how to do randomness without a listed probablity? (not affected by Oops All Sixes, trying to generate a random number)

marble flint
#

simply call pseudorandom

#

OA6s only affects G.GAME.probabilities.normal which you have to explicitly test against

keen tiger
#

how can you reliably locate a ui element by it's ID

#

like, i cant do G.round_eval.UIRoot.children[0].config.object:get_UIE_by_ID('cash_out_button') for some reason and I can't figure out why

#

it worked before with blind buttons

hasty mist
#

how do you add hands and discards

worldly frigate
#

or whats the program is he using

wind steppe
#

what parameters does pseudorandom take? i can't find lua or steammodded documentation on it

worldly frigate
#

in the video

red flower
worldly frigate
#

i see isee

brisk rose
#

I've done everything I can think of, and still no real change on negative or any of the ones which aren't doing much of all. Some of those work a lot better if I don't render the dissolve shader first, but idk how to check for if it wants that, the method built in doesn't seem to work

marble flint
hasty mist
#

tyy

sturdy monolith
#

how can i make it so that the spectral card shader isn't drawn for a specific spectral card
wanna make it so that this one doesn't have the weird sheen

keen tiger
#

seriously nothing i do works

hasty mist
#

how do i check how many playing cards are played (not scored)

sturdy monolith
worldly frigate
#

i assume its how he starts the program to make the mod

red flower
keen tiger
# keen tiger bump

bump again G.round_eval:get_UIE_by_ID('cash_out_button') returns nothing even when the cash out button is visibly present

marble flint
keen tiger
marble flint
#

also are you sure it's under that root?

keen tiger
# marble flint also are you sure it's under that root?

afaik it should eventually with:

                UIBox{
                    definition = {n=G.UIT.ROOT, config={align = 'cm', colour = G.C.CLEAR}, nodes={
                        {n=G.UIT.R, config={id = 'cash_out_button', align = "cm", padding = 0.1, minw = 7, r = 0.15, colour = G.C.ORANGE, shadow = true, hover = true, one_press = true, button = 'cash_out', focus_args = {snap_to = true}}, nodes={
                            {n=G.UIT.T, config={text = localize('b_cash_out')..": ", scale = 1, colour = G.C.UI.TEXT_LIGHT, shadow = true}},
                            {n=G.UIT.T, config={text = localize('$')..config.dollars, scale = 1.2*scale, colour = G.C.WHITE, shadow = true, juice = true}}
                    }},}},
                    config = {
                      align = 'tmi',
                      offset ={x=0,y=0.4},
                      major = G.round_eval}
                }
#

this is from add_round_eval_row

marble flint
#

does get_UIE_by_ID go through multiple UIBoxes or only one?

keen tiger
#

no clue

marble flint
#

that might be it

brisk rose
#

but then it ruins some like foil

marble flint
keen tiger
brisk rose
keen tiger
#

seems like it prevents resursive valls

marble flint
#

that's supposed to prevent repeat interactions

keen tiger
#

ohhhhh

marble flint
#

that .button tells the node what to do on click

#

so if you G.FUNCS.cash_out { config = {} } it should work fine, then

marble flint
#

or was that only on enhancements

keen tiger
#

ahhhh ok

brisk rose
lofty sand
#

yo i'm in the process of rewrighting one of my joker's sphaghetti code, if the joker is supposed to gain 50 chips every time a card is destroyed, am I supposed to use both if context.destroyed_card and if context.remove_playing_cards? or is that redundant?

marble flint
torpid plume
#

y'all- i need opinions on if she should be buffed or not. i am thinking of raising the 1.5 to 2, since this is like a more niche version of Canio

marble flint
torpid plume
#

yeah im having difficulty figuring out how to make her work well since like

#

the character she's based off of, her whole thing is destroying stone related things

#

so it wouldnt make a lot of sense for her to make them too

#

maybe i can make her rare and lower that 1.5 to 1

red flower
lofty sand
#

ah I see

#

my sphaghetti code is extra marinated then

full verge
#

hello, there is a great mod called first round joker made by LnxFCA. it lets you pick your first shop joker, but the joker always has a negative multiplier which is not possible in vanilla play, is there a way for me to remove this and add the normal, foil, multi and poly chances to this selected card?https://www.nexusmods.com/balatro/mods/105?tab=files

Nexus Mods :: Balatro

Ensures a specific Joker card appears in the shop during the first round

lofty sand
#

marinara'd?

red flower
#

i recommend checking my vanilla rewrite mod instead of the vanilla code :3

lofty sand
red flower
#

no, i mean for checking the code it's not an API

lofty sand
#

o

#

pop a link :)

torpid plume
worldly frigate
#

whats the command on giving money for jokers like (give 10 at the end of the round)

brisk rose
#

there doesn't seem to be a center object with those parameters

marble flint
#

G.P_CENTERS.e_negative, e.g.

red flower
worldly frigate
#

thankkkssss

#

u a legend fr

red flower
quartz ravine
#

Awesome! You're really making a lot of fun jokers here! And there are so many fun opportunities. How about a Bacteria Enhancement? It's like a stone card. But it doubles in Chips every time it is played/ scored?

brisk rose
lofty sand
#

yo I'm trying to have the game multiply the number of removed playing cards multiplied by an amount of chips to be added to the card, does anyone know how I could do this? here's the code:

        if context.remove_playing_cards and not context.blueprint then
            for _, removed_card in ipairs(context.removed) do
                card.ability.extra.chips = card.ability.extra.chips + (number of deleted cards) * card.ability.extra.chip_mod
                return { message = localize { type = 'variable', key = 'a_chips', vars = { card.ability.extra.chips } } }```
#

also this syntax fucking rocks btw @red flower, it's so much easier to work with and digest

#

thanks again

quartz ravine
#

@red flower , I love the idea of Vanilla remade. A great way to explain how to do things via SMODs, and I think your syntax is very clean and easy to follow as well!

lofty sand
shut crater
wind steppe
#

he's beautiful

hybrid shadow
sonic cedar
gentle rain
wind steppe
hybrid shadow
wind steppe
hybrid shadow
#

lol

worldly frigate
#

what dis mean

wind steppe
#

negative mult doesn't seem to work

flat sorrel
#

what does your atlas code look like?

wind steppe
#

shame

wild escarp
#

What should I be doing to give skip tags from jokers?

worldly frigate
#

but here

hybrid shadow
worldly frigate
#

dont mind the whole tonka yeat stuff

#

ohhh

#

wait

#

i didnt give it value

#

nvm i think ik now

#

thx tho yall nice fr

wind steppe
#

might not have seen the mult go down because markiplier was polychrome

hybrid shadow
#

because id love to just mess around with the markiplier card

wind steppe
#

i can release him separately though

hybrid shadow
worldly frigate
#

im having a trouble loading the texture

#

isnt this the right format?

hasty mist
#

and not context.repetition prevents jokers from being retriggered right?

worldly frigate
#

oh nvm now it works?

wild escarp
#

Can someone help me with my code? I copied it from cola, and it seems to be doing nothing. Am I checking something wrong in the if?

loc_vars = function(self, info_queue, card)
    info_queue[#info_queue+1] = G.P_TAGS.tag_ethereal
    return { vars = { localize { type = 'name_text', set = 'Tag', key = 'tag_ethereal' } } }
end,

calculate = function(self, card, context)
    if context.cardarea == G.play and #G.consumeables.cards + G.GAME.consumeable_buffer < G.consumeables.config.card_limit then
        local queens = 0
        local twos = 0
        for i = 1, #context.scoring_hand do
            if context.scoring_hand[i]:get_id() == 2 then twos = twos + 1 end
            if context.scoring_hand[i]:get_id() == 13 then queens = queens + 1 end
        end
        if twos > 0 and queens > 0 then
            return 
            {
                func = function()
                G.E_MANAGER:add_event(Event({
                    func = (function()
                        add_tag(Tag('tag_ethereal'))
                        play_sound('generic1', 0.9 + math.random() * 0.1, 0.8)
                        play_sound('holo1', 1.2 + math.random() * 0.1, 0.4)
                        return true
                    end)
                }))
            end
        }
        end
    end
end

marble flint
#

two things:

#

queens are id 12

#

idk why you're checking consumeable_buffer for this

wild escarp
#

Uh, I think "I'm dumb" sufficiently explains it.

celest timber
#

how do i get the current deck?

lofty sand
#

if a joker doesn't have any values on it that can change, does it need a loc_vars?

marble flint
lofty sand
#

awesome! I officially have no idea why my joker doesn't work lol

#

would you mind taking a peek?

celest timber
marble flint
lofty sand
#
    key = "fool",
    unlocked = true,
    discovered = true,
    blueprint_compat = false,
    rarity = 2,
    cost = 6,
    atlas = "cottage",
    pos = { x = 1, y = 0 },
     loc_txt = {
        name = "dartboard",
        text = {
            "Balance {C:chips}Chips{} and {C:mult}Mult{}",
            "if played hand contains",
            "only {C:attention}Stone{} cards",
        },
    },
    config = {},

    calculate = function(self, card, context)
        if context.final_scoring_step then 
        for _, card in ipairs(context.full_hand) do
        if not SMODS.has_enhancement(card, “m_stone”) then return end
        end
        return { balance = true }
    end
end,```
#

the joker is supposed to only balance chips and mult if played hand contains only stone cards, regardless of how many cards played

cunning barn
#

ok im starting my KOT joker over let me send the code again

#
SMODS.Joker {
    key = 'kot',
    loc_txt = {
        name = 'King of Town',
        text = {
            "+#1# hand size for every King scored",
            "Gains X#2# mult per hand size above #3#",
            "{C:inactive}(Currently {X:mult,C:white} X#4# {C:inactive} Mult)"

        }
    },
    config = { h_size = 1, extra = { xmult_per = 0.1, thresh = 8, Xmult = 1 } },
    loc_vars = function(self, info_queue, card)
        return { vars = { card.ability.h_size, card.ability.extra.xmult_per, card.ability.extra.thresh, card.ability.extra.Xmult } }
    end,
    rarity = 4,
    atlas = 'hsr',
    pos = { x = 6, y = 0 },
    soul_pos = { x = 7, y = 0 },
    cost = 20,
    calculate = function(self, card, context)
             if context.joker_main then
               Xmult = card.ability.extra.Xmult
           
            if context.cardarea == G.jokers and context.joker_main and G.hand.config.card_limit > card.ability.extra.thresh then
              return {
                message = localize{type='variable',key='a_xmult',vars={card.ability.extra.xmult_per * (card.ability.extra.thresh + G.hand.config.card_limit)}},
                mult_mod = card.ability.extra.xmult_per * (card.ability.extra.thresh + G.hand.config.card_limit),
              Xmult = card.ability.extra.Xmult
            }
        end
    end
end
}```

what it's supposed to do is gain x0.1 mult for every hand size above 8 and return it when triggered
none of the variables work properly and it returns x1.7 mult instead of x1.1 with 9 hand size
marble flint
lofty sand
marble flint
#

ye

lofty sand
#

lets give it a shot

lofty sand
wild escarp
#

So, now my joker works a little too well, and gives a tag for every played queen or two, anyone know why?

        if context.cardarea == G.play and context.individual then
            local queens = 0
            local twos = 0
            for i = 1, #context.scoring_hand do
                if context.scoring_hand[i]:get_id() == 2 then twos = twos + 1 end
                if context.scoring_hand[i]:get_id() == 12 then queens = queens + 1 end
            end
            if twos > 0 and queens > 0 then
                return 
                {
                    func = function()
                    G.E_MANAGER:add_event(Event({
                        func = (function()
                            add_tag(Tag('tag_ethereal'))
                            play_sound('generic1', 0.9 + math.random() * 0.1, 0.8)
                            play_sound('holo1', 1.2 + math.random() * 0.1, 0.4)
                            return true
                        end)
                    }))
                    end
                }
            end
        end
    end
marble flint
wild escarp
#

Yes, that's it, thanks.

marble flint
lofty sand
marble flint
#

ye

lofty sand
#

let's give it a whirl

marble flint
#

or balance = true

cunning barn
#

yeah im tearing it down. i got most of my code from hollow joker which is a WAY different use case

timid star
#

i finally now know how to load other lua files so i can finally split my one big lua file into multiple others

#

no more scrolling!!!

lofty sand
marble flint
#

idk what to tell you then other than smods borked

lofty sand
#

epic :D

#

let's check for an update I guess

worldly frigate
#

OMG I DID IT

#

I ADDED A MOD

#

yooo thx thx fr fr

#

only one joker

#

took me way too long

#

thx yall

lofty sand
#

these past six hours

#

was check the repository

#

I've been going insane

marble flint
#

:agony:

cunning barn
#

I FINALLY FIGURED OUT KOT. THE XMULT EFFECT IS FINISHED

#

it turns out that i was way overcomplicating it

#

now i need to add 2 things

  • the xmult on the joker updating since right now it's just 1 and i can't figure out how to change it
  • the "kings add +1 hand size" effect
#

im completely blanking on how to add the current total xmult as a hashtags variable. it surely can't just be calling the variable that stores it that seems like it'd give some kind of math error

marble flint
#

try it and see

cunning barn
#

oh i just forgot i got rid of a_xmult variable since i thought i iddnt need it I Think I Need It

#

ok hold on i think i need to do something like this but for when you gain hand size. is there a function call for that

#

as soon as i'm able to add to the localization the current xmult i think i've got it

rugged helm
#

how would i apply a shader to a soul sprite?

cunning barn
#

ok i SEEM to have it all under control but as soon as i add hand size, the current xmult becomes xnil again

#

here's the almost-final version of the joker for until i figure out the xmult display problem which is shaping up to be way more of a problem than it should

SMODS.Joker {
    key = 'kot',
    loc_txt = {
        name = 'King of Town',
        text = {
            "+#1# hand size for every King scored",
            "Gains X#2# mult per hand size above #3#",
            "{C:inactive}(Currently {X:mult,C:white} X#4# {C:inactive} Mult)"

        }
    },
    config = { h_size = 1, extra = { xmult_per = 0.1, thresh = 8, xmulttotal = 1 } },
    loc_vars = function(self, info_queue, card)
        return { vars = { card.ability.h_size, card.ability.extra.xmult_per, card.ability.extra.thresh, card.ability.extra.xmulttotal } }
    end,
    rarity = 4,
    atlas = 'hsr',
    pos = { x = 6, y = 0 },
    soul_pos = { x = 7, y = 0 },
    cost = 20,
    calculate = function(self, card, context)
           
            if context.cardarea == G.jokers and context.joker_main and G.hand.config.card_limit > card.ability.extra.thresh then
                card.ability.extra.xmulttotal = card.ability.extra.xmulttotal + card.ability.extra.xmult_per * (G.hand.config.card_limit - card.ability.extra.thresh)
              return {
              Xmult = 1 + card.ability.extra.xmult_per * (G.hand.config.card_limit - card.ability.extra.thresh)
            }
        end
end
}```
#

i don't understand why my variable updating returns nil when the Xmult works perfectly

#

yeah i cant find a single joker anywhere in my collection that updates on hand size set

#

¯_(ツ)_/¯

#

i ALMOST have it, i SWEAR i do, but now for some reason it works outside of hands drawn but when a hand is drawn it skyrockets up to x14.3 mult

#

i'm assuming it's because i'm using context.cardarea == G.jokers

#

keep in mind, xmult itself works just peachy. but no matter what i do, whenever ANY card is drawn ANYWHERE, the value updates

hard mica
#

Does anyone know why my smods related stuff say undefined even tho I got smods in my workspace and the Lua extension?

#

Not sure why it doesn't auto complete n stuff

frigid blaze
#

Is there any way to fix this?

shut crater
#

(not that that would fix the SMODS stuff being unrecognized)

daring fern
frigid blaze
frigid blaze
rugged helm
daring fern
frigid blaze
marble flint
cunning barn
#

how do i run code that enhances specifically face cards
i don't think there's code in base game that calls for enhancing a card to a specific edition when a card is scored but i could be wrong

frigid blaze
cunning barn
#

oh nvm it's set enhancement i think

#

no actually thats not it

daring fern
cunning barn
#

im trying to use set ability but what im trying to make throws an error

cunning barn
#

hold on let me get the log

#

i can also post the code im trying to use int he meantime

#
if context.cardarea == G.play and context.other_card:is_face() and not context.blueprint then
    return{
    context.full_hand:set_ability(G.P_CENTERS["m_wild"], nil, true)```
lofty sand
#

I figure it's a longshot, but there's no chance Xchips is a possability with smods is there?

cunning barn
#

oh no wait im doing context.full_hand not card:

#

let me change that i think that'll fix it

manic rune
marble flint
#

I don't even think you need talisman for xchips

manic rune
#

liike, honkai star rail??

daring fern
#

Return xchips = number

cunning barn
#

ok wait hol don

lofty sand
cunning barn
#

i made it card:set_ability but then the joker itself becomes a wild card texture and the face cards aren't enhanced???

frigid blaze
#

If I'm wrong tell me
Check:
Number of hands
Hand size
And the size of the hand you're playing
Right?

manic rune
#

for some reason, i is correct everytime, but it keeps creating cards from index 1 to 15

#

weird

cunning barn
hybrid shadow
runic pecan
#

Which one looks better with the background colour?

manic rune
#

no context, so hard to say honestly

cunning barn
#

here's the code again

if context.cardarea == G.play and context.other_card:is_face() and not context.blueprint then
    return{
    card:set_ability(G.P_CENTERS["m_wild"], nil, true)
    }
end```
hybrid shadow
manic rune
#

dont return it

cunning barn
#

ohhhhh that must be it

frigid blaze
#

How to increase the size of the hand that will now play standard size 5

cunning barn
#

i have no clue why it's just randomly decided that it wants to make the joker a blank wild card texture

daring fern
cunning barn
#

i know i am but i don't know how to enhance the cards

runic pecan
cunning barn
#

is it context.other_card:set_ability?

hybrid shadow
#

random thought but does anyone know if thered be a way to make a system that works like seals but doesnt take up the same "enhancement type slot" (or however that would be worded)

daring fern
cunning barn
#

well, no, because it can't pair set_ability with a context

#

so im back to square one

runic pecan
cunning barn
#

so it has to be a non-context thing but i have no clue how to do it to scored cards

shut crater
#

remember kids, if you value your ears, make sure your events eventually return true, especially if they have a call to play_sound

daring fern
hybrid shadow
cunning barn
willow plinth
lucid owl
#

where are variables set upon the start of a run set?

lucid owl
#

wait, nevermind

cunning barn
#
SMODS.Joker {
    key = 'cardgage',
    enhancement_gate = 'm_wild',
    loc_txt = {
        name = 'Senor Cardgage',
        text = {
            "Played Face cards become Wild",
            "Retrigger Wild cards twice"
        }
    },
    rarity = 2,
    atlas = 'hsr',
    pos = { x = 1, y = 0 },
    cost = 4,
      unlocked = true,
  discovered = true,
      loc_vars = function(self, info_queue, card)
        info_queue[#info_queue + 1] = G.P_CENTERS.m_wild
      end,
    calculate = function(self, card, context)

if context.cardarea == G.play and context.other_card:is_face() and not context.blueprint then
    context.other_card:set_ability(G.P_CENTERS["m_wild"], nil, true)
end
if context.repetition and context.cardarea == G.play then
      if context.other_card.ability.name == "Wild Card" then
          return {
            message = localize('k_again_ex'),
            repetitions = 2,
            card = card
          }
        end
      end
end
}```
daring fern
runic pecan
cunning barn
marble flint
cunning barn
hybrid shadow
# willow plinth stickers?

i mean, if i can make stickers that can be applied to playing cards (and not jokers) then i suppose so?

daring fern
cunning barn
#

"and context.individual:is_face()?"

daring fern
daring fern
cunning barn
#

you have to be a bit more explicit then

#

again, completely lost when it comes to lua

runic pecan
daring fern
hybrid shadow
hard mica
shut crater
hard mica
#

Should I add it?

shut crater
hard mica
cunning barn
#
if context.cardarea == G.play and context.other_card:is_face() and context.individual and not context.blueprint then
    context.other_card:set_ability(G.P_CENTERS["m_wild"], nil, true)```

???
hard mica
#

But thanks!

cunning barn
#

well, i saved it as that and then it crashed on play anyways

#

same crash log as previous

runic pecan
cunning barn
#

here's the log a second time in case there's something different but i doubt it

runic pecan
cunning barn
#

the problem seems to come into it attempting to index some field for face cards but that was code that i borrowed from another working joker

shut crater
cunning barn
#

oh ok

#

thank you, i would not have figured that out on my own

#

joker works as intended now

shut crater
#

context.other_card only exists if context.individual is true, but you're checking the other_card before you're checking context.individual, which means you're trying to access context.other_card in every context whether it's there or not

frigid blaze
#

How to play for example 8 cards instead of 5

cunning barn
#

i need to make a reminders doc to look back at

hybrid shadow
marble flint
runic pecan
# hybrid shadow what does `area==G.play` do here

It's to check if the card you're about to apply this sticker on is in G.play (i.e. in played hand).
And since only playing cards can be played (unless specifically modded), this sticker can only applied to playing cards.

hybrid shadow
#

or is that all just G.play

runic pecan
hybrid shadow
runic pecan
cunning barn
#

i'm having issues with a joker that has x0.1 mult per hand size above 8, once again
the xmult itself triggers just fine but the (currently xmult) thing increases whenever a card is drawn to hand instead of only when hand size is increased. lemme post the code, the only thing i have a problem with is the xmult display

#
SMODS.Joker {
    key = 'kot',
    loc_txt = {
        name = 'King of Town',
        text = {
            "+#1# hand size for every King scored",
            "Gains X#2# mult per hand size above #3#",
            "{C:inactive}(Currently {X:mult,C:white} X#4# {C:inactive} Mult)"

        }
    },
    config = { h_size = 1, extra = { xmult_per = 0.1, thresh = 8, xmulttotal = 1 } },
    loc_vars = function(self, info_queue, card)
        return { vars = { card.ability.h_size, card.ability.extra.xmult_per, card.ability.extra.thresh, card.ability.extra.xmulttotal } }
    end,
    rarity = 4,
    atlas = 'hsr',
    pos = { x = 6, y = 0 },
    soul_pos = { x = 7, y = 0 },
    cost = 20,
    calculate = function(self, card, context)

        if G.hand.config.card_limit > card.ability.extra.thresh then
             card.ability.extra.xmulttotal = card.ability.extra.xmulttotal + card.ability.extra.xmult_per * (G.hand.config.card_limit - card.ability.extra.thresh)
        end
           
            if context.joker_main then
              return {
              Xmult = 1 + card.ability.extra.xmult_per * (G.hand.config.card_limit - card.ability.extra.thresh)
            }
        end
end
}```
runic pecan
cunning barn
#

not quiiiiite sure how to do that

runic pecan
cunning barn
#

like, under function self info queue card??

#

this stuff is making my head hurt im sorry

manic rune
#

is it possible to grab the key of a card without the mod and class prefix?

runic pecan
cunning barn
#

yeah im still kinda lost

#

like replace where? in return vars?

cyan lagoon
#

question how do i change the sprite of a joker when a condition is met?

cunning barn
daring fern
daring fern
manic rune
#

🤔 but what if the key itself has underscores in it

cyan lagoon
manic rune
#

i could just make it so the key is cut in a certain position

#

but i wonder if theres a better solution than that

marble flint
daring fern
cyan lagoon
#

thanks

manic rune
cunning barn
#

i have a massive headache trying to figure all this out. it's midnight. im feeling really crummy. i might just come back to this later

daring fern
manic rune
#

🤔

#

actually, i can work with that

#

thanks

marble flint
cunning barn
#

i just keep getting the same crash

manic rune
#

the object's key itself is like, ygg_mat_ygg_card_scrap lol

cunning barn
hybrid shadow
#

can i have a sticker with the same initial key as a joker since the localization file calls for the full prefix anyway

cyan lagoon
marble flint
# manic rune its not an object 😭

anyways, my point is that if you want to make ygg_mat_ygg_card_scrap match card_scrap you can modify either side of the equation and the right side is likely easier

manic rune
daring fern
manic rune
#

this works, thanks :p

daring fern
cyan lagoon
#

so "2, 1" instead of 2, 1 ?

#

or "2", "1"

hybrid shadow
cyan lagoon
#

a

#

thanks

frigid blaze
#

Did Cryptid create this or smods?

G.hand.config.highlighted_limit

manic rune
#

thats built in, im pretty sure

hybrid shadow
cunning barn
#

honestly i just give up on the variable thing. it's just not working. i'll come back tomorrow

frigid blaze
frigid blaze
#

Standard can play 5 cards, how to increase this value ?

daring fern
cloud crag
#

if i mod my balatro will it ruin my steam achievments

frigid blaze
daring fern
celest timber
#

how do i get the current score the player has?

cloud crag
#

will modding my balatro allow me not to get achievments even when i remove the mods

daring fern
daring fern
celest timber
#

the chips the player already has

#

i wanted to get the amounf of chips left to win

daring fern
#

How difficult would it be to have a UI that shows up with the jokers that a joker is replicating and changes their values to match?

#

Would I just set card.ability to what is saved?

#

Also is there a way I could make it not lag?

tired kestrel
#

How can animation triggers be played?

#

(curious)

daring fern
glass scaffold
#

How can I add exponential mult to a Joker?

daring fern
glass scaffold
daring fern
glass scaffold
tired kestrel
#

not sure if that is something ni balatro had but I just randomly thought of this.

daring fern
spare bison
#

do you have a guide for holotro installation? I'm not too familiar with how to apply it

#

It looks awesome, very fleshed out

daring heron
#

Just open the balatro mod loader and get holotro iirc

runic pecan
#

Yeah, I submitted both MTB and Holotro to Balatro Mod Manager myself.

daring fern
#

How does one move a card area mid-game?

shut crater
spare bison
tired kestrel
#

I already had the copy code already implemented (thanks to ErictheToon) but right now I'M wondering if it's possible to like give the card to trigger an animation of another card.

shut crater
runic pecan
spare bison
#

a little bit, I installed steamodded a while ago for balatro multiplayer but that was before the mod manager

tired kestrel
timid star
slender zenith
runic pecan
timid star
# daring fern Maybe?:

im already doing that actually, that's why the color is changing when i keep hovering over it

spare bison
runic pecan
tired kestrel
#

I think now I just need to figure out how I can have the animation play at the same time as the main joker card does. but yeah.

cloud crag
#

where do i enable achievements in steammodded

#

where do i get to steammodded settings

cloud crag
#

do i need the mod manager for that

#

my screen doesnt look like that

daring fern
cloud crag
#

am i dumb or what

daring fern
cloud crag
#

can you find me a link to a newer one im trying to find one atm

tired kestrel
#

Or otherwise I can display one of those notifications: "Copied"

daring fern
cloud crag
#

so i shouldnt be using r2modman

tired kestrel
#

is there a way to display one of those notifications when triggered?

daring fern
cloud crag
#

k thanks

tired kestrel
#

How do I make a message pop up that the card is copied?

tired kestrel
timid star
daring fern
tired kestrel
timid star
#

why

#

why do i have to, individually set each element??

daring fern
tired kestrel
tired kestrel
#

wait

tired kestrel
#

alright. one moment

daring fern
#

You should be using SMODS.blueprint_effect

timid star
# daring fern Yes.

switched it out for a separate table that will hold other animated colors if i need to but why does it work like that

tired kestrel
timid star
#

this looks wrong

tired kestrel
#

it worked until this:

daring fern
#

How does one turn a localization name into a key?

daring fern
tired kestrel
# daring fern Code?

can2t show whole code again but. I'll show the updated:

SMODS.blueprint_effect({message = 'Copied!'}, random_joker)

tired kestrel
daring fern
#

Also I meant use SMODS.blueprint_effect for the blueprint effect, not the message?

tired kestrel
#

okay hold on

#

I was paranoid

#

But if it's fine to share then yeah

#
-- Process the random joker, if it exists
        if random_joker and random_joker ~= self then
            context.blueprint = (context.blueprint and (context.blueprint + 1)) or 1
            context.blueprint_card = context.blueprint_card or card

            if context.blueprint > #G.jokers.cards + 1 then
                return
            end

            local random_result, random_trig = random_joker:calculate_joker(context)
            if random_result or random_trig then
                if not random_result then
                    random_result = {}
                end
                
                random_result.card = context.blueprint_card or card
                random_result.colour = G.C.GREEN
                random_result.no_callback = true
                table.insert(results, random_result)
                random_joker:juice_up()
                SMODS.blueprint_effect({message = 'Copied!'}, random_joker)
            end
        end
#

I was just paranoid if anyone steals the code but then I realize.

#

it's best maybe it can help someone who wants to try to do something similar

#

sorry for the confusion.

tired kestrel
daring fern
tired kestrel
daring fern
cloud crag
#

@daring fern i got it downloaded and im playing thanks, but should i have achievments on enabled or bypass restrictions, what does the bypass one mean

daring fern
tired kestrel
#

I jsut forgot to put the "copycat" o nthe orignal card

daring fern
tired kestrel
cloud crag
daring fern
tired kestrel
#

here's the code I have so far.

daring fern
tired kestrel
tired kestrel
daring fern
wintry solar
#

If you want to change the colour you’ll need to save the result of blueprint effect, modify it, then return it

timid zinc
#

is there a way to manipulate pool flags to make all of one type e.g. no jokers except default can appear unless specified

#

yes i know i could add a yes pool flag to every joker but that seems

#

unneccessary

tired kestrel
heavy hare
#

is there a reason a joker that would fire before or after scoring would just stop working in the middle of a run?
i've messed with a mod that simply displays animated sprites of the upcoming Blinds and moves around UI and i keep encountering jokers breaking even after they've activated at an earlier point in the run.

Ice Cream not losing chips, Trading Card not doing anything, Vampire not scaling, Obelisk not reseting/scaling. not seeing any errors. i've tried to add delayed events for the Sprites appearing/disappearing and removing events and just running them in sync, but random Jokers keep breaking

#

the mod's called Condensed_UI if anyone would be inclined to look at it, i want to make more mods like it but this is holding me back

glass scaffold
#

Can some explain how to have this code summon a certain rarity from a certain mod?

(Code yanked from Yahimod)

daring fern
glass scaffold
wintry solar
glass scaffold
#

Thanks

heavy hare
#

manifest:

glass scaffold
wintry solar
#

No look at the top right of your menu screen

heavy hare
#

my mod only has a single SMODS call as well

daring fern
glass scaffold
daring fern
wintry solar
tired kestrel
#

(also I did this for the fun of it laso testing to see how it works)

tired kestrel
#

also how do you see a debug message?

#

wait.

daring fern
tired kestrel
#

ACtualy I've been wondering is it possible to trigger the calculate two times?

#

or at the same time?

daring fern
tired kestrel
#

I don't know how else to like explain in detail but I was thinking like giving a message to the copied joker when the copycat joker is triggered and then after the copied message it then does the trigger with the copied joker

#

I'm sorry if my words are mixed up

#

but hopefully but explaining this does get an idea.

#

of what I meant

wintry solar
#

you can add that to where you return the retriggers

tired kestrel
#

right now the code is like this now:

wintry solar
#

oh wait its not retriggers hold on

tired kestrel
wintry solar
#

is that not what it does?

tired kestrel
#

I don't know cause I thought the idea of a card uppon trigger it sorta triggers the other card iving the "copied!" message

#

then the main card displays the copied joker result

#

that's what I thought.

#

that I don't think I see anyone does that.

wintry solar
#

you want the repeated triggers to have a green background?

tired kestrel
#

just something experimental.

tired kestrel
#

also

tired kestrel
#

what it's supposed to do is that after the "copied" it supposed to trigger that card (on the middle)

wintry solar
#
if random_joker and random_joker ~= card then
  SMODS.calculate_effect({message = "Copied", colour = G.C.GREEN}, random_joker)
  return SMODS.blueprint_effect(card, random_joker, context)
end
wintry solar
#

the way you select a random joker is also way overworked

tired kestrel
#

hm...

wintry solar
#

and is it correct that you only want to copy effects that trigger on scored cards?

tired kestrel
#

I mean I know blueprint one

wintry solar
#

it depends on what you want it to do

tired kestrel
#

but I don't know how if it's possible the card can just copy a random card and that cchosen card to play the trigger animation.

wintry solar
#

what's the effect supposed to be?

tired kestrel
#

or how I imagined.

wintry solar
#

no, what does the text of the card say

tired kestrel
#

alternatively would be this:

tired kestrel
tired kestrel
#

So what's it supposed to do based on description?

wintry solar
#

yes

tired kestrel
#

cause the og description of that card is:

Copies the Effect of a Random Joker Per Hand

wintry solar
#

ok

#

so just one joker?

tired kestrel
#

yeah one joker but also tries to make the joker that was copied on to play the trigger animation.

#

that's also what I thought too

#

so yeah.

#

otherwise maybe have the message o nthe card that is copied.

#

then the result

#

I don't know how the order should work more better.

#

I don't know how to like get the concept properly based on the descritpion of this card I found

wintry solar
#
calculate = function(self, card, context)
  if context.press_play then
    if #G.jokers.cards > 1 then
      local copied = pseudorandom_element(G.jokers.cards, pseudoseed('random_joker'))
      while copied == card do
        copied = pseudorandom_element(G.jokers.cards, pseudoseed('random_joker_repoll'))
      end
      card.ability.extra.copied = copied
    else
      card.ability.extra.copied = nil
    end
  else
    if card.ability.extra.copied then
      local ret = SMODS.blueprint_effect(card, card.ability.extra.copied, context)
      if ret then
        SMODS.calculate_effect({message = 'Copied', colour = G.C.GREEN}, card.ability.extra.copied)
        return ret
      end
    end
  end
end

I'm 99% sure this is what you want

#

This will select a random joker to copy each hand and then it should copy it's effect, with a copied message on the copied card before the effect

cloud crag
#

which quality of life setting lets me hold on a card and drag instead of clicking every card one by one

cloud crag
#

@daring fern thanks dude youre the goat

prime beacon
#

Getting a lua error when attemting to load the game with this mod enabled

":51: unexpected symbol near '}'"

    calculate = function(self, card, context)
        if context.individual and context.cardarea == G.play and context.other_card:get_id() == 4 then
        G.GAME.dollar_buffer = (G.GAME.dollar_buffer or 0) + card.ability.extra.dollars
            return {
                mult = card.ability.extra.mult,
                chips = card.ability.extra.chips,
                Xmult_mod = card.ability.extra.Xmult,
                message = 'x' .. card.ability.extra.Xmult,
                dollars = card.ability.extra.dollars,
                func = function() -- This is for timing purposes, it runs after the dollar manipulation 
                    G.E_MANAGER:add_event(Event({
                        func = function()
                            G.GAME.dollar_buffer = 0
                            return true
                        end
                    }))
            } --51
        end
    end

The joker should +4 mult +4chips x4mult +$4 when a 4 is played.

The joker gains +4 chips, +4 mult and x4 mult when a 4 is played like this, but does not gain $4.

calculate = function(self, card, context)
        if context.individual and context.cardarea == G.play and context.other_card:get_id() == 4 then
            return {
                mult = card.ability.extra.mult,
                chips = card.ability.extra.chips,
                Xmult_mod = card.ability.extra.Xmult,
                message = 'x' .. card.ability.extra.Xmult,
                dollars = card.ability.extra.dollars
            } --51
        end
    end
}
daring fern
wintry solar
#

why use Xmult_mod instead of xmult?

prime beacon
#

Because that's what the tutorial video showed 🙂

#

Literally 0 background on this, I'm googling what I can but this is difficult to phrase in a google search

valid dove
#

different between xmult_mod and xmult is that xmult automatically returns a message for the mult value, while xmult_mod doesnt

#

since you're just returning the xmult value with message, you might as well use xmult, saves you some effort haha

prime beacon
prime beacon
#

cos if it's end, i can't figure out where it should be lol

daring fern
# prime beacon cos if it's `end`, i can't figure out where it should be lol
calculate = function(self, card, context)
    if context.individual and context.cardarea == G.play and context.other_card:get_id() == 4 then
    G.GAME.dollar_buffer = (G.GAME.dollar_buffer or 0) + card.ability.extra.dollars
        return {
            mult = card.ability.extra.mult, -- 39
            chips = card.ability.extra.chips, -- 40
            xmult = card.ability.extra.Xmult, -- 41
            dollars = card.ability.extra.dollars, -- 42
            func = function() -- This was missing an end, 43
                G.E_MANAGER:add_event(Event({ -- 44
                    func = function() -- 45
                        G.GAME.dollar_buffer = 0 -- 46
                        return true -- 47
                    end -- 48
                })) -- 49
            end --- here, 50
        } --51
    end -- 52
end -- 53
valid dove
#

the end should be before the } that's causing an error i think

prime beacon
#

Ah, thankyou, sorry to make you do my homework :p

What function was I not ending? I wasn't too sure how to account for that as easily as commas and brackets

#

Ahhh i see!

#

Thankyou i think i get it better now

#

is there like a karma/sticker thing? Like to rate someone as being helpful

prime beacon
#

darn

tired kestrel
#

eeven if I tried the 4 cards

#

unless I did something wrong

maiden phoenix
tired kestrel
#

Now it did work!

#

I just had to redo once more and now

#

let me record it

runic pecan
#

Does SMODS wiki have a guide about unlock_condition and check_for_unlock?

wintry solar
maiden phoenix
#

I'll give it a try in a bit

tired kestrel
#

Now it's actually what I'd thought for.

wintry solar
#

🧙‍♂️

tired kestrel
#

Now, I think there's another card that I want to try to recreate into balatro as new part of the experiment and the description is this:
"Copies the Effect of a Random Played Card Per Hand"

#

Of course this is different than the joker but rather it's about played cards.

tired kestrel
#

also is there a way to learn about how basic game codes work?

wintry solar
#

just read it a lot 🤣

tired kestrel
#

like what is the varible for "playing cards" and among other things.

faint yacht
#

...can two "defined" atlases use one image?

tired kestrel
#

also how do you add multiple jokers?

#

into one single mod?

daring fern
tired kestrel
#

arlgiht

#

also...

#

I tried to do sometihng with the playing card thing code and after adding it it gave me this rror when I try to add any other card

tired kestrel
pale venture
#

Is it possible to change a back's config values in the start run menu? I am trying to do something similiar to cryptid's edition/seal/enhancement/sticker decks and while i figured out the clicking on the deck part i'm struggling to understand how to get the back itself.

tired kestrel
daring fern
#

Is there a way to draw a sprite on something that makes things under it invisible?

hard mica
prime beacon
#

Can't figure out why this won't repeat. I tried having repetitions = card.ability.extra.repetitions in the same function that adds mult/chips/etc., it does everything else but just not that. I've looked at Hack, Sock & Buskin and Hanging Chad, I don't see anything clear that they do that I don't except for have an unlock requirement

calculate = function(self, card, context)
                if context.repetition and context.cardarea == G.play and context.other_card:get_id() == 4 then
            return {
                repetitions = card.ability.extra.repetitions,
                }
        end
        if context.individual and context.cardarea == G.play and context.other_card:get_id() == 4 then
        G.GAME.dollar_buffer = (G.GAME.dollar_buffer or 0) + card.ability.extra.dollars
            return {
                dollars = card.ability.extra.dollars,
                mult = card.ability.extra.mult,
                chips = card.ability.extra.chips,
                Xmult_mod = card.ability.extra.Xmult,
                message = 'x' .. card.ability.extra.Xmult,
                func = function() -- This is for timing purposes, it runs after the dollar manipulation
                    G.E_MANAGER:add_event(Event({
                        func = function()
                            G.GAME.dollar_buffer = 0
                            return 
hard mica
bold sleet
#

help i still don't know how to work shit out

red flower
red flower
#

the n= should go inside the {}

#

but also i dont remember if overlay_menu requires a root node

bold sleet
red flower
#

it's ok UI is hard

bold sleet
#

How should I uh... format it so it doesn't implode?

red flower
#

{ n = G.UIT.T

prime beacon
bold sleet
#

test for the 4983214th time

#

oh, I made it work!

#

Now I just need a way to not have the moving up animation

red flower
manic rune
#

can i do local card = SMODS.add_card({key = card_key, area = G["ygg_crafting_show"]})?

#

so that card refers to the card created 🤔

prime beacon
#

I have not restarted the run, didn't think that'd matter. Just tried this and it has resolved this issue :)

red flower
#

yes

manic rune
#

nice

red flower
prime beacon
#

Ah, I had assumed it was loaded when the game started

hard mica
#

Btw is there a way to just restart the Lua code in game so I don't have to restart the game everytime I change my code?

red flower
#

no

bold sleet
prime beacon
#

you can hold M