#💻・modding-dev

1 messages · Page 220 of 1

long urchin
red flower
#
local has_glass = false
for _, s_card in ipairs(context.scoring_hand) do
    if  SMODS.has_enhancement(s_card, "m_glass") then
        has_glass = true
        break
    end
end
tall apex
long urchin
#

THATS WHAT I SAID

sacred lily
red flower
#

code?

long urchin
#

ITS SUPPOSED TO BE -5 WHY DID IT DO -75

distant grove
#

waht is index fields 'colour'

#

wait

long urchin
#
    key = 'Banker',
    path = 'Banker.png',
    px = 71,
    py = 95
}

SMODS.Joker{
    key = 'banker',
    loc_txt = {
        name = 'Banker Joker',
        text = {
            'Gives a {C:attention}loan{} of {C:money}$100{}.',
            'Lose {C:money}$5{} at end of round',
            'until {C:attention}loan{} is paid back.',
            '{C:inactive}(currently {}{C:money}$#1#{}{C:inactive} owed){}'
        }
    },
    atlas = 'Banker',
    pos = {x = 0, y = 0},
    config = { extra = {
            money = 100
        }
    },
    loc_vars = function(self,info_queue,card)
        return {vars = {card.ability.extra.money}}
    end,
    add_to_deck = function(self,card,from_debuff)
        card.ability.extra_value = -100 - card.sell_cost
        card:set_cost()
        ease_dollars(100)
    end,
    calculate = function(self,card,context)
        if context.end_of_round then
            card.ability.extra.money = card.ability.extra.money - 5
            card.ability.extra_value = card.sell_cost + 5
            card:set_cost()
            ease_dollars(-5)
        end
    end
}```
weak gate
#

the sound is because when you lose money in balatro, you lose money in real life

long urchin
sonic cedar
#

it worked!!!!!! thank you thank you thank you
please tell me this works with the name

red flower
red flower
#

name is more complicated, I can show you what I do in my mod for one of my cards that does that

sonic cedar
#

would appreciate

distant grove
#

attempt to index field 'colours' (a nil value)

vale lake
#

wait are you talking about dynamically changing the names of cards

distant grove
#

anybody know what this crash means?

vale lake
#

if so I made an API for that

red flower
#

well that's easier then

long urchin
#

can i ask why

#

that works and why the end of round gave me -75

sonic cedar
vale lake
#

hold on it has a bunch of other stuff in it, let me make a version with only the nickname stuff

sonic cedar
#

WINNING

distant grove
#

how it the colour nil??

red flower
# long urchin can i ask why

main_eval is true when only your joker is being calculated, because end_of_round is called for other cards too

game_over was not the problem but it's nice to check if the player lost so you don't apply the effect

distant grove
#

nvm

vale lake
long urchin
#

wait whys it going down by 6 and not 5 👁️👁️

simple mural
#

I have fun with my new joker...

vale lake
#

I had to remove some stuff so tell me if it breaks

#

I also don't think it works for modded cards

long urchin
vale lake
#

it used to, but an SMOD update broke it and I had to fix it

sonic cedar
vale lake
#

I can try and fix it rq

sonic cedar
#

how am i supposed to use it then 😭

sacred lily
# red flower yes

yeah so the purpouse it was needed for was "+4 mult for every Glass card played"

sonic cedar
sacred lily
#

oddly if i play 2 glass cards i still just get +4, not +8

red flower
# vale lake

hmmm I don't think a patch is necessary, using generate_ui is much easier I think

red flower
sacred lily
#

ok

vale lake
#

base game, ones for other mods, ect

red flower
#

oh

vale lake
#

where you can't use generate_ui for

red flower
#

then that sounds way out of scope for what they were asking i think?

#

unless I misunderstood

sonic cedar
#

i just wanted a dynamic name to go with the description😭

vale lake
#

if it's just for a single joker generate_ui would be your best bet

#

I don't really know how it works though

simple mural
sonic cedar
#

in that case

sonic cedar
#

or did you not even use generate_ui

red flower
#
generate_ui = function(self, info_queue, card, desc_nodes, specific_vars, full_UI_table)
        full_UI_table.name = localize { type = 'name', set = "Joker", key = card.ability and card.ability.extra.new_key or "j_yourmodsprefix_key", nodes = {} }

SMODS.Center.generate_ui(self, info_queue, card, desc_nodes, specific_vars, full_UI_table)

    end

For this you do need 2 entries in the descriptions like you had before and you set card.ability.extra.new_name to the key of what name you want

sturdy compass
manic rune
#

joyousspring is once again used for ui

distant grove
#

is there a way to quickly search up a letter in my main.lua?

#

because i got this funny crash rn

#

attempt to index field 'M' (a nil value)

#

and now i gotta go on a wild goose chase to find this strange MMMM

red flower
sturdy compass
simple mural
#

This blind use probabilities...

distant grove
#

thank YOUUU

sonic cedar
sturdy compass
long urchin
#

ok so how do i change a cards like

#

rarity

#

really dumb question lol

sonic cedar
#

rarity = #

manic rune
#

SMODS.Rarity

distant grove
#

i feel like im being trolled.

manic rune
#

oh wait

#

asdiomasd

#

u didnt mean adding a new rarity

#

😭

#

god im gonna kkill myself

red flower
distant grove
#

WHERE IS THE attempt to index field 'M' (a nil value)

#

WHERE IS THIS MMMM

manic rune
#

what file did it tell you to check

sturdy compass
#

😭

manic rune
#

and it should tell you what line it is in the crash log too

#

😭

long urchin
manic rune
#

yeah

long urchin
#

alrite

distant grove
#

is a hook needed

#

or no

manic rune
#

hook for wat

distant grove
#

discarding cards cause im following the castle joker to make the rats

distant grove
#

and are hooks for like specific ranks and suits?

manic rune
#

WHAT

#

WHY DID MY CODE WORK WHEN I ADDED PRINT

#

HUH?????

long urchin
#

ok how do i make a joker eat itself

sonic cedar
distant grove
manic rune
#

(context: it was setting hand to 1 instead of increasing)

distant grove
#

crazy

manic rune
#

in your main.lua

red flower
distant grove
#

colour = G.M.MULT,

#

thats 128.

manic rune
#

yup, exactly

#

G.M

sonic cedar
distant grove
#

ohh

#

its G.C

#

not G.M for mult?

#

i thought it would change

sonic cedar
#

Molor

red flower
#

it stands for game.color

distant grove
#

oh

#

im dumb

manic rune
#

silly don

distant grove
#

sorry folks

sonic cedar
#

cryptid

red flower
manic rune
#

its global, pretty sure

long urchin
#

whats the code to make a joker remove itself from your hand? like when food jokers hit 0

manic rune
#

else G.GAME would mean game.game 😭

shell timber
manic rune
#

it doesnt

long urchin
#

this card has to delete itself when you dont have a loan anymore :V

sonic cedar
manic rune
#

im still trying to figure out why

shell timber
#

that's weird

sturdy compass
distant grove
#

okay so joker works

red flower
manic rune
#

game.game.game

#

:3

shell timber
#

i mean it could be the print's fault. if the code is really jank then an extra allocation could cause it to break

red flower
long urchin
#

would it be in there

shell timber
#

(does print cause a memory allocation? probably)

sonic cedar
#

oh it's its own thing ok (used it literally never)

distant grove
#

but when it does it says ERROR

sturdy compass
stiff locust
#

is there a more optimised way to do a playing card tally like steel joker without using the update function

red flower
#

yes, just count them when you need them

#

i.e. when you calculate or in loc_vars

manic rune
#

you can put the code which counts the steel cards (FOR EXAMPLE) inside calculate without any context

red flower
#

i see no reason to do that

manic rune
#

i like update but less laggy :3

stiff locust
#

would that not be the same as the update function

manic rune
#

nop

distant grove
#

i think im overriding the chips thing

orchid scaffold
#

wth, isnt G.jokers.cards, a variable?

stiff locust
#

oh so how often would that run

stiff locust
red flower
#

not every frame at least

manic rune
#

uhhhhh, its hard to explain but its basically when any context happens

stiff locust
#

oh that's nice

#

yeah i'm gonna do that

orchid scaffold
red flower
stiff locust
#

why not

orchid scaffold
manic rune
orchid scaffold
#

idk

red flower
stiff locust
#

because i want to count how many steel cards there are and accurately show the value

orchid scaffold
#

lmao

long urchin
distant grove
#

chat i think im bullying the rats too much

long urchin
#

whats wrong here

#

can you not do = 0?

manic rune
#

i suggest adding if G and G.jokers ❤️

red flower
orchid scaffold
#

thanks

distant grove
manic rune
#

its ok, the rats are good workers

stiff locust
sturdy compass
stiff locust
#

if i did it when i needed it i'd only do it during context.before

distant grove
manic rune
#

add ` at the start and end of your text

