#💻・modding-dev

1 messages · Page 135 of 1

wicked leaf
#

you put brackets around must have room

#

also that

weary jungle
#

i fixed it

candid epoch
#

in example it does 😭

#

how the fuck am i wrong for doing stuff by the example

violet void
#

some examples may be outdated

#

pokermod is probably a good source for examples

#

it has pink seal you can copy

candid epoch
#

the heck is a pokermod

violet void
#

pokermon

candid epoch
#

that shit has multiple files :sob;

violet void
#

it only has 1 seal

#

search SMODS.seal

candid epoch
wicked leaf
#

NEVER look for examples in cryptid bruh I cant find shit

#

I also cant find like

#

none of the cards actual code in the regular game

violet void
wicked leaf
#

youd think theyd be in card.lua but no

violet void
#

it doesnt use smods syntax so its not a good example

candid epoch
#

how much time you guys gone insane while learning to make mods in balatro?

night pagoda
#

😭 I do not understand what in the game decides to stop drawing cards and switches to G.STATES.SELECTING_HAND in the update_draw_to_hand, can someone assist me in finding where the check for ending the hand drawing happens?

weary jungle
#

or something

#

maybe less

#

i always have balatro open when coding, so it counts as playtime

zealous glen
#

What do you want to know Firch

candid epoch
#

description is the only thing broken
WHY is it broken

#

it works on jokers, consumables, vouchers like this but not seals?!

violet void
#

did you check pokermon seal

candid epoch
#

i couldnt find it

violet void
#

wow

night pagoda
# zealous glen Maybe

I want to know where the condition is for stopping drawing card process - I extended the G.FUNCS.draw_from_deck_to_hand function but I realized it happens after the actual hand is drawn, and maybe I need an injection instead, but not sure where

candid epoch
#

i am very stupid, i know

#

but someone makeing 20 files for diffrent things makes difficult

#

their seals.lua has only functions of the seal

#

nothing about description and shit

zealous glen
#

And also a patch to include extra draws

violet void
night pagoda
#

I draw additional cards based on some condition, those supposed to go beyond the normal card limit but still should happen before the context for round start happens

candid epoch
#

that doesnt even have SMOD.

violet void
#

but I forgot it uses localization which youre not using so its not of help

zealous glen
night pagoda
zealous glen
#

And go over the limit

zealous glen
#

And I think it’s the only Joker with its context

night pagoda
#

could I take a look at it?

candid epoch
#

i am going insaneeee~

wicked leaf
zealous glen
night pagoda
night pagoda
zealous glen
#

I don't understand the issue exactly

candid epoch
wicked leaf
#

example for my most recent joker

candid epoch
#

weird
well i will delete description part and see what happens

zealous glen
# night pagoda extra draws? or both tbh

This adds a new context after draws

[manifest]
version = "1.0.0"
dump_lua = true
priority = 0

# After Draw Context
[[patches]]
[patches.regex]
target = "game.lua"
pattern = 'first_hand_drawn = true}\)\n(.*)end\n(.*)end'
position = "after"
payload = '''

if not (G.GAME.current_round.hands_played == 0 and
    G.GAME.current_round.discards_used == 0) then
    for i = 1, #G.jokers.cards do
        G.jokers.cards[i]:calculate_joker({vic_hand_drawn = true, vic_facing_blind = G.GAME.facing_blind})
    end
end
'''
match_indent = true
candid epoch
#

it worked, thanks man

zealous glen
#

And this should handle the extra draws

[[patches]]
[patches.pattern]
target = "functions/state_events.lua"
pattern = "local hand_space = e or math.min(#G.deck.cards, G.hand.config.card_limit - #G.hand.cards)"
position = "after"
payload = '''
hand_space = hand_space + (G.GAME.BuySellPack.extra_draw or 0)
G.GAME.BuySellPack.extra_draw = 0
'''
match_indent = true
overwrite = false
night pagoda
# zealous glen How so?

The way I add new drawn cards shouldn't allow their selection (or selection of any other card) while they're still in the process of drawing to the hand, but tweaking that would also require tweaking the timing to this

zealous glen
#

So they just create an Event to draw a card

violet void
candid epoch
#

oke, now i need the deck as last thing...

candid epoch
tall wharf
#

is this not correct

zealous glen
#

@night pagoda here's a Joker that draws a 3

