#💻・modding-dev
1 messages · Page 177 of 1
me omw to report:
are stonce cards in the back normal cards or they keep being stone?
them on their way to assassinate anyone who reports the aforementioned bug:
normal cards
just checked and it should already be fixed
the first thing you should try to do about an issue with another mod is update it
how much does update have an impact on framerate
it's called every frame, don't use it unless you really have to
it can tank performance if you're not careful
what exactly is the area argument supposed to be in the use function of a consumable ? because
"if area == G.booster_pack then" doesn't seems to be true even when the consumable is in a booster pack , or "if not area == G.consumeable" also doesn't work, so how exactly do I check if it's in a booster pack ?
Ok nice, though I wonder how to make a "Yep!" and "Nope!" message when the card triggers and when it doesn't
i think gros michel have smt similar to that
The area would be G.pack_cards or G.consumeables
the Safe! and Destroyed!(?), i think
you can always have a message in your return table
doesnt work
maybe I'm just doing this wrong, but I want one specific consumable to be placed in the consumable slot if it's obtained in a booster pack, is there an easier way to do this than verifying if it's in a booster pack ? because verifying with G.pack_cards or G.consumeables just doesn't work unfortunately
The message outputs on the retriggered joker
yeah that's how retriggers work
you cna change the card where it displays with message_card
Well I want to display the message on the joker that retriggered the other joker
Asking here cuz mb its some complicated issue:
message_card = card then
Yo that art looks so good though
what filetype did you save it as? And at which resolution? I have no clue how love 2d does things, but that kind of line is often a sign of scale issues in unity
Blank stone cards are my jam, what’s the issue?
my joker is supposed to turn face cards into stone cards
but before they turn into stone cards, they are white
Ah yes I know this issue
they keep turning into stone cards so is just an aesthetic issue
I should probably fix this on the backend rather than giving you the workaround
I literally took out the png spritesheet of Enhancers and just pasted in my stuff then put it back in
SMODS.Joker {
key = 'medusa',
subtitle = "Art and idea by Toyrapple",
loc_txt = {
name = 'Medusa',
text = {
"This Joker gains {X:mult,C:white}X#2#{} Mult per scoring {C:gold}Face card{}",
"played and turns them into {C:gold}Stone cards{}",
"{C:inactive}(Currently {X:mult,C:white}+#1# {C:inactive}Mult)"
}
},
config = { extra = { xmult = 1, scaling_factor = 0.2 } },
loc_vars = function(self, info_queue, card)
return { vars = { card.ability.extra.xmult, card.ability.extra.scaling_factor } }
end,
rarity = 1,
atlas = 'ToyrappleCollection',
pos = { x = 2, y = 1 },
cost = 2,
calculate = function(self, card, context)
card.ability.extra.xmult = card.ability.extra.xmult or 1
if context.before and context.cardarea == G.jokers then
for i = 1, #context.scoring_hand do
if context.scoring_hand[i]:is_face() then
card.ability.extra.xmult = card.ability.extra.xmult + card.ability.extra.scaling_factor
end
end
return {
message = localize('k_upgrade_ex'),
colour = G.C.RED
}
end
if context.individual and context.cardarea == G.play then
for i = 1, #context.scoring_hand do
if context.scoring_hand[i]:is_face() then
context.scoring_hand[i]:set_ability(G.P_CENTERS.m_stone, nil, true)
context.scoring_hand[i]:juice_up(0.3, 0.3)
end
end
return {
mult_mod = card.ability.extra.xmult,
message = localize { type = 'variable', key = 'a_xmult', vars = { card.ability.extra.xmult } }
}
end
end
}
This is the code
i tried adding delays, event manager, etc
nohing seems to work
Let’s leave it as a, when you update smods later it will just work as intended
Oh and btw:
@past forge
#1335221042204901396 message
(Just in case if you haven't seen yet)
We are doing basically the same thing
hahaha
Literally the same lmao
even the 0.2 xmult
I can share the code with you
It's fully finished
if you are that kind i would thankfully use it
No, like, give me a chance to fix it first
okay
im back on my bs
its so nice being able to do this w/o having to rewrite half of state_events.lua
with both the right sizes, and the transparency properly set? I could see if I get the same lines when trying to import it?
what did i just see
ah yes the jimbo two pair
playable jokers and non-playable cards
i still need to rewire joker_main so playable jokers do it as their scoring (rn they do it as part of the actual joker_main so the timings are kinda messed up) + cover all the places that break when u have jokers reacting to things intended for playing cards
and also adding ways to change how jokers are treated by mechanics intended for playing cards bcos sinful jokers not counting as their respective suits is kinda not right imo
I don't quite understand where should I put this py file
Where main.lua is located?
Or in assets folder
ok im really curious, how would you make a perkeo card work
or observatory
playable perkeo would do nothing because perkeo's effect triggers when leaving shop and playable perkeo would be in the deck, when the effects only happen for cards held or played
damn
if it were old calc planet cards would give x1.5 mult on held and on play, although observatory way rewritten for new calc so i'd need to check how it'd work
i think it would stay the same with the difference of the effect relying on an off-screen observatory voucher card entity rather than coming directly from the cards themselves
new calc observatory uses context.other_consumeable with the main card being the off-screen voucher
previously it just hijacked the joker_main calc, which wouldn't allow for planets to have other joker-like effects at the same time
this crashes the game
its supposed to generate a negative perishable joker
whats the crash message
replace the 4 lines above the return with ```lua
SMODS.add_card({ area = G.jokers, set = 'Joker', edition = 'e_negative', stickers = { perishable = true } })
(keep the rarity if you want it to only spawn common jokers)
(the issue is the edition)
where can i find the proper names for the parameters?
you can check in the definition of the P_CENTERS table in the game's code, it has all the keys
k thanks!
SMODS.add_card({ area = G.jokers, set = 'Joker',rarity = 0, edition = 'e_negative', stickers = { perishable = true } })
everything works except the perishable sticker
i blame my memory
it should be stickers = { 'perishable' }, mb
still having trouble with this, if someone can help I'll gladly take it; is there any way to return the name of the current value of "area" ?
ok nvm I'm just stupid
hey @frosty dock saw you talking in here about retrigger_joker like 3 hours ago. got a question about that as well by coincidence
it works with joker-like abilities that consumables have right?
seems like it should from the code i've looked at but this doesnt work for some reason
if context.retrigger_joker_check and context.other_card ~= card then
if context.other_card.ability.set == "Stand" then
return {
repetitions = card.ability.extra
}
end
end
end```
how do you use a localization file?
there should be no restrictions on what can use joker retriggers so long as it's in a joker-like card area (like jokers, consumables or vouchers). you have the optional feature enabled, right?
yeah i put this in the top of my main.lua after i noticed you saying you had to that
SMODS.current_mod.optional_features = {
retrigger_joker = true,
post_trigger = true,
}
i don't see what shouldn't work then
im checking to see if maybe the set check screwed it up
no even with this it doesnt work
if context.retrigger_joker_check and context.other_card ~= card then
return {
repetitions = card.ability.extra
}
end
does it not apply to abilities that use certain contexts?
did this ever happen btw?
no presure if not
trying to get it to retrigger this one since it seems like the only stand we've currently implemented in cardsauce that makes sense to retrigger
if context.before and not card.debuff and G.GAME.current_round.hands_played == 0 then
local diamonds = G.FUNCS.csau_all_suit(context, "Diamonds")
if diamonds then
ease_hands_played(1)
return {
card = card,
message = localize('k_plus_hand'),
colour = G.C.BLUE
}
end
end
hmm think thats the issue actually yeah
seems like the calculate code cant retrigger abilities in the before context
I'll try get tp it today
@frosty dock is this use i'm trying to do too specific or do you think this is worth addressing in a change to bettercalc?
huge
every context is retriggerable
im not so sure, check above. the second to last code block i sent is a joker that i'm trying to get to retrigger abilities of a joker-like consumable, which is the code in the latest code block
doesnt retrigger
dunno why exactly
hm yeah i was mistaken in that the code for the before context does allow retriggers, i see that now
but still, what i'm trying to do doesnt work for some reason
wheres the retrigger coming from?
this one
like what type of card
its just a general "all cards of this type retrigger once"
i set it to all for testing purposes
but in the abilitiy it should filter for card type of "Stand"
which is a new consumable type we're making for cardsauce
but only consumable in name and where its located in slots, its basically a joker
anyone know what the context for using a specific tarot card would be
so a joker that retriggers consumables calc functions?
yes exactly
what area is it in?
consumables
the retrigger joker is in jokers, but the card that should be retriggered is in consumables
it calculates normlly, right?
yeah it works fine
the stand?
yeah
yeah it works
Hey, I'm trying to check if the ante's boss blind is a showdown boss. Here's what I've tried but with no dice
to be more clear the stand works on its own
this general issue still is not solved though
can you throw a print('test') in the retrigger joker?
yeah i did try that, and it works
it seems that the code works up until the return, think whatever is going wrong is beyond that return
oh shit
it works now
somehow
hang on i need to test some more
huh. i have no idea what changed here but this code works now for some reason
if context.retrigger_joker_check and context.other_card ~= card then
send("hi")
if context.other_card.ability.set == "Stand" then
send("wow")
return {
repetitions = card.ability.extra
}
end
end
Hello. Uh, how do I retrigger cards (like hanging chad, for example)?
now i'm wondering how to juice up the joker when it retriggers a stand
🤔
uh, do you want to retrigger cards that are similar to hanging chad, or retrigger cards in the same way as hanging chad? 🤔
would it not be card:juice_up()?
yeah but that makes the timing off
Did the console pop-up and showed anything?
Juicing Up is what Dio's power is in Part 1, right?
ah I see
It should tell inside if it even processes sprites
looked at how Burnt Joker and The Arm do level ups and level downs of hands, and am trying to incorporate those into a card that decreases the most played hand's level by 1 while increasing the least played hand's level by 2, but it's getting hung up on the second for loop trying to do the comparison and I'm not quite sure why (line that errors darkened for ease)
do juice_card = card iirc
in game?
thanks
no, when launching the script
it popped up and insta closed
I had to edit it via Notedpad
okay it doesn't crash anymore, doesn't do anything either
(well actually it might, I should, remember to level up my hands)
oop yep
Retrrigger cards in general. I am checking for their rank, nothing else.
okay something must be wrong because it worked before for other people
can you insert input('blablabla') at the end of the script and launch it like that?
wait, does it count as copyright infringement if you rewrite the game but share the XOR'd result of your rewrite and the balatro exe
because you technically still have to buy the game
wait
with blabla?
yeah it doesn't matter
it's so the console window doesn't close after running the script
anything in the console?
no, it still insta closes
oh wait
I have 2 pythons
3.9
and 3.11
3.11 opens it
let me check which one I'm using
GOT IT WORKING
oh this should do the thing
yeah the one I'm using is 3.10, it should be fine
🫡
you can also drag the 1x sprites individually into the script and it will fix them without the need to reupscale everything
nope it only changes the pngs in your mod
I use the script constantly, so I added it to my windows' context menu and it saves me a few clicks without the need to find the script every time I add or edit a sprite
im guessing the moment you played your hand, the game already locked on calculating the 5 3s
so even if you turn them into Ks, the game still sees those cards as 3s
How do I detect the suit of G.playing_cards?
:is_suit()
{Hearts, Clubs, Diamonds, Spades} are the suits btw
So any idea when I should make the change happen?
i actually dont know myself, sorry, you can try finding mods which do that though
update = function(self, card, dt)
if G.playing_cards then
for _, v in pairs(G.playing_cards) do
if v:is_suit() == "Diamonds" then
card.ability.extra.Xmult = card.ability.extra.Xmult + card.ability.extra.Xmult_gain
end
end
end
end,
What should I change there? Can't get it to work
Trying to get a joker to give x amount of mult per diamond in deck
so first of all, dont use update, its pretty unnecessary
inside loc_vars, you can put something like:
card.ability.extra.Xmult = 1
for i,v in ipairs(G.playing_cards) do
if v:is_suit() == "Diamonds" then
card.ability.extra.Xmult = card.ability.extra.Xmult + card.ability.extra.Xmult_gain
end
end
return {...}
uh wait
why does it look like that 😭
there
Thank you
loc_vars = function(self, info_queue, card)
card.ability.extra.Xmult = 1
for i,v in ipairs(G.playing_cards) do
if v:is_suit() == "Diamonds" then
card.ability.extra.Xmult = card.ability.extra.Xmult + card.ability.extra.Xmult_gain
end
end
return {vars = {card.ability.extra.Xmult, card.ability.extra.Xmult_gain}}
end,
Like this?
mhm, i believe so
Hmm doesn't seem to work either
ok so another idea, put that inside calculate with no context, like
calculate = function(self,card,context)
card.ability.extra.Xmult = 1
for i,v in ipairs(G.playing_cards) do
if v:is_suit() == "Diamonds" then
card.ability.extra.Xmult = card.ability.extra.Xmult + card.ability.extra.Xmult_gain
end
end
end
if only im better at coding, i wouldnt have to make multiple takes like this 💔
Don't worry I'm worse lmao
You're really helpful ❤️
Hmmm not working either
Tried adding if context.before then before it and neither
Let me try printing
what does above_hand param means?
This needs to be within if context.joker_main then
Doesn't seem to work either
for some reason this edition code is triggering twice
what is it supposed to do?
Alright what isn't working is the is_suit() part it seems after putting prints everywhere
it should be :is_suit("Diamonds") 😭
i just realized it, im sorry
if v:is_suit("Diamonds") then
You don’t need to ease dollar and return dollars
So I have a modded poker hand but I want to add extra functionality to it which is "Upgrade [this poker hand] for each Stone card scored this Ante" +10 chips". Here's my code rn:
"stone_ocean",
stone_ocean = {
name = "Stone Ocean",
above_hand = "Three of a Kind",
text = { "5 Stone cards" },
visible = false,
chips = 50,
mult = 1,
l_chips = 10,
l_mult = 0,
example = {
{ "S_2", true, "m_stone" },
{ "S_2", true, "m_stone" },
{ "S_2", true, "m_stone" },
{ "S_2", true, "m_stone" },
{ "S_2", true, "m_stone" }
},
},
}
local handparts = {
"stone_ocean",
stone_ocean = {
func = function(hand)
if #hand < 5 then return {} end
local ret = {}
local stones = 0
for i = 1, #hand do
local v = hand[i].base.value
-- Skip anything we can't interpret (for whatever reason)
if v then
-- The "Base" of a Castle is comprised of three face
-- cards of any ranks
if hand[i].ability.name == "Stone Card" and stones < 5 then
stones = stones + 1
table.insert(ret, hand[i])
end
end
end
if stones >= 3 and #ret >= 5 then
return { ret }
else
return {}
end
end
}
}```
this functinality is supposed to be on a Planet card itself
Has someone ever done Planet card effects with extra effects?
i could use a reference
as in the planet card takes into account the number of stone cards scored?
Yeah!
and displayed
it
cryptid's neutron star upgrades once for every previous neutron star. There's probably logic in there that's handy to see for you
thanks
hi so is it just not possible to add smodded strings to a language in a mod
got this error on load
Oops! The game crashed:
[SMODS _ "src/utils.lua"]:191: 159456:3370: '<eof>' expected near '='
Additional Context:
Balatro Version: 1.0.1n-FULL
Modded Version: 1.0.0~ALPHA-1410d-STEAMODDED
LÖVE Version: 11.5.0
Lovely Version: 0.7.1
Platform: Windows
Steamodded Mods:
1: CZ Balatro by WolfPlay013, ProkopLoronz [ID: CZBALATRO]
Lovely Mods:
is there a way to detect when the date changes? I'm trying to make a knee surgery joker that self destructs when the date changes to tomorrow lol
I would check how the SystemClock mod checks time https://github.com/Breezebuilder/SystemClock/tree/v1.5.0
I think it's os.date
you just have a syntax error
oh lmao i guess i missed that
i keep on forgetting that this technically is not json
so it doesn't warn me for stuff like that
ty!
i tried creating a new variable at the start that tracks the date when you start the game so that i can detect chanegs in it, but it crashes when i open it.
os.date is a function
ah, what is the best method of doing this then
https://www.lua.org/pil/22.1.html you could start by reading the docs
I've never really used it before
you could also look at that clock mod to see how they use it
can you show the surrounding lines?
gorbcount is for something else and the print is just to see when it starts what it has for the variable, havent gotten that far yet
line 13 is not valid lua syntax
and line 10 has a trailing comma
that fixed it
you can do multiple assignments but not comma-separated statements
thanks so much
how do i do the print function for real? i did it for something before but forgot
how do i change the deck of a challenge to one from cryptid? do i just do:
deck = {
type = "equilibrium",
},
```?
that is when the argument is a single string literal or table constructor
I'd have to look at the code for how it actually works, but probably just put the type as 'b_cry_equilibrium'
i had that at first whoops, but cuz it was "Challenge deck" I thought b_cry_ should've not been there but literallyt as i'm writing this i realise cry just stands for cryptid
that's just because vanilla is jank and uses names instead of keys here
aha tyty
there's no good reason for that and steamodded just fills names with keys
name = "cry-Equilibrium",
this one right? or do i need to add b_?
local equilibrium = {
object_type = "Back",
name = "cry-Equilibrium",
key = "equilibrium",
order = 3,
config = { vouchers = { "v_overstock_norm", "v_overstock_plus" }, cry_equilibrium = true },
pos = { x = 0, y = 1 },
atlas = "atlasdeck",
}
full code for reference:
yeah try that then
Don’t mind me just bumping this
again I'd have to check the implementation for any further specifics, but I think I recall that's the way this works
ok this is fucked up because i literally cannot figure out where it is 😭
can someone help me out with it
you don't need that if statement but looks good
can I see the file?
yeah lemme dm you
other times it worked with if statement
it sure works but it doesn't do anything
im trying to figure out how the date function works in the clock mod but cant seem to figure it out
other content didnt crash my game when imported but this does for some reason
its only mentioned once in the whole thing
more likely the file you're importing has an error then
this is the only time its mentioned in any of the clock mod files
ty that worked, have a nice evening!!
Is this the right way to make a poker hand via SMODS? Cryptid and other mods I found use some other strange methods
key = stone_ocean,
name = "Stone Ocean",
above_hand = "Three of a Kind",
text = { "5 Stone cards" },
visible = false,
chips = 50,
mult = 1,
l_chips = 10,
l_mult = 0,
example = {
{ "S_2", true, "m_stone" },
{ "S_2", true, "m_stone" },
{ "S_2", true, "m_stone" },
{ "S_2", true, "m_stone" },
{ "S_2", true, "m_stone" }
},
evaluate = function(hand)
return hand.stone_ocean
end,
func = function(hand)
if #hand < 5 then return {} end
local ret = {}
local stones = 0
for i = 1, #hand do
local v = hand[i].base.value
-- Skip anything we can't interpret (for whatever reason)
if v then
-- The "Base" of a Castle is comprised of three face
-- cards of any ranks
if hand[i].ability.name == "Stone Card" and stones < 5 then
stones = stones + 1
table.insert(ret, hand[i])
end
end
end
if stones >= 3 and #ret >= 5 then
return { ret }
else
return {}
end
end
}```
I ask again, how do I retrigger cards (from jokers)
your func can just be the evaluate function there. func is a thing in poker hand parts, which is useful when you want to reuse evaluation code across multiple related poker hands (like flush, full house and flush house). That's a separate class though
check for context.repetition and have repetitions = <amount of repetitions> in your return table
Alright, thanks you.
like this?
my tangentially related advice is if someone asks you to check cryptid's code you are very likely not to find an answer
source, me at least twice
don't need that last return, but looks good
well duh
you're setting the key to the global var stone_ocean
which is not defined, so there is no key
you need that to be a string
I did not pay attention to that because code display is ass on mobile
my bad
hey, whats the mod that allows for you to spawn tarot cards and jokers from your collection?
debug ?
Which debug? Debug plus or?
thankfully game doesnt crash anymore tho the poker hand itself doesnt appear in game at all
you told it not to
its visibility is set to false, so it doesn't appear until you play it
thats the thing
it doesnt appear when I select the poker hand
no mod, just hit 3 on it in the collection
oh I see your eval logic is flawed
you're only inserting stones to ret
so it'll only find something when you play 5 stones
What file are the basegame jokers and their calculate functions under? for the life of me I can't find it
I want to steal the popcorn and ice cream code
mb it's a read the docs moment
evaluate has different args
(parts, hand)
something to consider unless if im crazy, won't stones and #ret be the same value? The stones >= 3 and ret >= 5 condition will only ever be true if the ret has 5 (or more) stones in it
So I dont need ret?
you need it if you're gonna add the faces to it like the comment says
ahhh
evaluate = function(parts, hand)
Unrelated, random Joker idea:
Student (Common) - Whenever you score a hand that doesn't clear the blind, this gains +1 Mult
thats what I had, no?
You were missing the "parts, "
i dont know how to activate the card, as in how to make it usable,
it says that table expected but got nil
where
Hello trying to figure out the outline issue can't seem to get the script to work right?
Try the same troubleshooting that @kars_on_mars was doing today
#💻・modding-dev message
ah maybe the pillow thing
Yeah you need pillow and need to check if yours python version is around 3.10 - 3.11
you're inserting into parts and returning a table of the number of stones
using a future version, and don't have pillow, I'll work on that
is there any guide on file structure? i want to make my own localization messages but dont know how or if i have to do it in main.lua or where
I feel like you lack some amount of understanding about coding, you should work on that
and how to access another files from main.lua
Localization files are loaded by steamodded itself, you just need to provide them
for loading other files, use SMODS.load_file
Usage: assert(SMODS.load_file('path/to/file.lua'))(), where that path is relative to your mod's main folder
I have no idea what Im doing tbh
perfect
note this isn't what you should do for localization strings. refer to the wiki page I sent for that
Speaking of localization files, I was trying to do the deckskin palettes today and this seems super scuffed (screenshot is from a localization file): How am I supposed to add a palette to a deckskin without worrying that some other mod's localization won't overwrite it?
-# I can tell
:(
I've thought about that actually. It's the format that vanilla uses and I'm not sure of a good way to change it
you're right, it's super scuffed
I was expecting it to check for a key, and not an index; had a lot of tries to even make it visible
and the fact that hc & lc already claimed first two places didn't help
that would be better for sure
maybe it's easy enough to just statically redirect lc/default and hc to 1 and 2 and make the rest use keys
wait I think I'm just dumb
I don't think there's this kind of restriction at all
maybe my brain is a bit fried
so I returned "hand" since i need all cards to be scored, right?
so if i paste my localization messages like this:
return {
descriptions = {
Back={},
Blind={},
Edition={},
Enhanced={},
Joker={},
Other={},
Planet={},
Spectral={},
Stake={},
Tag={},
Tarot={},
Voucher={},
},
misc = {
achievement_descriptions={},
achievement_names={},
blind_states={},
challenge_names={},
collabs={},
dictionary={},
high_scores={},
labels={},
poker_hand_descriptions={},
poker_hands={},
quips={},
ranks={},
suits_plural={},
suits_singular={},
tutorial={},
v_dictionary={},
v_text={},
},
}
``` at the top of my main.lua will it work?
i just want to make the messages on the cards
no, that's not how it works
read the wiki page properly
localization gets a separate file (per locale)
i meant localization.lua instead of main.lua 🤦♂️
and then on main.lua i shuld add this line

