#💻・modding-dev
1 messages · Page 685 of 1
oh if you want them to be next to eacher
iterate through G.joker.cards
if the card found is the left or right one, check if the one to the right or left is the other card, if so, do extra stuff
if not, break
no it's for when they are together in the joker slot, position wouldn't matter!
there are definitely mistakes in here but i don't know how to fix it.
sorry for pinging you but can you please tell me what needs to be fixed?
xmult = next(SMODS.find_joker("j_yourmodprefix_TheRightSide")) and card.ability.extra.xmult or nil
so this?
no wait
get rid of the first line with next
i noticed that
and don't literally use yourmodprefix
okay so like this?
j_Sarge_TheRightSide
Okay, done
SMODS.find_card, rather.
i tried to make a deck skin mod but it doesent show any of the textures in the deck skins menu. is this because i used the "enhanced" set? i didnt know which one means a deck skin so i assumed this was it
okay so the game unfortunately crashes
@elder yoke
ok
alright i got good news and bad news. the good news is the game doesn't crash anymore, the bad news is that no xmult gets applied
heres the code of both cards.
@fading rivet sorry for pinging you again
youre finding "TheRightSide" when the key you put for the joker is "The_Right_Side"
Ah ty
lemme fix that then
Ey it works!
Alright, now to apply it to the other one
IT WORKS!
alr i wanna thank u guys so much for helping me out with this
is there a guide for dependecy formating
Anyone know how to make it so legendary jokers can appear in the shop?
Cos this doesn't work fsr
the key would be "Legendary" and not 4
trying that now
also idk if take ownership will work? i recall there being some jank
It doesn't, ugh.
I'm currently trying to make a joker that has a chance to destroy played cards, and I think I've mashed together too many jokers from vanilla remade to understand whats going on any more so I need some help
local counter = 0
if context.destroy_card and context.cardarea == G.play and not context.blueprint then
for _, pcard in ipairs(context.scoring_hand) do
if SMODS.pseudorandom_probability(card, 'zwp_rot', 1, card.ability.extra.odds) then
counter = counter + 1
SMODS.destroy_cards(pcard)
end
end
end
if counter > 0 then
return{
message = "Rotted"
}
end
all of this withing calculate obviously
if context.destroy_card and context.cardarea == G.play and SMODS.pseudorandom_probability(card, 'zwp_rot', 1, card.ability.extra.odds) then
return {remove = true, message = 'Rotted'}
end
can someone tell me how to fix this code? currentyl it works but if i try it with a full hand it removes play size, confuing stuff
local oldhighlight = Card.highlight
function Card:highlight(is_higlighted)
local g = oldhighlight(self, is_higlighted)
if SMODS.has_enhancement(self, 'm_baggutro_ghostcard') and not is_higlighted and self.area == G.hand and self.config.baggutro_ghostcard_enabled then
self.config.m_baggutro_ghostcard_enabled = false
SMODS.change_play_limit(-1)
end
return g
end
local oldaddhighlighted = CardArea.add_to_highlighted
function CardArea:add_to_highlighted(card, silent)
if SMODS.has_enhancement(card, 'm_baggutro_ghostcard') and self == G.hand and not card.config.baggutro_ghostcard_enabled then
card.config.baggutro_ghostcard_enabled = true
SMODS.change_play_limit(1)
end
return oldaddhighlighted(self, card, silent)
end
local oldcardarearemovecard = CardArea.remove_card
function CardArea:remove_card(card, discarded_only)
if Card.is(card, Card) and card.config.baggutro_ghostcard_enabled then
card.config.baggutro_ghostcard_enabled = false
SMODS.change_play_limit(-1)
end
return oldcardarearemovecard(self, card, discarded_only)
end
and that will remove the cards individually?
like, not every played card but it rolls for each one
Yes.
UTDR has some code that does that, same for cryptid
hiii im working on a joker that creates a negative soul card every time a lovers card is sold, but for some reason this error appears, could anyone help me?
https://github.com/Steamodded/smods/wiki/Calculate-Functions#contextselling_card this context does not have context.consumeable
it does have context.card
if context.selling_card and context.card.config.center.key == 'c_lovers'
oooh right
sorry im still new to modding
yep that works thanks so much
ok now i got a new error, this happens when all the 3 lovers cards have been sold and the game is trying to create the negative soul card
so this part of the code
:/
Change set to key in the add_card call
Where's that at?
i did that but now it generates infinite soul cards :((
You are forgetting to reset the amount of lovers sold
You should do that before the events
ooooh your right
ok i set it to 0 and now it works
thanks so much
:)
idk
I just know one of the cards lets legendaries appear on shop
Deck of equillibrium?
im getting this error and im not sure why, it stemmed from me attempting to add this joker and rarity (let me know if you need anything else to help solve)
and if i ignore the rarity and just set it to legendary, this happens when i play a hand
does anyone know a way to get negative cards to appear in the deck?
pool is not a valid property on a SMODS.Rarity
you also don't need to have a separate pool for your rarity
oooohhhhhhhh okay lemme try that in a sec
also how would i fix the hand thing?
Why collection_loc_vars exist only for blinds WHAT A HELL DUDE
because
Blinds are the only thing that need it
Well they dont really but thunk decided to do that
The whole blind collection is janky anyway
for cards you can easily check if they're in a collection and do stuff based on that
blinds aren't cards so they're of course weird
bruh
How I supposed to extend vanilla joker loc_vars then
like I want keep vanilla one but just alter collection
theres no way I need literally copy vanilla loc vars, this sucks like hell
i think you can grab the vanilla loc vars result somehow
however i don't remember how
that is insane
yeah that should work
Umazing
ah yes i love when i score ??? of ??? and my mult doubles
its the best feeling ever
how do you modify the rarity of the Soul? Either with a joker or voucher or tag or anything
you have to use a patch i think, last i check it was very hardcoded
iirc not even taking ownership of it works
dang
Is there a way to check if a specific voucher is redeemed, like some function that returns a boolean maybe?
if G.GAME.used_vouchers["voucher key here"] then
-- do code
end```
TYTY
last thing, how do I get the cost of the current booster pack when I'm in context.skipping_booster?
SMODS.OPENED_BOOSTER.cost?
TYTY
I'm trying to make a voucher that does the showman thing when redeemed, but this doesn't do anything. Somehow, this voucher doesn't do anything, and Showman still does the effect despite me overriding it and removing the function there. How is this even possible
Showman is hardcoded in SMODS.showman
Also it should be v_modprefix_key
do modded tarots have the same weight as vanilla ones?
by default, yes. but if you opt into the new weight system (it's an optional feature), you can set individual consumables to be rarer or more common than usual
won't break other mods, don't worry. it's an optional feature only because it adds more calculation contexts that might be heavy on performance, so smods will only do that for mods that actually need it
just enable the object_weights optional feature, and then add weight = X to whatever object you want to define
10 is the default weight
https://github.com/Steamodded/smods/wiki/Weight-System
cool, thanks
is there any way to change the key of the showman or at least delete / disable it?
It does break vanilla seeding though.
wdym by that
The cards that show up will be different from the cards that show up on the same seed without object_weights enabled.
You would have to patch SMODS.showman
how?
sorry if I keep asking for stuff this has just been really frustrating
but like I have no clue what entails "patching" something like that
do you just mean like overriding it or going into smods and changing it?
or something else?
In this episode, I teach you how to create Lovely patches and hook functions
Repo: https://github.com/the-Astra/ExampleMod/tree/Episode-3
Tools:
- toomanyjokers: https://github.com/cg-223/toomanyjokers
Resources:
- SMODS wiki: https://github.com/Steamodded/smods/wiki
- VanillaRemade: https://github.com/nh6574/VanillaRemade
Holy shit thank you
Ironic: guy making programming languages themed mod is too lazy to program the mod himself
(Asking if anyone wants to develop for my mod, https://discord.com/channels/1116389027176787968/1413378268928802836)
is there any documentation on emult? its not in the normal attributes tab
No, because it's not implemented in SMODS
oh mb i thought someone said it was baseline now
are you perchance making a kamsandwich mod
I don't think KamSandwich has covered Ultrakill lol
eh close enough
but Hybrid is there
The current Joker list
I tried to make this blind remove enhancements from played cards by just copying shit from Vampire, but it's not doing anything.
You would likely hook SMODS.add_to_pool and check if an object is from your mod (if prototype_obj.mod and prototype_obj.mod == 'YourModID' something along those lines)
This is a little advnaced for a new modder though
why are my cards going the wrong way?
How do you change the selection limit on a specific blind
You would use SMODS.change_play_limit and SMODS.change_discard_limit in set_blind then you would do the reverse in defeat and disable
So basically when selecting blind enact the change_play_limit to 3 but change it back to 5 upon defeating it or losing
Is that right or am I missing something
Yes, you would also have to do SMODS.change_discard_limit
Alright
How do I give a message to every joker in the joker area? This is my current code that currently does nothing, and so I'm sure I just don't know how to set up events properly
function Uma_Tact_refresh()
for k, v in ipairs(G.jokers.cards) do
if v.config.center_key == "j_uma_tact" then
v.ability.extra.current = (G.GAME.uma_global_counts.spread + G.GAME.uma_global_counts.bloom) * v.ability.extra.increment
G.E_MANAGER:add_event(Event({
func = function()
return {
message = "test message",
card = v
}
end
}))
end
end
end
SMODS.calculate_effect({message = 'message'}, v)
does anyone know how to hook onto loc_vars? I'm not too familar with hooking SMODS.Joker functions
is there a way I could also run a bit of code specifically when the message shows up, not when the message is queued?
any ideas how to get the level of the lowest level hand?
local level = math.huge
for k, v in pairs(G.GAME.hands) do
if SMODS.is_poker_hand_visible(k) and v.level <= level then
level = v.level
end
end
Is it possible to pin every joker to their current position, the pinned thing says the leftmost specifically and I wanna know how strict it is
for k, v in pairs(G.jokers.cards) do
v.states.drag.can = false
end
So it has nothing to do with the pin thing?
Yes, Pinned sorts pinned jokers based on when they were created.
How do I get the consumeable currently being used?
If it's in context.using_consumeable then it's context.consumeable otherwise it's G.play.cards[1]
Cool, and if i was getting the names of the cards it would be something like context.consumeable.ability.name?
No, it would be localize({type = 'name_text', key = context.consumeable.config.center.key, set = context.consumeable.config.center.type.key})
Ah cheers
This crashes because the random element is returning nil. any idea why?
local planet_pool = get_current_pool('Planet')
local planetchoice = psuedorandom_element(planet_pool, "seedyseedseed")
I GOT IT
I can't spell lol
psuedorandom
Yehhhh I just went, "hey wonder if i'm spelling this wrong" and low and behold
when i pressed the textures buttonin the options it crashed
ah i forgot to thank you for this, works perfectly :)
I'm trying to make a card return to hand if played. Is there a way to do this?
if context.stay_flipped and context.other_card == card and context.from_area == G.play and context.to_area == G.discard then
return {modify = {to_area = G.hand}}
end
You legend
my game crashes when try to play my deck.
Try putting the SMODS.set_scoring_calculation in an event.
Thx, it works
Hey guys— where can I get my mod uploaded to BMM? I found the BMM index form, but when adding the release .zip GH link I get an error asking me to “use a download link”
Is there any other form / alternative way?
i think youre supposed to use the clone zip link not the release zip link
I want to make a texture pack that replaces the tarot artwork. How can I change the tarot's atlas to mine?
my game crashes after tag was supose to apply .
Thank you 🙏🏻
whats the correct way of making a consumeable only usable when in a blind?
try wrapping the consumable's use ocnditions (if you have any) inside the can_use function inside a check for G.STATE == G.STATES.SELECTING_HAND
regardless, the correct way would be to ensure that can_use only ever returns true during the precise conditions that you want to use it.
i know but im not sure what the correct way to check if youre in a blind or not for a consumeable
bcs i want this consumable to halve the current blind score needed
hmmm
ive already looked up how to do it for a joker bcs a mod i like does something similar
but directly translating that to consumeable logic doesnt work sadly
well if you're using the newer releases of steamodded, that specifically should be easy by using 0.5 xblindsize in the consumable's use function
uhh
i updated like a week ago
i had issues with levelling that was fixed in newer versions so i decided to update it
G.GAME.blind.chips = G.GAME.blind.chips / 2
this is what i using befroe
Bump
Tried making this blind that basically just acts like Vampire, but it doesn't do anything.
(or rather what i tried using)
how does blind size work?
from what i understand, it's basically the same as chips/mult/xchips/xmult/etc. that jokers do
you could probably do smth like SMODS.calculate_effect({ xblindsize = 0.5 }, card) in your consumable's use function?
oh that actually works
wowie
but im still a little confused on how to get the can_use correctly
is during a blind the only condition where you want the consumable usable?
every consumable ive looked at from other stuff has a different context check which makes sense
yes
you could probably trry
can_use = function(self, card)
return G.STATE == G.STATES.SELECTING_HAND
end
bump
G.GAME.blind.in_blind
right, forgot about that. return that from your can_use function instead
bump
Can anyone please help me? I have been making a joker that gives xmult if the poker hand is a high card, but instead it will always give xmult for every poker hand. Does anyone know how to fix this?
one sec
if context.joker_main and context.scoring_name == 'High Card' then
try that
like this?
sorry for pinging
nws nws
idk you could try simplifying it a little bit
like why do you have card.ability.extra.type?
I'll admit, i had copied the code of one of those common poker hand jokers, without exactly knowing what some things do.
ump
what i do is slightly different
Im still trying to learn code so i didn't know what each line of code exactly does.
if context.before and not context.blueprint and context.scoring_name == 'High Card' then
i just have this
which then triggers a line that scales itself with chips mult and xmult
if context.joker_main then
return {
chips = card.ability.extra.chips,
mult = card.ability.extra.mult,
Xmult = card.ability.extra.Xmult
}
end
and then this block which actually applies it all
so im not entirely sure why your stuff doesnt work
well you just said it always triggers right?
Yes
id say try to simplify it
How do i do that?
remove everything that isnt necessarry for a MVP (minimal viable product)
basically id say
from this block
remove mult
if youre only doing xmult
in the loc_vars
wait
wait wait
i just realised you have two loc_vars?
haha no worries
we all make mistakes
but to help simplify
config = { extra = {
chips = 6,
mult = 7
},
},
loc_vars = function(self, info_queue, center)
return { vars = { center.ability.extra.chips, center.ability.extra.mult } }
end,
calculate = function(self, card, context)
if context.joker_main then
return {
chips = card.ability.extra.chips,
mult = card.ability.extra.mult,
message = 'MANGO',
sound = 'YA_Mango',
colour = G.C.MULR
}
end
end
heres an exmple of something i use
ignore the corny joke
but
if you do something very simple liek this
and change the context check to have lua context.scoring_name == 'High Card'
i think that would work
G.C.MULR
amazing
I think if I remove that I'll explode
alright i am not sure if this is correct so if it's not please let me know what i need to fix
you don't need chips
and the "Lua" was me typing something incorrectly
oh and change center ability extra mult to xmult
is there a function to set the soul sprite? I know there's set_sprite_pos for the regular card sprite
okay so like this?
hey is any1 willing to help me iwth a sprite
yeah I think so
okay, let me see if it works
It works!
tysm so much for the help! (and putting up with my stupidity-)
I've been trying to make my own little mod so being able to ask here for help has saved me a lot.
long story short, i'm making a spectral card. though i can do some sprites just fine spectrals seem a tad bit too complex so if anyone is willing to help me out, please do ^^
I tried to make effectively a boss blind version of Vampire, but it's not working for some reason? Am I missing something?
oh yeah me too
I was/am in the exact same boat
Im making an inside joke mod for my college
oh so for friends and classmates?
bump...
yeah exactly
That's pretty cool, i hope they enjoy it!
it's so sad seeing you bump the same question when I don't know the answer 😭
oh they have ive already released some demos
yeah ik
Nice to hear
i'm just waiting for someone who could know the answer to read my message ig
and I will release It publicly after removing their faces from the sprites
to not dox anyone
I am actually trying to make a TF2 mod! I saw there wasn't a mod for it so decided why not make one for it?
oh hell yeah
You actually just helped me fix the code for the direct hit joker!
I was considering doing something similar but for persona
one of my favorite game series
and i still might but I'll have to see
I'm def gonna wait until 1.1 for that
these are the jokers i got finished rn! (This is a test mod i use for testing thats why there are Cotl cards in there to)
U mean the red and blue ones?
I like all 3 of them, i think i did pretty well on them! Did get some advice on the spy coat and it def looks better then the old versions
Uh currently not. rn im planning to make cards of whatever ideas i have.
I'm not looking forward to spriting my mod for the public version
def my worst quality
Those 2 spies actually work together in an fun way! one gives chips and the other mult, but when together they give xchips and xmult!
come on don't beat urself down yet
i believe you can make some good card art!
none of the art I currently have is made by me lmao
actually i got a question i want to ask regarding a joker card idea i got.
Oh, can you show me some?
Okay, so i want to make a joker that gives +2 chips for each chips obtained from playing cards. so if you play an ace you gain +22 chips once all playing cards are used in hand.
uhh
Looks pretty nice!
i think
you can just get the id and do it X2
bcs ace ID = 11
so if you do something card_chips = card:id X2
that should work
although
that line i just typed wont work
bcs thats not how to correctly call it
but that idea should work
Okay then, i wanted to just know if it was possible but thanks!
oh with programming
usually the sky is the limit
i have a deck that allows you to play the daily wordle
the joker would be for the black box, though i do not have the card art for it yet.
what-
tbh that's kind of funny
tbh u should've called it "Joker with a typewriter"
cus funny
i love how many times people have independently made "wordle in balatro"
Actually i have one more question!
how would you share your mods with github exactly?
oh really?
i want it to share it with someone so they can try it themselves.
bumping this
do you know how to make ar epo
wordle is popular here sheesh!
no, i do not unfortunately
i made it because my friends like to play the daily wordle
its not very difficult i reccomend just looking up a tutorial for it
off the top of my head ellestuff has a wordle joker (using canvassprite to render on the joker and it reads your keyboard), and aikoyori's shenanigans has wordle as a boss blind (because the mod lets you attach letters to your playing cards)
im honestly really happy with how mine works
allowing you to actually play it
fetching the daily wordle
and then taking the first letter of your joker and using as if youre actually playing
the sprite i use for mine is an actual wordle attempt but i just removed the letters
bump
does anyone know why this doesnt work 😭
G.E_MANAGER:add_event(Event{
func = function()
play_sound('prefix_musictrack')
return true
end
})
end```
I don't know for sure, but I don't think your mod's prefix is literally "prefix"
You do need to put your mod's actual prefix in the string for whichever custom sound you're calling.
i know its js for discord 😭
Anyways, is that your whole calculate function? Or is there more before that? This little snippet of code looks fine as long as the correct string is in the play_sound call.
Also, please be more specific about how it "doesn't work". Does it cause any crash or error? Does it just do nothing when you enter a blind?
yeah its the only thing in calculate
it gives an attempt to perform arithmetic on field 'dt' [a nil value] error
Could you show a screenshot of the actual error message?
Okay, so I'm getting an idea of what's going wrong here. This file is actually supposed to be music, is that correct? It seems like music isn't meant to be played through play_sound
Have you looked through https://github.com/Steamodded/smods/wiki/SMODS.Sound ? Because determining when a music track is or isn't meant to be played, should be controlled within select_music_track(self) in your music's SMODS.Sound table.
yw
how do i get the current stake 
how can i get a list of all deck centers?
[besides looping through G.P_CENTERS]
[if that's possible]
G.P_CENTER_POOLS.Back iirc
G.GAME.stake
I want to make a texture pack that replaces the tarot artwork. How can I change the tarot's atlas to mine?
thanks ^u^
don't; use #1300851004186820690 instead
^^^^^^
[malverk is so handy]
[[handy is so cartomancer]]
[[[cartomancer is so malverk, bringing us full circle]]]
lmao
ok i'll check it out
ty
[talisman is somewhere else on the graph doing its own thing]
talisman is so medium
medium is so trance
trance is so deja vu
deja vu is so talisman
(insert joke about talisman being mid)
how can i check if the stake is a certain stake or higher
don't
set a flag when the stake is applied and check that
oh right, stakes apply previous stakes
stakes → steaks
so do i hook apply for that?
yeah
...SMODS.GameObject.apply or SMODS.Stake.apply? 
-# although probably apply_to_run 
can someone help me figure out what theses would do ( and what to call them)
also if you overlay both thats just makes normal jimbo
better channel for that kind of question is #⚙・modding-general
bump
the specific stake's apply function
actually I should check something
yeah i'm stupid you can use G.GAME.applied_stakes which is an array of stake keys and check if the stake in question is included. there really should be a map version of this
flags are still preferred for uniquely applying an effect for the stake elsewhere
What if instead of SET_SFX it was-
I'm gonna start saying don't to every question I see here
I guess that means I do more than I don't
no you don't more than you do
well how much of that is from "do not"
nah it doesn't count partial matches
because it's weird
verb forms normally count but contracted negations maybe don't?
yeah that checks out
i can a lot more than i can't, apparently
can someone tell me whhy this still gets destroyed when eternal?
where can i find the code thats run when the start run button is clicked after selecting deck ect
G.FUNCS.start_setup_run in functions/button_callbacks.lua
tyyyy
I could be willing
How do I set a variable when a run starts?
bumping this again, how do I fix this?
unrelated to it not working but you should just use card.vampired instead of a new variable
since vampired is already used pretty much everywhere to check if a card is going to have its enhancement removed
hey is there a defined context for when a card is enhanced to a specific enhancement
no, but you can use context.setting_ability with some extra checks
aure, give context.setting_ability before and after ability tables of the set card and my life is yours!
-# i could probably make that happen myself though, i just wanted an excuse to do this bit
i mean
you do get the after, through context.other_card
any particular reason you need the before?
i have a joker that increases the given dollar value of gold cards, but when you set ability, it resets the entire ability table, so normally you can't combo that joker with smth like midas mask, which is part of the intent of that effect
the way i solve this is via a patch that makes midas mask only make face cards that aren't already gold cards, gold cards, but it's not a fix that i'm particularly happy with 
did you see context.unchanged exists in context.setting_ability
so you can avoid applying the increase if you're converting a gold card to a gold card
i'm not doing any converting. any converting happens with midas mask. it's a combo issue. the reason i want a way to get the before table in context.setting_ability is so i could, in either my mod calculate or in that joker's calculate, see if midas mask changed a gold card to a gold card and force it to respect the value change
see if midas mask changed a gold card to a gold card
you can do that. withcontext.unchanged.
along with checking if context.new is "m_gold"
nah they can't access the old values
i guess i'm just not getting the issue, sorry lol
joker scales gold card to +4, later midas mask changes +4 gold to +3 gold, no way to set back to +4
wait, this looks like it would be a really easy PR, now that i take a sec to look
would it not be appropriate to make the old_center here accessible as part of the context table?
Yes, you could just do G.P_CENTERS[context.old]
if i increase a value in the ability table of an instanced card, and try to enforce that change by trying to access that prior value before it gets reset via set_ability, i can't do that via the prototype centre
you can't do that with the old center either
i see. so the only option would be to do something like put copy_table(self.ability) into a local variable and pass that as part of the context table?
hello chat i know NOTHING about modding or coding but i made a card skin pack (just replaces default faces + number card colors) using a mod template. but i was trying to make it so it added a new card skin so i could do high contrast and low skins (and looked at other card packs to see what lua code they used) and i got in the game!! but 1. it wont change the number card colors to my new skin? 2. it adds a gradient to hc cards which ik is in the game code already but id like it not to be if possible. does anyone know anything about why its doing this (#1) or how i can stop it doing this (#2)
I have this blind but it doesn't do anything
Anyone know why passing in data for an infoqueue via {set = "custom_set", key = "custom_key", vars = {some table}} results in a name displaying but not a description, but it does work if I do this for vanilla objects?
it wasn't even working with the Other set
I just made my first mod for any game every and it took me like 6 hours for one joker 😭 I would love it if anyone more experienced than me could take a look and see if i did anything wrong.
https://github.com/Be4nos25/BalatroButFunny?tab=MIT-1-ov-file
It looks actually pretty close to good, but I would move the check to start juicing after you add to the "destroyed" variable instead of its own context
Makes sense just changed it
Oh shi your youtube tutorial helped me a lot i just realized who you are!
so the smods wiki shows the sounds for the soundtracks, but i dont see the other sounds like xmult, gaining a tag, etc, does anyone have a list of those sounds
thx
how do I fix this damn thing
i've been bashing my head into a wall with this. it keeps occasionally eating editions/seals and i can't work out for the life of me why. so far it seems to consistently be holographic as the clip shows.
help 
How is it that mods with custom non-boss blinds don't make the ante go up when defeated
SMODS.Blind({
key = 'tinyblind',
atlas = 'BZR_Blinds',
pos = {x=0, y=1},
--boss_colour = HEX('00b99f'),
config = { boss = false },
mult = 0.75,
dollars = 2,
small = {min = 1},
ignore_showdown_check = true,
in_pool = function(self)
return false --G.bizarrtro.is_running
end,
set_blind = function(self)
self.boss = false
--G.GAME.blind.boss = false
G.E_MANAGER:add_event(Event({
trigger = 'after',
delay = 1.0,
blockable = false,
func = (function()
G.GAME.blind.boss = false
G.GAME.round_resets.blind.boss = false
G.GAME.last_blind.boss = false
return true
end)
}))
end
})
--[[SMODS.Blind:take_ownership('bzr_tinyblind', {
key = 'tinyblind',
atlas = 'BZR_Blinds',
pos = {x=0, y=1},
--boss_colour = HEX('00b99f'),
mult = 0.75,
dollars = 2,
small = {min = 1},
ignore_showdown_check = true,
in_pool = function(self)
return G.bizarrtro.is_running
end,
set_blind = function(self)
self.boss = false
--G.GAME.blind.boss = false
G.E_MANAGER:add_event(Event({
trigger = 'after',
delay = 1.0,
blockable = false,
func = (function()
G.GAME.blind.boss = false
G.GAME.last_blind.boss = false
return true
end)
}))
end
})]]
Here is one from my mod, it for some reason makes the ante go up when defeated despite me seeing what I believe is stuff meant to not do that
Have you done any patching to make this work?
A lot of code damn, maybe even too much
yeah, vanilla code assumes that any blind not named exactly "Small Blind" or "Big Blind" is a boss, and you have to patch to fix this
e.g. https://github.com/wingedcatgirl/Menthol/blob/main/lovely/blinds.toml#L34
I dont like non-blicking non-blockable events in it tho
This thing hard to time properly
so ive got this joker that gives x1 mult when hearts are played, how do i make it play the xmult sound and show the X1 Mult thingy above the card on trigger
return {xmult = 1, message = localize({type = 'variable', key = 'a_xmult', vars = {1}}), colour = colour, sound = 'multhit2'}
thanks
How would one customize the process the way the game interprets what poker hand you are playing?
Such as the Four Fingers and Shortcut effects, but, doing your own custom stuff, like, "all hands are pairs" for example
using this, the xmult appears yellow, how do i make it be the red color it normally is
i assume i change colour = colour to smth else, but idk to what
G.C.Mult I think
Heres all the colours from G.C
https://github.com/Steamodded/smods/wiki/Text-Styling#named-colours-dictionary-gargsloc_colours
G.C.MULT
This xmult = 1 doesn’t do anything
Yes, that's so other jokers can see that it's trying to give xmult.
thx
SMODS.Blind {
key = 'supernova',
atlas = 'mannpowerblind',
pos = {
y = 11
},
boss = { min = 3, max = 10 },
boss_colour = HEX('ED712B'),
calculate = function(self, blind, context)
if context.before and not context.blueprint then
local enhanced = {}
for _, scored_card in ipairs(context.scoring_hand) do
if next(SMODS.get_enhancements(scored_card)) and not scored_card.debuff and not scored_card.vampired then
enhanced[#enhanced + 1] = scored_card
scored_card.vampired = true
scored_card:set_ability('c_base', nil, true)
G.E_MANAGER:add_event(Event({
func = function()
scored_card:juice_up()
scored_card.vampired = nil
return true
end
}))
end
end
end
end
}
help it doesn't work
is there a way to manipulate the rarity value of a card
wait no it does
thank you
it just doesn't do editions and shit
like not the rarity tag value, but like actually changing the weight of it getting polled
i wanna make a card slightly more common than the common rarity without defining a new rarity and shifting everything around, if that's possible
Enable the object_weights optional feature and add weight = number to the object definition.
and can that value be manipulated or is it a static config
If you want to modify it you would use get_weight instead.
alternately, as a cheap hack, you can make it give a tiny bit above x1 mult
the bit will make the message show, and if it's tiny enough it'll be lost in rounding and not even get displayed
but something's method is better if you want to be sure it's exactly x1
mfw rank 39
if context.discard and #context.full_hand == 1 and context.other_card == context.full_hand[1] and G.GAME.round_resets.ante <= SMODS.Rank.max_id.value and G.GAME.current_round.discards_used == 0 then
local rank = 'Ace'
for k, v in pairs(SMODS.Ranks) do
if v.id == G.GAME.round_resets.ante then
rank = v.key
end
end
return {func = function() SMODS.change_base(context.other_card, nil, rank) end}
end
when enabling optional feature, can you enable it specifically for objects that utilise it, or is it just enabled as a mod setting for the entire mod
it's for the entire mod
it doesn't really work otherwise
I thought this snippet was meant to change a card's rank to match the current Ante? Is that correct?
Yes.
Thanks for the confirmation. to be more specific, i'm trying to make the joker transform the first discarded card's rank to the ante level (if it has only 1 card on the first discard)
is it posible?
ex: the first discard is K , so the ante will go to 13
Do you want to change the ante or the rank of the card?
No, your code changes the rank of the card, not the ante.
I think you got it backwards
you asked for the first discarded card's rank to become ante number according to the example, but the other way around in the actual description
English isn't my first language, so I might struggle a bit with the phrasing. Please bear with me if my descriptions seem a bit 'backwards' sometimes!
bump 
how can the jimbo speak when player choosing mode to play?(Like choosing mode on Cryptid mod)
Is there a way to create a booster pack so that it only contains a subset of a certain consumeable type? An example using Vanilla Tarots would be having a booster where the pool is only the tarots that give enhancements, without creating a separate consumeable type
https://github.com/Steamodded/smods/wiki/SMODS.Booster {Set = 'area'}
Can you send me a file so I'll take a look
6 screenshots of code in notepad++ is crazy
thanks!
I'm working on it
how do i do a description w/ multiple lines "description": "This mod adds random ideas I have",
How can I get the x and y pos that a joker uses for its atlas sprite?
try config.center.pos
<@&1133519078540185692>
thx
@rapid stag
thank you! i'll see if this solves my issue
also I'm pretty sure that noFlipping check should be applied for each card individually and not for consumeable right
oh true 
good catch
My game crashes when I try to start with my custom stake
@rapid stag is things going well now?
haven't looked into it yet, i've been tending to other things 
My coder tried but nothing worked so far
what blind does this replace
Big blind
okay
here's what i've found from messing with stuff in my mod
making sure blind.boss is false and blind:get_type() is not "Boss" will fix most of the issues
then you need to patch things like this to also check for you blind
There is no instance of blind: get_type in the blind's code
What does this do
idk but its called
Blind.boss is false but there isn't any instance of blind:get_type in there
For the sake of saving time can you fiddle around with the code to find out if all that works
Seeing as my coder operates daily rather than immediately
I have this blind (and a version that just discards the selected card) but neither one actually does anything
Is this to make the game think it's big blind
It'd be better if you use an example that isn't confidential
i don't have an example that isn't confidential 😭
Can you just do this then
if you wait a month or so I can help 
Since you can't reveal details
I'd rather not wait a month
i'd kinda prefer not to + your coder will have a better understanding if he does it himself
Alright
tell him to look into the cash_out button_callback and the end_round state_event
So in short:
Include blind:get_type()
Include these 2 things in the images
And look into the cash_out button_callback and the end_round state_event
👍
None of these are in the blind's lua code, are they found somewhere else
button_callbacks.lua and state_events.lua
Oh
not blind.lua
However the get_type() and the stuff in the 2 images are to be in blind.lua though right?
my guy read the contents of the second image
"functions/state_events.lua"
Oh I didn't see that part
the other is also there
idk where get_type is defined
a full file search of lovely/dump should find it
you also need to fix all the saving stuff too

iirc the game will get confused where you are if you quit and reload
By the way why does a code block take up the whole line when I do it but when others do it it doesn't
??
lmao
Nvm
yeah
I've been doing 3 on each side instead of 2
wait does this work (2)
one works btw
-- 3 is for a full code block
local with = "color support"
2 or 1 are for snippets
Unrelated to that, a boss blind I have forces a card to never be selected, and it works normally but when using better mouse and gamepad's right click hold it still gets selected
Code?
So I'm working on a modded deck skin, and it works just fine in-game
But is there a way to give a single mod unique names for each suit? Like, instead of having a deck skin with a collective name for every suit
You should be hooking CardArea:add_to_highlighted
Ok
Also you should be doing showdown = true in boss instead of checking every ante.
Alright
Right now the showdown blinds aren't relegated to specific antes, I'm planning on adding them all first and then fixing up the minor stuff
thats a bit more than minor stuff thought
blind.boss.showdown is used in other places
I'm saying that I'm planning on adding all the bzr blinds and then correcting the minor details like minimum ante and showdown check before a public release
As I understand it I need to have this value change depending on what suit is being looked at
Any guidance from there?
This is what it does right now
I had the description point to a table, but I just need to get loc_txt to read from a specific item in the table
loc_txt values should be a string; not sure what description is besides a table, but you access an item in it with description[key] where key is a key in the table, could be a number or specific string
Would sharing the lua file help clarify things?
you could, but i just wanna see like where description is used, where it's defined etc
Yeah you'd do like description[1] or description[3] etc, depending on which suit to use - note that in Lua the first item in the table is indexed 1
This is what the rest of that deckskin script looks like
ohhh wait i see now
In the for loop you can use the index which you currently have as _ and just put description[i]
Assuming you rename it to i
^^ yea
As long as suits and descriptions are kind of "lined up" in terms of suits, that should work
Worked! Thanks a bunch
the humble bump
If it doesn't do anything at all I can only assume that the condition isn't being met
Did you check that it enters the if statement
i don't even know how to check that
Wait, I know, it's because your timer logic is in the calculate function
Calculate isn't called repeatedly all the time
If you wanna do stuff on a timer you probably should use the update function instead
which works how
how many FPS is balatro typically run at?
Actually blinds don't seem to have an update function, so you'll prob have to make a hook for it
And you shouldn't need to worry about that cus the update function receives a parameter that contains the amount of real time that passed since the last frame
You won't have to worry about that because dt in function Game:update(dt) (which you'll have to hook to get your blind to work) is the amount of time in seconds since the last update. So, you can your timer to start at 0 and add dt to itself in the loop until you reach a set number of seconds.
What's the function that's basically generate_card_ui but for hovering over tags?
yeah I don't know how to do that lol
@silk latch this is how to make the hook (the G.nxkoo_dies isn't part of it, that was just that person's code)
you'll have to filter for your blind specifically, iirc it's if G.GAME.blind and G.GAME.blind.config.blind.key == 'bl_prefix_key'
okay but how do I make the injection itself
works, thanks 
~~alright, question. i'm looking into making a mechanic where i sorta "restart the ante" as part of a consumable mechanic (that can't be used during a blind, obviously)
so for example, if you've beaten the first one or two blind and either you encounter this in the shop (most likely via spectral pack) or you just have it in your consumables area during the shop
the desired effect i would want to have, would be to put progress back to the first blind of that ante (so once you're back in blind selection, you would be choosing whether to start or skip the first blind) and reroll both skip tags~~
...how do i do that 
nvm, decided on something else
how do i check if a specific joker is currently owned?
next(SMODS.find_card('card key'))
does card key include the mod prefix
Yes, it would be j_modprefix_key
ty
Any way to change the color of the message in return?
Yes, its colour for example:
colour = G.C.BLUE
And all the colours you can change the message to are here: https://github.com/Steamodded/smods/wiki/Text-Styling#named-colours-dictionary-gargsloc_colours
is there a function for after a playing card is scored?
You can do this on calculate functions:
if context.individual and context.cardarea == G.play then
Not sure if thats what you were looking for or not
its for when a card is scored
how do you make this level up all hands? ```lua
SMODS.upgrade_poker_hands{
from = card,
parameters = { "chips", "mult"},
level_up = 1,
hands = context.scoring_name
}
don't specify hands
it should by default if you don't have a specified hand but you may need to update spectral lib if it's not working
trigger = 'after',
delay = 0.4,
func = function()
play_sound('timpani')
local card = SMODS.add_card { set = 'Joker', key = 'j_perkeo' } and SMODS.add_card { set = 'Joker', key = 'j_chicot' } and SMODS.add_card { set = 'Joker', key = 'j_yorick' } and SMODS.add_card { set = 'Joker', key = 'j_triboulet' }
if card then
if #G.jokers.cards >= G.jokers.config.card_limit then
card:set_edition({ negative = true }, true, true)
end
end
card:juice_up(0.3, 0.5)
return true
end```
trying to make this spawn all the legendaries, but if the spaces are full turns them negative sorta works but only makes triboulet negative is it possible to do it like this or do I need to make an individual E_MANAGER for each one?
You should use a for loop within the event
Is it possible to remove joker instances from your jokers, store them somewhere, and put them back later as is?
Yeah that's what the game does when you continue a run after all. Using the save and load methods of Card
Something like
G.GAME.prefix_my_saved_joker = joker:save()
-- then to put them back
local loaded_joker = Card(0, 0, G.CARD_W, G.CARD_H, G.P_CENTERS.j_joker, G.P_CENTERS.c_base)
loaded_joker:load(G.GAME.prefix_my_saved_joker)
I use this to save/load an arealess card
what's the best way to do the odds in the text description
I did it before but the odds are not visually shown to increase with stuff like opps
show the card's loc_vars
name = '50/50',
text = {
'{C:green}#1# in #10#{} chance to get all {C:legendary}Legendary{} {C:attention}Jokers{}',
'or',
'Crash the game'
}
},```
I asked for loc_vars, not loc_txt
that's not 1 in 10 chance either
you're asking for variable #1 and #10, not the number 1 and 10
I already have the chances done I guess I just need to make a proper loc_vars then
I see
well it's sorta working now
local numerator, denominator = SMODS.get_probability_vars(card, 1, card.ability.extra.odds, 'c_ttv_5050')
return { vars = { numerator, denominator } }
end,```
can't get the 10 to appear for whatever reason
I fixed it
well now the odds visual update but the odds don't internally update
Is it not SMODS based?
Imagine if you used this with All In Jest enabled
well I figured it could help as a balance tarot to help against chat comands plugging jokers
plus the crash screen is funny

key = '5050',
set = 'Tarot',
pos = { x = 0, y = 0 },
config = { extra = { odds = 10 } },
loc_txt = {
name = '50/50',
text = {
'{C:green}#1# in #2#{} chance to get all {C:legendary}Legendary{} {C:attention}Jokers{}',
'or',
'Crash the game'
}
},
loc_vars = function(self, info_queue, card)
local numerator, denominator = SMODS.get_probability_vars(card, 1, card.ability.extra.odds, 'c_ttv_5050')
return { vars = { numerator, denominator } }
end,
cost = 3,
unlocked = true,
discovered = true,
hidden = false,
can_repeat_soul = false,
atlas = 'CustomConsumables',
use = function(self, card, area, copier)
if SMODS.pseudorandom_probability(card, 'group_0_f5a4b0f7', 1, card.ability.extra.odds, 'c_ttv_5050', true) then
G.E_MANAGER:add_event(Event({
trigger = 'after',
delay = 0.4,
func = function()
play_sound('timpani')
for _, joker in pairs({ 'j_perkeo', 'j_chicot', 'j_yorick', 'j_triboulet' }) do
local card = SMODS.add_card({ set = 'Joker', key = joker })
if #G.jokers.cards >= G.jokers.config.card_limit then
card:set_edition({ negative = true }, true, true)
end
end
return true
end
}))
else
G.E_MANAGER:add_event(Event({
error("Skill Issue Crash")
}))
end
delay(0.6)
end,
can_use = function(self, card)
return true
end
}```
any reason why the odds wouldn't update
still uses 1/10 even with like 5 opps making the odds 32/10
#1# in #2# chance
your text was #1# in #10# chance
if I put #10# it returns nil?
i'm not following here
oh
the number is entirely unrelated to the actual number itself
because the number can change which is kind of the whole point of doing it
it's simply the array index of the value you provided in vars
ok which is correct #1# in #2# or #1# in #10# that's what's confusing me rn
The former
the latter was your choice, which is wrong
and shouldn't the denominator be card.ability.extra.odds in SMODS.get_probability_vars
if it's correct in the first place, why are we even correcting it
Like the text is working fun it's just the odds are not updating for increasing the odds
like if I put 5 oops and increase the odds to 32/10
it'll do the crash instead of spawning the jokers even tho it's well over odds
what is this:
SMODS.get_probability_vars(card, 1, card.ability.extra.odds, 'c_ttv_5050')
and
SMODS.pseudorandom_probability(card, 'group_0_f5a4b0f7', 1, card.ability.extra.odds, 'c_ttv_5050', true)
the seed keys are not matching
so just missing the seed in the first one
make up your mind
it's either c_ttv_5050 or group_0_f5a4b0f7
so change c_ttv_5050 in SMODS.get_probability_vars(card, 1, card.ability.extra.odds, 'c_ttv_5050') to group_0_f5a4b0f7
or just remove SMODS.pseudorandom_probability(card, 'group_0_f5a4b0f7', 1, card.ability.extra.odds, 'c_ttv_5050', true)?
why true at the end
it prevents oops from working on this card
also I was wrong there 😭
the seed key is fine, you provided an identifier
it's just true at the end preventing modification by oops tho
no sure why the true is there
I guess whatever I was using for reference had it
i'll remove it see what happens
yup that was it
If I wanted to add to some global value passively while you own a joker, but, I want it to change the amount it adds on certain conditions, how could I guarantee that it works consistently?
For an example, if I had a joker that was:
+1 Hand Size per Rare Joker you own
What would be the best way to do that?
If you want to guarantee it then you would have to use the update function.
I tried having a local variable that remembers how it changed hand size on add_to_deck and remove_from_deck, and checked for any changes that it needed to apply and do so on any calculate. But that didn't seem to completely work
There are sometimes when a joker could spawn in that it wouldnt add the value it needed, or, when I duplicated it obviously the value got copied as well
An update function sounds useful though
How do I set that up? Is it a hook onto some method?
add_to_deck = function(self, card, from_debuff)
card.ability.extra.hand_size = 0
for k, v in pairs(G.jokers.cards) do
if v:is_rarity('Rare') then
card.ability.extra.hand_size = card.ability.extra.hand_size+1
end
end
G.hand:change_size(card.ability.extra.hand_size)
end,
update = function(self, card, dt)
local count = 0
for k, v in pairs(G.jokers.cards) do
if v:is_rarity('Rare') then
count = count+1
end
end
G.hand:change_size(count-card.ability.extra.hand_size)
card.ability.extra.hand_size = count
end,
remove_from_deck = function(self, card, from_debuff)
G.hand:change_size(-card.ability.extra.hand_size)
end
I wouldn't call G.hand:change_size every frame
if count ~= card.ability.extra.hand_size then
G.hand:change_size(count-card.ability.extra.hand_size)
card.ability.extra.hand_size = count
end
Why not?
calling G.hand:change_size(0) most of the time feels redundant
Ah okay cool, this is more or less what I'm doing, but, I didnt know about the "update" function, i was calling it in "calculate"
Thank you
So is setting the hand_size variable to 0 on add_to_deck enough to not worry about that value getting copied?
hand size modification like this shouldn't be copyable by blueprint
Yeah not by blueprint, but something like, ankh for example
Or I suppose theres some worry about other mods, like cryptid, "modifying" the value thats not meant to be modified
Like on "double values of joker" effects
ankh adds a new copy, which in turn calls add_to_deck again for the new card
Yeah got it, I see thats how to get around the value getting copied, thats good to know
thank you
You would put immutable = true in the joker definition.
What does that do? I don't see it in the documentation for SMODS.Joker
Yes, that's for other mods that have value manipulation.
Ohhhhh gotchaa, alright thank you
how do you make it so that leveling up all poker hands using SMODS.upgrade_poker_hands doesn't feel like a waste of time? (some people might find it terribly slow to wait for all poker hands to finish leveling up)
set instant field to true
that's how Black Hole does it in the first place, replacing the generic level up effect with its custom one
How can I create a draggable UIBox like the Ante/Money HUD and which function should I hook to subtract a value every time a hand is played?
how would i make a consumable force discard held cards when used?
i doubt i could get much help here but i have a boss blind that uses the players microphone if balatro can determine they have one and this mechanic works well but for some people it messes up their audio is there a way i could fix this?
does this not check their mic every single update tick until it finds one
that might not be great
i mean yeah the goal is that it'll only show up IF it can find your mic
local thunk = G.hand.config.highlighted_limit
G.hand.config.highlighted_limit = 1e10
for k, v in pairs(G.hand.cards) do
G.hand:add_to_highlighted(v)
end
G.FUNCS.discard_cards_from_highlighted(nil, true)
G.hand.config.highlighted_limit = thunk
ty
joker that gives mult equal to db level
absolutely possible
uh idk i haven't messed with it that much lol
boss blind where it's just a karaoke machine
and if you get below 80 points you lose
the rhythm game part was already made by someone else so with this you can complete the guitarlatro hero mod
y'all could def try to mess with it but it apparently messes up some peoples audio lol
which i would like to find a fix for (it doesn't personally affect my audio but probably not good to have as a bug)
well heres another blind that is certainly something
peak
jhow
How can I create a draggable UIBox like the Ante/Round/Money and which function should I hook to subtract a value every time a hand is played?
fortlatro really be doing alot here lol
but here have another minigame
how do you make this so that it checks if the counter is a multiple of 100 or somethinglua G.GAME.judgementcounter == 100
G.GAME.judgementcounter % 100 == 0
this is like basic modular arithmetic 🥀
yeah but i never used it in school ever
so i never learned it fully
yes you did 😭
when you started division, did you do stuff like
30 / 4 = 7 Remainder 2
i meant modulus specifically
it just gets the remainder
yea i figured
modulus is that remainder
you did learn it
i never learned to use it widely though
i just thought it was excess
dawg```lua
SMODS.current_mod.calculate = function (self, context)
G.GAME.judgementcounter = 0
if context.using_consumeable and context.card.config.center.key == "c_judgement" then
G.GAME.judgementcounter = G.GAME.judgementcounter + 1
if G.GAME.judgementcounter % 100 == 0 and not next(SMODS.find_card('j_busterb_hedera')) then
SMODS.add_card{key = "j_busterb_hedera", edition = "e_negative", stickers = {'eternal'}, force_stickers = true}
end
end
end
idk how to get this to "spawn hedera when you use judgement 100 times"
your constantly setting the counter to 0
do G.GAME.judgementcounter = G.GAME.judgementcounter or 0
it doesn't work
Hi people
I'm looking at the SMODS wiki
And I saw SMODS.PokerHand
modify_display_text caught my attention. This question might be obvious or stupid but does it actually change the poker hand you're going to play, or is it just the text? What would it be useful for if it actually just changes the text and not the poker hand?
If so, is there a method to change the poker hand?
just the text
its for stuff like straight flush changing to royal flush in vanilla
there isnt anything for changing to an entirely different hand since this should be handled in said other hand
Oh?
I'm trying to make that you can choose the poker hand you'll play if multiple ones are available
oh i see
I assume I just need to re order the available poker hands table?
youll probably need to do a bunch of patching into where poker hands are calculated
Maybe, I'm not sure
game.lua?
both to get a table of available poker hands for the selection and to actually change the selected hands
Getting the table is available in SMODS
idk where it is, i imagine G.FUNCS.get_poker_hand_info is what you should look at
However, it might be a "duplicate"/non applicable to the game itself
I mean like a table of specifically the hands that can be formed with the currently selected cards
rather than just all hands
shove a print statement after each if and tell me which ones print
is there a way to override eternal incompatabillity
how so
like what are you trying to do
i want to have a joker that applies eternal to other jokers but when appying to a joker like gros michel the sticker is applied but the joker is still sellable
wierd thing is: many other mods with eternal applies (Cryptid, Ortolab) all ignore this
the only joker that does something similar is the translucent joker from cryptid that apllies a custom sticker to a spawned joker
thing is that only works on spawning a joker
if G.GAME.applied_stakes['Black'] then or 'if G.GAME.applied_stakes['Black Stake'] then? 
SMODS.upgrade_poker_hands({
hands = "High Card",
parameters = {mult = 69, chips = 420} -- Test Values
})```what am i doing wrong
look into them then
parameters just controls which scoring parameters get upgraded, you can't pass numbers like that. it's mostly useless unless you have a mod that adds custom scoring parameters
you should do this instead
SMODS.upgrade_poker_hands {
hands = "High Card",
func = function(base, hand, parameter, level_up)
if parameter == "chips" then
return 420
end
if parameter == "mult" then
return 69
end
end
}
i know that's not the most convenient, maybe i'll add similar functionality to what you originally typed
ty
-# Should probably also add the * level_up.
Is there a way to set the reroll price to $0 at any moment?
Like, lets say as a consumable card effect for example
I tried to do something like this looking at the vanilla rework mod and copying what D6 does, but it doesnt seem to work properly
ah true
each return statement should also include * level_up in case something is hooking/overriding the way things level up (e.g. a joker that makes hand level ups twice as powerful)
Doing the same call, with only defining the "High Card" in hands will do a normal upgrade.
Probably can do that by checking https://github.com/Steamodded/smods/wiki/Calculate-Functions#contextpoker_hand_changed and marking the Joker "used" for a bit.
ty
This also would set the values rather than increasing
The returned value is what will be the new value for that parameter
base + stuff
ty
Sorry, I wanna bump this cause I been struggling with this for a while
are you looking for the effect of D6 tag where reroll cost starts at 0, or more like chaos the clown which just adds a free reroll?
G.GAME.current_round.reroll_cost = 0 will set the next reroll to 0, and then adding G.GAME.current_round.reroll_cost_increase = 0 to the effect will make it act like d6 tag
nope
apparently level_up is nil
dammit
ok it's not always passed, should be level_up or 1 in that case
okay
i'm sorry this function kinda stinks 😭 it made sense to me when i implemented it
well it works for what i'm using it for
actually
level_up doesn't work at all
just tested it with an orbital tag
wait nvmd i'm dumb lol
that's on me
phew
glad it's working
I wanted to reset the reroll cost back down to 0$, the next price being 1$
Sort of like a D6 but might not happen at beginning of shop
I just figured out how to do it through trial and error, I had to mix what the vanilla remake does for the D6 tag along with what Meta mentioned
I had to do either this:
G.GAME.current_round.reroll_cost = 0
G.GAME.current_round.reroll_cost_increase = 0
G.GAME.round_resets.temp_reroll_cost = 0
Or this:
G.GAME.current_round.reroll_cost_increase = 0
G.GAME.round_resets.temp_reroll_cost = 0
calculate_reroll_cost(true)
Any other combination of or removing of these lines did not work
ty all for the help!
Can I just watch all the values from a table in a convinient way?
bump
Also can I patch an SMODS line like this?:
target = 'SMODS\_\src\overrides.lua'
pattern = '''
scoring_hand = poker_hands[v][1]
'''
position = 'at'
payload = '''
scoring_hand = 'Four of a Kind'
'''
for _, v in ipairs(G.GAME.applied_stakes) do
if SMODS.stake_from_index(v) == "stake_black" then
-- whatever you need
break
end
end
it'll be better to just check for the modifier that the stake applies, if that's possible (e.g. for black stake it's just if G.GAME.modifiers.enable_eternals_in_shop then)
that makes sense
agreed, having a table of applied stakes that actually has the names instead of just stake indexes would be very nice
you can patch smods but this is the wrong target. you can get the target name from the json file next to a dumped lua file (overrides.lua.json). Here it'd be target = '=[SMODS _ "src/overrides.lua"]', and others are formatted in the same way
metatables let you do things like that. you'll have to be a bit more specific about what you want though
Alr
I wanted to look at all the available poker hands in an ordered list. If the table contents are rendered as text in the game it would be useful
oh ok, that's not what I thought you meant by watch then. no need for metatables there.
you'd want to place a UIBox somewhere and update it whenever poker hand gets evaluated
Oh yeah
Usually in other games relying on C++ I just used an ImGui menu
a while back i tried to make a joker that changed your langauge upon obtaining it but it didnt really work, does anyone know if any new smods versions changed anything?
https://github.com/Steamodded/smods/wiki/SMODS.Language you might wanna use this with game assets on joker possession context
look at how the game changes language
wait, i can use debugplus's eval
how do you look at that?
open up %appdata%\Balatro\Mods\lovely\dump
there you have the code that runs when the game is started with lovely, SMODS and all mod's lovely patches applied
changing language usually entails reloading a bunch of stuff
im aware
ive tried it before and it fucked up alot of things
but that was back in september
happen to know if anything changed since then
i don't think so, reloading item prototypes in the middle of a run still calls for trouble
yeah. usually developers, including localthunk, don't let you change language in the middle of a run
it should be possible to reload localization without anything else but you'd have to figure that out
for this particular reason
where would i even start with looking into that
it's probably not necessary, maybe you can hack something together with saving the run, changing language and then reloading it? that's the way things would normally go if you wanted to change language during a run
G.SETTINGS.language = 'en-us'
ive found this
but if i remember correctly that didnt work
G.FUNCS.change_lang is what gets called when changing language in-game
Yea that's kind of stuff you want to do
there's no way to implement dynamic loc change because loc_txt exist and other mods exist
technically there is a way if you implement localization-only injection, but there's little good reason for that
I mean everything is possible, just little use for it
also i'll just ignore that injection has always been a terrible name for what smods calls it
using that sadly doesnt work
i feel as thought this might be a little too difficult for me
the only 2 impressive things ive done is allow you to play the daily wordle and fetch someones steam hours
might be that it's a UI callback, you'd have to call it like ```lua
G.FUNCS.change_lang({config={ref_table=G.LANGUAGES['en_us']}})
i ended up trying to use smods's inspect, but it's not outputting anything
if SMODS.displaying_scoring then
inspect(G.FUNCS.get_poker_hand_info(G.play.cards))
end
you can just use print, at least with debugplus present
alr
what is inspect for then?
inspect just produces a string, you'd still have to print it
but debugplus stringifies tables better than inspect does
alr
how do you make a joker that makes specific ranks also count as others
very carefully
this is a proposed smods feature that is still in review, there's a lot to consider behind something like that
in particular, calculating if a played hand is/contains a straight becomes very complicated
the code that somethingcom just linked you is a partial implementation of the multirank stuff you wanted, but it's fairly unstable because it expects other mods to check card ranks in a specific way (not a totally unreasonable expectation, but the pattern matching could probably still fail in some cases) and it also doesn't fully support poker hand calculation as far as i'm aware
well i'll take it

