#💻・modding-dev

1 messages · Page 550 of 1

twilit tundra
#

cant play without joker

vast bough
#

not rn but im adding editions to jokerforge rn with just presets of vanilla shaders and i would prefer for them to actually be rendered instead of having still images of the shaders

ocean sinew
#

oh

#

wait since you said not rn

#

that means you'll do it

vast bough
#

yes that is the plan

#

this is a precursor

#

becuase i need a way to dynamically render shaders anyways

rotund sable
#

I think that was a plan from the start

cursive gazelle
#

i'm not a web dev but can you do normal shaders

vast bough
#

because of webgl

#

which is opengl for web

cursive gazelle
#

you can translate the shader

vast bough
#

that was my first thought

#

but

#

very difficult in a way to do dynamically

cursive gazelle
#

hmmmm

vast bough
#

i will keep at it tho im sure i can think of something

cursive gazelle
#

good luck

vast bough
#

i will re-try that translation approach but it is hard because love2d shaders are simplified opengl

#

it would be easier if i started with the complicated version and had to translate it to simple

twilit tundra
#

okay next question

how do i hide full home from the run info menu when you dont have the joker, but reveal it as soon as you buy it, even before you play it?

cursive gazelle
#

i'm sure you can find a lib or something

slim ferry
#

what is the point of match_indent in a patch?

wintry solar
#

it matchs the indentation of the pattern in the dump

#

with vs without

vast bough
# cursive gazelle i'm sure you can find a lib or something

there is love.js but its a little old and not suitable because i would in theory just be running an entire game in browser just to get a shader to work on an image. and there are programs for converting opengl -> love but not the other way around

vast bough
#

i will build something

red flower
tough bloom
#

hello, im trying to make a fusion joker from the mod but im having a problem. im basically combine square joker and spare trousers but for some reason i cant get it to work, im close though; the mult part works but not the chips

red flower
#

if you return in context.before you can't return again

tough bloom
#

so how do i combine it?

#

because i want the two things to happen before

twilit tundra
tough bloom
#

maybe but then i can do suddle spongebob referencs

red flower
#
if context.before then
    local returns = {}
    if #context.scoring_hand == 4 then
        card.ability.extra.chips = card.ability.extra.chips + card.ability.extra.chip_gain
        returns[#returns + 1] = {
            --message = localize{type='variable',key='a_chips',vars={card.ability.extra.chips}},
            message = "tee",
            color = G.C.CHIPS,
            card = card,
        }
    end
    if next(context.poker_hands[card.ability.extra.poker_hand]) then
        card.ability.extra.mult = card.ability.extra.mult + card.ability.extra.mult_gain
        returns[#returns + 1] = {
            --message = localize { type = 'variable', key = 'a_mult', vars = { card.ability.extra.mult } },
            message = "woo",
            color = G.C.RED,
            card = card,
        }
    end
    if next(returns) then
        return SMODS.merge_effects(returns)
    end
end
#

you can also use SMODS.calculate_effect

slim ferry
#

if i hook a function to do a calculate_context in it, can i check in the function if the context isnt already active? i dont want the possibility of the function getting called again during that context and creating an infinite loop

red flower
#

like G.my_context_is_running

slim ferry
red flower
#

no idea

#

i havent looked into how that works yet

slim ferry
#

hm alright

wintry solar
#

what function are you hooking?

slim ferry
#

level_up_hand

wintry solar
#

and do you call it in a calculate function that uses your context?

slim ferry
#

thats a fair point actually

#

i dont

#

so ig it isnt really needed

tough bloom
twilit tundra
#

how do you debug yourself in a joker again

versed swan
#

with DebugPlus, go to the Collection, hover over a Joker, hold CTRL, and press either 3 (spawn, needs space) or C (copy to area, does not need space)

red flower
crimson marlin
#

How do you make a function display ui? im trying to make an advanced config menu but I dont know how to display ui

    return {n = G.UIT.ROOT, config = {r = 0.2, minw = 90, minh = 90, align = "tl", padding = 0.1, colour = HEX('FFFFFF')}, nodes = {}}
