#💻・modding-dev

1 messages · Page 465 of 1

placid star
#

show code

serene granite
#
    key = "go_fish_pack_1",
    name = "Go Fish Pack",
    cost = 4,
    atlas = 'Jokers',
    weight = 2,
    pos = {x = 1, y = 1},
    group_key = "go_fish_pack_group",
    draw_hand = true,
    discovered = true,

    loc_txt = {
        name = "Go Fish Pack",
        text = {
            "Go fishing for a random",
            "{C:blue}Fish Joker{} to add to your deck."
        }
    },

    ease_background_colour = function(self)
        return ease_background_colour_blind(G.STATES.SPECTRAL_PACK)
    end,

    particles = function(self)
        G.booster_pack_bubbles = Particles(1, 1, 0, 0, {
            timer = 0.1,
            scale = 0.5,
            lifespan = 4,
            speed = 2,
            attach = G.ROOM_ATTACH,
            colours = { G.C.BLUE, G.C.WHITE},
            fill = true
        })
    end,

    remove_particles = function(self)
        G.booster_pack_bubbles = nil
    end,

    create_card = function(self, card, i)
        return {
            set = "GO_FISH_RODS",
            area = G.pack_cards,
            skip_materialize = true,
            soulable = false,
            key_append = "go_fish"
        }
    end
}
placid star
serene granite
#

hmm i dont see the particle effects in that

placid star
serene granite
#

oo

placid star
#

or u could live with it maybe, call it a style choice?

#

jk

serene granite
#

true lol could be funny

#

woah

#

whats that

tight hull
#

woah

#

is that free money?!

broken cliff
#

this is free money Btw

tight hull
#

how could this be!

broken cliff
#

only if ur running the scam

#

oh damn ig he gets no money

#

from the scam

dreamy thunder
#

i think wrong ping

#

oops

#

i was replying

#

now its gone

placid star
placid star
#

tbf i did type @mods and it didnt work

tight hull
#

how?

#

it works for me

gaunt thistle
placid star
gaunt thistle
#

and that one user named mods_ should be banned lol

#

irritating

gaunt thistle
placid star
#

as in, im going to cleanse the world of hooks #patchesforlife

gaunt thistle
#

that's like washing your hairr instead of your hands when you take a dump

#

amen

serene granite
#

i guess ill just ignore this problem for now since its just like a design thing and not gameplay thing, but i need to figure it out eventually haha

placid star
broken cliff
tight hull
placid star
broken cliff
#

multiply is a real word

gaunt thistle
placid star
#

say that again...

broken cliff
#

say that again

tight hull
placid star
gaunt thistle
tight hull
#

damm

gaunt thistle
#

lmk if you have issues with patches

placid star
teal ferry
#

just remembered tomorrow is my free day. yaaaaay !

placid star
tight hull
tight hull
placid star
#

theyre peak

#

#patches4lyfe

tight hull
#

Im creating a texture pack

#

is there any way to use them?

placid star
#

okay yeah maybe theyre not too useful in that case

tight hull
#

yeah

primal robin
#

I still not get it. How to rotate UI element?

#

Oh nvm, I see...

tight hull
#

it works but there is no trace of it in the console, how does that work

normal crest
#

what's your config ui definition

tight hull
#

wdym?

normal crest
tight hull
#

I have it as a separate file

#

send the whole or just a part?

humble matrix
#

for some reason, legendary jokers dont show up in my booster pack at all despite i put their rate to 0.25 (which should make them generate naturally)

normal crest
tight hull
normal crest
humble matrix
normal crest
tight hull
normal crest
#

if you're not gonna localize

tight hull
#

what does localize do?

normal crest
#

Localize looks at the localization file of the selected language for the string you pass it

tight hull
#

so nothing that im interested in

#

at least i think

tight hull
normal crest
#

it's better to have the system to allow others to localize your mod in other languages if they want to

#

but yeah, it'll work without it

tight hull
#

I have no idea how to use localize so I will leave it be for now

tight hull
normal crest
#

if you have debug plus open the console and type eval ReZeroMod.config

#

you should see the values change in real time

normal crest
normal crest
normal crest
humble matrix
#

that

#

i dont think that would work

primal robin
#

Okay, good progress so far

normal crest
humble matrix
#

it just seems like the thing that sounds plausible enough but end up not working

formal parrot
#

Sleep

primal robin
#

It's not murphy

primal robin
#

It's Chip the Showman

normal crest
#

can you send your entire booster pack definition

hallow slate
#

How do I use localize() to get an enhancement name?

humble matrix
#

the weight being 999 is for testing

normal crest
tight hull
normal crest
humble matrix
normal crest
# tight hull

you can delete Balatro/config/your_mod.jkr to reset that

#

(make sure to delete it when your game is closed)

tight hull
#

...

#

what happends if I forget to close it...

normal crest
#

it'll save again when you close the game i guess

#

not a big deal

tight hull
#

you gave me a mini heart attack 😔

normal crest
humble matrix
normal crest
rapid stag
#

bump

tight hull
normal crest
#

You should close the game, delete it and then reopen the game

tight hull
#

thats what I did

normal crest
#

your config.lua in your mod doesn't have them anymore right

tight hull
#

the misspelled ones? no

normal crest
#

i'm not sure why that didn't work

humble matrix
normal crest
#

maybe it saved somewhere else

tight hull
#

should it?

normal crest
#

to my knowledge nop

#

ultimately this isn't an issue btw

#

the values being there won't affect anything if you don't use them anywhere

#

and they won't even exist for new users of your mod

tight hull
tight hull
vast night
tight hull
#

should I change only the '/' or also in the kp

vast night
#

you are just either replacing normal / or the / on the numpad

tight hull
#

ohh

vast night
#

question

Hey does someone know how I can make text inputs (create_text_input()) also accept .

#

and whilee im at it

#

how do i reload the config window?

#

(like after pasting i want the text to update in the text input)

tight hull
vast night
tight hull
#

oh yea

tight hull
#

thnx

serene granite
#

is it possible to have a joker that retriggers a joker that is adjacent to it? i guess kind of like blueprint but instead the joker itself just retriggers

serene granite
#

any ideas of how that would work or examples?

tight notch
#

how do I add tooltips to a joker?

next timber
#

how do you get the amount of slots in a cardarea again