calculate = function(self, card, context)
        if context.first_hand_drawn and #G.deck.cards > 0 then
            G.E_MANAGER:add_event(Event({
                trigger = 'before',
                func = function()
                    local _cards = {}
                    for i = 1, #G.deck.cards do
                        local _card = G.deck.cards[i]
                        if _card:get_id() == 3 and not _card.ability.vic_drawing then
                            _cards[#_cards + 1] = _card
                        end
                    end
                    if #_cards > 0 then
                        local _card = pseudorandom_element(_cards, pseudoseed("j_vic_tour_guide"))
                        _card.ability.vic_drawing = true
                        card_eval_status_text(context.blueprint_card or card, 'extra', nil, nil, nil, {
                            message = 'tour guide',
                            colour = G.C.PURPLE,
                            instant = true
                        })
                        -- if _card and not _card.removed and _card.area == G.deck then
                        draw_card(G.deck, G.hand, nil, 'up', true, _card)
                        -- end
                        G.E_MANAGER:add_event(Event({
                            trigger = 'before',
                            delay = 0.1,
                            func = function()
                                _card.ability.vic_drawing = nil
                                return true
                            end
                        }))
                    end
                    return true
                end
            }))
        end
    end
frosty dock
tall wharf
#

OH

#

ok

violet void
tall wharf
#

thank you

#

i am so stupid

#

it didn't cross my mind at all that that is the case

#

even tho i have seen it before

sand oasis
#

is there a context a joker can run to constantly be aware of its own value, like Stencil being aware of how many jokers there are?

violet void
#

stencil uses the update function

#

which is run at every frame

sand oasis
#

ahhh

zealous glen
#

but why

#

if you need information you can just compute it when you need it

#

rather than every frame

sand oasis
#

true but it's nice to have that information

#

it's basically going to be the reverse function of a stencil, building Xmult as there are more jokers

candid epoch
#

now, how do i add vouchers to the deck? i got the base from example

#

and also +1 consumable slot

weary jungle
#

4 more runes to go!!!!

tall wharf
#

crash when i hover on the blind in collection menu

candid epoch
#

how the heck you made a crash with hovering?

tall wharf
#

inb4 rookie mistake again

candid epoch
#

h o w

plain wyvern
#

do you have a blind size maybe

sturdy compass
#

Question: Is there an easy way to get least frequent rank in the deck? Or do I have to loop through the entire deck and keep track of it myself?

tall wharf
#

this one?

plain wyvern
#

huh

#

yea

tall wharf
#

yeah probably

#

i think it's a rookie mistake of mine

#

i wrote score instead of mult

#

silly me

sturdy compass
#

Oop

tall wharf
#

NVM

#

still crashes

sturdy compass
#

Same error code?

tall wharf
#

yea

#

oh

#

maybe

#

boss colour

weary jungle
#

whats even happening at ui.lua line 698

sturdy compass
#

I haven’t done anything with blinds yet but my guess is it would have to do with the min/max?

tall wharf
#

i think it's my fault again

#

the boss_blind is for some reason a table in my code

sturdy compass
#

Wha

tall wharf
#

should be fixed

sturdy compass
#

How did you manage that lmao

tall wharf
candid epoch
#

what to do here so deck has 2 vouchers and 1 additional consumable slot?

tall wharf
#

there we go

sturdy compass
#

Huge

sturdy compass
maiden river
#

cards going along well

tall wharf
#

lmao selling luchador should not lose wtf

maiden river
#

bro couldn't handle it

candid epoch
sturdy compass
#

Ah

#

Could maybe set up a pool?

candid epoch
#

i dont know what i am suppose to do, ngl

weary jungle
#

these 2 lines are so old 😭

#

this was before the wiki was good

#

when the wiki had like 10 pages total

sturdy compass
candid epoch
#

isnt vanilla deck and modded deck codes very diffrent tho?

weary jungle
#

maybe an add_to_deck

sturdy compass
#

I’m unsure, haven’t done much with decks yet lol

#

I’m just going based off what I currently know

candid epoch
#

also i want add consumable slot without the voucher

tall wharf
hardy viper
#

wtf omori ?!

weary jungle
candid epoch
#

alrighty, so now the vouchers left

tight thistle
#

hello! i wanted to ask, is there a way to quickly obtain a joker for testing and debugging purposes? id like to give myself a joker i made so i can begin testing it!

weary jungle
#

debug plus

tight thistle
#

thank you!

tall wharf
weary jungle
wooden badge
#

Anyone know a quick way to run a check for AFTER a hand is played? - I mean after the score and everything is evaluated and done I want something to happen the moment after all of that

weary jungle
#

contexts probably

wooden badge
#

I might just be being dumb here

#

its probably a context

weary jungle
#

on a joker?

wooden badge
#

anyone know where I can find a list of all context calls?

candid epoch
weary jungle
candid epoch
tall wharf
candid epoch
wooden badge
weary jungle
storm kraken
candid epoch
#

the function? it doesnt make it work there with consumable slot

weary jungle
#

ok idk then

candid epoch
#

unless i done it wrong

weary jungle
#

i was just guessing

candid epoch
#

wheres the page about the deck on steammodded github?

weary jungle
candid epoch
#

give me link to that

weary jungle
#

the functions are at the bottom

tall wharf
#

uhhhhhhhhhhhhhh

night pagoda
#
  • "Saved by Mr. Bones"
    gee thanks mr bones
maiden river
#

lookin snazzy

candid epoch
#

oke, so what i can put in back.apply exacly?

tall wharf
candid epoch
#

how the fuck-

viscid bough
#

anyone think this is too strong or too weak?

candid epoch
#

i guess its depending when you obtain it

#

at round 1? broken

maiden river
tall wharf
viscid bough
maiden river
#

cost

#

like how much to buy it from the shop

viscid bough
#

i havent set it yet but im thinking about 10-12 dollars

maiden river
weary jungle
#

make it always rental egg

candid epoch
#

then that wont be able to get on round 1 unless white stake

#

or golden deck

storm kraken
candid epoch
#

guys, how do i exacly structure Back.apply(self, back)?

candid epoch
storm kraken
#

imagine getting money

candid epoch
#

though, it is bad when 0 money while blind chips requirment is almost 2x

oblique pond
#

it looks like the blind size and reward money is random

storm kraken
#

its 3.5x

#

skull

storm kraken
weary jungle
#

random as in random or random

oblique pond
#

random as in random

weary jungle
#

funny

oblique pond
#

not sure how you'd do that though

candid epoch
#

i have no idea if this is currect

weary jungle
#

apply = function(self, back)

#

end,

#

iirc

candid epoch
#

without the "back"?

weary jungle
#

yea

storm kraken
#

i made the blind chips mult like that because the original idea was 1 in 6 chance for you to die on selling joker but i couldnt do that so yeah
the money tho, i just hate being nice or even sub par

#

may just make it remove the money

candid epoch
oblique pond
storm kraken
#

true...

candid epoch
weary jungle
#

3 more runes! 3 more runes!

maiden river
candid epoch
#

vouchers left

maiden river
#

would be a nice card to hang on to

glass scaffold
#

Is there a way to make packs unskippable?

violet void
candid epoch
#

well, not without rewritting whole codeing stuff

glass scaffold
#

ah

candid epoch
#

also hi rolo, you know the code for vouchers when run starts with my deck?

violet void
#

I dont have any experience with Vouchers yet

tall wharf
weary jungle
#

add_to_deck?

candid epoch
wintry solar
tall wharf
#

i think you should be allowed to do the 2x thing actually

weary jungle
#

its like for everything?

violet void
#

too slow for Chicot

violet void
tall wharf
#

is there a better way to change boss blind

#

for debugging

violet void
tall wharf
#

wtf

#

you can do that

#

😭

violet void
#

yes

#

how have you been doing it until now?

weary jungle
tall wharf
#

rerolling 😭

violet void
#

rip...

tall wharf
candid epoch
#

i have no clue what the fuck i am doing

weary jungle
candid epoch
#

"thigs"

#

Eremel dropped a link
no explanation
refused to elaborate lmao

weary jungle
oblique pond
#

it's an ortalab deck that does the start with voucher thing

wintry solar
weary jungle
#

shut up !!!!

#

sorry

candid epoch
#

lmaooo

weary jungle
#

i dont want to code

#

i have no ideas

#

and im almost done

#

i have 3 runes to go

candid epoch
#

i think i fucked up something

    loc_vars = function(self, info_queue, card)
        return {vars = {localize({type = 'name_text', set = 'Voucher', key = self.config.vouchers[1]}), localize({type = 'name_text', set = 'Voucher', key = self.config.vouchers[2]})
    end,
    apply = function(self, back)
        G.GAME.starting_params.consumable_slots = 3,        
    end,```
maiden river
#

does anyone know how to get the rank of a playing card, perchance

violet void
maiden river
#

big

violet void
#

Aces are 14

candid epoch
violet void
weary jungle
#

try removing loc_vars

candid epoch
#

why?

weary jungle
#

you have no vars

#

no #1#

#

and also you probably dont have a en_us, so localization function probably doesnt work

candid epoch
#

its to apply vouchers, not get em in description

weary jungle
#

loc vars is for localization

#

i think the config applies the vouchers

candid epoch
#

@wintry solar you lied to meeeee

weary jungle
#

you might have copied to much

#

you were only supposed to copy the config section

#

not the loc_vars

glass scaffold
#

How do I give cards that are scored a random enhancement?

candid epoch
#

well, now that i did, it still crases

weary jungle
#

what is the crash?

candid epoch
#

i am going super insane

weary jungle
#

send your back code

#

there might be a syntax error somewhere maybe

candid epoch
#

SMODS.Back{
name = "Potion Deck",
key = "potiondeck",
atlas = "PotionUP",
pos = {x = 3, y = 2},
loc_txt = {
name = "Potion Deck",
text ={
"Start the run with",
"{C:attention}Potion Merchant{} and",
"{C:attention}Potion Crafter{} vouchers.",
"+1 {C:purple}consumable{} slot",
},
},
config = {vouchers = {'v_potionup_potmerch', 'v_potionup_potcraft'}},
apply = function(self, back)
G.GAME.starting_params.consumable_slots = 3,
end,
}

weary jungle
#

you have a lot of commas everywhere

#

like at the end

candid epoch
#

the end coma is not an issue

#

i seen it alot of other projects

weary jungle
#

remove comma on G.GAME.starting_params.consumable_slots = 3,

#

thats the issue

candid epoch
#

ah, oke

#

thanks

#

yep, now it works

#

🟩 deck
🟨 consumables
🟨 jokers
🟨 vouchers
🟨 seal

#

got 5 to make, and it be finished

candid epoch
#

hm?

weary jungle
#

pirate

candid epoch
#

why pirate

weary jungle
#

it be finished

autumn geode
#

is there an easy way to make your enhanced card be able to enhance other played cards?

candid epoch
#

i am confused

wicked leaf
#

Is there a way to make a joker unobtainable without outright disabling it?

wicked leaf
#

got it

candid epoch
autumn geode
#

basically it has a chance to convert other playing cards into the same enhancement

candid epoch
#

its a virus!

autumn geode
#

yeah like a virus

#

but from what ive trawled through the games source code i cant see a way i could do it with a custom enhancement

candid epoch
#

well, ofc not from source code because they dont have it in vanilla

glass scaffold
#

Anyone know the code that gives a card a random enchant when scored?

autumn geode
candid epoch
#

now i wonder how will i make all the stuff work
but i guess thats for tommorow

weary jungle
#

calculate function?

candid epoch
#

you talking to kazaxc, right?

weary jungle
#

yes

autumn geode
#

it will be in the calc function but whats the method of adding an enhancement to a card when its not a base one already in the game

weary jungle
#

:set_ability iirc

weary jungle
autumn geode
#

oh can i just use the key set in it thanks

maiden phoenix
#

@violet void Sent you a friend req to DM you the script

sturdy compass
#

Question: Is there an easy way to get the least frequent rank in the deck? Or do I have to loop through the entire deck and keep track of it myself?

violet void
#

you can make a thread here

tall wharf
sturdy compass
#

those look great

glass scaffold
#

is there a way to give a card a random enchant without making a whole new function?

tall wharf
violet void
#

worst legendary

storm kraken
# tall wharf

imagine getting chicot and not paying attwntion to the blind boss

maiden phoenix
tall wharf
glass scaffold
tall wharf
#

unfinished

violet void
#

could you resend the request
-# if you still want to

sturdy compass
tall wharf
#

i think i just make the thing disable boss blind

#

like

#

score normally

sturdy compass
#

That's probably a good idea

tepid crow
# tall wharf :(

if you want it to just skip the blind, you could take a look at the debug(plus?) implementation of "Win Blind", but I will say that having to score normally makes more sense lol

lyric blade
#

Is there a way to make two soul_pos on a Joker to have two things floating differently on the card?

solar tide
#

Hi,
i've a little problem, i know its seem easy to resolve but i dont find the answer on the discord and i try a lot of thing but variable still show nil, can u help me to resolve it peepoSUEUR

#

thanks in advance

sturdy compass
#

The X in '#X1#' should not be in the #'s. The correct code would be 'X#1#'

solar tide
#

thanks but does the same already tried sad

sturdy compass
#

You also do not have a loc_vars

wooden badge
#

the #1# refers to the first variable in your loc_vars return

#

so that must be missing

solar tide
#

oh yesss

#

im stupid

#

😭

#

thankssss

#

its that

sturdy compass
#

it does happen

night pagoda
#

Is it still not possible to inject into steamodded?

gaunt thistle
#

next update

#

which should be somewhat soon

sturdy compass
#

yahoo

night pagoda
#

yaay, thanks!

#

need this real bad

sturdy compass
#

I didn't know that was planned but is def something I needed lol

sturdy compass
tall wharf
#

i am going to have to make a ui now

#

it's unavoidable

#

time to nerf chicot

#

adding a boss blind that benefits you

#

at least in some way

#

heavier base requirement but helps in some way

tawdry rapids
#

Hey, I know this is probably asked a lot, but I got inspired by a friend to try modding Balatro, and I was wondering if there were any resources, programs to look at, or places to start? Pitfalls to avoid? I'm still google searching, but I figured to ask the people with experience.

sturdy compass
#

This channel and the SMODS wiki will be your greatest resources

tawdry rapids
#

is smods "steammodded"?

#

just making sure

#

I have programming experience, but I haven't modded before

plain wyvern
#

yeah

#

it's called "steamodded" to be precise but yeahg

upper sundial
#

Hey, quick question - would it be fine for me to reimplement the entire game (or, well, just scoring and progression mechanics) in a different language without a cleanroom approach? Cryptid hands usually take eons to score, so I was gonna try to use a different approach to score calculation to speed that up

tawdry rapids
plain wyvern
#

u fine 👍

wintry brook
#

im trying to learn patches and im looking at this patch but theres no such pattern in card.lua anywhere

primal marsh
#

May I ask here for help for my game crashing/not loading on startup?

viscid bough
primal marsh
#

Its about mod use. I thought I might get better results here since modders tend to understand the game and its logs

wintry brook
#

the crash logs usually dont say which mod is having the crash, but my bet is on talisman

#

put mods into a disabled folder and test which one exactly is causing the crash

sturdy compass
wintry brook
#

i couldnt find card.lua in lovely dump, but i may be doing something wrong with that

sturdy compass
#

It should definitely be there. If you have your file explorer open to the dump folder when you run the game you'll have to refresh it to see the updated files

wintry brook
#

i was looking in the wrong lovely folder lol

sturdy compass
#

lmao

#

But yeah, use that as a baseline for finding patterns

wintry brook
#

thank you...!

sturdy compass
#

np!

viscid bough
#

i have a joker that gains some sell cost from selling cards, and gains some of its current sell cost at the end of the round. everything seemed to be working fine until i tried it out with giftcard and it reset its value for some reason. Dunno if i did the sell cost changing wrong or what. Heres the code

SMODS.Joker {
    key = "banker",
    loc_txt = {
        name = "Bank Account",
        text = {
            "{C:attention}#1#%{} of money gained from selling cards",
            "gets added to this joker's sell value.",
            "At the end of round, this joker's gains",
            "{C:attention}#2#%{} of its sell value"
        }
    },
    config = { extra = { cut = 25, interest = 10 } },
    loc_vars = function(self, info_queue, card)
        return { vars = { card.ability.extra.cut, card.ability.extra.interest }}
    end,
    rarity = 3,
    atlas = "Jokers",
    pos = { x = 3, y = 2 },
    blueprint_compat = false,
    calculate = function(self, card, context)
        if context.selling_card and not context.selling_self then
            local cut = math.floor(context.card.sell_cost * (card.ability.extra.cut / 100))
            ease_dollars(-cut)
            card.sell_cost = card.sell_cost + cut
            if cut > 0 then
                return {
                    message = "$"..cut,
                    colour = G.C.GOLD
                }
            else
                return
            end
        end
        if context.end_of_round and not context.repetition and context.game_over == false then
            local ntrst = math.floor(card.sell_cost * (card.ability.extra.interest / 100))
            card.sell_cost = card.sell_cost + ntrst
            if ntrst > 0 then
                return {
                    message = "$"..ntrst,
                    colour = G.C.GOLD
                }
            else
                return
            end
        end
    end
}
wintry brook
#

bunco is pretty old and has bad compatibility with other mods afaik

primal marsh
#

Ah, sad. Thanks for the info

#

Odd, it says that the latest update was 3 days ago

dry merlin
#

anyone know why this X chips is returning ERROR , the actual effect works but the graphic says error

    if context.joker_main then
        return {
            message = localize({ type = "variable", key = "a_xchips", vars = { card.ability.extra.x_chips } }),
            Xchip_mod = card.ability.extra.x_chips,
            colour = G.C.CHIPS,
        }
    end
bleak shore
#

Hi everyone, I've made a Balatro mod that adds a joker which gives +chips, +mult and Xmult.
Everything works as intended, but I can't really make it output these three messages (+chips, +mult and Xmult) in a row, I only was able to output either 1 out of these 3 or all of them at the same time (at the cost of this joker somehow deleting the cards after they score), but that's not really what I wanted. I wonder if it's possible to output multiple messages in a row. I'm new to Lua and modding, and I'm sorry if the answer is obvious or have already been answered before somewhere else.

wintry swallow
#

So I'm trying to make a card always negative. If I do

  add_to_deck = function(self, card, from_debuff)
    card:set_edition({negative = true}, true)

it will give an extra joker slot. Is there a way to make it ALWAYS negative, so already in the shop/collection. Alternatively, how do I give it negative without adding a jokers lot. I was thinking, create a copy, make that negative and add it to the jokers, but not sure how to do that.

bleak shore
dry merlin
#

well its alongside Talisman, thats how Cryptid does it

bleak shore
hushed briar
#

is there a more efficient way to check what ranks are in the player's deck than iterating over the whole thing and keeping track?

elder vapor
#

which one looks better?

dry merlin
#

i think the second one looks better but the of centerness of it looks weird

elder vapor
#

its 1 pixel to the left more 😭

dry merlin
#

i mean this part

frosty dock
hushed briar
#

no id only be doing it at end of round, was just wondering if there was a better method

#

if not i can just do the iteration

frosty dock
#

just do the iteration then, it's not that expensive

hushed briar
#

ok, thank you 👍

faint yacht
jagged sun
#

i'm trying to make a joker that clones itself and adds itself to the joker area, but this code
a) does not make the joker i want, just makes a random joker every time and
b) spawns the joker in the middle of the screen but not actually in the joker area
local clone = create_card("Joker", G.jokers, nil, nil, false, nil, card.key, false)
can someone give me a hand?

elder vapor
dry merlin
#

whys it off center looking in the first place?

#

why not have the right side match the left side. or remove that part?

#

is it necesarry for displaying information about the card?

elder vapor
#

its meant to be a gem slot being fused into a card despair

frosty dock
#

also you're not getting the key correctly. this should work [this doesn't need the area because it'll default to jokers]

SMODS.add_card({ key = card.config.center_key })
#

note that this won't carry over config values, you need to use copy_card if you want that

dry merlin
frosty dock
jagged sun
#

ok so it's add_to_deck() i need instead of merely create_card()

frosty dock
#

add_card does everything for you, including add_to_deck and emplace

#

emplace is the more important part here, add_to_deck just evaluates on-add effects

jagged sun
#

i should have been more careful with my wording- the joker doesn't exactly "copy" itself, just makes another version of itself

#

so it disregards enhancements

#

(except for negative but i'll cross that bridge when i get to it)

jagged sun
#

OK THAT DID IT- THANK YOU SO MUCH- uh

#

"mr john smods"

dry merlin
dry merlin
elder vapor
#

the gem doesn't override anything since it's on the bottom left btw

dry merlin
#

just realized the botton left of the cards are blank whoops

solid surge
#

how do i make a modded joker play a custom sound

#

when it performs a specific action

wintry solar
#

register your sound using SMODS.Sound and then put sound = 'key' in your return table

solid surge
#

thanks

#

would i add the sounds name somewhere?

wintry solar
#

where it says key

solid surge
#

i see

#

i feel as if somethings missing

#

is it just two lines of code or is there something else?

wintry brook
#

define it

#

and then play it

solid surge
#

ok i got that first bit down

#

im still troubleshooting part 2

wintry brook
#

You have to put your mods prefix before the sounds key like I did with imaginary

wintry solar
#

oh it also only happens on a message return

#

can you show your code?

solid surge
#

oh yea ofc

#

for joker or for sound? cuz im applying this to a joker

#

eh, i'll give both

wintry solar
#

what smods version are you on?

solid surge
#

v1 alpha 1311a

wintry solar
#

and it does xmult and xchips?

solid surge
#

yea

wintry solar
#

what messages do you want to display?

solid surge
#

just an X1.5 in purple with the typical xmult sound being replaced by "doubletime1"

wintry solar
#

just one message, or 2?

#

is it 1.5X chips too?

solid surge
#

yea, but they both work at the same time, giving xmult and xchips together

#

its not one after another

#

so just like- 1 message

wintry solar
#
return {
  xmult = card.ability.extra.Xmult,
  chips = 0.5 * hand_chips,
  message = localize{type = 'variable', key = 'a_xmult', vars = {card.ability.extra.Xmult}},
  sound = 'abefun_doubletime1',
  colour = G.C.PURPLE,
  remove_default_message = true
}```
#

try this

solid surge
#

aight, ima give that a whirl

wintry solar
#

oh wait

#

missed the colour, fine now

mellow prism
#

i've encountered the funniest way for a joker effect to not work i think i'll see for awhile

#

cards being destroyed but still being referenced when cards are drawn

wintry solar
#

no problem

pulsar flower
mellow prism
#

did you manage to find a solution?

pulsar flower
#

it was a blind, not a joker

mellow prism
#

hmm

wintry solar
#

how are you destroying your cards

mellow prism
#

this, after adding scored cards to an array

#

runs through the array and deletes each

wintry solar
#

you should be using the destroying cards context

#

it'll handle everything for you cleanly

mellow prism
#

ah, cool

#

lemme try this

pulsar flower
#

it replaces the relevant G.FUNCS.draw_from_play_to_discard() with: a loop to check for destroyed cards and calling the respective card:remove(), and if cards were destroyed wrap the G.FUNCS.draw_from_play_to_discard() in an event

mellow prism
#

i'm still figuring out the order of the contexts

wintry solar
#

this is a joker, right?

mellow prism
#

yes

wintry solar
#

this is your context, it'll run on each card in the scoring hand

wintry brook
#

im trying to set a cards ability while keeping its visual as a base card. this code works for unscored cards, but not scored ones. im guessing i need to patch something but im not sure whats setting the scored cards to the proper visual

sturdy compass
frosty dock
sturdy compass
#

So iterating is the way to go, got it. That basically all I wanted to know

nova finch
#

finished

dim steeple
frozen patio
#

Hi. How would I make a sticker that forces a Joker's sell value to always be $0? I have:

if not context.blueprint and context.game_over == false then
    card.sell_cost = 0
end

in calculate, but it doesn't work.

merry raven
dim steeple
# merry raven That seal is amazing good lord how did you do it

lovely.toml

[manifest]
version = "1.0.0"
dump_lua = true
priority = 0


[[patches]]
[patches.pattern]
target = "card.lua"
pattern = "G.shared_seals[self.seal]:draw_shader('dissolve', nil, nil, nil, self.children.center)"
position = "after"
payload = '''
                    local scale_mod = 0.07 + 0.02*math.sin(1.8*G.TIMERS.REAL) + 0.00*math.sin((G.TIMERS.REAL - math.floor(G.TIMERS.REAL))*math.pi*14)*(1 - (G.TIMERS.REAL - math.floor(G.TIMERS.REAL)))^3
                    local rotate_mod = 0.05*math.sin(1.219*G.TIMERS.REAL) + 0.00*math.sin((G.TIMERS.REAL)*math.pi*5)*(1 - (G.TIMERS.REAL - math.floor(G.TIMERS.REAL)))^2
                    if self.seal == 'btp_mechanical_seal' then
                        self.children.center:draw_shader('hologram', nil, self.ARGS.send_to_shader, nil, self.children.center, 0, 0)
                        G.shared_seals[self.seal]:draw_shader('hologram', nil, self.ARGS.send_to_shader, nil, self.children.center, -1*scale_mod, 80*rotate_mod)
                        G.shared_seals[self.seal]:draw_shader('foil', nil, self.ARGS.send_to_shader, nil, self.children.center, 1*scale_mod, 10*rotate_mod)
                        G.shared_seals[self.seal]:draw_shader('hologram', nil, self.ARGS.send_to_shader, nil, self.children.center, 1*scale_mod, 40*rotate_mod)
                        G.shared_seals[self.seal]:draw_shader('foil', nil, self.ARGS.send_to_shader, nil, self.children.center, 2*scale_mod, 10*rotate_mod)
                        G.shared_seals[self.seal]:draw_shader('hologram', nil, self.ARGS.send_to_shader, nil, self.children.center, 2*scale_mod, 20*rotate_mod)
                        G.shared_seals[self.seal]:draw_shader('foil', nil, self.ARGS.send_to_shader, nil, self.children.center, 2*scale_mod, 10*rotate_mod)
                        G.shared_seals[self.seal]:draw_shader('hologram', nil, self.ARGS.send_to_shader, nil, self.children.center, 3*scale_mod, 10*rotate_mod)

                    end
'''
match_indent = true
merry raven
#

Good lord

dim steeple
#

seals.lua

    name = "mechanical_seal",
    key = "mechanical_seal",
    badge_colour = HEX("378065"),
    atlas = "seals",
    pos = { x = 0, y = 0 },
    calculate = function(self, card, context)
        if context.before and context.cardarea == G.play then
            local destroyed_card = pseudorandom_element(G.hand.cards, pseudoseed('mechanical_seal'))
            local played_card = card

            G.E_MANAGER:add_event(Event({
                trigger = 'after',
                delay = 0.2,
                func = function()
                    copy_card(played_card, destroyed_card)
                    return true
                end
            }))

            local affected_cards = { destroyed_card, played_card }

            for i = 1, #affected_cards do
                local percent = 0.85 + (i - 0.999) / (#affected_cards - 0.998) * 0.3
                G.E_MANAGER:add_event(Event({
                    trigger = 'after',
                    delay = 0.2,
                    func = function()
                        affected_cards[i]:flip(); play_sound('tarot2', percent, 0.6); affected_cards[i]:juice_up(0.3,
                            0.3); return true
                    end
                }))
            end
            delay(0.5)
            for i = 1, #affected_cards do
                G.E_MANAGER:add_event(Event({
                    trigger = 'after',
                    delay = 0.1,
                    func = function()
                        affected_cards[i]:flip(); return true
                    end
                }))
            end
        end
    end,
}

return {
    name = "Seals",
    list = { mechanical_seal }
}
merry raven
#

Cheers mate I'll decipher it later

dim steeple
#

then in main:

...
if mod_config.seals then
  --Load seals
  local pseals = NFS.getDirectoryItems(mod_dir .. "seals")
  for _, file in ipairs(pseals) do
    sendDebugMessage("The file is: " .. file)
    local seal, load_error = SMODS.load_file("seals/" .. file)
    if load_error then
      sendDebugMessage("The error is: " .. load_error)
    else
      local curr_seal = seal()
      if curr_seal.init then curr_seal:init() end

      for i, item in ipairs(curr_seal.list) do
        SMODS.Seal(item)
      end
    end
  end
end
...
#

on the line where it writes the voucher shader to the gold seal, I'm injecting multiple layered hologram and foil shaders

merry raven
#

Can this be adapted to be made into stickers instead of seals?

dim steeple
#

yeah 100%

merry raven
#

Siiiiiiick

#

Looking through it all, man this isn't the traditional SMODS.Seal definition that I'm more used to and from the wiki

#

I never used local and return at the end, I just directly use SMODS.xxxxx
Never seen mod_config before nor NFS

#

How did you figure this all out lmao

dim steeple
#

Yeah, I haven't read the wiki

wintry brook
#

like pokermon

#

the stuff in main is just a fancy way of loading things in by files rather than directly using smods, which allows for better file management

merry raven
#

I see

edgy reef
#

I think it skips over the default seal drawing.

dim steeple
merry raven
#

Oh hey stickers got draw_shaders as well

dim steeple
scarlet thorn
#

Could I lovely patch another mod?

edgy reef
merry raven
#

I plan on drawing shapes on cards like this, sort of like an indicator sticker for a boss blind's custom mechanics

no its not squid games

#

But where do you even start understanding shader math

dim steeple
merry raven
dim steeple
#
...
draw = function(self, card, layer)
        local scale_mod = 0.07 + 0.02*math.sin(1.8*G.TIMERS.REAL) + 0.00*math.sin((G.TIMERS.REAL - math.floor(G.TIMERS.REAL))*math.pi*14)*(1 - (G.TIMERS.REAL - math.floor(G.TIMERS.REAL)))^3
        local rotate_mod = 0.05*math.sin(1.219*G.TIMERS.REAL) + 0.00*math.sin((G.TIMERS.REAL)*math.pi*5)*(1 - (G.TIMERS.REAL - math.floor(G.TIMERS.REAL)))^2
        if card.seal and card.seal == 'btp_mechanical_seal' then
            G.shared_seals[card.seal]:draw_shader('dissolve', nil, nil, nil, card.children.center)
            card.children.center:draw_shader('hologram', nil, card.ARGS.send_to_shader, nil, card.children.center, 0, 0)
            G.shared_seals[card.seal]:draw_shader('hologram', nil, card.ARGS.send_to_shader, nil, card.children.center, -1*scale_mod, 80*rotate_mod)
            G.shared_seals[card.seal]:draw_shader('foil', nil, card.ARGS.send_to_shader, nil, card.children.center, 1*scale_mod, 10*rotate_mod)
            G.shared_seals[card.seal]:draw_shader('hologram', nil, card.ARGS.send_to_shader, nil, card.children.center, 1*scale_mod, 40*rotate_mod)
            G.shared_seals[card.seal]:draw_shader('foil', nil, card.ARGS.send_to_shader, nil, card.children.center, 2*scale_mod, 10*rotate_mod)
            G.shared_seals[card.seal]:draw_shader('hologram', nil, card.ARGS.send_to_shader, nil, card.children.center, 2*scale_mod, 20*rotate_mod)
            G.shared_seals[card.seal]:draw_shader('foil', nil, card.ARGS.send_to_shader, nil, card.children.center, 2*scale_mod, 10*rotate_mod)
            G.shared_seals[card.seal]:draw_shader('hologram', nil, card.ARGS.send_to_shader, nil, card.children.center, 3*scale_mod, 10*rotate_mod)
            
        end
    end,
...
#

which I'm not entirely keen on

#

using the patch I can link the 3d rotation of the seals

#

unless theres a way to retain the context of the base card that I'm entirely missing the point of

edgy reef
#

The G.shared_seals[self.seal].role.draw_major = self isn't added.

dim steeple
edgy reef
#

Did you switch self to card?

#

Cause that is the line that links the seal to the card.

dim steeple
merry raven
dim steeple
# merry raven Is this in a SMODS.Seal definition, or is this still in a lovely patch

refactored code is as follows, without patch:

    name = "mechanical_seal",
    key = "mechanical_seal",
    badge_colour = HEX("378065"),
    atlas = "seals",
    pos = { x = 0, y = 0 },
    calculate = function(self, card, context)
        if context.before and context.cardarea == G.play then
            local destroyed_card = pseudorandom_element(G.hand.cards, pseudoseed('mechanical_seal'))
            local played_card = card

            G.E_MANAGER:add_event(Event({
                trigger = 'after',
                delay = 0.2,
                func = function()
                    copy_card(played_card, destroyed_card)
                    return true
                end
            }))

            local affected_cards = { destroyed_card, played_card }

            for i = 1, #affected_cards do
                local percent = 0.85 + (i - 0.999) / (#affected_cards - 0.998) * 0.3
                G.E_MANAGER:add_event(Event({
                    trigger = 'after',
                    delay = 0.2,
                    func = function()
                        affected_cards[i]:flip(); play_sound('tarot2', percent, 0.6); affected_cards[i]:juice_up(0.3,
                            0.3); return true
                    end
                }))
            end
            delay(0.5)
            for i = 1, #affected_cards do
                G.E_MANAGER:add_event(Event({
                    trigger = 'after',
                    delay = 0.1,
                    func = function()
                        affected_cards[i]:flip(); return true
                    end
                }))
            end
        end
    end,
...
#
...
    draw = function(self, card, layer)
        local scale_mod = 0.07 + 0.02*math.sin(1.8*G.TIMERS.REAL) + 0.00*math.sin((G.TIMERS.REAL - math.floor(G.TIMERS.REAL))*math.pi*14)*(1 - (G.TIMERS.REAL - math.floor(G.TIMERS.REAL)))^3
        local rotate_mod = 0.05*math.sin(1.219*G.TIMERS.REAL) + 0.00*math.sin((G.TIMERS.REAL)*math.pi*5)*(1 - (G.TIMERS.REAL - math.floor(G.TIMERS.REAL)))^2
        if card.seal and card.seal == 'btp_mechanical_seal' then
            G.shared_seals[card.seal].role.draw_major = card
            G.shared_seals[card.seal]:draw_shader('dissolve', nil, nil, nil, card.children.center)
            card.children.center:draw_shader('hologram', nil, card.ARGS.send_to_shader, nil, card.children.center, 0, 0)
            G.shared_seals[card.seal]:draw_shader('hologram', nil, card.ARGS.send_to_shader, nil, card.children.center, -1*scale_mod, 80*rotate_mod)
            G.shared_seals[card.seal]:draw_shader('foil', nil, card.ARGS.send_to_shader, nil, card.children.center, 1*scale_mod, 10*rotate_mod)
            G.shared_seals[card.seal]:draw_shader('hologram', nil, card.ARGS.send_to_shader, nil, card.children.center, 1*scale_mod, 40*rotate_mod)
            G.shared_seals[card.seal]:draw_shader('foil', nil, card.ARGS.send_to_shader, nil, card.children.center, 2*scale_mod, 10*rotate_mod)
            G.shared_seals[card.seal]:draw_shader('hologram', nil, card.ARGS.send_to_shader, nil, card.children.center, 2*scale_mod, 20*rotate_mod)
            G.shared_seals[card.seal]:draw_shader('foil', nil, card.ARGS.send_to_shader, nil, card.children.center, 2*scale_mod, 10*rotate_mod)
            G.shared_seals[card.seal]:draw_shader('hologram', nil, card.ARGS.send_to_shader, nil, card.children.center, 3*scale_mod, 10*rotate_mod)
            
        end
    end,

}

return {
    name = "Seals",
    list = { mechanical_seal }
}
#

had to send in two parts because discord limit

merry raven
#

Epic

edgy reef
#

You don't need the if check, if the draw function is being called than it's already known that the card has the sticker.

#

This also goes for seals.

merry raven
#

Ah alright then
But other than that, it's all good and dandy to continue coding the shader?

edgy reef
#

I believe so.

merry raven
#

Gotcha

#

Noticed that Mr Fletch's seal shader has an atlas pointing to {0, 0}, does it require a sprite for the shader to render on, or is the seal purely shader work

dim steeple
#

But you can point at any sprite

merry raven
#

I see

#

Welp time to draw

solid surge
#

ok i got one more small question: how do i create a locked message for jokers?

merry raven
#

Sooooomewhat got it working

#

Oh boy it acts differently on different cards

runic pecan
#

Would it be too weird if I pre-emptively make a wiki page of my mod on Modded Balatro wiki? Even only as a placeholder?

glass scaffold
runic pecan
glass scaffold
#

Cause people are in the wiki for the documentation, then suddenly mod page.

runic pecan
#

I still don't get it.
||in fact i feel like im getting less||

#

Where's the difference?

glass scaffold
#

Wait a sec, I misread the Modded Balatro wiki. I thought you meant Steamodded wiki

#

NVM

#

Carry on..

runic pecan
#

mod page, with documents

#

Oh OK

merry raven
dusk garnet
#

hi modding-dev chat, do yall know anyone who does art (jokers, etc.) here? if so what are their prices

glass scaffold
dusk garnet
glass scaffold
dusk garnet
merry raven
#

Holy shit

solid surge
#

how would i make it so that this does what its description says?

wintry brook
sturdy compass
#

^

runic pecan
wintry brook
#

Specifically madness joker

ionic verge
#

how many colors for text (like from {C:these}{}) are there anyways?

wintry brook
ionic verge
#

i know of green, purple, white, mult/red, and purple

sturdy compass
wintry brook
runic pecan
#

there's also {C:tarot} but that's also purple

ionic verge
#

yeah i figured that would be the same as purple

wintry brook
ionic verge
#

is there {C:luck} for an alternate input for green

sturdy compass
#

I just changed the description to be more clear on that LMAO

runic pecan
ionic verge
#

nice

wintry brook
#

i used this to make a rainbow

glass scaffold
#

Improvise. Adapt. Overcome.

runic pecan
wintry brook
#

true actually

#

i learned that recently and never went back to revise

glass scaffold
#

Does anyone know what check or context I need to see if a card is enhanced already?

wintry brook
glass scaffold
#

What does ~= do in Lua?

wintry brook
#

!=

merry raven
#

Not equal

glass scaffold
wintry brook
#

theres also get_enhancements but im not sure how exactly that works

runic pecan
#

Should I stop it from doing that?

glass scaffold
wintry brook
#

v.config.center ~= G.P_CENTERS.c_base is what driver's license does, opposite of that for your effect

carmine burrow
#

i forgot that green deck exists ... maybe this is a little unbalanced

#

"free $15 if you play well" is maybe alright if the joker's expensive but "free $30 if you play well" is a little less good

merry raven
#

I COOKED

wintry brook
#

Triforce coded

merry raven
#

Lmaoooo

#

We got scale_mod and rotate_mod, but are there any mods for setting transparency
I want to do like fade in and fade out effects

#

Or is there any translation to move the effects left or right, or up or down

glass scaffold
#

Ok, new idea:

How do I do a context check for when the cards are done scoring?

sturdy compass
#

Reunion!

runic pecan
stray warren
#

(Won't look like a rainbow)

glass scaffold
runic pecan
stray warren
#

You're not using context.after in this code. Try using that to change the enhancements

glass scaffold
#

context.after did the same thing.

stray warren
#

Then try putting the enhancement change code in an event to trigger 'after'

#

But for sure joker_main is not the context to do that

glass scaffold
#

I'm testing context.after again.

#

Ok, so here's how it is on my side:

Visual change > Score as normal

#

And it's visually changing it before they score.

stray warren
#

That's probably because the game calculates eveything before the visuals start rolling. That's why I suggested you put that code in an event, so that it can be timed for after the scoring

autumn geode
#

Does the code actually work for changing what enhancement is on the card

glass scaffold
glass scaffold
#

Visually, kinda bugged.

stray warren
#

Not off the top of my head, but if you check the source code there are a number of jokers that create events with a trigger = 'after' attribute. You could probably check those

autumn geode
#

Right and it's changing it over to an enhancement you have added? Or a base game one

glass scaffold
#

I'll keep it as is for now. It's working functionally, and that's really all I need.

autumn geode
#

Ah ok right so in terms of your issue it's got to be with timing then must be that the game has a set order when it does visuals Vs calc but I don't know the codebase too in-depth

stray warren
#

Yeah, all the visuals are managed by the Event Manager from my knowledge

#

So if its coded earlier, its gonna play the visuals out of order, or not where expected

autumn geode
#

Sorry to hijack but I had an idea for a similar thing if I wanted to have a joker enhance played cards into my custom enhancement would all I need to do is set_ability but with my key for that enhancement

sick sparrow
#

luchador or chicot

autumn geode
#

Like uhh set_ability(G.P_CENTERS["key"])

sick sparrow
autumn geode
#

Oh right

#

But my actual key for changing like that or do I need to poll_enhancement

stray warren
#

I believe you use your mod prefix + defined key

#

So if the mod prefix was prefix and the enhancement's key was e_enhancement you would find it with prefix_e_enhancement

autumn geode
#

I tried to reverse engineer it from Midas mask but that uses a pre defined type which I can't do since this is modded

vagrant cedar
#

Anybody advanced in Lua able to help me with a hard concept I have

#

?

cedar stream
#

Is it a new thing?

vagrant cedar
#

Mostly yeah

cedar stream
#

Maybe in a bit

vagrant cedar
#

I'm talking advanced tho

autumn geode
stray warren
#

I don't know that you use G.P_CENTERS, but something like that I think

autumn geode
#

I'll give it a try tomorrow thanks for the help

ionic verge
wind turtle
#

i need you guys' silliest ideas for my mod

ionic verge
#

how would I do something like this?

#

i dont know how to look for selected cards when its simply sold

elder vapor
#

remove_from_deck and G.hand.highlighted ??

ionic verge
#

i see

#

itd be something like this, right?

#

game crashed

vagrant cedar
ionic verge
#

happened when i sold the joker

vagrant cedar
wind turtle
#

nah that's yours

vagrant cedar
wind turtle
#

right now i have a joker with +500 mult (with a 1% chance to instantly end the run, chance increases bt 1% each round)

#

2 fnaf jokers (+300 chips per A, 9, 8, or 7 and the same but with x20 mult)

#

and one that's hanging chad with 5 retriggers. giga hanging chad

ionic verge
stray warren
#

highlighted is an array of cards, not a single card. That's my guess

#

You should loop through G.hand.highlighted

#

It's a cardarea

elder vapor
#

do a for i loop for it

ionic verge
#

probably just because im not 100% used to lua yet but how would you set up that for loop

wintry brook
ionic verge
#

i know im doing this wrong somehow relating to the for loop, how am i

#

(line 106 is the for loop)

#

107 is the line for removing from deck

stray warren
#

for diamonds, specifically

wintry brook
#

yea it muddied the orange a little 😢

wintry brook
#

or for i = 1, #G.hand.highlighted do

faint yacht
#

Pulling from Hanged Man code...

for i=#G.hand.highlighted, 1, -1 do
  local card = G.hand.highlighted[i]
  if card.ability.name == 'Glass Card' then 
    card:shatter()
  else
    card:start_dissolve(nil, i == #G.hand.highlighted)
  end
end
ionic verge
#

alright, now its not destroying the card, presumably due to a fuckup on that part

glass scaffold
#

Ok, need another context thing.

How do I change context:other_card:get_id(whatever) to check if a card is enhanced?

wintry brook
#

v.config.center ~= G.P_CENTERS.c_base is how drivers liscense does it

glass scaffold
#

And that'll work without any further edits?

wintry brook
#

no you'd need to do context.other_card.config.center ~= G.P_CENTERS.c_base

glass scaffold
#

On which line? Same one?

wintry brook
#

where ever you want to check if a card is not enhanced

glass scaffold
#

wait, old snippet. my bad

faint yacht
#

if context.other_card.config.center ~= G.P_CENTERS.c_base then

wintry brook
#

swap out v for context.othercard and it should work

wintry brook
#

v was the for element variable for a card

glass scaffold
wintry brook
#

check for context.individual i believe, or context.main_scoring

#

other card doesnt exist in all contexts i realize

#

my joker does it like this

fluid lagoon
#

Am getting back into working on my mod and was looking at what I was struggling with last. The joker I am working on has the effect of '+50 chips when an Enhanced card scores' what I am struggling with is having the joker to react when the chips would be added and not the scoring card

glass scaffold
wintry brook
wintry brook
ionic verge
#

alright
joker trying to set foil on stone cards and i got a very scary error upon that trying to happen, whats up

fluid lagoon
wintry brook
#

mb its P_CENTERS all caps

wintry brook
glass scaffold
ionic verge
wintry brook
#

yippee! gnarwee

ionic verge
#

or

#

yeah it seems its going off

fluid lagoon
wintry brook
ionic verge
#

setting a stone card to foil

#

mb

#

other_card for that?

wintry brook
#

yup

fluid lagoon
ionic verge
wintry brook
#

context.other_card

ionic verge
#

oh duh

#

back to this

wintry brook
# fluid lagoon

add card = context.other_card, to the end of the return function

ionic verge
#

im doing set_addition right, right?

#

or should it be 'foil' not 'Foil'

wintry brook
#

oh yeah lower case probably

ionic verge
#

only reason i thought otherwise is because 'Stone Card' is correct

#

also lower case didnt work so im trying 'Foil Card'

#

nope

faint yacht
#

:set_edition({foil = true}, true)?

wintry brook
#

yeah like this

fluid lagoon
wintry brook
#

return {

#

just before the }

fluid lagoon
#

in the calculate function? and should I keep the card = card:juice_up(0.5,0.5),

glass scaffold
#

How do I add a seal to a card? (Specifically the red one)

wintry brook
#

i forgot about the juice up yeah it goes before that

wintry brook
fluid lagoon
glass scaffold
#

Which line? It keeps adding it to the Joker instead of the cards.

wintry brook
fluid lagoon
wintry brook
wintry brook
#

probably the 2nd one

glass scaffold
#

Yep, 2nd one got it working. Thanks

fluid lagoon
#

oh I see, both react, so I need the joker to react along side the played card, I am tyring to have visual effect for this joker like bloodstone

ionic verge
#

ok last thing for the night, trying to get scored stone cards to give $2, why's it crashing at extra?

#

line 152 is the ease_dollars line

wintry brook
#

for playing cards to give $2 you can
return { dollars = amount, card = context.other_card }

#

unless you want the joker specifically to give the money

sand oasis
#

anyone know the context for a joker when it is sold?

ionic verge
#

.selling_self

wintry brook
#

^

sand oasis
#

thank you guys 🙏

fluid lagoon
#

so how would I put it to make both the played card and joker to react like bloodstone?

ionic verge
#

whats the sound to play for money?

#

actually i can just figure out that one

wintry brook
#

you want it to work like arrowhead, where it gives chips

fluid lagoon
#

yes, and react like it, but right now the joker is only reacting when the hand is played

ionic verge
#

nevermind it works just fine

ancient ore
#

what more I do brotha

#

Also thanks for the response I forgot I was doing this

#

Also is there documentation on this stuff beyond the github wiki?

hardy viper
#

oh wow I did not write that correctly mb

ancient ore
#

A

hardy viper
#
local path = SMODS.current_mod.path.."Jokr/"
for i, v in pairs(NFS.getDirectoryItems(path)) do
 SMODS.load_file(path..v)
end
ancient ore
#

booty

#

Thanks a ton for the help

#

gonna try that out

faint yacht
#

...if I want to spawn a Joker on start of a deck, I need to hook Back.apply_to_run?

ancient ore
hardy viper
#

fixed a parentheses but im sure you got that

ancient ore
#

Yer

hardy viper
#

anyways idk what the issue could be

#

can u show the jokr directory in file explorer

ancient ore
#

Sure

#

Testing rq to make sure its not one of the joker luas thats broken

#

It appears one of the joker luas is broken (:

#

Ok now both luas are functional individually but still

#

Only one loads

#

Do I just kill myself?

nova finch
#

how do i make a joker that triggers for each joker of a certain rarity like baseball card?

faint yacht
#

Check how Simplified Joker from MoreFluff works.

nova finch
#

ok so i have this rn but this makes it trigger when any joekr of the rarity triggers instead of working like baseball card

elder vapor
#

2/3 done furiyippie

sturdy compass
#

This guy took a WHILE to get working

violet void
sturdy compass
#

Yes

violet void
#

I was hoping there was a way to transform a joker sigh

sturdy compass
#

Sorry for getting your hopes up lol

violet void
sturdy compass
#

Correct

#

Zombies will not copy other zombies

violet void
#

But then I made an even more tragic Joker myself

sturdy compass
#

Well it’s only the copy that gets turned, the original sticks around

sturdy compass
tall wharf
#

web developer????

violet void
sturdy compass
#

Probably

violet void
#

And it would convert the blueprint

sturdy compass
#

You get an extra blueprint for a round, or just an extra blueprint if you yeet the zombie before the round ends so I don’t really see how it’s that tragic

tall wharf
#

oh

#

ok

violet void
sturdy compass
#

It could be

#

Or you can gamble and get two zombies to make two copies of a card you want instead

violet void
#

If the target it eternal I hope it doesn't create the new zombie

#

Since it doesn't destroy the copied one

violet void
sturdy compass
#

Actually eternals are something I want players to play around with the Zombie. You could get a copy of an eternal card and that would not be destroyed by the zombie, and that would either be great or detrimental depending on the card

violet void
#

So zombie could keep copying the eternal card with no downsides

sturdy compass
#

Hand cap is your downside here

#

Unless the eternal happens to be negative

violet void
#

I see

tall wharf
violet void
#

We need more synergies with rental too honestly

sturdy compass
#

Rental is a pretty specific thing to synergize with imo, and making jokers work specifically with high stake stickers feels off

violet void
#

Something with losing money

#

Who knows

sturdy compass
#

Banker: gains X0.01 Mult for every dollar spent or lost

runic pecan
#

I was looking for code about changing ranks of playing cards, but did not expect Strength to be this janky.

violet void
sturdy compass
#

Not as bad as it could’ve been lol

violet void
sturdy compass
#

Nope

violet void
#

But it looks interesting 🤔

sturdy compass
#

Thought of that on the spot

violet void
#

Probably rare

sturdy compass
#

Since spending is such a common event I agree

#

Could just hook into ease_dollars and check if the input is negative

tight thistle
#

hello! i have another question! how would i go about making a card that requires 2 specific cards to work, but only affects one of them?

#

the relevant effect!

merry raven
#

There is a check to see if the scored hand has a specific rank iirc

#

Lemme find it

#

card:get_id()

It's an int value that gets the id of the rank, Jack is id number 11, Queen is 12, King is 13
I forgot whether Ace is 1 or 14

runic pecan
tight thistle
#

queens are meant to be an "activator" of kings, per se

sturdy compass
#

I’d first check for queens in context.before and set a boolean for if queens are present. If they are, during context.individual, also check for context.other_card:get_id() == 13

tight thistle
#

will try, thank you!

sturdy compass
#

👌

runic pecan
#

Well that's new.

runic pecan
#

Maybe I shouldn't stack everything into the event.

sturdy compass
runic pecan
sturdy compass
#

Do you really need a separate function for that?

runic pecan
#

I'm planning for another type of objects similar to energy cards in pokermon

sturdy compass
#

Ah

wicked leaf
tall wharf
#

AMRKIAPERLEIR

#

here are the blind chips i made yesterday

lyric blade
#

Ah no wrong one

#

I maybe change the X1 Mult gain to X0.5 Mult, cause it is way too overpowered with debit card

tight thistle
zealous glen
#

SMODS.Rank has a next method

ancient ore
wicked leaf
#

how can I add new colors to my mod? (as in, text colors)

zealous glen
#

then you hook loc_colour

#

This is how I did it

wicked leaf
#

ive seen cryptid do it like this

but also cryptid is messy so

zealous glen
#

Balatrostuck mentioned

frosty dock
#

fun fact you don't need to hook loc_colour

#

you can just call it once then add your keys to G.ARGS.LOC_COLOURS

zealous glen
frosty dock
#

I did but I'm saying you don't need to hook the function to do that

zealous glen
#

You said "call it once"

frosty dock
#
loc_colour('red')
G.ARGS.LOC_COLOURS.my_colour = HEX'abcdef'
zealous glen
#

instead of creating a call somewhere, I just built it into the function

wicked leaf
frosty dock
#

yes

zealous glen
#

I think it makes more sense to define the color somewhere instead of just pasting the values directly

long sun
#

had an idea for Ignaize's ability:
Gains X0.2 Mult for each consumable card sold

zealous glen
#

but it works

long sun
#

similar to Campfire but i wanna see what you guys think

frosty dock
zealous glen
frosty dock
zealous glen
#

Yeah but when is a stack trace going through this

#

Things usually break when applying an effect not creating a tooltip

#

Maybe if you were doing UI, but you can always do text color last

#

And it's unlikely to break just by adding text color

wicked leaf
#

aye there we go

ancient ore
#

I don't want the jokers to load as separate mods, but the docs dont have very much information on what determines this

faint yacht
#

You're defining headers in each of those files...

ancient ore
#

When I remove them, game break

#

Ill post result one sec

frosty dock
ancient ore
#

A

frosty dock
#

it takes a relative path from your mod dir, and you should only give it one argument

ancient ore
#

Is load_file from lua, love, or steammodded?

frosty dock
#

steamodded

#
local path = SMODS.current_mod.path..'Jokr/'
for _,v in pairs(NFS.getDirectoryItems(path)) do
  assert(SMODS.load_file('Jokr/'..v))()
end

something like this should do

ancient ore
#

Oh thanks will try out

#

New crash output

#

Wait ok do I just need to move where the joker's atlases are defined

#

Right now I have them each assigned their atlases in their individual files

frosty dock
#

assets folder shouldn't be in any subfolder

ancient ore
#

Fantastic dude works perfect now

#

So even when loading luas from a subfolder, the assumed directory remains the intial mod folder?

#

Idk why i had assumed it'd change with the load_file command

zealous glen
#

If I want to patch a file after Steamodded has patched it, should I do anything specific?

#

also, if I want to add a new context, is calling SMODS.calculate_context(new_context) sufficient?

runic pecan
#

Well that's another new one

runic pecan
wicked leaf
#

oh wait

frosty dock
wicked leaf
#

yeah i noticed

#

whoopsie me

frosty dock
#

also suits add these colors for you, it just has your mod prefix added

zealous glen
#

hey john

#

how to add a new context

#

If it's for the standard set of objects, do I just call SMODS.calculate_context at the appropriate time?

frosty dock
#

usually by just adding a call to SMODS.calculate_context with your context with the right timing, yes

zealous glen
frosty dock
#

wdym

#

like new objects receiving existing contexts?

zealous glen
#

or even an Enhancement effect

#

(which otherwise wouldn't apply because Steamodded doesn't iterate over all cards)

wicked leaf
#

I think this is enough for now

#

now to code the cards