#đ»ă»modding-dev
1 messages · Page 253 of 1
no
no its just for debug watch shader, ive got it disabled on the actual edition
Separate files?
some mod might've forgotten a local
okay, i found the issue.
it's only affecting jokers with a custom rarity
(my toki pona and doilus stage jokers)
so there's something wrong there
file structure (atlases are in 1x and 2x, code is in moddedvanilla.lua)
Uhh, I dont know, try sending your dump
is it because... deprecated....
Lovely/dump/game_object.lua:364
YOU.
this?
gradient.
Dump, not crashlog
sorry
Go into:
Mods/lovely/dump/game_object.lua:364
do i have to change this into something else now that gradient is deprecated?
how can i add a description for my enhancement?
because i beleive that it's what's causing the crash
I got it working but how do I make it make a sound when calculating?
Mind telling me what was wrong?
What do you mean?
play_sound('[YOURMODPREFIX]_MyCoolSound', 0.7, 0.55)
Ok I am trying to find something to use for the top right of my game board. Any ideas?
Right now I am thinking of just having Jimboâs face and the game name.
Like what was causing the error, just curious
most played hand type? deck info? (like how many of each suit etc)
Thatâs on the left screen.
oh ok
is this what you mean? couldnt find the file with the name game_objects in lovely, but i found it in smods
There was no error.
Decorations or something
^^
How do I play a sound when the chips and mult get put together?
Idk
-# I think you use event manager
-# But I'm not really sure
question mark
Uhh, I don't know
this is so confusing i hate this
i dont understand this
how do i make a tooltip for a vanilla thing appear (vanilla enhancements, editons, stickers, etc)
for most things you put the center into the info_queue
credit card blind
lmao

