#💻・modding-dev

1 messages · Page 526 of 1

manic rune
#

like i said, ive never touched new cryptid's code and i dont think i ever will

if it just uses functions then do the same adjacent jokers checks like i did, without returning

wild escarp
#

I'm specifically looking for a joker, those planets do it differently.

plain ember
#

dang

oak meadow
#

also would i have to do something special to make the level not be able to drop below zero

manic rune
#

im developing an allergy for bad code after reading YOUR code nxkoo 🫵

manic rune
#

yeah thats why i forgive u but my eyes wont :3

chrome widget
#

I thought you said "DUDE IM MEN"

manic rune
#

hi winter

chrome widget
#

which is a crime I wouldn't have forgiven

#

Hi bepis!!!

manic rune
#

wave wave

lusty glade
#

Hi! I was wondering how can one target a played card to put an Enhancement or a seal via a joker ability?

At first I thought I would check the code for DNA and midas mask but being new to coding I don't understand much of what is going on lol

plain ember
#

Oh, another last question, theres a way to force a message on a different joker?

manic rune
#

yes

plain ember
#

like those "again!"

manic rune
#
  1. SMODS.calculate_effect({message = ...}, other_card)

  2. add message_card = other_card in return alongside with message

manic rune
modern kindle
#

do i get a good job

#

i just want to be included

#

lmao

manic rune
#

that should give you a random enhancement and seal which you will use with Card:set_ability("enhancement key"), Card:set_seal("seal key")

manic rune
modern kindle
#

awsum

lusty glade
#

I see, I<ll try that then, thank you!

faint yacht
#

...so what do I return with SMODS.current_mod.set_debuff as is called by this bit?

for _, mod in ipairs(SMODS.mod_list) do
    if mod.set_debuff and type(mod.set_debuff) == 'function' then
        local res = mod.set_debuff(self)
        if res == 'prevent_debuff' then
            if self.debuff then
                self.debuff = false
                if self.area == G.jokers then self:add_to_deck(true) end
                self.debuffed_by_blind = false
            end
            return
        end
        should_debuff = should_debuff or res
    end
end

Do I just return 'prevent_debuff'?

#

-# Huh, so it is that simple.

subtle merlin
#

I thought I understood this enough to do it myself, but I do not. This just does nothing

oak meadow
#

how do i get a random poker hand

lament agate
#

any ideas why this is crashing

modern kindle
frigid cargo
#

bump

lusty glade
ripe jacinth
#

my joker isnt working
basically it should make all jokers in the shop free if held
but it doesnt work

pls tell me what i did wrong

daring fern
ripe jacinth
#

fffuck

lament agate
#

dill save me..

modern kindle
# lament agate yes

im not getting the nil crash, in stead im getting a sound does not exist crash lmao
which makes no sense since i have the sound

#

i was doing this

G.nxkoo_dies = {
    show_foxy = false,
    foxy_timer = 0,
    foxy_frames = {},
    foxy_frame_index = 1,
    foxy_frame_timer = 0,
    foxy_frame_delay = 0.1,
    path = SMODS.current_mod.path,
}

G.nxkoo_dies.foxy_sound = love.audio.newSource(
    G.nxkoo_dies.path .. "assets/customimages/foxy_sound.ogg","static"
)

pardon the auto format moment

lament agate
#

😭

modern kindle
#

which does not have the nil crash, but instead a sound does not exist crash

lament agate
#

yeah it just doesnt make any sense honestly

modern kindle
#

i tried full path, relative path

#

nothin wanna work

lament agate
#

thats why i rely on play_sound() but this is not gonna work

lament agate
#

or i could just do this

#

and define the SMODS.Sound

keen sleet
#

is this the right way to make a joker never show up in the shop, booster packs, or be given by consumables? If I never set the flag it'll never show up, right?

normal crest
#

that will probably work, but if you never intend to make it show up you should do in_pool = function() return false end

lament agate
#

say, how do i test this

#

its like, chances based

modern kindle
#

increase the odds to 1/1

lament agate
#

right

#

i forgot

#

im a dev

arctic perch
modern kindle
#

im still trying to get the other way to work because its PISSING ME OFF!!!!!!!!!!!

lament agate
#

its not worth it

modern kindle
#

ive made so much other bs work and this is one of the simpler love things im just baffled

normal crest
#

What is dilly trying to do

modern kindle
#

it ws more what nxkoo was trying to do that i tried to fix but it dont make sense

#

they were trying to use love.audio for a sound instead of smods.sound initially, and they were crashing due to it being nil, i didnt get the nil error and instead got a sound not existing error even though i know the sound exists because i also have it defined as a smods.sound

#

i took my sleep meds forever ago im giving up for the night and going da hell to SLEEP

#

goodnight modding dev

lament agate
#

gnnnnnnnnnnnnnnnnnnnnn

twin cosmos
#

Does anyone know off the top of their heads how to check for selecting blinds or the cash-out screen with G.XXX

#

cuz I have G.GAME.blind and G.shop but I dont know the other ones

#

(for the purpose of a joker that replaces all of the game music when its in hand)

frigid cargo
#

Bump

keen sleet
#

are there sound effects for dividing/losing mult that're free to use?

oak meadow
#

is there a way to get a random poker hand

daring fern
oak meadow
#

please

daring fern
oak meadow
#

yay

#

ty

#

could i do this (function from cryptid)

  local cardd = copier or card
  level_up_hand(cardd, hand_type, nil, -1)```
original definition: (can send entire code but its long)
`level_up_hand(card, hand, instant, amount)`
i presume thats how that works because how its used in neutron star is
`level_up_hand(used_consumable, neutronhand, nil, G.GAME.neutronstarsusedinthisrun)`
#

(its basically the same as done in neutron star except -1)

daring fern
oak meadow
#

alr ty

#

is set the same as kind

#
    key = 'notavirus',
-- this one
    kind = 'Code',
    loc_txt = {
        name = 'notavirus.zip',
        text = {
            "Summons one Virus card.",
            "Also takes 5 gold or 1 random poker hand level.",
            "{C:inactive}'Download for unlimited V-Bucks!'"
        }
    },
    atlas = 'placeholder',
    pos = {x = 0, y = 0},
    use = function(self, card, area, copier)
        if pseudorandom(pseudoseed('specles'), 1, 2) == 1 and G.GAME.dollars >= 5 then
            ease_dollars(-5)
        else
            local hand_type = pseudorandom_element(G.GAME.hands, 'specles')
            local cardd = copier or card
            level_up_hand(cardd, hand_type, nil, -1)
        end
        G.E_MANAGER:add_event(Event({
            trigger = 'after',
            delay = 0.4,
            func = function()
                play_sound('timpani')
                SMODS.add_card({ set = 'virus_shop'})
                card:juice_up(0.3,0.5)
                return true
            end,
            delay(0.6)
        }))
    end,
    can_use = function(self, card)
        return G.jokers and #G.jokers.cards < G.jokers.config.card_limit
    end
}```
pretty sure this is an issue with the line above
#

it was not

#

wait i did it wrong its Tarot not tarot (trying to debug)

#

ok yes
so i have no clue how that fails

#

kind = 'Code' is how its done in cryptid

#

well actually im stupid because its set = "Code" but i tried that and it failed too :/

#

ok now it works to load
but i did tarot to debug
then when i used it it selected poker hand
and it crashed

#

(this is in the definition for level poker hand, and this time i put 1 to see if that crashed it and it did)

daring fern
oak meadow
#

o
ty

#

still crashed

daring fern
oak meadow
#

it workerd

#

i was just testing to make sure the money way worked
and it seemed like it wasnt working while i was at exactly 5 dollars
it worked
but specles seed is just really lucky i guess

faint yacht
#

Always was curious about SMODS.Enhancement calculate bit - is card equal to an instance of the enhancement on a given card or something?

daring fern
pure verge
#

SMODS.Atlas{
key = "magnet",
path = "Balatro_Joker_Magnet.png",
px = 71,
py = 95,
}
SMODS.Joker{
key = "magnet",
loc_txt = {
name = "Magnet",
text = {
"When gold card scored",
"{X:mult,C:red}X#1#{} Mult"
}
},
atlas = "magnet",
pos = {x = 0, y = 0},
config = {extra = {
Xmult = 2
}
},
loc_vars = function(self,info_queue,center)
return{vars = {center.ability.extra.xmult}}
end
}

daring fern
pure verge
#

yes

pure verge
#

the 2x file was not the same name

ripe jacinth
#

guys

#

why does my card not have a sprite

distant junco
#

lets see the code

