#💻・modding-dev

1 messages · Page 492 of 1

sinful trellis
#

It's even on the wiki wow

normal crest
#

maybe thunk misspelled it everywhere and later on realized, but they were lazy and only changed localization

sinful trellis
#

Yeah

rotund sable
#

wdym github 😭

plush depot
#

anyone know the issue? i have the code, the texture not working, and yes i have the 1x and 2x files for it

foggy ginkgo
#

Do you have an atlas

plush depot
#

thank you

sinful trellis
#

It's working yay! Thanks everybody for the help :333

subtle merlin
#

Let me try this a new way since the way I'm trying seems to be a dead end with my level of expertise (none):
I know they don't normally have it, but is there a way to give blinds info_queue?

normal crest
#

this is great

plush depot
subtle merlin
sinful trellis
#

Lmao I forgot this one

subtle merlin
sinful trellis
#

Okay okay last one, I'll be uploading this in just a minute to Vortex unless there's a better place to do it

normal crest
#

and it wouldn't be as simple as you did with the rarities

#

cus blinds have no built in system for tooltips

subtle merlin
normal crest
#

what have you tried

subtle merlin
sleek nova
sonic cedar
#

gdi

red flower
#

<@&1133519078540185692>

karmic creek
#

ALL STEAM CARDS ARE MINE

red flower
#

nooo

subtle merlin
#

Im going to watch yt for a few hours minutes to calm down

placid star
#

how do you set the layer order of sprites in a children table?

plush depot
#

yes i have the files and yes they are named SD.png

foggy ginkgo
#

Hm

#

I have no clue

#

Doesn't look wrong

#

Did you size it right

normal crest
#

or did you want to hover a different kind of blind

#

like in the blind selection menu

red flower
#

meow

subtle merlin
normal crest
#

okay well you won't like it, cus it's just making your own UI, but here is what I did

local hover_ref = Blind.hover
function Blind.hover(self)
  if not G.CONTROLLER.dragging.target and not self.hovering then
    self.config.h_popup = {
      n = G.UIT.ROOT,
      config = { align = "cm", padding = 0.05, colour = lighten(G.C.JOKER_GREY, 0.5), r = 0.1, emboss = 0.05 },
      nodes = {
        {
          n = G.UIT.R,
          config = { align = "cm", emboss = 0.05, r = 0.1, minw = 2.5, padding = 0.1, colour = G.C.GREY },
          nodes = {
            {
              n = G.UIT.O,
              config = {
                object = DynaText {
                  string = "I am a blind",
                  colours = { G.C.UI.TEXT_LIGHT },
                  shadow = true,
                  spacing = 0,
                  bump = true,
                  scale = 0.4
                }
              }
            },
          }
        },
        {
          n = G.UIT.R,
          config = { align = "cm" },
          nodes = {
            {
              n = G.UIT.T,
              config = {
                text = "Meow",
                scale = 0.4,
                colour = G.C.PURPLE
              }
            }
          }
        },
      }
    }

    self.config.h_popup_config = { align = 'cr', parent = self }
  end
  return hover_ref(self)
end
plush depot
normal crest
#

the ui is basically just copying the hover ui that pops up in collection blinds

#

except i removed the text

#

and put meow

#

cus that's funny

foggy ginkgo
foggy ginkgo
foggy ginkgo
#

I don't have a use for this but maybe in the future

subtle merlin
#

also atp idc what has to be done as long as i can move on

normal crest
foggy ginkgo
#

Think you can put it anywhere

normal crest
#

wherever you keep your other hooks

foggy ginkgo
#

I'm a genius

normal crest
#

as long as it's not inside another function

rotund sable
#

and ofc as long as that random file is loaded

foggy ginkgo
#

Bunch of genius proplr in this server

#

Except for me ig if I can't spell prople

#

PEOPLE

gaunt thistle
#

shut up

#

we're all equal here

foggy ginkgo
#

Nah

#

I'd lose

plush depot
#

the spades diamodns one

#

after i saved multuple times

foggy ginkgo
#

Well that's fun

#

That's probably the problem

#

Didn't save

plush depot
#

i tried changing the json and main.lua names since ik what this mod is now and neither saved

#

whats going on

placid star
#

how can you check if a joker was destroyed and not sold?

modern kindle
normal crest
#

the video is just 1 frame

modern kindle
#

are u sure

chrome widget
#

Yeah I can see it

normal crest
#

i guess i can't

modern kindle
#

lmfao

#

also hi smt

#

what are u thinkin me for

subtle merlin
modern kindle
#

nah, id cruise

plush depot
#

dihlatro

modern kindle
modern kindle
#

idk can you do and not context.selling_self
im not super familiar with it

#

in checking remove from deck

red flower
daring fern
# placid star :3

In remove_from_deck you would check for not G.CONTROLLER.locks.selling_card

daring fern
modern kindle
#

oh right duh

#

<@&1133519078540185692>

#

shoot him

#

murder this man

karmic creek
#

nom nom nom

modern kindle
#

thanks goat

karmic creek
#

baahhh

modern kindle
#

youve earned a mcnugget

karmic creek
#

thanks im pretty hungry

vale glen
modest ferry
#

heyheyyy, question about the card art - what's the reason behind the 1x files and 2x files in assets?

#

and how/why are they different?

red flower
#

2x is for the pixel smoothing option

#

it's just double 1x

modest ferry
#

ohhhh~

modern kindle
#

how do you even smooth out a pixel man, it has no bumps

modest ferry
#

this is true

brisk atlas
#

Any idea why I dont get a charm tag when the boss blind is defeated?

red flower
#

what's your smods version

#

@brisk atlas

placid star
modern kindle
#

thats what im sayin

brisk atlas
red flower
#

try updating

subtle merlin
normal crest
#

what did you check exactly

brisk atlas
subtle merlin
normal crest
#

if it's a modded blind the name would be bl_prefix_key

