#💻・modding-dev
1 messages · Page 119 of 1
I'm trying to figure out what combination of the vanilla dictionary, "is my mod's ID auto-prepended", and "what did I even make the ID" is the right one
that only offers a skeleton though, doesn't tell me what I need where... currently on this attempt
haha, so apparently it's just exactly the group_key, good to know
I think all that's left is to make sure the soul card actually shows up now... time to open a bunch of boosters ig
any thoughts as to why this may not be spawning? I'm only observing regular Atomic cards despite the 100% to get this
anyone?
take a look at walkie talkie from https://github.com/Steamopollys/Steamodded/blob/main/example_mods/Mods/ExampleJokersMod/ModdedVanilla.lua
'kay
How do I set up the steammoded api in vscode?
would anyone be willing to help me learn to make my first modded joker
how do I add mods to the game?
I thought it was already replaced
by whichever effect saved you
or maybe a generic one
hello again
im tryna make a custom consumable, yet when i try to unlock it in game, it refers to the atlas as a nil value (image 1: shop error, image 2: unlock error with debugplus)
i thought i did the code right, so what gives?
Thing is... Cryptid has the ; Code card that ends the Blind w/o cash given out, and that introduces its' own text as option.
So? 🤔
Not sure why disabling this Blind persists through the same play session
doin a lil something
@cedar pendant @wheat kayak https://github.com/Steamodded/smods
shows how to get started and includes example mods to reference. just start by making own versions of the examples given
oh well I see what's causing this, though it wasn't my change
there was a change a while back that made defaults weak, meaning they don't replace any existing entries
does steamodded provide any way for a mod to detect if another mod is loaded
yes
i want to add a debug mode to my mod that is only active if another mod (that enables it) is loaded
this is so i don't forget to turn it off when sending it to people for testing
As in localization in default.lua?
https://github.com/steamodded/smods/wiki/Utility SMODS.find_mod
Speaking of which I don't think we need that anymore tbh.
ty!
yeah while we still do breaking changes may as well get rid of it. there's not much of a reason to not use en-us as a fallback
default.lua or en-us.lua when a non-English language is selected
So, what's the recommended method now?
Or is that a bug?
renaming your default.lua to en-us.lua should work for now, but it's not exactly intended behavior
oops.
apparently SMODS.find_mod does not exist
full crash please
how do I add the cryptid mod?
update steamodded, you're 2 weeks out of date
things move that fast? wow
they do
I was mostly thinking of allowing mods to specify a language other than en-us to default to.
(instead of selected lang -> en-us -> default it would be "selected lang -> mod specified default lang -> en-us").
This seemed like a better solution to what default.lua was for
is it just meant to be this
if next(SMODS.find_mod('nightshadedebug')) ~= nil then
NSC_DEBUG_MODE = true
end
should this work or should i do something more
Especially now that adding more info to a mod manifest isn't gonna cause a clutter issue.
I don't really see how that works with vanilla and/or multiple mods
don't need ~= nil in an if statement
but yes
without the ~= nil there i think it to be a bool when it is in fact a table
all elements of the table find_mod returns are tables
so it will never be a bool
me being used to !=:
I don't think that's what they were saying
yes. i am saying i made the nil comparison explicit because otherwise i might think the data type it returns is a bool
ah fair enough
!= in js:
huh, that works lol
[1] != '1' // false
World -1
lmao
@stiff locust by the way Aure said it was a bug
yes hello
in favor of this idea
Why wouldn't it? It would act the same as now for mods made with english in mind, and mods that don't have an english language file would just do default_lang: "<other language>" in their json manifest.
me when BLua
...
elseif _G["shrine_active"] != nil and _G["DrawMotdString"] != nil then
...
nnoted
You get default.lua behavior without having to copy + maintain a duplicate loc file.
How are you tracking where each localization entry came from?
we should also add a manifest field for where the default config file should be, I forgot about thaz
"This localization came from this mod which has that default language."
Actually, can one Lovely "patch" contain both before and after payload?
no
Oops! The game crashed:
main.lua:2083: bad argument #1 to 'load' (function expected, got nil)
Additional Context:
Balatro Version: 1.0.1m-FULL
Modded Version: 1.0.0~ALPHA-1303a-STEAMODDED
LÖVE Version: 11.5.0
Lovely Version: 0.6.0
Stack Traceback
(3) global C function 'load'
(4) main chunk of file 'main.lua' at line 2083
(5) global C function 'require'
(6) LÖVE function at file 'boot.lua:323' (best guess)
Local variables:
c = table: 0x0dabe680 {identity:false, version:11.5, accelerometerjoystick:true, modules:table: 0x0dac4710 (more...)}
openedconsole = boolean: false
confok = boolean: true
conferr = nil
(7) global C function 'xpcall'
(8) LÖVE function at file 'boot.lua:362' (best guess)
Local variables:
result = boolean: true
(9) global C function 'xpcall'
(10) LÖVE function at file 'boot.lua:377' (best guess)
Local variables:
func = Lua function '(LÖVE Function)' (defined at line 355 of chunk [love "boot.lua"])
inerror = boolean: true
deferErrhand = Lua function '(LÖVE Function)' (defined at line 348 of chunk [love "boot.lua"])
earlyinit = Lua function '(LÖVE Function)' (defined at line 355 of chunk [love "boot.lua"])
Help?
2 it is.
I guess you can have an "at" patch do that
but that's not really needed and just increases conflict risk
its a joker, not a deck:
SMODS.Joker {
key = 'oneMansTrash',
loc_txt = {
name = 'One Man\'s Trash',
text = {
"At the end of each round",
"{C:money}$1{} per remaining {C:red}discard"
}
},
rarity = 2,
atlas = 'ModdedVanilla',
pos = {x=2,y=0},
cost=3,
add_to_deck = function(self, card, from_debuff)
print('added to deck')
print(G.GAME.current_round.discards_left)
print(G.GAME.money_per_discard)
end,
remove_from_deck = function(self, card, from_debuff)
print('removed from deck')
end
}
sorry for late reply. went to bed lol
Technically needed for me to make a Cryptid-compatible patch...
Whilst also keeping the Mr. Bones fallback intact.
can someone help me with this issue pls?
1.0.1m?
It's a pirated version of the game that could be why that's the version name
is this a cool idea to indicate which scaling we're applying
bro i finally got the randomness working
there's also an equivalent
it took me longer than it should've
@faint yachtIs that🤔 supposed to mean something?
not a good look to openly talk about pirating the game in the official server
¯_(ツ)_/¯
he asked about version, I answered.
Latest SMods might not work with older Balatro versions. 🤷
Well it worked
Just had to rename the mod folders from xxxx-main to xxxx
that matters for Talisman and Talisman only
Well I did that with the other mods I had and it worked
Well, as long as ya got it working.
yeah that was probably from talisman
talisman didn't have -main anyways when I tried before
has to be one of the others
Trance maybe
before i had bought the original game i was using it cracked and some mods which added suits would crash my game
idk if thats the case w you though
Actually, as you're here, @frosty dock, any plans for the custom "Saved by" text being possible without other mods needing to patch it in?
yes
had no idea this channel existed, hi!
sorry i was bugging modding-chat 😭
i'll link there though
beginning_end?
no clue, it was part of Cryptid and i'm presuming it means wait for the use animation to finish
also what does card_eval_status_text actually mean?
I don't get it but
I think you can make the word have a tooltip
Decks do that at least
there, that should be way clearer on which modifier is applying which stake's scaling level
first challenge using the new mods!
weird bug causing sold Tarots to not trigger, but sold Jokers to trigger — what's wrong here?
also it's still displaying nil as its mult value
ah. i found the fix for the second issue
oooh i think i know what the bug in the first is
does it consider the selling tarot to still be there when checking for what tarots are there?
i'll add a patch
okay i have no idea how to patch this, context.consumeable is nil when selling a Tarot so i can't check if the animation is running or not
:P
hand idea: Blush
a flush with only face cards
I'm trying to figure out how to fix my code and I've got nothing, two issues atm:
joker.keyis returning nil for some reason- Even when I bypass
can_usegetting rid of the highlighted joker doesn't get rid of it, and places an uninteractible version of the new joker in a static place in my joker tray no matter what method I use
Well I figued #2 out at least, it was the Q(function thing I copied
joker.config.center_key
That was it, thank you so much
flushblaze already exists
oh nice
everything you can combine blaze with without using pareidola
(so no blaze straights)
How do you add the extra button on end screen? i have the idea to add a limitless option along side endless on win screen. its basically endless but removed limits such as joker slots
or i might just make it a setting to alter endless
whats a document
what'dya think? :D
is this a joker, a tarot, or a spectral?
it's a joker ^^
and its peak
aaaaa thanks!! :D
ability reads:
On purchase, creates a random Negative Spectral card
self destructs```
(common)
oh thats neat
thanks ^^
actually wait maybe this should be uncommon
shrug
well i'll work on that ^^
i dont get why it evokes tarot design then but ok
i mean why not :D
well it says joker
bump
i mean it creates a spectral card so i can see why it looks like one
ya
(man you can really tell which ones of these i made)
my joker tarot card is a tarot so maybe im just used to that /shrug
the minor arcana Pages there are used as suit conversion tarot for the minor arcana suits
see here
ooooooooooooh!! how do they work?
see here
i hate nerfing stuff
how would i make a joker that'd score +mult/+chips or Xmult/Xchips for scoring specific cards
SMODS.Joker {
key = 'evening',
loc_txt = {
name = 'Evening',
text = {
"Each played {C:attention}Even card{}",
"gives {C:chips}+#1#{} Chips and",
"{C:mult}+#2#{} Mult when scored"
}
},
config = { extra = { chips = 4, mult = 2 } },
rarity = 1,
atlas = 'ModdedVanilla',
pos = { x = 1, y = 1 },
cost = 4,
loc_vars = function(self, info_queue, card)
return { vars = { card.ability.extra.chips, card.ability.extra.mult } }
end,
calculate = function(self, card, context)
if context.individual and context.cardarea == G.play then
if context.other_card:get_id()%2 == 0 then
return {
chips = card.ability.extra.chips,
mult = card.ability.extra.mult,
card = context.other_card
}
end
end
end
}
one of mine as an example
thanks for the assistance
Don't forget; you're here forever
i wish i could just outsource the coding so i could do the funny art
hoof, trying to get into mod dev for my partner and I to make one together, but ive only managed to make the joker appear in game (albeit with the debug mod 😅 ), but it's not yet able to trigger. is it proper ettiquette to drop the mod in a code block here for advice?
(that is, the code for a single joker's text and function 😅 )
i think i could do that
oooo
key = 'Jokers', --atlas key
path = 'Jokers.png', --atlas' path in (yourMod)/assets/1x or (yourMod)/assets/2x
px = 71, --width of one card
py = 95 -- height of one card
}
SMODS.Joker{
key = 'baby-pi', --joker key
loc_txt = { -- local text
name = 'Pi',
text = {
'Each played {C:attention}3{}, {C:attention}Ace{}, {C:attention}4{}, {C:attention}5{} or {C:attention}9{} gives',
'{X:mult,C:white}X#1#{} Mult when scored'
},
},
config = { extra = { Xmult = 1.5 } },
rarity = 2, --rarity: 1 = Common, 2 = Uncommon, 3 = Rare, 4 = Legendary
atlas = 'Jokers', --atlas' key
pos = {x = 0, y = 0}, --position in atlas, starts at 0, scales by the atlas' card size (px and py): {x = 1, y = 0} would mean the sprite is 71 pixels to the right
cost = 8, --cost
loc_vars = function(self, info_queue, card)
return {vars = {card.ability.extra.Xmult}}
end,
calculate = function(self, card, context)
if context.individual and context.cardarea == G.play then
if context.other_card:get_id() == 3 or context.other_card:get_id() == 14 or context.other_card:get_id() == 4 or context.other_card:get_id() == 5 or context.other_card:get_id() == 9 then
return {
Xmult = card.ability.extra.Xmult,
card = context.other_card
}
end
end
end
}```
I'm currently trying to make a joker that gives x1.5 mult whenever 3, A, 4, 5 or 9 scores, though this is the first joker i'm making so i'm still pretty unfamiliar with balatro lua keywords, any advice?
you want to return x_mult not Xmult
add message = localize({ type = "variable", key = "a_mult", vars = { card.ability.extra.Xmult } }), to your return
thank you so much, this worked!
ooh, let me try this too!
that worked too! is either preferable over the other?
don't do this
is changes nothing and doesn't fix the original issue
i thought specifying the message was necessary but i just tested and turns out i'm wrong
My main.lua is chock full of code dedicated to Enhancements and has like 1k+ lines, their sounds and some overridden functions, but I heard that there's a way to isolate them in a separate lua file, are there any example mods that do this?
alrighty, thank you anyways! this game is so much fun, and the modding scene is so lively and interesting! :D
glad to learn these things any way I can, i'm sure they'll all help me and my partner as we get more used to Lua and balatro modding as a whole!
Modding is so damn versatile, I think some guy managed to cram Super Mario into a Joker
I think it's Xmult_mod?
no, just regular xmult afaik
that's during main joker scoring
yes, the required key is different between the two
my debugging sessions be like
i love people trying desperately to prove me wrong its funny
meanwhile im looking at a joker that does almost exactly that functionality in my code lmao
but its based on suit instead
it can be omitted for scoring triggered but not main joker scoring triggered
I have lost count of how many ideas I have scrapped because there is a Joker out of 150 that does the same thing
¯_(ツ)_/¯
my Emojiokers mod is not about creativity
why is smods so jank
smods isnt jank, balatro is
My ideas go in a loop, I thought long and hard about coming up with a new idea, and then by the tail end of concepting, I realized I made a worse Glass Card
lots of people trying lots of different things, while having to build on top of Thunk's code
Me when Enhancements do not have all the contexts like a Joker would
real
I've put a pin on making Enhancements for now
Making Jokers would be significantly easier right?
right?
just rough gem but with hearts
What do YOU know
can someone help me please.
how do i go about replacing these textures
is there a way to do it with just steammodded
Hey, sorry I'm being a bit clueless about this- I wanna have an effect happen according to a variable at the end of a round, from the end_of_round context. Kinda like this-
But, well, obviously it's not working, haha. How would I go on doing this?
The variable exists just fine since I can print it with eval in the debug console
By not working do you mean the game crashes?
yaya
Sorry I should have specified, it crashes since I assume doing an if context like this is NOT the intended way, which makes sense
so I just wanna figure out what's the proper way to do stuff at the end of the round
without it being a joker
I was skimming the channek and want to say hell yeah
you'd probably want to use a hook on the function where you want your effect to happen
Why not just add sometbing to the config? You would just need to check current_mod.config.debug or smth and once set on your machine it's true
:)
Unfortunately there's a Steamodded bug (?) that breaks it
:(
i don't want end users to have access to it
Oh yeah I imagine that's what I wanna do but I'm not sure what's the actual function to use 😭
I tried looking at stuff like golden joker but my Searching has bore no fruit 
Could you specify more what kind of effect you want?
if you go through the effort of reading the source and making a mod with the ID that it's looking for, then you've earned my debug mode lmao
Give +5 dollars if you finish a blind with an Overkill (the flame-like effect)
In essence I just want a +5 added to your money at the end of a blind but without using a Joker (It's meant to be a voucher, so I'm using that variable which is turned to True with the purchase of the joker)
You don't need to have a UI for it
The config table is just what the file has
ah
Question: is there a built-in way to check for a card's suit?
Not if it has a specific suit, but to ask its suit
I just don't remember if vanilla has one
Card:is_suit or smth
Well things get messy with wild cards
There's something on the objext to keep track
But I don't know what it is
There's a function just to ask if a card is wild
it's probably something simple like card.suit
Agreed I just wanted to know if there was a method
Check what the method to set the suit does
if only I knew it v_v
Idk I use it in DebugPlus
thanks thunk
Anywyas things that's bad look at now you change ranks in vanilla
(there's no function for it you just have to look at strength)
DebugPlus's rank code is stupidly cursed
I'm not actually sure what method you're looking for, perhaps evaluate_round in state_events.lua? I know that's where the money is added for remaining discards and hands
But you might not be able to accomplish what you want with a hook
Might need to use a lovely patch
But don't take my words for granted
i will Look
The thingamajiggy
holy shit
you were not joking
I see you there Victin
wait until you see localthunk's If-Else-If Tower of Babel
Tower of Babelse
3am
Now where do I start with
- Disabling hand types
- Spawning Boss Blind-specific cards (Enhancements/Jokers/Editions etc etc)
smods takes ownership of strength, you should look at that instead
don't worry i have had to do extensive patching, i know the horrors
I did specify vanilla game
(I unfortunately support vanilla in DebugPlus)
my condolences
vanilla disables some hand types
Oh yeah the Needle
Not the Needle
these
- allow removing of the "Endless Mode" button from the win screen because in some contexts it makes no sense
- implement purple and green stake scaling challenge modifiers
- implement the ability to specify editions on consumables in challenges
- implement the ability to specify for jokers to be rental in challenges
- implement the "run starts at ante X" and "you win after ante X" modifiers
- fix a very strange edge case i didn't catch the first time, which combined with the "no hand regen" modifier, allow for the player to have -1 hands (it just forces a game over instead)
- implement the "discards do not regenerate" modifier, and the "hands do not regenerate" modifier
creating cards
card.base.suit
not card.config.card.suit?
idk they might both work
That's what set_base uses
card.config.card.suit is what is_suit uses
whoops
getting an error trying to add dollars-
at least vanilla
i am one of many seeking an artist so i can just code
i think having to add a warning like this
is probably a hallmark that a challenge is too much
ooo
oooo
I will cheat
doing this challenge will not be required for mod 100%
it will be part of the "B-side" section, for things too strange or outlandishly difficult to land in main set
Looking at the code, does this immediately place one Stone Card in your hand when you start the Blind?
maybe you regain some per ante? like after boss you regain 1 or X or all?
burgalar
dayum
dollars is a local variable defined within evaluate_round, so you can't directly modify it with a hook, that's why i said you might need a lovely patch
@twilit tinsel wanna show off some art?
OH whoops
i uh
never did a lovely patch before
i made a challenge similar to this, in that yhands and discards do not reset.
I don't know where to start 😭
Simply create a lovely.toml file within your mod folder
i made some flag jokers
you should be able to add money at the end of round
I think SMODS provides an api for this
- those genshin aces
or you can just ease_dollars
oh ease_dollars add money?
yes
you can also just set G.GAME.dollars
sick! any ideas for their abilities?
i will see if it works,,
yeah but it doesn't add it to the end of round screen
oh I don't mind if it doesn't add it to end of round
not yet! i just made them for fun so i didnt think that much
then you can just call ease_dollars in the hook you already made
The Rock
you can use calc_dollar_bonus https://github.com/Steamodded/smods/wiki/SMODS.Center#specific-to-certain-subclasses
brazil mentioned
Yoooo that's sick
wanna make some custom card art, where do i start?
that's for jokers specifically isn't it
they want a voucher that does it
oh as a voucher
yeah otherwise i'd use calc dollar bonus fdshjk
what color is the text on the brazilian flag
no
i think that might be better because otherwise you run into the risk of fucking up people's, e.g. erosion, builds
Get screwd
this is a boss blind
no i mean fucking them up for the rest of the run
there we go the effect works
i'll add the actual details of only triggering on an Overkill later I'm just glad I got the basics to work lmao
4f6367
Hmmm maybe I can make my Boss Blind specific card an Enhancement
But how do you make them not show up in any Standard Pack?
Thank for the help,
They better be ready to adapt then
yeah boss blinds don't really mess up the rest of the run
vanilla non-final boss blinds don't have the potential to just screw your build for the rest of the run
exactly
That's the goal
also
well I mean then have the potential to screw up the rest of the run by losing
but they screw up the run during the blind
the actual flag uses green that looks like Joker grey ;P
if you survive a boss blind in the vanilla game you don't come out the other end any worse off, consumables aside
idk. the balancing doesn't quite sit right with me
The Ox
also the Rock exists to make the rest of your run worse. Or better
The Ox's penalty is theoretically avoidable though
Avoid drawing Stones
that's luck-based
like if you finally got your High Card engine online, after a long run of Flushes
as in how to implement or what to make?
Skill issue 
implement i guess? like the ones in game
the customize cards
yea lol
I had made a Real Joker but I didn't finish the art
Made 2s, 5s, and 10s earn money
thanks, i mainly want to make skins for the deck itself tho
like what do you want help with?
it rapidly devalues
if you want shitty art made in very little time, let me know
if theres like a template, loader, or something for making skins for the game, then play with it in game
oh god i've just had a horrible idea for a challenge. "Escort Mission", you start with one Joker (+4 mult jimbo), goal is to reach ante 10, "Selling the Joker doubles the size of all future Blinds"
huehuehue
peak
Theres this for the code https://github.com/Steamodded/smods/blob/main/example_mods/Mods/DeckSkinTemplate/DeckSkinTemplate.lua
not sure why this example deosn't include example art
nice thanks, i guess ill try to find a texture dump of the base cards or something
you can extrat the games files with 7zip and get the sprites
I still don't have an effect for her
this
ah
what do you want to make a skin of
just face cards or the whole deck
@modest glen
also if you want to make DeckSkins
oh im just doing face cards
yeah
right now im figuring out how to install steamodded though lol
uh
you install lovely
download steamodded and put that in %appdata%/Balatro/Mods
done
theres like a 42% I just broke all of smods
would it be the first time?
try
if crash then don't end
#1324434225822306314 be like
me breaking it maybe but it breaking no
i can't find the fucking text parser
ok so basically i just find the textures in the exe, draw over that, then implement it in the deck skin template right?
if you find it let me know I kinda want to mess with it
i need to template #X# variables with like, the name of a joker
but it might be tied to the localization system
it is
in-game this appears as the joker ID
i.e. Selling j_joker doubles size of all future blinds
which is not what i want
it should be Selling Joker doubles size of all future blinds
that would be whatveer your loc_vars provides
misc_functions.lua#1634 it looks it
also what do you mean, the loc_var 1 is j_joker
it needs to be
it's the ID
lov_vars is whats replaced with the # placeholders
you should be able to set it to whatveer
not familar with challenges
hmm
Are you trying to translate the joker key?
i'm trying to get it to show up as the localised name of the joker
loc_var 1 is the ID of the joker
Couldn't you just do G.localization.description.Joker.j_joker.name
again it's a challenge custom rule defined in the localisation file
this is all i have to work with, lovely patches aside
this is the code that handles localising challenge rules
in the selection UI
i am going to inject some bullshit into this line
this is the only way to do what i want to do it seems
Can I see the rules table in your challenge
rules = {
custom = {
{id = 'nsc_custom_win_ante', value = 10},
{id = 'nsc_selling_card_doubles_future_blinds', value = 'j_joker'}
}
},
jokers = {
{id = 'j_joker'} -- the 'escort'
},
dw though i've figured it out
What'd you change to make it work?
for _, card in pairs(G.deck.cards) do
if card:get_id() > 10 and card:get_id() < 14 then
face_count = face_count + 1
end
end
How do i access the full deck? this only counts the remaining deck. i tried G.full_deck.cards but thats nil
G.playing_cards
[manifest]
version = "1.0.0"
priority = 0
[[patches]]
[patches.pattern]
target = "functions/UI_definitions.lua"
pattern = '''game_rules[#game_rules+1] = {n=G.UIT.R, config={align = "cl"}, nodes= localize{type = 'text', key = 'ch_c_'..v.id, vars = {v.value}}}'''
position = "at"
payload = '''
local locvars = {v.value}
if v.id == 'nsc_selling_card_doubles_future_blinds' then
locvars[1] = G.localization.descriptions.Joker[v.value].name
end
game_rules[#game_rules+1] = {n=G.UIT.R, config={align = "cl"}, nodes= localize{type = 'text', key = 'ch_c_'..v.id, vars = locvars}}
'''
match_indent = true
just a dead simple lovely patch
...which doesn't work hold on
I'm sorry if I'm misunderstanding, but couldn't you have replaced value = 'j_joker' to the localization thing?
no
because j_joker needs to be the ID
for logic
i'm not going to go do a reverse lookup through the localisation tables to figure out what card we're thinking about
this also still doesn't work but i am confident i'm on the right track
thx that worked 🙂 these naming conventions tho XD
Is there a way to make it so that an Enhancement won't show up in Standard Packs?
set weight to 0?
yup ok
here's the working version of the patch
if context.joker_main then
local face_count = 0
for _, card in pairs(G.playing_cards) do
if card:get_id() > 10 and card:get_id() < 14 then
face_count = face_count + 1
end
end
return {
mult_mod = face_count/2,
message = localize { type = 'variable', key = 'a_mult', vars = { face_count } }
}
end
am i dumb? why is face_count/2 not dividing by 2. face_count is 9, yet im getting mult_mod of 9 instead of 4.5???
a few
What's the simplest way? Is it the weight = 0 thingy srockw suggested earlier?
Depending on what you want to do, yes
This might be too strong 🤔
Yeah it's just a blind-specific card that appears in a blind, and disappears when the blind is defeated
It cannot be obtained anywhere else
Then that should work
on that note
does the Card class know its ID?
i.e. j_joker j_mystic_summit etc etc
card.config.center_key yeah
looks like blinds have a defeat method you can use
how can i check if card is debuffed?
card:is_debuffed?
I use if card.debuff then
SMODS.Atlas{
key = 'Jokers',
path = 'Moriah.png',
px = 71,
py = 95
}
SMODS.Joker{
key = 'moriah',
loc_txt = {
name = 'Moriah',
text = {
'{C:chips}+#22#{} Chips and {C:red}+#2# Mult',
'Gain {C:money}1${} at end of round'
},
},
atlas = 'Jokers',
rarity = 3,
cost = 6,
unlocked = true,
discovered = false,
blueprint_compat = true,
eternal_compat = true,
perishable_compat = true,
pos = {x = 0, y = 0},
config = {
extra = {
chips = 22,
mult = 2
}
},
check_for_unlock = function(self, args)
if args.type == 'isaac moriah is 5 years old' then
unlock_card(self)
end
unlock_card(self)
end,
in_pool = function(self,wawa,wawa2)
return true
end,
calc_dollar_bonus = function(self,card)
return 1
end,
}
can someone tell me why the chip-mult values show up as nil?
in game i mean
another mod success!
thx for the help 🙂
SMODS.Joker {
key = 'popBonus',
loc_txt = {
name = 'Populous',
text = {
"{C:mult}+1{} Mult per 2",
"{C:attention}face{} cards in your full deck"
}
},
rarity = 1,
atlas = 'ModdedVanilla',
pos = { x = 4, y = 0 },
cost = 4,
calculate = function(self, card, context)
if context.joker_main then
local face_count = 0
for _, card in pairs(G.playing_cards) do
if card:is_face() and not card.debuff then
face_count = face_count + 1
end
end
face_count = math.floor(face_count / 2)
return {
mult_mod = face_count,
message = localize { type = 'variable', key = 'a_mult', vars = { face_count } }
}
end
end
}
Unfortunately defining weight = 0 doesn't work, the middle card is the Wish Card (the blind-specific card)
SMODS.Enhancement {
key = "diving_bird",
loc_txt = {
name = "Diving Bird",
text = {
"{X:dark_edition,C:white}WISH CARD{}",
"",
}
},
atlas = 'Enhancements',
no_rank = true,
no_suit = true,
always_scores = true,
weight = 0,
overrides_base_rank = true,
replace_base_card = true,
pos = {x=3, y=0}
}
Any insights?
@wintry solar ?
where do prints land?
in the lovely console?
yes they do
okay, next question
when does the game calculate the size of a blind
oh of COURSE
the game calculates it twice
yeah of course why wouldn't it. why wouldn't it
thanks thunk.
you need a loc_vars function that returns the actual variables, refer to https://github.com/Steamodded/smods/blob/main/example_mods/Mods/ExampleJokersMod/ModdedVanilla.lua
https://github.com/WilsontheWolf/DebugPlus
this makes prints show in game
huh neat
among other great features
you can also eval lua code while it's running
neat!!
SMODS.Sound({
vol = 0.6,
pitch = 0.7,
key = "music_corrupted_wish",
path = "corrupted_wish.ogg",
select_music_track = function()
return (G.GAME and G.GAME.blind and (G.GAME.blind.config.blind.boss and G.GAME.blind.config.blind.boss.showdown)) and 2 or false
end,
})
Is there a way to make it so that this song plays during a specific Finisher Boss Blind? The key of the boss blind is corrupted_wish
hey could someone help me with a cryptid crash
see L Corp
What I've seen from L Corp (the Steamodded example anyways) is that they play separate music for regular boss blinds and finisher boss blinds
But I want it to be specific finisher boss blinds
I think they play specific music for specific blinds
i seeee i’ll try this out and see if it works!
but anyways you can always check what's the current boss
What's the syntax?
not much whats the syntax with you?
What
The source code says something like if self.name == 'Cerulean Bell' then
Then should mine be like G.GAME.blind.config.blind.boss.showdown.name == "fm_corrupted_wish"?
No it wasn't
G.GAME.blind.config.blind.key == "b_fm_corrupted_wish"
Ayyy thanks for helping out lemme try
myst the blind whisperer
:3
Like this?
return (G.GAME and G.GAME.blind and (G.GAME.blind.config.blind.boss and G.GAME.blind.config.blind.boss.showdown and G.GAME.blind.config.blind.key == "b_fm_corrupted_wish")) and 2 or false
Not sure and 2 or false is, I copied this entire segment from LobCorp's example on Steamodded
can be shortened it to
return (G.GAME and G.GAME.blind and G.GAME.blind.config.blind.key == "b_fm_corrupted_wish") and 2 or false
hey modders! trying to start the game but it crashes at steamodded, whats the issue? Heres the crash notes
2 or false means the music will be played with a priority of 2 (higher takes prio) if the conditional is met
rename Talisman-main folder to Talisman, Cryptid-main folder to Cryptid
you have an old version of talisman
should be 2.0.2
orrr that
probably a combination of both
ok thanks ill try both
Hmmm it's still playing the default boss blind music, and I do have the ogg file in my sounds folder
Do I have to call the music's key somewhere?
my 2 X mult values are switched (only the text thew acctually code works fine) how can i switch them
The number between the # means which index of the list you return from loc_vars it takes
im fucking stupid
So #1# would take the first value, #2# the 2nd
Balatro and its naming conventions istg
ok so just flip the values
Enhancements is m
Bruh
basically
yo i changed the names of the files and replaced talisman and it still crashes
yep it mworked thank you
Make sure that inside the cryptid folder there isn't another cryptid folder
ok if there is how do i fix that without deleting the folders within said folder
Just copy the cryptid folder inside to your Mods folder, delete the old one
got it
Hi! 2 noob questions :)
What context is used for when a hand is played and how would i go about drawing/adding a specific Standard Card to Hand but not to deck (2,3,4,K,Q,J, etc.)
and 2 or false is unnecessary here
that conditional will never be true
Blind Whisperer I require your services
set_blind = function(self, reset, silent)
for i = 1, 4 do
local front = pseudorandom_element(G.P_CARDS, pseudoseed('bl_diving_bird'))
G.playing_card = (G.playing_card and G.playing_card + 1) or 1
local card = Card(G.play.T.x + G.play.T.w / 2, G.play.T.y, G.CARD_W, G.CARD_H, front, G.P_CENTERS.m_fm_diving_bird, {
playing_card = G.playing_card
})
card:start_materialize({G.C.SECONDARY_SET.Enhanced})
G.play:emplace(card)
table.insert(G.playing_cards, card)
G.deck.config.card_limit = G.deck.config.card_limit + 1
draw_card(G.play, G.deck, 90, 'up', nil)
playing_card_joker_effects({true})
end
end
After I shameless copy Victin's code for giving Blind-specific cards, when I select a card, I get this error:
msg = string: "blind.lua:576: bad argument #1 to 'next' (table expected, got nil)"
Line 576 points to here:
if self.debuff then
self.triggered = false
-- below is line 576 I figured that you'd get a better grasp of where it is used
if self.debuff.hand and next(hand[self.debuff.hand]) then
self.triggered = true
return true
end
Gotcha, thanks for the heads up
as for adding a card, I'd recommend looking at DNA's code, tho I'm not sure how complicated it'll be to ensure it doesn't go to your deck
Much appreciated that helped with the context question :D
rule of thumb, self in the game code refers to G.GAME.blind

so replace all instances of self with G.GAME.blind
not really? self means 'the current object', it's context-dependent
I think i could add an enchantment to it, check for it and then remove all cards from the deck that have the enchantment
self in blind.lua is always G.GAME.blind
sounds highly inefficient though
Oh line 576 points to the source code, not my custom blind
The only instance of self in my custom blind is here set_blind = function(self, reset, silent)
oh "in blind.lua"
(or just check the played hand and after round end xd)
actually you'd just need to create the card, and later on call remove on it
Ah that is much better, i dont have too much clue about the inner workings of balatro yet so i tend to overcomplicate things
what's your blind's config?
Oh wait now I know what's wrong
Anyway thanks a lot srockw :D
My blind was supposed to prep disabling all hand types and the only way to get them back is to play Wish Cards
debuff = {
hand = {
['Pair'] = false,
['Two Pair'] = false,
['Three of a Kind'] = false,
['Full House'] = false,
['Four of a Kind'] = false,
['Five of a Kind'] = false,
['Straight'] = false,
['Flush'] = false,
['Straight Flush'] = false,
['Royal Flush'] = false,
['Flush Five'] = false,
['Flush House'] = false
}
},
But I haphazardly defined it like this and promptly forgot about it

That's why the error was pointing to the debuff part of blind.lua
Alright shit how am I going to do the hand type disabling thingy
kid named The Eye
if self.name == 'The Eye' and not reset then
self.hands = {
["Flush Five"] = false,
["Flush House"] = false,
["Five of a Kind"] = false,
["Straight Flush"] = false,
["Four of a Kind"] = false,
["Full House"] = false,
["Flush"] = false,
["Straight"] = false,
["Three of a Kind"] = false,
["Two Pair"] = false,
["Pair"] = false,
["High Card"] = false,
}
end
Zero idea where to go on from here
Patch into set_blind in blind.lua? maybe?
no need but i also cant help rn gotta get some lunch before studying
Go get yer lunch
I need you to whisper to my blinds in the future
Oh shit if I do this I can just put the cards in the middle of my screen and have them hover there, I can even drag them around and they will stay there
Could make for some nice displays
set_blind = function(self, reset, silent)
for i = 1, 4 do
local front = pseudorandom_element(G.P_CARDS, pseudoseed('bl_diving_bird'))
G.playing_card = (G.playing_card and G.playing_card + 1) or 1
local card = Card(G.play.T.x + G.play.T.w / 2, G.play.T.y, G.CARD_W, G.CARD_H, front, G.P_CENTERS.m_fm_diving_bird, {
playing_card = G.playing_card
})
card:start_materialize({G.C.SECONDARY_SET.Enhanced})
end
end
Also side note, I removed everything past the start_materialize line and the crash is gone
getting this, what's wrong at line 14? this is just for a deck skin
How does one go about making a balatro mod and how does one go about learning the language needed to do it
I’m pretty sure it’s lua but I want to make sure
correct
Probably the Collabs aren't around at that point yet. You probably should be using the DeckSkin api https://github.com/Steamodded/smods/wiki/SMODS.DeckSkin https://github.com/Steamodded/smods/tree/main/example_mods/Mods/DeckSkinTemplate
Are there any resources to learn lua and balatro modding?
My only coding experience was scratch from when I was in school but I was the best in the district
It’s been a while but I could still make a good game in scratch if I wanted to
okay I've done that now it's just not showing up
is the asset folder "assets" or "asset"
and the lua file should be "main" right?
The assets should be "assets".
The mod author should be wrapped in []
ok
Probably the header is invalid without it
now it crashed
Make sure the file for the atlas is named correctly
Is this the wrong channel to earn how to mod/learn where the resources to mod are?
I forgot to fix it in 2x, that's what happened. But now the textures just won't show in game
Is the atlas wrong? It's J/Q/K horizontally
Should I just look up a tutorial
The selection is there, but the cards are blank
Is having a 1x and 2x folder right? I can't find anything
I looked up a tutorial and it looks good
I’d have to download all the things to make balatro mods work on my laptop because I mostly use my main computer for that stuff but it won’t take long
i wanted to try making a consumable that lets you put playing cards in your consumable area (and then take them back out whenever) but there are some unforeseen interactions with perkeo ...
note that the consumable area says 3/2 cards
the "negative" edition on playing cards is actually labeled as "+1 hand size" but it doesn't seem to be doing that when they're in my consumable area. .. would be really funny if they did
technically speaking i could cheat my way out of this one because perkeo says it creates a copy of a random "consumable card in your possession"
so if i made it impossible for perkeo to duplicate playing cards it wouldn't be contradicting the text
or i could just scrap the idea
other interesting thing (completely expected) is that having the foil card in my consumables gives me the +50 chips every hand
yeah I have no idea what to do
I only just got into this so I don't know my way around this
If you fix the negatives being weird then the perkeo interactions could be cool
in order to make it possible to put cards back into hand from the consumable area i wanted to use lovely to add an extra UI definition essentially the same as this one. this uses card.ability.consumeable to check that the card's a consumable, but how could i check that any given card is a playing card?
i guess i could just put not card.ability.consumeable lol
unless that would somehow interfere with other mods
i guess there's no way to avoid interfering with other mods if i'm doing things w/ lovely
Theoretically if it’s neither a consumable nor a joker it’s a playing card
hey guys was here earlier just encountered another cryptid glitch
all my exotics are double overlaying the effects
as you can see
does anybody have a fix
?
Unless some mod manages to add a 4th category
Oh maybe vouchers in the consumable slot
also, i wanted to ask about the dir arguments to a lot of functions such as draw_card, the things that are either 'up' or 'down'. what do those do?
i'm sure there's somewhere i could look this up
haven't read context here but reverie and betmma abilities?
What mod(s) are those from
This Joker is very unpleasant
How would someone:
Create a custom edition?
Create a Joker that edits cards (like Midas mask)?
Create a joker that increases mult or chips per number of cards with a specific edition in the full deck (like Stone Joker or Blue Joker)?
i got this to half-work but i guess i missed a few bits of logic
kind of funny that you can sell the cards
do they add to your max hand size? (bc negative)
oh, nice
i've heard it's a little janky though
im not sure yet about your 1st or 3rd question, and i want those answers too. but i think i can help with your 2nd:
G.playing_cards[i]:set_ability(G.P_CENTERS.m_glass)
G.playing_cards[i]:set_edition({
polychrome = true
}, true, true)
i was trying to give more, but frankensteining 2 of my jokers in discords text area just made spaghetti
How can i with deck advance/skip ante? start them at ante 2 for example
how do i grant booster packs?
how do i grant starting money?
ty!
https://github.com/Steamodded/smods/wiki/SMODS.Edition for editions, as for the other two questions, I recommend you look at the game's code for the jokers you mentioned
somewhat interestingly the cards in my consumable area are counted towards the total in the deck. does that mean i'm doing something wrong or is that how it should work?
interesting
well i'm definitely doing something wrong because when perkeo duplicates cards they aren't added to the deck count
maybe because theyre negative?
because perkeo is expect to dupe consumables not playing cards
selling the holographic 10 does reduce the deck's card count
this is after selling the 10 and then putting the negative copy back into my hand, then finishing the round. the deck says there are 52 cards out of 51
but then the negative ten of hearts doesn't show up here
I should have assets/1x and assets/2x for collab skins right
i did end up drawing the card to my hand later
strange!!
(also i had played it this ante but it wasn't debuffed by the pillar)
Easiest to use in_pool and return false
can anyone help me with this deck?
apply = function()
-- ante = 2
-- money = 25
-- gain 1 jumbo buffoon pack
end
i dont know what variables/functions to use
would it be easiest to create a tag rather than manually create the jumbo buffoon pack? (i'd guess the answer is "no" but it's just a thought)
does anyone having pot of greed card?
i think i saw one the other day in here
as for starting w/ $25 it seems like the yellow deck just sets config.dollars = 10 and there's special code to handle it, so i guess you could have dollars = 21 in your config variable
it draws 2 cards from pile
ill try that
that works 🙂
this is the code that hieroglyph et al use to set the ante, so maybe G.GAME.round_resets.blind_ante = 2 would work ... probably have to be careful though because everything might work differently when the run's just starting
all of this code is hurting my head 😅
and then this is the code that diet cola uses to create the double tag
fancy event & sounds stuff optional. .. maybe
it be like that. i suffered days of headache before i felt i was making progress 😅
(buffoon tag is tag_buffoon)
ok, got the ante increasing, although the blind scores dont update till you enter.
now to try the tag/pack
uhh
it did not like that
apply = function()
-- ante = 2
ease_ante(1)
G.GAME.round_resets.blind_ante = G.GAME.round_resets.blind_ante or 2
-- gain 1 jumbo buffoon pack
G.E_MANAGER:add_event(Event({
func = function()
add_tag(Tag("tag_buffon"))
return true
end
}))
end
what's a "buffon"
--- MOD_NAME: NAME OF MOD (required)
--- MOD_ID: UNIQUE MOD ID (required)
--- PREFIX: UNIQUE MOD PREFIX (required)
--- MOD_AUTHOR: [ARTIST, CODER, Victin] (required)
--- MOD_DESCRIPTION: WHAT IS THIS (required)
--- LOADER_VERSION_GEQ: 1.0.0
--- VERSION: 1.0.0
--- BADGE_COLOR: FFFFFF```
what exactly is MOD_ID and PREFIX?
this is the from the Deck Skin Template
the prefix is a thing added to the id of every joker, consumable, challenge, etc. you put into the game through SMODS
e.g. if the prefix is jmibo and i make a joker w/ key example then the joker would be stored with the id j_jmibo_example
or if you set the prefix to gros and you made a joker w/ key michel it could potentially cause some huge problems .... probably not, i don't know much about steamodded
wait i dont get it why would it
Pulling back from coding, working on ideas for now
anyone know how to retain card bonuses after a card's center gets changed?
i don't know what mod id is for specifically, but i'm guessing it's just a string that you want to be sure is different from that of any other mods
ill just mash numbers then lmao
i would say it's probably a good idea to have it some transformed version of the mod name in case the id is used in diagnostics (debug messages etc.)
yeah that makes sense
hiker's bonus does this, iirc? check how that works :)
I need to sleep, so if anyone is interested in and/or can help with implementing these:
Edition: “Shadow”: On play: If card scores, card is destroyed. Not naturally occurring.
Jokers:
Wisp: On play: Convert all scoring cards into Shadow cards (Rarity: 1)
Umbra: Gains x0.2 mult per Shadow card destroyed (Rarity: 2)
Ghost: Gains +1 mult per Shadow card in your full deck (Rarity: 1)
Penumbra: Gains +20 chips per Shadow card in hand (Rarity: 1)
Phantom: On Blind selected, create a random card with Shadow (Rarity: 1)
Tarots:
Page of Swords: Turn two cards into Shadow cards
Spectrals:
Twilight: Turn all cards in hand into Shadow cards
main problem w/ this idea is that it seems really really situational for a consumable... i wanted it to be another tarot but like saving a card to use it a single time in the future is Not worth $3 usually
the only case it would be useful is on foil/holo/polychrome cards since those have their effects apply when in consumable area (likely a holdover from when joker and consumable slots were merged?)
that happens because consumables are calculate_joker'd
this is for Observatory :)
could someone please help me on how to replace the suit icons in the deck menu with steam modded
perma_bonus transferrs from self.ability, while x_mult and other stuff don't
yes so you'd want to implement a perma bonus-like thing
how to modify starting deck with custom cards?
ok i got it working thanks guys
cute as hell
thanks 😄
idk, seems useful to bench cards to complete those specific hands
Download pls
how to add suit and rank?
where are upload usually done btw?
nexus or gamebanana?
or here?
No clue
Most mods I see are either on Nexus, GitHub, or here
whats nexus?
Nexusmods
ill just upload it here later then i dont wanna make accounts lmao
I wouldn’t recommend looking through nexus really
yeah nexus is... very offbrand...
how to add suit and rank?
Idk
that is picture
it should be this
hey genius it's not helpful anyway
Do you know how to change the sprite for the suit icons in the deck menu?
I want to replace them with custom suit icons
just override the atlas i guess?
I've been trying but I can't get it to work
I'm very new to Lua and steammodded coding
how do i access the number of blinds that have been skipped (tags taken)
how do you make an "upgrade" pop and update a cards description
ive been trying to make something like hiker just to familiarize myself with the codebase and while it is actually adding the bonus chips its not updating visually anywhere
didn't take long to add perma versions of hand xmult, xmult, played dollars, and xchips
how do i remove cards from starting deck, like abandoned. i want to make its opposite royal/noble which is only face cards
you simply do it
There's an example deck in steam modded folder, maybe check that out
the examples only alter cards? not add or remove
@crisp coral I need some tips on how to create more sophisticated blinds and possibilities
- Any functions that can display text like how a Blind displays its description at the start, but I can play it anywhere (ex: certain conditions, low hand count, low cards in deck left, tiny flavour text, etc)?
- Is there a way to display sprites directly on the screen (and also have it persist when exiting the game and coming back)? I concepted a Blind that displays weird symbols on the screen that you must play a specific hand or card to destroy.
- Is there a way to block the player from completing the Blind even if they reached the goal until they meet certain criteria? (ex: destroying all symbols mentioned in the last point)
i've done this already
attention_textis your friend here- You'd want to define a UIBox as a global object when the blind starts (and a function that recreates it when the game is reloaded), a bit convoluted
- possibly! though i haven't gotten around to making a Blind that does that yet (was planned but got scrapped)
check out royal deck here
can you add custom rank/suitless card directly to P_CARDS?
Stone is an enhancement, not a separate playing card
im surprised this isnt an api someone has made already wow
I fear the second point
For the third point, I haven't gotten a deeper look into the source code, but I reckon that there may be a condition that checks whether your score chips have met the goal, and then maybe we could patch in some code to add another condition before winning that blind? Just a hypothesis
That sounds like what you’d do, yeah
well i tried by deepcopying spades of four card and it worked, but partitally
Are there mods that use a global UIBox that I can reference?
You could look at how tags work
They’re just sprites on the screen with a hover effect
You’d just replicate the ui box however many times you need
I see I see
Oh boy there's a lot more to do
Drawing the UIBox, doing the logic for spawning in sprites, and destruction/despawning logic
And making it persist between game reloads
I have somewhat achieved this
dumping the table contents, i made the custom separate playable card
G.P_CARDS["Mista"] = {
["suit"] = "Mista",
["pos"] = {x = 0, y = 0},
["name"] = "Mista Four",
["value"] = 4,
}
I have a couple of effects that debuff Jokers, but if I somehow un-debuff them and debuff them again, they will stack their effects (happens with troubadour, merry andy, etc.) - any idea how I could avoid that?
I use G.GAME.blind:debuff_card for debuffing
and mod.content.set_debuff(card) for determining the outcome
again this crashes
might because of names and suits that are nonexistant
or maybe the number must be string
i think this game crashes because it can't find the translation string
and it was missing custom suit, thus it crashes
example code?
i meant example code this dosen't show example code
it works exactly the same way making a joker does, I get wanting code to save typing from scratch, but if you can understand the process of coding a game object, it won't do anything but that
SMODS.Suit{ -- Ringtails
key = 'Ringtails',
card_key = 'RINGTAIL',
hidden = false,
lc_atlas = 'stupid_cards',
hc_atlas = 'stupid_cards_hc',
lc_ui_atlas = 'stupid_suits',
hc_ui_atlas = 'stupid_suits_hc',
pos = { x = 0, y = 0 },
ui_pos = { x = 0, y = 1 },
lc_colour = HEX('3b0082'),
hc_colour = HEX('3b0082'),
loc_txt = {
['en-us'] = {
singular = 'Ringtail',
plural = 'Ringtails',
}},
in_pool = function(self, args) --Returns true if it's in the pool, false otherwise
--Checks if it's initial deck spawning
if args and args.initial_deck then
return true
end
--Other cases for standard packs
return true
end
}
In any case, here's what a full suit definition looks like
the in_pool is the hard part, and it'll be what you need to mess with for your special case
admittedly I don't know how it interacts with rank, but I'm pretty sure it's documented decently in that wiki page, just haven't needed to do it myself
how do i make localization work? it always says path not found
whats your file structure
Main File
|-assets
|-localization
| |-en-us.lua
|-main.lua
i thought there was a problem with my code so i removed it entirely
whats in your main.lua
wdym?
how to add jokers in deck
just do it
hihi! i'm back on the modding grind, and have two issues with two jokers to fix
- the Ghost Joker doesn't see Tarots that are being sold as not in your consumable slot, but i can't patch that by saying "subtract 1", because i can't know if the selling_card event is being called by another card, eg. Planet
how to give specific card using create_card
- Identity doesn't show the message "Shattered!", even though the code i based it on, the Gros Michel, correctly says "Extinct!" and "Safe!" using the same method
none of my jokers show any kind of message when i try 🙏
you can create a random type of consumable with:
local newCard = create_card("Spectral", G.consumables, nil, nil, nil, nil)
newCard:add_to_deck()
G.consumeables:emplace(newCard)```(example for Spectral)
though i can try to find an example of creating a specific kind
use smods functions
yh
not you
i just agreed with you
yeah fs smods docs have gotten way better lately
ftr @ revo @ ghostsalt i can get messages to appear by doing
return {
extra = {message = localize('k_upgrade_ex'), colour = G.C.MULT},
colour = G.C.MULT,
card = context.other_card
}
code copied straight from base game hiker with a few variables tweaked but it seems to work (although i imagine you probably want to change the message and card reference)
i'll try
ya i've tried that, but two things:
- i don't want to localise this yet
- the method i'm using works with Gros Michel and Cavendish
code-dump incoming ^^
you dont have to localize
SMODS.Joker {
key = 'identity',
loc_txt = {
name = 'Identity',
text = {
"Create a {C:spectral}Spectral{} card",
"when {C:attention}Blind{} is selected",
"{C:red,E:2}self destructs{}"
}
},
rarity = 1,
atlas = 'Phanta',
pos = { x = 1, y = 0 },
cost = 6,
blueprint_compat = false,
eternal_compat = false,
calculate = function(self, card, context)
if context.setting_blind and not context.repetition then
G.E_MANAGER:add_event(Event({
func = function()
play_sound('glass' .. pseudorandom_element({'1', '2', '3', '4', '5', '6'}))
play_sound('timpani')
local newCard = create_card("Spectral", G.consumables, nil, nil, nil, nil)
newCard:set_edition({
negative = true,
})
newCard:add_to_deck()
G.consumeables:emplace(newCard)
card.T.r = -0.2
card:juice_up(0.3, 0.4)
card.states.drag.is = true
card.children.center.pinch.x = true
G.E_MANAGER:add_event(Event({
trigger = 'after',
delay = 0.3,
blockable = false,
func = function()
G.jokers:remove_card(card)
card:remove()
card = nil
return true;
end
}))
return true
end
}))
return {
message = 'Shattered!'
}
end
end
}```
try doing extra = {message = 'Shattered!'} instead in the return?
if you look at my code the message is in an extra var
& card location bc other_card probably crashes here
Mail-In Rebate
context.setting_blind does not support message returns
use card_eval_status_text function
ah ^^
how to give specific card using create_card
your question was already answered, use a utility function instead
(it's funny that you're formatting that question like a google search :>)
the 7th parameter is forced_key, you can pass a card's key there
^
me?
how would i go about adding something to the description of playing cards (like the bonus chips of hiker)
bingo!! that worked, thanks!!
one of my jokers does something similar but with bonus mult and while mechanically the entire system works, i cant find a way to get it to actually display
just #1 to work on now
hmm, sounds difficult — i think the extra chips are displayed using the method Bonus cards use
but that's from instinct
soo create_card('Joker', G.jokers,nil,nil,nil,nil, "j_mista") is work?
wait how to use this
spamming nils until 7th parameter
i dunno, ctrl+f the card.lua file and find out
when you're not using SMODS.create_card
i tried that lol, i have a bunch of patches that inject around mentions of card_extra_chips (locale string) and i basically just duplicated the code but with my variables and i get nothing
hey i think i fuck up on this, im trynna make a mail in rebate style walkie talkie
@wet sand to do with your display issues, message goes in the main table, not an extra sub‐table
i mean thats what it is in my code right now and it works /shrug
hmm, my variable isn't being set for some reason
SMODS.Joker {
key = 'identity',
loc_txt = {
name = 'Identity',
text = {
"Create #1# {C:dark_edition}Negative{} {C:spectral}Spectral{}",
"cards when {C:attention}Blind{} is selected",
"{C:red,E:2}self destructs{}"
}
},
config = { extra = { no_of_cards = 2 } },
rarity = 1,
atlas = 'Phanta',
pos = { x = 1, y = 0 },
cost = 8,
loc_vars = function(self, info_queue, card)
return { vars = { card.ability.extra.no_of_cards } }
end,```even though i have this code that *should* set it
(in fact, i just took it out of the extra table and it proceeded to not work)
card.ability.extra.no_of_cards
joker lifts stuff from both these jokers
i ont know whats goin worng
you missing context checks
you're gonna want something like
if context.cardarea == G.play and context.individual then
also you're not returning anything, you're setting the global mult variable to 8
your config is set up wrong as well
this was fixed
ah oops my script doesn't say that, i edited it incorrectly
fixed
that's what my script currently says
yeah looks good
at the beginning of the calculation?
yes
otherwise you're triggering every context and looking for an other_card
which may or may not exist
humhum, i don't quite get what's wrong with it
it looks like all the other Jokers with variables defined
hmm, maybe it's undefined when blind is selected?
you can also return card = card for proper juicing
i'm gonna change it to the end of the shop for now and see if that works
it looks stupid as hell but it's correct
it's what Perkeo does so i think it'd make more sense
you mean after the mult, probably yea
as long as it's an entry in the return table you're good
ill try it now, thanks a lot :)

this is my stuff rn
oh. nevermind.
locvars i believe
in ur loc_vars, u have self.ability
self is the center here
yeah what they said
*they
sorry
this is even weirder, the ability text works fine, but it still thinks it's nil
yeah... what about it
ah pfffft. nevermind, i'm a moron :)
there was another card.ability.extra. i was missing :>
self almost always refers to the prototype object in smods code, card refers to the actual card you are interacting with
what does shuffle_card look like
perfecto, Identity works!! now to fix Ghost Joker
what
what o you mean what oes it LOOK like
it looks like text?
i screenshotte it right there
well the mail in rebate one has mail_card
since this is called deck shuffle i made it shuffle_card
right
ye




