#💻・modding-dev

1 messages · Page 173 of 1

spring lantern
#

🪝

normal crest
#

time to fight your fears

spring lantern
#

AHH

crystal perch
#

you could maybe add an add_to_deck function?

glad osprey
violet void
#

You can try add_to_deck like this

add_to_deck = function(self, card, from_debuff)
  if not from_debuff then

  end
end,```

and use SMODS.add_card for X Y and Z
crystal perch
#

yeah

void pecan
crystal perch
turbid maple
#

checked how cryptid does it and its just this

glad osprey
turbid maple
#

gonna admit im not too familiar with lua but what the hell you can just shadow function names like that?

void pecan
#

I am a beginner, so i'm not sure how to do this. Would this work for setting every probability to 100%?
Or does it not work/will crash

sigma = SMODS.Joker({
    key = "jokle",
    set = 'Joker',
    cost = 0,
    rarity = 3,
    loc_txt = {
        name = 'RNJesus',
        text = { 'Sets all {C:gold}probablilites{}',  'to {C:green}100%{}'}
    },
    unlocked = true,
    discovered = true,

    add_to_deck = function(self, card, from_debuff)
        for key, c in G.GAME.probabilites do
            c = 100
            sigma:juice_up(0.3, 0.5)
        end
    end


})
turbid maple
#

probabilities arent stored like that

void pecan
cursive glade
#

alright, lua noob question here. how can I make a function available no matter what context it's in? like if I wanted a function to be available in both calculate and add_to_deck without copying the same function to either of them? If I put the function outside of SMODS.Joker it returns nil errors because it can't see self, card, context, G.GAME, etc.

turbid maple
#

if its joker specific you could just add it as a new method to your joker object

#

i guess

hardy viper
#

and G.GAME is visible anywhere since that's global

#

ex:

local function set_value(card)
 card.ability.extra.value = 3
end
SMODS.Joker{
--...
config = {
 extra = {
  value = 2
 }
},
calculate = function(self, card, context)
 if context.joker_main then
  print(card.ability.extra.value) --> 2
  set_value(card)
  print(card.ability.extra.value) --> 3
 end
end
past forge
#

I have this joker, I want the XMult to be equal to your hand size, but I can not find anything in the documentation to refer

turbid maple
hardy viper
#

no im cg

#

(thanks)

normal crest
#

i feel like the top pixels should be brown

past forge
normal crest
normal crest
turbid maple
#

the hells that now

normal crest
#

it's a utility function for making custom contexts

graceful magnet
#
    loc_vars = function(self, info_queue, card)
        return { vars = { card.ability.extra.planetOdds, card.ability.extra.tarotOdds, card.ability.extra.spectralOdds, (G.GAME.probabilities.normal or 1) } }
    end,
    calculate = function(self, card, context)
        if context.before and next(context.poker_hands['Flush']) then
            local cardType = ''
            if pseudorandom('recite') < G.GAME.probabilities.normal / card.ability.extra.planetOdds then
                cardType = 'Planet'
            elseif pseudorandom('recite') > G.GAME.probabilities.normal / card.ability.extra.planetOdds and pseudorandom('recite') < G.GAME.probabilities / card.ability.extra.tarotOdds then
                cardType = 'Tarot'
            elseif pseudorandom('recite') > G.GAME.probabilities.normal / card.ability.extra.tarotOdds then
                cardType = 'Spectral'
            end
            if #G.consumeables.cards + G.GAME.consumeable_buffer < G.consumeables.config.card_limit then
                G.GAME.consumeable_buffer = G.GAME.consumeable_buffer + 1
                return {
                    G.E_MANAGER:add_event(Event({
                        trigger = 'before',
                        delay = 0.0,
                        func = (function()
                            local _card = create_card(cardType,G.consumeables, nil, nil, nil, nil, nil, 'recite')
                            _card:add_to_deck()
                            G.consumeables:emplace(_card)
                            G.GAME.consumeable_buffer = 0
                            return true
                    end)})),
                    message = "Summoned",
                    colour = G.C.RED
                }
            end```

I very clearly *have* defined planetOdds though??
normal crest
#

instead of looping through jokers

void pecan
hardy viper
#

infinity

turbid maple
#

some lua constant for number thats guaranteed to be larger than or equal to any number

#

so yes basically infiniyy

glad osprey
#

which file is gros_michel's code kept in

graceful magnet
#

card.lua

glad osprey
#

ty

crystal perch
#

quick question: why isn't this lovely patch applying the shader to my joker? this same method works with consumables and their sets and i pretty much copied the method for how invisible joker applies its shader so what's the issue here

hardy viper
#

vanilla code is weird, it's hard coded into the individual functions that do certain things

#

it doesn't work like steamodded jokers do calculation

normal crest
glad osprey
#

in that case how would I gros_michel a steamodded joker

graceful magnet
crystal perch
turbid maple
#

oh i see calculate_context in the source code

#

looks convenient

void pecan
crystal perch
graceful magnet
manic rune
#

r u sure u saved the code, just to be sure

turbid maple
#

sorry

normal crest
graceful magnet
void pecan
turbid maple
#

yeahh

normal crest
#

if you previously had a different name for it

void pecan
graceful magnet
solar pollen
#

i made a custom card for half joker but its a full sized card making it lower than other cards because of half jokers positioning
how do i fix this

graceful magnet
normal crest
turbid maple
# void pecan Now i'm double confused on what to do

maybe you could look into the pseudorandom function? it might be possible to patch pseudorandom to always return 0 if (you have the sigma rnjesus + the seed is for a probability event you want to force)

past forge
#

Is Xmult_mod = h_size not valid? how do i reference the hand size 😭

#

sorry guys

