#💻・modding-dev

1 messages · Page 73 of 1

rough furnace
nocturne garnet
#

not exactly

#

glitched/misprint from cryptid just gives x0.1 to x10 to all values randomly

#

this gives either +3.25 to -1.25, x3.25 to x-1.25, -3.25 to --1.25 or /3.25 to /-1.25

nocturne garnet
#

@opal spade you know your infinite fusions thingy

#

how the hell did you make it retain the jokers on reload 😭

#

i never found out how

nocturne garnet
mild night
mild night
#

buys everything in shop and eats it?

nocturne garnet
umbral zodiac
#

what's the proper way to delete/dissolve a card from your deck? it seems just doing card:start_dissolve() causes bugs and makes invisible cards sometimes

crisp coral
#

context.destroying_cards iirc

#

check Sixth Sense

umbral zodiac
#

in that block what actually tells it to destroy the card

tepid crow
#

I'd still say check sixth sense

umbral zodiac
#

all i see is spectral consumable shenanigans

nocturne garnet
umbral zodiac
#

new element

#

jimbonium

umbral zodiac
tepid crow
#

or trading card

#

or another joker that destroys cards

umbral zodiac
#

do those get called when discarding as well

hardy viper
#

i don't think checking vanilla cards is good considering they sometimes take really weird different routes you can't do with a mod

#

i usually check modded jokers so in this case something like the queens gambit from cryptid would be good

ebon blade
#

phishing!

solid salmon
#

i forgor where x_chips

opal spade
nocturne garnet
#

awesome ty

crisp elbow
#

same place it was put last..

solid salmon
#

Ok

mild night
opal spade
nocturne garnet
#

ah no its fine

#

i did joker copying a while ago

opal spade
#

like I think you could even make it so after copying a joker it changes it's description to match the copied joker

topaz sun
#

Would this bee too OP?

mellow sable
#

This is exotic tier…

tepid crow
#

would that gain ^0.5 if a joker gave x5?

mellow sable
#

It’s probably better than most Cryptid exotics too

topaz sun
#

If you had X5.5 Mult it would still gain ^0.5 Mult

tepid crow
#

that seems pretty good for an uncommon lol

topaz sun
#

I forgot to put 'resets each round'

tepid crow
#

oh

topaz sun
#

lol

#

But yeah, it'd be next level broken without reseting

sly sluice
still jacinth
#

is there any way to make this little tab on the side be a playing card instead of an enhancement or joker? im currently using this code:

