#💻・modding-dev

1 messages · Page 415 of 1

molten musk
#

added this to give notification when triggeres

#

and lets say it triggeres alot

#

like alot lot

#

like even seal in hands triggers

wintry solar
#

put the message in the table with the remove

molten musk
#

ok

oblique aurora
#

how do i activate debug menu to generate a joker i want to test?

glass scaffold
#

help. pls.

wintry solar
molten musk
urban wasp
molten musk
#

now its not killing cards

#

and oops is not effecting the chances

wintry solar
#

show code

molten musk
glass scaffold
oblique aurora
wintry solar
wintry solar
glass scaffold
wintry solar
# glass scaffold Booster Pack

oh I guess boosters don't get the fake card value, use this instead card and card.ability.choose or self.config.choose

molten musk
# wintry solar show code

so i tried lowering chances for first half of code to see if oops effect it
so lowered to 1/8 chance of trigger
then added 4 oopses
that worked

#

but the 2nd half isnt working

#

it doesnt kill cards

wintry solar
# molten musk it doesnt kill cards

yes, you've completely changed the check I gave you. you also need to move the first pseudorandom check underneath the context check, otherwise you're going to have really weird seed effects, I'd also recommend changing the string you're giving it to something related to your seal

glass scaffold
wintry solar
molten musk
#

so, how do i check last seal triggered?

glass scaffold
glass scaffold
wintry solar
#

was the description fine before?

glass scaffold
#

Yes

wintry solar
#

oh change it back then

#

when does it crash?

glass scaffold
#

On opening

molten musk
wintry solar
#

you need a create_card function

molten musk
#

i wanna make a seal that checks last triggered seal and copies its effects

daring fern
glass scaffold
wintry solar
#
create_card = function(self, card)
  -- Example
  -- return {set = "Joker", area = G.pack_cards, skip_materialize = true, soulable = true, key_append = "buf"}
end,
#

this is the example function

#

you just need to change it to what you want to be in the pack

molten musk
#

surly there is a way

wintry solar
daring fern
molten musk
#

i can store it?? right??

glass scaffold
wintry solar
#

it affects the random seed

glass scaffold
#

ah ok

#

and if I have a pool of jokers set before, how do I point the function to it?

thorn furnace
#

Is there a good way to double all the values of a consumable
I tried doing something like this based off of Cryptid but it doesn't do anything

calculate = function(self, card, context)
  if context.card_added and context.card.ability.consumeable then
    for key, entry in pairs(card.ability.consumeable) do
      if type(entry) == "number" then
        card.ability.consumeable[key] = 2 * entry
      elseif type(entry) == "table" then
        for subkey, subval in pairs(entry) do
          if type(subval) == "number" then
            entry[subkey] = 2 * subval
          end
        end
      end
    end
  end
end
wintry solar
#

the table you return is passed to SMODS.create_card

#

or you can create the card yourself and return that

molten musk
wintry solar
#

it's not the easiest thing to do, but it is possible

glass scaffold
wintry solar
#

that's because you're telling it to create a card from the pool of all jokers

wintry solar
molten musk
wintry solar
#

no

molten musk
#

....

wintry solar
#

I'm not aware of any effects similar to that

#

and judging off the code you shared earlier, I'd recommend starting with something a lot simpler whilst you wrap your head around how to program in balatro

molten musk
#

i mean, its the hardest part in the code
everything else is easy

wintry solar
#

your set would be something like common_arya I believe

glass scaffold
wintry solar
#

it would do that, yeah

#

are you using SMODS.ObjectType?

glass scaffold
#

...should I?

glass scaffold
wintry solar
#

yeah like that 👍

glass scaffold
#

Also

W I D E B O I

-# obviously, I gotta fix that

daring heron
#

Is that placeholder art?

glass scaffold
daring heron
#

Sadge </3, my autistic ahh brain cant handle that lol

glass scaffold
unborn bay
#

change the background color to balatro black

#

or black hole black if you really want the darkest color in the game

#

😁

cerulean bane
#

violet vessel violet

viral ember
#