daring fern
daring fern
next timber
tight hull
#

Sorry to spam the chat but I want to turn off the textures that the mod adds if the value of a variable is true, could someone explain how to do that?

#

because in my mind I would just use

if x = false 
  load textures

but im 100% sure it wont work + I lerned a bit of coding in python, idk anything abt lua

primal robin
#

You know, looks good so far

#

Also experimenting with rotating and gap

tight hull
formal parrot
tight hull
#

whats this part of the code for?

primal robin
formal parrot
normal crest
#

so you're replacing the vanilla Tarot atlas

tight hull
#

makes sense

primal robin
formal parrot
#

Like playing cards but the card you’re hovering over gets highlighted automatically znd when you hover over a new one it highlights the other one instead

primal robin
#

I was planning using click to select "tab", actually

rotund sable
#

is there a way to detect wheel of fortune failing without overriding anything?

hallow slate
#

What would be the best way to swap the enhancement effects of two enhancements? Like if I wanted gold and steel effects swapped.

tight hull
tight hull
primal robin
#

You know, that looks great

red flower
rotund sable
#

the next 🥺

tight notch
#

how would i change every card in deck to a certain suit? like sigil but the whole deck

#

and it's not random

modern kindle
#

can probably go through g.deck.cards and change_base no?

tight notch
#

how do i do that

formal parrot
tight notch
#

it's a consumeable

formal parrot
primal robin
#

Here's how looks 25 tabs, which is already huge amount, no idea what you need to do to spend 25 tabs

#

This also an option, but personally more like rotated trash

daring fern
tight notch
#

i got it

#

thx

placid star
tight hull
#

SMODS.Atlas{key = "Tarot", path = Filename, px = 71, py = 95, prefix_config = { key = false } }

placid star
#

okay and lemme see your current config file

tight hull
placid star
placid star
primal robin
placid star
placid star
#

your missing callback args in the create_toggles

#

which requires you to create functions for the behaviour u want

tight hull
#

wdym?

placid star
#

for each node youd need