end```
twilit tundra
#

oh never mind forgot to save the mod and put it there fixed

#

question: how do i make a planet's badgebox say something other than planet

for example, how eris pluto and ceres say Dwarf Planet, and Planet X says Planet?

oblique lotus
#

For SMODS.pseudorandom_probability, isn't the no_mod parameter supposed to prevent things like oops all sixes and cryptid's rigged from working, or am I misunderstanding it? I ask because I set it to true and it doesn't seem to be doing that.

tough bloom
tough bloom
red flower
#

oh it should be card.ability.extra.chips_gain

#

oh wait no

#

the opposite, the loc_vars should be chip_gain

#

dunno why it isnt going up

red flower
#

if it's your own card then use the badge functions (read the docs)

red flower
limber blaze
#

cryptids rigged probably doesnt take it into account since it was done before no_mod but oops is probably just a bug

chrome widget
#

Funnily enough I've actually made some local patches to debugplus to massively increase the amount given by the dollar button and to do different functions for adding jokers and consumables b/c at least from a while ago DebugPlus didn't set the used_jokers key for emplaced jokers and missed a couple of adding card functions/contexts

#

For example I have a joker that quips when other jokers are added and debug plus didn't send the contexts for those. Dunno if that's since been updated

red flower
#

i did see someone wondering why the debug button was giving like 100000 for them

chrome widget
#

On which?

#

Cardsauce has that at least

#

And so do all of my mods

red flower
#

yeah

chrome widget
#

Keku just got annoyed at spamming it. Give me $250,000 USD

red flower
#

i just do money set in the console

chrome widget
#

I don't use console commands much admittedly

#

I find them a bit clunky

red flower
#

now that it has a history and you can move the cursor its amazing

chrome widget
#

Oh wait you can move the cursor now

#

Rad

#

That was definitely a pain point

thick drift
#

Okay, so I've tried updating my Steammodded and even reduced the constraints on my code to just have the joker trigger on context.post_trigger and it's not even running the print statements on it. Is anyone else having problems trying to make a joker trigger on this or is it just an issue on my system?

chrome widget
#

Here's a photo of my cat completely unrelated to anything

willow scroll
#

why the hell is card.pinned not inside card.ability 🥀

#

my sticker generator was failing me because i thought it would be in ability like all other stickers :clueless:

tough bloom
red flower
#

context.full_hand

willow scroll
thick drift
#

Overpriced and rental? Greediest joker I've ever seen

willow scroll
#

wait this isnt modding chat

#

damnit

#

whatever i was making this guy work and "balanced" (that number goes up with each page 6 usage)

twilit tundra
red flower
gilded goblet
#

Who came up with pinned

#

The sticker

red flower
#

local thunk

gilded goblet
#

Wait really?

red flower
#

pinned is vanilla

#

i dont think its considered a sticker tho

gilded goblet
#

Oh that's why

#

I was gonna say

#

Because I did beat the knife's edge challenge and didn't see it

wintry solar
willow scroll
#

so its a sticker in my eyes

gilded goblet
#

Selection when

red flower
willow scroll
#

yeah vanilla its something else

gilded goblet
#

That'd be cool

willow scroll
#

right?

#

or does smods add that?

red flower
#

smods adds that afaik

willow scroll
#

ah the others tab actually doesnt exist in vanilla 💀

wintry solar
#

you can use ctrl+v in dbp

twilit tundra
oblique lotus
#

For SMODS.scale_card, do the values have to be in the same table? If not, how do you refrence it?

wintry solar
oblique lotus
#

Yes, I did, and I saw that it must contain ref_table. I was wondering if there was a way around it without a for loop, as a couple of my Jokers reference external values for their scaling.

wintry solar
#

Keep reading, it tells you about using scalar_table if its not in the same table

twilit tundra
#

hm
is adding the thing where the mod name badge turns itself into credits its own library/something i'd need to implement myself?
or is that a part of smods now

oblique lotus
median veldt
#

hai hello bump :3

it's not adding the sticker at all

twilit tundra
gilded goblet
twilit tundra
#

well i say “my” but i really just took somebody else’s idea they posted on bsky a while back, actually implemented it, showed it off to them and they went “wowowwwww yayyayyyyy!!!!”

red flower
#

with a colon

median veldt
#

OH right lmfao

#

i forgot you had to do that

gilded goblet
#

Been meaning to ask actually, how does : work in Lua?

#

. is used to access table values right?

#

Or something like that

red flower
#

card:is_suit() is the same as card.is_suit(card)

gilded goblet
red flower
#

syntax sugar for class methods basically

gilded goblet
gilded goblet
gilded goblet
shut monolith
#

I'm trying to add a boss blind, but I keep getting an error whenever I try to load it

#

(Ignore the name, tis silly)

gaunt prairie
#

whats the error

#

i havent modded in nearly a year but i can probably help

red flower
shut monolith
#

Oh I didn't know I needed that

red flower
twilit tundra
gaunt prairie
#

do you not have to register atlases anymore?

#

they used to be

  key = "Cards",
  path = "cards.png",
  px = 71,
  py = 95
}):register()```
red flower
#

nope

gaunt prairie
#

maybe theyre actually saving steamodded

#

it used to be so jank

red flower
red flower
median veldt
gaunt prairie
gaunt prairie
#

what have i missed

red flower
#

we dont really have many

gaunt prairie
#

😭

red flower
#

theres still no dependency manager

gaunt prairie
#

more than the whole none we had

twilit tundra
#

is this part of smods or would i need to like. dep on it

gaunt prairie
median veldt
#

wdym by that

red flower
twilit tundra
#

should i harddep on creditslib or like,

gaunt prairie
crystal perch
#

how would i have a joker give +1 hand size for each Club held in hand, kinda like turning all clubs negative but not literally

gaunt prairie
#

either way works

red flower
#

but that is not enough to get people to download them

gaunt prairie
#

yea

gaunt prairie
red flower
#

well,

#

it doesnt disable lovely patches

#

so it kinda breaks sometimes

gaunt prairie
#

i love when the game randomly cuts to an error

#

error jumpscare

median veldt
#

am I being stupid dumb or dumb stupid

median veldt
#

pisses me off when the error is weird and isnt actually where an error is happening and is somewhere in smods or base game

gaunt prairie
#

best thing is when the error randomly appears and you dont even know what you did

red flower
gaunt prairie
#

i wish it just froze the game and an external window told you the error

#

then you can see the games state still

#

also the amount of times i forgot to copy the error

#

dont know if its still the same but there was no logs for anything

#

so i couldnt relook at the error if i closed the game

#

and pressing esc closed the whole thing for some reason

red flower
#

there are logs now

next timber
#

how do i show a tooltip for an enhancement in a joker description? {C:attention,T:m_rendom_asbestos}Asbestos{} isn't working

median veldt
# red flower try `"eternal", true`

cool that worked

also

for i = 1, #G.jokers.highlighted do if G.jokers.highlighted[i]:has_sticker("eternal") then return false end

there is NO way this is correct LMFAO

next timber
#

ah right

gaunt prairie
#

i love how spaghetti balatro modding is

red flower
median veldt
#

oh wait also i dont think im doing this right at all either

gaunt prairie
#

everything seems so different to how it used to be

median veldt
#

its can_use
it shouldn't be used on jokers that already have the sticker

shut monolith
red flower
shut monolith
#

Oh damn that doesn't display

median veldt
gaunt prairie
#

the example resources we had were quite bad back then

#

i resorted to looking into balatros actual source code for example code

red flower
#

most people did and wrote terrible code so i needed to make a good resource

lament agate
#

how do you put juice up in return

#

or is it not possible

red flower
#

maybe there was a return for juice i dont remember, but why

#

cant you just do card:juice_up()?

lament agate
gaunt prairie
#

but it seems like smod has come a long way in the year ive been gone

median veldt
#

i love juice up so much why is it called that

lament agate
#

juicy

frosty rampart
versed swan
red flower
#

hi oinite

wintry solar
gaunt prairie
versed swan
#

hi n

wintry solar
#

you just need a main entry point

gaunt prairie
wintry solar
#

how is that spaghetti

red flower
gaunt prairie
versed swan
gaunt prairie
#

or there might be a different way thats shorter

versed swan
#

literally nothing's stopping me from further inquring with whoever designed the idea for a wiki logo but i just dont feel like it

red flower
#

you can do a loop throught the folder

gaunt prairie
#

but i dont expect much more than a bajillion similar lines coming from steamodded