ripe jacinth
#

the sprite is in the position that its supposed to be in in the atlas

#

and the atlas is set to the correct one

distant junco
#

show the code and the atlas

ripe jacinth
distant junco
#

youve got y and x the wrong way round OR you didnt know they start from 0

ripe jacinth
#

fffuck

#

i got y and x the wrong way around again

#

i may be an idiot

distant junco
#

yeah ive done it a few times

distant junco
#

how to check how many cards in the full deck? i know starting deck size is G.GAME.starting_deck_size so i figured it would just be G.GAME.deck_size but i guess that is not the case

distant junco
#

thanks!

glass scaffold
#

How do I modify this function to change all Kings and Jacks to Queens?

distant junco
#

oh i aftually made something similar to this

gaunt coral
#

how does one get the current amount of money

distant junco
distant junco
daring fern
honest sierra
#

got a script that changes suit names?

gaunt coral
#

my god this is broken 😭

daring fern
distant junco
gaunt coral
distant junco
#

oh

honest sierra
daring fern
honest sierra
honest sierra
daring fern
honest sierra
daring fern
distant junco
daring fern
honest sierra
#

its keeps all the languages there

distant junco
#

yeah and you make the localization file for your mod

honest sierra
manic rune
#

what the hell is this pfp

distant junco
#

why this joker doing nothing????

spice wadi
distant junco
#

fucks sake

honest sierra
red flower
#

no, keys are unaffected

ebon shell
red flower
#

the issue is that you're adding chips permanently in every context

#

first, you want that loop to be inside joker_main and second you want it to be a local variable

ebon shell
#

would something like this work?

#

actually wait i can just test it

vast night
#

i get this. have you seen this somewhere?

red flower
#

you would need to do the loop in loc_vars too or the description won't update

daring fern
ebon shell
red flower
#

oh yeah you need to start it at 0

#

local chipstoadd = 0

lament agate
#

@manic rune bepis

manic rune
#

hi

lament agate
#
local original_Game_update = Game.update
function Game:update(dt)
    original_Game_update(self, dt)
    if G.GAME and G.GAME.blind and G.GAME.blind.boss and G.GAME.blind.defeated then
        tangentry.reset_jokers_on_boss_defeat()
    end
end

function tangentry.reset_jokers_on_boss_defeat()
    if not G.jokers or not G.jokers.cards then return end
    for _, joker in ipairs(G.jokers.cards) do
        if not joker.ability or joker.edition and joker.edition.negative then
            goto continue
        end
        local joker_key = joker.config.center.key
        local joker_center = G.P_CENTERS[joker_key]
        if joker_center and joker_center.config then
            joker.ability = {}
            for k, v in pairs(joker_center.config.extra or {}) do
                joker.ability[k] = v
            end
            if joker.ability.mult then
                joker.ability.mult = joker.ability.mult * 0.25
            end
            if joker.ability.xmult then
                joker.ability.xmult = joker.ability.xmult * 0.25
            end
            if joker.ability.chips then
                joker.ability.chips = joker.ability.chips * 0.25
            end
            joker:juice_up(0.5, 0.5)
        end

        ::continue::
    end
    G.E_MANAGER:add_event(Event({
        func = function()
            SMODS.calculate_effect({
                message = "One must imagine.",
                colour = G.C.RED
            })
            return true
        end
    }))
end

local original_joker_calculate = SMODS.Joker.calculate
function SMODS.Joker:calculate(card, context)
    if G.GAME and G.GAME.deck and G.GAME.deck.key == "b_tngt_sisyphus" then
        if card.ability.mult then
            card.ability.mult = card.ability.mult * 0.25
        end
        if card.ability.xmult then
            card.ability.xmult = card.ability.xmult * 0.25
        end
    end
    return original_joker_calculate(self, card, context)
end
#

tried it

#

doesnt work

manic rune
#

im on phone nxkoo

#

i can, barely read

daring fern
#

G.GAME.deck also doesn't exist.

lament agate
lament agate
lament agate
#

hold on

daring fern
#

G.GAME.blind.defeated also doesn't exist.

lament agate
#

huh what

#

god damnit

daring fern
#

Also if it did you would be resetting it every frame on the cash out screen.

lament agate
#

i had it happen once on different occasion

red flower
#

i think you can just do all of this in your deck's calculate function

#

you shouldn't need hooks

daring fern
#

Also you should be iterating over joker_center.config not joker_center.config.extra

red flower
lament agate
daring fern
manic rune
#

so that it detects value changes

#

the reset ability one shouldnt need a hook though

red flower
manic rune
#

oh idk, i havent checked his code yet lol

pure verge
#

the text is red but the text isnt there

#

SMODS.Atlas{
key = "magnet",
path = "Balatro_Joker_Magnet.png",
px = 71,
py = 95,
}
SMODS.Joker{
key = "magnet",
loc_txt = {
name = "Magnet",
text = {
"When steel card scored",
"{X:mult,C:red}X#1#{} Mult"
}
},
atlas = "magnet",
pos = {x = 0, y = 0},
config = {extra = {
Xmult = 2
}
},
loc_vars = function(self,info_queue,center)
return{vars = {center.ability.extra.xmult}}
end
}

modern kindle
#

Dear heavens im awake

#

Hello chat

daring fern
modern kindle
#

Yummy 4 hour sleep

pure verge
#

ok

reef condor
modern kindle
#

Hello

daring fern
#

Because mult and red are the same colour.

pure verge
#

also, its rarity is common even though i put it on 3

#

which should be rare

pure verge
#

SMODS.Joker{
key= "magnet",
blueprint_compat = true,
rarity = 3,
cost = 8,
pos = { x = 0, y = 0},
config = { extra = { xmult = 2 } },
loc_vars = function(self, info_queue, card)
return { vars = { card.ability.extra.xmult } }
end,
calculate = function( self, card, context)
if context.individual and context.cardarea == G.play and
SMODS.has_enhancement(context.other_card, "m_steel") then
return{
xmult = card.ability.extra.xmult
}
end
end
}

#

and it doesnt trigger

wintry solar
#

Why are so many people interested in scaling other jokers, I don’t get it

manic rune
#

shrug

#

i just want to pack as many unique effects i can think of into Stacked

#

its not in pool normally though

true sky
#

is there a way to check if you're viewing the deck?

modern kindle
wispy falcon
#

How do I stop blueprint from using my Jokers messages without making it incompatible?

red flower
#

message = not context.blueprint and "your message" or nil

wintry solar
#

it's just a super jank mechanic, there's no way consistent way to scale things effectively

modern kindle
#

half the things we got are jank, it is just the way of the west
if it works out for people then sick imo

wintry solar
#

nah we don't have that much jank

true sky
red flower
#

i dont have any jank because i dont interact with other jokers at all :3

true sky
#

what fun is modding without at least a little jank

azure laurel
#

why the bottom text says error?

red flower
lament agate
#

do i need it or

azure laurel
red flower
red flower
pure verge
#

my joker is not triggering at all and its supposed to be uncommon yet it displays as common

#

SMODS.Joker{
key= "magnet",
blueprint_compat = true,
rarity = 2,
cost = 8,
pos = { x = 0, y = 0},
config = { extra = { xmult = 2 } },
loc_vars = function(self, info_queue, card)
return { vars = { card.ability.extra.xmult } }
end,
calculate = function( self, card, context)
if context.individual and context.cardarea == G.play and
SMODS.has_enhancement(context.other_card, "m_steel") then
return{
xmult = card.ability.extra.xmult
}
end
end
}

daring fern
pure verge
#

yes

red flower
#

does anyone have a good example of a simple lovely patch? i dont mean the syntax itself, I'm looking for something a beginner might want to patch

#

like when everyone had the same patch to add enhancements to the pokerhand screen

modern kindle
#

are you saying we dont need that anymore cause i still have that

red flower
#

no, i pr'd it a long time ago

#

it takes seals and editions too

modern kindle
#

licking lips dot gif

#

what about the hand selection patch stuff

red flower
#

i have bad news

#

well good news

modern kindle
#

im going to explode

red flower
modern kindle
#

my oh my

red flower
#

thats why i dont have any examples.. they're all in smods now haha

modern kindle
#

let me check my patches and see

red flower
#

all my patches are UI stuff

#

or very specific contexts

tranquil cypress
#

There's this one which adds a context for when a card is retriggered (credits to somethingcom)

