#💻・modding-dev
1 messages · Page 425 of 1
Oh wow I'm a genious
yeah yeah
you would probably need to patch or take ownership of food jokers honestly
ill check it out
I don't think your unhighlighting your cards
i shouldn't have to, right? if they're being discarded they should be unhighlighted
wtaf
what does pcard mean?
i mean can't you just hook card: remove()
brutal boss blind btw
playing card (i think)
though that means you have to determine if that card is either sold to be consumed
or eaten
playing card, just a name i gave it because v doesn't tell you much
would this work?
which is another problem
so I can just name it whatever then?
yes
it should
thank you, i wish it worked properly
actually i think i got it
how do i check if a card is highlighted
card.highlighted?
oh god more recursive table searching uhhh
You're not putting those values in config.extra, you're just putting them in config.
ohhhh
it didn't :(
(happened upon opening the booster pack)
ok cool this works on discard now but NOT on play, where the played cards flip around and their scoring values appear above the deck
your config was correct before, loc_vars was incorrect
the config in this screenshot was correct, from the logs it seems like you changed it
the loc_vars had the problem something mentioned
yeah
i did have to change it because even looking at the object would have crashed the game
the difference now is that it crashes when i open the thing
yes but the problem is in loc_vars, not in the config
theres only one spectral that has a "negative" effect that im not letting this one change
ecto?
nah, immolate
just tell me what i need to do
i dont consider immolate deleting 5 of your cards to be that much of a downside
at least i could get a please
you need to remove the extra .extra
oh
sorry
lemme try your way
alright
exact same issue
it's got nothing to do with the variable names
because I changed those to how you prefer to do em'
and i'm getting the exact same error
did you change the config back?
yes.
did you restart the run?
I have an issue (yes, another one and yes, with the same enhancement as earlier, shocking.)
I have an enhancement that counts each time it's played. On the third time its played, it self-destructs granting 3x mult. The issue is, that when scored with other cards that self-destruct on the same turn, they retrigger the 3x mult, leading to scores that shouldn't be possible ante 1, but i have no idea where to start with fixing it (Video is there in case my explanation wasn't good enough to understand the issue)
alright
lemme try that cuz i continued instead
i continued the run after restarting the game, i mean
yeah boosters save config values like jokers do
that makes sense
context.destroy_card == card?
sorry for disrupting but do any of you guys know what the key to replace the tarot merchant and tycoon vouchers? i was searching for the wiki for like an eternity and couldnt find it (in malverk)
how would i have like a constant check for if a joker is to the left of a joker? like what would the if statement be
Yea that was it, ty
is there a parameter that i can use to check if the player isnt on the main menu/ in the collection menu (evidently some of my stickers crash the game when you attempt to view them in the main menu due to their apply function being called and blind being nil in the main menu)
guys my mod is done, i just need to do the info_queue to explain some of my joker, how do you add that
ok yup major issue (if i view them in the collection menu while in a blind it actually runs the code)
Add a check for that function to see if you're in game or not
G.STAGE == G.STAGES.RUN
Couldn't you just do if G.GAME and G.GAME.blind?
new error message just dropped
probably because there's no iteration
also does the SMODS.add_card take care of not adding it in case of card_limit reached?
No, it would be quite bad if it did.
that means it couldn't find the cards in the pool
ok thanks
the set might be without the modprefix i think
lemme try that
so right now, it's meant to destroy the current joker (Alt) and create this other joker (Devotion) when it detects that a fourth of the deck is wild cards. Instead it's turning into Devotion whenever
- I play a hand (not automatically)
- it's ignoring the fact wilds are not making up a fourth of the deck
it works now
thank you for bearing with me
G.GAME is always true evidently
this partly fixed it
bumping with an example of what i mean
Hi papus
I would suggest looking at Blueprint code and the Blueprint mod code as well.
anyone knows what method is used to apply a variable to the first card figure of the hand, similar to photography
ok but smods just uses blueprint_effect, and i dont think that's documented (from what ive seen)
where is it in the code if it isnt?
Yes, but it wont crash if you check it and it doesn't exist.
You would get the pos then get pos-1
the effect still happens if the collection menu is open during a run which is an issue
Do a check for the CardArea it exists in
???
PUTOS
No.
im listening
the issue with that is that when cards are in the collection menu, context is nil so i cant do context.cardarea == G.hand
Well then make sure context isn't nil then?
i seeeeeeeeee
let me whip something up
card.area == G.hand?
this fixed it thanks
Hey does anyone know what method is used to add a variable to the first card of the hand

What do you mean by "a variable"? What are you trying to accomplish?
If you're trying to achieve a similar result to The Photograph, then I would suggest taking a look at the photograph source code.
if self.ability.name == 'Photograph' then
local first_face = nil
for i = 1, #context.scoring_hand do
if context.scoring_hand[i]:is_face() then first_face = context.scoring_hand[i]; break end
end
if context.other_card == first_face then
return {
x_mult = self.ability.extra,
colour = G.C.RED,
card = self
}
end
end
Thanks a lot
how's this?
what is the normal info_queue structure?
so right now, it's meant to destroy the current joker (Alt) and create this other joker (Devotion) when it detects that a fourth of the deck is wild cards. Instead it's turning into Devotion whenever
- I play a hand (not when a fourth of the deck is wild)
- it's ignoring the fact wilds are not making up a fourth of the deck
No, it's G.jokers.cards[i]
You're using wilds in your for loop which results in the value being changed not as you intend.
i fixed it after the ss, remnant from the other_joker setup
otherwise good?
Use temp values for your key value pair, don't use other variables.
Perhaps.
ill test it in a bit though,i gotta leave rq
well, changing that just a bit, I'm still getting the same outcome, perhaps the change I made was wrong
Hey last question is there any place that documents all the skills of jokers in script or written somewhere that are compatible with steammoded?
Thanks
Clearly @daring fern has something to say about that but won't actually type it out, so I may be incorrect.
no, I think what you sent is exactly what they asked for
it's just not really "documented"
No, I'm just wondering, why ceremonial dagger specifically?
more like a showcase
Because that was the last linked instance of that repo and I simply copied the link.
im bad at docs
you're not the only one
Youre the best doc ive ever had
for legal reasons I would like to say that I'm not and have never practiced medicine
you saved like 8 babies bro
Hello Dilly
But do you have a PhD
Hello vic how are you
how can i make it so my joker can't be deleted by ceremonial dagger?
tada? I still ended up having the same problem with this change so I could be way wrong
I’m okay and you?
make it eternal 
Im doing okay, finally got some motivation and fixed a bunch of stuff for my mod while my mood is up
You would patch/take ownership of it.
how do I make a joker take up no space in the joker slots?
like if I have four jokers, one of them being this joker, the slots would say 3/5
i dont think you can without a lot of jank, I wouldn't recommend it
damn
Just make it negative :)
guaranteed negative it is 😔
yeah
that's what it is currently, but I was hoping for a solution that wouldn't include the negative shader, since the art will always be the wrong colors
actually, if I just put +1 joker slot in the stats, that should work lmao
Try and do debugging to see why it might not be working the way you want it to.
If you just wanted it to say that then you would do G.jokers.config.card_count = G.jokers.config.card_count - 1 I think.
oh, fascinating
I'm trying to make my joker do a X5 mult when having a Flush of diamonds but it doesn't really do it, did i do something wrong
or probably i did everything wrong idk
and remember to make it give the space when sold, or not depending on your use
guhhh
does anyone know the shop rate for spectrals?
They don't appear in the shop?
When you have Omen Globe? 20%
You said shop rate oops
Otherwise, if you're referring to like pulling The Soul or Black Hole it is .3%
Nothing you said appears in the shop?
I corrected myself
Ok so i am having an issue where i am trying to make a joker trigger +chips then xmult, but it triggers both of them at the same time, rather than one after the next. Would anyone know how to make them trigger one and then the other?
delay = SECONDS GO HERE,
perhaps?
Remove the messages then do xmult = number, chips = number
You are defining the message twice.
hey guys, what is the reference key for tier 2 vouchers?
im making a joker that after a while creates a tier 2 voucher of an already owned tier 1
for example if you own seed money: it would give you money tree
You would have to check manually.
so if i want it to hit a random: would i have to list all possible vouchers?
Probably.
If I'm trying to get something to trigger after beating a boss blind, but before receiving the payout of this boss blind, how would I achieve this?
it will be sending two different messages tho, right? once for +chips, then again for xmult?
No, because the game looks for .message and you are overwriting the first one.
return {
chips = card.ability.extra.chips
xmult = card.ability.extra.Xmult
}
context.end_of_round and G.GAME.blind.boss
Thank you, worked perfectly!
i removed the messages and it didn’t show that it triggered
@proud ridge
Try looking at Cryptid.
cryptid code is incoherent black magic
there we go
Iirc paperback does that, too
No?
Hold on, let me check my mods
which file is this in?
lib/misc.lua
I was thinking of Aiko
yeah but aiko has like 40 lua files
i didn’t feel like looking through all of them
fair
some help would be much appreciated
If you have vscode you can press CTRL + SHIFT + F to search all files.
i didn’t know what i was looking for
hi im back, how would you go about this?
is there something wrong with this code that it doesn't work
Never done something like that myself, but if you look at Jokers like the Tarot one or Throwback, the game keeps track on the stats they rely on from run start. You probably just wanna do the same thing by declaring your own global variable
Yes.
what is it
Replace center in the functions with card and do x_mult = card.ability.extra.Xmult in the return.
Ok i believe i found it after looking through the game.lua file, thank you!
same result
Code?
You didn't change the return also you swapped context and card
context was in the third spot now it is in the second spot also remove everything else in the return.
Is possible to get the score of a played hand?
I want to make a joker that trigger if a certain score is reached
Yes.
How?
By score do you mean chips multiplied by mult?
Yes
hand_chips * mult
still nothing
Code?
Thanks
I'm trying to make a mod and it magically isn't crashing the game anymore
(i have barely any experience with Lua)
please?
are you testing on a new run or on an old snapshot?
Is any context. necessary?
does that matter? 💔
gen question btw
if you've changed your config it does yeah
anything in here won't update until it's a new instance of the card
is that a shader??
it now works,,...
thanks
ðŸ˜
it's three sprites stacked
Is there any documentation listing properties, names etc? I know there's many examples around but it would be a lot easier
ty!
here's the wiki
but if you want a more specific answer, you have to give more information on what you're looking for
i do have a list of every calculation context
got it from this discord, someone regex'd every single mention of each context within the code
Thanks!
I'd like to try to understand it myself since I already have decent experience in coding
for a lua API without ldoc or anything, this is one of the best-documented APIs i've seen
do you know lua?
Currently I'm trying to figure out why my joker gives the message pretty much always
so glad that im finally done coding this one
what is the property of G.jokers that dictates the size
that list isn't particularly helpful, you'd be much better served looking at the calculation docs page
I had a little experience with Lua in the past
i've made modding APIs before and making a documentation as concise and understandable as the smods wiki is not an easy task
https://github.com/Steamodded/smods/wiki/Calculate-Functions I'd recommend reading this page, and then if you're still struggling asking any questions you might have
i mean G.jokers the card area size
thanks
What's "context.individual"? I found it in several example scripts but it's not explained there
context.individual is a flag in certain contexts that indicates an individual palying card is being evaluated for some step
Immolation doesn’t give money :0
hm, that doesn't look right
how can i spawn jokers for testing
DebugPlus makes it easy
code for reference
i think it's close, but the numbers dont seem to be exact
not sure why
which command?
Maybe you don’t need CTRL here
thank you!
what
ok that is NOT right
@wintry solar sorry for the ping, you were helping me with this yesterday
i am quite confused
modding Balatro has made me so crazy that I accidentally booted up Everhood instead of Balatro
this is the current code?
why would immolation not give money
yes
Guys my code is working
Not properly, not at all
But at least it's working
they're probably referring to how immolate destroying cards is a good thing
thats why Blood doesnt affect immolate at all
can you paste the code directly then I can add some debug stuff in for you to run?
i could really use some help with making a new consumable type, last thing i tried came up with this error
hope this works
That disables Vagabond
destroying cards is the upside so the money must be the downside

