#💻・modding-dev
1 messages · Page 174 of 1
not that i'm aware of
i don't use extra and i haven't experienced any issues with it
What version of Lua is Balatro running? Is table.move() not available?
great, just below the cutoff
When I try to use it, it just says "attempt to call field 'move' (a nil value)"
Why

itsp ossible that its not in the version of luajit thunk ships
in which case I have it cause #1336473631483760791
ive never coded anything in balatro before, how would i even start to implement custom jokers into the game
thanks
Ah, makes sense. Thanks
anyone know why this isn't working?
SMODS.ObjectType({
key = "clubs_pack",
default = "j_gluttenous_joker",
})
local clubs_pool = { pools = { clubs_pack = true } }
SMODS.Joker:take_ownership("gluttenous_joker", clubs_pool, true)
SMODS.Joker:take_ownership("blackboard", clubs_pool, true)
SMODS.Joker:take_ownership("onyx_agate", clubs_pool, true)
SMODS.Joker:take_ownership("seeing_double", clubs_pool, true)
SMODS.Consumable:take_ownership("moon", clubs_pool, true)
if next(SMODS.find_mod("YART")) then
SMODS.Consumable:take_ownership("yart_rmoon", clubs_pool, true)
end
do you not need to include all the prefixes for take_ownership? (e.g. "j_gluttonous_joker" vs. "gluttonous_joker")
also i tried with the prefixes and that didn't work either
dunno then :/
could someone mod the game so that chicot reverses boss blinds instead? start with 0 discards > double your discards, all club cards are debuffed > all club cards give x1.5mult when scored
genuinely the worst joker in the game
you could, though that needs a lot of patching
why so?
because i'm malding over the fact that my last 5 soul cards have been chicot and have tanked my runs
tbh if its that ante 8x boss blind which increases blind size by like, what, x5 (or x3, i forgot), then it can
and most of the time its not even that bad either
not having to deal with debuffs is quite convenient, i had my run ruined because of "All face cards are debuffed" so many times lol
you can you just messed up the extra confi on one of them
wait actually?
Hi, anyone know where find the example mods inside of steamodded?
i cant find them now
and i dont have a older version
thanks
yes its just code
i dont actually know what im doing wrong there 💀
i manually put consumables with that exact same format, and it worked every time
thats a manually put consumable of mine
its "extra" which seems to be nil, kinda weird
your the one setting extra
hmm
shouldnt this be correct?
.
wait nevermind
theres a typo
😭
bruh i hate myself
musketeer and muskeeter, my banes of existence 💔
thanks for telling me tho, this will genuinely save so much of my time 😭
Do we have to play_sound('multhit2') before calc returns, or would the game/smods handle that part?
SMOD takes care of that
They also take care of showing the messages, so you don't need to include localizing stuff (unless you want a special message)
Chat, is this stable?
Idk what I'm looking at, but you can simplify all those not equal checks by removing them
is there an smods way to execute an action when you buy/select a specific joker from a pack? or would i have to lovely patch that
For buying a joker: (see pic)
Choosing a joker from pack? I'm not sure if there's one.
That's the third time someone's asked that today
Answer is not really
But Sweaty Theoretically There Could Be A Metatable Applied To It So It Might Technically Matter
Solutions included a hook to add_to_deck or cardarea:emplace
I've no idea how that works
Unfortunately
Which part? Line:39~43 or?
it'd be god-awful form to do so, but you can change how a Lua object behaves on member access (a.b or a[b]) or member assignment (a.b = c or a[b] = c) by making it call an arbitrary function
where's it defined? dont see it in misc_functions, common_events, state_events, card.lua, or game.lua
maybe i missed it
Unless you think the case bagels just mentioned is relevant to your case
I was referring to every ~= check in the screenshots you sent
In the for loops
i think card.lua? I am not sure about that method since my solution was the cardarea one
I'm planning for something else to happen when those checks are passed, which I haven't defined yet.
I see, then don't mind me
how would i make this apply only to the cards held in hand
context.cardarea == G.hand
hero
ok kind of similarly, how do you make a joker always appear with an edition? like how cryptid always makes exoplanet appear with holographic. i looked at the exoplanet code but i dont see anything for it
Maybe I should add a context for this
Probably need to hook create_card_for_shop in UI_definitions.lua
Use set_ability in your object
balatro/lua plugin for jetbrains?
thx
all of them my beloved
intellij or pycharm
makes sense
I just use Rider because its what I have and the plugins are compatible with it anyway
fair
you don't really need all of them do you
why do you guys not just use vs code
i only use rustrover, webstorm (sometimes), pycharm
i may be stupid here but i don't see how using an IDE intended for other languages could be better than just a normal sybtax-highlighting-enabled text editor
rider is the layout I'm most familiar with
i still do use VS code on occasion to skim through source code to try and figure out how certain things work in Balatro
whats jetbrain
it's like using a chainsaw to cut butter
you may be partially correct but here are my reasons
vs code is made with javascript- refactoring
- support
- not microsoft
- it makes me look cool
- easy to use out of the box
- git support built in
i only use intellij idea
"git support built in"
the humble gitkraken:
ok
- everything is js now whether you like it or not
- ?
- ?
- just use vscodium or something if you care about that
- no it makes you look like you're using a flush five to win first round
- vs code is also easy to use
- vs code also has that
support as in supprt from developers
6 as in most of the requirements come fresh out of the box
7 ok
"it makes you look like you're using a flush five to win first round"
the humble 10 of spades seed:
point is overkill
Jokers: Speculo + Chad + Fractal Fingers
in any case
VSCode has git support built in as well
ok
real men uses git from terminal
real men use neovim in the jetbrains terminal
🏳️⚧️ then I guess
oops didn't mean to reply
same 🏳️⚧️
All this talk of IDEs and what would be overkill when you can get the same package with a terminal text editor.

