#💻・modding-dev
1 messages · Page 465 of 1
key = "go_fish_pack_1",
name = "Go Fish Pack",
cost = 4,
atlas = 'Jokers',
weight = 2,
pos = {x = 1, y = 1},
group_key = "go_fish_pack_group",
draw_hand = true,
discovered = true,
loc_txt = {
name = "Go Fish Pack",
text = {
"Go fishing for a random",
"{C:blue}Fish Joker{} to add to your deck."
}
},
ease_background_colour = function(self)
return ease_background_colour_blind(G.STATES.SPECTRAL_PACK)
end,
particles = function(self)
G.booster_pack_bubbles = Particles(1, 1, 0, 0, {
timer = 0.1,
scale = 0.5,
lifespan = 4,
speed = 2,
attach = G.ROOM_ATTACH,
colours = { G.C.BLUE, G.C.WHITE},
fill = true
})
end,
remove_particles = function(self)
G.booster_pack_bubbles = nil
end,
create_card = function(self, card, i)
return {
set = "GO_FISH_RODS",
area = G.pack_cards,
skip_materialize = true,
soulable = false,
key_append = "go_fish"
}
end
}
this is mine without your issue
hmm i dont see the particle effects in that
skip_materialze fixed it for me when i was coding mine
oo
this is free money Btw
how could this be!
how can u hate XChips??
yeah i deadass pinged someone called Mods
tbf i did type @mods and it didnt work
yeah the role mention basically never works
oh welcome back to purgatory
hello, have you practiced proper patch hygiene?
i prefer hook hygiene
as in, im going to cleanse the world of hooks #patchesforlife
i guess ill just ignore this problem for now since its just like a design thing and not gameplay thing, but i need to figure it out eventually haha
wait is this not... what you all do?..
let me xChipsiply my chips
you seem smart, could you perhaps help me?
on the contrary, let me xMultiply my mult
multiply is a real word
what do you want, creature of the deep
say that again...
say that again
fix whatever is broken here
well, it had an x in front of it
idk sorry but good luck
damm
lmk if you have issues with patches
oh yeah that guy keeps kicking me off cliffs
just remembered tomorrow is my free day. yaaaaay !
dw nobody likes doing ui stuff, its a pain in the ass
I lerned what patches are today and they dont rly seem usefull for me rn, but when I will need use them, I will make sure to ask you abt it
yeah from what I saw ur right
WHAT
theyre peak
#patches4lyfe
okay yeah maybe theyre not too useful in that case
yeah
I was looking in the console to maybe find something and I can even find that my mod was loaded?
it works but there is no trace of it in the console, how does that work
that looks like localization errors
what's your config ui definition
wdym?
show the part of your code where you define this interface
for some reason, legendary jokers dont show up in my booster pack at all despite i put their rate to 0.25 (which should make them generate naturally)
all that is relevant to it
then this
what do you return in create_card
remove the localize around the labels
idk if you want this too
if you're not gonna localize
what does localize do?
Localize looks at the localization file of the selected language for the string you pass it
thank you
it's better to have the system to allow others to localize your mod in other languages if they want to
but yeah, it'll work without it
I have no idea how to use localize so I will leave it be for now
is there a way to check if the buttons actually do anything?
if you have debug plus open the console and type eval ReZeroMod.config
you should see the values change in real time
you could make the 25% chance here
debug plus is a mod?
so that if you hit the 25% chance add legendary = true to the return
wha
that
i dont think that would work
Okay, good progress so far
Why not
dunno
it just seems like the thing that sounds plausible enough but end up not working
It's not murphy
I think it'd work
can you send your entire booster pack definition
How do I use localize() to get an enhancement name?
the weight being 999 is for testing
localize { type = 'name_text', set = 'Enhanced', key = 'm_lucky' } for example
The buttons work! but Idk why I have "dissable" and "disable"
cus you probably had it misspelled beforehand
maybe you accidentally named something wrong
you can delete Balatro/config/your_mod.jkr to reset that
(make sure to delete it when your game is closed)
you gave me a mini heart attack 😔
where did you define the rates you sent before?
in the objectType
try using weight instead of rate
bump
I deleted it and it showed up again, so its still misspelled somewhere?
You should close the game, delete it and then reopen the game
thats what I did
your config.lua in your mod doesn't have them anymore right
the misspelled ones? no
i'm not sure why that didn't work
that works!
maybe it saved somewhere else
should it?
to my knowledge nop
ultimately this isn't an issue btw
the values being there won't affect anything if you don't use them anywhere
and they won't even exist for new users of your mod
ur right
Thx!
is there a way to change the debug+ console bind form "/" to " ` "?
line 462 in debugplus/console.lua in the DebugPlus Mod folder
should I change only the '/' or also in the kp
just change one it dosent make a difference
you are just either replacing normal / or the / on the numpad
ohh
question
Hey does someone know how I can make text inputs (create_text_input()) also accept .
and whilee im at it
how do i reload the config window?
(like after pasting i want the text to update in the text input)
it was in line 498 for me (?)
other release maybe
oh yea
is it possible to have a joker that retriggers a joker that is adjacent to it? i guess kind of like blueprint but instead the joker itself just retriggers
Yes.
any ideas of how that would work or examples?
how do I add tooltips to a joker?
how do you get the amount of slots in a cardarea again
if context.retrigger_joker_check then
local other_joker
for i = 1, #G.jokers.cards do
if G.jokers.cards[i] == card then other_joker = G.jokers.cards[i+1] end
end
if context.other_card == other_joker then
return {repetitions = 1}
end
end
area.config.card_limit?
thank you !
thx
Sorry to spam the chat but I want to turn off the textures that the mod adds if the value of a variable is true, could someone explain how to do that?
because in my mind I would just use
if x = false
load textures
but im 100% sure it wont work + I lerned a bit of coding in python, idk anything abt lua
-- load textures```
so like this?
SMODS.Atlas{key = "Tarot", path = Filename, px = 71, py = 95, prefix_config = { key = false } }```
Make them stackable
whats this part of the code for?
wdym?
Like playing cards?
this makes it so your atlas is not using your mod prefix
so you're replacing the vanilla Tarot atlas
makes sense
I mean, what kind of stacking?
Like playing cards but the card you’re hovering over gets highlighted automatically znd when you hover over a new one it highlights the other one instead
I was planning using click to select "tab", actually
is there a way to detect wheel of fortune failing without overriding anything?
What would be the best way to swap the enhancement effects of two enhancements? Like if I wanted gold and steel effects swapped.
to change the textures I need to reset the game?
it doesnt load the textures now, it doesnt matter if the x is true or false
You know, that looks great
Yes, in the next smods release you can hook SMODS.pseudorandom_probability
the next 🥺
how would i change every card in deck to a certain suit? like sigil but the whole deck
and it's not random
can probably go through g.deck.cards and change_base no?
how do i do that
Isn’t it Context.playing_cards ?
it's a consumeable
Check vanilla remade code for checkered deck
Here's how looks 25 tabs, which is already huge amount, no idea what you need to do to spend 25 tabs
This also an option, but personally more like rotated 
for k, v in pairs(G.playing_cards) do
SMODS.change_base(v, "Suit")
end
rotated does look nicer
bump
how do you currently load the textures? disregarding any config
SMODS.Atlas{key = "Tarot", path = Filename, px = 71, py = 95, prefix_config = { key = false } }
okay and lemme see your current config file
this?
and your ui file?
how abt an option for either or?
I'm thinking about this yea
also i cant wait to see how u do allat ui stuff, i havent rly played abt with it but it looks so cool!
okay i think i figured it
your missing callback args in the create_toggles
which requires you to create functions for the behaviour u want
wdym?
for each node youd need
n = G.UIT.R,
config = { align = "cm", padding = 0.01 },
nodes = {
create_toggle({
label = 'Disable ReZero Spectral card skin',
ref_table = ReZeroMod.config,
ref_value = 'disable_spectral_skin',
callback = 'disable_spectral_func'
and then youd need to make a
your function code here
end```
nah youd put it in the ui file
it doesnt really matter as long as you load the file but its more organized in your ui file
in all honesty, im not too sure what kind of behaviour toggles return on click, so im not too sure what youd check for in the function
id take a look at other mods/texture packs with configs
Hello, I try to make a deck that after each hand played, every played card value goes up by 1 (Like strenght), the function to up de value work, but not the context, if someone who knows more than me is welling to help me.
Here is my code:
SMODS.Back{
key = 'Aging',
loc_txt = {
name = 'Aging Deck',
text = {
''
}
},
calculate = function (self, back, context)
if context.cardarea == G.play and #G.play.cards >= 1 and context.after then
for i = 1, #G.play.cards do
local _card = G.play.cards[i]
local rank_data = SMODS.Ranks[_card.base.value]
if rank_data and rank_data.next and rank_data.next[1] then
local new_rank = rank_data.next[1]
SMODS.change_base(_card, nil, new_rank)
end
end
end
end
}
the wiki doesnt hint at much either
i could be wrong but im not sure that the cards stay in G.play during context.after
So it would be a context.final_scoring_step
could it not be if context.after and #G.play.cards >0 then
Hi N, do you perhaps have an idea of how to do that?
no
even the vascouus N' doesnt dare enter the realm of... ui coding
from what I saw his Ui is very well done
would it not just be loading files in a .config var was set to true?
i would try just this
calculate = function(self, back, context)
if context.after then
for _, pcard in ipairs(context.full_hand) do
assert(SMODS.modify_rank(pcard, 1))
end
end
end
Yes it is, thx, now it is a graphical problem, When i play a 2, it immediately become a 3, but still score 2.
yeah well idk how to "just" load the files
would it not be assert(smods.load..blahblahblah)
no, that's done when the mod loads
but yeah, n's right, go with malverk
Hi. How do i get the version of the mod again?
when you do an function dont you need to put () or : ?
couldnt find anything online
or smth like that?
wdym
but im alredy halfway there
when creating one like you are use function funcname(args to pass in)
It also work, in a much smaller way than mine, thx a lot.
did that solve the animation problem?
No
try that
if context.after then
for _, pcard in ipairs(context.full_hand) do
G.E_MANAGER:add_event(Event({
func = (function()
assert(SMODS.modify_rank(pcard, 1))
return true
end)
}))
end
end
It is perfect.
// Mods/your_mod/your_mod.json
{
"id": "blackcards",
"name": "Black Cards", // [required]
"author": ["GeigerCounter"],
"description": "Black card faces with brightly coloured suits.", // [required] ! To use more advanced typesetting, specify your description as a localization entry at G.localization.descriptions.Mod[id]
"prefix": "blackcards",
"main_file": "main.lua",
"priority": -20,
"badge_colour": "FF230A",
"badge_text_colour": "ABC123",
"display_name": "BC",
"version": "~1.0.0",
"dependencies": [
"Steamodded (>=1.*)",
"Lovely (>=0.6)",
"Malverk (>=1.*)"
],
"conflicts": [
],
"provides": [
],
"dump_loc": false // !! Not for use in distributions. Writes all localization changes made on startup to a file, for conversion from a legacy system.
}
Is there a problem with my manifest? My mod isn't showing up.
the comments have to be removed
huh ok
what arguments do i put in ()?
like get the mod version from its metadata
shouldnt need any
It still isn't working
SMODS.Mods["modid"].version
so why does it demand "("
is there a thing for like border radius in ui nodes?
it just does 🤷♀️
yes, r
Hi, pretty new to modding
If I wanted to iterate through all existing jokers, what's the list I'd need to iterate through? The endgoal is to get all jokers that aren't perishable compatible
I thought I could iterate through SMODS.Joker but apparently not
G.jokers.cards
it wants "SMODS" in SMODS.Atlas in brackets (huh?)
for i,v in ipairs(G.jokers.cards) do
G.P_CENTERS and check for v.set == "Joker"
oh right, then youll need to pass in SMODS me thinks
G.P_CENTER_POOLS.Joker
I found 2 issues
1st one is that the function is called disable but it enables the skin but thats an easy change
2nd one is that (i have no idea what it means)
when u have an error like that u need to go into the lovely dump files in your mods folder and go to that file then that line
then check for whatever function or other causes the crash
This one worked, thanks! 
let me see the node in the ui again
see what?
the button
im gonna be honest im kinda stumped
to specify the error ocures when I click on the toogle
N' is right
callback = disable_tarot_func(your args)
"your args" is?
i think SMODS? since you passed that in right?
without the (your args) part
that would make sense
callback = disable_tarot_func
and then
function disable_tarot_func(ref_value)
N' is one smart cookie
well maybe not "and then", they need to be in the opposite order
it doesnt crash anymore
now all I need is to reset the game (otherwise the textures dont change, i think)
nope
{
"id": "blackcards",
"name": "Black Cards",
"author": ["GeigerCounter"],
"description": "Black card faces with brightly coloured suits.",
"prefix": "blackcards",
"main_file": "main.lua",
"priority": -9999998,
"badge_colour": "FF230A",
"badge_text_colour": "FF230A",
"display_name": "BC",
"version": "~1.0.0",
"dependencies": [
"Steamodded (>=1.*)",
"Lovely (>=0.6)",
"Malverk (>=1.*)"
]
}
``` Lovely says `bad argument #1 to 'match' ( string expected, got nil)`
Today has been... "fun"
they do
guaranteed*
...
I need new glasses, ty
thats not how take ownership works
you were closer the first time i think lol
the problem is that idk how to take ownership of an entire consumable type so i cant give you an example
im gonna be honest with this, if you need to keep asking about syntax errors i would just switch to malverk
yeah
Ok new problem
The goal was to get all non-perishable jokers in the game, to then pass the list to a challenge's banned cards, since it'd be annoying to put them manually (also it'd allow for the list to be dynamic with other mods). But it seems that the functions runs before jokers are injected into the game, and so it stops at Wee Joker (i've tested printing the whole list during a run, and I have about 60 non-perishable jokers total, so much more than the base game's 18). Hum any idea how to fix that? Or is there no way and i'm forced to put the list manually?
i dont think there's a way to do it in the challenge definition
you might be able to do it by patching the part that bans the cards and the part that shows them on the menu
personally i would patch/hook the part that bans the cards and just write "Non-perishable Jokers are banned" as a custom rule
I feel I've asked this here before but: how can i tell if a card is debuffed?
if card.debuff
That should be my last stupid question for now, ty
this freezes the game upon triggering
so why doesnt this work...
how do i fix this visual bug?
(this is after calling level_up_hand)
Use SMODS.smart_level_up_hand instead.
still freezes
It worked first try, thanks for the help
it's quite ugly but whatever lol
goodness gracious
can i see the code
@hallow moat
.
.
end```
should iterate through every tag the player has
yooo using my button color pr
does it hard crash
so, we could put something like:
if v.key == "tag_double" then
(CODE)
end
end```
and anything where (CODE) is should run for each Double Tag the player owns
no it just freezes
does anyone have an idea why my game crashes on hovering the joker?
still freezes
that usually means the node is nested too deep
i dont think you need a root in main_end
no idea then sorry
still getting the same crash
thought it was a cool idea to put my badge color for my challenges
that means the node is still nested too deep
now its only in a column node
try just
main_end = {
{
n = G.UIT.C,
config = { colour = G.C.RED }
}
}
its the function that freezes the game
so something here causes a freeze but idk what
is there a way to check another mod's config?
trying to only have something enabled if talisman is on bignum or higher
SMODS.Mods.the_other_mod_id.config
no crash now, but there isnt any visible output
weird
you have one too many pair of brackets
the blue ones right after main_end
what would that be to check talisman's numerical limit?
idk what talisman's config looks like
hm?
now you're missing one pair
G.TIMERS.n_round is a thing?
actually this one might be correct
I was basing it off what N sent but i'm not sure anymore
nope thats my custom timer
no it is missing a bracket
where abts?
wrapping the whole thing
i think i already tested that
and what does it do
well no crash, but no visible output other than a blank line
so im assuming the row node works but the others dont?
try giving the first text node a color
ok so it's a video encoding issue it seems
How does retriggering cards of a specific suit work?
still nothing
im looking at my main_end code and its the exact same format but with a C node instead of an R node
how would i go about levelling up a random hand/ a specific hand. is there any good jokers i could look at that do this or is it just simple
nothin
oh, this made me notice that my main_end code breaks with multiboxes :p
burnt joker?
is that good news for me :D
no, it works for me with your format
it's just that my text was supposed to be in the second box but main_end works in the first
i didnt test it after switching
burnt joker levels up hand discarded tho, i was just wondering if there is anything fucky i have to do to level up specific/random hands or if its straightforward
you never know with smods (i love smods)
is there a way to get vscode to stop complaining that SMODS and stuff don't exist
i just uninstalled the lua extension lol
i think those both colors doesn't exist?
you just need to return level_up but there's also SMODS.smart_level_up_hand
im not sure if smods added custom colors
but i like it there
oh yeah thats it
you can make a .vscode/settings.json in your project folder
and put what in there
idk abt in text formattion but i have some known G.Cs
and then set "Lua.workspace.library": ["../smods"]
Or whatever your steamodded folder is called
i thought G.C.ATTENTION and INACTIVE were there by default no?
shit gotta love balala modding
i have NO idea what I'm doing wrong
right
you are meant to do local _is_face = Card.is_face and call it later
there we go
when you return you wanna do return _is_face(self, from_boss)
whats the thingy for background colour in node styling :p
didn't work and the actual thing complains about this
which lua extension do you have
this is for the one made by sumneko
like blueprint?
you need a column/row node with a colour
center?
you loove centers
i do love centers
i have selene but i realised that might be the issue and I'm getting the right one now
nah it'll happen with all
do u happen to know what the defualt border radius of XMult is in joker descriptions?
just wanna let you know that u are the goat, always see you in here and idk how you attained so much smods knowledge you must have sold your soul or something
try 0.05
im just in here reading what other people say and read every smods commit
i just watch N and sometimes ill say hi to him
when I first started learning I would be in this channel helping people by repeating what other people said
same
I figured if I was wrong someone else would be quick to correct me
AND regardless of whether or not I even have that card 😭
genuienly what the fuck 😭
lgtm
no, this looks bad to me 😭
this happens when you don't have the right chain of columns and rows
can you send what it looks like rn
the code I mean
r=0.05, res=0.15, padding=0.03
is there a way to increase ante scaling on the fly
like how plasma deck does it but mid run
sorry for low res
nevermind
maybe hooking this?
ah, i was scared id have to do that, thank you
What do you want this to look like?
the time and the currently text on top of each other?
well not on top, but as two lines
(Currently: #1#X Mult)```
Yeah so you want your main_end to look like
Column:
- Row (for the time stuff)
- Row (for the mult stuff)
ew it looks bad here
when you want to put stuff inside a row/column that element has to be inside a column/row respectively
so change the top node here to a column?
card:is_suit("Hearts")?
main_end = {
Column {
Row {
Column {
Text "Time = "
}
Column {
Text "some number"
}
},
Row {
Column {
Text "(Currently"
}
Column {
Text "some number mult)"
}
}
}
}
I think this is the best way I can put it, ignore that this isn't valid lua code (well it could be)
to this
I'm also not an expert on UI so there probably is a better way
thats the best way afaik
Would be if valid if it wasn't missing a dozen equal signs.
it didnt work u.u
right it's missing commas
works perfect now thx
yw
not really
each table is just an array
Oh ok
fictional UI code to save our sanity
if Column, Row and Text were functions it could work
Yeah this is how jetpack compose works for Android apps
it's in kotlin but it works similarly
it kinda looks cleaner too when without config ;>
If I ever use lisp, I'll probably go insane
would there be any merit to it, once you start adding config it'll be just as bad
idk looks clean tho
without config it is
I literally just did the same thing
local function create_element(type, data)
local element = {
n = type,
config = data.config,
nodes = {}
}
for i, v in ipairs(data) do
element.nodes[i] = v
end
return element
end
function Column(data)
return create_element(G.UIT.C, data)
end
function Row(data)
return create_element(G.UIT.R, data)
end
function Text(data)
return {
n = G.UIT.T,
config = type(data) == "table" and data or {
text = data,
colour = G.C.WHITE
}
}
end
lol
Even with config it's probs cleaner overall
are we going to invent a new way to define ui now lol
i mean thats what i do in jokerdisplay
how would i debuff cards with a joker?
honestly yeah
SMODS.debuff_card or context.debuff_card depending on the effect
and how would i get the table containing all cards held in hand?
G.hand.cards
if context.before then
SMODS.debuff_card(pseudorandom_element(G.hand.cards, pseudoseed("ok")))
end
if context.joker_main then
return {
xmult = 3
}
end
end
}
this crashes the game for some reason, any help?
debuff_card takes more than one parameter
ohhh
card, bool, string iirc
It needs to be SMODS.debuff_card(card, true, "source")
does anyone know the keyword for context.other_card for debuffed cards
Played debuffed cards don’t score.
so how would i go about making a joker do something when a debuffed card is scored
or, well, "scored"
you would need to loop through each card in context.full_hand and check if it is debuffed
like this
_ goes there
it's a chip scaling joker that scales when a debuffed card is scored
what does the underscore mean
replace the print with the scaling then
ok
oh also context.cardarea == G.play is not what you want
that will trigger in a lot of contexts
use context.before or context.joker_main
how do i check when a certain consumable has been used?
i thought context.before triggers the upgrade before the hand is played, like with runner
do you want it after?
i want it to upgrade when the debuff card goes off like with wee joker
oh thats hard because they dont get passed to the individual contexts
damn..
saturn's key is c_saturn right
yeah
calculate = function(self, card, context)
if context.debuffed_individual then
return {
dollars = card.ability.money
}
end
end
this is a function that gives money when a debuffed card is scored, maybe you could modify it?
hmm let me see
that doesnt exist
maybe cryptid or something adds it
but it's not a regular thing
it's from the undertale mod, i just remembered that a joker i had did something with debuffed cards
then they would also need the hook or patch that adds that
juice_card_until
look inside
juice card while
Remind me how to check if i have a joker in my collection?
like if i had bought a joker?
yeah it doesn't do anything unfortunately
i kept the context.cardarea == G.play function and it sorta worked
but it only upgraded the corresponding amount of times after the hand was scored
not when each individual card scored
well i would check how the undertale mod does it
i'm trying to find a definition for it but it seems like it's just calling steammodded
let me copy this joker code and see if i can run it independantly of the ut mod
hmm okay it doesn't work independant of the ut mod
How do I use this/where do I input this?
i mean, what exactly are you trying to do
Gain a comical amount of double tags via the infinite money loop with perkeo and count how many double tags I have
I have minimal coding/modding knowledge, I was just referred to the modding chat for an answer to my question
this might seem like an odd question butlike
how do i return the music volume via code
Looks like its a lovely patch in the joker.toml file that adds the debuffed_individual context in the ut mod
Ok, so had to set this down for a while today, but can anyone tell me why, when I discard with this deck, it destroys the cards, then crashes with this error when anything is played?
functions/state_events.lua:766: attempt to perform arithmetic on global 'hand_chips' (a boolean value)
code inside the deck:
calculate = function(self, back, context)
--Checks if end of round, and the round was a showdown boss
--context.main.eval prevents context.end_of_round from triggering repeatedly.
--unknown why this is, Balatro be Balatro?
if context.end_of_round and context.main.eval and G.GAME.blind.config.blind.boss.showdown
then
--For each card in the deck...
for index, value in ipairs (G.playing_cards) do
--...if it is a seven...
if value:get_id() == 7 then
--...increment count variable.
tally_sevens = tally_sevens+1
end
end
--If count variable is anything but zero, end the game in a loss.
if tally_sevens >= 1 then
G.STATE = G.STATES.GAME_OVER
G.STATE_COMPLETE = false
elseif tally_sevens == 0 then
--If count variable is 0, you win.
G.STATE = G.STATES.GAME_OVER
G.STATE_COMPLETE = true
end
end
return true
end
nvm found it
that's what i thought was happening, but i don't know enough about lovely patches to know if that's what was happening
Not calling any destruction effects anywhere, so I'm very confused
but do I input this into a command console or something? I have the debug mod.
are there like
blank templates for various images?
e.g. cards, jokers, decks, blinds, chips, etc etc
if not i am going to make them
https://discord.com/channels/1116389027176787968/1224362333208444989
there's some in this thread, but sharing your own would be nice
I always build off a template file I've made.
I'm sorry for the hassle, can you please explain to me like I am a little kid, step by step what I would have to do?
I have a template for spectral, enhance, and cardback. They're in aesprite format, I can export them to PNG if they'd be useful.
if you're trying to add a modded thing, you'd use the code i sent
otherwise, i'm not entirely sure how to do it in debugplus
ok, so I would have to add/create my own mod to count the double tags?
i suppose you would
k
Templates for 1x-sized spectral cards, decks/backs, and an empty enhancement template. If I make the others eventually, I'll post as well.
how do localization files work? do i need to load it from my main.lua, or do i just need to have it in ./localization/en-us.lua
so far i have this and it's not workin
you just need to have it there but jokers go in descriptions.Joker, not just Joker
No need to load it, it'll load based off of what language is selected in game. Two things I can suggest from my localization file, mileage may vary:
- Check your keys. Might be an issue with a typo in them.
- I pasted the whole empty localization structure into my file and put stuff where it belonged. Maybe it needs the full structure to function properly?
if context.setting_blind then
local card = create_card(nil, G.consumeables, nil, nil, nil, nil, 'c_lovers', 'NaturesTouch', false, "e_negative")
card:add_to_deck()
G.consumeables:emplace(card)
end
why doesnt it generate negative lovers?
why does this say nil in nil?
smods bug
like this?
sorry i mean descriptions = { Joker = {
Like this: Drop that all in the Joker section
any reason why this doesnt error out for the edition, but does for the enhancement? ('attempt to index local "center"')
poll_enhancement takes a single table
also that's not how you use SMODS.has_enhancement

it would be if not next(SMODS.get_enhancements(v))
the problem is not the next necessarily, has_enhancement checks for a specific enhancement
you need get_enhancements to check for any
ah, makes sense
Did i do my code wrong?
replace all of that inside the context check with SMODS.add_card{key = 'c_lovers', edition = 'e_negative'}
So, is there a place (either in source code or compiled online somewhere) where all the G.GAME.<x> , G.STATE.<x>, etc objects are? Are these vanilla references or is this something Steamodded created?
After typing that out, I realize it may not be that simple...
vanilla
How to i implement exponential mult and chips with Talisman?
Ok thanks
You return emult and echips as numbers.
ok
make the s colored
yea ok
Yeah
How could I check the seal of a playing card? Cause I think my current method of using card:get_seal() isn't working
yeah uh there's very clearly something wrong with what I'm doing but I have no idea
was just modifying vanillaremade's strength
highlighted is an array
when playing a debuffed hand it says "table expected, got nil" for the ipair thingy
Anyone know why this doesn't draw if the joker has an edition? (excluding foil)
draw = function(self, card, layer)
if card.config.center.discovered then
if (layer == 'card' or layer == 'both') and card.sprite_facing == 'front' then
local scale_mod = 0.05 + 0.05 * math.sin(1.8 * G.TIMERS.REAL) +
0.07 * 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.1 * math.sin(1.219 * G.TIMERS.REAL) +
0.07 * math.sin((G.TIMERS.REAL) * math.pi * 5) * (1 - (G.TIMERS.REAL - math.floor(G.TIMERS.REAL))) ^ 2
local image = Sprite(0, 0, 71, 95, G.ASSET_ATLAS["willatro_WillatroOrgans"], {x = 1, y = 0})
image.role.draw_major = card
image:draw_shader('dissolve', 0, nil, nil, card.children.center, scale_mod, rotate_mod, nil,
0.1 + 0.03 * math.sin(1.8 * G.TIMERS.REAL), nil, 0.6)
image:draw_shader('dissolve', nil, nil, nil, card.children.center, scale_mod, rotate_mod)
end
end
end
return G.hand and G.hand.highlighted[1]:get_id() == 12
if not (G.hand and G.hand.highlighted) then return false end
for k, v in pairs(G.hand.highlighted) do if v:get_id() ~= 12 then return false end end
if #G.hand.highlighted > 0 then return true end
```?
thank you
it works
except for the fact that i can use the card when no cards are selected
wait i think i know the solution
if SMODS.has_enhancement(card, "m_wild") and next(SMODS.find_card('j_batrocities_NaturesTouch')) then
return {
SMODS.debuff_card(card, 'prevent_debuff', 'debuff_WildCard')
}
end
is this code right? i want to make wild cards not get debuffed, i also dont know where to put this
yea ok i just had to #G.hand.highlighted <= 0 since G.hand.highlighted always exists
i've been told it would be difficult, but is there a way to make the debuff cards trigger the joker when they score, like with wee joker?
because as is, the joker doesn't give its chips until the next hand played, and it just visually isn't as nice
You would have to patch SMODS I think.
how so
@vast orchid I saw you on the besteon/balatrobot github. I am @stirby. Would be open to chatting about the repo sometime, as I think there are some incomplete sections and race conditions. I've been struggling through the code a bit.
wdym like with wee joker
anyone know how i can fix this?
doesn't wee joker upgrade when scored and not actually add the chips whenever its scored
it adds the chips you accumulated at the end of the hand is what i meant
No.
what did i do wrong?
SMODS.current_mod.set_debuff = function(card)
if SMODS.has_enhancement(card, "m_wild") and next(SMODS.find_card('j_batrocities_NaturesTouch')) then
return "prevent_debuff"
end
end
got the enhancement additions to work, but this appears to also overwrite cards with current enhancements, any suggestions?
What is the goal?
if a card does not have an enhancement, there is a 1/10 chance to add one at random when played and before scoring
You should be checking for not next(SMODS.get_enhancements(v))
the curse strikes again 
The true means it wont include the main enhancement.
would that not include the 'base' enhancement though (aka no enhancement)?
No, because true there means extra_only
SMODS has this feature called quantum enhancements that allow a card to have more than one enhancement, which is what extra_only presumably refers to
Figured it out, I was just checking incorrectly
ok thanks
bump
@red flower i've been using this code and i notice that the joker will give extra chips for the played non-debuffed cards too, overall it's all just super buggy and weird. i tried using context.before instead of context.cardarea and that didn't work either
i'm in way over my head for this one but i think i have some ideas to rework it that could be viable?
whatever card is calling the function, because it juices the card for the level up effect (like with Burnt and Space Jokers)
oh so would i just put the key of the card or just card
You would put card
No.
uh
am i close at least
that wouldn't work
so ive heard 😭
...im thinking of poker_hands arent i
look up Card Sharp code in Vanilla Remade
Do i put this in a functions file? Or is it ok if i put it in jokers?
updating steamodded didn't fix it.
Yes, no.
moving the stuff in the return table's func to before it and removing the func made the stuff in the func work, but not the message. so there's something weird going on with the game not liking wanting to do anything with my joker's return table
uh
why is to_big everywhere
putting to_big in probability roll is probably one of the most hilarious things I've seen here
the pinnacle of Talisman compat

not every
some stuff remain unchanged
also to_big is mainly used for comparisons
afaik
okay 
so how do i solve what i'm asking about
mod prefix?
what does your uh.fs file look like
very thrown together i dont raelly know how shaders work but idk
i stole from polychrome shader
the error only changes the uniform 'uh' if i change the key in the smods.shader thing
nowhere else
just the key
Ok thanks
game just crashes whenever i try to open my deck.
started fresh run, clicked deck, immediate crash. what?
I'm pretty you need to add a vec2 with the shader's name?
extern MY_HIGHP_OR_MEDIUMP vec2 uh;
and you DO have to use it so it doesn't get optimized out
(I usually do this (uh.x * 0.000001) )
yeaa i learned that just now
took me a while to realize it lol
can i use debugplus to add an edition to a joker?
Yes.
how
CTRL + Q
if you hold tab it shows you all the shortcuts iirc
calculate = function(self, card, context)
if context.individual and context.cardarea == G.play and not context.other_card.debuff and not context.end_of_round and
SMODS.has_enhancement(context.other_card, 'm_wild') then
return {
xmult = card.ability.extra.xmult,
card = context.other_card
}
end
if context.setting_blind then
SMODS.add_card{key = 'c_lovers', edition = 'e_negative'}
end
end
SMODS.current_mod.set_debuff = function(card)
if SMODS.has_enhancement(card, "m_wild") and next(SMODS.find_card('j_batrocities_NaturesTouch')) then
return "prevent_debuff"
end
end
My debuffing aint working, idk if i missed anything. The first code is the joker calculation, the second is the debuff function in a separate functions file. Can anyone check if im missing something?
how can i have a joker modify the shop to the extent of replacing wares in it? i'd look at vremade showman but :those_who_know:
Is batrocities the mod prefix and NaturesTouch the key?
update Cartomancer
yes
mod prefixes aren't supposed to be that long
consider shortening it down to a few characters, taking the first letter in each syllable
maybe i could do that
yours could be btct
also im very not smart cause its Batrocities
good idea thanks
srry for troubling yall
How would I go about replacing the Ace in the center of the Title screen with a different card?
I managed to get one spawned in, but it appears next to it, rather than replaces
You could probably just override the base card by doing set_ability on it.
Or remove said card and then spawn & emplace yours.
How would I do that 
Game.main_menu = function(change_context)
local ret = mainmenuref2(change_context)
local newcard = SMODS.create_card({key='j_chicot',area = G.title_top})
G.title_top.T.w = G.title_top.T.w * 1.7675
G.title_top.T.x = G.title_top.T.x - 0.8
G.title_top:emplace(newcard)
newcard:start_materialize()
newcard:resize(1.1 * 1.2)
newcard.no_ui = true
return ret
end```
I have this rn
how od i use SMODS.blueprint_effect on more than 1 joker with 1 card
use SMODS.blueprint_effect on each card
i tried
store the return tables somewhere
local effects = {}
local ret1 = SMODS.blueprint_effect(...)
local ret2 = SMODS.blueprint_effect(...)
if ret1 then
table.insert(effects, ret1)
end
if ret2 then
table.insert(effects, ret2)
end
return SMODS.merge_effects(effects)
ok thanks
it's in latest release
i'll be sure to not use it
Before creating the new card, just G.title_top.cards[1]:remove() or something?
joker that copies all jokers that don't copy themselves when
so I gave up and let Cheshire Cat copy joker to the left instead of adjacent
I wouldn't recommend that
checking if it's Ace of Spades is a better practice for cross-mod
Pokermon already removes it
-# noted.
um wut
Though, to be fair, I originally wanted to also add a card to the main menu... but I decided against it. Instead, I just added an extra sound to the first load. 🍞
hmm
what's this for?
copying up to 3 jokers to the right
make sure the blueprint_effect isn't nil
as passing nil as the 2nd argument is the same as only passing 1 argument
(blueprint_effect(...) or nil)?
table.insert(effects, SMODS.blueprint_effect(card, other_joker, context) or {})
No.
why not?
huh
Because in context.repetition you would be returning without returning any repetitions.
oh, that
it shows a warning, gives no repetition, then moves on
well SMG, you can just copy the code from that joker in the mod that we are working on
I'd still admit it's annoying
since it does multi-copying
oh fair
it's lovely patching 🎉
oh great
This probably isn't possible, but. . . is there a way to retrigger jokers whos 1 in x chance effect didn't activate? Essentially giving them a second chance or a re-roll?
guys i need help, it keeps crashing and shows a message saying function/state_events.lua:136 what can i do?? Edit: im modding cryptid
can we see the error?
How do I define in context that a round was beaten in 1 hand
if context.end_of_round and G.GAME.current_round.hands_played == 1 then
I was doing it if context.end_of_round and context.hands_played == 1 then
hands_played doesn't exist in any context
Oh well thats where i went wrong
how do i make text that changes like in misprint's description? i know misprint sets a main_start variable but i cant figure out how to translate that to smods loc_vars format
Do i need context.joker_main in my thing too ?
to avoid the repeated end_of_round call? Try context.main_eval instead I think
Its just because my joker isn't doing anything now at all....
smods loc_vars support main_start
show your calculate code
do i just return {vars = {...}, main_start = {...}}?
joker_main and end_of_round doesn't exist at the same time so it can never be true
yes
oh ok cool
so without that it would still grant the mult during joker scoring
You can split your conditions
if context.end_of_round ....
end
if context.joker_main ...
end
idk why i dint think of that mb aha
okay i dk why its giving mult per card left held in hand
how do you give dynatext the red box that appears around xmult? i know its colour = G.C.WHITE for the text but idk what the value i need to set is for the outer box
Development resumes right after cup of tea 
the problem is that the cardarea check is too broad
it worked for me with joker_main
also don't return inside the loop
quick question, is it possible to save files to the game directory (where the .exe is stored)?
why
you need a column node surrounding it
thats G.UIT.C, right
yes
this is supposed to give +5 mult if first hand beats the round but instead its giving +5 then +10 per card held in hand so i end up with +35 mult and idk why
??
context.end_of_round and content.main_eval and ...
thank you
ik its litterally opposing the thing i just asked but the bug also inspired another oker which gains mult per card held in hand at the end of the round how would i use the same code to do such
What's the specific effect, and what's the actual bug?
it scored the +5 mult for it being one hand which was the original idea but it started scoring +10 on each card held in hand at the end of the round aswell, i just wanted the +5 for each card held in hand for a seperate joker
i still want the if hands played =1 tho
if context.individual and context.cardarea == G.hand and not context.end_of_round then will trigger each card held in hand, but won't give score during the end of the round
i want it to do what wee joker does but instead its any card left held in hand after winning the round
what your saying its triggering the cards instead but i want the value to stay on the joker
also wouldnt my seperate context :
return {
mult = card.ability.extra.mult
}
end ```
give me the score at the end of the round
Ah, okay, yeah, I misunderstood ya
context.joker_main doesn't happen at end of round
dw abt it was my bad im terrible at explaining
joker_main is indeed the one you use to give the score when the joekr gets triggered
didnt mean end of round exatly i meant in joker trigger after cards have been accounted for and leveled up the joker
You'd use if context.individual and context.cardarea == G.hand and context.end_of_round then to increment the mult at the end of the round. So almost your code, except you also need to check for context.individual
so that would be if hand is beaten in 1 or do i still need the G.GAME.current_round.hands_played == 1
yeah, you'll want to add that as an additional condition in the if statement
okok thank you
how can i make a joker do something when it's clicked on?
oh i can prolyl check yahimod again
theres the el wiwi right
hook Card:click() and add your own context
local card_click_ref = Card.click
function Card:click()
card_click_ref(self)
if self.area and self.area == G.jokers then
SMODS.calculate_context({modprefix_click = true})
end
end
??
you can just specify anything, modprefix is only there to separate your context from other mods
cryptid context??
cool thanks
Cryptid's cry_press is a different story
you want a joker that does something when it's clicked on
cry_press happens on every click regardless of where you click
should i be passing the card into the context so it can check that it's the one being pressed?
no need
Card:click() refers to itself already
you're hooking a metamethod of a class
i thought SMODS.calculate_context would like. broadcast a context check to every joker, is that not the case?
again, you're hooking Card:click(), which refers to itself
meaning when a card is clicked on, only its Card:click() is called
yes
oh
lol
yea I forgor 💀
that's just checking for a card in the joker area being clicked
local card_click_ref = Card.click
function Card:click()
card_click_ref(self)
if self.area and self.area == G.jokers and self.config.center_key == "j_modprefix_key" then
SMODS.calculate_context({modprefix_click = true})
end
end
that works but no reason to make it so specific imo
i imagine i can just do SMODS.calculate_context({rend_clicked = true, card_clicked = self}) and then check context.card_clicked == card in the joker's calculate?
yea
i hate to keep coming back but i am getting 0 hands from this when the blind starts
like i have 0 hands
1 == true
thats what it says but what about it ???
because you're giving -hands hands?
oh
that's what I said
that isnt supposed to be there
i also don't know what 1==true is
ease_hands_played(-G.GAME.current_round.hands_left+1)
-hands first to set hand count to 0, then add your amount
thank you
if i were to own 2 coppies it sets it to -2 now
which is another issue
is there a way to say if hands = 1 then dont do this
so it's -2
can you still play a hand
iirc yes
as far as I'm aware, hand count may go below 0 when using ease_hands_played
but you can only play 1 hand at most
it wouldnt work with acrobat and such
why does it say error?
the seal's badge isn't properly localized
Is there an easy way to add a hover popup which looks like card's info but without Steamodded? My previous implementations was bad actually
cant i do something like saying if hands are more than 1 in the context
I have this code, and neither of the prints are printing
local cardClick = Card.click
function Card:click()
print("click") --Not printing!!
local ret = cardCLick(self)
if self.area and self.area == G.jokers then
print("click!") --Also not printing!
SMODS.calculate_context({rend_clicked = true, card_clicked = self})
end
return ret
end
i think the problem is the event, i would need to test it to tell you how to do it
missing text - you need it in both places
would you like me to send the code ?
no it's fine im just not on my pc
ah thank you
ah okok
well i messed up somewhere i find it really funny tho
hang on wait there may be a much bigger issue here. my hooks file may straight up just not be running
yeah wtf
my hooks arent hooking
Card:click() doesn't return
other mods might add smth so better safe than sorry
ohhhh its looking for my hooks file in my objects folder
its not in the objects folder
bruh
so thats why the menu card hasnt been showing up
Im trying to set up a seal to act on context.post_trigger, but I don't think it actually ever checks that context for seals. Checking the code, I'm not sure how I'd actually set that up to add it, though
whats problem? it does nothing
Is there a way to define above or below a number like if something is more than 1 or less than 1
> or <
Ok thank you
oh thanks
How would I get the game to work out how far it is from said number it is less than and make it = to that number
math.abs(num1-num2)
Hello, I made this work! but for now it says disable but enables the skin. Is there a way for the toggle to be automatically ON when the game is opened (until the user turns it off by himself?)
Now it looks good so far
what's this supposed to be?
if it's using the values in config.lua then just set those to true
thnx
would this not work for if the hands went below 1 to set them to one ? main focus is lines 28 to 33
yes i will format calm down just not rn
i even tried adding context.setting_blind idk why i thought that would work
now it says +nil
It works! thank you for the support everyone <3
context.other_card.base.nominal
thanks it works
bump
Tabs for various stuff
okay so things changed and why is my last thing not working it should see that 0 is less than 1 and give the +1 right ?
i want that to work so i can then say if it is still less than 1 then give more until = 1
in a nutshell
It's still not showing anything
yes it is
hello. anyone knows how to prevent a joker from getting spawned by tarot cards and appearing in the shop
add this field to your joker object
in_pool = function(self, args)
return false
end
and what does the yes_pool_flag thing do
vanilla stuff
okay thank you so much
i got one joker not spawning until a condition and it worked with pool flags but somehow other didnt. i didnt know that there was in pool thing
in case you want understand what it is, check out ExampleMod
the cavendish and gross michel examples right
i did but didnt work somehow. maybe i wasnt carefull enough
it should work
got it . thanks
in most cases, use in_pool
in the example gros_michel it only defines G.GAME.pool_flags.gros_michel_extinct2 = true when gros_michel went extinct and not before anywhere. how code knows that if this pool flag was false. does being not defined means false ?
Whats the context to see if a scored glass card getting shattered
yes
by its own effect?
Yeah
in context.remove_playing_cards check if any of the cards in context.removed has card.glass_trigger
Okay, thanks
I'm trying to make a Seal trigger on context.post_trigger, while in hand. Checking the calculate_context that post_trigger is called on, it should check playing card areas like G.hand, but there's no post_trigger context that the seal ever interacts with 😕
what does this error mean??? ive been trying to fix it for like 2 hours:
[SMODS _ "src/game_object.lua"]:408: Failed to collect file data for Atlas SSM_SpiderSushiMod
sounds like a file structure issue
?
how is your atlas set up in the code, and do you have it properly named in both the asests/x1 and assets/x2 folder?
nope, my bad, they should be 1x and 2x
yea nvm
welp