n = G.UIT.R,
                                config = { align = "cm", padding = 0.01 },
                                nodes = {
create_toggle({
label = 'Disable ReZero Spectral card skin',
ref_table = ReZeroMod.config,
ref_value = 'disable_spectral_skin',
callback = 'disable_spectral_func'
#

and then youd need to make a

    your function code here
end```
tight hull
#

I will try this thnx

#

so in the function I just put the SMODS.Atlas?

placid star
#

nah youd put it in the ui file

#

it doesnt really matter as long as you load the file but its more organized in your ui file

tight hull
#

so in the function I put the if?

#

wait i dont understand

placid star
#

in all honesty, im not too sure what kind of behaviour toggles return on click, so im not too sure what youd check for in the function

#

id take a look at other mods/texture packs with configs

tight hull
#

I didnt rly find any

#

I found a mod but its done diffrently (harder)

floral flicker
#

Hello, I try to make a deck that after each hand played, every played card value goes up by 1 (Like strenght), the function to up de value work, but not the context, if someone who knows more than me is welling to help me.
Here is my code:

SMODS.Back{
    key = 'Aging',
    loc_txt = {
        name = 'Aging Deck',
        text = {
            ''
        }
    },
    calculate = function (self, back, context)
        if context.cardarea == G.play and #G.play.cards >= 1 and context.after then
            for i = 1, #G.play.cards do 
                local _card = G.play.cards[i]
                local rank_data = SMODS.Ranks[_card.base.value]

                if rank_data and rank_data.next and rank_data.next[1] then
                    local new_rank = rank_data.next[1]
                    SMODS.change_base(_card, nil, new_rank)
                end
            end
        end
    end
}
placid star
placid star
red flower
#

they do

#

but i think you dont need the cardarea check

floral flicker
placid star
#

could it not be if context.after and #G.play.cards >0 then

tight hull
red flower
#

no

placid star
#

even the vascouus N' doesnt dare enter the realm of... ui coding

red flower
#

no, i know UI

#

i dont know textures and graphics

#

also i would just use malverk

tight hull
placid star
red flower
floral flicker
red flower
placid star
red flower
placid star
#

but yeah, n's right, go with malverk

vast night
#

Hi. How do i get the version of the mod again?

tight hull
vast night
#

couldnt find anything online

tight hull
#

or smth like that?

tight hull
placid star
floral flicker
red flower
floral flicker
red flower
#

try that

if context.after then
    for _, pcard in ipairs(context.full_hand) do
        G.E_MANAGER:add_event(Event({
            func = (function()
                assert(SMODS.modify_rank(pcard, 1))
                return true
            end)
        }))
    end
end
paper elbow
#
// Mods/your_mod/your_mod.json
{
    "id": "blackcards",
    "name": "Black Cards", // [required]
    "author": ["GeigerCounter"],
    "description": "Black card faces with brightly coloured suits.", // [required] ! To use more advanced typesetting, specify your description as a localization entry at G.localization.descriptions.Mod[id]
    "prefix": "blackcards",
    "main_file": "main.lua",
    "priority": -20,
    "badge_colour": "FF230A",
    "badge_text_colour": "ABC123",
    "display_name": "BC",
    "version": "~1.0.0",
    "dependencies": [
        "Steamodded (>=1.*)",
        "Lovely (>=0.6)",
        "Malverk (>=1.*)"
    ],
    "conflicts": [

    ],
    "provides": [

    ],
    "dump_loc": false // !! Not for use in distributions. Writes all localization changes made on startup to a file, for conversion from a legacy system.
}

Is there a problem with my manifest? My mod isn't showing up.

rough furnace
#

the comments have to be removed

paper elbow
#

huh ok

tight hull
vast night
placid star
paper elbow
#

It still isn't working

red flower
tight hull
placid star
placid star
rigid solar
#

Hi, pretty new to modding
If I wanted to iterate through all existing jokers, what's the list I'd need to iterate through? The endgoal is to get all jokers that aren't perishable compatible
I thought I could iterate through SMODS.Joker but apparently not

tight hull
placid star
rigid solar
#

ALL jokers in the game

daring fern
placid star
tight hull
#

what?

#

oh wait

#

yup

#

it doesnt crash but it doesnt work either

tight hull
placid star
#

then check for whatever function or other causes the crash

rigid solar
placid star
tight hull
#

see what?

placid star
#

the button

tight hull
placid star
tight hull
#

to specify the error ocures when I click on the toogle

red flower
#

callback has to be a function i think

#

not a string

placid star
tight hull
#

"your args" is?

placid star
#

i think SMODS? since you passed that in right?

red flower
tight hull
red flower
#

callback = disable_tarot_func
and then
function disable_tarot_func(ref_value)

placid star
#

N' is one smart cookie

red flower
tight hull
#

it doesnt crash anymore

#

now all I need is to reset the game (otherwise the textures dont change, i think)

#

nope

paper elbow
#
{
    "id": "blackcards",
    "name": "Black Cards",
    "author": ["GeigerCounter"],
    "description": "Black card faces with brightly coloured suits.",
    "prefix": "blackcards",
    "main_file": "main.lua",
    "priority": -9999998,
    "badge_colour": "FF230A",
    "badge_text_colour": "FF230A",
    "display_name": "BC",
    "version": "~1.0.0",
    "dependencies": [
        "Steamodded (>=1.*)",
        "Lovely (>=0.6)",
        "Malverk (>=1.*)"
    ]
}
```  Lovely says `bad argument #1 to 'match' ( string expected, got nil)`
tight hull
#

how do I take ownership?

daring fern
subtle merlin
#

Today has been... "fun"

red flower
#

do the flips even work

#

anyway it's set_ability

subtle merlin
subtle merlin
red flower
#

guaranteed*

tight hull
#

I did smth like this

subtle merlin
red flower
tight hull
#

so more like this?

#

or still no

red flower
#

you were closer the first time i think lol

#

the problem is that idk how to take ownership of an entire consumable type so i cant give you an example

#

im gonna be honest with this, if you need to keep asking about syntax errors i would just switch to malverk

tight hull
#

yeah

rigid solar
# rigid solar This one worked, thanks! <:smiley_face:1380036229843783731>

Ok new problem
The goal was to get all non-perishable jokers in the game, to then pass the list to a challenge's banned cards, since it'd be annoying to put them manually (also it'd allow for the list to be dynamic with other mods). But it seems that the functions runs before jokers are injected into the game, and so it stops at Wee Joker (i've tested printing the whole list during a run, and I have about 60 non-perishable jokers total, so much more than the base game's 18). Hum any idea how to fix that? Or is there no way and i'm forced to put the list manually?

red flower
#

i dont think there's a way to do it in the challenge definition

#

you might be able to do it by patching the part that bans the cards and the part that shows them on the menu

rigid solar
#

mr_bones welp

#

will check that

#

thanks tho

red flower
#

personally i would patch/hook the part that bans the cards and just write "Non-perishable Jokers are banned" as a custom rule

subtle merlin
#

I feel I've asked this here before but: how can i tell if a card is debuffed?

subtle merlin
#

That should be my last stupid question for now, ty

tight notch
#

this freezes the game upon triggering

red flower
#

i think tag:yep needs to have a function that returns true

#

but i might be wrong

placid star
#

so why doesnt this work...

rotund sable
#

how do i fix this visual bug?
(this is after calling level_up_hand)

daring fern
tight notch
rigid solar
#

it's quite ugly but whatever lol

modern kindle
#

goodness gracious

red flower
mental nacelle
#

@hallow moat

.
.
end```
should iterate through every tag the player has
red flower
tight notch
red flower
#

does it hard crash

mental nacelle
tight notch
#

no it just freezes

red flower
#

try doing it in a context

#

like if context.type == 'immediate' then

placid star
#

does anyone have an idea why my game crashes on hovering the joker?

tight notch
red flower
#

i dont think you need a root in main_end

red flower
placid star
rigid solar
red flower
placid star
#

now its only in a column node

red flower
#

try just

main_end = {
    {
        n = G.UIT.C,
        config = { colour = G.C.RED }
    }
}
tight notch
#

its the function that freezes the game

#

so something here causes a freeze but idk what

wind steppe
#

is there a way to check another mod's config?

#

trying to only have something enabled if talisman is on bignum or higher

normal crest
#

SMODS.Mods.the_other_mod_id.config

placid star
normal crest
#

the blue ones right after main_end

wind steppe
normal crest
#

idk what talisman's config looks like

placid star
normal crest
keen atlas
#

G.TIMERS.n_round is a thing?

normal crest
#

I was basing it off what N sent but i'm not sure anymore

placid star
red flower
#

no it is missing a bracket

placid star
#

where abts?

red flower
#

wrapping the whole thing

placid star
#

i think i already tested that

red flower
#

and what does it do

placid star
#

well no crash, but no visible output other than a blank line

#

so im assuming the row node works but the others dont?

red flower
#

try giving the first text node a color

tight notch
#

ok so it's a video encoding issue it seems

pallid sleet
#

How does retriggering cards of a specific suit work?

placid star
red flower
#

im looking at my main_end code and its the exact same format but with a C node instead of an R node

vast bough
#

how would i go about levelling up a random hand/ a specific hand. is there any good jokers i could look at that do this or is it just simple

placid star
red flower
#

oh, this made me notice that my main_end code breaks with multiboxes :p

placid star
red flower
#

no, it works for me with your format

#

it's just that my text was supposed to be in the second box but main_end works in the first

#

i didnt test it after switching

vast bough
# red flower burnt joker?

burnt joker levels up hand discarded tho, i was just wondering if there is anything fucky i have to do to level up specific/random hands or if its straightforward

#

you never know with smods (i love smods)

median veldt
#

is there a way to get vscode to stop complaining that SMODS and stuff don't exist

vast bough
keen atlas
red flower
keen atlas
#

im not sure if smods added custom colors

median veldt
#

but i like it there

red flower
normal crest
median veldt
#

and put what in there

keen atlas
normal crest
#

and then set "Lua.workspace.library": ["../smods"]

#

Or whatever your steamodded folder is called

placid star
red flower
#

no, they're in loc_colours

#

it's G.C.FILTER and G.C.UI.TEXT_INACTIVE

placid star
#

shit gotta love balala modding

median veldt
normal crest
#

self:is_suit, not self.is_suit

#

well there's more stuff wrong actually

median veldt
#

right

keen atlas
#

you are meant to do local _is_face = Card.is_face and call it later

median veldt
#

there we go

normal crest
#

when you return you wanna do return _is_face(self, from_boss)

median veldt
#

thanks i was not thinking when i wrote that

#

oh yeah that too

placid star
#

whats the thingy for background colour in node styling :p

median veldt
median veldt
normal crest
#

this is for the one made by sumneko

normal crest
red flower
#

center?

modern kindle
#

you loove centers

red flower
#

i do love centers

median veldt
normal crest
#

nah it'll happen with all

placid star
#

do u happen to know what the defualt border radius of XMult is in joker descriptions?

vast bough
red flower
modern kindle
#

i just watch N and sometimes ill say hi to him

median veldt
#

right so

#

i have smiley to test if it's working

#

and uh

normal crest
median veldt
#

every card is being triggered as a face card

#

regardless of suit

normal crest
#

I figured if I was wrong someone else would be quick to correct me

median veldt
placid star
#

genuienly what the fuck 😭

normal crest
#

lgtm

placid star
#

no, this looks bad to me 😭

normal crest
#

this happens when you don't have the right chain of columns and rows

#

can you send what it looks like rn

#

the code I mean

keen atlas
hasty mist
#

is there a way to increase ante scaling on the fly

#

like how plasma deck does it but mid run

placid star
#

sorry for low res

median veldt
red flower
hasty mist
normal crest
#

the time and the currently text on top of each other?

#

well not on top, but as two lines

placid star
normal crest
#

Yeah so you want your main_end to look like
Column:

  • Row (for the time stuff)
  • Row (for the mult stuff)
#

ew it looks bad here

#

when you want to put stuff inside a row/column that element has to be inside a column/row respectively

placid star
#

so change the top node here to a column?

pallid sleet
#

is "is_suit_hearts" a thing?

#

if not what would it be similar to?

daring fern
pallid sleet
#

hmmmm okay

#

imma try it

#

It works thx!

normal crest
#
main_end = {
    Column {
        Row {
            Column {
                Text "Time = "
            }
            Column {
                Text "some number"
            }
        },
        
        Row {
            Column {
                Text "(Currently"
            }
            Column {
                Text "some number mult)"
            }
        }
    }
}

I think this is the best way I can put it, ignore that this isn't valid lua code (well it could be)

normal crest
#

I'm also not an expert on UI so there probably is a better way

keen atlas
#

thats the best way afaik

idle plaza
red flower
normal crest
#

right it's missing commas

red flower
#

works perfect now thx

normal crest
#

yw

normal crest
#

each table is just an array

idle plaza
#

Oh ok

normal crest
#

fictional UI code to save our sanity

red flower
#

if Column, Row and Text were functions it could work

normal crest
#

Yeah this is how jetpack compose works for Android apps

#

it's in kotlin but it works similarly

keen atlas
#

it kinda looks cleaner too when without config ;>

placid star
#

why are there so many curly brackets

#

im gonna left hook my monitor

normal crest
#

that is the pain of UI

#

one has to deal with it

chrome widget
#

If I ever use lisp, I'll probably go insane

normal crest
red flower
#

idk looks clean tho

keen atlas
#

without config it is

normal crest
#

I literally just did the same thing

local function create_element(type, data)
  local element = {
    n = type,
    config = data.config,
    nodes = {}
  }
  for i, v in ipairs(data) do
    element.nodes[i] = v
  end
  return element
end

function Column(data)
  return create_element(G.UIT.C, data)
end

function Row(data)
  return create_element(G.UIT.R, data)
end

function Text(data)
  return {
    n = G.UIT.T,
    config = type(data) == "table" and data or {
      text = data,
      colour = G.C.WHITE
    }
  }
end
red flower
#

lol

chrome widget
#

Even with config it's probs cleaner overall

keen atlas
#

are we going to invent a new way to define ui now lol

red flower
#

i mean thats what i do in jokerdisplay

gusty iron
#

how would i debuff cards with a joker?

normal crest
red flower
gusty iron
#

and how would i get the table containing all cards held in hand?

gusty iron
#
if context.before then
SMODS.debuff_card(pseudorandom_element(G.hand.cards, pseudoseed("ok")))
end

    if context.joker_main then
      return {
            xmult = 3
        }
    end
end

}

this crashes the game for some reason, any help?

normal crest
#

debuff_card takes more than one parameter

gusty iron
#

ohhh

normal crest
#

card, bool, string iirc

daring fern
fallow breach
#

does anyone know the keyword for context.other_card for debuffed cards

daring fern
fallow breach
#

so how would i go about making a joker do something when a debuffed card is scored

#

or, well, "scored"

red flower
#

you would need to loop through each card in context.full_hand and check if it is debuffed

#

like this

fallow breach
red flower
#

_ goes there

fallow breach
#

it's a chip scaling joker that scales when a debuffed card is scored

#

what does the underscore mean

red flower
#

the value is unused

#

it's the index of the card in the array

red flower
fallow breach
#

ok

red flower
#

oh also context.cardarea == G.play is not what you want

#

that will trigger in a lot of contexts

#

use context.before or context.joker_main

gusty iron
#

how do i check when a certain consumable has been used?

fallow breach
red flower
#

do you want it after?

fallow breach
#

i want it to upgrade when the debuff card goes off like with wee joker

red flower
#

oh thats hard because they dont get passed to the individual contexts

fallow breach
#

damn..

gusty iron
#

saturn's key is c_saturn right

red flower
#

yeah

sour garden
fallow breach
#

hmm let me see

red flower
#

maybe cryptid or something adds it

#

but it's not a regular thing

sour garden
#

it's from the undertale mod, i just remembered that a joker i had did something with debuffed cards

red flower
#

then they would also need the hook or patch that adds that

carmine burrow
#

juice_card_until
look inside
juice card while

wooden nexus
#

Remind me how to check if i have a joker in my collection?

#

like if i had bought a joker?

fallow breach
#

i kept the context.cardarea == G.play function and it sorta worked

#

but it only upgraded the corresponding amount of times after the hand was scored

#

not when each individual card scored

red flower
#

well i would check how the undertale mod does it

sour garden
#

i'm trying to find a definition for it but it seems like it's just calling steammodded

#

let me copy this joker code and see if i can run it independantly of the ut mod

#

hmm okay it doesn't work independant of the ut mod

hallow moat
mental nacelle
#

i mean, what exactly are you trying to do

hallow moat
#

Gain a comical amount of double tags via the infinite money loop with perkeo and count how many double tags I have

#

I have minimal coding/modding knowledge, I was just referred to the modding chat for an answer to my question

gusty iron
#

this might seem like an odd question butlike

#

how do i return the music volume via code

violet gulch
sullen brook
#

Ok, so had to set this down for a while today, but can anyone tell me why, when I discard with this deck, it destroys the cards, then crashes with this error when anything is played?
functions/state_events.lua:766: attempt to perform arithmetic on global 'hand_chips' (a boolean value)

code inside the deck:

calculate = function(self, back, context)
        --Checks if end of round, and the round was a showdown boss
            --context.main.eval prevents context.end_of_round from triggering repeatedly.
            --unknown why this is, Balatro be Balatro?
        if context.end_of_round and context.main.eval and G.GAME.blind.config.blind.boss.showdown
        then
            --For each card in the deck...
            for index, value in ipairs (G.playing_cards) do
                --...if it is a seven...
                if value:get_id() == 7 then
                    --...increment count variable.
                    tally_sevens = tally_sevens+1
                end
            end
            --If count variable is anything but zero, end the game in a loss.
            if tally_sevens >= 1 then
                G.STATE = G.STATES.GAME_OVER
                G.STATE_COMPLETE = false
            elseif tally_sevens == 0 then
                --If count variable is 0, you win.
                G.STATE = G.STATES.GAME_OVER
                G.STATE_COMPLETE = true
            end
        end
    return true
    end
gusty iron
sour garden
sullen brook
#

Not calling any destruction effects anywhere, so I'm very confused

hallow moat
mental nacelle
#

you'd put it into a calculate function

#

or any function really

median veldt
#

are there like
blank templates for various images?
e.g. cards, jokers, decks, blinds, chips, etc etc

#

if not i am going to make them

sullen brook
hallow moat
sullen brook
#

I have a template for spectral, enhance, and cardback. They're in aesprite format, I can export them to PNG if they'd be useful.

mental nacelle
hallow moat
#

ok, so I would have to add/create my own mod to count the double tags?

mental nacelle
#

i suppose you would

hallow moat
#

k

sullen brook
sour garden
#

how do localization files work? do i need to load it from my main.lua, or do i just need to have it in ./localization/en-us.lua
so far i have this and it's not workin

red flower
#

you just need to have it there but jokers go in descriptions.Joker, not just Joker

sullen brook
frigid cargo
#
if context.setting_blind then
            local card = create_card(nil, G.consumeables, nil, nil, nil, nil, 'c_lovers', 'NaturesTouch', false, "e_negative")
            card:add_to_deck()
            G.consumeables:emplace(card)
        end

why doesnt it generate negative lovers?

rotund sable
#

why does this say nil in nil?

unborn bay
#

smods bug

red flower
#

sorry i mean descriptions = { Joker = {

sullen brook
ember cedar
#

any reason why this doesnt error out for the edition, but does for the enhancement? ('attempt to index local "center"')

red flower
#

poll_enhancement takes a single table

#

also that's not how you use SMODS.has_enhancement

ember cedar
red flower
#

it would be if not next(SMODS.get_enhancements(v))

ember cedar
#

i keep forgetting the next() grief

#

ty ty

red flower
#

the problem is not the next necessarily, has_enhancement checks for a specific enhancement

#

you need get_enhancements to check for any

ember cedar
#

ah, makes sense

frigid cargo
red flower
sullen brook
#

So, is there a place (either in source code or compiled online somewhere) where all the G.GAME.<x> , G.STATE.<x>, etc objects are? Are these vanilla references or is this something Steamodded created?

#

After typing that out, I realize it may not be that simple...

wooden nexus
#

How to i implement exponential mult and chips with Talisman?

daring fern
wooden nexus
#

ok

median veldt
#

do y'all think this is good

#

should i make the s coloured too

unborn bay
#

make the s colored

median veldt
#

yea ok

vocal bramble
#

Yeah

#

How could I check the seal of a playing card? Cause I think my current method of using card:get_seal() isn't working

median veldt
#

yeah uh there's very clearly something wrong with what I'm doing but I have no idea

#

was just modifying vanillaremade's strength

keen atlas
#

highlighted is an array

fallow breach
#

when playing a debuffed hand it says "table expected, got nil" for the ipair thingy

wild escarp
#

Anyone know why this doesn't draw if the joker has an edition? (excluding foil)

draw = function(self, card, layer)
    if card.config.center.discovered then
        if (layer == 'card' or layer == 'both') and card.sprite_facing == 'front' then
            local scale_mod = 0.05 + 0.05 * math.sin(1.8 * G.TIMERS.REAL) +
                0.07 * math.sin((G.TIMERS.REAL - math.floor(G.TIMERS.REAL)) * math.pi * 14) *
                (1 - (G.TIMERS.REAL - math.floor(G.TIMERS.REAL))) ^ 3
            local rotate_mod = 0.1 * math.sin(1.219 * G.TIMERS.REAL) +
                0.07 * math.sin((G.TIMERS.REAL) * math.pi * 5) * (1 - (G.TIMERS.REAL - math.floor(G.TIMERS.REAL))) ^ 2

            local image = Sprite(0, 0, 71, 95, G.ASSET_ATLAS["willatro_WillatroOrgans"], {x = 1, y = 0})
            image.role.draw_major = card
            image:draw_shader('dissolve', 0, nil, nil, card.children.center, scale_mod, rotate_mod, nil,
                0.1 + 0.03 * math.sin(1.8 * G.TIMERS.REAL), nil, 0.6)
            image:draw_shader('dissolve', nil, nil, nil, card.children.center, scale_mod, rotate_mod)
        end
    end
end
daring fern
median veldt
#

well that only does the second card you're highlighting

#

nevermind

daring fern
median veldt
#

thank you

#

it works

#

except for the fact that i can use the card when no cards are selected

#

wait i think i know the solution

frigid cargo
#
 if SMODS.has_enhancement(card, "m_wild") and next(SMODS.find_card('j_batrocities_NaturesTouch')) then 
            return {
                SMODS.debuff_card(card, 'prevent_debuff', 'debuff_WildCard')
            }
        end

is this code right? i want to make wild cards not get debuffed, i also dont know where to put this

median veldt
#

yea ok i just had to #G.hand.highlighted <= 0 since G.hand.highlighted always exists

fallow breach
#

because as is, the joker doesn't give its chips until the next hand played, and it just visually isn't as nice

daring fern
fallow breach
#

how so

iron burrow
frigid cargo
median veldt
#

doesn't wee joker upgrade when scored and not actually add the chips whenever its scored

fallow breach
#

it adds the chips you accumulated at the end of the hand is what i meant

frigid cargo
daring fern
# frigid cargo what did i do wrong?
SMODS.current_mod.set_debuff = function(card)
    if SMODS.has_enhancement(card, "m_wild") and next(SMODS.find_card('j_batrocities_NaturesTouch')) then
        return "prevent_debuff"
    end
end
ember cedar
#

got the enhancement additions to work, but this appears to also overwrite cards with current enhancements, any suggestions?

ember cedar
#

if a card does not have an enhancement, there is a 1/10 chance to add one at random when played and before scoring

daring fern
ember cedar
daring fern
#

The true means it wont include the main enhancement.

ember cedar
#

would that not include the 'base' enhancement though (aka no enhancement)?

daring fern
ember cedar
#

i thought extra_only would ignore cards without enhancement, mb

normal crest
#

SMODS has this feature called quantum enhancements that allow a card to have more than one enhancement, which is what extra_only presumably refers to

ember cedar
#

oh neat!

#

did not know that, ty ty ty noted

vocal bramble
rapid stag
#

bump

fallow breach
#

@red flower i've been using this code and i notice that the joker will give extra chips for the played non-debuffed cards too, overall it's all just super buggy and weird. i tried using context.before instead of context.cardarea and that didn't work either

#

i'm in way over my head for this one but i think i have some ideas to rework it that could be viable?

sonic cedar
#

what does card represent when it comes to level_up_hand?

chrome widget
#

whatever card is calling the function, because it juices the card for the level up effect (like with Burnt and Space Jokers)

sonic cedar
#

oh so would i just put the key of the card or just card

daring fern
sonic cedar
#

right

#

ok with all that in mind this should work then right

sonic cedar
#

am i close at least

gilded blaze
#

that wouldn't work

sonic cedar
#

so ive heard 😭

gilded blaze
#

context.scoring_hand contains cards that will score

#

not poker hands

sonic cedar
#

...im thinking of poker_hands arent i

gilded blaze
#

look up Card Sharp code in Vanilla Remade

sonic cedar
#

i forgot about card sharp what am i doing

#

NAME

#

scoring name

#

thanks guys

frigid cargo
rapid stag
#

updating steamodded didn't fix it.

rapid stag
#

moving the stuff in the return table's func to before it and removing the func made the stuff in the func work, but not the message. so there's something weird going on with the game not liking wanting to do anything with my joker's return table

gilded blaze
#

uh

#

why is to_big everywhere

#

putting to_big in probability roll is probably one of the most hilarious things I've seen here

#

the pinnacle of Talisman compat

rapid stag
gilded blaze
#

some stuff remain unchanged

#

also to_big is mainly used for comparisons

#

afaik

rapid stag
#

okay cirBox

so how do i solve what i'm asking about

median veldt
#

...what

the shader itself is called "uh" btw

rapid stag
#

mod prefix?

normal crest
median veldt
#

very thrown together i dont raelly know how shaders work but idk

#

i stole from polychrome shader

median veldt
#

nowhere else
just the key

frigid cargo
rapid stag
#

game just crashes whenever i try to open my deck.

started fresh run, clicked deck, immediate crash. what?

viral ember
median veldt
#

yeaa i learned that just now

viral ember
#

took me a while to realize it lol

median veldt
#

can i use debugplus to add an edition to a joker?

median veldt
#

how

daring fern
timid parrot
frigid cargo
#
calculate = function(self, card, context)
        if context.individual and context.cardarea == G.play and not context.other_card.debuff and not context.end_of_round and
        SMODS.has_enhancement(context.other_card, 'm_wild') then
            return {
                xmult = card.ability.extra.xmult,
                card = context.other_card
            }
        end
        if context.setting_blind then
            SMODS.add_card{key = 'c_lovers', edition = 'e_negative'}
        end
    end
SMODS.current_mod.set_debuff = function(card)
      if SMODS.has_enhancement(card, "m_wild") and next(SMODS.find_card('j_batrocities_NaturesTouch')) then
          return "prevent_debuff"
      end
  end

My debuffing aint working, idk if i missed anything. The first code is the joker calculation, the second is the debuff function in a separate functions file. Can anyone check if im missing something?

sonic cedar
#

how can i have a joker modify the shop to the extent of replacing wares in it? i'd look at vremade showman but :those_who_know:

daring fern
sonic cedar
#

-# also maybe take out the next ?

#

(to see if it reaches)

gilded blaze
#

mod prefixes aren't supposed to be that long

#

consider shortening it down to a few characters, taking the first letter in each syllable

frigid cargo
#

maybe i could do that

gilded blaze
#

yours could be btct

frigid cargo
frigid cargo
frigid cargo
frigid perch
#

How would I go about replacing the Ace in the center of the Title screen with a different card?

#

I managed to get one spawned in, but it appears next to it, rather than replaces

faint yacht
#

You could probably just override the base card by doing set_ability on it.

#

Or remove said card and then spawn & emplace yours.

frigid perch
#
Game.main_menu = function(change_context)

    local ret = mainmenuref2(change_context)

    local newcard = SMODS.create_card({key='j_chicot',area = G.title_top})
    G.title_top.T.w = G.title_top.T.w * 1.7675
    G.title_top.T.x = G.title_top.T.x - 0.8
    G.title_top:emplace(newcard)
    newcard:start_materialize()
    newcard:resize(1.1 * 1.2)
    newcard.no_ui = true
    return ret
end```
#

I have this rn

orchid thunder
#

how od i use SMODS.blueprint_effect on more than 1 joker with 1 card

hallow forge
#

i don't think that's possible

#

it might be tho

gilded blaze
#

use SMODS.blueprint_effect on each card

orchid thunder
#

i tried

gilded blaze
#

store the return tables somewhere

daring fern
gilded blaze
#

then combine them all with SMODS.merge_effects

#

gosh I hate typing on phone

hallow forge
#

oh that's a thing

#

didn't know that

gilded blaze
#

it's in latest release

hallow forge
#

i'll be sure to not use it

gilded blaze
#

same lmao

#

JokerDisplay was never meant to deal with mass-blueprint effects

faint yacht
hallow forge
#

joker that copies all jokers that don't copy themselves when

gilded blaze
#

so I gave up and let Cheshire Cat copy joker to the left instead of adjacent

gilded blaze
#

Pokermon already removes it

faint yacht
#

-# noted.

orchid thunder
#

um wut

faint yacht
#

Though, to be fair, I originally wanted to also add a card to the main menu... but I decided against it. Instead, I just added an extra sound to the first load. 🍞

gilded blaze
#

damn

orchid thunder
hallow forge
#

what's this for?

gilded blaze
#

copying up to 3 jokers to the right

orchid thunder
#

^^^^^

#

basicly a better blueprint

hallow forge
#

make sure the blueprint_effect isn't nil

#

as passing nil as the 2nd argument is the same as only passing 1 argument

orchid thunder
#

(blueprint_effect(...) or nil)?

gilded blaze
#

table.insert(effects, SMODS.blueprint_effect(card, other_joker, context) or {})

hallow forge
#

why not?

gilded blaze
#

huh

daring fern
gilded blaze
#

oh, that

hallow forge
#

oh yeah

#

repetition is special

gilded blaze
#

it shows a warning, gives no repetition, then moves on

hallow forge
#

well SMG, you can just copy the code from that joker in the mod that we are working on

gilded blaze
#

I'd still admit it's annoying

hallow forge
#

since it does multi-copying

orchid thunder
#

oh fair

hallow forge
#

it's lovely patching 🎉

orchid thunder
#

oh great

celest aspen
#

This probably isn't possible, but. . . is there a way to retrigger jokers whos 1 in x chance effect didn't activate? Essentially giving them a second chance or a re-roll?

polar vale
#

guys i need help, it keeps crashing and shows a message saying function/state_events.lua:136 what can i do?? Edit: im modding cryptid

drowsy heath
#

How do I define in context that a round was beaten in 1 hand

maiden phoenix
drowsy heath
#

I was doing it if context.end_of_round and context.hands_played == 1 then

maiden phoenix
#

hands_played doesn't exist in any context

drowsy heath
#

Oh well thats where i went wrong

next timber
#

how do i make text that changes like in misprint's description? i know misprint sets a main_start variable but i cant figure out how to translate that to smods loc_vars format

drowsy heath
maiden phoenix
#

to avoid the repeated end_of_round call? Try context.main_eval instead I think

drowsy heath
#

Its just because my joker isn't doing anything now at all....

maiden phoenix
maiden phoenix
drowsy heath
#

thats the full joker

next timber
maiden phoenix
# drowsy heath

joker_main and end_of_round doesn't exist at the same time so it can never be true

next timber
#

oh ok cool

drowsy heath
maiden phoenix
#

You can split your conditions

if context.end_of_round ....
end

if context.joker_main ...
end
drowsy heath
#

idk why i dint think of that mb aha

#

okay i dk why its giving mult per card left held in hand

next timber
#

how do you give dynatext the red box that appears around xmult? i know its colour = G.C.WHITE for the text but idk what the value i need to set is for the outer box

primal robin
#

Development resumes right after cup of tea trash

red flower
#

also don't return inside the loop

tepid egret
#

quick question, is it possible to save files to the game directory (where the .exe is stored)?

red flower
#

why

red flower
next timber
#

thats G.UIT.C, right

red flower
#

yes

drowsy heath
#

this is supposed to give +5 mult if first hand beats the round but instead its giving +5 then +10 per card held in hand so i end up with +35 mult and idk why

#

??

gilded blaze
#

context.end_of_round and content.main_eval and ...

drowsy heath
#

thank you

#

ik its litterally opposing the thing i just asked but the bug also inspired another oker which gains mult per card held in hand at the end of the round how would i use the same code to do such

hushed field
drowsy heath
#

it scored the +5 mult for it being one hand which was the original idea but it started scoring +10 on each card held in hand at the end of the round aswell, i just wanted the +5 for each card held in hand for a seperate joker

#

i still want the if hands played =1 tho

hushed field
#

if context.individual and context.cardarea == G.hand and not context.end_of_round then will trigger each card held in hand, but won't give score during the end of the round

drowsy heath
#

i want it to do what wee joker does but instead its any card left held in hand after winning the round

#

what your saying its triggering the cards instead but i want the value to stay on the joker

#

also wouldnt my seperate context :

     return {
       mult = card.ability.extra.mult
   }
end ``` 
give me the score at the end of the round
hushed field
#

Ah, okay, yeah, I misunderstood ya

gilded blaze
#

context.joker_main doesn't happen at end of round

drowsy heath
hushed field
#

joker_main is indeed the one you use to give the score when the joekr gets triggered

drowsy heath
hushed field
#

You'd use if context.individual and context.cardarea == G.hand and context.end_of_round then to increment the mult at the end of the round. So almost your code, except you also need to check for context.individual

drowsy heath
#

so that would be if hand is beaten in 1 or do i still need the G.GAME.current_round.hands_played == 1

hushed field
#

yeah, you'll want to add that as an additional condition in the if statement

drowsy heath
#

okok thank you

next timber
#

how can i make a joker do something when it's clicked on?

#

oh i can prolyl check yahimod again

#

theres the el wiwi right

gilded blaze
#

hook Card:click() and add your own context

#
local card_click_ref = Card.click
function Card:click()
    card_click_ref(self)
    if self.area and self.area == G.jokers then
        SMODS.calculate_context({modprefix_click = true})
    end
end
next timber
gilded blaze
#

you can just specify anything, modprefix is only there to separate your context from other mods

next timber
#

cryptid context??

gilded blaze
#

Cryptid's cry_press is a different story

#

you want a joker that does something when it's clicked on

#

cry_press happens on every click regardless of where you click

next timber
gilded blaze
#

no need

#

Card:click() refers to itself already

#

you're hooking a metamethod of a class

next timber
#

i thought SMODS.calculate_context would like. broadcast a context check to every joker, is that not the case?

gilded blaze
#

again, you're hooking Card:click(), which refers to itself
meaning when a card is clicked on, only its Card:click() is called

gilded blaze
#

oh

next timber
#

lol

gilded blaze
#

yea I forgor 💀

red flower
#

that's just checking for a card in the joker area being clicked

gilded blaze
#
local card_click_ref = Card.click
function Card:click()
    card_click_ref(self)
    if self.area and self.area == G.jokers and self.config.center_key == "j_modprefix_key" then
        SMODS.calculate_context({modprefix_click = true})
    end
end
red flower
#

that works but no reason to make it so specific imo

next timber
#

i imagine i can just do SMODS.calculate_context({rend_clicked = true, card_clicked = self}) and then check context.card_clicked == card in the joker's calculate?

gilded blaze
#

yea

drowsy heath
#

i hate to keep coming back but i am getting 0 hands from this when the blind starts

#

like i have 0 hands

gilded blaze
#

1 == true

drowsy heath
#

thats what it says but what about it ???

red flower
drowsy heath
#

oh

gilded blaze
#

that's what I said

drowsy heath
#

that isnt supposed to be there

red flower
#

i also don't know what 1==true is

gilded blaze
#

1 == true does nothing

#

it's just false

drowsy heath
#

idk it was the structure of burglar joker

#

thats what i used and it had it there

gilded blaze
#

ease_hands_played(-G.GAME.current_round.hands_left+1)

#

-hands first to set hand count to 0, then add your amount

drowsy heath
#

thank you

#

if i were to own 2 coppies it sets it to -2 now

#

which is another issue

#

is there a way to say if hands = 1 then dont do this

gilded blaze
#

so it's -2

#

can you still play a hand

#

iirc yes

#

as far as I'm aware, hand count may go below 0 when using ease_hands_played
but you can only play 1 hand at most

drowsy heath
#

it wouldnt work with acrobat and such

distant rock
#

why does it say error?

hushed field
primal robin
#

Is there an easy way to add a hover popup which looks like card's info but without Steamodded? My previous implementations was bad actually

drowsy heath
#

cant i do something like saying if hands are more than 1 in the context

next timber
red flower
gilded blaze
drowsy heath
red flower
#

no it's fine im just not on my pc

distant rock
#

ah thank you

drowsy heath
#

well i messed up somewhere i find it really funny tho

next timber
#

yeah wtf

#

my hooks arent hooking

gilded blaze
#

Card:click() doesn't return

next timber
#

other mods might add smth so better safe than sorry

#

ohhhh its looking for my hooks file in my objects folder

#

its not in the objects folder

gilded blaze
#

bruh

next timber
#

so thats why the menu card hasnt been showing up

hushed field
#

Im trying to set up a seal to act on context.post_trigger, but I don't think it actually ever checks that context for seals. Checking the code, I'm not sure how I'd actually set that up to add it, though

floral narwhal
#

whats problem? it does nothing

red flower
#

context.card doesnt exist in context.individual

#

it's context.other_card

drowsy heath
#

Is there a way to define above or below a number like if something is more than 1 or less than 1

red flower
#

> or <

drowsy heath
#

Ok thank you

floral narwhal
drowsy heath
#

How would I get the game to work out how far it is from said number it is less than and make it = to that number

faint yacht
#

math.abs(num1-num2)

tight hull
#

Hello, I made this work! but for now it says disable but enables the skin. Is there a way for the toggle to be automatically ON when the game is opened (until the user turns it off by himself?)

primal robin
tired kestrel
red flower
tight hull
#

thnx

drowsy heath
#

would this not work for if the hands went below 1 to set them to one ? main focus is lines 28 to 33

#

yes i will format calm down just not rn

#

i even tried adding context.setting_blind idk why i thought that would work

floral narwhal
#

now it says +nil

tight hull
red flower
floral narwhal
#

thanks it works

primal robin
drowsy heath
#

okay so things changed and why is my last thing not working it should see that 0 is less than 1 and give the +1 right ?

#

i want that to work so i can then say if it is still less than 1 then give more until = 1

#

in a nutshell

gilded blaze
#

you just need ease_hands_played(1)

#

why are you passing a comparison as an argument

distant rock
#

It's still not showing anything

gilded blaze
#

hmm, I can't find anything wrong here

#

is the mod prefix correct?

distant rock
#

yes it is

gilded blaze
#

other than that, there's nothing wrong

#

💀

teal ferry
#

hello. anyone knows how to prevent a joker from getting spawned by tarot cards and appearing in the shop

gilded blaze
#

add this field to your joker object

in_pool = function(self, args)
    return false
end
teal ferry
#

and what does the yes_pool_flag thing do

gilded blaze
#

wiki has it explained

#

in_pool allows for more complex restrictions

gilded blaze
teal ferry
#

okay thank you so much

#

i got one joker not spawning until a condition and it worked with pool flags but somehow other didnt. i didnt know that there was in pool thing

gilded blaze
teal ferry
#

the cavendish and gross michel examples right

gilded blaze
#

this has in-depth explanation about how Gros Michel and Cavendish work

#

yea

teal ferry
#

i did but didnt work somehow. maybe i wasnt carefull enough

gilded blaze
#

it should work

teal ferry
#

got it . thanks

gilded blaze
#

in most cases, use in_pool

teal ferry
#

in the example gros_michel it only defines G.GAME.pool_flags.gros_michel_extinct2 = true when gros_michel went extinct and not before anywhere. how code knows that if this pool flag was false. does being not defined means false ?

gray void
#

Whats the context to see if a scored glass card getting shattered

red flower
gray void
red flower
#

in context.remove_playing_cards check if any of the cards in context.removed has card.glass_trigger

gray void
#

Okay, thanks

hushed field
#

I'm trying to make a Seal trigger on context.post_trigger, while in hand. Checking the calculate_context that post_trigger is called on, it should check playing card areas like G.hand, but there's no post_trigger context that the seal ever interacts with 😕

ancient mango
#

what does this error mean??? ive been trying to fix it for like 2 hours:
[SMODS _ "src/game_object.lua"]:408: Failed to collect file data for Atlas SSM_SpiderSushiMod

hushed field
ancient mango
hushed field
# ancient mango ?

how is your atlas set up in the code, and do you have it properly named in both the asests/x1 and assets/x2 folder?

ancient mango
#

oh, they were named 1x and 2x

#

tand not x1 and x2

#

i am stupid

hushed field
#

nope, my bad, they should be 1x and 2x

ancient mango
#

yea nvm