I have a card that shouldn't appear in the shop or the collection

    key = 'dwayne_egg_after',
    loc_txt = {
        name = 'Dwayne The Egg Johnson',
        text = {
            "EGG."
        }
    },

    rarity = 1,
    atlas = 'ModdedVanilla',
    pos = { x = 7, y = 0 },
    cost = 5,

    config = { extra = { } },
    calculate = function(self, card, context)
    end
}```
but I have no clue how to do that lmao
#

(A card turns into this)

glass scaffold
#

Also, what are the dimensions for a Booster Pack?

unborn bay
#

exactly the same as any other card in the game

#

71x95

#

you just pad out the empty space

molten musk
#

how do i do a global variable?

daring heron
#

Not a problem with your art though, i just strongly prefer mods with a vanilla-ish artstyle

sweet nimbus
#

Is there anything I can put in a consumables code to allow that item to appear even if you are holding a copy?

glass scaffold
#

Anyone know how to fix the BG color?
-# and also the ERROR text?

viral ember
#

can we see the whole thing?

glass scaffold
molten musk
viral ember
wintry solar
viral ember
#

that's where you put the name

glass scaffold
viral ember
#

I've never messed with the color thing so I'd look at how other mods do itt

molten musk
wintry solar
#

find a better way

thorn furnace
molten musk
native zinc
#

how doth fix artifact

undone slate
#

morning/evening :)
can you add "face = true" in an enhancement?

daring heron
viral ember
#

why is x_mult nil?

#

nevermind

thorn furnace
viral ember
#

I forgot about locvars

#

I do now lmao

#

Sometimes my genius scares me

molten musk
#

give me some genius then...

viral ember
#

uh

#

spaghetti

thorn furnace
viral ember
#

NO-

thorn furnace
#

:3

undone slate
#

I'm getting an error message of trying to index 'center' which is a nil value and I don't know where to start looking to fix it.
I don't see anything that references a center in the card that causes the crash itself so not sure why it happens

junior imp
#

cant find where i origanally posted this so i will repost my error pls help me when you can

viral ember
#

how would one create the jimbo speaking text box

#

this one

primal robin
#

Look into Card_Character

junior imp
oblique aurora
#

my mod shows up in the mod list, but it doesnt load the content of it, what should i do?

gray void
#

Yeet it

#

ok im sorry, maybe check stuffs

oblique aurora
gray void
#

Even tho i dont know much of lua, im learning from modding this... Bit by bit

oblique aurora
#

the joker randomize the score at the last hand played

gray void
#

And the result was, "the score wasnt randomized"?

red flower
gray void
#

That be some problem in the things like atlas, key, etc etc wouldnt it?

#

The... Uhh, "description" for the game to recognize it?

gusty iron
oblique aurora
#

mod,json

{
"id": "cursedcartoons",
"name": "Cursed Cartoons",
"author": ["alessxndra"],
"description": "Random meme mod with rigged jokers and dumb stuff",
"version": "0.0.2",
"main_file": "main.lua",
"prefix": "cursed",
"priority": 0
}

red flower
#

if you have a json you should remove the header

#

but also this is really old syntax

#

please use a newer example to base your code on

gray void
#

💀

#

nice cardback-

junior imp
molten musk
#

booster pack not working

red flower
#

the keys need to be the full keys

#

like c_modprefix_key

#

also you should be specific about what's not working

molten musk
#

showin joker

oblique aurora
daring heron
red flower
molten musk
red flower
#

what was the code and the crash

molten musk
#

do u mean the group key or normal key btw?

#

and which of the pics need key change?

red flower
#

i mean these should have the full key

molten musk
#

the cards?

red flower
#

yes

molten musk
#

i see

red flower
#

also the default should be one of the cards too

molten musk
#

c_Spectral... for defaults?

#

and c_modprefix for new ones?

red flower
#

no, c_key for vanilla, c_modprefix_key for modded

molten musk
#

oh, ok

red flower
#

you can find the keys in the localization files

junior imp
molten musk
#

it shows spectrals
but cant use them and i dint get random cards from deck to ably them on

molten musk
red flower
#

there's a setting for that

#

it's in the docs i dont remember

#

mine were joker only

molten musk
#
SMODS.Atlas({
    key = "Booster",
    path = "boosters.png",
    px = 71,
    py = 95
})

SMODS.Booster({
    key = "monster_pack",
    atlas = "Booster",
    pos = { x = 0, y = 1 },
    discovered = true,
    loc_vars = function(self, info_queue, card)
        return { vars = { card.ability.choose, card.ability.extra } }
    end,
    config = {
        choose = 1,
        extra = 2
    },
    cost = 4,
    weight = 1,
    kind = "JoyousSpring",
    group_key = "k_joy_booster_group",
    create_card = function(self, card)
        return SMODS.create_card({
            set = "JoyousSpring",
            area = G.pack_cards,
        })
    end,
    ease_background_colour = function(self)
        local choices = {
            G.C.JOY.NORMAL,
            G.C.JOY.EFFECT
        }
        local color = pseudorandom_element(choices, pseudoseed("JoyousSpring"))
        ease_colour(G.C.DYN_UI.MAIN, color or G.C.JOY.EFFECT)
        ease_background_colour({ new_colour = color, special_colour = G.C.BLACK, contrast = 2 })
    end,
})```
#

original code

molten musk
#

the function is draw_hand =True

#

but where do i put it