distant grove
#

k

stiff locust
distant grove
#

nope

manic rune
#

reverse engineering messages is crazy

#

thats

#

the wrong one

long urchin
#

if its more than one line it needs 3

manic rune
#

you used '

#

its `

#

next to the number 1

#

on your keyboard

distant grove
#

oh

#

thc

manic rune
#

but also, for that specific scenario, you need triple `

stiff locust
#

do three of them at the top then lua for text blocks of lua code

distant grove
#

HOT DAMN IT LOOKS WORSE

plush cove
manic rune
#

use 3 `

#

😭

stiff locust
#

and then end the message with three `

distant grove
#
  if
    context.discard and
    not context.other_card.debuff
    then
      card.ability.extra.chips = card.ability.extra.chips + card.ability.extra.chips_mod
      return {
                message = localize('k_Guts_ex'),
                colour = G.C.CHIPS,
                card = card 
      

      }
    end
    if context.joker_main and card.ability.extra.chips > 0 then
            return {
                message = localize { type = 'variable', key = 'a_chips', vars = { card.ability.extra.chips } },
                chip_mod = card.ability.extra.chips,
                colour = G.C.CHIPS
            }
        end
    end,
  calculate = function(self, card, context)
    if
      context.discard and
      not context.other_card.debuff
      then
        card.ability.extra.mult = card.ability.extra.mult + card.ability.extra.mult_mod
        return {
          message =localize ('k_harvested_ex'),
          colour = G.C.MULT,
          card = card
        }
      end
    if context.joker_main and card.ability.extra.mult > 0 then
      return {
                message = localize { type = 'variable', key = 'a_mult', vars = { card.ability.extra.mult } },
                mult_mod = card.ability.extra.mult,
                colour = G.C.MULT
            }
        end
    end```
#

much better

#

thank GOD

long urchin
stiff locust
#

add lua after the line with the three ` at the top

stiff locust
#

and it will highlight stuff

manic rune
#

you can do this

print("so that your code is colored")
long urchin
#

oh shit what

#

thats awesome

distant grove
#

huh nice