info_queue[#info_queue + 1] = G.P_CENTERS['m_steel']

#

or just any custom text

rough furnace
#

I think you can use any localization key

still jacinth
#

this is probably dumb but how do i make a localization key without attaching it to a card?

opal spade
#

{set = , key = , specific_vars = {}}

still jacinth
#

which set

steady phoenix
opal spade
nocturne garnet
crisp coral
#

that looks uncommon at best

umbral zodiac
#

high quality art

brisk rose
umbral zodiac
#

joker pimch

#

i forgot to make it Not legendary so now we have the worlds worst legendary

brisk rose
#

pffft

#

waiting for a chicot joke

#

even though chicot is good

umbral zodiac
#

no

#

u cannot stop me

brisk rose
umbral zodiac
#

oh uh oh

#

i forgot to make blueprint not work with my scaling jokers scaling part

brisk rose
#

zooom

umbral zodiac
#

blueprint this for a Lot of fun

hardy viper
#

if only i knew more than very little about scp shit 🥸

#

its fine though i can just recruit somebody to do all the creativity for me /j

brisk rose
#

why make an scp mod if you're not super into it?

ebon blade
crisp coral
#

if only there was a mod with a game that took inspiration from scp
/j

opal spade
#

if i wanted to make a custom object type that could be discovered would i have to save their discovered status myself? if so where would i hook/patch to do that

#

i feel so stupid rn

#

im used to checking if a joker is in collection by checking the collection

#

but you can just

#

check if the card's area is marked as collection

opal spade
languid mirage
#

I know grim mod has discoverable object type (skills) and collection tab

opal spade
#

yeah, i'll take a look at it when i get back to collection

lucid sun
#

i've tried to have a look but couldn't find anything, but is it possible to change one hand into another? trying to get straights to turn into straight flushes but unsure how to do so.

brisk rose
#

Betmma has ascension, a joker that does that sort of thing

lucid sun
#

awesome ill give it a look, cheers

wintry solar
#

@mellow sable when you added the edition calc with retriggers, did you only add it for playing cards or am I blind? nvm I am indeed blind

wintry swallow
#

Im sad that mods arent available for mobile, i dont even have a pc

cobalt surge
brisk rose
#

For context they're just replacing he en-us locale. My impression is that lovely could do it fairly trivially. Though that would probably also break anything that might patch into it, so I'm not sure

cobalt surge
#

yeah

#

idk

#

if any1 can help pls lmk

topaz sun
#

Guys, is there a guide somewhere on how to make joker mods? 🥹

brisk rose
#

Ah okay

#

Apparently smods will just replace them anyway if you make a mod with just a header and put the new loc in a folder called localizations

mental nacelle
nocturne garnet
#

ouroboros soloes ngl

rough furnace
#

Stuntman goes hard

languid mirage
#

is this actually a challenge balatrojoker

#

It's like you have 9 negative eternal blueprints

rough furnace
#

well I mean some aren't negative

#

but yeah

nocturne garnet
#

its not actually that powerful lmfao

#

the challenge still has the effects on cards in collection

limpid wing
nocturne garnet
#

if i knew how to do this it would be

#

wth game!!

rough furnace
#

Debuffs are funny

mild night
ebon blade
frosty dock
#

you can't just return joker_slots from calculate, that's not how that works

ebon blade
#

oh that was randomly there, i accidently left it there

frosty dock
#

look at an actual joker slots effect, it works via add_to_deck/remove_from_deck

#

also mult_mod will be +4

ebon blade
#

i removed it, but the problem is the game doesnt even detect this is as a mod

frosty dock
#

oh right

ebon blade
frosty dock
#

your header is indented

ebon blade
#

which means?...

frosty dock
#

there's whitespace before the --- on each line

ebon blade
#

ah

#

i removed the space, it still doesnt detect

#

current code

#

wait lemme send as a txt

frosty dock
#

your header is missing a required field

#

i.e. a description

ebon blade
#

oh my fucking god

#

im stupid

#

the game is still not detecting it...

#

found the issue

#

i didnt have a ---------------------------------------------- thing that seperates the header from the rest of the code

#

holy shit steammodded is sensitve

edgy reef
#

json metadata save us

#

save us json metadata

brisk rose
#

It's been si long since I've played vanilla that it took me like 3-5 hours to win a run

#

Though that might be because I also have to unlock stuff

#

Whoops meant to put this in modding-chat

umbral zodiac
#

will anything evil happen if i try to give a decimal amount of money

#

or does it just work

brisk rose
#

I think it works fine

#

Steamodded either adds it or it's technically in the base game

limpid flint
#

Yeah give imaginary money instead mate

paper hare
#

In function Game:update(dt) and modulate_sound(dt), what does the argument dt mean?
I wanted to figure out the length of music1, but the original file is very pitch-shifted

languid mirage
#

so like time between last and this frame started rendering

paper hare
#

The speed modifier for music1 is definitely somewhere around 0.7X, but I need to know what dt is to get a better value

languid mirage
#

¯_(ツ)_/¯

#

cant help you atm

paper hare
#

If it is 0.7X, then the length of music1 would be 4:08.029

opal spade
#

delta isnt (or at least - shouldnt be) a fixed value, it changes every frame

crisp coral
opal spade
#

it makes sense, just didnt expect that

crisp coral
#

yeah real dt is dt / G.SETTINGS.GAMESPEED

brisk rose
#

I guess game speed really does mean game speed

#

and the music speed is changed to compensate

#

if I'm understanding that right

primal robin
crisp coral
#

shrug

nocturne garnet
#

yo is it possible to disable a boss blind in challenges

#

i need to disable crimson heart and verdant leaf

#

nvm found it

nocturne garnet
#

i might be a little evil

paper hare
#

When I was making upgrademod, I overhauled Chicot and Luchador to make the "boss blind level" feature

drowsy tulip
regal wolf
#

I’ve done a lot with the game music

#

Game runs music at 70% pitch and speed of sound files

nocturne garnet
#

how tf do you remove rank sprites from cards 😭

#

bro looking like an Ace

#

hes the REAL scholar

ebon blade
#

how do i take ownership of a joker in my mod?

#

nvm found it

hardy viper
#

is there anything stopping you from just automatically installing dependencies in your mod if they don't exist?
os.execute("cd %appdata%/Balatro\Mods & git clone (link)") would just work wouldn't it? unless i have a fundamental misunderstanding of os.execute or smth

#

oh wait you'd need git for that

#

not everyone has git widegladeline2

#

regardless surely there's a similar approach with something else

#

i completely understand why steamodded can't do something like this because there's no central hub for mods but why can't individual mods with dependencies like cryptid do something along those lines

frosty dock
#

resolving dependencies automatically is something we do want to implement within steamodded

#

it's a bit of a bigger project tbh

#

but no we can't just use git

rough furnace
#

yeah also os.execute completly frezes the process

#

unless its done in a thread

frosty dock
#

that too

rough furnace
#

also that doesn't handle errors

#

and would be platform depedant

tidal edge
#

looking to make a custom suit give +1 mult to any cards of itself when played

#

kind of like how normal cards give + chips

#

i want my suit to give + mult

#

is that possible

lime trench
#

Is there any sort of document or manual going over the different custom functions, variables, states, etc?

nocturne garnet
lime trench
#

thanks

orchid thunder
#

I DONT UNDERSTRAND HOW CARD AREAS WORK

languid mirage
#

they hold cards

nocturne garnet
#

im so bad at drawing that the joke art on the left is better than the art with effort wtf

brisk rose
#

I think they're all fine tbh

orchid thunder
#

how would one make this bigger

nocturne garnet
#

or te card?

orchid thunder
#

card area the card is sticking out the top

nocturne garnet
#

if you created the card you should be able to change its size no?

orchid thunder
nocturne garnet
#

(cardarea).T.w = width
(cardarea).T.h = height
(cardarea).T.x = x pos
(cardarea).T.y = y pos

orchid thunder
#

so i need to change the t.h?

nocturne garnet
#

change height and y position slightly

#

change the height by the number you want, and the y position by half that number

orchid thunder
#

ok

nocturne garnet
#

that should make it centered

orchid thunder
nocturne garnet
#

just change it by a random number

#

like 0.5

#

see if it works

orchid thunder
#

it doesnt also i only see one i was useing mathguys code because he lt me

nocturne garnet
#

that is confusing

#

i am way too sleepy sorry

orchid thunder
#

ok

ebon blade
#

Look for the atlas in the joker code maybe try changing that

orchid thunder
#

long bucket XXXXXDDDD

ebon blade
#

Long bucket

ebon blade
#

Like, there's x and y pos on atlas

orchid thunder
#

no its the card area

ebon blade
#

Oh, uhhh, idk about that

#

Lemme check rq

orchid thunder
#

the card area is too short thats my problem

nocturne garnet
ebon blade
#

like, in the code or in the game?

orchid thunder
#

i did do you nto see the +10

#

it was nothing before

nocturne garnet
#

increase it more?

orchid thunder
#

ok

nocturne garnet
#

i cant tell if thats

#

oh

#

thats the position of the cardarea innit

#

this should be what you wanna change, no?

orchid thunder
#

il try it

still jacinth
#

ok so how do i make a deck actually do something, im trying to make a Common Deck where every joker is common but i have literally zero idea how to do that part

orchid thunder
#

nothing

ebon blade
orchid thunder
#

idk

still jacinth
#

as far as i can tell, thats about modifying the collabs and stuff

ebon blade
#

look for the .zip in the first message

#

its a template

still jacinth
ebon blade
#

oh, i probs only read the title

#

idk if that will help but try it anyway

still jacinth
#

i think itll help a little

ebon blade
#

i hope so

#

idk any other places that show custom decks excpet looking at other mods custom decks

#

i was wondering if theres an option to add a whole custom localization into the game through steammodded? like how brainstorm adds a new menu to the settings i can add a new option in the localization menu?

tepid crow
#

like a new language?

ebon blade
#

yeah

tepid crow
#

yeah, adding a new option in the localization menu should be pretty easy

#

I don't think steamodded supports anything like that though?

#

so you're probably gonna have to do it yourself 😅

ebon blade
#

dang, im flipped is what your saying?

rough furnace
#

I think steam-modded will load your localization file for you once you do define a new language

ebon blade
#

well yeah ik that

#

i just wanted to make this an option to disable without restarting the game

#

so like without disabling the game

tepid crow
#

what are you trying to do?

#

just trying to add a new language?

ebon blade
#

yup

#

well

#

not a new language

#

a modified version of english

tepid crow
#

a joke language?

ebon blade
#

but i want there to be an option to change without exsiting the game

#

sorta

rough furnace
#

Gimme a sec

orchid thunder
#

guess il just have to ask math guy when hes on because im at a loss here

still jacinth
#

is there a way to stop certain joker rarities from appearing in the shop

rough furnace
#

you should be able to make a new language like this G.LANGUAGES['en-test'] = {font = G.FONTS[1], label = "English 2", key = 'en-test'} @ebon blade

#

I think it should fallback to english values

ebon blade
#

just put thise below the header im assuming?

rough furnace
#

umm actually not sure

#

try it

ebon blade
#

ill try

rough furnace
#

but it might need to be loaded later

ebon blade
#

completley works at the top

rough furnace
#

also looking at it you'll probably need to lovely patch to have it remeber your language choice when restarting

ebon blade
#

i honestly dc about it remembering my choice

#

it might get annoying, and if it does ill deal with it

#

for now i have like, over 9000 assets to change text on

#

cya never

rough furnace
#

fair

ebon blade
#

btw, debug+ is amazing, thanks for making it!

rough furnace
#

this lovely patch should work ```toml
[[patches]]
[patches.pattern]
target = "game.lua"
pattern = '''['all2'] = {font = 9, label = "English", key = 'all', omit = true},'''
position = "after"
payload = '''
['en-test'] = {font = 1, label = "English 2", key = 'en-test'}
'''
match_indent = true
overwrite = false

ebon blade
#

where do i put this?

rough furnace
# ebon blade where do i put this?

make a lovely.toml if you don't have it already. You also need this at the top toml [manifest] version = "1.0.0" dump_lua = true priority = 0

ebon blade
#

done, thanks!

lime trench
#

keep getting this error, am I implimenting it wrong?

#

I'm using this, which is what is also used in the SMOD example jokers

rough furnace
#

whatever the current context is, it doesn't have a other_card

lime trench
#

That brings me to my next question. What the heck is other_card and the regular card? I thought that card referred to the card that owns the function itself going (ie a joke) and other card was a different card

rough furnace
#

other card is present for cases where it makes sense to have one, such as when scoring cards, or baseball card's effect

lime trench
#

So why is it throwing a nil when I submit a face card? Maybe it’s something to due with how it’s nested?

rough furnace
#

I would need more code

lime trench
#

I’ll get on that rq I’m eating rn, sorry

#

This is all i have for it

rough furnace
#

thats running on any time calcualte is called, including ones without other card

#

you wat to stick that into the other if check you have

tepid crow
lime trench
#

I'm still testing to make sure

#

messages and scoring doesn't work but I seem to get text updates at least

ebon blade
#

are blind names hardcoded? i tried changing the name of small blind

lime trench
#

is it bc I don't have a context.joker.main?

#

absolutely unsure

rough furnace
#

your returning above the if so it never gets past that

#

oh wait

#

nvm i read that wrong

lime trench
#

Yeah I'm confused, the return isn't running at all

#

I think

rough furnace
#

this code is confusing

lime trench
tepid crow
#

you should probably just fix the indentation, that would help a lot

tepid crow
ebon blade
#

i need to change all of them? alright then, to work i go

tepid crow
#

indentation isn't for your computer, it's for the people reading your code

#

it won't change the output

ebon blade
#

or do i remove the .blind and just do bl_small

#

honestly steammodded doesnt cover this stuff and neither does lovely

lime trench
# rough furnace this code is confusing

So right now the code is meant to just take a regular face card and give the joker +10 chips and +1.5 mult. However no messages are popping up and the joker doesn't add to the score

tepid crow
lime trench
ebon blade
lime trench
#

I will say that different mod makers do their joker coding in radically different ways, I'm just trying to follow the smod example jokers

#

so it looks more like this as a whole

tepid crow
#

it probably should be card = self in the return

#

but other than that I don't spot any issues on a quick glance

lime trench
#

I dunno. Nothing's working at all

ebon blade
tepid crow
#

does Wilson's language edit not work?

ebon blade
#

i havent tried

#

but i assume since this isnt a steammodded mod its different

tepid crow
#

wdym "not a steamodded mod"

ebon blade
#

i mean, i copied the en-us.lua and rewrote it to test

#

(i hope thats legal)

brisk rose
brisk rose
#

But yeah it's trivial to make it an smodded mod

ebon blade
#

so do i just put the header in and its fine?

brisk rose
#

Yep

ebon blade
#

alrighty

brisk rose
#

And put the loc file in the right folder

#

And I presume the lovely thing will work to add a new entry instead of having to overwrite en-us

ebon blade
#

or modding in general

brisk rose
#

The way dm frys it in that zip

ebon blade
#

ill check

#

yeah, it totally works! W

lime trench
#

Okay so I did this and now:

  • scores 100% correctly
  • it messages with the multiplier but with the blue chips color (prolly just missing some more functions to get it normal) [maybe also a rounding error?] No chips message though
  • Actually updates when a face card is played
tepid crow
#

you cannot have the same message key twice

ebon blade
#

for some reason this happens when i change to my language, even though i didnt touch blue joker

lime trench
tepid crow
#

I'm not sure you can haha. Maybe someone here knows for sure though

ebon blade
#

i mean maybe try copy pasting the whole block with one message each and itll try doing 1 message after another in the order of the code

ebon blade
orchid thunder
#

bruh

#

who knew making a crafting menu would be so hard

tepid crow
ebon blade
#

not the return

#

only from the if

#

so it calls the if part twice

#

without dependence on the other if, like no if (smthn) then (smthn) else (smthn)

tepid crow
ebon blade
#

so it would go like,
if context.cardarea ++ G.play and context.other_card:is_face() then
card.ability.extra.chips = card.abilty.extra.chips + card.ability.extra.chip_gain

if context.cardarea ++ G.play and context.other_card:is_face() then
card.ability.extra.mult = card.abilty.extra.mult + card.ability.extra.mult_gain
retrun

ebon blade
#

but would my option theoretically work?

tepid crow
#

I'm not sure, I've never really taken a good look at SMODS.Jokers

#

it's all very abstract 🤷

ebon blade
#

i guess

#

anyways, im gonne slip

#

gn

molten ice
#

Is there any way to make the custom smods rank not appear in the deck preview until it exists?
Sorta like Bunco's Exotic Suits but for ranks

orchid thunder
#

anyone know why this would be error

lime trench
edgy reef
orchid thunder
edgy reef
#

Just to check is that meant to be the rarity or the consumable type?

orchid thunder
#

type also its not a consumable

edgy reef
#

You likely need to add the text into G.localization.misc.dictionary with the key "k_craft"

orchid thunder
#

Oh ok

lime trench
#

Is other_card.card_type == 'Enhanced' valid or not?

#

I was trying out context.other_card.ability.name ~= "Default Base" but it wouldn't trigger on enhanced cards for some reason

lime trench
lime trench
#

I've been trying to get it to detect enhanced face cards but It's just unable to detect any enhanced cards for some reason. I don't know what to do.

still jacinth
#

is there a way to retrigger a played card without returning

orchid thunder
#

how can i summon a specific joker

brisk rose
orchid thunder
#

yes

orchid thunder
brisk rose
orchid thunder
#

whts the mod called again

brisk rose
#

I'm sure there are other better examples too but I can't think of them atm

orchid thunder
#

bird jokers?

brisk rose
nimble sequoia
#

Summon a specific joker using add_joker

orchid thunder
#

like add_joker = "key"????

edgy reef
#

add_joker wouldn't be a good idea anyways cause it skips a bunch of checks the game typically does when creating and adding jokers.

orchid thunder
#

but :}

brisk rose
orchid thunder
brisk rose
nimble sequoia
#

I am aware that it does not consider joker slots, but I'm curious about the other checks

brisk rose
#

Oh yeah snoresvilles bug code might be good to look at

orchid thunder
#

i can look at that

nimble sequoia
#

Find out if it fits your use case

#

👍

brisk rose
#

Editioned bugs can actually be vaguely useful

#

And they have higher sell value :p

orchid thunder
#

im still confused how it works

edgy reef
#

I do wonder why we don't just use SMODS.create_card for this?

orchid thunder
#

but does add joker have a chnace of adding an editon

edgy reef
#

For the purpose of adding a specific joker it's just SMODS.create_card{ key = <joker key>}

orchid thunder
#

oh that soubnd 100000000 time easyer

brisk rose
orchid thunder
#

bro what

#

why

edgy reef
nimble sequoia
brisk rose
orchid thunder
#

wait HUH

edgy reef
#

You might need to add set = "Joker" into it as well

#

Cryptid might not like nil _type

orchid thunder
#

so do set = "joker" insted of key = "joker"

#

or wait

edgy reef
#

oh no it's a different issue

#

The key is missing j_ and the mod prefix.

orchid thunder
#

oh ok

#

this is my first mod and im wanting to add a freaking crafting system 😐

#

YOOOOOOOOO

#

ok i got to go but tomorrows goals are too

#
  1. make them craftable more than 1 time
  2. make the costing system accualy work
opal spade
#

and I was out there defining card directly

orchid thunder
#

oh wait shit

#

its not int he joker slots

opal spade
orchid thunder
#

wherre do i put this

orchid thunder
opal spade
# orchid thunder

put the smods.create_card as a definition to a local variable, then paste the code I made replacing card with the local var

#

add_to_deck is there to trigger card effects

orchid thunder
#

oh ok

opal spade
orchid thunder
#

thats exctly what i just did LOL

opal spade
#

bucket not card

#

also apparently the smods create card has an option to do that automatically, will tell more once I read it

#

nvm it doesn't

orchid thunder
#

Oh

edgy reef
#

It probably shoud

orchid thunder
#

Well card:add_to_deck worked for me

proper stratus
#

heyo

opal spade
orchid thunder
#

Hey

#

Oh ok il fix that

opal spade
#

you need to trigger buckets effect not cards

opal spade
# edgy reef It probably shoud

it checks for area to use for vanilla create card but it doesn't do anything for emplacement, just returns the new card

orchid thunder
#

Ok fixed new commit out for Minecraft

lime trench
#

Hey is there like a document for all the different objects and what not in Balatro?

#

I have asked this before but I'm not talking about like SMOD stuff I'm talking about documentation about like base game stuff like other_card and what not

lime trench
#

Thanks!

lime trench
# opal spade other_card is a part of a context

Also I wanted to ask a couple of questions.

  1. How would I get this to notify like normal (i.e when it triggers it does the update chips and then update mult and when regular card scoring is finished it does the add chips and add mult message)

  2. For the life of me I'm having issues with trying to get this to only effect Enchanted Face cards. I can get face cards selected, but I can't get enchanted ones.

#

I think after that I'll work on trying to get this able to enumerate

opal spade
lime trench
opal spade
#

yeah and it does that through card_eval_status_text

opal spade
#
                            chips = self.ability.extra.chips,
                            mult = self.ability.extra.mult,
                            card = self
                        }```
#

this is scholar

#

in smods card would be card = card

opal spade
lime trench
#

To be fair, this is my first time modding this game

opal spade
#

bleh

opal spade
lime trench
#

I am so confused on what you said tbh.

opal spade
#

no

#

put card_eval_status_text before return

#

and keep chips_mod in return

lime trench
#

OH

#

Okay that makes more sense

opal spade
#

return needs chips_mod to modify chips

#

card_eval_status_text is just the visual message

#

context.blueprint_card or card is so it works properly with blueprint

#

(if u don't do that then chips would display on your joker when it's blueprint doing the effect)

lime trench
#

It just... keeps throwing an error that there's something wrong with the syntax and I don't know what it is

#

I can't for the life of me figure out what could be "unexpected"

mellow sable
lime trench
#

ah didnt' notice that

#

and now this

#

Okay this is weird bc only the balatro debugger catches it and notepad++ is weird about it.

#

because the last } highlights line 40 but the bracket for SMODS.Joker also ends at that last bracket.

