#💻・modding-dev

1 messages · Page 399 of 1

hasty mist
#

are there any examples of usage of blueprint_effect anywhere?

sonic cedar
#

does blueprint work

hasty mist
sturdy compass
#

VanillaRemade probably

sturdy compass
#

I was trying to pull that up myself lol

hasty mist
#

tysm

keen loom
#

ok, i think i got the solution?

sonic cedar
#

real?

sonic cedar
sturdy compass
#

Speaking of VR I just sent a PR for challenges for it today

sturdy compass
keen loom
sonic cedar
#

no idea if that will work but try it

sage crater
#

how do you set up a function in an enhancement to change a variable?

keen loom
sonic cedar
#

oh well W

manic rune
sonic cedar
#

BEPIS

manic rune
#

hii

thorn furnace
#

what's the new key here?

manic rune
#

key pointing to the new description in localization file

thorn furnace
#

o

sonic cedar
thorn furnace
#

yea

sage crater
sonic cedar
manic rune
#

hook to set_ability, probably

thorn furnace
sage crater
sage crater
manic rune
#

oh

#

is this only for an enhancement that ur making, or all enhancements?

hasty mist
#

i love code optimization

sage crater
#

an enhancement I'm making

sonic cedar
#

oh nvm then

sonic cedar
hasty mist
#

holy fuck this used to be so bloated

sonic cedar
#

what the peak

#

i lied what is wrong with you

hasty mist
gilded forge
#

Hi, does anyone happen to have the assets for the playable cards? I searched the example mods and didn't find anything.

hasty mist
#

the before image is code mostly copied from old blueprint

hasty mist
#

which was coded before blueprint_effect was a thing

scarlet imp
manic rune
scarlet imp
# scarlet imp all Balatro assets and source code can be easily accessed using a file archiving...

https://twitch.tv/autmchiu
https://www.patreon.com/autmchiu

I'm a nonbinary-ish trans woman with kind of an androgynous voice. I'm not going to waste my precious time tracking down everyone who misgenders me, but if you care, i use she/they pronouns and prefer feminine-coded language where applicable (and also thank you ❤)

inspired by this...

▶ Play video
sage crater
manic rune
#

oh no, you dont need hooks

sage crater
#

ah ok

manic rune
#

you only need them if you want to use setLevel with all enhancements

sage crater
#

got it

tawdry shale
#

i tried this but now the mult value isn't updating

manic rune
#

put samehand out of events

gilded forge
strange wasp
#

I have put my mods folder in vsc. But it's still underlines some smods documentation

sonic cedar
#

oooOOOoooo you wanna set up a luarc json so baaad oooOOOooOOooo

sage crater
#

what's the difference between object.thing and object:thing

burnt quartz
#

Hi, I'm new trying to do a mod. Can someone tell me How I debug my mod?
I mean, I made a Joker mod, Should I beggin a New game until get my Joker? I don't think so, right?

manic rune
#

debugplus

sage crater
#

will the chips = math.floor(pseudorandom("fish") * 10), line work?

strange wasp
sonic cedar
burnt quartz
manic rune
sage crater
#

or 0 to 10. Whatever it ends up coming out as lol

manic rune
#

pseudorandom("fish", 1, 10)

#

use this instead

#

oh, 0 to 10

#

yeah that

sage crater
#

actually it should be 1,10 since I remembered a mechanic that's coming later

manic rune
#

it returns a whole number from 0 to 10

strange wasp
#

Once you're in Balatro press the tab button.

manic rune
#

its hold actually, but yeah

burnt quartz
hasty mist
#

is there any way to target two jokers at once with blueprint_effect

strange wasp
manic rune
thorn furnace
sage crater
#

happens

sonic cedar
#

i did that the first time

#

send code

thorn furnace
#

oki

burnt quartz
manic rune
#

you want to put that in SMODS.calculate_effect

thorn furnace
# sonic cedar send code
key = 'stand_starPlatinum',
    j_jojo_starPlatinum = {
        name = 'Star Platinum',
        text = {
            "{C:mult}+#1# {}Mult when played hand is the same as most played hand",
            "{C:inactive}This Stand appears to have more potential hidden deep within...{}"
        }
    },
    j_jojo_starPlatinum_theWorld = {
        name = 'Star Platinum : The World',
        text = {
            "{C:mult}+#1# {}Mult when played hand is the same as most played hand",
            "{C:inactive}\"So, The World is the same type of Stand as Star Platinum...\"{}"
        }
    },
    
    config = {extra = {mult = 12, time_chips = 0, time_mult = 0, new_key = "j_jojo_stand_starPlatinum_theWorld"}},
    
    loc_vars = function(self, info_queue, card)
        return {vars = {card.ability.extra.mult, card.ability.extra.time_chips, card.ability.extra.time_mult, card.ability.extra.new_key}}
    end,

-- [...]

generate_ui = function(self, info_queue, card, desc_nodes, specific_vars, full_UI_table)
        full_UI_table.name = localize {type = 'name', set = "Joker", key = card.ability and card.ability.extra.new_key or "j_jojo_starPlatinum", nodes = {} }
        SMODS.Center.generate_ui(self, info_queue, card, desc_nodes, specific_vars, full_UI_table)
    end,
    add_to_deck = function(self, card, from_debuff)
        card.ability.extra.new_key = "j_jojo_stand_starPlatinum_theWorld"
    end,

meow

keen loom
#