#
SMODS.Booster({
    key = "normal1_pack",
    atlas = "Booster1",
    pos = { x = 0, y = 0  },
    discovered = true,
    loc_vars = function(self, info_queue, card)
        return { vars = { card.ability.choose, card.ability.extra } }
    end,
    config = {
        choose = 1,
        extra = 2
    },
    cost = 4,
    weight = 1,
    kind = "TheSeals",
    group_key = "k_seals_booster_group",
    create_card = function(self, card)
        return SMODS.create_card({
            set = "TheSeals",
            area = G.pack_cards,
        })
    end,
})```
red flower
#

anywhere in that table

molten musk
#

didnt work

#

the last line
area = G.pack_cards

#

is it needed here?

red flower
#

yes

#

im pretty sure

molten musk
#

i put draw_card = true, after discovered

#

there is also select_card function in docs but not sure what does it do

red flower
#

select_cards is for when you want to save the cards instead of using them

molten musk
#

oh then foget that

red flower
molten musk
#

i wanna use them

oblique aurora
#

@red flower the joker still doesn't show up :/

molten musk
#

what are these wired blue particles

red flower
#

i would love to know i see that a lot

#

try removing the SMODS.create_card and only return the table inside it

oblique aurora
red flower
oblique aurora
red flower
#

remake everything using the structure from the links

molten musk
#

still have particles

red flower
#

damn

manic rune
#

i think you need to return skip_materialize = true too

#

someone told me to do it and it worked 🤔

fallow condor
#

Could someone tell me why it is crashing?

#

oh wait

manic rune
#

it should be card.ability.extra.dollars, and also, start a new run probably

#

unrelated but update smods too :3

fallow condor
#

that makes a lot of sense...

fallow condor
#

will do

#

thx

manic rune
#

not that old, ive seen people modding with old calc

oblique aurora
manic rune
#

show me your SMODS.Atlas

fallow condor
#

Yay, it's fixed.
It's still showing nil, tho

manic rune
#

your loc vars is empty

echo aurora
#

Hi, I got a question. How do you make it so a joker does not appear in shop?

manic rune
#
in_pool = function(i forgot the args, check smods documentation)
  return false
end,
echo aurora
#

Thank you

oblique aurora
fallow condor
manic rune
#

no, i mean

manic rune
wise turtle
#

would it be possible to duplicate a joker to the right of another specific joker. like blueprint but instead of just triggering the effects it creates a new copy of that card

fallow condor
#

yea

manic rune
#

sob

manic rune
#

straight up ignored me, i feel hurt

molten musk
#

so it works correctly now

#

next code is um...

wise turtle
molten musk
#

i want to store in a global variable which seal triggered last

manic rune
manic rune
#

or check that, yeah

molten musk
manic rune
#

do you just have vanillaremade on standby N' sob

molten musk
#

i think he has

manic rune
#

doesnt necessarily need to be "LastTriggeredSeal", it can be anything

red flower
molten musk
manic rune
#

wdym by that

manic rune
#

damn

molten musk
#

how do i save the last triggered seal in it

#

like how do i check

#

and save

manic rune
#

put

like, whatever you need to save in there idk

#

the seal's key or smt

fallow condor
#

yayyyyy it works 😄

#

thx guys (especially :3 )

molten musk
manic rune
#

wha

molten musk
#

what code do i need to type so i read that seal is triggered

manic rune
#

i actually have no clue how to explain further than that, but

to save:

G.GAME.LastTriggeredSeal = card.seal

to read:

if G.GAME.LastTriggeredSeal == card.seal then
  print("grind yggdrasil btw")
end

thats how you save to/read from G.GAME, i really dont know what else to tell you

fallow condor
#

(scales by 0.1$ btw)

molten musk
#

and i thought it would be much more complicated

junior imp
molten musk
#

now that i have last seal saved

#

can i trigger its effect from memory

manic rune
#
  1. this should be posted in #⚙・modding-general instead
  2. you will probably need to manually turn off each mod to see which one is the cause
molten musk
#

like i have a seal the copies the last triggered seal effect

manic rune
#

no

molten musk
#

oh ok

manic rune
#

@junior imp

junior imp
#

yeah?

molten musk
#

i need to go, so will figure it out tomorrow ig

#

see u

wise terrace
#

hi, I'm trying to change a value in the extra table of a joker when a run is reloaded, but the card is the load function doesn't seem to correspond with the joker (at least not the version)

#

and I can't find docs for the load function

red flower
#

you might need to do it in an event

wise terrace
wise turtle
#

what context does blueprint use when it triggers?

wintry solar
#

updating some util functions on the wiki, any that you guys can think of that are missing? I currently have SMODS.destroy_cards, SMODS.add_voucher_to_shop & SMODS.change_voucher_limit (and booster equivalents), SMODS.change_free_rerolls, SMODS.change_play_limit, SMODS.change_discard_limit and SMODS.draw_cards

manic rune
#

im bad at modding so that looks good to me

junior imp
#

so now im confused

red flower
junior imp
#

then why did modding chat tell me to send the error here?

red flower
#

idk

#

i mean it's not like a rule but usually people in #⚙・modding-general are the most experienced ones at mod conflicts

junior imp
#

ok so i will go there then no clue why they sent me here then

primal robin
#

You know, have such a big dedication to reimplement every vanilla stuff by using SMODS is actually impressive

hollow sphinx
#

game crashes with this error whenever I start with that deck. The effect where the joker spawns in happens right before that though.

red flower
#

i only did jokers and blinds

#

most of the work is Astra's

unborn bay
#

this is truly a vanillaremade

primal robin
#

Seeing this impressive work makes me feel like I'm bad in modding

primal robin
#

I tried to make my first joker and failed with attaching sprites on top of card ((

red flower
#

i mean

#

idk how to do that

wintry solar
#

now DrawStep is a thing it's reasonably straight forward

primal robin
#

I tried using set_sprites

#

Maybe I wa unlucky this time, I'll try next time

#

Good opprotunity to master UI knowledge, specifically sprites, cards and decks

glad bough
#

how do i add a custom joker to the shop rotation?

wintry solar
primal robin
red flower
stiff quiver
#

Hi, i made this code to make a joker that modifies the values of others, but i got a crash for calling a table value. Whats a way of getting it to work? lua calculate = function(self,card,context) if context.end_of_round and context.game_over == false and context.main_eval and not context.blueprint then for effect in G.jokers.cards[1].ability.extra do G.jokers.cards[1].ability.extra.effect = G.jokers.cards[1].ability.extra.effect * card.ability.extra.multiplier end end end,

wintry solar
#

you could do soul sprites in a similar way, and then just layer them

primal robin
#

Can I change their offset in update function?

glad bough
glad bough
red flower
glad bough
red flower
primal robin
#

In short I want to make smth like solar system thing, where joker is a star, and other sprites a planets or smth spinning around joker

wintry solar
#

I'm not sure how it would interact with an update function, but basing it off the current soul drawstep would probably be a good start

unborn bay
#

i believe draw_shader has a parameter to set offsets as well

wintry solar
#

if it's a set movement, there'll be a math function you can plug into the draw_shader call

glad bough
red flower
glad bough
#

i figured

#

common weight is 1 yeah?

red flower
#

it's like 0.75? i dont remember exactly

#

0.7 maybe

glad bough
#

ah it is 0.7

glad bough
wheat jewel
#

How do i make a joker decide on destroying one random scored face card, been trying to figure it out but i have no reference to help atm

daring fern
daring fern
wheat jewel
#

idk how it would look like code-wise

daring fern
wise terrace
#

is there a context for when a joker leaves the lineup, (sold, destroyed or any of that)?

wise terrace
daring fern
wintry solar
#

if any joker is oging?

#

or if your joker is going?

wheat jewel
daring fern
wise terrace
wheat jewel
wheat jewel
wintry solar
# wheat jewel destroying it would work like this?
if context.before then
  local face_count = {}
  for _, v in pairs(context.scoring_hand) do
    if v:is_face() then
      table.insert(face_count, v)
    end
  end
  if #face_count > 0 then
    pseudorandom_element(face_count, pseudoseed('exampleseed')).ability.destroyed_by_sizzziii = true
  end
end
if context.destroying_card and context.destroying_card.ability.destroyed_by_sizzziii then
  return {
    remove = true,
    -- can put a message here
  }
end```
something like this should work
wintry solar
glad bough
#

is there a way to make it so u cant buy a specific joker if u already have a specific other joker?

#

theres no good way for me to word this lawl

wheat jewel
#

Implemented it

wise turtle
#

how can I get the key of the card to the right of my joker

fallen juniper
red flower
#

talisman

fallen juniper
#

