#💻・modding-dev

1 messages · Page 259 of 1

modern kindle
#

also hi winter 👋

manic rune
#

oh hey, im born the same year as your brother :D

chrome widget
#

Basically how I feel about digital illustration lmao

#

Hi Dilly!!

modern kindle
frosty dock
#

uhh

modern kindle
#

i forgot to add winter as someone i like seein and interacting with
i see winter as a smartypants too

frosty dock
#

how would i do that

thin anchor
#

ho ho he he!

manic rune
#

bluetooth connection :3

modern kindle
manic rune
#

"your bluetooth device is ready to pair"

zealous glen
#

I think talent exists as having an easier time learning some topics. But that doesn’t mean anything without work

frosty dock
zealous glen
#

And if you’re talented earlier, people’ll usually encourage that talent by giving you work

modern kindle
#

when can we get a bepis device

tepid crow
#

oh btw Aure, maybe you know more about this?

zealous glen
#

What’s university level over there?

neat plover
#

@thin anchor

high eagle
#

...i still need help, im really sorry to bug

chrome widget
manic rune
high eagle
thin anchor
chrome widget
neat plover
#

a few mental breakdowns

open aspen
#

why isnt this working 😭 anyone know?

modern kindle
tepid crow
#

share the code that's causing this issue

manic rune
primal shoal
#

ah i want to make that old man consequences minigame from ucn in balatro now

zealous glen
#

Not a trans girl but I was taking depression meds

modern kindle
#

i am also clinically diagnosed with the spicy sadness and shit so i feel you

high eagle
neat plover
manic rune
#

yeah uh, show me your sticker's apply function

frosty dock
chrome widget
#

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

limber blaze
#

obviously thats how it works

open aspen
#

i thought it had a default implementation

manic rune
#

you need one 😭

#

this is mine

open aspen
#

ty

simple mural
limber blaze
#

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

limber blaze
zealous glen
# frosty dock for what I did at 15, like calc 1/2 and linear algebra

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

tepid crow
# high eagle

Huh, weird. Try disabling all mods except your own and debugplus and see if it still crashes?

limber blaze
#

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

open aspen
#

still didnt work WHY

high eagle
#

ill try!

simple mural
limber blaze
#

tetration for the most part

open aspen
#

i literally copied it directly

manic rune
#

do you have hide_badge = true?

primal shoal
open aspen
#

no i dont

manic rune
#

huh

hushed field
manic rune
#

can you show me the code for the stickers

open aspen
#

sure

frosty dock
manic rune
zealous glen
# simple mural What is the difference between Self and Card?

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

manic rune
chrome widget
#

Your hanafuda joker just doesn't have the atlas field set

open aspen
zealous glen
tepid crow
manic rune
#

-# i think

limber blaze
#

my most recent obsession is lambda calculus but im too stupid to learn anything more than what people tell me so im cooked

manic rune
#

wait maybe you do

#

scrap that

zealous glen
simple mural
limber blaze
#

anyway i do actually have a question about localization

chrome widget
#

Oh wait formatting issue

zealous glen
limber blaze
#

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

chrome widget
high eagle
#

ohhhhhhhh

#

wait maybe

tepid crow
#

smods should automatically prepend it 🤔

zealous glen
chrome widget
#

it would be [prefix]_super_balatro_sweater unless you specifically set something to change it

limber blaze
#

atlases that are defined in an smods.x() function usually automatically prepend the prefix

chrome widget
#

... I think

simple mural
limber blaze
#

X specifically not C

manic rune
#

ghhhh

limber blaze
simple mural
turbid maple
#

linear algebra being a confusing name for laypeople is really funny

zealous glen
#

@limber blaze part 1

open aspen
turbid maple
#

once saw a small bookstore place a linear algebra textbook next to children's algebra workbooks

zealous glen
#

Part 2

tepid crow
open aspen
manic rune
#

😭

limber blaze
#

ill try it out

open aspen
#

its just algebra right egg

turbid maple
#

it's literally lines and algebra stuff you do in middle school

#

how hard can it be

high eagle
#

i tried winters fix, too, and no cigar

tepid crow
open aspen
#

iykyk

high eagle
zealous glen
thin anchor
#

im going to redraw this and name it ai slop joker

high eagle
#

jombo.... dokr...........

