#💻・modding-dev
1 messages · Page 494 of 1
Nvm
its probably something with my jokers' code
seele retriggers scored cards once, but when bronya retriggers her then the card retriggers become like, 5
spent 30 mins reading and for some reason im just not getting it
to be fair i coded those jokers when i first began modding, so
well, what are you not getting
how is it saving? just the first line?
and do i need to hook for every seal?
what function do i hook?
yes, when you assign the function to a variable you're saving a reference to that function
you would only need one hook
something told you what to hook
so i hook Card:set_seal once , then i call the hook function instead of Card:set_seal?
no, hooking is adding your own code to an existing function
so your code would be ran whenever the game calls Card:set_seal
so i hook card:set_seal then use card:set_seal wherever
Yes, it would be the original function but with your changes.
i see im starting to get it now
then if i want to merge seals instead of replacing
i hook card:set_seal
add the functionality of merging
then use card:set_seal wherver normally
In your case it would be something like: ```lua
local oldsetseal = Card.set_seal
function Card:set_seal(_seal, silent, immediate)
if self.seal == "Red" and _seal == "Red" then _seal = "Seals_DoubleRed" end
return oldsetseal(self, _seal, silent, immediate)
end
and i dont need to care about consumables?
like i did here
i was gonna do this for each consumable that added seals....
if those consumables call set_seal then a hook is all you need
okay good luck i sleep
good night
do i need to add them inside a Smods.something {}
If you formatted the keys like I said you could just do: ```lua
local oldsetseal = Card.set_seal
function Card:set_seal(_seal, silent, immediate)
if self.seal and _seal then seal = "Seals"..self.seal.._seal end
return oldsetseal(self, _seal, silent, immediate)
end
No.
ive added a push to make it work a bit with smods
also im curios how you got undefined field G.play
i see thx
How does one make quantum ranks effect poker hands?
@daring fern so i made this hook...
for every seal comp possible
not working...
What the fuck
Are you returning oldsetseal(self, _seal, silent, immediate)?
SMODS.calculate_context({ seal_added = true, cards = context.scoring_hand })
is this how the seal application is checked for?
No?
ok how do you make this but for gold seals?
SMODS.calculate_context({ edition_added = true, cards = context.scoring_hand })```
What is the goal?
text = {
"This Joker applies gold seals on first played hand,"
"gains {X:chips,C:white}X#4#{} Chips and {C:money}$#5#{} Money.",
"each time a card with a {C:gold}gold seal{} is played.",
"Retriggers played cards with a {C:gold}gold seal{}",
"Stockpiles {X:chips,C:white}XChips{} and {C:money}Money{} for each played card,",
"which also resets on the final card.",
"Gains an extra Stockpiling Power of {X:dark_edition,C:white}+#2#{} whenever a boss blind is selected.",
"{C:inactive}Currently {}{X:chips,C:white}X#4#{}{C:inactive} Chips and {}{C:money}$#5#{C:inactive} Money.",
"{C:inactive}Stockpiling Power: {}{X:dark_edition,C:white}X#3#{}{C:inactive}.){}"
}
Why do you need a context for when a gold seal is added then?
if context.before and context.main_eval and G.GAME.current_round.hands_played == 0 and not card.ability.extra.first_hand_triggered then
local talisman_cards = 0
for _, playing_card in ipairs(context.scoring_hand) do
if not playing_card.seal or not playing_card.seal == 'Gold' then
playing_card:set_seal('Gold', true)
talisman_cards = talisman_cards + 1
end
end
if talisman_cards > 0 then
return {
colour = G.C.MULT,
func = function()
G.E_MANAGER:add_event(Event({
func = function()
SMODS.calculate_context({ seal_added = true, cards = context.scoring_hand })
return true
end
}))
end
}
end
end
i'm taking spinel and rainbow dash's code
this one is from rainbow dash
Remove the SMODS.calculate_context, because that context doesn't exist.
and the entire G.E_MANAGER?
No, remove the entire func
And everything in it.
Is there a way to make all hands considered a certain hand
Yes.
What would it be
Ah
Thank tou
Wait so
if context.evaluate_poker_hand then
replace_poker_hands = "Pair"
end
Would it be like this?
No.
I might be a little confused
if context.evaluate_poker_hand then
return {
replace_scoring_name = "Pair"
}
end
posture check devs
And it's not working
It still shows 5 flush
Nvm I'm dumb
I put it in the wrong area
Gonna die with cringe brb
It's all working now
I put it on the wrong joker
Sorry something...
i'm stupid as fuck umm```lua
add_to_deck = function(self, card, from_debuff)
if not G.GAME.current_round.rainbow_dash_reset then
G.GAME.current_round.rainbow_dash_reset = true
local original_reset = G.FUNCS.reset_game_globals or function(run_start) end
G.FUNCS.reset_game_globals = function(run_start)
original_reset(run_start)
G.GAME.current_round.rainbow_dash_reset = true
for _, joker in ipairs(G.jokers.cards) do
joker.ability.extra.first_hand_triggered = false
end
end
end
end
G.FUNCS.reset_game_globals doesn't exist.
Probably invalid atlas specified or something is wack with the .png itself.
weird
this not working
any idea why?
if context.individual and context.cardarea == G.play and context.other_card:is_face() then
card.ability.extra.face = true
end
if context.individual and context.cardarea == G.play and context.other_card:get_id() == 7 then
card.ability.extra.number = true
end
if card.ability.extra.number and card.ability.extra.face then
xmult = card.ability.extra.xmult
end
end
}```
You need a context check.
Also you need to return.
if context.joker_main
oh yeah
How would one clone a joker twice
for i=1, 2 do
local copy = copy_card(card)
copy:add_to_deck()
card.area:emplace(copy)
end
How do I chance the cost of those clones
You mean you want to have a chance of deducting money?
Yes.
Is it like context.card.cost = 0
for i=1, 2 do
local copy = copy_card(card)
copy:add_to_deck()
copy.ability.extra_value = -copy.cost
card.area:emplace(copy)
end
How is one this wise
Hard drugs
is there a way to easily reset variables?
so like if you turned something true you could set it back to false?
im trying and it aint working
How can i make the current blind harder? ive been experimenting with G.GAME.blind. and im trying to make a consumable make the blind have 2x chip requirements, is this possible?
G.GAME.blind.chips = G.GAME.blind.chips*2
G.GAME.blind.chip_text = number_format(G.GAME.blind.chips)
you have two context.end_of_round and the first one returns before the second one
also context.before and context.individual are not true at the same time, and again you have two context.before of which the first returns before reaching the second one
what do i do to fix that
you need to combine both end_of_round and before checks into one and remove the context.individual from the before check
if context.end_of_round and context.game_over == false and context.main_eval and not context.blueprint then
card.ability.extra.stockpile = card.ability.extra.stockpile_return
return nil, true
else
if G.GAME.blind.boss then
card.ability.extra.stockpile_return = card.ability.extra.add + card.ability.extra.stockpile_return
card.ability.extra.gold_seal_retrigger = card.ability.extra.gold_seal_retrigger + card.ability.extra.add
return {
message = localize('k_upgrade_ex'),
colour = G.C.EDITION,
card = card
}
end```
no, that will just make the else block run in every other context
I strongly recommend brushing up a bit on basic lua
oh wait, fuck i didn't even see how the stockpile works
stockpile was looking for context.end_of_round
not context.after, which was the intended context
i guess there's two context.individuals too
hey it gains xmult and money now
here's the new joker code, in case you're wondering
This new sisyphus prime is the one i've been trying to make
How to check is consumable behaves like soul/black hole (cannot be obtained from seance or by ghost deck or smth)
but i think this joker should change identity, the original sisyphus prime is already broken enough
what should i name it?
center.hidden?
Maybe
is it not card.config.center.hidden
I'm checking centers
yeah i assumed sleepy was checking centers
rrright
Check for unlocked also weird
In SMODS everything have unlocked
But in vanilla only jokers and vouchers
oh right I actually came here to do something
how do I check what type of pack you're in
SMODS.OPENED_BOOSTER.config.center.key?
.kind, then. Or .name.
its kind i think
only for vanilla packs
yeah
I doubt modded packs have it
mine do
Why not enforce it?
I have kind, but not name.
seems strange to enforce a value that doesn't do anything
How I should determine what type of this booster pack then
SMODS.OPENED_BOOSTER.config.center.kind if present, otherwise, SMODS.OPENED_BOOSTER.config.center.key. 🍞
I'll wait until this hole will be fixed ig
Haya made a joker which increases "level" o booster packs in shop. 2 problems:
- you can't determine type of booster pack
- you can't determine level (regular, jumbo, mega or custom) of booster pack
Sounds like other mods will just have to define "tiers".
why should a booster have a type or a level tho
because I exist
type in this case a kind
true!
N'
bepis
but yeah currently atm im relying on key names to change tiers for that joker
which is not very good
arlan or natasha
Arcana packs will have "Arcana" as their .kind...
Because it's vanilla
I do think a level field would be cool but I don't think it should be mandatory or even automatically assigned
Modded does not
natasha
Most will not have a .kind.
it's also not something that's always relevant to packs
Either the upgrade should "swap" the pack to a "better tier" or call a function that does stuff to the pack on its' own.
for the people interested heres the code im using for upgrading pack tiers https://github.com/hayaunderscore/PayasTerribleAdditions/blob/experimental/content/jokers/rare/friend/kacey.lua
does not account for
- any pack that does not contain tier names in its key
- packs that have different tier names (e.g. ortalab, I've hardcoded an exception for that here)
- tiers that don't end with the pack skin index
- literally any pack that isn't named like a pack
I love a bit of hard coded jank 👍
I'm currently trying to rework a Joker i'm creating to decide the bonus given based on the outcome of an rng function. Is there a way to implement this based on the seed, and not pure randomness?
pseudorandom(pseudoseed('seed'), 1, 4)
instead of math.random
epic, thanks!
-# ...hm, how do I skip the cashout...
Odd problem. I've got the deck set to High Contrast, but it's pulling from the Low Constrast vanilla deck
Is there a limit making it so I can't have all of my jokers on the same y level?
hey, does anyone know how I can change where stickers are supposed to appear on unconventionally shaped jokers? like photograph, for example
So like, a per-card offset of the stickers? Do you have an example of what they look like atm? I rarely take the oddly-sized jokers
sure, I'll just post the png here in a sec
actually, a screenshot might be better
small lil guy right in the center
and also, I guess I might need to do that for the torn corner one as well
I see, yeah.
I think you're going to have to make a special case in your lua code for the joker to override the default behaviour. I'm not sure of how, but I can try to help you look if you remind me. What
What I'd recommend is checking how the base game draws the stickers
maybe I missed something in the documentation, I'll look through it again
oh dur there's literally a sticker page how did I miss that
It happens. I haven't even read the documentation yet except for the parts relevant to what I've been trying to do.
that's pretty much what I've been doing.
workflow: think of idea > try and free hand it > cry > read relevant documentation > try and fix it > cry again > ask this channel > realize what I've been trying to do is clinically insane
That's indeed half the process, the other half basically involves deciding to do it anyway and a long process to learn/experiment until you get it.
I've been putting off working on some of ( in my opinion ) my more interesting jokers because the involve changing the rules of the game.
throwing spaghetti at the wall until it sticks, and until your code necessarily becomes spaghetti
oh no 
that is actually a really creative way to implement negative playing cards tho
sounds hellish to code tho lmao
I feel like... it definitely could be.
this doesnt work?
I've basically gotta learn how the game processes things by default because I know little about it so far
you know, this makes a lot more sense than what I was literally just about to do
the workflow holds true lol
funnily enough, when I was trying to figure out how to make that smaller joker work the way I wanted to I managed to make playing cards appear in a really weird state that reminded me of that functionality, let me find the clip
I don't remember how I fucked it up that bad, I just remember my friends and I getting a real kick out of that
Does XChips already exist in balatro's code?
no, but smods adds it
I don't think it does in base game but I'm pretty sure it's in smods
ok thanks
what page of the documentation is this btw?
oh it's on the joker page, I was looking on the atlas page
tried this and it's only spitting out money, doesn't seem to be outputting an actual value
show your code
i just replaced math.random with the pseudorandom
Like this ^
how would you suppose I change where the stake sticker displays on the joker with the torn corner? since then, I have discovered that the sticker documentation is talking about building functional stickers like eternal, rental, etc. and not the cosmetic stickers, so that wouldn't actually work for what I'm trying to do
It worked flawlessly for the smaller photograph sized joker though, so thanks for that :)
no idea honestly
I think youd need to hard code the positioning for your joker
Nice!
that was COMPLETELY unintended btw lmao
it was supposed to make a copy and include it in scoring, but ended up making that weird ghost card that just kinda stayed there. it works properly now, but that bugged version was really funny to me
hi dilly
Hihi
morning :-)
Hi meth how are you
Im alright, slept at a more average time the last couple of days which is nice
Got some stuff I gotta try and do today so hopefully I stay on top of it
Im glad things are on the up and up for you :)
im sure probabilities were intended to be used this way
What if I did this to your paycheck
that would be cool i think
how do i check if a card is a joker again
this is simple but i can't think of a reference
card.ability.set == "Joker"
When people are programming/doing support and they encounter errors that aren't immediately obvious about what caused it in SMODS could you ping me with the error message and cause. I want to make a list and try to make the most common of these more obvious what went wrong.
i can do a list of the common ones i can remember
do they have to be smods specific? there are some UI ones that are common
Can anyone help me with this error? I dont know where the unexpected symbol is
Oh ok
iterate through G.shop_jokers.cards and check for card.config.center.rarity
Smods or vanilla. Mostly just not issues caused by other mods or their apis
It says the same in line 289
the return should go at the end of the block
So card part as well?
can you copy it here
loc_vars = function(self,info_queue,center)
return {vars = {G.GAME.probabilities.normal, center.ability.extra.chance, center.ability.extra.Xmult_mod, center.ability.extra.Xmult}}
end,
calculate = function(self, card, context)
if context.full_hand == 1 and context.destroy_card == context.full_hand[1] and pseudorandom('ring') < (G.GAME.probabilities.normal / card.ability.extra.chance) then
card.ability.extra.Xmult = card.ability.extra.Xmult + card.ability.extra.Xmult_mod
return {
message = 'upgrade'
}
end
if context.joker_main then
return {
Xmult_mod = card.ability.extra.Xmult
}
end
end
Oh hell nah
This thing misses tabs
you can add
```lua
```
to format
this seems to be fine, it's probably complaining about another part of the code
context.full_hand == 1 is incorrect tho
Really?
there are no syntax errors, unless the game is crashing because of the full_hand thing
setting up vscodium rn and i want to know if there are any good extensions to get for this
So how do i rid of this thing?
how do i get this onto there btw
you should be able to search for it from the extensions panel in the sidebar and install it from there
i assume itd be this one in the extension list
yep that's it
Here
that's a hell of a mod description 😭
you didnt save?
is there anything else i should do now that i have the lua extension or is it good to go
I did! What the hell?
i recommend opening your entire mod folder to code so you get the SMODS and balatro autocomplete
or you can set up the vscode settings for it
I did save it before i sent it here and it looks different
Wait what? This thing didnt even saved my changes 😦
im trying to figure out how to make a mod
🤨
Oh!! Are you new to it?
oh absolutely
greetings winter
Hello!!!!
Also someone messaged me earlier talking about saving and loading cardareas which I do have knowledge of but it was at like 5 AM my time and I was honk shoe mimimimimimimi
i have 30 joker effects planned already but no idea how to code them lol
i always recommend https://discord.com/channels/1116389027176787968/1349064230825103441
as well as looking through the smods wiki https://github.com/Steamodded/Wiki
and vanilla remade https://github.com/nh6574/VanillaRemade
oops, wrong paste for second one
i have the smods wiki and vanillaremade bookmarked already
Most joker effects as you'd see in Vanilla are actually pretty easy to implement in the current SMODS versions. It can get funky if you do more complicated things obv but it depends on what you wanna do
this is the one i want to start with
Oh! This is the using_consumable context
okay first thing i want to know is how to set everything up properly
Basically any joker declaration is just one big function call, using SMODS.Joker
Is there a way so i can disable the negative filter on a joker? (It always spawns negative)
What do you mean?
hmmm what do i do for the main mod file
Negative inverts the colors of the card art
Yes
Basically, the main model file is what is loaded first. In typical Lua, it's main.lua, though with the metadata for your mod you can name it anything really
Either way you can load new jokers directly in your main file or use it to load outlying files for better organization
I want it to not do that for a specific joker
who can only spawn one way and its always negative
this is probably like a really generic thing to ask but how do people add a card to the title screen?
preferably the latter, i have plans to add a new consumable type and i would also like to organize my jokers based on tier
I guess you can set it not draw the shader
I'm probably not the best person to ask for general use unfortunately because I have a very specific proprietary loading setup to make a couple of things easier
invert the sprite
Lame n lazy
hi moddingchat
how would i have a random tag be generated with add_tag? do i have to make the table myself or is there something preexisting (that is supported by add_tag)?
look at cryptid pickle
I’m not aware of a pre-existing function but that is a good idea and I will add one
niiice
oh my
should i look at other mods to see how they load stuff
wheres the code for the collabs tab of the credits menu located
Dont forget orbital tag exists
But something like this should work
local tag_pool = get_current_pool('Tag')
local selected_tag = pseudorandom_element(tag_pool, pseudoseed('ortalab_hoarder'))
local it = 1
while selected_tag == 'UNAVAILABLE' do
it = it + 1
selected_tag = pseudorandom_element(tag_pool, pseudoseed('ortalab_hoarder_resample'..it))
end
add_tag(Tag(selected_tag, false, 'Small'))
hiii
Trying to screw with the fonts rn, I've got code into the lang init func but I can't seem to refer to my mod dir in the payload - anyone got a solution that doesn't involve %appdata%? (tryna keep compat w/ linux)
[manifest]
version = "1.0.0"
priority = 9999999
dump_lua = true
[[patches]]
[patches.pattern]
target = "game.lua"
pattern = "v.FONT = love.graphics.newFont( v.file, v.render_scale)"
position = "after"
payload = '''
if _ == 1 then
v.FONT = love.graphics.newFont("Hm6x11plus.ttf", v.render_scale)
end
'''
times = 1
match_indent = true
``` got this so far
That would also make it look inverted on the collection
trust me lovely hurts my brain enough, ive tried to find a way to refer to my mod's dir in the payload but i cant
I don’t remember if the stuff to make orbital work is something I have patched in or not though
ok then instead of having the card be negative couldn't you just make it add a joker slot
like cant u have one without the other
cryptid has a thing for that in pickle so i can just use that
Youd want to adjust this draw step https://github.com/Steamodded/smods/blob/main/src/card_draw.lua#L240
I’m pretty sure it’s just the third argument being small
oh so it's already in your in your thing got it
I believe so
bpmump
is there anywhere you can easily just double an image's size? aseprite is kinda annoying and doesnt just let me double the image size without doing wierd stuff to it
isnt that custom ui
you have to make one yourself i think 🤔
bepis
during export you can
what export? in what?
in aseprite
check SMODS.current_mod.extra_tabs
i use krita for that
ngl someone should make a plugin for aseprite that exports the image into 1x and 2x automatically
true
im my own artist now
i dont want to bother th30ne lol
you should make my art since my artists have decided they dont wanna do it in a timely fashion
this gotta be the forth time i sent this now
my mod would be out soon if not for artists deciding to be so slowwwwwwww
i feel like its nearing release ready for its initial ver
ikr my artist is so lazy and slow and they just have no ideas at all
and this is why you learn to draw yourself!
i agree
they also play too much pressure and forsaken
depends on the day imo
brother this would be every joker i did
(the joke is im my own artist)
i mean, thats where i began too
keyword learn
how would i set up the main lua file if i wanted to organize mod content like this
@glad osprey are you coming back into modding? 
I never really left
we all begin somewhere, good art doesnt just come out of nowhere lol
hell nah
just been a minute since I talked in here
do you care about the order of loading jokers and stuff
mfs saying 'learn' like thats not gonna push shit back even longer
not really tbh
multiplayer
yeah you can check that then
cool
Press ctrl+alt+i
Someone just gave me python scripts for aafix and 2x thing long time ago
wait you can just do that?
I would kill for an aseprite addon that automates the export process
aseprite uses lua btw
wink wink
is this real
(someone please make this im desperate)
Exists a script to phone?
script to phone?
ask GPT to make this one for you
gps
Yeah just set the size to 200%, I think the defaults are fine otherwise
also did that before when I was trying to make it and it didn't help at all
ok how do i get globals to be defined in vscium
functions/UI_definitions.lua:4802
make the aseprite plug-in first
What is this code?
i thought they meant a custom tab in the mod's menu 😭
OH LMAO
Exists a hack in phone
youre speaking gibberish bud
?
I never made own cycle btw, maybe I should find use for that at some point
Looks like credits was made on rush or smth
Its for me?
we do not know what you are asking, what is it you are looking for?
yes that message you replied to is talking to you
im assuming your asking about how to mod balatro on phones which isnt allowed here
I just want to know if there is a hack for cell phones.
Not on this server, no
As stated, mobile modding discussion is against the server rules
Why?
Hi everyone, I hope this is the correct place to ask this question.
I am legally blind and have been messing with the lua scripts to make the text and cards oversized. I am quite pleased with the game state but there is one additional modification I wish to make:
When opening a booster pack be it spectral, tarot. etc. the cards in hand fan over the jokers. This is only an issue when trying to sell the covered jokers
Is there a way to change the layering to have a selected card be "always on top" so they can be sold from this view?
I should note i do not have this problem when using a controller instead of the mouse
Developer has spoken. That's why
ok how do i get vscium to recognize smods stuff
The objective answer is because mobile modding typically requires some form of jailbreaking or EULA-defying action, and localthunk doesn't want to be held responsible for "enabling" that which could cause a legal blow up and get the game removed from various mobile distribution storefronts
Basically, mobile platforms are stingy about user modification and developers are forced to play by their rules (at least nominally)
if G.jokers.cards[#G.jokers.cards] == card then
if context.evaluate_poker_hand then
return {
replace_scoring_name = "Pair"
}
end
end
This keeps crashing everytime I hover in the collection screen in the main menu
You as an individual are pretty unlikely to face consequences for it. It's developers that have to watch what they say and do
is this in loc_vars?
It is in calculate
i dont see how that will make it crash then
calculate = function(self, card, context)
if G.jokers.cards[#G.jokers.cards] == card then
if context.evaluate_poker_hand then
return {
replace_scoring_name = "Pair"
}
end
end
Welp
Oh ok
that shouldnt crash in the collection, can we see the whole joker?

Oh yeah gimme a sec
SMODS.Joker{ -- Doctor Kidori
key = "doctorkidori",
blueprint_compat = true,
eternal_compat = true,
unlocked = true,
discovered = true,
atlas = 'nicjokers',
rarity = 4,
cost = 20,
pos = {x = 0, y = 2},
soul_pos = {x = 1, y = 2},
config = { extra = { xmult = 2, extra = 2} },
loc_vars = function(self, info_queue, card)
return { vars = {
card.ability.extra.xmult,
localize { type = 'variable', key = (G.jokers.cards[#G.jokers.cards] == card and 'nic_active' or 'nic_inactive'), vars = { G.jokers.cards[#G.jokers.cards] } }
}
}
end,
set_badges = function(self, card, badges)
badges[#badges] = create_badge('Teto', HEX('e15d73'), G.C.WHITE, 1.2)
end,
calculate = function(self, card, context)
if G.jokers.cards[#G.jokers.cards] == card then
if context.evaluate_poker_hand then
return {
replace_scoring_name = "Pair"
}
end
end
if context.individual and context.cardarea == G.play then
if context.other_card.ability.perma_mult <= 0 then
context.other_card.ability.perma_mult = 1
end
if context.other_card.ability.perma_bonus <= 0 then
context.other_card.ability.perma_bonus = 1
end
context.other_card.ability.perma_mult = context.other_card.ability.perma_mult * 2
context.other_card.ability.perma_bonus = context.other_card.ability.perma_bonus * 2
if context.other_card:get_id() == 4 then
return {
xmult = card.ability.extra.xmult
}
end
end
end
}
yeah G.jokers doesnt exist outside a game so you need to check for that in loc_vars
basically if G.jokers and ...
oh i will add this one to the list for the FAQ
you shouldn't have to, as long as you have both steamodded and your mod in the proper Mods folder, it should all work when you boot up the game
you'll just have to ignore the flags of "undeclared Global variable" if you're using anytning like luacheck 😭
alright, the yellow lines are just annoying me a bit lol
yeah i 100% get that lol, i was the same way
if false then
G = {}
SMODS = {}
--etc
end
those will be considered globals by whatever your using
if there's a problematic error in your code, the game will usually tell you, either by crashing or in the logs
I most of the time feels okay in yellow lines
I'm web developer after all, where everything is optional
ok time to code the first 3 jokers from my spreadsheet
gonna start with diviner, topaz, and vending machine bc all 3 are relatively simple imo
wait how big the default joker size again
75x91
ok thanks
also
what size should i make the atlases
no restrictions
Is this how you do it :<
if card.area and card.area == G.jokers then
local compatible = G.jokers.cards[#G.jokers.cards]
end
why is vscode screaming at me
if G.jokers and card.area == G.jokers
Fuck
basically equal
ill probably start by making it 710x95 then
gotta be a table
10 jokers per row, but only 1 row for now
is there a context that works after jokers are scored that still allows for cards in hand to activate abilities (similar to when gold cards trigger)? im trying to make a joker that activates gold cards on every hand and i need to make it so it doesnt double trigger on the last hand on top of when gold cards are usually supposed to trigger
what is the purpose of get_weight in rarities
Used to determine how likely you'll find this rarity
iirc 20 is common, 13 is uncommon, 3 is rare
code jumpscare
blud
😱
why do crash reports not be in message.txts sometimes
Thread error (Thread: 0x0251b27507d0)
engine/sound_manager.lua:62: Could not read Ogg bitstream
stack traceback:
[C]: in function 'newDecoder'
engine/sound_manager.lua:62: in function 'PLAY_SOUND'
engine/sound_manager.lua:151: in function 'RESTART_MUSIC'
engine/sound_manager.lua:117: in function 'MODULATE'
engine/sound_manager.lua:210: in main chunk
Additional Context:
Balatro Version: 1.0.1o-FULL
Modded Version: 1.0.0~BETA-0706c-STEAMODDED
LÖVE Version: 11.5.0
Lovely Version: 0.8.0
Platform: Windows
Steamodded Mods:
1: ENA Dream BBQ Deck v1 by keegankeegan [ID: enadeck]
2: Sinkhole's Silly Mod by sinkhole [ID: SILLY]
3: DebugPlus by WilsontheWolf [ID: DebugPlus, Version: 1.5.0~dev, Uses Lovely]
4: Hollow knight Deck by nolo33lp [ID: HollowDeck]
5: Undertale Deck by nolo33lp [ID: UndertaleDeck]
6: Deltarune Deck by nolo33lp [ID: DeltaruneDeck]
Lovely Mods:
Stack Traceback
===============
(3) LÖVE function at file 'boot.lua:352' (best guess)
Local variables:
errhand = Lua function '(LÖVE Function)' (defined at line 598 of chunk [lovely debugplus.console "debugplus/console.lua"])
handler = Lua function '(LÖVE Function)' (defined at line 598 of chunk [lovely debugplus.console "debugplus/console.lua"])
(4) upvalue C function 'error'
(5) LÖVE function at file 'callbacks.lua:181' (best guess)
Local variables:
t = Thread: 0x0251b27507d0
err = string: "engine/sound_manager.lua:62: Could not read Ogg bitstream\
stack traceback:\
\9[C]: in function 'newDecoder'\
\9engine/sound_manager.lua:62: in function 'PLAY_SOUND'\
\9engine/sound_manager.lua:151: in function 'RESTART_MUSIC'\
\9engine/sound_manager.lua:117: in function 'MODULATE'\
\9engine/sound_manager.lua:210: in main chunk"
(6) Lua function '?' at file 'main.lua:926' (best guess)
Local variables:
_n = nil
_a = nil
_b = nil
_c = nil
_d = nil
_e = nil
_f = nil
touched = nil
(for generator) = C function: 0x2b12a818
(for state) = nil
(for control) = string: "threaderror"
name = string: "threaderror"
a = Thread: 0x0251b27507d0
b = string: "engine/sound_manager.lua:62: Could not read Ogg bitstream\
stack traceback:\
\9[C]: in function 'newDecoder'\
\9engine/sound_manager.lua:62: in function 'PLAY_SOUND'\
\9engine/sound_manager.lua:151: in function 'RESTART_MUSIC'\
\9engine/sound_manager.lua:117: in function 'MODULATE'\
\9engine/sound_manager.lua:210: in main chunk"
c = nil
d = nil
e = nil
f = nil
(7) global C function 'xpcall'
(8) LÖVE function at file 'boot.lua:377' (best guess)
Local variables:
func = Lua function '?' (defined at line 909 of chunk main.lua)
inerror = boolean: true
deferErrhand = Lua function '(LÖVE Function)' (defined at line 348 of chunk [love "boot.lua"])
earlyinit = Lua function '(LÖVE Function)' (defined at line 355 of chunk [love "boot.lua"])
hi srock
key = "music_jason",
path = "music_jason.ogg",
pitch = 1,
volume = 0.6,
select_music_track = function()
if G.GAME.blind and not G.GAME.blind.disabled and G.GAME.blind.name == 'boss_jason' then
return true end
end,
})
SMODS.Atlas {
key = "jason",
path = "jason.png",
px = 34,
py = 34,
}
SMODS.Blind {
name = "boss_jason",
key = "boss_jason",
atlas = "jason",
mult = -10,
dollars = 20,
discovered = true,
loc_txt = {
name = 'Jason',
text = {
'Base Mult is -10',
}
},
boss = { min = 1 },
boss_colour = HEX('654c45')
}```
yes it is
is that not what default_weight is for?
It's, well, default value. If you want to adjust conditionally, you can use this function
Function is optional tho
so its like for if you wanted to change the weight through outside sources? (like ghost deck does or smth)
anyone got advice on how I can make a new edition?
why does my joker crash the game when i hover it :(
oh wait nvm i think im stupid
nvm i have no idea what causes this
what's your joker loc_txt
and loc_vars
Do you add your own colors to G.ARGS.LOC_COLOURS
i didnt make any colors so no
Does it happen only on your joker, or when you hover over any joker
any joker
do you define any rarities, gradients, consumabletypes or suits somewhere in your code
i do
can you show me how you define them
remove the = in between rarity and {
ah i see
ok so what do i do if my mod doesnt load
what does your mod json file look like
hi does anyone know if there is a way to make a clicked card to "always appear on top" configured in the lua files. like controlling the z-axis when the card is clicked? (sorry for the repost but the chat was moving fast and this was likely missed by all)
like this currently
do you use multiple lua files in your mod?
there's 3 that should be loading right now
no, mostly bc i wanted to use different files for each thing i wanted to add
you need to have something like this to load anything outside your main file
one for each file that you want to load that isnt the main file
what if id rather not have dozens of different lines all loading like 1 file each
vanillaremade does it the exact same way so i dont think you have a choice
if there is another option then i dont know it
i think celeste card collection does it in a different way lemme check
since it has individual lua files for each joker
you can use NFS.getDirectoryItems(SMODS.current_mod.path) to get a list of all the files in your mod directory
yeah it does some crazy stuff
im doing it like that for things since i think editing the code of specific items would be easier that way
im still having the issue of not actually seeing the mod in the modlist though
What does your mod folder look like
these are the 4 things i have in there right now
assets is mod assets, things is for stuff thatll actually be in the mod
Do you have file extensions enabled in your file explorer
i basically always have that turned on
And your mod is in Mods/your mod name/avensmod.json right
yeah
ok that got it to actually load now lol
Make an array of the filenames and write a foor loop to iterate through the filenames and use the assert
Err, this is Lua, a table not an array
<@&1133519078540185692>
<@&1133519078540185692>
Beat me to it
Mods, kill it
ahooOOOOga
Im the only person allowed to be sexy here
death
awesome
also yeah this is what I do
this is what i do

what the hell is that
lovaly
How do module patches work again? I've never rlly used em
mostly just depends on which loading system would be best for me considering that im planning on making a new lua file for every joker/consumable/etc i add
I preffer controls what I load even with SMODS
So for blinds I have list of blinds to load
This helps load all things I need and not load temp or old stuff
lovely shoves the lua module into the game. I guess the upside is that you can control when the injection happens (and it generally happens really early in game startup)
and it'll inject your modules into new lua contexts
which can be useful
Which means you can freely use any var names
Hmm, is there no has_enhancement equivalent for editions and such?
and local vars
now i need to figure out what this means
It's just whether or not card.edition or card.seal are nil or not
mod metadata
ahhhhh that'd be it
ty
the only reason has_enhancement exists is cus smods allows cards to behave as more than one enhancement at once
figured I was missing something simple
look at all these contexts
Looks very bad
hi context
I love how it's called the graveyard. My inner tcg player is very satisfied with that.
Because, BanishCalcContext, ReturnedCalcContext, DetachCalcContext...
Not.... this...
How I wish each context was a different type
it's literally the yugioh graveyard. im making the yugioh mod
The GY 🤓 ☝️
OH that's even more amazing then! I didn't recognize it wasn't vanilla code haha.
mod loads now but the 1 joker i have doesnt yet
im extending the smods one, i cant do that
trying to set up a few simple challenges, is there any reason the third last line here would be crashing?
on startup to clarify
I believe you can if make this properly
what is the point of that line, its outside of SMODS.Challenge anyway
how
ohhh does it need to be inside it
idk
i assumed since it was defined as a rule in the challenge that i would define the rule outside of it in the same way that like hooks and stuff work
i just saw that its like
defining a new challenge rule
so idk what the issue is actually
if youre defining a custom rule you do need hooks or patches
ohhhh sad!
that code would be ran as soon as the game loads, and G.hand doesn't exist there
probably not G.GAME either
im gonna do some challenge stuff soon, what's this about needing patches for challenge rules?
challenges dont have an apply or calculate so you need to do all the modifications yourself
as far as i know at least
btw would it be okay if i reused this for my mod
of course
cool, thanks
tried to make a custom edition and got this error message and got no idea what to do with it
what's on this line 'consumables/limit.lua:36' (from mod with id carrotscontributions)
If it works properly, just extend CalcContext class or calculate function type with your own things
In worst case: define type of calculate function manually and use it
To define own contexts use @alias
-- @alias BanishCalcContext { a: boolean, b: string }
-- @alias ResurrectCalcContext { c: boolean, d: string }
-- @alias JojousCustomCalcContext BanishCalcContext | ResurrectCalcContext
ok what
syntax error
i still dont get how to extend calccontext with this
oh wait i forgot a few commas lol
awesome it works now
i should probably also make a mod icon though tbh
unless you mean to redefine the types of calculate myself, which im not doing that sounds annoying
is the base mod icon size 24x24?
34x34
alr
oh mb here it is
???
do :set_edition('e_modprefix_Limited')
cheers gng
ohh i get it
it would still be annoying because there are many shared keys and i have to come up with a name for each context
do .toml files in the lovely folder load automatically or do i need to do extra stuff to initialize them
It's depends on how you use contexts
Ideally at a time context must be one specific type
Otherwise it's kinda unpredictable
Shared keys is fine tho
yeah the problem is me having to write the types
for no benefit other than it looking a bit nicer
It's okay when you do this from beginning
Rn yea it's kinda refactor
Do this or not up to you
But you get the point
How it should look ideally
if smods did it i would
ok how do i atlas mod icons
I need somehow make extension limit line in 140 instead of 80
Because in 80 I feels uncomfortable
Still using no types tho
bumping this because it is crashing before startup 🤭
youre missing the manifest
Damn
is there an example of a mod that would have that? im not really sure where to look
ironically enough the only field of value in the manifest iirc is the priority
IT WORKS
now how do i make it say 1 in 3 instead of nil in nil hmmmm
the other fields don't do anything haha
smh
loc_vars
only thing thats confusing me is that this bit isnt displaying in game? the rules field is blank
is there an extra step im missing
cool cool ok
I did and it gave the error
you're meant to replace modprefix with your own mod prefix
bump yet again, im genuinely desperate to fix this, i dont understand what im doing wrong
which should be in your metadata
wow I feel dumb
i'm thinking of making a deck that starts the run with 2 negative eternal jokers (randomly chosen) but i don'tknow how to make that happen
question: what's the context for right after scoring?
context.after?
i'll try that, thanks
am i being silly here, its crashing on startup and im not sure which aspect of this is wrong from the screenshots
i didnt even think localization stuff COULD crash which is crazy to me
strange, nothing's happening.
I wanted to have a 1 in 4 chance of destroying the card after it scores and it hasn't happened
ok
whats the crash
this is what im getting
it deleted a card in my deck not the joker itself
Are you doing SMODS.destroy_cards(card)?
can you manipulate the spawn rate of specific jokers? so for example when a rare spawns it has a higher chance of being an obelisk than other rares
no? i was just trying to replicate the vanilla remade enhancement
how do i check what deck is being used?
VanillaRemade? Y'know... the resource that recreates everything in balatro?
if context.destroy_card and context.cardarea == G.play and context.destroy_card == card and
SMODS.pseudorandom_probability(card, 'vremade_glass', 1, card.ability.extra.odds) then
card.glass_trigger = true -- SMODS addition
return { remove = true }
end
end,```
This is their glass card calculate
Yes.
I'm trying to put the effect on a joker
That's specifically for playing cards.
G.GAME.selected_back.effect.center.key
if context.joker_main then
return {
mult = card.ability.extra.mult,
xmult = card.ability.extra.xmult,
}
end
if context.after then
if SMODS.pseudorandom_probability(card, 'glass_joker', 1, card.ability.extra.odds) then
card.glass_trigger = true
return { remove = true }
end
end
end,
{ remove = true } only works in context.destroy_card (or discard)
and only for playing cards
yeah i changed it from destroy_card to after after it didn't work
so what do i do then?
is it possible to change the nominal value of a rank (specifically a new rank) with like an if/then statement somehow?
nvm, the odds work ig
I mean i wanna have the glass destruction but oh well, better than nothing
you can do card:shatter()
before or after smods.destroy_cards?
instead of
ok
this is getting silly i have no idea why this is crashing
i thought it might be an other mods issue sorta thing but i disabled everything and its still happening
oh sorry i didnt see the crash let me check
it IS definitely because of the localization file i commented out everything and it loads
oh it shattered before it scored but still scored
remove the double modprefix
Yes, you need to put it in an event.
may i see the new crash
idk that looks fine to me now
uhh let me check the functions to make it shatter, hold on
G.E_MANAGER:add_event(Event({trigger = 'after', func = function(), right?
you do
destroy cards does not give me glass shatter
do localization files also need to be defined somewhere that i didnt know about or something?
it does
i guess that wouldnt matter actually it is loading its just crashing over it
that's why I said hold on?
im guessing hooking SMODS.shatters?
Oh i didn't see that
Mods/your mod/localization/default.lua
UGH hooking... I hate hooking it's a pain
default can also be en-us.lua
lol
yeah hooking SMODS.shatters is the way to do it right now
yup its named this
although shattering misses the joker type destroy context anyway
so I suppose it doesn't matter
outside the joker
local smods_shatters_ref = SMODS.shatters
function SMODS.shatters(card)
if card.config.center.key == "j_modprefix_key" then
return true
end
return smods_shatters_ref(card)
end
i'm running on like 5% energy
just replacing that key with my key
yes
ok
did you uh, save the file
yeah
ok i checked its specifically this line that causes the crash
commenting it out makes it work fine 😭 what
i mean it doesnt define it obviously but
this is what it looks like rn
i don't think it has anything to do with the challenge, it's crashing when parsing the localization file
do you have only one localization file
yeah
are you getting the exact same crash
yup
can you send it again
well, problem solved i guess
had to give the laptop a good shake
whats the best way to add a card to the deck?
trying to make a deck that starts with four more cards of the new rank ive created for the suits and im just trying to determine the best way to add the card to the deck cleanly
SMODS.add_card{ set = "Base", rank = "rankkey", suit = "suitkey", area = G.deck }
ah, thats what i was doing, just had the wrong area
okay so, that appears to not have worked (i moved the cards up there, they were originally just like on top of the deck)
try
local card = SMODS.create_card { set = "Base", rank = "Queen", suit = "Spades" }
G.deck:emplace(card)
table.insert(G.playing_cards, card)
E?
placeholder sprites, they're Extraterrestrial cards
actually, the best way to add them would be to modify your rank's in_pool function
in_pool = function(self, args)
if args and args.initial_deck and G.GAME.selected_back.name == 'b_prefix_key' then
return true
end
return false
end
that did the trick wonderfully, thank you!
Does anyone know how to change the Profile Prefix?
bumping this question again, in specifics im wanting it so my new rank gives 15 chips normally but 30 chips on a specific deck
Hmm is there a way to set the minimum padding on description boxes?
For example I have this separate clause in its own box though I wish I could set the box to be shorter for only a single line
I don't think so but I would love to be wrong because I need that too haha
Mmmm yeah
rate it
ooh nice nice
dammit still behind by 10... sisyphean task
if i wanted to make card variables on a joker change if you have a challenge enabled, what would the syntax for something like that be?
change it inside of the loc_vars code
you would need to change it in set_ability
How would I retrigger used planet cards a specific number of times?
how do you balance like 25% of chips and mult
like how do you balance a specific percentage of chips and mult
would you individually remove 25% from each or 25% total
Try looking at All In Jest
How would I make a boss blind only appear if a condition is met?
from SMODS.Blind documentation
ok this is so weird and niche but i have a joker that is not inherently eternal compatible and i want to give an eternal version of it for a challenge but it wont start eternal
NO WAY YOURE THE ONE MATCHING WITH ZOE??!????
wait nevermind this works so well LMAO
How would I retrigger used planet cards a specific number of times?
retriggering used consumables isnt a thing currently
at least I think
how hard is it to make https jokers
how can i get this to count the amount of a specific joker you ahve
you dont need this
#SMODS.find_card("j_modprefix_key")
Odd question: how do i remove a badge?
assuming this just checks if you have it or not, i want it to count how many of it you have
#SMODS.find_card("j_home_funnyjoker", true)
will return the number you have
of that joker
ohhh ok
No, it does count it.
thanks
goddamnit something i wish i could call them out on the question marks
im getting mixed messages
new discord feature idea: remove reactions from people you've blocked
Stone
What
Definitely chaos
I rather quit balatro modding than go into modding chat, rn
We pretty chill
what mod is causing this? i just updated ArtBox, Bakery and Galdur
Try updating SMODS
wait maybe i didn't update Galdur, mm
okie doke
oh it was Multiplayer, that's the third one
no dice, same error
yeah idk what happened in the last hour but it's crazy rn
Have you tried reinstalling Multiplayer?
I guess it's us primetime so
ya, it's on its latest version
disabling it makes everything fine though
so, whatev
thanks ^^;
uhm, can you go to the Multiplayer.json file of the mod
and the remove the last line
hokai
PFFFFFFF WEIRD
whoopsies
did you save the file
yup
I want to add a Joker to the main menu. I create the joker but how am I supposed to add it
that has to be the problem tho, the smods part of the multiplayer mod isn't loading
Hook Game.main_menu
where ? I am not realy advance in these kind of things.
Progress on my face cards weh
I found that in RevoVault. Is it what you are talking about
Yes.
Can I copy it ?
Yes.
oh ok cool
I really like people that go straight to the point
Why am I having a big gap between the card
try removing this line
Actually, using vanilla deck selection with a bit adjusted text can work?
you probably still want to have some sort of expanding the width of that area
currently struggling with hooks, trying to make selling a card in a challenge cost an additional 10 dollars, am i on the right track at all?
the only reason yours looks good without it is cus the other mods you have are expanding it
or i guess patches maybe thats the word here idk
Yeah I taught of that
I just make this number smaller
on your patch use [patches.pattern] not regex
also you don't have to use a patch if that's where you want your code to go
you can hook the function instead
oh ok
this does work though 🙏 tysm
whats the difference between pattern and regex exactly?
pattern matches for the exact string
regex allows you to do that + more while being more complicated
hm ok sick
and the reason your regex one didn't work is cus stuff like () doesn't match for exactly parenthesis
ohhhh
how does one make a shader? I'm looking at examples and the resources on the SMODS docs but it makes no sense to me (no one told me i'd have to learn 3 coding languages for balatro modding -_-)
Okay i can't figure it out. I tried looking on the wiki to no avail, how the heck do i make a joker retrigger a joker? (specifically itself)
I think I figured it out.
revo's vault spotted in the wild
how do we spot it in the domestic
who knows

no
Welp, I'm going insane. i dunno how to make the joker retrigger itself once
if context.retrigger_joker_check and context.other_card == card then
return {repetitions = 1}
end
``` It also needs to be enabled if you haven't already done that.
what needs to be enabled?
SMODS.current_mod.optional_features = function()
return {
retrigger_joker = true,
}
end
Poor Somethingcom
That's the joker
(There are wildcards but yeah)
is the whole thing just that it's joker with a red seal
i love that
yes
hey y'all, i'm trying to use the new context, but for some reason this is doing nothing? i'm using the latest smods release (1.0.0-beta-0711a)
calculate = function(self, card, context)
if context.joker_type_destroyed and not context.blueprint then
print("hi")
end end```
Anyone know what happen?
is there a way to have multiple ability boxes?
Yes.
how? ^^;
Are you referring to the description?
ya
Just have each box of text in a table inside the description I think.
ah gotcha! will try
how would this work with loc_vars? same as normal, but across multiple strings?
what does your atlas look like
by that I mean the SMODS.Atlas call
Salty ghost spotted
oop noooo my sticker
Yea most likely
ya a member there made it ^^;
I see
it's only there because of that, to be honest
idk, i just use a youtube tutorial
that means you should have both Mods/your mod name/assets/1x/PAISAJE.png and Mods/your mod name/assets/2x/PAISAJE.png
Yep!!
Oh wait my scroll hadn't updated. Someone has likely already answered this
in your SMODS.Atlas{, change key = 'Jokers' to key = 'PAISAJE'
may as well answer it again, as a double-check >:3
Multiboxes is kinda new feature
Probability one is actually new thing, it creates new meta of jokers which modifies luck
please 
Like this!!! It's simple enough, just arrange them in individual boxes