#

but im unable to find it in the docs

void pecan
turbid maple
#

oops all 6 just doubles the probability.normal thing iirc

normal crest
dreamy thunder
manic rune
turbid maple
#

he wants to make all probabiliy events guaranteed

manic rune
#

like scrockw said, you should move the event outside of return

graceful magnet
void pecan
turbid maple
#

tbh i think you could just set prob.normal thing to inf
if youre fine with wheel of fortune reading inf in 4 chance

manic rune
#

im pretty sure it will crash

void pecan
manic rune
#

unless its 4 in 4

dreamy thunder
#

i have a joker which multiplies it by something between -100 and 100

turbid maple
#

the last time I checked lua's fine with infinities

dreamy thunder
#

thats all i know

void pecan
#

i'll try and update if it crashes

manic rune
turbid maple
#

huh is that so

graceful magnet
manic rune
cursive glade
#

Is there context or some other SMODS.Joker field for when a joker is displayed in the shop for purchase? or in a booster pack?

normal crest
# graceful magnet stupid solution time

potentially unrelated to your issue, you can replace your entire card adding logic with SMODS.add_card { set = cardType } still needs a check for must have room tho (and probably still needs to be in an event)

turbid maple
#

are you trying to get like the list of jokers in a shop?

#

or a joker that triggers specifically when it appears in a shop

manic rune
turbid maple
#

thats fucked

manic rune
#

no clue why that crashes

turbid maple
#

what does the game even do with g.game.prob.normal

manic rune
#

but a shame too

sullen fern
#

gonna try my hand at making a joker that adds perishable to other jokers

normal crest
#

you can the add key to add_card too with key_append = 'recite'

manic rune
dreamy thunder
void pecan
turbid maple
#

does it crash

manic rune
#

if it was X1 mult per perishable joker then id probably understand, but damn

manic rune
sullen fern
#

hmm

void pecan
dreamy thunder
turbid maple
#

LOL

manic rune
#

huh

sullen fern
#

wrong message

turbid maple
#

naneinf in 4 chance goes hard

sullen fern
#

fuck

cursive glade
dreamy thunder
#

bro gave me nope

manic rune
#

well thats good to know

void pecan
sullen fern
normal crest
# manic rune

based on this conversation you probably tried to do G.GAME.probabilities = 100 which is obv wrong

manic rune
#

can u try 100?

dreamy thunder
#

nah just kiddin

#

it works

manic rune
#

lol

manic rune
#

imagine having inf chance to win and still lose

#

😭

turbid maple
normal crest
dreamy thunder
#

just dont get it like i did

sullen fern
#

there we go

manic rune
graceful magnet
manic rune
#

so i talked about how u could change the probability to really high, which led to that response, though i could be wrong and probably sounded really dumb 2 days ago

normal crest
#

i don't know what's causing your issue

sullen fern
# sullen fern there we go

so it's like amalgamate except it applies perishable to a joker and it gains mult for a perishable joker

manic rune
dreamy thunder
#

seeing naneinf on wheel of fortune is a dream come true

manic rune
normal crest
dreamy thunder
#

i guess im lucky overall

void pecan
#

How do I revert it back to normal tho?
If g.game.prob.normal is infinity now, and the card gets deleted I need it to revert back

dreamy thunder
#

yeah you cant go back from naneinf iirc

#

