#💻・modding-dev

1 messages · Page 538 of 1

modern kindle
#

Oh goodness

tropic hawk
#

me for like the entirety of may through october

#

now i need to figure out how to code my joker

#

hmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm

#

meh i dont know

modern kindle
tropic hawk
#

:o

blazing helm
#

dont think the game was intended to ban this many stuff 💀 🤣

wispy falcon
#

What do i put in the brackets of SMODS.destroy_cards() if i want it to destroy 1 card out of the whole deck?

modern kindle
#

i wish you could stack those icons if enough was banned, or if banned was excessively long instead of a blacklist it was a whitelist on what isnt banned

faint yacht
faint yacht
#

If it's just one card, it gets converted to a table and processed still.

wispy falcon
#

I want it to be a random card, should've clarified that

red flower
#

you would need to get the random card yourself

#

that function doesn't handle that part

wispy falcon
#

Okay, how do I get the table that has all the cards of the deck in it?

slim ferry
#

G.playing_cards

red flower
#

hi dilly

modern kindle
#

how are you N my goat

red flower
#

very tired

modern kindle
#

me too

#

i had gotten a call from the repair shop and got out of bed sooner than i wanted of them saying he would let me know when the store was open

wispy falcon
red flower
#

yeah

modern kindle
#

ye for a random

red flower
#

pseudorandom_element

modern kindle
#

i have a blind that destroys 1-3 random

wispy falcon
#

Can I use the same for destroying a random Joker?

SMODS.destroy_cards(destroyCard)```
azure valley
#

yes, but you might want to change the pseudorandom_element key (currently "Card")

wispy falcon
#

And what do I put instead of G.playing_cards?

azure valley
#

G.jokers

wispy falcon
#

But destroy_cards() isn't for Jokers, is it?

azure valley
#

Joker cards are considered cards.

wispy falcon
#

So like this?

SMODS.destroy_cards(destroyJoker)```
modern kindle
#

is there a particularly easy way i can replace a cards chips with mult?

azure valley
wispy falcon
modern kindle
#

yea
im in the process of making a card that has a chance to upgrade your playing cards from adding chip value to adding mult

#

so instead of +10 chips, itll give +10 mult

modern kindle
#

N bestie i need u

azure valley
modern kindle
#

it wont

azure valley
#

so if you have a 5 card that gives +20 chips from hiker, and it's converted by this joker it will give +15 chips and +5 mult?

modern kindle
#

if you play a 5 said 5 will give 5 mult,but since the card has no chip value it cant get an icnrease in chip value, it will not work for that card

#

if the 5 had already gained 30 chips, that value gets converted to mult

red flower
azure valley
#

if so you just need to do:

if card.ability.mult == 0 then
  card.ability.mult = card.ability.bonus
  card.ability.bonus = 0
end
azure valley
#

ok what I did will do what I said above

#

What you're asking for (Hiker no longer working) is not really possible.

#

(without changing hiker)

modern kindle
#

anything is always possible

red flower
#

maybe you need to hook the get_chip_bonus and get_chip_mult?

modern kindle
#

yea thats what i was considering

wispy falcon
#

Okay, quick question... If there are no Jokers in play, I get an error since it tries to remove something that's not there. How do i prevent that?

red flower
#

if destroyJoker then

azure valley
#

if #G.joker.cards > 0 then

#

either one

#

ok so I had a question, following up from last night

#

Currently attempting to insert a stake between Orange and Gold stake. I have the following code:

SMODS.Stake {
    name = "Silver Stake",
    key = "silver",
    applied_stakes = { "orange" },
    unlocked_stake = "gold",

    atlas = "Chips",
    pos = { x = 0, y = 0 },

    sticker_atlas = "Stickers",
    sticker_pos = { x = 1, y = 0 },

    modifiers = function()
        G.GAME.modifiers.enable_preorder = true
    end,
    colour = G.C.GREY,
    shiny = true,
    loc_txt = {},
    above_stake = "orange"
}

SMODS.Stake:take_ownership('orange', {
    unlocked_stake = "silver",
  }, true
)

SMODS.Stake:take_ownership('gold', {
    applied_stakes = { "silver" },
    above_stake = "silver"
  }, true
)

Observed behavior is silver stake is above gold, and not unlockable (I have beat both orange and gold stake to test).

#

(This was tested on a profile that already had gold stake unlocked and beaten)

red flower
#

iirc for applying vanilla stakes you need to use prefix_config so it doesn't auto apply your prefix

azure valley
#

where does this live? inside of the stake table?

red flower
#

yes

#

you might need it for unlocked_stake too

azure valley
#

and for above_stake

#

ok, progress

#
SMODS.Stake {
    name = "Silver Stake",
    key = "silver",
    applied_stakes = { "orange" },
    unlocked_stake = "gold",
    prefix_config = {
      applied_stakes = { mod = false },
      unlocked_stake = { mod = false },
      above_stake = { mod = false },
    },

    atlas = "Chips",
    pos = { x = 0, y = 0 },

    sticker_atlas = "Stickers",
    sticker_pos = { x = 1, y = 0 },

    modifiers = function()
        G.GAME.modifiers.enable_preorder = true
    end,
    colour = G.C.GREY,
    shiny = true,
    loc_txt = {},
    above_stake = "orange"
}

SMODS.Stake:take_ownership('orange', {
    unlocked_stake = "uvdm_silver",
  }, true
)

SMODS.Stake:take_ownership('gold', {
    applied_stakes = { "uvdm_silver" },
    above_stake = "uvdm_silver"
  }, true
)

I also adjusted the references to silver stake to have the proper mod prefix in the other stakes. Currently, it is in the correct location, but it errors without an diagnostic.

#