vagabond sucks anyway
local congruentia_mult = mod_mult
mod_mult = function(mult_change)
local result = congruentia_mult(mult_change)
if next(SMODS.find_card('j_ast_congruentia')) then
print('mult_change: '..result)
print('current mult: '..mult)
print('current chips: '..hand_chips)
print('change? '..(to_big(mult+result)>to_big(hand_chips)))
if (to_big(mult)) + (to_big(result)) > (to_big(hand_chips)) then
hand_chips = (mult+result)-hand_chips
print('chips set: '..hand_chips)
end
end
return result
end
just change this mult one for now and run the single 6 again please
if youre at the point where youre using immolate youre probably not worrying too hard about needing to roll tarots each hand
oops
are there any mods for assistance when mod developing? ones that let u spawn jokers, clear blinds, get money, stuff like that
debugplus!
oohhh hell yeah!!!
oh uhhh throw a (mult or 0) over all the mult values
probably need a (hand_chips or 0) too
every single one?
Probably noob question but how do I check how many cards with a specific rank/suit there are in the full deck?
I tried copying the code from cloud 9 and bloodstone but it didn't work
that seems easier
i know that the cryptid mod has a special qualification for food jokers, is that cryptid specific?
so like this?
or should it be in a diff place
i wanna make a joker that scales when u purchase food jokers but not sure how ><
that's fine, do hand_chips = hand_chips or 0 too
alrighty
oh hold on, I missed a tostring too
print('change? '..tostring(to_big(mult+result)>to_big(hand_chips)))
context.buying_card and context.opening_booster exists, i can't help with it all bc i wouldn't know how to detect food jokers, but it should be a start
yeah, try running it now
bonanna
it seems to function at least
give yourself a mult joker and try it again
how do you check for a minimum number of cards played?
if you could remove the chips function prints too that would be handy
wait should i edit the chips section to match the mult section too
no
because rn it looks like this
I just want to see the mult values for now
alr
#context.scoring_hand >= num?
does this work?
looks like it works fine to me
I'd remove all the prints and copy the mult=mult or 0 and handchips ones into the chips function too
alr
how do you check for first discard used?
CODING HUH
How would I go about checking for cards with specific suit/rank in the full deck?
You need to make a for
sorry, whats the context when a round ends?
for i = #G.playing_cards, 1, -1 do
Forgor
So G.playing cards is the full deck?
thx, i will try that
woah homestuick
if context.end_of_round and context.cardarea == G.jokers then { cardarea = G.jokers, -- G.hand, (G.deck and G.discard optionally enabled) end_of_round = true, game_over = game_over -- true or false }
Give me a kiss now
Yes
context.end_of_round
ðŸ˜ðŸ«¡just read the wiki
Where’s my kiss
im not a p
we should get someone to pin the wiki in this channel
no, i dont want furina
IM 20ðŸ˜
would be nice, yeah
I SAID NO
cryptid code strikes again
You mean the GitHub one?
this crashes
yea
XDDD
I read that but it's hard lmao that's why I'm still asking here
im trying to do a scalating joker, but, eh
I can't really find what I'm looking for
Sadly no i’m stupid
Dw, Eremel will come out with a rework for it in [200 years]
But you can look in other people’s codes and find it
but it can still be somewhat helpful rn
tf i do wrong, now mult is stuck in e11
True but sometimes the code you copy doesn't work
I think its a draw function
I got some "ipairs" in my code idk what it means
Uhh i had this error today
Forgot what it meant
It doesn't give me any errors that's the funny part
one last time before i head to bed
could someone please help me out with this
this happens as soon as i click the button to see the "consumables"
So uhhh
Could anyone help with this still
Issue is I don't know the syntax for a card's suit or rank and I can't find it in the wiki
Ah yes "la"
theres supposed to be a joker to the very right
The code says cryptid spectral
Change the
Local newcard
look at gp centers
Im too stupid for this shit
Stupid card idea that i had and want to share despite it's probable unoriginality:
"Armed and Dangerous"
"If the current hand scores [x]% of the blind requirement, retrigger all cards scored for every 10% of the blind requirement scored and raise [x] by 10"
"(Percentage resets at the end of the round)"
for some reason this joker works but it doesn't destroy the card
if you move the cryptid card does it show anything underneath
remove = true?
where do i put that
what is happening here
return table
does... does it have an atlas
😈
uh have you tried making the center something else first and seeing if that works
add context.destroy_card to the last if statement and see if that works
that, too
the card doesn't do anything anymore but it stays
wait is this destroying jokers or destroying playing cards
destroying jokers
also after adding that it doesn't do anything now
i've been following that this entire time
whats with all the extra stuff in the if statement then
What's the difference between base.suit and extra.suit
Is it like for wildcard and smeared?
ah i think i forgot joker buffer
nope, still doesn't work
the joker acts like it isn't there but isn't gone
but still takes up a slot
what is the limit for jokers stored in? nvm its G.jokers.config.card_limit
asked that before you corrected yourself
YOURE homestuck
So I have learned that create_option_cycle has a funny thing in it where it sets the option_cycle with a value, non_recalc = true which makes me think this has been the root cause of the option cycles not updating for whatever reason. Should I just copy the create_option_cycle(args) function, remove that part, and use that modified function?
wait, if theyre homestuck... and im homestuck... then whos driving the bus?
The option_cycles are the only UI element that uses this 😅 god
me when i made my first non-gros michel based joker
Each card gains 0.2 mult for each copy in the full deck (I didn't really think about the balance of it)
Like you have 3 kings of spades now a king of spades gives x1.4 mult
lowkey very good
Idk if .2 is too much or too little but eh I'm gonna figure it out later
Now it's 3 am lmao
still doesnt work
also is there a way to generate random float between a range, lets say 0.5 - 0.8 within smods or the game's functions?
Actually I'm gonna see what reddit thinks (after my PC is done updating screw windows)
with the other card center?
@manic rune sorry for the @ but I wanted to show you this finding given we were losing our minds over it last night
G.P_CENTERS being something else
oh yeah
i used c_soul
still broken
then its probably a code problem
it works in cryptid
have you tried looking at the other mod that does this to your main menu
theres like 20 files in aiko shenanigans
He likes spamming random bullshit
stupid question but is there anything in any mod that retriggers played cards in sequence from left to right disregarding when they originally trigger
what was the on_remove function for jokers?
remove_from_deck
I took a nap hello chat
was it good
for i, scoredCard in ipairs(context.scoring_hand) do
return {
message = "Again!",
repetitions = 1,
}
end
Is what I used, it retriggers all played cards once, at least for me
But now that I'm waking up, how much of a nuisance is it to add a whole new category to the stats page
I want to make a direct opposite to each of the current stats of most used cards
So I can do shit with the least used of eacg
Each
I thought i had it working but turns out i didn't, this triggers even if the card wasn't retriggered
do i need to do anything extra to make sure this works or does this work by default
if context.cardarea == G.play and context.repetition and not context.repetition_only then
oh does context.main_scoring not work for this
Never tried it, but maybe
i will try it as is first and then change it if it doesnt work
yeah ok does not work as is will switch it
what is the context of the card being removed?
Ik there is but idk the variable for it, try G.GAME.blind.reward maybe?
context.remove_playing_cards
(I know enough to help ppl now!! :3)
i mean removing a joker sorry, like the card im in the calculate function rn
is context.repetition an optional feature
You're not going to break your computer by messing around, if you want to try something then try it
no i mean like would it go in the smods optional features
Oh i have NO idea lmao
only way I know to remove a joker is return = {remove = true} but i've never removed a joker before, sorry
ok, np ty im reading the calculate thing and i think i got what i need
card.base.value is the way to check it (assuming that card is defined earlier in the program, obviously)
what does your smods optional features table look like
Then im out of ideas, you'd want to deffer to someone smarter
You say that like ik what that is
could i do something like
if card1.rank + card2.rank + card3.rank + card4.rank + card5.rank = 21 (not exactly in those words i mean)
I don't have that for my mod, i thought you meant a joker causing it or smth
no
card.rank.value returns the name of what it is, like "Ace" or "Queen"
Oh good, someone smarter than me
that's high praise
Look at the answers ive given out above...
It isn't a high bar but you pass it by a long shot
can i get rank as a number though
thank you
and also for a specific card played not just to look for a specific card played
you can get the amount of chips the rank gives or the id of the rank
what do you want to do with the rank as a number
I was gonna suggest get_id myself
I be using it
Now that there's someone else answering i feel i can go back to asking questions :3
im trying to cvheck if all the numbers added equals a certain numver
bop
card.base.nominal is the amount of chips the rank gives if that's what you need
card being the playing card you want to get the rank of
is there a way i can make my sticker retrigger all played cards when its scored (i already know that context.main_scoring is the right context for when the sticker is scored but i cant seem to figure out retriggering cards independent of their original timing)
how do i get the rank of a certain card played
like first card of hand
second card of hand
etc
i don't think you can do that sadly
what exactly are you trying to figure out
cause im able to add ranks together in checking for things like blackjack
damn
thats\
wahat im doing lmao
checking for a blackjack
Wait you wanted it for a sticker? Then what was the optional features thing?
because the parameters for the if statement werent working
cus repetitions are calculated before anything is scored, what you're trying to do requires hooking whatever function is responsible for calculating the amount of repetitions a card gets
lmao alright hang on ill dm you what i do, cause im also accounting for stone cards as well as making aces count as 1 and 11
i mean you can just do that manually as its main effect
instead of relying on calculating retriggers
There's a mod that checks for that already, named high priestess, maybe check that?
i don't think there's a context that allows a sticker to retrigger other cards in hand
only itself
so i want to do a sound effect and a message when my joker gets destroyed, how could i do that?
oh right, that exists
score_card the goat
how would i do this
the whole thing not just SMODS.score_card
I forget, does SMODS add a context for entering the shop?
loop through context.full_hand or scoring_hand depending on what you want and call score_card on them
starting_shop yeah
Sick
every time a card is scored you're incrementing the count for every card in the scoring hand
inside the context.individual check only increment context.other_card's count
That's what i thought but i didnt know how to fix it
Ty!
how do you access the game's sfx volume setting? so i can make my sounds scale with sfx volume
like this?
the game settings should be in G.SETTINGS
but idk the exact values you're looking for
crashes
try just SMODS.score_card(v, {}), that said I have never used this function myself
so it's probably wrong
ty, found it if anyone's curious its G.SETTINGS.SOUND.game_sounds_volume
and don't return
what's the code and the crash
well it stopped crashing but it doesnt work either (i wont ping here but just gonna say)
Any reason this doesn't work? Basically just copied from extra credit alloy joker
if context.check_enhancement then
if context.other_card.config.center.key == "m_glass" then
return {m_steel = true}
end
end
and yes i did remove the return
If you would humor me for a moment, would you please try commenting out SMODS.score_card and add repetitions = 1 to a return
do you have the optional feature enabled?
looking at the code more, I'd remove the context.before part, inside context.individual remove the for loop and do context.other_card.count = (context.other_card.count or 0) + 1
Nope, thanks!
you're supposed to attach the current context
SMODS.score_card(card, context)
only works for the card the sticker's on
oh I see
so context.repetition?
I mean I think you can still make them score in a void by passing a cardarea too, looking at the code
ah, oki, sry
is multi-line attention text a built-in feature currently?
i dont think so?
no, you should do this in context.main_scoring and context.cardarea == G.play, didn't notice you still had repetition there
the code
how does your assets folder look
remove the prefix from the file
the .png?
it should be the exact same as the path
no that's the suffix
nope
It worked!
you do need it in both
but also remove the prefix from the file
what's line 193 of your main.lua
wow i cannot get this context right
okay what are you trying to do
that code is not in the right place whatsoever
add a seal to a card
anyone know why running this code is causing this crash?
changing discard limit in other places seems to be fine but it just doesnt work here for some reason
through a consumable
use . not :
oh im geeked thank you
well i got it to stop crashing at least
i do wish that it didnt matter at all
all of those events should be inside your consumable's use function
whats the use function
what would be the context to this situation, i kinda finished my thing so i can help (maybe)
SMODS:something(2) is the same as SMODS.something(SMODS, 2) in lua
i dotn think it worked
yea i know its just
easy to forget
or not notice that you used the wrong one
dollars = ...
im trying to do this but evidently i cant figure it out #💻・modding-dev message
for smods you never have to use :
what do you have as your code rn
dollars = card.ability.extra.dollars
?
ye.
i didnt read your first reply in regards to context, gimme a sec to fix that
How would I force glass cards to always shatter with a joker?
can't find it in the wiki so idk, ill keep searching
in the context.destroy_card context you can return { remove = true }
if the other card is glass
not working but not crashing either
no no
you tried passing the whole context?
just SMODS.score_card(v, context)
game froze and crashed when i played the hand
oh right
if v ~= card then
SMODS.score_card(v, context)
end
cus it's scoring itself infinitely I assume
i mean if its context.cardarea and scoring think about it, youre re scoring every card every frame its scoring
is it safe to update lovely 8 before i forget (as a modder i mean)
yes
sick
lowk just do it, everyone is probably gonna do it so if your mod doesn't work in 0.8 you should adapt it anyway
i updated and havent run into any probs
well its no longer scoring itself infinitely. acts kinda weird when its not the last card though
oh nvm i guess its technically normal
what happens if you score two of them tho
updated
you know what will happen
fuck
:3
:3
maybe score_card isn't such a great idea
alr i think i know how to prevent it at least
i would do this
context.prefix_retrigger = true
SMODS.score_card(v, context)
context.prefix_retrigger = nil
and then check that
that allows the card to retrigger itself too without doing the loop
"nice computer
it'd be a shame"
i love my computer
i might be stupid but
anyone know why these info queues have no text inside them? in the localization file, they all have their name & the text "placeholder"
stupid prevention method is both stupid and works but its stupid so i hate it and im gonna try this N's way
zociac deck 🥀
uops
to the surprise of absolutely NOBODY /ref
I also love your computer
yeah my stupid prevention method was just not retriggering cards if they have the sticker which just isnt any fun
it is a good computer
how are you appending them to info_queue
like this?
decks is a list of decks that are valid for this voucher
you want and not context.hmlt_retrigger in your check
i feel like im doing something wrong here
How would I prevent a joker from showing up in shop? (card packs and such as well, like legendaries)
(crashes upon skipping blind)
if you put them in Other do they work
as in replace quantumparticle_descs with other?
return false in in_pool
yes, and move one there to test obviously
i think it's because descriptions get parsed beforehand
still blank (i just renamed the section to other & changed it in the voucher loc txt)
i forgot to ask again what is the structure of a info_queue
info_queue is a list of tables
you can append a center or a table specifying a localization set and key
can i see the code again and how the loc looks
oops nvm im stupid i cpitalized it wrong in the loc txt
ty
adding repetitions would make it look good but also be way more complicated to do
im gonna stress test this thing rq because i know someone's gonna end up doing what im about to do and i wanna make sure it doesnt break shit
is there a simple way to change how many joker slots a custom joker takes up? like without negative
oh its stupid and actually nullifies the purpose of the sticker entirely
or how can i make it so it naturally adds a joker slot i guess
that makes one of us (opening my instance keeps defaulting to the basegame exe)
oh boy its time to do the most weird thing of this whole ordeal (i finally get to use the sticker randomization for my tarot card)
do i randomize outside the for loop
i imagine i randomize outside the for loop
like with naturally you mean use a function and not do G.jokers.config.card_limit = G.jokers.config.card_limit + 1?
how to fix (tells me aspect_st is nil)
i just want to make a simple info_queue for my joker, it's kinda hard the wiki lowk doesn't explain very well
i just meant without having it be negative
config = { extra = {mult = 12}},
loc_vars = function(self, info_queue, center)
return { vars = {center.ability.extra.xmult}}
end,
calculate = function(self, card, context)
if context.other_card then
if card.edition.key and card.edition.key == "e_foil" then
return {
play_sound = ("batrocities_MichaelKaboom"),
G.E_MANAGER:add_event(Event({
trigger = 'after',
delay = 0.3,
blockable = false,
func = function()
card:remove()
return true
end
}))
}
end
elseif context.joker_main then
mult = card.ability.extra.mult
end
end,
}
i dont think i did my code right, i wanted to check if card is foiled but it just crashes and tells me smth about edition
then you can just do G.jokers.config.card_limit = G.jokers.config.card_limit + 1 until you find a better solution
you need to check if the edition exists first, for example if card.edition and card.edition.key == blahblahblah
oo ok, and i put it in the function(self) portion?
you put it wherever you need, recommended after an if to not go around adding 1 joker slot per frame
oo ok thanks for the advice !
so i put it before the context.other_card?
you can do that or you can just check for it before checking the key, that way if you use( and operator)it will not go trough and crash (i think)
ok thanks
Nvm just had to reinstall smods
had some help in https://discord.com/channels/1116389027176787968/1381896173970784329, but it just kinda made it worse and into this
How would I check whether or not all played cards are scored?
it looks like your info queue is missing variables
seems like you forgot extra on loc_vars
like you do config = {extra = {retrigger_blahblahblah}} but
then on loc_Vars
lenient_bignum(self.config.retrigger_chance)
you have a vars table below where you call the info_queue, but you dont fill it with anything
like its just empty rn
i mean that would still return a table as a bignum is a table
like self.config.retrigger_chance aint it, its self.config.extra.retrigger_chance
return it wrapped under number_format
oh i didn't know i was supposed to do that
what?
there's like 3 people trying to give me different advice rn
lowk i think im sleepy dont hear me out
if you wanna set info queue vars you have to specify specific_vars iirc
nr sure on what to do
well i dont see why else it would be returning an empty table in your info_queue
i was just following what somebody else said
does it display fine in the edition collection itself
i don't really know how this works
in the edition collection?
oh
welp
???
SMODS.Edition {
disable_base_shader = true,
disable_shadow = true,
key = "four-dimensional",
weight = 0.2,
shader = "fourdimensional",
in_shop = true,
extra_cost = 5,
sound = {
sound = "crp_e_fourdimensional",
per = 1,
vol = 0.5,
},
get_weight = function(self)
return G.GAME.edition_rate * self.weight
end,
config = { extra = { retrigger_chance = 4, retriggers = 24 } },
loc_vars = function(self, info_queue, center)
local chance = center and center.edition and center.edition.retrigger_chance or lenient_bignum(self.config.extra.retrigger_chance)
local retriggers = center and center.edition and center.edition.retriggers or lenient_bignum(self.config.extra.retriggers)
return { vars = { card.extra.ability.extra.retrigger_chance, card.extra.ability.extra.retriggers } }
end,
calculate = function(self, card, context)
if
context.other_card == card
and (
(context.repetition and context.cardarea == G.play)
or (context.retrigger_joker_check and not context.retrigger_joker)
)
then
local should_retrigger = pseudorandom("crp_fourdimensional") <= G.GAME.probabilities.normal / lenient_bignum(self.config.extra.retrigger_chance)
return {
message = localize("k_again_ex"),
repetitions = should_retrigger and lenient_bignum(self.extra.config.retriggers) or 0,
card = card,
}
end
end,
crp_credits = {
idea = { "Glitchkat10" },
art = { "Glitchkat10" },
code = { "Glitchkat10" },
},
}
line 530 is
return { vars = { card.extra.ability.extra.retrigger_chance, card.extra.ability.extra.retriggers } }
is that not right
oh wait
yeah one sec
i just copied from blurred (cryptid) for the most part
why is there extra extras here
h
yeah that's what i just fixed
k
That shader looks cool
it was literally an accident
Reminds Axy of that one meme involving a falling waffle
Isn't 4/24 just 1/6?
auguahsuaguah
yeah, it's supposed to be 1 in 4 for 24 retriggers
kept it for the funnyt
okay um
so what do i do here? description seems to have gotten fucked
(supposed to be 1 in 4 chance for 24 retriggers, not 4 in 24 chance for nil retriggers)
that seems like an order issue
yeah
yeah order issue
but idk why
stick in a (G.GAME.probabilities.normal or 1)
at the first one
assuming the format goes #1# in #2# does #3#
yeah you should be using 3 variables but you got two that seems to be the issue
yeah
no?
okay
i think it works now
you use retriggers and retriggers_chance
can anyone tell me what's wrong here?
(supposed to trigger that function when there's a joker to the right of it)
okay uhh hovering over a four-dimensional joker does this?
SMODS.Edition {
disable_base_shader = true,
disable_shadow = true,
key = "four-dimensional",
weight = 0.2,
shader = "fourdimensional",
in_shop = true,
extra_cost = 5,
sound = {
sound = "crp_e_fourdimensional",
per = 1,
vol = 0.5,
},
get_weight = function(self)
return G.GAME.edition_rate * self.weight
end,
config = { extra = { retrigger_chance = 4, retriggers = 24 } },
loc_vars = function(self, info_queue, center)
local chance = center and center.edition and center.edition.retrigger_chance or lenient_bignum(self.config.extra.retrigger_chance)
local retriggers = center and center.edition and center.edition.retriggers or lenient_bignum(self.config.extra.retriggers)
return { vars = { G.GAME.probabilities.normal or 1, center.ability.extra.retrigger_chance, center.ability.extra.retriggers } }
end,
calculate = function(self, card, context)
if
context.other_card == card
and (
(context.repetition and context.cardarea == G.play)
or (context.retrigger_joker_check and not context.retrigger_joker)
)
then
local should_retrigger = pseudorandom("crp_fourdimensional") <= G.GAME.probabilities.normal / lenient_bignum(self.config.extra.retrigger_chance)
return {
message = localize("k_again_ex"),
repetitions = should_retrigger and lenient_bignum(self.extra.config.retriggers) or 0,
card = card,
}
end
end,
crp_credits = {
idea = { "Glitchkat10" },
art = { "Glitchkat10" },
code = { "Glitchkat10" },
},
}
530 is the loc_vars return
ok i have another question, is there a way to make a joker count for 0 joker slots ?
actually hold on i might've fixed all of this
if not then its ok, but i kind of want to make some jokers that dont change the slots being taken up at all
ok since this is an edition i believe those don't take from card.ability
yeah what [desert plant] said
self refers to the center definition here
so you'd reference self.config.extra
though card.edition also works i think
though its still best to fallback to self.config
it is easier to read to just use config
fun fact stickers have a similar issue where you need to use self.config since stickers in base game for the most part work without variables needing to be set
okay i got four-dimensional to work correctly again
SMODS.Edition {
disable_base_shader = true,
disable_shadow = true,
key = "four-dimensional",
weight = 0.2,
shader = "fourdimensional",
in_shop = true,
extra_cost = 5,
sound = {
sound = "crp_e_fourdimensional",
per = 1,
vol = 0.5,
},
get_weight = function(self)
return G.GAME.edition_rate * self.weight
end,
config = { extra = { retrigger_chance = 4, retriggers = 24 } },
loc_vars = function(self, info_queue, center)
local chance = center and center.edition and center.edition.retrigger_chance or lenient_bignum(self.config.extra.retrigger_chance)
local retriggers = center and center.edition and center.edition.retriggers or lenient_bignum(self.config.extra.retriggers)
return { vars = { G.GAME.probabilities.normal or 1, chance, retriggers } }
end,
calculate = function(self, card, context)
if
context.other_card == card
and (
(context.repetition and context.cardarea == G.play)
or (context.retrigger_joker_check and not context.retrigger_joker)
)
then
local should_retrigger = pseudorandom("crp_fourdimensional") <= G.GAME.probabilities.normal / lenient_bignum(self.config.extra.retrigger_chance)
return {
message = localize("k_again_ex"),
repetitions = should_retrigger and lenient_bignum(self.config.extra.retriggers) or 0,
card = card,
}
end
end,
crp_credits = {
idea = { "Glitchkat10" },
art = { "Glitchkat10" },
code = { "Glitchkat10" },
},
}
still this though
loc_vars = function(self, info_queue)
info_queue[#info_queue + 1] = { key = "e_crp_four-dimensional", set = "Edition", config = { extra = { retrigger_chance = 4, retriggers = 24 } } }
return { vars = { } }
end,
umm what do i change
if it displayed something earlier you were probably on the right path
you will need the variables inside the edition anyway
how?
actually aren't editions centers too
i've got no idea
whats stopping you from just using G.P_CENTERS.e_whatever
because the key is four-dimensional
which messes it up, and i want it to stay as that exact key
what
G.P_CENTERS["shit-with-dashes"] works fine too, no?
i don't believe so
hold on
well that won't make sense if it don't
[this](#💻・modding-dev message) returned [this](#💻・modding-dev message)
i'll try it again
alr gn
You cannot sleep now, monsters are nearby
oh it just magically worked
well i have no more issues
thanks chat
I love modding
Bumping [this](#💻・modding-dev message) but without the super reply
(genuine crash log btw. It failed to write anything else)
average wine on steam deck experience
me when i
Question: I changed the version to 1.A, and it's saying 1.A.0 is not a version later than 1.0. How does that work?
A > 0 in ascii text though
I love thinking im done working on a joker then testing it with literally any other joker and realizing there's massive issues!!!!
No? I need the A
why do you need the A
Because the mod is literally called 1.A.0c
It changes the GAME version too because y'know... split update style mod
That's the issue
I don't wanna get rid of the custom version
you lost me
Okay
You know how one of the dependencies is Balatro's Game Version
I changed the game version
uh huh
How do I fix without getting rid of my version and without forcing them to make new version for compatibility?
no
yes
So they just gotta cope then?
seems like
RIP
i love stickers
I'm still more confused why it's saying 1.A < 1.0 though. that's the weird part of it
I checked Hex, Unicode, Ascii, A should be larger than 0
numbers before letters probably
if we assume A = 0-1, then use subsitution 1.0-1 < 1.0
config = { extra = {mult = 12}},
loc_vars = function(self, info_queue, center)
return { vars = {center.ability.extra.xmult}}
end,
calculate = function(self, card, context)
if context.other_joker then
if context.other_card.edition and context.other_card.edition.type == 'e_foil' then
return {
mult = card.ability.extra.mult,
play_sound = ("batrocities_MichaelKaboom"),
G.E_MANAGER:add_event(Event({
trigger = 'after',
delay = 0.3,
blockable = false,
func = function()
card:remove()
return true
end
}))
}
end
elseif context.joker_main then
return {
mult = card.ability.extra.mult
}
end
end,
}
i was wondering if i did the sound code right, the code also doesnt trigger if another card is foiled?
All fixed
No joke, myself and Aikoyori found the same solution:
Instead of changing the version itself, find where the UI loads the text and load in the custom version that way
ðŸ˜
you realy like that emote
A story of six emotes
Person crying, is set on fire and dies, the skull learns it's trans and does a big think, then uses heart emotes
After many trials and tribulations, becomes an imp
I wanna hear my story :3
Uhmmmmm
A star becomes a meteor, a cat reads about it on the internet and gives it a like, someone is crying because the meteor is falling on them. Various other reactions on the thread reporting the meteor, and then some nerd comes in and verifies that this is indeed a meteor
Also the poster gets a verified checkmark but it's pink
I wasn’t expecting the second row to be part of it, but thanks
My favorite balatro version
Beelatro
trials... and.... tribulations....?
me when im a california lawyer and my opponent is hispanic
Didn't wanna figure out the rest of the emotes, so handwaved them :p
ace attorney reference
Haven't played it
do it
So many games to playyy
god ive still gotta finish taking ownership of like half the tarot cards
Had to do this for variable selection limit ough
Unrelated, my frequently used
does something like this work or do i need to change the config as well
Should be fine
Consumeables are still given the ability table version of the config values, most of the vanilla ones just primarily use the ability.consumeable reference to the center
will that affect anything majorly or will reusing vanillaremade code probably work
No clue
i wonder why the horse
i think the fandoms im in are quite obvious
I'm trying to decide something. Would yall be willing to help?
Funny how I never ended up in the Homestuck/Undertale fandom train. I feel like both of them would probably be up my alley but guess the 2010s just had me elsewhere
Ironically the most I know about both of them is various Tumblr mutuals of mine anxiously awaiting both fandoms to spew out tgirls
Should genders (or no gender if they're agender) be applied to all playing cards automatically? Or should only certain playing cards be gendered?
I feel like I need more context
here are mine
dont worry about some of them
Shout-out to bowling emoji. I'm going bowling tomorrow morning
Ah! So I'm adding Genders into Balatro, which are a new modifier for playing cards. By themselves, they do nothing. But there's Jokers, Consumables, and other mechanics that do stuff with genders
are u good at bowling
ive only gone 2x and i used bumpers both times
cause i was a child
But point being, context wise, I don't know what "automatically" means. Not do I know how else it would apply them
automatically probably just means auto applied to deck at start of run id assume
Oh by automatically. I meant. "All of them. Every single one in the game." Versus "There's a chance for cards to get them"
You tell me
Basically this, yeah
thats my bestie baddie epic gamer kino gamer making strides nobody ever seen before historically since the game of bowling released in pre alpha
I guess it'd make sense for cards to be gendered just by default rather than it being selectively applied
I wasn't sure, but that's what I was thinking yeah. Just wanted a second opinion
Fwiw I used to be professional before I went to college
i bet i could lose to u in bowling
You probably could yea
but id absolutely sweep you in laser tag
After I get genders working, I'm gonna try and get Pikmin working once more
I just needed a break from making my Balatro Mod because of Pikmin. They were so hard to get the storage feature working on playing cards
But I'm gonna be more reasonable working on them this time
I'm up to some more weird shader bullshit because of weird pixel transformations that have to do with the dissolve mask
oh god i just remembered i now have to start dealing with shaders
dear lord above save me
i have to make at minimum one for an edition, and probably more once im comfy
Oh yeah. I actually enjoy coding. I forgot about that.
I actually recently enjoy coding which is nice because my other two hobbies make me want to stab myself to even think about rn
Drawing sucks, writing sucks. I guess programming's all I've got for now
I guess I should specify "productive" hobbies
every hobby is productive because it produces enjoyment to your life
My other hobbies are slow and uneventful but that's just the breaks when you're living with clinical depression
Can't do much aside from managing it or replacing my whole brain
i feel that
i got that anxiety and ptsd too bundled
we make do with what we got
i believe in you
Yes.
hi something
Is it possible to discount rerolls, like clearance sale but for rerolls?
I would look at Reroll Surplus and Reroll Glut in vanilla remade: https://github.com/nh6574/VanillaRemade/blob/main/src/vouchers.lua
How would I get a sticker to apply to every playing card? I tried looking around and I didn't see anything
Mainly, I'm stuck with getting it to apply to deck at the start of the run. I can get it to apply to every booster card, at least
for k, v in pairs(G.playing_cards) do SMODS.Stickers["modprefix_key"]:apply(card, true) end
And where would I put this?
I tried putting it in a game_start_run_ref style hook, and it just crashes
If it's for a deck you would put it in apply?
Hook it in the Back:apply then maybe