ok, new problem. the game crashes if i view the card in collection when outside the game

        local count = 0
        for i = 1, #G.jokers.cards do
            if (G.jokers.cards[i].config.center.rarity == "CR_common") and (G.jokers.cards[i] ~= card) then
                count = count + 1
            end
        end
        return { vars = { card.ability.extra.mult, card.ability.extra.mult + (card.ability.extra.bonus * count) } }
    end,```
manic rune
#

G.jokers doesn't exist outside a run

thorn furnace
#

wdym

sonic cedar
#

you gotta put the localization stuff in localization,,

thorn furnace
#

i thought u said put the stuff behind the calculate function :<

burnt quartz
#

How I can add the text (Currently <count> mult) ?

sonic cedar
thorn furnace
#

o

#

so i put them in loc_txt?

tawdry shale
keen loom
shut crater
sonic cedar
thorn furnace
#

o

sonic cedar
#

which will go in a localization folder

thorn furnace
#

i might need to rewrite my metadata for that one

shut crater
sonic cedar
#

it is in fact separate

thorn furnace
#

o i thought u wouldve needed to link the file

shut crater
sonic cedar
#

metadata is autoloaded, so is localization if it's in the folder

shut crater
placid star
sonic cedar
placid star
thorn furnace
sonic cedar
#

or the

#

dynamic desc

placid star
sonic cedar
#

got you

sonic cedar
scarlet imp
# burnt quartz How I can add the text (Currently <count> mult) ?

inside of loc_vars, the order you put arguments in can tell the game what to display in the description.
so Vampire's loc_vars looks like this:

loc_vars = function(self, info_queue, card)
  return {
    vars = {
      card.ability.extra.mult_gain,
      card.ability.extra.Xmult
    }
  }
end

or something similar, and the description is written like this:

loc_txt = {
  name = "Vampire",
  text = {
    "This Joker gains {X:red,C:white}X##1#{} Mult",
    "per scoring {C:attention}Enhanced card{} played,",
    "removes card {C:attention}Enhancement",
    "{C:inactive}(Currently {}{X:red,C:white}X#2#{}{C:inactive} Mult)"
  }
}
placid star
scarlet imp
#
if context.setting_blind and not context.blueprint and context.blind_boss then
    local value = psuedorandom("flies")
    if value < G.GAME.probabilities.normal / card.ability.extra.odds then
        return {
            func = function()
                G.E_MANAGER:add_event(Event({
                    func = function()
                        G.E_MANAGER:add_event(Event({
                            func = function()
                                G.GAME.blind:disable()
                                play_sound("timpani")
                                delay(0.4)
                                return true
                            end
                        }))
                        SMODS.calculate_effect({ message = localize("ph_boss_disabled")}, card)
                        return true
                    end
                }))
            end
        }
    end
end

trying to disable boss blinds like this but it doesn't work, even with tons of copies of Oops

sonic cedar
shut crater
scarlet imp
#

that's some tech

scarlet imp
burnt quartz
#

inside of loc_vars, the order you put

shut crater
shut crater
scarlet imp
sonic cedar
#

you spelled pseudo wrong

scarlet imp
#

bruh

#

thanks lmao

wheat jewel
#

tryna understand and make the jimball animation code work for a joker spritesheet but it keeps stretching some frames and doesn't loop through the whole thing even when changing values around

scarlet imp
sonic cedar
#

you also did it in reverse i think lmao

scarlet imp
#

if I obtain the card mid-blind it works, so that's not the code I have wrong

sonic cedar
#

wait wdym works

scarlet imp
#

the boss blind gets disabled if I obtain the joker mid-blind

#

I have an add_to_deck that works the same as the calculate, and it works there

sonic cedar
#

maybe you're just unlucky

#

try setting the probability to max

scarlet imp
#

I have the or true, the line just isn't being reached smh

sonic cedar
#

oh yeah the or true lmao

#

i have mine in reverse and it works

#

(top line and if statement)

scarlet imp
shut crater
scarlet imp
#

yeah I'll try that

sonic cedar
#

if that doesnt work try swapping them

shut crater
sonic cedar
#

me neither

#

but it worked

shut crater
#

But the probability code isn't where the error is, because the probability code isn't being reached

sonic cedar
#

why isnt my vsc loading

#

ok phew

scarlet imp
#

@sonic cedar isaac enjoyer?

sonic cedar
scarlet imp
#

w

sonic cedar
#

how do you fumble twice

scarlet imp
#

shut up lol

sonic cedar
#

you need nitro pal

scarlet imp
#

I never use emotes

#

ahhhh

#

don't got that

sonic cedar
#

i could tell

scarlet imp
#

you gonna get Mewgenics when that comes out

sonic cedar
#

ofc

scarlet imp
sonic cedar
#

oh wait you're working with probability duh

tranquil gull
#

i don't have a grasp for the balance of this joker

#

the root mean square is sqrt((a^2 + b^2)/2)

scarlet imp
#

bro that's insane

#

blueprint compatible?

tranquil gull
#

oh it shouldn't be

sonic cedar
scarlet imp
#

but it is right

scarlet imp
sonic cedar
tranquil gull
#

no

solid mesa
#

:c

scarlet imp
#

no fun

tranquil gull
#

the RMS is a type of average

sonic cedar
#

why are people trying to stack averages

lavish lake
#

Dude who uses the Balatro font to code you should use a proper code font like Jetbrains Mono which is way more readable

scarlet imp
#

@sonic cedar I'm making an Isaac mod for the game

tranquil gull
#

RMS(90, 3) is 63, for example

solid mesa
strange wasp
#

I finally figured out how to get things started, but whenever I close VSC and reopen it. It puts any file as a txt. And afterwards I can't continue to code in lua or json.

scarlet imp
#

brooo

scarlet imp
strange wasp
lavish lake
zenith sage
#

does G.GAME.round_resets.free_rerolls exist or does adding to G.GAME.current_round.free_rerolls actually give one per round

placid star
scarlet imp
#

shi it might be private visibility

solid mesa
sonic cedar
placid star
tall wharf
#

bruh

placid star
sonic cedar
#

hi aiko!!

#

im developing catsmirk

sonic cedar
placid star
tall wharf
#

what is this 😭

sonic cedar
#

my eyes

lavish lake
#

Alright I think I'm gonna return to developing mods but I don't know where to start even though I know lua, the basics of modding... but the only thing that is holding me back is the severely limited steamodded wiki

scarlet imp
#

fixed visibility issue

sonic cedar
#

can you fix mine

daring fern
sonic cedar
#

where's your alt description 😭

sonic cedar
solid mesa
scarlet imp
placid star
tall wharf
#

i don't understand why people use the m6x11 font to code

scarlet imp
solid mesa
sonic cedar
sonic cedar
tall wharf
#

i think it looks ass for coding purposes

daring fern
# placid star thematic

You could have something like ```lua
if conditions then
return {key = self.key .. "_alt"}
end