brittle yacht
#
    key = 'sillynormalpack',
    loc_txt = {
        name = 'Silly Pack',
        text = {
            'Choose {C:attention}1{} of up to {C:attention}2{} silly Joker cards'
        },
        group_name = 'pluh'
    },
    atlas = 'sillynormalpack',
    pos = { x = 0, y = 0 },
    weight = 0.7,
    cost = 4,
    config = { extra = 2, choose = 1 },
    discovered = true,
    pools = {
        ['SillyPool'] = true,
    },
}


-- ObjectTypes
-- -- Silly Pool
SMODS.ObjectType {
    key = 'SillyPool',
    default = 'j_reserved_parking',
    cards = {},
    inject = function(self)
        SMODS.ObjectType.inject(self)
    end,
}```
wind steppe
subtle merlin
#

It works now! (im still messing with numbers to make the background taller)

brittle yacht
brittle yacht
wind steppe
# brittle yacht specific pool
    create_card = function(self, card)
        return SMODS.create_card({set = "SillyPool", area = G.pack_cards, skip_materialize = true, key_append = "sinkhole_sillynormalpack"})
    end,
#

also why is your default Reserved Parking

normal crest
brittle yacht
#

lol

subtle merlin
normal crest
#

yeah that's now what you wanna do

#

each line should be one of these, for example

wind steppe
wind steppe
# brittle yacht no...

anyways you should probably change the default to something thats actually in the pool

brittle yacht
#

yeah im gonna

wind steppe
#

dont worry about reserved parking its my favorite food joker

normal crest
gusty iron
#

Would there be anyway to make a seal that:

If this card is not destroyed by intended means, create a copy of the card, and remove the seal.

If so, how would I go about doing it?

red flower
#

what does "is not destroyed by intended means" mean

gusty iron
red flower
#

yeah sounds plausible, for jokers you can use the new destroying context for playing cards it's a bit harder i think

wintry solar
#

would be very hard for playing cards I think

gusty iron
#

Also, how would i debuff multiple suits with a boss blind?

red flower
#

context.debuff_card

gusty iron
#

wait think i figured it out

#

recalc_debuff 🔥

faint yacht
gusty iron
#

how would i check if a card is a joker?

daring fern
gusty iron
#

heres my current function:

    recalc_debuff = function(self, card, from_blind)
    return not card:is_suit("Hearts")
    end,
#

actually i shouldve asked how to check if its a playing card

daring fern
gusty iron
#

THERE WE GO

misty radish
#

Why isn't it working?

red flower
#

use debugplus instead

#

or hook the start run function

real night
#

how do i use game:init_item_prototypes()

red flower
#

for what

real night
#

like just to see the list of G.GAME things

red flower
#

sdm was saying that you should look at the code

real night
#

ohhh

#

where Is That.

red flower
#

probably game.lua

rotund sable
#

do i really have to make a new text node for each color change in the ui?

real night
#

wait its not in steamodded

red flower
#

no

#

it's a vanilla function

real night
#

well damn i can't use my computer rn

rotund sable
#

pain

red flower
misty radish
red flower
normal crest
#

Help, what is the dark background color here

wintry solar
#

G.C.BLACK iirc

#

maybe L_BLACK

normal crest
#

I don't think it's either of those

red flower
#

G.C.JOKER_GREY?

#

im seeing lighten(G.C.JOKER_GREY, 0.5) as well but idk if it's the same UI

normal crest
#

definitely not JOKER_GREY, it's too light

#

I've been looking at this and trying the colors and I can't figure it out

#

it also isn't G.C.SET.Joker

wintry solar
#

I would try darken(G.C.BLACK, 0.1)

#

I don't think the bottom 2 lines are ever reached here

normal crest
#

okay I think I got it, it's adjust_alpha(darken(G.C.BLACK, 0.1), 0.8)

red flower
#

of course

normal crest
#

really makes you wonder what was going through thunk's head when they decided to make global colors, but then practically leave those all behind by using darken, lighten and adjust_alpha

wintry solar
#

or that background statement

#

why are there 3 lines giving the same colour where the 3rd catches every card anyway

brittle yacht
#
    key = 'whoopie',
    loc_txt = {
        name = 'Whoopie Cushion',
        text = {
            '{X:mult,C:white}X3{} Mult if played hand is a Flush or Royal Flush'
        }
    },
    atlas = 'whoopie',
    pos = { x = 0, y = 0 },
    rarity = 'silly_unobtainable',
    cost = 1,
    unlocked = true,
    discovered = true,
    pools = {['SillyPool'] = true},
    config = { extra = { Xmult = 3, type = 'Flush' } },

    loc_vars = function(self, info_queue, card)
        return { vars = { card.ability.extra.Xmult, localize(card.ability.extra.type, 'poker_hands') } }
    end,

    calculate = function(self, card, context)
        if context.joker_main and next(context.poker_hands[card.ability.extra.type]) then
            return {
                Xmult_mod = card.ability.extra.Xmult
            }
        end
    end

}```
sour garden
#

i'm trying to make a joker that detects when a card is retriggered to upgrade it, is there an easy way to detect retriggers?

daring fern
sour garden
#

yknow i think i'd rather just do it per scored card then subtract the base number of cards scored

#

like uh
an example would be every time a card scores, add 25 chips to the joker
and then because i only want retriggers, i'd just subtract 25 cards per card in the scoring hand

#

is that stupid or smth why are you ? me

normal crest
#

Increment a counter every time a card is scored, if that counter was greater than the amount of cards played then you had retriggers somewhere

wind steppe
#

you will never get an explanation out of them