red flower
#

i just didnt do it

limber blaze
#

you do not have to assert every file one by one

frosty rampart
#

you can also write a function that loops through a folder so you can call that function on multiple folders

lament agate
#

whats the username of cirno again

limber blaze
#

you can just code up a loader for it

red flower
lament agate
#

@cirnotv

red flower
hallow slate
#

How could I add a loc_var tooltip to a card if it has a certain suit?

median veldt
#

what colour should i use for "Eternal"
just attention?

i dont have anything in front of me that i can reference

crystal perch
lament agate
#

lmao

crystal perch
#
[manifest]
version = "1.0.0"
dump_lua = true
priority = 0

[[patches]]
[patches.pattern]
target = "globals.lua"
pattern = "RENTAL = HEX('b18f43'),"
position = "after"
match_indent = true
payload = '''
--  CHAK START
CHAK_ETHEREAL = HEX('6059a0'),
CHAK_ETERNAL = HEX('9e4d6e'),
CHAK_PERISHABLE = HEX('4f5da1'),
CHAK_RENTAL = HEX('b18f43'),
--  CHAK END
'''

[[patches]]
[patches.pattern]
target = "functions/misc_functions.lua"
pattern = "G.ARGS.LOC_COLOURS = G.ARGS.LOC_COLOURS or {"
position = "after"
match_indent = true
payload = '''
--  CHAK START
chak_ethereal = G.C.CHAK_ETHEREAL,
chak_eternal = G.C.CHAK_ETERNAL,
chak_perishable = G.C.CHAK_PERISHABLE,
chak_rental = G.C.CHAK_RENTAL,
chak_edition = G.C.CHAK_EDITION,
chak_sticker_ethereal = G.C.CHAK_STICKER_ETHEREAL,
--  CHAK END
'''

i did this cuz im extra

median veldt
#

yea ok thought so

gaunt prairie
#

lovely patching was lowkey so overwhelming for me when i used to mod

crystal perch
#

then just used chak_eternal

gaunt prairie
#

i made one patch and it made my brain melt

lament agate
red flower
crystal perch
#

cuz paperback did it and i copied lol

#

well not really

#

i did it back a long time, like half a year ago

#

someone said the method was lovely patch so lovely patch it is

red flower
#

tell that someone i hate them

crystal perch
#

lol

#

is there an SMODS way to define custom colours now?

lament agate
#

okay so like

#

which odds

#

the den or num

median veldt
gaunt prairie
red flower
gaunt prairie
#

i know you can for badges at least

crystal perch
#

well i just wanted to use colour codes

median veldt
crystal perch
#

like this

hallow slate
#

how could I add a loc_var tooltip to a card if it has a certain suit?

gaunt prairie
red flower
#

it always was

median veldt
#

amazing

frosty rampart
# lament agate okay so like

i dunno what you're asking about but the vars table you're returning needs to just be numerator and denominator, not card.ability.extra.... otherwise you're not actually doing anything with the values you got from get_probability_vars

gaunt prairie
#

to be fair i never really used custom colours besides in badges

median veldt
#

yeah

gaunt prairie
#

and i think a little bit of text

red flower
#

odds is den

frosty rampart
#

in your case it should be

...
return {
  vars = { card.ability.extra.mario, numerator, denominator }
}
red flower
#

base is num

wintry solar
#

O: it uses my nice call of the function instead of a hook

thick drift
#

what counts as a joker trigger? I've been trying to debug and get this joker to even trigger post_trigger and I can't even seem to do that regardless of whether I use a vanilla joker or one of my modded jokers

crystal perch
#

do you have it enabled

#

it's optional

#

you need to put

SMODS.current_mod.optional_features = {
  post_trigger = true
}

somewhere

#

js put it in your main.lua

thick drift
#

oh, I never saw that in the documentation. Guess I must have missed it. Thanks

shut monolith
red flower
#

1

median veldt
#

hey guys would it be balanced to change this to 1 joker but raise the multiplier

median veldt
shut monolith
#

I set the px in the atlas to the entire length of the sprite animation, instead of the size of 1 chip

thick drift
crystal perch
thick drift
#

Perfect, thanks guys

winter flower
#

how do i make it so every time you hover over this joker it has a different quote

frosty rampart
#

put all the quotes in the localization misc -> dictionary, under the names k_ocstobal_oxy_quote1, k_ocstobal_oxy_quote2, etc. then in the joker's loc_vars, pick a random number from 1 to [however many quotes you have] and then return in the vars table localize('k_ocstobal_oxy_quote' .. tostring(the random number)). and finally, in the line where you want a quote, just put #1#
that's the best way to do it, so that you can localize to other languages. if you really don't care about that you can also just define a table of quotes in the loc_vars and return a random quote from the table directly

frosty rampart
#

by changing it to one joker, especially if it targets a specific joker (e.g. the joker to the right), you have recreated oil lamp. and oil lamp's multiplier is 1.2x. so no it would not be balanced, unless maybe it only targeted a random joker

median veldt
#

should've mentioned that

frosty rampart
#

oh it's a consumable
yea that's a lot better then; i'm still hesitant to raise the multiplier because of perkeo shenanigans

median veldt
#

elaborate

#

wait

#

dont answer that

#

i remember what perkeo does

frosty rampart
#

yea if it's a consumable you can duplicate it lmao
technically the multiplier doesn't matter much if you can perkeo it, but a lower multiplier makes it more tedious and probably won't keep up with blind scaling as easily

median veldt
#

you know what that's. probably very true

#

alright i'll change it to one joker

#

i um
i don't actually know how to modify joker values

wintry solar
#

with great care

#

-# there's no official supported way because it's jank af

median veldt
#

figured as such

#

but like

#

but like how

frosty rampart
#

check how cryptid does it i guess? i dunno i don't usually like suggesting cryptid as a code reference, their whole system is a little weird

median veldt
#

yeah

#

i am NOT going to figure that out

frosty rampart
#