...
What wiki are y'all referring to? I'm new to balatro modding and have many questions, but don't wanna be a bother to folks
ok what in cryptid does this im curious
smods wiki itself
nothing, it's a reference to the famous quote by Jen Walter
"fun fact: 98% of Balatro players can't read"
so if 98% can read balatro players cant
mobile messed me up 😓
real
98% of players read balatro can't...
wait so what does the 98% reference??
Players% of 98 Balatro can't read
thats a lot of players that can read balatro
The real question is who are the 2%
i would say localthunk but nope
localthunk can read but not spell
since colours and colors and the "caino" ability
gluttenous joker my beloved
tbh colours and colors is arguable
isn't the game pretty consistent with using the bri'ish spelling?
steam'odded
So I managed to make the card increase the lowest hand level by 2 and decrease the highest hand level by 1
However, once it completes a full cycle of this, increasing every hand once, the next time it activates it crashes, what's going on?
not entirely sure what conclusion to draw from where I'm being directed (this being the crash error line)
Okay about the localization:
Should i have one file named localization.lua or a folder named Localization and all the files like the balatro source code?
Dunno if the first's possible but the second is
okay
ah-, ohhhh, it's trying to target an undiscovered hand
Whatever you use to iterate and find which hand to change, you could do a G.GAME.hands[i].visibile check to ignore those who aren't
i have no clue what im doing, would this tarot card work?
banger, that fixed the crash and some other minor adjustments I made fixed some of the bugs
isnt this a valid localization table?
im trying to refer it like this in the main.lua
but it gives ERROR
😭
you see messages here anywhere?
It's not messages, I know that much
cause i certainly don't
it's misc.dictionary for accessing it the way you're trying to
what's the issue here?
Docs say that return { hand } if all cards score
and whats the difference between dictionary and v_dictionary
v_dictionary has variable values inside
v_dictionary supports vars and is called like localize { type = 'variable', key = 'key_here', vars = {'abcdef'} }
How thick should the borders of my joker art be?
i think its 2pixels but you can check the pinned messages in the fan art section to make sure
if its full art, 2 px
bet
was checking the docs for ages but I still dont know how to make this tarot card work
im trying to make it work like world or sun
How do I make a mod
I believe your function header may be incorrect? See: https://github.com/Steamodded/smods/wiki/SMODS.Consumable
I believe it should be function(self, card, area, copier)
Steammodded also provides example mods that have example consumables, see: https://github.com/Steamodded/examples/blob/master/Mods/SealExample/SealsMod.lua
I have no idea what I'm doing
Could anyone hop in vc and walk me through it? I have plenty of ideas for jokers and such but no clue on the code side
If you got no coding knowledge it's gonna be very hard
that sentence just keep appearing in this chat
just ideas?
okay, so you want to learn how to make mods or you want your joker ideas/art to be made in-game?
Stuff in game
im currently working with a guy that gives me the art and we come with ideas, and i code the jokers because im still learning an practicing
Would you like some more ideas? :3
I see a lot of references in mods and the example mods to the G object, but I can't seem to find any documentation on it aside from the event queue? Is there anywhere I can find the properties of this object?
You can find everything related to G in the game.lua file
Where is this file? I don't see it in the smods github repo, nor the steam install folder, nor Balatro's appdata folder
Mods/lovely/dump
In Steam\steamapps\common\Balatro, extract the .exe
if you extract the exe you will be missing everything smods adds with lovely patches
ahhhh i see! thank you both!
Yea this is useful if you wanna see base code + smods modifications
I have no idea why the joker_main never triggers
because you defined those variables inside the calculate function
i tried to do it in the context.before
two_suits will reset to false each calculate call
before a hand is scored, your calculate function will be called with context.before first, and then context.joker_main later
each time it's called, two_suits will be set to false
i see
you can put your entire logic in joker_main
the game gave me this crash
there error says you did something along the lines of c.something and c was nil
well it doesnt look like it
heres my code for help
how do i check if a card is in the consumables area
card.area == G.consumeables
ty
once again, thank you SDM_0 and srockw! i'm looking through the dump and im finally seeing things like cardarea and card which also weren't well defined in the smods wiki* before :D
Instead of c it should be G.hand.highlighted[i]
now it works but just adds mult and not chips
also, is there a way to display 2 messages, one after the another?
Which smods version do you use?
the last one
try replacing chips_mod and mult_mod by chips and mult respectively
why isnt the card un-debuffing
oh
it even does the message on its own
thank you so much
You should give this a look to see what better-calc can do https://github.com/Steamodded/smods/wiki/calculate_functions
that'd remove only the debuff with the id "delayed", i'm not sure about the details but maybe you can skip that last argument to remove all debuffs
wat
Do i have the context wrong? (it's suppose to give money once after the end of round, it instead triggers multiple times and sometimes just delaminations)
but it worked for verdant
you're trying to remove the debuff from your own joker
Do you want it to give money like Golden Joker?
its a consumable sticker btw
if you want it to be like golden joker is not that
en of round is before the cashout
oh i should clarify its a enhancment
Oh
same thing I think, if a card is debuffed it won't be calculated
oh okay so like golden cards
but it worked before??????
yea but decreasing amount after each use
what is "before"
The sticker was on the joker?
yes
that didn't work
try debugging context see which returns true
it looks like stickers on jokers are calculated even when they're debuffed, but not on other cards
presumably to prevent you from, for example, selling an eternal joker when it's debuffed, or not losing $3 on a debuffed rental
Enhancement: if next(SMODS.get_enhancements(context.scoring_hand[i]) then
Edition: if card.edition then
Seal: if card.seal then
For a joker, would this add 1 to totalHand if it's an ace, 2-10, adds number, face cards, ignore it?
good lord its notepad ++
is there a way to make a run start at a higher ante?
my mod makes the first antes way too easy lmao
yeah, seems good to me
there's no += support in lua, though
yup. somewhat annoyingly, you always have to do variable = variable + other_variable
Wonderful, thank you! Will rewrite it for that
i guess i make a possibility with math.random the dice wont take effect on it??
hello, again, how does one change the rank of a given card to an arbitrary rank?
also, when using context.repetition, how do I access the other card? (playing card)
There's a function, SMODS.change_base, that does this
https://github.com/Steamodded/smods/wiki/Utility
yummers
I am stupid and I shouldn't be coding at literally midnight but whatever
in calc function, use if context.repetition and context.cardarea == G.play
I believe accessing the other card would just be context.other_card
so context.other_card:SMODS.change_base()?
12 am coding yay
shit will do
leave suit as nil when just changing the rank
john smods strikes again
okay so I'm trying to make a Joker that sacrifices itself if another Joker is supposed to instead, and I have one idea of how to make it, but it's a very specific method
i could add in patches that specifically target Mr. Bones and Cavendish
but I want to have broader compatibility with other mods, so what's the best way I can target self-destructing Jokers (that don't have inherently diminishing value, like Ramen, Ice Cream, Popcorn, etc)
How can I send a debug message of the current context in a given situation?
I just started skimming through the source code so this is likely incorrect however there is this function that eases the ante, and in the source code the Hieroglyph and Petroglyph vouchers both use the ease_ante function as well as ```lua
G.GAME.round_resets.blind_ante = G.GAME.round_resets.blind_ante or G.GAME.round_resets.ante
G.GAME.round_resets.blind_ante = G.GAME.round_resets.blind_ante-center_table.extra
if you have DebugPlus, i think print(context) works well enough
Is there a calculate() context for if a playing card is retriggered? I have a joker that's counting up the total value of numbered cards via if context.individual and context.cardarea == G.play and not context.blueprint then but there's a bug when a playing card is triggered more than once.
I see
for some reason whenever I try to play this custom poker hand the game doesn't score the queen it's suppose to check for
does someone know how to fix this
could anyone help me with something silly
i am creating a joker that activates whenever you use a tarot card that is NOT the fool and somehow i have not figured this out yet
mostly just the Not Fool part
so im setting up localization for the first time and i just want to confirm, i dont need to initialize it through my main.lua file, right?
the .name property of the fool is "The Fool"
thank you :D
np!
-# key supremacy
It may be superior, but nothing is funnier than unending if/else name checks
why yes there is something funnier
oh?
you can make a completely different card behave like a vanilla card in certain aspects just by giving it that name
wait, oh my
like giving something the name 'Wee Joker' makes it wee-sized
does all of this need to be in G.localization or is it good as is?
with this knowledge, i will make the most reliable balatro mod that will surely stand the test of time of updates
good as is
cool
don't
now to cut this down to what im actually using
to survive the onslaught of updates you must be fluid like them, like water
don't worry i have a healthy fear of updates breaking everything
I tried to fix it but it ended up not working
the game still isn't scoring the queen when scoring the hand
does it recognize that you're trying to play the hand?
yeah
the game recognizes that I'm trying to play the custom hand
but it just doesn't score the queen
that is odd
Is there something similar to breakpoints in vs code that I can use to step by step go through my function to see if its doing what I want it to
My joker is doing all of the stuff it needs to do initially, but its a food joker so it should be decaying over time
And I don't think its doing that
Silly question: How do you make a joker just give 6X mult
https://github.com/Steamodded/examples/blob/master/Mods/ExampleJokersMod/ModdedVanilla.lua Look at the Cavendish 2 example
how do i round a number down
math.floor(x) see: https://www.lua.org/manual/5.3/manual.html, contains a bunch of the built-in functions of lua
thanks so this would be correct to round the equation in () down?
looks like it!
thank you appreciate it ^^
is there a way to make a joker only able to be purchased once per game?
my guess is to do what gros michel does here but set the flag in add_to_deck instead of calculate https://github.com/Steamodded/examples/blob/master/Mods/ExampleJokersMod/ModdedVanilla.lua
what's the better calc version of eval_this?
this doesnt seem to be working
Is there a way to make a legendary joker that can't be found through The Soul?
maybe no_pool_flag doesn't work anymore, try adding
in_pool = function(self, args)
return not G.GAME.pool_flags.jimdoepurchased
end
does rare tag bypass the check?
I don't think so
it seems to still be showing up
where can I find a list of all of the text color codes?
globals.lua has all the colors but the localization colors are in misc_functions inside loc_colour()
i rewrote it and it seem to be working so user error ig
how would i localize messages?
(i.e the 'message =' stuff in calculate)
would i just do it like vanilla or nah?
the thing is not doing the thing god it is 3 am
stuff like this usually works
Is there a way to set custom colours for a joker name?
...
can you do {C:whathaveyou} in the name part?
Like beyond {C:red} tags, I'm looking to do a specific hex code unfortunately
i think you have to define your own color
unfortunately i dont know how youd do that
{C:HEX(3EFFCC)} doesn't give 3EFFCC for the joker name unfortunately
Nah, that makes sense, I'll look into that
idk if theres a better way but i do it like this
(oh inside the if clause there's a loc_colour_ref() )
i mean
problem is i use some unique text in a good few of my jokers' messages
so will that work without any more input?
i presume that'd go in one of these?
yea, in a localization file you can have stuff like that
got it
with vars too
mhm
holy shit its snow
Looking through the wiki; am I just dumb or is there no section on applying editions to jokers? I'm trying to make a custom joker that is always negative. I see the wiki/documentation on how to make new editions or update weighting of current editions, but not about fixing/forcing a joker to have that edition
(assuming youre using steamodded)
could you do something like
set_ability = function(self, card)
card:set_edition({negative = true}, true)
end,```
Is there an easy way to see what badges a card has?
I'll test this, thank you!
what would I need to call in a custon deck (SMODS.back) to give a specific joker at the start of a run?
probably SMODS.create_card({...})
yeah
i believe theres a config for this (in which you give a joker key)
so no calling
check the code for some other mods deck
any mods you recommend looking into? I'm trying to find some but I'm not having much luck
nevermind, found kuso-mods which has a bunch of good sample decks
yeah i got no clue what i'm doing wrong
you should update steamodded and lovely
ancient mods folder
prehistoric lovely version
i... cannot uninstall the old lovely to update it
"access to folder refused, you need an autorisation from DESKTOP-07ROSI0/[my name] to modify this folder"
thats... concerning
no wait im an idiot i still had balatro running in the background
we're good
okay cool
alright what does this mean now
bump
Well for one steamodded isn't being injected
what
I don't think this is possible without explicit cross mod compatibility
i noticed the "cry" like cryptid so i tried to make lovely ignore cryptid when booting up and it's like i never had mods
i would try removing everything from the mods folder and installing everything again
how do i set the sell price of a joker
and now the game doesnt even want to boot, this is getting worse and worse
cost = [insert number of money (not in brackets)]
that's to set the buy price
the way i do it is hook into card:set_cost and make card.sell_cost = value at the end
how do i make a joker that upgrades when a boss blind's ability triggers? i referenced the code I have off of matador but it isnt doing anything
i dont exactly know how to do that
im on my phone so i dont remember the exact names
local set_cost_ref = Card.set_cost
function Card:set_cost()
set_cost_ref(self)
self.sell_cost = 0
end
obviously you would add whatever value instead of 0 and check if it fulfills whatever conditions you want
tysm
Gosh, I'm sorry to contribute another question to the already existing sea of them, but I'm experiencing a crash when the game attempts to call the "juice_up" function from within the "juice_card" function (functions/common_events.lua:1238: attempt to call method 'juice_up' (a nil value)) and I'm not really sure what's causing it or how to fix it. Here is the code from within the scoring section of my joker definition, I mostly took it straight from Midas Mask. As far as I can tell, it functionally changes the suit from hearts to spades pretty OK but then it crashes when it reaches the last card in the line.
Since it (seems?) goes through "v:change_suit" ok as it changes the suits, maybe it's the message part of the last segment?
For more context, the offending function and line in lovely seems to be this
I haven't been able to track down what chain of events is causing this or why it is misbehaving
removed every negative that made the lovely injector crash, now the game boots up for 1 frame before crashing im so fucking done
how do you use the create_card() function to create a specific modded joker?
does it crash only with cryptid or did you try with just steamodded
did both
weird
perfect thanks
first with only cryptid but it crashed with smods so i removed the negative priorities from there too
i mean thats probably not the issue
actually wait why are the lovely negative priorities so bad when a bunch of other mods have those and they dont cause issues
maybe that's why I asked if just smods worked
yeah refactored or not it still hates negative priorities
hate to be back so soon but, how would I spawn the joker at the start of a run from a deck, I tried using the apply function and spawning a card, but it seems it tries to do that before the area is loaded which returns a nil and I get a
"attempt to index local "area" [a nil value]"
crash
negative lovely priorities should not be a problem
well idk they seem to be a problem
you need to update lovely
same error on the latest lovely i can find
let me see your logs
logs as in..?
yo I still need a little help with this problem I'm having
in your mods folder. lovely/logs, share the latest one
The game claims I am comparing a table and var, when did G.GAME.dollars become a table. also, what do I use instead?
https://github.com/ethangreen-dev/lovely-injector/releases/tag/v0.7.1 is this not the most recent lovely?
this is the one i just downloaded
that is the most recent, yes, but your log doesn't indicate that you've installed it
thats odd
Lovely 0.5.0-beta6
did you follow the install guide referenced to in that release?
np!
i just thought it went like every other mod and you just needed to put it in the mods folder
it had been a while since i last installed lovely :p
I was just wondering how you ended up with that version 
i should make a second guide to install Balatro mod
the more the merrier
ironically all of this didn't fix the problem i originally had
how do i set the card in context.buying/selling_card to the joker initiating it and not the joker being sold/bought
uninstall all of your mods and reinstall them
you likely have some ancient mod files kicking around
and when I say uninstall I mean "completely delete, not overwrite"
yeah dont worry i already do that
gotcha
I'm tired so I'm probably missing something obvious, but this calculate function (on a seal) is supposed to check if the card is in the hand but unscoring, but it doesn't seem to work. any ideas on what's going wrong here?
is there a rightmost equvalent to the "pinned" sticker?
only had 1 mod pre-2025, hopefully replacing it should fix it
nope, nothing
maybe my indexing is wrong? i dont think so, since the other atlases work well
why do you have "key = false"?
your guess is as good as mine
these were some of the first lines of code i made for this mod
lemme try removing it
I'm trying to make a joker that works like mr bones, and I'm using code from mr bones. is there a way to do it to make it not say the 'saved by mr. bones' text?
well this is new
How could I force a joker to always be rightmost?
How do I loop through all played cards in a hand, check if any cards rank is 4, and then retrigger it?
check the code for Hack
and just modify it a bit
the smods example jokers mod has a sock and buskin reimplementation that should be pretty easy to convert to 4s instead of face cards
wait the smods example jokers still exist? i couldn't find them last i checked
what's the name of the lua file are the jokers code in?
card.lua
I got a crash and here's my code:
SMODS.Joker {
key = "letter_d",
loc_txt = {
name = "D",
text = {
"Retrigger each played {C:attention}#1#{}"
}
},
config = { extra = { cardRank = 4 } },
rarity = 2,
atlas = "alphabet_atlas",
pos = { x = 0, y = 0 },
loc_vars = function (self, info_queue, card)
return { vars = { card.ability.extra.cardRank } }
end,
calculate = function (self, card, context)
if context.other_card:get_id() == card.ability.extra.cardRank then
return {
repetitions = 1,
card = card
}
end
end
}
https://github.com/Steamodded/examples/blob/master/Mods/ExampleJokersMod/ModdedVanilla.lua Specific link to the joker example code here
Nah, if they were I'd be SOL, haha
context.other_card is nil because you'
oops, hit enter too soon
you're not actually checking for a context as far as I'm aware
I got soul in a test run....
see this calculate function from the example sock and buskin
Also i fixed the problem
How does loc_color() work? Been trying to figure out how to get a custom colour for joker names through looking at cryptid code but it just isn't clicking in my head
Can you change the text color of the badge on a sticker
A Lovely patch is required for custom text instead of "Saved by Mr. Bones"... something like I had done with https://github.com/TheOneGoofAli/TOGAPackBalatro/blob/main/lovely.toml ... then set G.GAME.current_round.usesavedtext = true & specify string with G.GAME.current_round.savedtext = "customtext". Crude patch, but works.
Looking to see if anyone can help me with sprite positioning for a thing. I need these sprites to glowing outline sprites to overlay atop their respective parents, but I'm not sure i fully understand how the nested coordinates for the movables/nodes work?
It looks like they're all starting in the top left (the largest outline is 153 pixels wide to 95 pixels of the yellow joker beneath, so it feels like I should just be able to offset the position somehow, but my experiments to do so always seem to lead to weird results
Can anyone advise?
Okay I think I figured it out kinda? It's not super self explanatory but "offset" isn't actually set anywhere normally when you create a sprite/moveable, and setting the transform position directly even if it's a weak bond will cause the offset to be reset automatically. I think you need to call set_alignment()
Do jokers spawned with DebugPlus still show up in the shop?
yes, I believe so. iirc it's happened to me when debugging a joker
okay awesome, no weird shop bug for me
anybody know if it's possible to make a joker that's larger than standard size? If there's an example of it, I'd love to know which mod
or display_size right above that
it wont add the sticker
tysm, I assume this is put alongside stuff like the atlas key and position?
heya! i'm trying to make a joker that guarantees a gros michel or cavendish in the next shop if the player doesn't already have one
this is how much progress I've made (creating_store_joker is a custom context), and while the card spawns, it's not buyable and it appears on top of one of the buyable cards
what's the best way to fix this?
worst case scenario I can always just add a custom tag, but I really want to see if it's possible to just do it within the code
You forgot to emplace it
Unless create_card does that automatically
I can't remember
create_card doesnt do that
bump
that fixed it, ty!
solve it with a lovely patch targetting badges[#badges + 1] = create_badge(localize(v, "labels"), get_badge_colour(v)) on UI_definitions.lua, for anyone else looking to do the same on a sticker
is there any way to add legendaries to the pool in create_card without making it ONLY legendaries
still trying to figure this out
it says you've got a line printing, what happens with that?
figured this out
it seems create_card is incompatible with modded stickers so you have to add it directly to the card using SMODS.Stickers
spits out a massive table
probably two?
I think the table is of the card being played
too big to really tell anything, the console is really limited
isnt "card" usually used to refer to the joker itself?
this is on a seal, so card refers to the card it's on
since iirc self is the seal
does the debugplus console dump anywhere?
doesn't seem like it
okay it does
okay it prints the data of the same card twice when just playing the card itself (so it scores)
which, is correct
it DOESN'T print when playing it unscoring, so. that means it's not running that code at all, which is ALSO correct
so that means isinhand is false
so WHY doesn't the if trigger???
vscode lua extension really doesn't like hooks
shows a warning on every single one
okay huh. the calculate function doesn't even try to run if the card is unscoring
I didn't know that worked like that?
literally not even this will work
which I guess makes sense, but hmm
Hmm guys what should the joker "F" do in my mod? There's not much context behind the name, but I need at least some idea that is balanced and creative
yea youd need to add unscored cards to the calculation routine
this just means I need to add a new calculate context when the appropriate conditions are met, right
or is there something more to adding them to the calculation routine
Hi autumn
so youd actually be patching how the game scores cards while calculating a played hand which is different
Ok someone in #⚙・modding-general came up with an idea but I'm not sure how to implement their idea of "Destroyed cards give 3$". How would I even do that??? Im very new
search through..... i forget if its functions/common_events.lua???
i've been looking through, scoring is in state_events I believe
ah oops
check canio 
look for where smods adds the hook for -- TARGET: Add your own ...
for card scoring
cryptid has an unscoring context patch for this file, but the code it's looking for in the pattern doesn't seem to exist in newcalc smods
somewhere around there you might be able to make it have a context for unscoring cards
sorry im not at my pc rn just kinda going from memory haha
found this, but it's in what appears to be joker code
I checked and... I still don't understand. I see "glass_shattered" as the context, but surely my joker is supposed to trigger not just when a glass card gets shattered.
actually look here https://github.com/Steamodded/smods/wiki/calculate_functions
Ok I now know how to check when a card is destroyed, but I don't know how to give money
any of yall got a link to the example jokers mod repo? can't find it anymore :(
cheers
ease_dollars
So in the return I need to call the function ease_dollars() right>
you can add dollars = 3 to your return for example
That sets dollars to 3 though right?
SMODS.Joker {
key = "letter_f",
loc_txt = {
name = "F",
text = {
"Destroyed cards give {C:money}#1#${}"
}
},
config = { extra = { money = 3 } },
rarity = 2,
atlas = "alphabet_atlas",
pos = { x = 1, y = 0 },
loc_vars = function (self, info_queue, card)
return { vars = { card.ability.extra.money } }
end,
calculate = function (self, card, context)
if context.destroy_card then
return {
ease_dollars(card.ability.extra.money)
}
end
end
}
that's the wrong context for what you're trying to do
that's for your joker destroying cards
you want to use this
And the ease_dollars bit? Is it also incorrect?
if you ran that I believe you'd get 3 dollars per card played
yup
do this
For some reason it shows that you can earn 72 dollars not 3
I changed the context
was able to find this? maybe?
in state_events
what's your calculate function now
calculate = function (self, card, context)
if context.remove_playing_cards then
for index, value in ipairs(cards_destroyed) do
return {
dollars = card.ability.extra.money
}
end
end
end
that doesn't crash?
I havent tested
i think it'll crash
anyway
cards_destroyed is not defined there, you can access them in context.removed
if you return inside a for loop you will not finish looping through all cards
you will return on the first element always
Then how do I know how many times to give money
And yes it did crash
well if context.removed contains all destroyed cards
then you just get the length of that and multiply by your money
So I change the context to that?
No
within context.remove_playing_cards you have access to context.removed which is a list of the destroyed cards
calculate = function (self, card, context)
if context.remove_playing_cards then
return {
dollars = card.ability.extra.money * #context.removed
}
end
end
So like this?
ye
Ok it works but now I wonder why the amount is 72 even though I set it to 3
Start a new run
is there a way i can check what language the game is set to
G.SETTINGS.language
so would the language be written in the language it is set to when checking that language
like would it be G.SETTINGS.language == "French" or G.SETTINGS.language = "Francais"
if you wanted to check for french you do G.SETTINGS.language == 'fr'
they're language codes
these are all of them it seems
game.lua:958
SMODS.Joker({
key = "commie",
rarity = 2,
pos = { x = 3, y = 3 },
atlas = "jokers",
cost = 9,
blueprint_compat = false,
calculate = function(self, card, context)
if context.before and not context.blueprint then
local targets = {}
local target_total = 0
for k, v in ipairs(context.scoring_hand) do
if SMODS.Ranks[v.base.value].is_numeric then
table.insert(targets, v)
target_total = target_total + v.base.nominal
end
end
if #targets > 0 then
local ranks = {}
for k, v in pairs(SMODS.Ranks) do
if v.is_numeric then
table.insert(ranks, v)
end
end
table.sort(ranks, function(a, b) return a.nominal < b.nominal end)
target_total = target_total / #targets
local target_rank = ranks[#ranks]
for k, v in ipairs(ranks) do
if target_total < v.nominal then
if k <= 1 then
sendErrorMessage("Mathematical paradox detected! Aborting calculation...", self.key)
return { message = "ERROR" }
else
target_rank = ranks[k - 1]
break
end
end
end
G.E_MANAGER:add_event(Event({
func = function()
for k, v in ipairs(targets) do
SMODS.change_base(v, nil, target_rank.key)
end
play_sound("gong", 0.94, 0.3)
play_sound("gong", 0.94 * 1.5, 0.2)
play_sound("tarot1", 1.5)
return true
end
}))
return { message = localize("k_balanced"), volume = 0, colour = { 0.8, 0.45, 0.85, 1 } }
end
end
end,
})
this joker plays generic1 when more than one number card is scored?
this might be a little OP
(it starts at 1.2x i just upgraded it a bunch before this hand
im trying to make a joker that gives x3 mult when the whole hand is enhanced; but it triggers as long as 1 card in the hand is enhanced right now, i think the issue is im not sure how to check if a card is not enhanced
There are also community mods that add more localizations if you want to cover all the bases:
vi Vietnamese
ro Romanian
tr Turkish
uk_UA Ukrainian
zh_HK Hong Kong Cantonese
There was also a Finnish mod that's since disappeared
The language codes follow https://en.wikipedia.org/wiki/IETF_language_tag standards
because you are only checking if there is at least one card enhanced
the rank may have to be a string
but also why context.repetition
how would I check for multiple cards?
I would check if the number of enhanced cards in my scoring hand is equal to the size of my scoring hand
weirdly enough it was working fine but now its giving me random center = nil stuff ? ? ?
Honestly im pretty new also so im not sure why that happens
Why the need to check the language specifically? The function localize() is usually used to get text for display in the current language
spanish button
gives X3 mult if game language is set to spanish
Haha, great
🇪🇸
Who's Paul?
i dont know
none of y'all get that reference lmao

apparently held in hand ability jokers don't get retriggered when using the repetitions return 😭
sorry to interupt but does anyone know why G.hand.cards is empty here?
edit: nvm this was fixed in a steammodded update, putting this here in case anyone else is confused here
this guy works just fine on xmult jokers for example
but on this new jimbo i made it's just doing nothing
I am requesting help from smarter people than me please :3.
Is there any SMODS function to add a random enhancement, edition or seal to a card?
cant find it in the docs
i think there's poll_edition, poll_enhancement etc
that returns a randm edition enhancement etc and then you just apply it to the card
found em
you've just given a line number
I dont have telepathic powers
I guess I haven't asked, what smods version are you using?
last time i had an issue because my smods was mega outdated, but now i'm on 1410d
which i think is pretty up to date or should be
gonna check git jic
that's a few days out of date, no changes since then to retriggers
gonna pull the latest updates anyway
one thing ive learned is that you can never have the latest version
is there an easy way to make this work how i want it to
so you're creating the card, now what
first off don't use vanilla create_card
use SMODS.add_card
i have the emplace everything setup i mean the randomized joker
whats the difference?
it provides an interface that doesn't suck (it takes a single table instead of 7 arguments with 4 nils) and does the emplacing and adding to deck for you
for the randomness
oh i already used create card on like over 10 cards 🥲
you can make a SMODS.ObjectType with all the jokers this pool should be able to spawn
how do i do that
you start by reading the docs
although the latter two don't work if you're adding a Joker to the shop, so I had to do this
oki doki
just double checked, updating smods changed nothing unsurprisingly, gonna have to check what's going on...
not sure then, it should work
either way I can't follow what's going on in the video, there's too much unnecessary stuff going on
btw: I'm not having issues with this code, but if there is a better way to do this then please let me know
tru lmao let me just do a less overwhelming example
that's perfectly valid, SMODS.add_card specifically exists to facilitate putting joker-like cards directly into joker-like areas
would it make sense to do for the shop?
okay so this confirms it's not the blueprint mime silliness that's messing up the retrigger logic
ima go take a shower and come back to this
So if i want a 1 in 4 chance to add a random seal to a card it should be something like card.SMODS.poll_seal(*some random seed*, stdseal, 0.25, false) ?
no
card.SMODS? 💀
alright, ty for the teensy bit of insight though! good to know my code's not totally hacky 😅
