#💻・modding-dev
1 messages · Page 550 of 1
not rn but im adding editions to jokerforge rn with just presets of vanilla shaders and i would prefer for them to actually be rendered instead of having still images of the shaders
yes that is the plan
this is a precursor
becuase i need a way to dynamically render shaders anyways
I think that was a plan from the start
i'm not a web dev but can you do normal shaders
yes
because of webgl
which is opengl for web
you can translate the shader
hmmmm
i will keep at it tho im sure i can think of something
good luck
i will re-try that translation approach but it is hard because love2d shaders are simplified opengl
it would be easier if i started with the complicated version and had to translate it to simple
okay next question
how do i hide full home from the run info menu when you dont have the joker, but reveal it as soon as you buy it, even before you play it?
i'm sure you can find a lib or something
what is the point of match_indent in a patch?
there is love.js but its a little old and not suitable because i would in theory just be running an entire game in browser just to get a shader to work on an image. and there are programs for converting opengl -> love but not the other way around
bunp
i will build something
visible = function(self)
return next(SMODS.find_card("key", true))
end
hello, im trying to make a fusion joker from the mod but im having a problem. im basically combine square joker and spare trousers but for some reason i cant get it to work, im close though; the mult part works but not the chips
if you return in context.before you can't return again
-# not calling it square trousers? smh
maybe but then i can do suddle spongebob referencs
if context.before then
local returns = {}
if #context.scoring_hand == 4 then
card.ability.extra.chips = card.ability.extra.chips + card.ability.extra.chip_gain
returns[#returns + 1] = {
--message = localize{type='variable',key='a_chips',vars={card.ability.extra.chips}},
message = "tee",
color = G.C.CHIPS,
card = card,
}
end
if next(context.poker_hands[card.ability.extra.poker_hand]) then
card.ability.extra.mult = card.ability.extra.mult + card.ability.extra.mult_gain
returns[#returns + 1] = {
--message = localize { type = 'variable', key = 'a_mult', vars = { card.ability.extra.mult } },
message = "woo",
color = G.C.RED,
card = card,
}
end
if next(returns) then
return SMODS.merge_effects(returns)
end
end
you can also use SMODS.calculate_effect
if i hook a function to do a calculate_context in it, can i check in the function if the context isnt already active? i dont want the possibility of the function getting called again during that context and creating an infinite loop
i think you can with the new context_stack thing but you can also set a global variable
like G.my_context_is_running
so would i check if the previous context wasnt the same one?
hm alright
what function are you hooking?
level_up_hand
and do you call it in a calculate function that uses your context?
I get a crash from this on the final bracket it says its an unexpected symbol
how do you debug yourself in a joker again
with DebugPlus, go to the Collection, hover over a Joker, hold CTRL, and press either 3 (spawn, needs space) or C (copy to area, does not need space)
you probably pasted it wrong
How do you make a function display ui? im trying to make an advanced config menu but I dont know how to display ui
return {n = G.UIT.ROOT, config = {r = 0.2, minw = 90, minh = 90, align = "tl", padding = 0.1, colour = HEX('FFFFFF')}, nodes = {}}
end```
hmm now that i read further it might be confusing
um
what the fuck 
oh never mind forgot to save the mod and put it there fixed
question: how do i make a planet's badgebox say something other than planet
for example, how eris pluto and ceres say Dwarf Planet, and Planet X says Planet?
For SMODS.pseudorandom_probability, isn't the no_mod parameter supposed to prevent things like oops all sixes and cryptid's rigged from working, or am I misunderstanding it? I ask because I set it to true and it doesn't seem to be doing that.
i just paste it after calculate right? i did that but but it still crashes because it doesnt expect the }
bunp
i got it to not crash and i get both tee and woo but the chips arent going up
oh it should be card.ability.extra.chips_gain
oh wait no
the opposite, the loc_vars should be chip_gain
dunno why it isnt going up
thats hardcoded in G.UIDEF.card_h_popup
if it's your own card then use the badge functions (read the docs)
it should work, can i see the code
cryptids rigged probably doesnt take it into account since it was done before no_mod but oops is probably just a bug
Funnily enough I've actually made some local patches to debugplus to massively increase the amount given by the dollar button and to do different functions for adding jokers and consumables b/c at least from a while ago DebugPlus didn't set the used_jokers key for emplaced jokers and missed a couple of adding card functions/contexts
For example I have a joker that quips when other jokers are added and debug plus didn't send the contexts for those. Dunno if that's since been updated
i did see someone wondering why the debug button was giving like 100000 for them
yeah
Keku just got annoyed at spamming it. Give me $250,000 USD
i just do money set in the console
now that it has a history and you can move the cursor its amazing
Okay, so I've tried updating my Steammodded and even reduced the constraints on my code to just have the joker trigger on context.post_trigger and it's not even running the print statements on it. Is anyone else having problems trying to make a joker trigger on this or is it just an issue on my system?
Here's a photo of my cat completely unrelated to anything
why the hell is card.pinned not inside card.ability 🥀
my sticker generator was failing me because i thought it would be in ability like all other stickers :clueless:
is there context for instead of scoring_hand just played_hand; is that a thing?
context.full_hand
and it works even with modded ones yippie :clueless:
Overpriced and rental? Greediest joker I've ever seen
wait this isnt modding chat
damnit
whatever i was making this guy work and "balanced" (that number goes up with each page 6 usage)
where are the docs? they aren't pinned...
local thunk
Wait really?
Oh that's why
I was gonna say
Because I did beat the knife's edge challenge and didn't see it
you cna even ctrl+direction to hop over words like every other text input
its in SMODS.Sticker.obj_buffer
so its a sticker in my eyes
Selection when
i meant in vanilla
yeah vanilla its something else
I wanna be able to use Ctrl-a, Ctrl-c and Ctrl-v
That'd be cool
wait no its literally in collections > others > sticker
right?
or does smods add that?
smods adds that afaik
ah the others tab actually doesnt exist in vanilla 💀
you can use ctrl+v in dbp
For SMODS.scale_card, do the values have to be in the same table? If not, how do you refrence it?
https://github.com/Steamodded/smods/discussions/919, ctrl+f "SMODS.scale_card"
Yes, I did, and I saw that it must contain ref_table. I was wondering if there was a way around it without a for loop, as a couple of my Jokers reference external values for their scaling.
Keep reading, it tells you about using scalar_table if its not in the same table
hm
is adding the thing where the mod name badge turns itself into credits its own library/something i'd need to implement myself?
or is that a part of smods now
Thanks. I was doing something with ease_dollars and wasn't sure how to refrence mod. Greatly apperciate the help!
hai hello bump :3
it's not adding the sticker at all
want to add art credit for my joker but idk how to,,
Ohh, ur right
well i say “my” but i really just took somebody else’s idea they posted on bsky a while back, actually implemented it, showed it off to them and they went “wowowwwww yayyayyyyy!!!!”
:add_sticker
with a colon
Been meaning to ask actually, how does : work in Lua?
. is used to access table values right?
Or something like that
card:is_suit() is the same as card.is_suit(card)
I guess a better question is, what is it?
syntax sugar for class methods basically
Ooo
Got it, ty
"table indexing and member access", always forget about this smh
I'm trying to add a boss blind, but I keep getting an error whenever I try to load it
(Ignore the name, tis silly)
your atlas is missing the animation type
Oh I didn't know I needed that
bump
how do I add credits
do you not have to register atlases anymore?
they used to be
key = "Cards",
path = "cards.png",
px = 71,
py = 95
}):register()```
nope
it changed a lot since last year for sure
3xcredits also exists
clearly
we've got libraries for balatro mods now
what have i missed
we dont really have many
😭
theres still no dependency manager
more than the whole none we had
is this part of smods or would i need to like. dep on it