<@&1133519078540185692>
Thatâs a bit seal
hes gone
Iâd imagine
help wtf happened
Mmmmm
this is my localization have i done something wrong
im getting errors and the game wont load
i double checked the mod prefix and the key for the enhancement as well
time to work on this guy
which should be easy
all it really does is apply a seal to selected cards
i really could just steal basegame talisman code
this is pretty much how mail in rebate detects equal rank but it is not triggering for my joker
if context.other_card:get_id() == G.GAME.current_round.LuckyNum_card.id
anyone have insights to checking rank on scored cards
if context.cardarea == G.play and context.scoring_hand and context.individual then
if context.other_card:get_id() == G.GAME.current_round.LuckyNum_card.id then
return{
message = localize { type = 'variable', key = 'a_xmult', vars = { card.ability.extra.xMult } },
Xmult_mod = card.ability.extra.xMult
}
end
end
--calc end
end```
i figured it out nw
where's the talisman code located
card.lua use ctrl + f
this is an enhancement, how do I make it show up in a separate window? like the other enhancements
like this?
They don't
ur right
is there a particularly easy way i can store all visible hands at the start of a run to compare with available hands that couldcome later on in a run?
i have a joker that gives +1 slot per hidden hand revealed but i need to make it retroactively grant slots if a player revealed hands before they got the joker itself
well there are base game hidden hands such as 5oak, 5 flush, etc
but yea i have modded hands that are hidden as well
eg if more hand types were added
but its just meant for when hands become visible in your run info
i mean if u dont care about modded hand types that arent secret you can hard code the initial value and compare it to the current revealed hands right?
is this correct?
hardcoding it in doesnt allow for dynamic changes, im not the only mod out there with hidden hands or lackthereof
i probably will have to change set_seal to use my modded seal
trying to make a joker that adds +25 chips for every ace held in hand
yeah how do i do that
ye
but what im saying is
if theres no mods that add hands visible by default
you can just hard code it
ofc
its ideal to be able to just pick it up at the beginning
in case a mod DOES add those
as long as its only hidden hands added you can make the joker retroactively do it and reference the amount of regular normal non hidden hands in vanilla
eg theres 9 regular hand types in vanilla
so do "currently visible amount of hand types" - 9
thats probably enough of a workaround yea, itd be ideal to just pull it from g.game.hands at run start but i cant seem to make it do that yet
at least, not outside of a card
Hm. Is it impossible to give a SMODS joker a default cost of $0? I have cost = 0 but it's still charging a dollar.
I wouldn't mind the price but the joker in question gives money when it's added, and the -$1 popup always overwrites the +$ one (adding delay just makes both take a bit unfortunately).
how do i make it apply to two cards and not one
i changed G.hand.highlighted to 2 but i dont think that worked
how would i do that
Is there a hook for the unscored cards in a hand? I want to...do things to them
looks like strength surrounds the G.E_Manager code in a for i=1, #G.hand.highlighted do loop.
I know I have this
context.full_hand[] as an array
like so:
for i=1, #G.hand.highlighted do
G.E_MANAGER:add_event(Event({trigger = 'after',delay = 0.1,func = function()
local card = G.hand.highlighted[i]
local suit_prefix = string.sub(card.base.suit, 1, 1)..'_'
local rank_suffix = card.base.id == 14 and 2 or math.min(card.base.id+1, 14)
if rank_suffix < 10 then rank_suffix = tostring(rank_suffix)
elseif rank_suffix == 10 then rank_suffix = 'T'
elseif rank_suffix == 11 then rank_suffix = 'J'
elseif rank_suffix == 12 then rank_suffix = 'Q'
elseif rank_suffix == 13 then rank_suffix = 'K'
elseif rank_suffix == 14 then rank_suffix = 'A'
end
card:set_base(G.P_CARDS[suit_prefix..rank_suffix])
return true end }))
end ```
kinda like this
conv_card keeps pointing to the first card in that code. You'd want it to be G.hand.highlighted[i]
looks good to me. Keep in mind you'd wanna start a new seed when testing to make absolutely sure it's using the updated code.
This does not want to trigger for some reason, anyone have any clue
if context.other_card:get_id() == G.GAME.current_round.LuckyNum_card.id then
Full Code Block
calculate = function (self, card, context)
if context.cardarea == G.play and context.scoring_hand and context.individual then
if context.other_card:get_id() == G.GAME.current_round.LuckyNum_card.id then
return{
message = localize { type = 'variable', key = 'a_xmult', vars = { card.ability.extra.xMult } },
Xmult_mod = card.ability.extra.xMult
}
end
end
--calc end
end
}
Glad to hear! Also funnily enough your code helped me solve my issue, just threw on an add_event for the money add. c:
If you guys know of any cool deck mods send them my way đ
I'd move the unhighlight_all event outside the for loop
hello aure how are you doing
it's 5:23am
i had slept in the evening and drank some tea a few hours before
I'm doing good, ty
I'll try to sleep
damn aiko fix your sleep schedule đ
there's... a lot of stuff in G
G.play is an instance of the CardArea class, specifically the one that holds played cards during scoring
for any CardArea, its cards is a table containing the cards it holds in order
my jokers can now appear in boosters, but they appear very infrequently
probably because most of them are rare and uncommon
and they don't even appear in the shop
does that say joker
it's a doom keycard.
ye
there's no kanji in it at all.
you must be seeing things
i just thought you sneakily included the joker text
no i didnt
but did you see his face?
if using a a calculate function within a card tho, can I get the index of the card im calculating from? I want to do an effect that depends on the card to the right of the playing card with my enhancement
ducktales spotted
jonklerphone...
bump
so yeah, my jokers can appear in the shop.
i just don't have any common jokers, so they are relatively rare
im trying to create my own tarot card, can anyone help me figure out what this error means?
is this process any different if the thing i am trying to do this with is a vanilla joker and thus i need to take ownership?
Why so serious
I donât think so
Havenât tried to say
How do I access the card(s) currently selected via the code?
there will be more, so look out for that
G.hand.highlighted
i know all of you guys are curious about the blank card
where is this defined in the source code?
search for "G.hand.highlighted" in the balatro source code
antimatter card WILL be real.
all you really need to do is keep blank card to ante 8
speaking of keeping a card to ante 8âŠ
how would that work in terms of coding
G.GAME.current_round.LuckyNum_card.id is there something wrong with the .id as everything else is working in the code but when context.other_card:get_id() == G.GAME.current_round.LuckyNum_card.id it never says the values are simular even though this is how mail in rebate works in card.lua
thereâs alsoâŠ
Brand new to coding. Why am I getting this error?
lap 2âŠ
reminds me of.. The House.
when it resets ante to 0 can it play the bell sound effect from pizza tower
GlobalThunk
I added a consumable type and a card, but now its crashing for some reason along with saying stuff about a previous joker for some reason
It's still giving the same error