[patches.pattern]
target = '''=[SMODS _ "src/utils.lua"]'''
pattern = '''effect.message = effect.message or (not effect.remove_default_message and localize('k_again_ex'))'''
position = "after"
payload = '''
effect.extra = {func = function() SMODS.calculate_context({card_retriggered = true}) end}
'''
match_indent = true```
red flower
#

thank you that's perfect

modern kindle
#

hell yea

tranquil cypress
#

😄

red flower
#

well, actually. it being an smods patch makes it a little bit confusing

#

im still going to use it

modern kindle
# red flower

where is this in docs so i can scuttle to it in case ive missed other things there

red flower
modern kindle
#

util thats where it is

#

thanks

honest sierra
#

well im manually going through every phrase and changing cards to balls and whatever else i neef

#

wish me luck

modern kindle
#

paired with your username, i have moderate concern

slim ferry
honest sierra
#

thatll cover most but i do have to change how the cards are written out for some

#

saves a lot of time though lol

wispy falcon
#

How do I make my Joker play a sound? With play_sound? How do I use it?

red flower
#

is this clear enough

wispy falcon
#

What?

red flower
#

it wasnt a reply to you sorry

modern kindle
honest sierra
#

j_flower_pot={
name="Flower Pot",
text={
"{X:mult,C:white} X#1# {} Mult if poker",
"hand contains a",
"{C:diamonds}Fast Ball{} ," {C:clubs}Great Ball{} ,",
"{C:hearts}Poke Ball{} , and {C:spades}Ultra Ball{} ",
},
unlock={
"Reach Ante",
"level {E:1,C:attention}#1#",

#

will this read correctly on the card?

red flower
#

full thing

tranquil cypress
#

pretty good

gilded blaze
#

play_sound is used to play a sound at any given time
alternatively, you can add a field sound = modprefix_yoursound to the return table of a joker when it does something

errant talon
#

Where can I find information on github regarding suit and card numbers in code?

honest sierra
#

j_misprint={
name="Misprint",
text={
"",
},

#

wtf actually makes this work

gilded blaze
#

when declaring SMODS.Sound, your mod prefix is automatically prepended to the sound object

wispy falcon
#

Should I do SMODS.Sound in a different file or in the same one?

modern kindle
#

i dont recall can i set a boss blind through debugplus commands isntead of rerolling

dreamy thunder
#

while hovering the blind you want

modern kindle
#

ah right, i forget thats possible

#

thank you

red flower
modern kindle
#

🙃

tranquil cypress
#

For this joker I'm trying to make it so it's timer pauses during scoring, here's what i'm currently doing ( in the update function) for that bit, I've got it to pause when it's paused but i'm not sure how I would go around doing it for scoring, help would be appreciated!
if card.ability.active then if not G.SETTINGS.paused then card.ability.time_spent = card.ability.time_spent + G.real_dt card.ability.chips = 0 + (math.floor(card.ability.time_spent) * card.ability.chips_gain) end end

brittle yacht
#

can i make a consumable do something different when used in a specific blind?

spice wadi
#

Yes

brittle yacht
#

how

#

lol

#

i dumb

lament agate
#

does math.random get affected by OA6?

wispy falcon
#
    key = "charge_up",
    path = {
        ['default'] = "s_charge_up.ogg"
    }
})```

in calculate:

```if card.ability.extra.hand_count_before == 3 then
                return { message = not context.blueprint and "Charging...", sound = "s_charge_up" }
            end```
red flower
rotund sable
errant talon
#

` SMODS.Joker {
key = 'Copper Wire',
loc_txt = {
name = 'Copper Wire',
text = {
"Diamond Suits Have 1/4 chance",
"to give 3$ when discarded"
}
},
config = { extra = { dollars = 3, odds = 4 } },
rarity = 1,
atlas = 'MakMod',
pos = { x = 2, y = 0 },
cost = 4,

calculate = function(self, card, context)
  if context.discard then
 if context.other_card:is_suit("Diamonds") then
if SMODS.pseudorandom_probability (card, card.ability.extra.odds, 'j_modprefix_MakMod') then
 SMODS.calculate_effect({dollars = card.ability.extra.dollars}, card)
   end
  end
 end
 end

}`

I am running into an issue with SMODS.pseudorandom_probability
what am I missing?

wispy falcon
distant junco
#

how do i destroy a specific joker (not the one that's triggering it)

wispy falcon
rotund sable
wispy falcon
rotund sable
#

sound = "s_charge_up"

#

i have one sound in my mod and use it like this

play_sound("EF_LetsGoGamblingSound", 1, 1)
SMODS.Sound{
    key="LetsGoGamblingSound",
    path="gamblecore.ogg"
}
wispy falcon
#

Yeah, i just realized that too, my bad. Thank you though

wintry solar
rotund sable
#

my mod prefix

wispy falcon
wispy falcon
errant talon
rotund sable
#

not the jokerforge fix

wispy falcon
# wispy falcon My sound doesn't get played...
    key = "charge_up",
    path = "s_charge_up.ogg"
})


if card.ability.extra.hand_count_before == 3 then
                return { message = not context.blueprint and "Charging...", play_sound = "sj_s_charge_up", 0.7, 0.6 }
            end```
rotund sable
rotund sable
modern kindle
#

i have no clue what in the world group_0_f67abfc is, that shit wizardry

red flower
#

it's the seed, it can be anything but they were missing it

rotund sable
modern kindle
#

oic

rotund sable
modern kindle
#

seed makes sense i did not read the whole thing i thought it was some fuck off address

wispy falcon
rotund sable
#

god damnit

rotund sable
#

i showed you a function

#

not the return

#

sound = "sj_charge_up" should be enough

wispy falcon
#

Sorry

rotund sable
#

dw kinda my mistake

modern kindle
#

yea, its all your fault

#

no bread for a week

#

go back to the mines mr farmer

wispy falcon
rotund sable
#
return { message = not context.blueprint and "Charging...", sound = "sj_charge_up"}

should work

#

unless im stupid

honest sierra
#

j_flower_pot={
name="Berry Pot",
text={
"{X:mult,C:white} X#1# {} Mult if poker",
"hand contains a",
"{C:diamonds}Fast Ball{} ," {C:clubs}Great Ball{} ,",
"{C:hearts}Poke Ball{} , and {C:spades}Ultra Ball{} ",
},
unlock={
"Reach Ante",
"level {E:1,C:attention}#1#",
},

#

it says error on line 917, which would be the text={ it says its missing a }

#

but isnt it there after everything, or is one of my commas messing it up?

distant junco
#

i think youve got the formatting completely wrong if im not mistaken

vast bough
#

yeah

honest sierra
#

i could, im editing the actual game code not making a patch, i think i deleted a comma or something

rotund sable
distant junco
rotund sable
#

error changed slightly tho

vast bough
# honest sierra i could, im editing the actual game code not making a patch, i think i deleted a...
SMODS.Joker{ --Werewolf
    name = "Werewolf",
    key = "werewolf",
    config = {
        extra = {
        }
    },
    loc_txt = {
        ['name'] = 'Werewolf',
        ['text'] = {
            [1] = 'Played cards that are',
            [2] = '{C:attention}enhanced{} become {C:attention}Wild Cards'
        }
    },
    pos = {
        x = 1,
        y = 2
    },
    cost = 5,
    rarity = 2,
    blueprint_compat = false,
    eternal_compat = true,
    unlocked = true,
    discovered = true,
    atlas = 'ECjokers',

    loc_vars = function(self, info_queue, card)
        info_queue[#info_queue+1] = G.P_CENTERS.m_wild
        return {vars = {}}
    end,

heres an example from extracredit

wispy falcon
honest sierra
distant junco
#

its so much easier to make a patch lmao

rotund sable
#

was the sound .ogg originaly or did you rename .mp3?

wispy falcon
brittle yacht
#

how do i make every card played a specific enhancement

wispy falcon
brittle yacht
rotund sable
honest sierra
wispy falcon
honest sierra
#

and yes, its my first day

distant junco
distant junco
honest sierra
#

i dont think anyone would gaf for it lol

wispy falcon
distant junco
#

use a wav to ogg converter?

red flower
rotund sable
glass scaffold
#

Can anyone find out what mod is guilty of making the game crash?

wispy falcon
rotund sable
#

Then you could loop through G.jokers.cards

distant junco
rotund sable
rotund sable
#

So

for _, joker in ipairs(G.jokers.cards) do
    joker:start_disolve()
end
``` would delete every joker
#

Assuming my memory is correct

#

The ipairs part should be correct

#

Dissolve not disolve 🫠

rotund sable
distant junco
#

SMODS.destroy_cards(G.jokers.cards)
i used this to destroy all jokers so could i use something in here