its not
a mod manager that automatically downloads dependencies
should i harddep on creditslib or like,
or disables your mod if you dont have them all
how would i have a joker give +1 hand size for each Club held in hand, kinda like turning all clubs negative but not literally
either way works
smods does that
but that is not enough to get people to download them
yea
better than breaking everything
ah
am I being stupid dumb or dumb stupid
its so funny but so sad because i have to start a new run if the error happens consistently
pisses me off when the error is weird and isnt actually where an error is happening and is somewhere in smods or base game
best thing is when the error randomly appears and you dont even know what you did
try "eternal", true
i wish it just froze the game and an external window told you the error
then you can see the games state still
also the amount of times i forgot to copy the error
dont know if its still the same but there was no logs for anything
so i couldnt relook at the error if i closed the game
and pressing esc closed the whole thing for some reason
there are logs now
how do i show a tooltip for an enhancement in a joker description? {C:attention,T:m_rendom_asbestos}Asbestos{} isn't working
cool that worked
also
for i = 1, #G.jokers.highlighted do if G.jokers.highlighted[i]:has_sticker("eternal") then return false end
there is NO way this is correct LMFAO
ah right
i love how spaghetti balatro modding is
G.jokers.highlighted[i].ability.eternal
oh wait also i dont think im doing this right at all either
everything seems so different to how it used to be
its can_use
it shouldn't be used on jokers that already have the sticker
Idk what happened
there are also cool people (me) that made cool resources (mine)
https://github.com/nh6574/VanillaRemade/
Oh damn that doesn't display
this is awesome
i didnt piece together that it was you
thank you for your service
the example resources we had were quite bad back then
i resorted to looking into balatros actual source code for example code
most people did and wrote terrible code so i needed to make a good resource
maybe there was a return for juice i dont remember, but why
cant you just do card:juice_up()?
let me try
sucks to see that you still need to use one file to group everything so its recognised by the game when the mod loads
but it seems like smod has come a long way in the year ive been gone
i love juice up so much why is it called that
juicy
that's how programming works. everything has to come from somewhere, the framework has to pick a file to load first
"Game juice" is an actual term: https://en.wikipedia.org/wiki/Game_feel
Game feel, also called game juice, is the intangible, tactile sensation experienced when interacting with video games. The term was popularized by the book Game Feel: A Game Designer's Guide to Virtual Sensation written by Steve Swink. The term has no formal definition, but there are many defined ways to improve game feel. The different areas o...
hi oinite
you can absolutely split your stuff into different files
its such a spaghetti way to do it though
hi n
you just need a main entry point
yeah i know
how is that spaghetti
whens the wiki getting a new logo
you have to assert every file one by one
when i can get my shit together 😭
or there might be a different way thats shorter
literally nothing's stopping me from further inquring with whoever designed the idea for a wiki logo but i just dont feel like it
you can do a loop throught the folder
but i dont expect much more than a bajillion similar lines coming from steamodded
i just didnt do it
you do not have to assert every file one by one
you can also write a function that loops through a folder so you can call that function on multiple folders
whats the username of cirno again
you can just code up a loader for it
@cirnotv
9ballidiot
How could I add a loc_var tooltip to a card if it has a certain suit?
what colour should i use for "Eternal"
just attention?
i dont have anything in front of me that i can reference
bump
i made a custom colour through a lovely patch for when i reference it
[manifest]
version = "1.0.0"
dump_lua = true
priority = 0
[[patches]]
[patches.pattern]
target = "globals.lua"
pattern = "RENTAL = HEX('b18f43'),"
position = "after"
match_indent = true
payload = '''
-- CHAK START
CHAK_ETHEREAL = HEX('6059a0'),
CHAK_ETERNAL = HEX('9e4d6e'),
CHAK_PERISHABLE = HEX('4f5da1'),
CHAK_RENTAL = HEX('b18f43'),
-- CHAK END
'''
[[patches]]
[patches.pattern]
target = "functions/misc_functions.lua"
pattern = "G.ARGS.LOC_COLOURS = G.ARGS.LOC_COLOURS or {"
position = "after"
match_indent = true
payload = '''
-- CHAK START
chak_ethereal = G.C.CHAK_ETHEREAL,
chak_eternal = G.C.CHAK_ETERNAL,
chak_perishable = G.C.CHAK_PERISHABLE,
chak_rental = G.C.CHAK_RENTAL,
chak_edition = G.C.CHAK_EDITION,
chak_sticker_ethereal = G.C.CHAK_STICKER_ETHEREAL,
-- CHAK END
'''
i did this cuz im extra
yea ok thought so
lovely patching was lowkey so overwhelming for me when i used to mod
then just used chak_eternal
i made one patch and it made my brain melt
bruh
why are you doing lovely patches for colours T-T
cuz paperback did it and i copied lol
well not really
i did it back a long time, like half a year ago
someone said the method was lovely patch so lovely patch it is
tell that someone i hate them
wait what
cant you just implement a custom colour into whatever you're using it for
not an smods way you just never needed a patch
i know you can for badges at least
well i just wanted to use colour codes
i mean yeah you can but not if yuo wanted to use it like alot
like this
how could I add a loc_var tooltip to a card if it has a certain suit?
is it possible to create actual colours with names now
it always was
oh cool
amazing
i dunno what you're asking about but the vars table you're returning needs to just be numerator and denominator, not card.ability.extra.... otherwise you're not actually doing anything with the values you got from get_probability_vars
to be fair i never really used custom colours besides in badges
yeah
and i think a little bit of text
so like
vars = den, num
?
odds is den
in your case it should be
...
return {
vars = { card.ability.extra.mario, numerator, denominator }
}
base is num
O: it uses my nice call of the function instead of a hook
what counts as a joker trigger? I've been trying to debug and get this joker to even trigger post_trigger and I can't even seem to do that regardless of whether I use a vanilla joker or one of my modded jokers
do you have it enabled
it's optional
you need to put
SMODS.current_mod.optional_features = {
post_trigger = true
}
somewhere
js put it in your main.lua
oh, I never saw that in the documentation. Guess I must have missed it. Thanks
I made a mistake
1
hey guys would it be balanced to change this to 1 joker but raise the multiplier
how the fuck do you even do this
I set the px in the atlas to the entire length of the sprite animation, instead of the size of 1 chip
are there other optional features? or where can I read about it in the docs?
Perfect, thanks guys
how do i make it so every time you hover over this joker it has a different quote
put all the quotes in the localization misc -> dictionary, under the names k_ocstobal_oxy_quote1, k_ocstobal_oxy_quote2, etc. then in the joker's loc_vars, pick a random number from 1 to [however many quotes you have] and then return in the vars table localize('k_ocstobal_oxy_quote' .. tostring(the random number)). and finally, in the line where you want a quote, just put #1#
that's the best way to do it, so that you can localize to other languages. if you really don't care about that you can also just define a table of quotes in the loc_vars and return a random quote from the table directly
bunp
by changing it to one joker, especially if it targets a specific joker (e.g. the joker to the right), you have recreated oil lamp. and oil lamp's multiplier is 1.2x. so no it would not be balanced, unless maybe it only targeted a random joker
this is a consumable btw
should've mentioned that
oh it's a consumable
yea that's a lot better then; i'm still hesitant to raise the multiplier because of perkeo shenanigans
yea if it's a consumable you can duplicate it lmao
technically the multiplier doesn't matter much if you can perkeo it, but a lower multiplier makes it more tedious and probably won't keep up with blind scaling as easily
you know what that's. probably very true
alright i'll change it to one joker
i um
i don't actually know how to modify joker values
check how cryptid does it i guess? i dunno i don't usually like suggesting cryptid as a code reference, their whole system is a little weird
i do know the way they did it also really sucked for a while, but i think it's better now
(they used to just have a "misprintize" function that'd randomize joker values, and they had to finagle the function to guarantee the value they wanted. now the manipulate function should better support setting or multiplying values)
I have a seal that, when applied to Jokers, prevents the Joker from getting debuffed
this works for most things but a crucial thing it doesn't work with is perishable, so how would i make this override perishable's debuffing
calculate = function(self, card, context)
if card.debuff or card.debuffed_by_blind then
return {
card = card,
SMODS.debuff_card(cards, false, "orange_seal")
}
end
end
yeah its code is going way over my head
maybe i should just not
or well i COULD just only have this card exist when you have cryptid installed
but i don't really. wanna
cryptid is licensed under gpl3, you could just rip out the manipulate function and slap it into your own mod and it'll all be fine and dandy 🔥 (unless it involves patches as well, in which case you have to go dig up the patches too)
non-zero chance that cryptlib has the manipulate function too
just copy the cryptid function into your own code
fair 'nuff
and include the cred in your mod description & credits tab
pretty much the only restriction is that the source code of the function you borrowed needs to have some way to tie it back to the gpl3 license (usually the easiest way is to make your mod gpl3 too)
separate mod that came out recently that implements some functions and behavior from cryptid, but without any content
okay really quickly though
this is the function
aw it didnt do the thing
if u send a codeblock as a file it automatically removes the markdown and sends it with the file extension
anyway
i feel like i need more stuff than just this
but theres so much i dont know what im doing LMFAO
augh that's a big function
anyway at a glance it looks like this function still has the misprintize behavior i mentioned earlier, if you just pass Cryptid.manipulate(card) it'll randomize values
uhhhhh Card.no you probably don't need to worry about, it's only used to check if a card is immutable (which i assume you won't be implementing)
okay so i should maybe just go through and drop stuff i dont need (for the most part)
cant you add SMODS.debuff_card(cards, "prevent_debuff", "orange_seal") once?
i know how to USE the function i just dont know how to make myself ABLE to
in my opinion, this is simply Not Worth It™, but i'm not gonna tell you to just drop your idea. lemme go look at cryptlib real quick
in my opinion, this is simply Not Worth It™
so like i kind of agree
it does implement the manipulate function! so if you do want to keep the consumable, the easy way out is gonna be to make your mod dependent on cryptlib, and then just call Cryptid.manipulate to change the values
https://github.com/SpectralPack/Cryptlib/releases/tag/v1.1.0
i think what i'm gonna do is like
not do that unless i have more ideas that would require cryptlib
cuz
i don't really want to have a whole dependency for ONE thing
fair enough
joker value manip is sadly just really jank, as eremel said all the way back at the beginning. possibly for the best, but still
althouuuuuugh
i'm wondering if i could just steal this (with credit and the works ofc)
and also the talisman compat file so it actually works (I'll add my own talisman compat to my mod at some point i swear)
or i could just
use it
use cryptlib
and require it
and use ITS shit
yeah i think im gonna do that
how do i change my numbers to be talisman compat
full 180 in 3 minutes 🔥
uhhhh vanillaremade wiki explains talisman compat iirc
doing that crashes
unless i put it in the wrong spot
what's the crash and the code
calculate = function(self, card, context)
if card.debuff or card.debuffed_by_blind then
return {
card = card,
SMODS.debuff_card(cards, "prevent_debuff", "orange_seal")
}
end
end
and what I meant is to do that when the seal is applied
yeah just thought that
must i undo it in remove or is that not needed
nice
bepis
that looks funny
am i doing this correctly
I think so
alsoalsoalso how do you add a tooltip to a card
specifically for eternal
do i just put {T:eternal}{} anywhere or does it like. actually matter (and is the key right)
no, you put it in info_queue
bwuh
info_queue[#info_queue+1] = {key = 'eternal', set = 'Other'}
is that. in loc_vars or
yes
okay sorry but i am NOT doing this right
ah
this cant be broken ootb right i gotta be missing smth
i mean an smods version just released
something might be broken in one of your versions
it could be that
i forgot that was a thing
still tho
where does one even FIND achievements like ingame
wawa
i dont think im doing this right
stupid question
why is the negative like that
i thought it was gonna look like this
oh wait
Negative edition doesn't actually do a true color inverting effect
is this for the random quote
yep
then thats completely wrong lmao
oh!
can you copy that here so i can fix it
the more ya know huh
loc_vars = function(self, info_queue, center)
local quoteset = 'normal'
return {
vars = localize('k_ocstobal_oxy_quote' .. tostring(andanothertothevoid))
}
end,
4
its just this then
loc_vars = function(self, info_queue, center)
return {
vars = {localize('k_ocstobal_oxy_quote' .. pseudorandom("seed", 1, 4))}
}
end
ah
edited
that makes a lot more sense than the tostring(number here) method i was told
my bad lol
learning a lot of new programming languages this semester, i'm getting type cast stuff mixed up
is it possible to make just one node hidden
instead of making the entire uibox hidden 🤔
i think so
i just noticed that the game completely hides the uibox that contains the buy & use button under conditions, and since the new right buttons are added to that uibox it just hides them too
3:
a workaround would be to make another uibox just in case that happens, including the new buttons specifically
idk
i think youre allowed to go to thunks house and ask him to fix it
balance? whats that?
vro
😭
you are going to detonate
might balance it by like limiting choices or something
like -1 choice of joker and booster
everything is free but no rerolls
everything of one specific type is free, changes every shop
in its current form i had rerolls free too 😭
wtf?
dawg
bepis can ytou give me $4
no sorry im poor
ngl it was just to test
i actively think the worst balatro can be is shop simulator
can i give you $4 then
yes :3
wait no sorry im poor
3:
ok fuck this
Are there any docs anywhere for config page and such
heres the idea
Rerolls start at $2 but the amount doubles, from 2 to 4 to 8 to 16 and so on
okay its really janky for whatever reason so might make them start at a higher price
someone should really work on pages for this
you
wuh
okay heres the balance
ill add the c:money to $10 later but you get the idea
sorry i need it to be money color to get the idea
yeah ill fix that
wait i just realized i have to fucking hook/patch to everything that draws buy_and_use_button to draw NOT_buy_and_use_button too
salmdslam
one accidental side effect is i was dumb and didnt make the reset value after removing the card go back to 5 or whatever but it makes an accidental punish by making the permanent reroll cost start at $10 with no vouchers
like if you remove the joker
oops im an idiot and messed up the money color now is it legible
why is this always being drawn regardless of whether the card is highlighted or not
wtf...
oh probably because i have to change .states.visible
im not sure why but this joker isnt applying the stored chips to the hand before final score is calculated
context.joker_main doesnt exist in context.before
and any chips/mult added in context.before wont work iirc
i have it after at the end but it needs to be first?
i did that and it kinda works, it applies an nice blue ERROR instead of chips
i got it to work finally
dont you just love when your joker breaks so hard that when combined with its 2 best synergies, playing a hand hard crashes balatro
how does one come up with joker names and art??
😭 that was my fault for not double-checking before the commit
check my PR
currently making a tag, im getting some problems, first one is that it crashes the game... for some reason, the other one is that he seems to dont load the sprite i made for him, can you guys pls help (and ping me)
I have a card that draws an image on the screen, but when it's done doing that it leaves these artifacts in the background that sometimes flicker in and out. Does anyone know how to get rid of this?
you did not specify atlas
oh bruh....
mb 😭 thought this was a good place to ask
do all the automatically scored enhancement config values have respective permanent bonuses?
nvm im blind lmao its just on the wiki page
you can hook love.draw and draw a rectangle before calling the hook (thus putting it behind everything else), that's the only way i could fix it when i had that issue
a black rectangle
is there a way to get the total of all of a cards bonuses besides chips?
oh
there is damn
How can I destroy voucher from player?
It won't unredeem them if you do
you can but it does nothing in 99% of cases
Cryptid had to make functions for that
because vouchers act more like consumables
Thanks
what is even wrong with this? it literally knows context.destroy_card is a table yet it still keeps trying to tell me about a parameter mismatch
quick question, trying to see how to get a card similar to odd todd. like when it detects a certian card it adda an amount of chips
have you looked at vanillaremade
no whats that
thank you!
also it's wiki is very helpful
i can make this not repeat a billion times by just adding a flag right
also good morning
yeah
goodmorning
woman
why flag not flagging
ur flag game is weak
do i put it outside of the event is that the issue
No, trig will always be set to false every time update runs.
somecom
yes thats what i call him is that bad
maybe
me when live backwards
true
how is your code balalafont
how do we tell him
idk
its funny because it used to be balala font but i changed it
because their periods and commas kept getting me confused
here's one back when it was balala
i need this in my godot engine
i will look into methods to achieving balala readable coder in godot engine
do i have to set it as a card ability or something like
Yes.
hey do you know if you still return them* in the locvars though? or does it not matter in this case
*the flag now in card.ability
No, unless you want it in the description.
i thought so, just wanted to make sure
tysm
gdi (i realized after i forgot to check for card ability but a blunder is a blunder)
nw nw
i found it and figured it out in the end
Why does this need to be in update?
is there a chance that anyone here knows how to hook the skip blind button so it just sends you into the blind?
both the relevant functions are gonna be in G.FUNCS but other than that idk
under what name do gradients get put into G.C? is just a mod prefix added to the key or does it become all uppercase like vanilla or smth
i see
this seems to work
local skip_blind_ref = G.FUNCS.skip_blind
G.FUNCS.skip_blind = function(e)
if next(SMODS.find_card("j_joker")) then
e.config.ref_table = e.UIBox:get_UIE_by_ID('select_blind_button').config.ref_table
return G.FUNCS.select_blind(e)
end
return skip_blind_ref(e)
end
I'll test it out, thank you a lot this is huge c:
read the documentation https://github.com/Steamodded/smods/wiki/Calculate-Functions
you'll find out how to do something when a card is destroyed in there
How do you make a random effects joker?
(Does 1 of # things when scored)
also check out how the new scale_card function works, documented here
i know that im asking how to make the actual mult of the card scale
then my second link will be very helpful
the pseudorandom function can let you get a random number from 1 to #, and then you can do something based on the value of that number
i dont really recommend pointing out beginners to the scale card function, it makes a simple operation somewhat confusing
hm i suppose
scale_card aside, the calculate functions wiki page i linked (the first linked) also has an example of scaling a card's value manually, which is probably simpler
Where’s the documentation for Pseudorandom
this works perfectly, thank you so much again
Is there a way to make it so the joker can scale past the naneinf value?
I don’t think so
Naneinf is what happens when a score is too big for the game to read out.
you can probably store a talisman bignum on the joker but idk
I know that, but I'm trying to bypass this limit using Talisman. And while the score itself is able to go past naneinf value, the joker itself gets naneinfed.
I think cryptid does something to address that, I have no clue how tho
either that or it still just caps values at 1e300, I forget if they stopped doing that
Oh, I see.
-# I so don't want to download Cryptid to check that...
the way cryptid gets around it is by wrapping all value manipulation in to_big and then converts it afterwards if needed
...involves lenient_bignum-ing the values and number_format for loc_vars displays.
sdo instead of mult = mult * 2 you would do mult = to_big(mult) * 2
if you dont use to_bigs numbers dont automatiaclly get converted
so 1e150 * 1e160 is still naneinf even though bignums could handle it
Would this help fixing this?
probably
any input on how i could work this better?
the effect works i just think it's worded weird
What else should I "to_big"-ify here then?
-# The code itself is not mine, I'm just trying to add Talisman compat to see how far this joker can scale.
You mean like this?
Oh, ok.
Still gets naneinfed.
im a little confused on why it says nil still
#1# is just a 0, #2,3,4,5# are for the numerator and denominators
i'd assume #6# was the quotes but nope, doesn't show
create card accepts multiple rarities?
can you modify ante_scaling in the middle of a run
nvm got this fixed
no
(if not ante_scaling, is it possible to edit the req of a singular blind)
Now I have another problem: my score gets nan-ed when the joker scales to e1e6.
Is there a way to fix this?
does any good samaritan have the images of the vanilla balatro editions just on a base card that would be spectacular, if nobody does no worries
Yes but you’ll need to update the text aswell if i remember correctly
doesnt the wiki have them
Too much score lol
how is this done exactly?
i guess now when the new version released I can come back to this
<@&1133519078540185692>
@manic rune is there any way i could make a should_apply method for seals, like how stickers have?
you can use the mod object calculate with the new ante contexts
check the release notes
What's funny is that I have Talisman set to OmegaNum.
it's only a score/number overflow if it's naneinf. just nan means something's borked in calculation
So something breaks when the joker reaches the value past e1e6?
i dont have much stuff for talisman
i've seen this a lot but idk how to do it, how exactly would I go about changing a certain button's name? For example the skip button.
(skip blind)
put 'b_skip_blind' in misc.dictionary in your loc file
no you would need to patch the function that makes the button
alright
i kinda don't understand how do i make global mod object
SMODS.current_mod.calculate = function(self, context)
do i replace current_mod with mod id?
no
how would i make my seals not be included in SMODS.poll_seal
so they can't be added to cards randomly outside of where i want
return false in in_pool i think
i don't believe seals have in_pool as an api method, at least not according to the smods wiki
ill try though
im saying it based on the code
ok so i would like to make text appear here based on the number in main calculation
in simpler terms it just says here what modifier is active
i never touched ui stuff so i have no idea
ui 😨
good luck
copy other mods 😁
do you know any mods that add text there?
partners adds a cardarea for the partner there i think
you can create a UIBox and use the offset to render it there, then just have a text node
for a consumable, what's the context for a held consumable for main scoring?
i.e. what a Joker does for joker_main
im looking into ui documentation and i feel like im having a stroke
is it consumable_main?
look into how observatory works maybe
ok so like
how do i do that
UI code is very much like having a stroke and can be hard to parse. If you want an example of how to draw UI, including text, in arbitrary places on screen, you can check out the Spellslinger Deck in #1340334060597285025 to see the visuals, which is all set up by this code https://github.com/icyethics/Kino/blob/main/src/spellslinger_deck_UI.lua
Do I need to write a patch to change the main menu music?
you should be able to do it with select_music_track
Is it documented?
How do I check if it's the main menu?
im trying to add a count on a higher layer for joker display
without modifying the original
i just cant figure out how to line them up exactly
why don't you just shift the text of the joker area?
yeah you answer that my answer prolly sucks
where
uhhhhh
left maybe?
that'd be a pain though
I was thinking down originally but this display box isnt a fixed size is it
What you're trying to do
it's not
can you not just align it directly on top of the joker area?
how come?
it would get hidden by the top displays
no I mean this new area, why is it shifted vertically?
can't you just set it to be the same position but on a higher layer?
oh yes
thats what im trying to do
lol
i have the node for the count but idk how to set both to be in the same absolute position
do cardareas have a draw major?
I assume you already give it the same definition as g.jokers?
oh its not a cardarea, it's just the text node
my vscode crashed when i tried to screenshot wtf
where is a card's set stored? im trying to check for buying jokers specifically
why adding a simple text on the right side is so complicated 😭
.ability.set
it looked like a cardarea here xD
I wonder if you can just patch the instance type of that original text node
i tried haha but I also want to try to avoid patches in jokerdisplay
this would also make it easier to disable
ok now its shifted horizontally
now i just need to combine both
oh i said this as a joke but it actually worked
epic
how would i destroy a sold card before it gets sold
this doesn't work btw (it's on a voucher)
if context.selling_card then
SMODS.destroy_cards(card)
end
does anyone know how check_for_unlock works? i tried looking at its code and understood little of it
how do i make it so that a joker has a different image if you have a specific joker
(like in almanac if you have godsmarble some jokers change)
card.children.center:set_sprite_pos{x = new_x, y = new_y}
any idea why it's not working?
silly question. is it possible to check for a playing card being given an enhancement/seal/edition? i'm trying to make a joker that scales based on how many cards you enhance/give a seal or edition :o
like. in shitty psuedocode, is there some equivalent to if context.playing_card_modified and not context.blueprint then
yea i don't think there's a dedicated context for it unfortunately
the release notes for 711
How do I use the select_music_track function for changing the main menu music?
dangit. uhhh is there some way to check it otherwise? (like even if the result would be a bit more powerful, is there a way to just, Check if the deck has changed at all.)
Nvm
How do I make it not slowed down?
Thanks
I guess I had looked at Github Discussions since that's where the new release's notes are
what is Github Discussions
And only make it play in the main menu?
you could create a context for enhancements by hooking card:set_ability (theres already an smods pr that adds this iirc), then you could do the same for set_seal and set_edition i imagine
creating contexts is suprisingly easy, especially if you arent handling any custom return values
uh. how do that. sorry it's. Been awhile since i've worked on my mod and my lua is rusty, whoops. (i do assume such a custom context would be at the top of my main lua file at least?)
one of my custom contexts as an example, which adds a context to ease_dollars being called. you just call SMODS.calculate_context in a hook of some function, and then the only argument you need is the table of context flags
you can ignore the local flags stuff, thats just for handling custom return values
I think with the new SMODS release yes
maybe via the set_ability context
wait, actually? gimme a sec
its context.setting_ability, though that includes initial card spawning
set_ability is the name of the function
I didn't name the context
because Idk the name
wait im stupid this release literally added context.money_altered
omfg
idk if it allows for modifying the amount though actually
I was going to mention that but I thought you knew
shitty pseudocode but would it be like. if playing_card = context.set_ability and not (the context for adding or removing a card from deck) and not context.blueprint then
what's the difference between scaling when you add a card with an Enhancement to the deck and when you count the number of cards with an Enhancement
yeah, it's so that if the card becomes kaput, you keep the scaling
How do I make my music not slowed down and only play in the main menu while using select_music_track?
i think pitch = 1 fixes it
context.setting_ability is a boolean, the card being changed is context.other_card
and idk if you can check if its from being created or not
but why
why not
if I want to encourage players to play with an Enhancement, I want them to play with it
not without it
because i want the card to work, very specifically, based on when cards change? not really sure how else to answer that ^^;
I'm asking why you want it to work in this specific way instead of another way
why are you questioning game design in modding-dev vro
Where do I add that? And how do I make it only play in the main menu?
i'm just trying to make the concept work here, i'm not exactly here to explain my design philosophies
that's also modding dev
XY problem
this is not an x/y problem moment this is you just being annoying about how someone wants to implement something
drama 😱
I don't think I am being annoying
like, what, do you want me to go in-depth as to why exactly the effect makes sense because of the funny reference that the card itself is about, infodumping about several paragraphs of story about it, all in the pursuit of knowing how exactly i should code the thing? ;P
you asked what the difference between counting current enhanced cards and scaling when a card is enhanced and i gave you an answer
I asked why is adding an Enhanced card different from just counting the number of cards with a specific Enhancement. I don't think flavor is related since this is just a mechanical question
and again, its a coding question in modding dev, you have literally no reason to go into a discussion about game design
I disagree
I think this space is for game design as well
i agree
when i ask a coding question in modding dev im not here to go into game design discussions
im here for an answer to my coding question
flavor-wise if something was well known for becoming stronger as a result of creating something/training in a certain way, i would make the card scale when it adds a certain enhancement to the deck instead of just counting how many of that enhancement are in the deck
While I can see the argument towards pivoting, I wasn't satisfied by it as I made my own counterargument. Nonetheless, I was still curious towards the motivation of the person who wanted to implement the effect in the first place rather than a third-party
I asked
?
I'm not sure what "randomly" would mean here
okay cool that you asked but not my point
randomly would be going into a game design discussion with someone who did not ask to have such a discussion
Again, I'm not asking for the difference in terms of flavor.
...big surprise, this didn't actually detect anything, since i am. Almost definitely not using set_ability right whatsoever. alright, what am i doing wrong here. ^^;
if context.set_ability and not context.playing_card_added and not context.remove_playing_cards and not context.blueprint then
its setting_ability
playing_card_added doesnt happen at the same time as setting_ability anyway
i read your statement as "i see no reason why flavor would create any distinction between the two behaviors", sorry
okay, setting_ability does properly proc for enhancements, but not seals or editions. how do i do that? :o
Flavor would not create a mechanical distinction.
well every mechanical difference would be:
- cards can be destroyed
- cards can have their enhancement removed
- cards can be enhanced multiple times
make custom contexts for it by hooking card:set_seal and card:set_edition
The first isn't a difference unless there's some specific contextual information missing
if you destroy a card then its not in your deck anymore
and therefore you cant count it
the first is a difference
I used take ownership to change the name of j_joker but it seems to have removed the description as well for some reason... trying to change the description with loc_txt also leaves it blank. Any idea what I might be doing wrong?
Ah wait I got what you meant now
dont take ownership for it, use a localization file
Can't you do it by taking ownership though?
How do I make my soundtrack only play in the main menu?
I feel like this is a case where they should take ownership
loc_txt gets ovewritten by the loc file
But if multiple mods try to change the same name they should conflict
okay same with take_ownership
because only one name can be applied
then use malverk to solve the conflict
malverk allows custom descriptions
One mod changes the name and the others don't
malverk (apparently) allows you to define loc for texture packs
take ownership just gives a message
have you literally ever used malverk
Hmm I'll have to figure out how localization files work I guess haha
I know
But I'm just saying it will conflict anyways
how
no it wont
loc_txt was good enough for making custom jokers so I haven't learned this yet
Taking ownership will just generate a warning message
Malverk can allow one texture pack to take precedence
Either way
There's conflict
ok
changing names isnt crucial to the function of a mod
It depends on the purpose of the mod
so does it even matter
alright. stupid question. how do i hook into Card:set_seal() and make a function that's like. "hmm yes when a seal is added i do the thing!". because uh. i'm trying to modify another custom context into this and it's. well. Beyond nonsense.
function Card:set_seal()
if self.ability.set == "Joker" and self.added_to_deck and not context.playing_card_added then --this line makes no fuckin' sense i'm shamelessly editing a custom "on joker destroyed" context and then trying to morph it into checking for seals
SMODS.calculate_context({setting_seal = true })
end
end```
remove the context check
I just think it's good to take ownership here to generate a warning something didn't happen as intended instead of it being a silent "error"
obviously if self.ability.set == "Joker" is nonsense but i'm at a loss for what to change it To
I mean they could check the set
taking ownership would lead to more conflicts because youre replacing more
and maybe where the card is
I thought taking ownership only replaced the things you asked it to
Wait I just realized I was editing the wrong copy of the lua file, taking ownership with loc_txt worked fine 💀
to avoid replacing too much
and creating too much conflict
didn't like that but also i 100% think i took this too literally
function Card:set_seal()
SMODS.calculate_context({setting_seal = true })
end```
you need to still
well, if you only replace loc_txt it's fine I was under the assumption it didnt work
call the original function in a hook
@slim ferry for example: #1232074540633428028 message
I mean I was under the assumption it worked and it does
well then we were having different discussions
actually why are you testing your mod with a ton of other mods installed lmao
also I had asked that question to learn what their goals were gameplay-wise
most of them are just aesthetic mods ;P
(tho talisman is an active dependancy)
unless you have ^mult or above you shouldnt need a talisman requirement
(it's ^mult)
okay
it's +10#########################googol Chips 
numberslop mfs when i show them {infinity}infinity chips and mult
since for context, this is the current state of the calculate for the joker
--check if a playing card changed somewhere
if context.setting_ability or context.setting_seal and not context.blueprint then
card.ability.extra.Emult = card.ability.extra.Emult + card.ability.extra.scaler
return { message = "+^" .. tostring(card.ability.extra.scaler) .. " Mult" }
end
--the primary joker effect of actually giving Emult
if context.joker_main then
return {
Emult_mod = card.ability.extra.Emult,
colour = G.C.DARK_EDITION,
message = "^" .. tostring(card.ability.extra.Emult) .. " Mult"
}
end
end```
the entire premise of the mod i'm making are "exponential jokers that scale funny"
@grim remnant do you intend for your mod to be used with Cryptid
it's meant to be a companion to it but it's meant to work standalone, hence i'm testing without it
I'd suggest taking a look to see if it's already doing something similar
first as a reference but also to avoid conflicts
does talisman not just have an emult return that does the message automatically
i thought it did
If they have Quantum Seals I think that might break this Joker
-# yet
well yeah but you cant see the future
maybe? but context.setting_ability probably already accounts for that since theyre both smods features
yeah but I was asking about Seals
well yeah but they dont have that
nor Quantum Editions?
nope
from the looks of it there's nothing in cryptid that expressly is like "on setting a seal" or "on setting an edition"
quantum enhancements do set stuff
if they had quantum seals or editions it could be similar
but if they don't good for you
the only instance of a quantum seal i could find (read: saw on balatromods wiki) was. from a paper mario: color splash themed mod. which... i think i'm fine. ;P
i dont think that mod even gets updated anymore
I wonder if @daring fern has input
idk if seals on every has quantum seals