talisman is giving error? how do you know? so i know how to identify in the future

red flower
#

attempt to compare number with table is 99% of the time a mod not interacting with talisman correctly

fallen juniper
#

will remove it then ^^ ty

#

new one, i really have lots of mods and i want to make sure the ones that remain are ok with eachother

red flower
fallen juniper
#

i sent, they told me to come here

red flower
#

why do people do that lol

hushed field
#

Idk who keeps telling people to have their modlists debugged here

red flower
#

it's not like a rule or anything but the people that have more experience with playing mods tend to lurk modding chat more

#

here is for coding

wise turtle
desert ore
#

can context.retrigger_joker_check not retrigger discard effects? rebate and faceless are not working with my joker

ebon geyser
#

don't if it should go here, but i'm following Zaino's tutorial for installing lovely and steamodded, but for some reason, the lovely folder isn't showing up in my Mods folder. Anyone run into this problem/know a good resource? thanks

errant karma
desert ore
#

it's probably a syntax error

errant karma
#

sure holdd on

errant karma
desert ore
#

I think the final } next to the ) at the end of the code isn't doing anything

errant karma
#

lemme check

daring fern
errant karma
#

its literally the exact same but i removed the end )

desert ore
#

no remove the } not the )

#

is what I meant

errant karma
#

oh

#

im stupid hold on

#

that worked thank you

desert ore
#

👍

viral ember
#
    return {
        {
            label = 'My Label',
            tab_definition_function = function()
                return {
                    n = G.UIT.ROOT,
                    config = {
                        align = "cm",
                        padding = 0.3,
                        minw = 10,
                        minh = 5,
                        colour = G.C.BLACK,
                    },
                    nodes = {
                        {
                            n = G.UIT.C,
                            config = {
                                align = "cm",
                                padding = 0.2,
                                minw = 8,
                                minh = 5,
                            },
                            nodes = {
                                {
                                    n = G.UIT.T,
                                    config = {
                                        text = "Credits:",
                                        colour = G.C.WHITE,
                                        scale = 0.5,
                                        padding = {bottom = 0.4}
                                    }
                                },
                                {
                                    n = G.UIT.T,
                                    config = {
                                        text = "Main Dev and Artist: Astral,  Smeared Joker Art: test",
                                        colour = G.C.GREY,
                                        scale = 0.35,
                                        padding = {bottom = 0.2}
                                    }
                                }
                            }
                        }
                    }
                }
            end,
        }
    }