#

so

crisp coral
#

please properly indent your code

#

anyways you don't have an end for the calculate function

lime trench
nimble sequoia
#

Just wondering if you explored the balatro game code yet, some of the code checks for enhancements like gold cards for the achievement

umbral zodiac
#

how can i make a deck that affects chips/mult after each hand played?

lime trench
nimble sequoia
#

Hm.

#

Dunno

opal spade
lime trench
#

OH WAIT HTE CODE FOR VAMPIRE I HAVENT CHECKED THAT

opal spade
#

for example other_card doesn't exist in context.before, so your code can never work by definition

#

other_card is for context.individual

#

and context.repetition

lime trench
lime trench
lime trench
#

yeah i don't think this is it

opal spade
wintry solar
#

It’ll also only affect the first enhanced card

#

But that might be what you want

lime trench
opal spade
lime trench
muted pier
#

im losing my mind

opal spade
#

y

frosty dock
#

talisman?

loud citrus
#

there's context before and there's context after, but is there a context for when a joker gives score like when a joker gives chips?

#

i;m looking for somthing like a during context

orchid thunder
#

What is the think that is under the rarity

#

That some jokers have

opal spade
orchid thunder
#

Like the jing above that but below rarity

opal spade
#

can you show it?

orchid thunder
#

Ok so I'm want to make community jokers and I want the rarity to be a specific rarity but still have the mod name but then have another that says Community