(also the chip is not shiny, so I assume there's something wrong with my stake table somehow)

wispy falcon
#

How do i change the Joker amount the player can hold? I looked at negative's code and black deck's code but both do it differently

azure valley
#

is it temporary or permanent?

wispy falcon
#

Permanent

#

And a blind

plain gazelle
#

For whatever reason my hook of get_straight() stops Shortcut from working. Everything in the hook only executes when you have the custom Joker so there shouldn't be any problems, but Shortcut starts working only when I remove my hook. (Is that what 'Lovely patch' from VanillaRemade is for?)

red flower
#

what are you trying to do

#

also thats an old version of vanillaremade, just so you are aware

manic rune
#

is there something im overlooking here?

#

whats its supposed to do is that it counts cards held in hand as scored cards for joker effects

red flower
#

also the problem is that get_straight is missing arguments

manic rune
#

so far those two worked so idk

plain gazelle
azure valley
manic rune
#

since it crashes right when i play a hand, no crash log

azure valley
manic rune
#

mine shouldnt be

azure valley
#

I don't immediately see what's wrong here, but if you want to crib off of my code

manic rune
#

its just rerunning the joker's calculate with the new contexts

manic rune
azure valley
#

hmm... let me review a little better.

manic rune
#

oh wait im missing individual = true in here, not sure if thats the cause, hm

#

though even if it is im pretty concerned why it crashes

#

yeah it still crashes, damn

#

well im just gonna guess that this effect in particular needs more tweaking than i thought, hm

azure valley
#

it might have something to do with the fact that calculate_joker calls calculate_joker.

manic rune
#

yeah thats why i added hsr_change_context to the new contexts

wispy falcon
#

Wait, you can have negative Joker Slots? xD

manic rune
#

yes

wispy falcon
#

It's the same as zero in the game though, right?

azure valley
#

you can even trigger it in vanilla iirc. By having negative jokers in the typecast challenge and then selling a negative joker after ante 4.

azure valley
#

wait

azure valley
# manic rune yeah thats why i added `hsr_change_context` to the new contexts

you only add this to the contexts if there is a joker modifying these contexts. You don't seem to add it normally. Which means that you don't skip this shuffling about when you chain call into calculate_joker. But then again, that shouldn't really matter, unless Balatro normally has a call stack here half as deep at the call stack limit?

carmine kiln
#

Has anyone experience with modding jokers, that look for a specific card that changes every round?

carmine kiln
#

yea i used that a bit, yet the game tries to index a nil

red flower
#

well post the code and the crash log then

carmine kiln
#

how does one get the crash log?

red flower
#

you can either copy paste it from the crash screen or find it in Mods/lovely/log

carmine kiln
#

as files or in text?

reef condor
#

Making a balatro mod about SEALS!!!
Need help with one. using jokerforge
I wanna make a seal that turns the card into a heart suit.

manic rune
#

OHHHHHH I FIGURED IT OUT

#

it was table.clone 😭

red flower
carmine kiln
#

rightio

manic rune
#

well that was very annoying to figure out

#

sob

reef condor
primal robin
reef condor
#

no response

red flower
#

i would recommend waiting, i think no regulars here use jokerforge

carmine kiln
manic rune
#

im guessing its because it tried to clone the context.cardarea part which caused it to freak out

#

since cards also have .area which also refers back to the card 😭

red flower
#

makes sense

red flower
#

i would recommend getting vscode and the lua extension

carmine kiln
red flower
#

i wouldnt recommend it, no

manic rune
#

-# at least its not notepad honestly

wispy falcon
#

How do I give the player a random voucher?

red flower
#

if only there was a wiki i wrote with answers for things..

wispy falcon
#

Sorryyyyy

#

I always forget that

azure valley
#

This is the first I am hearing of it

#

thanks!

manic rune
#

🤔 how do i make this only run during scoring again

red flower
#

not end of round

manic rune
#

ic thanks

carmine kiln
red flower
#

the sumneko one

red flower
#

i would recommend following the first question

manic rune
#

what the fuck

#

this doesnt crash anymore but it counts all cards in hand as scoring cards now?? like, not just for the joker but for the ENTIRE scoring process

#

3:

red flower
#

did you just remove the table.clone

manic rune
#

yea

#

this is how it looks like rn

red flower
#

yeah youre replacing the context table permanently

manic rune
#

hm

#

maybe i should just not touch the context table

red flower
#

you can edit it and then revert it maybe

manic rune
#

yeah not changing the context table worked, no clue if this will have any consequences

#

well if im seeing it right then it shouldnt anyways, so

#

:3

#

i will see if my mod's players crash and know myself lmao

wispy falcon
red flower
#

maybe

wispy falcon
#

This gives me an error

                local voucher_pool = get_current_pool('Voucher')
                local selected_voucher = pseudorandom_element(voucher_pool, 'modprefix_seed')
                local it = 1
                while selected_voucher == 'UNAVAILABLE' do
                    it = it + 1
                    selected_voucher = pseudorandom_element(voucher_pool, pseudoseed('giveVoucher'..it))
                end
                selected_voucher:redeem()
            end```
#

in context. after and context.final_scoring_step

red flower
#

oh yeah i think i deleted something there

jolly shadow
#

I want to make a consumable add a passive effect (i.e. 2 additional retriggers on all jokers owned), is there any way to like, run a calculate function isolated ? or would there be a better way to go about that

red flower
#

consumables have calculate

red flower
jolly shadow
red flower
#

ah no

jolly shadow
#

that's what im going for

red flower
#

the next smods update has a global mod calculate

wintry solar
#

You need to create the voucher before you can redeem it

wispy falcon
#

What do I need to add/change in my code?

jolly shadow
red flower
#

you can hook SMODS.calculate_context maybe

wintry solar
#

What’s the exact effect?

manic rune
#

mmm hasnt global calculate been added yet

#

you can probably use that?

jolly shadow
#

N' already mentioned that

manic rune
#

oh

#

hm

#

well if you want to have it done early then you can

  1. create a dummy joker in an invisible cardarea (i did this one)
  2. hook to SMODS.calculate_context like N' said (i didnt do this one, but its probably better idk)
wintry solar
#

You can just get the consumable to do it too

red flower
#

oh wait does the :redeem function always subtract the cost

jolly shadow
manic rune
#

orrrrr you can go with kino's approach, which is to have the consumable linger in the area for the calculate effect

#

:3

jolly shadow
manic rune
#

mm

wintry solar
#

Just get it to stay when used

#

And set an internal flag when used that triggers the calculate and stops future use

jolly shadow
wintry solar
#

It’s a bit jank but it works

wintry solar
red flower
#

tried it but it only works if the area is the shop, card.cost = 0 works tho

#

im trying to add the voucher animation now

wispy falcon
#

Okay

wintry solar
#

Let me check what I use

red flower
#
local voucher_pool = get_current_pool('Voucher')
local selected_voucher = pseudorandom_element(voucher_pool, 'modprefix_seed')
local it = 1
while selected_voucher == 'UNAVAILABLE' do
    it = it + 1
    selected_voucher = pseudorandom_element(voucher_pool, 'giveVoucher' .. it)
end
local voucher = SMODS.add_card { key = selected_voucher, area = G.vouchers }
voucher.cost = 0
voucher:redeem()
#

that works but the voucher doesnt get shown

wispy falcon
wintry solar
#

You need to create it in G.play

red flower
#

yeah but that doesnt dissolve it

#

im trying to find where thats done

wintry solar
#

My code is like this


local voucher_card = SMODS.create_card({area = G.play, key = voucher})
                voucher_card:start_materialize()
                voucher_card.cost = 0
                G.play:emplace(voucher_card)
                delay(0.8)
                voucher_card:redeem()
                
                G.E_MANAGER:add_event(Event({
                    trigger = 'after',
                    delay = 0.5,
                    func = function()
                        voucher_card:start_dissolve()                
                        juice_hooligan = false
                        return true
                    end
                }))
brave blade
#

Is there a calculate context that activates on each card drawn? (SImilar to the context for each card discarded)

manic rune
#

orrrrrr maybe you can have a global table (not in G.GAME) with the calculate function, then when the consumable is used it adds a key to refer to the global table in a table within G.GAME, like G.GAME.consumable_passives then hook to SMODS.calculate_context?

so it would look something like

ConsumablePassives = {
  deadass = {
    calculate = function(...)
      ...
    end,
  }
}

local hookTo = SMODS.calculate_context
function SMODS.calculate_context(context, return_table, no_resolve)
  for _,v in ipairs(G.GAME.consumable_passives) do
    local ret = ConsumablePassives[v].calculate(context)
      if ret then
        --probably add it to return_table idk
      end
    end
  end
  local ret = hookTo(context, return_table, no_resolve)
  return ret
end
#

:3 i havent checked what return_table is supposed to be yet, but i assume thats where you want to change for the effect to happen

#

i just realized i took so long to type this we already moved to another topic

#

sob

manic rune
#

-# that's also kinda what i did for stacked :3

#

@jolly shadow sorry if i took too long lol

jolly shadow
manic rune
#

yeah it looks really cool

carmine kiln
#

is there a steammodded support for VS code?

red flower
#

i just pasted whatever there

red flower
jolly shadow
#

is it possible to use variables in a custom info queue localization entry ?

brave blade
red flower
#

no sadly you will need to iterate manually

brave blade
#

I wanted to make my Joker visually juice up and display a message for each card drawn kind of like Ramen

#

Ok what is the point of this if statement

jolly shadow
#

lmfao

faint yacht
ocean sinew
brave blade
jolly shadow
ocean sinew
#

Wait what fr 💀

#

I noticed now

brave blade
#

It's basically saying "If X is true, do A, else do A"

chrome widget
faint yacht
ocean sinew
#

localthunk prob did something else and forgot to change it later

brave blade
# faint yacht ?

Do you mind me using your code? (I haven't done much modding so idk if that's frowned upon or not)

faint yacht
#

Go ham with it.

brave blade
#

Ok, thank you :)

faint yacht
#

Just adjust the context call for your unique needs.

brave blade
#

Yeah, I think I'll need to add an other_card field since I need to check properties of the drawn card

faint yacht
#

card can not be defined when calling draw_card, though.

#

If it is not, it is internally defined and you may need to patch instead.

brave blade
#

Wdym it can't be defined? Isn't there a field in draw_card() for the card being drawn?

faint yacht
#

It's optional.

red flower
#

it can be nil

faint yacht
brave blade
#

Well, how does the game draw the card if it's nil then?

faint yacht
#

The else bit.

brave blade
#

Ohh, wait, so it's nil if it doesn't have a specific card it's targeting?

#

Am I understanding that correctly?

carmine kiln
faint yacht
#

If the specific card is not defined, it picks the top card of the cardarea and sets that as card.

carmine kiln
#

i can't use the F1 method as it hasn't found anything that matches of what should be searched for.

brave blade
faint yacht
#

card is an optional argument. However, if the cardarea to pull from is empty, card will stay nil.

brave blade
#

Ok, so to my understanding, if the card is specified originally then it's defined, and if it's not specified but it's able to pull from the cardarea then it's defined. The only case where it's nil is if no card was originally specified and there's nothing to pull from the cardarea. Is that correct?

faint yacht
#

Yeah.

carmine kiln
brave blade
#

Ohhhh ok, I think I get it now

#

So the reason I need to use an injection is so that I can access the data from card to check if it's nil? (Or just to check the drawn variable I guess)

faint yacht
#

Patch, but if you wish to be able to examine any given card that is being drawn, then yeah. Otherwise, my hook is enough.

brave blade
#

Yeah, I need to check if it's a mult card

faint yacht
#

Or you could iterate over SMODS.drawn_cards to check.

red flower
faint yacht
#

But the patch will be a bit easier to manage, I guess.

brave blade
faint yacht
#

...I suppose? Never really used that yet.

#

-# And, frankly, I am not in the mental mindset to be able to mod... despite needing to take hospital things off of my mind. x.x

brave blade
faint yacht
#

Barely functioning. You are free to look at my mod's code for stuff if need be.

brave blade
#

Ok, thanks for all of your help! :)

carmine kiln
red flower
wild escarp
#

How can I destroy a card before scoring?

oblique lotus
#

What's the variable that stores the total money you get on the cashout screen?

carmine kiln
red flower
carmine kiln
#

oh... seems like i can't type today anymore, whoops...

#

okay thank you, N'.

wispy falcon
#

Does every sprite in the game need 1x and 2x or do some only need 1x?

faint yacht
#

Both.

wicked pollen
#

hello

#

how to make a new joker

vernal path
azure valley
slim ferry
#

dont use steamodded example mods PLEASE...

vernal path
#

this info_queue is crashing when it's drawn, which is really strange to me:
info_queue[#info_queue+1] = {key = "m_mode_flesh_zygote", set = "Enhanced"} my localization is set up like how it's supposed to for enhancements, like return { descriptions = { Enhanced = { m_mode_flesh_zygote = {...}}}} It says cfg is nil, which, i'm not even sure what cfg means here

slim ferry
#

cfg means config

#

you should instead of that just do

vernal path
slim ferry
#

its missing the loc vars because of the way you added the info queue

vernal path
#

the flesh doesnt have loc vars

slim ferry
#

you should instead do info_queue[#info_queue+1] = G.P_CENTERS.m_mod_flesh_zygote works toobtw

#

oh

#

well then idk

vernal path
#

Oh, right, forgot about that one as well

carmine kiln
slim ferry
#

send the crash log too

vernal path
#

that is the crash log

#

its the full log

carmine kiln
#

yep

slim ferry
#

well the error says that there is not such file/directory so if i had to assume you have the incorrect file path in your atlas definition

#

and it says that there is no main.lua file before the crash

vernal path
#

seems like you have nested folders

#

it should look like Mods > mod > main.lua

carmine kiln
#

but it is already

slim ferry
#

thats

#

nested folder diagram go thanks aikoyori

carmine kiln
#

umm if that would be a nested folder then the .luarc.json fails to find the correct path.

slim ferry
#

okay then idk what the issue is

#

what does your assets folder look like?

carmine kiln
#

got only the images

#

although i do have some warnings at VS Code but they lead to Lovely

wispy falcon
#

Why do I get this error when I want to look at my blind in my collection?

carmine kiln
#

oh god it should have been "Mult"

slim ferry
#

did you do mult = <value> outside of the return...

#

because it shouldnt give that error

#

unless you do

#

also its not a warning its like info or whatever vscode calls it

slim ferry
red flower
slim ferry
#

dont

#

do that?

#

why is there a function in the return of your calculate

#

just return mult = card.ability.extra.mult

clear ocean
#

using the latest dev version and probably something changed but not sure

red flower
#

check vanillaremade it does that

timid zinc
#

NVM

red flower
#

lol

clear ocean
#

i did the opposite now

#

used to do smods.SOMETHING = {}

wispy falcon
red flower
#

the atlas needs to be defined as an animation atlas

clear ocean
#

did i miss something

#
        Joker = {
            j_farceur_stanczyk = {
                name = {
                    "Stańczyk"
                },
                text = {
                    "{C:inactive}(no effect added)"
                }
            }
        }
red flower
#

that looks fine

clear ocean
#

weird

#

thinking on having the effect where it disables or reverts the stickers

red flower
#

descriptions

wispy falcon
red flower
clear ocean
#

thanks

wispy falcon
clear ocean
#

is this a good effect for a legendary

#

@fresh bear @wet crag

wet crag
#

thank you!

brave blade
clear ocean
wet crag
# clear ocean is this a good effect for a legendary

What if it inverted sticker effects to be beneficial instead?
Rental - Gain $3 at end of round
Eternal - Can be sold but not destroyed
Perishable - I'm not sure here. Maybe it can't be debuffed? Maybe after 3 rounds of owning the Joker it increases in strength? Maybe every 3 rounds / hands / triggers it retriggers once?

clear ocean
#

ohh maybe

#

a bit burnt out of modding but once in a while i got an idea

wet crag
#

I don't know how difficult that would be to implement but that might feel more Legendary

wet crag
clear ocean
#

its more that i spent like the last few weeks just spending most of my free time and i think this isn't for me like i only have a few ideas

#

at least i tried and made me appreciate the game even more

azure valley
jolly shadow
wispy falcon
wild escarp
#

How can I destroy playing cards before they're scored?

frosty rampart
jolly shadow
#

after hacking at a hook for 2 hours

#

and getting undescribable bugs

frosty rampart
#

ye global calculate works too

candid prism
#

oh nvm you already had it solved lmao

ivory widget
#

Is there a way to create cards into the "discard pile", or wherever the cards go after being scored? I.E. not added to hand or shuffled into the deck

wild escarp
#

Anyone know if there's a way to destroy playing cards before they score?

wispy falcon
frosty rampart
red flower
wild escarp
red flower
#

no, i think it's G.hand.highlighted

red flower
#

you need to add a frames field

#

pls read the docs

azure valley
#

Potentially dumb question about stake cosmetics. I set shiny to true, but the sprite doesn't appear as shiny. When checking whether or not the shader function returned by get_stake_sprite is different (and therefore set by the lambda in the function), it is different from stakes 1-7 (which are equal to each other), and different from gold (9), yet I still don't get the shiny effect.

Can anyone think of anything else I can do to diagnose why it's not working?

red flower
brave blade
carmine kiln
#

i coded something, you guys think that this works?

slim ferry
#

idk why it wouldnt

#

but also

#

you should return xmult for Xmult and not just mult

brave blade
red flower
carmine kiln
#

well guess what... it didn't lol

fluid nebula
#

yo how can i get started with balatro modding

#

i have a dumb idea for a joker

#

and i know basic code

slim ferry
#

check the pins in modding-chat

azure valley
#

you might also want to check out the smod examples repo, vanilla remade repo, and the wiki of both.

slim ferry
#

smod examples kinda suck

#

they are very outdated

frosty rampart
#

still occasionally useful but vanillaremade is definitely much more helpful

wild escarp
carmine kiln
red flower
red flower
fluid nebula
#

i see

timid zinc
#
    key = 'crystalline',
    config = {
        extra = {
        }
    },
    loc_vars = function(self, info_queue, card)
        return { vars = { } }
    end,
    in_shop = false,
    shader = 'crystalline'
}```
I have a file `assets/shader/crystalline.fs` but i get this error:
fluid nebula
#

oh damn this game is programmed in lua? i don't know this language

slim ferry
#

lua is pretty simple imo

fluid nebula
#

oh, nice

red flower
#

i didnt know lua before starting its really easy

slim ferry
#

what language do you know

fluid nebula
#

does anybody want to hear my joker idea

jolly shadow
azure valley
fluid nebula
fluid nebula
azure valley
#

what's the idea?

slim ferry
#

i mean i was able to mod the game without knowing lua just from my experience in python

#

the docs for modding the game are very helpful too

#

thats where like 99% of my lua knowledge comes from tbh

fluid nebula
azure valley
#

easy to implement

fluid nebula
#

or maybe a higher chance

fluid nebula
azure valley
#

probably not the best joker in the world tho

fluid nebula
#

the point isn't to make good or balanced jokers for me. the point is to make whatever joker comes up in my mind

#

maybe a subway surfers joker that does nothing but plays a subway surfers gameplay video

zealous scaffold
carmine kiln
red flower
carmine kiln
#

that would be a for in method right?

zealous scaffold
brave blade
zealous scaffold
fluid nebula
#

okay now i need to learn how to create balatro mods

zealous scaffold
fluid nebula
#

my idea is to reference the game's pre-existing jokers as a basis for my code. i can learn. i can adapt.

zealous scaffold
fluid nebula
carmine kiln
#

hold on...the hands table should work like a array perhaps i could use a size getter for this

zealous scaffold
#

It is a "mod" that recreates jokers etc. from the base game using smods.

red flower
#

also it's not an array

zealous scaffold
rotund sable
#

It also has a nice wiki

#

10/10 Would recommend

fluid nebula
rotund sable
zealous scaffold
rotund sable
#

Let's say you want to do something that is already made in vanilla, you can always look there and learn from that

fluid nebula
#

oh, i see

red flower
#

vanillaremade is there for reference because there are a lot of undocumented things

fluid nebula
#

google brings nothing because search engines all suck now

zealous scaffold
#

I've seen a site that does balatro mods with block programming, like Scrath, but it's not my beach.

fluid nebula
#

thanks

carmine kiln
zealous scaffold
rotund sable
#

Yeah it's JokerForge

molten relic
#

i have still not found the problem in my object type, by the way

zealous scaffold
#

I found Q very well done, for those who want more basic things like creating only a few wildcards for fun, etc., but I prefer to do it myself.

red flower
carmine kiln
#

whats that

zealous scaffold
#

2 values in a variable, you can make a vector where each IT holds 2 values together (more or less this).

#

(If that's what I'm thinking)

#

And you can make pairs of pairs.

candid prism
zealous scaffold
#

I imagined it might not be that.

molten relic
# red flower https://stackoverflow.com/questions/55108794/what-is-the-difference-between-pair...

would you perhaps be able to useth thy knowledge to helpeth me?
whats wrong with this here code

    key = "Passive Items",
    default = "j_bali_breakfast",
    cards = {},
    inject = function(self)
        SMODS.ObjectType.inject(self)
        self:inject_card(G.P_CENTERS.j_bali_sadonion)
        self:inject_card(G.P_CENTERS.j_bali_innereye)
        self:inject_card(G.P_CENTERS.j_bali_spoonbender)
        self:inject_card(G.P_CENTERS.j_bali_cricketshead)
        self:inject_card(G.P_CENTERS.j_bali_myreflection)
        self:inject_card(G.P_CENTERS.j_bali_numberone)
        self:inject_card(G.P_CENTERS.j_bali_bloodmartyr)
        self:inject_card(G.P_CENTERS.j_bali_brotherbob)
        self:inject_card(G.P_CENTERS.j_bali_skatole)
        self:inject_card(G.P_CENTERS.j_bali_haloflies)
        self:inject_card(G.P_CENTERS.j_bali_magicmush)
        self:inject_card(G.P_CENTERS.j_bali_thevirus)
        self:inject_card(G.P_CENTERS.j_bali_roidrage)
        self:inject_card(G.P_CENTERS.j_bali_heart)
        self:inject_card(G.P_CENTERS.j_bali_rawliver)
        self:inject_card(G.P_CENTERS.j_bali_skelekey)
        self:inject_card(G.P_CENTERS.j_bali_dollar)
        self:inject_card(G.P_CENTERS.j_bali_boom)
        self:inject_card(G.P_CENTERS.j_bali_trans)
        self:inject_card(G.P_CENTERS.j_bali_compass)
        self:inject_card(G.P_CENTERS.j_bali_lunch)
        self:inject_card(G.P_CENTERS.j_bali_dinner)
        self:inject_card(G.P_CENTERS.j_bali_dessert)
        self:inject_card(G.P_CENTERS.j_bali_breakfast)
        self:inject_card(G.P_CENTERS.j_bali_rotten)
        self:inject_card(G.P_CENTERS.j_bali_spoon)
    end,
})
red flower
#