brittle yacht
daring fern
# sour garden is that stupid or smth why are you ? me
[[patches]]
[patches.pattern]
target = '''=[SMODS _ "src/utils.lua"]'''
pattern = '''effect.message = effect.message or (not effect.remove_default_message and localize('k_again_ex'))'''
position = "after"
payload = '''
effect.extra = {func = function() SMODS.calculate_context({card_retriggered = true}) end}
'''
match_indent = true
```?
subtle merlin
#

How can i get the total amount of consumables used this run?

wind steppe
sour garden
brittle yacht
wind steppe
#

it's cleaner to do it with patches but it could break something

wind steppe
#

if its a crash log post the crash log

brittle yacht
wind steppe
#

oh

daring fern
wind steppe
#

which line is line 658

brittle yacht
#

if context.joker_main and next(context.poker_hands[card.ability.extra.type]) then

subtle merlin
brittle yacht
wind steppe
brittle yacht
wind steppe
#

try (context.scoring_name == "Flush") or (context.scoring_name == "Straight Flush") or (context.scoring_name == "Royal Flush")

#

also whats wrong with flush house and flush five that they arent included

brittle yacht
wind steppe
brittle yacht
wind steppe
#

hmmmm that seems right

#

update smods?

brittle yacht
#

nah, im on latest version

wind steppe
#

hold on

brittle yacht
wintry solar
#

do next(context.poker_hands['Flush']) instead

wind steppe
normal crest
#

Is there a function that can create a card hover ui element, but being completely independent of a card?

foggy ginkgo
#

How does one detect how many times a pair has been played and only pair

daring fern
foggy ginkgo
#

That makes sense

#

Thought it would be the == thing

#

How about level

daring fern
foggy ginkgo
#

Ofc ofc

#

Double checking

wind steppe
normal crest
#

it's Sleeve without the s

#

@subtle merlin thoughts on a helper function that lets you do this

#

i got a little too invested in this lol

subtle merlin
normal crest
#

the variables part is all SMODS

violet gull
#

what can i use to increase the chips and mult of a hand type

subtle merlin
#

that's rly cool!!

#

-# When i learn credits you'll be mentioned by name with how much you've helped me-

#

Is there something similar to card.ability.extra. for blinds?

daring fern
primal robin
subtle merlin
normal crest
subtle merlin
normal crest
#

Yeah, the only thing you should replace from what you had before is the assignment to self.config.h_popup

#

The rest stays the same

primal robin
#

Let's go we balling lumodance

red flower
#

im familying it

primal robin
#

Functional programming moment

normal crest
#

Also oop programming moment

red flower
#

oops programming? that's called pseudorandom!

foggy ginkgo
#

Holy shit

#

It's so peak

primal robin
#

Wow, after small refactor everything is working, unbeliveable

#

Is my code not junk????

old hull
#

Anyone know how to get the chips/mult of a hand before it gets played?

red flower
subtle merlin
# subtle merlin Update: :3

You made it so that i can do 7x the definitions in the same amount of space (this is the exact amount of space the old code took for 1 definition)

foggy ginkgo
#

Coding be like sometimes

primal robin
#

my god..

foggy ginkgo
#

One day I'll compact my mod but for now it's just a bunch of junk wrapped with duck tape

subtle merlin
foggy ginkgo
#

Or not compact, simplify

foggy ginkgo
#

I want 100 lines to print hello world

primal robin
#

Imagine make some sort of dictionary where you store all effects for all blind, and just reference value form this dictionary, instead of copy-pasting same code

foggy ginkgo
#

Nah

primal robin
#

Also image use text formatting

#

Also imagine localization for this

foggy ginkgo
#

Nah

#

I do use localization-

#

Actually nah

subtle merlin
#

I do run into a slight issue with my charity blind but ill leave that for future me since it isnt too big of a problem

foggy ginkgo
#

And then

#

It's hell

subtle merlin
#

Anyway, will doing this count as discarding a card? (v is a card)

normal crest
subtle merlin
normal crest
#

just that part

#

The rest comes from the smods function

#

And well, the card UI that I copied from jokers

subtle merlin
#

still, woah

#

insanely impressive

foggy ginkgo
#

Actually nvm idk what I'm saying

subtle merlin
foggy ginkgo
#

Ignore me

#

I'm just silly

#

I remember it getting cards from played hand but I doesn't get cards from discards

#

Ignore me

subtle merlin
#

technically it does, but functionally it grabs the card from play

foggy ginkgo
#

Ofc

lament agate
#

how do you make like

#

custom button

#

on a joker

#

like how Sell card

#

did

winter flower
#

don't you love it when your mod crashes 50 times
only to realize you forgot 1 singular comma

normal crest
# lament agate how do you make like
card.children.whatever_name = UIBox {
  definition = {
    n = G.UIT.ROOT,
    config = { button = 'some_button_name' }, -- this function has to be in G.FUNCS
    nodes = {
      { n = G.UIT.T, config = { text = "hi i am button", scale = 0.4, colour = G.C.GREEN } }
    }
  },
  config = { align = 'bm', major = card, parent = card }
}

like this

lament agate
#

where do i put this

normal crest
#

Whenever you want to add the button

#

you should only call it once per card

lament agate
#

i see

#

thanks

#

but now

#

i wanted to make a soul like consumable

#

that spawns my own rarity joker

#

how do i like

#

set the joker from that rarity to be not in the shop but the soul like card itself

normal crest
#

define an in_pool function inside that joker

#

and just return false

lament agate
#

i see

solemn shuttle
#

is there a way to adjust the vanilla badge colors with a texture pack at all

#

just curoius

gentle rain
lament agate
#

how do you cycle gradient slowly

#

big number = slow?

chrome widget
#

The cycle number is the total length of time it takes to cycle from the beginning to the end

#

So big number = slow yes

lament agate
#

alright

#

how do you add like

#

custom badges

#

?

red flower
lament agate
red flower
#

smods.joker

lament agate
#

bruh

normal crest
#
update = function(self, card, dt)
    if card.highlighted and card.area and card.area.config.type ~= 'shop' and not card.children.whatever_name then
      card.children.whatever_name = UIBox {
        definition = {
          n = G.UIT.ROOT,
          config = { button = 'some_button_name', func = 'can_some_condition', ref_table = card },
          nodes = {
            { n = G.UIT.T, config = { text = "hi i am button", scale = 0.4, colour = G.C.GREEN } }
          }
        },
        config = { align = 'tm', major = card, parent = card }
      }
    end

    if not card.highlighted and card.children.whatever_name then
      card.children.whatever_name:remove()
      card.children.whatever_name = nil
    end
  end,

Is there a better way of adding buttons on jokers when they're highlighted?

#

Could probably hook Card:highlight

modern kindle
#

that be what i do

normal crest
#

But this is so much more convenient

modern kindle
#

you are also super convenient because of your epicness

red flower
#

i hook highlight too

modern kindle
#

when will you hook me

normal crest
#

i declare that 2 if statements every frame won't be an issue

subtle merlin
#

how do you increase and decrease the highlight limit again?

red flower
#

for play/discard or just to highlight

subtle merlin
#

just to highlight

red flower
#

area.config.highlighted_limit

normal crest
red flower
#

yes

#

afaik

normal crest
#

joy

red flower
#

my jokers check if they can be summoned a lot and idk how that doesn't slow down the game

normal crest
#

computer is speedy

#

steel joker is looping through the entire deck every frame

red flower
#

it did slow down the game when I added SMODS.is_eternal

normal crest
#

and that barely does anything

normal crest
jolly shadow
#

why doesnt a card with this rarity appear in the shop at all ? ive been trying to get it to show up in shop for so long by fudging with these values but no luck

red flower
jolly shadow
#

ok the documentation on rarities is so fuckin confusing for no reason imma try that

#

it worked lmfoa

#

i love these docs

red flower
#

amazing

sour garden
#

if context.final_scoring_step and (hand_chips * mult > G.GAME.blind.chips) and not context.blueprint then
talisman is making this line of code result to always true, regardless of whether the scoring hand caught fire or not
how can i make this compatible with talisman? the mod already has to_big and to_number defined elsewhere

normal crest
red flower
#

i know what bm is but never understood the i

#

im guessing bottom middle inner

chrome widget
#

It's inner yeah

red flower
#

im adding an FAQ sort of thing to vanillaremade this week but I'm mainly adding pieces of code rather than tutorials bc i dont know how to write

any ideas what should be in there

normal crest
#

Oh it centers it with the parent

chrome widget
#

Hmmmm then how does that coexist with "bottom middle"?

#

If that should already center it on one axis and pin it to the edge on the other?

normal crest
#

that is a good question

#

that I wish I could answer, cm and cli are identical

#

Sooooooo, who knows

red flower
#

there are a couple others like "how do i play a sound" that are just going to say "read the docs"

modern kindle
#

I find that funny

For those I think it would be ideal to link the correct docs

red flower
#

of course

modern kindle
#

Awesome

red flower
#

im mostly documenting anything that im annoyed at repeating but with no examples in vanillaremade

modern kindle
#

Thats fair

#

Now you'll get to say 'read vanilla remade' which will then say 'read the docs' so you can say it twice as much

red flower
#

exactly

normal crest
#

How would I make an UI element draw below the card?

lament agate
#

doesnt show up

red flower
#

that looks fine to me

foggy ginkgo
#

He's trying to do what Pokermon does it with the types

#

I think

#

Or he just doesn't know how rarities work

normal crest
lament agate
#

dead has to be rarity?

lament agate
red flower
#

oh

#

that's very funny

normal crest
#

indeed

#

remove those {} around the function

lament agate
#

oh

#

bruh

normal crest
red flower
#

if you figure it out tell me

normal crest
#

frick

#

you said you've hooked highlight to add buttons

#

did you just leave yours above the card

red flower
#

no, but i think it's because i use the vanilla use_button field?

#

any other thing i add is over the card

foggy ginkgo
#

Is there a way to put custom colors like the hex thing on the badge or

normal crest
#

Nvm I found it

red flower
#

anywhere you can put colors you can do the HEX thing

foggy ginkgo
#

Colours = HEX("e15d73") isn't working

#

Is it different?

red flower
#

where is this

#

colours implies multiple colors

foggy ginkgo
#

I meant colour

red flower
#

lua doesn't have named parameters

#

remove the colour =

foggy ginkgo
#

Oh

#

Okay thank you

#

Always the goat

red flower
subtle merlin
#

Would it be possible to decrease this number without changing the card's rank or affecting other cards of the same rank?

red flower
#

have you tried a negative perma_bonus

#

idk if that works

rough furnace
#

evening chat

red flower
#

hiiii

subtle merlin
foggy ginkgo
#

Is there a way to display more than 1 badge

rough furnace
#

module patches don't get patched (I could not figure out how to get the right function at the time their buffer is loaded)

red flower
foggy ginkgo
#

Like this

red flower
#

no, it would still be +1

foggy ginkgo
#

Oh wait I'm dumb

lament agate
#

dumbahh

foggy ginkgo
#

Shut up

lament agate
#

:3

foggy ginkgo
#

Actually I don't understand

red flower
#

what part

foggy ginkgo
#

I don't need that coma at the end of the first line right?

red flower
#

ah no

foggy ginkgo
#

Alright I fixed it

red flower
# red flower couple more

im probably going to add a "how to start" part at the beginning that links to all the docs + installing vscode and lua extension + setting up lsp + git setup + making a joker show up in game
that's the most tutorial you get from me

foggy ginkgo
#

Is there a way to move the badges to the left or right

red flower
#

not with that

foggy ginkgo
#

Sigh

red flower
#

that would require patches and stuff

foggy ginkgo
#

Nvm then 😔

normal crest
red flower
#

lets goo

normal crest
#

Turns out SMODS completely overrides Card:draw

#

I spent like 20 mins trying to patch it and wondering why nothing was happening

red flower
#

with a drawstep?

normal crest
#

Yeah I had to do this

SMODS.DrawStep {
  key = 'buttons',
  order = -29,
  func = function(card, layer)
    if card.children.whatever_name then
      card.children.whatever_name:draw()
    end
  end
}

SMODS.draw_ignore_keys['whatever_name'] = true
red flower
#

ohh

normal crest
#

the normal buttons order is -30

subtle merlin
red flower
#

i will steal this and add it to the faq 😈

modern kindle
#

I will eat this

normal crest
#

and there is a step that draws all the children of the card unless they're in SMODS.draw_ignore_keys

red flower
normal crest
#

which happens after the actual card

modern kindle
#

What do other orders do

red flower
#

what the hell is SMODS.draw_ignore_keys

normal crest
#

in vanilla there is this line

 for k, v in pairs(self.children) do
    if k ~= 'focused_ui' and k ~= "front" and k ~= "back" and k ~= "soul_parts" and k ~= "center" and k ~= 'floating_sprite' and k~= "shadow" and k~= "use_button" and k ~= 'buy_button' and k ~= 'buy_and_use_button' and k~= "debuff" and k ~= 'price' and k~= 'particles' and k ~= 'h_popup' then v:draw() end
end
#

beautiful line indeed

#

so SMODS.draw_ignore_keys is just that but better

red flower
#

oh ok i forgive them then

#

<@&1133519078540185692>

normal crest
#

mods, steal all their usdt

exotic hedge
#

🔫

red flower
modern kindle
#

What was he cooking

chrome widget
subtle merlin
#

ty!

brisk atlas
#

I cant figure out why the color isnt working for the suit

#

card.ability.suit is working for the consumable that changes the suit

#

but not here

lament agate
#

how do you give the player hands and discards in a form of return

red flower
red flower
normal crest
lament agate
#

return {

#

}

red flower
daring fern
red flower
#

i mean yeah but that doesn't do anything

normal crest
red flower
normal crest
#

I ran lovely with --dump-all and there's nothing about debugplus anywhere

subtle merlin
red flower
#

if you want the hands to display after the message or something then do what something wrote, else just use that function outside the return

lament agate
# red flower what's your objective

wanted to give the player hands and discards if they press a button, i already got the keypress working and stuff, made a custom context named context.key_press_f1

red flower
#

yeah just use ease_hands_played and ease_discard

#

ill put that in the faq too

#

wait no that's already in vanillaremade

lament agate
red flower
#

burglar

formal quest
#

I'm creating a double tag when the blind is skipped. The double tag doesn't go off on the blind's tag though. How can I create the double tag in a way that it activates?

normal crest
#

Probably without the event

#

If I had to guess

lament agate
#

use ```lua