ebon blade
maiden phoenix
#

Did you try to modify a vanilla joker's description?

opal spade
#

something related to blue joker

loud citrus
opal spade
#

eremel posted a thread about joker contexts way back

#

also looking through state_events.lua is a good way to see how a lot of the contexts work

loud citrus
#

oh that's where i find them, thank you so much!

ebon blade
ebon blade
opal spade
#

well something did

lucid sun
#

does rocket add the extra money after defeating the boss blind? or does it do it at the start of the round?

maiden phoenix
#

after iirc

lucid sun
#

awesome, thanks

nimble sequoia
#

When you talk about extra money, do you mean the money you earn or the value added on top of the income

maiden phoenix
#

Yea it does it when you finish the Boss Blind, before payout

lucid sun
#

value added

wintry solar
#

I really need to go through and rewrite my context stuff to be actually usable by other people, it as quickly thrown together for my own reference as is

ebon blade
#

does anyone have a full migration list from 0.9.8 to 1.0.0?

#

SMODS.registerUIElement seems outdated on the mod im migrating

#

and i cant seem to find the modern counterpart

crisp elbow
#

Does Steamodded allow for you to take ownership of a tarot card?

maiden phoenix
#

Yes

rustic flint
#

does anyone know what's causing this error?

#

this is my set_ability function