scarlet imp
placid star
placid star
thorn furnace
scarlet imp
#

spoon bender isn't even the worst of it

tall wharf
#

also literally rigged sticker

daring fern
placid star
solid mesa
scarlet imp
#

I mean this one is obviously super unfinished, I haven't even bug tested most of the jokers yet

#

but my Deckception one is finished

solid mesa
#

add greedier

sonic cedar
solid mesa
#

:v

placid star
scarlet imp
thorn furnace
#

Just curious but
How exactly does the generate_ui stuff work
I can't get the name/text change to actually work right and the documentation feels less than it should be

solid mesa
placid star
scarlet imp
#

most balanced Cryptid Joker:

placid star
#

woah woah

#

this isnt a cryptid add on

scarlet imp
#

I know just making a joke

sonic cedar
placid star
thorn furnace
#

if i wanted to change the description text box as well do i just replace 'name' with 'text'

daring fern
#

Is it possible to change a blinds blind size while not in the blind?

placid star
sonic cedar
scarlet imp
#

its great

thorn furnace
sonic cedar
placid star
scarlet imp
#

how rare are these jokers?

placid star
scarlet imp
#

I need them in Ante 1 shop for $4

sonic cedar
placid star
sonic cedar
#

if you wanna do like a whole diff description though try @daring fern 's method

thorn furnace
#

I mean the name doesn't even really have to change
The description was the main thing

sonic cedar
thorn furnace
#

yea

sonic cedar
#

corresponds to this value i have in loc_vars

#

which gives it the ...? when the card is added

scarlet imp
#

any way I could replicate the ability of The Flint in a Joker?

sonic cedar
thorn furnace
scarlet imp
#

base chips and mult get modified

sonic cedar
thorn furnace
scarlet imp
sonic cedar
daring fern
#

How does one make the blinds update what they are supposed to be?

sonic cedar
#

what

scarlet imp
# sonic cedar im coming for you

I only need the chips modification:

name = "The Inner Eye",
text = {
    "Retrigger 3 random",
    "scored cards, base chips",
    "{C:attention}halved",
    "{s:0.8}{C:inactive}\"Triple shot\""
}
thorn furnace
placid star
scarlet imp
thorn furnace
daring fern
daring fern
thorn furnace
#

o that's it?

#

huh

sonic cedar
#

bumping this btw

#

companion message

thorn furnace
#

I'm pretty sure post_trigger doesn't iterate if no jokers iterate? but if it happens just once then you can just ignore that

#

because I believe it also happens when a joker is retriggered

tall wharf
daring fern
thorn furnace
sonic cedar
#

so does that mean if i run it in the main file and set a variable to true if it's triggered that'll work

thorn furnace
#

the first iteration it sets the boolean to false
and then the second and subsequent iterations it's still false so it runs the code

sonic cedar
sonic cedar
plain gazelle
#

(new to balatro modding, aiming to create a normal joker mod)

can someone tell me what do 1x and 2x folders contain?
in a random mod I downloaded they contain multiple pngs with joker textures, but in example mod they contain one png with a spritesheet

daring fern
scarlet imp
sonic cedar
tall wharf
#

i do the same thing as the example mod

plain gazelle
#

so I can put multiple pngs in 1x and 2x but putting a spritesheet there is better

#

got it, thanks

faint urchin
#

If I wanted to make a joker that gains chips anytime you lose money how would I go about that? Do I need to track every context in which you can possibly lose money to see if dollar_buffer is negative?

sonic cedar
#

i have a joker that does the same thing but it's whenever you lose scoring mult

#

youll need a tracker yeah

#

something like this but not this

#

and then youd call it as its own context

daring fern
sonic cedar
#

oh really?

#

(i did not know this)

#

wait isnt that what all blinds use though

#

the chips stay static and the mult chanes

#

changes

sonic cedar
#

i mean it makes sense all blinds are just multiples of the base score so

#

why wouldnt it be mult

daring fern
sonic cedar
#

ohhhhhhhhhhhhhhhh

#

doesnt plasma deck do that actually

daring fern
sonic cedar
#

it changes the ante scaling yeah

#

hmmmm

faint urchin
# sonic cedar

so does mod_mult trigger whenever mult is lost? if not then how did you make it trigger

daring fern
faint urchin
#

ok got it but is that function triggered automatically when mult is changed or do i have to set that up in my code?

daring fern
faint urchin
#

i don't understand what that means

daring fern
daring fern
#

But the chip text doesn't change.

sonic cedar
#

wheer

#

whre

#

oml

#

where

daring fern
scarlet imp
#

is there a way to give the player additional hands/discards mid-blind?

#