G is the global.... game as a whole thingy yes
so theres this thing
its the John Balatro himself
inside of balatro source code"?
yed
thanks so much
workin on a thing 
your consumable doesn't have a set
its set needs to be equal to the key of the consumable type
thanks
What isnât working?
it doesnt multiply my mult by ten
when i tested in the game
if its a multiplier shouldn't it return Xmult_mod?
color doesn't exists, it's colour (if it somehow matters), also you don't need the card = card
okay
i thought you put the "unlocked" and "discovered" outside config?
You do
so all of this isnt inside of the bracket right?
can you try printing card.ability.extra.x_mult outside return?
okay
It should be 10 if the tooltip is working
for x_mult when you return from the calculate function
does it have to be x_mult specifcally
x_mult, xmult
okay thanks
theres probably more but i think thats the two you should know
can anyone see an issue here
for some reason G.GAME.current_round.LuckyNum_card.id is not returning the rank id
got the check working, the AK47 joker is coming along nicely
These are the valid options
what units are card.T.r measured in?
whats that
I think it's the rotation
most likely
should be easy to test if ur sure its the rotation
does anyone know how the class prefix works?
is it like
j_modprefix_jokername
or
modprefix_j_jokername
I'm trying to use a function similar to this for doing this but if you own a specific Joker. Do I need to do anything else but this in my toml file?
[patches.pattern]
target = "card.lua"
pattern = "level_up_hand(used_tarot, self.ability.consumeable.hand_type)"
position = "after"
payload = '''
if self.ability.name == 'j_stub_steal_the_moon' then
level_up_hand(used_tarot, self.ability.consumeable.hand_type)
end
'''
match_indent = true
this one
its the same for other object keys too
correct
anyone know how to use SMODS.Back to make a deck that starts with multiple vouchers unlocked?
SMODS.Back({
atlas = "clueless_deck",
config = {
voucher = "v_tarot_tycoon",
clueless = true,
},
-- truncated for brevity just assume theres another } down here eventually
this config assignment allows it to start with tarot tycoon unlocked, but i wanna start with tarot merchant also
what's a good resource to learn how to mod the game?
what if you add more into the voucher
like this
voucher = "v_tarot_tycoon", "v_tarot_merchant",
@soft echo https://github.com/Steamodded/smods/wiki this has been helpful for me
idk im new to modding so dont expect this to work
considered it but i dont think itd work since , is used to denote line breaks
thank you. wanting to make a mod but didn't know where to start
then what if you put a table? maybe it will work
The badge color won't change. In game, it is still the default color
{
voucher,
voucher2
}
so how would i return the actual score? i cant use stone_tally because it's considered a global...
I did that but it just isnt showing up in the collection
looks like balatro doesnt share my passion for nested arrays
rip
you can pass a table as vouchers
nevermind it appeared
yep
omg its john smods,,,
Does anybody know why the badge color doesnt change in the game? It is still the default color
as best as I can understand, card.T.r controls card rotation? I've tried changing its value in set_sprites but it doesn't appear to do anything
no idea what this means i did not touch anything related to the atlas
please help me
anyone know the proper way to do sprite rotation?
you need to copy that code to where you want to use it
i did though?
unless you mean i need to also put it somewhere in the calculate function?
i think i should put my mod onto github
yes the local and the for loop need to be in the context you need to use it too
?
yes but it's not card.ability.extra.stone_tally, just stone_tally
ok thanks
didnt catch thanks
i said thanks twice
but yeah ill see if it works
it works! thanks!
make it so the dead doise summons peddito and crashes your game 
consumable didnt have a texture so I added atlas and its crashing, please help
if using a a calculate function within a card, can I get the index of the card im calculating from? I want to do an effect that depends on the card to the right of the playing card with my enhancement
like eg in played hand, can i get the index of my card
and do something to index + 1?
actually the idea for doise was that he switches between dead and alive
oh
isnt that like the mother 3 placeholder asset or am i mistaken
that looks SO familiar
ye
it is
its decamark
its decamark!!!
For other uses of question marks in the Pokémon games, see Question marks.
?????????? redirects here. For the numerous identically named glitch Pokémon in the fifth generation, see List of Pokémon by index number in Generation V#Glitch Pokémon.
??????????, also known as ten question marks or its fan-given nickname, Decamark, is a glitch Pokémon...
my beloved
anyone know?
i need to exclude specific cards from the soul pool
like the antimatter card
and the dead doise
to make a rarity
change the weight of the rarity right?
how would i make a rarity between rare and legendary? what weight should i set it to?
how would i have specific legendary cards be excluded from the soul pool
how does this work?
maybe i can rephrase
is there any way to check if a card is equal to another
eg if i have an array of cards (my played hand) and my card with an enhancement, is there a way I could loop over all played cards in the array until there is a card equal to my card (e.g a really long winded way to find the index my card is at)
well i would like that not to happen
how do I render the sprite of a custom consumable upside down?
(if it never flips right side up u could just flip the actual sprite)
but i assume u wouldnt ask if it wasnt both
even then idk if its possible but you could have a separate sprite and change the pos value when it needs to be flipped
to be the separate flipped one
maybe i could create a fake legendary rarity
so that way, theyâre not included in the soul pool, but theyâre still classified as legendary in some way
I do currently have separate sprites that are flipped upside down. My intention with this is to use it for my reverse tarot cards, and I wanted it to be compatible if people have custom sprites for their regular tarot cards
so if they have modded card skins, it shows them flipped upside down
what is the default weight of a rare?
i want to make a rarity between rare and legendary and i dont know what to set the weight to
ohhh
what's the color code of the legendary badge
it must be in the source code
so it's less of a functionality thing and more of a cosmetic/qol thing
hm, where?
oh
its not labeled for some reason
i'm assuming it's the last one
its really easy
just rename balatro.exe to balatro.zip and extract
sorry
i lied
just get like 7-zip and literally extract the exe itself
why not check the lovely dumps?
not every file gets modified and therefore dumped
anyone know please đ
if i wanted to have a consumable create a planet card, tarot card, or spectral, what should I use to say to make one of those, like is it just 'Planet' or something else
set_sprites() seems like it would be the function I'd want to use for it, but there's not a lot of documentation for how to actually do sprite manipulation
are you sure?
no, that's why I'm asking here lmao
completely indistiguishable ingame
oh skyward tardis sorry i didn't mean to be taken seriously i've got no clue either sorry again
are you sure?
now to try and impliment the whole "switching between dead and alive" thing
you're good lol
are you sure?
oh god
how would i do that
we need an are you sure joker
wouldnt it be easier to dynamically change the texture
over having two jokers that are technically the same joker
yes but they both have different effects
you can make a variable to track whether its dead or alive
based on that do a specific effect
is it a good idea to make a lua file for each joker or make one huge lua file with all jokers?
not sure when it becomes dead or alive though
i usually do one lua with every joker of a specific type
i want it to be alive on even numbered rounds and dead on odd numbered rounds
guess who's finally getting his powers?
I cannot figure out why G.GAME.current_round.luckyNum_card.id returns nil
i've been trying to figure out the return for Rank from the hook, that shows up correctly on the joker. but G.GAME.current_round.luckyNum_card.id does not output as anything
config = {extra = {rank_mod = 14, xMult = 1.25}},
loc_vars = function(self, info_queue, card)
return { vars = { localize(G.GAME.current_round.luckyNum_card.rank, 'ranks'), card.ability.extra.xMult} }
end,
calculate = function (self, card, context)
if context.cardarea == G.play and context.scoring_hand and context.individual then
if context.other_card:get_id() == G.GAME.current_round.luckyNum_card.id then
return{
message = localize { type = 'variable', key = 'a_xmult', vars = { card.ability.extra.xMult } },
Xmult_mod = card.ability.extra.xMult
}
end
end
--calc end
end
}
---hook [Used by Lucky Number/]
local igo = Game.init_game_object
function Game:init_game_object()
local ret = igo(self)
ret.current_round.luckyNum_card = { rank = 'Ace' }
return ret
end
function SMODS.current_mod.reset_game_globals(run_start)
-- The rank changes every round taken from example
G.GAME.current_round.luckyNum_card = { rank = 'Ace' }
local valid_luckyNum_cards = {}
for _, v in ipairs(G.playing_cards) do
if not SMODS.has_no_rank(v) then -- Abstracted enhancement check for jokers being able to give cards additional enhancements
valid_luckyNum_cards[#valid_luckyNum_cards + 1] = v
end
end
if valid_luckyNum_cards[1] then
local luckyNum_card = pseudorandom_element(valid_luckyNum_cards, pseudoseed('LuckyNum' .. G.GAME.round_resets.ante))
G.GAME.current_round.luckyNum_card.rank = luckyNum_card.base.value
end
end
im using some util code that just pulls all files from a folder and SMODS.load_file on them
are yous ure
i think then if you did it within the joker it could work. You can have a variable for whether its dead or alive
ok im done goodnight fellas
i still need to think of the actual joker effects for each state
and have the description dynamically change
yea
ok guys PLEASE SOMEONE HELP ME
eg. âx whatever for y thing (the doise is currently alive!)â
like even if theres just a way to check if cards are equal my problem is solved
i can go from there
how do i reference to my folders in my mod
i want my main lua file to run everysingle lua file in a folder
will trying to spawn a joker with a rarity that has default_weight = 0 prevent it from spawning anything but a Jimbo? because idk what's wrong with my rarity esp because the only other rarity i have works fine when trying to spawn it from another card/tag
then when its dead it switches to âx whatever for y thing (the doise is currently dead!)â
i made a util file with this code
thanks!
and i made a definitions file with this code
but what is UTM in this case
i assume i can do the same thing with blank card turning into antimatter card
where each entry is the name of the enhancement (in this case i have a tagger.lua file so i wrote "tagger")
though antimatter card is legendary and blank card is rare
in my main file i have this
iterate over scoring_hand maybe?
UTM will be defined in ur main file
you can name it whatever
ok thanks so much
i named it UTM cause my mod is called Untitled Tag Mod
and then u load file the definitions file and util file u made with that code
then u can just call UTM.load_cards(UTM.cardtype, "path to the folder with all ur cards of that type")
ofc this means for every card u add you need to make a new entry in the tables in definitions
okay thanks goat
so i'm probably gonna have to remove the loc_txt section from my joker and do it inside the localization file
so i have a table for enhancements, once i add jokers ill make a table for jokers the same way
if i want it to dynamically switch
you will yea
i thin
let me do that real quick
idk for sure but i do know i saw something like that
yes, but can i just check if self == scoring_hand[i]
probably with
if scoring_hand[i] == card
i saw this while looking at the balatro mod wiki
i'll have to investigate for myself
does that work tho
like cause these arent just numbers
they are tables representing card objects i believe
i feel like it should
how do i make a joker rarity not available in shop but available to be spawned in by cards like Soul?
same
just make it a legendary?
yeah but like
i don't want it from soul specifically
i want it from my modded soul which spawns specifically that rarity
set weight to 0 probably
i'm doing that and im just getting jimbo whenever i try to spawn one in
mod = {
items = {
'elusivejokers'
}
}
for path, file in ipairs(mod) do
SMODS.load_file(path .. '/' .. file .. '.lua')()
end
so something like this right?
Anyone have clues on this?
alright look here
hm
this is what i have in terms of loading stuff
okay
the only thing in main_util is this function (it uses UTM in it because eventually I load it to my main.lua file and that is where UTM is defined)
in card defs i have tables created for each card type (atm i have only 1 card which is an enhancement)
ohh
and the entries correspond exactly to the name of my lua files
yeah i don't really understand what's going on
UTM is a variable defined in the main.lua right?
now in main i have this
but im glancing at this...
u can see UTM = {} at the top
then we load file on the main_util and cardDefs in our main.lua
wait so if u load the util file
the function inside the util will also be available in the main file?
Yes because we did it as UTM.load_cards in our util file
imagine load_file as literally taking the code from the other file and putting it in main.lua
then it makes more sense on why it works
i understand it now
thank you goat
this'll probably solve the whole "changing the description dynamically" thing
im not sure if thats 100% accurte on how it works but đ€·ââïž
yea and then u can see at the bottom i load all cards in the UTM.enhancements table i made in defs
and also thats where i put the actual path to where the card defs are
anyone used blind calculation before?
well, I've still got nothing for rotating sprites
beautiful
i definitely have not
is there anything wrong with this
what do you mean by this
i want it to change the soul sprite as well
what does calculation in blinds mean
like literally a blind
like a boss blind u made
yes
I don't see a calculate function on the wiki
before calculate function didnt exist
so you would have to do some wonky stuff to get some otherwise basic functions going
...i dont really know what the contexts are though
is the api docs even updated
nop
ok i cant help cause im big stupid without docs
well maybe i can
if i check the repo
SMODS.Blind didnt even have the calculate added yet :3
we need a version of the "read the fucking docs" gif but with a big red X over it
ok i really cant help then
to represent stuff that's not documented
I LOVE UNDOCUMENTED FUNCTIONS
WE ALL LOVE UNDOCUMENTED FUNCTIONS đŁïž
is there an easy way to get the index of the enhancement I made in the played hand
can i literally just loop over the cards and say self == played_hand[i]
i haven't used them yet but calculate in blinds should be exactly the same as any other object
or something
[DEBUFFED] This GIF's abilities are disabled.
oh thank you sir
then joker_main should work, right?
it doesn't
goddammit đ
đ
well its not a joker
its not called blind_main
fair point, what context would i use for the same timing though
let me see the code
much thanks đ
why is scoring_hand = scoring_hand
like wait if i want to use this context how do I as a developer access the scoring hand now
context.scoring_hand
ty đ
probably final_scoring_step, you can use other_joker as well maybe
is there anything else i could use past G.GAME.current_round.luckyNum_card.id to get a changing rank per rounds id this for some reason will return nil from me
bro typed xmult=.5 and the game died
it seems to be the same for other contexts
(can i check/set the edition/enhancement/seal of cards easily)
what the hell
i cannot find the docs
this is what i'm gonna make doise do
swap between having it do mult when scored and chips when scored
most of those are already included in the base game's code itself
and debuffing specific rank cards
card.edition.key will return you the key of the edition
edition can be nil though, so i suggest checking that
would setting that change the edition?
ok tbh its probably easier if i explain what the functionality im doing is: i want to swap the enhancements of two cards
oh okay
Sorry if this is a stupid question. I have a project idea that would require a mod but I'm unsure where to start. Is there a wiki/guide to modding available somewhere?
i assume there would be :set_enhancement(), and that card.enhancement.key would be nil as well if it has none right?
cool
I will be back in 45 minutes to continue attempting to figure out consumable sprite rotation
would card.ability.key give me the key then?
card:set_ability(G.P_CENTERS["enhancement_key"], nil, true)
...i dont think so, but i also dont remember how to get its key
might be card.config.center_key
time to spend millions of hours trying to get the doise to work
oh wait for the enhancement?
mhm
Another stupid question: Are balatro mods limited to specifically just card/mechanic additions or can you literally just do whatever as long as it doesnt crash
cryptid
ive seen mods that literally force u to play boss blinds consecutively
I don't know if there are or where modding resources are so I'm presumably going to be asking a lot of stupid questions here
separated between the different center subclasses
hi, someone knows why is this? I donÂŽt understand
wait is it possible to have two enhancements on a card
Is there any starter guide for modding?
that would let me get around this issue because i would like that to be the behaviour of the card anyways
doise, you say..?
I just need the starting point and whatever scraps of api docs there are and then I'll leave you all alone lol
omg hi i made ur decor
hello!!! it's very pretty i like it
thank you so much
ill get out of your hair now
thank uuuu !! i always love seeing people in the wild using them ur the first ive encountered here
so all i really need the doise card to do is
swap to being dead on odd numbered rounds and alive on even numbered rounds
can someone explain quantum enhancements to me?
sorry for spamming this, found the answer, had to find the base games functions
now how do i do the whole "swapping between dead and alive" thing
or, perhaps is it even possible to implement a 4th addition type for cards
stupid question: does smods have the ability to read/write game state
outside seals editions and enhancements
i think so?
awesome đ
of course, i need to have the "dead" variable be set to true on odd round and false on even rounds
set the variable, im not sure if its possible to get the round number from calculate
probably is
but i wouldnt know how
could just make it swap on context.end_of_round
when the round ends the doise dies
so like, will "pos_override" and "soul_pos_override" do anything
anyone know?
"pos_override" is in the cassette block code already so i believe that'll work
i just don't know about "soul_pos_override"
kinda, quantum enhancements exist
you can return the enhancements of more than 1 for a single card
so you can have gold and steel or whatever
does that make all compatible by default, or can i define it myself
or like how does that work
ive heard about them but dont know how to use them
all of these commands in DebugPlus dont work. can anyone tell me why?
so yeah, that's what i'm gonna do.
it'll swap every time the round ends.
i know you need enable it as an optional feature, SMODS.optional_features.quantum_enhancements = true
but i havent yet implemented them myself so i cant go too much further than that, i presume you can search quantum enhancements in the chat here
so the "dead" variable needs to be set to true when the round ends
if the doise is dead, then it needs to show the dead description and texture
basically.
on the end of the round, set "dead" to true
if "dead" is true, use the alternate description and texture
repeat for becoming alive again
they were working fine for me earlier today, i can only assume you either reinstall it, or something you did today broke it in your mod
i just installed it not too long ago
yea that i know
now to figure out how they wor
if context.check_enhancement and context.other_card.config.center.key == 'm_gold' then
return { m_steel = true }
end
this is code i found
i assume i can just do if context.check_enhancement then return {m_tagger = true}
im not sure if i can though
wait tbh idk how this works
i'll do the main code first, then i'll figure out how changing the texture dynamically works
i believe i saw you can just return whatever enchancement so you can give it a go
cause like i just want my enhancement to not be overwritten by others, or overwrite others thats all
this means i need to change the description when "dead" is true
how do i do that
it sounds simple but
it's probably sorta complex
hi dillyyyyy
why is this wrong
this whole code might be wrong honestly, its supposed to swap the enhancements of two cards
all right, time to lock tf in and figure out how to rotate a sprite
LOCK IN
i'm trying to make a joker that gives +25 chips for every ace in your hand...
i very much need help
if only i could figure out how to do the whole "swapping between two different descriptions
GET IT TWISTED
GET IT TWISTED
your actions influence nothing
how do i do this
YOUR A ROUNDING ERROR ON A FORTUNE 500 COMPANIES BALANCE SHEET
your fate is predetermined, the only thing you can change is your reaction to it
GET IT TWISTED
then i could lock in
YOU CAN DO ANYTHING IN THIS LIFE
actually i should just get the whole "swapping between dead and alive" thing done
yall how do i print
before i do any texture and text swapping shenanigans
Northernlion is the best
I remember him back from the Isaac days
please sort your salad before proceeding
is there a way to detect if something is retriggered
id like to print some tables
helpâŒïž
his Isaac Afterbirth+/repentance videos are great
anyways! how do i do this specific thing
i know its like
end of round context related
how do print statements work
if it's a joker, you can store a variable in the config.extra
print("hello world!")
basically, when the doise is dead, it uses chips instead of mult
yeah it should if you have debugplus
cool thx
so i want to set chips to a specific amound and mult to 0 when the doise dies
and return them to normal when hes alive again
it also shows up in the command line thing that pops up when you boot the game
so you'd want to check the value of the variable in your calculate function, probably during context.joker_main
cassete block does this for it's alternate description
well first i'd want to do the whole "even cards scpre mult and odd cards are debuffed" thing
should i do the swapping first or this first
if you want to update the description you could probably do something checking variables in your loc_vars() and returning different values accordingly
so do i like
put "dead" in loc vars instead
evil
when using the G.C. stuff for color, how would i do yellow?
yeah something like that
instead of it being in extra
like, if dead == 0 you return "alive", else you return "dead"
return {vars = {"alive"}}
else
return {vars = {"dead"}}
end```
i do need help though
yeah, this is happening.
where are you stuck at
card.ability.extra.dead
^
i am stuck at the effect part
i have no clue how to make it
I mean I can write it for you but that wouldn't help you learn much lol have you looked at the wiki and the example mods?
i think you can just return {"alive"}
not sure if there's an example of a joker checking your hand for any type of card in the example mods
okay, now what should i do next
should i, yknow, code the actual effect of the joker?
do you want each ace to give chips OR for the joker itself to give 25 * number of aces
the joker itself
the whole "giving mult for all even cards but debuffing all odd rank cards"
and then doing the opposite when dead
...where does nvm, forgot a comma_generate_main_end(card) belong? 
chips for odd rank cards but debuffing even rank cards
then you need to use context.joker_main and iterate through G.hand.cards to get all the aces then return { chips = card.ability.extra.your_chips_amount * ace_count }
anyone know
SMODS.get_enhancements
I'd been using card.config.center.key to get the enhancement đ
will that return work with :set_ability?
this is the full code
if it works it works
where do i even put that from here (i am stupid)
probably not, I think it returns a table because it counts quantum enhancements
if for some reason it doesn't,card.config.center.key definitely does
you need to use calculate, i recommend reading the example jokers again
because I do this:
G.hand.highlighted[i]:set_ability(rightmost.config.center.key)```
the issue is that config.center gives me an error already here
i know how to make the joker give mult when cards are scored but i dont know how to have it do it for a specific rank type
that being even rank
im sure it would work if i did card.config.center.key
im reading all of this off the documentation
but context.scoring_hand[index + 1].config.center.key dont work
just have the joker look for even ranks in card:get_id
okay i'll admit that was a slightly dumb question at the point i had it
i put the calculate thing there but now what
is there a general overall calculate function for blinds (similar to the joker calc function)
yea there is blind calc in latest smods, im not sure if the wiki is updated for it
how would i check for every joker with a specific badge i made?
if rightmost.config.center.key ~= "c_base" then
G.hand.highlighted[i]:set_ability(rightmost.config.center.key)
end```
im just gonna write it
if context.joker_main then
local ace_count = 0
for _, playing_card in ipairs(context.scoring_hand) do
if playing_card:get_id() == 14 then
ace_count = ace_count + 1
end
end
if ace_count > 0 then
return {
chips = 25 * ace_count
}
end
end
is the function just called "calculate" just like the jokers and has the same params, or is there more to it? (the wiki isn't updated)
i printed it and thats what it gave me idk man
your thing makes more sense anyways
it gave you "enhanced"?
i think its just calculate?
i was able to use normal calcualte in a blind i made for someone today
calculate*
yes
thank you but i also feel very bad for making you suffer my stupidity
tbf i want to do something like "+20 chips when something is retriggered"
i don't necessarily understand how this context does that
now, time to do the calculating thing.
idk either that just seemed like the most pertinent thing
i only have docs to help ppl with
ok time to lock in and figure out card rotation for real now
SMODS.get_enhancements(context.scoring_hand[index + 1])
also printing this gives an empty table, while printing SMODS.get_enhancements(card) prints my enhancement
what, in balatro you can't make gif or webm jokers? only png?
so that makes me think context.scoring_hand[index + 1] is not a playing card the same way that "card" is a playing card
I don't think context.scoring_hand is a list of cards
misinformation
it is
oh nvm then
why doesnt this work then
animated jokers use a specific atlas mode
Well, I set everything up, but the game breaks.
it should at least print like, base, or something
right?
i just played 3 sixes
one was enhanced with my custom enhancement
and it was the first card
what's index
maybe you need to do a for k, v in pairs(context.scoring_hand)?
no because that context only applies when something is retriggered
I want to add an animated joker, do you know how to write the code to make it work?
i want to detect retriggers
sorry, i don't
(
yes? so just check if ur in that context
never did one before
global retriggers
i might be missing something
not retriggers on the joker
theres retrigger contexts for everything
do you know what kind of animated jokers there are in balatro, that i took an example from them. it's just that they are all static there
also generally if I'm indexing I do
for i=1, #contxt.scoring_hand do
this is the same thing
i believe
unless i have a large fundamental misunderstanding somewhere (entirely possible)
cryptid has jimball
i don't want a context i want something that is called when anything is retriggered
so i can forloop it
what is ur goal
end goal
what?
"+20 chips when card is retriggered"
the mod, cryptid
like via red seal or whatever
cryptid mod has jimball
it has an animated joker called jimball
yes and i dont want to hardcode
thats when u want to use context
context.retrigger_joker just retriggers the joker
thats not what that does
. it is searching if the joker is being retriggered
it doesnt no
if the joker is retriggered then its it's in that context
that's still not what i what
1 or 2?
then just do context.repetition
1
is this
im not sure if the docs are specifically saying it only works for jokers or not
but
yea
it seems ton be only jokers by the text
guys why the fuck is this happening please help me
no idea
okay, time to actually code the joker......
and the effect of the joker....
which is debuffing odd rank cards and giving mult for even rank ones
see even if i print the enhancement of "otherCard" it gives me the tagger enhancement, so why does just getting the card at the next index not fuggin work
isn't this for adding repetitions and not detecting them
i'm still doing this in joker.main
yea it is, i had misunderstood what you wanted
ok i think i understood it better
i believe if a card has no enhancement, that function returns an empty table
context.post_trigger is for effects after a Joker has triggered
first! the mult
which is only for even rank cards
yes, and the extra check is for checking after it has triggered in a retrigger context, isn't that what you want?
i'm detecting card retriggers
oh i read jokers
oh its maybe card.ability.extra.retriggers
how would i have mult be scored only when even cards are scored
i'm just reading source code atp
how do i spawn a joker using debugplus?
3
go to collection
press 3 in the collection
press 3
and if i dont have it in my collection?
2 to unlock it
-# you can hold Tab to see the command list
you might need post_trigger too, and check for context.other_context.repetition and that context.other_ret has repetitions (just some ideas)
bepisss
gg
make it un confusing
~~i'm just getting attempting to call nil value errors
switching between self and card doesn't change anything, nor does doing [1] for either.
commenting out the four function calls i do before the return reveals that it's not the cause.
have no idea why this is happening or what i'm doing wrong here 
...actually, what am i doing, why don't i just store my desired text to set as a variable~~
oh my god i mispelled my function name
hiii
returning xmult in literally all context possible crashes
whatre you tryna do
in general, when installing the crypted mod, it asked to also install the talisman mod, like it doesn't work without it, but after installation the game breaks, it goes to the menu, and then you press any button and an error
evil
-# there's x0.5 chips too but i gotta get the mult working first
like there is no steamodded?
you need to update it
update your smods
Heya anyone have any links to a quick guide for modding balatro?
bepis!!!
for rotating cards, I'm wondering if I might need to hook into CardArea:align_cards()
im not crazy right? nothing here is referencing my mod (untitled tag mod)
just coded the hardest thing i ever had to do
after adding this code its killing cryptid somehow
could someone send me a repository of how to do alot of things with jokers? or is it just trial and error
https://github.com/Steamodded/examples/ also https://discord.com/channels/1116389027176787968/1349064230825103441
the description works, at least
gives + nil mult
loc vars be damned
guys is there anything wrong with how i do this
cause this is crashing the game entirely
with this log
damn it
what does it mean...
the problem is i don't know how to make it show the mult var
becaus elike
do i need to post my whole lua file for people to check..
this is my card
wait, cant you just look at fuckin
flint is it
cuts chips and mult in half
you see that #1#
i believe that refers to the first thing in the table you return in loc vars
fix the quotations on your atlas key
in my case
how do i make it not show nil mult
do they need to be the double ones?
Your if statement is outside of the loc_vars function
look at how i did mine
also this (i assume u realized that tho)
where extra
yeah i have to context.post_trigger and context.other_context.retrigger_joker
anyone know why? am i doing something bad practice?
i dont need it

