#💻・modding-dev
1 messages · Page 328 of 1
what are you trying to do bepis?
so like, im planning to add skills that give +n mult, the timing should be similar to context.joker_main
i faintly remember someone saying i need to hook to SMODS.calculate_context to do stuff like that
you could add a dummy voucher that'll do it all for you, or add your own dummy area to store those effects
dang, i never tried neither 🥀
if i were to go with the latter approach, im assuming id need to create like, dummy jokers to add to the area, and hook the area to calculate_context?
to SMODS.calculate_card_areas
what does it remove?
...in my defense i saw this and thought its used for that purpose ❤️
synchronicity with soul sprite, it adds an extra check to every object instead of it being just local
you can refer to my code if you need help
thanks eremel :p
oh, thatd save a lot of time
❤️
Those numbers are global variables, setting it to that didn't change anything
This is how it looks at full card size vs when it's shrunk down to 2/3rd size
Card changes size, sprites don't
This is my code for changing card size, it just shrinks them down once they enter a cardarea
maybe you're shrinking them wrong
How else would I do it?
That's how the game resizes the non-standard jokers like Half Joker and Square Joker
you could change the visual size or the scale
wheres the code btw :p
see how SMODS does it
search zodiacs
I think it's because you're changing the size after the sprite has been created
That's required for the size of them in booster packs and shops so you don't get this situation
They have small elements you wanna be able to parse at a glance
The cards get smaller so that you don't have to worry about them taking up your whole screen
you'll just need to change the size of the extra sprites too
Okay how
I've tried to make them match the card size but it hasn't worked
Tried G.buffsprite.T.w/h = card.T.w/h and G.buffsprite.VT.w/h = card.VT.w/h and combinations of both and neither worked
It didn't even like, scale them incorrectly, it just didn't do anything
I also tried scale_mod in the shader but it puts them in the wrong offset
...hm
Even setting the size of G.buffsprite in it's definition doesn't work, it stays at full size
now that i think about it, if i go with this approach, theres no way for me to organize the +mult, +chips and such in an optimized way
I was thinking you just have one object that adds them all
and redeeming the skill changing the values in a G.GAME.modifiers table
oh yeah, good idea
I really wish resizing was just working, this would look so good
what do you mean
initially planned to add each skill as its separate card
but maybe grouping all of their effects into one card is the best approach
I disagree
I think it's easier to code if they're separate
and to handle too
you're just recreating
thunk's if-else-if tower of babel otherwise
I'm basically doing the same thing but with buff cards instead of skills, and you can see them in a cardarea
or not see them
a single object is really easy
—
, writing a single function to calculate all Jokers effects
but it's not 150 different effects
its one system providing certain values
it makes sense for them all to be together
they're together in the CardArea
At least there's not repeat code for the same effect over and over and over
I am talking about bepis' problem
Yeh I'm just expanding on this
Sorry
Nope 
what's their problem
What do you use?
love.keypress
Theoretically this can break controller in a manner if event will be prevented, key hold can stuck more than needed
Still wanna fix this, this sucks
Does Love provide any neat way of "consuming" keypresses so that multiple mods don't end up with conflicting binds? Would extending Controller be a more cooperative approach?
Mods naively polling for keypresses without regard for whether the keypress has been "consumed" by another mod seems like bad engineering, but without a common API, I guess there's not really any other option
This took way too long
what the fuck
HUH
-# Petscop texture editor.
First thing I'm making is a joker that's called Photochad
I never wish to look at a UI element again
that's fucking sick
mario paint joker .....
Once the texture is drawn, I intend to have it swap to a menu where you can pick between one of several abilities, which are then applied to all copies of the Joker.
The custom joker data persists between runs and game instances, so I already have a button to purge them in the config
At first I thought you were putting down random scribbles, but no, you're just an actually good artist, and I had no idea what you were even drawing until it was done
Graphic design is my passion
is there somewhere i could find a neat list of sounds the play_sound function will play?
no way you're making a joker creator
The game files
darn
Same
i was hoping for a doc or smth, but ig i can just go to the files
Spite, trial and error
And skill
how long did it take u to do that

skill has nothing to do with ui code
I started work on it around this time yesterday
it's cope actually
im still flabbergasted even though i replayed that shit like 10 times already
WHAT
yesTERDAY?????
The only skill you have is patience
Isn't that every problem here?
double down for ui code
me...
How to put a shader on top of a joker texture
The weirdest hack I had to do for this was to overlay an invisible button over the image using negative padding
I'm not going to touch it, lest it will break
that probably explains why you have to put each pixel one at a time
The image and button are sibling nodes, but the parent node has negative padding, which causes them to overlap
When the button is pressed, it does some jank maths to figure out the (almost consistently) closest pixel
Please tell me how to make the Joker always be polychrome in the store is a particular joker this one
You don't even have a calculate function
In one time I should finish implementing scrollbar
sometimes i wonder what my mod is about
Please read the documentation before coming here
https://github.com/Steamodded/smods/wiki/API-Documentation
almanac has a lot of text
my mod is leading the "how many words can you pack into a joker" competition ❤️
Not 7 pages on each joker, you know
Those can't even be considered jokers anymore
you need a set_ability function on your joker
They're the whole damn circus 
stats, equipments
i will need to learn to make cinematic cutscenes and dialogues soon
Even my modular consumeables are just 1 line
😭😭😭😭😭
Draw this equipment as UI on hover
i mean that's understandable since you're implementing gacha game in balatro
😭😭😭😭😭
-# "jimbo" is supposedly the final boss in my mod, actually
jimbo balatro final boss ??????!
Still wanna try to fix this, it's so close to looking good
Talking cards are weird
If you make a card separately, and replace card in talking card with created one, calling say_stuff makes this card wiggle much more intense than intented
the overall concept of my mod's story is:
- lost in weird reality, find self in casino
- jimbo tells you your memory is scattered throughout the place
- survive
thats the surface
In the booster pack they look so good ;~;
there's lore in my balatro mod
thats also why bosses from hsr take form of blinds
Show me how it will look like in the code, I don't understand I tried the options, they don't work
you know how?
just set sprite on that mf
At one time I want implement storytellers like in Rimworld
since those memories are manifested into those stuff, and you recover them back from beating them
I've tried like, 6 different methods
I think they'd look better if they were behind the base card, assuming the bse card has a big transparent section
id discuss more about my mod's story, but that would be too much spoilers for what will hopefully make my mod different from others :p

