#💻・modding-dev
1 messages · Page 444 of 1
yeah like, draw to hand but dont sort it, sort it only if the user clicks the sort button again
if it requires anything complex like patching or whatever then nvm
It likely does.
alr then nvm
where is the code to draw the modification textures (for cards) located?
SMODS doesn't work like that anymore.
old smods
You read the wiki?
also this
if G.hand and G.hand.cards and #G.hand.cards > 0?
cool, thx
why does trying to call a shader crash the game if there is no edition present? trying to apply multiple edition shaders as proof of concept.
specifically,
if i remove the 'or 1 == 1' then it works
question, how do you make it so you can spawn something like the soul spectral?
minos was made with the intention to spawn all spectral cards, and even spawn something like the soul spectral
and a pointer if you believe it
that sounds a little broken
SMODS.add_card({key = "c_soul"})
You tell it to get a random spectral and you create that.
bumping this
no duh, it's for a modpack called The BBB Mod, aka the Busted Buffoon Bundle Mod
sounds fun
i couldnt find this in the smods wiki, but how do i tell the thing to look in scripts -> jokers.lua to find the code for jokers?
SMODS.load_file("scripts/jokers.lua")()
thx
when using self.children to do draw_shader, it can only do 3 with back, center and front. is there a way to draw more layers?
No.
darn, I never thought it could ever be that simple.
ok how about a gateway or a pointer
It would be the same thing.
No,```lua
local g = pseudorandom_element(G.P_CENTER_POOLS.Spectral, "seed").key
SMODS.add_card({key = g})
Yes.
how
if i speak
If i
Can someone please enlighten me as to the context for destroyed playing cards? I'm assuming it doesn't follow the same nomenclature as the consumable area.
local card_destroyed = Card.remove
function Card:remove(context)
if self.added_to_deck and not G.CONTROLLER.locks.selling_card then
local destroy_key = "destroying_" .. string.lower(self.ability.set or "")
-- Consumables
if self.ability.consumeable then
SMODS.calculate_context{card = self, sriot = {[destroy_key] = true}}
DRM.Increment()
-- Played cards (Base set or others)
elseif (context and context.cardarea == G.play) or self.area == G.play then
SMODS.calculate_context{card = self, sriot = {[destroy_key] = true}}
DRM.Increment()
end
end
return card_destroyed(self, context)
end
return { remove = true } destroys cards
Just to make sure, I'm trying to detect destroyed cards, not destroy them with the joker
local thunk = G.hand.config.highlighted_limit
G.hand.config.highlighted_limit = 1e10
for k, v in pairs(G.hand.cards) do
G.hand:add_to_highlighted(v)
end
G.FUNCS.discard_cards_from_highlighted(nil, true)
G.hand.config.highlighted_limit = thunk
that looks very strange just to trigger a discard
You can't highlight cards over the highlighting limit.
Oh, I don't have my context sheet up rn, but it's either context.destroy_card or context.destroying_card iirc
ah
Detect playing cards or jokers?
Both, eventually... But for now, I'm starting with playing cards
I'm doing it in a sort of weird way to prevent unintended bugs
context.remove_playing_cards
speaking of boosting the highlight limit, is there a way to boost the highlight limit by like say 3 for 1 hand then set it back?
Yes.
I'll try it, let you know how it goes
how, i imagine to set the highlight limit its just G.hand.config.highlighted_limit = G.hand.config.highlighted_limit + 3
but how do i know when to set it back
No.
I lied slightly, it DOES detect, but it only counts as one destruction, and it doesn't work with arsonist from cryptid
SMODS.change_play_limit(3)
SMODS.change_discard_limit(3)
then how do i detect when the player has played a hand so i can set it back down
or discarded a hand
context.pre_discard and context.after
im making a consumable give this
you cant use context in a consumable
right
its going badly
GO PERKEO GO
Yes.
so how do i detect?
That's Yorick...
You would hook SMODS.calculate_context
Okay, I did some light debugging. Using context.remove_playing_cards works mid-hand, but if a card is destroyed at the end of the blind, it doesn't detect. If it does detect, it only counts the destruction once, when it should work 5 times (IE: Immolate)
never used that, how
i thought it was working yesterday and like it DOES work its just got a scary bug where every time you use it it (?) im not really sure but the deck starts getting Wrong
ive seen it before in other mods
the context here is i have a joker where if you discard one card it discards your whole hand
Oh I meant me
it even works with trading card! which took a bit of extra trickery
but it makes the deck weird every time you use it, when cards are added back to the deck at the end of the round it adds an extra one for each time you discarded and it leads to weird always face down cards and invisible cards
I’ll change to #⚙・modding-general
how does one hook smods.calculate_context
it can snowball fast if you have multiple of them but even with one its an issue
looks fine in the deck view!
but when you get into a blind it gets bad
it also interestingly brings up the deck mini-view if i mouse over one of the face down cards
what is this joker, what does it do?
,
how do i do that
they do but i want it used on use
oh yeah, then you probably want to hook
how
nope
ok
In LUA, it is a very important concept to understand that everything is a variable and all variables may be edited in runtime. This includes functions. With modding other peoples' LUA files, like Klei's basegame code, you may find yourself wanting to run your code before or after the original fun...
basically just need to "hook" when the player discards or plays a hand
yes
can you give me an example on how that would work here?
would i do
SMODS.calculate_context = function
confused
whats wrong here?
oh I think i got it
G.consumables
well it still didnt work
As I understand it, G.GAME.current_round resets every round, so this code picks a new suit every round? If so, is there somewhere I can write to that resets after every hand?
local function reset_willatro_jokeinthebox()
G.GAME.current_round.willatro_jokeinthebox = G.GAME.current_round.willatro_jokeinthebox or { suit = 'Spades' }
local joke_suits = {}
for k, v in ipairs({ 'Spades', 'Hearts', 'Clubs', 'Diamonds' }) do
if v ~= G.GAME.current_round.willatro_jokeinthebox.suit then joke_suits[#joke_suits + 1] = v end
end
local jokeinthebox_card = pseudorandom_element(joke_suits, pseudoseed('willatro_jokeinthebox' .. G.GAME.round_resets.ante))
G.GAME.current_round.willatro_jokeinthebox.suit = jokeinthebox_card
end
"Stone Card" is not a card ID, it's just an enhancement. All Stone Cards have an underlying rank/suit, you just can't see it norrmally.
See Marble Joker in https://github.com/nh6574/VanillaRemade/blob/main/src/jokers.lua for how to properly make a Stone Card.
how do you lovely patch other mods
i'm assuming that if i use set_ability([joker key]) to turn a joker into a different joker, it wipes the config table that was there, right? or does it carry over?
if pseudorandom("tboi_midas_touch") < G.GAME.probabilities.normal / card.ability.extra.enhance_odds then
local _card = context.other_card
G.E_MANAGER:add_event(Event({
func = function()
card:juice_up(0.3, 0.5)
return true
end
}))
G.E_MANAGER:add_event(Event({
delay = 0.2,
func = function()
_card:set_ability(G.P_CENTERS[card.ability.extra.mod_conv])
return true
end
}))
end
trying to use this to enhance cards into gold cards based on RNG, but everytime it activates I get a crash, saying that 'center is nil'. Any ideas?
read this like 5 times i still don't understand it
i might need a better explanation or an application example
Omfg im stupid, consumables have a calculate function
try _card:juice_up(0.3, 0.5) instead
oh wait
you want the joker to juice
don't those only trigger while the card is held in hand
how do you add a joker to the soul pool?
indexing card from within an event is weird
we're abt to find out
closest i know to hooking is :Connect(function() end)
also, what is the value of card.ability.extra.mod_conv? if it's a string, you can just do set_ability(string) and it should work
if a joker's rarity is 4, does it automatically become part of the soul pool?
https://canary.discord.com/channels/1116389027176787968/1368361548300423168
hey i updated this mod :3
Yes
yeah, you should be able to do set_ability(card.ability.extra.mod_conv) in that case, i think?
wait no hold on
that might be the problem
Ah, thanks for clarification
ahhh you probably right ngl
How can i fix a soul layer being offset? It seems to be weighted to the left, it looks centered on the left most slot
mess with soul_pos, maybe? (never messed with that stuff before)
soul_pos is for atlases
for example let's say i have an atlas with 2 sprites
pos 0,0 on that atlas would be the normal card
again, never messed with souls before.
pos 1,0 would be the soul layer
no - the actual co-ordinates themselves aren't tied to whether it's soul or not, it's just the co-ords of that graphic based on the dimensions specified in the atlas of the sprites. that doesn't matter for layering
you can set pos and soul_pos in your item to whatever you want and it should just grab the respective sprites from that spritesheet, pos being the base and soul_pos being the floating sprite
yeah that's what i said
got the card working. I think the local joker value is what fixed it lol
but in stupid language
does anyone know how hooking works
i'm stupid and need assistance
I made a Modds folder when i started setting it up, and it keeps respawning even when i redownload the game, it has settings.jkr i believe from one the setup thingys, will it mess with mods?
is this not helpful for leaning hooking. i see it linked often
setting what up
i read but i'm just not getting it personally
i think if i saw an example of it being used in a mod i might know how
makes sense, i've never read it because i understood hooking intuitively, but i couldn't explain it in a way that made sense
The smods and lovely things, i made a folder in the Modds called things that make it work and its also appearing in the mods folder
lemme show you my loc_colour hook then
elaborate, i don't know what you are asking
basically how do i remove modds folder and the thing that makes it work folder? they wont disappear when i redownload even
just delete it? i don't know what you are asking here
i kinda understand it, very vaguely though
But when i do it just re appears when i open the game
bump
remove version.dll from your balatro install
will it create another automatically?
i was told to hook SMODS.calculate_context, would hooking that work the same hook as this
shouldn't
will it recreate the version.dll tho
shouldn't
do i need it?
where do i get version.dll agai-
wdym, where to find it?
it's in your balatro install
steam local
you said to delete it, will it show automatically when i open game?
you've asked this 3 times and i've responded the same every time, it shouldn't
then how do i get again
your steam local files
go to balatro on steam
click the gear icon
then click browse local files
in that folder that opens up
delete version.all
*dll
then how do i get it back?
install it the same way you installed it before
ok
it still appears and files are verified
i happen to hook that, too. this one's a bit more complex, though
basically - i have a joker that debuffs itself given a certain condition. since jokers don't calculate when debuffed, i need to handle undebuffing it outside of the joker. as it happens, the way SMODS.debuff_card() works based on source strings you make up and supply to the function, which gets stored on a table. so i just designated a source to always be undebuffed at the end of a round, check for that table and see if it contains my debuff source, then undebuffs it.
bear in mind that if you don't return the calculate return value, you break calculating. i only return it the way i do because it'll then always return nil, which i don't want in relation to another implementation
Imagine if I stole from yahimod and made Lydia into Sans, which STOCKPILES XCHIPS
so if i put a hook on context inside of a consumable use and have it check for context.after and do a thing, to return do i just return return_table?
...why would a sans joker do that
Millions of bones
also to me this seems a lot like how they describe patching
context.pre_discard and context.after
i messed around and i think i made it work!
local old_calc = SMODS.calculate_context
SMODS.calculate_context = function(context, return_table)
if context.pre_discard or context.after then
SMODS.change_play_limit(-3)
SMODS.change_discard_limit(-3)
end
local ret = old_calc(context, return_table)
if ret then
return ret
end
end
i did this right, right?
i tested and it worked so
How does soul_pos work?
basically pos but for the 2nd layer
does it use the px and py as a reference?
same as pos
if you don't know what pos is
so if offset by 1, it uses the other part of the photo
yes
the entire other part
also do yall think this is a good header, not appealing, just basic for now
i'm gonna draw a diagram
basically it moves once for how many pixels is in the atlases px
it's cool
The card is the main pos
yes
The fork is the soul_pos
exactly like that
but i would have the atlas sideways
doesn't effect anything
personal preference
I saw cryptid use 2 different soul pos
by 2 PM?
either way, thats sick
getting pwned at around 2 o clock pm eastern time
if I want to add a custom table to descriptions in my localization files, how would I do that
wait a second
this is modding dev
WHA
i figured it out, thanks tho
i thought this was modding chat 😭
lol
im so sorry
modding chat brainrot
i CANNOT tell the differences
Tryna make spectral background
I don't think I ever visist any channels except for this one and occasionally fan art
is there any way to trigger a shop in the middle of a blind and come back to that blind
wait nvm it's j_trousers lmao
is there any way to use a hex value in localization formatting? i tried {C:white,X:HEX(cc73d9)}X#1#{}, but it didn't work
like any way to end the current blind and go to shop, without winning the blind
use B:[colour_index]
then define the colours in colours in the vars table of your loc_vars
use {V:1} and add a colours = {} table to the vars in loc_vars. The number next to V acts as the argument number
this works too
uhh b or v
B is for backgrounds
anyone?
am i stupid
{C:white,B:[plasma]}X#1#{}
loc_vars = function(self, info_queue, center)
return {
vars = {
number_format(lenient_bignum(center.ability.extra.Xchipsmult)),
colours = {
plasma = { 0.8, 0.45, 0.85, 1 }
}
},
}
end,
what's the key for the two pair?
not a key
try using HEX("<color-code>")
Two Pair
with _?
no
.
vreh
okay
ok ig i found what was crashing
still not working; i'm not really sure what the difference between "index" and "key" is in this situation
...
colours = {
plasma = HEX("cc73d9")
}
...
-# reply ping intentional
no plasma = .
{C:white,B:[1]}X#1#{} i believe would be the correct way to do this
never used B: though so tale that with a grain of salt
you just list the number as is
ahhhh
its the same format as V:
index is usually an integer representing a value in an array
what should graffiti Joker do?
keys work the same way, although they can generally be anything
all cards are wild lol
legendary asl
super good art btw
I do like the idea of it changing or messing with your cards
but I want it to still be good for the player
I think any good mod buffs Wild Cards lol. They're super weak in vanilla so maybe make it also buff wild cards
all cards have the effect of wild
this could be an option too
how about "wild cards are immune to debuff" alongside making every card wild
how can i not follow simple instructions man; this still isn't working
{C:white,B:1}X#1#{}
...
colours = {
plasma = { 0.8, 0.45, 0.85, 1 }
}
...
for the record, i did try hex values for the color as well
how exactly is it failing? are the colors not working properly or does the game crash when you hover it
color is just balatro black
colours = {
HEX("cc73d9")
}
try this. No need to index the table manually
How do I require another lua file from my entry point lua file?
W
use a lovely patch to inject that as a valid path for require
uhhhh handy has an example for that
Check SMODS.load_file
but really you should just use SMODS.load_file unless your mod is lovely-compatible
yeah what the dripping chicken said
You can also create a lovely patch to modify the way cards are destroyed in function SMODS.calculate_destroying_cards(context, cards_destroyed, scoring_hand)
in smods/src/utils.lua
Lmao
how can i make Oops! All 6s affect my custom jokers?
Check jokers that uses probabilities on VanillaRemade like 8 ball
ok
Shouod be G.GAME.probabilities smt like that
...and i'm already back
any way to make a joker make a specific sound when scoring without using a localize thing? i used
return {
message = "X" .. lenient_bignum(card.ability.extra.Xchipsmult) .. " Chips and Mult",
sound = "talisman_xchips",
Xchip_mod = lenient_bignum(card.ability.extra.Xchipsmult),
Xmult_mod = lenient_bignum(card.ability.extra.Xchipsmult),
colour = { 0.8, 0.45, 0.85, 1 }, -- plasma deck colors
}
but it just crashes my game with the error attached
since i'm not going to use this very often, if at all, it would be nicer to have this specific crash just fixed instead of being told how to use the function altogether
did you do SMODS.Sound
no, i would like it to use the sound in talisman's files
again, ^
I wouldn't know how to do that
I think you're better off duping the sound
i'll try that i guess
okay well now the color isn't working 😭
return {
message = "X" .. lenient_bignum(card.ability.extra.Xchipsmult) .. " Chips and Mult",
sound = "xchips",
Xchip_mod = lenient_bignum(card.ability.extra.Xchipsmult),
Xmult_mod = lenient_bignum(card.ability.extra.Xchipsmult),
colour = { 0.8, 0.45, 0.85, 1 }, -- plasma deck colors
}
Are you sure
real
hope this wont be hell
I've been messing with SMODS.change_base but it seems to be crashing, oof. I'm basically trying to make an enhance change it's own rank and suit to a set of DUMMY suits and ranks I made but it seems to be failing despite me using the keys.
The dummy rank and suit themselves ARE registered as I can encounter them ingame as blank cards.
ULTRAKILL
how to soul_pos
wdym github template
Idk lmao
@pastel kernel this is what i was told abt soul_pos
soul_pos has no =
oops
it happens to the best of us
I’m using the unnerfed version btw
The original Minos makes 2 negative spectrals every discard and x2 Mult per spectral created
This one makes 2 FOR EVERY CARD DISCARDED
No
It’s 5 jokers for a thing called The B.B.B. Mod
The Busted Buffoon Bundle
I finished making spinel, which is x6 Mult gained per 4 aces played
I’m remaking her sprites this time
And move on to my next joker… idk who though.
WAIT, WHAT IF I MADE IT INTO ONE OF TYLER, THE CREATOR'S PERSONAS?
Or alter egos
I could make them IGOR
Tron Cat
Flower Boy
Chur Bum
Question: how can I make an Xmult but for the chips?
I tried doing like this but it doesn't return the Xchips value...
do you have to explicitly add omeganum support into your mod in order to use omeganum
...omeganum?
no unless you're comparing against a bignum
ah
in which vigorously wrap them under to_big
ok good that saves me 5000 years of comparison checks
to_big(1e300) < to_big(G.GAME.chips)
aight
"ah yes 1.8e308 such a high limit no one will EVER break this!"
"nuh uh i just did"
"ok fuck you i'm setting the limit to practically infinity"
lmao
is there a better way to register tons of seperate sounds than to do SMODS.Sound for each of them?
Yes.
greatest of all time
it's saying card is a nil value which makes not a lot of sense
especially because the voucher in question isn't claimed
oh wait
i'm fucking stupid ain't i, god damn locals
huge L
it works now
🔥
hello guys ! I am trying to use the loc_vars function to load some descriptions for my joker but i can't understand the function... Can someone explain it to me or at least show what I have to do for the text to appear please ? (ps ignore the all the text it's a inside joke)
I already readed it but I can't understand the two lines that makes the description appear
do i just need to copy it and switch the stone from j_stone with my joker key ?
No.
then what do i have to do ? xd
how can i edit a config.extra variable when creating a joker through SMODS.add_card()?
local _card = SMODS.add_card({...})
_card.ability.extra = ...
Hello gay devs
I think you need to do
J_modprefix_jokerkey
Not sure , never did info_queue before
ok i am going to try that but more generaly what does the G.P_centers means ? I have seen it alot but i can't understand it
It is where every joker/consumable/deck/booster/edition/enhancement/voucher and other things are.
Yes.
Thanks :3
How can i tell if a specific consumable has already been used this hand?
This round you mean
Make a table with all the keys of consumables used and go through it , you can empty it every round or shop
Add key when consumable is used
You would save it in a variable.
i just done it and now i do not crash but there isn't any of the descriptions appearing on the game
Wait let me check if i can find something on the wiki
Hello !
I am not sure this is the right place but I am looking for resources to start creating mods
I already looked up some git repo, but the structure is different each time, and the main structure of the code is a little confusing for me rn.
I found some online tuto but this is for very basic stuff and often the files arent even splitted across multiples folders
Do you now where I can find some resources or did I just need to lookup in every repo to learn ?
@modern schooner
Found it
something very usefull to me is the vanilla remade with the SMODS format it is always the same structure and it is usefull to see a full mod https://github.com/nh6574/VanillaRemade/tree/main
thank you 🙂
info_queue[#info_queue+1] = { set = 'Other', key = 'my_key', vars = {card.ability.mult} }
Thanks ill take a look !
Secondary question that i should have asked first: how can i make it so that you can only use a specific consumable once per hand?
(Example: You have 2 "the lovers" thanks to showman, i want to make it where you can use 1 but you can't use the other until next hand)
You have to take ownership and make highlighted cards 0 or maybe a higher number than 5 , so you can’t use and when context.end_of_round revert it back , i think this should work
I recommend 0 but i think that can crash , idk give it a try
I was using those tarots as an example to illustrate my point, but this is for a custom consumable, not one already in the base game
is there an easy way to make jokers take up 2 joker slots or would I have to do some lovely patching?
You could remove a joker slot when added and add 1 when removed
Using add_to_deck and remive_from_deck
that would display weirdly I feel
@modern schooner
Yes, but that is the only way.
ah well, worth a shot
What if you have 2 jokers ?
You could absolutely make it take up two slots, it’s just a bit of a pain to do
Hey eremel :P
Do you know how can i make info_queue for modded objects ?
(Ofc you know )
You mean just putting a modded item in an info queue, or custom info queues?
Custom info queues
I think both actually
I want to make an info_queue for credits on some jokers and also i wanna know how i can reference a joker (modded ) in an info_queue
info_queue[#info_queue + 1] = {set = 'Other', key = 'key'} or info_queue[#info_queue+1] = G.P_CENTERS['key']
I checked the wiki and it said [outdated] so i didn’t bother using it , turns out it hasn’t been changed , thanks <3
thank you for all your effort but i can't seem to find something that work...
i am just gonna stick with loc_text i think
I'm making a Joker that will create a random enhanced card if you have two or less hands remaining
But why do the created cads have different ranks and suits compared to what's shown on the card sprite itself?

Also if I reload the game, the ranks and suits just disappear visually
I just had to pick this hour to continue coding didn't I
how can i make so i can only sell if i have enough money? (the sell cost is -5 :P)
Make a food poll
Pool
And add all vanilla food joker keys
You can do spawning with create_card
Change this a little ⬆️
Don’t forget emplace and add_to_deck
what is this
How to spawn a joker
Random thi
Tho
You need add key
Just use SMODS.add_card instead
But it’s just a less functional add card 😭
She’s doing her best 😾
.
I can give you an example
Yeah
got it
so
j_cavendish
i just want don pollo to spawn food jokers 🥀
why is it so hard
Just use add card its easier
did you make a food joker objecttype
He can make a pool
this
just copy it from cryptid
where
Or just for thus joker
maybe later for less hassle
(You can search in github )
tyyy:3
someone REALLY needs to document G.P_CENTERS usage
god damn
all of them
Can’t he make just make a table of all food joker keys
Because he just wants to spawn a random one
it's easier with an objecttype because then you can do SMODS.add_card{set = "modprefix_Food"}
maybe without the modprefix i dont remember
I’m pretty sure parking is a food
Jevonn told me he selected a joker randomly for it
no the FUCK its not
Iirc
Isn’t default optional ?
ohhhhh
well either way
thanks guys:3
Doubt
Time to read ceyptid code to figure out how pointer works
i use odds feature for random spawn right
elaborate?
Let him cook N'
do i need the modprefix?
not sure
i dont think so
Yea it doesnt
yall the goats
Good schmorning chat
@red flower can i access game information, if i want to run an outside script using python
I wanna make an ai that plays balatro for you ,
idk probably?
Brraugh is 0.003 the same rate as the soul or is it just a random ass number
But i need to check for game objects, like $ , hands / discards
G.jokers
It would be a crazy project
the same
Tyy
If money then yes(get)
should be good?
There you go
Probably can make a calculate function, before you actually play the hand , not counting for variables
Problem now is with blinds
There’s noway i would be able to make this compatible with mods
i might be demented, but can you mess player's setting with jokers?
Yes
You can change
Game speed
To 0.25
If you’re a mf
How would i add cross mod :P
I actually looked for this
There are 2 ways i think
I think you can compare hands not sure tho
Also
You might be able to make a table of all normal hands if played hand isn’t in the table then its a secret hand
@lament agate
"if it aint broke, dont fix it" ahh
jokes aside
i might do that
how do you write tables again
Local table ={}
local standard_hands = {
High = true,
Pair = true,
TwoPair = true,
Three = true,
Straight = true,
Flush = true,
FullHouse = true,
Four = true,
StraightFlush = true,
Five = true
like this?
Vanilla remade
Under zany joker / jolly
Etc
They’re strings btw
“”
Local standard_hands={“High Card”,”Two Pair”…},
theyre all
using
the default table
poker_hands
wait
Get the hand from context.scoring_name and check in G.GAME.hands if it's secret, idk the exact key or if theres one
how do i make an event unaffected by game speed
Don’t give uo
i was thinking i multiply it
i multiply delay by game speed
so its 'effectively' always gonna be when i want it
whats the value for gamespeed
G.SETTINGS.GAMESPEED
thx
i'm tryna make custom challenges that incorporate some of my custom jokers but the challenge i just made crashes if i use my custom jokers, yet it's fine with vanilla jokers. is there something i need to put into the joker id so it knows to look for my modded jokers?
Basil
#context.poker_hands[“Flush”] returns the order or flush right ?
In poker hands
uhh
#context.poker_hands["Flush"] wouldnt return shit
because of the hashtag in the front
but yes
otherwise
it should return the table for flush
what does # even do
it returns the length of that table
so for instance
if i have 5 jokers
#G.jokers.cards will return 5
length of string, number of elements in a table
this is a better explanation
putting # in loc_txt also makes it disappear
Good information
trust me, id know
Flipped []
my bad on that one
Common gaymer moment
i was drinking when i wrote that joker
I can tell
lmao
fucked up
Say that 5 quickly 5 times
this joker is the result of me spending enough time here
im about to get to work on the window effects
Gl
figured it out but how do i name it lmfao
Also more {C:attention}
that's also the only joker in my mod that uses loc_txt
every other object uses a localization entry
Loc_txt{name=“”}
i wish i could make resolution changes faster

prevent someone copying your code by messing it the fuck up
got it working now ty!
as a multilingual, I don't like loc_txt except when I make objects purely for debugging purposes
loc files are much better for translation
and everythings in one place
that's exactly what I mean
I’m never translating
someone else might
-# inb4 "that's their problem"--
developing Balatro mods as a multilingual sure has an advantage
your mother tongue self simply won't allow you to stick to loc_txt

actually, loc_txt also supports multi-language but loc files are better
...so do atlases.
is it actually possible for a joker to copy their adjacent jokers?
or pussy is just a myth
blueprint?
yes
you can use the new SMODS.merge_effects function
documentation whre
in the docs :3
under utility
hi N smiley face
hi
how do you fare
im doing better thankfully wbu
im okay
life has been a little less stressful lately
im sorry to hear that
i wouldnt mind
im looking forward to getting groceries either today or tomorrow
thinking about getting some burgers and chicken and maybe some steaks
get some asparagus for em
damn, I should've checked this sooner
it was added in the last release
neither context.press_play nor context.before swap the chips and mult properly
try context.modify_hand
this worked, glad to know this context even exists lol
its the flint context
how exactly do I use it
like, just plug in tables returned by SMODS.blueprint_effect?
the hell happened 😭
calculate = function(self, card, context)
if context.cardarea == G.play and not context.blueprint and context.full_hand then
local all_above_five = true
for _, v in ipairs(context.full_hand) do
if v:get_id() <= 5 then
all_above_five = false
break
end
end
if all_above_five and #context.full_hand == 5 then
G.E_MANAGER:add_event(Event({
trigger = 'after',
delay = 0.4,
func = function()
create_card("Tarot", G.consumeables, nil, 0, 0, "c_justice")
return true
end
}))
return {
message = "Choco Chip Cookie.",
colour = G.C.TAROT
}
end
end
end
}
whats wrong with it
ok so first off you use create_card without doing anything with it
oh shit
you usually do
local card = create_card(...)
card:add_to_deck()
area:emplace(card)
second
why not SMODS.add_card
also this context check will run whenever cardarea is G.play
which can mean many things
joker won't make funny judgement sound
when are you trying to call this
"minos_die" works but judgement doesn't
so what should i do
.
end of round? before scoring? or some secret third thing
after scoring
context.after then
and context.after?
if context.after then
...
end
thanks
return Xmult_mod, message and sound instead of x_mult and sound to insert your own sound
this thing
god this feature is so jank😭
i still dont get it tho
like
where do i put the sound
As I understand it, G.GAME.current_round resets every round, so this code picks a new suit every round? If so, is there somewhere I can write to that resets after every hand?
local function reset_willatro_jokeinthebox()
G.GAME.current_round.willatro_jokeinthebox = G.GAME.current_round.willatro_jokeinthebox or { suit = 'Spades' }
local joke_suits = {}
for k, v in ipairs({ 'Spades', 'Hearts', 'Clubs', 'Diamonds' }) do
if v ~= G.GAME.current_round.willatro_jokeinthebox.suit then joke_suits[#joke_suits + 1] = v end
end
local jokeinthebox_card = pseudorandom_element(joke_suits, pseudoseed('willatro_jokeinthebox' .. G.GAME.round_resets.ante))
G.GAME.current_round.willatro_jokeinthebox.suit = jokeinthebox_card
end
inside the return table
so like
sound and Xmult_mod in the same thing?
is there a way to make a booster pack such that you only can add the selected consumable to your consumable area? my consumables can only be used in a blind
specify select_card in the booster definition
add select_card = "consumeables" to your SMODS.Booster object
wait whats
nice
alice multiplier
it's a thing from my mod, you can ignore it
why would alice multiply
what should i replace it with
mind your own business, old hag
it's a multiplier coefficient
ohhh okay
message = localize{type="variable", key = "a_xmult", vars={card.ability.extra*card.ability.extra.xmult}},
Xmult_mod = card.ability.extra*card.ability.extra.xmult
it's just a wacky thing that allows my mod to function without relying on Cryptid's misprintize
this is how my code looks like btw
oh, just card.ability.extra.xmult
like I said, the mult behind only acts as a coefficient in my mod alone
ohh okay
If there any command for checking what's on the Base event queue with DebugPlus?
update
Change your mod prefix to something else
smods?
yes
lmao
this is week old
(Mvan is used by a lot of mods )
i did say it was new
well fuck me then
When
im trying to see if an odd number of cards are scored
no, scoring_hand is a table not a number
also no because all numbers are truthy
okay
NO
check if it's not equal to 0
I have this custom deck that I wanna make trigger an event. It works on its own, triggering the "Event worked" message as soon as I start a run with the deck. But once I add the G.GAME.blind condition, it stops working, even if I'm currently in a blind. Is there anything I'm missing?
alright, im not too familiar with modulus (havent ever needed to use it) so this is appreciated
apply only gets called at the start of a run
yeah
sweet
still occur
Like you
please stop
ohhhhh, interesting
I'll look up some alternatives then, thank you
whats line 1763
how would i word this
if you want effects during a run, use calculate instead
if number of cards scored is odd, gain X0.2 the combined ranks of scored cards in Xmult?
all calculate contexts that work on jokers should also work on decks
can i see the line numbers
Awesome, thanks! I saw it on jokers, but just assumed it wouldn't work on decks. So I was using the VanillaRemade ones as reference, but they all seem to use apply
actually, now looking more closely, anaglyph works like that huh
that's because vanilla decks are simple enough
they don't have complex triggers
god how can you code with that font
i dont see anything wrong there, did you save?
WHATS WRONG WITH THE FONT 😭
just goes to show I need to try more stuff before making assumptions, thanks again!
its hard to read in general and also hard to distinguish between () and {}
you know what
fair
[enable autosave]
have you saved the file
Ss
Try putting {} around the things in SMODS.merge_effects
if left_effect or right_effect then{
{local merged_effect = SMODS.merge_effects(
left_effect or {},
right_effect or {}
)
return merged_effect
}
}
?
no, like this
{left_effect or {}},
{right_effect or {}}
ohhh
sorry edited
Looks fine
everything's red now
you have an extra } on each
huh
syntax errors moment 
Yes.
hey does anybody know how would I make for a variable to appear in my jokers text?
#number#
for example how the glass joker changes values everytime a glass card breaks
Loc_vars
{return {vars={your vars}}}
In your lock_text
#1# is for first variable returned #2# for second etc
loc_vars = function(self, info_queue, card)
return {vars = {vars1, vars2, ...}}
end
Full function ⬆️
bett thx yall
Check out https://github.com/nh6574/VanillaRemade
For reference
Big shoutout to N for this one
Now add effects as infoqueues
nice
(going insane)
nah, i think
finally
Cheshire Cat is a joker in my mod that initially would have this effect
but was changed to "copy a random joker at start of round"
Take key of right and left and add them to infoqueue
Problem is how you gonna update them
(Scrap the idea )
thank you for understanding me
how do you add the compatible blueprint thing tho
oh right, JokerDisplay
Check vanilla remade
it has a function that copies the copied joker's display
doubt it would also work on copying multiple jokers
(It can)