(:

sullen fern
dreamy thunder
#

atleast

past forge
#

I feel like i may be missing some important piece of docs, cause im unable to find a lot of things. are there any docs beside de Lovely and the Smod guide?

manic rune
normal crest
turbid maple
#

maybe when you call add_to_deck it stores the current value as a variable

#

and when its gone it revertd from the stored value

void pecan
dreamy thunder
turbid maple
#

but buying oopsall6 after it might cause headaches

manic rune
#

"Where there's naneinf, there's -naneinf."

  • naneinfer
dreamy thunder
#

i think

normal crest
dreamy thunder
manic rune
dreamy thunder
#

this is new

sullen fern
#

now how would i make a joker that adds perishable to a card when the round ends

manic rune
normal crest
dreamy thunder
#

no it gave nope

turbid maple
#

I mean

buy rnjesus -> buy 6 -> sell rnjesus -> chance should be 2

void pecan
sullen fern
#

and how would i make a card that has two effects

turbid maple
#

rnjesus being sold or debuffed is a special defeat condition because you killed jesus you lose the run

manic rune
#

buy rnjesus -> sell it -> -naneinf -> realize you are never winning a wheel of fortune ever again

graceful magnet
dreamy thunder
#

eternal michel y'all

turbid maple
#

LOL

manic rune
#

what would -naneinf + naneinf be

void pecan
normal crest
dreamy thunder
#

and they do the same thing

manic rune
dreamy thunder
void pecan
manic rune
#

or that your balatro takes a screenshot or some shit

#

😭

frosty dock
#

-nane0

normal crest
#

well not necessarily incorrect but keep it consistent at least

graceful magnet
manic rune
#

i call forth a cat gif

turbid maple
void pecan
#

is it possible to force-lose a run? Is their even a function for that

dreamy thunder
#

its -nan again

manic rune
#

excellent

cursive glade
void pecan
manic rune
frosty dock
#

bet it's positive nan

void pecan
manic rune
#

i bet balatro 2 will be released

dreamy thunder
#

no like for some reason its different on consumables and jokers 😭

normal crest
manic rune
normal crest
#

and you can do elseif instead of checking if one didn't happen like that

void pecan
dreamy thunder
#

gotta make a joker which abuses -nan

#

bet it would be fun

manic rune
#

at least thats what i did for balatro source code

spring lantern
#

how can i check if the player is in a shop and not rerolling a boss blind for example

manic rune
#

when i was finding some stuff

ionic verge
#

does anyone know an easy way to add additional booster pack slots to the shop?
and if you say check cryptid you better show where cry_boosterwhatever is defined
(i only say that bc i already tried that and did not find it despite searching pretty thoroughly)

dreamy thunder
#

i hate going through balatro's code

ionic verge
#

so true

manic rune
#

same

dreamy thunder
#

the only way is writing a patch ig

manic rune
ionic verge
dreamy thunder
#

i have no idea on patches

#

never wrote one

void pecan
manic rune
#

check the patches

dreamy thunder
ionic verge
#

and may god have mercy on your soul

void pecan
manic rune
#

lovely patches r so painful to read ngl

#

😭

ionic verge
#

yeah

ionic verge
# void pecan

ok but why is kevin heart in a anime discord
(curious)

manic rune
ionic verge
#

fair nuff

dreamy thunder
void pecan
#

🤓

manic rune
#

im pretty sure im in that server too

#

though i cant check what server it is from (mobile discord sucks smh)

#

but im in a lot of anime tower defense servers sooo

sullen fern
#

how do i add stickers to jokers

past forge
#

im looking for the ectoplasm in the source code for referencing the hand size, anyone has any idea where can it be? or smt that involves hand size in it

void pecan
#
function global.registerButtons()
    G.FUNCS.DT_win_blind = function()
        if G.STATE ~= G.STATES.SELECTING_HAND then
            return
        end
        G.GAME.chips = G.GAME.blind.chips
        G.STATE = G.STATES.HAND_PLAYED
        G.STATE_COMPLETE = true
        end_round()
    end
    G.FUNCS.DT_double_tag = function()
        if G.STAGE == G.STAGES.RUN then
            add_tag(Tag('tag_double', false, 'Big'))
        end
    end
end

This is win blind, but lose game (and win game) is NOT in sight

dreamy thunder
#

i couldnt find it either

#

i mean maybe they are a part ofthe game's debug menu?

manic rune
#

odd

edgy reef
#

Yea that's part of the vanilla debug menu.

manic rune
dreamy thunder
#

i knew it

edgy reef
#

Win blind is DebugPlus

manic rune
#

damn

dreamy thunder
#

oh well

void pecan
#

so selling RNJesus and losing the game is off the table 💔

dreamy thunder
#

maybe you'll find something if you search balatro's source code

#

dunno

manic rune
#

its not actually impossible

graceful magnet
manic rune
#

in lobotomy corp mod, there's a joker which will actually do the exact same thing

#

sell punishing bird and u lose instantly

dreamy thunder
#

oh

sullen fern
#

so how do i change this from negative jokers to jokers with a perishable sticker

dreamy thunder
#

hmm

edgy reef
#

Pretty sure the only thing you need to do is just call lose_game

void pecan
edgy reef
#

Oh right there's no function for it since it's just a state change

void pecan
#

G.FUNCS.DT.lose_game

dreamy thunder
#

try it

normal crest
#

otherwise can you send the entire joker code

ionic verge
dreamy thunder
void pecan
#

it plays the lose sound, and zooms in but I can still play cards

I'm getting closer

dreamy thunder
#

wierd

turbid maple
#

balatro purgatory

void pecan
#

Got it

#
remove_from_deck = function(self, card, from_debuff)
        G.STATE = G.STATES.GAME_OVER
        G.STATE_COMPLETE = false
    end
spring lantern
#

okay so i copied the cryptid ease_dollars hook as i was told and it works but there's no message again, i assume the table isn't being returned

cursive glade
void pecan
#

joker works as intended

spring lantern
#

oh hell naw

dreamy thunder
#

nice

#

im proud of this joker

normal crest
dreamy thunder
#

rare seems like an insult 😭

turbid maple
#

rnjesus when the wheel walks in

void pecan
ionic verge
#

hopefully last question for now. how hard would this be

dreamy thunder
sullen fern
#

still having trouble figuring out how to check for jokers with a specific sticker

void pecan
#

now I just need art, but I suck buns at joker art so I might just pixelate online pictures

turbid maple
sullen fern
#

it should work like checking jokers with a specific edition

#

but for stickers instead

spring lantern
turbid maple
#

someone suggested SMODS.calculate_joker is a more convenient version

#

that loops over all jokers automatically

#

might also handle returned effects

#

not sure sorry

hardy viper
#

use SMODS.calculate_context ya

spring lantern
#

ima check thx

void pecan
dreamy thunder
#

i'd probably accidentally put it next to a ceremonial dagger 😭

graceful magnet
# normal crest honestly idk

I think I'll toss Tarot creation in an else then, so if a Planet or Spectral isn't created, it will create a Tarot (probably)

normal crest
#

that's avoiding the problem tho

sullen fern
#

this is probably NOT correct

turbid maple
void pecan
dreamy thunder
spring lantern
#

naneinf in 7 cards drawn face down What_the_hell

void pecan
#

naneinf chance to perish gros_michel

#

BUT

#

naneinf chance for wheel 🤑

crystal perch
spring lantern
#

naneinf chance for lucky card money shots 🤑

sullen fern
ionic verge
#

i think rngesus is actually pretty balanced

#

is got tradeoffs

sullen fern
crystal perch
#

that is a context that exists yes

sullen fern
spring lantern
past forge
sullen fern
#

now how do i make a joker apply a sticker to a random joker

past forge
#

lmao

void pecan
#

💔

crystal perch
#

someone ban the bot

sullen fern
past forge
dreamy thunder
turbid maple
past forge
#

Im new to modding, and i cannot find anything that references hand size that works with what im trying to do

sullen fern
#

i assume adding a sticker to a card works like adding a seal to one

void pecan
dreamy thunder
#

wydm?

past forge
#

ive tried G.hand_size G.hand.config.card_limit among others

#

but nothing seems to work

#

btw ive already changed the message key to a_xmult so ignore that

sullen fern
void pecan
# dreamy thunder wydm?

This is a card map, it would need to look like this and be the correct size as thats how you get the image for the card

dreamy thunder
#

no like

#

i could send it in the correct size

#

and you could import it

void pecan
dreamy thunder
#

1sec

#

oh it goes webp

#

nvm

sullen fern
#

i was looking through pokermon consumable stuff and i found this

turbid maple
# past forge

in lua putting # in front of things returns its length

#

wait hand size

#

oh

past forge
#

yeah

#

like in this case it should be X8 Mult

sullen fern
#

or is that different

past forge
#

but G.hand doesnt work for my case neither

#

no wait

#

merry andy hands are not that

#

lmao

#

but maybe something like that

#

im so lost

dreamy thunder
#

im looking for it too but only thing i can find is change_size

past forge
#

but i dont think is impossible?

dreamy thunder
#

what were you trying to do?

sullen fern
#

ronald doesn't seem to work

#

it's not giving me any mult despite perishable jokers being there

past forge
#

A joker that gives you XMult equal to your hand size

dreamy thunder
#

it checks your handsize

#

but in a different way

#

kind of

#

it checks the ammount of cards held in hand

past forge
#

it could work

dreamy thunder
past forge
#

Where can i find the code for the jokers in de source code?

dreamy thunder
dreamy thunder
#

its like this

sullen fern
#

there's no reason this shouldn't work

#

but it doesn't

#

but why

#

why doesn't it work

#

am i doing something wrong

dreamy thunder
#

im using this and it seems to be workng

sullen fern
#

nope

#

that didnt work

dreamy thunder
#

what are you exactly trying to do?

sullen fern
#

add x1 mult for every joker with a perishable sticker

turbid maple
#

is the mult not triggering at all

sullen fern
#

nope

#

even when perishable jokers exist

turbid maple
#

btw you should return a messahe too

sullen fern
#

how

#

actually i know how

#

acually i forgot

dreamy thunder
#

it looks better than i expected

turbid maple
#

I forget the exact spelling

dreamy thunder
#

if you dont want any localization stuff

past forge
dreamy thunder
#

whats the error?

past forge
sullen fern
#

its showing the message but the mult doesn't happen

#

i set the mult to not be x1 and it actually works now

dreamy thunder
#

instead of .

past forge
#

god

dreamy thunder
sullen fern
#

yeah

dreamy thunder
#

aight nice

sullen fern
#

i think it was just because i set xmult to x1

dreamy thunder
#

you put "x1" in there?

sullen fern
#

i had my xmult var as 1

#

now i need to figure out how adding perishable to a joker works

dreamy thunder
#

i use SMODS.Stickers["eternal"]:apply(newcard, true)

glad osprey
#

how do i make a sticker not complatible with eternal and perishable

dreamy thunder
sullen fern
#

to an existing joker

#

not creating one

#

ronald doesn't create a joker

timid parrot
#

same thing

#

tho I'm pretty sure there's builtin functions for setting a card's eternal, perishable, or rental status

#

yeah found this in one of my mods, tho I haven't worked on it in a couple months

glad osprey
dreamy thunder
#

no idea

dreamy thunder
timid parrot
red flower
hardy viper
#

literals have to be enclosed in brackets

#

for table keys

timid parrot
past forge
glad osprey
past forge
#

the game doesnt crash but the mult is not working

sullen fern
#

the code

past forge
#

i want to print the all_cards in the debugPlus console, is there a way to do that?

timid parrot
dreamy thunder
timid parrot
#

also "joker" doesn't exist in that context, you have to specify the card you want to make perishable

dreamy thunder
# sullen fern the code

you could chose a random joker like invis and apply the sticker to the selected one maybe?

sullen fern
#

how does invis do it

dreamy thunder
sullen fern
#

what am i supossed to be looking at here

#

like

#

what code handles selecting a random joker

past forge
#

the part where it says if #jokers > 0

#

thats the logic of what it does

dreamy thunder
#

got something working

past forge
#

but the invis does this when you sell it

dreamy thunder
#

this seems to be working

spring lantern
#

it is done

dreamy thunder
past forge
sullen fern
dreamy thunder
past forge
sullen fern
#

hm

#

now how would that apply to me

#

(currently does not understand what's going on)

turbid maple
dreamy thunder
#

fr

spring lantern
#

always has been epicsmith

dreamy thunder
past forge
#

crashing

dreamy thunder
#

code?

past forge
#
SMODS.Joker {
    key = 'cool_sun',
    loc_txt = {
        name = 'Cool Sun',
        text = {
            "Gives {X:mult,C:white} X1 {} Mult",
            "for each hand currently in hand",
            "(Currently {X:mult,C:white} X#1# {} Mult)"
        }
    },
    config = { extra = { Xmult = 0 } },
    loc_vars = function(self, info_queue, card)
        return { vars = { 0 } }
    end,
    rarity = 3,
    atlas = 'ModdedVanilla',
    pos = { x = 0, y = 0 },
    cost = 2,
    calculate = function(self, card, context)
        if context.joker_main and not context.blueprint and not context.repetition then
            local all_cards = 0    

            for k, v in ipairs(G.hand.cards) do
                all_cards = all_cards + 1
                card.ability.extra.Xmult = all_cards + #context.full_hand
            end

            return {
                print(all_cards)
                Xmult = card.ability.extra.Xmult,
                message = localize { type = 'variable', key = 'x_mult', vars = { card.ability.extra.Xmult } }
            }
        end
    end
}
sullen fern
past forge
#

line 115 is the return

dreamy thunder
#

i will change

dreamy thunder
#

after print

past forge
#

damn, thanks

#

im not used to lua yet

dreamy thunder
#

im not that experienced myself

sullen fern
#

or is this it’s own thing

dreamy thunder
dreamy thunder
#

not in return

sullen fern
#

ahhh

#

but wait, what about the message

dreamy thunder
#

uh

#

what will be in the message

wintry solar
#

that check is wrong

dreamy thunder
#

oh well

sullen fern
wintry solar
#

if context.end_of_round and context.main_eval then the blueprint stuff if you want

dreamy thunder
#

never used main_eval myself

#

what is it for?

wintry solar
#

to identify the main end of round step

#

otherwise you hit the repetition and individual checks, or any other custom contexts that use end of round

dreamy thunder
#

oh i see

#

i never saw it in the wiki so i didnt know

wintry solar
#

its right at the bottom

dreamy thunder
#

oh

#

must've missed it

fallen vigil
#

how would i make the shatter apply to cards held in hand instead of the joker

past forge
#

Oh highest priestess ive done it

dreamy thunder
#

nicee

past forge
#

We've done it

red flower
fallen vigil
past forge
dreamy thunder
#

nice

fallen vigil
past forge
#

indeed it is

wintry solar
fallen vigil
wintry solar
#

you need to use the destroying context then

fallen vigil
#

what does it change?

wintry solar
#

it lets it destroy cards cleanly instead of you doing it custom and breaking things

sullen fern
fallen vigil
wintry solar
#

look on the wiki

fallen vigil
#

i dont know what im doing i dont know how to integrate that into my code

void pecan
wintry solar
#

also don't do that

#

if you try and do it yourself you'll end up with ghost cards unless you know what you're doing

fallen vigil
wintry solar
#

you use the destroying_card context and return remove = true

fallen vigil
#

thank you

stiff locust
#

how do I make a sound

#

normal in balatro

#

i know balatro changes the sound somehow but how

past forge
#

thats the wiki

wind turtle
#

i want to add a joker that gains mult based on a number on my server so it's the same for every player at all time, how would I go about doing that?

fallen vigil
# past forge

i have the wiki open i just dont know how to utilize it

wind turtle
#

i dealt with some of this before

past forge
wind turtle
#

it kinda loops through the cards, if it should be destroyed return destroy_card = card

stiff locust
#

you dont have to return anything specific

past forge
stiff locust
#

just return something

wind turtle
#

thirty two dollas and eighty cents 🔥

stiff locust
#

.

#

context.destroying_card is for playing cards

#

are you trying to destroy the joker

wind turtle
#

oh this is for a joker or something?

#

my experience is void

stiff locust
#

i thought you were the other guy

fallen vigil
#

im so confused with who is talking to who ngl

wind turtle
#

understandable

wintry solar
#

destroying contexts are for playing cards full stop

fallen vigil
# fallen vigil

this is what my thing is supposed to do if thats what we're still talking about

wintry solar
#

they dont destroy jokers

wind turtle
#

is there a way for me to run code when a joker appears?

#

like an init function

stray warren
#

set_ability would probably work

stiff locust
#

i am once again asking for sound correction support

lethal mural
#

how would i make a deck that just has a holographic stone card of a certain rank (1 card deck basically)

ionic timber
#

what's the "correct" way to index every current joker and check which one is of a specific edition ?

stiff locust
#

i don't remember the edition check

#

something like if value.edition.key == "e_foil" ? although you should check if value.edition ~= nil first so it doesn't crash

ionic timber
#

yeah I just figured it out right after sending it , I'm dumb

#

I forgot to check if the edition was nil so it always crashed

#

glad to see I was (almost) on the right track tho, thanks a lot !

fallen vigil
#

ive tried a few things and i still dont know what im doing how do i make this work 😭

wind turtle
#

so how would I send a GET request to a server... from inside balatro

past forge
#

LMAO

#

where the hell did you put a fetch url

wind turtle
#

i'm going to make a joker that scales every time someone wins a run

stiff locust
#

cryptid does some https magic

wind turtle
#

this seems good

#

so how do I include that other file in my mod?

stray warren
#

NFS.load(SMODS.current_mod.path .. /**filename**)()

wind turtle
#

...whar

lethal mural
wind turtle
#

ok is there a way for me to like run a python script in balatro

lethal mural
#

i have no idea what im doing 😭

glad osprey
#

how do i increase the cost of shop rerolls

ionic verge
#

how do i check what the edition of a joker (specifically a joker checking their own edition)

wind turtle
#

how can i get the file path of the mod directory

#

like how do i get %appdata%/Balatro/mods/lims-balatro-mod

tepid crow
tepid crow
#

and make sure that's either in the global scope, or pre-defined if in a function

faint plank
#

dont mean to add onto a pile of questions, but how can i check if a joker is unlocked with it's key? or perhaps theres a better way of putting a specific list of jokers into a booster pack

wind turtle
#

so this is not working

#

game is crashing immediately

#

(i'm doing this part with python because it seems net req in lua sucks)

tepid crow
tepid crow
wind turtle
#

there Is no crash log

#

the game just closes

#

if there was one i'd post it

faint plank
#

making a wallet themed booster pack, and im including jokers that would fit, but i managed to get drivers liscence before i unlocked it

tepid crow
solar eagle
tepid crow
glad osprey
#

GOOD LORD ITS ALL MICHEL

lethal mural
#

im just trying to make a 1 card deck

#

i find decks really hard to work with ><

tepid crow
faint plank
#

i just need a check if its unlocked, theres probably an easier way, im a little new to lua

        if pseudorandom('wallet_junk') > 0.5 then
            local jokers = {'j_drivers_license', 'j_credit_card', 'j_gift', 'j_business', 'j_joker', 'j_loyalty_card', 'j_todo_list', 'j_photograph', 'j_brainstorm'}
            local chosen_joker = pseudorandom_element(jokers, pseudoseed('wallet_jokers'))
            if chosen_joker.config.center.unlocked then
                return {
                    key = chosen_joker,
                    skip_materialize = true,
                    soulable = true
                }
            end
        end
        return {
            set = "JimboWallet",
            skip_materialize = true
        }
    end```
tepid crow
#

triple ``` for multi-line codeblock

cerulean rose
#

does anyone know why the value of G.GAME.modifiers.scaling is changing between when i call the function and when the function executes

faint plank
tepid crow
#

yeah

ionic verge
#

how would i have a deck change the max interest

tepid crow
faint plank
#

i thought of just grabbin from the whole pool and checking if its a walletjunk card and doing cash if its not

#

not sure the the joker pool is tho

lethal mural
#

where do i find the crash log again

tepid crow
#

should just be able to run the code again no?

#

though there's a log at mods/lovely/log

lethal mural
wind turtle
#

ok for some reason, lua doesn't like what python does to print

#

time for sys.sydout or whatever

tepid crow
lethal mural
tepid crow
#

sounds like it's saying that eligible_suits is nil

wind turtle
#

that's obviously working???

lethal mural
#

oh whoops

#

yeah that'd explain it

wind turtle
#

as you can see here

#

Why?

lethal mural
#

now its saying field T is nil

#

wtf is field T
gonna try this a different way

glad osprey
#

new question how do i make a sticker not apply to jokers with other stickers

solar eagle
#

how's it being applied?

glad osprey
#

randomly

#

whatever the default is

lethal mural
#

IT WORKED

#

had to change G.playing_cards to G.deck

#

how do i change base blind size in a deck

solar eagle
#

look at plasma deck

lethal mural
#

so ante_scaling would be 0.5 then?

solar eagle
#

i dunno i didnt look

lethal mural
#

cus i thought ante_scaling was just a setting from 1 to 3

solar eagle
#

i dont either

#

see what plasma deck sets it to

#

cause that makes base blinds 2x

lethal mural
#

yeah because its directly set that way in balatro's code i think

#

but there is no setting among the 3 for halving the base blind size

chrome widget
#

With SMODS, is it possible to prompt Joker text during the "before" context for each individual card to which it applies?

lethal mural
#

i've implemented the first part of this description
the other two i'm stumped

keen coral
#

how easy is it to make a custom joker that piggybacks off of existing functions in the code? like, in terms of programming expertise required

faint plank
#

trying this, but it seems to be returning nil

            local current_pool = get_current_pool('Joker')
            if current_pool and current_pool[chosen_joker] then
                return {
                    key = chosen_joker,
                    skip_materialize = true,
                    soulable = true
                }
            end```
cerulean rose
#

they're two separate parameters

faint plank
#

maybe i shoulda double checked if get_current_pool even exists lol

lethal mural
#

so it would be ante_scaling 0.5 then?

cerulean rose
#

confusing, i know

lethal mural
#

ok ill try that

#

ok it works

#

now the last part

#

preventing certain blinds from appearing until ante 3

wind turtle
#

finally

faint plank
#

wot

wind turtle
#

i have to execute a python program -> python program pings website -> python program writes file -> lua reads file

#

now how do i detect if someone wins a run

faint plank
#

end_of_round on ante 8?

wind turtle
#

how would I check what ante you're on?

#

is there just like a G.ante?

cerulean rose
wind turtle
#

oh yeah

cerulean rose
#

strange pencil has joker set that instant wins

wind turtle
#

i ❤️ cryptid and want to be compatible with it

cerulean rose
#

the game also has a win state

stray warren
cerulean rose
#

just check for G.STATE

#

or something

wind turtle
#

but consider: funny outweights practical

cerulean rose
#

i'm surprised how few mods add their stuff to the vanilla challenges

#

like epic tag can still appear on jokerless when cryptid is installed

wind turtle
#

literally all you have to do to cheese this is edit get.py or just spam the thing it pings to increase the value

#

anyways what G.STATE would i check to see if you won

#

and what context would i check that under? i'm assuing end_of_round

cerulean rose
#

idk check the end of round stuff

#

alternatively, check how the forbidden one works

#

originally from strange pencil and then borrowed into 2 other mods

lethal mural
wind turtle
cerulean rose
wind turtle
#

are there globals for ante and if it's a boss blind

cerulean rose
#

doing that would apply the changes regardless of deck

cerulean rose
lethal mural
wind turtle
#

because if i have end_of_round on an ante equal to winning ante and it's a boss blind, then that checks if you won

lethal mural
#

(because it would be unfair otherwise lol)

#

the pillar and the psychic are run killers on a 1 card deck early on

cerulean rose
wind turtle
#

thank you very much!

#

does that trigger once or do i need to have a variable check if it's been triggered

stray warren
#

If you just checked the ante for ante 8, then it would also trigger if the user went into endless, immediately purchased the hieroglyph voucher and beat ante 8 again

cerulean rose
#

thats a boolean value you need to check manually

cerulean rose
#

or you could hook the code for displaying the YOU WIN! popup

wind turtle
#

i love python

cerulean rose
#

also how often does that joker update

wind turtle
#

i have it update when you obtain it

#

i think i'll also make it run at beginning of round

cerulean rose
#

reminds me a bit of stonehenge from strange pencil

#

when i typed strange it autocompleted to “stranger things” wtf apple

#

why cant i turn this off anymore

wind turtle
#

also since you seem to be an experienced mod dev you can tell me

#

is there a hot reload

#

can i reload my mod without restarting the game

cerulean rose
#

nope

tepid crow
wind turtle
#

damn

tepid crow
#

you can hold M though

wind turtle
#

that'd be real nice

cerulean rose
#

hold cryptidm to restart

lethal mural
#

uh so this didnt work (no crash it just didnt do anything)

#

how do i do

#

lol

solar eagle
#

is there a function to reload the game, like with a toggle in settings?

#

i know smods does it when you enable/disable mods

solar eagle
#

no i want to do it programatically

normal crest
#

SMODS.restart_game()

solar eagle
#

ty!

wind turtle
#

ok finally

#

after 2 hours of coding

#

i have Balatnet™️ working

#

just gotta get some art for it and change the server from localhost to lim95.com

#

it says "currently 0" because it doesn't sync when the game starts

#

there ya go

lethal mural
sonic cedar
wind turtle
#

tried to boot up cryptid and my mod at the same time to see how they interact, and i get this when going to the collection

cerulean rose
#

and the red +mult text

upper ibex
#

i want to make a joker that gains 1 mult per dollar spent

how do i go about this

wind turtle
#

ok how do i make my joker compatible with cryptid's gemini, oil lamp, others like it

gusty sequoia
#

can someone help make my joker give +1 Chip?

upper ibex
cerulean rose
gusty sequoia
cerulean rose
#

after scoring?

gusty sequoia
upper ibex
#

1 singular chip

cerulean rose
gusty sequoia
#

I want +1 Chip :(

cerulean rose
#

if context.joker_main then return {chips = 1} end

gusty sequoia
#

Thank you

#

I'll tell you if that doesn't work, I hope it works

#

It crashed because context is nil ;-;

gusty sequoia
#

Mkay

#

What should I read for this situation

cerulean rose
gusty sequoia
#

Thank you

glad osprey
#

how do i make a sticker apply to consumables instead of jokers

wind turtle
glad osprey
#

i know its smth like this

wind turtle
#

mult_per_win is staying the same when it should be getting doubled by gemeni

#

gemini

cerulean rose
#

j_cry_gemino

wind turtle
#

what do i do with that?

#

how do i allow gemini to double the values of my joker

cerulean rose
#

i dont know

#

ive done that and it worked for me

#

are you sure you're actually multiplying by mult_per_win

wind turtle
#

i am and if it increased it it'd appear in the text

manic rune
#

r u sure gemini is actually targeting ur joker

cerulean rose
wind turtle
#

it's the only joker lol

wind turtle
cerulean rose
#

well theres also gemini

cerulean rose
wind turtle
#

it was the leftmost and it said "compatible"

wind turtle
manic rune
#

can u show me the codes of Gemini and ur joker?

wind turtle
modern kindle
#

if i want to pull the total value scored in a hand is that in context.full_hand or scored_hand?

wind turtle
#

that's its internal name

manic rune
#

ah i see

#

lemme read rw

cerulean rose
wind turtle
#

ah

cerulean rose
#

and how u dont have to specify the message manually anymore

manic rune
#

is this where it x2 jokers value?

wind turtle
manic rune
#

ok holy shit its hard to read on phone brih

wind turtle
#

makes sense

gusty sequoia
#

It finally works

cerulean rose
gusty sequoia
#

:D

wind turtle
#

how do i change the game speed.

#

this is incredibly important.

hot drift
#

nopeus mod

wind turtle
#

programatically

#

how do i change the game speed setting from within my mod

wind turtle
# wind turtle there ya go

someone said this should force your game to the slowest speed and that's too funny of an idea to pass up on

cerulean rose
#

check how balatro's settings menu does it balatrojokerctrlv

manic rune
#

make it so it has a 1 in 100 chance to crash your game each round

#

❤️

#

also

cerulean rose
#

X_X

modern kindle
#

is anyone aware of what the overscore status is called? obviously theres a way to see if you score more than the blinds value in one hand, but i cant seem to find the context for it

manic rune
#

im pretty sure Gemini should multiply all values in your Joker's config, except for some specific values with names listed in their exceptions

wind turtle
#

i'm trying to change G.GAME.SPEEDFACTOR but doesn't seem to be doing much of anything

#

ok i did G.SETTINGS.GAMESPEED = 0.1 and it worked

#

this is a bit much

manic rune
#

r u sure

#

u cant change it in settings again?

#

like, if you change your speed in settings then im pretty sure it should override that

#

a surefiresolution would be to put that in update lol

wind turtle
manic rune
#

❤️

wind turtle
#

that'd be really funny ngl

#

im just gonna put it in update

#

...how do i do that

#

is that just a function i put in my joker

west wing
#

Is there a compilation of all the game variables / G. variables somewhere? or if anyone directly knows where the player hands/player discards variables are

manic rune
#

but if its the buttons removal then u need patches

wind turtle
#

it took 5 minutes to do one blind ❤️

normal crest
wind turtle
#

i think i'll change it to xmult to make this a bit more worth it

manic rune
#

thatd be funny

west wing
manic rune
wind turtle
#

long ass description

manic rune
sonic cedar
#

the ability to change font sizes so it looks shorter:

manic rune
sonic cedar
#

why are you writing english essays in your joker descriptions

manic rune
#

it's a wikipedia page, not an essay

sonic cedar
#

😭

manic rune
#

nah but i want my jokers to reach the playing cards

#

❤️

#

i want them to be stairways to heaven

wind turtle
#

i forgot the formatting and didnt realize it didnt work

manic rune
#

wha

#

it should work

normal crest
manic rune
#

{s:0.5}text{}

manic rune
#

but we dont judge moddeds

wind turtle
#

thanks i did uppercase S

manic rune
#

modders

wind turtle
manic rune
#

❤️

sonic cedar
#

“all players” getting it’s own line

manic rune
normal crest
#

yeaaaah

#

personally i prefer when each line has the same number of characters

manic rune
normal crest
#

if possible ofc

manic rune
#

in fact

#

{s:5}all players{}

#

make sure to repeat that for 3 lines too, just to make sure they get it ❤️

wind turtle
sonic cedar
#

all players

wind turtle
#

oh thats because i restarted the game once lmao

sonic cedar
#

did you hold m to restart

manic rune
high stag
#

So I'm making a joker that swaps played cards suits. I would like it to function in-line with jokers like Lusty and Wrathful, to allow a well-organized player to proc both by swapping them with the new joker. What like, context, or whatever, do I need for that? It seems like it should be fine by checking for context individual and cardarea == g play?

calculate = function(self, card, context)
            if context.individual and context.cardarea == G.play and not SMODS.has_no_rank(context.other_card) then
            if card.ability.name == 'Reversal' then
                if context.cardarea == G.play then
                    for k, v in ipairs(context.scoring_hand) do
                        if v:is_suit("Hearts") then 
                            G.E_MANAGER:add_event(Event({
                                delay = 0.1,
                                func = function()
                                    v:juice_up()
                                    v:change_suit("Spades")
                                    return true
                                end
                            })) 
                        elseif v:is_suit("Spades") then 
                            G.E_MANAGER:add_event(Event({
                                delay = 0.1,
                                func = function()
                                    v:juice_up()
                                    v:change_suit("Hearts")
                                    return true
                                end
                            }))
                            elseif v:is_suit("Diamonds") then 
                                G.E_MANAGER:add_event(Event({
                                    delay = 0.1,
                                    func = function()    
                                        v:juice_up()
                                        v:change_suit("Clubs")
                                        return true
                                    end
                                }))
                            elseif v:is_suit("Clubs") then 
                                G.E_MANAGER:add_event(Event({
                                    delay = 0.1,
                                    func = function()
                                        v:juice_up()
                                        v:change_suit("Diamonds")
                                        return true
                                    end
                                }))
                            end
                        end
                    end
                end
            end
        end
sonic cedar
wind turtle
#

there ya go

manic rune
wind turtle
#

thanks

manic rune
#

or maybe not? i find Currently more pleasing to the eyes than currently

normal crest
manic rune
#

if the gameplay is gonna be a literal torture method, at least the UI should be nice 💔

wind turtle
#

i'm probably going to add one more joker then release it

manic rune
#

imagine cryptid with that tho

#

😭

wind turtle
#

that's what i've been testing it with lmaop

manic rune
#

my beloved

wind turtle
#

GIGA hanging chad

manic rune
#

can you demonstrate photogigachad please

wind turtle
#

it's the same thing but it retriggers 5 times

normal crest
manic rune
manic rune
normal crest
#

I don't know if there is

wind turtle
#

it crashes for some reason lmao

normal crest
#

personally I just write out the description without any colors before

manic rune
wind turtle
fallen vigil
#

please someone tell me why this doesnt work to destroy the cards held in hand

high stag
normal crest
#

what does your code look like now

#

only the condition at the start

manic rune
# wind turtle

if context.repetition and context.cardarea == G.play then
local firstCard = context.scoring_hand[1]
return {
card = firstCard,
repetitions = self.config.reps - 1,
message = localize('k_again_ex')
}
end

#

probably that?

#

i dont have a laptop rn so i cant even test

#

💀

#

and idk how different old calc is compared to better calc

normal crest
#

that will repeat every card that amount of times but make the first card jiggle a little bit

normal crest
# high stag

put the has_no_rank check in your loop, other_card is not defined in the before context

lucid owl
wind turtle
manic rune
#

i swear i coded smt to retrigger playing cards on my mod but im not on my pc rn

#

😭

lucid owl
#

good to see you

wind turtle
#

yknow what this broken card fits the mod way better

lucid owl
normal crest
# wind turtle yeah

if context.individual and context.cardarea == G.play and context.other_card == context.scoring_hand[1]a bit of a long condition

manic rune
#

❤️

wind turtle
lucid owl
#

why isn't card = card making the effect message show up on the joker? it's instead showing up on every playing card (i assume due to context.individual)

normal crest
#

if you want the message to show up on your joker do focus = card

wind turtle
#

so why's THIS crashing now

#

same error.

normal crest
#

by the way you should use card.ability instead of self.config

wind turtle
#

yeah

#

i just want to know why this card (without any for loops) is triggering an error about for loops

normal crest
#

you're in a very old version of steamodded

wind turtle
#

lemme update ig

lucid owl
normal crest
#

not really extra, only if you defined extra

lucid owl
#

fair

#

is there any explicit benefit or purpose to defining extra? i do it every time but don't actually really know why lol

spiral pivot
wind turtle
#

yeah doing that worked

#

"doing that" meaning updating

#

also my context.end_of_round is triggering for every card, not once

normal crest
#

do context.end_of_round and context.main_eval

wind turtle
#

i'm gonna just try adding and context.joker_main

wind turtle
faint plank
#

im probably doing this wrong

        if card.base.id == 10 then
        return 11
        end
    end,
wind turtle
#

Whoops! bad luck!

wind turtle
#

currently playtesting to see if it's possible to win with all the jokers (on white stake)

#

currently testing Refresh

#

refresh is bad 🙏

gaunt thistle
#

is this supposed to be a "vanilla+" mod?

wind turtle
#

god no

#

it's a huge shitpost