that doesn't permanently give them more?

sonic cedar
#

yeah just remove them how you would normally

daring fern
sonic cedar
#

it's like that

daring fern
sonic cedar
#

ok but can i do that in the main file

#

cause it's for an unlock

daring fern
sonic cedar
#

i thought i could escape 😭

#

hook time again,,,

daring fern
keen loom
#

can consumables give mult and chips in the same way as jokers? or it can only affect the playing cards?

daring fern
#

Consumables have calculate

keen loom
#

was thinking of a consumable that adds chips or mult for one hand or round

sonic cedar
sonic cedar
daring fern
zenith sage
#

in card.lua theres a section in the context tree for

if context.cardarea == g.jokers
if context.before
elseif context.after
else
...

what would fall under the else context, like cardarea == g.jokers but not before or after

#

or when would that activate rather

wintry solar
#

I wouldn’t suggest looking at that function

sonic cedar
daring fern
sonic cedar
#

ok but where does the rest go

daring fern
#

So it saves between loads and saves.

sonic cedar
#

i was gonna dw

daring fern
sonic cedar
daring fern
sonic cedar
#

that gives a syntax error dawg

daring fern
sonic cedar
#

oh THATS what you meant

#

ok thanks

#

you would add the Card: right then

#

pretend its there

#

so it's good otherwise right

daring fern
sonic cedar
#

it's in the main file

daring fern
sonic cedar
#

this is an ovverrides fi-ohhh yeah true

wintry solar
#

You need the function arguments too

sonic cedar
#

the who

daring fern
sonic cedar
#

man i had the context in there before 😭

#

oKAY

scarlet imp
#

can I get the number of scored chips and mult from the context?

#

like context.after.chips or something

daring fern
wintry solar
#

Using post trigger for this seems very silly btw

sonic cedar
#

no one said otherwise man pensiveclown_cc

wintry solar
#

Just hook calc joker and see if it returns anything

sonic cedar
#

is this the part where you tell me "just hoo-

#

gdi

wintry solar
#

Otherwise you are doubling the amount of calculations done for no reason

sonic cedar
#

so would i be like

#

if calc joker then set the var to false or

wintry solar
#

Calc joker also returns two values that you’ll need to handle

#

Let me type it up

faint urchin
wintry solar
#
local calchook = Card.calculate_joker
function Card:calculate_joker(context)
    local ret, trig = calchook(self, context)
    if next(ret) or trig then
        — set your flag
    enddo your unlock check
    return ret, trig
end```
daring fern
daring fern
sonic cedar
#

oh I just don’t need profiles at all

#

Got it

wintry solar
#

Change the return

keen loom
#

trying to make a sticker, and it's crashing

    key = "light",
    loc_vars = function(self, info_queue, card)
        return {
            vars = colours { HEX('F7AA05') }
        }
    end,
    loc_txt = {
        name = 'Element',
        text = {
            '{B:1,C:default}Light{}',
        },
    },
    rate = 0.0,
    atlas = 'elements',
    pos = { x = 0, y = 0 },
}```
sonic cedar
#

Good catch

sonic cedar
wintry solar
#

Looks okay yeah

#

You mentioned needing a joker though, might need to add that in

keen loom
daring fern
wintry solar
#

Though if it requires a joker for every round I’m not sure this effect is even possible

sonic cedar
#

?

#

elab?

wintry solar
#

So it needs you to complete an entire ante whilst having st least one joker but not having any jokers trigger right?

sonic cedar
#

yeah

#

it doesn’t have to be the same joker if that’s the problem

wintry solar
#

No that’s not the problem

sonic cedar
#

Im listening

wintry solar
#

So you’d need to find a joker that exists without trigger ever, and then it would have to be at least ante 2 effectively jokerless

#

It seems very difficult

sonic cedar
#

I mean a difficult unlock was the intention
It’s a gag joker

#

Is it TOO difficult though?

#

/genq

keen loom
wintry solar
#

Youd never unlock it by just playing naturally