#

don't know what i'm doing wrong tbh

rustic flint
nocturne garnet
rough furnace
#

intresting

wintry solar
rough furnace
#

I feel ike it might be a good idea for cryptid to maybe merge it's value changing schenangians to steamodded

#

theres a lot of mods that make good use of them

nocturne garnet
#

i dont use it lol

#

mine is fucked up as shit

rough furnace
#

well cause it's just a part of cryptid

#

but theres a bunch of mods doing simialr stuff

nocturne garnet
#

oh god i think my mod might have too much Xvalues

#

i have like

#

10 features that revolve around it

rustic flint
wintry solar
#

on the joker object

rustic flint
#

ohoh yeah

#
    key = "final_girl",
    loc_txt = {
        name = "Final Girl",
        text = { 
            "If {C:attention}final hand{} of",
            "the round is a {C:attention}#2#{},",
            "{X:mult,C:white}X#1#{} mult"
        }
    },
    rarity = 1,
    pos = { x = 0, y = 0 },
    cost = 4,
    blueprint_compat = true,
    discovered = true,
    calculate = function (self, card, context)
        if context.cardarea == G.jokers and context.joker_main and next(context.poker_hands[card.ability.extra.poker_hand]) and G.GAME.current_rounds.hands_left == 0 then
            return {
                message = localize { type = "variable", key = "a_xmult", vars = { card.ability.extra.x_mult } },
                Xmult_mod = card.ability.extra.x_mult,
                colour = G.C.RED
            }
        end
    end,
    loc_vars = function (self, info_queue, card)
        return { vars = { card.ability.extra.x_mult, card.ability.extra.poker_hand } }
    end,
    set_ability = function (self, card, initial, delay_sprites)
        card.ability.extra.x_mult = 2
        card.ability.extra.poker_hand = "High Card"
    end
}```
wintry solar
#

so you'll need to add config = {extra = {x_mult = X, poker_hand = Y}},

#

you can't modify an extra table that doesn't exist

#

in fact, you don't even need set ability here, just add the config properluy

rustic flint
#

ohhhhh i see

rustic flint
#

tysm!!

wintry solar
rough furnace
#

yeah or just steamodded has it

nocturne garnet
#

i think i like xvalues too much

#

neon deck has RUINED me

wintry solar
#

isn't it basically just

for key, value in pairs(card.ability.extra) do
  card.ability.extra[key] = value * whatever_your_modifier_is
end
nocturne garnet
#

yes

#

and also for card.ability

#

for things like Drunkard

wintry solar
#

I don't know if steamodded needs a wrapper function for that or not

rough furnace
#

maybe not

wintry solar
#

I suppose there should be some type checking in there

rough furnace
#

^

wintry solar
#

maybe it could handle it

nocturne garnet
#

i just do if not card.ability.extra then return end

rough furnace
#

also theres a few cases

#

like cryptid is supposed to be able to tell me if mine changes for uses where I don't use my ability

#

like I have a joker that uses a common round_resets value for it's stuff

nocturne garnet
#

zone blind works btw

#

changing the name to Cards because its not just jokers

opal spade
nocturne garnet
#

why not :3

brisk rose
#

Very noncommitedly playing around with notmario's website template with DeFused

#

and this had no business working

#

and yet

#

lol I zoomed out to get jokers in that weren't in the original fusion mod (and thus website) and still only got those

#

but yeah, it seems to have worked very well

wintry swallow
#

Whats the effects of uncanny face, commercial driver and camping trip?

brisk rose
wintry swallow
#

Damn, camping trip should be in the official game imho

brisk rose
#

yeah I can't take any credit for any jokers in defused

#

they're all from various fusion mods

#

just.. added as normal jokers

wintry swallow
#

But still, i "hope" some get implemented in balatro because golden egg and camping trip seem like good jokers to add, know what i mean?

brisk rose
#

yeah I do

#

also that's no where near all of them, my screenshot on my OS is just acting weird

#

whenever I use shift + prtscrn to capture a protion of my screen it overwrites the last capture

#

JustLinuxThings

wintry swallow
#

Yeah, i never really had or used a linux pc in my life

brisk rose
#

it's usually great

#

but then shit like this happens sometimes, lol

#

here they all are. Pushing the prtscrn button again afterwards makes it work

#

the only errors chatgpt made that I see are on Heart Paladin and Party Animal

#

I'm surprised it worked to tell it how the loc variables worked at all

mental nacelle
#

figured out how to disable editions for all challenges, now i need to disable them for specifically one challenge

rough furnace
#

Not entirely sure how challenges work but you shoud be able to look at it's config for like banned cards and then act accordingly

mental nacelle
#

i hooked set_edition to just do nothing when G.GAME.challenge is true

#

else it functions normally

nocturne garnet
rough furnace
#

seems relevant

#

could reference restrictions.banned_other or smth

#

this might make sense to pr to steamodded

lime trench
rough furnace
#

Yeah dev branch of DebugPlus

lime trench
#

Oh awesome! Thanks for making that, that actually would help a bunch

rough furnace
#

yeah I use the eval all the time

crisp coral
#

just add something like "no_fluorescent" to the challenge modifiers and check for G.GAME.modifiers.no_fluo or something like that

mental nacelle
rough furnace
#

I would see about just banning specific editions

#

so its reusable

#

although no editions could be handy

mental nacelle
#

i was gonna split it into no editions for jokers and no editions for cards

#

but my mod doesn't exactly need either of those, it just needs no editions whatsoever for this

lime trench
mental nacelle
#

it isn't a base thing, i'm trying to get to one though

lime trench
#

Ah

rustic flint
#

is canio still misspelled in the source 😭

crisp elbow
#

Is there any way to try and replace a localization with a table? Trying to make something similar to the Wheel of Purchase mod to replace 'k_nope_ex' with a random line of text each time from a table

brisk rose
mental nacelle
#

actually fair point

rough furnace
nocturne garnet
rough furnace
#

Yeah

#

Cryptid does it for the timer one

#

I think there's a keg you can reference somewhere

lime trench
#

I honestly do not know much about the codebase to know if the code for vampire in card.lua works in this situation. I though it would work but it doesn't even seem to trigger the second if statement.

crisp elbow
#

Oh that is interesting

#

Jimbo:add_speech_bubble('lq_'..math.random(1,10), nil, {quip = true})

The way it does it in here is draws the speech bubble but does a math.random val to make it work

#

🤔

mental nacelle
#

how would i check for if a card is a joker?

tepid eagle
#

context.card.ability.set == 'Joker'

mental nacelle
#

oh thanks

wintry solar
wintry solar
#

Because there’s nothing in it that will indicate it being successful

lime trench
#

So I guess it's just literally in the second if statement?

#

because taking out the for still doesn't make it work

wintry solar
#

What’s it supposed to do?

lime trench
mental nacelle
#

i think i finally managed to get rid of editions in this challenge rule

#

(and specifically left them on Jokers)

lime trench
#

I know it probably has to do with the methods I'm using to check for enhancements

#

Because it works without the enhancement check

wintry solar
#

huh

lime trench
# wintry solar huh

So it's sort of like a scaling card like Runner and Green Joker, but also has Vampire's ability to effect enchanced cards except it destroys them instead of removing the enhancement.

So when a played enhanced face card scores, the joker gains +10 chips and +1.5 mult (tenative) for every enhanced face card that scored. It will then destroy those cards and then add the chips and mult to the final score (like runner, green joker, tarot joker, etc).

lime trench
# wintry solar huh

sorry, I kept thinking they were called enchanted bc enchanted and enhanced look incredibly similar and are kinda synonyms.

#

and yes I did make sure that it was "enhanced" in the code

mental nacelle
#

i can't believe i spent so long trying to program a different mod element out of my mod's challenge

hardy viper
tepid crow
hardy viper
#

efficiency is for losers after all

rough furnace
#

wait until you see how DebugPlus changes ranks

tepid crow
hardy viper
rough furnace
hardy viper
#

there are modded ranks?

tepid crow
#

SMOD has support for it yes

rough furnace
#

uhhh theres an api for them

#
if key == 'up' then
    if _card.playing_card then
        for i, v in ipairs(getRanks()) do
            if _card.base.value == v then
                local _next = i + 1
                if _next > #ranks then
                    local new_card
                    for i, c in pairs(G.P_CARDS) do
                        if c.value == ranks[1] and c.suit == _card.base.suit then
                            new_card = c
                            break
                        end
                    end
                    if not new_card then
                        log("Error: Could not find card with rank", ranks[1], "and suit", _card.base.suit)
                        return
                    end
                    _card:set_base(new_card)
                    G.GAME.blind:debuff_card(_card)
                else
                    local new_card
                    for i, c in pairs(G.P_CARDS) do
                        if c.value == ranks[_next] and c.suit == _card.base.suit then
                            new_card = c
                            break
                        end
                    end
                    if not new_card then
                        log("Error: Could not find card with rank", ranks[_next], "and suit", _card.base.suit)
                        return
                    end
                    _card:set_base(new_card)
                    G.GAME.blind:debuff_card(_card)
                end
                break
            end
        end
    end
end
#

nested loops go brrrrr

hardy viper
#

code too long it breaks in the middle of a line on my phone discord

#

unfortunate for me

rough furnace
hardy viper
rough furnace
#

the funny part is suits is so much cleaner code

tepid crow
#

can't you extrapolate the ranks[1 or _next] into a variable?

#

avoiding the basically duplicated code?

rough furnace
rough furnace
tepid crow
#

I mean I looked at SMODS implementation of Strength and I feel like a lot of that should also be accessible to mods

#

"lot of that" basically meaning the "get the next rank function"

rough furnace
#

Oh yeah did I mention all this code needs to work with both vanilla and SMODS

#

iirc SMODS added a change rank function I could use but it wouldn't work with vanilla then

tepid crow
#

fair

#

SMODS.change_base?

rough furnace
#

I don't remember

#

Cause I couldn't use it

#

Base sounds like enhancment not rank though

frosty dock
#

nah base is suit/rank

#

(see set_base)

rough furnace
#

ok

#

I still need vanilla compat

#

oh wait it is vanilla

#

I am using it

#

I am stupid

brisk rose
#

So probably a stupid question, but how is a smods.[anything] function vanilla?

rough furnace
#

set_base is vanilla

#

change_base isn't

tepid crow
#

Card:set_base is vanilla
SMODS.change_base isn't (but is basically just a fancy Card:set_base)

lime trench
#

Can’t check now since I’m working

brisk rose
#

Makes sense

#

Ignoring the fact you said slightly contradictory things, I get the gist

tepid crow
#

we did? 🤔

brisk rose
#

Oh I can't read

#

Nvm

mental nacelle
#

anyone know how to make custom rules appear in the challenge's "custom rules" section? i'm assuming it's localisation

mental nacelle
#

i dids it (referencing cryptid and sdm's stuff)

regal wolf
ebon blade
regal wolf
# ebon blade What's this?

A custom challenge Mod I made a while back. people have been asking how to do stuff with custom challenges so i thought i'd just send it here

ebon blade
#

Ah, cool

topaz sun
#

Guys, noob question: what does the #1# mean in something like "At the end of round, gains {C:mult}+#1#{}" ? Is it referencing the config variables?

rough furnace
#

its a placeholder

#

references the first item in the array returned by loc_vars

#

usually this is tied to a config variable but can be anything

topaz sun
#

Got it

umbral zodiac
#

is there a way to make a jokers desc text size be one of its values

#

im making a very silly scaling joker and i want some of its text to get larger when its mult values get larger

ocean goblet
#

is anyone willing to help me out here? i've been trying to get help as to why the game has been crashing when i get my hands on a joker from jen's almanac

ebon blade
#

try removing betmma vouchers

brisk rose
#

raw_key = true

#

With atlas key being sprites.png

#

I think

umbral zodiac
brisk rose
#

I forgot to hit reply before and wasn't sure if you'd seen

#

My b

umbral zodiac
#

so i add raw_key = true?

#

i thought you were replying to the guy who asked abt the default joker atlas

brisk rose
#

Wait shot i was

#

I'm an idiot

#

Sp sorry

#

So

#

I got confused because they seem to have deleted their question

opal spade
umbral zodiac
#

is there a list of valid colors for C: and X: ?

#

i only know chips and mult 😭

lime trench
#

So did more testing to find out it really really was just the method I was using to validate enhanced cards was not working and found another cool bug where the card will just score 2x the amount it should and i have no ideal why. 🫠

gilded narwhal
#

Hey gang

#

Got another tattered deck

#

TATTERED BLACK:
8 joker slots. Only the leftmost 4 can trigger during a hand

limpid wing
#

soo, the rightmost are slots for econ jokers?

umbral zodiac
#

also would passive jokers like shortcut count as not triggering

gilded narwhal
#

Yes

#

All jokers that don't give points should go to the right

umbral zodiac
#

devious indeed

gilded narwhal
#

Do y'all like this better?

lime trench
gilded narwhal
#

Fair enough

#

I'll use that one

surreal marsh
#

by changing card.T.scale its size is changed smoothly when dragging, but when hovering or clicking on it its size flickers🤔 how to fix

narrow pollen
loud citrus
#

dose anyone know why juice_until_eval isn't working?

rough furnace
#

try acrobat_ready ~= true

mental nacelle
#

those are the ones i know

umbral zodiac
#

did not know about green and blue thats fun

opal spade
#

you can check it by looking at the function that sets them, I'll look it up rn

mental nacelle
#

oh there’s chance too

opal spade
#

loc_colour at functions/misc_functions.lua

umbral zodiac
#

ah ty

#

im bad at art so this is my definition of cooking

#

forgort to make the text look very good but whatever

tepid crow
#

@languid mirage #🎨・fan-art message just gonna reply to you here since I realized I was kinda clogging up the fan-art channel with steamodded stuff
Agreed that some rounding would be a good idea, I don't think 16 digits of precision is needed when going into negative exponentiation haha

languid mirage
#

yeah, I wanted to have smol numbers being show in full to avoid confusion with like misprinted scaling jokers (cryptid)

#

like the ramen was showing it goes down by 0.00 every card discarded because of silly rounding

#

didnt think rounding was needed since I forgot about stacking chicots

tepid crow
#

as long as there's e-notation, rounding should be fine right?

opal spade
#

TIL you can just

#

make jokers consumable

#

now i just need to figure out how to lovely patch looking for a smods patch line

#

is that even possible?

opal spade
#

nvm i might not need it after all for now

opal spade
#

has there been any documentation on the event manager

primal robin
#

Which mod allows to quick reload game and mods for dev purposes?

hardy viper
#

iirc smods does something like that when you enable or disable a mod on the main menu

limpid flint
#

hold m

hardy viper
lost rover
#

debugplus allows you to refresh the atlas after pressing m

limpid flint
#

steamodded

primal robin
#

It works, cool

#

Not hot reload, but better than nothing

tepid crow
primal robin
#

I see

tepid crow
#

personally I just wrote a little script that closes the current running balatro.exe and starts a new instance

primal robin
#

While working on UI more quicker restart method would be really cool

hardy viper
#

@rough furnace you should do that (assuming it's not already a thing?)

limpid flint
#

power of m

tepid crow
#

are you sure? 🤔

opal spade
#

like holding m restarts the game

maiden phoenix
#

Isnt m just an atlas reload?

opal spade
#

am I wrong?

opal spade
#

pressing reloads atlas

maiden phoenix
#

oh

tepid crow
#

oh neat, holding m restarts the game

tepid crow
limpid flint
#

Ⓜ️

opal spade
#

i wasn't insane, good

tepid crow
#

and it's actually a steamodded thing 😅

mental nacelle
#

is it possible to hook a challenge?

plain wyvern
#

How do you set up and play custom sounds?

wintry solar
#

Use lua SMODS.Sound({ key = ‘key’, path = ‘path.ogg’ }) and play_sound()

nocturne garnet
#

if you mean changing what a challenge does, im sure its possible if you search in challenges.lua

rough furnace
wispy hamlet
#

i want to make a mod that adds keyboard shortcuts for buy/buy+use/sell. are there any examples or API docs that show how to access those buttons?

mental nacelle
#

nvm

lime trench
#

Turns out every attempt I was trying to do WAS completely valid. It just never updated most of the tags. So if I were to turn a card into an enhanced card via debug, it wouldn't update it's .ability.set to "Enhanced"

#

I found this out by testing a custom Enhanced only deck

#

Prolly should go and test it with a normal enhanced face card from a booster but still

rough furnace
#

enahnced cards aren't in built in debug tools

#

that would be a DebugPlus bug possibly

lime trench
#

... is it a bad time to realize now that I've been mixing up editions and enhancements.

#

I think its a really bad time ashydj

rough furnace
#

nah I had to think for like 10 seconds to remeber if enhancements were enhancments or editions

mental nacelle
#

editions and enhancements are difficult to distinguish sometimes

wooden nexus
#

Added art so they all don’t look the same

gilded narwhal
#

Thoughts on this?

tepid crow
#

what is it? like a back?

gilded narwhal
#

Yeah tattered green deck

lime trench
tepid crow
#

I think it's good but tbf I'm not an artist

lime trench
#

I think the burn marks and the aging shading look awesome.

nocturne stratus
#

Yea

gilded narwhal
#

Aseprite spray tool 🥰

lime trench
#

Also, I wanted to ask does just putting context.destroying_card in an if statement destroy played cards? Because I'm trying to look at jokers that destroy cards in play and i can't really find anything else in them that would destroy the card.

tepid crow
#

it's probably something in the return

hardy viper
#

classic example of just check someone else's mods code

lime trench
#

plus jokers in the source code that do this just seem to have context.destroying_card in the if and nothing else

#

could be wrong, I am rushing my investigation

#

bc i got ot go to work

hardy viper
#

so like

if context.destroying_card then
 if context.destroying_card.ability.edition.polychrome then
  return true
 end
end

would destroy any played polychromes

#

that's pseudocode but you should get the point

lime trench
#

Ah

tepid crow
#

if you go to state_events.lua:957, you can actually see when this return is used

lime trench
#

Thanks!

tepid crow
#

(cg already explained really well how to do it)

ebon blade
#

when yall make joker art do yall use asperite or a different app?

maiden phoenix
#

Most people use aseprite yes

mental nacelle
#

i use an old branch of aseprite (i'll probably buy it sometime)

ebon blade
#

idk if smg would wanna use it

rough furnace
#

Super Mario galaxy?

oblique fox
#

i… am steve

ebon blade
oblique fox
#

its peak i know 🖐️ balatrojoker 🤚

gilded narwhal
#

Sp far it's 1.25x (multiplicative) per $10 in debt

#

Is this balanced?

tepid crow
#

have you tried playing with it yet? or is this just concepting and you're not planning to turn it into an actual mod?

gilded narwhal
#

This is concepting

tepid crow
#

though it sounds kind of difficult tbh

lament fjord
#

Every purchase permanently leaves you deeper into a scoring hole?

#

After $100 of purchases you end up with a blind requirement of 9.31* baseline

#

I would guess that's about the amount of cash that I go through in a single money-stingy run

gilded narwhal
#

Okay how about

#

+0.02x blind size per $ in debt

#

So $100 in purchases is 3x base

#

BUT money is also never a bottleneck

mental nacelle
#

am i right in reading that set_edition(false) creates a card with no edition

#

or just doesnt set one

mental nacelle
#

i've been trying to hook card:set_edition so it doesn't accept specific editions when custom rules are active

#

wait

#

immediately after posting this here after fiddling with it for hours i notice something obviously wrong with my code

long roost
#

Absolute novice here, how do I cause a joker to set chips or mult to a flat value, as opposed to adding or multiplying?

mental nacelle
mental nacelle
#

one of my main issues i've had for hours is that no cards have editions (despite them very clearly being foil or holo)

#

if i don't have "if edition then" or "if not edition then return end" i get an error every time

#

i might be the worst programmer on the planet i can't figure out how to hook set_edition

umbral zodiac
#

what do the args for play_sound mean, other than the key/sound obviously?

long roost
# mental nacelle i'd guess that instead of having chips = chips + x (where x is your number), hav...

Alright, I managed to figure out flat setting and it does manifest in the added chips at the end of the hand, but once I apply it it doesn't actually appear in the hand screen (however, when it gets updated with standard chip-and-mult affecting jokers, it does appear)

SMODS.Joker {
  key = 'kaz_warningsign',
  loc_txt = {
    name = 'Warning Sign',
    text = {
--      "{X:mult,C:white}Factorial {}Mult"
      "Sets chips and mult to flat values"
    }
  },
  atlas = 'concordancejokers',
  pos = { x = 0, y = 0 },
  cost = 14,
  calculate = function(self, card, context)
    if context.joker_main then
      hand_chips = 123
      mult = 456
      update_hand_text({delay = 0}, {chip = hand_chips}, {mult = mult})
      return {
        message = 'Set!',
      }
    end
  end
}
tepid crow
mental nacelle
#

let me have a go at that

tepid crow
long roost
#

Makes sense, I just mean that I've gotten the underlying chips to be altered (each hand ends up scoring 56088 chips when all is said and done) but the chips and mult sidebar does not update to match, instead listing 0 x 0
I'll get a recording with OBS real quick

mental nacelle
tepid crow
#

oh, seems like Balatro can call Card:set_edition() with no arguments to remove editions?

#

or if edition and edition.foil and ...

#

that's probably better

mental nacelle
#

i've had a problem like this a lot today, every card apparently has no edition

mental nacelle
#

im cycling through buffoon packs and getting absolutely no edition cards now

tepid crow
#

can you post your full code Opal?

mental nacelle
#

i'll post only the relevant stuff (as i plan on using this as boilerplate for other editions)

tepid crow
#

sure

tepid crow
long roost
#

Alright, I'll take a second recording on slower speed real quick

mental nacelle
#

this is the setup for the no_foil stuff

tepid crow
#

as codeblock pls

mental nacelle
#

oh sure

long roost
mental nacelle
#

the entire thing (minus the Steamodded comments)

function Back:apply_to_run()
    Backapply_to_run_Ref(self)
    --BASE GAME EDITIONS
    G.GAME.modifiers.no_foil_cards = false --no foil cards 
    G.GAME.modifiers.no_foil_jokers = false --no foil jokers
end

function SMODS.current_mod.process_loc_text()
    -- Banning Foil Edition
    G.localization.misc.v_text.ch_c_no_foils = {"{C:attention}Foil Edition{} cards will no longer appear"}
    G.localization.misc.v_text.ch_c_no_foil_cards = {"{C:attention}Playing cards{} can no longer be {C:attention}Foil Edition"}
    G.localization.misc.v_text.ch_c_no_foil_jokers = {"{C:attention}Jokers{} can no longer be {C:attention}Foil Edition"}
  end

  local start_run_ref = Game.start_run
function Game:start_run(args)
    local result = start_run_ref(self, args)
    if not saveTable then
        if args.challenge then
            local _ch = args.challenge
            if _ch.rules then
                if _ch.rules.custom then
                    for k, v in ipairs(_ch.rules.custom)do

                        -- EDITIONS - BASE GAME

                        if v.id == 'no_foils' then --removes foil edition from all cards
                            G.GAME.modifiers.no_foil_cards = true
                            G.GAME.modifiers.no_foil_jokers = true
                        elseif v.id == 'no_foil_cards' then --removes foil edition from playing cards
                            G.GAME.modifiers.no_foil_cards = true
                        elseif v.id == 'no_foil_jokers' then --removes foil edition from jokers
                            G.GAME.modifiers.no_foil_jokers = true
                        end
                    end
                end
            end
        end
    end
    return result
end

local set_edition_ref = Card.set_edition
function Card:set_edition(edition,immediate,silent)
    local run = true
    if edition and edition.foil and G.GAME.modifiers.no_foil_jokers and self.ability.type == "Joker" then
        run = false
    end
    if run then
        return set_edition_ref(self, edition, immediate, silent)
end
end

SMODS.Challenge{
    loc_txt = "Test",
    key = 'test',
    rules = {
        custom = {{id = 'no_foil_jokers'},
                    },
        modifiers = {},
    },
    jokers = {
    },
    restrictions = {
        banned_cards = {},
        banned_tags = {},
        banned_other = {}
    },
    }
#

this is literally the entire mod (without the other editions)

long roost
#

I'm going to check if I can cheese it by just adding +0 mult
EDIT: Alright that did work but it feels massively inelegant

tepid crow
tepid crow
#

oh wait

#

that should've prevented the foil 🤔

mental nacelle
#

in my instance of the game, every card fed through card:set_edition() seems to have no edition

#

i had other mods loaded (notably Bunco), let me see if that messes with it

#

i've had DebugPlus loaded to give myself Buffoon tags, looking in its code doesn't show and interference

#

i see the problem now

tepid crow
#

try this one instead

local set_edition_ref = Card.set_edition
function Card:set_edition(edition, immediate, silent)
    local run = true
    if edition == "e_foil" and G.GAME.modifiers.no_foil_jokers and self.ability.set == "Joker" then
        run = false
    end
    if run then
        return set_edition_ref(self, edition, immediate, silent)
    end
end
mental nacelle
#

trying now

#

loading the challenge from where i left shows the popcorn joker as not foil, which is promising

tepid crow
#

also, looks like edition == "e_foil" might not be enough, you should also check the table version

mental nacelle
#

ah, i didn't think to check for steamodded overrides

mental nacelle
tepid crow
#

looks like it yeah

mental nacelle
#

let me try that then

tepid crow
#

I'm just going with what the documentation says though

long roost
#

I'm now moving on to implementing the factorial functionality for Warning Sign, and even with to_big added I get a "for limit must be a number" error when trying to take the factorial of mult

local function fact (n)
  if n == 0 then n = 1
  else
    for i = 2, n-1 do
      n = i*n
   end
  end
  return n
end

SMODS.Joker {
  key = 'kaz_warningsign',
  loc_txt = {
    name = 'Warning Sign',
    text = {
      "{X:mult,C:white} Factorial {} Mult"
    }
  },
  atlas = 'concordancejokers',
  pos = { x = 0, y = 0 },
  cost = 14,
  rarity = 'cry_epic',
  calculate = function(self, card, context)
    if context.joker_main then
      mult = fact(to_big(mult))
      return {
        mult_mod = 0,
        message = 'Factorial!'
      }
    end
  end
}
tepid crow
#

(assuming that's the Talisman to_big)

mental nacelle
long roost
#

Ah
Even without it it still says I'm inputting a table so I'm not sure what the right function to use here would be

tepid crow
tepid crow
mental nacelle
#

was just about to reply that, lol