#💻・modding-dev
1 messages · Page 205 of 1
X means index
usually i,v is more used, with i stands for index and v stands for value (i think)
i see
{
a = b
}
a in this case in index, while b is the value
index can be a string or a number
i dont actually think this works for playing cards
while value can be either a string, a number, or even a table
fixed
@rose dragon how's that going?
yeah it works
indentation is terrible though
just some lua stuff which i dont know how to do rn:
i want to make a table combining both of "Asta" and "AbsoluteNecessary", and i want the new table to be the exact same order of everything in AbsoluteNecessary, then everything from Asta from top to bottom
its prob obvious and im too dumb to not realize it
i tried running the Asta table through a for i,v loop, then basically did smt like:
NewTable[i] = v, but the order of the new value is completely random due to the index not being a number i suppose
if nuclear deck was actually good
jesus
change the "is only reveal" to "only reveals"
i didnt see that lol
There’s a smods function near the top of utils.lua that’ll do this
oh, thats very convenient, thanks :D
does SMODS.create_card work for playing cards?
i thought so, ty
anyone know where the return value of a joker's calculate() is used?
Does anybody know how to apply a purple seal to a card
What are you trying to do?
card:set_seal(“Purple”) from memory
Is there a way to check if a card has ANY seal whatsoever?
if card.seal then iirc
what does check do in the debuff_hand function
Ty!
add, sub, mult, exp, and tet
Had this crash, I have this code:
SMODS.Joker {
key = "stamped_document",
loc_txt = {
name = "Stamped Document",
text = {
"Adds a {C:attention}Purple Seal{} to a random card in",
"your {C:attention}full deck{} at the end of round"
}
},
rarity = 1,
atlas = "joker_atlas",
pos = { x = 1, y = 0 },
loc_vars = function (self, info_quene, card)
info_quene[#info_quene+1] = G.P_SEALS.Purple
end,
calculate = function (self, card, context)
if context.after then
local r_card = math.random(1, #context.playing_cards)
r_card:set_seal("Purple")
end
end
}
Is there a way to trigger something on joker load?
You're looking for G.playing_cards, I believe
Thanks!
card no reset pls help
Put it in an Event
ok
silly question, people on my screen
is there a way to directly access a chip_mod or mult_mod from other jokers? Something that's like G.jokers.cards[1].chip_mod
No
because for some reason jokers like Blue Joker calculates chips like that and i'm going insane over it
damn
What do you want to do?
i wanted to dabble in balatro modding and i made a nice working legendary card where it basically takes all the +mults, xmults and +chips of other jokers and basically add it to the card, like blueprint but better
on most cards, like the flush joker cards and the ones giving straight up mults, its actually working really well, but on some obscure ones like blue joker and i assume swashbuckler, where they dynamically calculate the mult, they don't work too well, the only thing i can get from cards.ability is the increment (like how Blue Joker gives +2 chips for every card in the deck, so I only get the 2, not the actual total chips value)
there's no way to consistently get those values, especially with other modded jokers
I don’t think Balatro is setup to make that effect easy to implement
damn
unfortunate
just retrigger everything again 
unless you force a naming convention across every modded joker ever of course
honestly i might do that as a workaround lmao
Break into people’s house and change their code
TRUE
asadasag
You can also just double the score at the end
14 competing standards? i'll make it one
15 competing standards later…
if you do I'll start keysmashing every variable of mine
no no
i meant to say
i'll force everyone to make that 15 into 1.....
so 16
LMAO
many such cases
maybe
but its not exactly that the chips themselves are being used, its the chips of other jokers
what if you saved every joker's calculate function
Balatrostuck had an effect that memorized the Chips granted by every effect
I have a problem with event manager. Can help someone pls?
local blind = SMODS.Blind({})
function blind:set_blind()
-- This works fine
local card = create_card("Voucher", G.play, false, nil, nil, nil, "v_magic_trick", nil)
G.play:emplace(card)
card:start_materialize()
card:redeem()
G.E_MANAGER:add_event(Event({
func = function()
card:start_dissolve()
return true
end,
}))
delay(0.5)
G.E_MANAGER:add_event(Event({
func = function()
-- Here, `G.hand` becomes visible which looks not good while i'm doing my stuff
-- It's a problem. Is the way to prevent this?
local card = create_card("Voucher", G.play, false, nil, nil, nil, "v_illusion", nil)
G.play:emplace(card)
card:start_materialize()
card:redeem()
G.E_MANAGER:add_event(Event({
func = function()
card:start_dissolve()
return true
end,
}))
delay(0.5)
return true
end,
}))
end
you could store already triggered values very easily
but it wouldn't be able to catch things that happen after it
does a before event work?
yeah that's what i meant
the calculate functions are there, and pretty sure it'll give me far more accurate numbers, can i basically just call them to return the values to use?
Well, when I tried it, event retriggers inself infinitely
it shouldn't be doing that unless you're missing return true
sounds complicated because you need to save everything else about the card
what eremel said makes more sense
very fair, not the first time i'd dabble into some weird magic to get things working but i don't want to somehow make balatro explode my pc
how would one do that though, i don't have a good idea or a reference to get to
I wouldn't recommend doing extra calculate calls either
Also, inserting event before will not work. If event have inside smth like card:redeem(), it will be inserted to the end anyway
Just set the Joker retrigger options to true and return true
you'd need to look into how post triggers work
then you can scrape the table that the jokers have returned in the joker_main context and extract the values you're looking for
this is assuming your joker is storing them and applying them all at once
oh yeah it stores and applies them all at once
if you wanted it to work for all your jokers regardless of positioning you could alter how it works so that it scores them as they are scored
...honestly not bad at all
i mean it still achieves the same target, just that it does it one by one instead of all into one
all in one is fine, it'd just only work for the jokers to the left of it
yeah i can see that
but wait wouldn't there be a way where the joker can be executed after a hand is played?
like basically the other jokers get to do their triggers and then after they are done and after the hand is done playing my joker card would calculate it all in one
like how in seltzer it decrements down after each hand played
heck yeah
that way i dont have to worry about positioning AND i can get to achieve the desired effect of it adding all of the chips and mults in one go instead of it just acting like a stronger blueprint
so you want to do the post trigger stuff looking for joker_main to collect your values
Where can I find smods change log?
yeah thats what i'm going to figure it out
even the editor is blaming you lmao
😭
is the problem that the event is not returning true
wrong place, my bad
Should I change it to "after scoring"?
Is it possible to make a voucher that makes it possible to play 6 cards instead of five?
it is
i think its alright as it is, sorry for not noticing this before 💀
How? Is there a variable i can change like G.Game.cardsplayedmax = 6?
i dont think thats how you would do it, but there are mods which have done the same already
Like?
i actually dont remember if Cryptid does it
but i do remember a voucher which does exactly what you want
lemme check
ah, it does have it
6
Not Sticky Fingers smh my hand
Myst did it for Booster packs somewhere here https://github.com/Mysthaps/BalatroMods/blob/main/Steamodded/MystJokers/indiv_jokers/polydactyly.lua
literally 6 mods that do this select 6 cards thing
jojo reference...
"here" being that repo
yeah
and i still equally dont like the idea of being able to select 5+ cards, personally
jojo reference smh mza hando
please be fair to my mod
but i actually heard about a mod which uses this feature just to discard and other stuff, not to play 5+ cards hands which i prefer much more
once again, aiko, scrabble barely qualifies as poker
💔
me and xChips
/block Bepis
xchips isn't a variety though
xChips is just Mult but worse
you wont believe how hard it is to add 25+ jokers, each having at least 6 additional abilities without them being bland 💔
its xmult in a coat
ye, but blue xmult ❤️
mult*
i like blue
xMult is xxChips
what?
what
Mult and xChips both multiply Chips
xchips and xmult are the same thing
is this correct 😭
I see you don't understand basic multiplication
that sounds so dumb but i somehow understand it
xchips sfx is actually really nice
and xChips also applies immediately, which makes it worse
you'd prefer if xChips applied last, so at the same time as Mult
that makes Mult just better than xChips
Let's say you have x2 Chips and 5 then 5 Chips
(5*2) + 5 is worse than (5+ 5)*2
Mult does the latter always
So it's better than xChips
oh, so you mean the order in the return{} stuff?
No, just the order of how it's scored
Photograph also applies xMult earlier than you'd want
Compare to other xMult Jokers like The Duo
The order of the effects doesn't depend on the order in return
I think he's talking about having it on playing cards
Photograph isn't a playing card
which is the specific scenario where xchips differs from xmult
It just applies it during the timing of playing cards
But that's not the point
Because Mult only multiplies Chips after all Chips have been added
So any scoring context where xChips could apply is earlier than when you'd want it
because you can always add more Chips before Mult multiplies Chips
That's the last step of scoring
It comes even after Plasma Deck
that's not at all how multiplication works
i thought you meant, like
return{
chips = 50
xchips = 2,
}
and it runs still runs xchips before chips, which i can see the issue here, but if its just some stuff relating to context then i dont think ive found any problem relating to that
If you multiply Chips earlier, you can always add more Chips later
i put xchips in joker_main and i still see it doing exactly like xmult
that makes 0 difference
It does, because you could add Chips after multiplying xChips
But it's physically impossible with Mult
say you paly a hand that gives 50 chips and 5 mult, and have a X2 chips joker, it'd give 100 x 5 = 500. If it was X2 mult, it'd be 50 x 10 = 500
exactly the same
I don't see how that's related
then what the fuck are you talking about
This
Regarding adding 5 Chips twice and applying X2 Chips
...im too dumb and my brain loads too slow to even be a part of this conversation, sorry everyone 🙏
yes but that's misordered
Yes but you can't misorder Mult
Because it's the last step of scoring
So Mult is always multiplying Chips at the best possible timing
How could i add this with the hands table? like combine the two
i_hands = { ["Flush Five"] = {s_x_mult = 1.25, s_x_chips = 2, i_level = 0}, ["Flush House"] = {s_x_mult = 1.3, s_x_chips = 1.8, i_level = 0}, ["Five of a Kind"] = {s_x_mult = 1.25, s_x_chips = 1.75, i_level = 0}, ["Straight Flush"] = {s_x_mult = 1.3, s_x_chips = 1.8, i_level = 0}, ["Four of a Kind"] = {s_x_mult = 1.25, s_x_chips = 1.75, i_level = 0}, ["Full House"] = {s_x_mult = 1.2, s_x_chips = 1.7, i_level = 0}, ["Flush"] = {s_x_mult = 1.1, s_x_chips = 1.3, i_level = 0}, ["Straight"] = {s_x_mult = 1.25, s_x_chips = 1.75, i_level = 0}, ["Three of a Kind"] = {s_x_mult = 1.1, s_x_chips = 1.5, i_level = 0}, ["Two Pair"] = {s_x_mult = 1.1, s_x_chips = 1.5, i_level = 0}, ["Pair"] = {s_x_mult = 1.1, s_x_chips = 1.3, i_level = 0}, ["High Card"] = {s_x_mult = 1.1, s_x_chips = 1.2, i_level = 0}, }
Which hands table?
G.GAME.hands
What about modded hands?
of coruse you can misorder mult
How? It's the last step of scoring
You can't add Chips or Mult or xMult
afterwards
you have a joker that is + mult and a joker that is Xmult and you put the xmult first
There isn't a consumable for those, if they're were they could be added to i_hands.
I'd say that's misordering xMult, but it's not even relevant to the conversation
I'm talking about Mult multiplying Chips
not xMult multiplying Mult
what he means is that when your total chips for a hand are evaluated, it will multiply your total chips by your total mult
the last step of scoring takes Chips, takes Mult, multiplies those together, then assigns that number to your current score
that is always the last step and in essence, correct
so how does that make xchips the same as +mult
but no, xchips is not the same as +mult, it's the same as xmult except for plasma
and thus worse
and what do you want those values in that table for?
You can already access them elsewhere
Do I need to worry about nil check?
What do you mean?
genuinely I don't think you understand how multiplication works
i dont think so
multiplication is commutative, my friend, a base flush with 2X mult is 35 * 4 * 2, a base flush with 2X chips is 35 * 2 * 4, that's the same
source doesn't matter, because both +chips and +mult exists which can interfere with that order
This game base form of scoring have cards add Chips
The order of addition and multiplication matters
I have consumables that call for those vaules in G.GAME.hands[hand] so i need to assgin those vaules to the hands.
You want to multiply after addition to maximize your score
this game has base form of scoring where cards can have Mult
Hence why Mult is performing the same job as xChips (multiplying Chips) but better
it's best to ignore it. in a vacuum, unless you are plasma, XChips and XMult are equivalent
since card is always your joker, and extra should always exist in which case
As in, do I need to do all these stuff?
and xMult is acting as xxChips by multiplying Mult
Although, I could actually just do that considering where I placed the list.
nope, the "card" in calculate is the joker which is calling the calculation
you only really need that when you are checking for other cards other than itself
at that specific spot, no
though, having something like that is certainly useful for quick-checking context.other_card
what you're saying would only be true if xmult happened after the game did chips x mult
What about loc_vars?
I usually do card and card.ability and card.ability.extra in Events
me too
or maybe card and not card.removed
monkaS
but smt like checkCard(context.other_card) seems a lot cleaner imo
any card that exists has an ability table
if your center has an extra table in its config, they do
extra is a stupid vanilla convention
Deal with the Angel 💔
loc_vars gets fake cards sometimes, but they're shaped closely enough like a regular card that you don't need to worry about this for accessing config values
Also wtf is this xchips discussion
its about the order of how they trigger or something
im actually too dumb to be a part of that 😭
trust me
too late
my condolences
xChips is only comparable to xMult if you don't add Chips in-between applying xChips, but it's that possiblity that makes xChips worse than Mult. If you apply xChips after you'd added all Chips you could, then it doesn't matter if it's xChips or xMult (unless you have both I guess, since they multiply together too)
I think it should be written as Xchips
xMult is only comparable to xChips if you don't add Mult in-between applying xMult, but it's that possiblity that makes xMult worse than Chips. If you apply xMult after you'd added all Mult you could, then it doesn't matter if it's xMult or xChips (unless you have both I guess, since they multiply together too)
💀
the default ordering (within the same calculation) is +chips, +mult, xchips, xmult
The ordering depends on the context
the whole discussion hinges on the technicality that base playing cards have innate +chips but no innate +mult
am i the only one genuinely unable to keep up with this
it's not technically wrong it just doesn't matter by ante 8
it also has no bearing on the claim that xchips is just +mult
that's just categorically incorrect
I mention this because Photograph exists
that claim is insane
that is the one scenario where xchips are slightly worse than xmult
i agree
however it would still be much better on average than +mult
I'm talking about Mult; you're thinking of it as "additive Mult"
xchips is often much better than xmult at early game due to how much chips sources give them
what is being talked about
like, common jokers give uhhhhhhhhhhh +80, +100, smt like that ❤️
there is no practical difference between xmult and xchips, let alone any advantage to xchips ever
actually, early is where XChips is categorically worse than XMult if you do the math
both multiply your score
if the source is a joker, then it doesn't matter
its better to increase the lowest variable, forgot that
unless you're on plasma deck, then xchips can be better than xmult
Photograph:
xchips argument, order and smt stuff
oh and yes, there's plasma but plasma is special
if you're multiplying it by the same amount, no
No
you know exactly what i mean, let's not pretend
that only works like this for additive scaling
but if you got 3000 chips and 1 mult, isnt it better to get a +mult joker
I think this just boils down to victin arguing over a technicality he invented for the sake of arguing
Yes, but you're explaining it to someone else. So I don't think it's helpful to say something incorrect
flat additive is again, different
i shouldve specified what i meant, sorry
flat additive is always increase the lower one
:(
flat mult is much better than flat chips here
Well, if you get a +3000 Chips or +1 Mult Joker it's the same
but xmult vs xchips doesn't matter
So +13000 Chips will be better than +4 Mult
flat vs flat it's whatever increases the lower amount (and some magnitude considerations)
x vs x it's whatever you have less later scored additive of
damn another xchips vs xmult discourse
all things considered, xchips is basically another version of xmult that can be better or worse in certain niche scenarios
but if we're looking at strictly joker_main, there is never a difference between same magnitude X
...what do you mean another
What you can say about additive Chips versus additive Mult is that, the larger one value is, the better a small increment of the other is
I don't see how that matters as it was only added into smods because modders wanted to use it
And I support the decision
I just said I disliked it, and compared xChips to Mult
How do planet cards (Lvl:num) color change based on the level?
- blue is cool
there's plasma-like mechanics you can build around it that disrupts the balance but in vanilla, xchips exists, it's called xmult
I'm not sure why there needs to be an argument then
I think victin is comparing xchips to the final total mult for some bizarre reason
Because I think xChips is redudant with vanilla mechanics
and that's part of it
The final total Mult multiplies Chips after all Chip additions
So it's stronger than xChips anyways
since you could add Chips after applying xChips
the final total mult isn't a mechanic though
Hold on
Why is it so fat tho?
I have a patch to change those colours, but not the time to sift through it. Do you want me to send you the file so you can find the code you want?
your atlas is a weird size
use a 71x93 atlas
95*
71x95*
meh
Yea, i'll look though it
But the sprite is 59x93
Vanilla uses a lot of empty space
vri which sprite are you on
yeah the sprite size accounts for empty space
voucher your center
How? And how do i get rid of the
voucher.center
the ghost of my voucher
the ghost of "oops all 6s" is hunting you for skinning it alive, and put it on a voucher...
there should be a 6px transparent border on both sides of your voucher sprite
is this what you meant btw?
...oh nvm
its the merge_list i think
How do i center my voucher?
merge_list that's the one
Just move it in an image editing software
until it's centered horizontally within a 71 by 95 box
i love smods for adding merge_list 🙏
never in my life has code treated me this well
is this how i do it?
I don't understand the behaviour when t == false
I think they need to be within a list themselves
If t == nil, then it returns defaults, but if t == false then it returns nil?
I can understand the philosophy. I'm asking if that's what it's doing
how can i access the return table? is it like context.post_trigger.ret or in a different way? help a guy out i'm 💥 rn
context.other_ret
Should be context.other_ret
is this how to do a blueprintesque joker again
huh i see
I think the error-avoiding way to do it would be
if context.post_trigger then
local ret = context.other_ret
end
OOOOHHHH
okay okay i gotcha
something like this
yeah no lua is being mean to me i probably have been doing null checks in every single line lmao
you might want to avoid context.other_ret being nil anyways
oh I was planning on making a blueprint helper function
ahead of ya
forgot local
maybe I should do that today
unless you created it outside of that block
but is this correct twt
twitter?
TwT
nah i didn't do it outside the block, good eye
probably should set context.blueprint_card to nil too
also you can write things like
var = var + (var_mod or 0)
oh? wait lioke instead of the nil checks?
let me grab my blueprint effect
Yes
Use SMODS.merge_defaults?
to merge the tables?
then return them
or would that not work?
swag ty
should i enable that somewhere in SMOD optional features or what, because i think the other_ref returns nil because it doesnt return at anything in debug messages (i used table.concat for this)
yes
okay, to prevent from asking a lotta questions about this, is there like a page in wiki somewhere that tells all the things i can enable or not yet?
I don't think it's on the wiki yet
like i did enable post_trigger, and it works
and tried to enable other ref like that but it still keeps on giving me null
you can try searching the source code instead https://github.com/search?q=repo%3ASteamodded%2Fsmods+optional_features&type=code
just post_trigger is needed
okay all good
it still does keep on giving me nil other_ref though, can't access the MULT MODS gRRRAAAAAHHH 💥
i'll give the mod a pause though, i'm going to be busy with something soon anyways, but if theres suggestions i dont mind listening to them
So this code makes you able to select 6 cards, not play them. Any idea why and how i fix it?
And how do i make this voucher only appear once.
I did this to get around that
Wdym? Like can you show the whole Voucher code?
That's a patch that changes the line in the game code that prevents you from playing the hand
oh its a lovely patch thats all you need should work with anything reguards of the object type
Can i just put that anywhere?
No
You have to put it in a lovely file
[manifest] version = "1.0.0" dump_lua = true priority = 0
in a lovely folder
why do the mult and chips reset
you can't score before scoring
sobbing
actually, this is weird, I'm not sure why it even works this way
mult = mod_mult(G.GAME.hands[text].mult)
hand_chips = mod_chips(G.GAME.hands[text].chips)
check_for_unlock({type = 'hand', handname = text, disp_text = non_loc_disp_text, scoring_hand = scoring_hand, full_hand = G.play.cards})
delay(0.4)
if G.GAME.first_used_hand_level and G.GAME.first_used_hand_level > 0 then
level_up_hand(G.deck.cards[1], text, nil, G.GAME.first_used_hand_level)
G.GAME.first_used_hand_level = nil
end
local hand_text_set = false
-- context.before calculations
SMODS.calculate_context({full_hand = G.play.cards, scoring_hand = scoring_hand, scoring_name = text, poker_hands = poker_hands, before = true})
-- TARGET: effects before scoring starts
mult = mod_mult(G.GAME.hands[text].mult)
hand_chips = mod_chips(G.GAME.hands[text].chips)
so like this?
seems to me like SMODS forcefully resets to avoid any before-context scoring
thats vanilla
you could patch a context before mult, hand_chips, modded = G.GAME.blind:modify_hand(G.play.cards, poker_hands, text, mult, hand_chips) or before for _, v in ipairs(SMODS.get_card_areas('playing_cards')) do to serve your mod's needs
it's because context before is only used to level up hands
ah
it's not really a "scoring" context per se
Now it doesn't let me play the hand, even a 5 or lower hand...
you flipped the symbol it should be > not <
isnt it supposed to return a table?
i have no idea how to do that
it accepts a table of tables
what are your tables like before hand?
oh maybe this just merges tables that are integer indexed?
guys what should I make for my mod Medium?
My vision:
This is a mod that makes purple seals more frequent and useful, as well as spectral cards. I want this mod to have around 20 jokers and a few vouchers. I want uncommon-rare joker ideas that have unique ways of triggering them, for example selling the joker to get a boost, or get a good boost temporarily for a few rounds. Purple Seals should be mentioned in the jokers, hence the name of the mod, Medium (the spectral card that makes purple seals).
it must be for tables that dont have keys
💔
goddamn it
i wanted to somehow speed up the process of this
surely theres a better way 😭
Why don't you combine them normally and have a global table with the key order
i thought of that too, but the thing is i still have the other table, which is character's configs
they dont retain their orders when i add them in
.
wait nvm, i misunderstood your idea
yeah let me try
how does create_card() exactly work?
(especially in terms of creating a joker)
Whats the weight of black hole?
Oh, i meant the card
lmao
is it possible to put custom object in info_queue somehow????
as long as its in G.localization.descriptions, yea
so i can just put a cardarea there somehow
i saw someone adding blinds to info queue before
cardarea in tooltip 😭
How would a straight work with the evaluate pokerhand function
oh wow
actually how
put this in genrate_ui on the object that you are displaying in the tooltip
huh
so object type
so if i were to make a joker
i just
generate_ui = function()
that thing
end
yes
magical ui man
only if you're adding that joker in a tooltip, it doesn't add a tooltip to that joker
how did you figure it out that fast though, damn
so if i add a tooltip to that joker i can d othat
because I already messed with that to change some things
it's kinda confusing but here I'm adding the card area to sheou to display when hovering house
the j_joy_yokai_ash part, is that the card you are hovering or the card in the info queue?
the card inside the area
got it
i half-understand because N' basically hand-held me through the whole ui stuff at least twice now ❤️
i learned about how UI works with cardareas because eremel added one for jokerdisplay's config
i see, how i learn UI is that i take ss of every ui-related code here and there, then put them inside a channel in case i need that specific feature...
and uh, from experience of doing that, im slowing understanding UI more and more
I should probably take some time to document my code today
whats the variable to access the money of the player?
G.GAME.dollars
thanks
i dont think you return anything in generate_ui
you need to call SMODS.Center.generate_ui(self, info_queue, card, desc_nodes, specific_vars, full_UI_table)
yeah, it shows up when you put Netherite Pickaxe in another card's info_quueue
actually yeah that makes sense now that you say it that way
you can also put the cardarea in the main description if you don't check for full UI table main
letsgo
about to make this a util function
How would you create a straight if there was no.
your tables are cursed
👻
oh i figured it out, if the index of absoluteNecessary isnt int then i cant use ipairs
how do i sort them in order then, what
pairs doesn't guarantee order
yeah
im trying to put all the keys in order
uh, this
surely i dont manually type them in
can i do that?
you can
just use vscode's regex
and then theres the thing with characters' config too, im also supposed to order them
phew!
can't you have the same loc_vars for everyone
yeah you might need to do it manually
how did bro appear there
i really hope no one will look at my code 🙏
its fine
ive been trying for the past few days to find a way around this already, man
u have not seen 200+ if statements for all jimbos 😭
don't do add_to_deck or they're going to trigger effects
ah
it was a joke, but im actually wondering if this is against the rules 😭
alr
i want to do something like if gives you mult for every 5 dollars you have, but how do i do that
cool
programming would count as copying as extreme sport
do you know where the ceiling is
in this universe, probably
i actually hate when
if i were to add new stats
i would have to manually change the #num# of everything in localizations
can you do #num+smt#
you might need to create your own loc system lol
godamdoamd
WHATEVER SAVES MY TIME AT THIS POINT 😭
where is the code located
im assuming smt related to ui in balatro source code
i dont remember how the parsing function was called
loc_parse_string
all the localization stuff seems to be in misc_functions
I think smods has some too
i wonder if its any of those
nah I think those are just for reading the files
mm i see
doesnt seem to lead me to misc_functions, so im guessing this is the only file which has loc functions?
i wonder why am i torturing myself so hard for my first ever mod 😭
very cool
...i fail to see how canio fits in there, but nice
i did the same
am i correct to assume i will need to increase this for #3+2# to work
no, I'm pretty sure it's the last elseif
reusable code for later
_s_ref in the highlighted part contains the "3+2" string
you need to parse that
a patch it is
i think i know what im doing this time
this is just great
- i cant get the code working
- my parents seem to be getting in a huge argument right at this moment
ok this is just a giant assumption, but from what im hearing: my mom seems to be cheating
hopefully it remains at that
nothing more than a false assumption
😭
I think it’s better to start with something simple
i suppose so, but i love pushing myself beyond my limits
not like i will get an opportunity to do so ever again, if my life is as it is anyways
You look like you need to talk to someone :0
i do need help right now, things couldnt go any worse than this
What kind of help
I see
the fact that this all happens during the weekend means i will have to stay at home and witness everything unfold
Do you have a friend or maybe a neutral third-party to confide to?
i will probably go to my friend's house tomorrow
Me?
Sounds like a good plan
Anything to do in the meantime?
LET'S GO
dunno, i might just try to ignore everything as a whole
ignorance is bliss
i dont even know what is going to happen to me after this
thats neat (whats with the blue particles)
a lot of head spinning
Well then it shouldn't crash when i open run info
It is a rendering issue.
Makes sense, but I was wondering if you’d continue working on your Balatro mod or do something else
It’s good to focus on something that’ll make you more relaxed I think
the thing is: i dont know if i would get the opportunity to continue on my mod after this
if everything goes wrong, i might publicize my mod files
Well, if you have the files in person or on the GitHub, you can come back later to it someday
and uh, in which case, whoever wants to continue working on it can do so, i dont really mind
It can even be private on GitHub, I think
i havent set up my github yet
May i ask why you wouldn't be able to?
Might be a good time to do it
some stuff going down in my family
you can guess the worst case scenario
and its actually pretty likely to happen
Yeah, i heard what allegedly happend. Sorry for you my guy
i actually already published all the files into a gg drive, i will let someone i trust hold onto it
and uh, if i dont go online within 1 week, they can post the link into my mod thread for me
there a smods.https now
And what does that do=
oh thats cool
access to the Web, basically
Well, I hope you’ll regain internet access soon :0
mhm, i hope so too
hiiii
hi
Hello
what would i need to do if i want a joker to, uh
+4 mult (joker_main) then retriggers itself
wait nevermind im dumb, scrap that
Does anyone know
How do you make that text under?
it's a bug
Oh
minecraft glass
I'd think setting the major would be enough
Are you setting the letters' scale?
it was not set
n helped me with this
How do i get the hand played like that cards with evaluate(parts, hand)
n' the goat
yes
Hmm, so why did it look wrong?
But are you setting it manually?
kinda
in render i had to just make the scale the same as the card
@red flower would it be possible to put these in info_queue things too
I thought it would be automatic
it should
you can try it
Put your Joker in another Joker's info_queue
they should be there too yeah
or do i have to make another entry
Holy shit it's a Scribblenauts reference
for example if i want the card there
i think its possible
since the box in info_queue should work the same way as how jokers' description works
try this
Yo wsg N'
This works but If you want only the cards to be there then you might need to create another object or hook the generate ui function
oops didnt meant to ping
whats up
It's ok
Can you help me rq
no
swearing is allowed, dont worry :3
awe man
N', how many of those websites do you have
ok so
😭
here is my loc_vars
someone else posted it here recently
what i am asking if it's possible to just do it from here
ah i see
i dont think so
This N', and how do i get the played cardos
or do i have to make a dummy center object to help with these
you probably need to make an object, I'm not sure
What do you mean make an object
...hm
joker_retriggers are wonky asf
i initially thought if i were to retrigger a joker, it would still run the if statement and allat, but it goes straight to this
thats odd
Oh, but how do i get the played cardos?
Do what? If you want to display the Joker's tooltip in another Joker, you just pass the Joker to the info_queue
is there any documentation for the G variable?
oh nope, it just retriggers the FIRST played card, what the hell
never made a poker hand
no, you need to look at the game's code
want the silly preview cards to appear in the small info boxes
Your first loop wouldn’t do anything the second time round right?
globals.lua and game.lua mostly but it's a global table used all over the place
ty
Just the preview cards or the whole Joker
?
i actually think it will be quicker to just show the vid of it happening, wait
Then how would you do it for a joker?
?
they're either in context.full_hand or G.play
Can you do G.play[1]
And can you do G.play.length
If you add the whole Joker to a tooltip, it should also include the cards. I suggested you do it to test that the cards can appear in info boxes
G.play.cards[1]
Where are your retriggers coming from?
#G.play.cards
the Example text isn't an object but it's ok ill try to figure shit on my own
i dont think any other code checks for the played card, other than the part i showed above
HSRContextHandler is basically a function combining the check for different contexts, and return some stuff from which
So this card has a self retriggers property of 14?
mhm
So what’s the problem?
is it supposed to have the "Again!" pop out on the played card 14 times too?
If you retrigger it 14 times, of course it is
lets go
Oh it should be in the joker though
yeah, the code should stop checking the played card after the "+1 Astronomy!" pops, as shown in this
So you don’t want it to retrigger?
Then stop it from entering thet part like you do with blueprint
how would i do that, is there a context like "not context.blueprint" but for retriggers specifically?
Yeah
first of all you should check for the G.play.cards[i].rank, not for the card itself
I don’t remember it off the top of my head
is it something like "not context.retrigger_joker" lol
found this at the bottom of the calculate documentation, not sure if its the right one
That sounds correct
othwerwise you're checking the cards' "identity", not their properties
Does anyone know how I can make a joker that changes the rank of a card that is played?
And second of all?
doesnt seem to work, hm
nice
Red Seal Polychrome Glass Ace of Spades
second of all i am NOT an expert on making poker hands actually, best thing i can help you with is redirect you to the royal flush example mod https://github.com/Steamodded/examples/tree/master/Mods/RoyalFlush
maybe digging through cryptid src code also might help if this isn't enough
even tried this huge chunk of if statement, doesnt work either
doesnt seem like context.retrigger_joker does anything, sadly
...its just a bit annoying visual-wise, so i guess i can work with that
what's the joker supposed to do?
it checks for the played card, and see if its suit has already been played
if it has been played, ignore it
else, increases a certain variable once and set the played suit to true, preventing other playing cards of the same suit from triggering it
You’re checking if it’s true here
for that you need to manually enable an option, it looks like this:
retrigger_joker = true,
}```
the retrigger joker code wouldnt even work if i didnt have that turned on lol
put this at the beginning of your main mod file
i already had that set to true, as you can see by how my joker can retrigger itself
its two blocks of "or" (i dont know the terms for those ❤️)
- the first one checks if context.retrigger_joker is there. if it is, ignore if context.retrigger_joker is itself
- the second one checks if context.retrigger_joker is not there, if it isnt then the code will go through
i also tried with just this, no luck though
is AllSuits some global variable i'm unaware of or did you define it yourself?
its this lol
again you can have the entire Joker tooltip, which should include the example, to show up just by passing the Joker to another object. But if that's not what you want then you can do something else
Can you throw a print(context.retrigger_joker and “yes” or “no”) in pls
inside the whole if statement? sure, wait
hmmm well first of all i'd highly advise against creating a different field in card.ability for each suit, i can only assume that messes things up a little. try a local table instead
gimme a sec and i'll show u what i mean
It wouldn’t cause any issues at all
Yes
This is from smods assuming that a card that returns something can be retriggered
There is but I think waiting for a smods fix would be cleaner
Add no_retrigger = true to the return table
I’ll make it work at some point 🤣
i see, but since its just a visual stuff i think it will be fine anyways, thanks :D
You should still add it, that message spam is awful 🤣
fortunately its just me setting the joker's speed really high to see if the retriggers work anyways, so before the fix it shouldnt matter too much lol
@manic rune try this for your suit counting:
if context.cardarea == G.play then
local suits = suits or {["Spades"] = 0, ["Hearts"] = 0, ["Clubs"] = 0, ["Diamonds"] = 0}
if context.individual then
for k, v in pairs(suits) do
if context.other_card:is_suit(k) then suits[k] = suits[k] + 1 end
end
end
end
end```
i'm not saying it will fix the retriggering directly buuuut maybe it will somehow help smods bug out less
oh, but the thing is that i want my joker not counting that suit for the rest of the round
even easier then
and since that should definitely be saved, i used card.ability to achieve that
one sec
Yeah the suit counting is fine
Though you probably don’t need to loop through all the suits every time
oh yeah
i think i was supposed to remove the loop 😭
wait nevermind, that was the part of another joker
ghhh my brain is fried
pls? 
calculate = function(self, card, context)
if context.setting_blind then
suits = {["Spades"] = 0, ["Hearts"] = 0, ["Clubs"] = 0, ["Diamonds"] = 0}
end
if context.cardarea == G.play then
if context.individual then
for k, v in pairs(suits) do
if context.other_card:is_suit(k) then suits[k] = suits[k] + 1 end
end
end
end
end``` once again it most likely won't fix the issue but it might be worth a shot
plus i think it might be a bit more readable for the future
oh, is the "suits" variable outside the calculate?
yep
like, they are around here? (and i think you should help NoplayerCh too, i dont know how change ranks of played cards 😭)
this is technically not recommended but i've used it before when counting suits and i saw no issue rise whatsoever
i will, and yes right there
have you tried re-entering the run to see if it saves
thats the main reason why i used card.ability lol
but if it does then i can actually see myself using it, thanks
The only thing i need help with is my crash when i tap on run info
it most definitely should, although i've never counted suits for the whole round
so probably 99% chance it does save
if that doesn't work
i'd do the same thing ancient joker and castle do and add a global variable in Game:init_game_object()
and ride off that thing
i personally wouldnt add a global variable if its only used by one joker lol, but yeah, thats definitely one method
any idea why my sticker is appearing on cards from judgement?
local hook2 = create_card
function create_card(_type, area, legendary, _rarity, skip_materialize, soulable, forced_key, key_append)
local ret = hook2(_type, area, legendary, _rarity, skip_materialize, soulable, forced_key, key_append)
if G.GAME.modifiers.enable_pencil_paralyzed and pseudorandom((area == G.pack_cards and "pack" or "") .. "_pencil_paralyzed" .. G.GAME.round_resets.ante) > 0.7
and _type == "Joker" and (area == G.shop_jokers or area == G.pack_cards) then
SMODS.Stickers.pencil_paralyzed:apply(ret, true)
end
return ret
end
if context.individual and context.cardarea = G.play then
SMODS.change_base(context.other_card, nil, [insert rank here])
end```
would it also work to add the variable to the joker's center?
you should just have a table like card.ability.extra.suits and then toggle ones that ahve bene played
thx 👍
like if not card.ability.extra.suits[context.other_card.base.suit] then --code here end
the rank should be a string, and for ranks higher than 10 use their name not a number
no need for any loops
honestly yeah that's probably by far the best option
...oh, you can get suits with context.other_card.base.suit? just knew that, thanks :D
my brain is probably also fried rn XD
and then just clear the table whenever you need to reset it
(im still new at this whole modding stuff, dont blame me for not knowing these please 😭)
will misbehave with wild cards tho
i can always put a check to see if it has wild enhancement lol
depends on how they wanna use it
bump
alternatively you can do a if context.other_card.ability.center == "m_wild" check before all other suit counting if you want a special interaction with wild cards(i.e. giving the remaining of 4 astrometry possible for the round at the same time)
use SMODS.has_enhancement rather than checking the card's value directly
probably for the better, yeah
aren't stickers just rolled for passively anyway?
whats the context that glass cards use for being destroyed? im trying to do something with a similar timing
i'm just a bit too lazy to read through all of the util functions, especially since they constantly get added and they go undocumented
context.destroying_card
trying to figure out DeckSkin, any clue why the images just aren't showing up? (the only other thing we could find to this effect resolved it by just gutting the tutorial, which feels a bit inefficient for what we're trying to do.)
oh destroyed cards have their own timing in scoring?
what does your image look like?
the keys passed here are missing their prefixes
stuff like this. yes this mod is literally just to put the StP art on the other suits.
aren't the prefixes added automatically though?
ok so how do i register my own centers properly im trying to get the funny description working
it doesnt seem to work
try context.after
context after was crashing my game
does not seem to be the case
with an error i couldnt really decipher
that was it. pos_style = 'collab' was what we were looking for ;P
try it again and send the error here maybe?
will do
it's in here but it's not in P_CENTER_POOLS
cuz as far as i am aware destroy_card is the context for things like caino when cards are destroyed
nevermind it works but only for the first card
this is suppossed to destroy all sealed cards after a hand finishes scoring, and it increases mult for every destroyed card in this manner
if context.destroying_card and context.destroying_card.seal then
card.ability.extra.x_mult = card.ability.extra.x_mult + card.ability.extra.scaling
return { remove = true }
end
that's all you need
really?
the context.main_eval is the issue for sure, just try eremel's method for now