end```

I'm setting it as a column but it's still horizontal?
normal crest
#

you need to put the text as nodes of a row

viral ember
#

oh

normal crest
#

also I think the root is treated as a column

rugged pier
#

is there a way to dynamically only check for vanilla content, like if i want to know what % of jokers are unlocked

#

but only vanilla ones

#

or % decks unlocked

#

or stakes, and joker stickers, etc

errant karma
echo aurora
#

how do you create a negative black hole?

formal parrot
#

@red flower are you free . I need a little help with an idea

red flower
#

depends on the idea

daring fern
formal parrot
#

I want to add a new joker card area and a button to switch between the two card areas and hide the other one and debuff the jokers so they don’t scale , and also wants to add an ability to switch jokers from area to area kinda like joyous spring , do you have any idea

#

How i can implement this

#

(I hope my idea is clear )

errant karma
viral ember
#

what are you writing this in?

#

cause you're missing a '}'

errant karma
#

i quite literally
removed that last time
and that fixed the last issue

#

do i need to add it again 😭

red flower
# formal parrot I want to add a new joker card area and a button to switch between the two card ...

I think the hardest part is making one area not calculate but I think that's feasible
For hiding and switching cardareas i would just copy the code from my mod honestly, then you need to patch in the area to add it to the calculation pipeline. To switch jokers between them you can just add a button to each joker to make it switch, I guess. For the part about disabling the area when it's switched out I would probably hook SMODS.get_card_areas and delete the area from the return

I do the first 3 things in my mod if you want examples

errant karma
manic rune
#

wait what the hell is SMODS.get_card_areas, is that new??

red flower
manic rune
#

o

manic rune
#

:3

red flower
#

i do want to add a side deck where you can move jokers without using buttons

#

i will copy aiko's freedom code :3

manic rune
#

that makes us both :3

#

all hail aikoyori

errant karma
#

help

i added the } at the end and it crashed
i removed the } at the end and it crashed

red flower
#

its easier to see when indented properly

errant karma
#

im bad at coding and shit loll

hollow sphinx
#

trying to make a booster pack of only modded jokers, but when I open it only +4 mult jokers are inside.

red flower
#

j_modprefix_key

#

for the keys

snow vale
#

how to add smthing to a list?

errant karma
#

bro. 😭

snow vale
#

why this aint working?

normal crest
#

the flusher variable should be in the joker's config

thorn furnace
#

So I have this code snippet that's supposed to double the value of all bought consumables

calculate = function(self, card, context)
  if context.card_added and context.card.ability.consumeable then
    for key, entry in pairs(context.card.ability.consumeable) do
      if type(entry) == "number" then
        context.card.ability.consumeable[key] = 2 * entry
      elseif type(entry) == "table" then
        for subkey, subval in pairs(entry) do
          if type(subval) == "number" then
            entry[subkey] = 2 * subval
          end
        end
      end
    end
  end
end

For some reason instead of upgrading the instance of the item, it upgrades the base of the item
That is to say like
For example, if I get a High Priestess, it now creates 4 planet cards, which is good -- it's what i want to have happen
But if I get another one, it now suddenly creates 8, and the next one creates 16
I don't quite understand why it's doing that when I'm modifying the card instance and not the base card

normal crest
#

So you're multiplying the values of it as well

thorn furnace
#

oh

#

how would I go about excluding that

snow vale
echo aurora
#

Is this code correct?

manic rune
#

what does your config extra look like

#

im suspecting that card.ability.extra might be wrong (depends on how you set config extra up)

#

but also, id probably recommend having a more unique seed for pseudorandom

thorn furnace
errant karma
#

i hate malverk
please help

echo aurora
manic rune
#

oh yeah thats correct then, and yeah, what Corobo said, it should be key not set

#

-# very rare to see a modded joker with card.ability.extra that isnt a table actually

echo aurora
#

which part should be key? I'm new to this

manic rune
normal crest
manic rune
#

change set = to key =

thorn furnace
errant karma
echo aurora
manic rune
thorn furnace
manic rune
#

while key refers to a specific card

#

you would usually use set to have an effect that creates a random joker, consumable, stuff like that

wintry solar
feral sage
#

i want to make like a balatro mod but i was wondering if there was any template or if i need to make one form scratch

#

wait never mind i found the templates

manic rune
#

oh cool :p

errant karma
thorn furnace
wintry solar
wintry solar
fallen juniper
#

guys when using retro deck and i skip a blind to get an uncommon joker in the shop this happens

long sun
#

hiya! i've got another bugged joker -u-

#

two bugs

#

and the second is, it destroys 2 cards, instead of 1

daring fern
long sun
#

[it destroys a random card held in hand, if the hand is a Straight]

long sun
daring fern
long sun
#

right

daring fern
long sun
#

trying

#

ah oops, sorry, i meant contains

#

if it contains a straight, not necessarily that it is

daring fern
long sun
#

cheers ^^ seems to be working now

#

mm, wait, it's still destroying 2 cards, for some reason

wintry solar
#

You mark every card that’s not marked

chrome widget
#

When using take_ownership to change the localization of a vanilla item, is it preferred to put the new loc text in a localiation file, or use loc_txt in the take_ownership function itself?

serene granite
#

hey i am really new to this, and i am trying to learn more about creating custom jokers, is there a context for different suit cards beings scored, so i guess like the arrowhead joker, if its spade it adds chips, i want to make something simple, like if its spades it adds mult instead

wintry solar
chrome widget
#

Point being that I'm taking ownership anyway, because I also need to change the loc_vars function to accommodate

#

So in the case of multiple mods taking ownership of the same item, is one preferred?

#

I'm not 100% on how SMODS manages an item being passed around between mods on the back end, and what ends up prioritized if you use a loc file

long sun
errant karma
snow vale
#

how can i refer to the individual card being calculated?

red flower
#

context.other_card

snow vale
#

a

#

okk

#

thanks

#

also how can i add something to a list?

modern kindle
#

@chrome widget hi bestie

#

I see a cool N in chat too

chrome widget
#

Hi bestie!!!

frigid cargo
#

How do people usually do the make their own ranks be obtainable?

modern kindle
daring fern
chrome widget
#

ehh mostly got up, got lunch, now Im working on smth

snow vale
red flower
chrome widget
#

it's the n in my name obviously

#

See

errant karma
#

someone please tell me what exactly the problem is
someone said it's an issue with the deck textures but i don't know
what
the problem with them is
or if im stupid

red flower
chrome widget
#

Out of curiosity N', does Vanilla Remade support scaling the highlight limit on consumeables?

#

A number of consumeables use min_highlighted and max_highlighted without actually being coded to support those having varied values

#

So rn I'm having to comb through and fix up some of them

modern kindle
manic rune
#

hi dilly

chrome widget
#

Buffalo chicken roller bites from a gas station

modern kindle
# red flower where

There's this one guy out there who's pretty okay, he stole alot of my code for his mod called joyousspring but thats okay

red flower
modern kindle
manic rune
#

i want my balatro star rail mod back :3

modern kindle
red flower
modern kindle
manic rune
#

im sorry

chrome widget
#

No yeah most cards are already technically built to handle in. I'm mostly thinking of cards like Aura (which doesn't even use highlight limit) and Cryptid (which is hardcoded to only copy the first selected consumeable)

#

I wonder if this would be a good SMODS PR for mod support...

#

Or if it's too niche

snow vale
#

does table.find()work exactly the same as table.insert()?

#

(i mean)

#

the same parameters

red flower
#

i could change it

chrome widget
#

Basically Im implementing a card that gives +1 highlight limit to all consumeables to which it aplies

#

most cards are simple, just change the value (enhancements, suits, Death, Hanged Man, etc)

#

Though they could use tailored loc text when their values are edited, which I'll also do

snow vale
#

actually, how can i check if i have an specific key in a list?

chrome widget
#

you'd just do if list[key]

snow vale
#

o

#

ok thanks

chrome widget
#

oh damn

snow vale
#

oh damN'

chrome widget
#

Talisman, Deja Vu, Trance, and Medium also just hardcode G.hand.highlighted[1]

#

Ugh

modern kindle
#

Talisman my absolutely detested

#

Made my life so much more annoying to make shit work equally with and without it

chrome widget
#

You don't like Gold Seals dilly? 🥺

modern kindle
#

Oh I thought you meant the mod

#

Lmao

#

Oopsie

#

Cause trance is also a mod I think lmfao

#

Mfs need to stop naming things like this

#

But no gold seals are my goat especially on my jokers with my random seal applier

snow vale
manic rune
#

start a new run

snow vale
#

ok

modern kindle
#

Rule of thumb is to always start a new run

manic rune
#

always start a new run when you are testing

snow vale
#

the problem is that to test i have to spawn 8 cards...

#

different cards

modern kindle
#

That takes like 10 seconds

#

Debugplus my beloved

manic rune
#

so true

snow vale
#

wait, can i add joker slots with debugplus

modern kindle
#

I remember when I didn't know about it and used cheat engine to set my cash to a high amount and rerolled shop until I got it

daring fern
snow vale
#

e

broken cliff
manic rune
#

fucking cheat engine???

#

goated way to test your mod 😭

snow vale
modern kindle
#

Bro its all I could think of to set my cash high easily

#

And then I saw people here yap about debugplus

#

And my life was changed

manic rune
#

imagine modding without debugplus though

snow vale
modern kindle
#

Although, debugplus could use a input field to give me more than 10 dollars

daring fern
manic rune
#

eval G.GAME.dollars = 1000000000

#

or

red flower
#

money add 100000

snow vale
manic rune
#

eval ease_dollars(100000000)

modern kindle
#

Buddy I'm a monkey brain let me press the button

manic rune
#

or what N' said

red flower
broken cliff
manic rune
#

i dont remember the debugplus commands :3

snow vale
#

distribution i mean

modern kindle
#

I never use commands really
Last time I used commands for a game was in Skyrim

chrome widget
manic rune
#

damn so its that kind of keyboard (i forgot its name)

modern kindle
broken cliff
snow vale
#

i mean

manic rune
#

am i qualified to make an ui tutorial

pure salmon
#

please.

modern kindle
#

Youre qualified to be god of your country

manic rune
#

sob

snow vale
#

i meant such a small patch

chrome widget
broken cliff
manic rune
#

id give everyone a can of pepsi everyday

red flower
#

i dont want it

manic rune
#

blocked

broken cliff
snow vale
#

didnt work i hate my life

modern kindle
#

One day I should really go through my patch file and see what I dont need anymore
I was talking to bepis and I have like 900 lines of patches

snow vale
#

i had to go thru 6 BLINDS just to try it

chrome widget
#

I've slowly eliminated various patches

#

WAIT WAIT WAIT WAIT

#

@red flower I have a PR idea for you

manic rune
#

yggdrasil's code is still enough to kill anyone who attempts to read it :3

modern kindle
red flower
manic rune
#

im sorry dilly

broken cliff
serene granite
#

hey i dont want to post repeat messages, but i think my message was missed, im wondering if anyone can help me

i am really new to this, and i am trying to learn more about creating custom jokers, is there a context for different suit cards beings scored, so i guess like the arrowhead joker, if its spade it adds chips, i want to make something simple, like if its spades it adds mult instead

modern kindle
#

I like reading bepis' code
He's so silly billy

snow vale
#

what did i do wrong

red flower
manic rune
#

yup that

modern kindle
#

I wish we had commands we could do for links like this with ease
Ie !vr for remade or !smods for the wiki

red flower
#

yeah

snow vale
#

just pin it

#

i mean

#

that would be enough

manic rune
#

pinning in those channels is super rare

snow vale
#

and add a text in here that says CHECK PINS

chrome widget
#

I saw you already kinda did this in Vanilla Remade, but I think SMODS could def use removing the kinda stupid code that Throwback, Joker Stencil, and Swashbuckler use for determing their mult. B/c in vanilla, they calculate their mult or xmult in UPDATE for some reason, rather than just doing the calculation when needed (on hover/during calculate). Doing so would allow me to remove one of my most personally frustrating patches 😭

manic rune
modern kindle
#

Even with text and pins nobody checks those

red flower
snow vale
manic rune
thorn furnace
#

I feel like I need to confirm something
Does modifying values in context.card.ability.consumeable modify them for every instance of the card
I can't find an alternative that just modifies it for one singular instance of the card

manic rune
red flower
snow vale
# manic rune whats wrong

it is supposed to transform into another card when i destroy 7 specific cards, but when it does, it does nothing

red flower
#

also my hands are really cold it's hard to type

modern kindle
manic rune
#

isnt it summer

rugged pier
#

bepis

manic rune
#

hii

rugged pier
#

hows it going

chrome widget
#

The original reason I needed to do this is because I have a joker that retains scaling values of scaling jokers, but those three jokers (as well as all five of the handtype Xmult jokers and Ramen) all do something that sets a value immediately upon their creation, causing their ability tables to not match their center definitions. So I had to change them to have a more consistent internal definition for what's considered scaling I.E. that its important, tracked values have been changed. Since there's no reason to track and reset for example Swashbuckler when it'll just immediately change the value upon picking it up

manic rune
#

im gud, hbu

red flower
modern kindle
manic rune
rugged pier
manic rune
#

we are obligated to praise thunk for his code else our mods would perish

snow vale
#

wait im dumb

rugged pier
#

imagine next patch he changes the structure

red flower
#

im waiting

rugged pier
#

and boom

modern kindle
#

I bet i could eat more chicken wings than thunk

snow vale
#

this is deleting the table, right?

rugged pier
#

everything breaks

manic rune
#

nop

broken cliff
#

Thank you LovelyThunk 🙏🏿

rugged pier
#

anyway

manic rune
#

it removes a value from the table

red flower
#

thunk ports the game to UE5

snow vale
#

right

#

then

rugged pier
#

how to store variables across runs

snow vale
#

what am i doing wrong 😭

modern kindle
manic rune
rugged pier
snow vale
#

is this checking correctly?

hollow sphinx
#

does anyone know how I can make a deck that just makes every card have a specific seal (or a template of that I could steal :3)

manic rune
#

yggdrasil uses that everywhere lol

red flower
rugged pier
#

for balatro

manic rune
#

a what

rugged pier
#

:3

modern kindle
#

Profiles reminds me that later I want to make tarot cards than spawn your most used cards and least used cards

rugged pier
#

like you know how theres ratings in chess

manic rune
#

yeah i know, but what

manic rune
snow vale
#

😭

manic rune
#

i dont think you can have an index as a table

rugged pier
#

so im making a chess mod that has different chess pieces, attack patterns etc, and higher your elo, the more chance you have of seeing those

#

and more powerful they are

snow vale
rugged pier
#

and lower elo is the opposite

thorn furnace
chrome widget
manic rune
#

use table.contain or smt instead

modern kindle
snow vale
#

ok then

manic rune
#

its 1 AM rn so i should probably go sleep, i have school tmr

rugged pier
manic rune
#

gn everyone

rugged pier
#

gn bepis

snow vale
thorn furnace
#

gn

modern kindle
#

Not allowed to sleep bepis

rugged pier
thorn furnace
modern kindle
#

But rest well my friend i hope you dream of large stakes

rugged pier
#

the lower your elo and higher the stake you beat, the more points you gain

#

your opponent is basically balatro

rugged pier
#

and whats the idea

red flower
#

i want to add a health bar

thorn furnace
modern kindle
#

I want to add N to my mod

chrome widget
snow vale
#

how to check if a list contains something then?

modern kindle
#

Bepis made that charging bar i need to implement for something somday

red flower
modern kindle
#

Someday

thorn furnace
# rugged pier and whats the idea

Essentially reworking the main game
Instead of antes, you would be facing opponents in a tournament
every boss blind is a Strong Contender and they would have unique mechanics

modern kindle
rugged pier
fleet crag
#

hello i'm wondering how do i add an ogv video as a uibox

thorn furnace
red flower
snow vale
chrome widget
#

Right there with you lmao

rugged pier
#

aiko's shenanigans adds different kinds of boss blinds

thorn furnace
rugged pier
#

if you want to take a look

#

like new blind mechanisms

modern kindle
rugged pier
rugged pier
snow vale
modern kindle
#

Im waiting for winter to release their mod so I can play donkey kong

chrome widget
#

Yeah you can just play donkey kong dont worry

red flower
rugged pier
#

whats rascal

chrome widget
#

Deadass I'm probably just gonna add a menu item that allows you to play the emulator games directly

#

Without the play limit

#

Yknow like those NES Classics GBA games

modern kindle
#

Yeye

wintry solar
#

🤔 hmmmmm

viral ember
#

I have a simple shader:

extern vec2 screen_size;

vec4 effect(vec4 color, Image texture, vec2 texture_coords, vec2 screen_coords)
{
    vec2 pixelated_coords = floor(screen_coords / pixel_size) * pixel_size;
    vec2 tex_coords = pixelated_coords / screen_size;
    return Texel(texture, tex_coords) * color;
}```
but it keeps saying "Shader uniform 'mouse_screen_pos' does not exist?
red flower
chrome widget
#