sturdy compass
red flower
#

they should add that to mobile

manic rune
#

absolutely,y my grammar sucs

stiff locust
#
print("holy shit it works for python too")

print("wait is this the same highlight scheme thats lame")
long urchin
#

why does this crash with this code

    calculate = function(self,card,context)
        if context.end_of_round and context.game_over == false and context.main_eval then
            card.ability.extra.money = card.ability.extra.money - 5
            card.ability.extra_value = card.ability.extra_value + 5
            card:set_cost()
            ease_dollars(-5)
            if money = 0 then
                G.jokers:remove_card(card)
                card:remove()
                card = nil
            end
        end
    end
plush cove
red flower
#

oh python works for mobile?

distant grove
#

my night is going better sort of

manic rune
#

lua found dead in the alley

distant grove
#

the rats finally work

#

buttt

#

the message is bugged and the chips aint adding

long urchin
#

oh

stiff locust
#

== for comparing

long urchin
#

i may be stupid

manic rune
#

i may be stupid :3

sturdy compass
#

lso you should put the remove code in an event

stiff locust
#

also are you sure you dont wanna check

manic rune
#

be positive yall

stiff locust
#

if the money is equal to or below 0?

long urchin
#

is it not already in an event?

#

it triggers at the end of the round

red flower
sturdy compass
#

yes

#

I was gonna get it but I'm preoccupied lmao

red flower
#

i always have smods docs in hand it's like the bible

distant grove
#

does anybody know why my message is an error?

hardy viper
#

elaborate?

red flower
#

i do but im not going to tell you

#

(please show code)

distant grove
#

ok

#
  if
    context.discard and
    not context.other_card.debuff
    then
      card.ability.extra.chips = card.ability.extra.chips + card.ability.extra.chips_mod
      return {
                message = localize('Guts'),
                colour = G.C.CHIPS,
                card = card 
      

      }
    end
    if context.joker_main and card.ability.extra.chips > 0 then
            return {
                message = localize { type = 'variable', key = 'a_chips', vars = { card.ability.extra.chips } },
                chip_mod = card.ability.extra.chips,
                colour = G.C.CHIPS
            }
        end
    end,
  calculate = function(self, card, context)
    if
      context.discard and
      not context.other_card.debuff
      then
        card.ability.extra.mult = card.ability.extra.mult + card.ability.extra.mult_mod
        return {
          message =localize ('harvested'),
          colour = G.C.MULT,
          card = card
        }
      end
    if context.joker_main and card.ability.extra.mult > 0 then
      return {
                message = localize { type = 'variable', key = 'a_mult', vars = { card.ability.extra.mult } },
                mult_mod = card.ability.extra.mult,
                colour = G.C.MULT
            }
        end
    end
    ```
#

so like

#

the chips aint adding

#

and the message aint messagin

#

the rats are revolting against me

manic rune
#

i swear that localize looks weird

#

shouldnt it be ()

#

not {}

red flower
#

that's correct

#

you can pass a table like that

manic rune
#

oh

#

i never used localize before :3

#

i thought you would need to do localize({})

distant grove
#

nvm

red flower
distant grove
#

uh

#

oh

#

wait i need to make another file for localization??

manic rune
#

yes

red flower
#

yeah

red flower
#

you can try just "harveste" for now without the localize to see if it works

manic rune
#

or if you want to lock your mod to only one language, you can just do message = "Guts"

distant grove
#

k

manic rune
#

totally not a bad practice

sturdy compass
red flower
red flower
long urchin
#

oh

manic rune
#

since uhhh

distant grove
#

nope still error

manic rune
#

i dunno wat ur doing, but if it goes down even more than 0

#

then it wilt ron at all

#

adsl;a

#

WHAT THE HELL IS GOING ON WITH MYG RAMMAR TODAY

distant grove
#

also that the chips aint chipping

manic rune
#

shouldnt it be chips_mod, or chip_mod works too

red flower
#

oh wait are those 2 calculate functions in one joker??

manic rune
#

oh wait

distant grove
#

im not supposed to have that am i...

manic rune
#

i just noticed that 😭

long urchin
#

it doesnt work

manic rune
#

you only handle stuff in 1 calculate

sonic cedar
distant grove
#

welp

#

time to copy and paste it alllll in there

red flower
tall apex
#

do y'all know if theres a way to check how many jokers are in a booster pack and get that number as a variable?

distant grove
#

wait

#

how would all that fit in there

sonic cedar
red flower
manic rune
#

-# i actually dont know what else to tell you, you use if statements to tell the joker to do various things

red flower
#

i tell my joker to do things by yelling at it

manic rune
#

no wonder why your mod works so well

#

im very nice to my jokers :3

long urchin
latent portal
#

heya

#

im back

#

and i have a question

long urchin
#

mods i spill my juice help help hep help

red flower
long urchin
#

it wasnt tho

#

it didnt delete

red flower
#

oh

distant grove
#
  if
    context.discard and
    not context.other_card.debuff
    then
      card.ability.extra.chips = card.ability.extra.chips + card.ability.extra.chips_mod
      return {
                message = localize == ("Guts"),
                colour = G.C.CHIPS,
                card = card 
      

      }
    end
    if context.joker_main and card.ability.extra.chips > 0 then
            return {
                message = localize { type = 'variable', key = 'a_chips', vars = { card.ability.extra.chips } },
                chip_mod = card.ability.extra.chips,
                colour = G.C.CHIPS
    if
      context.discard and
      not context.other_card.debuff
      then
        card.ability.extra.mult = card.ability.extra.mult + card.ability.extra.mult_mod
        return {
          message = localize ('harvested'),
          colour = G.C.MULT,
          card = card
        }
      end
    if context.joker_main and card.ability.extra.mult > 0 then
      return {
                message = localize { type = 'variable', key = 'a_mult', vars = { card.ability.extra.mult } },
                mult_mod = card.ability.extra.mult,
                colour = G.C.MULT
      }
   
            
    
    


  }```