dunno

#

whats the problem

zealous scaffold
#

I know Pair for C++.

molten relic
red flower
#

when does that happen

molten relic
#

when i open the game

#

i think this is the problem btw

red flower
#

is the object type defined before or after the jokers

molten relic
#

after

red flower
#

no idea

molten relic
#

ill paste code for a booster pack

fluid nebula
#

okay so vanilla remade has just made a duplicate of every deck i can play

molten relic
#

maybe thats the problem?

fluid nebula
#

and everything in the collection.

#

like merging my save file with a new one

#

remind me what this is meant to do?

molten relic
#
    key = 'p_bali_itempack1',
    loc_txt = {
        ['name'] = 'Item Pack',
        ['text'] = {
            "Choose {C:attention}1{} out of {C:attention}3{} {C:gold}Item Cards{}"
        }
    },
    atlas = 'customBoosters',
    pos = {
        x = 0,
        y = 0
    },
    config = {
        extra = 3,
        choose = 1
    },
    create_card = function(self, card)
        return {
            set = "Passive Items", area = G.pack_cards, skip_materialize = true, soulable = true, key_append = "bali"
        }
    end,
    discovered = false,
    draw_hand = false,
    group_key = "bali_itempacks",
    cost = 4,
}     ```
rotund sable
frosty rampart
#

vanillaremade isn't meant to be a mod you play, it's a reference for how to use SMODS's tools

#

if you want to reproduce a certain functionality of vanilla content (e.g. "how do i make my joker give +mult"), you can look at VR's implementation of the basic Joker and borrow that

fluid nebula
fluid nebula
frosty rampart
#

ye

fluid nebula
#

guess i need to look into the source code

rotund sable
#

It's neatly organized

#

By category

fluid nebula
#

category of what?

molten relic
#

jokers, decks, tarots, etc.

ocean sinew
#

YESSS I EXPORTED PARSER TO BALATRO

#

I know exporting a module Is simple but I took a long time figuring it out 😭

#

now I can parse code though

fluid nebula
ocean sinew
#

NOW I CAN DO THAT TALISMAN FIX

fluid nebula
#

sorry if i sound dumb, but how specifically do i access the source code?

red flower
#

mods are just text files with code

molten relic
#

open the src folder

#

and open a text file

ocean sinew
#

I'LLLLLLLLLLLLLLLLLLLLLLLLLLL FIX TALISMANNNNNNNNNNNN

fluid nebula
red flower
#

oh you mean the balatro source code?

#

i recommend checking the files on Mods/lovely/dump instead

#

those are the source code after lovely patches

fluid nebula
#

oh

#

now i just need a program to read .lua files

modern kindle
#

youve got one, installed right into your head

red flower
modern kindle
#

i recommend vscode and not notepad

#

please do not notepad

rotund sable
fluid nebula
#

thanks

rotund sable
rapid stag
#

notepad++ is fine

carmine kiln
#

i'm in a superposition of understanding and not understanding

rapid stag
#

i've been writing my mod in it for the past 8 months now

carmine kiln
red flower
fluid nebula
#

now i must learn what this all means

#

thanks tho

red flower
idle plaza
#

In a for loop like that, the v is just short for G.GAME.hands[i]

red flower
#

also you what the comparison in the if below to be the key of the hand, not the max level

rotund sable
#

Trying to learn everything at once can be overwhelming

fluid nebula
#

you're right

wild escarp
#

Is there a way for a joker to check if it's been destroyed?

red flower
#

specifically destroyed?

wild escarp
#

Yes

red flower
#

you can maybe use the new context.joker_type_destroyed but idk if its passed to itself

red flower
#

i think somethingcom had a snippet for this but i cant find it

carmine kiln
red flower
#

get_max is a number G.FUNCS.get_poker_hand_info returns a string

#

(well it has multiple returns, idk if it works in the if condition)

carmine kiln
#

well i tried avoiding that since the VS Code tells you if a var swaps from a value to something else and vise versa

#

oh

#

you mean the if section after the for in ended, right?

red flower
#

yes

carmine kiln
#

does selecting a card count as pre-discard? since thats whenever i'm crashing since i added the post for in compairision.

red flower
#

no, its probably crashing in the loop because its not in a context

carmine kiln
#

huh

red flower
#

this is how i would do it

if context.pre_discard then
    local get_max = 1
    local max_key
    for key, v in pairs(G.GAME.hands) do
        if v.level > get_max then
            get_max = v.level
            max_key = key
        end
    end
    local scoring_name, _ = G.FUNCS.get_poker_hand_info(G.hand.highlighted)
    if scoring_name == max_key then
        card.ability.extra.mult = card.ability.extra.mult + card.ability.extra.mult_gain
    end
end
#

you also had the wrong syntax in pairs

idle plaza
carmine kiln
#

So that is working yet i also wanted to make it add normal Mult yet it does not change the mult.

idle plaza
#

What is it doing instead? N's code was entirely about changing the mult.

azure valley
#

if your stake is not shiny but you have set shiny = true in the SMODS.Stake definition, what might be going on?

jolly shadow
#

is it possible to change collection order? tried setting order on the card centers but it doesnt seem to do anything

carmine kiln
slim ferry
jolly shadow
#

i can't change the load order or it messes shit up

azure valley
#

that's really scary edward.

#

You should probably have each joker more independent

#

why would it mess shit up?

#

If I want to reorder jokers in my mod, I just reorder a list.

#

(because each joker is in its own file)

jolly shadow
idle plaza
jolly shadow
#

ykno thats like, common sense

#

if i cant reorder shit one probably needs to be later?

azure valley
carmine kiln
#

i have re-added it let's see if that works

jolly shadow
idle plaza
jolly shadow
carmine kiln
idle plaza
fluid nebula
#

trying to mod a joker with this tutorial but it's not appearing in my collection

candid elbow
#

It should work

#

You have some issues

jolly shadow
candid elbow
#

Bro doing bunch of nothin

ocean sinew
jolly shadow
#

it works on some other cards

candid elbow
#

Hey steve

jolly shadow
#

just fuckin gives up on salon for some reason

ocean sinew
#

btw edward robinson

#

I exported lua parser to balatro

candid elbow
jolly shadow
ocean sinew
#

It takes a lua string

#

and give a table which you can change to change code easily

#

then you call a function

#

and it transforms back to lua code

#

I'm gonna use that for automatic scaling detection and fixing talisman

ocean sinew
#

cuz u can easily replace code

candid elbow
#

GASP

fluid nebula
#

okay in all seriousness

candid elbow
#

Fixing talisman

ocean sinew
#

yes

fluid nebula
#

do you want to see my code and joker asset files

candid elbow
#

Yes

candid elbow
ocean sinew
#

they told me it was impossible...

#

they told me I was crazy

#

who's crazy now

slim ferry
candid elbow
#

Eris back off

#

Lemme cook

slim ferry
#

okay okay

#

i trust

jolly shadow
ocean sinew
jolly shadow
#

if u say so

candid elbow
#

I’ll ban myself if this shit works

fluid nebula
#

sorry if this is a simple mistake and i am dumb

candid elbow
ocean sinew
#

I already figured out local assignments

#

now I need to figure out for loops

candid elbow
#

In smods.joker

slim ferry
#

that wouldnt stop it from loading

candid elbow
#

He doesn’t say it doesn’t load he said it doesn’t appear

#

Mhm

#

WHERE’S THE JSON FILE

slim ferry
#

also pos defaults to 0,0

fluid nebula
slim ferry
# fluid nebula

also you should probably be using visual studio code instead of n++

fluid nebula
#

this is rapidly devolving into a shitshow

candid elbow
#

Yeah that shit has no colors vscode just better

candid elbow
slim ferry
#

also you shouldnt need that header if you have a metadata json file

fluid nebula
#

nothing here @candid elbow

candid elbow
candid elbow
#

It just ignores it

#

Lol

fluid nebula
#

there's only assets and main.lua

slim ferry
#

you need a json file with your mod metadata

candid elbow
#

Wait 1 second

slim ferry
candid elbow
#

Use this example as a template

candid elbow
slim ferry
#

why would you link to an smods example mod instead of just to the docs....

candid elbow
#

Because examples made me under better

#

Understand *

slim ferry
#

fair

fluid nebula
#

wait a second

#

does the json file contain the metadata of the mod?

candid elbow
#

Yes

#

You don’t need the header

#

Set the main file to your lua file btw

fluid nebula
#

okay

candid elbow
#

You can do it fred

#

I believe in you

#

You’re him

fluid nebula
#

thank you

#

what do i call you

#

kate?

#

put the metadata into the json file @candid elbow

candid elbow
#

It should load

#

Can i see the json file

#

To make sure you didn’t fuck up

candid elbow
fluid nebula
fluid nebula
candid elbow
candid elbow
candid elbow
fluid nebula
candid elbow
#

It’s okay trial and error is what makes you better >-<

fluid nebula
#

nice :>

candid elbow
#

Mhm

#

Now lunch the game

fluid nebula
#

mmmm lunch

candid elbow
#

😭

#

Sob

#

I meant launch

#

Please don’t eat the game

fluid nebula
#

i won't

#

anyway the mod itself is being recognised in the mods section, but it cannot be launched because it can't find the file main.lua

#

which is weird, since the file containing the joker template is called main.lua

candid elbow
#

Silly fred

#

You named it

#

Main.lua.txt

#

It’s not lua its txt

#

Hehe

#

Also the json file

candid elbow
fluid nebula
#

AHHHH

#

trying again

candid elbow
#

That’s why vscode is goated

jolly shadow
#

big nerf to bird but what ever

fluid nebula
#

hmmmmm

candid elbow
#

It’s open

#

Probably needs a , after loc_txt

#

And in atlas

#

After key

#

Missing ,

fluid nebula
#

okay. added the commas in. trying now

candid elbow
#

And after path

#

Lol

#

Add all the commas

fluid nebula
#

i assume the commas are how lua tells itself to go to the next line of code

candid elbow
#

LOL

fluid nebula
#

i see it now

#

saw it before you sent the message

#

this really is a shitshow

candid elbow
#

Yeah syntax is fucked

slim ferry
candid elbow
#

It’s just every item in a table needs to be separated with a ,

fluid nebula
#

YESSSS

candid elbow
#

Hell yeah

#

GOOD JOB FRED

#

Now add atlas=“your atlas key”, and pos{x=0,y=0}, to your joker code

#

Add discovered=true , id you don’t have debug plus (please install it )

foggy ginkgo
#

Bros a genius

candid elbow
#

If you have debug plus hover over it and press ctrl +2

candid elbow
fluid nebula
candid elbow
#

Good job

#

You need vscode

#

NOW

fluid nebula
#

i should get it you are correct

#

i am fine with using notepad++ but i guess it's better

candid elbow
#

Trust me it’s way better + support all languages and theme customizable and highlights your variables / syntax

#

It makes everything easier visually

fluid nebula
#

Oker is birthed

fluid nebula
#

i took computer science. i know IDEs are better

#

(sorry if that sounds arrogant. was not the intention)

azure valley
#

It's ok, I still use Vim

candid elbow
fluid nebula
#

yeah

azure valley
#

I understand if you don't want to VS Code

candid elbow
#

It should be

#

71x95

#

Pixels

#

1 pixel border (empty)

#

Check the mod repo i sent you earlier it has a sprite example and everything
For editing I recommend aseprite if you can afford it (by all means ) or kirita (good free alternative)

azure valley
#

libresprite is an aseprite clone from the same code base

candid elbow
#

It’s ass

#

Let’s be real

azure valley
#

It's good enough for programmer art

#

Which is all I do

candid elbow
#

You can compile aseprite for free

azure valley
#

Oh, then I'll do that then

fluid nebula
#

i copied the joker image incorrectly

candid elbow
candid elbow
fluid nebula
#

should work now

candid elbow
#

Hands crossed

fluid nebula
#

my child is born

candid elbow
#

Hell yeah

#

He can’t speak thi

#

Lol

fluid nebula
#

now it's time to program the actual mechanics at half past midnight 🔥

#

thank you for your help, kate. you were pretty much my bridge across a valley

candid elbow
#

Need help making it work

#

?

fluid nebula
#

i think i can do this if i just look through more code

#

currently implementing only the 999,999 mult

timid zinc
#

is there a context for debuffing a card?

candid elbow
#

Yes

#

Check vanilla remade or the docs for calculate function

#

It’s down

candid elbow
timid zinc
#

I don't see anything in the docs for it, only stuff about playing a debuffed hand

fluid nebula
#

nevermind it's a shitshow again

#

this happens when i hover over it

candid elbow
#

Can i see the code

fluid nebula
#

sorry to eat up so much of your time

timid zinc
#

card.ability.extra.Xmult

#

not ability.extra.Xmult

candid elbow
#

Not center

#

And replace center with card

#

In loc_vars

manic rune
candid elbow
fluid nebula
#

oh, i guess the tutorial i'm using is a bit outdated

candid elbow
#

Mhm

#

Just a little

#

S is working on a new one

manic rune
#

3:

candid elbow
#

Pfff

fluid nebula
#

still crashing

candid elbow
#

Who reads

fluid nebula
#

wait i misread some code

#

just give it a sec

candid elbow
fluid nebula
#

yeah that's what i just did

candid elbow
#

And card instead of center

#

In loc_vars =

manic rune
timid zinc
jolly shadow
manic rune
#

mm ic

fluid nebula
#

good news, it's not crashing. bad news, it's not working.

#

it just doesn't apply mult

manic rune
#

what's the calculate code

candid elbow
#

Lol

#

I swear i saw ig

#

It

candid elbow
split cairn
#

is this correct for detecting steel cards and making them give x chips when held in hand?

    calculate = function(self, card, context)
        if context.individual 
        and context.cardarea == G.hand 
        and not context.end_of_round 
        and SMODS.has_enhancement('m_steel') then
            if context.other_card.debuff then
                return {
                    message = localize('k_debuffed'),
                    colour = G.C.RED
                }
            else
                return {
                    x_chips = card.ability.extra.huntress
                }
            end
        end
    end,
manic rune
#

no

#

SMODS.has_enhancement(context.other_card, "m_steel")

fluid nebula
candid elbow
#

you got it

fluid nebula
#

i should have just watched more of the tutorial lmao

#

my bad

split cairn
candid elbow
#

Lmao

split cairn
manic rune
split cairn
manic rune
#

oh maybe not then lol

timid zinc
manic rune
#

i trust N'

candid elbow
#

I trust N and S with my life

carmine kiln
#

So i while i tried out the free fall jokers i made with some help.
I encountered one in the shop
Should the stats of it stay this way?

split cairn
#

how can i make it so that if a specific joker is present, the x chips amount is different?

    calculate = function(self, card, context)
        if context.individual 
        and context.cardarea == G.hand 
        and not context.end_of_round 
        and SMODS.has_enhancement(context.other_card, "m_steel") then
            if context.other_card.debuff then
                return {
                    message = localize('k_debuffed'),
                    colour = G.C.RED
                }
            else
                return {
                    x_chips = card.ability.extra.huntress
                }
            end
        end
    end,
brave blade
#

Can anyone tell me why per-card discard effects like Ramen are able to pause other actions for a moment? I'm trying to pause in a similar way for a custom individual card draw context and I can't get it to work (all of the actions just happen after the cards are done drawing)

timid zinc
fluid nebula
#

oh my fucking god i'm getting tired of this shit

brave blade
fluid nebula
#

my joker is giving the message of the mult without affecting the score

#

i've followed this tutorial to the letter

brave blade
timid zinc
timid zinc
timid zinc
timid zinc
# fluid nebula which line?

idk what your code looks like but here's an example:

        if context.cardarea == G.jokers and context.joker_main and context.scoring_hand and card.ability.extra.xmult > 1 then
            return {
                message = localize{type='variable',key='a_xmult',vars={card.ability.extra.xmult}},
                xmult = card.ability.extra.xmult,
                colour = G.C.RED
            }
        end
fluid nebula
timid zinc
#

Xmult_mod, not Xmult_Mod

#

It's capitilization sensitive I believe

fluid nebula
#

my bad

jolly shadow
#

also you dont need to specify the message

fluid nebula
#

it finally worked. thank you, @timid zinc

jolly shadow
#

it puts an X# message on it already

fluid nebula
#

i think i'll add the 1 in 6 chance to crash the game tomorrow

slim ferry
# fluid nebula

do xmult, not xmult_mod. xmult does the message automatically

fluid nebula
timid zinc
#

either works tho, so it's not that big a deal imo

fluid nebula
#

i imagine i just need to set something up, similar to wheel of fortune

slim ferry
#

xmult_mod is like old tho

fluid nebula
#

if i can find it in the code, i'll replicate some of it and include the line that closes the program if it triggers

gusty iron
#

how would i set up a new variable to be saved? im trying to set something up like G.GAME.Voucher_Mult, but it doesn't seem to be working

split cairn
ornate meteor
split cairn
fluid nebula
#

that's what i mean

#

i think saying it "crashes" the game sounds better though

ornate meteor
fluid nebula
#

actually, in fact, 1 in 6 is too lenient. why not 1 in 2

brave blade
fluid nebula
#

i'm gonna be making abysmal dogshit

ornate meteor
#

btw this makes 3 days trying to get my custom joker text into the game : D

ornate meteor
#

what the fuck is an os.exit()

gusty iron
#

immediately closes the game

fluid nebula
ornate meteor
#

ah

gusty iron
#

like not crash

#

it just closes

ornate meteor
#

yknow makes sense that os.exit exits the game

fluid nebula
#

plus if i make it a 1 in 2 chance, i'll punish an oops all 6s

clear ocean
#

what do you think of this idea

brave blade
clear ocean
split cairn
#

how can i modify the judgement tarot to summon jokers from a specific pool? like i list the jokers i want in that pool and it randomly creates one

    use = function(self, card, area, copier)
        G.E_MANAGER:add_event(Event({
            trigger = 'after',
            delay = 0.4,
            func = function()
                play_sound('timpani')
                SMODS.add_card({ set = 'Joker', edition = 'e_negative' })
                card:juice_up(0.3, 0.5)
                return true
            end
        }))
        delay(0.6)
    end,
clear ocean
clear ocean
#

let me try a jiggle animation to see if thats possible if not it would be something like banner where it will give you the chips when scoring

gusty iron
#

okay i got the mult system working, but the messages dont seem to be updating, any help? heres my current function:

local old = SMODS.calculate_individual_effect

SMODS.calculate_individual_effect = function(effect, scored_card, key, amount, from_edition)
    -- ...
    if (key == 'mult' or key == 'h_mult' or key == 'mult_mod') and amount then
        if effect.card and effect.card ~= scored_card then juice_card(effect.card) end
       local effective = amount
    if G.Mult_50 then
    effective = amount + amount * 1.5
    end
    
        -- give 50% more mult based on effective yeah
        mult = mod_mult(mult + (effective))

        update_hand_text({delay = 0}, {chips = hand_chips, mult = mult})
        if not effect.remove_default_message then
            if from_edition then
                card_eval_status_text(scored_card, 'jokers', nil, percent, nil, {
                    message = localize{type = 'variable', key = effective > 0 and 'a_mult' or 'a_mult_minus', vars = {effective}},
                    mult_mod = effective,
                    colour = G.C.DARK_EDITION,
                    edition = true
                })
            else
                if key ~= 'mult_mod' then
                    if effect.mult_message then
                        card_eval_status_text(effect.message_card or effect.juice_card or scored_card or effect.card or effect.focus,
                                              'extra', nil, percent, nil, effect.mult_message)
                    else
                        card_eval_status_text(effect.message_card or effect.juice_card or scored_card or effect.card or effect.focus,
                                              'mult', effective, percent)
                    end
                end
            end
        end
        return true
    end
    return old(effect, scored_card, key, amount, from_edition)
end
clear ocean
clear ocean
#

so three questions that the community can suggest on (democracy wins)

  1. the rarity
  2. if 12 chips per trigger is balanced and if not what would be a better option (try to keep it music related)
  3. should i patch this oversight but either not counting itself, blueprint/brainstorm, or any other joker like that
clear ocean
#

Thinking on having the joker art not only be random from an atlas (not sure how to do that) but based off actual covers. which ordination do you prefer? (the sleeve is to protect the vinyl on my sheets just in case it won’t appear in the art, unless you want that)

oblique lotus
#

What's the easiest way to define a new color and make it usable in localization?

clear ocean
oblique lotus
#

Thanks

oblique lotus
#

Odd to me that SMODS doesn't have a SMODS.Colour function to automatically add a new colour to LOC_COLOURS

red flower
rapid stag
#

i mean, there's a few days to do it. i do it with a hook cirDerp

frosty rampart
oblique lotus
red flower
oblique lotus
clear ocean
#

looks like static jokers goes towards the plus which does help with the display but a card like castle is weird visually

#

it looks like the post joker function will allow cards like castle not go uncounted

#

still not sure which rarity should the card be and any documention on how to make it where i can make an atlas of different albums where it picks one randomly when it spawns in the shop or via judgement

#

and oh yeah! i plan to have the design like this where the sticker has the joker itself (might have where each one is based off the designs of the vanilla jokers

#

so if you have an album art suggestion feel free to suggest

oblique lotus
rapid stag
clear ocean
#

so your prefix?

rapid stag
#

no

#

literally just a global variable

the point is, i have a table i stuff colours in
the hook checks against that table to see if the string in {C:colour}
is a key present in the table. if so, it returns the colour. otherwise it just does the function normally

oblique lotus
#

Gotcha

wild escarp
#

Is there a destruction equivalent of context.selling_self?

daring fern
wild escarp
#

What is it and how do I use it?

frigid birch
daring fern
clear ocean
frigid birch
#

I got good kid 4 and Weezer blue and green albums

#

others too

clear ocean
#

not sure how to do the atlas random thing yet might look at it either tomorrow or the weekend

wild escarp
drowsy heath
#

if i were to add a custom enhancement and wanted a joker to apply it to a card at random when played what would i use to do so, i was able to do glass cards using m_glass but for a custom enhancement what is it

clear ocean
#

what do you think of this idea? basically it doesn't appear normally in shops, boosters, or via judgement, but spawns in (and self destructs after scoring) similar to the aftermention perk in the fallout series

#

could rename it to "mysterious joker"

#

but the main thing is i'm not sure if that's possible since unlike something like rift raft

oblique lotus
clear ocean
#

i could make the card negative which shouldn't hurt cards like stencil joker

frosty rampart
#

"can't spawn normally": set in_pool to always return false for the joker itself. ez
"can spawn in at random": you'll probably want to hook whatever function runs when you press play and handle the spawning code there

clear ocean
#

wait nvm discord's text pointed out the problem

frosty rampart
#

yea I saw it too lol

clear ocean
#

vscode didn't point it out so that's a bit weird

drowsy heath
#

vscode doesnt help at the most random times

clear ocean
#

can probably have it in the code where if its over the joker limit or you have a joker like stencil joker make it negative or i can make it always negative

oblique lotus
drowsy heath
#

just wondering if the joker limit was reached how would it add the card or would the game see it as negatie as a first thing and allow it to be added to hand

frigid cargo
#

What does the new smods update bring? I would also like to ask where i can check

clear ocean
#

its a dev update not a full release

#

if you want to take advantage of the features and bugs you have to copy/clone/download the repo

#

might make it even more mysterious™ i can def do the retriggering and disappearing/self destructing code but gonna have to learn about hooks to do the appearing

clear ocean
#

just the hook itself which is something i need to look into later

#

even got the in pool thing down which was easy peasy lemon squesy

wild escarp
#

How can I check if a joker belongs to a set?

clear ocean
#

elaborte

wild escarp
#

An objecttype, my bad