Me playing Mega Man 3 with my favorite emulator, my own Balatro mod

rugged pier
hasty mist
#

was having this issue again but im bringing it up again here, what's wrong here?

modern kindle
hasty mist
#

the message does not show up

#

everything else works

red flower
#

me booting up balatro to play wordle, solitaire and mega man 3

modern kindle
#

One of my most peak purchases was a raphnet adapter
Using my n64 controllers on emulators is so peak

#

I bought like 4 of them just in case cause they always sell out

red flower
#

my most peak purchase is the MiSTer

modern kindle
red flower
#

MiSTer (also known as MiSTer FPGA) is an open-source project that aims to recreate various classic computers, game consoles and arcade machines, using modern FPGA-based hardware. It allows software and video game images to run as they would on original hardware, using peripherals such as mice, keyboards, joysticks and other game controllers.

#

it's so good

modern kindle
#

Oooo

modern kindle
#

One day I should show you guys my retro collection

#

Ive spent way too much money

viral ember
#

yes?

#

am I missing something?

hasty mist
#

the message doesn't show up

normal crest
normal crest
hasty mist
#

everything works as intended except the message

normal crest
#

I'm not sure then

#

Is there a reason you can't just return the message

hasty mist
#

return didn't work either

normal crest
#

Then it's likely that code is not being executed