daring fern
keen loom
#
    key = "light",
    loc_vars = function(self, info_queue, card)
        return {
            vars = { colours { HEX('F7AA05') } }
        }
    end,
    badge_colour = HEX("F7AA05"),
    loc_txt = {
        name = 'Element',
        text = {
            '{B:1,C:default}Light{}',
        },
    },
    rate = 0.0,
    atlas = 'elements',
    pos = { x = 0, y = 0 },
}```
sonic cedar
wintry solar
#

Maybe just a single round?

#

But require it to be past a certain ante

sonic cedar
#

was gonna say

#

Minimum 3 should be good right

wintry solar
#

Having jokers that dont trigger is the tricky bit

sonic cedar
#

yeah thats why I picked a lower ante

#

I don’t want say 2 though thats too low

#

so either 3 or 4

#

is 4 even possible

#

maybe if you’re playing plasma

daring fern
#

Is it possible to change the blind mid-blind?

sonic cedar
#

I hope

sonic cedar
#

it’s saying GAME is a nil value

daring fern
sonic cedar
#

so not when the game is opened

#

?

sonic cedar
keen loom
#

why does the badge says error?

daring fern
sonic cedar
#

ok so then how do I set it at the start of a run

daring fern
keen loom
daring fern
daring fern
sonic cedar
#

Patrick basketball image

#

Another hook for the overrides.lua

sonic cedar
daring fern
sonic cedar
#

Got it

sonic cedar
placid star
#

are you in school?

sonic cedar
#

no my computer just sucks

placid star
#

ah

daring fern
#

Also it would be self, args

sonic cedar
#

And then im adding self to the arguments i assume

#

Yeah

#

and thats it)

#

Right

sonic cedar
#

Same crash

daring fern
wintry solar
#

You need to run the hook first

sonic cedar
#

same as earlier, just the G is now self and I added the argument

wintry solar
#

Iirc

sonic cedar
#

come again

#

like make it the top of the file or

wintry solar
#

It’s probably better to use init game object too

sonic cedar
#

oh well I have one of those set up already so I can just add on to it

daring fern
sonic cedar
#

is it better to do this ⬆️ or use igo

#

well igo it is ig since I’ve already got it it set up

#

but now I have a backup plan

wintry solar
#

ultimately it doesn’t matter but I would use igo as you’re adding something to the game object

#

It just makes more sense to out that stuff in there

sonic cedar
#

i think I did it wrong

#

cause it gave me the index crash

#

do I just get rid of Game

#

oh wait duh ofc

#

It’s literally in an igo

daring heron
#

How hard is making editions 🤔

#

I wanna make one that just increases mult, chips and xmult, visually it would just have the voucher effect but with a new sprite (if that’s possible)

sonic cedar
wintry solar
#

Did you delete your start run hook?

sonic cedar
#

I… left it empty

#

Forgot to get rid of it

#

at least it was a simple one

#

ok this time for sure

#

I tried to copy a card to my joker area and the game said no

#

should i be using brackets instead of parentheses

#

i mean i know the code said parentheses but it's expecting a table

daring fern
sonic cedar
#

k

#

crashed when the conditions were fulfilled

#

i guess i cant do this?

#

i thought it would count ante

#

it's late tho so i'll figure it out later

keen loom
#

idk what's crashing it now

    key = "s_fire",
    badge_colour = HEX("E73020"),
    loc_txt = {
        name = 'Element',
        text = {
            '{C:1,B:fire}Fire{}',
        },
    },
    rate = 0.0,
    atlas = 'elements',
    pos = { x = 0, y = 0 },
}```
daring fern
keen loom
daring fern
wintry solar
plain gazelle
#

I unpacked Balatro's source code and only found surface-level stuff, where's the code for vanilla jokers? as in the code that is used for joker effects. I need it for references while writing code for new jokers

plain gazelle
sage crater
#

this chips = line is throwing an error. Any ideas to fix it?

#

think I fixed it

#

ok so

#

the pseudorandom is still throwing an error, but when I remove it the code works perfectly fine

#

so is it possible to use the pseudorandom function at all?

daring fern
#

Also chips is not a valid input.

#

You need to use calculate if you want it to give a random amount of chips.

wintry basin
sage crater
sage crater
keen loom
#

i've added labels for it in en-us.lua but it doesn't display the label

daring fern
sage crater
#

but like

#

why does it exist in some files and not others

#

because I've used it with no issues in other contexts

daring fern
keen loom
# daring fern What does `misc > labels` look like?
    misc = {
        labels = {
            s_fire = "Fire",
            s_poison = "Poison",
            s_light = "Light",
            s_water = "Water",
            s_earth = "Earth",
            s_ice = "Ice",
            s_electric = "Electricity",
            s_dark = "Darkness",
            s_wind = "Wind",
            s_steel = "Steel",
            s_grass = "Grass",
            s_mix = "Mix",
        },
    }
}```
daring fern
keen loom
daring fern
keen loom
daring fern
keen loom
# daring fern What does `misc > labels` look like?
    misc = {
        labels = {
            CRPack_s_fire = "Fire",
            CRPack_s_poison = "Poison",
            CRPack_s_light = "Light",
            CRPack_s_water = "Water",
            CRPack_s_earth = "Earth",
            CRPack_s_ice = "Ice",
            CRPack_s_electric = "Electricity",
            CRPack_s_dark = "Darkness",
            CRPack_s_wind = "Wind",
            CRPack_s_steel = "Steel",
            CRPack_s_grass = "Grass",
            CRPack_s_mix = "Mix",
        },
    }
}```
sage crater
#

how do I change this so it runs the function on the enhancement instead of the card that has the enhancement?

#

is it with .center?

daring fern
sage crater
#

and is this set up correctly?

daring fern
sage crater
#

ah damn

#

that means something else is crashing my game

daring fern
sage crater
#

think I fixed it

#

I used math.randomseed("fish") to set a seed so it follows the convention of every other use of randomness in this game, but it turns out the seed needs to be a number instead of a string

#

it's complaining about line 163

#

I'm probably misunderstanding how to set up a function or something

#

ok, I think I figured it out

#

ok, I did :D

primal terrace
#

I think the latest version of SMODS changed how the custom deck is implemented

How would I alter the code so that it doesn't crash when I view the deck?

daring fern
primal terrace
#

Here is the relevant line within SMODS

manic rune
#

i should make a modded deck soon so i can help with these

primal terrace
#

I should mention that it only crashes when clicking on the deck to view it

Playing through the modified deck works fine

daring fern
thorn furnace
#

How would I go about making a tooltip for Wheel of Fortune in my Joker's description
I'm not sure what the tooltip key would be

daring fern
primal terrace
thorn furnace
#

how wud i go about adding that tooltip actually KHD_TrunksWat
Unless it's just {V:G.P_CENTERS["c_wheel_of_fortune"]}

cinder cliff
#

Hey guys, how do I make it so a custom seal is applied as the card kinda wiggles when it is selected. This is happening

daring fern
thorn furnace
#

o
Thanks dance

cinder cliff
daring fern
cinder cliff
#

ok

cinder cliff
daring fern
#

Those are the only two ways.

cinder cliff
#

I am trying to make it act like that one spectral card that adds the red or purple seal

#

But this is close enough ig

languid mirage
cinder cliff
#

the source code is not in SMOD format

languid mirage
#