rotund sable
#

This should also work

distant junco
#

yeah but i just want to remove 1 specific joker

wintry solar
#

Do you know which one?

distant junco
#

yes

wintry solar
#

Which one? 😂

rotund sable
#

Is it by pos or by key

distant junco
#

key

distant junco
wintry solar
#

If you want me to tel you how to do it, yes

distant junco
#

well its one of my jokers and its key is jam_gaming

wintry solar
#

Okay so do SMODS.destroy_cards(SMODS.find_card('j_jam_gaming'))

distant junco
#

damn i was so close

violet lance
#

guys its my first time using jokerforge how do i make it so that my joker gets more mult per negative card

violet lance
#

ok thank you

brittle yacht
#

the docs arent very helpful

pure verge
#

the joker wont trigger and i have no clue on how to fix it

#

SMODS.Joker{
key= "magnet",
blueprint_compat = true,
rarity = 2,
cost = 8,
pos = { x = 0, y = 0},
config = { extra = { xmult = 2 } },
loc_vars = function(self, info_queue, card)
return { vars = { card.ability.extra.xmult } }
end,
calculate = function( self, card, context)
if context.individual and context.cardarea == G.play and
SMODS.has_enhancement(context.other_card, "m_steel") then
return{
xmult = card.ability.extra.xmult
}
end
end
}

rotund sable
pure salmon
#

how do i make a custom pool that also shows a badge on all the cards it's on?

wintry solar
brittle yacht
#

is that right?

#

nvm

#

is this right?

#
        if context.scoring_hand then
            Card:set_ability(G.P_CENTERS[m_glass])
        end
    end```
wintry solar
#

No

brittle yacht
#

D:

rocky plaza
#

also capitalization matters

wintry solar
#
if context.before then
  for _, pcard in ipairs(context.scoring_hand) do
    pcard:set_ability("m_glass")
  end
end
#

Like that though I don’t think it’ll count them as glass for that calculation

#

I don’t remember

#

It might need nil, true after the key to time the animation properly

rotund sable
glass crown
#

how would i go about making a joker create a specific voucher in the shop?

#

and does the game even let you buy more than one copy of the same voucher?

distant junco
#
SMODS.Joker {
    key = 'jam_cthoogle',
    loc_txt = {
        name = "The Cthoogle Joker",
        text = {
            'Each scored {C:attention}6{} has a',
            '{C:green}#1# in #2#{} chance of',
            'creating a {C:purple}Tarot{} card',
        }
    },
    blueprint_compat = true,
    rarity = 3,
    cost = 7,
    discovered = true,
    eternal_compat = true,
    perishable_compat = true,
    atlas = 'Jammbo',
    pos = { x = 7, y = 1 },

    config = { extra = { odds = 3 } },

    loc_vars = function(self, info_queue, card)
        local numerator, denominator = SMODS.get_probability_vars(card, 1, card.ability.extra.odds, 'rosen')
        return { vars = { numerator, denominator } }
    end,

    calculate = function(self, card, context)
        if context.individual and context.cardarea == G.play and
            #G.consumeables.cards + G.GAME.consumeable_buffer < G.consumeables.config.card_limit then
            if (context.other_card:get_id() == 6) and SMODS.pseudorandom_probability(card, 'rosen', 1, card.ability.extra.odds) then
                G.GAME.consumeable_buffer = G.GAME.consumeable_buffer + 1
                return { 
                    message = "???",
                    sound = "jammbo_plums",
                    func = function()
                        G.E_MANAGER:add_event(Event({
                            func = (function()
                                SMODS.add_card {
                                    set = 'Tarot',
                                }
                                G.GAME.consumeable_buffer = 0
                                return true
                            end)
                        }))
                    end
                }
            end
        end
    end,

    add_to_deck = function(self, card, from_debuff)
        SMODS.destroy_cards(SMODS.find_card('j_jam_gaming'))
    end,
}

crash when this joker is added to the deck

glass crown
#

thank you!!

wintry solar
#

It might not do anything though, it depends on the voucher

brittle yacht
# wintry solar ```lua if context.before then for _, pcard in ipairs(context.scoring_hand) do ...
        if context.before then
              for _, pcard in ipairs(context.scoring_hand) do
                pcard:set_ability("m_glass")
                return {
                    message = 'Glass!'
                }
              end

            local copy_card = copy_card(context.full_hand[1], nil, nil, G.playing_card)
                copy_card:add_to_deck()
                G.deck.config.card_limit = G.deck.config.card_limit + 1
                table.insert(G.playing_cards, copy_card)
                G.hand:emplace(copy_card)
                copy_card.states.visible = nil

                G.E_MANAGER:add_event(Event({
                    func = function()
                        copy_card:start_materialize()
                        return true
                    end
                }))
                return {
                    message = 'Copied!',
                    colour = G.C.CHIPS,
                    func = function()
                        G.E_MANAGER:add_event(Event({
                            func = function()
                                SMODS.calculate_context({ playing_card_added = true, cards = { copy_card } })
                                return true
                            end
                        }))
                    end
                }
            end
        end
    end```
is this right? it's supposed to make all cards glass, and add a permanent copy to the deck
wintry solar
#

No, that’ll make one card glass and do nothing else

brittle yacht
#

oh

glass crown
#

okay, second (technically third) question, what context would be used for a joker that does something at the start of a shop?

brittle yacht
wintry solar
#

The return does

brittle yacht
#

which one 😭 theres 3

wintry solar
#

The first one

brittle yacht
#

the message glass?

brittle yacht
wintry solar
#

Because return leaves the function

brittle yacht
#

so would i put them both in it?

#

oh its a loop

glass crown
red flower
#

interesting

brittle yacht
#

also what should this value be?

wintry solar
#

Yeah they’re not all on there because I am lazy

brittle yacht
#

config = { extra = { copy = 1 } },

wintry solar
#

-# I was actually writing calc docs earlier today!

red flower
#

im writing docs

#

(instead of working)

rotund sable
# brittle yacht how?

I'm not sure but I think SMODS.calculate_effect({message = "glass"}, pcard) would work for the message instead of the return

#

Unless I made another spelling mistake

brittle yacht
#

hold on

#

ok

#

it works

#

now

#

how do i make a consumable do a different function when used in a specific blind

red flower
#

if G.GAME.blind.config.blind.key == "bl_key" then

brittle yacht
#

thanks n'

pure verge
#

is this how you multiply when a steel card is played?

#

calculate = function( self, card, context)
if context.individual and context.cardarea == G.play and
SMODS.has_enhancement(context.other_card, "m_steel") then
return{
xmult = card.ability.extra.xmult

red flower
#

yes

brittle yacht
#

why dis not work

#

    loc_vars = function(self, info_queue, card)
        info_queue[#info_queue + 1] = G.P_CENTERS[card.ability.mod_conv]
        return { vars = { card.ability.max_highlighted, localize { type = 'name_text', set = 'Enhanced', key = card.ability.mod_conv } } }
    end,

    use = function(self, card, area, copier)
        if G.GAME.blind.config.blind.key == "silly_boss_tyler" then
            G.E_MANAGER:add_event(Event({
            trigger = 'after',
            delay = 0.4,
            func = function()
                play_sound('timpani')
                SMODS.add_card { key = "j_silly_tylerjok" }
                card:juice_up(0.3, 0.5)
                return true
            end
            }))
            delay(0.6)
        else
            G.E_MANAGER:add_event(Event({
            trigger = 'after',
            delay = 0.4,
            func = function()
                play_sound('tarot1')
                card:juice_up(0.3, 0.5)
                return true
            end
            }))
            for i = 1, #G.hand.highlighted do
                local percent = 1.15 - (i - 0.999) / (#G.hand.highlighted - 0.998) * 0.3
                G.E_MANAGER:add_event(Event({
                    trigger = 'after',
                    delay = 0.15,
                    func = function()
                           G.hand.highlighted[i]:flip()
                        play_sound('card1', percent)
                        G.hand.highlighted[i]:juice_up(0.3, 0.3)
                        return true
                    end
                }))
            end
            delay(0.2)
            for i = 1, #G.hand.highlighted do
                G.E_MANAGER:add_event(Event({
                    trigger = 'after',
                    delay = 0.1,
                    func = function()
                        G.hand.highlighted[i]:set_ability(G.P_CENTERS[card.ability.mod_conv])
                        return true
                    end
                }))
            end
            for i = 1, #G.hand.highlighted do
                local percent = 0.85 + (i - 0.999) / (#G.hand.highlighted - 0.998) * 0.3
                G.E_MANAGER:add_event(Event({
                    trigger = 'after',
                    delay = 0.15,
                    func = function()
                           G.hand.highlighted[i]:flip()
                        play_sound('tarot2', percent, 0.6)
                        G.hand.highlighted[i]:juice_up(0.3, 0.3)
                        return true
                    end
                }))
            end
            G.E_MANAGER:add_event(Event({
                trigger = 'after',
                delay = 0.2,
                func = function()
                    G.hand:unhighlight_all()
                return true
            end
            }))
            delay(0.5)
        end
    end,

    can_use = function(self, card)
        if G.GAME.blind.config.blind.key == "silly_boss_tyler" then
            return G.jokers and #G.jokers.cards < G.jokers.config.card_limit
        else
            return G.hand and #G.hand.highlighted > 0 and #G.hand.highlighted <= card.ability.max_highlighted
        end
    end```