hasty mist
#

how is that possible? i've tried so many different variations of this

#

it's as simple as it can be

red flower
#

is that a joker

hasty mist
#

yeah

normal crest
#

i assume your comparison with random being equal to 1 is always false

hasty mist
#

no

#

like i said before

#

everything works

#

except the message

normal crest
#

If you uncomment that print statement you have, does it actually print

hasty mist
#

yes

red flower
#

do other messages work?

hasty mist
#

to my knowledge yes

#

like

#

other jokers with messages work

red flower
#

strange

normal crest
#

strange indeed

#

can you send the entire joker

red flower
#

you know you can nest if statements right 😭

hasty mist
#

😭 😭 😭

#

yes i do

wintry solar
#

holy what is this indentation

#

oh it's discord being weird

hasty mist
#

i think it looks better in vscode

red flower
#

yeah it looks fine when downloaded

wintry solar
#

yeah it looks scuffed in disc

modern kindle
#

I think this is the ideal indentation

red flower
hasty mist
#

😭 😭 😭

hollow sphinx
#

trying to make a deck that sets every card to a certain seal, but this ends up happening beforehand

wintry solar
#

why is everything wrapped in to_big

hollow sphinx
#

works thanks

hollow sphinx
#

persona

desert ore
#

are there any rules of thumb for priority when doing lovely patching?

coarse plank
#

what code would i add to the last if statement to destroy all cards played, also I would like to make sure this works as I imagine, destroying cards only on full house not flush house.

wintry solar
#

change context.before to context.destroying_card

turbid crystal
#

hii, does anyone know how i could get a list of every joker key

coarse plank
wintry solar
#

oh sorry

#

return { remove = true }

coarse plank
#

thank you so much!

granite nymph
#

i tried stealing the idol code from vanilla rmeade but it doenst work for some reaosn

exotic imp
#

can someone please help, I am new to Lua and even with the .joker github page I am confused, what are the requirements for jokers code wise, this is what I currently have and I don't know what is required besides the text explaining what the joker does

granite nymph
#

or false depending on if its compatible