basic logic is the same?

cinder cliff
#

sorta

languid mirage
#

you just replace vanilla functions with SMODS ones

cinder cliff
#

where are all the consumable functions kept?

#

what file?

languid mirage
#

are you using VScode?

cinder cliff
#

yes

languid mirage
#

Ctrl + Shift + F

#

and type medium

cinder cliff
#

I don't think this helps too much

languid mirage
#

that is definition

#

you have more than 1 search result

#

you can see them on the left

cinder cliff
#

I see

timid star
cinder cliff
#

I would watch the video but my internet is slower than an adult without coffee rn

vale plinth
cinder cliff
vale plinth
#

😭

keen loom
#

it's not applying my gradient on the sticker description and badge
sticker code (in stickers.lua):

    key = "sticker_mix",
    badge_colour = mixture,
    loc_txt = {
        name = 'Element',
        text = {
            '{C:white,X:CRPack_mixture}Mix{}',
        },
    },
    rate = 0.0,
    atlas = 'elements',
    pos = { x = 5, y = 1 },
}```
gradiant code (in main file):
```local mixture = SMODS.Gradient {
    key = 'mixture',
    colours = {HEX("F57B4B"), HEX("FEF377"), HEX("9AF983"), HEX("6E9EFE")},
    cycle = 5,
    interpolation = 'trig',
}```
daring fern
red flower
#

you don't need to

#

it's automatically registered

#

what smods version do you have

thorn furnace
#

How would I go about modifying Wheel of Fortune with a Joker
I had an idea for a Joker that upgraded Wheel of Fortune by changing the foil probability to holo, changing the holo probability to poly, and changing the poly probability to negative

keen loom
red flower
#

and you're sure that's your prefix right?

keen loom
#

yep, CRPack

daring fern
keen loom
#

wait nvm lol

thorn furnace
daring fern
thorn furnace
#

o

#

that's not too bad

#

actually that lets me do like three jokers at once
baller

jolly prawn
#

Does anyone know what type of timer i could use within set_blind that wouldn't crash the game?

keen loom
unborn bay
red flower
#

that's what im saying

jolly prawn
daring fern
jolly prawn
daring fern
faint yacht
#

Yahi's mod has a blind that actively sets your "scored chips" to lower values, even if you're still selecting cards and what not.

stiff quiver
#

how can i check how many cards there are in a played hand?

faint yacht
#

#context.full_hand or #G.play.cards work.

keen loom
#

how do you add description of a sticker to joker description?

stiff quiver
#

i got this crash with this code ```lua calculate = function(self,card,context)
if not context.end_of_round and context.repetition and context.other_card == context.scoring_hand[pseudorandom("seed",1,context.full_hand)] then

    return {repetitions = pseudorandom("seed", 1, 10)}
     
  end
end,
stiff quiver
#

oh my bad

red flower
#

that's going to randomize once for each card btw

burnt quartz
#

How I can get the card's chips value?

#

I'm trying to multiply the chips with a seal's mult

daring fern
burnt quartz
#

chip_bonus() count as base chips?

stiff quiver
burnt quartz
daring fern
#

bonus is another word for chips

burnt quartz
#

Oh

#

Okay

#

Ty

keen loom
#

is it possible to add description of sticker to joker's description?

burnt quartz
#

I want to change the chip's value of a card with a seal, What is the context for that?

burnt quartz
#

This should work

red flower
cobalt iron
#

Is it possible to make it so that you can draw more cards even if your hand is full?

red flower
#

yes

#

when exactly do you want to draw

stiff quiver
# red flower you would need to pick a card in an earlier context and save the index

would this work?```lua calculate = function(self,card,context)
if context.before and context.cardarea == G.play then
card.ability.extra.sel_card = pseudorandom("seed",1,#context.full_hand)
if not context.end_of_round and context.repetition and context.other_card == context.scoring_hand[sel_card] then

    return {repetitions = pseudorandom("seed", 1, 10)}
     
  end
end,```
solid mesa
#

hi i have a question

stiff quiver
#

ok, thanks for your help everyone!

solid mesa
#

How difficult is it to create a new card?

red flower
#

what type of card

solid mesa
#

i want to create a princess

#

K Q J P

daring fern
red flower
#

damn

solid mesa
#

dayum

keen loom
burnt quartz
#

I want to change the bonus of a card with a seal, what I sould do?

solid mesa
#

i tough it would be more difficult

keen loom
#

i might try the other way by making an entry for it

solid mesa
#

like, i never see a new card

#

only colors

stiff quiver
#

this doesnt seem to be updating the value of the selected card, anyone know why? ```lua calculate = function(self,card,context)
if context.before and context.cardarea == G.play then
card.ability.extra.sel_card = pseudorandom("seed",1,#context.full_hand)
end
if not context.end_of_round and context.repetition and context.other_card == context.scoring_hand[card.ability.extra.sel_card] then

    return {repetitions = pseudorandom("seed", 1, 10)}
     
  end
end, ```
#

its supposed to change it before playing the hand but its not doing it

red flower
#

oh wait remove context.cardarea == G.play in the before

stiff quiver
#

ok that worked, thank you again!

keen loom
#