#

it supposed to turn 3 cards glass

#

and when on a specfic blind spawns a joker

lusty glade
pure verge
#

idk

#

i just looked at tribs code

#

i think

lusty glade
#

I see lmao alr

pure verge
#

just started learning coding

lusty glade
#

Same lol

#

Trying to read the original game’s code is giving me headaches ;-;

#

We’ll get through this lol

hushed field
#

Context.other_card is given as a parameter by specific contexts to pass along the specific card object. For example, context.individual will have a context.other_card, which will have the card currently being evaluated

wispy falcon
#

Is it better if everything from SMODS.GameObject goes into one file or to split them into multiple files?

bitter sparrow
#

hey guys i just wanna ask

#

is there a way to make custom face card packs

#

without replacing pre existing ones

bitter sparrow
#

aight thx gng

bold sleet
#

Hey, quick question: what are the names of the card areas of the shop?

rotund sable
red flower
#

2slow

rotund sable
#

Damn my internet is shit

bold sleet
#

Someone should really go and compile and organize this kind of stuff.

red flower
#

that's what I'm doing

bold sleet
#

Where is it getting compiled?

#

I need to know

red flower
#

havent pushed it yet because it's still during my work shift and my boss knows my github :3

sturdy compass
#

Your boss stalks your commit history???? 😭

red flower
#

no, but who knows

#

i dont trust HR

sturdy compass
#

You have every right not to lmao

wintry solar
#

Isn’t it like 7pm for you?

red flower
#

no it's 2pm

wintry solar
#

Oh

#

Idk why I thought you were EU

red flower
#

that would be nice

#

im from argentina sadly

normal crest
#

wtf

normal crest
#

i'm from argentina too

#

let's meet up

#

(not like argentina is a super big country)

red flower
#

that would require me to leave my room

glass crown
#

whats the best way to check that the player has a specific joker? i tried to like attempt it myself but it did not work

sturdy compass
#

Go get sprayed by the Iguazu Falls or smthn

normal crest
#

if next(SMODS.find_card("j_prefix_key")) then

glass crown
#

thank you

normal crest
red flower
#

greater buenos aires

normal crest
#

rip

#

too far

red flower
wispy falcon
wintry solar
#

It’s personal preference, whatever you’re used to

wispy falcon
#

Well, I'm used to nothing...

normal crest
#

pick one

#

flip a coin

red flower
#

all my threads died..

wintry solar
#

Poor wheel of mods, not classed as a thread 😭

red flower
#

oh right there's wheel today

sturdy compass
#

Yessir

unkempt thicket
#

I kind of hope it's not Aij i want him to play the update i'm working on.

sturdy compass
#

If Maximus gets hit I’m gonna be at work 😭

#

I’ll be able to tune in but not with full attention

lament agate
#

if it hit tangents, im killing myself

rotund sable
#

If it hits my mod I'm shooting the person that added it there

red flower
#

if it hits joyousspring it will be hilarious

rocky plaza
gilded goblet
#

do we have a list of contexts?

wispy falcon
#

What do I need to do if I use multiple files? Like if I want to split Jokers and Vouchers in there own file, how do I load them and stuff

red flower
gilded goblet
#

oh cool ty!

red flower
gilded goblet
# gilded goblet oh cool ty!

i had taken a look at that page yesterday but ig i just didnt read through it?... adhd brain didnt let me, i suppose

glad osprey
#

how do i get the jokers in the collection

wispy falcon
rotund sable
#

In your main file

glad osprey
wispy falcon
mystic river
#

it's all you need to add for the purpose of loading other files

#

you don't need to, like, remove everything else or anything

gritty monolith
#

can someone tell me what's wrong here and why the balatro says that in line 18 is not close when it's closed?

jolly shadow
#

jesus

gritty monolith
jolly shadow
#

Several syntax errors

gritty monolith
jolly shadow
gritty monolith
willow scroll
#

can someone point to a resource of how to use set_sprites inside (for example) SMODS.Enhancement? I want to have an enhancement that overlays the texture over the base card (sort of like the soul) but i cant find how to use the function

rotund sable
gritty monolith
#

a ok

#

i see it

rotund sable
#

After loc_txt and loc_vars

jolly shadow
# gritty monolith now?

You're missing commas in multiple places, line 22, 25, 33 and you have an extra closing bracket on 32

#

And on 39 your comma is inside a comment, needs to be before the dashes

gritty monolith
#

is really stressful for me

#

ok

#

i will make the changes

#

i think there're some errors

#

like, if i erase the bracket of line 32 the function end doesn't work

#

and i need it

keen atlas
proven belfry
#

how do I debuff everything except for 2's

#

definitely not using this for devious boss blinds

jolly shadow
wispy falcon
#

What size are Sticker in Balatro?

gilded goblet
#

is create_card() random? i cant seem to wrap my head around how riff raff works, code-wise

proven belfry
proven belfry
#

use add_card

gilded goblet
#

no im just asking a question

#

im not trying to do anything rn im just trying to learn how it works

vast night
rotund sable
proven belfry
red flower
gritty monolith
#

i have the error in balatro of the line 18 with config, i don't know what i need to change

clear ocean
#

https://github.com/Steamodded/Wiki curious question about the wiki. how were you able to make it sync with the github wiki, is there some way to make it just a folder within the main repo, or does it have to be a seperate repo

GitHub

Contribute to Steamodded/Wiki development by creating an account on GitHub.

gritty monolith
#

why is an error in the line 18 with config? i don't understand

proven belfry
gritty monolith
proven belfry
rotund sable
gritty monolith
#

so what should i do?

proven belfry
gilded goblet
gritty monolith
#

beacause the error is in the line 18

gritty monolith
#

this is my first time

proven belfry
wispy falcon
red flower
wispy falcon
#

Or is there even a set size

gritty monolith
#

let me check again

#

in the line 18, but what's the problem?

proven belfry
knotty orchid
#

Any reason some of my jokers appear like the img and with the same text value others work perfectly?

gritty monolith
proven belfry
gritty monolith
#

just that?

#

ok

#

now at least that's fix

#

but

#

there's another

#

let's see

proven belfry
gritty monolith
#

yeah that's what i was thinking

rotund sable
#

wheres the comma after loc_vars

gritty monolith
#

like this?

rotund sable
gritty monolith
#

aaaaaaah that

rotund sable
#

no not on calculate

proven belfry
#

how do I find hand size

gritty monolith
#

ok another thing fixed, but another thing

rotund sable
proven belfry
gritty monolith
#

ok

#

i'll try in the game

#

please i want this to work

#

-# another...

#

i'm at point to cry

#

let's see the code

proven belfry
knotty orchid
#
 j_ina_Kevin = {
                name = "Kevin",
                text = {{"a"},{"b"}}
            },```
why does this generates an extra text block on some jokers?
clear ocean
gritty monolith
#

like this? or...

clear ocean
rocky plaza
knotty orchid
#

Yeah I know

#

but a 3rd box is generated

#

for some reason

#

and only in some jokers

rocky plaza
#

a 3rd?

knotty orchid
#

yep

gritty monolith
#

finallyy

rocky plaza
#

huh that should only make 2

gritty monolith
#

it's working

proven belfry
#

how do I make boss blinds debuff everything except a certain rank

knotty orchid
gritty monolith
rocky plaza
# knotty orchid

hmm can i see the joker code
maybe something funky is happening there?

knotty orchid
#

sure, one sec

knotty orchid
# rocky plaza hmm can i see the joker code maybe something funky is happening there?
local Kevin = J({
  name = "Kevin",
  pos = { x = 0, y = 0 },
  config = { extra = { retriggers = 1, triggered = false } },
  rarity = 2,
  pools = { ["Raimon"] = true },
  cost = 8,
  atlas = "Jokers01",
  itype = "Forest",
  iposition = "FW",
  iteam = "Raimon",
  blueprint_compat = true,
  calculate = function(self, card, context)
    if context.retrigger_joker_check and not context.retrigger_joker and context.other_card ~= self then
      card.ability.extra.triggered = true;
      local index
      for k, v in ipairs(G.jokers.cards) do
        if v == card then
          index = k
          break
        end
      end
      if context.other_card == G.jokers.cards[index + 1] and is_position(context.other_card, "FW") then
        return {
          message = localize("k_again_ex"),
          repetitions = card.ability.extra.retriggers,
          card = card,
        }
      else
        return nil, true
      end
    end
  end,
})```
clear ocean
#

