#💻・modding-dev
1 messages · Page 135 of 1
i fixed it
some examples may be outdated
pokermod is probably a good source for examples
it has pink seal you can copy
the heck is a pokermod
pokermon
that shit has multiple files :sob;
also, () brackets and {} brackets are diffrent
NEVER look for examples in cryptid bruh I cant find shit
I also cant find like
none of the cards actual code in the regular game
ye same its kind of a mess
where are the jokers saved anyway
youd think theyd be in card.lua but no
it doesnt use smods syntax so its not a good example
how much time you guys gone insane while learning to make mods in balatro?
😭 I do not understand what in the game decides to stop drawing cards and switches to G.STATES.SELECTING_HAND in the update_draw_to_hand, can someone assist me in finding where the check for ending the hand drawing happens?
like 100hours
or something
maybe less
i always have balatro open when coding, so it counts as playtime
enough times lol
Maybe
What do you want to know Firch
description is the only thing broken
WHY is it broken
it works on jokers, consumables, vouchers like this but not seals?!
did you check pokermon seal
i couldnt find it
wow
I want to know where the condition is for stopping drawing card process - I extended the G.FUNCS.draw_from_deck_to_hand function but I realized it happens after the actual hand is drawn, and maybe I need an injection instead, but not sure where
i am very stupid, i know
but someone makeing 20 files for diffrent things makes difficult
their seals.lua has only functions of the seal
nothing about description and shit
I have a patch for introducing a new context after a hand is drawn
And also a patch to include extra draws
I mean its in a folder called Seals
I draw additional cards based on some condition, those supposed to go beyond the normal card limit but still should happen before the context for round start happens
its not
that doesnt even have SMOD.
but I forgot it uses localization which youre not using so its not of help
I have some Jokers that draw cards at the beginning of the round
Does it work well with the jokers that supposed to do things after cards are drawn (for ex. Certificate?)
And go over the limit
That particular patch is old and I haven’t ported it yet. But I don’t see how Certificate would do anything different since it just creates a new card in hand
And I think it’s the only Joker with its context
could I take a look at it?
i am going insaneeee~
i didnt use description anywhere in my jokers or anythin
Which one?
yeah, but I face another problem where I still able to select freshly drawn cards but I want to hinder that for a moment
extra draws? or both tbh
How so?
I don't understand the issue exactly
you probably use another file for localization
i dont
nope
example for my most recent joker
weird
well i will delete description part and see what happens
This adds a new context after draws
[manifest]
version = "1.0.0"
dump_lua = true
priority = 0
# After Draw Context
[[patches]]
[patches.regex]
target = "game.lua"
pattern = 'first_hand_drawn = true}\)\n(.*)end\n(.*)end'
position = "after"
payload = '''
if not (G.GAME.current_round.hands_played == 0 and
G.GAME.current_round.discards_used == 0) then
for i = 1, #G.jokers.cards do
G.jokers.cards[i]:calculate_joker({vic_hand_drawn = true, vic_facing_blind = G.GAME.facing_blind})
end
end
'''
match_indent = true
it worked, thanks man
And this should handle the extra draws
[[patches]]
[patches.pattern]
target = "functions/state_events.lua"
pattern = "local hand_space = e or math.min(#G.deck.cards, G.hand.config.card_limit - #G.hand.cards)"
position = "after"
payload = '''
hand_space = hand_space + (G.GAME.BuySellPack.extra_draw or 0)
G.GAME.BuySellPack.extra_draw = 0
'''
match_indent = true
overwrite = false
The way I add new drawn cards shouldn't allow their selection (or selection of any other card) while they're still in the process of drawing to the hand, but tweaking that would also require tweaking the timing to this
ty!
I also have some effects that force draws
So they just create an Event to draw a card
I suggest you use it, it puts text in one place
oke, now i need the deck as last thing...
its not a big mod...
3 jokers
8 consumables
2 vouchers
1 pack
1 seal
1 deck
@night pagoda here's a Joker that draws a 3
calculate = function(self, card, context)
if context.first_hand_drawn and #G.deck.cards > 0 then
G.E_MANAGER:add_event(Event({
trigger = 'before',
func = function()
local _cards = {}
for i = 1, #G.deck.cards do
local _card = G.deck.cards[i]
if _card:get_id() == 3 and not _card.ability.vic_drawing then
_cards[#_cards + 1] = _card
end
end
if #_cards > 0 then
local _card = pseudorandom_element(_cards, pseudoseed("j_vic_tour_guide"))
_card.ability.vic_drawing = true
card_eval_status_text(context.blueprint_card or card, 'extra', nil, nil, nil, {
message = 'tour guide',
colour = G.C.PURPLE,
instant = true
})
-- if _card and not _card.removed and _card.area == G.deck then
draw_card(G.deck, G.hand, nil, 'up', true, _card)
-- end
G.E_MANAGER:add_event(Event({
trigger = 'before',
delay = 0.1,
func = function()
_card.ability.vic_drawing = nil
return true
end
}))
end
return true
end
}))
end
end
blind atlas needs atlas_table = 'ANIMATION_ATLAS'
i mean mine neither but i guess its just a preference
thank you
i am so stupid
it didn't cross my mind at all that that is the case
even tho i have seen it before
is there a context a joker can run to constantly be aware of its own value, like Stencil being aware of how many jokers there are?
ahhh
but why
if you need information you can just compute it when you need it
rather than every frame
true but it's nice to have that information
it's basically going to be the reverse function of a stencil, building Xmult as there are more jokers
now, how do i add vouchers to the deck? i got the base from example
and also +1 consumable slot
4 more runes to go!!!!
how the heck you made a crash with hovering?
h o w
do you have a blind size maybe
Question: Is there an easy way to get least frequent rank in the deck? Or do I have to loop through the entire deck and keep track of it myself?
this one?
yeah probably
i think it's a rookie mistake of mine
i wrote score instead of mult
silly me
Oop
Same error code?
whats even happening at ui.lua line 698
I haven’t done anything with blinds yet but my guess is it would have to do with the min/max?
Wha
should be fixed
How did you manage that lmao
boss colour should be HEX('??????')
what to do here so deck has 2 vouchers and 1 additional consumable slot?
Huge
Magic Deck adds another consumeable slot so I’d check that out. As for a second Voucher slot, I’m not sure
cards going along well
bro couldn't handle it
no, not voucher slots
vouchers as the modded ones i added
these 2 lines are so old 😭
this was before the wiki was good
when the wiki had like 10 pages total
I would once again say to reference Magic Deck since it adds a consumeable slot AND starts you off with a voucher
isnt vanilla deck and modded deck codes very diffrent tho?
maybe an add_to_deck
I’m unsure, haven’t done much with decks yet lol
I’m just going based off what I currently know
also i want add consumable slot without the voucher
wtf omori ?!
G.GAME.starting_params.consumable_slots = 3 maybe
alrighty, so now the vouchers left
hello! i wanted to ask, is there a way to quickly obtain a joker for testing and debugging purposes? id like to give myself a joker i made so i can begin testing it!
thank you!
🤮
press 3 on something in the collection to spawn it
Anyone know a quick way to run a check for AFTER a hand is played? - I mean after the score and everything is evaluated and done I want something to happen the moment after all of that
contexts probably
on a joker?
anyone know where I can find a list of all context calls?
SIX
FIT
FITS
thats all i can think of lmao
also on what line of code?
how do i make it so that you immediately win 😭
you cant lmao
Ok cheers, yes it is a joker I want to activate at this point
like in the thingy
The Blindle 😭
the function? it doesnt make it work there with consumable slot
just make it say the word or something
ok idk then
unless i done it wrong
i was just guessing
wheres the page about the deck on steammodded github?
?
give me link to that
the functions are at the bottom
- "Saved by Mr. Bones"
gee thanks mr bones
lookin snazzy
oke, so what i can put in back.apply exacly?
op... kinda
how the fuck-
anyone think this is too strong or too weak?
dont know
but its very intresting i tell you that
i guess its depending when you obtain it
at round 1? broken
how much does it cost initially?
YES
Cost or sell cost?
i havent set it yet but im thinking about 10-12 dollars
massive w
make it always rental 
guys, how do i exacly structure Back.apply(self, back)?
ah yes, reward positive zero
imagine getting money
though, it is bad when 0 money while blind chips requirment is almost 2x
it looks like the blind size and reward money is random
random as in random or random as in doesnt make sense?
random as in random or random
random as in random
funny
not sure how you'd do that though
i have no idea if this is currect
without the "back"?
yea
i made the blind chips mult like that because the original idea was 1 in 6 chance for you to die on selling joker but i couldnt do that so yeah
the money tho, i just hate being nice or even sub par
may just make it remove the money
_>
seal deck!!
true...
also, this worked, the function was invalid there earlier
3 more runes! 3 more runes!
10% of sell value is pretty good
vouchers left
would be a nice card to hang on to
Is there a way to make packs unskippable?
would Chicot do the same?
no
well, not without rewritting whole codeing stuff
ah
also hi rolo, you know the code for vouchers when run starts with my deck?
I dont have any experience with Vouchers yet
probably
add_to_deck?
isnt that for cards?
i think you should be allowed to do the 2x thing actually
its like for everything?
too slow for Chicot
try equipping multiple Chicots
config?
other than pressing 3 with debugplus?
config = { vouchers = { thigs? }},
rerolling 😭
rip...
anyway
i have no clue what the fuck i am doing
maybe dont quote me
add that before your apply, and add the voucher keys in tighs
it's an ortalab deck that does the start with voucher thing
Yes
"tighs"
lmaooo
i think i fucked up something
loc_vars = function(self, info_queue, card)
return {vars = {localize({type = 'name_text', set = 'Voucher', key = self.config.vouchers[1]}), localize({type = 'name_text', set = 'Voucher', key = self.config.vouchers[2]})
end,
apply = function(self, back)
G.GAME.starting_params.consumable_slots = 3,
end,```
does anyone know how to get the rank of a playing card, perchance
big
Aces are 14
what is your loc_txt?
actually you should use card:get_id() that was just the direct way
try removing loc_vars
why?
you have no vars
no #1#
and also you probably dont have a en_us, so localization function probably doesnt work
its to apply vouchers, not get em in description
@wintry solar you lied to meeeee
you might have copied to much
you were only supposed to copy the config section
not the loc_vars
How do I give cards that are scored a random enhancement?
well, now that i did, it still crases
what is the crash?
SMODS.Back{
name = "Potion Deck",
key = "potiondeck",
atlas = "PotionUP",
pos = {x = 3, y = 2},
loc_txt = {
name = "Potion Deck",
text ={
"Start the run with",
"{C:attention}Potion Merchant{} and",
"{C:attention}Potion Crafter{} vouchers.",
"+1 {C:purple}consumable{} slot",
},
},
config = {vouchers = {'v_potionup_potmerch', 'v_potionup_potcraft'}},
apply = function(self, back)
G.GAME.starting_params.consumable_slots = 3,
end,
}
ah, oke
thanks
yep, now it works
🟩 deck
🟨 consumables
🟨 jokers
🟨 vouchers
🟨 seal
got 5 to make, and it be finished
hm?
pirate
why pirate
it be finished
is there an easy way to make your enhanced card be able to enhance other played cards?
i am confused
Is there a way to make a joker unobtainable without outright disabling it?
in_pool?
got it
Legendary jokers done its job well
basically it has a chance to convert other playing cards into the same enhancement
its a virus!
yeah like a virus
but from what ive trawled through the games source code i cant see a way i could do it with a custom enhancement
big
thanks
well, ofc not from source code because they dont have it in vanilla
Anyone know the code that gives a card a random enchant when scored?
more i meant i cant reverse engineer it from midas mask because it uses a specified type of m_gold when it does the conversion
now i wonder how will i make all the stuff work
but i guess thats for tommorow
calculate function?
you talking to kazaxc, right?
yes
it will be in the calc function but whats the method of adding an enhancement to a card when its not a base one already in the game
:set_ability iirc
card:set_ability(G.P_CENTERS.m_prefix_key)
oh can i just use the key set in it thanks
@violet void Sent you a friend req to DM you the script
Question: Is there an easy way to get the least frequent rank in the deck? Or do I have to loop through the entire deck and keep track of it myself?
why?
you can make a thread here
those look great
is there a way to give a card a random enchant without making a whole new function?
worst legendary
imagine getting chicot and not paying attwntion to the blind boss
Because you're the only person who needs it?
:(
Hold on, I wanna try that puzzle blind out
unfinished
I had forgotten what it was about, mb
could you resend the request
-# if you still want to
What in the hell
That's probably a good idea
if you want it to just skip the blind, you could take a look at the debug(plus?) implementation of "Win Blind", but I will say that having to score normally makes more sense lol
Is there a way to make two soul_pos on a Joker to have two things floating differently on the card?
Hi,
i've a little problem, i know its seem easy to resolve but i dont find the answer on the discord and i try a lot of thing but variable still show nil, can u help me to resolve it 
thanks in advance
The X in '#X1#' should not be in the #'s. The correct code would be 'X#1#'
thanks but does the same already tried 
You also do not have a loc_vars
the #1# refers to the first variable in your loc_vars return
so that must be missing
it does happen
Is it still not possible to inject into steamodded?
yahoo
I didn't know that was planned but is def something I needed lol
I’m sorry if I’m being annoying with this but I have not gotten an answer 
i am going to have to make a ui now
it's unavoidable
huh
time to nerf chicot
adding a boss blind that benefits you
at least in some way
heavier base requirement but helps in some way
Hey, I know this is probably asked a lot, but I got inspired by a friend to try modding Balatro, and I was wondering if there were any resources, programs to look at, or places to start? Pitfalls to avoid? I'm still google searching, but I figured to ask the people with experience.
This channel and the SMODS wiki will be your greatest resources
is smods "steammodded"?
just making sure
I have programming experience, but I haven't modded before
Hey, quick question - would it be fine for me to reimplement the entire game (or, well, just scoring and progression mechanics) in a different language without a cleanroom approach? Cryptid hands usually take eons to score, so I was gonna try to use a different approach to score calculation to speed that up
oops, my bad, typo
u fine 👍
im trying to learn patches and im looking at this patch but theres no such pattern in card.lua anywhere
May I ask here for help for my game crashing/not loading on startup?
if it has something to do with mod development then you can ask.
Its about mod use. I thought I might get better results here since modders tend to understand the game and its logs
I posted on #⚙・modding-general , but I fear it will get drowned out by other messages
the crash logs usually dont say which mod is having the crash, but my bet is on talisman
put mods into a disabled folder and test which one exactly is causing the crash
Are you looking at source or lovely dump?
i couldnt find card.lua in lovely dump, but i may be doing something wrong with that
It should definitely be there. If you have your file explorer open to the dump folder when you run the game you'll have to refresh it to see the updated files
i was looking in the wrong lovely folder lol
thank you...!
np!
i have a joker that gains some sell cost from selling cards, and gains some of its current sell cost at the end of the round. everything seemed to be working fine until i tried it out with giftcard and it reset its value for some reason. Dunno if i did the sell cost changing wrong or what. Heres the code
SMODS.Joker {
key = "banker",
loc_txt = {
name = "Bank Account",
text = {
"{C:attention}#1#%{} of money gained from selling cards",
"gets added to this joker's sell value.",
"At the end of round, this joker's gains",
"{C:attention}#2#%{} of its sell value"
}
},
config = { extra = { cut = 25, interest = 10 } },
loc_vars = function(self, info_queue, card)
return { vars = { card.ability.extra.cut, card.ability.extra.interest }}
end,
rarity = 3,
atlas = "Jokers",
pos = { x = 3, y = 2 },
blueprint_compat = false,
calculate = function(self, card, context)
if context.selling_card and not context.selling_self then
local cut = math.floor(context.card.sell_cost * (card.ability.extra.cut / 100))
ease_dollars(-cut)
card.sell_cost = card.sell_cost + cut
if cut > 0 then
return {
message = "$"..cut,
colour = G.C.GOLD
}
else
return
end
end
if context.end_of_round and not context.repetition and context.game_over == false then
local ntrst = math.floor(card.sell_cost * (card.ability.extra.interest / 100))
card.sell_cost = card.sell_cost + ntrst
if ntrst > 0 then
return {
message = "$"..ntrst,
colour = G.C.GOLD
}
else
return
end
end
end
}
It was Bunco
bunco is pretty old and has bad compatibility with other mods afaik
anyone know why this X chips is returning ERROR , the actual effect works but the graphic says error
if context.joker_main then
return {
message = localize({ type = "variable", key = "a_xchips", vars = { card.ability.extra.x_chips } }),
Xchip_mod = card.ability.extra.x_chips,
colour = G.C.CHIPS,
}
end
Hi everyone, I've made a Balatro mod that adds a joker which gives +chips, +mult and Xmult.
Everything works as intended, but I can't really make it output these three messages (+chips, +mult and Xmult) in a row, I only was able to output either 1 out of these 3 or all of them at the same time (at the cost of this joker somehow deleting the cards after they score), but that's not really what I wanted. I wonder if it's possible to output multiple messages in a row. I'm new to Lua and modding, and I'm sorry if the answer is obvious or have already been answered before somewhere else.
So I'm trying to make a card always negative. If I do
add_to_deck = function(self, card, from_debuff)
card:set_edition({negative = true}, true)
it will give an extra joker slot. Is there a way to make it ALWAYS negative, so already in the shop/collection. Alternatively, how do I give it negative without adding a jokers lot. I was thinking, create a copy, make that negative and add it to the jokers, but not sure how to do that.
I don't think that x chips is present in the v_dictionary, probably should use one of those found in en-us.lua
well its alongside Talisman, thats how Cryptid does it
didn't know that, sorry
is there a more efficient way to check what ranks are in the player's deck than iterating over the whole thing and keeping track?
which one looks better?
i think the second one looks better but the of centerness of it looks weird
its 1 pixel to the left more 😭
i mean this part
if you have to do this many times, i guess it would be more efficient to count on run start and keep track of any changes as they happen, but it shouldn't be a big deal unless you'd be doing this every frame?
no id only be doing it at end of round, was just wondering if there was a better method
if not i can just do the iteration
just do the iteration then, it's not that expensive
ok, thank you 👍
If with BetterCalc... might as well do just
return {
x_chips = card.ability.extra.x_chips
}
i'm trying to make a joker that clones itself and adds itself to the joker area, but this code
a) does not make the joker i want, just makes a random joker every time and
b) spawns the joker in the middle of the screen but not actually in the joker area
local clone = create_card("Joker", G.jokers, nil, nil, false, nil, card.key, false)
can someone give me a hand?
oh thats just the background, it can be darker
whys it off center looking in the first place?
why not have the right side match the left side. or remove that part?
is it necesarry for displaying information about the card?
its meant to be a gem slot being fused into a card 
create_card on its own doesn't add the card to any area
also you're not getting the key correctly. this should work [this doesn't need the area because it'll default to jokers]
SMODS.add_card({ key = card.config.center_key })
note that this won't carry over config values, you need to use copy_card if you want that
i see what its supposed to be now, might need some refinement? to make that clearer
in which case this is what you need
local copy = copy_card(card)
copy:add_to_deck()
G.jokers:emplace(copy)
ok so it's add_to_deck() i need instead of merely create_card()
add_card does everything for you, including add_to_deck and emplace
emplace is the more important part here, add_to_deck just evaluates on-add effects
i should have been more careful with my wording- the joker doesn't exactly "copy" itself, just makes another version of itself
so it disregards enhancements
(except for negative but i'll cross that bridge when i get to it)
maybe a better outline?
maybe this, or maybe put some card details near the top right, if the gem doesnt override those details on the sprite
figured it out, for wahtever reason the xchip effect code is in talisman but the a_xchips is defined in cryptid localization file
thats what i was thinking, thanks!
the gem doesn't override anything since it's on the bottom left btw
just realized the botton left of the cards are blank whoops
register your sound using SMODS.Sound and then put sound = 'key' in your return table
where it says key
i see
i feel as if somethings missing
is it just two lines of code or is there something else?
You have to put your mods prefix before the sounds key like I did with imaginary
oh yea ofc
for joker or for sound? cuz im applying this to a joker
eh, i'll give both
what smods version are you on?
v1 alpha 1311a
and it does xmult and xchips?
yea
what messages do you want to display?
just an X1.5 in purple with the typical xmult sound being replaced by "doubletime1"
yea, but they both work at the same time, giving xmult and xchips together
its not one after another
so just like- 1 message
return {
xmult = card.ability.extra.Xmult,
chips = 0.5 * hand_chips,
message = localize{type = 'variable', key = 'a_xmult', vars = {card.ability.extra.Xmult}},
sound = 'abefun_doubletime1',
colour = G.C.PURPLE,
remove_default_message = true
}```
try this
aight, ima give that a whirl
i've encountered the funniest way for a joker effect to not work i think i'll see for awhile
cards being destroyed but still being referenced when cards are drawn
aand it works
thanks man
no problem
god i had this problem yesterday it was so annoying
did you manage to find a solution?
it was a blind, not a joker
hmm
how are you destroying your cards
this, after adding scored cards to an array
runs through the array and deletes each
you should be using the destroying cards context
it'll handle everything for you cleanly
my fix is not pretty
it replaces the relevant G.FUNCS.draw_from_play_to_discard() with: a loop to check for destroyed cards and calling the respective card:remove(), and if cards were destroyed wrap the G.FUNCS.draw_from_play_to_discard() in an event
think i'm missing something. you mean to replace the context here with destroying_cards i imagine?
i'm still figuring out the order of the contexts
this is a joker, right?
yes
this is your context, it'll run on each card in the scoring hand
im trying to set a cards ability while keeping its visual as a base card. this code works for unscored cards, but not scored ones. im guessing i need to patch something but im not sure whats setting the scored cards to the proper visual
Gonna ask this one again lol
you could keep track of it whenever cards change, but it's not any better or easier than just iterating through the deck when you need it
So iterating is the way to go, got it. That basically all I wanted to know
finished
new seal just dropped
Hi. How would I make a sticker that forces a Joker's sell value to always be $0? I have:
if not context.blueprint and context.game_over == false then
card.sell_cost = 0
end
in calculate, but it doesn't work.
That seal is amazing good lord how did you do it
lovely.toml
[manifest]
version = "1.0.0"
dump_lua = true
priority = 0
[[patches]]
[patches.pattern]
target = "card.lua"
pattern = "G.shared_seals[self.seal]:draw_shader('dissolve', nil, nil, nil, self.children.center)"
position = "after"
payload = '''
local scale_mod = 0.07 + 0.02*math.sin(1.8*G.TIMERS.REAL) + 0.00*math.sin((G.TIMERS.REAL - math.floor(G.TIMERS.REAL))*math.pi*14)*(1 - (G.TIMERS.REAL - math.floor(G.TIMERS.REAL)))^3
local rotate_mod = 0.05*math.sin(1.219*G.TIMERS.REAL) + 0.00*math.sin((G.TIMERS.REAL)*math.pi*5)*(1 - (G.TIMERS.REAL - math.floor(G.TIMERS.REAL)))^2
if self.seal == 'btp_mechanical_seal' then
self.children.center:draw_shader('hologram', nil, self.ARGS.send_to_shader, nil, self.children.center, 0, 0)
G.shared_seals[self.seal]:draw_shader('hologram', nil, self.ARGS.send_to_shader, nil, self.children.center, -1*scale_mod, 80*rotate_mod)
G.shared_seals[self.seal]:draw_shader('foil', nil, self.ARGS.send_to_shader, nil, self.children.center, 1*scale_mod, 10*rotate_mod)
G.shared_seals[self.seal]:draw_shader('hologram', nil, self.ARGS.send_to_shader, nil, self.children.center, 1*scale_mod, 40*rotate_mod)
G.shared_seals[self.seal]:draw_shader('foil', nil, self.ARGS.send_to_shader, nil, self.children.center, 2*scale_mod, 10*rotate_mod)
G.shared_seals[self.seal]:draw_shader('hologram', nil, self.ARGS.send_to_shader, nil, self.children.center, 2*scale_mod, 20*rotate_mod)
G.shared_seals[self.seal]:draw_shader('foil', nil, self.ARGS.send_to_shader, nil, self.children.center, 2*scale_mod, 10*rotate_mod)
G.shared_seals[self.seal]:draw_shader('hologram', nil, self.ARGS.send_to_shader, nil, self.children.center, 3*scale_mod, 10*rotate_mod)
end
'''
match_indent = true
Good lord
seals.lua
name = "mechanical_seal",
key = "mechanical_seal",
badge_colour = HEX("378065"),
atlas = "seals",
pos = { x = 0, y = 0 },
calculate = function(self, card, context)
if context.before and context.cardarea == G.play then
local destroyed_card = pseudorandom_element(G.hand.cards, pseudoseed('mechanical_seal'))
local played_card = card
G.E_MANAGER:add_event(Event({
trigger = 'after',
delay = 0.2,
func = function()
copy_card(played_card, destroyed_card)
return true
end
}))
local affected_cards = { destroyed_card, played_card }
for i = 1, #affected_cards do
local percent = 0.85 + (i - 0.999) / (#affected_cards - 0.998) * 0.3
G.E_MANAGER:add_event(Event({
trigger = 'after',
delay = 0.2,
func = function()
affected_cards[i]:flip(); play_sound('tarot2', percent, 0.6); affected_cards[i]:juice_up(0.3,
0.3); return true
end
}))
end
delay(0.5)
for i = 1, #affected_cards do
G.E_MANAGER:add_event(Event({
trigger = 'after',
delay = 0.1,
func = function()
affected_cards[i]:flip(); return true
end
}))
end
end
end,
}
return {
name = "Seals",
list = { mechanical_seal }
}
Cheers mate I'll decipher it later
then in main:
...
if mod_config.seals then
--Load seals
local pseals = NFS.getDirectoryItems(mod_dir .. "seals")
for _, file in ipairs(pseals) do
sendDebugMessage("The file is: " .. file)
local seal, load_error = SMODS.load_file("seals/" .. file)
if load_error then
sendDebugMessage("The error is: " .. load_error)
else
local curr_seal = seal()
if curr_seal.init then curr_seal:init() end
for i, item in ipairs(curr_seal.list) do
SMODS.Seal(item)
end
end
end
end
...
on the line where it writes the voucher shader to the gold seal, I'm injecting multiple layered hologram and foil shaders
Can this be adapted to be made into stickers instead of seals?
yeah 100%
Siiiiiiick
Looking through it all, man this isn't the traditional SMODS.Seal definition that I'm more used to and from the wiki
I never used local and return at the end, I just directly use SMODS.xxxxx
Never seen mod_config before nor NFS
How did you figure this all out lmao
Yeah, I haven't read the wiki
as someone who does the same i learned from other mods lol
like pokermon
the stuff in main is just a fancy way of loading things in by files rather than directly using smods, which allows for better file management
I see
I wonder, could SMODS.Seal:draw work for this?
I think it skips over the default seal drawing.
The idea was to use Seal:draw, but I don't know what's required for it to work as intended
Oh hey stickers got draw_shaders as well
Any sprite has draw_shader()
Could I lovely patch another mod?
Probably just via copy-pasting the code in the lovely injection and adding G.shared_seals[self.seal].role.draw_major = self, after all that's basically what the code you showed is effectively doing when adding itself after the highlighted line.
I plan on drawing shapes on cards like this, sort of like an indicator sticker for a boss blind's custom mechanics
no its not squid games
But where do you even start understanding shader math
I can get it working, but it is now independent of the card
Does it still need an atlas even though it's purely shader, unless you're shading a gear sprite from the atlas
...
draw = function(self, card, layer)
local scale_mod = 0.07 + 0.02*math.sin(1.8*G.TIMERS.REAL) + 0.00*math.sin((G.TIMERS.REAL - math.floor(G.TIMERS.REAL))*math.pi*14)*(1 - (G.TIMERS.REAL - math.floor(G.TIMERS.REAL)))^3
local rotate_mod = 0.05*math.sin(1.219*G.TIMERS.REAL) + 0.00*math.sin((G.TIMERS.REAL)*math.pi*5)*(1 - (G.TIMERS.REAL - math.floor(G.TIMERS.REAL)))^2
if card.seal and card.seal == 'btp_mechanical_seal' then
G.shared_seals[card.seal]:draw_shader('dissolve', nil, nil, nil, card.children.center)
card.children.center:draw_shader('hologram', nil, card.ARGS.send_to_shader, nil, card.children.center, 0, 0)
G.shared_seals[card.seal]:draw_shader('hologram', nil, card.ARGS.send_to_shader, nil, card.children.center, -1*scale_mod, 80*rotate_mod)
G.shared_seals[card.seal]:draw_shader('foil', nil, card.ARGS.send_to_shader, nil, card.children.center, 1*scale_mod, 10*rotate_mod)
G.shared_seals[card.seal]:draw_shader('hologram', nil, card.ARGS.send_to_shader, nil, card.children.center, 1*scale_mod, 40*rotate_mod)
G.shared_seals[card.seal]:draw_shader('foil', nil, card.ARGS.send_to_shader, nil, card.children.center, 2*scale_mod, 10*rotate_mod)
G.shared_seals[card.seal]:draw_shader('hologram', nil, card.ARGS.send_to_shader, nil, card.children.center, 2*scale_mod, 20*rotate_mod)
G.shared_seals[card.seal]:draw_shader('foil', nil, card.ARGS.send_to_shader, nil, card.children.center, 2*scale_mod, 10*rotate_mod)
G.shared_seals[card.seal]:draw_shader('hologram', nil, card.ARGS.send_to_shader, nil, card.children.center, 3*scale_mod, 10*rotate_mod)
end
end,
...
which I'm not entirely keen on
using the patch I can link the 3d rotation of the seals
unless theres a way to retain the context of the base card that I'm entirely missing the point of
The G.shared_seals[self.seal].role.draw_major = self isn't added.
Yes, because it breaks
yes it did, thank you sir
G.shared_seals[card.seal].role.draw_major = card
Is this in a SMODS.Seal definition, or is this still in a lovely patch
refactored code is as follows, without patch:
name = "mechanical_seal",
key = "mechanical_seal",
badge_colour = HEX("378065"),
atlas = "seals",
pos = { x = 0, y = 0 },
calculate = function(self, card, context)
if context.before and context.cardarea == G.play then
local destroyed_card = pseudorandom_element(G.hand.cards, pseudoseed('mechanical_seal'))
local played_card = card
G.E_MANAGER:add_event(Event({
trigger = 'after',
delay = 0.2,
func = function()
copy_card(played_card, destroyed_card)
return true
end
}))
local affected_cards = { destroyed_card, played_card }
for i = 1, #affected_cards do
local percent = 0.85 + (i - 0.999) / (#affected_cards - 0.998) * 0.3
G.E_MANAGER:add_event(Event({
trigger = 'after',
delay = 0.2,
func = function()
affected_cards[i]:flip(); play_sound('tarot2', percent, 0.6); affected_cards[i]:juice_up(0.3,
0.3); return true
end
}))
end
delay(0.5)
for i = 1, #affected_cards do
G.E_MANAGER:add_event(Event({
trigger = 'after',
delay = 0.1,
func = function()
affected_cards[i]:flip(); return true
end
}))
end
end
end,
...
...
draw = function(self, card, layer)
local scale_mod = 0.07 + 0.02*math.sin(1.8*G.TIMERS.REAL) + 0.00*math.sin((G.TIMERS.REAL - math.floor(G.TIMERS.REAL))*math.pi*14)*(1 - (G.TIMERS.REAL - math.floor(G.TIMERS.REAL)))^3
local rotate_mod = 0.05*math.sin(1.219*G.TIMERS.REAL) + 0.00*math.sin((G.TIMERS.REAL)*math.pi*5)*(1 - (G.TIMERS.REAL - math.floor(G.TIMERS.REAL)))^2
if card.seal and card.seal == 'btp_mechanical_seal' then
G.shared_seals[card.seal].role.draw_major = card
G.shared_seals[card.seal]:draw_shader('dissolve', nil, nil, nil, card.children.center)
card.children.center:draw_shader('hologram', nil, card.ARGS.send_to_shader, nil, card.children.center, 0, 0)
G.shared_seals[card.seal]:draw_shader('hologram', nil, card.ARGS.send_to_shader, nil, card.children.center, -1*scale_mod, 80*rotate_mod)
G.shared_seals[card.seal]:draw_shader('foil', nil, card.ARGS.send_to_shader, nil, card.children.center, 1*scale_mod, 10*rotate_mod)
G.shared_seals[card.seal]:draw_shader('hologram', nil, card.ARGS.send_to_shader, nil, card.children.center, 1*scale_mod, 40*rotate_mod)
G.shared_seals[card.seal]:draw_shader('foil', nil, card.ARGS.send_to_shader, nil, card.children.center, 2*scale_mod, 10*rotate_mod)
G.shared_seals[card.seal]:draw_shader('hologram', nil, card.ARGS.send_to_shader, nil, card.children.center, 2*scale_mod, 20*rotate_mod)
G.shared_seals[card.seal]:draw_shader('foil', nil, card.ARGS.send_to_shader, nil, card.children.center, 2*scale_mod, 10*rotate_mod)
G.shared_seals[card.seal]:draw_shader('hologram', nil, card.ARGS.send_to_shader, nil, card.children.center, 3*scale_mod, 10*rotate_mod)
end
end,
}
return {
name = "Seals",
list = { mechanical_seal }
}
had to send in two parts because discord limit
Epic
So... kinda like this?
You don't need the if check, if the draw function is being called than it's already known that the card has the sticker.
This also goes for seals.
Ah alright then
But other than that, it's all good and dandy to continue coding the shader?
I believe so.
Gotcha
Noticed that Mr Fletch's seal shader has an atlas pointing to {0, 0}, does it require a sprite for the shader to render on, or is the seal purely shader work
I do have a custom sheet, yes
But you can point at any sprite
ok i got one more small question: how do i create a locked message for jokers?
Would it be too weird if I pre-emptively make a wiki page of my mod on Modded Balatro wiki? Even only as a placeholder?
It'd be a curveball for people looking through docs.
wait,
why a curveball?
Cause people are in the wiki for the documentation, then suddenly mod page.
I still don't get it.
||in fact i feel like im getting less||
Where's the difference?
Wait a sec, I misread the Modded Balatro wiki. I thought you meant Steamodded wiki
NVM
Carry on..
Ooo hoooo yeah it's scuffed BUT shaders work
Did you somehow make the original seal sprite invisible on your card? Your gear shader is seamless
hi modding-dev chat, do yall know anyone who does art (jokers, etc.) here? if so what are their prices
I mean, depending on what you're after, I could try.
i dont have a complete thing right now, i'm just looking to make a note of people i could commission in the future
aight
if you also need coding help, I'm available
thanks for the offer! i'm mostly getting by rn by looking at smodded, basegame, and cryptid but i'll let yall know if i need help :D
Holy shit
how would i make it so that this does what its description says?
Fruits of labor
Look at the Balatro source code to see how it does similar effects
^
if context.joker_main then
return [the code you already wrote]
elseif context.end_of_run then
card.ability.extra.xmult = card.ability.extra.xmult + card.ability.extra.xmult_mod
end
You'll also need to change your config to extra={xmult=0,xmult_mod=1.1}
Specifically madness joker
how many colors for text (like from {C:these}{}) are there anyways?
Very interesting, does it mean ranks or is it very specific on like 8 of clubs in particular
i know of green, purple, white, mult/red, and purple
Just ranks. So for example if you had 3 7's and 4 of the rest of the ranks, each 7 would retrigger 3 times
A lot, I don’t think there’s documentation but the source codes localization file has pretty much all of them
there's also {C:tarot} but that's also purple
yeah i figured that would be the same as purple
I think you could revise the description to specify ranks
is there {C:luck} for an alternate input for green
I just changed the description to be more clear on that LMAO
That would be {C:chance} iirc
but they are the same as {C:green}
nice
Improvise. Adapt. Overcome.
Some of the empty {} can be removed.
Empy {} is to "Change it to [default]", not "End of the effect".
Does anyone know what check or context I need to see if a card is enhanced already?
What does ~= do in Lua?
!=
Not equal
I need to make sure it's not enhanced at all.
so ability.name == "c_base"
theres also get_enhancements but im not sure how exactly that works
This just made me realize that the paintbrush joker I'm making could also paint enhanced cards back to base. Oof.
Should I stop it from doing that?
That didn't work.
v.config.center ~= G.P_CENTERS.c_base is what driver's license does, opposite of that for your effect
i forgot that green deck exists ... maybe this is a little unbalanced
"free $15 if you play well" is maybe alright if the joker's expensive but "free $30 if you play well" is a little less good
I COOKED
Triforce coded
Lmaoooo
We got scale_mod and rotate_mod, but are there any mods for setting transparency
I want to do like fade in and fade out effects
Or is there any translation to move the effects left or right, or up or down
Ok, new idea:
How do I do a context check for when the cards are done scoring?
Reunion!
A Balatro ModLoader. Contribute to Steamodded/smods development by creating an account on GitHub.
Just pointing out that that will break if people aren't using high contrast
(Won't look like a rainbow)
The context works functionally, it's just visually that's the issue.
Visual goal: Score with previous enhancements, then change them.
Current visuals: Changes, then scores with previous enhancements.
Screenshot the code and let's see what we can do.
You're not using context.after in this code. Try using that to change the enhancements
context.after did the same thing.
Then try putting the enhancement change code in an event to trigger 'after'
But for sure joker_main is not the context to do that
I'm testing context.after again.
Ok, so here's how it is on my side:
Visual change > Score as normal
And it's visually changing it before they score.
That's probably because the game calculates eveything before the visuals start rolling. That's why I suggested you put that code in an event, so that it can be timed for after the scoring
Does the code actually work for changing what enhancement is on the card
in that case, do you know how to make an event to do so?
Functionally, yes.
Visually, kinda bugged.
Not off the top of my head, but if you check the source code there are a number of jokers that create events with a trigger = 'after' attribute. You could probably check those
Right and it's changing it over to an enhancement you have added? Or a base game one
Any random enhancement.
I'll keep it as is for now. It's working functionally, and that's really all I need.
Ah ok right so in terms of your issue it's got to be with timing then must be that the game has a set order when it does visuals Vs calc but I don't know the codebase too in-depth
Yeah, all the visuals are managed by the Event Manager from my knowledge
So if its coded earlier, its gonna play the visuals out of order, or not where expected
Sorry to hijack but I had an idea for a similar thing if I wanted to have a joker enhance played cards into my custom enhancement would all I need to do is set_ability but with my key for that enhancement
luchador or chicot
Like uhh set_ability(G.P_CENTERS["key"])
you have to use set_enhancement()
I believe you use your mod prefix + defined key
So if the mod prefix was prefix and the enhancement's key was e_enhancement you would find it with prefix_e_enhancement
I tried to reverse engineer it from Midas mask but that uses a pre defined type which I can't do since this is modded
Is it a new thing?
Mostly yeah
Maybe in a bit
I'm talking advanced tho
set_enhancement(G.P_CENTERS.prefix_e_enhancement)?
I don't know that you use G.P_CENTERS, but something like that I think
I'll give it a try tomorrow thanks for the help
oh interesting, thanks for the tip
i need you guys' silliest ideas for my mod
how would I do something like this?
i dont know how to look for selected cards when its simply sold
remove_from_deck and G.hand.highlighted ??
haha
happened when i sold the joker
You want my Family Guy Joker?
nah that's yours
right now i have a joker with +500 mult (with a 1% chance to instantly end the run, chance increases bt 1% each round)
2 fnaf jokers (+300 chips per A, 9, 8, or 7 and the same but with x20 mult)
and one that's hanging chad with 5 retriggers. giga hanging chad
anyone knows what's up?
highlighted is an array of cards, not a single card. That's my guess
You should loop through G.hand.highlighted
It's a cardarea
this
do a for i loop for it
probably just because im not 100% used to lua yet but how would you set up that for loop
looks the exact same on or off actually (it changes a tiny bit actually but its still rainbow)
i know im doing this wrong somehow relating to the for loop, how am i
(line 106 is the for loop)
107 is the line for removing from deck
Oh, cool. I guess the colors are close enough that it doesn't make a difference
for diamonds, specifically
yea it muddied the orange a little 😢
for i, v in ipairs(G.hand.highlighted) do
or for i = 1, #G.hand.highlighted do
Pulling from Hanged Man code...
for i=#G.hand.highlighted, 1, -1 do
local card = G.hand.highlighted[i]
if card.ability.name == 'Glass Card' then
card:shatter()
else
card:start_dissolve(nil, i == #G.hand.highlighted)
end
end
alright, now its not destroying the card, presumably due to a fuckup on that part
Ok, need another context thing.
How do I change context:other_card:get_id(whatever) to check if a card is enhanced?
v.config.center ~= G.P_CENTERS.c_base is how drivers liscense does it
And that'll work without any further edits?
no you'd need to do context.other_card.config.center ~= G.P_CENTERS.c_base
On which line? Same one?
where ever you want to check if a card is not enhanced
if context.other_card.config.center ~= G.P_CENTERS.c_base then
swap out v for context.othercard and it should work
trying this rn
v was the for element variable for a card
check for context.individual i believe, or context.main_scoring
other card doesnt exist in all contexts i realize
my joker does it like this
Am getting back into working on my mod and was looking at what I was struggling with last. The joker I am working on has the effect of '+50 chips when an Enhanced card scores' what I am struggling with is having the joker to react when the chips would be added and not the scoring card
Alright, but m_lucky goes after Lucky cards only. How do I make it where it accepts any and all?
so you want it to upgrade when an enhanced card scores, then give chips at the end of the hand like normal jokers?
same if statement as earler, context.other_card.config.center ~= G.P_Centers.c_base
alright
joker trying to set foil on stone cards and i got a very scary error upon that trying to happen, whats up
What I was going for is where the enhanced card scores, the joker then adds 50 chips to the score before the next card (or retrigger)
So that failed.
mb its P_CENTERS all caps
then you'd have to check for the card area to be the in the play, then add the 50 chips to the card rather than the joker
And that made it work flawlessly.
looking at a bit more of the error seems the set_edition function did go off, but crashed at some point there, so that at least means its the set edition function failing somewhere
yippee! 
What I am struggling with is having the right card reacting and the right time to react
try context.individual, and if this is in a joker i think you are setting the joker to foil
yup
whats your code look like
hmmmm
context.other_card
add card = context.other_card, to the end of the return function
oh yeah lower case probably
only reason i thought otherwise is because 'Stone Card' is correct
also lower case didnt work so im trying 'Foil Card'
nope
:set_edition({foil = true}, true)?
so where was I to put that?
in the calculate function? and should I keep the card = card:juice_up(0.5,0.5),
How do I add a seal to a card? (Specifically the red one)
return{ chips = card.ability.extra.chips, card = context.other_card, card = card:juice_up(0.5,0.5) }
i forgot about the juice up yeah it goes before that
card:set_seal('Red', true)
well the joker is still reacting as I play the hand and the played card is still reacting to the added chip effect and not the joker
Which line? It keeps adding it to the Joker instead of the cards.
im confused, do you want the joker to readct and add the chips after all the cards are scored?
wait, think I should check something else, if it is the case I have had the problem for no reason
context.other_card:set_seal('Red', true), probably just before the return
1st return or 2nd
probably the 2nd one
Yep, 2nd one got it working. Thanks
oh I see, both react, so I need the joker to react along side the played card, I am tyring to have visual effect for this joker like bloodstone
ok last thing for the night, trying to get scored stone cards to give $2, why's it crashing at extra?
line 152 is the ease_dollars line
for playing cards to give $2 you can
return { dollars = amount, card = context.other_card }
unless you want the joker specifically to give the money
anyone know the context for a joker when it is sold?
.selling_self
^
thank you guys 🙏
so how would I put it to make both the played card and joker to react like bloodstone?
if context.individual and context.cardarea == G.play then
if context.other_card.config.center ~= G.P_CENTERS.c_base then
return{
chips = card.ability.extra.chips,
card = context.other_card,
card = card:juice_up(0.5,0.5)
}
end
end
end```
should do what you want, right?
you want it to work like arrowhead, where it gives chips
yes, and react like it, but right now the joker is only reacting when the hand is played
yeah im at a loss, how would i make this make the money sound each time a card got money?
nevermind it works just fine
what more I do brotha
Also thanks for the response I forgot I was doing this
Also is there documentation on this stuff beyond the github wiki?
oh wow I did not write that correctly mb
A
local path = SMODS.current_mod.path.."Jokr/"
for i, v in pairs(NFS.getDirectoryItems(path)) do
SMODS.load_file(path..v)
end
there is not
...if I want to spawn a Joker on start of a deck, I need to hook Back.apply_to_run?
Hmm this only loads one joker from the path at a time for some reason
fixed a parentheses but im sure you got that
Yer
Sure
Testing rq to make sure its not one of the joker luas thats broken
It appears one of the joker luas is broken (:
Ok now both luas are functional individually but still
Only one loads
Do I just kill myself?
how do i make a joker that triggers for each joker of a certain rarity like baseball card?
Check how Simplified Joker from MoreFluff works.
ok so i have this rn but this makes it trigger when any joekr of the rarity triggers instead of working like baseball card
2/3 done 
This guy took a WHILE to get working
For the turning into zombie part, do you destroy the card and emplace a new zombie?
Yes
I was hoping there was a way to transform a joker sigh
Sorry for getting your hopes up lol
If you end up with 2 Zombies and no other Joker, nothing happens I assume
Losing a blueprint/brainstorm like that must be tragic
But then I made an even more tragic Joker myself
Well it’s only the copy that gets turned, the original sticks around
Oh goodness
web developer????
Goes hard with eternals, I assume with Zombie as well
Probably
Zombie can copy a blueprint that's copying something else though
And it would convert the blueprint
You get an extra blueprint for a round, or just an extra blueprint if you yeet the zombie before the round ends so I don’t really see how it’s that tragic
I see the strategy is using it only once after buying it
It could be
Or you can gamble and get two zombies to make two copies of a card you want instead

If the target it eternal I hope it doesn't create the new zombie
Since it doesn't destroy the copied one
But for only a turn, idk if I would take that gamble or if it's worth it
Actually eternals are something I want players to play around with the Zombie. You could get a copy of an eternal card and that would not be destroyed by the zombie, and that would either be great or detrimental depending on the card
So zombie could keep copying the eternal card with no downsides
I see
https://thebookofshaders.com/ i am reading this
We need more synergies with rental too honestly
Rental is a pretty specific thing to synergize with imo, and making jokers work specifically with high stake stickers feels off
Banker: gains X0.01 Mult for every dollar spent or lost
I was looking for code about changing ranks of playing cards, but did not expect Strength to be this janky.
Real. I was expecting a function of some sort
Not as bad as it could’ve been lol
I don't remember, is this a joker you already made?
Nope
But it looks interesting 🤔
Thought of that on the spot
Probably rare
Since spending is such a common event I agree
Could just hook into ease_dollars and check if the input is negative
hello! i have another question! how would i go about making a card that requires 2 specific cards to work, but only affects one of them?
the relevant effect!
There is a check to see if the scored hand has a specific rank iirc
Lemme find it
card:get_id()
It's an int value that gets the id of the rank, Jack is id number 11, Queen is 12, King is 13
I forgot whether Ace is 1 or 14
Hmmm...
What if I just context.other_card.base.id = card.ability.extra._rank and move on
ah, yes, that is what im using, but right now the joker affects both kings and queens, when i only mean for it to affect kings
queens are meant to be an "activator" of kings, per se
I’d first check for queens in context.before and set a boolean for if queens are present. If they are, during context.individual, also check for context.other_card:get_id() == 13
will try, thank you!
👌
Well that's new.
What are you upgrading?
Do you really need a separate function for that?
I'm planning for another type of objects similar to energy cards in pokermon
Ah
Ah no wrong one
I maybe change the X1 Mult gain to X0.5 Mult, cause it is way too overpowered with debit card
ah, i thought i could find something about this on github, but it dawns on me that i have no idea how to do this, apologies!
I think Steamodded reimplements it
SMODS.Rank has a next method
im going to shitmyself
how can I add new colors to my mod? (as in, text colors)
First, the colors should be defined somewhere
then you hook loc_colour
This is how I did it
ive seen cryptid do it like this
but also cryptid is messy so
Balatrostuck mentioned
fun fact you don't need to hook loc_colour
you can just call it once then add your keys to G.ARGS.LOC_COLOURS
did you read the screenshot 😭
I did but I'm saying you don't need to hook the function to do that
You said "call it once"
loc_colour('red')
G.ARGS.LOC_COLOURS.my_colour = HEX'abcdef'
instead of creating a call somewhere, I just built it into the function
do I just like
Add this to my code with the color I want
yes
I think it makes more sense to define the color somewhere instead of just pasting the values directly
but it works
similar to Campfire but i wanna see what you guys think
which just contributes to making stack traces less readable
how so
a bit more limited than Campfire but seems very strong still
stack traces go through all hooks of a function
Yeah but when is a stack trace going through this
Things usually break when applying an effect not creating a tooltip
Maybe if you were doing UI, but you can always do text color last
And it's unlikely to break just by adding text color
aye there we go
thanks :D
Hep me
I don't want the jokers to load as separate mods, but the docs dont have very much information on what determines this
You're defining headers in each of those files...
you're not using load_file correctly
A
it takes a relative path from your mod dir, and you should only give it one argument
Is load_file from lua, love, or steammodded?
steamodded
local path = SMODS.current_mod.path..'Jokr/'
for _,v in pairs(NFS.getDirectoryItems(path)) do
assert(SMODS.load_file('Jokr/'..v))()
end
something like this should do
Oh thanks will try out
New crash output
Wait ok do I just need to move where the joker's atlases are defined
Right now I have them each assigned their atlases in their individual files
assets folder shouldn't be in any subfolder
Fantastic dude works perfect now
So even when loading luas from a subfolder, the assumed directory remains the intial mod folder?
Idk why i had assumed it'd change with the load_file command
If I want to patch a file after Steamodded has patched it, should I do anything specific?
also, if I want to add a new context, is calling SMODS.calculate_context(new_context) sufficient?
Well that's another new one
you defined a color called my_colour
also suits add these colors for you, it just has your mod prefix added
hey john
how to add a new context
If it's for the standard set of objects, do I just call SMODS.calculate_context at the appropriate time?
usually by just adding a call to SMODS.calculate_context with your context with the right timing, yes
If it's a new object or existing object in a new zone, do I manually iterate over them and call trigger_effects or calculate_effect
For the second question, I was thinking of iterating over all cards (all cards) to apply end of round effects due to a sticker-like effect
or even an Enhancement effect
(which otherwise wouldn't apply because Steamodded doesn't iterate over all cards)