i made descriptions in en-use.lua as a workaround to add sticker descriptions to joker decriptions. but how do i add these custom descriptions?

            element_fire = {
                name = "Element",
                text = {
                    '{C:white,X:fire}Fire{}',
                },
            },```
red flower
#

{ set = "Other", key = "element_fire" }

snow vale
#

why isnt it working?

daring fern
snow vale
#

oh right

keen loom
red flower
#

not in the return

#

info_queue[#info_queue+1] = { set = "Other", key = "element_fire" }

hallow slate
#

Earth

keen loom
#

it's only visual for now. might need to make a function to actually detect elements from cards

#

using pokermon to reference code was a bad idea because nothing's in the same place

north swallow
#

how would i make a joker that retriggers a card if it has a specific seal on it?

daring fern
north swallow
#

thanks!

north swallow
#

i just tried it

daring fern
north swallow
daring fern
north swallow
#

alr thanks that works!

keen loom
#

why is it not changing the color? (the text is stored in en-us.lua)

daring fern
keen loom
daring fern
stiff quiver
#

how do i make a joker destroy itself?

daring fern
keen loom
daring fern
keen loom
#

i was referencing the rarities for the colors

daring fern
keen loom
#

yes. the keys are for rarities

red flower
#

wasnt your rarity crcommon

stiff quiver
# daring fern `card:start_dissolve()`

where do i put that?, i added it to the calculate and it isnt working calculate = function(self,card,context) if context.end_of_round and context.cardarea == G.jokers then card:start_dissolve() card.ability.extra.gain = card.ability.extra.gain + 1 return { dollars = card.ability.extra.gain } end end,

keen loom
#

because i would be using the prefix anyway

#

anyways, i'll just define all the static colors

#

still have no idea why gradients won't work

keen loom
wintry basin
#

Because they are cute

#

🥺

north swallow
#

how would i make a joker that gives xchips if a card with a certain seal is played?

#

bc this doesnt work

keen loom
#

ok, gradients are totally broken everywhere

daring fern
keen loom
versed swan
#

How do you throw an error and halt/crash/stop/whatever the game?

faint yacht
#

error('msg')

versed swan
#

thank you

faint yacht
#

If you don't want to show the source line of crash, error('msg',0).

#

I use it in my Incantation fork check on startup. 0 is the verbosity level, fwiw.

versed swan
#

are there any more verbosity levels?

keen loom
faint yacht
#

1 and 2...

red flower
faint yacht
#

error() triggers the exception handler, so, yes.

red flower
#

amazing

#

ive always done assert

keen loom
#

then why it isn't working?

red flower
#

idk

#

maybe it broke recently

keen loom
#

do i need to downgrade my steamodded?

#

nope, downgrading doesn't help either

normal crest
#

You might be using the wrong key

keen loom
normal crest
#

With DebugPlus

#

It's a mod meant for helping with developing mods

keen loom
normal crest
#

If you have it you should be able to just press / to open the console

keen loom
normal crest
#

In that console type help

#

And press enter

#

You'll get a list of commands

#

You can execute lua code with eval

#

So try running "eval G.LOC_COLOURS"

#

it will print the table for you to see

keen loom
north swallow
#

how would i make it so a joker can check if theres another specific joker and pull off a calculate function off of that

normal crest
#

I must've gotten the variable name wrong

#

I don't remember exactly what it was

#

Try G.LOC_COLOUR or G.LOC_COLORS

#

it has to be one of those I swear

daring fern
normal crest
#

Thanks!

north swallow
#

why is other_joker a nil value here?

manic rune
#

context.other_joker doesnt exist in context.end_of_round

north swallow
#

so what would i do if i want that effect to be active at the end of round

normal crest
#

Well, it might exist at some point, but not in every end_of_round context

manic rune
#

context.end_of_round and context.main_eval

normal crest
north swallow
#

so i just do this?

normal crest
#

Have an end of round effect if you have a specific joker?

manic rune
#

no sob, but yeah itd be helpful if we know what ur trying to do here

north swallow
north swallow
manic rune
#

context.end_of_round and context.main_eval in if statement

then use for loop to go through G.jokers.cards and check if evil whatsapp exists

normal crest
#

Use SMODS.find_card

#

Alongside end of round and main eval

manic rune
#

or that, yeah

long sun
#

hiya — i'm making a Partner with the ability Tarot cards in your consumable area give X1.5 Mult

normal crest
#

context.end_of_round and context.main_eval and next(SMODS.find_card("your_joker_id"))

long sun
#

how would i do this? would context.cardarea == G.consumeables be part of it? [if so, i should be able to finish the code]

daring fern
long sun
#

grand ^^ that looks good

#

thanks!

normal crest
#

If that doesn't work try context.individual and the cardarea check

daring fern
normal crest
#

I think it happens for all cardareas

daring fern
#

That still wouldn't work.

normal crest
#

Try it! Print context inside an if context.individual

north swallow
north swallow
normal crest
#

Replace your joker id with the key for the joker you want to check for

north swallow
#

let me see if it works

normal crest
#

it should be prefix_jokerkey, where prefix is your mod prefix

manic rune
#

what about j_

normal crest
#

Right

#

j_prefix_key

north swallow
#

so i do this?

daring fern
normal crest
#

The condition looks right, idk about the rest

normal crest
faint yacht
#

How do I "score" held in hand card abilities?

daring fern
red flower
#

individual is for hand, discard and deck
other_* is for the joker-like areas

daring fern
long sun
#

here's what it's like at the moment, this is me trying the second condition but removing the context

manic rune
#

just a guess

long sun
#

both do nothing, regardless of context.individual

normal crest
red flower
long sun
#

[oh ya, i also tried context.other_card to see if that would work too]

normal crest
faint yacht
long sun
#

[i did also try other_consumeable]

daring fern
long sun
#

oh wait you mean yours

#

oops hold on

daring fern
faint yacht
#

From left to right... I'd want to do it backwards from right to left.

normal crest
#

xmult is valid too

manic rune
#

you can certainly do that, im pretty sure, smt like a for loop with a table of cards from right to left and calculate_context should work?

faint yacht
manic rune
#

actually, how does context.individual work

#

mm

long sun
#

ah wait, lemme try something

faint yacht
#

-# actually... hm... :)

plain gazelle
#

why isn't there "blueprint_compat" in example joker mod? are jokers compatible with print/storm by default?

long sun
#

aha! ya it's different for the Partner API :}

#

if context.partner_other_main and context.other_card and context.other_card.ability.set == "Tarot" then

wicked leaf
#

how do you load lua files that arent the main one

#

im getting started with modding (again) and need to know

faint yacht
#
assert(SMODS.load_file("file.lua"))()
wicked leaf
#

thank you

#

I suppose the string is the path from the root

faint yacht
#

ye.

plain gazelle
gentle rain
#

how would you go about updating a card's soul layer given a spritesheet of soul layers

#

this is the sprite sheet, the rightmost is the base layer

daring fern
gentle rain
#

oooh

keen loom
normal crest
keen loom
#

the prefix is always lowercase

#

it was not working because i kept the prefix in uppercase

normal crest
#

Did you manage to make it work

stiff quiver
#

sorry for asking again, how can i make a joker destroy itself, kinda like how gross michel does it (at end of round i mean)? someone told me to add card:start_dissolve() but it didnt seem to work

keen loom
normal crest
#

adapting it to your joker of course

stiff quiver
#

where do i find that in the game's code?

normal crest
#

Mods/lovely/dump/card.lua

#

and ctrl + f for "gros michel"

#

reminder that where the game uses self you want to use card instead

normal crest
stiff quiver
#

ok thanks!

wintry solar
faint yacht
#
local seljoker = pseudorandom_element(G.jokers.cards, pseudoseed('aeiou'))
if not seljoker.edition then ... end

@ancient plinth

stiff quiver
stiff quiver
#

ok, i'll get the newest then

stiff quiver
#

i got this crash after adding that

#
    if context.end_of_round and context.cardarea == G.jokers then
      SMODS.destroy_cards(card)
      card.ability.extra.gain = card.ability.extra.gain + 1
      return { dollars = card.ability.extra.gain }
    end 
  end, ```
