#💻・modding-dev
1 messages · Page 259 of 1
oh hey, im born the same year as your brother :D
hes an oct 1 child
uhh
i forgot to add winter as someone i like seein and interacting with
i see winter as a smartypants too
how would i do that
ho ho he he!
bluetooth connection :3
package in a box and mail
"your bluetooth device is ready to pair"
I think talent exists as having an easier time learning some topics. But that doesn’t mean anything without work
😭
And if you’re talented earlier, people’ll usually encourage that talent by giving you work
when can we get a bepis device
What’s university level over there?
@thin anchor
...i still need help, im really sorry to bug
I went to college for this, that's basically it, plus I've had professional programming experience. 90% of what I've learned has been at the behest of some institution or other people, otherwise I suck ass at motivating myself towards new things
<------ clinically depressed tgirl
what would it even be about, sending pepsi to your house? 😭
holy shit im clinically depressed tgirl....
yikes
BABE SAME!!!!!
a few mental breakdowns
why isnt this working 😭 anyone know?
ive done programming for a few things but my head doesnt seem to keep things in it (joys of military induced short term memory loss)
so i have to fight every step of the way
but i find you very good at what you do ♥
share the code that's causing this issue
you forgot "true" :apply(G.hand.cards[1],true)
ah i want to make that old man consequences minigame from ucn in balatro now
Not a trans girl but I was taking depression meds
i am also clinically diagnosed with the spicy sadness and shit so i feel you
i feel your pain, just wanting an answer in a busy discussion
yeah uh, show me your sticker's apply function
for what I did at 15, like calc 1/2 and linear algebra
Unfortunately yeah It's hard to give a sense of what's happening because there are a couple reasons why an atlas might be nil at the time of access. I have a vague sense as to why, but I'd need to see the code where you're loading them
im trans but ive never been taking meds so it cancels out
obviously thats how it works
it uh. doesnt have one 💀
i thought it had a default implementation
ty
What is the difference between Self and Card?
i was really really interested in complex numbers at like 16 but thats just a perk of being autistic then i became really interested with trying to graph hyperoperations but gave up because all the tools fucking suck for it
card is the actual card self is like the table containing the key and the apply functions and the atlas and everything
uh based holy
Oke
What’s calc 1/2 for you? My uni had the general calculus courses for engineers and other areas, but also the dedicated courses for the math department. (Not saying one is more than the other, just that they’re different.)
Also I remember some linear algebra professors saying it’s something people should learn in high school, but they don’t, so they have to “catch up” students
Huh, weird. Try disabling all mods except your own and debugplus and see if it still crashes?
for stickers self and card actually dont even represent the same type of thing since a card is not a sticker but for like jokers and stuff it can be more confusing
still didnt work WHY
ill try!
What kind of hyperoperations?
tetration for the most part
i literally copied it directly
lin algebra is f(x) and stuff right?
no i dont
huh
me when i'm an undercover cop
can you show me the code for the stickers
sure
I gtg eat dinner now, I'll explain later
😭
In programming, objects can have methods, and it’s customary for the object to refer to itself as self. Due to how SMODS is structured, you aren’t defining the methods for the object itself, but for the object prototype which is used to create the object
if there was really an undercover cop then #1347081678010712085 is doomed lmfao
I think I see the issue!
Your hanafuda joker just doesn't have the atlas field set
My friend studying algebra learned a programming language to handle graph operations
but it does?
-- Which atlas key to pull from.
atlas = 'super_balatro_sweater',
desmos is right there
-# i think
my most recent obsession is lambda calculus but im too stupid to learn anything more than what people tell me so im cooked
No*, linear algebra are vectors and matrices
Complex numbers are interesting to me because I am simply interested in algebraic mathematics.
I studied them from the other side and came to understand the argument of the number and operations between such numbers 
anyway i do actually have a question about localization
Oh wait formatting issue
-# If you have a master’s degree in math, then yes
when you use things like {X:mult}blah blah{} is there a way for me to a define a custom color here like you can with regular text colors
Shouldn't it have the mod prefix?
smods should automatically prepend it 🤔
Ice stop being so funny
global.lua
it would be [prefix]_super_balatro_sweater unless you specifically set something to change it
atlases that are defined in an smods.x() function usually automatically prepend the prefix
... I think
Try something like "{C:#FFFFFF}"
X specifically not C
Yes I explained how earlier
where?
Then just replace C with X
linear algebra being a confusing name for laypeople is really funny
@limber blaze part 1
I HATE BALATRO MODDING I HATE IT OMG
once saw a small bookstore place a linear algebra textbook next to children's algebra workbooks
Part 2
does it still crash with the other mods disabled?
😭
ill try it out
easy peasy
its just algebra right 
yes
i tried winters fix, too, and no cigar
can you share the new crash?
then u see this shit
iykyk
I had a class in my first semester which was kinda like an intro to linear algebra, but in practice it was whatever the professor wanted to teach. The professor repeatedly said that even his 6-years-old daughter could understand the concepts he explained to us
oh boy
im going to redraw this and name it ai slop joker
jombo.... dokr...........
calculate = function (self, card, context)
if(context.destroy_card and context.cardarea == G.play) then
if #context.full_hand == 1 and G.GAME.current_round.hands_played == 0 and SMODS.has_enhancement(context.full_hand[1], "m_stone") then
card.ability.extra.totalmult = card.ability.extra.totalmult + card.ability.extra.mult
card.ability.extra.durability = card.ability.extra.durability - 1
return {
message = card.ability.extra.totalmult,
colour = G.C.MULT,
delay = 0.45,
remove = true
}
end
end
end,
Could someone tell me why this is crashing?
Not the Jombo
can anyone spot any problems with this code? that would prevent me from applying the sticker with debugplus?
DOKR
i believe this is the same crash as befor
yeah it is; I just didn't want Cryptid's stuff everywhere
your message
By “whatever he wanted to teach”, I later had calc 3 with that professor, and he brought a dynamical systems researcher to tell us about his work. “That’s cool and all but we don’t understand it.”
Then he took the same researcher to give the same talk to 1st semester students in his class 😭
Oh... I'm dumb
you're setting the integer (totalmult) value as the message to display and I'm assuming it doesn't like that
you'd really want to format a string anyway instead of the raw number
i see i see
anyone spot any problems with this code for a sticker? It wont apply with debug plus
😭😭😭😭
balala 2
jombo poker
Jombo ❤️❤️❤️
welcome to jombo com
love jombo
jombo 
no thoughts just jombo
Alright I'm kinda lost, also because it's working on my machine. There's also some stuff in that crash log that makes me suspicious it's not actually crashing on your joker
hmmmmmmmmmm
...maybe i can delete and reinstall balatro?
return message might need to be a string not a number? not 100% sure
jombo my beloved
you can reverify balatro's files if you want through steam, can't hurt
Yeah, that's what someone else said. Fixed it.
Kinda
OK IM ACTUALLY FREE FROM DYNATEXT THIS TIME 
how are you defining the atlas?
huge news, i had to use it for my misprint joker but chips instead
shits a menace
you will never be free from the horrid shackles of UI code
here's Peekmin's code
i will be if i just never use it
😄
jombu
jombu
a sticker pos of x=100, y=100 seems weirdly large btw
i'm trying to check for cards with an odds variable (some enhancements i added have it) but i'm just getting a crash about extra being nil?
isnt it context.destroyed_card?
sounds like some of the cards don't have your enhancement, thus .ability.extra doesn't exist
hm, figured it'd account for that
context.destroying_card is used when in G.play
ohh i c
SMODS.Atlas {
-- Key for code to find it with
key = "super_balatro_sweater",
-- The name of the file, for the code to pull the atlas from
path = "super_balatro_sweater.png",
-- Width of each sprite in 1x size
px = 71,
-- Height of each sprite in 1x size
py = 95
}
Is there a way for the edition to directly influence the card, joker or tarot?
my intent was for there to only be soul pos (e.g floating sprite) rather than a sticker
idk if that a valid way to make the sticker not show up
@high eagle btw?
1/2 chance of 10x mult. Also 1/2 chance of 0.1x mult. Both mults stack
and where are you putting the atlas file
@turbid maple
i was thinking of making it give less mult the more money you have but this is cool too
I mean just making sure they're putting the image file in the right place
Typically SMODS.Atlas errors specifically if there's an issue collecting the file so I didn't assume that was the problem
oh like the actual image file
Also a good idea. That mult thing is the mechanic of a joker I wanted to make called "Techbro"
ooo
yeah this is my assumption too
at the beginning of my code
mm i guess so
But why
....still crashed
like legendaries
You can do that without the soul_sprite
Funny. How about when you also remove/comment out the SMODS.Atlas code?
how?
For example, so that the joker changes its appearance and the principle of counting if it has Edition
Define a custom draw function
And pass the same arguments as the soul sprites
Is this possible?
thats what im unfamiliar with atm
Possibly
probably, sounds like a lot of work though (and impossible mod-compat)
also I don't know what you meant with "the principle of counting"
If it’s like Jokers, it should just require defining draw
I meant calculate
The wiki should lists the args
same error
Lol. Alright, try updating steamodded
this is the wiki docs
but it wasnt clear on how you would actually write the function
yes it’ll be something like draw = function(self, card, layer) whatever_the_sprite_is_named:draw_shader(…) end
You'll have to look at the vanilla code for it, because the Sprite file has a bunch of drawing specific functions
Maybe I'll make not 450 jokers but 3 new editions 
Sprite:draw_shader() is the basic drawing function it uses to send info to a shader, and it typically expects that the shader is formatted similar to the vanilla ones, sending a bunch of args like image_details, texture_details, dissolve, etc
Typically I don't use it, and I set shader variables manually and then call Sprite:draw_self()
This is a cut down custom drawing function I use sometimes:
if not card.config.center.discovered then
return
end
local cursor_pos = {}
cursor_pos[1] = card.tilt_var and card.tilt_var.mx*G.CANV_SCALE or G.CONTROLLER.cursor_position.x*G.CANV_SCALE
cursor_pos[2] = card.tilt_var and card.tilt_var.my*G.CANV_SCALE or G.CONTROLLER.cursor_position.y*G.CANV_SCALE
local screen_scale = G.TILESCALE*G.TILESIZE*(card.children.center.mouse_damping or 1)*G.CANV_SCALE
local hovering = (card.hover_tilt or 0)
G.SHADERS['fnwk_basic']:send('mouse_screen_pos', cursor_pos)
G.SHADERS['fnwk_basic']:send('screen_scale', screen_scale)
G.SHADERS['fnwk_basic']:send('hovering', hovering)
love.graphics.setShader(G.SHADERS['fnwk_basic'], G.SHADERS['fnwk_basic'])
card.children.backing:draw_self()
love.graphics.setShader()
end```
Probably 450 jokers after all
jombo
I want to make any variation of gameplay with vanilla jokers
My implementation for the "basic shader" is essentially just the default love2D shader that returns the pixel color at a specific point, plus the hover transformation vertex effect
#define MY_HIGHP_OR_MEDIUMP highp
#else
#define MY_HIGHP_OR_MEDIUMP mediump
#endif
vec4 effect(vec4 colour, Image texture, vec2 texture_coords, vec2 screen_coords)
{
vec4 pixel = Texel(texture, texture_coords);
return pixel;
}
extern MY_HIGHP_OR_MEDIUMP vec2 mouse_screen_pos;
extern MY_HIGHP_OR_MEDIUMP float hovering;
extern MY_HIGHP_OR_MEDIUMP float screen_scale;
#ifdef VERTEX
vec4 position( mat4 transform_projection, vec4 vertex_position )
{
if (hovering <= 0.){
return transform_projection * vertex_position;
}
MY_HIGHP_OR_MEDIUMP float mid_dist = length(vertex_position.xy - 0.5*love_ScreenSize.xy)/length(love_ScreenSize.xy);
MY_HIGHP_OR_MEDIUMP vec2 mouse_offset = (vertex_position.xy - mouse_screen_pos.xy)/screen_scale;
MY_HIGHP_OR_MEDIUMP float scale = 0.2*(-0.03 - 0.3*max(0., 0.3-mid_dist))
*hovering*(length(mouse_offset)*length(mouse_offset))/(2. -mid_dist);
return transform_projection * vertex_position + vec4(0,0,0,scale);
}
#endif```
So sometimes when I don't want something drawn the typical way, I'll do this instead
Putting stuff in Card:draw is just a means to manually implement what the game normally does automatically
i did. nothing seems to be working, and im a bit overwhelmed rn, so i might just take a break
Fair enough. Good luck 🫡
ill see if i can help when im home
Right now I'm trying to solve my own shader problem and hoping I can find someone to help because I'm having trouble parsing how to normalize coordinates for atlas textures of different pixel sizes
The first course I took was basically an intro to both linear algebra and calculus and is supposed to teach the general ways of mathematical thinking/proofs etc. and does restate a good few things one would already know from high school, but in a more rigorous way. For linear algebra this includes a more general concept of vector spaces, though I did learn roughly the same things in high school. It's more or less specific to the math department, though it's also used for computer sciences students. What I'd call calc 2 was a separate class that I took the next semester and it's pretty much typical for a calc 2 course specific to the math dep
hey lars, ive been using NeatoJokers as a framework for a mod of mine and i realized that loading every joker as its own lua file gets rid of the automatic badge that smods gives, do you know if there's a way to permit it?
You have to manually set no_mod_badges = true on the joker definition for that to happen
mod badges are still enabled in the mod config?
Or yeah, disable them entirely in mod config
they should be enabled?
better question would be whether mod badges for other mods are showing up
jombo
no DOKR?
i have two self made mods both using neato as a framework and neither of them have badges
ill try reinstalling smods
how would i go about making an edition draw an additional sprite on top of the joker?
I see so it does seem curated to be for a career in math. Interesting
Although I suspect that French engineers might learn deeper math than Brazilian engineers
I’m neither so I’m guessing
Weird. This setting isn't enabled, right?
There's basically three reasons why mod badges won't show up
- Card is Locked or Undiscovered
- No Mod Badges is enabled per joker or in global config
- The Mod is missing display name information
For the latter one, it does this check to show badges
obj and obj.mod and obj.mod.display_name
Is there a will_shatter context?
fixed
There's not, I actually had a discussion about this before. You can probably manually calculate a glass card shattering with the seed used for glass randomization, and then mark it to be destroyed. It'll work functionally identical, and you can tell from the object that does the calculation that the shatter will occur
i am looking at the code for how aikos shenanigans draws letters and i do not understand a word of it
It was checked somehow???
oh god
i dont think ive ever gone to that page 😭
how is this gonna work on 1x 🥀
it wont 🥀
Ah, looks like, @chrome widget , you can do this
if context.remove_playing_card then unlocks context.removed and those entities have .shattered propeerty
jombo is too powerful
🥴
Oh no yeah it depends on what your use case is
whats the shatter questioin?
I specifically had a joker that needs to add a retrigger on a glass card that's about to shatter, so I need to know it earlier than when it actually gets destroyed
i spent the better part of an afternoon trying to figure out why my badges werent showing and it was because of a stupid check 
kendrick lamar joker:
you wont know it's about to shatter in the retrigger step
Yep yep, that's why I suggested calculating the shatter manually, if that's what you needed
Otherwise, there's a context for when it shatters
it would calculate twice
Hi Eremel, I am trying to proc a bonus when glass is used and does not break but I just realize that I was going for the wrong approach.
That would tell me if a glass card shatteres, not to see if it was glass but did not shatter.
how would you guys word smth like this "If hand contains exactly 3 7's..." theres no numbers next to eachother in game and no plural(?) numbers
i at least want it to be sort of consistent with other mods if its smth they do
cant wait to see jombo ingame
I believe people prefer to change one of the numbers to the full word
e.g. "if hand contains exactly three 7s"
I don't think an effect like that is possible by default with the timings of context calls
I don't particularly mind this, since in terms of seed progression I don't expect people ot pay much attention to specific glass shatters unless they're really minmaxing, but either way I could easily patch the util code to not calculate the glass destruction if a card already has shattered set on it from something earlier
i think ill go for 3 sevens bc it only breaks 2/3 conventions then 💀
The default already attempts to calculate glass shattered even if it's already been destroyed by some other means
I really wouldn't do "3 sevens" since the base game always uses the number when referring to ranks
i mean it doesn't do it for quantity either but igwym it also js looks odd
we loooove jokers based off music
low resolution jonkler
retro joker,,,
the mixels are real with that one
patching the standard check would work, if you let it do it twice though you'd have shatters without the effect
should make the text match
ong
How many jokers are you making
Not sure I understand why. Doesn't the shatter effect just happen on any glass destruction if it fills the condition in SMODS.shatters() and then gets .shattered set on it?
as many as i can think of
@wintry solar psst, does the extra table in return not work for anything complicated like retriggers and only for the basic mult/chips/messages?
uhhh that sounds correct yeah
it does, but if you're pre calcing it before hand to see if your effect should trigger, and it doesn't hit, it could then calc it again later and mark it as destroyed
Shit. Alright, thanks
there's no reason why there would be any evaulation it doesn't work with
Idea: If there isnt a joker that restores the next N destroyed jokers/cards you should make one and call it "On call" with an exhausted sysadmin joker art
Im inherently always a little iffy on patching SMODS specific stuff just cause obviously it's more unstable than isolated code, but sometimes it is what it is
actually retriggers specifically
I'll see if I can whip up a quick example to show what I mean
maybe
yeah uh that makes sense why it wouldn't work for repetitions, they're handled in a weird way
I am going to try a lovely patch, I have an idea of how I could do this re: proccing when glass does not break
I don't think it would work on removing cards either right?
I could also do something really stupid and manually set a glass card I've precalced to not have the glass enhancement temporarily while not updating its sprites, therefore it inherently ignores the glass check anyway
never mind on that example then
Which is, hehe, dumb. But also doesn't require patching SMODS code
it should with the changes I made in blind calc
I see
you need a label string in misc.labels
i love self inserts
okay, would the key be the same?
yes
it should be under misc.labels, not under misc
oop yea
similar to how in the base game there's a global for consumable shop rates, i.e. G.GAME.planet_rate, does smods create a global for custom consumeable types that can be changed on the fly? Because shop_rate = x, is something you can specify in the SMODS.ConsumeableType declaration
and check out misc.labels in the vanilla en-us, that should probably give you the formatting you need
and it's just the string, no name table
is there something like G.GAME.prefix_consumeableKey_rate?
yes
the docs totally mention that
i should prolly make the sprite change and message happen at the same time smhow
no prefix on consumable types though
also this doesnt work, it crashes the game because it cant index extra. i think its because its a sticker
But yes, someone smarter than me, please help me with math:
I have a shader function here that I'm attempting to use to do a shader effect on atlases of varying sizes, because the Joker temporarily sets its Atlas to that of another joker to do this (meaning there can be inconsistency in the atlas's dimensions, depending on what vanilla does vs what a mod creator does). I have a specific visual example below of an atlas I use for a card that is 213x95 pixels, with the pixel pos set at 1, so it's using the middle part of the texture visually as its center
I'm ATTEMPTING to make sure that the color set in vec4 pixel is correctly transformed to only the currently visible part of the texture, since the vec2 tex_coords parameter of the function prototype typically just has values ranging from 0-1 on both axes normalized regardless of the pixel size of the atlas
extern MY_HIGHP_OR_MEDIUMP vec4 texture_details;
// (x = width, y = height) for atlas texture [not normalized]
extern MY_HIGHP_OR_MEDIUMP vec2 image_details;
extern Image mask_tex;
extern MY_HIGHP_OR_MEDIUMP float mask_mod;
vec4 effect(vec4 color, Image tex, vec2 tex_coords, vec2 screen_coords) {
float width_mod = texture_details.b / image_details.x;
float height_mod = texture_details.a / image_details.y;
float pos_x = (texture_details.x + tex_coords * width_mod) * width_mod; // Normalized pos_x
float pos_y = (texture_details.y + tex_coords.y * height_mod) * height_mod; // Normalized pos_y
vec4 pixel = Texel(tex, vec2(pos_x, pos_y));
vec4 mask = Texel(mask_tex, tex_coords);
return vec4(pixel.rgb, max(0, pixel.a - (1 - mask.r) - mask_mod));
}```
Hmm, I'm not sure, never dabbled in stickers. You might need to use self.config directly in this case?
1x jombo doesnt look too bad
stickers don't copy any config to the card ability table by default
what's his effect
if you need any and allow them to be changed, you have to copy them in apply
thinking of
+50 mult, -1 mult every dollar you have
unsure how im going to make a minimum of 0
if g.game.dollars > 50 id assume
yeah
hihi! when my runs starts, why does book_card not get changed?
Mail-In Rebate changes its rank just fine
how would that work? card.config.extra.mult?
you can set card.ability[self.key] to a copy of self.config in apply
is this correct
no
mult = has to be followed by an expression, not a statement
if you want to modify the ability value, do it outside the return table
ok
does this seem alr balance and gamefeel wise?
Anyone know of a way to check to see if your lovely patch was applied?
oh, also, the localization doesn't work :)))))
(i changed 2 to 14 to match Mail In Rebate, btw)
is this correct?
You can check the file directly in the lovely dump, and it'll tell you in the dev console if it failed to patch for whatever reason (no matches, multiple matches, etc)
is this correct
im getting attempt to index boolean value at line 23
are you using a card you made before changing the apply function?
yes
that makes sense
(also i recommend you deepcopy, as right now the extra table will be the same exact table reference as self.config.extra
or just don't use an extra table, you really don't need it
how does one deep copy?
copy_table
how would you correctly make it so dollars subtracts from mult
w joker
Sweet, I will share it when I am done but I am like 75% there to tracking when glass does not break!
INFO - [G] setupGlassTrackingvar
That's from a lovely patch I wrote
How do I change a suit? Is it set_suit or?
Gonna ask again to see if anybody here now has a solution, is it possible to delete all cards in played hand, destroy_card doesn't work, start_dissolve doesn't properly delete them and they get put back into the deck as nothing cards, and trying to use Hanged Man or any other deletion card methods doesn't do anything, even when the code is directly copy and pasted
context.destroying_card?
anyone know why this is happening?
There is no context.destroying_card, there is context.destroy_card, and I already said that doesn't work
context.destroying_card only exists as subsection within context.destroy_card when calculating in G.play
also, I made a joker with it, so I'm pretty sure it exists
And context.destroy_card doesn't work, the subsection doesn't work either
how does it "not work" then?
It only destroys scored cards
And trying to use return {remove = true} in any other context only removes the first card processed, because the return ends the fuction
It feels like I'm trying to make a joker that's in an exact blindspot of smod
how would i subtract mult from dollars?
Nobody else has even thought of deleting all cards in played hand apparently /=
Wouldn't that subtract the dollars from mult? I think you're doing that backwards
If mult = 20 and money = 15, you'd get 5 mult in return with that code
oh yeah
i want the joker's mult to decrease with how much money you have
but it isnt doing anything at all
the mult thats returned doesnt have any arithmetic done afaik, the mult = card.ability.extra.mult - G.GAME.dollars doesnt change it
got a crazy idea
try
if context.destroy_card and context.cardarea ~= G.hand then
return {remove = true}
end
edit: nevermind, don't do this lmao
atleast i dont think it does
feed as much info abt smods as possible from example mods & docs to chatgpt and then test it
smh he finna use console.write()
yea u should return mult = card.ability.extra.mult - dollars
though any other approach that checks for card is played instead of context.cardarea ~= G.hand should work
this will destroy the entire deck if the deck feature is on btw
oh
haha
you're right lmao
guess you're gonna have to iterate through full_hand then
full_hand doesn't work
wtf does "doesn't work" mean
so like this?
you get literally every card with context.destroy_card, just check whether it's one of the ones that was played
yep
I was trying to make this work for 3 hours last night, I've tried destroy hard with basically every cardarea
im getting a crash with this code when mousing over the card with the sticker
don't use cardareas like that
Turbo deck fixing
I was looking at the bootup log, and I did not realize just how many Talisman patches just straight up fail
more like this (this is pseudocode)
if context.destroy_card then
for card in context.full_hand do
if context.destroy_card == card then
return {remove = true}
end
end
end
why not context.cardarea == G.play or context.cardarea == 'unscored'
heck, even context.destroy_card.area == G.play will do
wow that second one is weird
IMagine a powerful joker who charges 15 chips per second or something from your total. So you have to think quickly
oh it's because almost all other types of effect need the card to be scoring
ugh that's annoying
how would i add a minimum to mult?
math.max(..., 0)
"Each played [rank] gives +9 mult when scored, rank set when obtained"
not sure why but my custom card skin textures arent loading properly?
the atlas paths are correctly synced with their respective filenames in assets -> 1x and assets -> 2x
so im not sure why they arent loading
thatt's weird, you sure you don't have a typo
like this?
im certain
no in calculate
can someone help me?
cardpack_hc.png and cardpack_lc.png in the assets folder, the json, and the lua
or rather in the json its directing to cardpack.lua
so like this
Every single time I try to use a context dependent variable it comes up nil, what am I doing wrong? I'm trying to use context.destroying_card, and apparently that's nil
How can i get mod-id from the code?
before or after purchase?
yeah i just...dont know
really not sure why its just not working
after purchase
so you dont know what it is till you pick up the phone!!!
if you didn't define it, it's the fist four characters of your mod's name IIRC
is this how you would add a minimum of 0 to a joker's mult?
no, you would return mult = math.max(card.ability.extra.mult - dollars, 0)
i am going insane
math.max returns the maximum between values math.max(50,0) will always return 50
im going insane too
anyone know wtf is going on
did you figure that out? im doing the same thing
nope, i'm pretty sure the shadow is tied to the soul shader so i think you'd have to make a custom shader
I have it set in meta.json, but how can I get it from any mod lua file?
you mean you want other mods' ids?
hologram has its own shader override. it has no shadow but i'd rather not have it be holographic lol
i might just fiddle with the listed shaders till i get one that works
I need one variable with the ID of my mod to access it from any file
but the ID of your mod should be constant
you can just use it
?
How?*
I need it for SMODS.Joker:take_ownership()
Okay I finally fixed the shader issue I was having, but now I have to figure out how to draw editions atop an inherently procedural stack of textures
And the solution to that might unfortunately just be to.... not draw them
anyone know?
Do you want to take ownership of a specific Joker from another specific mod?
From my mod
You shouldn't need to take ownership of your own Joker
Why are you trying to do it?
I cycle through making a joker base and changing some parameters for each one
You shouldn't need to take ownership of it, I think
any reason you can't change the parameters before creating the object?
Like
I need it
You create a base table
Then you add the extra parameters to the table
Then you create the Joker
actually a friend gave me a much sillier idea
Wow, writing TOML patches is harder than I thought, it is really not clear if I must account for spacing and indentation to match or not
why is my sticker crashing the game when i mouse over the card
I need to see the line numbers
I just NEED it
the crash has nothing related to my cards code in the log but ill send it anyways
and I'm saying you could do something like this
but anyways
you defined your mod ID
so you can just copy-paste the ID you defined
its in ur metadata.json
How can i get it from there???
copy it with ctrl v
why do u need to get it programatically
if u really want to just ctrl v into a variable in main.lua or something
Like my main lua is this
so if i want to access stuff like that I guess I can just do UTM.ModId = "textFromMetadataFile"
This is not very good way for me
ok do what i said then
alright i gotta bump this again: why is this crashing my game 😭
where does hoveredCard come from? On GitHub it looks like a global variable
If you scroll further down into the crash report it might tell you where in the file it's crashing
it doesnt
thats why im dying out here 😭 wtf is going on :(
something is nil thats all i know
Put prints throughout the file and see where the last successful print is
Also, for a problem of my own, how do I detect if the hand is currently visible?
that seems like a headache lowkey......
It's better than trial and error
Just add one in each condition with a different name
if context.cardarea == G.hand then doesn't work and I'm not what would
Try printing your variables right before you reference them to see if any of them come back nil
what do you mean by visible in this case? If the hand is actually drawn and interactable?
i saved it as a global variable, so that if you leave the run and come back then it will still be fine
i hooked card:hover() and card:stop_hover() in keybinds.lua to save to hoveredCard, you can probably ignore the local var and use the global var directly instead
Yes, I have a joker that's supposed to add cards to the hand when it's available, and add it to the deck when it's not
And you sell the joker to trigger it, so it can happen in the blind, booster, or in a shop
'if G.hand' should work
gang slide some balatro mods that are adding blinds and not crashing my game
Wow, when in doubt, just use regex. This is soooo powerful
what would i be printing
Just a string that says what condition it's in, so you can track which one it stops at
It adds it to the hand... when they're in the shop, so the player now has their hand available in the shop
and the crash log talks about UI
man ur build suck, sell the wee joker
That doesn't change that putting prints in the conditions would tell you in which condition it's crashing
It would narrow down where the nil variable is being used
oh interesting. Apparently it's not gone wrong for my checks, and I definitely use that one. G.hand.cards >= 1 should only ever be true when you're hand is drawn, so that should work
the print doesnt show up in the crash log
It won't, it'll show up in the console
i have no idea what im doing here ;-;
would someone be able to help me get this functioning like hit the road?
i dont see how this is going to help me narrow it down then
Okay, I don't know how to help, if you're not going to do it, then don't do it, but I'm not gonna try to help anymore
I'm giving you a potential solution and you're just sidestepping actually trying it
i mean, i really dont understand where im putting the prints here
Inside the conditions, and right before referencing variables, I said that before
print statement debugging is a very typical way to test where functions go wrong, if a normal debugger is impractical
ye
like again it can crash literally any time its only dependent on me mousing over the card
the instant the mouse goes over the card it crashes
is that not the normal way to debug a function
and the log points to ui.lua
That means it'll be an error in your text or loc_vars
/
/
what if i just comment loc_vars out for now then and see if the error still happens
could you post the code and error log again? clicking back up through replies is buggy as hell on discord for me
If I were to put prints inside of this code I'd do
print(card.config)
-- If the context is after scoring, and the cardarea is the play area, continue.
if context.after and context.cardarea == G.play then
print('after')
-- Loop through the scoring hand.
for index, otherCard in ipairs(context.scoring_hand) do
print('scording_hand'..index)
-- If we found our card, continue.
if card == otherCard then
print('card is otherCard')
-- If the next card exists, continue.
if (index + 1) < #context.scoring_hand then
print('can be tagged')
-- For some reason, this is the only way to get the card to have the visual effect of being tagged happen along with the text.
G.E_MANAGER:add_event(Event({
func = function()
print('is tagged')
local enhanceSave = next(SMODS.get_enhancements(context.scoring_hand[index + 1])) == nil and "c_base" or next(SMODS.get_enhancements(context.scoring_hand[index + 1]));
context.scoring_hand[index + 1]:set_ability(G.P_CENTERS[next(SMODS.get_enhancements(card))]);
card:set_ability(G.P_CENTERS[enhanceSave]);
return true
end
}))
-- Return the message to display when the enhancement is applied.
return {
message = 'Tagged!',
message_card = context.scoring_hand[index + 1],
colour = G.C.RED,
}
end
end
end
end
end,```
And if it doesn't print anything there, then that's not the offending function
you mean if it does print it right?
You said it crashes when you hover over, if nothing from calculate is printed, then it's not trying to calculate anything, and the crash is a different issue
ah gotcha
but if calculate would get run when i hover over, it would just crash before i see anything
Also, where is loc_txt?
this is my en-us.lua file
It says that's required for stickers
and its in localization folder
Try putting it into the actual sticker just in case
error can't be in the calc function, btw, that shouldn't trigger at all by hovering over a card
Well there ya go
I didn't know that for sure, so that's why I suggested it, because sometimes the solution is in somewhere you think definitely isn't the problem
Debugging is just poking different parts of your code that are usually related to your problem for an hour, and then poking something that isn't, and somehow that's the problem
lord have mercy on programmers souls
well, now I need to figure out what is wrong here
that's where print("TESTING FUNC?") comes in 😛
That's basically what I was suggesting ronit to do
But I'm the kind of person to just do print('fuck') 20 times in my code
hahaha
I leave it at testing just in case I accidentally push it to main and a streamer decides to stream my mod to kids, you know
i default to 'sus'
Everybody has their funny print phrase
im a big fan of "AAAAAAAAAAAAAA"
problem here is I think that you're nesting one time too many. Labels are just labels, so they don't need to be formatted like that
That's like the magenta and black missing texture of debug prints, you'll definitely notice it
instead they're labelled just as whatevertheyekeyis = "whateveryourstringis"
ok im back to trying to figure out how tf to draw custom sprites
i referenced cryptid code
fixed it
now i just gotta figure out how to make the color not white on the background
I'd recommend against referencing cryptid code. The code isn't bad, but it's got so many custom systems that it might be a bit misleading when you think you get what something does
Oh for sure
ive attempted to check cryptid code for stuff and realize its not applicable in my case
i'm trying to do a sorta baseball card like ability but i keep getting a nil value when "attempting to index field 'ability' "
cause its some weird way of doing it
where can i define the color
also, stickers happen to be janky as hell, and Cryptid's probably heavily changed them to fit their needs
badge_colour = HEX('ffd081') or whatever colour you want, where you define the sticker
key = 'TOGO', --joker key
loc_txt = { -- local text
name = 'To Go menu',
text = {
"Food Jokes each give {C:mult}+5{} Mult",
"{C:inactive}(Ramen, Popcorn, Egg,",
"{C:inactive}Turtle Bean, Diet Cola, Seltzer,",
"{C:inactive}Gros Michel, Cavandish and Ice Cream",
"{C:inactive}are food jokers)",
}
},
config = { extra = {mult = 5}},
loc_vars = function(self, info_queue, card)
return { vars = { card.ability.extra.mult } }
end,
rarity = 2, --rarity: 1 = Common, 2 = Uncommon, 3 = Rare, 4 = Legendary
atlas = 'Jokers', --atlas' key
pos = { x = 0, y = 0 },
cost = 5,
unlocked = true, --where it is unlocked or not: if true,
discovered = true, --whether or not it starts discovered
blueprint_compat = true, --can it be blueprinted/brainstormed/other
eternal_compat = true, --can it be eternal
perishable_compat = true, --can it be perishable
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
```
you're gonna wanna share your calculate function as well 😛

Probably is somewhere in the calculate function that lies the problem everything else here looks legit
it's basically the same as the baseball card atm but i plan to change it once i can get it to work
if context.other_joker then
if self.ability.name == 'To Go menu' and context.other_joker.config.center.rarity == 2 and self ~= context.other_joker then
G.E_MANAGER:add_event(Event({
func = function()
context.other_joker:juice_up(0.5, 0.5)
return true
end
}))
return {
Xmult_mod = card.ability.extra.mult,
message = localize{type='variable',key='a_xmult',vars={self.ability.extra}}
}
end
end
end
}```
the plan is to use it on a diffrent subset of jokers and have a plus mult instead of a xmult
is there any easy way to render a sticker at half the size
you're using self, but that's not possible in smods calculate functions
^
ah ok that would explain it, what should i use instead?
card. instead of self.
ok thanks
smh github is hard shit
You may have to do some more specific if functioning if you want it to only apply to Food Jokers btw @toxic rain
Idk if context.other_joker would be enough
Nevermind everything i said about regex
def, i was thinking of checking either card name or card key since i don't think they have a food joker category
food jokers don't exist as a base classification in the game, so you can't easily check it. You'd have to add some functionality for that, or do it by hand with a bunch of if or statements
Key would probably be better if you can define it in a table somewhere
or a for loop ofc
i have a file just for defining lists of cards
I had to do this myself
Hate that
so i would maybe go about it like that
True, table could be better for mod support 🤔 but idk
It’s easy to add to a table if a mod is loaded rather then a for loop
I've set up a tagging system for Kino so I can easily assign and set qualities to jokers, which is quite helpful
Up to you and that specific purpose though
Now i just have a isfood bool which makes it easier for modded shit
could have the food jokers defined in a list or something, i don't have much lua experience but i have programmed in other object orientated languages (python, c#, java)
imagine a mod that would add a separate deck for each rgb color from 0 0 0 to 255 255 255
using purest random
Would probably crash the game
that's the way to do it, yeah
I know Cryptid does it like that
ah ok makes sense
ok the game isn't crashing but the jokers doesn't seem to do anything
like generating:
Buff (e.g. +X something)
Buff 2 (20%)
Debuff
Debuff amount (e.g. -X something)
Debuff 2 (20%)
Deck cards (including 'randomized' variant)
and some more for each one
Closest thing is checking for perishable compatibility, since every food joker is inherently incompatible with perishable
just randomly
anyone know?
But that also includes certain jokers like luchador
in before cryptid stake that makes stickers ignore compatibility (for every item in game)
any mod could do that
if they wished
its a better solution to just define the jokers imo
even if its harder to do
Not necessarily “harder” really
Yeah sure but you're gonna be incompatible with every mod ever unless you make a list everytime someone makes a new mod with new food jokers
Just takes a little more time
yea but doing it the other way opens your mod to being broken entirely
rather than just being incompatible with a joker from a different mod
I think you're better off making a joker about something perishing on its own than food specifically
I think food jokers are used so often that there's some agreed standards as to how to about making new ones
I think Paperback and Maximus set it in a pool?
Really now I’d have to take a look
ok the joker is no longer crashing the games but it is also not doing anything
SMODS.Joker {
key = 'TOGO', --joker key
loc_txt = { -- local text
name = 'To Go menu',
text = {
"Food Jokes each give {C:mult}+5{} Mult",
"{C:inactive}(Ramen, Popcorn, Egg,",
"{C:inactive}Turtle Bean, Diet Cola, Seltzer,",
"{C:inactive}Gros Michel, Cavandish and Ice Cream",
"{C:inactive}are food jokers)",
}
},
config = { extra = {mult = 5}},
loc_vars = function(self, info_queue, card)
return { vars = { card.ability.extra.mult } }
end,
rarity = 2, --rarity: 1 = Common, 2 = Uncommon, 3 = Rare, 4 = Legendary
atlas = 'MMM_Jokers', --atlas' key
pos = { x = 0, y = 0 },
cost = 5,
unlocked = true, --where it is unlocked or not: if true,
discovered = true, --whether or not it starts discovered
blueprint_compat = true, --can it be blueprinted/brainstormed/other
eternal_compat = true, --can it be eternal
perishable_compat = true, --can it be perishable
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
calculate = function(self, card, context)
if context.other_joker then
if card.ability.name == 'To Go menu' and context.other_joker.config.center.rarity == 2 and card ~= context.other_joker then
G.E_MANAGER:add_event(Event({
func = function()
context.other_joker:juice_up(0.5, 0.5)
return true
end
}))
return {
Xmult_mod = card.ability.extra.mult,
message = localize{type='variable',key='a_xmult',vars={card.ability.extra}}
}
end
end
end
}```
Pools give some handy options for access, and also, they're retrievable by the tools for the mod wiki, which is helpful 😋 I've currently set up my genre system as pools, though if your mod works like mine and uses an insane amount of tags, you do want to skip the step of pools being objects, I reckon
What is the localization for it in en_us.lua?
is there a way to render a sticker at half size? my sticker is detailed at 32x32 but it also shows up as double the size of other stickers?
I don’t believe so, no
You never need to check whether the triggering joker is your joker in the calculate function!
ok, which part is that?
I recommend looking at some other mods to see their implementation, because vanilla jokers aren't very similar in set up to smods jokers
I wouldn’t know myself as I haven’t tried it but I think it’d be a similar problem to a 2x sprite in 1x
Hardcoded
thanks
Yeah you can keep the other if
Blinds were annoying to make up until last week
what has changed
Smods added blind calculate support
how do i use tailsman in my own mod? im tinkering with blind scaling but for some reason it goes to naneinf instead
gang iirc there was a google docs with a list of 100+ mods, can somebody slide a link ?
I've gotten the Joker of Holding working, using this code, if you wanna make a joker destroy all played cards, this is how I did it
how would I get the game to draw a custom sprite over the top of jokers with a certain edition? like yes i know draw steps are involved but i have no clue what im doing outside of that
like i'm trying to define a sprite but G.ASSET_ATLAS["rendom_b_atlas"] is returning nil at the time the code is running, i assume because it hasnt had time to load yet (if i remove the erroring code and then do eval G.ASSET_ATLAS["rendom_b_atlas"] i get normal values)
is there not a template mod for adding textures to the customize deck screen?
i just searched the example mods github and saw no mention of Sprite so i dont think so
closest i saw was a deck skin but thats not what im looking for
Flutterren, you messed around with changing the scale of sprites, right?
i changed the scale of a joker semisuccessfuly yeah
couldnt figure out how to make the hitbox scale AND have it work with floating sprites
had to pick one or the other
ah sorry, i was asking my own question not responding to you, sorry
oop lol
Would you know how to change the scale of a sticker? @open aspen was trying to do that
if you can find the sticker's sprite try changing its .T.scale?
do you have any reccomendations, the only one i've found so far that affect other jokers is boredom from the cryptid mod but i can't make heads or tails from that one
Not for that specific effect! But I do think your implementation of the effect was done properly, it's just that you used some conventions that aren't necessary for smods
ah ok, although i still need to figure out why it isn't working
If you resend the code, I'll have a look. I reckon it'll only be some details you still need to fix up 😄
ok will do
I mean what you could do is try and check Kidnapping to see how it calls for certain jokers? I know there’s another joker called Cut the Cheese that does stuff with food jokers
SMODS.Joker {
key = 'TOGO', --joker key
loc_txt = { -- local text
name = 'To Go menu',
text = {
"Food Jokes each give {C:mult}+5{} Mult",
"{C:inactive}(Ramen, Popcorn, Egg,",
"{C:inactive}Turtle Bean, Diet Cola, Seltzer,",
"{C:inactive}Gros Michel, Cavandish and Ice Cream",
"{C:inactive}are food jokers)",
}
},
config = { extra = {mult = 5}},
loc_vars = function(self, info_queue, card)
return { vars = { card.ability.extra.mult } }
end,
rarity = 2, --rarity: 1 = Common, 2 = Uncommon, 3 = Rare, 4 = Legendary
atlas = 'MMM_Jokers', --atlas' key
pos = { x = 0, y = 0 },
cost = 5,
unlocked = true, --where it is unlocked or not: if true,
discovered = true, --whether or not it starts discovered
blueprint_compat = true, --can it be blueprinted/brainstormed/other
eternal_compat = true, --can it be eternal
perishable_compat = true, --can it be perishable
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
calculate = function(self, card, context)
if context.other_joker then
if context.other_joker.config.center.rarity == 2 and card ~= context.other_joker then
G.E_MANAGER:add_event(Event({
func = function()
context.other_joker:juice_up(0.5, 0.5)
return true
end
}))
return {
Xmult_mod = card.ability.extra.mult,
message = localize{type='variable',key='a_xmult',vars={card.ability.extra}}
}
end
end
end
ok ill will check those two out
i’ll try
How would I change the vanilla stake order, for a deck? I'm trying this but it seems not to make a difference. I imagine it could be SMODS' interference with vanilla code, but I'm not sure how I'd go about it if that's the case
Uhh, how do I conjugate saying multiple of the same card, and does it work the same way for all ranks?
- Discard 5 Kings of Hearts
- Discard 5 1s of Hearts
- Discard 5 10s of Hearts
Is this correct? For some reason it doesn't feel correct
I don't know enough English but it sounds correct to me, although one might prefer to write the quantity extensively for clarity
or at least put a line skip
Discard 5
Aces of Spades
[…]
You could probably get away with saying discard 5 cards of a specific type
or maybe you restructure it in the singular
And then list the example
The unlock condition is "Discard 5 Kings of Hearts at once"
Discard an
Ace of Spades
5 times
[…]
I think vanilla has that
Vanilla has a royal flush I think
Vanilla has Seeing Double
Yeah they said it like “play a hand that contains 4 7 of clubs”
It has two examples, discarding a royal flush (Brainstorm) and discarding 5 jacks, suit independent (Hit the Road)
It also does spell out "four"
So you could just do “discard a hand that contains five Kings of hearts”
Would it be five King of Hearts? Following Seeing Double's example?
Probably
It doesn't pluralize 7
I feel like King should be pluralized
what is the frame rate for the blind animations
IIRC they had 17 frames
i mean the fps, theres 21 frames if i did my math correctly
you can just return x_mult = card.ability.extra.mult. SMODS will take care of the message. Besides that, I'm honestly not seeing why it shouldn't trigger. Do you know if it enters the context properly?
fair
@hushed field new tech
well thanks for taking a look at it, gonna work on it more tomorrow
oh nice. I should get something like that into Kino soon, before I make a joker that's too bloated with glsosary terms 😛
would someone be able to provide an example of a card that works like hit the road or yorick? pls 🙏
It was simpler than expected
wouldn't it be a_mult?
might be
a_mult actually adds it in this case
message = localize({ type = "variable", key = "a_mult", vars = { card.ability.mult }}),
You can return a message that shows the mult
true although right now im only trying to get something to work
and then do ``` mult_mod = card.ability.mult
and now the game crashes on boot
Hello! I'm trying to make mod for the game, and I wanted to ask what states does context.cardarea have?
replace card.ability.extra.mult with just card.ability.mult
or if you're trying to get it to work with card.ability.extra.mult you can just reverse it
basically it's calling the value that doesn't exist "card.ability.mult"
I love overdesigning things
seems to be a missing } but idk how this message induced that
message = localize({ type = "variable", key = "a_mult", vars = { self.config.extra.mult_add }}),
}```
here's the full reutrn function, idk how it didn't jank out 😭
oh wait hold on
replace mult_add with card.ability.extra.mult
mult_add's gonna throw nil
ok i got a message although it was indeed a nil mult
ok it crashed
47: attempt to index field 'card' (a nil value)
From what I remember it’s == G.play or == G.hand
Send the full code please
ok
SMODS.Joker {
key = 'TOGO', --joker key
loc_txt = { -- local text
name = 'To Go menu',
text = {
"Food Jokes each give {C:mult}+5{} Mult",
"{C:inactive}(Ramen, Popcorn, Egg,",
"{C:inactive}Turtle Bean, Diet Cola, Seltzer,",
"{C:inactive}Gros Michel, Cavandish and Ice Cream",
"{C:inactive}are food jokers)",
}
},
config = { extra = {mult = 5}},
loc_vars = function(self, info_queue, card)
return { vars = { card.ability.extra.mult } }
end,
rarity = 2, --rarity: 1 = Common, 2 = Uncommon, 3 = Rare, 4 = Legendary
atlas = 'MMM_Jokers', --atlas' key
pos = { x = 0, y = 0 },
cost = 5,
unlocked = true, --where it is unlocked or not: if true,
discovered = true, --whether or not it starts discovered
blueprint_compat = true, --can it be blueprinted/brainstormed/other
eternal_compat = true, --can it be eternal
perishable_compat = true, --can it be perishable
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
calculate = function(self, card, context)
if context.other_joker then
if context.other_joker.config.center.rarity == 2 and card ~= context.other_joker then
G.E_MANAGER:add_event(Event({
func = function()
context.other_joker:juice_up(0.5, 0.5)
return true
end
}))
return {
message = localize({ type = "variable", key = "a_mult", vars = { self.config.extra.card.ability.extra.mult }}),
}
end
end
end
}
In Steammodded, how do we track if glass is played but does not break? I can see where I could modify the original state_events code, but after steammodded, it is harder to see where to make an edit 🙂
return {
message = localize({ type = "variable", key = "a_mult", vars = { card.ability.extra.mult }}),
}
Replace the old message with that
What’s the problem?
althought the actual mult doesn't seem to be adding
Can you explain your joker to me
It’s hard to read code on the phone
It’s all squished
it's supposed to work similar to how the baseball card works, right now it's supposed to just a copy but with a diffrent mult, later on i will change it to use a diffrent subset of jokers
it's supposed to give +5 for each uncommon as written right now
hey i could have sworn there was a way to override the collection order and set it manually but i can't find it
the pop up thingy works but it's not adding any actual mult
do mult = card.ability.extra.mult in your return statement
oki thanks
although i'm probably gonan call it quits for today after this im getting eepy
IT WORKS
:)
well now to change the subset of jokers.... tomorrow
calculate = function(self,card,context)
if context.cardarea == G.jokers then
if context.before and not context.blueprint then
local faces = true
for i = 1, #context.scoring_hand do
if not context.scoring_hand[i]:is_face() then faces = false end
end
if not faces then
local last_mult = card.ability.Xmult
card.ability.xMult = 0
if last_mult > 1 then
return {
card = self,
message = localise('k_reset')
}
end
else
card.ability.Xmult = card.ability.Xmult + card.ability.extra.XmultMod
end
elseif not context.after then
if card.ability.Xmult > 1 then
return {
card = card,
Xmult_mod = card.ability.Xmult,
message = 'X' .. card.ability.Xmult,
colour = G.C.MULT
}
end
end
end
For some reason (maybe a really stupid one) the card keeps playing over and over again over any action. How can I make it only play when jokers are calculated?
Hmm.... is there a stored config for hands in the same way there is for centers? I need to know which hands are secret hands at the time of a hand being played, but the game sets the only obvious property marking them (visible) otherwise when they're played
Or do I literally just have to call Game:init_game_objects() myself?
Okay, I think the protoype for everything is just in SMODS.PokerHands
ok this code adds the sticker to index + 1, but it doesnt remove the sticker from card
how do i remove the sticker lol
bump
if context.joker_main then
use this instead
is there a way to get this to display Jack Queen King Ace?
atm its just displaying the Jack twice instead of Jack & Ace
who did this
this is in smods repo but it doesnt seem to work
figured it out
my apply function used to be this.
i changed it to this and used the same method to apply it except with false as val
just in case anyone else finds this issue i had thats how i fixed it
What is wrong? I tried to disp;ay a message under the joker but it shows me this
does anyone know if there is documentation on xchips support
riffraff 2
but does it work in other languages
Doubtful
Is there a way for me to reference the current blind type? I know you can check if boss blind. But lets say I wanted to check for big blind?
Vanilla checks for the name
The proper way would be to check for the key
how do you modify blind selection like the enter the gungeon challenge (all blinds are boss blinds)
i couldnt find anything in the games and mods code
what mod is that
I had someone else's code and my code that could do something similar, but not the same
cryptid mod
blind choices are stored in ```lua
G.GAME.round_resets.blind_choices --keys Small, Big, Boss
thanks
be aware you will have to do some finangling with the way the game handles ante increases if you say have all boss blinds
ante 8 round 3 💀
how are you
yeah that sure is my code that fixes that bug
I forgot to write down whose code I saved so I took the opportunity to remind myself before I share it with other people again
lol, fair. i appreciate it
would this be how you implement a random mult value?
Not exactly
It'd be math.random(), but I'd suggest using pseudorandom instead
There's a pseudorandom utility to ensure that values are consistent per seed
ah
Also, how do I force the played hand to be a specific type?
Hi dudes, what should this cute little guy do?
how would i implement that though?
Go looking for it in the github, the example joker mod has multiple randomized jokers in it
ah
Can I get an answer for this one? I've got a joker that turns every card in a Straight, Full House, or Five of a Kind into a wild card, but the game doesn't recognize it as a Flush version of those hands after turning them into wild cards
Poker hand?
Yeah
Try next(context.poker_hands[“your poker hand”]
Does that force it to be that hand?
I'm using that to detect the current hand right now
Just tried it, it doesn't
If you want to force it then you need to do separate code for it to not score anything
So if not the poker hand then do this
What to do I don’t know
But I’m sure somebody has coded something like that
You can also look at boss blind mechanics
Cryptid has consumables that force the game to recognize the played hand as a different poker hand
So I know it's possible
Anything is possible!!!
how does one make a message be a variable so you can have e.g the x mult of a joker show when its upgrading?
I think you can just treat a message like a string, so you can concatenate with 'text'..variable
so like this?
Look at stampeded examples at the runner
It shows you exactly what to do
o7
is this an incorrect place to put "x_chips = ..."? im assuming it is bc it isnt working lmao
It would need to be in the return of the function
ty, didn't occur to me to have one at the end that isnt within the IFs 💀
It's not a context, but I think it's one of the states in G.STATES
got crashes saying arithmetic on hand_chips is result in nil
pretty sure my code isnt causing that
default value of extra.x_chips is 1
How do I set the current hand chip value?
I can change the visual number, but I can't figure out how to change the actual value
i think its G.hand_chips?
Doesn't appear in the game's code
I think I've got a roundabout way of doing it, as per usual
This is said roundabout way, change the text, add the difference
got this crash on triggering the joker
its specifically this line and idk if i've implemented it wrong or what
steammodded added support for it a month ago apparently
I don't know then
im attempting to make my sticker display at half the scale/size (because its 32x32 for detail but it also displays at double the size as other stickers), how can I do it?
you don't use self, you use card
and your function definition should be calculate = function(self, card, context)
Are you using Steamodded or just modifying the balatro code?
steammodded
...could i add a seal to a joker?
this is wrong for sure
but like its the closest ive got
What is the correct way to set probabilites so that it is affected by oops all sixes
G.GAME.probabilities.normal
that's the number that is affected by Oops
For example, 1 in 10 chance would be:
local triggered = pseudorandom("seed") < G.GAME.probabilities.normal / 10
how can i get the Sprite behind my sticker
How would i display this in local vars, like the chance, because it says the GAME field is nil
anybody have an idea for an effect
i was thinking even rank cards give x2 mult when scored but i feel as if "even rank cards" is too broad for them to give x2 mult
YO
What does your loc_vars look like rn?
i wanted to make an animated joker that was the head bobbing animation of abbie
W joker
uhh id ask in fan art lowkey
loc_vars = function(self, info_queue, card)
return {
vars = {
card.ability.extra.destroyChance,
card.ability.extra.moneyChance,
card.ability.extra.money
}
}
end,
config = {
extra = {
destroyChance = G.GAME.probabilities.normal / 2,
moneyChance = G.GAME.probabilities.normal / 2,
money = 5
}
},
i see a lot of good ideas there
hey hey excuse me what
i'd add another thing to it like, enhanced cards with even rank or something
yeah that seems good
You'll need to reformat your function. Keep the probabilities variable separate from the actual odds number. I don't know that GAME is accessible from within the ability table Here's how you can reformat it:
loc_vars = function(self, info_queue, card)
return {
vars = {
G.GAME.probabilities.normal,
card.ability.extra.destroyChance,
G.GAME.probabilities.normal,
card.ability.extra.moneyChance,
card.ability.extra.money
}
}
end,
config = {
extra = {
destroyChance = 2,
moneyChance = 2,
money = 5
}
},
You'll need to add some more variables to the description and have them like #1# in #2# for those
anyone know?
how do i make it so that a rarity is not available in shop but is still summonable
(just like Legendaries, but my own custom rarity)
If I'm using SMODS.create_card, how many of these lines do I not need anymore?
local card = create_card('Joker', G.jokers, nil, nil, nil, nil, nil, 'pana')
card:add_to_deck()
G.jokers:emplace(card)
card:start_materialize()
G.GAME.joker_buffer = 0
I recreated pi from cryptid mod
Is it fine if i put this in my mod since it is heavily inspired and referenced from cryptid
Im not so sure so asking here
I mean cryptid didn't invent the concept of pi on a pie but it's a bit weird to purposefully have your joker look almost identical to another mod's joker imo
it just makes it fanart, which isnt deemed weird
or it can even be said to be a 'cryptid reference'
there's fanart and there's recreating the sprite and using it
i think if its fine for people to have the same ideas for jokers its fine to use the same art if they arent just copying the png
is it possible to have multiple pages in the config UI for my mod?
Dude idk
True, then i should probably change how it looks
I used it for the reference
like yours does look better but
we know 💀
I should change it then