fervent thicket
#
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?

zealous glen
#

Not the Jombo

open aspen
# open aspen

can anyone spot any problems with this code? that would prevent me from applying the sticker with debugplus?

high eagle
thin anchor
#

.jokpr
the deck building game

#

rkod

tepid crow
zealous glen
# open aspen oh boy

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 😭

fervent thicket
#

Oh... I'm dumb

turbid maple
#

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

open aspen
#

anyone spot any problems with this code for a sticker? It wont apply with debug plus

twilit cargo
thin anchor
#

balala 2

turbid maple
#

jombo poker

twilit cargo
#

Jombo ❤️❤️❤️

turbid maple
#

welcome to jombo com

twilit cargo
#

love jombo

thin anchor
#

jombo balatro_B

zealous glen
#

no thoughts just jombo

tepid crow
# high eagle i see i see

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

twilit cargo
high eagle
#

hmmmmmmmmmm

tepid crow
#

does it work if you don't define the joker at all?

#

only the atlas

high eagle
#

...maybe i can delete and reinstall balatro?

tepid crow
thin anchor
tepid crow
fervent thicket
#

Kinda

tepid crow
#

oh my bad

#

didn't see that

twilit cargo
#

OK IM ACTUALLY FREE FROM DYNATEXT THIS TIME breakingchains

turbid maple
modern kindle
#

shits a menace

turbid maple
#

you will never be free from the horrid shackles of UI code

tepid crow
modern kindle
#

😄

twilit cargo
#

i had to figure it out last night for evil jenker joker

#

fucked up and malicious

thin anchor
twilit cargo
#

jombu

tepid crow
lucid owl
#

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?

twilit cargo
tepid crow
lucid owl
#

hm, figured it'd account for that

lucid owl
twilit cargo
#

ohh i c

high eagle
# turbid maple how are you defining the atlas?

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
}

simple mural
#

Is there a way for the edition to directly influence the card, joker or tarot?

open aspen
#

idk if that a valid way to make the sticker not show up

tepid crow
#

seems a bit janky but eh

#

probably fine

tepid crow
high eagle
#

oh hold on

#

i would just delete the code temporaliy then?

tepid crow
#

or just comment it out yes

#

for the joker only

keen tiger
turbid maple
tepid crow
thin anchor
turbid maple
#

I mean just making sure they're putting the image file in the right place

chrome widget
#

Typically SMODS.Atlas errors specifically if there's an issue collecting the file so I didn't assume that was the problem

tepid crow
#

oh like the actual image file

keen tiger
thin anchor
#

ooo

high eagle
turbid maple
#

mm i guess so

open aspen
#

thats all

high eagle
#

....still crashed

open aspen
#

like legendaries

zealous glen
tepid crow
open aspen
simple mural
zealous glen
#

And pass the same arguments as the soul sprites

open aspen
tepid crow
#

also I don't know what you meant with "the principle of counting"

zealous glen
simple mural
zealous glen
#

The wiki should lists the args

tepid crow
open aspen
#

this is the wiki docs

#

but it wasnt clear on how you would actually write the function

zealous glen
# open aspen

yes it’ll be something like draw = function(self, card, layer) whatever_the_sprite_is_named:draw_shader(…) end

chrome widget
#

You'll have to look at the vanilla code for it, because the Sprite file has a bunch of drawing specific functions

open aspen
#

alright

#

ty all

zealous glen
#

But you only need one

#

You’re just drawing one layer

simple mural
#

Maybe I'll make not 450 jokers but 3 new editions SilverBudInspect

chrome widget
#

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()

zealous glen
#

Maybe I mentioned the wrong function

#

Whichever one you pass transform args to

