#💻・modding-dev
1 messages · Page 387 of 1
so just key_seal in descriptions/other?
yes
how do i make a ui element appear bc of my joker? i don't know any jokers that do that,,
looking at the function more , it seems to be doing 0 + 3 (my set money that needs to return )
the crash happens once my seal effect is not on gold seal effect and i try to score the said card with the seal other than gold seal effect
Anyone know why this doesn't do anything? I adapted the DNA code from vanillaremade.
calculate = function(self, card, context)
if context.before and context.cardarea == G.play then
for k, v in ipairs(context.scoring_hand) do
if v.seal then
G.playing_card = (G.playing_card and G.playing_card + 1) or 1
local copy_card = copy_card(v, nil, nil, G.playing_card)
copy_card:add_to_deck()
G.deck.config.card_limit = G.deck.config.card_limit + 1
table.insert(G.playing_cards, copy_card)
G.hand:emplace(copy_card)
copy_card.states.visible = nil
G.E_MANAGER:add_event(Event({
func = function()
copy_card:start_materialize()
return true
end
}))
return {
message = localize('k_copied_ex'),
colour = G.C.CHIPS,
func = function() -- This is for timing purposes, it runs after the message
G.E_MANAGER:add_event(Event({
func = function()
SMODS.calculate_context({ playing_card_added = true, cards = { copy_card } })
return true
end
}))
end
}
end
end
end
end
how can i give a played card a seal?
card:set_seal("modprefix_sealkey")
mightve found the problem , the elseif statement might be causing the problem
what do i write inside pseudorandom() ?
a key
or seed or whatever you wanna call it
just a unique enough string
i recommend using the joker name
or seal name
etc
ill just write prefix_jokername
that's what i do
uhhhhhhhhhhh
bump
like, opening a menu?
yea pretty much
remove the cardarea check
you can reference from how run info/settings buttons open the menu, its hard to explain lol
but there should be a function like this which you can run from your jokers
ty
i am actually making an inventory/crafting thing kinda like yggdrasil
but connected to a specific joker
i wanted a joker to have a 1/2 to give each played card a frozen seal, but this seems to give a seal to the joker and not the cards, what should i change card:set_seal so it works on cards played and not on the joker?
ty! all i have rn is this: #⚙・modding-general message
if only it didn't give all the seals at once and actually waited for the animation to end and my joker would shake everytime...
tried doing card:juice_up but it only did it once at the start
Put in an event?
oh my god he's having a seizure lmao
I may have forgot the return in the event
you alive still?
but how do i do set_seal if the event doesn't have context
yup
i made a joker
it gains 0.15x mult for every face card scored not effected by paradolia
card:set_seal("modprefix_sealkey")
also do you know how to make packs?
like joker packs so one mod can have mulibul joekrs
spelling :/
save the card to a local variable and use that in the event
you mean how to make multiple jokers in one mod or how to make a booster?
first one u said
you just put them in one file
yes
bc i have a json
in card:set_seal card is my joker and not cards i played
you can also have multiple files if you prefer that but it's not mandatory
Yes, you replace card with the card you want to put the seal on.
works :D
it works ty :3
:3 i did nothing but no probs
how can I add a info queue of my modded seal to a joker?
used what @crisp coral used for their blind descriptions lol hope you're ok with that so i can also give my boss blinds descriptions
is this blindexpander
idk what myst used but i used it
yeah blindexpander is a lib mod for adding that
hmm cool
do i just make an info queue that refers to the localization of sealkey_seal
you showed me G.FUNCS.overlay_menu so i'd say u helped
it's not nice to steal the key to one's house
i dont know how to fix this problem , can anyone help?
not that that'll stop anyone >:3
{ set = "Other", key = "key" } i think
what do you need help with
SMODS.Atlas {
key = "HappyJoker",
path = "HappyJoker.png",
px = 71,
py = 95
}
SMODS.Atlas {
key = "GlichedJoker",
path = "GlichedJoker.png",
px = 71,
py = 95
}
SMODS.Joker {
key = "joker2",
loc_txt = {
name = "Happy Joker",
text = {
"Gains {X:mult,C:white}X0.15{} Mult whenever",
"a face card scores, pareidolia does not count",
"{C:inactive}(Currently {X:mult,C:white}X#1#{C:inactive} Mult)"
}
},
loc_vars = function(self, info_queue, center)
return {vars = {center.ability.extra or 1}}
end,
atlas = "HappyJoker",
pos = {x = 0, y = 0},
unlocked = true,
discovered = true,
rarity = 3,
cost = 8,
blueprint_compat = true,
config = {extra = 1},
add_to_deck = function(self, card, from_debuff)
card.ability.extra = card.ability.extra or 1
end,
calculate = function(self, card, context)
if context.joker_main and card.ability.extra > 1 then
return {
message = "X" .. string.format("%.2f", card.ability.extra),
Xmult_mod = card.ability.extra,
colour = G.C.MULT
}
end
if context.individual and context.cardarea == G.play then
local other = context.other_card
local id = other and other:get_id()
if id == 11 or id == 12 or id == 13 then
card.ability.extra = card.ability.extra + 0.15
return {
message = "+X0.15 Mult",
colour = G.C.MULT,
card = card
}
end
end
end
}
SMODS.Joker {
key = "gliched",
loc_txt = {
name = "Gliched",
text = {
"Each card held in hand",
"gives {X:mult,C:white}X3{} Mult",
"{C:inactive}(Currently {X:mult,C:white}X#1#{C:inactive} Mult)"
}
},
loc_vars = function(self, info_queue, center)
local hand_size = #G.hand.cards
local mult_value = 1
for i = 1, hand_size do
mult_value = mult_value * 3
end
return {vars = {mult_value}}
end,
atlas = "GlichedJoker",
pos = {x = 0, y = 0},
unlocked = true,
discovered = true,
rarity = 3,
cost = 8,
blueprint_compat = true,
config = {},
calculate = function(self, card, context)
if context.other_joker then
local hand_size = #G.hand.cards
if hand_size > 0 then
local mult_value = 1
for i = 1, hand_size do
mult_value = mult_value * 3
end
return {
message = "X" .. mult_value,
Xmult_mod = mult_value,
colour = G.C.MULT
}
end
end
end
}
why wont this work
k
key = "HappyJoker",
path = "HappyJoker.png",
px = 71,
py = 95
}
SMODS.Atlas {
key = "GlichedJoker",
path = "GlichedJoker.png",
px = 71,
py = 95
}
SMODS.Joker {
key = "joker2",
loc_txt = {
name = "Happy Joker",
text = {
"Gains {X:mult,C:white}X0.15{} Mult whenever",
"a face card scores, pareidolia does not count",
"{C:inactive}(Currently {X:mult,C:white}X#1#{C:inactive} Mult)"
}
},
loc_vars = function(self, info_queue, center)
return {vars = {center.ability.extra or 1}}
end,
atlas = "HappyJoker",
pos = {x = 0, y = 0},
unlocked = true,
discovered = true,
rarity = 3,
cost = 8,
blueprint_compat = true,
config = {extra = 1},
add_to_deck = function(self, card, from_debuff)
card.ability.extra = card.ability.extra or 1
end,
calculate = function(self, card, context)
if context.joker_main and card.ability.extra > 1 then
return {
message = "X" .. string.format("%.2f", card.ability.extra),
Xmult_mod = card.ability.extra,
colour = G.C.MULT
}
end
if context.individual and context.cardarea == G.play then
local other = context.other_card
local id = other and other:get_id()
if id == 11 or id == 12 or id == 13 then
card.ability.extra = card.ability.extra + 0.15
return {
message = "+X0.15 Mult",
colour = G.C.MULT,
card = card
}
end
end
end
}
SMODS.Joker {
key = "gliched",
loc_txt = {
name = "Gliched",
text = {
"Each card held in hand",
"gives {X:mult,C:white}X3{} Mult",
"{C:inactive}(Currently {X:mult,C:white}X#1#{C:inactive} Mult)"
}
},
loc_vars = function(self, info_queue, center)
local hand_size = #G.hand.cards
local mult_value = 1
for i = 1, hand_size do
mult_value = mult_value * 3
end
return {vars = {mult_value}}
end,
atlas = "GlichedJoker",
pos = {x = 0, y = 0},
unlocked = true,
discovered = true,
rarity = 3,
cost = 8,
blueprint_compat = true,
config = {},
calculate = function(self, card, context)
if context.other_joker then
local hand_size = #G.hand.cards
if hand_size > 0 then
local mult_value = 1
for i = 1, hand_size do
mult_value = mult_value * 3
end
return {
message = "X" .. mult_value,
Xmult_mod = mult_value,
colour = G.C.MULT
}
end
end
end
}
also, which part doesnt work
uhm idk it crashs when i load my thing up idk how to make 2 jokers
so thats what im trying to do
whats the crash log
some very long thing
send it here
crash logs are very useful, because they can tell you what part of your code is wrong
mm i see
you can also send a screenshot btw
to big doesnt all fit
this file doesnt exist
same thing, GlichedJoker.png doesnt exist
argh
please help
what line is that
who u talking to?
idk
and i do this how?
check line 76 in main.lua of your mod
local hand_size = #G.hand.cards
how can i create my own joker cards? (my own mod)
go on youtube
thats what i did
there are times when G.hand.cards might not exist, especially when you are not in a run, you want to do something like:
local hand_size = 1
if G.hand and G.hand.cards then
hand_size = #G.hand.cards
end
...
me no comperhend
where tho
sob
...
instead of local hand_size = #G.hand.cards
replace this line with that
oh ok
can a seal have its own color to LOC_COLOURS created? just like how SMODS.Rarity or ConsumableType add one
worded
prob
where can i find the collection ui table?
can a seal even have a G.C color as it's badge_colour?
create_UIBox_your_collection... in UI definitions
Yes.
?
that's not what i was asking
i was asking where i can find it in the code so i can reference it for my own ui menu
and what did i say wrong
ohhh i misunderstood ur answer mb
so how do i? both of these don't work
Is G.C.pvz_frozencolor defined?
yes, it even works in a joker description
is it in LOC_COLOURS or in G.C tho
hey im brand new to modding balatro, how can i check if all joker slots are full?
I thought they were the same thing?
it works when I do {C:pvz_frozencolor}text{}, but doesn't here
#G.jokers.cards + G.GAME.joker_buffer >= G.jokers.config.card_limit
thanks
they're not
did u set up its hex?
also does anyone know any visual studio code plugins can i install to make writing lua easier
yes, its a gradient with 'frozencolor' as its key
yeah search lua and install the one by sumneko
alright thanks
also add smods to your workspace
And the lovely dump.
this is how i do mine very effiecent way to set up colors this way
ceate a table for all ur colors
use G.ARGS.LOC_COLOURS.prefix_key
I wanted mine to be a gradient changing between colors, or is a seal not able to have it's badge a gradient
yeah theres some annoying errors now how do i do that
file > add to workspace > open the smods folder and the lovely folder in your mods
you might need to enable indexing i think it doesn't work first time for some people
thaks
oh yeah forgot they're not defined first
SMODS.Gradients.prefix_key?
instead of the whole G.ARGS.LOC_COLOURS or after that?
instead
how do i enable indexing?
still doesn't work
does it crash?
havent messed with gradients sorry
uhh no idea
wait it does now
good question cuz i added the lovely dump and smods-main to my workspace like a few days ago and it's yet to do anything at all
oh that helped thank you
oh my god everything is so clear now there's no yellow lines everywhere and it auto completes everything I feel like I've met god himself
same
lmao
are there any docs for steammodded?
tysm
just curious if possible if I wanna suit imma make to count for any hearts trigger is there a way to do that?
hook card:is_suit
ok like build an if then for if is_suit('new_suit') then is_suit('Hearts')?
not the full logic hopefully u get what i mean
how can you get the overall run seed mid game?
It's either G.SEED or G.GAME.pseudorandom.seed.
G.GAME.pseudorandom.seed?
why aren't the 2 black box thingies being listed horizontally despite me using G.UIT.R?
yeah, what smtcom
change both of them to C nodes
ty
that might cause the stuff inside to be vertical
but you need to alternate between C and R
ah ok
How can I get a list of what consumables I have?
what size is a seal in vanilla?
Trying to set up some sprite manipulation. I assume I've forgotten to properly set a value somewhere, but I'm not sure yet why setColor would throw a fit
71 by 95?
they're sprites of the same size as cards/jokers
G.consumeables.cards?
Thank you!! ^^
Second screenshot is setting the sprites as a shared sheet in the G object. First screenshot is the drawstep to pick the right ones to draw
is there a list of all of the style tags i can do to text anywhere?
how do i give myself a specific consumable
thoughts on the design ? :3 still trying to figure out what it should do
SMODS.add_card({key = "c_modprefix_key"})?
I had had the idea of creating Temporary copies of cards, and as a sub-idea, creating Temporary Glass copies of cards
actually i have an idea
something to do with broken glass cards
who wants to be crossmodded by Boring vanilla+ mod
how would i unflip-over cards
or selling
guys
if i wanted to give myself the aura spectral card what would the key be
how do i check for cards held in hand?
ah damn, might be the first person reporting this crash. I guess I'll have to mess around with how I've set up sprites a bit more and see what I can figure out
G.hand.cards
c_aura?
thanks
ah tysm
hey, how do I add animations to a joker? I tried looking at the Jimball code but couldn't find anything and the mod for the Aura mod but don't understand what it's doing
animations as in changing it's sprite?
Yeah
idk
Ah
I think Jimball does it by changing the atlas coordinates every few frames
i know but I couldn't find the code that does that
i tried searching through a bunch of the files but found nothing that looked like it would do anything with visuals. Maybe i just missed it
jimball... my nemesis in Computationally Annoying
how do i check if a glass card breaks?
i wanna make a joker that does something when a glass card breaks
take ownership
I don't know if Jimball's a great example to look at. The visuals are basically all located in Cryptid's Game:update hook
there's no central place where all the jimball related code happens
and a lot of it is hard coded in
ah, okay
I think currently, with DrawStep, there's a lot easier ways to set it up, but I'm not sure how I'd personally set it up, as I haven't tried to animate any sprites yet
what context does Blackboard score in?
im making another type of joker that scales depending on the cards in your hand
I'd check VanillaRemade's blackboard and see what context it uses
i should link that to #1349064230825103441, actually
r there any people that helped with vanilla remade? (asides from N' themselves ofc)
Yes.
how do i make one specific word in the description of a joker a different colour?
i think it makes sense to credit everyone
I'm dumb, ugh. I'll post fixed code for the setColor issue I had in a sec, just so that if someone in the future goes through chat, they can check how I solved it, haha
how does drawstep work? The smods wiki documentation is a bit lacking in how it works/what it does
hopefully this is all
what? every single other sound works and they are in the same folder
can you show me the sounds folder
PvZJokers/assets/sounds
?
what did i do 😭
^
yeah so uh {C:attention}word{} something
ty
{C:attention}word{} for orange
https://github.com/Steamodded/smods/wiki/Text-Styling#loc_colours-table this has all the colors you can use
thanks
are those supposed to be the people who worked on vanillaremade because those are the wrong people
@sturdy compass @marble flint
wha
(sorry for ping)
figured it out, it needed a prefx but now the sound doesn't play when giving the seal, but after the entire hand
LMAOOOOOOO
I don't understand it well enough to properly explain it, but basically, it's a way for sprites and objects to be drawn without having to patch or hook into an update function. All card objects get checked for every SMODS.DrawStep available, and run the code in each based on their order, to draw the elements of the sprites that are needed
IM TERRIBLY SORRY
shouldn't set_seal also use the sound of the seal at the same time?
😭
then why doesn't it play for every card, but instead plays e.g. 4 at once after the hand plays
do scaling jokers scale before or after they score?
Before.
alr
Just a guess, but it sounds like probably set_seal uses an event, so you're queueing an event in an event
(didn't reply for some reason)
but actually setting the seals work, they get the seal texture and everything correctly
it's the little sparkling sound, it plays after the hand
That's because that is in a event.
yeah but without the event it sets all the seals at once before even counting the hand
And it would call the event when the events are queued so it would go at the very end, after the hand has finished scoring.
what do if i scale and score using joker_main?
would i make two ( if context.joker_main's ) or two calculate functions?
can't you just scale before you score?
if the message is part of returning, wouldnt i need two functions to output two messages?
you cannot have two of the same context
the calculate function is ran every single time, from top to bottom. If you have the same context multiple times, whichever is higheri n the code will run first, and if there's a return, the other one will not ever be reached
I mean I could play the sound manually but then if I do an another joker that also makes cards into frozen seals I would need to also have the sound there
Can you check if the sound plays correctly for other seals?
so if i wanted to scale, output a scaling message, then score, and output a scoring message, do i need two calculate functions?
It would be the same for all seals if there is an event in a event.
then how do I fix that, set_seal has to be inside that event otherwise it doesn't work properly
I don't particularly care if you credit me there (I'm in the git history anyways, and besides, I didn't do all that much). If you want to, though, I'm not going to stop you
do seals not always get set in an event? I do think Cryptid might run an event before the set_seal event that plays a sound, but I assumed that sound was for whatever card is used
screw it then i'll just delete the default seal sound and manually play it inside that event
i already credited u in #1349064230825103441, since i believe all contributions matter :p
though if you dont want to, then i can definitely remove it whenever you want
how would i make it so that it gives me the spectral card after the glass card breaks?
Put it in an event?
what is that click sound before i draw new cards?
It's the sound of the seal being placed.
damn so that's also because of me putting it in an event
just to be sure, this makes it so a dummy calculate for m_stone will be added if no mods take ownership of that, right?
Couldn't you just do G.P_CENTERS.m_stone.calculate = G.P_CENTERS.m_stone.calculate or function() end?
like this,?
Yes, but that would also include modded enhancements that shatter.
does anyone know what modded joker adds seals to played cards?
.shattered can be used by more than just glass cards
some mods may use it for their modded enhancements
if another person's mod adds a card that can shatter it will work on it
hmm smods already takes ownership of glass, so it could add a card.glass_trigger like with lucky
ive seen this question about glass breaking multiple times this month
I couldn't find that in the entire lovely dump so I assume not.
Yes, that was in my lovely dump.
I'm trying to make it so when a specific joker expires, it adds the Tarot Merchant voucher to the run. I have the joker expiring correctly, but I'm not sure how to do the voucher part.
Does anyone know how I can achieve that? I tried looking up how decks do it, but it wasn't clear to me
You would create the card then apply it to run then remove the card?
they could add it here i mean
https://github.com/Steamodded/smods/blob/64ebb1780c917bb0ff4689420d357049ce9f8d57/src/game_object.lua#L3038
did you have the same problem as me? because in vanilla spectral cards give seals to only one card, and i want to give to multiple, how do i solve it then
Do vouchers also use create_card?
okay i give up, can someone give me an example on making something similar to baron?
i cant get it to work
vanillaremade probably has the answer to where my dad is
Yes, it has to exist to redeem it.
it seems the problem was that i didnt type x_mult correctly
how do i get the suit of a card
card.base.suit
That worked, but I also managed to apply it directly with: G.GAME.used_vouchers[self.config.extra.voucher] = true
So it doesn't need to show up and manually be redeemed
Thanks for the help!
No? Because then observatory wouldn't work?
What do you mean?
Because it doesn't exist in G.vouchers so it wouldn't calculate.
Hold on, let me try it with a different voucher so I can see if it's not just visual
Yeah, you're right. The voucher shows up on the "Vouchers redeemed this run" screen, but it doesn't really have any effect
Sorry about that
how to make +mult color for descriptions?
{C:mult}
Is the image in the correct spot?
i didnt touch the hollow knight one
but i made one by myself
ig it's wrongly
this is my mod's assets
how big did it had to be?
Is this in the 1x and 2x folders?
What does your atlas look like?
funny joker
No, your atlas not your assets.
SMODS.Atlas?
if i have an enhancement wooden and my mod prefix is gb what would that enhancement's key be
ok imma try now
m_gb_wooden
m_gb_wooden?
thats rude :(
ehh
i will get you next time somethingcom
malverk pack wont work please help
how do i unlock a locked card (to test)?
debugplus
got it
You need to put \' instead of '
For Something's
mk
hold tab
nvm
still not working
am i missing something else?
Is it not loading or is it crashing?
not showing up in the malverk menu
how do i change a joker's local variable (like for scaling)
joker.ability.place = value?
erm why wont it show any number
Code?
that throws up an error tho
Code?
Only the bottom one.
the dang card still isnt moving 😭
I wrote this code to try and get it to move up/down one slot
jokerslot being where the card you want to move currently is
loc_vars = function(self,info_queue,card)
return {vars = {card.ability.extra.Xmult}}
end,
calculate = function(self,card,context) -- idk why it indented here (on discord), but i dont feel like fixing it
return {
card = card,
card.ability.extra.Xmult = 0,
Xmult_mod = card.ability.extra.Xmult,
message = "X" .. card.ability.extra.Xmult .. " Mult",
colour = G.C.MULT
}
end
You need to put it outside of the return.
does this look balanced?
checked for everything and i do not know why it isnt loading
not working, can you write me what i have to write exactly? (just the necessary part)
{C:mult}+1{}
nope not working
Code?
i think i'm still doing something wrong but i dont know what im doing wrong
Are you starting a new run?
where are you calling this? is there a joker in the other slot?
also this is the code
how do i get a reference to the player's dollar count
i found somewhere that said one way, then that way crashed
G.GAME.dollars?
Do you have talisman installed?
yes
Are you comparing it?
im calling this from the joker thats moving, and yes.
The normal jimbo is supposed to move towards the golden joker to be right next to it
yes
to_big(G.GAME.dollars)
hmm ive never done it before let me test it myself
and what does to_big do
You should also to_big() the number you are comparing it with.
how would i go about getting the amount of digits in a talisman number
IT WORKS NOW!! (yay)
are you supposed to put all of your jokers into one png or can you use seperate ones?
Yes, you can do both.
what is the difference between misc.labels. rarity and misc.dictionary rarity? when is one used and when the second?
how would i make a deck that turns all cards in deck into steel cards?
just do some weird ass math with the pos value?
guys new card!!
No?
G.E_MANAGER:add_event(Event({
func = function()
if not G.playing_cards then return false end
for k, v in pairs(G.playing_cards) do
v:set_ability(G.P_CENTERS["m_steel"])
end
return true
end
}))
```?
Im trying to have the table in first pic see if jokers highlighted have strings in sweet. I still am unable to use it meaning its not reading the strings correctly anyone know?
this works for me
how can i make it so it checks if there are any face cards played?
how do i set a joker's rarity a modded one i added? because prefix_key doesn't work
rarity = "modprefix_key"
G.play.cards is the table to check
theres prob something called :isFace() too
just loop thru that and check
okk
you don't need to repeat it after 4 minutes
you can loop through context.scoring_card/full_hand and check playing_card:is_face()
2 new decks :3
huh strange. It's nice to know that it does work and that im not on a wild goose chase 😭
i am incredibly confused
malverk just WONT SHOW my pack 😭
that happened to me too lol
so i just installed premade packs and added em like normal mods
use other_card instead of playing
- context.full_hand is an attribute in specific contexts, but you want a general context check beforehand like context.joker_main, check the docs
- full_hand is a list of cards played, full_hand.playing_card doesn't mean anything
what i want is that if there is no face cards it gives mult
for that you would do a for loop until you encounter a face card and then set a flag to true, if the flag is true then you don't give mult
I don't know how to explain it better without coding it myself
mhm imma try
if context.individual and context.cardarea == G.play and context.other_card:is_face() then
that won't work unless you do something convoluted because they want to check the entire hand once not each individual card at a time
what do i add after context.scoring_hand?
context.scoring_hand is the hand so you need to iterate over it.
ok so then
with localization files: how do i set the text at the bottom of a booster pack? (above "Choose 1")
if context.joker_main then
local faced = false
for _, c in ipairs(context.scoring_hand) do
if c:is_face() then
faced = true
break
end
end
if not faced then
return { mult = 1 }
end
end
thanks
You do groupkey = "Whatyouwantittosay" in misc > dictionary I think.
ah my bad ur right sorry that is indivual card check
no prefix?
No prefix, I think.
Maybe it works with and without?
You guys are awesome
anyone know of a simpler way i can isolate the parts (3oak, pair) of a full house?
Probably not.
how are you doing it right now exactly?
i have a sticker that gives +1 joker slot, but i can't obtain a joker with said sticker if my joker slots are full. how do i fix this?
im not sure why but this isnt working were only when certain jokers in sweet u can use anyone know?
relevant code:
Card.remove_from_deck = function(self, card, from_debuff)
if self.ability.para_negativesticker and (not self.area or not G.pack_cards or (self.area ~= G.pack_cards)) and G.jokers ~= nil then
G.jokers.config.card_limit = G.jokers.config.card_limit - 1
end
return para_card_removal_old(self, card, from_debuff)
end
Card.add_to_deck = function(self, card, from_debuff)
if self.ability.para_negativesticker then
G.jokers.config.card_limit = G.jokers.config.card_limit + 1
end
return para_card_addition_old(self, card, from_debuff)
end
Check how negative does it?
SMODS.Sticker{
key = 'negativesticker',
sets = {Joker = true},
rate = 0,
atlas = 'Stickers',
pos = { x = 0, y = 0 },
should_apply = false,
badge_colour = G.C.DARK_EDITION,
}
I’m just brainstorming right now i donr have anything actually down lmao
im thinking while i mow the lawn
go through the cards you want to check and find which has 2 and which has 3 of the instance
where do you need it
lets say you have a table {5, 5, 5, 4, 4}
go and get the first value
then loop thru for the first that isnt that value
negative is just config = { card_limit = 1 }, which doesn't apply to stickers
(for vanillaremade at least)
then one of the table library's functions will tell you how many of that value are in said table
yeah editions are hardcoded to check
Yes, I meant check how you're allowed to buy negative will full slots.
quickly add a card that gives a few extra slots then instantly remove it afterwards
the game already does this, you don't need to do it yourself btw
could you do ```lua
card.edition.card_limit = 1
?
where card is the card the seal is attached to?
its a sticker though
oop sticker, huh?
not an edition
uhhh
vanillaremade has nothing and i can't find where that happens in base balatro
If it was a seal that still wouldn't work.
G.FUNCS.check_for_buy_space
how can i make multiple jokers? making another SMODS.Joker{}?
I think the card_limit variable might still be able to be set within the sticker code as long as you can get access to the card the sticker is on, unless you want to just apply negative to the card itself?
which file is that in
okk
please can someone help with a malverk texture pack im making im going insane
it just wont load
button callbacks
also you can ctrl+shift+f to search all in vscode if it helps
what's the color name for chances? (the green)
{C:green} and G.C.GREEN?
believe it or not a decent amount of the balatro colors are just called colors
why doesn't this hook work?
local para_buyspace_check_old = G.FUNCS.check_for_buy_space
G.FUNCS.check_for_buy_space = function(card)
return card.ability.para_negativesticker or para_buyspace_check_old(card)
end
(i would assume this is also called for booster packs?)
hi, sorry why the label of my consumible mark as error?
can we see the code?
or ig the localization file if you have one
yep, in my main i call the consumable
how can i use different atlas for 2 different jokers?
i think for that it's G.FUNCS.can_select_card
another SMODS.Atlas with a new key and new file
you really shouldn't be using an atlas for one joker only though
you should probably send your code too
true hold on
How does one skip the animation and sound when creating a card?
skip_materialize = true
No?
well this crashes when i try to select a card in a booster pack
local para_cardselect_check_old = G.FUNCS.can_select_card
G.FUNCS.can_select_card = function(e)
return card.ability.para_negativesticker or para_cardselect_check_old(card)
end
it doesn't return a boolean, it changes the button
hold on i just realized i only changed e in one spot
im having a problem where im trying to score a card that has my modded seal on it but it crashes if the seal isnt on the gold seal effect which is weird (my modded seal is basically copies other seal effects and randomizes every round) , the gold seal itself works but if the seal effect is anything other than the gold effect and i try to score that card it crashes and shows this error message
What if you return 0
joker
the error goes to this function that basically Gives money when a card with this seal is played and im not sure waht casues the problem
how do i change a card's rarity?
imagine it doesnt crash
in calculate?
where
yeah
context.poker_hands contains a list of all the poker hands contained in a hand
and every list contains all the cards that form the hands
😭 progress?
how do i change a card's rarity??
An already existing joker or mid-game?
a new joker i created
Maybe try just returning {dollars = 3} in calculate?
rarity = number or string
sth like this?
yeah i dont think thats a good idea
why does this fire twice when the card is bought?
i just want to get the money once the card is scored
but the get_p_dollars function doesnt like the way im doing it
if i remove the if statement it worksish
if context.individual and context.cardarea == G.play and context.other_card == card aswell I think.
i see i see
add context.individual and context.cardarea == G.play and context.other_card == card
this also crashes
G.FUNCS.can_select_card = function(e)
if e.ability.para_negativesticker then
e.config.colour = G.C.GREEN
e.config.button = 'use_card'
else
para_cardselect_check_old(e)
end
end
local card = e.config.ref_table
FINALLY. TYSM N'
not sure if that works, but what defo works is using numbers
like
rarity = 1 would be common for example, 2 is uncommmon, etc
it worked but thanks cuz numbers way is easier
tried changing c1 to self, still doesnt work
how can i check my jokers? (with script obv)
is there a hidden context.buying_self and the docs are just trolling
c1 doesn't mean anything
local para_cardselect_check_old = G.FUNCS.can_select_card
G.FUNCS.can_select_card = function(e)
local card = e.config.ref_table
if e.ability.para_negativesticker then -- Crashes on this line when I try to select a card in a pack
e.config.colour = G.C.GREEN
e.config.button = 'use_card'
else
para_cardselect_check_old(e)
end
end
?
that means that context.card == card
the docs are made from the vanilla code point of view which is somewhat confusing
oh. oops
well i told you that so that then you use card instead of e lol
wdym check?
that makes sense in hindsight
look for negative jokers
doesnt work at all lol
could you explain a bit more
like do you want to check the jokers the player currently has?
ill show you the card
(the card is joker btw)
got a crash and trying to just chatGPT a fix lmao, and it seems to deduce that the issue is a bug in "card.lua" which if i'm looking at right is vannila code?
chatgpt is unreliable
show us the crash
im looking in the localization of the vanilla remade, where is the "tarot_cards" called in the code?
joker not card
not about the code but you would almost never buy this
negatives arent common enough
(unless ur playing cryptid)
the issue is that a lot of runs you get 0 negatives
maybe give something like "negatives are x3 more likely to spawn" as well
not bad idea
yeah this is beyond me
does handpreview add anything or is it qol?
if its the latter just remove it
it's just QOL
and it's littearlly the only mod i want atm lmao
i'm trying to play vannila basically atm
you can get all jokers with G.jokers.cards i believe
and you can check the edition of each joker in that list
well i tried modded but i've only been able to get a single run where i won, i've faced game ending crashes where i can't progress otherwise
are steamodded and lovely fully updated?
what mods were you using? cryptid has a habit of doing that
cryptid, kino, HP, etropy, cardsauce, card sleeve
i mean yea i had that
GOT IT TO WORK LIKE THIS
When I use if context.after then ... end my Joker just doesn't ever trigger, does anyone know why
not sure
try adding and context.cardarea == G.play
misclick?
i guess i'm just gonna play full vannila if even a gods damn QOL mod is gonna crash me
Code?
man i'm used to playing minecraft mod packs with hundreds of mods that don't crash this easy
also how can i add smth to check if my card gets triggered as a blueprint effect? do i have to hook SMODS.blueprint_effect or is there an easier way
if context.after and context.cardarea == G.play then
print("\n Joker was triggered \n")
if #G.jokers.cards == 1 and G.jokers.cards[1].config.center.key == card.config.center.key then
return {}
end
-- if SMODS.seeing_double_check(context.scoring_hand, 'Hearts') and SMODS.seeing_double_check(context.scoring_hand, 'Diamonds') and SMODS.seeing_double_check(context.scoring_hand, 'Clubs') then
local jokers = {}
for i=1, #G.jokers.cards do
if G.jokers.cards[i] ~= card then
jokers[#jokers + 1] = G.jokers.cards[i]
end
end
if #jokers > 0 then
local chosen = pseudorandom_element(jokers, pseudoseed('seed'))
local copied = copy_card(chosen, nil, nil, nil, nil)
copied:set_edition('e_negative', true)
copied:add_to_deck()
G.jokers:emplace(copied)
return { message = localize('k_duplicated_ex') }
end
--- end
end
(I added the print for debugging, ignore it)
Remove and context.cardarea == G.play
There are no cards in G.play in context.after
So context.cardarea would never be G.play
Oh
The effect seems to be triggering before any playing cards are scored?
context.after isnt supposed to do that, right?
how do i define a category of cards only if i don't have another mod installed?
i want to imitate the cryptid food jokers
You need to put it into an event.
Alright
All calculations are done before animation starts
Is someone able to help me fix my code from forever ago?
I haven't done any modding for months and I've forgotten practically everything
I have a card set up to be a "1 in 5 chance to create a negative copy of random owned joker when any joker is triggered"
I'm trying to change that to take out the 1 in 5 chance, and instead be when shop is ended
So basically just Perkeo for Jokers
send us the code
you want file hold on
I just put it in a lua file instead
I already changed the description to say what it should do now
It's the code itself that needs changed
get rid of the pseudorandom bit
if pseudorandom("goldengod") < G.GAME.probabilities.normal / card.ability.extra.odds then```
do I leave the local eligible jokers part?
yeah
and then replace ```lua
if context.retrigger_joker_check and not context.retrigger_joker and context.other_card ~= self then
with ```lua
if context.ending_shop then
so the joker triggers at the right time
That's the only part I had figured out tbh lmao
Oh I need to take the odds out of the config
Speculo, you say
i dont see anything stopping it from doing so?
maybe im missing something though
if you want to show us where the line that stops it is instead of just question mark reacting thatd be lovely
?
hi, i made it, but i want to learn how the key of the consumable "connect" with this values in the localize file?
ty
c_[mod prefix]_[card key] for the entry itself
i got a question , how can i make a tip next to the seal description telling the seal effect description like blue seals description showing next to Jonkle seal description
info_queue?
ty
are there any examples of jokers that do this?
this
what i want to do is if the played hand is a full house, convert the rank of the pair into the rank of the 3oak
Yes, I know what info_queue is, I was just telling them about it.
jokers that like separate the parts of the played hand
sorry i mistake the reply
how do i define a category of jokers only if another mod isn't installed?
i want to imitate cryptid's food joker category
but still work with cryptid if its there
if not next(SMODS.find_mod("Cryptid"))
yeah but how do i use it?
like make it show next to the my modded seal desc
okay but how do i define a category of jokers
SMODS.ObjectType?
you put in the localvars like this
Yes, but it would be G.P_SEALS instead.
yep
gives me an error
G.P_SEALS[self.config.extra.SealType]
is there a malverk wiki?
that works thank you
Malverk is a texture pack manager developed by Eremel_. It was first released on October 29, 2024.
Malverk adds a new UI in the menu that allows seamless management of installed Malverk-compatible texture packs. It also provides an API to add Malverk compatibility for custom textures.
See Category:Malverk-Compatible Texture Packs for supported t...
i mean dev-wise coz the readme for it has this
how would i give a card back the negative shader?
question
is there a way to instantly trigger a run loss?
Yes.
how would i do that?
Try looking at DebugPlus.
context.remove_playing_cards?
Is there a way I can have a separate font for some text?
No, but there is a pull request for it on smods I think.
Yes, but not easily.
looked at vanillaremade at editions and the shader parameter doesn't exist in SMODS.Back
Yes, try looking at cryptid.
i would. rather not have to look at cryptid code
let me check how shaders apply to consumables
That's different.
It's the only way.
thank you! ^^
which cryptid decks use shaders on the back of cards?
Edition decks.
i cannot read any of this code wtf
is there a way I can refer to the joker say the message, currently because of context.indivudal it's activated playing cards that's showing the message ```lua
if context.cardarea == G.play and context.individual and context.other_card:get_id() == 7 then
G.hand:change_size(card.ability.extra.hand_size_mod)
card.ability.extra.hand_size_gained = card.ability.extra.hand_size_gained + card.ability.extra.hand_size_mod
return {
card = card,
message = "+#1# Hand Size"
}
end
not that i can think of, but you can try printing the tables to see what they have
Maybe it's better if I ask in this channel instead. Is there a map for Trance's Color variables? I'm trying to modify the CODE palette to have dark hover tooltips, but there's a few bits that I can't find.
why does this code that i took from cardsauce crash when it's in my mod
local function inject(self)
for k, v in pairs(G.foodjokers) do
if G.P_CENTERS[k] or SMODS.Centers[k] then
local center = G.P_CENTERS[k] or SMODS.Centers[k]
if not table.contains(self, center) then -- crash on this line
self:inject_card(center)
end
end
end
end
table.contains doesn't work by default.
what do i need to do to make it work?
Put this somewhere: ```lua
function table.contains(table, element)
if table and type(table) == "table" then
for _, value in pairs(table) do
if value == element then
return true
end
end
return false
end
end
hello I was redirected here, does anyone have a mod that increases performance?
edit: i have since been re redirected away from here
So like, yeah, in Trance's palette, BACKGROUND_DARK and TEXT_DARK are the main hover tooltip bg/text. But an't find the card header or the sidebar stuff for edition/eternal/perishable status.
does anybody know how debugplus makes you lose? im trying to make a joker that does the same thing
Try looking in core.lua
any way of getting a spectral pack faster or easier cause im trying to test my spectral card
message_card = card
install debugplus
what does it want from me
thank you, I forgot about message_card
there is no [
i got it
card = doesn't do anything in almost every situation
How do I change the color of the text under a Joker's rarity that says like the mod name
this, again, because i can't read cryptid's code at ALL
?
badge_colour and badge_text_colour
What file is this
your mod .json
Oh
i require assistance
this game confuses me
I didnt realize that was a thing
why are you coding in notepad
because i hate myself
also indent text to the same level as name
You don't need an IDE, code with a pen and paper
real programmers scratch their code into the side of a mountain
i draw my code in the ocean
"i draw with white pencil"
im a bit confused on why this error appears
You have an entire mountain? Wow, modern programmers and their tools, I have to etch my into my own arm
damn, you have an arm?
i had to build that mountain from scratch with nothing but my teeth
hi
Where did you get teeth?
Is card.ability.extra the seal key?
sold my soul to the devil
Fair enough
yeah
ok but seriously is this correct
because THE GAME WANTS ME TO CLOSE A SQUARE BRACKET THAT WAS STARTED HERE
im a bit confused, if anyone could help
so i have to add galdur as a dependency for this to work?
no
galdur is just there to specifically apply the shader to the galdur preview
and it only applies if galdur is present
oh okay
what does this even mean
How do I add an icon to my mod in the mods tab, because right now its the default icon (the uncommon tag)
how do i check if it's negative joker?
i got a semi problem with my seal , if i got 2 cards with the jonkle seal , they both reroll to the same seal effect but i want each have a different effect n stuff, this is how im doing the randomizing rn
if card.edition and card.edition.negative
ty
Replace self.config with card.ability.seal
how do i do so the xmult works?
make an atlas called modicon
Use context.other_joker
Thanks
i did and now it doesnt even reroll anymore
oh so the other things were ok...
No.
if context.other_joker and context.other_joker.edition and context.other_joker.edition.negative then
return {x_mult = 4}
end
anyone know how to fix this?
k ty now it works
does anyone know how debugplus makes you lose a run? can't seem to find it in the files
how would i go about making a joker that has xmult that increases depending on how many of that same joker you have?
please tell me its possible to change the order of things in the collection
i think it just depends on the order you load the cards in, though those are vanilla cards so idk if you can change the order of those
cause order of the planets irl
balatro fans dont know irl
how can i make a joker that doubles negative cards chances to spawn?
oh yeah im an idiot
how would i make a joker that makes you lose at the end of a round?
who would buy him 😭
nobody
then
i would direct you to this wiki post, so that you can understand the weight system. I know that it's possible, i just don't know how to feasibly do it right now
just imply it
this is the part where he kills you
bait people saying x100 mult
(he being a piece of pineapple btw)
ok
nah its x3 mult (but it does actually give it)
maybe someone can use that well
one way is to make it so that before the end of the round it just makes the score requirement ludicrously high
simple, use it and sell
i want you to be able to sell it before you beat the blind and still beat the blind
ok i think im simply gonna change its effect
can regular cards juice_up?
yes
can multiple cards juice up at once?
yes
how to check if a playing card is flipped?
card.facing == "back"
sorry lowercase
is there something stronger than juice up? like it bounces cards or something
Have you tried setting juice_up to high values?
also how can i check my non-played cards, the ones that are on my hand?
is there a way to make it slower? at high values it's really fast
G.hand.cards
Set the second parameter to a low value
I think only the first one needs to be big
isn't the second one for how much it turns
didnt work?
G.STATE = G.STATES.GAME_OVER
G.STATE_COMPLETE = false
if G.STAGE == G.STAGES.RUN then G.STATE = G.STATES.GAME_OVER; G.STATE_COMPLETE = false end
Damnit N
:p
lmao
you need to use c
what's the difference between scoring_hand and joker_main
joker_main is the context where main joker scoring happens
scoring_hand is a property of many contexts that holds the scoring_hand
Does no one know how to fix this?
they should pin those important things tbh
this is all in the docs
still don't understand but thanks ig
i can't really do context.full_hand:juice_up() right, i have to juice up one card at a time
I want to do a joker that does a juice_up for every card on screen basically
yes
I just got an idea but don't think it's possible at all, can I make a joker that detects any cards/jokers that juice up, and gets a buff because of that?
you can hook juice_up
how would i make an achievement that triggers when a specific joker does a specific effect? its my joker if that helps
why is the i not showing up in game
when is check_for_unlock called?
is it saved
in a bunch of places
yes
on run loss?
the single letter i is not showing up
idk look it up
looks like this in game
wait i figured it out
dw
how do i set the odds for my card?
i have a joker that triggers a run loss if you beat a blind with it. how would i create an achievement that you get when this joker makes you lose the run? (shouldn't trigger if you have the joker but lost due to lack of score)
i mean most people set it as a variable in the config like this (ignore the xmult part)
then youd do smth like this for a luck based calculation
time for my problem now
Create a SMODS.Achievement object (read the doc) and then in your code, add a check_for_unlock({type = "achievementkey"})
actually nvm i think ik a solution to my problem
why am i getting this error message
Line?
vars = {G.GAME.probabilities.normal, 5},
G.GAME.probabilities doesn't exist in loc_vars if you check for your joker in your collection while not in a run
Do G.GAME and G.GAME.probabilities.normal...
so like this? vars = {G.GAME, G.GAME.probabilities.normal, 5},
i feel like my brain overclocks when i try to understand hooking, it seems so easy but my brain just doesn't want to get it
No, G.GAME and G.GAME.probabilities...
ohh thanks
if it doesn't work, try adding .. "" after "normal" and before the ","