manic rune
#

juice_up()

distant grove
#

this is not how your supposed to do it yea?

red flower
long urchin
#

oh

#

buh

manic rune
#

this is such a diabolical if statement ngl

#

😭

distant grove
#

what

#

😭

#

im bouta get sent to the outskirts

#

for terrible modding

sonic cedar
manic rune
#

it works, but usually you have if statements all on one line like this

tame breach
#

Just learning to mod balatro, what's a good way to detect Wheel Of Fortune failing?

distant grove
#

thing is

#

this looks weird as hell

#

rnn

manic rune
#

wha

#

yeah, you are missing a bunch of end

distant grove
#

im like putting it after all the chips stuff

#

YEP

#

but then

#

the end is also red

latent portal
# latent portal and i have a question

let's say i want something to happen with a 1 in 4 chance, and i also want it to be consistent with seeds (aka set up a pseudorandom function). how would i do that?

stiff locust
#

then delete 1 end

#

and you have the right amount

sonic cedar
tall apex
red flower
stiff locust
distant grove
#

i put the ends after the purple { yea?

sonic cedar
#

you’re killing me smalls

manic rune
#

are you alright toma

manic rune
manic rune
#

of the returns

red flower
manic rune
#

or just basically any code which does the rng

tall apex
manic rune
#

gros michel works too

stiff locust
#

yeah but wheel of fortune is better

manic rune
#

-# i feel like thats a bit biased

latent portal
#

i found the gros michel sample code but it doesnt show how to build the pseudorandom function

stiff locust
#

you don't

manic rune
#

build?

stiff locust
#

build it

sonic cedar
stiff locust
#

you just do it.

manic rune
#

you just put a seed in there

#

and it works

#

very simple

#

pseudorandom("please kill me") works

long urchin
#

the abrupt end

latent portal
#

oh thats a SEED=????

#

cool

manic rune
#

yeah

latent portal
#

thank u

distant grove
#

so after the blue }?

#

because when i do its still red

manic rune
#

jesus

#

uhhhhhhh

red flower
#

honestly i recommend reading a quick lua course lol

plush cove
manic rune
#

make sure all of your if statements look like this

if (something) then

end

distant grove
#

mhm

manic rune
#

IF its a return, it should always look like this

return {

}
< -- there should be an end here too

latent portal
#

okay i feel bad for asking for so much help but

#

i want to select a random joker

long urchin
#

its okay ive been doing it all day

stiff locust
manic rune
#

and uhhh

#

your code structure is really wrong, im gonna be honest 😭

distant grove
manic rune
#

start rewriting each of them one by one

distant grove
#

stupidest thing

#

i;ve done

manic rune
#

WHATS ALSOIF 😭

distant grove
#

and the red is gon

long urchin
#

do

#

do you mean elseif

distant grove
#

idk why

red flower
manic rune
#

that wont work at all

#