for my mods I write my code on a napkin and then I scan it into my computer
Sad there’s no vim or nvim users here
i am an occasional nvim user
fr tho just use whatever you want I'm just half trolling
i ocassionally use the nvim but only if im feeling a bit devious
still i actually do think it's a bit overkill to use jetbrains stuff for lua
you can't really compile directly you had to just open the game to test
i thought that was just the case generally
what does generally mean in this case
like for what
as in when you're doing balatro modding
balatro is the only game that I really actively mod
i was modding a different game
JetBrains stuff is not free, while VSCode is open-source and free. 
Also who says that Java better than JavaScript
consider the following
Sometimes bad companies can also make good products, imagine
im too lazy to bring up a benchmark but i know that java is faster than js
just use VSCodium if you don't like Microsoft
Free/Libre Open Source Software Binaries of VSCode
it's the same thing but only the MIT part
Only moment where IDE speed matters is when you're using the most casual 30GB node_modules folder. That's it
In other cases speed doesn't matter
it shouldn't
Real men use micro in the nvim terminal
real men use real men
False
Real men.
real men use micro in the nvim terminal in the jetbrains terminal
magnetized needle and a steady hand etc
awesome but why are their name tags questions marks?
(brutally and with no remorse)
Ive come to the conclusion it is, in fact, art
pretty good
Looks better than my "art" so it's probably good
you self
its a seeeeecret (and one's just me so theres that)
in that case then i think it could use a bit more shading and there isnt enough contrast in the nameplates
their names are inky blinky and clyde
I can draw a pretty mean square myself
But that's about it
how mean of a square? im going to need a reference
I for some reason can make hats for Celeste and that's about the limit of my art
hell yeah
About 3 and a half quarts
i can't draw for shit
that's why i'm getting someone else to do all the art for Mistigris 
lmao good luck
I can draw just not well
needs the y to be like flickering at the end
I just got some of my friends to do my art for me lmfao
I just have dev art
This is about the level of my drawing capability so I feel you
This right here? Rivals van gogh
instead of drawing i just rip some of the stuff off of the balatro and r/okbuddyjimbo subreddit and add their joker ideas to the game
woo! all 1s
All the ones that look good I didn't do
you can use the text tool instead of sketch it on use the paintbrush /j
Yeah but where's the fun in that
i'm using the placeholder files from Cryptid
You should use the example deck skin its great
Is this a reference to the Rust Programming Language?
no
Lovely mentioned??????
How do I edit the original joker sprites? (I want to change The Idol into that hatsune miku from a mod)
Either #1300851004186820690 or take ownership and change atlas
with the power of ADHD I can do anything
Oh yea I should ask again since I have the all knowing you here
How do I check for if a glass card shatters again? I need to check for if a glass king or queen shatters
😭
That's quite the record egg
i usually draw my own jokers :3
same
randomly had this idea for a joker and realized it might be hell to develop
I believe G.GAME.hands has a reference to the example hands
unironically probably not that hard
does cause issue with spectrum framework's spectrum hands since they use a dummy "wild suit"
not like the example can't be replaced by mods using it (six suits does this)
pog
that means i should make my spectrum hands do that when i see six suits
or maybe i can just check if there is a different fifth suit? idk complicated x x
is it a good idea for a Joker though?
anyone can help me create a deck? Ehe, i'm so dumb xD
type of hand or exactly yhe same hand?
create an atlas of back textures for the deck, which is a grid of back textures, each back should be 71x95 pixels
add/modify this code to your main lua file
SMODS.Atlas({
key = "decks",
px = 71,
py = 95,
path = "decks.png" -- the name of the deck file, i will be using decks.png for mine
})
then, add this basic code after that to register the deck into the game, everything which i comment edit at the end you should edit
SMODS.Back({
key = "DECK_KEY", -- EDIT
loc_txt = {name = "DECK NAME", text = {'Deck Subtext', 'Respond if you need help with text markdown'}}, -- EDIT
atlas = 'decks', pos = { x = 0, y = 0 }, -- make sure that you're using the same atlas key and adjust the x and y correctly
config = { extra = { } }, -- some configurations for scaling and etc.
calculate = function(_self, _back, _context) -- remove the underscores if you are using the variable
-- MODIFY THIS FUNCTION HEAVILY; https://github.com/Steamodded/smods/wiki/calculate_functions
end
})
that should be about it for the basics
Is the localization default always en-us.lua when my mod doesn't have default.lua? Or do I have to specify that?
en-us.lua is used as an additional default next to default.lua
x8 is crazyy
Is this change safe?
just wait until you decide to go broke maxxing
have one fake consumeable every nine to occupy a place.
yo that's actually goated
tho I don't think a debt collector makes it easy for u if ur in debt...
it has a big mult for the fact you cant ever have any cash...stuck in the poverty mines...
Just feels off seeing lowercase x.
yea at some point ill polish up ui viewing
its nowhere near release ready rn
in your ConsumableType, there's a property called collection_rows, you can set it to {4, 4}
What if I want each page having different row numbers?
i don't think that's supported by smods as of currently, it's basically just automate the page separation and stuff, as the collection page orders are always fluids
other mods can technically adding to your consumable as well and cause things to shift around, so there's not really a good way to determine proper order if there's a dynamic amount per page I think
you could probably build a completely custom collection page though and hook the call using it
I'm under the impression that recreating the example would take a lot of meticulous effort and/or luck, so I feel like it should have a big reward
functions/common_events.lua:2169: bad argument #1 to 'ipairs' (table expected, got nil)
Stack Traceback
===============
(1) Lua local 'handler' at file 'main.lua:612'
Local variables:
msg = string: "functions/common_events.lua:2169: bad argument #1 to 'ipairs' (table expected, got nil)"
(*temporary) = Lua function '?' (defined at line 31 of chunk [SMODS _ "src/logging.lua"])
(*temporary) = string: "Oops! The game crashed\
anyway to fix this?
Exact same hand. Order doesn't matter but rank and suit does
bump
hello people
somebody knows how to referece the total money that the player has?
it it G.GAME.dollars ?
I don't see why it shouldn't, did you test it?
yea
Im trying it to take all of your money when you leave the shop but the game crashes
Wouldn't it be better to just ease it to 0?
ill try to check the ox code
the thing is that I want it to take 10% of your money, but im doing this at first to try to make it work
you're not giving the money config a value
ah fair
either way you don't need a config value if what you're doing just depends on the current money
I could do a local, thats true
at best maybe a config value for the relative amount of money to take (the 10%)
You can also just return dollars = -G.GAME.dollars
Now the joker works perfectly, but the text doesnt updates when the multiplier goes up
SMODS.Joker {
key = 'tithe',
loc_txt = {
name = 'Tithe',
text = {
"At the end of the shop it takes away {C:money} 10% {} of your",
"money (min {C:money} $1{}) and adds to its {C:mult} +mult {} the quantity taken",
"(Currently {C:mult} +#1# mult {})"
}
},
config = { extra = { mult = 0 } },
loc_vars = function(self, info_queue, card)
return { vars = { 0 } }
end,
rarity = 3,
atlas = 'ModdedVanilla',
pos = { x = 1, y = 0 },
cost = 2,
calculate = function(self, card, context)
if context.ending_shop then
local taken_dollars = G.GAME.dollars * 0.1
if taken_dollars < 1 then
taken_dollars = 1
end
card.ability.extra.mult = card.ability.extra.mult + taken_dollars
return {
ease_dollars(-taken_dollars, true),
print(card.ability.extra.mult),
message = 'Collected!',
colour = G.C.MONEY,
card = card
}
end
if context.joker_main and not context.repetition then
return {
mult_mod = card.ability.extra.mult,
message = localize { type = 'variable', key = 'a_mult', vars = { card.ability.extra.mult } }
}
end
end
}
The "(Currently {C:mult} +#1# mult {})" seems to be good, i dont know where the error is
No it’s timed like other calculate events
Does it need to be instant?
Depends on the joker. I've had issues with duplicating a joker that didn't ease dollars instantly to 0, resulting in negative money
functions/common_events.lua:2250: attempt to concatenate local '_type' (a nil value)
Additional Context:
Balatro Version: 1.0.1n-FULL
Modded Version: 1.0.0~ALPHA-1410a-STEAMODDED
LÖVE Version: 11.5.0
Lovely Version: 0.6.0
Platform: Windows
Steamodded Mods:
1: Talisman by MathIsFun_, Mathguy24, jenwalter666, cg-223 [ID: Talisman, Version: 2.0.3~dev, Uses Lovely]
Break Infinity: bignumber
2: Multi Text Box by Riv_Falcon [ID: MultiTextBox, Version: 1.0.0.25w07a, Uses Lovely]
3: DebugPlus by WilsontheWolf [ID: DebugPlus, Version: 1.2.0, Uses Lovely]
4: holotro by Riv_Falcon, and potentially others [ID: Holotro, Version: 0-alpha_25w07b, Uses Lovely]
Lovely Mods:
Stack Traceback
===============
(3) Lua global 'get_current_pool' at file 'functions/common_events.lua:2250'
Local variables:
_type = nil
...```
Oh, nvm.
how do i get the level of the played hand as a number
I think that’s what the dollar buffer is used for
OK, scratch my word, I do need help.
This is the part I'm presuming that caused the crash.
Im assuming something like G.hand.level but no idea
G.GAME.hands[hand type name].level
But be careful because Talisman the mod is gonna turn them into tables.
for the played hand not for a given hand?
also i have 0 hope of this being compatible with any other mod lmao my code as organized as macaroni art 😭
No, as in G.GAME.hands["Flush"].level for example.
im confused
OK so what did you mean by "the played hand" and "a given hand"?
how to make a joker spawn for the first shop of the game?
i want a joker to give Xmult for each level of whatever hand you play so i need the level of the played hand type as a number
Hook create_card_for_shop and check G.GAME.round == 1
Then G.GAME.hands[context.scoring_name].level
Sorry, I had a typo: scoring_name, not score_name.
thank you wise one
yo, hi everyone
i, as a very mentally stable person with 0 knowledge of modding or löve (or lua at all) decided today that i wanna pick up balatro modding because i had an idea.
wow
good luck then
that was me yesterday and im not doing bad at all
ive made 2 jokers so far
problem is - i can't figure out where to start and what, like, programs to use for it all
everyone directed me to this server's modding section, and either there isn't a guide thread in the forum channel, or my attention-impaired ahh didn't see it
any help/tips?
yes, this is the best and until now ive learned a lot
lets start with what your idea is
Do you have any experience with programming?
what be your idea autistic frieren
dont cry we all are autistic here
very true
i'm making a topdown shootemup in godot in parallel to this and decided to take up some other project to kill the burnout
i'm uhh, somewhat knowledgeable
why is this strechy TwT
only in godot tho, so the learning curve would kick me in the family jewels hard
ok so first of all you need to learn how lua does tables
Thats the smod documentation for balatro, very helpful
ok, so, i had a thought about the stake stickers, and the fact that they're purely decorative
{
key = "string",
int = 1
}```
Another golden resource is Balatro's source code
no this is basically it
its very easy lol
yeah
just item is equal to whatever value
nah, i meant like i need to reeducate myself a bit, because i'm only thinking in godot terminology here (which i don't even have a 100% vocabulary of), so i need to actually understand what a table is 🥲
but that's minutia
oh, starting to catch on
it happened to me also, not to know where to put commas, etc
with practice we'll get it
yea, it's just adapting to the syntax
so if you wanted to make a joker it would be smth like
-- SMODS.<whatever object you want to define>
SMODS.Joker {
-- what the joker would be called internally (like if you were checking what a joker is)
key = "key",
-- what shows up in game
loc_text = {
--- name of the card
name = "name",
--- description of the card
text = {
"description line 1",
"description line 2"
}
}
}
i had an idea of adding some positive effects to decks/jokers based on their sticker and its difficulty
my game keeps crashing when I leave the shop
I know it has to be because of this jonkler
because more replayability and more reasons to collect collectibles is good imo
but i cant see the issue
try removing parts of the context.ending_shop code until it works
the thing is that it was working last night 😭
yep, something to do with the "local taken_dollars" line
(based off the fact it's the only part using the word "local" here)
i'm guessing there's some variable in there that is supposed to be filled in, but it's left undefined
and it returns null and everything goes down the drain
(had many bugs like these)
ive done it
what was it
the machine spirit works in mysterious ways
why not just return mult = ...?
also, coming back to my problem, we kinda went off topic
not realy sure but ive been doing it like this
i was asking for what software to use T . T
Probably VS Code, notepad++ or something like that
try using just mult = ..., it's a lot easier
i'll watch some tutorials once i get there
wtf you have to use neovim to be a pure developer /j
thats your choice, but choose any code editor of your preference
vscode in 2025 🤮 disgusting chat fr ong
you shouldn't need the card = or message = that way
okay ill try
why return anything when you can modify mult and add all the events yourself
thanks
think about the function call overhead guys cmon
ive been using Sublime Text
im just learning ok? 😭
...goddamn the development world is wider and more diverse than i thought
we need to go back to old-calc, the performance was so much better 😩
@olive moth another things you might want are the DebugPlus and tooManyJokers mods
not a whole lot of people making balatro mods on linux software anyways
i thought there would be some visual interface kinda stuff, closer to game engines, but in these trenches we use notepad++
aight, thanks for the advice chat o7
too many jokers such a good mod i love shilling
someone should make an app for making balatro mods
can we go back to oldestcalc (0.4.2)
ide dedicated to balatro modding fr
trvthnvke
we definitely have the resources for that
calc is short for calculator btw
hee hee hoo hoo 
i'm putting back no reply pings in my server nickname
true tho
but i guess an app would be a bit too limiting for some mods tbh
iirc immolate is intended to have a sort of block code solution at some point that translates to cpp
like that one minecraft mod maker app (iykyk) that had lots of tools to create items and entities and all kinds of stuff, but no real way to add something groundbreaking like whole new game systems/mechanics
it's just abstraction layers all the way up
whassat
who doesn't love it
a game maker style drag and drop interface for creating joker calculate functions
where get
we will never be able to abstract as hard as midjourney
i mean ive heard talk of it being maybe planned
not it being like a thing
oh
i personally don't see it happening but meh
i just say things dont listen to me or take me seriously or believe anything i say ever
also, while we're on the topic of minecraft and its mods, is there any chance to have mod interactions/compatibility?
oh no
you can have mod interactions and compatibility
in balatro? yeah
lessgoooooo
95% of the reason for lovely's existence is compatibility
you can communicate with other mods by changing registry values if you want
i think you can do that in usermode windows right
you can also use lovely to patch other mods if people aren't doing something you need them to do
as long as it can run as admin
the whole stake sticker buff idea is good, but it gets way way way better if you add, for example, cryptid's wagonload of stakes
-# i do this to pokermon because it doesnt keep the seal on a joker after it evolves
just checked and looks like it doesn't need any special permissions
ill double check tho
I want a stake that doesn't apply the other stakes and simply forces discards to become Hands instead
oops all hands
...also i probably need to update my game, i think there's been some updates since like 5 months ago when i installed it
(i had too many mods crash the game even in solo)
anyway, thanks again for the support!!
cya around
❤️
u2
The Saw:
Swaps Hands and Discards
burga-
My bad, thought this was for a boss blind
bump
prob bcuz of ( and ) ig
all other declarations start with smods.typename {
codehere
}
its still a function call either way
func{
}
is sugar for
func({
})
smods lua is different from normal Lua tho
you can do the same thing with like, print"hello"
yeah also my modded jokers add to the pool just fine
thats wicked
..no?
smods lua isn't a thing
unless you're talking about luajit
prob that
no this guy just doesn't know hwat he's talking about 🙃
maybe you can use SMODS.insert_pool?
Hello, good peploe of balatro. Today I come with a maybe not that simple question: How do pools (for jokers, for example) work? How do I set them up? How do I add jokers to them etc etc (idk) (ok, more than one question)
what's the best context to calculate a scaling x_mult similarly to Steel Joker ? (for every steel card grant x0.2) I wish to do it for every joker with negative, but can't really find an easy context to update the value
just a running count of negatives or a trigger per negative ala baseball?
you usually don't need to worry about pools unless you're:
A) making a new pool
B) have spawn conditions/custom rarities for your item (e.g. steel joker can't show up unless you have a steel card)
steamodded normally handles pools for e.g. Jokers, Consumables, etc
Would you look at that: I encounter myself in a situation where those two conditions are met and thus I need this knowledge.
Is there a way to make my joker change Glass Cards probability to get destroyed, without modifying any other probability?
yeah sorry I dunno enough about custom pools in steamodded to teach other people 😅
I dont get this to work, the face cards are destroyed, but the mult doesnt add
the print for "That was a face card" never shows up so the error must be in that for loop
you arent giving xmult anywhere
I know im not doing the joker main, but the mult is not scaling
this entire logic makes no sense at all
JOGLA?????
yes?
what?
why are you here
7th beat cards and fool's gambit mod development.
-# hi jogla 
a running count would be the idea
-# hi guigui hi null
use context.joker_main

isn't it supposed to run only when it's time for the joker to trigger their effect in a round ?
because I kinda want to see the current mult everytime (I'm displaying it in loc var)
you count them in locvars too
might be nice to have an example steel joker or whatever in the ModdedVanilla example
Hey new here but I was wondering is it possible to make enhancements like Lucky Card and such appear over a card as if they were a seal instead of replacing the card backing?
well, I got a look at the vanilla files and trying to replicate it doesn't work as intended
following a tutorial and trying to start my mod off, and i have a question
the vanilla files aren't the best to look at for counting effects, thunk does them in a stupid way
this is an example of a counting effect joker
can the mod_id have underscores in it, or is it better to just leave it on full caps with no breaks?
underscores are fine
sorry i think, i chat at wrong channel
@wintry solar hope you don't mind the ping, the new select_card functionality seems to not let you use consumables while a pack with selectable cards is open
oh I'll look at that, I'm actually just fixing a few things with it rn
cool
also
is there any chance this could be implemented per-card? i have a consumable type wih a hidden spectral card i wouldn't want to allow to be pulled to the consumable area due to perkeo shenanigans
I'm fixing how the per set works, would that cover your use case?
since the hidden is a spectral, i think so?
how can i test the suit of each card in context.repetition
Card:is_suit() unless there's a smods function for it
context.other_card:is_suit()
thank you wise eldritch god of the machines
hi, why is context.other_card nil in the last line?
if context.individual and context.cardarea == G.play then
context.other_card:set_ability(G.P_CENTERS.m_steel, nil, true)
G.E_MANAGER:add_event(Event({
func = function()
context.other_card:juice_up()```
it's in an event and has been cleared by then
you can save it locally if you need the event
yup, fixed it ^^
got an exclusion list working now anyway 👍


once you know how to lua and what the functions are, yeah
looks like i found a new hobby
can use select_exclusions on booster objects to give a table of keys to exclude from selection on latest commit
sickkkk
is there a game state for being in the round?
like G.STAGE == G.STAGES.RUN
that should work, I think
is there a game state for being round 
thunk after having both G.STATE and G.STAGE
G.STATES.BALLATRO
it makes sense, its an easy check if your in a run or not. Other stages could have multiple states (and I think they sometimes do)
😭 this is confusing
how sticker for consumables
is there a way to make something happen when you hit the select button
at least 2 thirds of them do
oh waitthats backwards
3 seconds?
oh actually all the stages have multiple states
guys please how im desperate
I dont really know why the mult on this card doesnt go up
I need it to work somewhat like canio, where if you destroy face cards (on any way) it would make mult
same as jokers i think
card.ability instead of self.ability
Also you should use :is_face() instead of checking the id so stuff like Pareidolia works
okay
doesnt work 😔
but i think im checking it wrong, what does the ipairs work for?
i took the code from the canio but it seems to be checking the not-played cards
also tried "consumable"
Consumemable
that was bcus i held m to close balatro lol
Consumemable is fire
i think it's all caps tarot too i might be wrong
so TAROT?
okay nvm wiki is probably right
correct spelling would be Consumeable
idk, try eval G.P_CENTERS.c_hermit.set
what a typo can do
hm
lol
why must stickers be so weird
How are you testing if the sticker works?
Try applying it with debug plus
how
those are only for eternal rental and perishable
That's very odd
It doesn't cycle like enhancements?
Sad
Add v.is_face and before that
and or or?
no but it should default to 0.3
Set it to max just too see if it works at all ig
And
It checks if "is_face" exists on v before running it
I don't really know why is_face wouldn't exist in this instance
Wait
I AM AN IDIOT
Okay so your code doesn't make sense according to the documentation
i think i know why wait
nevermind?????
context.destroy_cardis a boolean and is used to mark the state where you can return{ remove = true }to destroy scoring cards. This should go with your first if- If you want it to trigger when cards are removed, you need to check
context.remove_playing_cards, although that apparently also triggers on discard for some reason, so I'd test that- You can filter that out by also checking
context.scoring_hand
- You can filter that out by also checking
- The list of cards in that instance is
context.removed
Extracted code from the main game for Caino:
if not context.blueprint then
if context.cards_destroyed then
local faces = 0
for k, v in ipairs(context.glass_shattered) do
if v:is_face() then
faces = faces + 1
end
end
if faces > 0 then
G.E_MANAGER:add_event(Event({
func = function()
G.E_MANAGER:add_event(Event({
func = function()
self.ability.caino_xmult = self.ability.caino_xmult + faces*self.ability.extra
return true
end
}))
card_eval_status_text(self, 'extra', nil, nil, nil, {message = localize{type = 'variable', key = 'a_xmult', vars = {self.ability.caino_xmult + faces*self.ability.extra}}})
return true
end
}))
end
end
if context.remove_playing_cards then
local face_cards = 0
for k, val in ipairs(context.removed) do
if val:is_face() then face_cards = face_cards + 1 end
end
if face_cards > 0 then
self.ability.caino_xmult = self.ability.caino_xmult + face_cards*self.ability.extra
G.E_MANAGER:add_event(Event({
func = function() card_eval_status_text(self, 'extra', nil, nil, nil, {message = localize{type = 'variable', key = 'a_xmult', vars = {self.ability.caino_xmult}}}); return true end
}))
return nil, true
end
end
end
i hate myself
:start_dissolve() to do the animation
(I'd like a second opinion on this as I've had side effects using this)
for me the remove = true works
Only works when you are scoring/discarding cards
Typo'd pseudoseed
it works but it gives perishable to all jokers instead of only one
ok boosted is done now how do i change reroll cost correctly
how do i go back in time and prevent myself jinxing it
lmao
i'm just trying to make the easiest +chips card, christ on a skate😭
if i had a penny for each crash i'd be able to hire an AAA Studio's worth of programmers to do this
how do i make perishable apply to only one joker and have the message actually appear on the targeted joker
it's been feeding me a whole bouquet of errors, of which this is the most frustrating because i can't understand what the hell it's trying to tell me
it doesn't apply perishable to EVERY joker, but that's still not a single joker
also ronald is applying perishable to itself
which i don't want
Replace ~= self with ~= card for that
The second opinion is don’t do this
In calculate, card is the actual joker, self is the code (more or less)
What are you supposed to use then when destroying cards outside scoring/discarding?
Well it’s more that you need to make sure you do everything that’s required when removing a playing card and the majority of people have no idea how to do that
I should make a util function to do it probably
ronald no longer applies perishable on himself but he still applies perishable on too many cards
Add and not context.repetition and not context.individual.
Does add_to_deck work?
That would be very useful. I'm checking the Immolate code right now and it does feel it's a lot more involved
No add context.main_eval
wait who are we talking about here
how do i make config
oh wait
didn't think about that 💀
a real read-the-docs moment
I’m not sure it will
But it’s worth a quick test
Otherwise I will add some on_select support or something
how do i make ronald apply perishable on only a single joker plus have the "i'm lovin it" message appear on the affected card
lemme try it
it either doesn't work (does the visual fluff like the trigger animation but doesn't actually add chips), or makes the whole game crash when i try making it work
Can I have a mini explenation on when main_eval should be used? I didn't understand the note in the smods doc about it
i'm clearly confused about how to do the whole calculation code
It’s used for the main calculate step in that family of contexts for the joker. The reason to use it, take end of round for example, is if other mods add custom contexts, such as {end_of_round = true, destroy_all_death = true}, they would be caught by the old not repetition and not individual check
I think
Though looking at it it looks like it’s in the wrong place 🤔
it didn't do anything
Does anyone know why this isn't retriggered correctly (e.g. with Hanging Chad)?
It doesn’t replace there area check
Add a return nil, true
what's the 2nd value for
Oh weird, thought I saw it done before
concurred, what does the second value indicate?
That also didn't work (neither within the if nor without)
Maybe you should put your ease_hands in an event, that's what burglar does anyway
And then returns nil, true
ease_hands_playedalready puts it in an event, doing it twice would put it in the wrong spot in the queue- returning
nil, truedidn't do anything (the second return value isn't even used)
The second value indicates that your joker triggered
this is an enhancement
I beg to differ
What’s the whole code look like? It looks like you remove any of the scoring stuff
SMODS.Enhancement {
key = "TimeWalk",
atlas = 'BakeryEnhancements',
pos = {
x = 0,
y = 0
},
replace_base_card = true,
no_rank = true,
no_suit = true,
always_scores = true,
weight = 0.1,
calculate = function(self, card, context)
if context.cardarea == G.play and context.main_scoring then
if not (Talisman and Talisman.config_file and Talisman.config_file.disable_anims) then
G.E_MANAGER:add_event(Event {
trigger = 'before',
delay = 1 * G.SETTINGS.GAMESPEED,
func = function()
play_sound("Bakery_TimeWalk", 0.8 + math.random() * 0.2, 1)
return true
end
})
G.E_MANAGER:add_event(Event {
trigger = 'immediate',
func = function()
card:juice_up(0.6, 0.1)
return true
end
})
end -- Entirely visual
ease_hands_played(1)
delay(0.85)
end
end
}
i'm pretty sure an event's delay already takes into account the game speed
yeah I'm undoing that to match the timing of the sound
Oh do return { effect = true }
how would i make ronald stop turning multiple jokers perishable and do only one (and have the message appear over the joker that got perishable'd)
Add and context.main_eval to the end of round check
ah I didn't have sounds on
that worked
The other one is for joker retriggers without a return table fyi
why are neither of those documented
Because writing docs isn’t fun
okay, there we go
i want the message to appear below the affected card and not ronald
so when a card gets afflicted with perishable the "i'm lovin' it" appears
i also don't want ronald to reapply perishable to an already perishable joker
message_card = whateveryourappliedrefis
actually, i want perishable to apply at the end of the shop, not the end of a round
because applying perishable at the end of a round makes it tick down by 1 immediatley
okay it applies at the end of the shop but the "i'm lovin it" message doesn't appear under the card
maybe it should be before the code?
no. that didn't work
why is it not showing up?
also ronald still applies perishable to already perishable jokers
which in turn resets the perishable timer
filter them out in your for loop
mixed together Idol code and the card creation I was figuring out yesterday.
The intent is to create a Cryptid card when a targeted Diamond card is played (I'll add the "first" check later), but right now it just targets nil
that's not in the for loop
(okay well fixing the double = in the config might help)
mkay it still doesn't trigger the effect
but how
you are already filtering out your own joker
you just gotta apply the same concept
if G.jokers.cards[i] ~= card and not G.jokers.cards[i].ability.perishable then
you didn't add self as the first parameter of the function
and this doesn't do what you think it does
the stuff in parenthesis always evaluates to "Hearts"
it should be this but it just doesn't show
So... I want to make a mod for the game, but i don't know how to program at all, how can i learn? (or find someone willing to work toguether with) I really need the help
message is the message, message_card is the card the message should appear on
so you should have both
ohhh
well how would make it so that the game counts stones as another suit
now what
start by learning lua
What is that
I see
Is it possible assign an existing planet card to a new hand type?
what should message_card be
So it is saying it's targeting Aces, but that's likely due to being the default value, as it doesn't actually activate when you play an Ace of Diamonds.
still isn't retargeting after the round either so that too
i still have no idea what to make message_card because nobody told me about it in more detail
message_card should be the card you want the message to appear on
so, the joker
it can be any card you want, but if you want it to show up on the joker then yes
i need it to show up on the joker that became perishable\
then do message_card = chosen_joker
what?
you have a syntax error
comma after your message
fuck!
hm?
i might be a biiit stupid
how do i spawn a booster pack with debugPlus and toomanyjokers?
that error is probably SMODS.add_card not finding the card, what are you trying to add?
the Cryptid Spectral card
i need to make ronald blueprint compatable
Try SMODS.add_card{key = "c_cryptid"}
i know i gotta add something
but what
easy as pie
while in shop, go to collection, booster pack and press 3 while hovering over the one you want to spawn
okay cool the whole thing works now
checking the base suit of the cards doesn't take into account wild cards
just fyi
for here?
cuz I did make this adjustment
everywhere you used base.suit == "something"
switch it for :is_suit("Diamonds") everywhere?
if you want wild cards to work with it yes
and I recommend you use not SMODS.has_no_suit(v) instead of checking if the effect isn't Stone Card
that way it won't break with modded cards with no suit
there's also SMODS.has_no_rank
somebody knows why canio is always referred in the code as caino?

misspelled, and early versions had the misspelling in-game too
that gave me headaches
couldnt find the canio code
and it was caino
now back to work
It's worse, there's both english color and british colour + consumable/consumeable
It's so funny
true
tbf I also interchangeably use color/colour
this should not be too hard
i just gotta do a retrigger for every bonus card in the deck
You'll have to explicitly enable your mod to allow retriggers of Jokers.
SMODS.current_mod.optional_features = function()
return { retrigger_joker = true }
end
Then you can use this set of conditions... you'll just need to get the amount of Bonus cards in your deck. Also, full deck or what's *left* in the deck?
if context.retrigger_joker_check and not context.retrigger_joker and card == G.jokers.cards[1] then
return { repetitions = value } -- where value is the result of the amount of Bonus cards.
end
full deck
do you guys know whats the grey color that is used in the "currently xmult" descriptions?
C:inactive
ive tried C.grey and C.joker_grey
thanks
now how do i check how many bonus cards i have
shouldn't you try to achieve this on your own before asking for help
is there somewhere to find the functions to change card suit, like the Tarot cards (Sun/Star/Moon/World), cuz digging through source code isn't yielding too much
if you just want the function use SMODS.change_base(card, suit, rank) you can leave suit or rank as nil if you don't want to change either
i dont know how to respond to this
am i really that inept at coding i have to continually ask questions about things that i should know about
you should look up how other cards do it, steel joker does exactly what you want for example
(other than checking steels instead of bonus)
I recommend you attempt it on your own and then ask for help if it doesn't work, you're not going to learn if you get help at every step of the way
steel joker counts all steel cards on update, which I don't recommend
currently. this is all i have
but it does point them as to what function counts them is my point
what, "tally"?
that's just the name localthunk gave to the variable
so for converting all the cards in a hand played, something like this would do?
Does it work?
so that's not it
self.ability.steel?
it does not!
Ah, because you're using context.other_card
other_card is only for context.individual
and full_hand is presumably not defined either, it's context.full_hand
oooo, gotcha, what do I want to use instead if it's not .individual?
look where steel_tally is calculated
not there
well you're looping through context.full_hand, so you should access context.full_hand[i]
you shoud look at the source code under Mods/lovely/dump/card.lua
^
LOVELY DOES THAT???
the one you're looking at doesn't have the modifications steamodded does, which are useful
okay i think i might be able to get it now
if SMODS.has_enhancement(v, 'm_steel') then self.ability.steel_tally = self.ability.steel_tally+1 end
yeah
that's basically how you learn to mod the game, by looking at what already made cards do
i still have this though
alright, it still doesn't do anything
and this isn't teaching me anything about how to get the amount of lucky cards in your entire deck
Oh! I should go look at Vampire
????? I literally pointed it out lol
you did?
yeah, what do you think "m_steel" is?
replace context.cardarea == G.play with context.main_eval
oh. fuck
FUCK
now what?
this is probably not correct
well obviouly becase there's two ifs
repetitions=
My jonkler works perfectly, but is missing the message when any card gets destroyed
"if if"
yeah you can't stutter in Lua unfortunately
that worked! it's only doing the first card in hand but I'm pretty sure I fix that by adding an i = i+1, so thanks!
repetitions should equal the amout of bonus cards in the whole deck
no identation txt goes brrrr
no you shouldn't do that, the for loop automatically increases by 1 by default
which i still don't know how to get
well, either way it still isn't
it's only doing the first card in the hand
because you're returning inside the loop
right, the classic blunder
question: how would I make a joker check a played card's enhancement?
like
i'm specifically looking for played steel cards
SMODS.has_enhancement i think?
i'd say go look at steel joker's code, but it's right here
for @obtuse silo ^
...is there a font for the plaque on Legendary jokers? 🦐
i've gotten somewhere and nowhere at the same time
i know how to check for all bonus cards in the deck but i don't know how to turn that into repeitions
I dont know but if you get it let me know 🙏
hey dumb question, how should i mark a whole hand to be destroyed after scoring?
I just drew each letter myself following the letter style
well you count all the bonus cards, and then put that on repetitions
how exactly
steel joker code is doing just that FYI
and do i have to change anything about my code
yes you do, v is not defined there
i'm just looking for the specific code that identifies if it is a steel card
what is v intended to be
if context.cardarea == G.play and not context.repetition then
for i = 1, #context.scoring_hand do
return {
remove = true
}
end
end
end
Guess I'll have to edit something together for just one letter.
this doesn't look correct to me
well, thats only the cards scored
hm, wouldn't the first return just halt the for loop?
SMODS.has_enhancement(card, 'm_steel')
im currently using
if context.cardarea == G.play and not context.repetition then
for i = 1, #context.scoring_hand do
if context.scoring_hand[i]:is_face() then
return {
remove = true
}
end
end
end
For cutting the face cards scoring and it works perfectly fine
what platform do you use for coding, ive been using notepad which is probably not a good thing to be using, but i could be wrong
i would recommend vscode
vscode
i'm using notepad++
i realize i shouild be sending the entire code for my joker
I use vscode, but notepad++ its also good
the three most common are vsc notepad++ and sometimes neovim but the more important thing is incorporating luals (which is easiest on vscode)
luals meaning lua language server
still repetitions =
if you're able to ignore the millions of warnings due to undefined globals then yes
what the hell should i be putting there
you disable that
a number
key = "millicent",
loc_txt = {
name = "Millicent",
text = {
"Played {C:attention}Steel Cards{}",
"give {C:mult} +4 {} mult when",
"scored"
}
},
blueprint_compat = true,
rarity = 1,
atlas = "MintConditionCards",
pos = {x = 0, y = 0},
cost = 4,
loc_vars = function(self, info_queue, card)
return { vars = { card.ability.extra.mult } }
end,
calcualte = function(self, card, context)
if context.individual and context.cardarea == G.play then
if SMODS.has_enhancement(card, 'm_steel') == true then
return{
mult = card.ability.extra.mult
}
end
end
end
} ```
this should work?
but it SHOULD be the amout of bonus cards
yep, the == true is unnecessary tho
and you're missing the config definition in your joker
as said by the comment
oh okay why are you just putting v there
I don't get invalid global warnings nowadays
copied directly from steel joker code
ive been programming in lua without lua ls?? 😭
im really autistic
its okay I was too but then I switched to newovim and part of the guide I was following set it up for config so I had it and then it was giving me warnings so I fixed it
local num = 0 --we increment this
for i, v in pairs(G.playing_cards) do --iterate through every playing card we have
if SMODS.has_enhancement(v, "m_bonus") then --check for the enhancement
num = num + 1 --increment num
end
end
--num now holds the number of bonus cards we have
--if you only want the number of bonus cards in deck (so excluding those discarded, played, in hand) replace G.playing_cards with G.deck.cards
Is this in vscode
no this is neovim
Is it possible to achieve that in vscode
but you should be able to configure luals the same in vscode
for both you have to include steamodded and balatro in your workspace
Are you able to point me towards a guide to setting up the ls for that
This is what i did
if you don't care about it not working on others machines you can just change hte .luarc paths to the full paths
do i just put this into my code
theres some extgension you need probably
read it, understand it, and then yes
so what this is doing is finding every bonus card and putting it into a var
which is num
it is counting the amount of bonus cards in your full deck
well it doesn't put the cards in the var, it increments the var by one everytime it sees a bonus card
i see
should this go into the loc_vars section of my joker
because num is indeed a var
naw, in the calculate
variables can exist anywhere
when and where they become invalid is complicated
do i put it before the code that does the whole retrigger thing
full joker code now
okay
If you only want to repeat the leftmost you need more
there's MORE???
do you even understand your code
if context.retrigger_joker_check and context.other_card ~= card and context.other_card == G.jokers.cards[1] then there you go
this didn't do anything
i should add i made these changes
key = "millicent",
loc_txt = {
name = "Millicent",
text = {
"Played {C:attention}Steel Cards{}",
"give {C:mult}+#1#{} mult when",
"scored"
}
},
config = { extra = {mult = '4'} },
blueprint_compat = true,
rarity = 1,
atlas = "MintConditionCards",
pos = {x = 0, y = 0},
cost = 4,
loc_vars = function(self, info_queue, card)
return { vars = { card.ability.extra.mult } }
end,
calcualte = function(self, card, context)
if context.individual and context.cardarea == G.play then
if SMODS.has_enhancement(card, 'm_steel') then
return{
mult = card.ability.extra.mult
}
end
end
end
}```
this
ah you need to use context.other_card in has_enhancement
card is your joker, your joker is never going to be steel
i see
An mult shouldn't be a string in your config
+nil ❤️
it should be a number
AH
ofc
balaui doing it's thing
that gets put there by default?
Thanks a lot
I didn't know about specifying libraries
this is all I put
it's still not doing anything even after i set '4' to 4
¯_(ツ)_/¯
for reference, this is the current code
because you put othercard
instead of what i said
i sincerely apologise for my density