modern kindle
#

Code jumpscare

final jewel
#

config = { extra = {
odds = 1,
chances1 = 2,
chances2 = 6,
chances3 = 10,
mult = 20,
cash = 20,
card = 1
}},
loc_vars = function(self, info_queue, card)
return {vars = {card.ability.extra.odds, card.ability.extra.chances1, card.ability.extra.mult,
card.ability.extra.odds, card.ability.extra.chances2, card.ability.extra.cash,
card.ability.extra.odds, card.ability.extra.chances3, card.ability.extra.card,
colours={HEX('F7070BFF')}}}
end,
in_pool = function(self)
return false
end,
calculate = function(self, card, context, effect)
if context.main_scoring and context.cardarea == G.play then
local effects = {}
if SMODS.pseudorandom_probability(card, 'giga_luckiest1', card.ability.extra.odds, card.ability.extra.chances1, 'luckiest_prob1') then
table.insert(effects, {
mult = card.ability.extra.mult,
delay = 0.6
})
end
if SMODS.pseudorandom_probability(card, 'giga_luckiest2', card.ability.extra.odds, card.ability.extra.chances2, 'luckiest_prob2') then
table.insert(effects, {
dollars = card.ability.extra.cash,
delay = 0.6
})
end
if #effects > 0 then
return SMODS.merge_effects(effects)
end
if SMODS.pseudorandom_probability(card, 'giga_luckiest2', card.ability.extra.odds, card.ability.extra.chances3, 'luckiest_prob3') then
local food = create_card('food',G.consumeables, nil, nil, nil, nil, nil, 'createFood')
food:set_edition('e_negative', true)
food:add_to_deck()
G.consumeables:emplace(food)
end
end
end