:(

distant grove
#

😦

latent portal
manic rune
#

gghh

#

wait

red flower
manic rune
latent portal
#

oh really

red flower
#

G.jokers is the owned joker area

latent portal
#

im making a card that targets a random other joker

#

but i dont want it to target itself

#

how do i prevent that

distant grove
#

he sounds like dantdm

#

it might just be me

sonic cedar
manic rune
#

then remove the card from the table

latent portal
#

how

manic rune
#

local table <-- dont just use table = G.jokers.cards btw

for i,v in ipairs(table) do
if v == that joker then
table[i] = nil
end
end

long urchin
#

so what do i do now

red flower
#

does that work with pseudorandom tho

red flower
#

or am i wrong

manic rune
#

oh, are you talking about my code

#

uhhh

orchid scaffold
#

is it possible to make a joker that gives money in the cash out screen and not at the end of round

sonic cedar
# red flower yes

only thing is they don’t elaborate on add_to_deck in the wiki (at least in the same way they do with calculations and loc_vars

so now i’m trying to figure out what exactly i’m putting in there

manic rune
#

if i want it to ignore a joker, i have a table with that joker removed and use pseudorandom_element on the new table instead

red flower
distant grove
#

ok i deleted the mult part

#

now to add it alll back

#

with the proper stuff

#

and not be a dummy

red flower
sonic cedar
long urchin
#

iunno why

sonic cedar
red flower
latent portal
manic rune
#

my jokers have functions which work just like that

#

sooo i dont think its an issue

latent portal
#

sorry im kind of new to this balatro shit

manic rune
#

-# emphasis on the "think"

manic rune
latent portal
#

ooooohhh that makes sense

red flower
#

you can just check that v ~= card there

manic rune
#

oh yeah, you can put that in there too

manic rune
distant grove
#

YES

#

ITS WORKING

#

but not moving

red flower
#

let's go

distant grove
#

or doing the message

red flower
#

let's not go

distant grove
#

mhm

manic rune
#

lets go backwards

#

send us the code

distant grove
#
  if
    context.discard and
    not context.other_card.debuff
    then
      card.ability.extra.chips = card.ability.extra.chips + card.ability.extra.chips_mod
      return {
                message = localize == ('Guts'),
                colour = G.C.CHIPS,
                card = card 
      

      }
    end
 if context.joker_main and card.ability.extra.chips > 0 then
            return {
                message = localize { type = 'variable', key = 'a_chips', vars = { card.ability.extra.chips } },
                chip_mod = card.ability.extra.chips,
                colour = G.C.CHIPS}
      end
      if context.discard and
      not context.other_card.debuff
      then 
        card.ability.extra.mult = card.ability.extra.mult + card.ability.extra.mult_mod
        return {
          message = localize == ('Harvested'),
          colour=G.C.Mult,
          card=card
        }
      end
      if context.joker_main and card.ability.extra.mult > 0 then
        return {
          message = localize { type = 'variable', key = 'a_mult', vars = { card.ability.extra.mult } },
          chip_mod = card.ability.extra.mult,
          colour = G.C.MULT}
        end
      end```
distant grove
#

its WAY cleaner now

#

no longer a cluster fuck

#

all the guys finally got ends

manic rune
#

god

#

those indentations are killing me

#

😭

distant grove
#

im sorry😭

#

the rats are revolting

manic rune
#

please space out your lines accordingly 💔

red flower
manic rune
#

and this too

#

THIS LOOKS SO WRONG

#

😭

distant grove
#

it does

manic rune
#

if context.discard and not context.other_card.debuff then

#

please use that instead

distant grove
#

mb

long urchin
#

why are they separate lines lol

sonic cedar
opal spade
red flower
manic rune
distant grove
#

now to make them actually move

sonic cedar
#

here we go

distant grove
#

and uh do the messages

#

i want them to

opal spade
manic rune
red flower
distant grove
#

anyways uhh why they no movey or do the funny messages HMMMMM

long urchin
# long urchin so what do i do now

i copied the code from banana stand from neato jokers but it still produces the same error code

    calculate = function(self,card,context)
        if context.end_of_round and context.game_over == false and context.main_eval then
            card.ability.extra.money = card.ability.extra.money - 5
            card.ability.extra_value = card.ability.extra_value + 5
            card:set_cost()
            ease_dollars(-5)
            if money <= 0 then
                G.E_MANAGER:add_event(Event{
                    -- mostly a copy-paste from gros michel
                    func = function()
                        play_sound('tarot1')
                        card.T.r = -0.2
                        card:juice_up(0.3, 0.4)
                        card.states.drag.is = true
                        card.children.center.pinch.x = true
                        G.E_MANAGER:add_event(Event{trigger = 'after', delay = 0.3, blockable = false,
                            func = function()
                                G.jokers:remove_card(card)
                                card:remove()
                                card = nil
                                return true
                            end
                        })
                        return true
                    end
                })
            end
        end
    end```
long urchin
#

why do other peoples destroy effects work and mine dont :(

sonic cedar
#

I DID 😭

red flower
sonic cedar
#

OK NOW moment of truth

distant grove
#

so like how should a localization file look like?

manic rune
#

look at balatro's en_us.lua

red flower
#

read the docs

manic rune
#

N', how do i turn on the uhhh

#

check how many events r running + fps thingy

#

on the top left corner of the screen

red flower
#

debugplus setting

long urchin
manic rune
#

is it concerning for my jokers to have 2 functions in update (its just for changing vars)

sonic cedar
#

how do i spawn a joker into the shop though

#

is that a console thing

distant grove
#

honestly

manic rune
#

tags :3

distant grove
#

im somewhat proud of the rats

long urchin
#

same issue

red flower
#

sad

distant grove
#

beside the fact they're not moving or doing the messages...

#

maybe i gotta whip these guys awake HMMM

#

(jk)

manic rune
#

peak, show me your code again

#

-# please tell me you fixed the cursed indentation

#

i actually cant read your code when it looks like that

#

no offense 😭

red flower
#

i cant see the indentation on mobile so im immune

distant grove
#

uh

manic rune
#

ghhhh

long urchin
#

i could try to fix the indentation myself lol

distant grove
#
  if context.discard and
    not context.other_card.debuff
    then
      card.ability.extra.chips = card.ability.extra.chips + card.ability.extra.chips_mod
      return {
                message = localize == ('Guts'),
                colour = G.C.CHIPS,
                card = card 
      

      }
    end if context.joker_main and card.ability.extra.chips > 0 then
            return {
                message = localize { type = 'variable', key = 'a_chips', vars = { card.ability.extra.chips } },
                chip_mod = card.ability.extra.chips,
                colour = G.C.CHIPS}
      end if context.discard and
      not context.other_card.debuff
      then 
        card.ability.extra.mult = card.ability.extra.mult + card.ability.extra.mult_mod
        return {
          message = localize == ('Harvested'),
          colour=G.C.Mult,
          card=card
        }
      end if context.joker_main and card.ability.extra.mult > 0 then
        return {
          message = localize { type = 'variable', key = 'a_mult', vars = { card.ability.extra.mult } },
          chip_mod = card.ability.extra.mult,
          colour = G.C.MULT}
        end
      end```
manic rune
#

OASDM

long urchin
#

that looks normal?

manic rune
#

im sorry, im laughing rn

long urchin
#

except the end and if being on the same line

manic rune
distant grove
#

whoops

#

wrong one

manic rune
#

how is this normal 😭

distant grove
#

waitt

#

hm it seems totally right bepis

long urchin
#

oh i didnt see that

sonic cedar
distant grove
#

i got no idea what your talking about

#

(ik)

manic rune
#

💔

manic rune
long urchin
#

did you forget to copy the full thing or is this missing a final end statement

distant grove
#

i suck

manic rune
#

yeah but seriously, the fact that N' can still read code on phone is really impressive

manic rune
distant grove
#

erm

manic rune
#

shouldnt it automatically do that for you

#

😭

distant grove
#

shhh

long urchin
sonic cedar
distant grove
#

there is

long urchin
#

where

distant grove
#

line 133

#

oh yea

#

you cant uh see that

manic rune
long urchin
#

oh ok

#

thats what i was asking

red flower
#

i can read but i dont know how to type

long urchin
#

if you forgot to copy it

distant grove
#

nope didnt

#

anyways the only issue is that it aint moving nor doing the messages

manic rune
#

peak, real advise: you should learn how to properly indent your code first before anything else 😭

distant grove
#

the messages is probably due to uhh the lack of localization file

distant grove
#

this is truly saddening

manic rune
#

how does that happen

long urchin
#

its 9:34pm i think im gonna hang up the towel and say i did well enough

manic rune
#

💔

red flower
#

i would get an autoformatter

rapid stag
#

still looking for any insight into this, if anyone's interested.

really the only thing noticeably different that I can think of between when it used to say "Find this Joker from the Soul card" and now, are the Steamodded updates. I am on the current release version.

distant grove
long urchin
#

i didnt figure out how to destroy the card but i fixed the price problem they were having

manic rune
#

get an autoformatter, like N' suggested

distant grove
#

ok

#

but will that fix the no messages and animation?

manic rune
#

no, but it will make your code much easier to read and debug

distant grove
#

yay

manic rune
#

-# i actually cant help you exactly because of that, sorry...

distant grove
#

uh which do i get

distant grove
sonic cedar
#

AHAHAHAHAHAHAHA IT WOR--where's my description?

distant grove
#

somebody ate it

red flower
tall apex
manic rune
#

@red flower after 30 painful minutes of brutal brainf###, i added new vars that tell jokers to give hands/discards when they are added/removed, as well as giving more hands/discards when their eidolon is increased :D

sonic cedar
manic rune
#

the code auto handles all of that too, so i just need to add those and it works

#

yipee

red flower
distant grove
#

how do i use the autoformatter

#

to start formatting

manic rune
#

i dont have one myself, N' is in charge for that one :3

red flower
#

what editor are you using

manic rune
distant grove
red flower
#

yeah that's not for lua

distant grove
#

oh

manic rune
#

jscs?

#

isnt that for javascript

red flower
#

search lua

sonic cedar
#

i wonder if the js formatter is for lua /lh

distant grove
manic rune
distant grove
#

found it yay

manic rune
#

is any of these good

#

:3

distant grove
#

bepis what time is it

#

rn

manic rune
#

10:40 am

#

for me

distant grove
#

dang

red flower
#

00:40

distant grove
#

you live on the other side of the world

red flower
#

should head to bed

distant grove
#

sorry for making you help me so early

#

or late

manic rune
#

N', is this gud

red flower
#

i use the one by sumneko or something like that

manic rune
#

hm

red flower
#

they made the lsp i think

manic rune
#

yeah me too, but im curious whether theres better ones

sonic cedar
distant grove
#

anyways time to start this auto formatter

#

so uh how to use

manic rune
sonic cedar
red flower
#

im not sure why it's not

manic rune
distant grove
#

ah

#

im reading it rn

sonic cedar
#

not metadata im stupid

#

localization

red flower
#

it shouldn't be

#

did it work before?

sonic cedar
manic rune
#

its cat

distant grove
#

cat

#

so do i make a new file for the auto formatter?

sonic cedar
red flower
red flower
distant grove
#

imma take a break

sonic cedar
#

but it's because they have two different ids

red flower
#

yeah because one of them doesn't matter, the name is the important difference

manic rune
#

...i see why its 1 hand now

red flower
#

:3

manic rune
#

:3

sonic cedar
#

:3

#

yes

manic rune
distant grove
#

:3

red flower
#

yes

distant grove
#

Okay

#

Anyways

manic rune
#

im spreading the :3 disease :3

distant grove
#

I’ll ask for help with the message and the moving layer

#

Maybe it’s the spacing?

sonic cedar
distant grove
#

Or I’m overwhelming the code

manic rune
#

spacing doesnt affect your code

#

but

sonic cedar
#

...most

distant grove
#

Most?

manic rune
#

its probably some obvious incorrect stuff in there IF i can read it 😭

distant grove
#

Also I need this break because my head is hurting

manic rune
#

yeah its all good, you should take a rest

distant grove
#

Thanks for helping

sonic cedar
#

ok moment-er of truther-er

distant grove
#

I will work on the formatter later

#

So you guys can finally read it🔥

latent portal
#

im trying to get the selected joker to do the animation where it turns into a different card

#

it like flips over

#

does anyone know how to do that

manic rune
#

:flip()

#

do stuff when its flipped

#

:flip()

red flower
#

you need events for that

manic rune
#

yeah

latent portal
#

ty

#

i got it from here

red flower
#

i had an example but the flip was ugly so i deleted that part

manic rune
#

i had flips like this

weak gate
#
[manifest]
version = "1.0.0"
dump_lua = true
priority = 10

[[patches]]
[patches.pattern]
target = '=[SMODS _ "src/game_object.lua"]'
pattern = 'self.full_path = (self.mod and self.mod.path or SMODS.path) ..'
position = "at"
payload = "self.full_path = (self.path_prefix or self.mod and self.mod.path or SMODS.path) .."
match_indent = true```
ended up making a smods patch to let me load spritesheets from other mods, hmhm
Adds support for path_prefix
manic rune
#

to this day i still dont know where the card came from

sonic cedar
#

ALRIGHTTTTTTTTTTTTTTTT

weak gate
manic rune
#

it really came from the abyss and joined my deck

sonic cedar
#

the tag does in fact... give it away... 😭

latent portal
#

ok so

#

LAST QUESTION I PROMISE

#

how do i replace a joker with another joker

distant grove
#

Like

#

If it dies

latent portal
#

No like

distant grove
#

It gets replaced?

latent portal
#

Instantly

#

On the fly

sonic cedar
#

guess i’ll do some theorycrafting

manic rune
#

the duality of men

sonic cedar
#

cause i can’t really trick people if you can see the mod tag on the joker 😭

red flower
manic rune
#

is "Artificial Intelligence" really necessary

#

😭

wintry swallow
#

this isnt really a problem i can show off because it's a problem of something Not Happening- i've replaced the Tarots.png in my retexture, but the planet and tarot cards, uh. aren't reskinning themselves. and i have no damn clue why

#

anyone got any ideas?

sonic cedar
red flower
latent portal
#

oh that's

manic rune
#

oh, that works?

latent portal
#

actually very cool

#

thank you

manic rune
#

also N', you should really take a rest

sonic cedar
#

bro sold his soul for this knowledge

manic rune
#

i personally stay up late until 4 a lot, but its probably really unhealthy for you and others overall

distant grove
#

Yea

#

I’m too young to be staying up😭

red flower
manic rune
#

im 16

#

:3

distant grove
#

I’m 15.

#

Old!

#

OLDDD

#

olddd!

red flower
#

im 70

distant grove
#

ZEHHAHAHAHAH

sonic cedar
#

i’m 4

manic rune
#

IT FINALLY ADDS THE CORRECT NUMBER OF HANDS

#

RAHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH

distant grove
#

I’m fresh out of the womb

sonic cedar
distant grove
#

Yay

#

Fire

manic rune
#

AT LEAST ITS A PERM FUNCTION, NEVER TOUCHING THIS SHI AGAIN 🗣️

distant grove
#

My problem with the rats kinda remind me of SOMEHTING…

#

Hmm

#

Crazy?

#

I was crazy once.

green plank
#

ok so uh i've been having this error pop up everytime i want to play, and for context on how this happened:
i was planning to make jen's almanac high score ambients into a mod and obviously failed, and decided to call it off, but even after deleting the mod folder off of my mods folder, it's still asking for a jen's almanac function

sonic cedar
#

did you turn off JenLib

green plank
#

i'm planning to use jenlib for the mod i'm trying to make, for a community i'm in

#

since i'm gonna use tetration and hexation

#

well, the people who are behind these ideas decided to make some tetration jokers

manic rune
#

...that looks op

#

but what can i say, its a jen mod 😭

green plank
#

yeah, it's inspired by jen's almanac

manic rune
#

HAHAHAHAHAA

#

I DONT HAVE TO GO STUDY THIS AFTERNOON

#

:3

#

more coding!

green plank
#

also there's this and i don't know what they mean by this

#

the downscaling of food jokers

manic rune
#

i decided to make an entirely new .lua file

#

for my functions

distant grove
#

Why?

#

Oh

#

Okay

manic rune
distant grove
#

So do I need for a new file for the auto formatting or nah?

manic rune
#

totally not inspired

distant grove
#

Totally!

manic rune
sonic cedar
distant grove
#

Hmm

manic rune
#

:3

sonic cedar
distant grove
#

Sussy

manic rune
#

not inspired

distant grove
#

Imma need to see your mod stealing certificate

manic rune
#

:(

#

i dont steal...

distant grove
#

Okay

#

Checks out I believe you

#

👍

sonic cedar
manic rune
#

why are they all spaced out.

#

what the fuck

sonic cedar
#

the backspace:

runic pecan
#

I feel like this joker could be a mod of its own.
Just sayin', though.

sonic cedar
#

cool status it's so helpful lmao

runic pecan
#

The detail of the objectives will be given in info_queue.

manic rune
#

straight up adding monopoly to balatro is crazy work ngl

latent portal
#

ok so i did this and now the game crashes on startup because card has a value of nil

green plank
runic pecan
green plank
#

classic missing comma in a code

manic rune
green plank
#

HE EXISTS

distant grove
#

HE EXISTS

sonic cedar
#

if that's ingame im BEGGING you share the method that'll be so useful for what im doing

manic rune
#

isnt it just

#

changing color

#

of both the text and background to the same one

runic pecan
green plank
manic rune
#

^

green plank
manic rune
#

what the hell

#

^^^^1114???

#

😭

#

jesus christ

green plank
#

yes

#

the number is an inside joke in the community

#

but it is inspired by jimbo

green plank
#

since it's the only joker card with hexation in jen's almanac afaik

sonic cedar
#

thankyuhhhhhhhhverymush

runic pecan
manic rune
#

-# what does afaik mean actually

green plank
#

as i said, inspired by jimbo

#

as far as i know

manic rune
#

ig

#

oh

tall apex
#

yo anyone know how to unlevel a hand?

#

like how the arm does it

green plank
#

there it is

tall apex
latent portal
#

every time i try to reference a custom joker from my mod it crashes and shows this

#

anyone have any ideas why it happens?

distant grove
#

big number

tall apex
latent portal
#

localization file?

tall apex
#

yur

latent portal
#

i may have missed something

tall apex
#

oH

#

uh

distant grove
#

actually yea whats a localization file for?

tall apex
#

if you don't have a localization file its prob something else

tall apex
distant grove
#

oh okay

latent portal
#

yeah

distant grove
#

btw do you know why my joker doesnt have an animation or doesnt do the message?

latent portal
#

i just put loc_vars into the main file

tall apex
#

messages aren't automated, they need to be created c:

distant grove
#

i dont think so

#

how to do that?

#

message = localize == ('Harvested'),

#

i got this for message

latent portal
#

ur using the wrong equal sign

distant grove
#

yea

tall apex
#

no equals between local and harvested

distant grove
#

but whe i use the = its underlined red

distant grove
tall apex
#

mhm

latent portal
#

i think its message = localize ("Harvested!")

tall apex
#

not even a space really

distant grove
#

message = localize('Harvested'),

tall apex
#

but you can have a space that doesn't matter

distant grove
#

so like this?

latent portal
#

i like to add the space for clarity

#

yea

tall apex
distant grove
#

oh

latent portal
#

like that

distant grove
#

wow

tall apex
#

keep in mind i learned how to do this TODAY XD

#

im no expert

latent portal
#

but yeah why don't any of my cards have center defined when i try to reference them

distant grove
#

message = localize { type = 'variable', key = 'a_mult', vars = { card.ability.extra.mult } },

#

same with this?

latent portal
#

yea

distant grove
#

oh

#

wow

distant grove
#

thanks

tall apex
#

no prob c:

distant grove
#

and the message is now error

latent portal
#

oh

#

you didnt put ()

distant grove
#

like this (localize('Harvested')?

latent portal
#

no

#

im talking abt the second message

#

hold on

#

you could also do message = "Harvested"

#

if you don't feel like touching locs

distant grove
#

i see

#

and that works perfectly fine?

latent portal
#

yea

distant grove
#

k

latent portal
#

its what they did for gros michel 2

distant grove
#

k

latent portal
#

my brackets and commas are just fine

distant grove
#

okay now the guts part and the chips is working

#

but not the harvested and mult part

#

i'll send code for you to see

#
  if context.discard and
    not context.other_card.debuff
    then
      card.ability.extra.chips = card.ability.extra.chips + card.ability.extra.chips_mod
      return {
                message = "Guts",
                colour = G.C.CHIPS,
                card = card 
      

      }
    end 
    if context.joker_main and card.ability.extra.chips > 0 then
            return {
                message = localize { type = 'variable', key = 'a_chips', vars = { card.ability.extra.chips } },
                chip_mod = card.ability.extra.chips,
                colour = G.C.CHIPS}
      end 
      if context.discard and
      not context.other_card.debuff
      then 
        card.ability.extra.mult = card.ability.extra.mult + card.ability.extra.mult_mod
        return {
          message = "Harvested",
          colour=G.C.Mult,
          card=card
        }
      end 
      if context.joker_main and card.ability.extra.mult > 0 then
        return {
          message = localize { type = 'variable', key = 'a_mult', vars = { card.ability.extra.mult } },
          chip_mod = card.ability.extra.mult,
          colour = G.C.MULT}
        end
      end```
#

btw my indentions

#

suck

#

as you can see😭

latent portal
#

mult_mod = card.ability.extra.mult,
message = localize { type = 'variable', key = 'a_mult', vars = { card.ability.extra.mult } }

#

i did this and this worked for me

latent portal
distant grove
#

so like

#

what should i get rid of

#

so the mult actually applies

latent portal
#

waaaait a second

#

I FIGURED IT OUT!!!

cerulean rose
manic rune
#

i wonder

simple mural
#

How can I detect end of round?

manic rune
#

context.end_of_round

quasi comet
#

I want to exclude a specific card from showing up in a booster pack, is it possible?

cerulean rose
#

in_pool

green plank
#

not sure if it's done like this and if it'll even work because funny jenlib crash

shell belfry
#

How would I get the number of jokers that have activated this run

#

to add to the mult

quasi comet
#

in the in_pool

#

else return true if not that booster

umbral zodiac
#

is there a way to use a custom rgb/hex in loc txt

green plank
paper zealot
#

This is used as a reference too, so if you change that colour later, it'll update within the text, so you can do fancy rainbow colours

umbral zodiac
#

convinient because the joker i am making is not exactly of a sober character

simple mural
# manic rune context.end_of_round

Thanks, but I have a problem.
There is a line "G.GAME.probabilities.normal = G.GAME.probabilities.normal + 1", I suppose that after 1 round it will be equal to 2, but it becomes equal to 8

manic rune
#

huh

#

can you try putting a print() in there to see how many times it is triggered

orchid scaffold
#

how do i get the cards selected when a consumable is used

manic rune
#

G.hand.cards, i think

#

wait no

#

its highlighted

manic rune
#

uhhh

#

G.hand.highlighted

#

probably

manic rune
umbral zodiac
#

does anyone know a good way to crash the game on command i dont want to relaunch via steam like a normal person

#

like with debugplus eval or something

paper zealot
#

MMMMMMMMM

#

(hold M)

umbral zodiac
#

hell yeah thanks

simple mural
manic rune
#

wha

#

how does that even work, its supposed to reduce the number of times it triggers 😭

#

uhhhh, wait

#

it only prints once for me

simple mural
lethal mural
#

i thought i figured it out but no

#

cant figure out how to make a booster pack not appear on a certain deck