#💻・modding-dev
1 messages · Page 382 of 1
incorrect
it doesn't let me set it to false
and are you sure that doesn't work?
don't return a variable assignment
print(valid_pool) after the loop
when you're coding you never look at the end result and say oh well nothing works lol
then what do i do, assign a variable outside of return and then return the variable?
i did and theres absolutely nothing
i want my joker to give +100 chips at scoring, but after using a specific consumable on it it gives +500 chips at scoring instead for the whole round, then going back to normal
can i see the code
So they coexist now, but selling does nothing
there you go
then you don't need to return anything in end_of_round
oh, the jokers are not registered yet while you're in the global scope of your mod
do it in the apply function
wdym?
card is the joker that is using the function, and also card is not a string, it's a Card object
ah
G.P_CENTER_POOLS doesn't have any mod jokers until smods loads them in a function and that part of your mod loads before smods loads your jokers
just do it inside apply
yeah but how do i do it
ctrl+x ctrl+v
it now works when the consumable is used but doesn't work when it isn't, so it gives +500 but doesn't give +100 anymore
ok
why are the cards with specifically a custom rank AND a custom suit not using the correct atlas
damn im dumb holy shit
so is there a way to sell a certain type of joker and gain mult?
should I put that in the if then?
yes
ok, it KINDA works, its saying its upgrading, but its not ACTUALLY upgrading
why arent the tags going away after i got the cards lmao
So I have managed to create my own booster with my modded consumable, but it's showing "ERROR" instead of the Pack Name, how do I fix that?
nvm fixxxxxed
🧐 How'd I make it such that the game opens wordle or do something adjacent
for stuff like that you are probably better off researching love2d and lua directly
Ic
is there a way to discard every card in hand?
how do i enable joker retriggers
post trigger not needed
ty for answering the question instead of just reacting to the message
bwahaha idk either
something has a habit of that, hes rly smart tho so if he can he'll help
@modern kindle your code for splash, can you send it again? im just thinking and i think it might be slightly inefficient (if u care at all)
does anyone know why I am getting this crash/ how to fix it? Happens when I hover over my new booster pack in the collection
Any tips to get this working? I have a joker that triggers on non face cards, currently triggering correctly. I'm trying to add the number value of chips(essentially a retrigger, but there will be more steps once this works). other_card works in the context line, but doesn't work when trying to add the chips in the return block.
if not context.other_card:is_face() then
return {
chips = self.ability.extra.chips * other_card.base.nominal,```
oh I actually have useful docs regarding retriggers and post triggers now
coming soonTM
so with your insight will we be able to make a joker retrigger itself infinitely?
what is that create_card??
but it would be so funyyy
it's a new consumeable type I made
piece together your code and mine, mine works fully btw
sounds good I appreciate it
Hi i'm trying to make the most boring tarot card ever (reverse strength), but it keeps getting stuck when the card flips over.
I'm using https://github.com/nh6574/VanillaRemade/blob/main/src/tarots.lua as a reference and even that original code doesn't seem to work
sounds peak actually, turn aces into kings
omg u just gave me an idea for a consum
1/4 chance to turn entire hand into kings, else destroy all cards
lmao
im confident it just is iefficient, but it gets the job done so i dont really care
I asked a question and am being asked to pay money to make your card 
my practice is based on if it works over if its most efficient
IM KIDDING
yeah here was my solution, seems simpler 🤷♀️
lol ik
Are you returning true in the events?
All events do.
hmmm, I guess the vanilla remade strength is jsut missing it then lol
ok yeah that was it
funny enough this works, so reverse strength is jsut strength's code with (1) extra character
I thought 2->ace might not work but it's fine
if i wanna play a sound effect when a joker gives money, is this the best way to go about it?
Tried to update someone to 0.7.1, got this. Help.
No, you would do sound = 'sizimod_paid'
in the return statement?
Yes.
And remove everything else in the return.
but those are checks for how much money to earn from discards and hands left
Wait this is in calc_dollar_bonus?
You would then do```lua
if number > 0 then
play_sound('modprefix_key')
return number
end
like this?
Remove the second return.
What do you want it to be?
bump
they would play the sound and then return the number of money in prportion to hands and discards unused
this joker i'm making gives 1 dollar per discard or hand that you don't use
would this work properly for that purpose?
and should i add a comma after the sound statement to not cause errors?
No.
This is a function not a table.
jokers don't have individual weights so that's hard to do
It works!!!
hypothetically what if i made a rare joker into an uncommon joker
you would need to modify the pools too i think
can i add a joker that’s only there to be turned into from an another joker and cant actually be found in shop?
Ok so I'm trying to make a joker that copies and force-uses consumables
What in the world did I do wrong?
Cause it doesn't work
The copying or forcetriggering?
Nothing works but I think part of the issue might be that I forgot card.ability. behind state
do animated jokers cycle through each frame automatically in a loop or can i control when the frame changes
Well it still doesn't work so I'll repost the code
if context.using_consumeable and context.consumeable.ability.set == "planet" and card.ability.state == 0 then
card.ability.state = 1
G.E_MANAGER:add_event(Event({
func = function()
card_eval_status_text(context_blueprint_card or self, 'extra', nil, nil, nil, {message = "Copied!", colour = G.C.CHIPS})
local p_card = copy_card(context.consumeable)
G.FUNCS.use_card({ config = { ref_table = p_card } })
return true
end
}))
card.ability.state = 0
end
end```
Is the source code behind Brainstorm's Immolate.dll available anywhere? It's not in the git repos as far as I can tell. I'd like to fork it and add a bunch of extra features, including a way to script against it.
You have to animate jokers manually.
Also, would it be possible to instead retrigger planets?
Thank you.
Try looking at how POLTERWORX does it?
Already tried, couldn't figure it out from code
so a stackable joker with each stack having a different sprite is possible?
stackable like madness for example, eating a joker and gaining mult each time it does
Stackable joker?
But yes.
yeah like runner, madness, bus, constellation, hologram, vampire
You mean scaling joker?
@daring fern I think in the end I'd rather do it this way
So I can also do it to Wheel of Fortune and other chance-based consumables
As such, what's wrong with my code?
How do you determine that something is a modded suit or rank?
I could at base just make a reference table of the vanilla keys, but is it actually already stored somewhere?
Looks like it's in Aurinko instead, actually
And it's only for hand level ups
chat i need some help
can someone who understand smods' straight calculation help me rq
is this about jump cards
I think you can go ahead and post your code, whatever you've got
@minor magnet
Does anybody have this issue where if you shuffle the deck, discards will draw cards using the same order before you shuffle but playing a card will update it to use the new order?
PATCHES
# Jump Cards
[[patches]]
[patches.pattern]
target = '=[SMODS _ "src/overrides.lua"]'
pattern = '''local id = card:get_id()'''
position = "at"
payload = '''
local id = SMODS.has_enhancement(card, 'm_garb_jump') and 0 or card:get_id()
'''
match_indent = true
overwrite = true
[[patches]]
[patches.pattern]
target = '=[SMODS _ "src/overrides.lua"]'
pattern = '''if skip and (wrap or not SMODS.Ranks[v].straight_edge) then'''
position = "at"
payload = '''
if total_jumps and total_jumps > 0 or skip and (wrap or not SMODS.Ranks[v].straight_edge) then
'''
match_indent = true
overwrite = true
[[patches]]
[patches.pattern]
target = '=[SMODS _ "src/overrides.lua"]'
pattern = '''for _,w in ipairs(SMODS.Ranks[v].next) do'''
position = "after"
payload = '''
total_jumps = total_jumps and (total_jumps - 1) or 0
'''
match_indent = true
[[patches]]
[patches.pattern]
target = '=[SMODS _ "src/overrides.lua"]'
pattern = '''table.sort(ret, function(a,b) return #a > #b end)'''
position = "at"
payload = '''
if #jumps < 4 then
table.sort(ret, function(a,b) return #a > #b end)
if ret[1] then for k,v in ipairs(jumps) do table.insert(ret[1], v) end end
else
ret = {hand}
end
'''
match_indent = true
overwrite = true
could be due to events? things in events don't happen immediately
FUNCTION
local getstraighter = get_straight
function get_straight(hand, min_length, skip, wrap)
total_jumps = 0
min_length = min_length or 5
jumps = {}
for i = 1, #hand do
if SMODS.has_enhancement(hand[i], 'm_garb_jump') then
jumps[#jumps+1] = hand[i]
total_jumps = total_jumps + 1
end
end
if #hand >= min_length then jumps = jumps else jumps = {} end
return getstraighter(hand, min_length-#jumps, skip, wrap)
end
Maybe, I'll move it outside of the event manager and see if anything changes
you might want to check out the relevant functions and see which of them contain events, and which are contained in events
lots of normal-looking functions have events buried inside them
oh yeah, what's the current intended effect of Jump Cards
take the place of any card in a straight
as of right now they work in the first, second, and last positions
if you play them as the third or fourth card they will not work
that's tough with only very few patches. it's not like shortcut where you can have exactly one gap each time
I'll have to read over those patches; I am currently thinking you might want help with the algorithm instead of trying to find where the current code is wrong
genuinely understanding exactly how the get_straight code works might help me more
first part of the function collects all cards into buckets by rank into ranks table; then, looks like a collection of tuples (partial straights?) is created. (I'm reading through right now, I think the get_straight code changed)
ok, looks like it basically keeps extending each straight in parallel?
basically all the partial straights are in tuples. simplifying a lot, in one iteration, every partial straight is extended by one card if possible, possibly making a lot more partial straights, which are collected back into tuples
so, draw_card does use an event, which I call in a for loop and then psuedoshuffle
next_ranks() is a helper function saying "which cards can be added onto this partial straight"
ok that makes sense
Is there some way to track the amount of jokers bought throughout the run? Like fortune teller, but with jokers.
Would there be anyway to change base game boss blinds?
(Ex: Making tooth give 1 dollar instead of losing one dollar?)
You'll probably have to count them yourself. you might have to hook/patch a function like buy_from_shop and increment a global counter
take_ownership or lovely patch
Could i get an example of how this code would work or be called?
I assume this is a conditional effect; using a lovely patch is the most reliable way
I wouldn't take ownership as you'd have to recreate the original effect
Yeah its for a deck im making
It essentially reverses the effects of each boss blind
(Violet Vessel is 0.25x base, for those asking :) )
yeah, you'll have to just change every boss blind. the easier way will probably be using lovely patches; you can go to Lovely's github page, or check other mods to see how. (lovely/dump contains the post-patch files so you can see what's happening)
Could i get a few mod examples which use patching?
in #1345167421987749959 i use patching for a bunch of stuff, just check out the lovely.toml file
pretty much all of them these days. I was just working on Lucky Rabbit
Is toml still written in lua
no its written in toml
no, it's separate from lua. toml isn't a language, just a data format
lovely readme has an example
Okay
This isnt gonna be fun :agony:
would you like advice on how to implement jump cards?
example mod that uses lovely patches
yes hop in dms if you dont mind, lets not clog up the chat
its literally just pasting your code directly into the game code
all the stuff around it is telling the program where it should paste it into
Ohh
Is there any context I can check for buying a joker?
So it is basically lua yeah
well
you write the lua code in a string
the toml file contains the lua code
you'll see if you look at some examples
no but there is a context for buying cards in general and you can check if its a joker
context.buying_card
context.card is the card that was bought
also note that the card being bought will also receive this context so you might want to check for that if you don't want to have it trigger off of itself being purchased
how do you make the probability in a joker desc change with oops all 6s
Use variables
Check smods github page with moddedvanilla
It should have a gros Michel clone
(G.GAME.probabilities.normal or 1)
Don't ask me why its called normal
but the normal thing keeps track of probabilities being changed
Yeah
What do I use to check if the bought card is a joker?
gotcha thanks
I always forget how to do that
hey so 2 questions
first, where is current ante stored?
Secondly, how do I check if a number is an integer in Lua?
everything is included in various things called config cenfer or whatever I forget where things are
Like, no decimals?
added it to where i check the probability but how would i do so in the joker desc?
I need a way to check if current ante is multiple of 8
if ANTE % 8 == 0
is there a default timer function that ticks when a time interval passes?
Fucking Modulo
% is modulo
How did I forget about Modulo
how do i make the probability display in the joker description
Also where is Ante stored
:agony:
You need to put it in the config, then return a loc_vars function
also, you can use G.GAME.blind.config.blind.boss.showdown == true
also include it in your loc_vars function
ok lemme try that
That i do not know 🔥
people tend to forget loc_vars is a function and you can do whatever you want in them!
No, that would check if the current blind is a showdown?
ante is stored in the balls
loc_vars = function()
os.exit()
end
:trol:
true
yeah, which is the only reason i can think to check if ante is a multiple of 8
you can do G.GAME.blind.boss.showdown
The humble modulo:
hey mr n how do you check if a card is a joker again
Is there such a thing as G.GAME.ante then?
No.
card.ability.set == "Joker"
G.GAME.round_resets.ante returns an integer of the current ante
Cause finisher blind can show up on ante 7 too if you used Hieroglyph
okay theres your answer you use card.ability.set == 'Joker'
I can never remember this
And if I understand the intention behind who supplied me with the joker idea, then it has to be exactly a multiple of 8 ante
So to check if its a multiple of 8 just do like
if G.GAME.round_resets.ante % 8 == 0 then
Yeah ok thanks
Oh yeah, friendly reminder that you can put negative on playing cards!
Do what you want with this information.
friendly reminder that this is illegal and you have been reported to your local authorities
I thought it was a cryptid thing?
it's an smods thing
no negative on playing cards just work
Oh it's smods
fun fact, if you get the verdant leaf, negative playing cards will not function even after selling a joker!
JoyousSpring(tm) has some
i had a seal like that but realised it was too op lol
EVIL SEAL
X-2 MULT
i might steal this
Give credit if you do!!
when i hover over the joker in the collection menu, it keeps crashin and telling me line 220 causes an error
no one has made a joker that kills seals and called it polar bear or something like that yet as far as I can tell and this is greatly disappointing
Also would it be possible to replace every blind with a boss blind, triple the ante requirement, and then reduce scaling to not make it go crazy?
G.GAME and G.GAME.probabilities.normal or 1
you used card.ability... but the argument is called center
Totally not making another stake
Cause i know a mod that replaces the blinds, but idk about changing the win requirement from 8 to 24
now this is peak
Oh my fucking god i get it now
The poor seals
🦭
prob need to use lovely patches, and best make it a deck
The thing is, you unlock a deck from doing the stake
Its gonna be the final stake in my mod
wild, gold stake and that? i RARELY ever do anything but white in modded to begin with
ok I fixed it by moving psuedoshuffle into pre_discard and handdrawn if you played cards
Oh theres more after gold!!
Aqua - Everything in the shop is 25% more costly
"Unpleasant" - If you go more than 2 rounds with less than 10$, instantly lose the run.
But ill also offer it as a deck version for people who like white stake
no offense but how is this fun...
Its not supposed to be!! :)
(I like suffering)
so its what mariokart players think darksouls is like as a balatro stake? peak
Aqua isnt that bad, just buy clearance for 13 if you can, and then its basically just normal again
Unpleasant is a different story.
But if you think about it, youll be gettint alot of money from the boss blinds, so unpleasant shouldnt be an issue if you manage econ well
still deck fixing and econ would require an insane amount of precision
you should add a feature where you can only get common jokers
Maroon Stake - Joker rarities above common appear twice as unlikely
[Applies unpleasant stake]
(half)
Half as likely
Twice as unlikely
Same difference :P
so rare chance = 2, uncommon = 12, seems too much
yeah make it 1/4th
True
1 and 6
Also im thinking of making showdown blinds into decks
better yet, get rid of rare, change uncommon to be weight of rare
Violet Vessel Deck - Very Large Deck (104 Cards, 26 of each suit)
Verdant Leaf Deck - 2X Sell Value for ALL Jokers
violet stake = *6 base ante chips req
What would the other 3 be tho...
does anyone know how hard it would be to make all held consumables negative?
not
No i mean the decks not the stakes
yeah but add the stakes aswell >:)
Loop through everything in the held consumables with a for loop
TRUE
lets move this discussion to my mod forum
yeah ping me there
all currently held consumables or all consumables that are added from now on?
all currently held
yeah that's not bad
again, very easy
yeah im jsut not too well versed in refering to the held consumables
use a for loop to iterate over G.consumables and set the edition of each card to negative
might be spelled consumeables because thunk can't spell sometimes
v:set_edition('e_negative')
end```
he switches it abt lmao
wait no, smods and him differ
Pinged
Does someone have an example of a joker that counts all previous joker purchases?
I know someone has been working on something along those lines but I don't remember who
what's your goal?
Just a joker that gives plus 3 mult for each unique joker owned within the run.
I think unfortunately that is actually pretty difficult to do
or at least it requires a hook
afaik there is no in-game tracker for unique joker purchases
Would just joker purchases be more doable? Not tracking unique jokers.
I think it would be approximately the same amount of work
to be clear they're both totally doable you just need to hook whatever function is responsible for purchasing a joker, but I have never done anything with the shop so I can't give you a good starting point
I haven't done any hooking whatsoever.
how ready are you to learn
my go to for things that have a context is hooking SMODS.calculate_context
it's not too bad
local SMODS_calculate_context_ref = SMODS.calculate_context
function SMODS.calculate_context(context, return_table)
if context.buying_card and context.card.ability.set == "Joker" then
G.GAME.prefix_jokers_bought = (G.GAME.prefix_jokers_bought or 0) + 1
end
return SMODS_calculate_context_ref(context, return_table)
end
sorry if the formatting is bad
he wants to keep track of jokers purchased in a run so context wouldnt work
oh
okay sure that works
how to i make this return both 1 dollar for every hand and discard unusued, for me it only does 3 dollars when i have 3 hands and 3 discards
and does not add things
when it should be $6
You return the + of the two.
you want to add numbers
Can anyone look through this and see what's making it crash?
was wondering if that would work so imma try it
seems like something in jen's library mod doesn't like talisman
-# ...2.2.0-dev, a bit older, huh.
Do any of them need updating or do we just need to kick one of them out?
wouldnt adding_card be better?
why
or did i dream that context...
judgement, wraith etc
card_added i think
they said bought, i dont know what they want to do
first time modding balatro
i have genuinely no idea of whats going on anymore
completely lost the plot
:set_seat with a colon
ah
makes sense
lemme try that
okay that was
better
saw the seals for a second there, crashed again
i see the issue tho i can fix that myself
thanks by the way
yw
Got them updated, along with upgrading to 0509c SMODS.
Looks like it's working so far.
How would I put this into use?
almost exactly as written, replacing prefix with your mod's prefix
then any time you need to access the number of jokers that have been bought you can use G.GAME.prefix_jokers_bought
Thank you both!
small side effect of how I coded oracles conditions (if you have any consumables), if you are holding just oracle you can use it and it does nothing
I will be leaving it as such and do not want any recommendations on fixing it I just wanted to share
you can fix it by setting your microwave to 5 minutes on high
If i wanted to multiply the rate of foil cards appearing(like hone and glow up but just for foil cards) in a joker, how would I do that?
nvm, i'll just copy off cryptid's homework again
if i wanted to feed G.localizations.descriptions.Other.Edition.e_negative_playing_card into an info_queue, what's the best way to do that 
here's how I added the info_queue for a sticker
https://github.com/chaseoqueso/Powerful_Balatro/blob/master/jokers/lich.lua#L11
maybe that'll help?
oh, i'm familiar with adding via a key, set table. the problem here is that this is in a set, in a set. ...so like, how do i set up the table? because { key = 'e_negative_playing_card', set = 'Other' } sure isn't gonna work, but neither is { key = 'e_negative_playing_card', set = 'Edition' }?
crazy thought but would set = "Other.Edition" work?
...why specifically under Other?
also ^
don't ask me, ask steamodded devs https://github.com/Steamodded/smods/blob/64ebb1780c917bb0ff4689420d357049ce9f8d57/localization/en-us.lua#L139
that's how they structured it
this did not work out due to cryptid only having something for negatives
so uh bump
I would start by taking a look at the vanilla code for hone
I have no idea how it decides whether to apply an edition
actually
looked at that a bit ago, but neither really covered what I was looking for which is only foil
i'll go over it again
ohhh I missed that you wanted specifically foil
then my guess is that you would probably need to modify the weight of e_foil in G.P_CENTERS
or...hook its get_weight?
I'm not at my computer so I'm not looking at the code
i have an idea which is take ownership of the foil edition and multiply the weight like wormhole deck
that is a much more straightforward solution
you could probably just replace its get_weight function then
using take_ownership
yes, so if you want to reverse the effect you'll need to do something in remove_from_deck
alright
This specifically?
for taking ownership, can we use extra ability variables in it?
that...is a good question
for example:
add_to_deck = function(self, card, from_debuff)
SMODS.Edition.take_ownership("foil", {
get_weight = function(self)
return self.weight * center.ability.extra.foilrate
end,
}, true)
end,
I would be hesitant of overriding config using take_ownership
ignore the formatting
because you're replacing the config of the original
ah
trying to make a joker like oops all 6s but instead it sets probabilities to zero, but when i spawn the joker then sell it, the probabilities are still set to 0, how do i fix this
also that's not how take_ownership is used
Better save the initial probability to an another variable before applying changes.
how do i detect if a player is idle? like, if they havent clicked in over a minute (i can use context.cry_click, but i wanna know how to check time)
SMODS.Whatever:take_ownership goes outside of any other table, just like making a joker or something
this would be easier although i want the foil multiplier to change if another joker changes it
you should probably set it up like
get_weight = function(whatever parameters)
return G.GAME.edition_rate * G.GAME.your_super_special_variable * self.weight
end
and then your joker modifies that special variable
wouldn't this not account for cases where the probability changes between the times the joker is added and removed?
still a little bit confused, i'm assuming we take ownership in another part of the file and then we define these variables, but where in there do I define them
Could always update it to reflect the changes... but just don't let it become 0. ¯_(ツ)_/¯
I assume you're looking at the wiki
brb
taking ownership is just like creating a new thing, except you only add the properties you want to be different from the original
so in the wiki example they take ownership of a Joker using SMODS.Joker, looking for the joker with the key 'joker', and replacing its cost and calculate functions
nyehehe

how save stuff
G.GAME
no like to the profile
yo what's the sound that occurs when a joker "activates"? not really sure how to describe it
the sound that should go along with card:juice_up()
like the card flick sound, I guess lol
cool, I'll give it a shot
yep, that's it. thanks :)
can someone send me a screenshot of line 2240-2269 of game.lua inside lovely folder?
how do i stop this guy from returning 10$ for every card held in hand
add and context.main_eval
and remove the repetition part, that takes care of it
many thankses
so how do I connect this to my joker?
How would I put a modded sticker on a card with SMODS.create_card?
right now I have ```lua
SMODS.create_card({set = "Food", area = G.pack_cards, skip_materialize = true, key_append = "does rng seeding matter that much?", stickers = {'para_negativesticker'}, edition = 'e_negative'})
as in have my joker modify the values
I'd say upon creation of either joker, check for the other and modify its values if so
also check when your joker is removed so you can reset the values
this just causes the tooltip to be an error
It isn't 2 jokers, it's one joker that modifies the rate of an edition
the answer is that it's not in other.edition it's in edition
does anyone know if/how I could make a joker modify the price of booster packs specifically instead of just using G.GAME.discount_percent?
i hook set_cost for it
get_weight = function(self)
if (check for joker here) then
return f(self.weight) -- f(x) takes the edition weight and outputs the new one given your joker exists. does not stack rn
else
return self.weight
end
end
in the edition replacement
well, patch but you can hook
tried that, just causes functions/common_events.lua:2848: attempt to index local 'cfg' (a nil value)
How would I put a modded sticker on a card with SMODS.create_card?
how would I check for the joker? sorry i'm reeeaally new
idk either tbh
like this?
info_queue[#info_queue+1] = {key = 'e_negative_playing_card', set = 'Edition', config = {extra = 1}}
i see
i would assume you could loop through the jokers and check but idk how to access it
(it being the jokers)
next(SMODS.find_card("j_modprefix_key"))
ty
oh thats a lot faster
how would I hook the price of booster packs specifically?
you check if the card is a booster and if your joker is in play and then you adjust cost and sell_cost
sick, thanks :)
fixed 
does anyone know why this doesn't spawn my sticker on the card?
SMODS.create_card({set = "Food", area = G.pack_cards, skip_materialize = true, key_append = "does rng seeding matter that much?", stickers = {'para_negativesticker'}, edition = 'e_negative'})
Another question, I'm making a deck and in game it just says ERROR and crashes the game when you try to play it.
here's the code
the only thing that displays right is the sprite
I'm assuming lovely has a debug function
is the correct tag G.C.BOOSTER?
- use SMODS.add_card to create jokers
- you need to use an event in apply or it will crash because the joker area doesn't exist yet
the error thing idk it's probably something wrong with how the loc_txt is formatted
i think you need to use events for adding jokers with decks
no that's a color
I'm finding IDs for specific booster packs but not booster packs generally
card.ability.set == "Booster" iirc
for comparison i have this that spawns two jokers (ignore the names)
apply = function()
sendDebugMessage('Deck selected')
G.E_MANAGER:add_event(Event({
func = function()
local card = SMODS.create_card({
set = 'Joker',
area = G.jokers,
key = 'j_markiplier_plusmarkiplier',
})
card:add_to_deck()
G.jokers:emplace(card)
return true
end
}))
G.E_MANAGER:add_event(Event({
func = function()
local card = SMODS.create_card({
set = 'Joker',
area = G.jokers,
key = 'j_markiplier_timesmarkiplier',
})
card:add_to_deck()
G.jokers:emplace(card)
return true
end
}))
end
})
oh fr? let me try it lol
Haelp why is it doing this 😭
what's wrong with the loc_txt?
and how do i use events
i will never understand why obs doesn't just save directly as mp4
Would it be possible to check what poker hands have been played in an ante?
G.E_MANAGER:add_event(Event({
func = function()
local card = SMODS.create_card({
set = 'Joker',
area = G.jokers,
key = 'j_markiplier_plusmarkiplier',
})
card:add_to_deck()
G.jokers:emplace(card)
return true
end
}))
i think if you just change the name of the joker and put this in apply ur good
SMODS.Joker{
key = 'jokerkaite',
loc_txt = {
name = 'Kaite',
text = {
'Gains {C:red}+2 {C:black}Mult every time {C:gold}High Card {C:black}is played.',
'{C:green}1 in 4 {C:black}chance to upgrade {C:gold}High Card {C:black}when played.',
'{C:inactive}(Currently {C:red}+#1# {C:inactive}Mult)'
}
},
atlas = 'Jokers3',
pos = {x = 0, y = 0},
config = {
extra = {
base_mult = 0,
growth = 2,
level = 1,
highcard_growth = 1,
}
},
rarity = 3,
cost = 8,
loc_vars = function(self, info_queue, center)
return {vars = {center.ability.extra.base_mult}}
end,
calculate = function(self, card, context)
if context.before and context.main_eval and context.scoring_name == 'High Card' then
-- initialize values if not already set
card.ability.extra.base_mult = card.ability.extra.base_mult or 1
card.ability.extra.growth = card.ability.extra.growth or 1
card.ability.extra.level = card.ability.extra.level or 1
-- apply growth
card.ability.extra.base_mult = card.ability.extra.base_mult + card.ability.extra.growth
SMODS.calculate_effect({message = "+2"}, card)
-- chance to level up
if math.random() < 0.25 then
card.ability.extra.level = card.ability.extra.level + 1
card.ability.extra.highcard_growth = card.ability.extra.highcard_growth + 1
SMODS.calculate_effect({message = "Level Up!"}, card)
end
-- return effect
return {
mult = card.ability.extra.base_mult
}
end
end
}
and theres code
the joker looks to be triggering before scoring instead of during joker_main
including the scoring
also put code like this:
```lua
-- Your code here!
```
idk why triggering then would do that though

actually
you should use SMODS.add_card instead
it does the same thing but more compact :p
what would I change to use that
I got it to work by setting should_apply = false in my sticker object (which I assume makes you use the default sticker check)
just had the same issue
kind of a confusing name but that's how smods redefines vanilla stickers /shrug
i recommend reading this
it explains events pretty clearly
as in like add card instead of create
SMODS.add_card({key = "key"})
and does that remove the need for the other things?
yes
alr
what are the functions of booster pack cost and sell_cost?
ty
okay now i need to get my sticker to do something
how tf does apply actually work
elaborate?
runs whenever the sticker is applied/removed from the card, i think?
not sure if it runs when removed
I'm not sure what function I should be hooking for modifying the cost and sell_cost, is what I mean
is just checking .ability.set == 'Default' enough? i'm pretty sure that should only eval as true for playing cards, right
the one i said at the beginning of the conversation lol
Card:set_cost
apply is just a function gets called when the sticker gets added
but not removed?
no
ah okay
you also need 'Enhanced'
for something to happen when its removed you'd have to do it in its calculate function
so i'm checking for default or enhanced?
ye
apply = function(self, card, val)
if not card.ability.eternal then
card.ability.supper_contracted = true
card.ability.supper_contracted_tally = G.GAME.supper_contracted_rounds
end
end,
as an example mine simply sets a counter when sticker is added
anyone know how to change the font of a message?
How would I check for unplayed poker hands in an ante?
what context would that be?
nvm gor it
whatever context removes your sticker man
calculate = function(self, card, context)
if context.end_of_round and context.cardarea == G.jokers then
if card.ability.supper_contracted_tally == 1 then
card.ability.supper_contracted_tally = 0
card.ability.supper_contracted = false
card:juice_up()
else
card.ability.supper_contracted_tally = card.ability.supper_contracted_tally - 1
return {
message = localize({
type = "variable",
key = "a_remaining",
vars = { card.ability.supper_contracted_tally },
}),
colour = G.C.FILTER,
delay = 0.45,
}
end
end
end,
Mine simply gets removed after some rounds so I do this
if you somehow have a thing that removes stickers off of cards and want it to trigger something based on that then you're on your own idk
on destruction mainly
when card is destroyed?
its for food jokers
so like triggering something when a joker with a sticker is destroyed
nvm DONT got it
uhh
you'd prob have to hook or patch something
there's Card:sell_card you can hook into
idk what a useful function you'd hook into for destroying things would be
theres a lot
i guess you could try hooking to all the delete functions currently available 😭
wait actually how does negative do it
how do i hook things? can't seem to find anything on it in steamodded
In LUA, it is a very important concept to understand that everything is a variable and all variables may be edited in runtime. This includes functions. With modding other peoples' LUA files, like Klei's basegame code, you may find yourself wanting to run your code before or after the original fun...
Is there something I can use to check for unplayed hands?
thank you guys who made eets for this lovely lua tutorial
extra hime hehehe
Where do I find G.deck.cards[#G.deck.cards]?
wait so when do i change the function? can't find any part of steamodded that runs on startup
bunp
oh it's lovely isn't it
See [this](#💻・modding-dev message) pull request
not the name and description
a
the trigger message
you can hook functions at any time, not only on startup
so you can have a hook on your main file
wdym
Where do you find this in the Balatro source code?
i think the deck is defined in game.lua? search for self.deck
idk how much that will help
Not sure about that one, then.
Not sure when or how font styling is applied, or if that can be called on any arbitrary string, in any spot.
What's the context for defeating a boss blind?
I just use if context.end_of_round and not context.repetition and not context.individual and G.GAME.blind.boss.
ugly but it works
replace not repetition and not individual for context.main_eval
if i have a Card how would i check if it has a specific sticker?
I believe stickers are stored directly on card.ability
so like eternal would be card.ability.eternal
it's a boolean
so for a modded sticker it would be card.ability.prefix_key?
I believe so

How do you do the info_queue like that? as in, the "card art by" one
might be 3xCredits?
this is a create card function for a booster pack. why does it not spawn the jokers with the correct sticker?
create_card = function(self, card)
return SMODS.create_card({set = "Food", area = G.pack_cards, skip_materialize = true, key_append = "does rng seeding matter that much?", stickers = {'para_negativesticker'}, edition = 'e_negative'})
end,
does anyone know how I could import custom sound effects and refer to them in my code?
Would much prefer it was custom text instead of predefined, but it's fine
Does anyone know why the tags don't dissolve after it granted me the effect?
check SMODS.Sound
how would you check that context.other_card is equal to the card currently calculating? i'm doing an enhancement that creates consumables based on chance, but using context.main_scoring is just giving them right away when played rather than adding them after scoring
how do i check if a full hand contains suit of hearts?
im gonna need sound effects
gahh can anyone tell me if theres a way to render a joker on top of my joker
as in, you want to know whether there exists a played card (including nonscoring ones) which is a heart?
i've added a few changes for now but i'm testing the joker on checkered deck and spades still proc the +20
trying to have a check for each card for if they are a heart, and keeping a local variable as true until a non heart suit iss hit
this just checks whether the final played card is a heart
you have to remove the all_hearts = true part
NOOOO YOURE SUPPOSED TO BE BEATEN
The fuck you Boss Blinds:
how do i check all of them?
i'm referncing the code for lusty joker to do checks
remove the all_hearts = true line
hey does anyone know how I can register my own sound effects folder in my code, so that the game will pull from that folder instead of the default resources folder?
i did that
what do i do in place of it
nothing
also, it won't work anyways
all_hearts is a local variable that goes away as soon as calculate is finished
and comes back as true when calculate is called again
ok i see
so instead you'll need to check the whole hand in joker_main
i tried to look at any documentation for checking the whole hand but couldn't find anything
no jokers in base balatro check for a whole hand of a suit iirc so i didn't have anything proper to go off of
if context.joker_main then
local all_hearts = true
for _, v in ipairs(context.scoring_hand) do
if not v:is_suit(card.ability.extra.suit) then
all_hearts = false
end
end
if all_hearts then
-- scoring goes here
end
end
if this is wrong, check blackboard
should i change this as well? loc vars for suit
i changed it from regular to plural
idk enough about localize for that lmao
that's ok
For vards I would set it up like you did the first variable in localize give me a sec
Set loc vars like this
And but the vars in config
For ur localization file it should look sum like this I’ll show same joker localization
j_mills_jimbo_gump = {
name = "Jimbo Gump",
text = {
"This Joker gains {X:mult,C:white}X#1#{} Mult for every scoring enhanced card",
"Total: {X:mult,C:white}X#2#{} Mult"
}
},
That’s how localized looks
i have everything set up but now it crashes and says the error occurs at line 575
Idk really how to use that localized I wouldn’t
Undertale
You're also using center where card should be instead.
Toga clutch like always?
trying to check for a flush of hearts but when the round finishes, the game crashes at line 575 somehow
does anyone know what could be causing this issue
Show line 575?
card.ability.extra.mult, not center.ability.extra.mult.
Something funky is happening now
oh i completely missed this
sorryy
seems like the 1 in 3 chance is happening whenever the mechanoid is triggered?
at 575?
Yes.
Alright got it
I guess so, but I need that to not happen, somehow
what's the code you got for the destroy function currently?
I've tried the and not context.selling_card but doesn't work
It works now yayyy : D
if not context.other_context.selling_card?
why not just change the context to end of round or joker_main?
the mechanoid's already triggering every time so it's not like there's any reason to not have the context for the destroy function be the same time context
this one seems to work
does anyone know how to proplerly set up an SMODS.Sound class?
I read through that already, I still can't seem to get it working
SMODS.Sound{
key = "string",
path = "stringtolocationinpath"
}
https://github.com/TheOneGoofAli/TOGAPackBalatro/blob/4256e14066eae0e896d88e09180c73b0b69f67c2/togastuff.lua#L28
https://github.com/TheOneGoofAli/TOGAPackBalatro/tree/main/assets/sounds
Perhaps an "example" will suffice?
that's what I have, double checked the spelling and file location, still doesn't work
For sounds too, gotta add mod prefix as part of string.
So, the defined win95start would be called by toga_win95start, where toga is my prefix.
does it have to be the full file path, or is it just the file name and extension?
Path relative to assets/sounds folder.
So if you have assets/sounds/otherfolder/fart.ogg, path is otherfolder/fart.ogg.
so this should work?
Should, yes. Whenever you're calling your sound, be it in return { sound = '...' } or in play_sound('...'), don't forget your mod prefix.
No.
how can I make/find that then?
Do you use a header or a JSON?
header
It should say PREFIX somewhere at the top?
never made a prefix ig lol ¯_(ツ)_/¯
It will default to the first 4 letters of your mod ID, lowercase, if not defined.
cool, I just defined a prefix in my header so I'll see if that works
There is a good chance adding the prefix at this point will break many things
Good luck soldier
let's hope that isn't the case lmao
What's your mod ID currently?
just droljokers, so I'd assume it would default to drol
drol, yes.
Convenient
yeah, if the prefix breaks things it wouldn't be that big of an issue
You'd just have to readjust things from drol to whatever you put there.
And drol_damn & drol_newports would be the strings to use for calling your sounds.
yep, and I don't think I used my mod ID anywhere yet lol
the mod's pretty simple honestly
so far, doesn't seem to have broken anything
yep, prefix solved everything lol
thanks guys :)
👍
I forgot I made the Master's Tardis a spectral
SMODS.Joker {
key = 'source',
loc_txt = {
name = 'Source Error',
text = {
"Destroy a {C:attention}random scored card{}",
"add its {C:blue}Chips{} to this jokers",
"Mult",
"{C:inactive}(Currently {C:mult}+#1#{C:inactive} Mult)"
}
},
config = {extra = {mult = 0}},
rarity = 3,
atlas = 'kamisjokers',
pos = { x = 6, y = 1 },
cost = 6,
loc_vars = function(self, info_queue, card)
return {vars = {card.ability.extra.mult}}
end,
calculate = function(self, card, context)
local _card = pseudorandom_element(G.play.cards, pseudoseed('source'))
if context.joker_main and context.cardarea == G.jokers then
card.ability.extra.mult = card.ability.extra.mult + _card.base.nominal
return {
message = 'Upgraded!',
colour = G.C.CHIPS,
card = card,
mult = card.ability.extra.mult,
_card:start_dissolve()
}
end
if context.joker_main then
return {
mult = card.ability.extra.mult
}
end
end
}
i have a few issues with this:
- destroys the card before scoring it, which looks ugly
- i only want it to activate the first hand played, then never again that round
- (attached image) ghost cards??? the cards actually exist but they also just... dont. its like the dissolved cards arent actually removed from the deck
You'd probably want to "mark" the randomly chosen card first, then use context.destroy_card to check if said card is marked and then return { remove = true } with said context.
this is what the eval spits out when i eval it
how would i mark it?
context.other_card.marked = true... then check context.destroy_card.marked.
like this for the context.other_card.marked = true?
_card:start_dissolve() does not belong in the return anyway.
But do not forget-
if context.destroy_card and context.destroy_card.marked then
return { remove = true }
end
context.other_card does not exist here.
wha
how do i fix that
What is the goal?
the cards goal is
- destroy a played card after its scored only in first played hand
- get its chip value
- add it to the mult
if context.before then
local c = pseudorandom_element(context.scoring_hand, pseudoseed('source'))
if c then
c.marked = true
end
end
if context.destroy_card and context.destroy_card.marked and G.GAME.current_round.hands_played == 0 then
card.ability.extra.mult = card.ability.extra.mult + context.destroy_card:get_chip_bonus()
return {remove = true}
end
```?
calculate = function(self, card, context)
local _card = pseudorandom_element(G.play.cards, pseudoseed('source'))
if context.joker_main and context.cardarea == G.jokers then
card.ability.extra.mult = card.ability.extra.mult + _card.base.nominal
_card:start_dissolve()
return {
message = 'Upgraded!',
colour = G.C.CHIPS,
card = card,
mult = card.ability.extra.mult,
}
end
if context.joker_main then
return {
mult = card.ability.extra.mult
}
end
if context.before then
local c = pseudorandom_element(context.scoring_hand, pseudoseed('source'))
if c then
c.marked = true
end
end
if context.destroy_card and context.destroy_card.marked and G.GAME.current_round.hands_played == 0 then
card.ability.extra.mult = card.ability.extra.mult + context.destroy_card:get_chip_bonus()
return {remove = true}
end
end
like this?
wait
No, remove everything except joker_main and place it in above.
like this,,?
calculate = function(self, card, context)
if context.before then
local c = pseudorandom_element(context.scoring_hand, pseudoseed('source'))
if c then
c.marked = true
end
end
if context.destroy_card and context.destroy_card.marked and G.GAME.current_round.hands_played == 0 then
card.ability.extra.mult = card.ability.extra.mult + context.destroy_card:get_chip_bonus()
return {remove = true}
end
if context.joker_main and context.cardarea == G.jokers then
return {
message = 'Upgraded!',
colour = G.C.CHIPS,
card = card,
mult = card.ability.extra.mult,
}
end
if context.joker_main then
return {
mult = card.ability.extra.mult
}
end
end
No, remove the second to last if and it's contents.
hhh
calculate = function(self, card, context)
if context.before then
local c = pseudorandom_element(context.scoring_hand, pseudoseed('source'))
if c then
c.marked = true
end
end
if context.destroy_card and context.destroy_card.marked and G.GAME.current_round.hands_played == 0 then
card.ability.extra.mult = card.ability.extra.mult + context.destroy_card:get_chip_bonus()
return {remove = true}
end
if context.joker_main and context.cardarea == G.jokers then
return {
message = 'Upgraded!',
colour = G.C.CHIPS,
card = card,
mult = card.ability.extra.mult,
}
end
end
ok so like this
I said the second to last not the last.
wouldnt it not play the upgraded message then tho?
return {remove = true, message = localize('k_upgrade_ex')}
ah ok
yayy it works noww :3 ty
last question, how would i make the card shake until its used? like dna
local eval = function() return G.GAME.current_round.hands_played == 0 end
juice_card_until(self, eval, true)
calculate = function(self, card, context)
local eval = function() return G.GAME.current_round.hands_played == 0 end
juice_card_until(self, eval, true)
if context.before then
local c = pseudorandom_element(context.scoring_hand, pseudoseed('source'))
if c then
c.marked = true
end
end
if context.destroy_card and context.destroy_card.marked and G.GAME.current_round.hands_played == 0 then
card.ability.extra.mult = card.ability.extra.mult + context.destroy_card:get_chip_bonus()
return {
remove = true,
message = localize('k_upgrade_ex'),
}
end
if context.joker_main then
return {
mult = card.ability.extra.mult
}
end
end
like this?
this seems to crash the game
No, ```lua
if context.first_hand_drawn and not context.blueprint then
local eval = function() return G.GAME.current_round.hands_played == 0 end
juice_card_until(card, eval, true)
end
augh,
sry if im being annoying ><
calculate = function(self, card, context)
if context.first_hand_drawn and not context.blueprint then
local eval = function() return G.GAME.current_round.hands_played == 0 end
juice_card_until(card, eval, true)
end
if context.before then
local c = pseudorandom_element(context.scoring_hand, pseudoseed('source'))
if c then
c.marked = true
end
end
if context.destroy_card and context.destroy_card.marked and G.GAME.current_round.hands_played == 0 then
card.ability.extra.mult = card.ability.extra.mult + context.destroy_card:get_chip_bonus()
return {
remove = true,
message = localize('k_upgrade_ex'),
}
end
if context.joker_main then
return {
mult = card.ability.extra.mult
}
end
end
so like this?
this seems to just do nothing,
oh nvm it works now
@daring fern new weird issue
if i have 2 or more of this card in hand, they both upgrade when i destroy only 1 card when id rather only upgrade the card if it destroys 1 per
Do I have to call tag:yep() so my modded tag disappears after it does the effect I made it do
Cause rn once I skipped the blind with my modded tag it stays in the right corner
And doesn't go away lmao
They are watching me
Tags do have to be :yep()-ed or :nope()-ed, yes.
hi quick question: for some reason I cant find documentation on how to see if the played hand is specifically only high card. does any1 know a solution?
if context.scoring_name == "High Card"
Amazing function names ngl
:yep() also takes a few arguments as input, too...
G.GAME.selected_back.effect.center.key
this crashes when i try to access it
attempt to index field "effect" (a nil value)
if G.GAME and G.GAME.selected_back then G.GAME.selected_back.effect.center.key end
i need to get the deck name from this
i'm not even trying to run this function right now
it's just running anyway and crashing right now
function get_current_deck_fallback()
if Galdur and Galdur.config.use and Galdur.run_setup.choices.deck then
return Galdur.run_setup.choices.deck.effect.center.key
elseif G.GAME.viewed_back and G.GAME.viewed_back.effect then
return G.GAME.viewed_back.effect.center.key
elseif G.GAME.selected_back and G.GAME.selected_back.effect then
return G.GAME.selected_back.effect.center.key
end
return "b_red"
end
i don't know
i based it on the cardsleeves function for getting it
also it needs to support galdur apparently
I figured it'd be a good idea to make it support galdur
otherwise all of my deck related things break
it just crashes anyway
and i am very confused
Is it crashing on the G.GAME.viewed_back elseif?
it's crashing on return G.GAME.viewed_back.effect.center.key
Is there any other way to inrease game speed except of G.SPEEDFACTOR?
Because value > 8 crashed when opening boosters

starting to think this isn't the fault of my function
...wack.
it seems to update only after you beat a blind
i beat a blind and it started working??
this all happens after exiting and re entering a run
if you change a config for example ithe card wont update after restart
hi again: does any 1 know howto cdheck the origin of a consumable?
except it's not happening anymore
seemed to be a one time thing for that run?
i'm very confused
yeah it just
fixed itself
cool i guess
when you say origin do you mean which mod it came from
or where you got it from
no: this:
G.E_MANAGER:add_event(Event({
func = (function()
SMODS.add_card {
set = 'Spectral',
key_append = 'rj_enigma' -- Optional, useful for checking the source of the creation in `in_pool`.
}
G.GAME.consumeable_buffer = 0
return true
end)
}))
oh bruh
lmao
oh THAT'S WHAT KEY APPEND IS FOR
Alternatively, check for .config.center.mod.id or .config.center.original_mod.id of any given card.
well nope
Yo, this is currently broken with blueprint as they're both ramping the number of repitions. Can someone gimme a hand with that
if context.repetition and context.cardarea == G.play then
card.ability.extra.repititionsa = card.ability.extra.repititionsa + 1
return {
message = 'Again!',
repetitions = card.ability.extra.repititionsa,
card = context.other_card
}
end
if context.after then
card.ability.extra.repititionsa = 0
end
end
-- Currently Broken With Blueprint, I Assume It's Because each repetition stacks
guys, anyone know how to add the card spin when adding enhancement?
add a "not context.blueprint"
card:flip()
That just stops blueprint from working
i mean in the scaling part
What is the goal?
wait and the money is set where then?
nvm
wtf did i say
where do i set the money
lemme look in the source
You mean change the blind reward?
no just the player's mone
i wanna set it to 0
but i forgot :lmfao:
ease_dollars(-G.GAME.dollars)
yea also just found out
She retriggers cards once per each card scored before it, right now shes retriggering cards a number of times equal to there position
yippe hi again: it crashes when i call DT_win_blind
No, I was showing you how to do it, that was from DebugPlus
oh shit
So it's retriggering 1 too many times?
how do i do that then 😭
Yeah. Blueprint is doing it correctly with this code
if context.repetition and context.cardarea == G.play then
if not context.blueprint then
card.ability.extra.repititionsa = card.ability.extra.repititionsa + 1
end
return {
message = 'Again!',
repetitions = card.ability.extra.repititionsa,
card = context.other_card
}
end
if context.after then
card.ability.extra.repititionsa = 0
end
end```
sorry if i sound dumb, but what I'm doing is to win the blind when the joker is sold.
You do ```lua
if context.selling_self then
-- the code I showed
end
is it possible to force a certain card to be drawn at the first hand of the round?
Yes.
hey I'm so sorry to gother again, but how do I get the amount of jokers to the right of the triggered joker?
any ideas why the joker is invisible in game?
to clarify it doesn't show up it is not 'invisible joker'
did you add the joker?
like
did you see it in your collection
or isn't it there
yeah it's there
with texture?
like you have an empty collection tab
go onto the mods tab, click your mod and go to "additions"
is it there
What does the 2x look like?
'
i want to know the amount of jokers there are to the right of the "triggered" joker
yeah
What joker is the "triggered" joker?
very empty rn so should be pretty straight forward
honestly wondering if i just misspelled 'SupremeTomfoolery' somewhere lol
like
SomeJoker | TheJoker | AnotherJoker | JokeryJoker | Joker
And the triggered joker would be for ex "TheJoker" and i wanna get the amount of jokers to the right, so for ex. 3
local pos
if context.post_trigger then
for i=1, #G.jokers.cards do
if G.jokers.cards[i] == context.other_card then
pos = i
end
end
end
```?
can someone explain how invisible joker adds a line to its desc if theres a negative joker
what
hmmmm i wonder why...
yeah
I think it uses main_end
wdym
could you explain further
y is 11 lol
Yeah I see that but like
what do you mean with extra line
How on earth did I fuck up typing 0 twice I swear
It wasn’t like that before though?
interesting.. can you only add something to main end with localize?
no you can also build the ui structure yourself
what if i want to just add a line like invis joker not something like blueprint
you would make the ui structure for that
but tbh the easiest way with steamodded is to do 2 separate descriptions in your localization file and switching between them
hm
how would i do that though
hey @red flower. How do I get all jokers? #G.jokers.cards crashes
you need the amount of jokers?
loop through G.jokers.cards to increase a counter until you find your joker
like this
amount_of_jokers = function (card, mm)
local pos
local start
pos = 0
start = 0
for i=1, #G.jokers.cards do
if start == 1 then
pos = pos + 1
end
if G.jokers.cards[i] == card then
start = 1
end
end
return pos * mm
end
no
oh
for i=1, #G.jokers.cards do
if G.jokers.cards[i] == card then
return (#G.jokers.cards - i) * mm -- idk what mm is
end
end
but OOOOOOOOOOh
ok
hey do you know how i know if the current game state is the collection or in a game
like
G.jokers only exists while in the game
so it crashes in the main menu
if G.jokers then
k thanks lol
oh also the code is wrong lol
i just read that you wanted the jokers to the right let me fix
do you know how much bread you have eaten in your life
nope
what do i need to change to fix the code
edited the message
why this no workie?
self > card
i hate how half the time it's only obvious when i see the solution
hey guys, im brand new to this. what base balatro file contains the jokers? im trying to make a joker that adds a negative perkeo every time a blind is selected or a card is played. not sure where to find it, or add negative to it for that matter! this is what i have so far for doing that
thank you sm!!! would i have that in create_card()?
no, remove that line and replace it with what i wrote
thank you so much fr!! 🐐
this look okay?
if context.setting_blind then -- Triggers upon selecting a blind
SMODS.add_card{key="j_perkeo", edition='e_negative'}
end
idk why the end did that in the preview but lol
yeah
how would i make an effect trigger every time a card is played? trying to piggyback off the hiker card but im unsure what i should actually be copying from that
context.individual
https://github.com/Steamodded/smods/wiki/Calculate-Functions
you're so goated thank you
heya, question anyone could tell me how to detect consumable being destroyed, and what that consumable was?
there's no context for it and the game doesn't distinguish (directly) between used/sold/destroyed
you can make hooks for it tho but it's not as straightforward as it might seem
ahh i see, but actually thats fine in my case i dont need to tell the difference so if i can detect one of those thats good too!
i would hook Card:remove_from_deck and check if the card is a consumable
i see! thanks!

