#💻・modding-dev
1 messages · Page 188 of 1
what does it skip /genq
you lose a hand and play nothing
not no benefit. Some jokers only give benefits on the final hand, so burning hands is useful to get to the final hand. Once you get into the scientific notation scores, 99% of the blinds will be won in one hand, so getting that extra Xmult or whatever is worth.
true...
actually for the sake of this joker, would you consider 4oak to contain 2pair?
the game doesn't
No
no
lmfao
What I'd do for that joker (i realize my previous idea was wrong) is base it off the example provided in the run info
and call get_poker_hand_info on it
can I define functions in my mod's main.lua or do I need to patch them into the game files?
two pairs is two pairs of different cards, while 4 of a kind is 4 same cards so they arent really the same
the former works
perfect
anyways I'm still trying to figure out why exactly this crashes
maybe my most embarrassing dev moment happened earlier when i discovered that my joker i had been debugging for THREE DAYS was perfectly working, the only problem was that in the calculate declaration i wrote function(self, context, card) therefore making every reference of context confuse the game entirely and make the joker entirely unfunctional. all i had to do was change that line to function(self, card, context)
i honestly cant even imagine having to patch all of those if i cant do that lol
: not .
on juice_up
what do these do?
i have no clue what they even mean, but that art is clean
The left one summons a worm friend
in fact, way too clean compared to the pixelated style of balatro 😭
I didn't reuse 1x, instead doing 2x separately...
Who doesn't want a worm friend! :D
Like Cryptid, Ninja Rope will increase card selection limit by 1...
Worm friend will eat some percentage of the blind's requirements to help you out
Glory to worm friend!
I should make worm joker... it does nothing, alternatively you get a singular chip
Or maybe I could code it to give a random phrase of encouragement...
...thats a ninja rope? 😭
I can see it
looks like a heated steel coil for me somehow
there we go, now I have a tooltip for it, so people who download the mod without playing 999 or knowing the math concept, will still understand
i'm curious how people have even managed to implement increased card selection amounts
Same
Mess with G.hand.config.highlighted_limit.
makes sense
i cant find the image but imagine the first image heated like the second image
Oh yeah I can see that too, that's interesting
wow, thats REALLY good for a common joker
:0
that + oops, all 6s is gonna be absolutely wild lol
from the code previously it's a fixed 50% lol
oh
guess it's wip tho
Tbh I make all my jokers common until after I get a chance to test them out
it's just common because I keep copying jimbo for my base jokers, I'll probably make it rarer
also i forgot about oops
This is why my in testing 777 joker that retriggers each 7 7 times is common... I still don't know what rarity it should be tbh
I did the math though, with a five of kind of 7's it gets 40 triggers total
Yeah
the math is 8 x 5
I might nerf it to 2... maybe 1 trigger for each 7?
Or I'll just keep it since I plan to keep the mod to myself either way
Indubitably!
On an unrelated note how would I make the thing for my mod that shows up under its cards to say it's from the mod be a different colour?
I am very sure I worded that weird
yay
leet
in your metadata you can add a "badge_colour" = "FFFFFF", entry
What is a Leet...?
almost read that as feet ngl
FFFFFF being pure white
Leet (or "1337"), also known as eleet or leetspeak, or simply hacker speech, is a system of modified spellings used primarily on the Internet. It often uses character replacements in ways that play on the similarity of their glyphs via reflection or other resemblance. Additionally, it modifies certain words on the basis of a system of suffixes ...
So just Hexadecimal :D
Well I know of Leetspeak I was just confused what the hand(?) would be
Interesting
That's very specific
I like it
thats a really odd hand type ngl, can be both fun and challenging to build a deck around it tho lol
25% Aces, 50% 3s, 25% 7s
im considering moving it a bit higher in the order to make up for its specifics, should i?
a gambling game with no 7s supports is kinda disappointing ngl
I'd make it better than three of a kind
i think it should be higher than full house, below four of a kind ngl
Idk if better than straight
Agreed :(
As and 7s dont have any good support jokers
That's why I wanna make a lotta stuff for 7s in my own personal mod
that could be changed with the jokers the mod provides!
true, true
I like 7, it's a good number
i dont have anything for aces and 7s
i probably should do something about that LOL
I also like 42, but there's no 42 of spades or anything to that effect :(
hey now you have more ideas
I have my 777 joker and I plan to do 2ish more about 7s... afterwards I plan to work on Aces >:D
what if theres a mod that allows you to increase your card's rank insanely high
That would be nice
oh boy! can't wait to draw a 5,092 of Rank #1,799,802!
The glorious Red Seal Mult Polychrome 42 of Spades
And the first shop in this random run gave the Scales. ⚖️
i imagine the suit is just a fucking cube
Is it really called Mult for the thing that you add to cards that gives +4(?) mult or am I going insane?
yea
jimbo himself says it so
True, glory to Jimbo
The regime knows best
cobrastan above all
What would be the correct way to put my custom stake between orange and gold? doing this still puts it at the end of the list, and doesn't even apply the other stakes
I added this print to state_events.lua but it is not printing...
local poker_hands = evaluate_poker_hand_wrapper(_cards)
print(_cards)```
And how did you "add it to state_events.lua"
with a patch
yeah, I copied that from the dump
Do you see your changes in the dump
this was the patch
[[patches]]
[patches.pattern]
target = "functions/state_events.lua"
pattern = '''local poker_hands = evaluate_poker_hand(_cards)'''
position = "at"
payload = '''local poker_hands = evaluate_poker_hand_wrapper(_cards)
print(_cards)'''
match_indent = true
times = 1```
"planet?" lol
idk tbh
wuh oh, were file uploads disabled in the wake of. The Events Incident. was encountering smth we figured was best described via video
I can still upload files
weird.
nope
basically, the for loop works, the problem is that. uh. it keeps *re-*calculating itself and more specifically, adding onto itself. our attempt at a sanity check was not that, it turns out. what're we doing wrong here? it doesn't seem to be an issue with the actual for loop, but the code inside it.
--NOTE: this is bugged and because of how the addition works, if you keep hovering over it, it. Keeps adding. this breaks things fast. oops.
--could MAYBE solve this with some form of sanity check of "if money > cardsCounted, what the fuck stop that"?????
local money = 0
if G.playing_cards then -- make sure the deck. Exists.
for _, v in ipairs(G.playing_cards) do --basically, "for every playing card, do the following script:"
card.ability.extra.cardsCounted = card.ability.extra.cardsCounted + 1
if card.ability.extra.cardsCounted <= card.ability.extra.cap then card.ability.extra.money = card.ability.extra.cardsCounted else card.ability.extra.money = card.ability.extra.cap end
end
end```
oh, we just had to loudly acknowledge the problem and it fixed itself. go figure. ;P
well the problem i see here is that your card is upgrading itself every time you hover over it
you shouldn't modify your card's values in loc_vars
where's the best place to move it? this is a temperance-like card, if that helps narrow it down.
instead of modifying your card directly, use a local variable as a counter
...huh. looking at it we think we started trying to do that and just kinda. Forgot. because of the local money = 0 line. sounds abt right
I didn't even see that but yes it looks like you had the right idea to begin with
as a tip, not every single variable has to be in your card's config
just tried to hover over the video to see what your deck did lol
I suppose debugging will be tommorow me's problem
the only thing I can think of is that somehow G.FUNCS.get_poker_hand_info simply isn't being called, but then if it isn't I have no clue where the UI is getting the display information for the highlighted hand
Did you try playing a hand
yeah, and that didn't do it either
do eval G.FUNCS.get_poker_hand_info(G.hand.cards) in debug plus' console
while in a gaem
it printed high card, then I highlighted a pair, and it printed straight
I guess so
it's weird that it's printing the name of a hand when it should be printing the card information, unless I'm misunderstanding what G.hand.cards represents
OH
It's giving me the best hand I can play with all of the cards I curretnly have, not the ones I have selected
that still doesn't explain why that's what it's printing though...
It's not even coming from any print statement I've written myself
okay, we definitely removed those wrong, and it did crash in a silly way, but. question. can you put a for statement in a ease_dollars(yadda yadda) argument? because while it wouldn't fix the text on the card, that would very easily fix the actual functionality.
Can't figure out my issue
It's crashing the game
the only explanation I can think of is that I've somehow patched and/or called the wrong function, in which case I need to track down the correct place to insert my wrapper
hmmm. I got a stack overflow trying to make a deep copy of the selected hand
perhaps the function I found for making the copy is faulty
Sounds like infinite recursion.
Set a depth limit.
okay, we're almost there. we can get the numbers to stop incrementing every single time they're hovered over, but the function to actually give money is borked now. should we like, make a non-local money variable in config to store the payout, and then call that, or is there a simpler answer we're missing?
loc_vars = function(self, info_queue, card)
--NOTE: this is bugged and because of how the addition works, if you keep hovering over it, it. Keeps adding. this breaks things fast. oops.
--could MAYBE solve this with some form of sanity check of "if money > cardsCounted, what the fuck stop that"?????
local cardsCounted = 0
local money = 0
if G.playing_cards then -- make sure the deck. Exists.
for _, v in ipairs(G.playing_cards) do --basically, "for every playing card, do the following script:"
cardsCounted = cardsCounted + 1
if cardsCounted <= card.ability.extra.cap then money = cardsCounted else money = card.ability.extra.cap end
end
end
return { vars = { money, card.ability.extra.cap , cardsCounted } }
end,
atlas = 'Tarot',
pos = { x = 2, y = 1},
cost = 3,
can_use = function(self, card, area, copier) --when can we use this?
return true -- Yea,
end, --ok good c:
use = function(self, card, area, copier)
ease_dollars(money)
end
}```
Would it be possible to have a blind apply multiple other blinds? Not like the usual blinds where they recursively apply eachother, but multiple seperate stakes.
Basicly, you have one stack of stakes, and another stack of stakes, would it be possible to make one stake add both? And maybe even more stacks?
the problem was I copied faulty code. Found one that actually works
held in hand at end of round.
(Won't clean if your hand has only one rank.)```Please help me find better wording for the last line.
If held hand
contains more than
1 rank, destroy
lowest ranked
card
what's the context name for the end round money calculations
calc_dollar_bonus im pretty sure
so, what golden joker refers to
nvm its just calc
calc_dollar_bonus(self, card)
having tried a non-local variable for the payout... didn't work. any idea what we're missing here? everything here except the actual "give money" part seems to be working just fine. (image embeds smaller so may as well use that)
Does any words in the third line need to be {C:attention}-ed?
I'm leaning to highlight the "more than one" part.
I think that'd work well
Also, anyone in chat rn familiar with modding with Talisman? I'm running into some issue that I'm very confused with
Numbers got turn-tabled again?
"calc_dollar_bonus(self, card)"
How do I set up the values afterwards here
You return the number of the bonus in dollar
example? I am extremely new to lua so I might need an example
[doing your calculations (or not)]
return the_number_of_dollars_you_want_players_earn_at_end_of_round
end```
omg hi ancient joker your my 22nd favourite joker in the game
Why thank you good sir
What if Ancient Joker had Whatsapp
death
If Baron had whatsapp
How does Canio's effect look in the code? I am trying to do that but with money instead of mult
Reacts to context.remove_playing_cards, with context.removed containing destroyed cards.
more than one rank
not ranks
context.remove_playing_cards(face)?
I want it to give you money at the end of the round based on the # of face cards destroyed
you'd check for context.remove_playing_cards
then in that context, see if the cards are face cards
So this?
no
thats not how contexts work
if context.selling_card and context.card.ability.name == "Egg" then
here's an example, this joker reacts to when you are selling a card
and if its the egg
if context.remove_playing_cards
and then context.card should be the card being removed/destroyed? i admit my knowledge here is slim
you would check if context.card is a face card though i do not remember how to do so because its 2 and i need to go to bed
Note: you should be checking keys instead of names: context.card.config.center.key == 'j_egg'
oh trueee
i just did it the same way card.lua does
i was thinking about this but i didnt know how exactly it would work, but I'll definitely note this example if I ever need to check a specific jonkler
i was rushing
yeah smods code likes to stay as far away from names as possible
localization right?
take note of j_ring_master, j_caino and j_gluttenous_joker while you're at it
If mods use the same name for their objects it can be troublesome
that's something else. Basically internal names need not be unique
...
thank you for that wake up call
what's the confusion with gluttenous jokers code name?
this has the funny behavior that you can set a joker's name to that of a vanilla and it will behave like that joker wherever you don't define different behavior
I knew about ring master and canios
i greatly dislike that its spelled "caino" not "canio" in the source
gluttenous not gluttonous
celiac joker doesn't like it
ahh
Lmao
how would I make an internal counter on the card, similar to satellites counter
use card.ability.extra?
i dont think its a common thing to have joker values be passed on to other jokers but i wanted to share the code I used for it
trying to remember, are there any vanilla jokers that deal with played but unscored cards?
i dont think so
Square joker
oh I forgor about that
I've been trying to figure out what to write to check if the destroyed card was a face card and I'm getting rly confused
Anyone know how to make this text not go off screen? It shouldn't pop up on top of the card like that
tis on a custom collection tab
i dont think theres a way around it unfortunately. but i dont really care since it looks fine when it's in the actual game so
¯_(ツ)_/¯
if there is one I would also like to know because i have that same issue as well
In the jokers collection all the jokers on the top row show their text below them
So I would want this to do the same
@frosty dock would you happen to know
i dont see it?
Oh god this stake on paper clip looks really cool!
all credit goes to PaperMoon
thanks!
yeah the top one of underdog
and its affect is gonna be that it gains +3 mult for every hand played that is not your most leveled poker hand
and the second one is courier joker
peak art
and played 6s give 38 chips when scored and selling it will make a negative version of it much more likely to appear in the shop
Is that a reference of some sort?
Ah I see
thanks!
there is, with lovely patching. I think the top/bottom positioning is just based on the on-screen position of the card
it's just not far enough up to be switched
if you could point me to where the positioning is calculated that'd be great
if not i'll look for it tomorrow
wake
can't search for it rn
that's okay
i will be pull requesting the util functions bug
its not like this in actual gameplay ffs
its just in the collection
crop job so bad it killed godzilla
whar? i was just giving a kind reminder that there will be a bug in your repo and you will never know when it will come
my mod has long enough tooltips that stuff goes offscreen all the time
thats not cropped
yea
this is something that i would expect wee joker to say
Are those code and idea badges toggleable?
Currently no, but that is something planned
balatro story mode
At the moment I'm focusing on getting as many Joker ideas as possible into Mistigris
pog how many are you at
You’d save so much vertical space without them 🤣
20 implemented, 31 total ideas
by telltale games
okay thanks for letting me know this, I just made the collection taller...
Lol
A tiny bit taller
like 10%
31 ideas left or 31 ideas in total?
31 ideas in total
nice im almost done with my third page of jokers iirc
i am proud of these ideas though
eepy
awake joker automatically becomes sleepy after defeating 3 bosses
-# idea
no awake joker has insomnia, it cant get back to sleep
awake joker dies after 5 bosses
unironically though I don't like the idea of limiting Awake Joker
because then it's like, you build up Sleepy for 10 rounds, get a good amount of mult, sell it, and then you only get to use it for like 3 antes?
awake joker has crippling caffeine addiction (lore)
canon
pronoun joker
where does the game set the G.GAME.current_round stuff? or at least anybody know a mod that cycles a global thing like castle or rebate? I have like 6 mods downloaded and none of them have a cycling joker lol
+4 mult for every pronoun in descriptions of all owned jokers
oop nvm farmer from extra credit does
+4 mult for every pronoun consumed by this joker
How do I look through a player's entire deck? I want to make a joker that, if the player doesn't have a specific card at the start of a blind, adds it back to their deck.
Full deck is in G.playing_cards
how did you add the subtitles?
thanks bup
Can you lovely patch a mod?
yes
Same format & everything?
Ahhhhh. Thank you!
So far...
Peak Work
how would you check for the rank or suit of the right most card?
iterate through the played hand, and grab the last one, then just check the way you'd normally check for rank and suit
yes but the last one in a flush ( five cards ) isn't the same in a double pair (4 cards)
#context.scoring_hand is always the exact size of the array. So if you check context.scoring_hand(#context.scoring_hand), you'll always get the last hand.
You don't even need to iterate, I realize, that's just habit on my part, I guess
thanks for teaching me that #contect.scoring_hand is a thing
It's not that specific one that's a thing! If you put a # in front of an array name, it'll return it's length
I think it could have the white border
Hmm, the easiest way to have things in the collection screen that aren't tied to a game object specifically would probably to just create Dummy objects, right?
wdym?
also heres another finished joker art
I'm working on Fantasy cards right now, which 'cast a spell' based on the three left most cards held in hand, and I'm not too keen on having their tooltip show every potential spell option every time, but rather just the spell that will be cast, and just have every spell visible in the collection
wrong reply
here is the code
Please do include line numbers when you post code, it's a lot easier if I don't have to count. But you just used the wrong brackets. () Is for passing variables to functions. [] Is for indexing
My bad for giving you the wrong brackets in my suggestion, btw
like that?
Ya
You’re combining contexts
wtf is that?
Go over your code and try to reason when each statement is entered. When do you enter context.before, and when do you enter context.main?
what?
do you know what 'if context.before then' does?
yyes i want to give the money before the cards are scored
do you know what 'if context.joker_main' does?
when the jokers are being used?
what do you mean by that? Jokers are being used when their code is ran, after all
ii don't understand what your questions mean
I'm just trying to figure out what you mean when you say 'when the jokers are being used'
after the hand is scored
No, no, not when, what does it mean when you say a joker is being used? Do you mean if it gives out it's effect?
yes
So I want to make a Joker that draws 2 Enhanced cards from your deck at the start of round. So far it does nothing, what could be the issue?
Ah, okay!
context?
i don't think context.selecting_blind has other_card
selecting?
That's what your code has
Card Jokers have a white border
it says setting not selecting (should I change that?)
I can't read but I don't think setting_blind has other_card either
I had some effects like this but I can’t access the code right now
Anyways your contexts don’t make sense to me
I intend to rework how I was doing it, but you need to iterate over the deck to find which cards you want to draw
your current code does:
- on setting blind, if other_card (thing that doesn't exist) is enhanced, then have that card execute
draw_from_deck_to_hand(function cards do not have) two times
Jokers aren't 'used' in that way. The game has a bunch of times it calls each joker the player has with by using 'calculate_joker()'. You can see this happen by making a joker who's calculate function has no 'if context' statements, but just a function like this:
calculate = function(self, card, context)
return {mult = 1}
end
If you put that in your game, that joker will add 1 mult when you draw a hand, when you discard, when you use an item, when you reroll. So to stop that, Balatro uses context. They carry information, and part of that information is timing.
For example:
context.before will only be true before scoring.
context.individual will only be true when playing cards are scored
context.joker_main will only be true when each joker card is scored.
context.after will only be true after scoring.
Jokers have a variety of abilities, and only some are the ones you wanna put in joker_main. If a joker says '+4 mult', that goes in context.joker_main, because that happens when the joker triggers. If a joker says something like 'gains +2 mult if your hand contains a pair', you check if it's a pair in context.before, before the scoring. context.before and context.joker_main are never true at the same time, so your code, which checks first for before, and then for main, will never trigger because of that.
So, in the code you're writing, try and figure out why you're using context.before if you want to return something on context.joker_main. Is there something that needs to happen before scoring?
well not two times but have 1 time that draws 2 cards but the point is that cards don't have the function with that name, it's a g func iirc
I thought that othercard:draw_from_deck_to_hand(card.ability.extra.draw) means draw "othercard" (which is enhanced card) from your deck
I think that’s what Blinds do
At least SMODS ones
How are you finding the card to draw
Oooh, good point. I hadn't even considered looking at blinds, for some reason. Thanks for the tip
draw_from_deck_to_hand is a global function that draws (argument) cards from the deck
I used context.other_card and context.other_card.ability.set == "Enhanced"
yes give 3$ before scoring if rightmost card is less than 4
What should I use then? SMODS wiki doesnt have that info iirc
So I don’t know if that ever iterates over the deck
if the $3 is given before scoring, then try to see why you'd use 'context.joker_main'
There’s an extra option for effects of cards in the deck, but Idk about effects of cards on cards in the deck
Either way you don’t need that
because im dense and i dont think before copy pasting stuff
And I’d probably recommend against it for probabilistic reasons
why other card doesnt exist? I created a local othercard
I mean, copy and pasting without thinking is something every programmer does 😛 But I'd keep in mind that if your joker isn't triggering in the future, it's good to try and figure out whether you're usign the proper contexts!
Is there any code I could reference?
your local is defined as context.other_card. context.other_card doesn't exist
thanks very very muc
anyone know why this take ownership wouldn't be working
SMODS.Joker:take_ownership("splash", {
tsun_mine = true
})
Actually I found this but let me check something
is there a context for deck area?
like G.play or G.hand
I think yeah
If you want to draw extra cards you should probably just use the hand_drawn context and then draw extra cards
Yeah this works probabilistically @prisma loom
To avoid drawing cards in hand?
yeah, they are extra cards
Well if you draw them before that you won’t get extra cards
See the code I referenced
As the games draw function just fills your hand
makes sense
I know my code worked with respect to context timing, but I don’t remember if I fudged the event timing
With SMODS not being big enough to have thousands of guides on google, it can be tricky to figure out, especially if you're still learning. If you're getting stuck and not sure what contexts actually contain or do, you can just play around with print statements, and the debug functions (https://github.com/Steamodded/smods/wiki/Utility) to see what's going on. Not as flashy as making functioning jokers, but I found it really helped me understand the code a lot better
Look at big mods that are well made and easy to understand
I think the tricky part is new modders don’t know what mods do what
At least we know what mods to suggest for some effects
cryptid does everything
And they're often not commented, or per se written to be understood by new people. Especially once they use lovely injects, or a lot of functions that call other functions
It doesn’t do balance
yeah
Also Cryptid is usually very confusing
I am against blanket copying effects and more for looking at mods to understand how they work
bump
What do you mean
There suprisingly little to none mods that have draw effects and those who do use those wierd patches or something (i dont understand how they work)
Yeah, copying code over is often a good way to lose the ability to just understand your own code
Mine does but is unreleased
I’ll also probably update to use patches
To unify different draw methods
What it's called? I use modded balo wiki
sry
Mine does but is unreleased
typed too fast
Hmm, I should check if I'm actually using the proper ways to draw cards, or if I'm going to break intended synergies with the way my code's working 🤔
I wanted to get an alpha release soon
Mods should be used as a reference to help understand how to use the stuff smods supplies, I see way too many people posting code that they don’t understand that they’ve just copied blindly from a different mod that isn’t necessary for what they’re doing
I have more than enough Jokers for it
That’s fair but I think it’s tangent to the conversation
I want to make a joker that ensures the last hand played the previous round is drawn first in the current round, is that possible without extensive modding of how the game handles deck order?
It’s mostly new programmers who don’t want to learn programming
or does the game even order the deck randomly each round instead of just pulling random cards from a pool
The hardest part is remembering the cards
The rest should be easy
remembering the cards sounds easy though
cant you just add a property to them like how c dagger adds sliced to cards and then remove it when they get drawn
search the deck for the property on blind select
On a slightly related note, btw, I haven't looked into it much, but I have some joker concepts that do deck order manipulation. Is there already a safe way to do that in SMODS, or is that going to involve me writing some injects or hooks to do?
That’s probably the approach I’d take. I think it should work separately from any Joker or other kind of effect. I think that’s the main caveat
I should probably look into whether the game shuffles at any arbitrary moments, too
I had done it by hooking the shuffle function
I think you can just reorder the table freely
But there might be mods that shuffle the deck at certain points
I hooked the shuffle function to guarantee you draw enhancements for a Joker effect
sdm0's stuff dev branch has a card that lets you see the top 3 cards on the deck that might help with something idk
Card that lets you see the top 3 cards of the deck number 1000
Haha, I do have that joker too!
Idk why “top 3” specifically is so popular
yugioh
How so
I went for 3 because that way I can make the Back to the future part 2 joker show you 4, and the part 3 joker show you five
dark magical circle
Me making a Joker that shows the whole deck
Such limited regular card draw and so many shuffle effects in ygo that scrying's not too useful. You just look at your entire deck every time you're searching for a monster anyway 😛
One reason I’m not sure about that one is because someone else did it better
Exactly why do the top 3 even matter
Are you playing against SPYRALS
Haha, I did consider that for back to the future 3, as a legendary joker that has a bunch of hoops to jump through to get it, but it'd be a ui nightmare that i'd have to solve
it's nice for mill decks
aren't you usually forced to shuffle after deck searching
That’s the part they did better
Yeah, I can imagine. It's the hardest part of that joker concept, after all
It’s in the same code
It’s not too complicated—well, I haven’t programmed this kind of UI, I’m talking conceptually—, just a new tab with a CardArea for the deck in order. But I don’t think I can come up with a better, original alternative to that and I didn’t want to copy the implementation
I have a potential voucher that I'm considering that would turn my new consumable item into a cache, so that no matter how many you have, they'd only take up one consumable slot, which the logic wouldn't be too difficult for, but if I want it to look nice, I'd commit to more ui stuff than I'm actually interested in
That is the timing i suggested btw victin
And it’s a flavor effect so Idk what to do
Haha, I think it's my days writing ruby code for pokemon rpg maker fangames that have traumatized me about the concept of making custom ui that's bug free, so I'm always a bit too wary
I see. I haven’t looked into these effects in a while, but I want to eventually patch things so all of them work consistently. But I’m not sure how many I’ll have
I had planned more
But I’m not sure since I cut down a few
There’s a mod that does that at least
I'll look into it at some point. I've been considering some custom UI for my boss blinds, but I've set everything up so that I can make mostly everything in this mod function without having to touch ui stuff, so that ui stuff is only for polishing everything
I think also for consumeables it could just be a number on hover
It doesn’t need to be more complicated than that
What kind of custom Boss UI
mostly some reskinning the blind info with some more thematic art. Nothing too big, but it's mostly that ui stuff is such a bummer to work on for me that I'd prefer to just do it in the end, as it doesn't need to be there for things to function and the player to get the right info. Only stuff I do need to implement is an indicator for boss blind's that target specific jokers or cards and warn the player, but that's just sticking a sprite to an object
I think adding art to the Blind UI should also just be sticking a sprite to an object
Yeah, probably! It's mostly that I also want certain animated things and indicators and such. It's probably not hard, I just hate doing it, haha. The Voldemort boss blind I want to have an indicator for each random spell he's going to cast next hand, for example, and display that, and that's still something to figure out too. It's mostly the designing things and making sure it's floating on the right coordinates and such, when you don't get immediate visual feedback 😛
L Corp does some stuff with Blinds
@zealous glen Is there a get_enhancement function? So I could look for cards that have them
I had also made Blind tooltips
I usually use if card.ability.set == "Enhanced" then
I did something similar for another effect that drew Enhancements though I don’t remember how. But you can check that the set isn’t “Default” but instead…
As they said
You can even do the inverse by substituting == with ~=
SMODS has a specific get enhancement function that checks for quantum enhancements, right?
when the Joker in the deck
Ah
I think so
It does but I’m not sure it’s appropriate in this situation
@hushed field some minor Blind UI stuff
I’m gonna try to make an alpha release with 15-ish Jokers soon
I have more than 15 working but no art
oh bet
i was just being a weird one
@zealous glen which part of the code is responsible for the number of cards drawn?
Oh, that does look really nice. Fits in with the style real well
I’m thinking if I release as is or if I do more distinguishable placeholders
i mean my mod has like 50% placeholders
Here, the fact you only draw once
(does it count when one is named "Placeholder Joker"?)
Thank you!
Should I chnage +1 to +2 then?
What’s that mix one
I've just opted for an art style that's honestly just as quick as making a placeholder
No
Im used to changing values via config
she fusion on my trans til i
So idk what to do here
To be fair for my first mod project I had only placeholder art made within a few seconds and people loved it
There’s no value to change because you only draw once
fusion???
she fusion on my trans til i convert 40% of chips to mult at a X1.25 rate
Autumn you should totally not steal the ortalab artist credit boxes
Yeah
thanks i havent
them = mine ;P
Oh that message read badly I meant that you should actually steal them
What you want to do is to have a for loop over the number of cards to draw, and instead of selecting a random one, do a pseudoshuffle
thanks i wont
No it read correctly
Haha, well that's lucky 😛 Or you're just amazing at placeholder art. My placeholders were just flat info, but the joker style I opted for is real quick to do (because it looks janky), so I decided to just skip placeholder art
What do you think? Alpha with placeholder art that’s identical to one another?
oh right, ur code was drawing 3's only
im not allowed to look to others for help thanks tho
if im not mistaken
It looked something like this #🎨・fan-art message
haha that's charming as hell
My point is that it only drew one card
is it intentionnal that the seed 7LB2WVPK on erratic deck no longer works?
_< thanks
(no more cards in deck)
Although I think I lost the Dog and Hamster arts
dog
So, if people are up to help me brainstorm, for Fantasy card enhancements (and some jokers), I've gotten a list of 'spells' that cast when they're triggered based on the suits of your first 2 cards in hand, and the rank of the third one, but I'm struggling to come up with anything that works for Clubs and Spades. (Though I think I should potentially figure out a stronger theme for Spades than 'the random effect suit')
@wintry solar something keeping vanilla bugs
🤔
For my mod I’m planning for Spades to have xMult, Hearts Mult, Clubs Chips, and Diamonds money
curious why you switched the benefits of the first the suits
That definitely works for the identity of each suit, but I found them hard to combine in that case
I think it’s more flavorful
Also first three
Not first two
Arrowhead gives Chips, Bloodstone xMult, Clubstone Mult
I was considering having spades mess with meta resources like discards, hands and consumables, generally, but those are a bit too powerful to give freely
The Enhancement themes for them were Steel Spades, Glass Hearts, Lucky Clubs, and Gold Diamonds
I was almost settled on Seal themes
seal theme six
i have 22 "finished" jokers, 16 implemented with no art, 5 with art but no effect, 2 with art but not even ingame
Hmm?
hmm maybe spades/clubs should upgrade the other scoring cards with a chip bonus 🤔
See the question I replied to
why not an xmult bonus
It doesn’t say anything
From what they said, there’s an Erratic deck seed where the deck is empty
I read what for loop is in lua and I still dont understand wtf should I do
what is _cards? what is #_cards? why it uses square parenthesis? by how much I increment? what am I even incrementing?
I see
I created _cards to track the possible drawable cards
because i want the club suit to relate to chips. I might make the heart/spade one give an xmult bonus, in that case, but that's a bit harder to properly balance I think
-# the vanilla game does not have xmult bonus
Also what’s this 👀
that's why it's a mod 😛
already done
Unless I do the heavy lifting and add to SMODS
i mean
(Seriously I was working with someone else but I haven’t put in my side of the work to finish the PR)
My side of the PR is for Jokers
How could I know that? Is there a guide on SMODS wiki? (Im just genuinely curious how someone is supposed to figure it all out. Like where do you learn this stuff?)
The playing cards are done
As I said, I created _cards so no. But for the rest, look up a Lua tutorial
Those are all syntax questions
Well
The latter are semantical questions
Victin holding up smods beta release 🙃
I was gonna grab a screenshot, because my heavy lifting is stealing your code, haha
But they are due to some particular syntax
lmao
i mean it'd ideally be nice if people actually used AMM as a dependency
because then cross compat is better
but IDEALLY it's just in SMODS anywya
but i cant do that so :)
Also some card UI @hushed field
offering tombstone combob
I did mention it
I just didn’t explain myself ;P
yeh i just hadnt seen the joker itself yet :)
i can't really add dependencies because people may be stupid and dont know how to install the right shit
I might switch it over to that set up, honestly. I used AMM to look into how lovely injections functioned, so I thinkt he one in my current main branch is your credited code, but I think the one on my dev branch is a wacky refactor of it to make it worse so I could learn and figure things out.
Also those cards are permanent
Also Myst is the Blind genius
Not blind genius, Blind genius
Myst my goat
who knows whether im actually blind
Myst was
all along
I’d Crimson Mist but I don’t have an emoji of it
-# it was Crimson right
yes
Haha, I'll check out Myst's stuff at some point then. Boss blinds are for when I've finally added all 8 enhancements and have 150 functional jokers, though, haha. Can't get distracted
but that ain't a self insert
myst you should do a self insert blind so i can have my self insert joker beat you up
8 enhancements eh? i'm halfway there myself :3 enhancements are funny
Did you see the fanart of Water pregante
if i make a self insert blind none of you are going to survive
Self-insert Victin particle effect when
I've somehow decided that I wanted an enhancement type for each big movie genre, so there's something for jokers of that genre to interact with
8 enhancements? Pathetic
Mysty Sue much
Enhancement? Pathetic
Where’s the Disenhancements
SMODS Objects? Pathetic
yall reek
Right here
How can you tell? Are you breathing manually?
Though the nightmare code that is the Fantasy enhancement rn might as well've been 30 enhancements in itself, and I'll probably split it up into a sort of module that the fantasy card uses so I can keep reading my code without losing sanity
my heart is beating manually
But honest to god tho I'm really happy on how they turned out
Looking good
Oh I don’t think I shared the Confused cards here
if you are reading this, you are now blinking manually
didnt work
damn.
If you’re reading this, you lost the game and I won it
If you are reading this, you have the habit of blinking hard
if you are reading this [[LET ME OUT LET ME OUT LET ME OUT LET ME OUT LET ME OUT]]
ooh, some of those look real sick
If you're reading this, the snail is outside your door.
Some I get carried away with
I will pray for you, so that you shall surely break.
wallahi im cooked 😭
May I offer you a [[great deal]], [[little sponge]]
Damn you read my mind Victin
Also here’s a way to get all these Enhancements
this hook works but the cards played are all flipped down
i dont really know what to use flip_card on
G.hand_highlighted doesnt work as expected
fun fact igo stands for init_game_object
isn’t that Frankenstein’s monster’s Frankenstein’s assistant
Yep
it is so interesting to me to see people not realize you can just change variable names to whatever you want
btw calc is short for calculator
cool, did not need to ping me
its not that deep
This Joker is going to be the end ofm e
bump
i really need this to work
how are you using it to have determined that it doesn't work?
splash does not show up in my mod's collection page nor with my mod's badge
i do know that 🙂
it used to do that, but after I split my mod into multiple lua files today, it stopped working and splash no longer is owned by my mod
this code is in the main file (the others load properly anyway)
i do actually need this for functionality now and not just for show
and you didn't accidentally disable the badges?
nope
wait you can do that?
yeah no it's not in the tsunami collection page at all
even if it didnt have a badge it'd still be there right
aure's now called john? interesting
john "aure" smods
yeah. I think the code just isn't being run then
john aure smods the second
but that's not possible
it's in the main file
not inside any if statements or other code
it's at the top and the code below it runs
and it doesn't crash it just gets ignored
logs of what
i haven't had any crashes
Mods/lovely/log
lovely mods log
well then here
i'm not really sure how this will help..? but do your magic
all I did here was boot up the game and go to my collection
and then close it
chat rate my placeholder oddity art
How do I make this compatible with modded suits?
Ooh boy that reminds me, my mod is painfully vanilla
Like this?
My main question was whether rank_shift_string is correct or not.
What's your goal?
chanced strength (except that Ace-/->2)
Then that should work
It doesn't handle custom ranks but I'm not sure how to deal with that
My solution is just to not touch them.
Testing some code that had a 1/4 chance, and I thought I'd written it to be broken, but no, my luck was just very good and I had 16 triggers in a row
lmao??
Hi guys! I'm quite new to Balatro, and infantile to balatro modding (though I have modded other games [eg Minecraft] in the past). Where would you recommend I start?
I was so convinced that I'd done something wrong. But no, four separate hands without reloading, all triggering every card
the Steamodded github has documentation, and maybe more importantly, example mods to look at
yipper!!!
shouldve went and win the jackpot ngl 😭
damn
anyone has any clue why this happens?
this happens when i try to open cryptid refactor
hm. where are the example mods
oh wait i got the link wrong
did that
there we go
the page doesnt work
nvm dark mode extension doesntr work
so is it possible to spawn a joker in the command line
sorry again im very new to modding
Hey y'all, I'm trying to implement a joker that basically takes the ceiling of the current chips and mult during scoring. I'm working with Talisman, and I'm really confused on how to_big is supposed to be implemented. I get an error saying a table is being used inside the math.ceil() bit. How do I fix this?
calculate = function(self, card, context)
if context.joker_main then
mult_mod = to_big(math.ceil(to_big(mult) / to_big(10)) * to_big(10))
chips_mod = to_big(math.ceil(to_big(hand_chips) / to_big(100)) * to_big(100))
return {
chips_mod = card.ability.extra.chips,
mult_mod = card.ability.extra.mult,
message = "Gullible!"
}
end
end```
so, if Card:get_id() returns self.base.id
if self.ability.effect == 'Stone Card' and not self.vampired then
return -math.random(100, 1000000)
end
return self.base.id
end```
Then why am I getting two different values for these two prints???
```print(hand[j]:get_id())
print(hand[j].base.id)```
Possibly related to the fact that I'm doing this earlier
```for i=2, 14, 1 do
hand[current_card].base.id = i```
get_id() is returning this negative number while card.base.id is giving the value I want, even though that's the value the function is supposed to be returning
sorry to nag, but still trying to figure this one out, if anyone has any pointers :o
....can i carry this to info_queue somehow
card.ability.extra.payout is always 0
starting to realize that if i were to add more complex effects for my jokers, this is gonna flood the entire screen 😭
I was using replace_base_card and no_rank, but I think I just need the base card one
what if you make them a separate screen with a button to open them
i also initially thought of that actually, but can you change this part of a joker through code?
(holy shit that circle is diabolical, its basically the text part of loc_txt)
if its possible, i want to add a button for the jokers to cycle the description between the effects, eidolons, and set effects
that should make it look much better
that fixed it! Now onto the next issue 🫡
unrelated but is there a way to pin stuff in #1209506514763522108 ? so i can have my most important information readily accessible
hold on, this is accurately registering as a pair! The function might actually be working properly
No such luck
you need to use generate_ui for that but it's not going to be very simple
...honestly, its gonna help on the long run so im willing to go through the torture 😭
lets see, im supposed to find the part where the game generates the joker's description and somehow work with that, right?
smods.joker has a generate_ui function you can use
oh i see, thats convenient
ok there's something slightly wrong with my recursive function but that should be fixable
i don't think it's documented? I found it while looking at the code
it is
it's on the SMODS.Center page in the smods wiki since SMODS.Joker is derives from that
if thats the case, then jokers should be using this right? (its inside SMODS.Center)
some jokers use it but its not used often cause its ui stuff, which is more advanced to a lot of modders
i can see why
yes, you're basically hooking into it so it replaces it
you need to call the original in your code
hmm, i will try, thanks for telling me where to start ❤️
recursion fixed!
i have a joker idea that wants to modify a large game function
fml
(also soul/bh spawn rate is 0.3% iff you don't have Showman for some reason)
common events 2273~2284
Ok so I know for a fact my wrapper function returns exactly what I want it to, ran it using eval in debug. But why isn't it executing in any place I patched my wrapper into? This is in state_events.lua btw
local poker_hands = evaluate_poker_hand_wrapper(_cards)
print("testing")```
nevermind then i wanted to buff those two spectral's spawn rates but it literally doesn't let you redeem them a second time
and I have checked to make sure the patches took in the dump files
unless, I've missed some critical place that evaluate_poker_hand() gets called
where are you trying to patch it?
did you check smods
which file is this in?
smods\src\overrides.lua
Thanks! I’ve gotta go but I’ll check it out when I get the chance
Chances are that’s the last piece I’m missing
These are the kinds of things that if I didn’t ask, I literally would not know even existed
how would I remove specific ranks of cards from the starting deck like abandoned deck does with faces
abandoned deck uses starting parameters to toggle a pre-existing removal of face cards which I can't find the code for
You'll have to go a route similar to checked
alright then how do I remove a playing card directly from the deck
is card:remove() enough
Is there anyone in chat rn who has good Talisman knowledge?
@mellow sable
lmao
👋
that was quick
Yeah seriously
Like seeing a Cryptid in the wild
math was already here
I was alr online lol

while you're here is card:remove() enough to remove a playing card directly from the deck
do i need to do anything special like context.destroying_card
Hey while you’re here should I invest in Apple stock
no
I heard Fuji was gonna be the fruit of the season
Alsoo did you try it
invest in to the moon stocks
iirc no
I guess they hate Fuji
i already open and close balatro enough times on my own
my steam friends probably hate me
anyways, I ask because I'm having a really confusing issue with developing alongside it rn. Getting this crash as a result of (I BELIEVE TO BE) this patch, but not entirely sure why
go invisible
Like I think you also have to remove it from card area
oh that's annoying
no
oh thats easy
G.GAME.chips is a table with talisman
calling remove already does that tho
you might just need to mark the card as destroyed too
go splashisible
add this in your code and then wrap G.GAME.chips in to_big()
to_big = to_big or function(num)
return num
end
^^^
if talisman isn't loaded, to_big won't do anything so it won't crash with or without talisman
how do i make a joker that increases itself based on played cards work?
idk
where exactly would I do that? This is an injection being made in the final score calculation in state_events.lua
Post-talisman patches might I add
you could put it in the lovely patch if you really want
to_big(G.GAME.chips) + to_big(whatever) maybe
but it should work just
in the top of your mod's lua file
because the code won't be run until score calculation, which is after your mod is loaded so
yeah that oughta do it
So stick the block you gave somewhere in my main??
hello, anyone knows how to have stickers only apply to jokers? i have the "sets = { Joker = true }" thing but it looks like it doesn't matter cuz the sticker appears on consumables as well
Hmm, still no. Same error
you did add to_big() around G.GAME.chips right
I did not whoops
I'm just confused as to why Talisman doesn't make that patch in the first place
because to_big is the function it uses to convert numbers to tables for bignum/omeganum storage
it is not something talisman can fix in itself, they would have to find and patch in to_big() around EVERY instance of G.GAME.chips and G.GAME.dollars
something like that, anyway
if talisman added the dummy to_big function it would change nothing
I knew that much. I just meant that the G.GAME.chips in that vanilla code block is untouched by the mod. That's where my confusion is coming in
all that code block does is make sure to_big exists, and if to_big doesn't exist, it does nothing
so that the code doesn't change without talisman
oh
no it should be working on the vanilla stuff
Also same error after doing this
well that's all i got ¯_(ツ)_/¯
damn lol
If absolutely needed I can easily send over the files that are doing this. Won't do that unsolicited tho lol
What line of code do these errors refer to? StackTrace :: Oops! The game crashed
main.lua:1781: main.lua:1567: bad argument #1 to 'floor' (number expected, got boolean)
That's a great question that I genuinely don't have an answer to
I would've checked my main.lua but it doesn't even have that many LOC
check in mods/lovely/dump
if you're doing lovely patches to vanilla code it's usually something there
dump contains the vanilla code post-patches from your last crash
Ah right I did find that. It's coming from a G.FUNCS.evaluate_play() call
im having a bit of trouble debugging my mod, can I have some help? It keeps crashing when the cards get scored. Does execute() need to always return a value?
Mod code:
SMODS.Joker{
key = 'scribbled',
loc_txt = {
name = 'Scribbled Joker',
text = {
'Gains {C:chips}+#1# Chips{} for',
'every scored {C:chips}Bonus Card{}',
'and {C:mult}+#2# Mult{} for',
'every scored {C:mult}Mult Card{}',
'{C:inactive}(Currently {C:chips}+#3#{C:inactive}, {C:mult}+#4#{C:inactive})'
}
},
rarity = 2,
config = {
extra = {
chips = 0,
mult = 0,
dchips = 10,
dmult = 1,
}
},
loc_vars = function(self, info_queue, card)
local stg = card.ability.extra
return { vars = { stg.dchips, stg.dmult, stg.chips, stg.mult } }
end,
calculate = function(self, card, context)
local stg = card.ability.extra
if context.joker_main then
return {
chips = stg.chips,
mult = stg.mult,
card = context.other_card
}
end
if context.cardarea == G.play then
if SMODS.has_enhancement(context.other_card, 'm_bonus') then
stg.chips = stg.chips + stg.dchips
return {
message = 'Bonus!',
colour = G.C.CHIPS,
card = card
}
end
if SMODS.has_enhancement(context.other_card, 'm_mult') then
stg.mult = stg.mult + stg.dmult
return {
message = 'Mult!',
colour = G.C.MULT,
card = card
}
end
end
end
}
sorry for text wall it wont let me send .luas
here's the output error log
There's no context.other_card in context.joker_main
oh my god
local stg = card.ability.extra
return { vars = { stg.dchips, stg.dmult, stg.chips, stg.mult } }
THIS HAS BEEN A THING THIS WHOLE TIME???
yeah. just defining your own locals in a function
you mean i DON'T HAVE TO TYPE OUT CARD.ABILITY.EXTRA EVERY SINGLE TIME
heebie geebies
what
this is going on tumblr. i am putting this on tumblr

do not put me on fucking tumblr
oh wait so this is a thing
no more "extra" typos
it's always ability for me
i keep typing exrta or ablitly 😭
how do I get a card's base suit, not accounting for smeared/wild/etc.
should just be able to access the suit anyway
It's always 'ablity' or 'abiltiy' for me
though why areyou doing that
of card.ability.extra.something
and i just typed or copy pasted it every time there's so much
why did nobody come up with this
i cant even say anything
youve said enough
true
we will carve this as the 11th commandment
tbf, most ide's just let you autofill the card.ability.extra after you've typed it once
real
also it still crashes, same listed reason
LMAOOOO
what is it supposed to do
autofill is annoying
boost chips and mult of joker on bonus or mult card score respectively
so
when a bonus card scores, increase chips
when a mult card scores, increase mult
yes
instead it crashes