chrome widget
#

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```
simple mural
simple mural
#

I want to make any variation of gameplay with vanilla jokers

chrome widget
#

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

high eagle
turbid maple
#

ill see if i can help when im home

chrome widget
#

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

frosty dock
# zealous glen What’s calc 1/2 for you? My uni had the general calculus courses for engineers a...

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

onyx sonnet
#

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?

tepid crow
#

it what now

#

it shouldn't 🤔

onyx sonnet
#

??

#

well then i guess my issue is another

#

hm

chrome widget
#

You have to manually set no_mod_badges = true on the joker definition for that to happen

tepid crow
#

mod badges are still enabled in the mod config?

chrome widget
#

Or yeah, disable them entirely in mod config

onyx sonnet
#

they should be enabled?

tepid crow
#

better question would be whether mod badges for other mods are showing up

thin anchor
turbid maple
#

no DOKR?

thin anchor
#

i forgot

#

aw

onyx sonnet
#

i have two self made mods both using neato as a framework and neither of them have badges

#

ill try reinstalling smods

next timber
#

how would i go about making an edition draw an additional sprite on top of the joker?

zealous glen
#

Although I suspect that French engineers might learn deeper math than Brazilian engineers

#

I’m neither so I’m guessing

tepid crow
chrome widget
#

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

quartz ravine
#

Is there a will_shatter context?

thin anchor
chrome widget
# quartz ravine Is there a `will_shatter` context?

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

next timber
#

i am looking at the code for how aikos shenanigans draws letters and i do not understand a word of it

onyx sonnet
twilit cargo
onyx sonnet
#

i dont think ive ever gone to that page 😭

twilit cargo
#

how is this gonna work on 1x 🥀

thin anchor
#

it wont 🥀

quartz ravine
#

Ah, looks like, @chrome widget , you can do this

if context.remove_playing_card then unlocks context.removed and those entities have .shattered propeerty

thin anchor
#

jombo is too powerful

tepid crow
chrome widget
wintry solar
#

whats the shatter questioin?

chrome widget
#

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

onyx sonnet
#

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 egg

open trench
#

kendrick lamar joker:

wintry solar
#

you wont know it's about to shatter in the retrigger step

chrome widget
#

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

wintry solar
#

it would calculate twice

quartz ravine
#

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.

keen tiger
#

i want to see how the end result looks in game

brazen tusk
#

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

gentle rain
thin anchor
tepid crow
#

e.g. "if hand contains exactly three 7s"

wintry solar
chrome widget
# wintry solar it would calculate twice

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

brazen tusk
chrome widget
#

The default already attempts to calculate glass shattered even if it's already been destroyed by some other means

tepid crow
brazen tusk
#

i mean it doesn't do it for quantity either but igwym it also js looks odd

gentle rain
thin anchor
#

low resolution jonkler

gentle rain
#

retro joker,,,

tepid crow
#

the mixels are real with that one

wintry solar
brazen tusk
brazen tusk
keen tiger
chrome widget
thin anchor
tepid crow
#

@wintry solar psst, does the extra table in return not work for anything complicated like retriggers and only for the basic mult/chips/messages?

wintry solar
#

uhhh that sounds correct yeah

wintry solar
tepid crow
frosty dock
keen tiger
chrome widget
#

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

frosty dock
#

actually retriggers specifically

tepid crow
frosty dock
#

yeah uh that makes sense why it wouldn't work for repetitions, they're handled in a weird way

quartz ravine
#

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

wintry solar
#

I don't think it would work on removing cards either right?

chrome widget
#

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

tepid crow
chrome widget
#

Which is, hehe, dumb. But also doesn't require patching SMODS code

frosty dock
wintry solar
#

I see

open aspen
#

why does my card sticker say error?

frosty dock
#

you need a label string in misc.labels

thin anchor
#

i love self inserts

open aspen
frosty dock
#

yes

open aspen
#

or would it be text =

tepid crow
#

it should be under misc.labels, not under misc

minor furnace
#

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

tepid crow
# open aspen oop yea

and check out misc.labels in the vanilla en-us, that should probably give you the formatting you need

frosty dock
minor furnace
frosty dock
#

the docs totally mention that

twilit cargo
frosty dock
#

no prefix on consumable types though

minor furnace
#

oh awesome

#

glad my intuition was right on it at least lol

open aspen
chrome widget
#

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));
}```
tepid crow
thin anchor
#

1x jombo doesnt look too bad

frosty dock
twilit cargo
frosty dock
#

if you need any and allow them to be changed, you have to copy them in apply

thin anchor
twilit cargo
thin anchor
#

yeah

long sun
#

hihi! when my runs starts, why does book_card not get changed?

#

Mail-In Rebate changes its rank just fine

open aspen
frosty dock
#

you can set card.ability[self.key] to a copy of self.config in apply

thin anchor
#

is this correct

frosty dock
#

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

thin anchor
#

ok

