#💻・modding-dev
1 messages · Page 385 of 1
does that return how many there are?
It's returns a table of each joker so #SMODS.find_card("j_modprefix_key") would.
ah schweet :D thanks!
ok so im still just a few days into lua coding on balala and there seems to be an issue with this part of my code
maybe probably the way im trying to check if .ppay exists under G.jokers.highlighted[1].ability and if not to create it but i got no idea how to fix that (if that even is the problem)
G.E_MANAGER:add_event(Event({func = function()
if G.jokers.highlighted[1].ability.ppay == nil then
G.jokers.highlighted[1].ability.ppay = G.jokers.highlighted[1].base_cost
else
G.jokers.highlighted[1].ability.ppay = G.jokers.highlighted[1].ability.ppay * card.ability.extra.rate
end
local mai = SMODS.shallow_copy(G.jokers.highlighted[1].ability)
if G.jokers.highlighted[1].ability.ppay == nil then
G.jokers.highlighted[1].ability.ppay = G.jokers.highlighted[1].base_cost
else
G.jokers.highlighted[1].ability.ppay = G.jokers.highlighted[1].ability.ppay * card.ability.extra.rate
end
mai["mult"] = mai["mult"] * card.ability.extra.nlrg
G.jokers.highlighted[1].ability = mai
return true end}))
local oldcalcseal = Card.calculate_seal
function Card:calculate_seal(context)
if not self.ability.set then
print(self)
end
return oldcalcseal(self, context)
end
```?
Bumping this before I’m able to work on it today. Still not sure why one hand check for ‘Wicked’ cards repeats code 4 times
calculate is called a bunch of times during a game, you need a context check
pls halp guys
what's the card supposed to do?
how do i prevent the custom suit from being included in the default deck
its a partner™ that when clicked doubles(.nlrg) a jokers values (currently only Jokers "Mult")
for the cost of it's base_cost
then it should add ppay to the jokers .ability which is the same as base_cost
if ppay already exists there it should be multiplied by .rate
and what's the issue with the code exactly?
does it not work or is it something else
thank you something
well if i actually click on the partner i
I'm guessing this is from shallow_copy? maybe the ability table is nil
but idk much about partners havent made one yet
that worked before i added the ppay part
Ah that would explain it then. In that case, does enhancements only support calculate function? Either way I’ll probably add a check for the drawing hand context or something similar
for what you want calculate with context.hand_drawn probably works
hmm idk, from what i see the issue is that ability is nil in shallow_copy
why does it crash when refering to context.blind?
wait i figured something out
now i have a different problem
but hey
im not crashing anymore
im pretty sure context.blind doesn't exist lmao
reference G.GAME.blind
chicot lied to me?..
most likely only exists during context.setting_blind
ah
this works thanks
Yep, there's only certain things in the context table at certain times
Though if you want to refer to the current blind you can also refer to G.GAME.blind
hmm, this code isn't working
add_prog?
it's supposed to call add/remove_prog for all zodiacs that have them, when it's added or removed
relevant for the two that add discards / hands
You are putting the functions in the center not in card.ability
No, card.config.center.add_prog
how do i add the tool tip next to my joker description, like how this has the description for stone cards?
info_queue
woohoo
Can you tell me in which program is the best to make drawings for Jokers?
Aesprite!!
Are there any rules for drawing them? 😀
Also wanted to know what words are usually highlighted in the description of the joker, everyone has a different one, there is not some common meaning?
how can i activate a card twice? (just so i can display messages twice)
Also, for joker descriptions, you'll just want to look at what Vanilla does consistently
It's not universally consistent, but just find a vanilla joker that has a close enough effect and use that as a reference
if you want to display messages more than once, use SMODS.calculate_effect({message = "idk"}, card)
Or you could do:```lua
return {
message = "message",
extra = {
message = "secondmessage",
}
}
true
This would not go before everything.
Unlike SMODS.calculate_effect
i forgot that this function existed, you mightve just saved one of my jokers from causing immense lag ty 🙏
Gotta love the question mark react 💀
I just meant I remembered I can have custom contexts using that which might make my joker with multiple repeating effects and messages much more efficient
what?
oh
i dont want to know what you did, but np 😭
You're going to know.
It returns one massive nested table, about 2 levels for each trigger :)
sob
calculate_effect would do nothing different in that case
it literally does the same thing as returning
I'm fully aware
But I'm gonna use that (or I remembered there's an actual method for retriggering jokers) to just retrigger the joker instead
theres indeed an actual method to retrigger jokers
Yeah I forgot about that
I'm not sure if a custom context would be better or not
Just cos idk how retriggering interacts with final_scoring_step
Hi! just arrived cuz im having problems intalling the bunko mod, i followed a tutorial about installing lovely and steammodded, opened the game via steam and it worked, but after adding the latest bunko version the game crashes with: Oops! The game crashed:
Syntax error: card.lua:5368: 'end' expected (to close 'function' at line 828) near '<eof>' and i can´t find anything about it in past messages, anyone knows how to fix? thanks!
or do you need the rest of the message
just tested opening without the mod and that does work
Get this version: https://github.com/jumbocarrot0/Bunco
yeah it now works! thanks!!
the other version i got was the one in the description of its trailer btw if it needs report or sth
so this ive learned is illegal (cuz im crashing)
now my question is: how else am i supposed to do it
it's because it switched developers
ohhh okay, thanks!
you need to do it in a function
and modify card.ability
i mean if you copy that if condition to calculate and modify card.ability.extra.nlrg_cost it should work
no i uh
i have no idea how to create new functions in lua
put the if to the end in smth like
......
end```
like N' said
Tried making my joker work, now it just does nothing if my last hand is like 60
ima try
ill be back for the next crash
how do i localize the text of an undiscovered custom consumable
I'm pretty sure you could just do G.GAME.chips instead of multiplying hand_chips and mult together.
Doesn't G.GAME.chips return the round score? I want the hand score
The hand score doesn't exist at the end of round.
Oh maybe yea
you would save it at final_scoring_step and then use that
how do i localize the name, collection, and undiscovered description of a consumable type
loc_txt = {
name = 'Name',
collection = 'Thing Cards',
undiscovered = {
name = 'Not Discovered',
text = {
"Purchase or use",
"this card in an",
"unseeded run to",
"learn what it does"
},
},
},
I don't want it in loc_txt I want it in the localization files
whats the thingy to find the mod prefix of a card?
card.config.center.original_mod.prefix?
Still does nothing, do I need to place final_scoring_step in the dollar function?
It's local so it doesn't persist.
If you put it in a local it will remain in calculate, put it in a card.ability.extra variable
card.ability.extra.final_hand_score = ...
So you can reference it in calc_dollar_bonus if it exists
Ah, okie
how can i use SMODS.change_base to only change the rank of a card?
oke
soo how can i do that
i would recommend looking at a mod that adds new consumabletypes like cryptid
Like number 1 or 2?
Remove the local
it's always cryptid
Still seems to do nothing for some reason, maybe it's my calculation idk but I do know it should trigger when my final hand scores a 60 (since 300/2 is 150)
I wonder if G.GAME.blind.chips exists in calc_dollar
i cant do this anymore 🥀
the marked part is the abomination i just created
everything else worked really well without it
I'm fucking stupid
I forgot it has to be my last hand
Sorry for wasting ur time, I'll go test it quickly
im not going to read the code because its too complicated lol
but the problem is that you have an extra end at the very bottom
Do you have the lua extension installed?
that extra end is bc of
what do u mean too complicated 😭
ur the expert not meeee
Yep it does work, thanks and sorry for wasting time
i dont 🥀
oh ok the problem is that youre missing a }
If you install it normally it should highlight where the error is
get the sumneko one
I'd also look into setting up your workspace folders to include Steammodded and the balatro source code
i aint that smart guys
i only code as a side hobby
aka bc im too addicted to balatro
I also am not smart but it's surprisingly easy to set up
And I'd recommend it even more if you're doing this as a side thing
No, it should be the lovely dump not the source code.
wow i love when the game has consistend code! how could I not thought that the key has to be lowercase but only in this exact scenario
time to look for a tut on how to set up (now that im (hopefully) almost done)
also just to clarify
were still talking vs code right?
or have i been living IN a rock
fun
probably yeah
Yes
dw i got no idea how to do that aswell (90% of times i got no idea what people are even saying to me)
so real
i should set up that stuff too, I hate not having like tooltips and stuff show up for me in vscode
if you figure out how to include the lovely dump in the workspace tell me how cuz i dont even know whats a dump (in this case of course)
i cant find no sumneko on vs code 💔
bro i dont either
it's the folder in your mods folder called lovely/dump
What if you try from there? https://marketplace.visualstudio.com/items?itemName=sumneko.lua
i just have my entire mod folder open
ts is all my dumbass can see
how
it's the first one that pops up for me
well "trying" i am
do i even have the right vs code atp
do you have vscode or visual studio
you got the blue one or the purple one
purpul
no wonder then
Free/Libre Open Source Software Binaries of VSCode
welp
that's not vscode
So it's running, thenself.config.extra.SealType must be nil?
Oh yeah right, I should probably do that too
can i try setting the self.config.extra.SealType to one of the sealtypes in self.config.extra.SealTypes?
Yes.
Also Blue and Gold wouldn't work with this method.
whys that
Because they are hard coded.
half of stuff still isn't there like or any SMODS and G. stuff and that's like 80% of what i use
lmao
i set the seal type to be red but it shows nil
well i want the seal to work with blue and gold
does any joker in vanilla even do something like that?
its beautiful
now how tf do i zoom
hi! how would i add a modded consumable type to the shop pool, if a particular deck is selected?
(similar to Ghost Deck)
How do i check if a specific type of spectral card is used
What does your loc_vars look like?
since black hole isn't a planet card
Oh, neat
yes it does
No, it doesn't?
If you did Red = 'Red' in the table then yes it would exist.
But currently it doesn't.
how do i specifically check for the black hole spectral card in the consumable section
if context.consumeable.config.center.key == "c_black_hole"?
ty
let me try that
I got an error
Oh wait nvm
Figured out i removed a lot of the if statement
(bump)
Maybe change the weight?
maybe thats why it didnt work the first time ngl
when i was doing that long code
IT WORKS!!!! Ty 🫡
now the seal appears
Yes, but this is probably the best way because you will only have to do Gold and Blue manually.
somehow the check at the bottom here is always hitting the leftmost instance of the joker, not the specific instance being calculated
Does it work?
i guess
one more question :>
how does shop_rate work? what would a shop_rate of 1 mean?
what are the vanilla shop_rates?
Add this after you define temp_card: ```lua
temp_card.juice_up = function(self, scale, rot_amount)
return card:juice_up(scale, rot_amount)
end
does anyone have suggestions on how to fix this?
context.forcetrigger doesn't do anything by itself if you don't tell it to do anything.
that's for cryptid compat, it's not relevant here
What variable are you setting this on?
wdym
also context.forcetrigger is a context added by the cryptid mod
that line does nothing
the line that's misbehaving is if G.jokers.cards[i] == card then
this seems to return true for any instance of the joker
I'm aware.
without having to wrap everything in a big if statement
i'm unsure what you mean by "this" here though
the again text is a little bit far
I have some code to fix most of these issues if you would like.
yeah i would like
Here you would create the fake card: https://github.com/Somethingcom515/SealsOnJokers/blob/allinone/main.lua#L2670
Here you would make it show the messages show in the right place: https://github.com/Somethingcom515/SealsOnJokers/blob/allinone/main.lua#L2963
Also with this method you could also get it to copy modded seals, but there would be possible crashes.
where would i use these functions?
ok hey ive done it almost
everything pretty much works
my only issue:
how do i update this passage every time i highlight a joker instead of when i press on the partner
You would replace temp_card = ... with functionname(card, "c_base", "add_to_deck") I think.
like this?
No, I meant you would put that in the calculate of your seal.
that code is in calculate
Remove temp_card.juice_up = function
is it good?
I need some help, I have steammoded and lovely installed, and I have the balatro multiplayer installed, but when I try to add bunco I get an error. (if im in the wrong chat lmk)
No, it would be something like ```lua
local temp_card = create_fake_joker(card, "c_base", "add_to_deck")
temp_card.seal = self.config.extra.SealType
local usedfunction = Card.calculate_seal
return usedfunction(temp_card, context)
Did you remove the previous one?
i did and the card does nothing now
theres the mods folder
You need to get this one instead: https://github.com/jumbocarrot0/Bunco
Did you define the function correctly?
Look up multiboxes in SMODS code
JoyousSpring makes use of this if you need a ref
yep
It's because self.config.extra.SealType is nil.
i tried it when it wasnt nil and it was showing Red
Also you need to do temp_card.seal = self.config.extra.SealType
and it does nothing
many thanks.
now it works but the text is still very far away lmao
Did you look at the second link I sent?
how do i check if a joker is from my mod
if card.config.center.original_mod and card.config.center.original_mod.id == "yourmodid"
how do i use it tho , i got it
You just put it somewhere in your code but outside of everything.
i did
it does nothing
remove the local
Also remove change_sprite and the event
is there a way to grab specific types of jokers to be reactivated? Example being retriggering any joker that gives chips on the final hand of the round
You maybe could but you probably couldn't.
I never worked with joker retriggers so i might be wrong but I think you can check something like context.other_context and context.other_return to check what joker you're about to retrigger
why does this crash when i click on a vanilla joker? shouldn't it just return false?
Context doesn't exist anywhere else
what?
calculate has context in it:
calculate = function(self,card, context <---)
can_use doesnt provide it
yeah but that's inside the first if, and it shouldn't even consider that one if card.config.center.original_mod == false
and if its from a mod i made sure that every joker provides the context in can_use_plantfood
whats the crash log
what's card in this context, the consumable or the joker i select?
the consumable
so what's the joker i select
G.jokers.highlighted[1]
oh so i should change card.config.center.original_mod to G.jokers.highlighted[1].config.center.original_mod? Cuz i want to check if the joker i select is from a mod
if what exists?
#G.jokers.highlighted > 0 ?
that works yeah
ima reply to myself cuz my stupidity got buried by other issues
you would probably need to make your custom context by hooking Card:highlight
could u explain that to me like im 5? qwq
no
i did but the seals arent randomized after every round idk why tho
ok 🥀
hooking: https://forums.kleientertainment.com/forums/topic/129557-tutorial-function-hooking-and-you/
to create a custom context you do SMODS.calculate_context{joker_clicked = true} and then use context.joker_clicked in calculate
thank u <3
Try doing ```lua
local seals = {}
for k, v in pairs(G.P_SEALS) do
table.insert(seals, k)
end
where are the poker hands stored?
G.GAME.hands
yea no i dont understand a word
should this work to upgrade spare trousers with 4oak aswell? i tested and its not working
Is this a take_ownership?
Is this for spare trousers specifically or is it any joker that asks for two pair?
spare trousers specficially
but could i change 4oak to inherantly include two pair in checks for that kinda stuff?
can i check the order of ranks of cards played from left to right?
It would probably best to take ownership of two pair to not check for different ranks.
tryna figure out the easiest way to check if a playing card has an edition when played what if can I use to do it? is set_edition gonna work just wanted to ask before doing anything
it upgrades cards to next edition foil --> holo --> neg --> poly
idk if that will work
Try looking at rework
ok bet yea i forgot about that tag
are there any examples of taking ownership of a hand to do smth like this?
they do in order of editions personally it makes more sense to have negative before poly for playing cards is there a way to make a custom one?
You would check if it is holographic and change it to negative instead.
afaik context.full_hand has all the cards in order from left to right
ok bet ill just make one with if c_card.edition ~= ' ' thanks!
nice, maybe stupid, but i want a joker to do something when cards played are in ascending order left to right (yes i know you can just move them before playing but i thought it would be cool)
would i use this in my take_ownership? idk what else i could be using
No, you would use SMODS.PokerHand.
Sorry to interrupt
Trying to implement a deck that changes all 52 cards to be a random chosen card, but the pseudorandom always chooses the same card regardless of seed
How would I change it so that it is different every run?
yeah but like what var is used to determine what other hands two pair is apart of?
No, I meant you would change Two Pair to just check if there a 2 pairs and not of different ranks?
ah
so that context is a table?
Yes.
what would be the best way to change this, its in SMODS/game_objects
really wish there was a way to detect the most recent card in a blueprint chain
how do i check if a joker is from some set? like how cryptid makes "Sweet jokers"? i already have something defined for the jokers i want
How do I make it so that only playing Hearts and Clubs triggers the joker, tried doing it like this but it keeps triggering when for example spades and hearts are played (ig because it detects that hearts is there)
also can i check if something is from X mod or vanilla?
You mean Candy Jokers? That is a rarity.
ooooh, tyty
if card.config.center.original_mod and card.config.center.original_mod.id == "modid" and if not card.config.center.original_mod
tyty!
does context.blueprint_card not work with juice_up?
calculate = function(self, card, context)
if context.starting_shop or context.reroll_shop then
for k, v in pairs(G.shop_jokers.cards) do
G.E_MANAGER:add_event(Event({trigger = "after", delay = 0.5, func = function()
if v.cost - card.ability.extra.discount >= 0 then
v.cost = v.cost - card.ability.extra.discount
if context.blueprint_card then context.blueprint_card:juice_up() else card:juice_up() end
v:juice_up()
play_sound("coin1", 1.2)
elseif v.cost > 0 then
v.cost = 0
if context.blueprint_card then context.blueprint_card:juice_up() else card:juice_up() end
v:juice_up()
play_sound("coin1", 1.2)
end
return true end}))
end
end
end
this is my code
lol
would this work for consumable?
You are checking if the consumable is from a specific mod?
don't think so
it checks if the highlighted things have an enhancement then if its from this mod
tried that but doesnt work
try if string.sub(v.key, 1, 7) == 'c_mills' then
to check the mod
it should check if the highlighted card have an enhancement from tat mod
wait im stupid
not if the consumable is from the mod
That's what card.config.center.original_mod is?
oh.. i might be stupid
</3
there's a lot of functions
but ye should be fine then
that's what everyone else is here for, to assist
you learn something new everyday
ye i also thought but still isnt working
if it have 2 enhancements from that mod it still can be used
-# bump
Why are you checking if the card is not spades or diamonds if you only want it to trigger on hearts and clubs?
It didn't work when I checked for if card is hearts or clubs so I thought the opposite might work
why doesn't it work (i want to do one effect if cards in played hand are ascending and another if they are descending)
Do you want it to return mult if all cards played are either hearts or clubs?
help?
Or a mix of both, yea
@daring fern doesnt seem to work how i want it to work , i might hardcode it and paste the code from the seals myself
Try putting some print statements in there.
See what's going wrong.
why does that print out attempt to compare two table values? I took only the [i] of it so it should be one singular value
aah so i have to take the rank of the card inside full_hand
is there a pool for suits?
SMODS.Suits
so how do i check the rank?
context.full_hand[i]:get_id()
Try looking at Blackboard
Thanks
fuck it i'm posting this whole thing here because there's so many weird bugs
this is meant to be a left and right blueprint but it has so many weird things going on
like somehow a bunch of scaling effects are entirely disabled if a joker is anywhere to the right of this one
in a chain of 3 the third one triggers the last joker twice rather than both first and last once
i'm genuinely just lost
You should be using SMODS.blueprint_effect
oh that's a thing?
Yes.
huh
Also you should use a function that does the extra sorting so you don't have to check if it exists.
Just to be sure, this is how I could get every card in the deck, right?
calculate = function(self, card, context)
if context.setting_blind then
for c = 1, #G.playing_cards do
local card = G.playing_cards[c]
print(card)
end
end
end
Yes.
how is this used exactly?
effects_table is just a table of all the returns.
also is this able to handle a joker returning nothing
It will return nil
i love how this code is mine
also how is this used
SMODS.blueprint_effect(copier, copied_card, context
im really unsure why this error appears? the problem is with the purple and blue seals , i had the gold and red seal and they worked fine with eachother but once i added the blue and purple seal it keeps crashing when it wants to score any card
How could i destroy a card thats in the deck?
card:start_dissolve()
and thats it?
Yes.
thanks
do i have to use this as my return value
i love how this code is mine
i think it should be an smods utility actually i think a lot of people want to use nested returns
It would be like this but instead of all jokers It's only the left and right ones.
ah
anyone know the solution?
How could i have my boss score requirement change mid blind?
Is it not the same problem? .Blue and .Red don't exist.
Change G.GAME.blind.chips
How would i change specifically the description and nothing else of the jokers?
thanks
the problem is with blue and purple
Overwrite the localization entry.
do you need to change the description dynamically or just once at game launch
How do i do that again? I forgor
hm, it seems to destroy the cards but not increase score requirement
calculate = function(self, card, context)
if context.setting_blind then
for c = 1, #G.playing_cards do
local card = G.playing_cards[c]
if card:is_face() then
card:start_dissolve()
G.GAME.blind.chips = G.GAME.blind.chips * 1.1
end
end
end
end
j_joker = {
name = 'G',
text={
"G"
}
},
No?
Wait mb
how can a consumable delete a selected joker?
But i dont want to edit the base localization files
how tho?, i did it like the red and gold and it doesnt work, the red and gold seal works fine
if you just add the localization entry in your own loc file it will override it, like a minecraft texture pack
Oh ok
if you're confused by something I said use your words like an adult
i literally coped the code from the vanilla remade mod
and how can i do that..?
if #G.jokers.highlighted == 1 then
G.jokers.highlighted[1]:start_dissolve()
end
```?
truth nuke
and how can i check the selling price of a highlighted joker
G.jokers.highlighted[1].sell_cost
can i add the mod info into the en-us file or do i need to still have a metadata file
You need the JSON.
What is the name of your main lua file?
and where do i find the base descriptions of the jokers
In the source code.
@daring fern im using pseudorandom_element but it doesnt reroll the seal effect at the end of the round like it does it once and then never again
in the source code ( card.lua )
none, it's just adding flavor text to jokers, nothing else
so thatd be en-us.lua
Then it would be nothing?
I don't know if you can just not have a main file.
You do need a main file.
just make a main file and have it empty then
what do i need to search for? j_joker doesnt exist
at least not in there
How do i debuff every suit?
when i search for it
are you asking about what joker do or what text they have
No, it's in localization/en-us.lua
then that is in en-us.lua
oh mb
mb i told you the wrong file
why doesnt the seals randomize at the end of the round?
by a boss blind?
yea
see recalc_debuff
if not SMODS.has_no_suit(card) then return true end
thank you
has anyone here made an enhancement deck that doesn't piggyback off of cryptid
anyone think this is underpowered? I thought it'd be pretty balanced but I'm noticing a lot of my friends playtesting my mod don't take it too often due to better in slot options
anyone know how to fix this?
how do you create a balatro deck without that one mod? is there a template?
also can you mod steam deck balatro
Yes.
representation
is there a guide for that somewhere
Balatro is a game with a lot of possibilities, but even more possibilities when modded. Featuring new jokers, new card enhancements, new mechanics, and new card types!
Check out Off The Console!
https://www.youtube.com/@OffTheConsolePodcast
▰▰▰▰▰▰▰▰▰▰▰▰▰【LINKS TO GAMES】▰▰▰▰...
it's underpowered by design of other cards existing that affect score in a more repeatable or controllable way. This isn't bad, but it doesn't take the edge off like you'd expect a pack of newports to do
lol
lowering the blind requirement is underpowered because jokers exist that give you big numbers usually
it was meant to be a mr. bones esque pickup, or a throwaway pickup you snag like popcorn/ice cream or smth
yeah that makes sense, those food items are early game scalers
so the newports technically can fulfill a similar role
if they showed up early and im struggling in the shop, yeah that pack of smokes will carry me
thats what im doing
you think it could benefit from halving the score req insead of just 0.75 or do you think it's fine where it is?
you wanna make it more alluring, make it half or 0.66
you can also do like the scalers do
start at half and go up by 0.1 or whatever
oh that's not a bad idea actually
eventually it starts making the blind scaling worse lmao
never expires, just keeps getting worse lmao
yep, it's meant to offset poor shops or low money making easier reqs
while the food items generally offset early game scoring but replace getting those nice setup jokers
You need to do not (hearts or clubs)
Wait why did I write diamonds wtf
brain fell out moment
Current code?
I said you need to do if not (hearts or clubs).
I thought that was what if not scored_card:is_suit('Hearts') or not scored_card:is_suit('Clubs') then meant
Oh maybe I need to add brackets
if not (scored_card:is_suit('Hearts') or scored_card:is_suit('Clubs')) then
not (x or y) = (not x) and (not y)
shoutouts to minecraft redstone tutorials for ingraining de morgan's laws into the deepest recesses of my brain
Still does nothing :P
It's because you're not returning anything your just doing Xmult = number
no idea if i can fix this but the edited jokers dont appear in a collection tab in my mod
You can't, you have to take ownership of them for that.
can i take ownership and then just change nothing?
Maybe?
Guess I'll just try again tomorrow
well this did work
also made a quick pr on this containing modifications i made to it in my own mod, feel free to use those
how do i make a joker give score when counting a card? like it stops and the joker shakes like even steven or odd todd
context.individual?
small issue, i have a custom card area and i only have a use button, found out the issue is that the allignment of the sell button is behind the card and inaccessible, how can i make that not the case so that the button are alligned to the right of the consumeable like tarots
hilo, how can I make a boss blind disable negative jokers 
There is a boss blind from cryptid that does exactly that.
well I imagine there's a something in cryptid that does anything, so that makes sense
do you know which one
ok well cryptid has it's own mod-specific way of doing it
if (card.area == G.jokers) and not G.GAME.blind.disabled and card.config.center.rarity == 'jjok_special' then
return true
end
return false
end,```
this is my code for disabling jokers of a specific rarity, so just replace `and card.config...` with `and card.edition ~= nil and card.edition.key == 'e_negative'`
am I missing a comma or parathesis somewhere it says expecting ] on line 32
What line is that?
Incorrect brackets for pos
anyone know how to fix this ?
what is line 1287
paste it
ship it
well what do you call it?
whats with you and question marking everything
i just wanted to reference balatro university
Someone know how to mod balatro on mobile please
you cant afaik
no i mean a youkai that got ronned
steamodded is, as the name suggests, for steam
😞
its not called iosmodded or androidmodded
That's not why it was called that.
houjuu nue
Looking at SMODS.Sound in the wiki, why the discouragement of using .MP3?
idk i cant even find the card.lua
Can you emulate windows/linux
in lovely dump??
why was it called that then?
The person who originally made it was called Steamo
weird coincidence ig
please help
its this
in card.lua?
i guess this thing causes the problems
Everybody's lovely dump is very different.
oh yeah cause of patches?
how can i fix it ? i really wanna fix this annoying error
i got it from the vanilla remade mod so idk
how can i make this work?
i'm trying to take ownership of Stone Joker, but it still seems to be running the vanilla code for its loc_vars
oops sent early
tldr if i take ownership of Stone Joker, and change card.ability.extra to be a table, it crashes on hover because the vanilla loc_vars definition does arithmetic on card.ability.extra. i can work with it just using card.ability.extra as a number but i'd rather not for convention/consistency purposes
ownership call and localization respectively
@chrome widget was this the issue you had ran into
No, but it's just unfortunately a result of how SMODS handles vanilla items. Vanilla behavior is maintained as much as possible, so you're going to need to overwrite loc_vars too if you want to avoid it
i am. i think, at least. see the first screenshot
eugh
is set a valid argument to add_card
yes, although i think it needs to be a capital P in 'Planet'
yeah, I just realized the capital too lmao
im very confused
how do i put in a custom tooltip on a joker? it's the description of a modded tag if that helps
how could you use context.individual in an enhancement to only make something activate on the card that's calculating? i have an enhancement with a chance to give a random consumable, but the current implementation just gives the cards immediately upon pressing "play hand"
using context.other_card == card doesn't seem to work
Oh, right, I see. It might be required to patch out the default line in generate_UIBox_ability_table() that uses it
There are some other instances of taking ownership of default cards that require patches to not break them. For example, I had to patch out code for Swashbuckler and Joker Stencil in Card:update() in addition to taking ownership of the joker to implement them more cleanly
info_queue?
ive tried it but it doesn't help
Put it in an event.
at least the way im doing it
i can get the info queue to spawn descriptions of things in base balatro (like perkeo) but nothing modded
This, for example, shows the description for a Negative Tag
info_queue[#info_queue+1] = {key = 'tag_negative', set = 'Tag'}
so for a custom tag it would be this? or is that wrong
info_queue[#info_queue+1] = {key = 'prefix_tagname', set = 'Tag'}
thats what i have rn but its blank and the title is error
Assuming you have the tag set up correctly in a localization file
No
You'd either have to use a loc file or directly add it to G.localization.descriptions.Tag in your file
I think
time to learn how to do that then
ok, that makes sense
Isn't loc_txt automatically put into the localization?
I was under the impression that it was kept on the joker definition and it uses the loc file if it doesn't find loc_txt first
I thought loc_text was equivalent to having a localization file
how would that work? would an event make it evaluate differently?
currently i don't use context.individual, just context.main_scoring
oh, nvm i get what you mean
that makes sense
If something is not in an event it it will be called when it is calculated not when it happens.
yeah, i get what you mean now lol
Does anyone know how to iterate through played cards? Tried looping through G.play but its giving me trouble
for k, v in pairs(context.full_hand) do end
thanks!
for localization files: are stickers other?
Yes.
are booster packs also other?
follow up question if you are willing, any idea how to make this execute so that cards made polychrome are scored as polychrome
yes
Do it in context.before?
that worked, is there a seperate context for scored cards from context.full_hand?
context.scoring_hand
You're a G thanks!
does anyone know why none of my descriptions are loading? (also if i look at the deck my game crashes. prob a galdur issue)
How can I check for multiple suits within one joker without it causing any issues?
What that joker do?
You put all_speads instead of all_spades
Also this should be "Spades"
Just noticed that i am dumb 💀
my brain is fried
I feel like this code could be simplified depending of what this joker does
The joker is meant to activate specific abilities of other flush suit themed jokers depending on the type of flush played
i'm thinking of putting if statements for each suit in one if statement
to simplify the ability
i get an error saying its trying to compare a number to a table (its definitely a number) for the mult, but if i manually put a number its fine, whats causing that?
its not giving me an error from my script but from the common_events file
i dont get the same error with the dollars entry and i did print the xmult value beforehand
I have an end_of_round effect for a Deck, but it's triggering 6 times instead of just once. Is there an additional context i should use to only have it go through once for defeating a blind?
bump
oh, I had this exact issue. I just slapped a random filter on it to fix it to only trigger once, which I guess was and context.game_over ~= nil
idk why I have the explicit nil check
thats peculiar, ill give it a shot
nevermind i think it randomly started working?? im so confused
scanned the chat looks like context.main_eval might also be needed
might be a more sensical filter, wasn't necessary in my case.
the explicit nil is probably unnecessary though I think I was just tired when I wrote that haha
Worked!
Just let others know what I'm cooking #1270746376312979456 message
I did some changes to make code for efficiency reasons but the spades check isn't working
it doesn't return chips
bump
the elseif is only reached when you play a heart
change it to a separate if
Gotcha tysm!
Btw only next(context.poker_hands["Flush"]) is needed, you don't need to check each flush hand
how do i use multiple lua files for my mod?
assert(SMODS.load_file("filename.lua"))() in main.lua
ty
are you using the right prefix
yeah
prefix is para all lowercase
are the names loading
no
are you using the correct keys
yes
Would this code work for storing all played poker hands?
local SMODS_calculate_context_ref = SMODS.calculate_context
function SMODS.calculate_context(context, return_table)
if context.before and context.main_eval then
G.GAME.willatro_played_hands[#G.GAME.willatro_played_hands + 1] = G.GAME.hands[context.scoring_name]
end
return SMODS_calculate_context_ref(context, return_table)
end
is it inside of a localization folder
just... check for any hands that have been played?????
yes
yknow what heres the (unfinished) mod
maybe i missed something or misspelled something
(also it will crash if you dont have cryptid)
I want to track played hands so I can eventually get to resetting at the end of the ante, and then also upgrading any hands not played at the end of the ante, this is the only way I can think of doing it.
its dependent on cryptid? whats in this mod
why do i ask when i could just look actually
lemme see
food jokers
i haven't made my own food joker thing yet
its probably fine unless you actually open the pack so it should load
wait does it load for you?
no im just looking at the lua code dont have the game witj me rn
if anyone else wants to help with my localization files i have the whole mod up here
somethings cursed because the files and keys look fine
does anyone know a digital exorcist
yknow what may as well try it
oh the filenames wrong
wait
yup that works
it was named en_us instead of en-us
yeah
pros of programming: it does exactly what you tell it to
cons of programming: it does exactly what you tell it to
btw i just noticed jokerdisplay has the same problem
YES
but ive never noticed because the default is english
😔

every other language that needs something like that uses an underscore
existence of en-us implies the existence of British balatro
bo'oh o' seltzer
australian balatro

the funny part is i think en-us is british balatro (steamodded uses colour and not color)
also spare trousers
true
fuck youre right
maybe the united states was britain all along
there was no independence, we were still colonizing this whole time /j
aaanyways, uhhh,,
how do i add an extra side button to a joker
i hook card:highlight and make the buttons myself
find someone that did it and copy it off of them
fair
nothing is original
Yu-Gi-Oh! Mod for Balatro. Contribute to nh6574/JoyousSpring development by creating an account on GitHub.
well
i may just do this
ik the vinesauce mod does it
Yeah that's kinda the best way to go about it and learn from it lol
Damn
just try to understand how it works i suppose
you cant just have a button anyway you do need to hook it to things you want it to do
putting stuff in rows and columns still confuses me
After seeing this code my life became harder
it's not that complicated lol
it's literally the same code 4 times for each kind of joker i have
copied from vanilla
The problem is it's not a G.UIDEF.use_and_sell_buttons hook
Problem for me specifically
i wanted more control
uhhhhhh
you will catch me dead before i use get_UIE_by_ID
This thing triggers before highlighting card, I have no access for card.childre.use_button

Tbh I don't want to highlight card, do checks, and unhighlight it if needed, like idk
Maybe I should... but... uhhhhh
wait my tag description doesnt work
how do i get a textbox about a booster pack?
tooltip
Hm, maybe highlighting a card is not the worst thing I can do I guess
Is there any easier way to check hands played/not played in an ante? because I can not figure out this hooking stuff.
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...
tldr: copy paste the bottom function and change the function ur hooking
I can copy and paste fine, just struggling with the Smods garbage.
next(SMODS.get_enhancements(card)) gets if there's enhancements on a card, is there a get_seals / get_editions?
looking to check if the card is completely untouched
saw that
sticker ban 💔
there's not a get_seals, but if not card.seal will be true if card has no seal
same goes for if not card.edition on a card with no edition
interesting
What else is there
can you also more simply do if not card.enhancement too then?
formatting king right here

fantastic
why isn't this working?
I believe that doesn't work because SMODS lets you do this freaky thing where a card can have multiple enhancements
how do i make a sticker tooltip
its not info_queue[#1116390750314307698_queue+1] = {key = 'para_negativesticker', set = 'Sticker'}
with stuff like this existing
you have to have an extra () after the assert call
ah ok
recreating the whole ui from scratch
that seems significantly worse
arent stickers in other
i know because you asked earlier
why does this trigger on every face card
you are checking the edition, seal, and enhancements of the triggering card, not the scored card
you probably want to use context.other_card for all those checks
Is there a way I can make every new spawned playing card (from either a booster pack or a spectral card, etc) into a certain rank?
hook card creation maybe?
What would I use to copy a played card?
I'll give it a try! ^^
check how dna or cryptid does it
So, I've got this, but it crashes, anyone know why?
if context.before and context.main_eval then
for k, v in ipairs(context.scoring_hand) do
if v.enhancement or v.seal or v.edition then
G.playing_card = (G.playing_card and G.playing_card + 1) or 1
local _card = copy_card(context.scoring_hand[v], nil, nil, G.playing_card)
_card:add_to_deck()
G.deck.config.card_limit = G.deck.config.card_limit + 1
table.insert(G.playing_cards, _card)
G.hand:emplace(_card)
_card.states.visible = nil
G.E_MANAGER:add_event(Event({
func = function()
_card:start_materialize()
return true
end
}))
return {
message = localize('k_copied_ex'),
colour = G.C.CHIPS,
playing_cards_created = {true}
}
end
end
end
which line there is 375?
local _card = copy_card(context.scoring_hand[v], nil, nil, G.playing_card)
Oh it looks so bad omg
try playing just one card and let me know if it crashes
Still crashes.
yea this was just a hook to override the text 😭
try renaming _card so it doesn't start with an underscore
it shouldnt but idk what else the problem would be
Yeah, same problem.
anyone know mods that add an extra button to a joker?
i remember seeing a mod that added a "flip" card thingy that added an extra button to a joker in a yt vid but idk the mod
anyone know a sound replacer mod? (aka. a soundpack mod)
cryptid
double sided edition
bump
-# firstly how do you replace a sound in steamodded
Can someone help me figure out whats going on with trying to replicate blueprint? The game keeps crashing with a attempt to call method 'juice_up' (a nil value)
@lament agate
even the latest cryptid version doesn't have that listed in the collection
:o
hi bepis
tag's key is foodtag
localization:
Tag = {
para_foodtag = {
name = 'Safe Room Tag',
text = {
'Open a free {C:enhanced}Snack Pack{}'
}
}
},
shouldnt there be a class prefix like t_ similar to j_ for jokers?
i can't find it anywhere in cryptid
this is cancer btw
items > misc.lua > line 1449 onward
Anyone know why this doesn't do anything? I took the high priestess code from vanillaremade and put it in a joker.
calculate = function(self, card, context)
if context.setting_blind then
for i = 1, math.min(card.ability.extra.planets, G.consumeables.config.card_limit - #G.consumeables.cards) do
G.E_MANAGER:add_event(Event({
trigger = 'after',
delay = 0.4,
func = function()
if G.consumeables.config.card_limit > #G.consumeables.cards then
play_sound('timpani')
SMODS.add_card({ set = 'Planet' })
card:juice_up(0.3, 0.5)
end
return true
end
}))
end
end
end
okay idk how any of this works 
Cryptid lowkey sucks to reference ngl 
If I had a nickel for people who were asking about button stuff today I would have two nickels lmao
lol
If this were a new card type I would be able to help but not here unfortunately 😭
instead it's a specific joker,,
did you look at lobo corpo
lobo corpo?
Lobotomy Corporation
ok
@red flower may I ask you to test this thing for your mod? I'm curious is this works fine.
#1270746376312979456 message
Jut in one place, to make sure it not crash or smth
I just idk how to test it quickly because mod has so much content
what should i be looking for in the mod?
i'm not familiar with the mod or the source material
uhh p sure the implementarion is in the giant main file
what joker(?) is it?
its not jker specific as you asked
ctrl f for --=============== ACTIVES ===============--
Just curious tryna to see if there is a good place for learning or understanding the API for SMODS more. I am looking thru other mods and SMODS too and just a little stuck. Can anyone help?
Hello, I'm developing for the Balatro Multiplayer mod. I was trying to implement a new feature when I encountered a drawing crash cause by a nil access. When debugging the issue, I found this bug in the main Balatro source code. this self.T.H is most certainly supposed to be self.T.h, lowercase h. Is this known?
if you want more specific advanced stuf im afraid theres no better docs beyond other peoples code
bump
what does this unlock code mean, it's present for all remade legendaries
i meant like for adding something in the game that doesnt exist
ok think is progress i think
why is the use button pink
the vanilla remade examples should hopefully still be able to model at least some parts of what you're looking for. e.g. castle would demonstrate how to do a permanent scaling joker, how to identify a card's suit, and how to perform an action upon discarding a card
No I mean kinda like what Partner & other API based mods
i'm using a mod that adds different colour palettes
i'm using the trans palette
i'll prob disable it tho to make future screenshots look more like vanilla
or just switch to the vanilla palette
as void said (which you might have missed), your best bet is just referencing other mods at that point. there's not much documentation at least partially because it's a super broad concept, and it's hard to identify what would be generally useful vs what would just be a tutorial for your specific idea
ok fair I get it yea it def get what u mean its just tough man 😖 lol but thank you ill study some mods any good suggestions?
not really, i haven't played around with bigger mods like that yet (in-game or from a modding perspective). but if partner is the first one you named it's probably not a bad choice
bump, and is there a way for a joker to give another joker a sticker?
to answer your sticker question: https://github.com/chaseoqueso/Powerful_Balatro/blob/master/jokers/lich.lua#L40
what is card.ability.extra.planets set to?
2
why my joker doesnt retrigger another joker ability
SMODS.Joker{
key = 'gamer',
loc_txt = {
name = 'Gamer',
text = {
},
},
atlas = 'Jokers',
rarity = 2,
cost = 8,
unlocked = true,
discovered = false,
blueprint_compat = true,
pos = {x = 7, y = 0},
config = {
extra = { odds = 20, odds_mod = 1 }
},
loc_vars = function(self, info_queue, card)
return { vars = { card.ability.extra.odds, card.ability.extra.odds_mod } }
end,
calculate = function(self, card, context)
if (context.retrigger_joker_check and not context.retrigger_joker) and context.other_card ~= "Gamer" then
return {
message = localize("k_again_ex"),
repetitions = 1,
card = card,
}
else
return nil, true
end
end
}
it doesn't crash no, and handy_insta_action = "sell" allows me to sell cards from my other cardareas so that's cool
my other custom buttons don't work tho sadly
how do i apply an effect to every joker to the right? (for example, retriggering)
the mod i created will not show up in the game, so i cannot tell if my code will work
help
question, :is_face() naturally takes pareidolia into account, right?
correction: most of them work, you labeled them handy_insta_actions instead of handy_insta_action in your post lol
some of them don't work idk why
does anyone know why my file isnt showing up in game 💔
the simplex tableau
what am i doing wrong with my logic here that it's doing the extra xchips at end of round? 
do i need to do context.main_eval?
and not context.end_of_round?
can context.end_of_round and context.individual happen at the same time? 
also, how is hand size during a blind controlled?
What's the best way to test a consumable immediantly?
debugplus
G.hand.config.card_limit? or G.hand:change_size(mod) if you want to change it
where can i find the definition of change_size 
i imagine it's in cardarea.lua
I'm trying to make a joker produce xmult whend detecting a flush of clubs but it doesn't give Xmult at all
Hmm... my mod doesn't load
did you restart the run
return {
message = localize("k_again_ex"),
repetitions = 1,
card = card,
} ```
why doesn’t this do anything
my understanding of how the poker hands table works is that next(context.poker_hands["Straight Flush"]) is unnecessary as next(context.poker_hands["Flush"]) will always be true when the hand contains a flush
do you have the retrigger optional feature enabled
also context.other_card ~= "Gamer" is always true
where in the documentation can I find more info on how other_joker is used in Steammoded context?
My issue is that the spades part works but the clubs part doesn't when I use my Joker with Smeared Joker
How do I fix this?
Found invalid metadata JSON file at C:\Users\vieta\AppData\Roaming\Balatro\Mods/Gaff Mod/GaffMod.json, ignoring: [SMODS _ "src/utils.lua"]:566: bad argument #1 to 'match' (string expected, got nil)
oh I completely forgot about that
did that and it's still the same issue
trying to test my joker with smeared joker to see if it's working as intended
but the Xmult for clubs doesn't trigger
does it work without it
with a flush of clubs and spades
if it works without it then the problem is that youre returning for spades and it never reaches clubs
Yeah it does work without it
The folder for my mod will not show up in game doesn anyone know why
how can i make it to where my joker can work with wild cards and smeared joker
OHH now I get what Blueprint is saying in the code!!
It essentially checks if the next card after it is a joker and compatible with Blueprint, right?
replace all your ifs with this
if next(context.poker_hands["Flush"]) then
return {
mult = all_hearts and card.ability.extra.mult or nil,
chips = all_spades and card.ability.extra.chips or nil,
xmult = all_clubs and card.ability.extra.Xmult or nil,
}
end
hi n