#
SMODS.Joker {
    key = "idol",
    unlocked = false,
    blueprint_compat = true,
    rarity = 2,
    cost = 6,
    pos = { x = 6, y = 7 },
    config = { extra = { xmult = 2 } },
    loc_vars = function(self, info_queue, card)
        local idol_card = G.GAME.current_round.vremade_idol_card or { rank = 'Ace', suit = 'Spades' }
        return { vars = { card.ability.extra.xmult, localize(idol_card.rank, 'ranks'), localize(idol_card.suit, 'suits_plural'), colours = { G.C.SUITS[idol_card.suit] } } }
    end,
    calculate = function(self, card, context)
        if context.individual and context.cardarea == G.play and
            context.other_card:get_id() == G.GAME.current_round.vremade_idol_card.id and
            context.other_card:is_suit(G.GAME.current_round.vremade_idol_card.suit) then
            return {
                xmult = card.ability.extra.xmult
            }
        end
    end,
    locked_loc_vars = function(self, info_queue, card)
        return { vars = { number_format(1000000) } }
    end,
    check_for_unlock = function(self, args)                        -- equivalent to `unlock_condition = { type = 'chip_score', chips = 1000000 }`
        return args.type == 'chip_score' and args.chips >= 1000000 -- See note about Talisman at the bottom
    end
}
#
    G.GAME.current_round.vremade_idol_card = { rank = 'Ace', suit = 'Spades' }
    local valid_idol_cards = {}
    for _, playing_card in ipairs(G.playing_cards) do
        if not SMODS.has_no_suit(playing_card) and not SMODS.has_no_rank(playing_card) then
            valid_idol_cards[#valid_idol_cards + 1] = playing_card
        end
    end
    local idol_card = pseudorandom_element(valid_idol_cards, pseudoseed('idol' .. G.GAME.round_resets.ante))
    if idol_card then
        G.GAME.current_round.vremade_idol_card.rank = idol_card.base.value
        G.GAME.current_round.vremade_idol_card.suit = idol_card.base.suit
        G.GAME.current_round.vremade_idol_card.id = idol_card.base.id
    end
end
#

vanilla remade's idol code is broken

thorn furnace
#

Broken in what way

granite nymph
#

it crashes whenever its shows up in a run

#

"attempt to index field vremade_idol_card (a nil value)

normal crest
#

where are you calling reset_vremade_idol_card

granite nymph
#

oh my god im stupid sorry

north lodge
#

I am struggling to correctly make UI elements in-game, would someone be able to sit down with me to fledge it out?

red flower
#

not me, but I can help if you have a specific question

wheat jewel
#

Does modding allow you to double the base value of a playing card through a joker or no?

#

like double the amount of chips you get is doubled on a card

granite nymph
#

also im sorry for freaking out here as of recently

#

it was like 12 at night and i didnt get much sleep

hybrid shadow
#

how would i prevent a card from being face down

red flower
#

hook card:flip

north lodge
#

I don't wanna flood the channel

red flower
hybrid shadow
red flower
#

yeah

#

hook card:flip

#

that's what i do

hybrid shadow
#

im just gonna search through the message history to find where you actually went in depth on that then

red flower
#

yeahhhhh

chrome widget
#

The audio emulation sucks ass unfortunately and it handles slowdown even worse than the regular hardware I'd think. I can barely have 3 enemies onscreen at once before it starts to lag

#

Regardless, that's not particularly a worry

#

What's more worrying is that there's some late-nes hardware things that prevents Dragon's Lair from booting. Oh boy

daring fern
hybrid shadow
thorn furnace
chrome widget
red flower
chrome widget
#

Anyway done with this for now

#

perhaps I could overclock the NES...

hybrid shadow
thorn furnace
#

Wait

#

No nvm i spoke too soon

red flower
hard mica
#

is there a way to close the game?

#

through code

thorn furnace
thorn furnace
wintry solar
thorn furnace
hybrid shadow
#

im just gonna try smth nonconventional and see if it works

#

i can run for without needing local right?

red flower
#

is this for the flip thing?

hybrid shadow
#

yes

red flower
#

it's literally this

local card_flip_ref = Card.flip
function Card:flip()
    if not check_for_your_card(self) then
        card_flip_ref(self)
    end
end
wintry solar
thorn furnace
granite nymph
#

frtom hometuck

wintry solar
#
SMODS.current_mod.optional_features = function()
    return {
    cardareas = {
            discard = true,
            deck = true
        }
    }
end
#

put this in your mod somewhere

hybrid shadow
red flower
#

the only caveat is if it is a playing card you might run into problems when it's flipped to be in deck or for the tarot animations

lyric rain
#

Guys, I'm creating a joker that if it's on the left, all effects apply to chips. Where can I find the joker position functions in the game code? I can't find them or I don't understand.

zealous glen
zealous glen
thorn furnace
hybrid shadow
# zealous glen What are you trying to do

gonna massively reword it here because i had this issue the first time i went through this

i have a sticker and i want it to prevent cards from being drawn face-down

red flower
thorn furnace
red flower
zealous glen
#

But you could patch there and add a check

#

Or maybe hook

hybrid shadow
#

i dont need context.stay_flipped

zealous glen
red flower
#

ok sorry for answering

zealous glen
hybrid shadow
zealous glen
#

The card would be registered as drawn face-down AFAIK

#

So it wouldn’t update the UI correctly

hollow sphinx
#

is there anyway I can change "if jokerExists" to something that checks if you're on a specific deck?

hybrid shadow
daring fern
hybrid shadow
#

ok, context.stay_flipped ig

what do i do there

granite nymph
#

can anyone find the documentation for "SMODS.current_mod.reset_game_globals {"

red flower
granite nymph
#

oh wow you werent kidding :(

red flower
#

i mean it's just a function that runs every round

#

that's its purpose

granite nymph
#

im still not sure how to say which valuables are being reset

red flower
#

the ones you program inside it

frigid cargo
#

whats the different between lets say chips and additional

shell kite
#

Hello

#

I have a question

red flower
shell kite
#

How can I destroy a played card?

red flower
frigid cargo
# red flower can you elaborate

like lets say i want the text to say "+100 chips per tarot cards used this run", and i want the currently to have a starting base of +50 chips, ive seen different mods use chips and additional but idrk how it works

red flower
#

oh that's not like a code thing, it's just wording on the effects

#

so instead of starting the scaling on chips = 0 you would start it at chips = 50

granite nymph
shell kite
frigid cargo
red flower
shell kite
#

thanks

granite nymph
red flower
#

anything you put in there is run each round
so for example if you have G.GAME.my_variable = pseudorandom("seed", 1, 20) and nothing else it's going to pick a new value between 1 and 20 each round

viral ember
#

I have a simple shader that does nothing but it's saying "Shader uniform 'mouse_screen_pos' does not exist."

red flower
#

<@&1133519078540185692>

viral ember
#

<@&1133519078540185692>

#

oop

#

thank you mods <3

karmic creek
#

boomshakalaka

exotic hedge
#

Funny thing is I know where that guys pfp was from lol

#

and I share like 3 mutual servers with him