normal crest
#

dilly jumpscare

final jewel
#

yeah Mb

modern kindle
final jewel
#

I just wonder why my probability works soo weirdly

normal crest
#

were you able to make progress with your fridge

modern kindle
#

Mostly yea
I still gotta fix the text but ive been as the kids say lazy and in bed
But seals trigger inside the fridge now

formal quest
normal crest
#

Ah wait

#

skip_blind might be too late

#

if you want it to apply immediately

red flower
#

you want the double tag to go before the skipped tag?

formal quest
red flower
#

yeah i dont think that will work

#

you might need to patch a context before the tag gets redeemed

normal crest
#

yeah the tag gets added way before

#

you'll have to patch this part and make your own context

final jewel
normal crest
#

the others look normal enough

final jewel
#

but its creating a consumable so it is not place in a return, isn't it ?

normal crest
#

the 1 in 10 here would only ever happen if the 1 in 2 and 1 in 6 failed

#

cus if either of them succeeded you return out of the function before it has a chance to trigger

final jewel
#

but can I place in a return :
local food = create_card('food',G.consumeables, nil, nil, nil, nil, nil, 'createFood')
food:set_edition('e_negative', true)
food:add_to_deck()
G.consumeables:emplace(food)

formal quest
red flower
#

SMODS.calculate_context{ modprefix_contextname = true, modprefix_any_other_value = value }

normal crest
#

to keep it consistent

daring fern
#

‎

normal crest
daring fern
normal crest
#

you mean making sure it stays inside the card?

daring fern
#

Also would that allow for drawing multiple seals?

normal crest
#

I don't really understand the image, I see 2 seals but they look fine, no?

normal crest
#

but it looks like you already are drawing more than one

daring fern
normal crest
#

what does thinking it's still in the spot of the first one mean

formal quest
normal crest
formal quest
#

*aside from the missing return

daring fern
daring fern
normal crest
formal quest
normal crest
#

you mean it only moves vertically?

normal crest
#

Oh, is it that it doesn't move with the card as if it was on a different spot?

formal quest
# daring fern Yes.

Well in that case should I move the creation code somewhere other than the hook for function/cleanliness?

daring fern
#

I was moving it with draw_shader there.

formal quest
#

@daring fern Does it matter that my code creating a custom context is inside the hook that sets it?

formal quest
daring fern
#

SMODS.calculate_context already calls that.

formal quest
#

I think I get it now

normal crest
formal quest
#

@daring fern Thanks, it works now. A lingering question I have is if I can delay the spawning of the blind tag so they aren't spawning at the exact same moment, but functionally it's complete.

pale rampart
#

hello dev moddingchat