i do know the way they did it also really sucked for a while, but i think it's better now
(they used to just have a "misprintize" function that'd randomize joker values, and they had to finagle the function to guarantee the value they wanted. now the manipulate function should better support setting or multiplying values)

crystal perch
#

I have a seal that, when applied to Jokers, prevents the Joker from getting debuffed
this works for most things but a crucial thing it doesn't work with is perishable, so how would i make this override perishable's debuffing

calculate = function(self, card, context)
        if card.debuff or card.debuffed_by_blind then
            return {
                card = card,
                SMODS.debuff_card(cards, false, "orange_seal")
            }
        end
    end
median veldt
#

maybe i should just not

#

or well i COULD just only have this card exist when you have cryptid installed

#

but i don't really. wanna

frosty rampart
#

cryptid is licensed under gpl3, you could just rip out the manipulate function and slap it into your own mod and it'll all be fine and dandy 🔥 (unless it involves patches as well, in which case you have to go dig up the patches too)

non-zero chance that cryptlib has the manipulate function too

crystal perch
#

just copy the cryptid function into your own code

median veldt
#

cryptlib?

#

also

#

wait fr
like i dont have to credit or anything?

crystal perch
#

you should

#

just

-- write a lil comment crediting them
median veldt
#

fair 'nuff

crystal perch
#

and include the cred in your mod description & credits tab

frosty rampart
#

pretty much the only restriction is that the source code of the function you borrowed needs to have some way to tie it back to the gpl3 license (usually the easiest way is to make your mod gpl3 too)

frosty rampart
# median veldt cryptlib?

separate mod that came out recently that implements some functions and behavior from cryptid, but without any content

median veldt
#

okay really quickly though

#

aw it didnt do the thing

#

if u send a codeblock as a file it automatically removes the markdown and sends it with the file extension

median veldt
#

but theres so much i dont know what im doing LMFAO

frosty rampart
#

augh that's a big function
anyway at a glance it looks like this function still has the misprintize behavior i mentioned earlier, if you just pass Cryptid.manipulate(card) it'll randomize values
uhhhhh Card.no you probably don't need to worry about, it's only used to check if a card is immutable (which i assume you won't be implementing)

median veldt
#

okay so i should maybe just go through and drop stuff i dont need (for the most part)

red flower
median veldt
#

i know how to USE the function i just dont know how to make myself ABLE to

frosty rampart
#

in my opinion, this is simply Not Worth It™, but i'm not gonna tell you to just drop your idea. lemme go look at cryptlib real quick

median veldt
#

in my opinion, this is simply Not Worth It™
so like i kind of agree

frosty rampart
median veldt
#

i think what i'm gonna do is like

#

not do that unless i have more ideas that would require cryptlib

#

cuz

#

i don't really want to have a whole dependency for ONE thing

frosty rampart
#

fair enough
joker value manip is sadly just really jank, as eremel said all the way back at the beginning. possibly for the best, but still

median veldt
#

althouuuuuugh

#

i'm wondering if i could just steal this (with credit and the works ofc)

#

and also the talisman compat file so it actually works (I'll add my own talisman compat to my mod at some point i swear)

#

or i could just

#

use it

#

use cryptlib

#

and require it
and use ITS shit

#

yeah i think im gonna do that

#

how do i change my numbers to be talisman compat

frosty rampart
#

full 180 in 3 minutes 🔥
uhhhh vanillaremade wiki explains talisman compat iirc

crystal perch
#

unless i put it in the wrong spot

red flower
#

what's the crash and the code

crystal perch
#
calculate = function(self, card, context)
        if card.debuff or card.debuffed_by_blind then
            return {
                card = card,
                SMODS.debuff_card(cards, "prevent_debuff", "orange_seal")
            }
        end
    end
red flower
#

and what I meant is to do that when the seal is applied

crystal perch
#

yeah just thought that

red flower
#

the crash is because it says cards

#

i typoed

crystal perch
#

😿

#

but yeah ill just apply

red flower
#

also also

#

dont put function calls in returns

crystal perch
#

must i undo it in remove or is that not needed

red flower
#

yes

#

do seals have that

crystal perch
#

mine do

#

had to make a custom context

red flower
#

nice

crystal perch
#

i forgot who helped me with that

#

pepsi dog was their pfp

red flower
#

bepis

crystal perch
#

mhm

#

that worked thank you

open aspen
#

anyone know?

red flower
#

that looks funny

open aspen
#

it does

#

its seems weird that any patch would do that

median veldt
#

am i doing this correctly

frosty rampart
#

I think so

median veldt
#

alsoalsoalso how do you add a tooltip to a card
specifically for eternal

do i just put {T:eternal}{} anywhere or does it like. actually matter (and is the key right)

red flower
#

no, you put it in info_queue

median veldt
#

bwuh

red flower
#

info_queue[#info_queue+1] = {key = 'eternal', set = 'Other'}

median veldt
#

is that. in loc_vars or

red flower
#

yes

median veldt
#

i. what

#

i aint even DO anything

median veldt
red flower
median veldt
#

ah

median veldt
red flower
#

i mean an smods version just released

#

something might be broken in one of your versions

median veldt
#

i mean

#

i'm using a dev version from like a week ago

red flower
#

it could be that

median veldt
#

....achievements?????????

red flower
median veldt
#

i forgot that was a thing
still tho
where does one even FIND achievements like ingame

red flower
#

i think its in each mod menu

#

but i dont think ive ever checked

median veldt
#

ah

#

im sobbing what the fuck is this

twilit tundra
#

wawa

red flower
#

I'm guessing it's to display some symbol like #

#

oh or it could be to have spaces lol

winter flower
#

i dont think im doing this right

median veldt
#

stupid question
why is the negative like that

#

i thought it was gonna look like this

sturdy compass
red flower
#

is this for the random quote

winter flower
red flower
#

then thats completely wrong lmao

red flower
sturdy compass
winter flower
red flower
#

thats not what was in the screenshot T-T

#

how many quotes do you have

winter flower
#

4

red flower
#

its just this then

loc_vars = function(self, info_queue, center)
    return {
        vars = {localize('k_ocstobal_oxy_quote' .. pseudorandom("seed", 1, 4))}
    }
end
winter flower
#

ah

red flower
#

edited

winter flower
#

that makes a lot more sense than the tostring(number here) method i was told

red flower
#

you dont need to cast numbers to string when concatenating

#

but the idea is the same

frosty rampart
#

my bad lol
learning a lot of new programming languages this semester, i'm getting type cast stuff mixed up

red flower
#

its reasonable to assume you need to

#

i forget you need to do it with booleans

manic rune
#

is it possible to make just one node hidden

#

instead of making the entire uibox hidden 🤔

red flower
#

i think so

manic rune
#

i just noticed that the game completely hides the uibox that contains the buy & use button under conditions, and since the new right buttons are added to that uibox it just hides them too

3:

#

a workaround would be to make another uibox just in case that happens, including the new buttons specifically

#

idk

red flower
#

i think youre allowed to go to thunks house and ask him to fix it

manic rune
#

help

#

yeah i guess im going with the workaround then lmao

median veldt
#

I have too many suits LMFAO

#

I need to add config to my mod at some point

gaunt folio
#

balance? whats that?

manic rune
#

vro

median veldt
umbral zodiac
#

you are going to detonate

gaunt folio
#

might balance it by like limiting choices or something

#

like -1 choice of joker and booster

red flower
#

everything is free but no rerolls

median veldt
#

everything in the shop is free but rerolls are ass expensive

#

or that

manic rune
#

everything of one specific type is free, changes every shop

gaunt folio
#

in its current form i had rerolls free too 😭

manic rune
#

wtf?

median veldt
#

dawg

manic rune
#

dawg just give me pointer at that point

#

😭

umbral zodiac
#

bepis can ytou give me $4

manic rune
#

no sorry im poor

gaunt folio
#

ngl it was just to test

red flower
#

i actively think the worst balatro can be is shop simulator

umbral zodiac
#

can i give you $4 then

manic rune
#

yes :3

umbral zodiac
#

wait no sorry im poor

manic rune
#

3:

median veldt
gaunt folio
#

heres the idea

Rerolls start at $2 but the amount doubles, from 2 to 4 to 8 to 16 and so on

#

okay its really janky for whatever reason so might make them start at a higher price

manic rune
red flower
#

you

manic rune
#

wuh

gaunt folio
#

okay heres the balance

manic rune
#

gaunt folio
#

ill add the c:money to $10 later but you get the idea

red flower
#

sorry i need it to be money color to get the idea

manic rune
#

everything needs to be formatted else i cant read

#

sorry

gaunt folio
#

yeah ill fix that

manic rune
#

wait i just realized i have to fucking hook/patch to everything that draws buy_and_use_button to draw NOT_buy_and_use_button too

#

salmdslam

gaunt folio
#

one accidental side effect is i was dumb and didnt make the reset value after removing the card go back to 5 or whatever but it makes an accidental punish by making the permanent reroll cost start at $10 with no vouchers

#

like if you remove the joker

#

oops im an idiot and messed up the money color now is it legible

manic rune
#

why is this always being drawn regardless of whether the card is highlighted or not

#

wtf...

#

oh probably because i have to change .states.visible

tough bloom
#

im not sure why but this joker isnt applying the stored chips to the hand before final score is calculated

manic rune
#

context.joker_main doesnt exist in context.before

#

and any chips/mult added in context.before wont work iirc

tough bloom
#

i have it after at the end but it needs to be first?

#

i did that and it kinda works, it applies an nice blue ERROR instead of chips

#

i got it to work finally

stiff locust
#

dont you just love when your joker breaks so hard that when combined with its 2 best synergies, playing a hand hard crashes balatro

sullen hatch
#

how does one come up with joker names and art??

foggy ginkgo
#

Uhh

#

Anywhere but dev me thinks

gilded blaze
# open aspen

😭 that was my fault for not double-checking before the commit

#

check my PR

languid canopy
#

currently making a tag, im getting some problems, first one is that it crashes the game... for some reason, the other one is that he seems to dont load the sprite i made for him, can you guys pls help (and ping me)

faint urchin
#

I have a card that draws an image on the screen, but when it's done doing that it leaves these artifacts in the background that sometimes flicker in and out. Does anyone know how to get rid of this?

languid canopy
sullen hatch
slim ferry
#

do all the automatically scored enhancement config values have respective permanent bonuses?

#

nvm im blind lmao its just on the wiki page

hardy viper
#

a black rectangle

slim ferry
#

is there a way to get the total of all of a cards bonuses besides chips?

#

oh

#

there is damn

red cradle
#

How can I destroy voucher from player?

maiden phoenix
#

It won't unredeem them if you do

slim ferry
#

you can but it does nothing in 99% of cases

maiden phoenix
#

Cryptid had to make functions for that

slim ferry
#

because vouchers act more like consumables

red cradle
#

Thanks

slim ferry
#

what is even wrong with this? it literally knows context.destroy_card is a table yet it still keeps trying to tell me about a parameter mismatch

next karma
#

quick question, trying to see how to get a card similar to odd todd. like when it detects a certian card it adda an amount of chips

slim ferry
#

have you looked at vanillaremade

next karma
#

no whats that

slim ferry
#

every vanilla thing remade with steamodded

next karma
#

thank you!

rotund sable
#

also it's wiki is very helpful

sonic cedar
#

i can make this not repeat a billion times by just adding a flag right

#

also good morning

sonic cedar
#

morning! thanks

#

man

manic rune
#

woman

sonic cedar
#

hi

#

THE DAILY DOUBLE?

sonic cedar
red flower
#

ur flag game is weak

sonic cedar
#

what the FUCK N

#

😭

sonic cedar
daring fern
sonic cedar
#

oh my god i put it in the update

#

i may be stupid

#

thank you somecom good morning

manic rune
#

somecom

sonic cedar
#

yes thats what i call him is that bad

manic rune
#

maybe

sonic cedar
#

YOURE bad

#

mm

#

wait no

#

like in an
evil way

frosty dock
#

me when live backwards

sonic cedar
#

true

icy halo
sonic cedar
#

how do we tell him

manic rune
#

idk

icy halo
#

😧 😔

#

DOES HE KNOW?

#

(he doesn’t know)

sonic cedar
#

its funny because it used to be balala font but i changed it

#

because their periods and commas kept getting me confused

#

here's one back when it was balala

icy halo
#

😢

sonic cedar
#

anyway

#

currently using Hardpixel

icy halo
#

i need this in my godot engine

#

i will look into methods to achieving balala readable coder in godot engine

sonic cedar
sonic cedar
#

oh well look at me
actually thinking on the right track

#

go me woohoo

sonic cedar
# daring fern Yes.

hey do you know if you still return them* in the locvars though? or does it not matter in this case

*the flag now in card.ability

daring fern
sonic cedar
#

tysm

#

gdi (i realized after i forgot to check for card ability but a blunder is a blunder)

open aspen
#

i found it and figured it out in the end

daring fern
sonic cedar
#

so if it's ever at 0

#

not just by its own ability

robust marsh
#

is there a chance that anyone here knows how to hook the skip blind button so it just sends you into the blind?

hardy viper
#

both the relevant functions are gonna be in G.FUNCS but other than that idk

slim ferry
#

under what name do gradients get put into G.C? is just a mod prefix added to the key or does it become all uppercase like vanilla or smth

red flower
#

none

#

SMODS.Gradients.modprefix_key

slim ferry
#

i see

red flower
robust marsh
next karma
#

trying to make a joker add 1 mult everytime a card is destroyed

#

any tips?

frosty rampart
#

you'll find out how to do something when a card is destroyed in there

pastel kernel
#

How do you make a random effects joker?
(Does 1 of # things when scored)

frosty rampart
next karma
frosty rampart
#

then my second link will be very helpful

frosty rampart
red flower
#

i dont really recommend pointing out beginners to the scale card function, it makes a simple operation somewhat confusing

frosty rampart
#

hm i suppose

frosty rampart
pastel kernel
robust marsh
frank portal
#

Is there a way to make it so the joker can scale past the naneinf value?

pastel kernel
#

Naneinf is what happens when a score is too big for the game to read out.

red flower
frank portal
pastel kernel
#

Hmm

#

People might hate me for this

#

Have you tried doing exponential mult?

frosty rampart
frank portal
limber blaze
#

the way cryptid gets around it is by wrapping all value manipulation in to_big and then converts it afterwards if needed

faint yacht
#

...involves lenient_bignum-ing the values and number_format for loc_vars displays.

limber blaze
#

sdo instead of mult = mult * 2 you would do mult = to_big(mult) * 2

#

if you dont use to_bigs numbers dont automatiaclly get converted

#

so 1e150 * 1e160 is still naneinf even though bignums could handle it

frank portal
limber blaze
#

probably

crystal perch
#

any input on how i could work this better?

#

the effect works i just think it's worded weird

frank portal
# limber blaze probably

What else should I "to_big"-ify here then?
-# The code itself is not mine, I'm just trying to add Talisman compat to see how far this joker can scale.

limber blaze
#

dont to_number return values

#

big return values work

frank portal
limber blaze
#

yes

#

the to_big in the return also isnt needed

frank portal
#

Oh, ok.

frank portal
limber blaze
#

idk then

#

wait

#

its because youre converting everything to a number

#

dont do that

frank portal
#

Oh, got it.

#

Thanks for help!

winter flower
#

im a little confused on why it says nil still
#1# is just a 0, #2,3,4,5# are for the numerator and denominators
i'd assume #6# was the quotes but nope, doesn't show

knotty orchid
#

create card accepts multiple rarities?

robust marsh
#

can you modify ante_scaling in the middle of a run

red flower
robust marsh
frank portal
#

Now I have another problem: my score gets nan-ed when the joker scales to e1e6.

cursive gazelle
frank portal
vast bough
#

does any good samaritan have the images of the vanilla balatro editions just on a base card that would be spectacular, if nobody does no worries

cursive gazelle
red flower
#

doesnt the wiki have them

robust marsh
fossil nebula
#

i guess now when the new version released I can come back to this

crystal perch
#

<@&1133519078540185692>

#

@manic rune is there any way i could make a should_apply method for seals, like how stickers have?

red flower
#

check the release notes

frank portal
frosty rampart
#

it's only a score/number overflow if it's naneinf. just nan means something's borked in calculation

frank portal
cursive gazelle
#

Vanilla remade wiki got your back

#

Probably

#

Like 90% of the time

red flower
#

i dont have much stuff for talisman

robust marsh
#

i've seen this a lot but idk how to do it, how exactly would I go about changing a certain button's name? For example the skip button.

#

(skip blind)

red flower
#

put 'b_skip_blind' in misc.dictionary in your loc file

robust marsh
#

alrighty, ty

#

but uh, is there a way to make that conditional?

red flower
#

no you would need to patch the function that makes the button

robust marsh
#

alright

fossil nebula
red flower
#

SMODS.current_mod.calculate = function(self, context)

fossil nebula
#

do i replace current_mod with mod id?

red flower
#

no

crystal perch
#

how would i make my seals not be included in SMODS.poll_seal

#

so they can't be added to cards randomly outside of where i want

red flower
#

return false in in_pool i think

crystal perch
#

i don't believe seals have in_pool as an api method, at least not according to the smods wiki

#

ill try though

red flower
#

im saying it based on the code

fossil nebula
#

ok so i would like to make text appear here based on the number in main calculation

#

in simpler terms it just says here what modifier is active

#

i never touched ui stuff so i have no idea

slim ferry
#

ui 😨

red flower
#

good luck

fossil nebula
crystal perch
#

copy other mods 😁

fossil nebula
#

do you know any mods that add text there?

crystal perch
#

no!

#

maybe partners

#

never used it

slim ferry
#

partners adds a cardarea for the partner there i think

hushed field
long sun
#

for a consumable, what's the context for a held consumable for main scoring?

#

i.e. what a Joker does for joker_main

fossil nebula
#

im looking into ui documentation and i feel like im having a stroke

long sun
#

is it consumable_main?

crystal perch
#

look into how observatory works maybe

long sun
#

ah it is joker_main then

#

cheers!

hushed field
# fossil nebula ok so like

UI code is very much like having a stroke and can be hard to parse. If you want an example of how to draw UI, including text, in arbitrary places on screen, you can check out the Spellslinger Deck in #1340334060597285025 to see the visuals, which is all set up by this code https://github.com/icyethics/Kino/blob/main/src/spellslinger_deck_UI.lua

GitHub

a balatro mod for movie dorks. Contribute to icyethics/Kino development by creating an account on GitHub.

wispy falcon
#

Do I need to write a patch to change the main menu music?

red flower
#

you should be able to do it with select_music_track

wispy falcon
#

Is it documented?

red flower
#

yes

#

how do i put these over each other T-T

hardy viper
#

why is it

#

like that

#

is one of them meant to be a shadow

wispy falcon
red flower
#

im trying to add a count on a higher layer for joker display

#

without modifying the original

#

i just cant figure out how to line them up exactly

hardy viper
#

ohhh this is jokers

#

i thought it was deck

#

uh

wintry solar
#

why don't you just shift the text of the joker area?

hardy viper
#

yeah you answer that my answer prolly sucks

wintry solar
#

uhhhhh

#

left maybe?

#

that'd be a pain though

#

I was thinking down originally but this display box isnt a fixed size is it

primal robin
#

What you're trying to do

crystal perch
#

it's not

wintry solar
#

can you not just align it directly on top of the joker area?

red flower
#

no

wintry solar
#

how come?

red flower
#

it would get hidden by the top displays

wintry solar
#

no I mean this new area, why is it shifted vertically?

#

can't you just set it to be the same position but on a higher layer?

red flower
#

oh yes

#

thats what im trying to do

#

lol

#

i have the node for the count but idk how to set both to be in the same absolute position

wintry solar
#

do cardareas have a draw major?

#

I assume you already give it the same definition as g.jokers?

red flower
#

oh its not a cardarea, it's just the text node

#

my vscode crashed when i tried to screenshot wtf

slim ferry
#

where is a card's set stored? im trying to check for buying jokers specifically

fossil nebula
#

why adding a simple text on the right side is so complicated 😭

wintry solar
red flower
#

this is what im doing

#

this is the original ignore the js stuff

wintry solar
#

I wonder if you can just patch the instance type of that original text node

red flower
#

i tried haha but I also want to try to avoid patches in jokerdisplay

#

this would also make it easier to disable

#

ok now its shifted horizontally

#

now i just need to combine both

red flower
crystal perch
#

how would i destroy a sold card before it gets sold

#

this doesn't work btw (it's on a voucher)

if context.selling_card then
    SMODS.destroy_cards(card)
end
versed swan
#

does anyone know how check_for_unlock works? i tried looking at its code and understood little of it

winter flower
#

how do i make it so that a joker has a different image if you have a specific joker
(like in almanac if you have godsmarble some jokers change)

red flower
#

card.children.center:set_sprite_pos{x = new_x, y = new_y}

fossil nebula
#

any idea why it's not working?

grim remnant
#

silly question. is it possible to check for a playing card being given an enhancement/seal/edition? i'm trying to make a joker that scales based on how many cards you enhance/give a seal or edition :o

#

like. in shitty psuedocode, is there some equivalent to if context.playing_card_modified and not context.blueprint then

frosty rampart
#

yea i don't think there's a dedicated context for it unfortunately

zealous glen
#

How to update to use the new probability stuff

#

or rather where can I read about it

red flower
wispy falcon
#

How do I use the select_music_track function for changing the main menu music?

grim remnant
wispy falcon
#

How do I make it not slowed down?

zealous glen
#

I guess I had looked at Github Discussions since that's where the new release's notes are

#

what is Github Discussions

wispy falcon
slim ferry
#

creating contexts is suprisingly easy, especially if you arent handling any custom return values

grim remnant
#

uh. how do that. sorry it's. Been awhile since i've worked on my mod and my lua is rusty, whoops. (i do assume such a custom context would be at the top of my main lua file at least?)

slim ferry
#

one of my custom contexts as an example, which adds a context to ease_dollars being called. you just call SMODS.calculate_context in a hook of some function, and then the only argument you need is the table of context flags

#

you can ignore the local flags stuff, thats just for handling custom return values

zealous glen
#

maybe via the set_ability context

grim remnant
#

wait, actually? gimme a sec

slim ferry
#

its context.setting_ability, though that includes initial card spawning

zealous glen
#

set_ability is the name of the function

#

I didn't name the context

#

because Idk the name

slim ferry
#

omfg

#

idk if it allows for modifying the amount though actually

zealous glen
grim remnant
#

shitty pseudocode but would it be like. if playing_card = context.set_ability and not (the context for adding or removing a card from deck) and not context.blueprint then

zealous glen
#

what's the difference between scaling when you add a card with an Enhancement to the deck and when you count the number of cards with an Enhancement

slim ferry
#

vampire ig

#

or other enhancement removal

#

or destroying cards

grim remnant
#

yeah, it's so that if the card becomes kaput, you keep the scaling

wispy falcon
#

How do I make my music not slowed down and only play in the main menu while using select_music_track?

slim ferry
#

the game plays music at a slower speed by default

#

just speed up your music file

red flower
#

i think pitch = 1 fixes it

slim ferry
#

and idk if you can check if its from being created or not

slim ferry
#

why not

zealous glen
# slim ferry why not

if I want to encourage players to play with an Enhancement, I want them to play with it

#

not without it

grim remnant
#

because i want the card to work, very specifically, based on when cards change? not really sure how else to answer that ^^;

zealous glen
#

I'm asking why you want it to work in this specific way instead of another way

slim ferry
#

why are you questioning game design in modding-dev vro

wispy falcon
grim remnant
#

i'm just trying to make the concept work here, i'm not exactly here to explain my design philosophies

zealous glen
#

XY problem

slim ferry
#

this is not an x/y problem moment this is you just being annoying about how someone wants to implement something

ocean sinew
#

drama 😱

zealous glen
#

I don't think I am being annoying

grim remnant
#

like, what, do you want me to go in-depth as to why exactly the effect makes sense because of the funny reference that the card itself is about, infodumping about several paragraphs of story about it, all in the pursuit of knowing how exactly i should code the thing? ;P

zealous glen
#

I explained how they can accomplish their goal

#

Then I asked why this specific goal

slim ferry
#

you asked what the difference between counting current enhanced cards and scaling when a card is enhanced and i gave you an answer

zealous glen
slim ferry
#

and again, its a coding question in modding dev, you have literally no reason to go into a discussion about game design

zealous glen
#

I think this space is for game design as well

slim ferry
#

well yes

#

but you can do that when someone asks

#

and not randomly

red flower
#

i agree

slim ferry
#

when i ask a coding question in modding dev im not here to go into game design discussions

#

im here for an answer to my coding question

frosty rampart
zealous glen
zealous glen
slim ferry
#

?

zealous glen
#

I'm not sure what "randomly" would mean here

slim ferry
#

okay cool that you asked but not my point

#

randomly would be going into a game design discussion with someone who did not ask to have such a discussion

zealous glen
grim remnant
#

...big surprise, this didn't actually detect anything, since i am. Almost definitely not using set_ability right whatsoever. alright, what am i doing wrong here. ^^;
if context.set_ability and not context.playing_card_added and not context.remove_playing_cards and not context.blueprint then

slim ferry
#

its setting_ability

red flower
frosty rampart
grim remnant
#

okay, setting_ability does properly proc for enhancements, but not seals or editions. how do i do that? :o

zealous glen
red flower
#

there are no context for those

#

you would need to hook the functions

slim ferry
slim ferry
zealous glen
slim ferry
#

if you destroy a card then its not in your deck anymore

#

and therefore you cant count it

red flower
#

the first is a difference

green mica
#

I used take ownership to change the name of j_joker but it seems to have removed the description as well for some reason... trying to change the description with loc_txt also leaves it blank. Any idea what I might be doing wrong?

zealous glen
#

Ah wait I got what you meant now

red flower
zealous glen
#

Can't you do it by taking ownership though?

wispy falcon
#

How do I make my soundtrack only play in the main menu?

zealous glen
#

I feel like this is a case where they should take ownership

red flower
slim ferry
#

i dont think theres any difference

#

and that

red flower
#

you could return a key in loc vars

#

but sounds too complicated for this

zealous glen
slim ferry
#

okay same with take_ownership

zealous glen
#

because only one name can be applied

red flower
zealous glen
#

What do you mean?

#

There's no solution

slim ferry
#

malverk allows custom descriptions

zealous glen
#

One mod changes the name and the others don't

red flower
#

malverk (apparently) allows you to define loc for texture packs

zealous glen
#

take ownership just gives a message

slim ferry
#

have you literally ever used malverk

green mica
#

Hmm I'll have to figure out how localization files work I guess haha

zealous glen
#

But I'm just saying it will conflict anyways

red flower
#

how

slim ferry
#

no it wont

green mica
#

loc_txt was good enough for making custom jokers so I haven't learned this yet

zealous glen
#

Taking ownership will just generate a warning message

slim ferry
#

malverk allows you to make a priority list

#

of what packs take priority over others

zealous glen
#

Malverk can allow one texture pack to take precedence

#

Either way

#

There's conflict

red flower
#

ok

slim ferry
#

changing names isnt crucial to the function of a mod

zealous glen
slim ferry
#

so does it even matter

grim remnant
#

alright. stupid question. how do i hook into Card:set_seal() and make a function that's like. "hmm yes when a seal is added i do the thing!". because uh. i'm trying to modify another custom context into this and it's. well. Beyond nonsense.

function Card:set_seal()
    if self.ability.set == "Joker" and self.added_to_deck and not context.playing_card_added then --this line makes no fuckin' sense i'm shamelessly editing a custom "on joker destroyed" context and then trying to morph it into checking for seals
        SMODS.calculate_context({setting_seal = true })
    end
end```
slim ferry
#

remove the context check

zealous glen
#

I just think it's good to take ownership here to generate a warning something didn't happen as intended instead of it being a silent "error"

grim remnant
#

obviously if self.ability.set == "Joker" is nonsense but i'm at a loss for what to change it To

slim ferry
#

just dont check at all

#

you dont need to check for anything in this case

zealous glen
#

I mean they could check the set

red flower
zealous glen
#

and maybe where the card is

zealous glen
green mica
#

Wait I just realized I was editing the wrong copy of the lua file, taking ownership with loc_txt worked fine 💀

zealous glen
#

and creating too much conflict

grim remnant
#

didn't like that but also i 100% think i took this too literally

function Card:set_seal()
    SMODS.calculate_context({setting_seal = true })
end```
slim ferry
#

you need to still

red flower
slim ferry
#

call the original function in a hook

zealous glen
zealous glen
red flower
#

well then we were having different discussions

slim ferry
zealous glen
grim remnant
#

(tho talisman is an active dependancy)

slim ferry
#

unless you have ^mult or above you shouldnt need a talisman requirement

grim remnant
#

(it's ^mult)

slim ferry
#

okay

zealous glen
slim ferry
#

numberslop mfs when i show them {infinity}infinity chips and mult

grim remnant
#

since for context, this is the current state of the calculate for the joker

        --check if a playing card changed somewhere
        if context.setting_ability or context.setting_seal and not context.blueprint then
            card.ability.extra.Emult = card.ability.extra.Emult + card.ability.extra.scaler
            return { message = "+^" .. tostring(card.ability.extra.scaler) .. " Mult" }
        end
        --the primary joker effect of actually giving Emult
        if context.joker_main then
            return {
                Emult_mod = card.ability.extra.Emult,
                colour = G.C.DARK_EDITION,
                message = "^" .. tostring(card.ability.extra.Emult) .. " Mult"
            }
        end
    end```
grim remnant
zealous glen
#

@grim remnant do you intend for your mod to be used with Cryptid

grim remnant
#

it's meant to be a companion to it but it's meant to work standalone, hence i'm testing without it

zealous glen
#

first as a reference but also to avoid conflicts

slim ferry
#

i thought it did

zealous glen
#

If they have Quantum Seals I think that might break this Joker

slim ferry
#

they dont have quantum seals

#

or really quantum anything

zealous glen
#

-# yet

slim ferry
#

well yeah but you cant see the future

zealous glen
#

Don't they use quantum enhancements

#

MathIsFun was the one who developed it IIRC

slim ferry
#

maybe? but context.setting_ability probably already accounts for that since theyre both smods features

zealous glen
#

for Cryptid

#

then PR'd it to SMODS

zealous glen
slim ferry
#

well yeah but they dont have that

zealous glen
#

nor Quantum Editions?

slim ferry
#

nope

grim remnant
#

from the looks of it there's nothing in cryptid that expressly is like "on setting a seal" or "on setting an edition"

zealous glen
#

if they had quantum seals or editions it could be similar

#

but if they don't good for you

grim remnant
#

the only instance of a quantum seal i could find (read: saw on balatromods wiki) was. from a paper mario: color splash themed mod. which... i think i'm fine. ;P

slim ferry
#

i dont think that mod even gets updated anymore

zealous glen
#

I wonder if @daring fern has input

slim ferry
#

idk if seals on every has quantum seals