are projects a good way to keep track of your work?

rocky plaza
gritty monolith
#

what is this error?

rocky plaza
gritty monolith
#

let me show you

#

practically all is right, but the text is not working or saying so it's causing errors

wispy falcon
#

Does anyone know what size stickers need to be or are? Or what I need for SMODS.Sticker?

knotty orchid
# rocky plaza strange, nothing seems to be wrong here You haven't directly messed with the UI ...
Pokerleven.generate_info_ui = function(self, info_queue, card, desc_nodes, specific_vars, full_UI_table)
    SMODS.Center.generate_ui(self, info_queue, card, desc_nodes, specific_vars, full_UI_table)

    if desc_nodes == full_UI_table.main then
        -- Add type information under names
        full_UI_table.name = {
            {
                n = G.UIT.C,
                config = { align = "cm", padding = 0.05 },
                nodes = {
                    {
                        n = G.UIT.R,
                        config = { align = "cm" },
                        nodes = full_UI_table.name
                    },
                    {
                        n = G.UIT.R,
                        config = { align = "cm" },
                        nodes = Pokerleven.get_type_ui(card)
                    },
                }
            }
        }
    end
end

this is all I have done. The get_type_ui shouldn't mess anything up

rocky plaza
gritty monolith
#

nope

#

it's not working

#

like this not?

rocky plaza
gilded goblet
#

could you just send the code here?
do something like:

```lua
*your code*
```

slim ferry
pure verge
#

i cant figure out why it isnt triggering code:
SMODS.Joker{
key= "magnet",
blueprint_compat = true,
rarity = 2,
cost = 8,
pos = { x = 0, y = 0},
config = { extra = { xmult = 2 } },
loc_vars = function(self, info_queue, card)
return { vars = { card.ability.extra.xmult } }
end,
calculate = function( self, card, context)
if context.individual and context.cardarea == G.play and
SMODS.has_enhancement(context.other_card, "m_steel") then
return{
xmult = card.ability.extra.xmult
}
end
end
}

rotund sable
#

Would Balatro boot up on 4 GB of DDR3 RAM? Because my main PC is having problems rn

wispy falcon
gritty monolith
#


SMODS.Atlas{
    key = 'Jokers',
    path = 'Jokers.png',
    px = 71,
    py = 95,
}

SMODS.Joker{
    key = 'Mezmerize_joker',
    loc_txt = {
        name = 'Mezmerize',
        text = 'Este {C:attention} comodin',
               'da un multi de {X:mult,C:White} X#2#',
       },

    atlas = 'Jokers',
    pos = {x = 0, y = 0},
    config = { extra = { 
            Xumlt = 2    
        }
   },

   loc_vars = function(self,info_queue,center)
       return {vars = {center.ability,extra.Xmult}
    }
    end,
    calculate = function(self,card,context)
        if context.joker_main then
            return {
                card = card,
                Xmult = card.ability.extra.Xmult,
                message = 'X', -- card.ability.extra.Xmult
                colour = G.C.MULT
            }
        end
    end
   }

it's not working

pure verge
#

you wrote xumlt

#

not xmult

gritty monolith
#

oh

rocky plaza
#

yo

SMODS.Atlas{
    key = 'Jokers',
    path = 'Jokers.png',
    px = 71,
    py = 95,
}

SMODS.Joker{
    key = 'Mezmerize_joker',
    loc_txt = {
        name = 'Mezmerize',
        text = {'Este {C:attention} comodin', -- forgot {
               'da un multi de {X:mult,C:White} X#2#'} -- and a closing }
       },

    atlas = 'Jokers',
    pos = {x = 0, y = 0},
    config = { extra = { 
            Xmult = 2    
        }
   },

   loc_vars = function(self,info_queue,center)
       return {vars = {center.ability,extra.Xmult}
    }
    end,
    calculate = function(self,card,context)
        if context.joker_main then
            return {
                card = card,
                Xmult = card.ability.extra.Xmult,
                message = 'X', -- card.ability.extra.Xmult
                colour = G.C.MULT
            }
        end
    end
   }
gritty monolith
#

yeah

#

ok ok thanks

proven belfry
#

how do I set the boss blind to a specific one via a consumable

knotty orchid
# rocky plaza strange, nothing seems to be wrong here You haven't directly messed with the UI ...
local Celia = J({
    name = "Celia",
    pos = { x = 1, y = 0 },
    config = { extra = {} },
    loc_vars = function(self, info_queue, center)
        return {}
    end,
    rarity = 1,
    special = "Manager",
    cost = 4,
    atlas = "Managers01",
    calculate = function(self, card, context)
        if context.starting_shop then
            jude = get_joker_with_key("j_ina_Jude")
            if jude then
                return {
                    message = ina_evolve(jude, "j_ina_Jude_Raimon")
                }
            end
        end
        if context.setting_blind then
            --TODO only common?
            local selected_joker = create_random_ina_joker('Celia', 'Common', G.ina_bench_area, 'Scout', false)
            G.ina_bench_area:emplace(selected_joker)
            selected_joker:add_to_deck()
            Pokerleven.open_bench(true, true)
            G.E_MANAGER:add_event(Event({
                trigger = 'after',
                delay = 2.0,
                func = (function()
                    Pokerleven.open_bench(true, false)
                    return true
                end)
            }))
        end
    end,
})```
This one works perfectly for some reason
slim ferry
pure verge
#

wdym

slim ferry
#

like if its not in your main file you need to load it with SMODS.load_file

pure verge
#

it is

#

like assets

rocky plaza
slim ferry
#

or in another file that gets loaded from your main file

#

but regardless you need to eventually do this

#

to get the file to load in the game

pure verge
#

ok

slim ferry
#

with the actual file path for the file relative to the main file

pure verge
slim ferry
pure verge
#

ok

#

the string is the path right?

slim ferry
#

yeah

gritty monolith
#

i was playing and my card appears in the shop and it's crashed

gritty monolith
rotund sable
#

Probably card,extra

#

Instead of a .

gritty monolith
#
SMODS.Atlas{
    key = 'Jokers',
    path = 'Jokers.png',
    px = 71,
    py = 95,
}

SMODS.Joker{
    key = 'Mezmerize_joker',
    loc_txt = {
        name = 'Mezmerize',
        text = {'Este {C:attention} comodin',
               'da un multi de {X:mult,C:White} X#2#'},
       },

    atlas = 'Jokers',
    pos = {x = 0, y = 0},
    config = { extra = { 
            Xmult = 2    
        }
   },

   loc_vars = function(self,info_queue,center)
       return {vars = {center.ability,extra.Xmult}
    }
    end,
    calculate = function(self,card,context)
        if context.joker_main then
            return {
                card = card,
                Xmult = card.ability.extra.Xmult,
                message = 'X', -- card.ability.extra.Xmult
                colour = G.C.MULT
            }
        end
    end
   } 
pure verge
#

ability,extra

slim ferry
#

also should be card.ability.extra not center.ability,extra

gritty monolith
pure verge
#

yes\

slim ferry
#

oh

#

nvm you put center in the loc vars function

#

shouldnt matter then i think

gritty monolith
#

i'll see if this works

rocky plaza
knotty orchid
#

the problem was that en-US had 1 block and es_ES 2

#

and the game broke

rocky plaza
#

oh

knotty orchid
#

HAHAHA

gritty monolith
#

well...

#

the change didn't worked

knotty orchid
#

Thanks god I had the occurrence to see that

gritty monolith
#

the same error

#

and crash

#


SMODS.Atlas{
    key = 'Jokers',
    path = 'Jokers.png',
    px = 71,
    py = 95,
}

SMODS.Joker{
    key = 'Mezmerize_joker',
    loc_txt = {
        name = 'Mezmerize',
        text = {'Este {C:attention} comodin',
               'da un multi de {X:mult,C:White} X#2#'},
       },

    atlas = 'Jokers',
    pos = {x = 0, y = 0},
    config = { extra = { 
            Xmult = 2    
        }
   },

   loc_vars = function(self,info_queue,center)
       return {vars = {center.ability.extra.Xmult}
    }
    end,
    calculate = function(self,card,context)
        if context.joker_main then
            return {
                card = card,
                Xmult = card.ability.extra.Xmult,
                message = 'X', -- card.ability.extra.Xmult
                colour = G.C.MULT
            }
        end
    end
   } 
red flower
slim ferry
#

holy shit a good wiki!!!

knotty orchid
gritty monolith
#

i don't know what to do, why it crashes when it appear in the store?

red flower
gritty monolith
#

i need to add more code lines for the price of the joker?

slim ferry
#

oh yeah youre missing a cost for the joker

glass crown
#

how do you get the value of a config option?

gritty monolith
#

yeah and the X2 mult doesn't appear too

red flower
slim ferry
#

xmult doesnt need a message it does it automatically

#

also you should be using #1# because the xmult is the first variable in the loc_vars

glass crown
gritty monolith
red flower
slim ferry
#

message and colour

gritty monolith
#

and for the price of the joker?

#

how i do that?

slim ferry
#

in the joker parameters

modern kindle
#

Chat i am awake again hello

wispy falcon
#

How do I get Stickers to show in-game?

slim ferry
#

it literally says it at the bottom of the SMODS.Sticker page

glass crown
# red flower `SMODS.Mods.your_mod_id.config.your_value`

i have the lines of code here in my main file,

    SMODS.load_file("items/reference.lua")()
end```
i have a `config.lua` returning a `reference_enabled` value of `true`
and in my json that holds my metadata the `id` value is `votd`
it still doesn't work though, what am i doing wrong here?
gritty monolith
wispy falcon
slim ferry
#