foggy ginkgo
#

Does anyone know how to make G.GAME.hands["Pair"].level talisman support

foggy ginkgo
foggy ginkgo
daring fern
rough furnace
foggy ginkgo
#

Including the times 50?

daring fern
pale rampart
normal crest
#

But all the variables are local

rough furnace
#

you could just call the keybind function or just save the game to the right file manually

normal crest
#

good point, I didn't think that far

rough furnace
#

the onkly local variables here are the key that was pressed and the keys you can rpess

#

oh I guess log is too

#

but you can replicate that with the api

#

or just print

normal crest
#

probably not worth logging it, it'd just be annoying ingame

#

thanks, I clearly didn't think enough when the idea came to mind

formal quest
#

Is there a way I can make the values in a tooltip box display correctly?

foggy ginkgo
normal crest
formal quest
normal crest
#

you could make the one you sent work by adding vars = { num1, num2 }

#

The game probably checks that the object you appended has a loc_vars function and if so does it automatically

#

But I never looked into it too much

rough furnace
#

yeah the other method you need to know how the info on the tag works smods added a shortcut using the center where it does that work for you

pure salmon
#

does anybody know how to change the ability unbox of a playing card to say +X mult instead of +X chips? i have a new suit that gives base mult

chrome widget
#

So I did something similar ish for a recent thing, specifically changing the display for chips and also excluding the suit display, and I just did it by intercepting the keys used by the localize function to change them to alt loc strings

#

However, since this involves lack of function, I could easily discard the vars getting passed in (the nominal chips and the suit) since they were unneeded. You might need to do something a little different. These keys/localize calls come from the generate_card_ui function

foggy ginkgo
#

What's the context of entering a shop

modern kindle
#

context.starting_shop

foggy ginkgo
#

Thanks that's what I thought

normal crest
#

Through love.keyboard

daring fern
#

‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌

glass scaffold
#

how do I spawn a random consumable?

#

like no specific set, just allow any random one to be summoned

daring fern
final jewel
glass scaffold
daring fern
near heart
#

what are consumables referred to internally so that i can create specific ones with jokers

daring fern
#

I just want it so when a card gets an additional seal, it will be assigned a random position.

normal crest
daring fern
daring fern
normal crest
#

you'd have to separate their draw calls

#

how are you storing the different seals

daring fern
glass scaffold
daring fern
#

Also why are you returning true?

glass scaffold
#

...how do I stop that from happening?

daring fern
near heart
daring fern
glass scaffold
glass scaffold
#

Just 1

daring fern
glass scaffold
normal crest
# daring fern I'm storing the keys in a table in `card.ability`
SMODS.DrawStep {
  key = 'seals',
  order = 31,
  conditions = { vortex = false, facing = 'front' },
  func = function(card, layer)
    local x, y, w, h = G.shared_seals.Red.sprite:getViewport()
    G.shared_seals.Red.sprite:setViewport(412, 355, 71, 95)
    G.shared_seals.Red.role.draw_major = card
    G.shared_seals.Red:draw_shader('dissolve', nil, nil, nil, card.children.center)
    G.shared_seals.Red.sprite:setViewport(x, y, w, h)
  end
}

as I initially said, this isn't really sustainable, cus you're just taking a different portion of the spritesheet

#

just a cool proof of concept i guess

modern kindle
#

ezpz, just shrink em and you have more space

daring fern
normal crest
#

you might have to define predetermined spots for every seal if you really wanna use this method

#

rather than pick a random one dynamically

hard flume
#

Is it possible to have a sticker give chips or mult? Or is that not possible?

hard flume
#

How would I go about doing that? Like normal or...? I tried doing it like normal, but I dont think stickers have a config table

daring fern
hard flume
#

Okay, but thats not working and ive tried both putting the number straight in and using a config table. I dont know what im doing wrong

normal crest
#

can you send your code?

glass scaffold
#

How do I make it apply a random enhancement?

daring fern
#

Also it wouldn't run anyway.

glass scaffold
daring fern
#

Because context.cardarea is never G.play in context.after

normal crest
hard flume
daring fern
hard flume
#

Ohhhhh

#

Why? I'm pretty sure in Jokers, its card.ability.mult? Why is it different here?

daring fern
hard flume
#

/genq

#

Oh

normal crest
#

Cus stickers don't apply their config by default

#

if you really want to, you can, but unless you have a scaling sticker there isn't really a point

hard flume
#

Quick question, when applying a sticker to a playing card via Joker (in context.individual), does it happen before or after main_scoring?

glass scaffold
#

ok, last thing I may need:

How do I loop through each card in the played hand?

daring fern
glass scaffold
lucid owl
#

this blind debuffs 2 random suits every hand played, however the debuffs are fully cleared whenever an item is used, sold, or any other change occurs. what's the issue? (also this is old so my code may suck)

unborn bay
#

most of the time a debuff is recalculated which removes the debuffs you have set

#

smods has a system around this

#

SMODS.debuff_card

near heart
#

how can i get a joker to trigger when a steel/gold card is triggered

#

thanks

lucid owl
normal crest
#

i'd separate these two just for readability

near heart
#

this triggers on gold even if its not last hand of round im gonna try and move stuff around to get it to work right

normal crest
#

(edited)

near heart
#

ill try it again

normal crest
# normal crest i'd separate these two just for readability
-- When Steel triggers
if not context.end_of_round and context.individual and context.cardarea == G.hand then
  if SMODS.has_enhancement(context.other_card, 'm_steel') then
    -- code
  end
end

-- When Gold triggers
if context.end_of_round and context.individual and context.cardarea == G.hand then
  if SMODS.has_enhancement(context.other_card, 'm_gold') then
    -- code
  end
end

this is much more readable

near heart
#

this doesnt work either

normal crest
#

It literally does?

#

Why would it not

near heart
#

ill try yours i havent yet

normal crest
#

Oh, mine would still trigger on steels after the round ends

#

I edited it

normal crest
#

the question marks are so silly

pastel kernel
#

I’m thinking about making another broken joker

#

Maxwell from Scribblenauts

near heart
#

sorry to cause so much trouble lmao

