#💻・modding-dev
1 messages · Page 418 of 1
context.other_card:is_suit("Hearts")
yeah that
got it so my entire mistake there was not throwing it into the ()
-# I did it similar to ranks
alrigh fuck it
is it possible for a joker to check lovely dumps inside of your Mods folder?
if so, how
you want to read files?
or are you referring to something else
do you want to count the logs like you said before?
how can i make a joker add mult before cards are scored? tried using context.before but then when the cards start scoring the mult resets.
ja ja
what N said
#NFS.getDirectoryItems(SMODS.MODS_DIR .. "/lovely/log")
I knew you were a femboy
you'll probably have to make a new context that happens after the before one, I'm looking at it and I don't see an existing one
not here
hold on
where do i out this
that gives you the number of logs
Fym not here ðŸ˜
you put it where you need the number
THIS IS DEV CHANNEL
I think you'll have to add your own context as a hook in SMODS.calculate_main_scoring
oh wait that reminds me
I made a context for that months ago
the pattern needs to be changed tho cus that's old
after before seems to be a pretty common request
if you add it please think of a better name lol
Can't wait for context.after_the_before_of_after_before_of_after_but_before
how about modify_hand_score or smt like that
I think context.initial_scoring_step would work
too similar to modify_hand imo
context.the_day_after_tomorrow
is that a context?
context.when_days_break
I've been trying to find the code for the custom editions added in cryptid but I can't find them anywhere...
ohhh
trying to find stuff in cryptids codebase is a nightmare because of their custom loading
I guess you're referring to the blind function
yes it's also a context now
i see i see
omg being able to add stuff here is neat
N, any reason you added round_eval before the deck trigger, or am I free to move it around slightly?
i think i copied final_scoring_step, feel free to move it
oh my god my fuse blew a few hours ago and my code didnt save
I LOST EVERYTHING FOR MY ENHANCEMENT
F
How do i change the Main menu (Balatro picture, Ace card, Background colors)
whats the enhancement intended effect
x1.5 mult
but it kept giving me error messages for idk what and put it aside for a while
gimme a minute
So polychrome but an enhancement?
hello gang I have a Joker i'm tryna make and all its supposed to do is activate the effects of three random jokers, but i cannot get it to work whatsoever. The game doesn't crash, Chatgpt won't help, and IM GETTING VERY ANNOYED someone please help
le code:
chatgpt 💔
they need to be in different files, the top part in a .json and the rest in .lua
oh
anything else special about it? (overriding base card's chip value, all suits, no suit, no rank, etc)
no not really its just base X1.5 mult after scoring
SMODS.Enhancement
key = 'key',
atlas = 'atlaskey',
pos = { x = x, y = y },
config = {
x_mult = 1.5
},
loc_vars = function(self, info_queue, card)
return { vars = { card.ability.x_mult } }
end
}```
thanks
np
What's the best way to go about balancing Jokers
I've opened up my mod for playtesting but I'm not sure if there are other ways to go about it
I've done more than a few runs myself but a lot of the Jokers in my mod I'm worried about being unbalanced are incredibly hard to get so it's hard to test legitimately
I broke tmj again btw
have you had a run where you open up the game with just your mod, any dependencies, and debugplus and mess around with that?
I honestly thing playtesting is the best way
You could give yourself a joker at the start of the run to see how powerful it would be across the entire run
Like it could be way too helpful at the start for example
I've done it with debug plus but I feel like if you get almost any rarer joker too early then itll be unbalanced
And its hard to gauge when you'd normally get it by
How would I track jokers that have been edited by another joker? I'd like to keep naturally occurring eternals separate from ones made by the joker.
I guess these other PRs can wait for another day, I am done 🥱
i mean balatro itself has a bunch of jokers that are a bit unbalanced if gained early on
Yea
Thanks for merging mine Eremel. I can now go murder a lovely patch with glee
trying to make an edition that retriggers whatever card it's on. It works fine on cards but doesn't work on jokers.
ig what im trying to say is that you should balance it for when you want players to find it, and if they get it early then it's lucky them
And some awful jokers too
Balancing doesn't have to be perfect
Do you have the retrigger joker feature enabled
loyalty card:
optional_features not optional_featured
Fair
Part of me is worried that I'm too out of touch from playing things like Cryptid and Polterworx to actually make Jokers that don't immediately make the vanilla ones useless or otherwise outranked
And then there's stuff like
I have no idea when you're supposed to get a legendary rarity or above Joker
I've gotten one like four times tops outside of cryptid
Eh ill just wait for the playtesters ig
bump
its an interesting line to balance
ive always thought of it like
i want people to pick up my jokers while also not completely ignoring the vanilla ones
which is why a lot of my jokers have conditions that may synergize with some vanilla jokers and have anti-synergies with others (and even some others from my mod)
💔 how fix
you might be able to patch something in create_card_for_shop but this seems kinda hard to keep track of
I submitted a PR that fixes it but I don't know if it buggers up the search algorithm
ah ill take a look
Yea a lot of my Jokers synergize with vanilla jokers
And each other (some thematically synergizing with each other)
i realize now that some of my jokers actually have thematic anti-synergies lol
so, I'm trying to make a sort of counter to keep track of the number of wild cards vs the total number of cards in the deck, then replace this joker with another joker (Devotion) when 1/4 of the deck is just wild cards, but well, nothing is happening so there's got to be some sort of mistake here
How do i change the Main menu (Balatro picture, Ace card, Background colors)
- scoring_name is the name of the poker hand, never "hand"
- context.other_card doesn't exist in that loop
- to destroy the card use
SMODS.destroy_cards(card)(you might need to update smods) - to add a new joker do
SMODS.add_card{key = "j_modprefix_key"}
i would check how pokermon does the first two
this is how i do the last one
https://github.com/nh6574/JoyousSpring/blob/4513d7a50361889f843ac1dc9796e1b5b8b5883c/src/general_ui.lua#L604
anyone know how to affect the tripple and pair in a full house seperatly?
so uh my game crashes when i go to the enhancments tab in collection
question, in something that uses SMODS.add_card, how would i make it so it creates a joker of two possible rarities? (i have SMODS.add_card({ set = 'Joker', rarity = 'Rare' }) currently
did you actually change the key, atlaskey, x, and y in the code?
oh not the x and y lol
so I'm kinda assuming that for the poker hand, unless I want it to be from a specific poker hand I just remove that, then what would I use instead of context.other_card for trying to count wilds?
i didnt know what your x and y values so i set x = x and y = y (which was probably what caused your crash)
this is the error i got (i changed key, atlas key, and the x and y)
i have no idea what they are supposed to be so
do you have an atlas for the enhancement
oops
you need to add an atlas for it
do you have SMODS.Atlas somewhere for the enhancement
do you have red.png in both 1x and 2x in your assets
hey im new to modding im tying to add a joker to the source code in the 7-zip archive what do i add to the code to add a joker
also your atlas key is red, not RedE
yeah thats the only thing missing now
btw for future enhancements there's a table of what they can do here https://github.com/Steamodded/smods/wiki/SMODS.Enhancement
you can remove it
in that case the card you want to check is c
I've taken two more lovely patches behind the woodshed
I see two more whose days are numbered
I need to stop thinking of overambitious ideas for mods i need to just learn how the engine works first
nice
red card if it was good
I'm sorry but what do you mean by c
you named it c lol
i would name it playing_card
that sounds better
why does it... what am i doing wrong
I feel the sense of getting close to fixed but idk lmao
change context.other_card to playing_card
there's no other_card in joker_main, and you're wanting to tally the playing_card values per the iterator in the for loop
so this should just about be all of it good
-# assuming I didn't f up something somewhere
should be good?
well it didn't work, didn't crash so I just have no clue
I probably messed up the add_card but idrk
is this right?
context: Xmult for each remaining card in deck
wait fuck
hold on
how do you change it to xmult
Probably the best I need is just a nice explanation of how
SMODS.add_card{key = "j_modprefix_key"}
works (more specifically what the j_modprefix_key really means)
return { vars = { card.ability.extra.xmult, card.ability.extra.xmult * ((G.deck and G.deck.cards) and #G.deck.cards or 52) } }
end,
calculate = function(self, card, context)
if context.joker_main then
return {
chips = card.ability.extra.xmult * #G.deck.cards
}
end
end
}```
is this right?
that looks mostly good to me, otherwise maybe try removing the x???????
don't listen to me kekw
aight
what's the text
it needs to be #1# and #2#
each number corresponds to one of the vars
how would the vars looks like
the vars look correct
so X1 Mult for each and currently X2?
no
Can someone help me understand calculate
I have read that and I am still confused
they relate to what you return in loc_vars so #1# would be xmult and #2# would be xmult * deck
cheers
i think the best way to get it is to see examples
these are the vanilla jokers done with smods
https://github.com/nh6574/VanillaRemade/blob/main/src/jokers.lua
I have looked at other jokers from mods but I don't understand it
is there something specific you don't understand?
in the github it's put as steps 2 and 3
something has fucked up terribly
step 2 is telling you that you can do any logic you want in a context. for example when the shop ends you add 1 to a counter
step 3 is saying that there are special tables you can return to do effects like give chips, mult, money, destroy cards, etc.
you didn't change the chips thing
oh what i did
hold on
oh
for fuck sake
really
done
is step 2 required if you don't want anything to increase over time like joker
no, look at the basic joker in the link i sent earlier for example
that only has steps 1 and 3
ok thank you
I was confused because the ways it's written int the github it makes it seam like you need 1-3
Is there a context to watch for money spent? Say you wanted something to trigger on every X dollars spent?
No.
What does Jobama do
retrigger 4th of July twice
Thanks, didnt think so.
I think there’s a way to work around it tho
what am i doing wrong here? cause apparently lucky.trigger is based on false rather than true, but this doesnt work?
You can check money before entering shop and when starting a blind
No, you would just hook ease_dollars
COPE: Retrigger 7 and 4 twice
jofreak: played 6 or 9 has 1 in 2 chance to give X6.9 Mult
FIM: X0.2 Mult for each remaining card in deck
fish: +15 Chips for each scored cards
That’s literally what i meant
(I’m bad at explaining)
rarity wise
This is what I was kinda assuming, but to clarify, when you say hook, hook into it with Lovely or is there another way I'm unaware of?
hooking is a function of the Lua language itself
Oh, thats helpful. thanks. Not well versed in Lua. Just starting down this experiment
essentially, save the old version of a function in a variable, and then redeclare it. You can then call the old function as kind of a form of inheritance
getting this crash and I assume it is because I have the names of the seals wrong here
function ease_dollars(mod, instant)
local ret = ref_ease_dollars(mod, instant)
-- do some code
return ret
end```
Yes, it's just "Red", "Blue", "Gold" and "Purple"
Here's a basic example of hooking ease dollars that does nothing except return the original function's return (which is nil, but it's good practice to explicitly return it anyway)
awesome thanks
does smods supports custom font?
Yes.
how
Ah, so thats what Extra Credit is doing here:
yep. I do this exact thing too
for context, the glass.trigger version functions on true, and this works! so for lucky.trigger i would need to make an opposite version of it right? what am i doing wrong
It's SMODS.Font but it's new so there is no documentation on it.
Thank you for the help! Been writing joker ideas down for awhile. Got the first 3 working. 4th idea wasn't quite as simple.
i use it in my mod
found it
what version is this
0530
yeah but because the latest release has a big bug
so uhhhh, how tf does a custom rarity work?
if I wanted to discard a card in the played hand after all jokers are activated which context would I use?
what exactly do you mean?
like, if I wanted to make a custom joker rarity
yk just, something above legendary
do you want it to show up in the shop or just be summoned by a card
probably context.after
thanks I will try that
bump
rarity = pseudorandom_element({"Rare", "Uncommon"}, pseudoseed("seed"))
if you want to respect weights you need to do your own polling probably
you can link it to pseudorandom_element i'm pretty su--i was THIS close
all else considered, weights are equal so just pseudorandom element here is needed, thanks
what would be the code for discarding a card from the hand after the context inside the result?
i cant wait for the next smods release to never have to write pseudoseed again
whats changing?
REAL
check what the hook does
https://github.com/nh6574/VanillaRemade/blob/d519ea2c28a92ab0abc08a8a83fc7cd8d998d411/src/blinds.lua#L20
71*95 was for one joker right?
i PR'd it so it takes a string directly now
how about 1 joker and 1 soul pos?
in the atlas definition you put 71x95
then the png can be any multiple of that you want
grab a calculator lol
fair
kind of like how pseudorandom all on its own just uses a string? would rewriting it just be pseudorandom_element("string") = whatever?
they mean you will be able to do pseudorandom_element(list, "seed")
oh cool
definitely summoned
read through this and see if it helps, i can further help if you need it https://github.com/Steamodded/smods/wiki/SMODS.Rarity
bumping this and readding pictures
glass.trigger operates on true, lucky.trigger operates on false
however this lucky.trigger code doesn't function properly
how do I give myself my new joker to test if it works?
do you have debugplus
no
what does info_queue use? or what can i use to make a custom info_queue item
help
played with tons of mods
dont know where to report it to
my RAM is not fucked is it
I got this custom joker working, it is functioning as intended, but the display always says that it's at x1 mult, I get that it's because in the config Xmult is equal to 1 but I'm not sure how I can get it to reflect the value accurately as anytime I try to reference the "#G.consumeable.cards" I get errors, any insight would be awesome I'm super new to this lol
in your loc_vars also return the Xmult + the number of consumables
also use x_mult or xmult, not Xmult_mod
(you will have to check whether G.consumeables exists in your loc_vars function)
you can use card.ability.extra.Xmult + (G.consumeables and #G.consumeables.cards or 0)
For my education, why?
Xmult_mod only works if you also pass a message, which is fine if you're using a custom message, but otherwise x_mult and xmult automatically create the message
can anyone explain why my joker isn't doing anything?
Holy sh what I did, that's looks scary
Hi besties
I'm pretty sure that G.play doesn't have any cards in it at context.after
not the worst UI code
then what context should I use also not even the chips or mult is working
i can't see cus the pic is small, but did you accidentally write joker_nain
no it's joker_main
hmm, make sure to start a new run
what funcs are called when the shop is opened or rerolled
Also, you should be using context.destroy_card not context.after and just return {remove = true}
bump
G.FUNCS.toggle_shop and G.FUNCS.reroll_shop I think.
so I started a now run and it works now but the card stays on screen, would tat make it not stay on screen?
The joker or the playing cards?
card
Then yes.
Check Game:update_shop
I updated it and it's doing the exact same thing
Did you save the file
I saved the file, it dissapeard for a second before returning to the same problem
Code?
Remove the loop and the event.
please explain further
if context.destroy_card and context.cardarea == G.play then
return {remove = true}
end
will that delete the cards in the played hand?
Yes.
all of them, unconditionally, you murderer
I use this code and the game does not start.
I search in google and I can't find anything
"src/game_object.lua"]:888: attempt to index local 'center' (a nil value)
You're missing your mod prefix on G.P_CENTERS.j_Dk
oooooh
don't think anyone responded to this at the time, so if anyone can give advice on this that'd be great
it still stays on screen
Code?
how do i have a voucher double the weight of a custom rarity
ok the prefix is NS, so as it would go
G.P_CENTERS.j_Dk_NS?
j_NS_Dk i think
oooh thxxxxx
Did you start a new run?
i really do apologize for asking here so often but does anyone know how to define global value
ive never coded in lua and im still learning
Code?
to be clear it does everything but destroy the cards?
Could it be that the error is here?
SMODS.Joker {
loc_txt = {
name = 'Guess Who',
text = {
"Earn {C:money}$#1#{} if {C:attention}poker hand{}",
"is a {C:attention}#2#{} and contains",
"the {C:attention}#3#{} of thespade,",
--"of {V:1}#4#{},",
"{s:0.8}poker hand and card change",
"{s:0.8}card change every round",
}
},
key = ```
no it "destroys" the cards
give me a second tyhasdts half
can i just send my entire jokers.lua its not all gonna fit
it reduces the max of the deck but the cards still exist in the deck
They shouldn't if you are using context.destroy_card
lemme see if my joker that destroys cards does this currently
just scroll down to guess who
it just gets worse the further you continue
why is there a line gap here anyway
what version of steamodded are you using
idk, it was from when I copied it from this message
wtf
You are defining G.GAME.current_round.vremade_guesswho_card but you are calling G.GAME.current_round.yip_guesswho_card
oh
smods shouldn't be appearing in your mod list
also how are you doing that
black magic
could this be the reason?
doing what
maybe
what does your actual mods folder look like
by define i mean fix this warning
You are defining and calling 2 different variables.
You have 2 SMODS
could that be the root problem?
im trying to call on a unique hand and a unique card
Yes.
Yes, you need to change the variables you are calling and defining to be the same.
so which one should I delete?
Try deleting the Steamodded one.
the problem is still happening
delete smods-main and redownload smods
what's the code
yeah it might be your smods version
bump
-# why is that end there
Wasn't the problem that lucky_trigger is hard coded?
i thought that meant i could check for it still? just with false instead of true?
ohhhhhh
you need to patch where lucky triggers
how can i check for it then?
GAAAAAAAAAAAAAHHHHHH
you can also use a calculate_context hook and do what lucky cat does
oh true...
nope it's still happening
what's the version?
bump
can you send the whole joker code
I just realized somthing that might be it but tell me if you can find any problems in the code
hmmm no i dont see it
you're restarting the run right?
also, my plan was this
X1.5 Mult for each Crash Logs saved in your Desktop
so like
uhh
yes, I saved a copy of the code that made the card look funny then it changed the file I was editing to be that one instead of the main that's actually in the mod folder
So i got a problem. Every time i create a card using my one seal during the pillar, it gets debuffed but triggers the xmult if it's steel. Is there any way for me to not trigger it?
so like i change this to smods mod dir or
how would i write that out? like G.GAME.['key_mod']?
might be related to this
https://github.com/Steamodded/smods/issues/699
I just deleted the pool code and the game started, but it is as if the joker does not exist, it does not appear in the collection.
so if your rarity is ULTRARARE
it would be G.GAME.ultrarare_mod
maybe modprefix_ultrarare_mod i dont remember
oh ok lemme see if that works
yeah
go it
to the code i sent earlier
got
so where do i put it in this then?
SMODS.Seal {
key = "Silver",
atlas = "BCU_centers",
pos = {x = 0, y = 5},
config = {extra = {DupeNum = 1, DupeDenom = 2, DupeAmount = 1}},
discovered = false,
prefix_config = {
key = {mod = false}
},
badge_colour = HEX('B1B1B1'),
shiny = true,
sound = { sound = 'gold_seal', per = 1.2, vol = 0.4 },
loc_vars = function(self, info_queue, card)
return {vars = {self.config.extra.DupeNum, self.config.extra.DupeDenom}}
end,
calculate = function(self, card, context)
if context.cardarea == G.play and context.main_scoring then
for i = 1, self.config.extra.DupeAmount do
local new_card = copy_card(card, nil, nil, G.playing_card)
new_card:set_seal(nil)
new_card:add_to_deck()
G.deck.config.card_limit = G.deck.config.card_limit + 1
table.insert(G.playing_cards, new_card)
playing_card_joker_effects({new_card})
G.hand:emplace(new_card)
new_card.states.visible = nil
G.E_MANAGER:add_event(Event({
func = function()
new_card:start_materialize()
G.GAME.blind:debuff_card(new_card)
G.hand:sort()
return true
end,
}))
end
return {
playing_cards_created = {new_card}
}
end
end,
}```
oh no i mean it might be the same smods bug. idk what the solution is
There's a fix in the comment
Method to fix: smods needs to change it so ability.played_this_ante is set somewhere later, like after G.FUNCS.draw_from_play_to_discard() maybe
that's not for modders that's an idea on how to fix it in smods
am i able to change the edition of a joker card using debug plus?
oh
ctrl + q i believe
it is
thanks
you could just hold tab and look at the info on the side bar
didnt work without prefix, gonna add prefix and test again
trying to make a enhancement that destroy after 5 usages but it seems to crash the game, any help?
key = 'pizza',
atlas = 'Enhancers',
pos = { x = 0, y = 0 },
config = { bonus = 500, uses_left = 5},
replace_base_card = true,
no_rank = true,
no_suit = true,
always_scores = true,
loc_vars = function(self, info_queue, card)
return { vars = { card.ability.extra.uses_left} }
end,
calculate = function(self, card, context)
if context.destroy_card and context.cardarea == G.play and context.destroy_card == card and pseudorandom('pizza') == uses_left then
return { remove = true }
else
card.ability.extra.uses_left = card.ability.extra.hands_left - 1
return {
message = card.ability.extra.uses_left .. '',
colour = G.C.FILTER
}
end
end,
}```
Log?
name = "Pizza Card",
text = {
"{C:chips}+#1#{} Chips",
"no rank or suit",
"Expires after {C:attention}#2#{} Usages",
},
},```
no longer crashes and seems to actually be working
card.ability.extra doesn't exist.
in what context
It's in the card it doesn't exist ever with that enhancement.
so how do I fix it?
You put extra = {} in the config and you put the variables in it.
Glad I already made a system for applying global discounts
assert(SMODS.load_file('PixelOperator-Bold.ttf'))() ? @red flower
no
I tried to lengthen the code a little bit but it still gives the same error.
you need to load the file that has the SMODS.Font code
what's the error
"src/game_object.lua"]:888: attempt to index local 'center' (a nil value)
i would appreciate the full crash log
im going to fucking tweak
ok wait me a second
is the assert still there
then it didn't load
how
what's your main file
you can ctrl+c ctrl+v to paste it here as a file btw lol
q jumpscare
Oh
I didn't know that
does this work?
hmm maybe not because individual might not work there
so just take out individual? i just used the remade lucky cat checks
hmm no it's a bit more complicated then i didnt remember what lucky cat did
i would patch where somethingcom said
No, scoring playing cards don't get called in SMODS.calculate_context
ok you dont need the load file thing then, it's weird that it's not crashing
oh ok
it is cursed huh
Also there is already a count for how many times you have used every consumable on the profile.
can i see the json
sure
+64 mult
that wasn't for you sorry im still reading the log
and can i see the loc_txt
it's a custom variable that resets, dw about it it works fine
where are you putting the font then
assets?
i dont mean a loc file i mean the loc_txt in your joker
oh wait
closed or not, same result
hmmm i think it's cursed
if you tried f:5 and it didn't change i dont think it's the font
formatting doesnt work in names iirc
it does
then yeah something's wrong
it's a vanilla feature as well
ok last idea
are you editing the correct file
are you sure you dont have a second copy of your mod
is there a way to have a deck that starts with certain jokers
in the config add jokers = { "key1", "key2" } etc
alr lemme see if that works
youre asserting the loading of the file in the first line of said file
is it looping the loading of itself?
N told me to put the assert
oh yeah you need to delete the load file thing
because you don't have multiple files
both?
I used vanilla remade as a base, and the game works but the joker is not in the collection.
is the mod in the mod list?
is this your main file?
yes
thas a good news, bad news is
fuck i dont know how to configure this font
it seems like it is starting to count every action that I am doing and decrease the a number, not to mention the fact that the description says nil, and for some reason removing chips?
key = 'pizza',
atlas = 'Enhancers',
pos = { x = 0, y = 0 },
config = { bonus = 500, extra = {hands_left = 5}},
replace_base_card = true,
no_rank = true,
no_suit = true,
always_scores = true,
shatters = true,
loc_vars = function(self, info_queue, card)
return { vars = { card.ability.extra.hands_left} }
end,
calculate = function(self, card, context)
if context.destroy_card and context.cardarea == G.play and context.destroy_card == card and pseudorandom('pizza') == hands_left then
return { remove = true }
else
card.ability.extra.hands_left = card.ability.extra.hands_left - 1
return {
message = card.ability.extra.hands_left .. '',
colour = G.C.FILTER
}
end
end,
}```
You are not checking for a context when you're decreasing it.
context.individual only triggers on scoring cards or played?
what does it look like rn
blank
the font config
yep, is activated but at the same time not
It is true from between the first played card scoring and the last card in the discard scoring.
render_scale = 1,
TEXT_HEIGHT_SCALE = 1,
TEXT_OFFSET = {x=0,y=0},
FONTSCALE = 0.11,
squish = 1,
DESCSCALE = 1
is that the full font code
how do I check that?
wait hold on
When do you want it to decrease?
so where are these located so i can patch into them?
card.lua
bet
when the card is used, basically this works similar to glass card, but instead of a random chance, it has limited usages
Do you want it to decrease when it scores?
is there a way to call each individually in loc_vars
self.config.jokers? im not entirely sure how loc_vars works for a deck
elseif context.main_scoring and context.cardarea == G.play then
Instead of just else
actually considering how complicated it would be to call for the key's name id probably just have an easier time writing it out manually in the loc file huh
I just used one of the steammode examples, the game works but the joker still doesn't come out.
i just need help wtih this one thing whihc is that other card is a nil value
Is it because the main.lua has absolutely nothing in it?
yes
ohhhhh
you could do something like assert(SMODS.load_file("src/jokers.lua"))() assert(SMODS.load_file("src/backs.lua"))() assert(SMODS.load_file("src/blinds.lua"))() assert(SMODS.load_file("src/seals.lua"))() assert(SMODS.load_file("src/vouchers.lua"))() assert(SMODS.load_file("src/enhancements.lua"))() assert(SMODS.load_file("src/tarots.lua"))() assert(SMODS.load_file("src/editions.lua"))() assert(SMODS.load_file("src/spectrals.lua"))() assert(SMODS.load_file("src/challenges.lua"))() assert(SMODS.load_file("src/stakes.lua"))() assert(SMODS.load_file("src/rarities.lua"))()
and of course change the directoryu with the one you store your joker files
file*
how do you check if a score catches on fire
i dont know but maybe you could check if score exceeds the boss requirement?
only boss?
lol
if hand_chips * mult >= G.GAME.blind.chips?
thanks
So, what do I do there?
kind of a dumb question but do you have your joker file in a folder called src
Code?
how do i run something when a card is actually destroyed because context.destroy_card is just for marking cards to be destroyed
youre missing the if statement for when to return the mult
scroll down to "--guess who"
its too large to fit inot one message
like this?
no in the calculate function
context.other_card doesn't exist in context.before
this?
if context.joker_main then inside of the calculate function before the return
no, inside as in between the calculate = function(self, card, context) and the return {
no
line between
which ones do then?
whats the goal of the joker
what is this
can you set player's score?
what is calc_dollar_bonus for
gives $25
but
1 in 6 chances to set players score
again, what is this? is it a joker, is it a seal, is it an edition, is it an enhancement?
is it possible
what do i add to "in_pools" when making new suits to make it only appear in onee deck?
i mean i know of jokers that can add score but idk abt set score
Probably score * -∞
come again?
baya
you could just set mult or chips to -math.huge
bro is requiring talisman
does anyone know why this joker is not working\
no
no
no
talisman
what is it trying to do?
wait i dont think you have to add the poker hand and sttuff to extra in config?
i could be wrong tho
why is it G.GAME and not card.ability.extra
yeah that's what i said, odd loll
are you copying idol
im basing it off the vanilla remade idol as well as to do list
yeah
what part?
Why does the image not appear?
idk how are you defining it
do you have an atlas defined
I think so
show code
joker code
not sure how id do the hand reset as well
do you actually have assets called Banana64.png in your assets folder (inside 1x and 2x)
yes
hmm
with their respective dimensions
actually why is the loc_vars returning nil
I have not modified it yet
like says nil but gives the 64 that i wanted
your loc_vars should be giving you the same stuff that your mult is = to
since they're both card.ability.extra.mult
why does this keep creating evil ghost cards
ok
while I configure this, how do I solve the image problem?
why isnt the colour going?
is it possible for a joker to change sprite each hands
do i need to define anything in my SMODS.Backs so that center is not nil?
can i make something like "if something checks for X suit, it will also work with Y suit"?
i might have got it, i forgot that backs require the full government names of items they call for in config
yup that was my issue
Yup, set_sprite_pos()
any of yall got a clue on why this makes the card completely blank when hovered over?
I assume it tries to draw the same card multiple times, though I don't understand the code in question since I'm dumb so can't be sure.
Why I think that's the case is that I had a similar(?) issue but with scored cards. I have a card that plays and scores all spades, but I had to make it deselect spades first because otherwise it could select already selected cards and cause existence of evil ass constantly flipped and ghost cards.
I don't think that will help you anyhow but I didn't see anyone experiencing phantom cards except myself so wanted to drop that
hi, is there a way to make a card multiply chips? I've looked through the steammodded documentation and couldn't find anything
I'm very new to modding so I'm sorry if this is an obvious question lmao
the smods docs arent done
and theyre also evil
so
not really
evil fucked up documentation
sinister & evil
not the documentation tho
ouch, guess I just gotta osmosis the knowledge then lol
this channel exists to ask questions
so youre good anyways
also as i said
smods is evil
and does some of the DUMBEST things
you would never figure out
(you can do Xmult but not Xchips, has to be xchips)
horrific
(mult is mult but chips are hand_chips)
decks are called backs
the list goes on, balatro is evil
this is only a peep of the horror
what am i supposed to put on the source part of SMODS.debuff_card(card, debuff, source), i want it to be from any source ```lua if context.hand_drawn then
for i = 1, #G.hand.cards do
if G.hand.cards[i].edition and G.hand.cards[i].edition.key == "e_negative" then
SMODS.debuff_card(G.hand.cards[i], 'prevent_debuff')
end
end
end
how would i increase the chances of getting soul/black hole in tarot/planet packs?
fun fact, if you hit the plus sign next to your message and Upload your message as a file, you can send your text as a file.
in this specific case, you'd also want to rename the file to have the ending .lua so it's easier to read
what is the relevent card variable for context.selling_card
context.card
cool
(nvm i got it)
what formatting would you guys say is best for xhandlevels
I got this crash when opening the full deck menu . I think its this code causing it since there are debuffed cards in the deck and because its the last thing i addedlua if context.hand_drawn then for i = 1, #G.hand.cards do if G.hand.cards[i].edition and G.hand.cards[i].edition.key == "e_negative" then SMODS.debuff_card(G.hand.cards[i], 'prevent_debuff',"any") end end end
Hi, does anybody know how I can set the deck and stake in code, thanks
You mean force set the deck and stake permanently?
No, just set it once
how do you change font sizes for the descriptions?
{s:number}?
do you put this in the localization?
Yes.
Thanks
anyone know why this straight up doesnt do anything?
it does the level up animation fine, so scoring_name is valid, but it just doesnt gain anything other than hand level
Where’s the code?
heres the full screenshot, calculate function of a joker
And whats intended to happen?
the chips and mult of the hand to go up
before and after, nothing changed except the level
the l_mult and l_chips are going up properly, as shown on planet cards, but its not changing the hand's stats
It’s because you’re doing it mid scoring
when should i do it
It won’t take effect on the current score, but should be upgraded for future
context.before if you want it to count for that hand too
if i use before, will i have to manually make it go through each played card instead of just relying on context.other_card
Yes
Okay so i tried to change my joker code so instead to directly check if it's a shodown boss blind it'll check instead if the Ante is a multiple of 8 or not when entering the boss blind, if yes then the card destroy itself, otherwise x5 mult, but now i have this error that for some reason impact outside of my joker's code
I'm not so sure how or why mult suddently is a nil value now
key = "goldkey",
loc_txt= {
name = 'Gold Key',
text = { "{X:mult,C:white}x5{} when entering a Boss Blind",
"Gets destroyed when entering a Showodwn Boss Blind"
},},
--atlas = 'key',
pos = { x = 0, y = 0 },
rarity = 3,
cost = 7,
pools = {["pseudoregamod"] = true},
unlocked = true,
discovered = false,
blueprint_compat = true,
eternal_compat = true,
perishable_compat = true,
config = { extra = {xmult = 5}},
loc_vars = function(self, info_queue, card)
return { vars = { card.ability.extra.xmult } }
end,
calculate = function(self, card, context)
local ante8 = (G.GAME.round_resets.ante % 8 == 0)
if context.setting_blind and (G.GAME.blind.boss) then
if ante8 then
card:start_dissolve({G.C.RED})
return {
message = "Used !"
}
else
return {
message = "x".. card.ability.extra.xmult,
Xmult_mod = card.ability.extra.xmult
}
end
end
end
}```
yeah so it still doesnt actually do anything to the hand chips & mult lmao
trying to make a joker that retriggers all instances of a different joker, but I think something is wrong with my contexts because nothing prints. I have already set up the optional feature for joker retriggers and have gotten it to work on other things
narrowed down the issue to the "if card.config.center.key == "joker" then" section of the code, because "bb" prints just fine while "aa" doesn't
do you know what I could replace it with so that it would work?
proobabbblyyy context.other_joker
im not actually fully sure but that sounds about right
change card with context.other_card
bepis is probably more right than i am
np :p
how would i add a card back to the hand that was just discarded or is about to be discarded? (either or)
Draw the top of the discard or patch G.FUNCS.discard_cards_from_highlighted I think.
Looking at u rn
oof
I am laying in bed tho
that cant be healthy, i hope u can sleep better soon
-# this is coming from someone who sleeps at 3 am daily btw
I am appreciative
Im sure on Monday things will even out cause I'll have access to melatonin
But I'm in hotel with gf rn without it
So no sleepy time meds
Unfortunately quite literally 0 change
bump
But I am doing my best
oof
change Xmult_mod to xmult, remove message and start a new run
thats good to hear, i really hope everything goes well sob
I hope it do
Tomorrow we will go to a water park i think so things will be off my mind for a bit
oo nice
Unless for some reason mid water park I come here to see you cool people
:3
Still the same error, did a new run and removed the message and changed xmult_mod to xmult but does the same thing when selecting the blind
oh i guess that could explain, though not sure how come mult became a nil value out of sudden
idk the parameters of draw_card...
Should i just then remove the context.setting_blind ?
use context.joker_main and return mult in there
i'll go test it, thanks
It works now thanks !
FYI, checking for a multiple of 8 doesn’t guarantee a showdown boss blind
draw_card(G.discard, G.hand, 90, 'up', nil, discarded_card)?
Ah i see thanks for the info
i'm loosing my mind ive been trying to find out whats wrong for a while
how would yall go about duplicating every joker held?
second image is what a singular joker does
3rd and 4th image are before and after (joker self destructs)
You would use copy_card on every joker.
last thing before checking if this works: is there a way to make it only once per card per blind?
Yes, flag every card that you redraw.
what the hell just
i'll try to fix this
Code?
i think i know what i did
gimme a second i may have removed the emplace by accident
adding emplace makes the same thing as last time
It’s because you’re looping over a table that you keep adding to
that's it
that's got to be it
i could try to make a local table that holds all the data from the start of the blind and get the info from there
like:
if context.discarded then
local redo = false
if discarded_card.ability == G.P_CENTERS.m_fm_overshield and redo = false then
draw_card(G.discard, G.hand, 90, 'up', nil, discarded_card)
redo = true
end
end
?
theres probably a better way to do that than what im thinking but it should work
No, also that statement will always be false.
ill see what i can do!
I meant put a flag on the card like card.ability.flagged = true
im almost 100% missing something here bc i keep thinking of that as similar to my above code despite knowing it isn't.
Would it be just replacing the variable up there with card.ability.flagged?
-# (I doubt it but its my only idea)
No.
discarded_card.ability == G.P_CENTERS.m_fm_overshield will never be true.
Also did you define context.discarded?
Also discarded_card doesn't exist.
Noted, i won't trust VS autocorrect again (it said both of those already existed)
How can i check if a card is flipped down?
in that case we're back here
-# (how would i do either of these?)
if card.facing == 'back'
thanks!
alright something's wrong here
You need to do ```lua
for i=1, #G.jokers.cards do
--- code here
end
how would one check for the score (total chips x mult) scored by the current hand only
hand_chips * mult?
Looking at older messages got me to this
huh
last image avoids the crash but does exactly the same as what happened last time, aka the big wait plus the joker coming back
Why is card.ability.flagged outside the joker?
No, remove tablecopy replace the main loop with that.
morning folks
did that so it wouldnt loop on itself but alright i'll try that
idk, i thought if i flagged it inside the joker it might be set back to false before the end of the blind
it was actually the first thing i tried to do before i went down the madness ive been going down tryna get it to work cuz i thought i did it wrong
but does checking if the scoring hand is nil work for checking if a hand is discarded?
i saw it mentioned awhile back in the channel
Any ability table of a card will never be the same as a center.
G.GAME.LastTriggeredSeal = card.seal```
added this as a global variable to read last triggered seal
but crashes the game
Original center may not have self.config.farts, for example, but a Joker can set card.ability.farts.
im confused on what this is in reference to
ahh, oki
what do i do?
Yes, but also centers have properties that cards don't have.
You are trying to get the seal of a nil value because card doesn't exist.
but shouldnt card exist as a global var in the game files?
or am i understanding it wrong?
whats the context for the current blind requirement
No.
i see
There are many cards, so why would one random card be global?
true
I'm sometimes getting this crash when opening the full deck menu. It doesn't seem to be happening consistently. It only happens when there's a negative card in the deck. I think this is the part of the code that is causing it. lua if context.hand_drawn then for i = 1, #G.hand.cards do if G.hand.cards[i].edition and G.hand.cards[i].edition.key == "e_negative" and G.hand.cards[i].debuff then SMODS.debuff_card(G.hand.cards[i], 'prevent_debuff',"any") G.hand:change_size(1) end if G.hand.cards[i].edition and G.hand.cards[i].edition.key == "e_negative" and card.facing == 'front' then G.hand.cards[i]:flip() end end end
for some reason, i thought 'card' is a global var that stores last triggered card
dont know why thought that
did it, the joker being in the first slot now crashes the game completely again
For getting last triggered seal... perhaps a Card:calculate_seal(context) hook could be of use.
im new, explain more please 🤔
whats hook 
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...
thx
That would work for seals that are not blue or gold or ones that don't return anything.
Some seals don't really have a "function" of their own, instead being the condition for something to happen.
Like such.
It would work for most seals.
Seals that actively do stuff is what you are likely to focus on.
u said it wont work on gold blue or purple
Yes, because Gold and Blue are hard coded.
this
i'll attempt this again tomorrow
i mean, i have an idea that works, but not mod compat
i add a variable that is saved localy inside each seal code
it will save last triggered one
That would require patching.
yep
but works
but im trying to get it be mod compat
thats why im searching for a way to read/save last triggered seal whatever it may be
the only way i could think of that is somehow saving the last hand played and checking trough the seals of each played card and replace the value you're saving your seal in each card except if it has no seal then you could probably do whatever with the last seal played
i mean like
saving the last hand played in a table
and checking what cards were played
then checking trough the seals in those cards
or discard
ah
right
i mean you COULD check absolutely everything but that would be hell to code in
The only way to know a seal has triggered is if it returns something.
even then that'd be no mod compat probably
i just cant think of a good way to get it done tbh since seals are very different one from the other
dont mind my schizo ramblings its 6 am over here and im gonna go to sleep i'll try my thing again tomorrow to see what's wrong with it
cyall
this is supposed to flip negative cards that are face down but its not working, whats wrong?
for i = 1, #G.hand.cards do
if G.hand.cards[i].edition and G.hand.cards[i].edition.key == "e_negative" and card.facing == 'back' then
G.hand.cards[i]:flip()
end
end
what exactly do u mean by return something?
like a value in code?
You know how Jokers can return { chips = 50 } and such?
yep
This is checking that the joker is flipped
Basically that, but with seals.
Yes, but Gold and Blue are hard coded, they require patching.
oh yeah my bad, thanks
i give up on mod compat, just gonna go with the other idea
just making sure, patching: i copy same original code and modify a bit ?
No.
hmm, can u tell me then?
It means using lovely to change some of the games code.
hmm, is it hard?
my seal is not using the correct atlas and im not sure why 😔
Some say it is, I thought it was, but it doesn't seem that hard.
will look it up
Going back to something from yesterday or the day before that i thought was solved: this code keeps saying 'end' expected (to close 'if' on line 2062) near '=', but i have an end on the next line?
-# went to another issue bc if i work too long on a single issue this late then i burn out
elseif has no space
Classic
long sigh at my blindness ty
help me, I want to replace a Perkeo code, instead of copy 1 negative consumable card to a joker one
wait, thats the wrong issue, line 2062-2064 are for some reason
does anyone know why
SMODS.Atlas {
key = "Enhancers",
path = "Enhancers.png",
px = 71,
py = 95
}
this is using the vanilla enhancers atlas
when there is an Enhancers.png in my assets folder
Your return should also be in a table
Hi, asked before but no answer, how can I set the deck type and stake on this menu in code? Thanks!
if it's isnt one thing it's another apparently, this is the crash now but all i have after line 2067 (the bracket at the end) are lines that i KNOW i commented out
blank crashes when i try to trigger it
Try changing it to G.P_SEALS instead of SMODS.Seals
Log?
Line?
No, when you are setting it to Jade you should be setting it to modprefix_Jade
Obelisk:
