#💻・modding-dev
1 messages · Page 548 of 1
What's the weigth of each vanilla rarity?
I want to create a new rarity and don't know exactly what's the % of spawn
Joker King, Reng the XI
the weight is the % only if they add up to 1
the actual chance is (weight/sum of all weights)
it just happens that they add up to 1 in vanilla so that doesnt matter there
yeah yeah I know I meant the base game is just the %
And is there any SMODS function to change base game weight for rarities??
never used take_ownership tbh
How can I get a UI to change based on a value, I have X and I want my square to be X long but X can change, please ask any questions if you need to know anything
something like this?
SMODS.Rarity:take_ownership('common',
{
badge_colour = G.C.DARK_EDITION
},
true
)
just trying to understand
Okay, how do i grab how many Rares I have in my joker slots
loop through the jokers and check joker.config.center.rarity == 3
and custom rarties, how would that work
== "modprefix_key"
thank you
👋
Tired I did not sleep well...
But how are you my bestie and I have my frame one waking up question
doesn't seem to work 🙁
im doing badly because im at work
My question is am I just stupid or is there not a simple way to put 3 vouchers together the way there is normally 2
the key might be uppercase
Tried all the combinations that came to my mind but none worked
i think you would have to change the voucher ui but ive never looked at it
Fascinating, wish it just worked in the way of if you require the voucher it goes behind it
Is there a way to link a mod to an in-game skin? So that the mod selects a specific In Game Card skin?😅
i don't think so directly
you can probably just hard choose the deckskin when the game starts
https://discord.com/channels/1116389027176787968/1409551965465215027
Hametsu is to shy to ask here about your opinion about his API that allows you to reroll boosters or redraw the hand inside a booster
And how can I do that?😅 Or is there a way to Change the normal playing cards so its Not an In Game skin?😅
@abstract garnet which is your favorite joker?
...are you sure it's context.card and not context.other_card? 
yes
it's usually card for non-scoring contexts
well it's not working
tested with hex and this condition doesn't enter when the requisite joker is destroyed
i think some vanilla cards didn't work with this in the last release
spectrals i mean
No, it's because it checks for card.getting_sliced which spectrals don't set.
it's fixed in the next release
...yeah, i should have specified any non-selling source of destruction such as madness, hex, ankh, instead of just ceremonial
it should work it's just a bug
can you insert a string into the tooltip (T:) text style?
as in, instead of {T:v_crystal_ball} do {T:"my text"}
no
i dont think it takes from the localization file either
then how do you do custom tooltips?
for decks i have no idea :3
why not?
you can have info_queue[info_queue+1] = { set = "Other", key = "your key" }
i know that those exist, but why can't you use tooltips? do they just not work?
how would I apply a shader over a whole consumable set (a.e the spectral shader onto my own consumabletype)?
couldnt find it in documentation and the way joker forge does it doesnt work :clueless:
ok but can you write a custom message in an info queue?
yes
like this
put it in descriptions.Other.key
make a drawstep like this https://github.com/Steamodded/smods/blob/4715f75fc9f4379adc3c357d844a8ebef4e7059d/src/card_draw.lua#L234
so jokerforge is just doing completely something else then?
also thank you, ill do that rq then
yeah idk lol
lmao ill pass it on to them then
what causes this "timing" issue? shouldn't blueprint and rebate trigger first since it comes earlier in the "joker chain"? rlly new to this
for my joker i'm using context.pre_discard, if that matters
i was going to ask that
while rebate uses context.discard
yeah thats why
damn
alright good to know at least
it doesnt really matter, its just a bit weird-looking
gonna try and find some workaround for my logic
you can just save the amount and give it on the last card in context.discard
fantastic! didnt think of that, ty
...how do i do a custom saved message? 
Like what exactly
i assume you mean like mr bones, i think in localization it gets put in a 'saved' entry
or wait until the next release where you can return a message
that is also true
huh? i thought the saved changes were added ages ago and you could just return a saved argument with either a localization key or a message
Sorry if this is a very beginner question but is there any recourse I can use to find how shaders are used to give editions effects.
been trying to take ownership of rarities for a while with no success
anyone knows the key to access them?
the values are being loaded in but very weird things are happening. Things like chaos the clown are inherited when it's encountered in the shop even if it was never bought. I've tried making it only read jokers from the joker area but that also flopped so I gave up on it. There's a plethora of other issues. Stuntman, for example, works fine at first by reducing your hand size but then it starts increasing by +2 every time you enter the state where Stuntman is present. If anyone could help a little, it would be appreciated.
i had this happen when i had my cardarea inserted into G instead of its own little area so it had to go through EVERYTHING in G to find what it needed, but im assuming that probably isnt the case for you
does steamodded change the level_up_hand function? i see a lot of mods do wierd stuff with hand chips/mult without making any hooks/patches to the function, despite the function forcing the chips and mult to always be accurate to what the hand would have at its new level without any modifications
How do I get the xMult of Jokers?
you guess where it is
i did find that smods does change it but i dont really know what its trying to do
okay how exactly do i do the latter part of this
if context.discard and context.other_card == context.full_hand[#context.full_hand] then
What?
jokers don't have a singular place where they store xmult
so many contexts... i wouldve never known how to do this, ty...
anyone can give their variable any name
i could store my joker's xmult in card.ability.extra.table_1.table_2.i_am_really_obnoxious if i wanted
So if I wanted to have a Joker do something depening on the xMult of other Jokers, then it'd be hard to implement?
no
yes
You can use a lua ast parser to see where xmult is returned
and get the path of where the xmult variable is at
unless it was specifically something that triggered every time another joker triggered its xmult, in which case you could just get it from the context during context.post_trigger i think
and you can do that very easily in the next update I'll release at my lib
So you just need to use my lib
self-advertise 😎
you can still detect xmult triggers from context.other_ret in context.post_trigger since the return value for xmult has to have one of a specific set of names
^
At its finest
Okay, I'm gonna try to figure something out
btw s can we release the talisman fix
I'm just thinking of a name for it
Bro i literally coded 1 function LOL
Talisman +
and that function help code the other ones
Is it ready ?
good name
needs testing but I think
I have like actual good names lol
So it’s still beta as of now
we can release it with dependency of talisman or we could rewrite talisman functions
or we could try to get talisman owner to let it be in actual talisman
yes
i dont think you will get ruby or anyone there to do that lol
Mathisfun?
Just make better talisman
LOL
talisman't
We can also do that but we'll get called out for stealing talisman code prob
it's under the GPL3 license
if you use exact talisman code literally the only restriction is that your own code also has to be GPL3 and allow other people to look at/modify/redistribute the code
i dont think anyone would say anything if you fork it
Nobody cares honestly it’s just a mod
it's not like a content mod

I'll try that then
It’s not even making anyone money
you can fork it but if you tried releasing it as your own i think thats just a shitty thing to do
or altering the license
uncrediting other people
etc
yeah
is it currently possible to modify hand chips/mult without it instantly resetting to its regular vanilla values on the next level up? ive seen mods do this without needing to edit level_up_hand despite that function being what forces the chips/mult to become "normal" again on the next level up
i actually dont know + would like to know this too
Is there a way to save info on a card? For example, if I wanted to have the string "This is card 1" saved on a card for future reference, how would I go about doing so?
store it in card.ability
Thanks!
Where might I go to find a list of contexts as in context.cardarea, or other useful lists like that
i assume?
(that wiki page is a bit out of date though, and won't be updated at least until the next SMODS release. it has a good number of contexts still, it's just not a complete list)
Cool, thanks! I'll look through that
How would one have multiple of these boxes when hovering over a card?:
Description ?
smods support multiboxes now iirc
No, I mean the whole thing.
oh like, multiple of the entire area including the badges and stuff?
Yes.
gotcha, sorry i havent a clue there then
No idea
infoqueue
not exactly what you want maybe
but you might be able to hack it to look similar with infoqueue
i know that you can change a lot of stuff with the ui i just havent dug into it that much yet
wait nvm youre something idk why im giving you beginner advice lmfao
fwiw, I think that would look awful
no. download from the Releases tab if you want a stable experience, that's the "latest version"
I mean I was in 808b
wait like a day
thoughts? I think its too strong but I dont know how to nerf it without destroying the theme
Also any tips to make the description shorter but still get the message across would be appreciated :)
(im trying to balance around vanilla)
and its good but I was just wondering if 824e is ok
as N said, just wait a bit because a new stable release is bound to happen very soon
ok nice
Js could never
why am i catching strays
how can I rotate a joker card
animal control
hey u played that game
okay im probably stupid
is there a better way to check if somethings a consumable other than to do context.card.key:sub(1, 1) == 'c'?
card.ability.consumeable
i see
I don’t think you can
Maybe you can with drawstep
you can
me tapping my joker cards for resources
i was searching for it
if I wanted to spin a joker I'd just use an event to rotate it 1 degree at a time
🤔
it took me a while to get it to work because the game updates the rotation
is align run every frame
okay
maybe not
would it be a bad idea to run it every frame
if it doesn't then yes probably
you can probably modify the rotation in update too
if you want it to constantly rotate
I think it runs every frame
i wanna put it in a conditional event that only activates after a condition is met
I want the joker to start spinning for 45 seconds after this condition is met
which means I also have to figure out timer mechanics
that's easy just save the initial G.TIMERS.REAL and then check after it increased by 45
why
to fucks with the UI
I can't say fuck singular followed by with or up
but I can say fucks with???
lol
yeah he subtracts time from the timer every few seconds and it just like
makes the UI go crazy
he's really strong if you can put up with every button breaking randomly and not being able to see any of your cards
Sounds like something jevil would do
just check what love function G.TIMERS.REAL uses to update the time
and use that directly
what do you do when my system time is set to 2x
instant loss
hater
I don't know what the fuck a 2x system time is
every second takes half a second
so... you get the benefits of the joker for half as long?
I mean... congratulations?
yes
why do you do math.pi / 2
well he certainly got rotated once
but he is not spinning
this is really funny though so jibnor can keep it
try using draw to rotate
how do you do that
The way I tend to do it is using soul sprites
But you might not need to
The idea would be similar
i wanna rotate the base card
actually
rotating the soul sprite would work
but I'd rather rotate the entire card
You can rotate a soul sprite and it would look the same as the base sprite
As long as you apply Edition shaders to the soul sprite
Take a look at Paranoia from my mod
It has custom sprite animation
ii mean I guess but that feels a little complicated
i've done soul_pos animation before
why does the SMODS poll_edition override check if the edition exists in P_CENTERS? shouldnt anything that comes out of get_current_pool always exist in P_CENTERS since all keys in P_CENTER_POOLS should always exist in P_CENTERS
I also have Heartbreak in a branch with even more custom animation
the thing I don't get is how you'd apply the edition shader
Ok, so I have a partially working version for Heartbreak
I had a suggestion for how to make it work 100%
Partially working because it doesn't necessarily copy modded shaders perfectly
what if i just
But it work with vanilla shaders and many modded shaders
Also you probably don't need the soul sprite
I think just the default sprite should work
I just haven't done that myself
But in principle it's very similar
because Jokers can have custom draw functions IIRC
oh my god
when you hold click on jibnor
he spins really really fast
how do I make him always do that
click him
I don't know whats being discussed but i've made a joker with 3 layers all animate.
Do the layers have Editions
fake clicks on him
Idk why that's happening
I can't read your code
function CardArea:align_cards()
cardarea_align_cards_ref(self)
if self.config.type == 'joker' then
for k, card in ipairs(self.cards) do
if card and card.config and card.config.center and card.config.center.key == "j_insj_jibnor" then
card.T.r = card.T.r + 1
end
end
end
end
it's just this
jibnor isn't the joker I want to rotate but he is a good placeholder
I've never touched this
i forgot the ref line above oops
No but i do have another joker which base is animated and soul has a shader
Edition shaders?
Because I did make Edition shaders work, I just don't think all modded Editions would work
isnt the parameter for if a shader should be drawn on the soul sprite tied to the edition rather than the card with the soul sprite?
or am i misremembering
I don't know
I don't remember anything like that existing
oh nvm i found it
AFAIK Editions just don't apply to extra sprites in general
editions have an apply_to_float parameter
In any case, I'm using extra sprites
just to be sure.
rarity weight goes from 0 to 1 and enhancement weight goesfrom 1 to 100?
So I'm not sure they'd apply to arbitrary sprites
I think weights can be any nonnegative number
im just making sure because smods says enhancements have default 5 and i recall rarities being 0 to 1
rarities can be any value too
weight doesn't go from x to y necessarily
its just that vanilla weights happen to be less than 1
all the weights are added together and then a random number is picked from them
so its generally better to do the same for your own rarities
something like that
besides it not applying to arbitrary sprites, looking at the code it seems to not function properly
^ weight just means a (this object's specific weight) in (sum of all weights in the pool) chance i think
oh lmao
And it doesn't work in the same way that my code doesn't work
you can provide your own table of editions to poll from
@wintry solar the code in the left is "wrong" right?
this part of the code only runs if you dont give any options though
it's giving me this crash every time I try to callCardArea:align_cards()
so I assume calling it during update is not going to work
how else do I spin it
draw
update might work too but draw is how I'd do it
or well soul_sprite = {draw = …}
It doesn't apply an Edition's draw function to a soul sprite even if it has the value that applies the Edition to the soul sprite
oh there is a possibility that get current pool will return an "UNAVAILABLE" string
ah i see
So it's not applying the Edition to the soul sprite
i didnt read the rest of the conversation but the rotation is in radians so pi/2 is 90°
I see
it does apply the edition to the soul sprite
it just doesnt use any custom draw functions that are completely pointless to use now we have draw steps
Not if the Edition has a custom draw though
I still think custom draw functions are better than DrawSteps for single-case uses
But anyways
so how do I make it always rotate victin i'm going to rotate you if you just say draw again
I mean, you asked, I gave a suggestion and code reference
Yes I know you think that, you are the only person I have seen who continually says to use draw functions
well yeah but i'm too lazy to go figure out not only which mod is yours but also search for code for the joker and code which does it
The one in my bio
and I named the Jokers and where the code is
Anyways, Editions can have custom draw, so it still seems like an incomplete feature
Unless you want to deprecate draw
if I was going to change it that would be what I did
there is no need for draw to exist
it's more limited than drawstep
I think it's more computation efficient for single-cases
it's maybe useful on editions for passing in extra values
I was thinking of arbitrary non-shader behavior that you'd want to define in the Edition object rather than somewhere unrelated
but you can hook or patch draw_shader to do that too
What do you mean by this
you can pass extra stuff into your shader to use if you need it
Doesn't the Shader object handle that?
I dunno, probably
I am not an endless supply of balatro modding knowledge
I don't know all the answers to your super niche questions about things that very very few people have ever used or ever shown interest in using
I mean, you were the one to bring up the niche use
how would i get an enhancement in the info_queue of a back?
I feel like using Shaders to handle extra variables is the general use case since it's the one on the wiki
Using a custom draw method is niche, and it's the one you came up with
doesn't the usual method work?
tried the usual, apparently not
T: or info_queues doesn't work?
oh let me try T
i dont think back work with info_queue
t should work one of the vanilla ones uses polychrome iirc
you gotta use T: because all the tooltips are hover tooltips
@wintry solar since Idk if they saw it
after a playing card has been created, does it keep the set that was given to create_card (Base/Enhanced/Playing Card) or does it always become a single set
the set is Default or Enhanced iirc
I had PR'ed a custom SMODS function to test if a card was a playing card or not, but I think it was only used in a specific place
Is there any rule for defining the win ante for challenges?
challenger deep has one, but you could make one yourself
G.GAME.win_ante
challenge apply will exist in the next SMODS release so that would make it much easier
just change G.GAME.win_ante in the apply
Yeah I know that variable exists, I was asking about a rule as apply didn't exist for challenges
but it will hahaha
it will in like a day
hell yeah
smods release tomorrow
that's good news
i mean it's not my decision but afaik it's pretty much done
so when eremel finishes the doc
let me merge a last minute breaking change with no notes about it hold on
okay 💖 yay 💖
honestly too much
oops
Oh man learning curve again
"bugfix" (1000 files changed)
you could use this patch:
[patches.pattern]
target = 'game.lua'
pattern = "elseif v.id == 'no_reward_specific' then"
position = 'before'
match_indent = true
payload = """elseif v.id == 'win_ante' then
self.GAME.win_ante = v.value"""```
and then put the following line into your challenge:
`{id = 'win_ante', value =`(the win ante you want)`}`
this one fixes a bug that I don't think anyone would ever have run into
I mean if tomorrow / in a few days challenges will have apply I think I can wait
better than patching
fair enough lol
rules are still pretty helpful for multiple challenges
But oh man will apply help
you can also have local functions for multiple challenges
So there isn't any preview for the new version? I'm really curious
i mean
the main branch
it's open source, you can - there's a button for this, hang on
the green Code button
this one, actually
Yeah I was looking the commits
you can see everything that's changed since the release
💀💀
holy shit
is quantum rank api in yet
no
I wonder how many are breaking changes
all of them
number 74 is the worst one
context_stack?
but 74 is my favorite number
I wonder how many changes i made for my mods update? How do i check that?
i need to look at context_stack i might be able to use it for things
is 74 actually context stack
i think it just makes the context global
I found it
yeah
"Cards held in hand give -(ante^2) Chips"
argeN'tina
hahahaha
argentinian yeah
Oh
cool
I'm spanish too, I struggle a little speaking english hahaha
Well spanish not argentinian
🫡
i dont play balatro in spanish haha i looked at the localization differences for joyousspring and it seems very inconsistent lmao
some translations are weird as well
I just translate everything with IA tbh, don't have the patience neither the time to do it myself
Is there an SMODS.poll_edition? Like SMODS.poll_seal?
No, it's poll_edition
Does it take the same arguments?
oh that's another thing I should add at some point
is this not how perma bonuses work?
local recieving_card = pseudorandom_element(G.playing_cards, "faceless")
recieving_card.ability.perma_bonus = (recieving_card.ability.perma_bonus or 0) + math.ceil(chips_to_add/2)```
that looks correct
It doesn't seem like it's working though
this is the full calculate function: lua calculate = function (self, card, context) if context.setting_blind then local chips_to_add = 0 local cards_to_destroy = {} local count = pseudorandom("faceless", 1, math.min(card.ability.extra.max_destroy, #G.playing_cards)) for i = 1, count, 1 do cards_to_destroy[i] = pseudorandom_element(G.playing_cards, "faceless") end for _, v in ipairs(cards_to_destroy) do chips_to_add = chips_to_add + v:get_chip_bonus() end print(chips_to_add) SMODS.destroy_cards(cards_to_destroy) local recieving_card = pseudorandom_element(G.playing_cards, "faceless") recieving_card.ability.perma_bonus = (recieving_card.ability.perma_bonus or 0) + math.ceil(chips_to_add/2) end end }
could it be choosing a card thats already been destroyed?
Okay, it worked that time, weird
It seems to work sometimes. Would putting it in an even solve this?
How do wildcards work? I'm guessing something in card:get_id, but I can't find the code for that.
is_suit
My bad, I want essentially wildcards, but instead for rank.
not really possible yet
Okay
Do you see any problems, or why it might be unreliable?
maybe it is reliable? I have no idea why it wasn't working earlier.
does anyone know why this is happening when big blind is removed? this is my attempted patch:
[patches.pattern]
target = "functions/button_callbacks.lua"
pattern = "G.GAME.round_resets.blind_states[skip_to] = 'Select'"
position = "at"
payload = '''
for _, i in pairs(G.GAME.round_resets.blind_states) do
if i == "Upcoming" then
G.GAME.round_resets.blind_states[_] = 'Select'
G.GAME.blind_on_deck = _
break
end
end
'''
match_indent = true
overwrite = true```
it works if I leave and rejoin but does anyone know how to update it?
_ is the key i is the value of the list
yes
I think theres more code you have to add to update it
UI usually doesn't update automatically
OH SHOOT
THERE WAS ONE LINE OF CODE I FORGOT TO DELETE
code to delete the evil line of code
[patches.pattern]
target = "functions/button_callbacks.lua"
pattern = "G.GAME.blind_on_deck = skip_to"
position = "at"
payload = '''
'''
match_indent = true
overwrite = true```
lol
🔥
good enough
wait is there a different parameter for SMODS.Sticker that defines the sticker badge text or am i crazy
-# it reads ERROR currently
-# for reference as well,
SMODS.Sticker {
key = "temporary",
atlas = 'nixstickers',
badge_colour = HEX('00911d'),
loc_txt = {
name = "Temporary Sticker",
text = {
"Destroyed at the end",
"of the {C:attention}Ante{}"
}
},
pos = { x = 0, y = 0 },
should_apply = function(self, card, center, area, bypass_roll)
return G.GAME.modifiers.enable_temporary_in_shop
end,
apply = function(self, card, val)
card.ability[self.key] = val
end,
calculate = function(self, card, context)
if context.end_of_round and G.GAME.blind.boss and context.main_eval then
card:start_dissolve()
end
end
}
what does the "identifier" mean (i'm changing my mod's rng code to the new one)
look at the function in the smods code
it's an identifier :3 it's so other objects know so they can modify your specific effect
you can omit it and it will use the seed
thanks N'
i needed that information mostly because a joker of my mod that feeds from X in Y chances didnt work with my mod's X in Y chances
should it look like this?
or am i dumb
like extremely dumb
yuh i think i'm dumb
ok i think this is better
numerator should be just 1.
oops all six
the function accounts for oops all six now
Yeah, that function also handles the change of odds.
really? i didnt know
so this?
yeh.
ok, changing all of my rng code for that now
If you'd want it to start as 2 in 5 or something, then you'd have 2 for numerator.
yep
you should always give pseudorandom_probability the base odds of the probability thing you want, and it will handle any and all probability modifiers like oops all 6s or any modded content that messes with it
ok!
in current release?
because in current release, i specify a localization key of a custom message and it does the vanilla message
same way vanillaremade does mr bones, saved = "my localization key" in the return table
and in my localization file's return table, i specify misc.dictionary.<my localization key> = 'my message'
that should work
well, it doesn't
weird
if it was reading the key it would say ERROR at least so it's just not reading it
based off the one from clash royale (second elixir added for consistency)
what's happening here? is this just an oversight? is this present in dev build?
i tested it for that message PR and it worked fine
Oh my god it's the legendary elixer card
wish it was the infamous mega knight
...what?
ok, i just have no idea how to structure this, then
my mod id/prefix?
wait is it en_us
yes
Noted
key = 'casl_sleeve_atlas',
px = 73,
py = 95,
path = 'helluvasleeves.png',
prefix_config = {key = false}, -- See end of file for notes
}
Trimmed code. I'm trying to replace the vanilla card sleeves with my mod but they don't appear to want to change.
it's a default
can i set mult to the power of something in joker function?
Yes.
could you please show me?
how the fuck do i get a sound effect to not become higher pitched the more retriggers it gets
return {
mult = (mult^number)-mult
}
```?
thanks im a beginner i will have to learn much
You would do: ```lua
local oldpercent = percent
percent = 1
-- play_sound
percent = oldpercent
do i put that in config extra or
in loc_vars
You put it where you're playing the sound.
in the calculate function?
@daring fern
If you're using a return I think you would have to hook card_eval_status_text
anything but hooking...
oh god
i mean you can just use an event
wheres the docs for that
Actually I think you can just put pitch = 1 in the return.
tried that, didnt work
and i replaced it with play_sound
and now it only plays once
help
it doesnt work the way i want to
and i cant find a dev to develop this for me
i have a problem so if i use SMODS.Sound:create_stop_sound and in the times field enter 1 it doesnt stop the sound once but completely disables it from playing later
how the hell do i decipher steamodded versions
what the hell is 1.0.0~beta-XXXa-STEAMODDED
month and day
Turns out the deciphering wasn’t that hard after all
and what does the letter at the end of the numbers do
what is "a"
if there are multiple version bumps in that day there's a new letter
826c would be the third revision made today for example
look at the bright side it isnt as fucked up as minecraft bedrock version numbers
Bugrock
How can i get text to add a line to the UI box? So if i have a joker that needs to add additional lines vertically to it's localization text box how can i do that?
I tried to make an edition of it but idk shader programming enough to change card shapes
main_end?
Can i use that in an info quene?
Well that solves half my problem then, i did need to do that on a joker and in an info quene box from a cards ability
i realized i posted this in the wrong channel lmao
Wait is it really
I thought it was the commit/pr counter because it incremented by 1
Also cool pfp
ty
Damn why make particles work on pause so hard what a heck
is there an easy way to make all rerolls free
debug purposes
ok nvm im stupid
this should do
hey can pls someone help me with this error
Is my github bugged or there isn't a new smods release in github yet?
there isnt
But the release is out right?
no
Oh, the mod manager said there was an update
shouldn't the mod manager target the last release?
not exclusively, it also tracks dev versions

What I'm wasting my time on 
its peam
What is that mod
I need it
is that just every consumable there
wtf is going on.
Yes.
awesome
is it normal for ur joker to show up again in the shorp if youve spawned it in using the debug menu? this doesnt feel normal
Yes.
i'm scared
ty ty
Why does Ortalab crash every time I hover over something??? using the same modpack I used months ago, it worked just fine then now its not working
this is for mod development
(Deleted own message, will re-send later afternoon)
Guys, how do you apply a custom gradient to a joker’s rarity badge?
This cat tells me that my gradients.lua fucking sucks
SMODS.Gradient{
key = "grand",
colours = {
G.C.SPECTRAL,
G.C.PURPLE,
G.C.TAROT,
G.C.RED,
G.C.FILTER,
G.C.GOLD,
G.C.GREEN,
G.C.PLANET,
G.C.CHIPS
},
cycle = 2,
interpolation = 'trig',
}
is there a way to change the max highlighted cards of a tarot ?
do i write it like this?
SMODS.Rarity {
key = "Grandiose",
loc_txt = {
name = "Grandiose",
},
default_weight = 0,
pools = { ["Grandiose"] = true },
badge_colour = SMODS.Gradients["busterb_grand"],
get_weight = function(self, weight, object_type)
return weight
end,
}
Yes.
It's G.C.SECONDARY_SET.Tarot and G.C.SECONDARY_SET.Planet and G.C.SECONDARY_SET.Spectral
i am making a mod for mobile and steamodded hasn't fully been ported to mobile yet
#📜・modding-rules rule 4
ok so, 900n1 gave me screenshots of his code, he told me i can steal them.
this is what i made.
-- Thanks 900n1.
function align_layer(card, layer)
v = card.children[layer]
if v ~= nil then
v.states.hover = card.states.hover
v.states.click = card.states.click
v.states.drag = card.states.drag
v.states.collide.can = false
v:set_role({major = card, role_type = 'Glued', draw_major = card})
end
end
local set_spritesref = Card.set_sprites
function Card: set_sprites (_center,_front)
set_spritesref (self,_center, _front)
if _center and _center.soul_pos and _center.soul_pos.inbetweener then
self.children.center = Sprite(
self.T.x,
self.T.y,
self.T.W,
self.T.h,
G.ASSET_ATLAS[_center.atlas or _center.set],
_center.pos
)
self.children.floating_sprite = Sprite(
self.T.x,
self.T.y,
self.T.W,
self.T.h,
G.ASSET_ATLAS[_center.atlas or _center.set],
_center.soul_pos
)
self.children.float2 = Sprite(
self.T.x,
self.T.y,
self.T.w,
self.T.h,
G.ASSET_ATLAS[_center.atlas or _center.set],
_center.soul_pos.inbetweener
)
align_layer(self,"center")
align_layer(self,"floating_sprite")
align_layer(self,"float2")
end
end
trying to add a sticker to a Joker created with SMODS.add_card and I can't seem to get it to work
the issue here is stickers = {'chak_ethereal'}, does not apply any stickers
stickers needs to be a table otherwise it crashes attempting to load
If i want an enhancement to only trigger h_chips when a specific poker hand is played, how would one do that?
this does work if i write 'eternal' btw
your key might be wrong
i've used the key 'chak_ethereal' in other places to apply the sticker and it works fine
maybe because it has a prefix?
prefix is only for things you add
i'm aware
also update
if i enter in an incorrect key, such as 'ethereal' as opposed to 'chak_ethereal', the game just crashes
so the key is correct it's just not applying
oh wait it says ethereal not eternal
yes
i may have reading problems
that's okay 
i could just iterate through the added jokers and do card:add_sticker('chak_ethereal', true) because that works, i'd just rather it all be done through the add_card function
this is what SMODS.create_card (called by add_card) is doing
adding this made it function
my only guess is that ethereal has a should_apply condition of G.GAME.modifiers.enable_etheral_in_shop being true (which it is true) and it doesn't know what to do?
hii could someone help me with this?
config = {
extra = {
mult = 0,
a_mult = 3,
}
}
}, false)```
i just wanna change [joke master from paperback](https://github.com/Balatro-Paperback/paperback/blob/c44d4607bb6679c2f2747c7669317caef81e46d4/content/joker/joke_master.lua#L3) to have 3 mult instead of 2 and i want the display badge to be from my mod :) it seems to be doing nothing and throwing no errors, but it's gotta be loading because of ``assert(SMODS.load_file("compat/paperback/joke_master.lua"))()`` in my main file
Are your load priorities set properly? I would imagine you’d need Paperback to load before your mod to take ownership of it
my priority is -100, paperback's is 0
set your priority to 2
oh! did i get it backwards lol
i think you dont need the j_
Yeah, the lower the number the earlier it will load
omg it worked :)))) tysm i've been bugging over this for like an hour
can i ask how i'd completely replace the paperback name badge instead of it tacking on my own?
Probably tack on a set_card_type_badge function
hi! i want my deck to have a specific set of cards in it. what do i need in apply?
How to localize planets cards?
use this as reference
just look up the remade planet cards
ctrl + f
i need a tiny bit more help if you don't mind lol
table.remove(badges, 1);
end,```
this removes the rarity badge, but if i put in 2 to the paperback badge it doesn't work nor 3 to remove my own mod's badge. smthn i might be doing wrong?
Hmm, that’s quite odd honestly
I mean what i need to use as 2nd arg in "localize"?
im still stuck with this problem
localize { type = "name_text", set = "Planet", key = key }
so my prefix is yumc
my challenge key is yummy_1
but for some reason in the localization when i put in ```lua
return {
descriptions = {
misc = {
challenge_names = {
c_yumc_yummy_1 = "Delicious",
}
}
}
}
it no worky :(
it makes "nil"
key needs to be replaced by the actual key
oh
tryna make a joker that gives $ based on the rarity of destroyed jokers and this does not trigger, what am i doing wrong?
c_ is the prefix for consumables, no?
WRONG CHAT
What is a key?
FUCK
what your planet card's id in code is basically
"c_pluto" for example
like this
c_[your_planet]
then use the key for your random card
it should be in card.config.center_key
I will fix this later
thanks you eremel
still need help w/ this btw
destroyed jokers use context.joker_type_destroyed
i see
wasn't on the calculate functions wiki page so i didnt know about that
and would that use removed_card or other_card
in what context do steel cards activate?
also while you're at it, it looks like allow_duplicates = false doesn't work (the 5th joker was created after i already had the 1st joker and they are duplicates of one another)
and what is type?
Setting it to false doesn’t do anything, it’s a flag to bypass the normal duplicate protection
i see
well in this example thingy it's not
also what is the prefix for challenges?
how would i get the destroyed joker's rarity?
context.card.config.center.rarity
yea looks like it also uses the c_ prefix
are you sure that the key is the problem and not something else? what does your localization look like?
thats the whole localization
Is there a way to load an atlas outside of the 1x or 2x folders in assets?
why
misc is not part of descriptions
OHHH thanks
youre welcome
how would i track the total amount of destroyed jokers this run in a game variable
i wouldn't have to patch misc_functions.lua would i
i would hook SMODS.calculate_effect or wait a day for the new mod calculate
<@&1133519078540185692>
Waiting a day is the much better option
🥀
Can I make it so a joker automatically gets removed from the joker area when a specific one is sold/destroyed etc?
how can i make a card display a message outside of the return table?
SMODS.calculate_effect({message = "text"}, card)
is there any full list of valid return values? (as in return values that automatically do something) the calculate functions page has a lot but a lot of returns can use multiple names
i dont think theres a documented one
this is missing stuff like all the message returns
bump
is there a way to make rare jokers just not try to spawn in a challenge? bcs i banned all of them and now jimboes just appear
im not sure, though the path you put is a relative path and the same path is used for 1x and 2x. you could use .. to go up folders i guess, but then you would always end up with 1x and 2x using the same image, making either the 1x or the 2x sprites not work properly
there's a new function you can use in the next smods release i would recommend waiting for that a day or two
oh wait i didnt read that the problem was the jimbos
use G.GAME.rare_mod = 0
Apologies for the nebulous question. Ideally, what I want is to load an image as an atlas without it having to be in the assets folder, or at the very least in a separate folder in the assets folder
i dont think thats possible
i did ask why
thanks!
at least not without having 1x and 2x using the same image which would look wierd
I'm fine with having 1x and 2x versions
oh wait but where do i put that
Apologies, I thought you were talking to the other guy earlier as they responded. I want to do texture swapping. I know maverick exists, but the issue is that my mod has animated textures, which takes the form of a separate atlas for that item. I want to have a separate folder so it is clear which items belong to which set.
ok now you will need to wait for the next smods release that adds apply to challenges haha
oh so as of now its not possible?
you can have folders in 1x and 2x
it is but you need to hook or patch a start run function
that sounds scary, i'll just wait lmao
challenges are much easier after next release
I didn't realize that. Thanks for the help!
why does the vanillaremade post_trigger example copy context.other_ret.jokers rather than just context.other_ret? i thought context.other_ret itself was supposed to be the copy of the return table rather than it being stored within another table
Hello, is there a way to make a deck that removes all playing cards and instead gives a specific card instead?
use apply to loop through the entire deck to destroy everything, then create the card you want in the deck
i thought so too, it's not
How do I do just that?
Remove and then add cards
SMODS.destroy_cards and SMODS.add_card
i think you wouldnt even need a loop actually you could probably just do SMODS.destroy_cards(G.deck.cards)
ah
although the animations might be annoying
yeah
i have a bit of a specific issue
i want my ethereal sticker (which destroys its card upon entering the shop) to look to see if there's a joker with the key 'j_chak_etheric_joker', and if there is, destroy it instead
right now my code works, but if you have multiple ethereal jokers they would only destroy the one etheric joker instead, instead of two etheric jokers or one etheric and itself.
here's the applicable code:
calculate = function(self, card, context)
if G.GAME.modifiers.omicron == true and not (card.edition and card.edition.negative) then
card:set_edition({negative = true})
card.cost = 1
card.sell_cost = 0
end
if context.starting_shop and not context.repetition and context.individual then
for i = 1, #G.jokers.cards do
if G.jokers.cards[i].config.center.key == 'j_chak_etheric_joker' then
card = G.jokers.cards[i]
end
end
SMODS.destroy_cards(card)
return {
message = 'Boo!',
colour = G.C.CHAK_ETHEREAL
}
end
end
check for not G.jokers.cards[i].getting_sliced
How do I check if I'm a Playing Card in the Deck-View for loc_vars-purposes?
that worked thank you
also minor nit pick but any way i could make it go from left to right as opposed to right to left
then that yeah
almost works. it just creates the cards in the hand even before selecting a blind, so you get funny floating cards.
did you put the area to be the deck
G.playing_cards
that's not an area
G.deck
A
Why I'm asking:
I have an Edition that needs a Different Text for Playing-Cards:
loc_vars = function(self, info_queue, card)
if card.playing_card then
return { key = 'e_shiny_playing_card' }
else
return { key = 'e_shiny' }
end
end
This works fine for Playing Cards in Hand,
but
it doesn't work for Playing Cards in the Deck-View :(
oh
that's easy then just check for card.ability.set == "Default" or card.ability.set == "Enhanced"
xy problem situation lol
a scaling joker example is given in the SMODS documentation for calculate functions https://github.com/Steamodded/smods/wiki/Calculate-Functions
thx
-# Yep, that worked! Thank youu~ 
i cant find it
i see one that inscreases the mult so i trried that but replaced + with * but that didnt work
as in the joker's current mult?
or just mult in general
the mult in general
just put xmult = <whatever value> in your return table
heya, how can i check if i left the booster pack?
or a way to make an effect only work in the booster pack
How do i add a main end to the end of another text box (like with multiple text boxes how can i add it to the 2nd?)
i think you can check if G.STATE == G.STATES.SMODS_BOOSTER_OPENED for that
at least i'd imagine
self.children.sand_overlay:set_role({ major = self, role_type = 'Minor', draw_major = self })
i have a small suspicion i fumbled the set_role
an example i found uses role_typeGluedbut that also doesnt work either
am i just idior again
apply = function(self)
G.FUNCS.skip_blind = function(e)
if G.GAME and G.GAME.blind then
return G.FUNCS.select_blind(e)
end
return nil
end
end
I'm trying to hook the skip button into the select button so you go into a blind even if you skip but I don't really know how to properly achieve that. Right now it just sends me into an ERROR blind and then I crash, so I'll assume when a blind is skipped its table is wiped. Does anyone know how this is achievable?
I don't exactly know how to do that but don't hook in apply
that will change the function for everything until the game is closed
@red flower how does one manipulate the number of options offered by a booster pack again
don't you specify it in config?
config = { extra = 3, choose = 1 },
In a Joker
ooohh
I think I found it
the latter
yeah
Although I wonder if the timing works for what I want to do
which is to modify just a single Booster type
if it's just for one can't you modify card.ability.extra
what do you mean
modify the card.ability.extra of the booster
@red flower in the shop?
or I guess whenever it's created?
also I said one type not one Booster
specifically, Celestial Packs
ohh then idk what the best way to affect a specific type is
maybe hooking set_ability
yeah
yeah you could check that
I'm trying to see if I can do it when the Booster is opened
Although I suspect it might be too late
hmmm, not sure
It puts the Booster stuff in an Event, while SMODS.calculate_context isn't inside one, so maybe it's fast enough?
Does sendDebugMessage not work?
it's been working for me
check your debug plus config, iirc it doesn't display debug messages by default
I realized it was just not running my code
Does anyone know where kind is stored in a Booster Pack?
I can tprint to verify that it's there, but ….ability.kind and ….config.kind didn't work
wait I think it's in ….config.center.kind
Kind isn’t a required parameter iirc
That is true.
But I suppose if you’re looking for a specific one that you know exists it’s fine
@red flower @slim ferry my method works
peak
By the way, it seems like SMODS detects the kind of Booster Pack by parsing the name
I mean, vanilla Booster Packs
how do i make a consumable only available to a specific deck (within shops)
use in_pool
Hi I need the help of someone smarter than me. I'm working on a mod that replaces the enhancers image with my own one but for some reason the code is resulting in the modicon for the mod instead showing up on a different mod (specifically the Bad Apple Joker).
local lpb_mod = SMODS.findModByID("LuigisPictureBalatro")
local sprite_enhancers = SMODS.Sprite:new("centers", lpb_mod.path, "EnhancersLuigi.png", 71, 95, "asset_atli")
sprite_enhancers:register()
end```
I'd use Malverk but I couldn't figure out how to replace the white backs of cards and Malverk doesn't replace the locked card images.
to replace the white backs with malverk i'd imagine you make an alt texture for c_base
also how the fuck did you manage to get your modicon to show for a different mod 😭
The texture is in the spot. It's something about another bit of code that they mentioned. But it doesn't matter since Malverk doesn't currently support replacing the locked images.
That's what I'm trying to figure out xDD
I think it might be related to Bad Apple's mod being very sparse.
--- MOD_NAME: Bad Apple
--- MOD_ID: BadApple
--- MOD_AUTHOR: []
--- MOD_DESCRIPTION:
----------------------------------------------
------------MOD CODE -------------------------
function SMODS.INIT.BadApple()
jokers = {
j_sock_and_buskin = { pos = 0 },
}
SMODS.Atlas {
key = "BadApple",
path = "BadApple.png",
px = 71,
py = 95
}
for jkr,data in pairs(jokers) do
SMODS["Joker"]:take_ownership(jkr, { atlas = "BadApple",
pos = { x = 0 + data.pos, y = 0 },
soul_pos = { x = 0 + data.pos, y = 1 }}, true)
end
end
----------------------------------------------
------------MOD CODE END----------------------```
You do
I'm pretty new to lua and everything so I'm probably wrong but my only thoughts are it's because they didn't include a prefix?
SMODS.INIT is unc
You never sent the code example ;3;
You are correct
What does this mean?
uncle
the thing you say
Um
It's how zoomers and Latin Americans call old people
unc
I mean, if Malverk can't replace lock images I don't know if I have any other option.
Replacing lock images is remarkably niche, especially for modded content
Is it? I feel like most mods that replace textures would want to replace all the textures.
Especially since it's a part of the enhancers image as well.
Wait now the lock image isn't being replaced wtf
Never mind it is I'm stupid and was looking at the sleeves image.
It's nice having consistency for the card backs if you're going for a specifically style for the locks to also match. @wintry solar
And yes I still haven't won a game but I'm getting damn close xD
Yeah but I would imagine the set of people who want to install mods and either havent unlocked everything or pressed unlock all is remarkably small
I'd argue against that. Some people prefer going modded right from the start. Hell the same day I got the game I started downloading and producing mods for it xD.
Not to mention locks would still show up for people deciding to reset their game.
because thats how vanilla does it in the source code iirc
It's just jank for modded content
Are modded ConsumeableTypes still bugged
Yeah that’s fine but I’m not going out of my way to add that functionality at the moment
because they used to be
stacking across different mods
you mean types with the same key?
Would it not be as simple as enabling that slot on the enhancers image to be a part of the backs set?
Or would there need to be more done to the code?
It is not that simple because it’s not a game object
It would require specific code for all 3 locked sprites
And I can’t be bothered doing that right now
Me who can't figure out how to add a c_base wondering if I can figure out how to do it
xD
✋
-# Can I has question on quantum enhancement optimization potential?
remove quantum enhancements
never. no questions allowed ever, under any circumstances.
||(joke, obvs)||
like Victin said, don't use SMODS.INIT
noo dont i just figured out how to use them for my sand cards without literally everything else exploding
hiii lars
im doing very good ty wbu
Is there a method that allows for the card locked images to also be replaced not using init?
I'm doin alright, been very busy lately
wait, does it not work without init??
I'm trying, the problem is that it belongs to a specific consumable type. If i try to set in_pool to return false on every single one it will just throw out the default in all decks because it has an assigned shop_rate. Without shop_rate the specific card that I want won't even show up within the deck so i'm kinda lost.
If I use Malverk that doesn't support locked images currently.
set shop_rate to 0 and just do the same thing as ghost deck
if its a whole consumable type
I'm asking if it currently works with init
It works yes the issue is it's causing the Bad Apple mod to inherit the modicon of mine xD
what's your question
SMODS.INIT is jank and depreciated
and it stops working without init??
it does stupid stuff like infect mod icons
ghost has spectral_rate in config so I can't really rely on that
you're just using old jank code instead of code that actually works
I'm using old jank code because I can't replace the lock images otherwise.
yes you can
whats your consumabletype key?
TaintedCards
how would i make a handtype that gets “unlocked” by a joker (i.e only is playable while you have that joker)
^
Yeah that's an inherent issue of using INIT and modicons iirc. I looked into this a couple months ago if you care at all https://github.com/Amvoled/Taikomochi/pull/3
if not find card then return {}
as the first line in the hand definition
As you said at #⚙・modding-general message , probably jank context check?
As I have a Joker that has
calculate = function(self, card, context)
if (context.retrigger_joker_check or context.retrigger_joker or context.blueprint) then return end
if context.check_enhancement and context.no_blueprint and context.other_card and context.cardarea == G.jokers then return { m_stone = true } end
end
and a deck that makes all playing cards share enhancements if there's at least one present:
calculate = function(self, card, context)
if (context.retrigger_joker_check or context.retrigger_joker or context.blueprint) then return end
if context.check_enhancement and context.other_card and context.no_blueprint then
local curenh = {}
if G.playing_cards and #G.playing_cards > 0 then
for i = 1, #G.playing_cards do
if G.playing_cards[i].ability.set == 'Enhanced' and G.playing_cards[i].config and not curenh[G.playing_cards[i].config.center_key] then curenh[G.playing_cards[i].config.center_key] = true end
end
end
return curenh
end
end
i believe you would check if you have the joker in the pokerhand calculation
rather than doing stuff in the joker