gusty surge
#

Can anyone direct me on how to mod balatro on ios

glass scaffold
gusty surge
# glass scaffold PLEASE

Oh than I don’t understand why it’s an option when your selected to be put into the modded section I’m sorry

molten relic
#

why doesnt this work? the sell value doesnt change

#
        if context.end_of_round and context.game_over == false and context.main_eval and not context.blueprint then
            card.ability.extra.dollar_rounds = card.ability.extra.dollar_rounds + 1
            card.ability.extra.rounds_left = card.ability.extra.rounds_left - 1
                if card.ability.extra.dollar_rounds == card.ability.extra.total_rounds then
                    card.ability.extra_value = card.ability.extra.price
                end
        end
    end
}```
daring fern
molten relic
#

instead of card.ability.extra_value?

daring fern
molten relic
#

example?

#

wouldnt puttingt it after that just repeat it?

normal crest
#

set_cost just updates the cost of the card, name is a bit misleading

#

you just call it whenever you want the changes you made to apply

molten relic
#

how do i make a card pulse when active, like invis joker?

molten relic
#

i knowwwww but idk what part is the pulse

lament agate
#

does this mean it being rare or just plain hidden

daring fern
lament agate
molten relic
#

is seeing_double_check something exclusive to seeing double? i want to make a card that gives 1.5x mult if hand includes a face card and a numbered card. how do i do this?

molten relic
#

could ya help me?

#

would i have to make 2 variables that i would have to set to true? (if they are both true the xmult would be applied)

#

i could try that

daring fern
# molten relic i could try that
local face, nonface = false, false
for k, v in pairs(context.full_hand) do
    if v:is_face() then
        face = true
    else
        nonface = true
    end
end
if face and nonface then
    -- do things
end
daring fern
#

This seems to be caused by Paya's Terrible Additions

lament agate
#

@unborn bay

unborn bay
#

like any card

daring fern
#

But only for some cards.

unborn bay
#

odd since that should still work

#

unless i implemented the metatable wrong

#

why do you need to iterate over the ability table anyway

unborn bay
#

yeah i see the problem

#

will fix it tomorrow

#

its a thing related to metatables

#

wonder why thunk didn't account for metatables in copy_table

#

lmao i just realized this made copying cards half broken since they don't copy the previous values over but it still works fine anyways

unborn bay
#

<@&1133519078540185692>

#

kill this person

#

now

primal robin
violet gull
#

what can i use to make a certain consumable type more common (for a joker)

red flower
violet gull
#

can you help me understand how to use it? ex. if i want to quadruple the chance of something like tarot cards spawning

daring fern
harsh bobcat
#

I have an error here. I think something is wrong here. I have tried to get this working for three days. Can anyone help?

red flower
harsh bobcat
#

that's what I though

#

so I checked all the files

#

commented out things until i didn't get an error

#

nrm

harsh bobcat
daring fern
red flower
#

youre replacing the entire color table

harsh bobcat
#

So.. I don't do that basically?

daring fern
harsh bobcat
#

When I open jokers under additions on my mod. This guy crashes

red flower
#

the badges syntax is wrong

harsh bobcat
#

oh

manic rune
#

🤔

red flower
#

oh i didnt notice that lol

harsh bobcat
#

some guy helped me

#

i couldn't find it on the wiki

manic rune
#

your pseudorandom_element doesnt have a seed too

#

<@&1133519078540185692>

formal parrot
#

Bepis

manic rune
#

heaven

red flower
#

wepis

manic rune
#

W'

harsh bobcat
#

sooooo....

#

is there a wiki on randomness

manic rune
#

no

#

but its simple to understand

harsh bobcat
#

how learn

#

mm

red flower
#

i will make one

harsh bobcat
#

ooo

#

I'm also having troubbles registering enhancements. I even looked at other mods.

#

tried looking at balatro code

#

emm

#

..

red flower
#

have you looked at vanillaremade

harsh bobcat
#

no

manic rune
#
local rand = pseudorandom("hi") --Returns a random number between 0 and 1 with that seed.
local rand = pseudorandom("hi", 1, 3) --Returns a random whole number from 1 to 3 with that seed.

local rand = pseudorandom_element({"hi", ":thinking:"}, "seed") --Returns a random child in the table with that seed.
red flower
harsh bobcat
manic rune
#

no

harsh bobcat
#

wy

manic rune
#

how do i explain it 😭

red flower
#

the seed of the run is accounted for already, you need a secondary seed for your effect

harsh bobcat
#

ok

harsh bobcat
manic rune
#

the seed can be anything

#

it just has to be unique enough so that other code wont use it too

red flower
#

i recommend brushing up on basic lua

manic rune
#

likee, in run seed AAAAAA, pseudorandom("hi") will always have a consistent order of number that it will return whenever its run, for ex:
first time its run, it will return 0.3, second time it will return 0.4, etc etc

the reason why you want it to be unique is that if another code uses that seed too, then it will skip the intended order and go for the next number

hardy viper
#

yeah and "hi" is a REALLLY bad seed to use for that reason its super bad and awful am i right @subtle merlin

sleek nova
#

in what file can i make a new boss blind? is it the jokers one or do i have to make a new file entirely

rotund sable
#

splitting your mod into different files is just an organisation thing

daring fern
harsh bobcat
#

Like how do I do badges then

rotund sable
harsh bobcat
#

I want two

rotund sable
#

RED is the badge color in this case

rotund sable
harsh bobcat
#

just want to doubble sheck

#

check

rotund sable
#
set_badges = function (self, card, badges)
    badges[#badges+1] = create_badge('Idea Credit: plantform', G.C.EF.IDEA_CREDIT, G.C.BLACK, 0.8 )
    badges[#badges+1] = create_badge('Art Credit: diamondsapphire', G.C.EF.ART_CREDIT, G.C.BLACK, 0.8 )
end
harsh bobcat
#

Is that a badge?
I want those little info things that ecplain what an enhancement does (for example)

red flower
#

oh

rotund sable
#

info_queue?

red flower
#

that's the info_queue in loc_vars

harsh bobcat
#

tnak you

sleek nova
#

do i need to change the joker_src thing

red flower
#

i dont think so but i would just so the code reads better

hardy viper
#

it works but

#

blind_src better name ofc

hardy viper
#

:3

midnight coyote
#

how do i get the key of a tarot card

hardy viper
midnight coyote
simple helm
#

how do i check if a card played has an specific enhancement, in this case steel?

red flower
#

or remove the enhancement?

simple helm
#

destroy it

red flower
#
if context.destroying_card and SMODS.has_enahncement(context.destroying_card, 'm_steel') then
  return { remove = true }
end
hardy viper
#

enahncement

red flower
#

cg - too mnay jokres

hardy viper
#

my jokers are many

inner cobalt
#

:33

#

^Double chin

simple helm
#

it crashes

#

when i play steel cards

red flower
#

what's the crash

#

im guessing my typo

simple helm
#

wait

red flower
#

yes, its my typo

#

enhancement

modern kindle
#

Hi chat

#

Im still in bed all cozy

snow vale
#

the order ability aint working

#

any fix?

normal crest
#

How is get joker return defined

snow vale
#

wait

normal crest
#

What about get vanilla joker return

snow vale
#

it's quite long

#

ill send you the original link

real night
#

like small blind is 300

normal crest
normal crest
normal crest
snow vale
#

idk how to do so...

real night
#

like wall is 4

normal crest
real night
#

ALSP what about your chips

floral narwhal
real night
#

like

#

found score

#

round score

keen atlas
real night
keen atlas
real night
#

Aaysy

normal crest
floral narwhal
#

k.

lament agate
#

@keen atlas yo what does this mean

keen atlas
#

you can just put the lsp folder to your mod folder and have it all done
or
if you decided to put it outside of the mod folder, you have to create settings.json in .vscode and add Lua.workspace.library

lament agate
#

but itll clog up the github page

#

🥀

keen atlas
#

thats the easiest yeah

red flower
#

put it in the gitignore nxkoo..

lament agate
#

RIGHT

lament agate
keen atlas
#

that works

lament agate
#

how do i make it work now

#

figured it out

dusk drift
#

can someone help me with modding balatro ?

lament agate
#

@keen atlas how do you turn on the autocomplete stuff

keen atlas
#

actually luals follows gitignore

lament agate
dusk drift
#

ya ive done all that i cant get the mod tab to pop up in game?

keen atlas
normal crest
dusk drift
normal crest
#

Then you didn't install steamodded properly

#

What's in your mods folder

keen atlas
dusk drift
normal crest
#

What's inside smods-main

dusk drift
#

omg i feel so stupid ;-;

#

it works now

#

thanks

keen atlas
dusk drift
normal crest
#

What's the crash log

dusk drift
manic rune
#

😭

normal crest
# dusk drift

You have an old version of both cryptid and talisman

dusk drift
#

oh?

normal crest
#

Latest cryptid version is 0.5.10, talisman is 2.3.1

lament agate
manic rune
#

you know what im talking about nxkoo.

lament agate
knotty orchid
#

Hey, how does weight work exactly in booster packs. I mean, how does it transform to odds

normal crest
#

So you're more likely to draw packs with higher weights

knotty orchid
#

So the number represents something similar to the ammount of packs in global pool?

normal crest
#

Yes, except picking a pack doesn't remove it from the pool

#

It was more just a metaphor that helped me understand weights

#

Its a common system, you can find info about how it works technically everywhere

#

The odds of picking a specific pack would be weight / total weight of pool

modern kindle
#

What are the odds of specific rarities in those packs determined by?
Wondering if maybe making a voucher for packs to have a higher chance for higher rarity cards would be an idea

normal crest
#

by the create_card function

modern kindle
#

Booorrriiinnggg
Why cant things be as easy as rarity = yes up

red flower
#

there are globals to modify a rarity's weight

maiden phoenix
red flower
#

yes

brittle yacht
red flower
red flower
brittle yacht
normal crest
brittle yacht
#

u see, this doesn't work but doesn't crash, ```SMODS.Joker {
key = 'dreamer',
loc_txt = {
name = '{C:red}Dreamer{}',
text = {
'When a {C:attention}Blind{} is skipped, {C:green}1 in 6{} chance to spawn {C:rare}Frog Guy{}'
}
},
atlas = 'dreamer',
pos = { x = 0, y = 0 },
rarity = 'silly_unobtainable',
cost = 1,
unlocked = true,
discovered = true,
config = { extra = { odds = 1, } },

loc_vars = function(self, info_queue, card)
    info_queue[#info_queue+1] = {key = 'silly_dreamer', set = 'Other', vars = { "ENA" }}
end,

calculate = function(self, card, context)
    if pseudorandom('j_silly_dreamer') < G.GAME.probabilities.normal / card.ability.extra.odds then
        if context.skip_blind and not context.blueprint then
            SMODS.add_card { key = 'j_silly_fiction' }
        end
    end
end

}```

normal crest
#

what is the crash?

manic rune
#

"doesn't crash"

normal crest
#

Oh

brittle yacht
#

there is no crash

#

goober

manic rune
#

hm

normal crest
#

And does it work if you remove the probability check

brittle yacht
#

dont mind the info queue stuff btw

manic rune
#

i wonder why it doesnt work, can you add a print in calculate to see if pseudorandom stuff even works

brittle yacht
#

idk lemme try

manic rune
#

i heard it broke, not sure

red flower
#

what broke

manic rune
#

idk

red flower
#

dont think thats the case

brittle yacht
#

?

manic rune
#

same, but worth a shot, the contexts in calculate look right

modern kindle
#

Bepus

manic rune
#

hi dilly

modern kindle
#

Hi

#

How are u

manic rune
#

pretty good, i drew a lot of jokers art today

#

hbu

modern kindle
#

I haven't left my bed yet

#

So warm and cozy

normal crest
#

Same

modern kindle
#

Srock do you prefer the warm or cold

manic rune
#

im about to get into bed rn :3

modern kindle
#

Hell yea

normal crest
#

I'd rather have a comfy warmth

modern kindle
#

Bepis never answered my dm...