wdym

#

if your stickers arent in the collection then you just arent loading the file

wispy falcon
gritty monolith
# slim ferry code?


SMODS.Atlas{
    key = 'Jokers',
    path = 'Jokers.png',
    px = 71,
    py = 95,
}

SMODS.Joker{
    key = 'Mezmerize_joker',
    loc_txt = {
        name = 'Mezmerize',
        text = {'Este {C:attention} comodin',
               'da un multi de {X:mult,C:white}X#1#'},
       },

    atlas = 'Jokers',
    pos = {x = 0, y = 0},
    config = { extra = { 
        Xmult = 2
        },
   cost = 4
   },

   loc_vars = function(self,info_queue,center)
       return {vars = {center.ability.extra.Xmult}
    }
    end,
    calculate = function(self,card,context)
        if context.joker_main then
            return {
                card = card,
                Xmult = card.ability.extra.Xmult,
            }
        end
    end
   } 
slim ferry
#

cost should be outside the config

gritty monolith
slim ferry
#

and you dont need card = card in your return i think

#

that doesnt do anything afaik

#

and it should be xmult and not Xmult i think

gritty monolith
#


SMODS.Atlas{
    key = 'Jokers',
    path = 'Jokers.png',
    px = 71,
    py = 95,
}

SMODS.Joker{
    key = 'Mezmerize_joker',
    loc_txt = {
        name = 'Mezmerize',
        text = {'Este {C:attention} comodin',
               'da un multi de {X:mult,C:white}X#1#'},
       },

    atlas = 'Jokers',
    pos = {x = 0, y = 0},
    config = { cost = 4, extra = { 
        Xmult = 2
        }
   },

   loc_vars = function(self,info_queue,center)
       return {vars = {center.ability.extra.Xmult}
    }
    end,
    calculate = function(self,card,context)
        if context.joker_main then
            return {
                card = card,
                Xmult = card.ability.extra.Xmult,
            }
        end
    end
   }
slim ferry
#

cost otuside the config

#

you just

#

moved it to somewhere else in the config

#

its its own parameter

#

seperate from config

gritty monolith
#

aaaaa ok ok

red flower
modern kindle
#

Hi n

frigid cargo
#

hi N

red flower
#

hello

#

hi

modern kindle
#

I took some fat and rotund naps

frigid cargo
#

bump

red flower
#

lets goo

glass crown
modern kindle
# frigid cargo bump

You've been bumping this so much lmao

Is that still using the old probability system

#

Or does it use the new one

willow scroll
#

anybody have an example of how set_sprites works? i want to have an enhancement where the sprite gets overlaid on top of the card itself.

wispy falcon
frigid cargo
slim ferry
modern kindle
#

can you send your whole joker over

wispy falcon
slim ferry
#

in your localization file

#

or loc_txt if you use that

#

also your sticker needs a badge_colour for the colour of the badge if you dont want it white

wispy falcon
# slim ferry in your localization file

I did that

    descriptions = {
        Sticker = {
            st_sj_death = {
                name = "Death",
                text = {
                    {
                        "If you still have this card",
                        "after X rounds, immediately lose"
                    }
                },
            },
        }
    }
}
rotund sable
#

What's st_

slim ferry
#

have you tried using vanillaremade as a reference for your localization files

rotund sable
#

Am I stupid or sum

slim ferry
#

also stickers dont have a prefix

#

idk what youre trying with st_

wispy falcon
clear ocean
#

is this a good readme

slim ferry
#

it literally cant be because the mod prefix is after the st_

#

which means it would be different

rotund sable
#

Oh right

wispy falcon
#

What? Am I being stupid again?

frigid cargo
wispy falcon
#

Okay, what should I try/send now?

slim ferry
#

so the sticker key physically cannot be st_sj_death assuming the mod prefix is sj_

modern kindle
glass crown
wispy falcon
slim ferry
#

yes because

#

with jokers

#

the prefix is added automatically

#

because its part of a joker

latent perch
#

Pearlkeo

slim ferry
#

stickers dont have a prefix, youre just adding something to the sticker key

#

the joker class prefix of j_ is added after the mod prefix

#

that doesnt work when youre manually adding a prefix because its not actually a prefix

modern kindle
wispy falcon
digital mason
#

hey I get this error message when I try to open malverk textures

slim ferry
frigid cargo
modern kindle
#

alright

wispy falcon
# slim ferry assuming the key you gave for the sticker is just `death` yeah

Now i get this error...

    key = "death",
    path = "death.png",
    px = 71,
    py = 95
})