red flower
#

update smods

wintry solar
#

-# it’s not on the release candidate yet, just the dev build, but I think I’ll probably update the release tomorrow

stiff quiver
#

oh i didnt download the dev build, only the normal one, my bad

#

ok its working now, thanks everyone!

jolly prawn
rapid stag
#

what's the default joker atlas called

daring fern
stiff quiver
#

how do call the increase in chance of oops all sixes to make a random ability more likely to happen?

#

i want this to be more likely if you have oops all sixes```lua pseudorandom("seed",1,4) * chance >= 4

tall jewel
#

Does anyone know where exactly the function for a card tallying the chips/mult attached to it is?

#

as in, the animation itself

#

I looked through Talisman's disable_anims thing and couldn't find anything associated with it

faint acorn
#

anybody happen to know where I can find the legendary joker background like perkeo or chichot or something?

tall jewel
#

extract the game as a zip file -> assets/1x/

snow vale
#

how can i destroy every heart suit card?

normal crest
#

that value will be 1 if no oops, and 2 with oops

#

you can find that used everywhere in the card.lua file of the game if you need examples

hardy viper
#

(4 with 2 copies of oops)

#

(8 w 3, 16 w 4, etc)

faint yacht
#

Or 0.5 with Debian.
-# #completelyunoriginal

stiff quiver
#

ok thanks everyone!

#

what am i supposed to put in the pseudorandom? ```lua if pseudorandom("seed",1,4) <= G.GAME.probabilities.normal/self.ability.extra.odds then

minor magnet
#

is patching other mods possible

#

i need to patch into an api mod for a thing

red flower
#

yes

#

'=[SMODS modid "path.lua"]'

#

as the target

unborn bay
#

note that this doesn't work on macos until next plausible lovely update

minor magnet
#

this doesn't seem to be working

#

im on windows

keen loom
#

is it possible to reference an array from a different file?

minor magnet
keen loom
tall jewel
#

as in, don't use local

#

just ensure the variable is loaded first

stiff quiver
#

im getting this crash, whats wrong with the code? lua calculate = function(self,card,context) if context.end_of_round and context.cardarea == G.jokers then if pseudorandom("seed") <= G.GAME.probabilities.normal/card.ability.extra.odds then SMODS.destroy_cards(card) return { message = "Destroyed" } end card.ability.extra.gain = card.ability.extra.gain + 1 return { dollars = card.ability.extra.gain } end end,

keen loom
red flower
tall jewel
#

no

daring fern
tall jewel
#

just var = x

keen loom
spice wadi
keen loom
tall jewel
#

what yall think

daring fern
tall jewel
#

new joker subtype "forager" will create a card when completing a boss blind

paper zealot
tall jewel
#

The only reason this wouldn't be op is because fruit cards can ONLY play a high card, and only the first fruit will score. Of course, the chips and mult are adjusted for this but still

sonic cedar
#

back from yesterday
this line causes my game to crash. is this not how i can ante check?

keen loom
#

i can't load the file

in main .lua file:

local func = NFS.getDirectoryItems(mod_dir.."functions")
for _, file in ipairs(func) do
    SMODS.load_file("functions/"..file)()
end```
sonic cedar
#

youre not loading the file

minor magnet
keen loom
minor magnet
#

the patch does not apply

spice wadi
rapid stag
keen loom
sonic cedar
#

typing

keen loom
#

i only know how to use SMODS.load_file to access files in the root, but not inside other folders

sonic cedar
#

what's your mod_dir set to

keen loom
#

is that what you ask?

sonic cedar
#

also move the NFS variable to inside the for loop

#

or wait