@heady siren I figured it out!
blob
Behind wouldn't change anything because the elements are made to fit together perfectly, no space overlaps besides the background gradient and rank / suit outline
Oh?
change your resize code to card.T.scale = 0.66
i think this might have problem with juice up
where it looks a bit jittery
was trying to fix this for my own letter thing
they kind of look like they're stuck on top though, maybe the chips bit needs a defined edge?
actually does it look funny when juicd up
I'd definitely try and reverse the order they're drawn, just to see what the difference is
I'd have to change how the code for the layers work
This drawing stuff is too complicated for me 
I like it how it looks now, that's how I designed it to look
are you using the draw step?
28th Feb
Now, is there a way to force a card to be layered above all other cards?
an option to reset the skill tree, options to add +5,+10,max skill points to skills, and skills that also have downsides would probably be fun to play around with
there is but you'll need to patch
Also they work but now the card hitboxes are full size
So halfway past one card will select the card on it's right
Lerping my beloved
And it automatically expands when you enter a blind
that looks amazing. Might be a bit tight in the screen space when the cards are being scored, but the animation for it looks amazing
Nice, since there's a drawstep talk going on, how exactly do you fetch a sprite to add it on top of a card? Is it an atlas call or something?
Or does the key already reference that sprite?
Slap this in here
Change it's position like this, though without the table and stuff, that's just how I did it
buffsprite can be anything you want
I'm surprised you can't use a SMODS.Atlas for that
nice
You probably can
I'm just stupid [=
Should there also be a keybind or button to expand the buff area or should it just stay as a hover?
the hover is good I think
Well I fixed the scale juice_up issue
Literally just multiply it by the scale
And it still works fully as intended with normal scale stuff
Much better compared to here
Aaaand it crashes when I select a blind, damn
Fixed very easily
How would one make it so a playing card draws its ranks and suits as a soul?
Crazed ramblings of a lunatic
Yea a SMODS.Atlas works fine, but glad I got it working
you just need to make the drawstep that draws the front of the card have the floaty soul stuff too
how do i put a card on top of the deck?
I don't know if it's the set_ability calls or my drawstep but if I get multiple Ditto to transform overtime it drops my fps
Are you creating a new sprite every frame?
Selling the jokers does not fix this, I reached 27 fps
I'm not sure if I am or not
What does your drawstep look like?
Oh actually maybe I am, should I move the Sprite being created elsewhere?
You are creating a new sprite every frame, and you should probably put it in a global variable instead.
Fair, but does Sprite exist while SMODS loads files?
Probably not, but there is this.
It's kinda dumb how DrawStep exists to load new sprites in but you still need an override/lovely patch to create said sprite.
I mean, it works with Cards because you can define it in set_sprite
with non-cards, yes, you need to define it elsewhere
Would be nice if DrawStep allowed for optional atlas and pos
i have never coded before, however i wanna make a jonkler with a very specific effect. i just want to know if its possible for a joker to either retrigger a used planet card, or something that essentially serves the same function.
There's like 2 instances of this I know of so yes it's possible
Just check those mods dev branch if you need refs https://discord.com/channels/1116389027176787968/1343670935122870342 https://discord.com/channels/1116389027176787968/1228825966940393483
I have a custom Joker, how do I add a polychrome effect to it when it appears in the store, thanks in advance
it's just like stickers and seals, the sprites are created once and then drawn onto the relevant cards
Check set_ability
Why the fuck does the github copy doesn't work 😭
Yea but you have to go to some length to get those added
How could one make it so selected jokers get played and turned into their respective enhancements temporarily?
Can't you just put a MOD.sprite_name = Sprite(blabla) in your file somewhere?
I didn't get an answer to this but does Sprite exist when SMODS loads files?
I didn't expect so since the screenshots I got uses a game_menu override
ok so i want an audio to play when i have some joker (like cryptid's jimball) but adding select_music_track crashes the game on load
You need to have music in your file name or key.
oh ok
I horrible code, it adds polychrome effect to the menu collection, but when it comes in the store it's plain
I think it should do, I do mine in a custom object's inject function so it should be okay I think
I don't think so because the atlas haven't been loaded yet
-# is that AI generated joker image
Not sure if there's a more efficient way but try with an update function?
it's whether or not the atlas has been loaded
Also you should be checking for j_prefix_arcario in find_card
to make Confused Sprites, I had to hook SMODS.Inject
The more efficient way is with set_ability
Okay, give me a hint on how to make it look right in the code
Well apparently it didn't work for them 🤷
then they did it wrong 🤣
might be placeholder i wont judge
gold stake tho.
testing?
could be but still
what does your set ability look like
that works thx
Is there a way to make a blueprint-like joker that copies multiple times? Ideally it would copy a joker as usual and then retrigger itself x times but i'm not sure if it's even possible with the returns
I think it's SMODS.calculate_effect()
if you just want blueprint you can just use SMODS.blueprint_effect yeah
Oh, i was referencing how other mods do blueprint effects, i'll have to see then
Yes, then you would do SMODS.calculate_effect() for not returning I think.
Is there a function that can be called that saves the mod config? If I set the config values through some method outside of the config tab, and reopen the game, it seems like it saves very inconsistently.
honestly calculate_effect never worked for me
atleast with my experience with making adult card which copies a random card from cards you sold
and even more the rigged variant
calc_effect is to handle an effects table
which copies all of them
This is even stupider if you have to hook the function that's suppose to handle this
what version of steamodded are you using
The newest
yeah that code you've sent is absolutely fine, it's either not what you're running on you have some cursed shit going on
did you restart the run
I mean you can hook any function that runs after the atlas is injected
It works, but the polychrome effect only shows up in the collection menu, and in the game itself, the Joker appears non-polychrome in the store
then you've broken the game somewhere else
Whatever, it seems like hooking/patching is the only way anyway..
you can also throw it in your drawstep so it only creates it once
does G.deck:emplace copy cards or just place an already existing card?
if not MOD.sprite then MOD.sprite = Sprite() end
Aight, nevermind, found a function that handles this, SMODS.save_mod_config(mod)
It would be nice to not need to patch global sprites
Oh interesting
nil checking is an art
Also it just occurred to me it would be nice to be able to apply shaders to objects like Editions without Editions
that's what draw step is for...
the 1 billion drawsteps
But it checks every object
Instead of being a property of the object itself
being a property would be checked on every card too though
But it’s one versus n
The card just runs its own Draw function that knows how to draw itself
Instead of every draw step asking every card “should I draw you”
Center objects have a draw function tho?
That’s what I usually use
The main limitation is drawing behind cards
It’s also slightly janky since SMODS doesn’t explicitly support it, but it works
(janky just how it’s written; it works fine)
This is what the code looks like, but it's polychrome in the collection and regular in the store
Actually maybe if I used the object’s draw function I would be able to draw behind the card. I wonder 🤔
honestly i don't really think this is gonna be that costly to check if the card is the card you want to draw to
you restarted the run right
Restarted many times, in the collection works, in the store
What could it be
I wonder if it was the set_ability change still
Do you have other mods
it's a smods bug
DebugPlus
Paperback
That's it, no more
guys can someone help me with something real quick
And what is the current version of steamodded at the moment
redownload smods now, it's fixed
Sadly it doesn't seem like i can use the calculate_effect for blueprint_effect, i also tried to calculate_effect the retrigger and return blueprint_effect as usual with no luck
ah
casual 9 month old bug fix 🥳
can someone help me ask
i guess i could simply copy the joker normally and then give it a retrigger, not exactly the same but it would do.
You return the table from blueprint_effect AFAIK
can anyone link an example of making a mod for a mod? like if i want to remove or modify some cards from another mod, but do it with my own mod, like a patch, instead of modifying the original mod outright
I have version 421c, deleted all mods, no
as in, i have the original mod which is untouched, and my patch mod which reads that mod and changes/removes specific cards
oh like, appending repetitions = x to it?
I have version 421c, deleted all mods, no
No
Get 426
Looked on the website now, there is only 0323b available at all
323 is older than 421
Get 426 the same way you got 421
So where to get it, only 323b is available on the website
How did you get 421
It was in the archive with some mod.
cryptid.
Fyi it does work like blueprint if i return it but i have no way to make it copy multiple times unless i'm mistaken
On GitHub right now the current release is 323b, where did you find 426?
You can manipulate the values or put copies in extra
Green button
how would i go about doing either? Cause right now i have all the checks my joker does to find the card to copy followed by this
Thank you so much mate, much appreciated, but lovely doesn't need to update just in case?
Polychrome works great!!!
Probably not
SMODS updates more often
note that you'll probably need to update the smods version in your mod metadata file too so that people also don't get The Polychrome Problem when they get their mod
whoops imagine there's a return there lol
You take the returned table then you give it an extra key with another returned table; do this recursively however many times you want. Just don’t overwrite any extra tables
i loooove extra table !
development is delayed because my dad accidentally locked all of us out of the house
:3
amazing
how
left keys inside
what.
phone?????
people should stop relying on electronics to open their belongings
we just use keys
im genuinely so frustrated rn
The Cyan Subplot
i just hook my single key to a massive bunch of keychains and a lanyard
i only forgot it once since
Also I can’t say much because my apartment does require an electronic for me to be able to get inside
It’s not a cellphone tho
god
my day is so unlucky today for no reason
my friend got food all over my shirt
my bike got locked up because someone took it onto the side road
and now im locked outside
Dang
😭
So, apparently The Duo works off the full hand, and not the the scored hand, for some goddamn reason?
well it says if the played hand includes pair, not played hand is or scoring hand is
Usually Balatro means scoring hand when it says that
ive always seen it specify if scoring or not
Or maybe I’m misremembering
Sometimes it says poker hand
Neither scoring nor played
Yeah, it makes sense after rereading it, but oh boy was it surprising at first!
not the case for the duo :P if it said "played poker hand is pair" then id understand but it just tells to include on the hand you played
i got inside
Vanilla wording is bad and inconsistent so I wouldn’t be surprised
Nice
your dad what
Chainsaw Dad
you didnt read it wrong at all
it's 9:50pm...
mhm
where did they get a saw
neighbor's home
did they saw the neighbor’s door to get inside to get the saw too
:sob
-# 
thats dedication to saw off a door
ok i have no clue what im doing so bear with me. right now im not worrying about functionality, just trying to get the game to boot up without crashing.
i keep getting an error saying on line 58, there was an unexpected symbol near '{'. (line 58 is right underneath if.context.skip_blind then).
SMODS.Joker {
key = 'doubledown',
loc_txt = {
name = 'Double Down',
text = {
"Create a random",
"{C:spectral}Spectral{} card if all",
"{C:attention}Blinds{} are skipped",
"this Ante",
"{C:inactive}(Must have room){}"
}
},
config = { extra = { } },
loc_vars = function(self, info_queue, card)
return {}
end,
rarity = 2,
atlas = 'BrummAndVortexsJokers',
pos = { x = 0, y = 0 },
cost = 5,
calculate = function(self, card, context)
if context.skip_blind then
{
cardarea = G.jokers,
skip_blind = true
}
end
if context.setting_blind then
{
cardarea = G.jokers,
setting_blind = true,
blind = G.GAME.round_resets.blind
}
end
}
Lua doesn't use {} for scope
remove all of these
You just write
if cond then
action
end
^
alr thx
ill just bump this again since im here, i still didnt figure out how to order cards inside the deck :')
Check how I manipulate the shuffler in my mod
I think it’s in a hook
Is there any way to set Collection order other than reordering the code?
i dont think so
i mean - maybe there r some options i dont know of, but you are probably better off reordering the code :p
Someone did it
the Ortalab OC person
Shinku
You’re probably better off not reordering the code, unless they want to reorder their own Jokers
i mean - i did so :3
Thanks!
Also found that Cryptid use an hack to accomplish the same thing: https://github.com/SpectralPack/Cryptid/blob/main/Cryptid.lua#L155
Not the one file andy
I just have a for loop to load them in order
I’m beginning to think I need sub folders for my Jokers
<@&1133519078540185692>
yeet bigly
🥀
I am NOT using 500+ lines files
(Also my editor doesn't have folds, so this will be painful)
thank you good sir
Hey, does anyone know where I can access the code for the jokers so I can see how exactly to program one?
Vanilla Jokers are programmed differently
Though they do help
Copy the EXE then unzip it
I see
Go look inside the code of a mod, it's better
Tried doing that for Cryptid, I didn't know exactly where the jokers were coded
I meant like, folders for my joker folder
wha
Try a mod that’s a easier to read
Like mine
A Joker folder with a file for each Joker
DM me it if you please
I think I need sub folders
yeah, thats what im thinking
Cryptid/items/misc_jokers.lua
does context.destroy_card only trigger for scored cards?
hm
you can limit its scope though
no my joker is destroying only scored cards 🤔
whats the code
if context.destroy_card and context.cardarea == G.play and #context.full_hand >= card.ability.extra.min and G.GAME.current_round.hands_played == 0 then
if (context.destroy_card ~= context.full_hand[1]) and (context.destroy_card ~= context.full_hand[#context.full_hand]) then
return {
remove = true
}
end
end
yeah, you limited it to only scored cards
emm how
what are you trying to do rn?
if first hand of round contains 3 or more cards, destroy all cards in played hand except leftmost and rightmost
seems to be so
well, im currently a bit tired so i cant hop on balatro to test myself, but you can try changing context.full_hand to G.play.cards, not sure if theres any difference
context.cardarea == G.play or context.cardarea == 'unscored'?
oh yeah, forgot that context.cardarea == G.play doesnt account for unscored cards
Well, found my solution...
local jokers = {
-- Hand - Mult
"hand/mult/merry_joker.lua",
"hand/mult/glad_joker.lua",
-- Hand - Chips
"hand/chips/astute_joker.lua",
"hand/chips/keen_joker.lua",
-- Hand - XMult
"hand/xmult/the_file.lua",
"hand/xmult/the_platoon.lua",
}
for _, file in ipairs(jokers) do
local f, err = SMODS.load_file("jokers/" .. file)
if err then
error(err)
end
f()
end
Yeah I do something like that
that works, thanks!
dm'd you a few questions regarding the code :')
those work now
how in hells name does one make a config page
How do you add polychrome to a card?
SMODS.current_mod.config_tab = function()
return --the fuckin ui here
end
You steal it from other mods.
hex
Bruh, thanks! I just won my balatro run because of you!
card:set_edition should be the function you need
would you guys choose a skill that does something like
Shuffles all Jokers when hand is played
Played cards give X1.5 Mult
Situationally
yea
How is xp obtained?
Thanks
right now, its after defeating a blind
yes if you can disable bought skills
Booooo
im thinking about making it so that you can only reset your skill tree at the start of each run
sorry to bother again but is this what it should look like for 2 triggers? because it just erratically juices all the cards in scoring order right now
else those situational skills would become too versatile
i mean, i can add other methods to get xp, but i dont know what 😭
No
The return or extra table needs to be the table returned by blueprint effect
Cross-mod content with my mod to gain bonus XP
I didn’t mean like that 😭
:3
I definitely thing earning xp for different game actions would be interesting, that was one of the things I wasn’t too keen on with grim
hm
Maybe choose a Joker deity that grants you XP based on different actions
Skipping is another are that I think would be good for guaranteed xp
It depends how much depth you want th system to have
Maybe Cartomancer gives you XP based on Tarots used
-ish
i definitely dont want xp to just be obtained through defeating blinds, thats boring :p
That’s what I meant with my mod
Because I want to replace skipping
With my own mechanic
its more fun to allow the player to earn xp through other means too, skipping definitely works since skipping blinds is usually really bad
and you actually cant just farm xp by skipping blinds everytime and die, since xp doesnt carry on through new runs unlike levels
how do i set the text and color for card_eval_status_text?
man whenever i think ive got a cool idea i look back in this chat and see what everyone else is up that and sit there like ._. lmao
these mods are amazing
Yeah, I think having a guaranteed amount from skipping, but being able to potentially earn more by playing encourages more choice
As long as the numbers are tuned appropriately
thats not just you lol, someone added donkey kong into the game, and then another person added custom jokers that you can draw on 😭
What’s the second one
im thinking about making it so that the more blinds you defeat, the more xp you would earn from the next skip - but that increase goes back to 0 after skipping (or reduces by a lot)
this one
The sixth input would be {message = "message", colour = G.C.COLOUR}
says the one working with skill trees
im not the first person to add it ❤️
Grim did it before, but i think im the first person to make one that saves for next runs
no, but thats not any less impressive
Grinding in balatro
we need mmorpg balatro i think, thoughts?
Roguelike players vibrating in their graves
Need more out of run progression!!!!!!
an issue im facing currently is that the xp bar is overlapped by pretty much everything else: the shop, the blind selection screen, not entirely sure what approach i should go with here
hide it
Remove the screen then draw it on top 👍
is it possible to make the text fade in the shop and only show when you mouse over the bar? it would look quite clean
i have no idea lol
only draw the full bar in the menu, otherwise add a small number which tells you the necessary info
the text from the xp bar would actually overlap with the button in which case :3
For this case you could make the bar thicker and have the text inside it?
You didn’t remove everything else
Idk about blind select though
How does one apply a voucher without redeeming it?
Do it like Minecraft and delete the XP bar
smt what kind of shenanigan are you doing this time 😭
😭
I hate that so much
wait how come the beginning of the bar when filled in with red doesnt have rounded edges?
...oh, i just saw that
Real world tracker of your opponent lmao
hm
localthunk™️
thats odd, both the bars have r = 0.1
Still blueprint vouchers.
ah
how do i check if the player's consumable slots are full? im trying to make a "must have room" effect
#G.consumeables.cards >= G.consumeables.config.card_limit or something
look at how other cards do it
I'm pretty sure it's something like
#G.consumeables.cards < G.consumeables.config.limit
that's probably more right
probably some local thunk shenanigans
It includes consumables that are in the event queue but not created yet I think.
...no?
thats odd
sleeve
😭
Lmao
it looks just like the cards
Guys does anyone know how to override a specific jokers sprite in specific conditions
||its invisible||
yea 1 sec lemme find the code
I'd shove it in options like i did to my custom currency
then why can I kill it
mmm good idea
Drawstep would probably work
I'm using this rn
card.config.center.pos
It's very primitive but i'm just trying to make it use a specific sprite for its base
can i have the code for adding a button to that menu ❤️
It was a simple lovely patch to add the button in options ```[[patches]]
[patches.pattern]
target = 'functions/UI_definitions.lua'
pattern = '''{
label = localize('b_vouchers'),
tab_definition_function = G.UIDEF.used_vouchers,
},'''
position = 'after'
payload = '''{
label = "Currencies",
tab_definition_function = G.UIDEF.insc_extra_currenicies,
},'''
match_indent = true
I think L Corp might do it
They have Censored Jokers and Bald Jokers
Isn't the base self.center.front?
I just mean the part that isn't the soul layer
Which I think is center (?)
Oh wait
Try looking at L Corp
I am
finally it's working 🥳 , thank you so much.
How are you doing it
i didn't really understand how the table worked, now i managed to use calculate_effect correctly and it works perfectly
The tab_definition_function needs a function which would be where you return the UI, like the xp bar. Example: ```function G.UIDEF.insc_extra_currenicies()
local scale = 0.4
local foil_sprite = get_foil_sprite()
local contents = {}
local spacing = 0.13
local temp_col = G.C.DYN_UI.BOSS_MAIN
contents.currenicies = {
{n=G.UIT.C, config={align = "cm", minw = 3.3, minh = 0.7, r = 0.1, colour = G.C.DYN_UI.BOSS_DARK}, nodes={
{n=G.UIT.O, config={w=0.5,h=0.5 , object = foil_sprite, hover = true, can_collide = false}},
{n=G.UIT.B, config={w=0.1,h=0.1}},
{n=G.UIT.O, config={object = DynaText({string = {{ref_table = G.GAME, ref_value = 'foil'}}, maxw = 1.35, colours = {HEX("bebebe")}, font = G.LANGUAGES['en-us'].font, shadow = true,spacing = 2, bump = true, scale = 2.2*scale}), id = 'foil_text_UI'}}
}},
{n=G.UIT.R, config={minh = spacing},nodes={}},}
return {n=G.UIT.ROOT, config = {align = "cm", padding = 0.03, colour = G.C.UI.TRANSPARENT_DARK}, nodes={
{n=G.UIT.R, config = {align = "cm", padding= 0.05, colour = G.C.DYN_UI.MAIN, r=0.1}, nodes={
{n=G.UIT.R, config={align = "cm", colour = G.C.DYN_UI.BOSS_DARK, r=0.1, minh = 0.3, padding = 0.08}, nodes={
{n=G.UIT.C, config={align = "cm"}, nodes=contents.currenicies}
}}
}}
}}
end```
mhm, i got it working, but i wonder if its possible to make the box smaller
feels a bit too empty
maybe add the skill tree to that aswell?
is it not the same size for all the tabs?
oh, thats actually a great idea, lemme try
All the tabs are the same size, I agree the skill tree in the same tab.
-# How do I clear enhancements, editions and seals off of a given playing card?
set_seal(nil)
And the similar versions for enhancements and editions, just set them to nil
look at code for the man who sucks
This is a worse place imo
Uhhh so does this change only the sprite or the jonkler itself?
I think it should be possible to get it in the left panel somewhere if you put the text inside the bar or as a hover pop up
I think it changes the text as well
thats progress
!!
if i want to make a joker that gives x$ for every king in hand, which context should i use?
Okay I think I'm just going to use the same logic that the game uses for stickers. Define global sprites, make every joker in the pack have a random key that corresponds to the sprites, and then draw it over the initial card
Does someone have an example of adding +mult to cards?
if context.individual and context.cardarea == G.play then
context.other_card.ability.perma_mult = context.other_card.ability.perma_mult + 1
return {
message = localize('k_upgrade_ex'),
colour = G.C.RED
}
end
:blessed:
maybe i should make it so that its only the text thats shown, and when you hover over it then the bar appears too?
should hopefully solve the issue
im probably still gonna keep this, i think it looks nice :p
Hey guys, anyone have a starter guide to modding?
pressing anything in the skill tree leads you to the full UI
You mean that’s not a functional skill tree?
it actually still works normally
but that skill tree version is smaller than the full one
so i was thinking: if you plan on pressing something in there, it should open the full version instead
That would be very unintuitive
aka this
hm
i guess thats true, maybe i should make the smaller version functionable too
i dont think i need that much space, anyways
I just don’t think you need that button at all
a
If you have the button on the main screen ofc
so just the hover -> expand thing will suffice?
I think hiding the bar away in a menu would be bad design, so fitting it somewhere on the screen is infinitely better
my original design was actually to make the bar vertical, on the rightmost side of the screen
I was thinking a vertical bar might work
smt like this
but uhhhhhhh, i should probably mention that the progress_bar_function kinda breaks at the vertical part
:3
its weird
heres the current problem
I see
I think you could also put it between the money display and the round display
im guessing you mean here, i will look into almanac's code to see how to add uis to this section
...jen almanac has everything in one file???
I changed my jokers recently to just load everything in the jokers file into the main lua, is there a way i can choose the order they load (or display in game) other than renaming the files?
having a table with the respective joker files' name, like {"joker1","joker2"} might help, idk
i genuinely have no clue where to look at
holy fuck
23k3 lines
kinda how i had it before but it was getting a little annoying adding them in manually to both the atlas and import list
its a lovely patch, pretty much overwriting the entire code that adds those display boxes to fit in the "Tension", "Relief" display
but im not sure if i want that, since it will conflict with mods that do the same
hmmmm
There’ll be a much easier way
I'm not actually sure how this is supposed to work
Like is the last argument of Sprite() not supposed to be coordinates?
Because from what I've seen in the files it's coordinates
Pretty sure the atlas should be the actual atlas and not just a string
try G.ASSET_ATLAS['atlas_key'] instead?
are you sure the atlas key is correct
Yes
for reference, this works for me Sprite(x, y, w, h, G.ASSET_ATLAS["casl_sleeve_atlas"], {x=0, y=3})
It might be when I'm running it
Because I'm running it as soon as I start the game
But if that was the case then I think new_sprite_atlas wouldn't be nil
why don't you print out the content of G.ASSET_ATLAS
so the atlas key wasn't correct
well I'm hoping it'll at least be a different error
what are you indexing
hey guys, tryna create a joker that gives money for every king held in hand after the final scoring, however it doesnt really do anything.
calculate = function(self, card, context)
if context.end_of_round and context.individual then
for _, v in ipairs(G.hand.cards) do
if v.rank == 13 then
return {
card.ability.extra.money
}
remember the teacher in highschool that always said "4 what? apples?"
it's that
I was using self.T.h as an atlas
you're just throwing a number back and not specifying what you want the game to do with the number
oh alr thankyou
check out https://github.com/Steamodded/smods/wiki/Calculate-Functions#step-3-returning-effects for some more info
:3
how'd that happen 😭
I just forgot to remove a 0 when I was replacing numbers with variables
rip
I'm gonna move that stuff because it defining a new sprite every frame isn't very efficient go figure
damn that's crazy
is there a function for a joker's own index in the joker area? im trying to make a joker incompatible with duplicates of itself (because it hard crashes the game and would also give infinite money if it worked)
actually, i can just make a list of all of that key of the joker in the area, and make a check for if its the first in that list
I had a similar problem, but fixed it a different way.
I think this is for a different mod right
its lobc
nice
Ohh I see
Also guys how do I make my own global like how paperback does with PB_UTILS
even better, each joker will have an "active" variable set to false, and the first joker found in the list will have it set to true, and the rest get set to false
I have a file which I import in other files
Something like this would work, though sometimes i also just use G.GAME.var via a lovely patch. This would be in your main file
I just need to define the sprite I'm using as a global like how these are
I hook SMODS.Inject
so it works in the Collection
Inject is best if you need it in collection, i didn't for what i was doing
You could hook a myriad of functions
Quick question, how cursed does a non-spheric moon look?
Very
Should I keep it? Or is it way too cursed?
keep it it's how hyperion is irl
you can check how I do it for Confused Cards
Yeah, it just looks so wrong, but it's so funny
I'm so divided on this lmao
Which mod?
Oh wait nvm
i think it looks weird because it looks like it was a circle but the middle was cut out
I don't understand how to fix it
That's because it's exactly how I did it; I did try to fix some of it, but will do a second pass then
the jokers so far in my wii-themed texture pack
in higher quality
Oumuamua next
Oh mama,
This one should be so long, it would clip out of the borders...
Where is that specifically
are you looking at the dev branch
Oh there we go
Anyone got a image of jimbo, no background?
Give me a few hours, jimbos going places
In general, I recommend extracting the base textures from the game
It's very easy to use magic/fuzzy selection to extract that sort of things
Okay we're making progress
It properly overrides the sprites AND isn't super laggy
Now I need to figure out how to make it only apply to cards from a specific booster
How would I apply specific config options to jokers generated from a booster?
Like would I put it here?
question about malverk
can you make a texture pack that replaces things like the shop sign with malverk
I don't think so
mk
maybe it's the way your font is dressed
How do I check what rank a played card is
get_id()
or context.other_card.base.value == "rank"
question how do i make a joker jiggle like dna or invis?
can anyone help with this? im trying to update the card with every win but its not updating, and still returning 5 less mult than it should.
ok so question
how would i change the sounds for jimbo speaking
hpw would i make a joker that counts all cards as non-face cards
so just... opposite paridolia? or whatever its called
yes
try looking into the game's code for that
with an is_face hook
the again displays on the card instead of the joker
question
is there a list of keys somewhere? gonna try to replace the jimbo speaking sounds but idk what their key is, if there are keys for it
Well yeah, you’re passing in other_card as the card
rate the card 🔥
Theres currently only 3 so far
Press Space!
Click Me!
Press [Random Key from A~Z]!
hey, i cant access other_cards.
can someone help?
may someone help (i am trying to make a texture pack loll)
context.other_card is usually with context.individual.
as the things suggest, you have to either click, or press a key\
I made a poker hand needs 5 wild cards to play, and the evaluate works all well, but I don't know how to add the enhancements to the poker hand example. any ideas?
are you able to have more than 1 return under a single context
What are you trying to do?
currently trying to have SMODS.blueprint copy more than one joker at a time
In that case I’d do SMODS.calculcate_effect instead of doing a return
That function basically runs a return table independently
It was game changing when I found out it existed lol
ur a lifesaver thats so huge
can anybody help me change the jimbo speaking sounds
Happy to help 
last time I tried blueprinting multiple jokers, I couldn't make it work without having some weird edge cases
retriggers in particular were weird
iirc
That makes sense
let me know if you find something that works 👀
i think im struggling with the calculate_effect syntax
btw
You’re forgetting to pass in a card object as the second variable
oh is it structured like (self,card,context)?
Nah, it’s like SMODS.calculate_effect(return table, card)
aah
also how come my cursor is doing this and writing over text instead of inserting :P
not sure if i ask here or not but what is the filename of gros michel, because it doesnt appear to be gros_michel
i think i fatfingered somewhere
Insert key
Vanilla jokers don’t reside in individual files. How are you trying to access it?
If I had a nickel every time someone in #💻・modding-dev asked why their cursor is replacing instead of adding
uh
if you wanna reference it you'd use if self.ability.name == 'Gros Michel'
thats how card.lua does it
blows u up with awesome mind powers IDC
oki
it's just weird it happened twice 😭
Lmao
okay yeah i just made a dumb mistake lmao
It does happen
minor spelling mistake strikes again
AAAACK
calculcate 🔥
christ how didnt i see that
I love to calculcate my cards
M F Doom putting in work
im gonna have to hard code a seltzer interaction but otherwise we move
@tepid crow this copies all joker_main abilities but id imagine it wouldnt be too hard to add other contexts
I think most blueprint effects don’t even take context into account
well mine has to scan thru every joker slot to identify food jokers so i think it'd need a context?
Yeah I really don't want to hardcode anything like that if I can avoid it since I want it to be cross-mod compatible
is that MF DOOM
ye
Nice art
-# An idea.
cheers
is the idea MF DOOM versus Doctor Doofenshmirtz
What, Doofenshmirtz would copy any Joker that "involves technology"? Like Photochad?
idea for the doof
how do you get an enhancement's actual name?
Makes a copy of a random joker (except for itself) at the start of the round <cardname>inator then it gets destroyed at the end of the round lmao
since Bonus and Mult cards just have Bonus and Mult as their name, instead of Bonus Card and Mult Card
ok sorry to drop a big wall of text but uh
as a fairly new modder of the game, i've found steamodded's documentation to be somewhat lackluster; i've muddled my way through fine enough referencing other mods where i need to, but that shouldn't be something everybody needs to do (at least not for the more basic stuff). in particular, the examples repo is out of date in some places (the reimplementation of vanilla jokers still returns things like mult_mod and a separate message in the calculate functions, even though it's just mult now and steamodded autogenerates messages for standard +chips/+mult/xmult/+money effects)
i'm probably gonna send some pull requests to the examples and wiki repos eventually, but that's a big task. so for now uhhhh quick template mod that reimplements the basic Joker (+4 Mult). again. generous commenting by me, but comments + implementation are based on the version from the examples repo. also some beautiful placeholder art by me
Grab G.P_CENTERS['enhancekey'].name?
I don't think so
first of all bonus and mult cards just have bonus and mult there
second
modded enhancements have their keys as name
localize it
You’re planning on doing god’s work fr 
^^
localize{key = …, set = …, something else I forgot}
🫡 i learnt my first modding knowledge from the examples repo
ok thank you!!
i still very do much do things the old way
SMODS docs are notoriously lacking (and honestly it's probably because of the work going towards features as opposed to housekeeping) so that's a hurculean effort. Might be willing to lend ya a hand in that
ye it would be awesome to have support
if any of y'all have specific things you think are currently missing from the smods docs i'd love to hear them
anyway this is also an elaborate scheme to avoid working on the art for the actual mod i'm developing 

if i think of anything ill jot it down
Keep in mind there's already a rework of the docs in the works
I believe
o
I know they wanted to, but I'm not sure if it's actually in the works or not
localize{key = 'm_modprefix_key', set = 'Enhanced', type = 'raw_descriptions'} would get the description of a given enhancement.
if that's already goin on i'll probably focus my efforts more towards cleaning up the examples repo, otherwise hopefully i can help kickstart it
I don't think anything's actively in the works?
more so that they said they want it to change?
I'd suggest talking to idk @wintry solar or aure or other people
gotcha
what we think of this ability?
the card splash wishes it could be
yeah its main thing is it makes high card viable early but it falls off pretty quick
lmao
because high card with 5 cards is easy to get
I would compare to something like the jokers that give chips for a specific hand and make it weaker than those
because at least for those you have to meet a certain condition
localize{key = 'm_modprefix_key', set = 'Enhanced', type = 'name_text'} !
-# Ping on just in case.
mood
it's a big task for sure, but good documentation is something i'm fairly passionate about everywhere
i had it at 20 originally but blue joker is common and gives +104 base and every card can score
I realized what they were doing and I message them elsewhere
because I knew exactly what it was
🦐
-# long story
20 might be more reasonable though bc blue is remaining not just in deck
-16 because you draw 8 cards, and then you have to discard a few times to get a decent hand
and it falls off every time you play or discard cards
round that to 20 which is 4x the 4 cards that dont score
I guess the question is, what kind of playstyle are you trying to incentivize
im just trying to give tools, its a common card so people arent going to be building around it most of the time
sure but it would still be good to have a purpose for making a joker instead of just making a joker