SMODS.Sticker{
    key = "death",
    pos = { x = 0, y = 0 },
    badge_color = "000000",
    default_compat = true,
    rate = 1,
    needs_enable_flag = false,
    sets = {
        Joker = true,
    }
}```

localization:

```return {
    descriptions = {
        Sticker = {
            sj_death = {
                name = "Death",
                text = {
                    {
                        "If you still have this card",
                        "after X rounds, immediately lose"
                    }
                },
            },
        }
    }
}```
modern kindle
glass crown
#

can anyone point me to a good example of a mod's config tab structure i can look at? trying to do this myself with only the documentation is giving me a major headache

red flower
frigid cargo
modern kindle
#

okay cool, just wanted to be sure

distant junco
#

im trying to check if a joker is in the joker area. i know how to do that and i know how to do it with stock jokers but im trying to find one of my modded jokers and i dont know the combination of key and prefix and its really throwing for a loop

wispy falcon
distant junco
wispy falcon
#

So what's wrong with my sticker that it shows error and an empty label + description?

rotund sable
wispy falcon
rotund sable
#

That probably means that the entry is invalid

#

I have no idea about it because I just use loc_txt

wispy falcon
#

No idea what the reason for it could be?

rotund sable
wispy falcon
modern kindle
#

just testing with 3+ of them now and if it works il send over my changes

#

alright i didnt crash with 5 of them

#

what kinda blud doesnt accept messages from someone in the same server

frigid cargo
modern kindle
red flower
#

will keep writing stuff today

red flower
hardy ibex
#

Great stuff!

chrome widget
#

Hmmmm..... best way to make a glass card retrigger when it's about to break.....

wispy falcon
#

Does anyone know how I change the badge text from Error? This is the only thing that I have left when it comes to looks

latent perch
chrome widget
#

Hm..... does anyone know the general order of when card retriggers are added relative to other contexts?

modern kindle
#

not a single clue, i was gonna say cant you just delay the shatter once you return that its going to break in the probability
cause cant you get when its gonna break witht he new prob stuff

chrome widget
#

hmmmm seems repetitions occur before any remove_playing_card calculations

#

What's the easiest way to force a new scoring calculation for a card?

#

just call SMODS.score_card again?

timid zinc
#

I just want to make sure, is this how i'm supposed to modify my probability?

#

Well i'm probably supposed to do ''.. for the return numerator only but

red flower
#

the second argument to get_probability_vars should be just 1, you dont use G.probabilities.normal anymore

#

everything else is correct

timid zinc
#

okay

clear ocean
#

next joker idea: lucky seven
when seven is played

  1. turn it into a lucky card
  2. retrigger the lucky card
  3. double the prob of seven lucky cards
  4. always successfully trigger
#

the art i'm thinking of is having the slot machine seven with a simple background maybe shining like its a sun?

timid zinc
clear ocean
#

like it would pair well art wise with cloud nine

hushed field
#

That's a pretty damn strong effect for a lucky 7 joker, honestly, or is it just that you're debating between the 4 effects?

clear ocean
#

yeah debating them

modern kindle
#

hi ice

clear ocean
#

because four on its own sounds overpowered especially with lucky cat

hushed field
#

yo dilly

modern kindle
#

doesnt need all of those effects

hushed field
#

I have a joker that has a chance to destroy lucky cards and increase their odds by 1, and while it's bad for naninf runs, it's incredibly strong when you're trying to win ante 8. Guaranteeing would be even stronger

clear ocean
modern kindle
#

i miss lucky number slevin

hushed field
#

I'm trying to think which versions of a lucky 7 joker I've seen that I really liked, but I think they've all kinda amalgamated

#

I mean, Slevin lives on, your code for him just perished 😛

clear ocean
#

gamblecore 🗣️💯🔥

modern kindle
#

i had such a nice little implementation :b

next timber
#

dont suppose anyone knows how to replace an atlas without requiring the player to have malverk? for some reason this doesnt seem to be working:

SMODS.Atlas:take_ownership('Tarot',{
  path = 'Tarots.png'
})
hushed field
#

Oh, I should see if I can find the timestamp, it caused some fun bugs in hyper specific situations when the mod was being streamed, haha

clear ocean
#

for memory card everything is done but i haven't honestly like my attempts at drawing it so i'll keep it as a blank placeholder for later

clear ocean
#

oh yeah curious question when making branches would that impact debugging?

#

like if i make a branch to work on lucky seven would i be able to test it out

red flower
#

yes

#

branches are like replacing the entire folder for a new one

modern kindle
#

N can you fix me

red flower
modern kindle
#

im sleepy + i still havent fixed some things i need to

#

so fix me

clear ocean
modern kindle
#

i do this cool thing where all of my testing happens on my main branch

#

i dont do anything on a separate branch

clear ocean
knotty orchid
#

If I define a new variable in G.GAME that changes in run, I shall store it somewhere for the continue functionality to work right?

modern kindle
# clear ocean

im the only one working and ever testing anyway so i may as well
i dont push anything until ive seen i havent broken things ive changed usually

red flower
knotty orchid
#

mmmm

#

doesn't seem to work

#
function Game:start_run(args)
    game_start_run_ref_buttons(self, args)

    local atlas = G.ASSET_ATLAS["ina_resources"]

    local sprite = Sprite(0, 0, 0.6, 0.6, atlas, { x = 0, y = 0 })

    G.GAME.ina_show_barriers = false
    G.GAME.current_round.barriers = 0

maybe G.game should be before the original call here?

red flower
#

you're overwriting the values every time you restart

#
G.GAME.ina_show_barriers = G.GAME.ina_show_barriers or false
G.GAME.current_round.barriers = G.GAME.current_round.barriers or 0
clear ocean
#

will stylise, but is this good

knotty orchid
#

it actually worked putting it before the original call

#

lol

crystal perch
#

quick question, how do i get the card to display the labels for eternal, perishable, and rental
the eternal label works just fine, but once i added perishable and rental it began crashing
i know i'm probably formatting the info_queue wrong, but i'm not sure what else to try

red flower
crystal perch
knotty orchid
#

I'm going with this

clear ocean
#

like "become lucky and retrigger" sounds both weird but fine at the same time

modern kindle
#

id probably say uncommon, my logic always goes by how many youd have in a run, and youre only guaranteed 4 not including them getting destroyed and not including specifically deckfixing

crystal perch
#

well

#

baron is terrible if you dont deckfix

#

so

clear ocean
#

it only retriggers once like buskin

crystal perch
#

any retrigger effect is very very good

modern kindle
#

if you only balance around deckfixing then nothing is going to be balanced

crystal perch
#

it's a joker that you find and build around

modern kindle
#

any retrigger is only conditionally good
i have a card that retriggers all aces, but a default ace being retriggered isnt very good

void sparrow
#

anyone knows why my "i"'s don't appear in my description?

hushed field
#

Yeah, retriggered that target specific ranks are only as good as that rank's joker synergy

red flower
clear ocean
#

should the s in sevens/7s be yellow too

red flower
#

no

hushed field
void sparrow
#

i wrote it a long time ago but bc im lazy i will assume that i did

knotty orchid
#

@red flower maybe you can help about another question I have.
I have implemented big and small blinds with abilities, similar to bosses.
Rn everything works fine but when I continue a game that was left at a in play blind when I defeat it, the round starts from zero.

 local blind_get_type = Blind.get_type
function Blind:get_type()
    if self.small then
        return 'Small'
    elseif self.big then
        return 'Big'
    else
        return blind_get_type(self)
    end
end

local old_blind_save = Blind.save
function Blind:save()
    local save_table = old_blind_save(self)
    save_table.small = self.small
    save_table.big = self.big
    return save_table
end

local old_blind_load = Blind.load
function Blind:load(blindTable)
    old_blind_load(self, blindTable)
    self.small = blindTable.small
    self.big = blindTable.big
end

I think it has something to do with the blind load function as the savetable returns MANUAL_REPLACE
Any clue?

red flower
#

you're probably saving a cyclic table or something, I would ask Eremel about this tho

crystal perch
# red flower

i think you misunderstand, i just want them as an aside to describe the effect, like in the screenshot with the eternal label
when i input your code, it just returns with this crash

knotty orchid
red flower
crystal perch
#

oh i'll try that

wintry solar
#

there are lots and lots of things you need to change to make custom small and big blinds work

#

I will port it to smods at some point in the near future

knotty orchid
#

I think I'm waiting then

#

But oh man I thought I had it

#

all I was missing was the load

wispy falcon
#

Is there a way to make a game over when a condition is met?

crystal perch
wintry solar
knotty orchid
#

Mmm the only problem I encountered was the load one

chrome widget
# chrome widget just call SMODS.score_card again?

hm....... this doesn't seem to work. Might be too late for score_card to do anything because it doesn't expect it to occur here

if context.playing_card_removed and context.individual
and SMODS.has_enhancement(context.removed, 'm_glass') and context.removed.shattered then
    -- this part doesn't work at all
    sendDebugMessage('all checks passed')
    local old_cardarea = context.cardarea
    context.cardarea = G.play
    SMODS.score_card(context.removed, context)
    sendDebugMessage('scored card')
    context.cardarea = old_cardarea
    
    -- new card creation works fine
    local new_glass = SMODS.create_card({
        set = 'Enhanced',
        enhancement = 'm_glass',
        key = 'm_glass',
        skip_materialize = true
    })
    
    sendDebugMessage('created new glass card: '..tostring(new_glass))
        
    G.playing_card = (G.playing_card and G.playing_card + 1) or 1
    new_glass.playing_card = G.playing_card
    table.insert(G.playing_cards, new_glass)
    G.deck.config.card_limit = G.deck.config.card_limit + 1
    
    new_glass.states.visible = false
    new_glass:add_to_deck()
    new_glass:hard_set_T(G.ROOM.T.x + G.ROOM.T.w/2 - new_glass.T.w/2, G.ROOM.T.y + G.ROOM.T.h/2 - new_glass.T.h/2, new_glass.T.w, new_glass.T.h)
    playing_card_joker_effects({new_glass})
    
    local juice_card = context.blueprint_card or card
    G.E_MANAGER:add_event(Event({
      func = function()
          new_glass.states.visible = true
          new_glass:start_materialize({G.C.SECONDARY_SET.Enhanced})
          juice_card:juice_up()
          return true
          end
      }))
  draw_card(nil, G.discard, nil, 'up', false, new_glass)    
end```
knotty orchid
crystal perch
#

also while i'm here, there's this problem that's been bothering me for quite a while
i have a lovely patch which used to add shaders to my jokers and/or consumables, but ever since i updated something way back when it hasn't been working
any idea to get this fixed?

#

the ability set key name is correct btw