brazen tusk
#

does this seem alr balance and gamefeel wise?

quartz ravine
#

Anyone know of a way to check to see if your lovely patch was applied?

long sun
#

(i changed 2 to 14 to match Mail In Rebate, btw)

open aspen
#

is this correct?

chrome widget
thin anchor
#

is this correct

open aspen
#

im getting attempt to index boolean value at line 23

frosty dock
open aspen
#

that makes sense

frosty dock
#

(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

frosty dock
#

copy_table

open aspen
#

alright now mousing over the card with the sticker crashes the game

#

goodness

thin anchor
#

how would you correctly make it so dollars subtracts from mult

quartz ravine
#

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

warped marsh
#

How do I change a suit? Is it set_suit or?

heady siren
#

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

open aspen
heady siren
tepid crow
#

also, I made a joker with it, so I'm pretty sure it exists

heady siren
#

And context.destroy_card doesn't work, the subsection doesn't work either

tepid crow
#

how does it "not work" then?

heady siren
#

It only destroys scored cards

tepid crow
#

Ah, yeah that seems about right

#

hmm

heady siren
#

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

thin anchor
#

how would i subtract mult from dollars?

heady siren
#

Nobody else has even thought of deleting all cards in played hand apparently /=

heady siren
#

If mult = 20 and money = 15, you'd get 5 mult in return with that code

thin anchor
#

oh yeah
i want the joker's mult to decrease with how much money you have
but it isnt doing anything at all

twilit cargo
forest ivy
#

got a crazy idea

tepid crow
twilit cargo
#

atleast i dont think it does

forest ivy
#

feed as much info abt smods as possible from example mods & docs to chatgpt and then test it

#

smh he finna use console.write()

open aspen
tepid crow
wintry solar
tepid crow
#

oh

#

haha

#

you're right lmao

#

guess you're gonna have to iterate through full_hand then

tepid crow
tepid crow
open aspen
thin anchor
#

it works!!!!

#

aw i need to add a minimum

heady siren
open aspen
#

im getting a crash with this code when mousing over the card with the sticker

onyx sonnet
minor furnace
#

I was looking at the bootup log, and I did not realize just how many Talisman patches just straight up fail

tepid crow
frosty dock
#

why not context.cardarea == G.play or context.cardarea == 'unscored'

#

heck, even context.destroy_card.area == G.play will do

tepid crow
#

wow that second one is weird

quartz ravine
tepid crow
#

oh it's because almost all other types of effect need the card to be scoring

#

ugh that's annoying

thin anchor
#

how would i add a minimum to mult?

frosty dock
#

math.max(..., 0)

gentle rain
# gentle rain

"Each played [rank] gives +9 mult when scored, rank set when obtained"

upbeat bronze
#

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

toxic rain
#

thatt's weird, you sure you don't have a typo

thin anchor
upbeat bronze
#

im certain

thin anchor
open aspen
upbeat bronze
#

cardpack_hc.png and cardpack_lc.png in the assets folder, the json, and the lua

upbeat bronze
thin anchor
#

so like this

heady siren
#

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

simple mural
#

How can i get mod-id from the code?

zealous glen
upbeat bronze
#

really not sure why its just not working

gentle rain
#

so you dont know what it is till you pick up the phone!!!

zealous glen
#

hmmm

#

a bit weak

zealous glen
thin anchor
#

is this how you would add a minimum of 0 to a joker's mult?

open aspen
thin anchor
#

i am going insane

red flower
#

math.max returns the maximum between values math.max(50,0) will always return 50

open aspen
upbeat bronze
#

like i dont get why its just not appearing

upbeat bronze
#

idk what im doing wrong

faint plank
#

did you figure that out? im doing the same thing

crystal perch
#

nope, i'm pretty sure the shadow is tied to the soul shader so i think you'd have to make a custom shader

simple mural
zealous glen
faint plank
#

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

simple mural
zealous glen
#

you can just use it

#

?

simple mural
#

How?*

zealous glen
#

Didn't you define the mod ID?

#

That's it

#

Just use that

simple mural
#

...

#

How do I use the my mod ID?

zealous glen
#

Idk what you want it for

#

Why do you need it?

simple mural
#

I need it for SMODS.Joker:take_ownership()

chrome widget
#

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

zealous glen
zealous glen
#

You shouldn't need to take ownership of your own Joker

#

Why are you trying to do it?

simple mural
zealous glen
#

any reason you can't change the parameters before creating the object?

#

Like

simple mural
zealous glen
#

You create a base table

#

Then you add the extra parameters to the table

#

Then you create the Joker

gentle rain
quartz ravine
#

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

open aspen
quartz ravine
simple mural
open aspen
zealous glen
#

but anyways

#

you defined your mod ID

#

so you can just copy-paste the ID you defined

open aspen
#

its in ur metadata.json

simple mural
open aspen
#

copy it with ctrl v

simple mural
#

Not with a ctrl-c + ctrl-v

open aspen
#

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"

simple mural
open aspen
#

ok do what i said then

open aspen
zealous glen
#

where does hoveredCard come from? On GitHub it looks like a global variable

heady siren
open aspen
#

it doesnt

#

thats why im dying out here 😭 wtf is going on :(

#

something is nil thats all i know

heady siren
#

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?

open aspen
#

that seems like a headache lowkey......

heady siren
#

Just add one in each condition with a different name

heady siren
open aspen
#

like i have no idea what is nil right now lol

#

not even the slightest idea

heady siren
#

Try printing your variables right before you reference them to see if any of them come back nil

hushed field
manic rune
heady siren
#

And you sell the joker to trigger it, so it can happen in the blind, booster, or in a shop

forest ivy
#

gang slide some balatro mods that are adding blinds and not crashing my game

quartz ravine
#

Wow, when in doubt, just use regex. This is soooo powerful

open aspen
heady siren
open aspen
#

oh i see

#

i mean

#

it crashes only when i mouse over it

heady siren
open aspen
#

and the crash log talks about UI

forest ivy
heady siren
#

It would narrow down where the nil variable is being used

hushed field
open aspen
#

the print doesnt show up in the crash log

heady siren
#

It won't, it'll show up in the console

brazen tusk
#

i have no idea what im doing here ;-;
would someone be able to help me get this functioning like hit the road?

open aspen
heady siren
open aspen
#

nw

#

its a weird issue anyways

#

considering the log isnt already showing me anything

heady siren
#

I'm giving you a potential solution and you're just sidestepping actually trying it

open aspen
#

i mean, i really dont understand where im putting the prints here

heady siren
#

Inside the conditions, and right before referencing variables, I said that before

open aspen
#

would i print the variables?

#

to make sure they arent nil

hushed field
#

print statement debugging is a very typical way to test where functions go wrong, if a normal debugger is impractical

open aspen
#

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

zealous glen
open aspen
#

and the log points to ui.lua

hushed field
#

That means it'll be an error in your text or loc_vars

zealous glen
#

/balatrojoker /jimbPog

open aspen
#

what if i just comment loc_vars out for now then and see if the error still happens

hushed field
#

could you post the code and error log again? clicking back up through replies is buggy as hell on discord for me

open aspen
#

sure

#

give me a moment i gotta crash it again 💀

heady siren
#

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

open aspen
#

you mean if it does print it right?

heady siren
#

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

open aspen
#

ah gotcha

#

but if calculate would get run when i hover over, it would just crash before i see anything

heady siren
#

Also, where is loc_txt?

open aspen
#

this is my en-us.lua file

heady siren
#

It says that's required for stickers

open aspen
#

and its in localization folder

heady siren
#

Try putting it into the actual sticker just in case

open aspen
#

ok i narrowed it down by hail marying

#

if i comment the misc section it doesnt crash

hushed field
#

error can't be in the calc function, btw, that shouldn't trigger at all by hovering over a card

open aspen
#

in localization

#

so i assume i did that wrong

heady siren
#

Well there ya go

heady siren
open aspen
#

yea

#

if it was i would have not figured it out otherwise

heady siren
#

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

open aspen
#

lord have mercy on programmers souls

open aspen
hushed field
heady siren
#

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

hushed field
#

hahaha

heady siren
#

Or print('yes')

#

To answer the question "is it working?"

hushed field
#

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

heady siren
#

Everybody has their funny print phrase

next timber
hushed field
heady siren
hushed field
#

instead they're labelled just as whatevertheyekeyis = "whateveryourstringis"

next timber
#

ok im back to trying to figure out how tf to draw custom sprites

open aspen
#

fixed it

#

now i just gotta figure out how to make the color not white on the background

hushed field
# open aspen i referenced cryptid code

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

open aspen
#

ive attempted to check cryptid code for stuff and realize its not applicable in my case

toxic rain
#

i'm trying to do a sorta baseball card like ability but i keep getting a nil value when "attempting to index field 'ability' "

open aspen
#

cause its some weird way of doing it

open aspen
hushed field
#

also, stickers happen to be janky as hell, and Cryptid's probably heavily changed them to fit their needs

hushed field
toxic rain
# toxic rain i'm trying to do a sorta baseball card like ability but i keep getting a nil val...
    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
    ```
hushed field
crisp elbow
#

Probably is somewhere in the calculate function that lies the problem everything else here looks legit

toxic rain
# hushed field you're gonna wanna share your calculate function as well 😛

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

open aspen
#

is there any easy way to render a sticker at half the size

hushed field
crisp elbow
#

^

toxic rain
#

ah ok that would explain it, what should i use instead?

hushed field
#

card. instead of self.

toxic rain
#

ok thanks

forest ivy
#

smh github is hard shit

crisp elbow
#

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

quartz ravine
#

Nevermind everything i said about regex

toxic rain
hushed field
#

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

crisp elbow
#

Key would probably be better if you can define it in a table somewhere

hushed field
#

or a for loop ofc

open aspen
modern kindle
open aspen
#

so i would maybe go about it like that

crisp elbow
#

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

hushed field
#

I've set up a tagging system for Kino so I can easily assign and set qualities to jokers, which is quite helpful

crisp elbow
#

Up to you and that specific purpose though

modern kindle
#

Now i just have a isfood bool which makes it easier for modded shit

toxic rain
forest ivy
#

imagine a mod that would add a separate deck for each rgb color from 0 0 0 to 255 255 255

#

using purest random

crisp elbow
#

Would probably crash the game

hushed field
#

I know Cryptid does it like that

toxic rain
#

ah ok makes sense

#

ok the game isn't crashing but the jokers doesn't seem to do anything

forest ivy
onyx sonnet
forest ivy
#

just randomly

open aspen
onyx sonnet
#

But that also includes certain jokers like luchador

open aspen
onyx sonnet
#

Why would you care about cryptid comp

#

That mod isn't even compatible with itself

open aspen
#

any mod could do that

#

if they wished

#

its a better solution to just define the jokers imo

#

even if its harder to do

crisp elbow
#

Not necessarily “harder” really

onyx sonnet
#

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

crisp elbow
#

Just takes a little more time

open aspen
#

rather than just being incompatible with a joker from a different mod

onyx sonnet
#

I think you're better off making a joker about something perishing on its own than food specifically

hushed field
#

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?

open aspen
#

thats actually prolly even better

#

than just defining a list

crisp elbow
toxic rain
#

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
}```
hushed field
# open aspen thats actually prolly even better

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

crisp elbow
#

What is the localization for it in en_us.lua?

open aspen
#

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?

crisp elbow
#

I don’t believe so, no

hushed field
open aspen
#

not even with draw function?

hushed field
#

I recommend looking at some other mods to see their implementation, because vanilla jokers aren't very similar in set up to smods jokers

crisp elbow
#

Hardcoded

forest ivy
#

why mods arent adding new blinds at all

#

i only got 7 pages

hushed field
toxic rain
crisp elbow
#

Yeah you can keep the other if

hushed field
forest ivy
#

what has changed

crisp elbow
#

Did something change to be able to make blinds easier?

#

Is it like SMODS.blind now?

hushed field
#

Smods added blind calculate support

crimson marlin
#

how do i use tailsman in my own mod? im tinkering with blind scaling but for some reason it goes to naneinf instead

forest ivy
#

gang iirc there was a google docs with a list of 100+ mods, can somebody slide a link ?

heady siren
#

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

next timber
#

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)

upbeat bronze
#

is there not a template mod for adding textures to the customize deck screen?

next timber
#

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

hushed field
#

Flutterren, you messed around with changing the scale of sprites, right?

next timber
#

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

upbeat bronze
next timber
#

oop lol

hushed field
#

Would you know how to change the scale of a sticker? @open aspen was trying to do that

next timber
#

if you can find the sticker's sprite try changing its .T.scale?

toxic rain
hushed field
toxic rain
hushed field
toxic rain
#

ok will do

crisp elbow
toxic rain
# hushed field If you resend the code, I'll have a look. I reckon it'll only be some details yo...
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
toxic rain
plucky wolf
#

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

zealous glen
#

New technology

#

Easier to implement than it seemed

chrome widget
#

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

zealous glen
#

or at least put a line skip

#

Discard 5
Aces of Spades
[…]

crisp elbow
#

You could probably get away with saying discard 5 cards of a specific type

zealous glen
#

or maybe you restructure it in the singular

crisp elbow
#

And then list the example

chrome widget
#

The unlock condition is "Discard 5 Kings of Hearts at once"

zealous glen
#

Discard an
Ace of Spades
5 times
[…]

zealous glen
crisp elbow
#

Vanilla has a royal flush I think

zealous glen
#

Vanilla has Seeing Double

crisp elbow
#

Yeah they said it like “play a hand that contains 4 7 of clubs”

chrome widget
#

It has two examples, discarding a royal flush (Brainstorm) and discarding 5 jacks, suit independent (Hit the Road)

chrome widget
#

It also does spell out "four"

crisp elbow
#

So you could just do “discard a hand that contains five Kings of hearts”

chrome widget
#

Would it be five King of Hearts? Following Seeing Double's example?

crisp elbow
#

Probably

chrome widget
#

It doesn't pluralize 7

zealous glen
#

I feel like King should be pluralized

worthy stirrup
#

what is the frame rate for the blind animations

zealous glen
#

IIRC they had 17 frames

worthy stirrup
#

i mean the fps, theres 21 frames if i did my math correctly

zealous glen
#

Yeah 21

#

I did not RC

hushed field
worthy stirrup
#

fair

zealous glen
toxic rain
hushed field
brazen tusk
#

would someone be able to provide an example of a card that works like hit the road or yorick? pls 🙏

zealous glen
crisp elbow
toxic rain
crisp elbow
#

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

toxic rain
crisp elbow
#

and then do ``` mult_mod = card.ability.mult

toxic rain
real flame
#

Hello! I'm trying to make mod for the game, and I wanted to ask what states does context.cardarea have?

crisp elbow
#

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"

chrome widget
#

I love overdesigning things

toxic rain
crisp elbow
#
                    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 😭

toxic rain
#

ok ill see if that works

#

no crash

crisp elbow
#

oh wait hold on

#

replace mult_add with card.ability.extra.mult

#

mult_add's gonna throw nil

toxic rain
#

ok i got a message although it was indeed a nil mult

#

ok it crashed
47: attempt to index field 'card' (a nil value)

warped marsh
toxic rain
#

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
}
quartz ravine
#

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 🙂

warped marsh
#

Replace the old message with that

toxic rain
#

oki ill try that

#

ok i got the message alteast

warped marsh
#

What’s the problem?

toxic rain
warped marsh
#

Can you explain your joker to me

#

It’s hard to read code on the phone

#

It’s all squished

toxic rain
#

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

warped marsh
#

So it adds 5 mult?

#

And what it stacks?

toxic rain
#

it's supposed to give +5 for each uncommon as written right now

gilded narwhal
#

hey i could have sworn there was a way to override the collection order and set it manually but i can't find it

toxic rain
#

the pop up thingy works but it's not adding any actual mult

warped marsh
toxic rain
#

oki thanks

#

although i'm probably gonan call it quits for today after this im getting eepy

#

IT WORKS

warped marsh
#

:)

toxic rain
#

well now to change the subset of jokers.... tomorrow

real flame
#
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?

open aspen
#

why doesnt this set the sticker on a card?

#

is this the right method

chrome widget
#

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

open aspen
#

how do i remove the sticker lol

warped marsh
#

use this instead

upbeat bronze
#

is there a way to get this to display Jack Queen King Ace?

atm its just displaying the Jack twice instead of Jack & Ace

thin anchor
#

who did this

open aspen
#

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

real flame
#

What is wrong? I tried to disp;ay a message under the joker but it shows me this

brazen tusk
#

does anyone know if there is documentation on xchips support

thin anchor
#

riffraff 2

zealous glen
chrome widget
#

Doubtful

acoustic sundial
#

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?

zealous glen
#

The proper way would be to check for the key

crimson marlin
#

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

zealous glen
#

I had someone else's code and my code that could do something similar, but not the same

crimson marlin
#

cryptid mod

agile thistle
crimson marlin
#

thanks

agile thistle
#

be aware you will have to do some finangling with the way the game handles ante increases if you say have all boss blinds

crimson marlin
#

ante 8 round 3 💀

zealous glen
#

Yeah

#

Somone else's code that I have handles that

#

this person's

wintry swallow
#

hello

#

it's me

zealous glen
wintry swallow
#

yeah that sure is my code that fixes that bug

zealous glen
#

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

wintry swallow
#

lol, fair. i appreciate it

thin anchor
#

would this be how you implement a random mult value?

zealous glen
heady siren
#

It'd be math.random(), but I'd suggest using pseudorandom instead

zealous glen
#

There's a pseudorandom utility to ensure that values are consistent per seed

thin anchor
#

ah

heady siren
#

Also, how do I force the played hand to be a specific type?

quartz ravine
#

Hi dudes, what should this cute little guy do?

thin anchor
heady siren
thin anchor
#

ah

heady siren
heady siren
#

Yeah

warped marsh
#

Try next(context.poker_hands[“your poker hand”]

heady siren
#

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

warped marsh
#

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

heady siren
#

Cryptid has consumables that force the game to recognize the played hand as a different poker hand

#

So I know it's possible

warped marsh
#

Anything is possible!!!

brazen tusk
#

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?

heady siren
warped marsh
#

It shows you exactly what to do

brazen tusk
#

o7

covert scroll
#

What is the context for being during a round

#

Like just being inside any blind

brazen tusk
#

is this an incorrect place to put "x_chips = ..."? im assuming it is bc it isnt working lmao

stray warren
#

It would need to be in the return of the function

brazen tusk
#

ty, didn't occur to me to have one at the end that isnt within the IFs 💀

stray warren
brazen tusk
#

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

heady siren
#

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

brazen tusk
#

i think its G.hand_chips?

heady siren
#

Doesn't appear in the game's code

brazen tusk
#

ah

#

im not the best source of info 😅

heady siren
#

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

brazen tusk
#

got this crash on triggering the joker

#

its specifically this line and idk if i've implemented it wrong or what

heady siren
#

I think x_chips is a fully modded thing

#

It might not exist in the game's code

brazen tusk
#

steammodded added support for it a month ago apparently

heady siren
#

I don't know then

open aspen
#

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?

stray warren
#

and your function definition should be calculate = function(self, card, context)

brazen tusk
#

in what contexts do i use self vs card

#

ive used self for everything lol

stray warren
#

Are you using Steamodded or just modifying the balatro code?

brazen tusk
#

steammodded

rapid stag
#

...could i add a seal to a joker?

open aspen
#

but like its the closest ive got

covert scroll
#

What is the correct way to set probabilites so that it is affected by oops all sixes

stray warren
#

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

open aspen
#

how can i get the Sprite behind my sticker

covert scroll
rancid bridge
#

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

open aspen
#

YO

stray warren
open aspen
#

i wanted to make an animated joker that was the head bobbing animation of abbie

#

W joker

covert scroll
#
    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
        }
    },
open aspen
#

i see a lot of good ideas there

agile thistle
#

hey hey excuse me what

brazen tusk
rancid bridge
#

yeah that seems good

stray warren
# covert scroll ``` loc_vars = function(self, info_queue, card) return { ...

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

old bane
#

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)

errant fulcrum
#

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
lethal ridge
#

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

turbid maple
#

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

modern kindle
#

or it can even be said to be a 'cryptid reference'

turbid maple
#

there's fanart and there's recreating the sprite and using it

modern kindle
#

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

old bane
#

is it possible to have multiple pages in the config UI for my mod?

vocal cedar
lethal ridge
vocal cedar
#

this is like

#

kinda identical lol

lethal ridge
vocal cedar
#

like yours does look better but

vocal cedar
lethal ridge
#

I should change it then

vocal cedar
#

I mean, what is it gonna do?

#

If it’s gonna do the exact same shit that crypdt does uhh

#

My policy with jokers is it’s fine if you take the functionality of a joker from another mod as long as you don’t make it the exact same art honestly