#💻・modding-dev

1 messages · Page 432 of 1

mossy helm
#

anyway
I was trying to do the atlas method used in the SampleJokers mod, ubut I'm not sure what's wrong, the code looks the exactly same from that mod (which is this one)

#

couldn't really understand the log either

daring fern
#

It seems to work.

red flower
#

use a newer example mod

mossy helm
#

dang

wintry solar
#

what is this example mod you speak of?

mossy helm
wintry solar
#

yeah absolutely do not use that

red flower
#

thats me there

modern kindle
#

i was about to post that

wintry solar
#

that code is over 14 months old

mossy helm
#

oopsie daisy

modern kindle
mossy helm
#

hmm

daring fern
snow vale
#

how is a context created? id love to see an example so i can make mine

daring fern
#

Mod prefix is not required but it is reccomended.

snow vale
#

ok

#

and how do i code it?

vale glen
#

You can find examples in Steamodded itself by searching the source code for that function call.

snow vale
#

yeah i was searching and didnt find it

vale glen
#

How are you searching for it? Those function calls should be there.

snow vale
#

found it nvm

vale glen
snow vale
#

wait what, there's nothing?

turbid maple
#

i thunk you found lsp definitions

snow vale
#

maybe

#

yeah i did

#

oh found it at utils

#

well yeah i found it but um now what

#

i suck at this 😭

turbid maple
#

you call calculate_context then the game makes every joker run its calculation routine with the context you fed it

vale glen
#

That's the definition, not the function call

#

Try searching in the lovely dump maybe?

snow vale
#

ok

turbid maple
#
SMODS.calculate_context( {
    example_jimbo_annihilated = true
})

then if another joker has stuff like

if context.example_jimbo_annihilated then
   -- give morbillion xmult
end

it will run

#

the hard part is getting the calculate_context call to be at the right place

#

which requires patching the game half the time

snow vale
#

and how do i make it check if a card is destroyed...

daring fern
turbid maple
#

0 days since last "check joker is destroyed" question

vale glen
#

You'd have to find the right function to patch, make a lovely patch for it with your custom context called at the right time, then check for that context in your card.

snow vale
#

man what do i do if i suck at this 😭

red flower
vale glen
#

You can also search this discord channel to see if others have had your same question, and what they did to fix their code

#

If you can't do it yourself, perhaps others have done it already

red flower
turbid maple
#

the easiest answer is look at how paperback did it and copy it

daring fern
vale glen
red flower
vale glen
#

Ah

turbid maple
daring fern
# snow vale yeah i alr had it
local oldcardremove = Card.remove
function Card:remove()
    if self.added_to_deck and self.ability.set == 'Joker' and not G.CONTROLLER.locks.selling_card then
        SMODS.calculate_context({modprefix_context = true})
    end
    return oldcardremove(self)
end
red flower
daring fern
snow vale
#

oh ok

signal slate
#

Can somebody help me with rarities, I'm having a hard time with trying to find something that works Tried modding chat but they pointed me here

snow vale
burnt apex
#

if im reading the wiki right, final_scoring_step only works for score modification

vale glen
daring fern
signal slate
# daring fern What is the issue?
  1. Pools are messed up
  2. Ive been trying for days and I'm getting sick of coding witch I don't want that to happen
  3. With the example I was able to scrap, the pools are blank and the keys don't match
signal slate
copper thorn
#

what do you wanna do at the base of it all ?

signal slate
snow vale
daring fern
snow vale
#

wait i think ik what i have wrong

#

lemme test again

snow vale
#

ok it doesnt crash now, but it wont alter the card

gusty hatch
red flower
split panther
#

im very new to this
i wanna make a deck that starts you with some jokers and sets winning ante to 10
how would i do that

daring fern
daring fern
snow vale
#

hmm no

#

ill

burnt apex
snow vale
daring fern
snow vale
#

then it didnt work

daring fern
#

Wait no, you swapped card and destroyed in your context.

snow vale
#

on the very beginning of my full script

rare torrent
#

guys i think my code has the Oops all 6's curse, for some reason my random number between 1 and 9 keeps returning 6 every time ```calculate = function(self, card, context)
if context.joker_main then
-- use Joker ID and current hand to generate a changing seed
local seed_base = "calculator_" .. tostring(card.ability.id or 0) .. "_" .. tostring(G.GAME and G.GAME.round_resets and G.GAME.round_resets.hands_played or love.timer.getTime())
local op = pseudorandom_element({ "add", "sub", "mul" }, pseudoseed(seed_base .. "_op"))
local val = pseudorandom(1, 9, pseudoseed(seed_base .. "_val"))

        if op == "add" then
            return {
                mult = val,
                colour = G.C.WHITE,
                card = self
            }
        elseif op == "sub" then
            return {
                mult = -val,
                colour = G.C.WHITE,
                card = self
            }
        elseif op == "mul" then
            return {
                xmult = val,
                colour = G.C.WHITE,
                card = self
            }
        end
    end
end```
daring fern
snow vale
#

.

#

🙂 🔫

#

why is it always the dumbest things

#

it works now

#

last thing

#

how can i check what card is being destroyed?

daring fern
snow vale
#

ok

final jewel
#

I keep crashing when I open the shop

burnt apex
#

or do i call for context before the manager?

wintry solar
#

before

burnt apex
#

Ok thank you

#

after thinking about it i realsied it made a lot more sense to call context first lol

snow vale
#

YAYYSS

#

tysm

daring fern
#

Also the negative hand size seems to not go away.

red flower
formal parrot
#

Except two

red flower
#

yes

#

you can still play them tho, they just dont count for anything that looks for visible poker hands

formal parrot
#

Casual yes

#

Mhm

#

Interesting

#

Yo you made the family

#

Useless

#

And the trio

#

And the other one

red flower
#

no those actually dont care about if the pokerhand is visible

formal parrot
#

I can only think of to do list

red flower
#

basically only to do list and obelisk do

formal parrot
#

Fuck obelisk

red flower
#

and the telescope voucher

#

anyway it works well enough im going to pr it

burnt apex
#

So I think i have no idea what im doing, how do i go about having an event trigger on the final scoring step? and am I even using card:flip() correctly?

red flower
#

remove the cardarea check

also right click > format document

#

this doesnt work this way in lua either

snow vale
#

how can i make a floating thing like the legendary jokers?

burnt apex
#

but i may need to do more testing

daring fern
snow vale
burnt apex
#

it in fact does not

wintry solar
snow vale
snow vale
#

ok

burnt apex
sage crater
#

although this method will make oops all 6s a bad joker to have haha

signal slate
sage crater
# burnt apex How so?

G.Game.probabilities.normal is 1 times 2^oops! count
if you have zero oops, the if statement checks if your chance is higher than 25% (3/4ths of the time
if you have one oops, the if statement checks if your chance is higher than 50% (1/2 of the time)
and if you have three, higher than 100% (impossible)

mossy helm
#

I did it

sage crater
sage crater
#

it's exponential??

#

ok TIL

#

(I basically never end up with 2+ oops)

daring fern
sage crater
burnt apex
burnt apex
frosty rampart
#

just don't use G.GAME.probabilities.normal and oops can't do anything

sage crater
#

oh wait

#

I got it

#

ah well nvm

pulsar furnace
#

how could i make a section in decks selection ui?, like in sleeves mod when selecting a sleeve

sage crater
sage crater
#

also replacing (4/3) with 1.3333 would do effectively the same thing

burnt apex
sage crater
#

~= is probably what you're looking for

burnt apex
#

Oh also, how does oops look at a jokers code to change the values for numbers in text? I know the text numbers need values assigned but how does oops look at that

sage crater
#

and then all the other jokers just use that variable

burnt apex
#

hmmmm ok, how would i code the descriptions text to update the odds when oops is there?

#

like with vanilla jokers

tepid crow
#

or just the default "new run" menu

pulsar furnace
tepid crow
# pulsar furnace this

I mean, this'll sound selfish but I probably wouldn't recommend adding another bar like that

#

not a lot of space on that menu anymore

pulsar furnace
tepid crow
wintry solar
pulsar furnace
burnt apex
#

also while I wait for an answer to that, how do i have an event trigger the cards to flip on the final scoring step?

currently codded like this but it doesn't trigger in game:

pulsar furnace
tepid crow
#

so a better new run menu? to navigate easier?

pulsar furnace
tepid crow
#

what's the improvement over the galdur approach?

pulsar furnace
tepid crow
#

why's that?

pulsar furnace
#

i could make a galdur compat but idk

pulsar furnace
wintry solar
#

you can turn the animations off

tepid crow
#

I feel like you can disable those but I'd have to double check

pulsar furnace
#

really?

tepid crow
#

well if eremel says you can it's probably true lol

primal robin
#

oh no... RUN Entire idea of stringified Talisman can be dead rn

wintry solar
pulsar furnace
#

oh

tepid crow
primal robin
#

The main point of idea to allow compate big number with regular number

tepid crow
#

the entire issue has always been that you can't override the comparing table <-> number because of the number (if it's table <-> table it's fine)

primal robin
#

I assumed that this problem relevant only for tables

pulsar furnace
#

I also have a question, can you define the order in which the decks are displayed?, like adding decks between the vanilla ones?

tepid crow
primal robin
#

@wintry solar looks like my idea for Talisman is dead. Can't compare string and number, just like table with number

#

(

burnt apex
tepid crow
#

there should be a context.full_hand var in the final_scoring_step timing?

#

or context.scoring_hand if that's better

burnt apex
#

what its meant to do is: score the kings and jacks, flip them and swap them into queens, flip back and discard

primal robin
#

So, only LuaJIT

#

oh well, At least I tried

wintry solar
#

I don't think luajit is a bad solution though

compact valve
#

is there an example or mod I could use for reference? not sure where I'd use this and probably will end up asking a lot more questions

primal robin
wintry solar
#

yeah exactly

fading hemlock
#

luajit sounds amazing

red flower
#

i get why the buttons extend to match the middle box but it looks so bad 😭

#

i just wanted to add more sorting options..

misty radish
#

Does anyone know what mod uses the prefix "G"?

burnt apex
wintry solar
#

can you extend horizontally instead?

tepid crow
burnt apex
fading hemlock
tepid crow
burnt apex
#

ok

final jewel
#

Guys what is the best documentation for creating consumable type like it keeps crashing when I enter the shop

tepid crow
#

but you'll want to iterate over the cards in context.scoring_hand and make an event to flip each one

red flower
tepid crow
#

strength does it with multiple events per card (1 to flip, 1 to change, 1 to flip back) so you probably want to copy that

fading hemlock
# red flower yeah thats nicer

I'm really curious what month is, I'm guessing it's part of your mod but how a card can have a month really intriuges me

fading hemlock
#

oh cool

#

thats actually sick

daring fern
#

Why if the use_consumeable function triggers twice for gateway or similar consumables that destroy jokers it does not destroy jokers on the second trigger?

red flower
#

there are a lot of specific pokerhands too so the sorting was kinda needed lol

burnt apex
tepid crow
#

card.lua probably

#

the use_consumeable func

#

I'm guessing

tepid crow
#

yeah that one's probably a bit more readable than the source code

burnt apex
#

my brain is just not putting the pieces together
maybe i should try and find an actually good coder instead
But then id need to become a decent pixel artist

compact valve
#

I've been reworking Joker values for the Balatro Community Update mod, but I was told in order to rework the actual effects, I'd need to make a lovely patch for effects, where can I learn more on that?

daring fern
red flower
#

ok now to figure out how to hide them

west prism
#

How can I choose where a sticker is placed on the card, like visually? I could swear it was a thing

normal crest
west prism
#

and yes I mean a new sticker

normal crest
#

Yeah just make a 71x95 sprite the same way a joker would be but just put the sticker where it should go

umbral zodiac
#

anyone know how you set the sound effect of a new calculate key that i added?

#

the mult^ operator is a little underwhelming when it makes the same noise as the foil edition

shell kite
#

please

hallow forge
#

did you look at basegame files

shell kite
#

Thankss

echo pumice
#

I was told to stop in here to ask how to mod this game

umbral zodiac
summer shore
#

how do i add a joker when a run starts?

vale glen
lucid owl
#

if it's as a part of a deck, check documentation for SMODS.Back

summer shore
#

function SMODS.current_mod.reset_game_globals(run_start)
if run_start then
local my_joker = SMODS.create_card{set = 'Joker', key = 'my_joker'}
G.jokers:emplace(my_joker)
card_eval_status_text(my_joker, 'extra', nil, nil, nil, {message = "my joker Added!"})
end
end

pulsar furnace
#

Can someone help me with galdur?

opaque hazel
#

Is a this code needed for self made mods like mods you arent planning to share?

    "name": "BalaQuints",
    "id": "BalaQuints",
    "prefix": "quints",
    "version": "1.1",
    "badge_colour": "40C040",
    "dependencies": ["malverk (>=1.1.3~)"],
    "main_file": "main.lua",
    "description": "Retextures the legendary jokers in the theme of Go-Toubun no Hanayome!",
    "author": ["Lumine"],
    "website_url": "https://github.com/Luuumine/BalaQuints"
}```
opaque hazel
#

ok

subtle merlin
#

Uhhhhhhhhh i dont think that's a pair, game

hallow forge
#

6 and 8 are both even

#

so close enough

spice wadi
opaque hazel
#

oops

subtle merlin
wild escarp
#

How would I check the enhancement of a selected playing card?

daring fern
wild escarp
#

Thanks!

scarlet imp
#

in the code for Glass Joker (at least on vanilla remade), there's a check to see if Hanged Man is being used because it can destroy cards. I have a few of my own consumables that destroy cards in hand, and I tried to add it to this check, but it didn't work. Here's the relevant code:

if context.using_consumeable and not context.blueprint and
               (context.consumeable.config.center.key == "c_hanged_man" or
               context.consumeable.config.center.key == "c_tboi_r_devil" or
               context.consumeable.config.center.key == "c_tboi_r_hanged_man" or
               context.consumeable.config.center.key == "c_tboi_r_moon" or
               context.consumeable.config.center.key == "c_tboi_r_star" or
               context.consumeable.config.center.key == "c_tboi_r_sun" or
               context.consumeable.config.center.key == "c_tboi_r_world") then
                -- We need to run this code for anything that can potentially destroy cards in hand
                local glass_cards = 0
                local temp_hand = {}
                for _, playing_card in ipairs(G.hand.cards) do temp_hand[#temp_hand + 1] = playing_card end
                for _, removed_card in ipairs(G.hand.highlighted) do
                    if SMODS.has_enhancement(removed_card, "m_glass") then glass_cards = glass_cards + 1 end
                end
                if glass_cards > 0 then
                    card.ability.extra.Xmult = card.ability.extra.Xmult + card.ability.extra.Xmult_gain * glass_cards
                    return {
                        message = localize ({
                            type = "variable",
                            key = "a_xmult",
                            vars = { card.ability.extra.Xmult }
                        })
                    }
                end
            end

even though I rewrote the code to find which cards get destroyed in my own way, it still works for the Hanged Man, so idk what I did wrong

violet gulch
#

if it works for hanged man still, wouldn't that imply the key for your consumables aren't matching?

scarlet imp
#

I thought that too but no, the only difference that my consumeables seem to have is that you don't select the cards that get deleted, the same way you don't select the ones for Immolate

violet gulch
#

I have no clue, sorry

scarlet imp
#

well here's the thing

#

after saying that I tried immolate, and it doesn't update glass joker either

#

so I'm gonna have to reprogram immolate too lol

#

or at least take ownership of its use funciton

violet gulch
#

Isn't that a known bug that Immolate doesn't trigger glass joker?

scarlet imp
#

guess I just discovered it for myself lol

violet gulch
#

lol that would make sense I reckon if yours work like Immolate.

scarlet imp
#

I suppose I can wait for the game to get patched so I don't have to do it myself, I'm gonna be working on this for months anyway

violet gulch
#

https://balatrogame.fandom.com/wiki/Bugs

Looks like glass joker doesn't interact with any of the card destroying spectrals

Balatro Wiki

This page contains a quick list of bugs that should probably be double-checked every update by contributors to keep this wiki up-to-date. This is meant to be used as internal document, not a...

granite nymph
#

i feel like yandev right now

#

there HAS to be a better way to do this

wild escarp
#

Could someone help me out with this joker? Trying to make stone cards bypass the card selection limit.

calculate = function(self, card, context)
    if context.cardarea == G.play and context.main_scoring then
        local stone = 0
        for i = 1, #G.hand.cards do
            if SMODS.has_enhancement(G.hand.highlighted[i], "m_stone") then
                stone = stone + 1
            end
        end
        SMODS.change_play_limit(stone)
        SMODS.change_discard_limit(stone)
    end
end
scarlet imp
#

you could look into the code of The Serpent on vanilla remade to see how they add excess cards to your hand

wild escarp
#

Doesn't negative just affect hand size on playing cards?

scarlet imp
#

ohh card selection limit mb

violet gulch
wild escarp
#

Well, this code I have does absolutely nothing as far as I can tell.

violet gulch
#

would the intention be for it to modify the limit when a stone card is selected or just by the amount in your drawn hand?

granite nymph
scarlet imp
mild olive
#

crash says the audio does not exist, what did i do wrong here 💔

scarlet imp
#

maybe try to change it so that when a stone card is selected, THATs when your selection limit changes

violet gulch
# wild escarp When the card is selected.

So, just to ensure I understand, lets say I have a hand size of 8, selection limit of 5. I have 3 stone cards and 5 other cards in hand. I select the 3 stone cards, and my selection limit increases by 3, to 8, so I can then select my entire hand?

wild escarp
#

Yep

opaque hazel
gusty hatch
#

wtf why are you jumping into animations as your first task

opaque hazel
violet gulch
# wild escarp Yep

So, to start,If I understand it correctly, I believe the context.main_scoring is too late for what your trying to acheive, because the hand is played by that point.

gusty hatch
#

pain for pleasure wtf

granite nymph
#

preferably not animated

wild escarp
violet gulch
#

Assuming its not doing that currently?

granite nymph
#

yeah :'(

#

holdo n one second

#

okay so if this hand contains a seven its supposed to destroy entire hand and create one random joker per seven destroyed

#

alright

violet gulch
red flower
#

after pressing discard

violet gulch
#

Thats what I kinda assumed. Is there a context for them that triggers on card selection?

red flower
#

context.debuff_hand and context.modify_scoring_hand both do iirc

violet gulch
#

^@wild escarp maybe start with those

daring fern
#

Is it possible to have multiple edition shaders drawn on one card at the same time?

wild escarp
violet gulch
# granite nymph bump

So, if you have no jokers and play a hand of 5OAK 7's, it should destroy the 7's and spawn 5 jokers?

granite nymph
#

but if you play two sevens and three fives it destroys the sevens and the fives and spawns two jokers

violet gulch
#

If it contains only one 7, it should still destroy the entire hand, but only spawn one joker?

violet gulch
#

Okay, I understand

wintry solar
wintry solar
wild escarp
#

Is there something I can check for unhighlighted cards?

wintry solar
#

If you were wanting to modify play size on clicking a card, I’d hook Card:highlight

wild escarp
#

I have it upping the card selection limit, it just doesn't go back down.

wintry solar
#

You can do that in the hook too

plush vault
#

If I want to check if a card is on the jokers, what would be the call?

I can think of a rondabout way, wich is iterating through the jokers and checking if any of them equal [card], but I assume there is a easier way @w@

red flower
#

next(SMODS.find_card("j_modprefix_key"))

violet gulch
# granite nymph yes

So I don't think I can give you a full answer, because I have not played with spawning jokers but I can give you my experience from earlier on identifying and destroying cards. My instance, I was trying to destroy card when there was a singular unscored card in hand. As I understand it from my earlier experiments, context.destroy_card triggers for each individual card in hand. I think I'd look at doing your logic for checking for the amount of 7's (if any) in hand in an earlier context where the full hand exists, make note of the check with a flag variable. Then in context_destroy_card, as long as your flag is present, mark that card for destruction (since you're destroying all cards anyway). Then maybe in some final context handle your joker spawning based on determined number of 7's from original logic. That is how I'd approach it.

gusty hatch
#

guys guys

#

I have heard feedback about my jokers

#

so i changed them

#

thoughts?

violet gulch
granite nymph
gusty hatch
#

with half sell value its 2, 3 and 4 cost

#

(with available space)

#

which means it helps except in late game

mild olive
#

what is happening dude 💔

gusty hatch
#

which i think is balanced

spice wadi
spice wadi
#

Also if we're doing feedback

#

How does this UI look

mild olive
gusty hatch
spice wadi
gusty hatch
#

maybe the rarity compensates

mild olive
violet gulch
gusty hatch
#

anyway im overthinking mb you devs keep devin

#

ill ask the community

spice wadi
formal parrot
#

I think

#

8$ is a lot for a spectral pack

violet gulch
# mild olive

isn't it looking for it in resources/sounds/ not assets/sounds

formal parrot
#

8$ is the price of the big spectral pack btw

violet gulch
gusty hatch
red flower
spice wadi
scarlet imp
#

I'm getting a bug where simply scrolling to page 8 while in a run is crashing the game. I took ownership of a couple of Jokers on page 8, but nothing crashes unless I'm in a run, on the main menu its fine

gusty hatch
#

so its $4 for a spectral pac

formal parrot
spice wadi
mild olive
formal parrot
#

So its like buying a spectral pack

#

Pretty balanced then

#

Approved

gusty hatch
mild olive
violet gulch
formal parrot
#

Here’s on of my latest works
1 in 2 chance to copy the right joker at the start of the round
Otherwise copy a random joker because she’s moody

red flower
formal parrot
spice wadi
red flower
# mild olive wdym

xmpl is used by example mods so a lot of other mods might have the exact same prefix, you want a different one

spice wadi
#

It took me HOURS

#

Like 5-10 istg

formal parrot
daring fern
#

Is it possible to change badge size?

gusty hatch
hallow forge
gusty hatch
hallow forge
#

crashing the game is bad

formal parrot
#

I did lol

#

It was funny

hallow forge
#

oh

spice wadi
#

I'm proud of the end result, it even supplies the full traceback that you'd get with a crash

hallow forge
#

nice

spice wadi
#

I've also made the same thing but for when a card causes an error

formal parrot
#

I can keep it and add a warning for fps drop lmao

wind steppe
#

How would i check if a joker is being added or removed from my joker slots in a hook of Card:add_to_deck and Card:remove_from_deck? self.area == G.jokers does not work.

hallow forge
#

google it

formal parrot
mild olive
gusty hatch
chrome widget
#

This worked like a charm btw!!! Main issue now is limiting status text messages

wind steppe
gusty hatch
red flower
#

just pick something random

mild olive
#

ohh i see

hallow forge
#

make it as long as possible

wind steppe
#

as long as its reasonably short

#

the duality of man

daring fern
spice wadi
#

It's not about the size of the prefix-

wind steppe
#

also make sure its unique (mainly that means cry is taken)

spice wadi
#

I just made mine the name of my mod cos why not

hallow forge
#

use only prefixes that are already in use

#

and make sure the items within the mod use the same keys as those form other mods

#

to ensure collsions and bugs

red flower
red flower
spice wadi
red flower
#

do what

#

that is a mod

spice wadi
spice wadi
wind steppe
#

only stoicism remains

spice wadi
granite nymph
#

okay so is dollar buffer / joker buffer how many times the extra dollars/ extra jokers triggers?

red flower
#

i would never make my content mod's prefix more than 3 letters long

#

i like myself

wind steppe
#

four is good, five is pushing it, six should be banned

granite nymph
#

does anyone have a mod with the prefix "yip" already?

red flower
gusty hatch
#

from "panama hat"

#

sounds cool to me

sonic cedar
#

where can i see the setup for set_sprites?

granite nymph
#

okay so

#

how do i get the amount of sevens into a boolean

#

(in a played hand)

sonic cedar
#

anyone know why this patch doesnt allow alternate atlas use with set_ability?

daring fern
sonic cedar
#

not yet iirc

granite nymph
#

"local jokers_to_create == context.full.hand[1]:get_id() == 7

worthy stirrup
#

Can i get some help, this for some reason isnt increasing the number

    calculate = function(self, card, context)
        if context.cardarea == G.play and context.main_scoring then
            if card:is_suit('Hearts') then
            card.ability.extra.multgiven = card.ability.extra.multgiven + 1
            end
        end
        if context.joker_main then
        end
worthy stirrup
#

Joker

granite nymph
daring fern
worthy stirrup
#

thank you

#

still doesnt seem to update

turbid crystal
granite nymph
#

yes

daring fern
granite nymph
wind steppe
daring fern
turbid crystal
# granite nymph yes

you should loop through the hand and increase a counter every time a card is a 7

worthy stirrup
#

yea, this still doesnt update the number

SMODS.Joker {
    key = "Ral",
    loc_txt = {
        name = "Ralsei",
        text = {
            "This joker gains {C:mult}+2{} mult per {C:hearts}heart{} suit played",
            "{c:inactive}(Currently {C:mult}+#1#{} mult){}"
        }
    },
    config = {
        extra = {multgiven = 0}
    },
    loc_vars = function(self, info_queue, card)
        return {
            vars = {card.ability.extra.multgiven}
        }
    end,
    atlas = "JevilArt",
    pos = {x = 0, y = 1}, -- This will be animated
    rarity = 2,
    cost = 6,
    blueprint_compat = false,
    eternal_compat = true,
    perishable_compat = true,
    calculate = function(self, card, context)
        if context.cardarea == G.play and context.individual then
            if card:is_suit('Hearts') then
            card.ability.extra.multgiven = card.ability.extra.multgiven + 1
            end
        end
        if context.joker_main then
        end
    end,
#

ohgod, its more code than i thought

daring fern
granite nymph
worthy stirrup
#

thank you

daring fern
turbid crystal
#

does anyone know how i could go abt making a joker that makes all other jokers equally likely to spawn regardless of rarity

daring fern
rapid stag
#

is there a bool to tell if a card object is flipped

daring fern
pulsar furnace
#

What is SMODS.Center?

subtle merlin
#

Is there a way to instance some retriggers to be different from other sources of retriggers?

subtle merlin
#

We have a card enhancement that has a mult bonus, and are trying to make a joker that retriggers any scored card with that enhancement, but the retrigger only gives half the mult bonus

chrome widget
#

Where are the built-in ability evaluation keys handled? I.E. chips, mult, x_mult, etc

#

I only see it for playing cards specifically, not jokers

daring fern
chrome widget
#

No yeah, that's what I mean

#

The only place I see chips, mult, etc scored for anything here is for playing cards

granite nymph
#

okay im still havbing one issue

#

how do i make context.full_hand[1] be all of the ranks of a hand

#

would i have to do the same thing over and over but with the numbers increasing

daring fern
granite nymph
#

i want to check if hand contauins a certain card

#

but i dont want to trigger each event indivisually

burnt apex
#

@formal parrot This is what i have so far (since it was dev help i figured I should post it here and @you)

granite nymph
#

i alkso want to destroy all cards in hand if it contains a seven

formal parrot
daring fern
burnt apex
normal crest
formal parrot
burnt apex
normal crest
#

final_scoring_step shouldn't be inside context.individual

#

they will never happen at the same time

scarlet imp
#

I took ownership over Driver's License, and rewriting its loc_vars like this causes the driver_tally to not update properly:

loc_vars = function(self, info_queue, card)
            local driver_tally = 0
            for _, playing_card in pairs(G.playing_cards) do
                if next(SMODS.get_enhancements(playing_card)) then driver_tally = driver_tally + 1 end
            end
            return {
                vars = {
                    card.ability.extra.Xmult,
                    card.ability.extra.driver_amount,
                    driver_tally
                }
            }
        end

this is taken from Vanilla Remade, so idk whats wrong
also the calculate works just fine despite using the same code, its just the description that;s not updating

burnt apex
formal parrot
#

Do you wanna flip the joker or playing cards ?

burnt apex
formal parrot
#

You can do

#

For i=0 , #Context.scoring_hand

#

And

#

If Context.scoring_hand[i]’s id is jack or king

daring fern
formal parrot
#

Context.scoring_hand[i]:flip()

formal parrot
#

I didnt code for a while lol

formal parrot
#

I mean rank

#

And then reflip it by doing the same function

#

Should work

burnt apex
#

so

#

I should run the card rank change inside an event as opposed to in the calculate function?

#

so that it flips, changes, flips back?

formal parrot
#

I think thats a way to do it

#

Or you can just make 2 events

#

Basically experiment , I’m sorry i’m not on my pc and its 3 am sadly i cant help more

burnt apex
#

Your ok lol

formal parrot
#

And i think

#

You should change ranks before scoring

#

Use context.before and cardarea==G.play

#

Individual is used for repetitions ,

coarse plank
#

whats the pixel size for the boss blind tokens?

chrome widget
#

34x34

burnt apex
coarse plank
# chrome widget 34x34

would I have to use a seperate key for that since the one I currently have is 71 by 95?

burnt apex
formal parrot
formal parrot
#

You can do final scoring step if you want

coarse plank
formal parrot
normal crest
formal parrot
#

This is for jokers

#

95x71

chrome widget
#

You need to create new atlases for any new sprites you use

burnt apex
normal crest
#

I assumed that was for testing

#

earlier today you had a 1 in 4

formal parrot
#

1 in 3000 is just funny

#

Lol

burnt apex
formal parrot
#

0.0003% chance is crazy

formal parrot
normal crest
#

anyway, you should do this in context.after imo

formal parrot
#

I think after is better aswell

#

Flipping before scoring is kinda weird

normal crest
#

and if you do it in before the cards won't actually score as if they were queens, they will score as their previous rank

burnt apex
formal parrot
#

Lol

burnt apex
formal parrot
#

Does changing ranks require an event

normal crest
#

(context.before would make them look like queens while scoring as kings/jacks)

burnt apex
# formal parrot Does changing ranks require an event

im using
if context.individual and context.cardarea == G.play then
if context.other_card:get_id() == 11 or
context.other_card:get_id() == 13 then
return {
assert(SMODS.change_base(context.other_card, nil, 'Queen')) }

#

to change them currently

normal crest
burnt apex
#

its in the calculate function

normal crest
#

if you want to make it look good you will want to use them tho

#

otherwise it will just change abruptly

burnt apex
#

yeah thats what it does rn and i want it to look good

formal parrot
burnt apex
#

im open to suggestions

formal parrot
#

My idea using a for flips card one by one

#

And add another flip to make it look good

#

Probably should sleep lmao

burnt apex
#

Code wise hows that look

burnt apex
formal parrot
#

Instead of individual use context.after

#

And make a for

#

There’s an example in the

#

Forgot

#

The name

#

……

normal crest
formal parrot
normal crest
#

Bloodstone wouldn't use context.after tho

burnt apex
#

discord not squishing like other windows on linux pains me

#

anyeway

burnt apex
#

swap*

formal parrot
formal parrot
#

Put the flip and change rank in

#

—stuff here

#

Add an event

#

Basically

#

Context.scoring_hand[i]:flip() or v[i]:flip()

#

Since you’re using a variable in for :3

#

Test and come back if you have any problems

#

Also have a good night :>

burnt apex
#

night

burnt apex
#

hm ok deleteing and retying the v fixed it

#

odd

granite nymph
#

this joker is suppsded to destroy hand and spawn jokers depending on how many sevens there are if a seven is played

#

but when i play a full house with three sevens it creates 15 jokers

chrome widget
daring fern
wild escarp
#

Could someone help me with this? I'd like this joker to effectively make stone cards playable without taking away from other card selection. (Allowing flushes with stone cards). However, any card selecting/deselecting with a stone card selected makes the card selection limit go up, and it doesn't go down.

calculate = function(self, card, context)
    if context.debuff_hand then
        local extra_limit = 0
        for k, v in ipairs(G.hand.highlighted) do
            if SMODS.has_enhancement(v, "m_stone") then
                extra_limit = extra_limit + 1
            end
        end
        SMODS.change_play_limit(extra_limit)
        SMODS.change_discard_limit(extra_limit)
    end
end
granite nymph
rigid bear
#

how would i change a cards spawn pool

#

like making planets appear in the other booster packs as well

daring fern
daring fern
wind steppe
#

how would i go about creating a sticker that has the same effect as negative? (without the shader)

wild escarp
burnt apex
wind steppe
normal crest
#

and if you do, you do it outside the event

rigid bear
#

would yall help me in changing certain cards spawn pool?

rigid bear
#

it doesnt sound very complicated to implement but im not sure how to do it

rigid bear
#

thats the goal

hasty mist
#

how do i set up a config for a mod?

pulsar furnace
#

can you define the order in which the decks are displayed?, like adding decks between the vanilla ones?

rigid bear
burnt apex
#

@normal crest sorry to bother again, what context should i be using for the first flip again?

#

within the event

pulsar furnace
wild escarp
burnt apex
#

Can anyone tell me how to use card:flip() to flip certain playing cards

scarlet imp
#

putting the method inside of an event seemed to do it for me

burnt apex
normal crest
#

you just do the flip inside the event

scarlet imp
#

its <variable>:flip(), where the variable name is whatever you have the card as

burnt apex
#

Id the variable the cards value or name?

#

is*

granite nymph
scarlet imp
#

it needs to be a card object. So for example, to flip a played card, you could do:

context.scoring_hand[i]:flip()

and that would flip the card you want

burnt apex
granite nymph
#

okay os this joker uis syuppsoed to discard all cards in hand and give one joker per seven played if a seven is played

#

but instead of making one joker per seven its making 15 joker for a hand of 3 sevens

scarlet imp
# burnt apex So if i want to flip scoring jacks and kings, what would I use? (sorry if i come...

Something like this:

for i = 1, #context.scoring_hand do
  local _card = context.scoring_hand[i]
  if _card:get_id() == 11 or _card:get_id() == 13 then --11 is Jacks, 13 is Kings
    G.E_MANAGER:add_event(Event({
      func = function()
        _card:flip()
        return true
      end}))
  end
end  

note that this only flips the card ONCE, so it will be facing down. you can add youre other functionality in between the flip and the return statement.
also, don't feel dumb. We all start somewhere 🙂

granite nymph
burnt apex
#

or do i need another event

scarlet imp
#

you need to do it a second time. The return statement just returns true for the inner function, it doesn't really do anything to my knowledge but I always see it at the end of functions that are made for the event manager

granite nymph
burnt apex
scarlet imp
granite nymph
#

when i play a hand containing a seven it makes way more jokers then its supposed

#

its supposed to create one joker per seven in hand

#

instead it creates what i think is hand size times seven amount

scarlet imp
#

not sure if this is how it works in Lua, but first I'd make sure the indentation matches the structure of your conditionals

granite nymph
#

wghich tbh i dont care about too muhc

scarlet imp
#

Are your contexts correct? Because it's supposed to discard every card in hand, then create a Joker for each discarded 7, correct?

granite nymph
#

but yes

scarlet imp
#

if you're destroying lots of cards at once, and you only care if they are sevens, could you do
context.destroy_card and context.cardarea == G.hand and context.other_card:get_id() == 7 or something like that

burnt apex
scarlet imp
#

wait hang on

#

dont use that lol

burnt apex
#

oki

scarlet imp
#

assert(SMODS.modify_rank(G.hand.highlighted[i], -1)) for Kings
assert(SMODS.modify_rank(G.hand.highlighted[i], 1)) for Jacks

#

there's probably a better way lol but thats all I got tbh

burnt apex
#

those lines go between the card flips?

scarlet imp
#

yeah

burnt apex
#

and do i delete the change for them into queen?

scarlet imp
#

what does the Joker do? Is it supposed to mess with Queens at all?

#

bc if not then yeah, just replace what you have between the flips

burnt apex
scarlet imp
#

make sure to add a conditional so that you change the ranks of Jacks and Kings properly

burnt apex
#

with a 1 in 3000 chance to not do ( Calico fun fact, 1 in 3000 are male)

burnt apex
scarlet imp
#

actually thats backwards lol, the 1 should be first and -1 second

#

sorry

burnt apex
#

easy change lol

scarlet imp
burnt apex
scarlet imp
#

code.?

burnt apex
#

oh wait

#

wait nvm

scarlet imp
#

got it?

burnt apex
#

no, thought i did

#

reading a diffrent persons response to the same error it seemingly comes from v being undefined

scarlet imp
#
if context.after then
    for _, v in ipairs(context.scoring_hand) do
        if v:get_id() == 11 or v:get_id() == 13 then
            G.E_MANAGER:add_event(Event({
                func = function()
                    _card:flip()
                    local _change = 1
                    if v:get_id() == 13 then
                        _change = -1
                    end
                    assert(SMODS.modify_rank(v, _change))
                    _card:flip()
                    return true
                end}))
        end
    end
end

ok if this one fails I give up on coding
I just wrote the whole thing lol

burnt apex
#

this one in particular

exotic imp
#

why does this loop after each round and not based off number of jokers?

scarlet imp
#

sorry replace _card with v

#

can you tell I'm new too lmao

burnt apex
scarlet imp
#

ye

burnt apex
#

i think its because v is undefined, should i copy that persons definition fo v

#

and if so where should i place it

scarlet imp
#

v comes from the loop, idk why it doesn't work. My bad

burnt apex
#

well if anyone knows how to fix this, i would appreciate

wind steppe
burnt apex
#

but

#

can i have it pause the discard long ennough for the flip animations to play

#

cuz the flips occur at the same time rn

wind steppe
#

idk

scarlet imp
#

that's the part I never got the hang of tbh, I got the flipping to work but the delaying part is tough

#

what you could do is have multiple events, where they flip the cards individually and you put delay in between them. You can look at the VanillaRemade for the Strength card if you want examples

burnt apex
#

for testing i just yoinked the bit of remade strength that handels it

#

and theres no change

scarlet imp
#

yeah, like I said I never got the hand of that bit. sorry I wasn't much help

burnt apex
#

Your good

#

the discard animations are an event tho right?

#

if so delay should work

#

afaik

#

or wait

#

delay just delays the event

#

not the event after it

#

is there any vanilla joker that does something to cards after scoring but before discad?

wind steppe
#

glass cards break then?

#

not technically a joker tho

burnt apex
#

is there a vanilla remade file for glass cards and the other enhancements?

scarlet imp
#

I'd probably still just use context.after

burnt apex
#

is it possiblr to do context.after a context and also context.before another context

#

cuz then i just need the context for discarding

wild escarp
#

How can I check if a particular joker is owned?

scarlet imp
hasty mist
#

What are the correct .UIT values for "hand_mult_area", "hand_mult", and "flame_mult"?

burnt apex
#

that isnt how those things work lol

thorn furnace
#

How would I go about making vfx
Like if I wanted to change the brightness of a card for an effect

burnt apex
#

for anyone who might know what to do, im basicaly wanting to pause the discard untill the flip animations are done

burnt apex
#

like i know thats what it does

#

but i dont see how

harsh shoal
#

hi anyone has code for this kind of description?

burnt apex
harsh shoal
#

like

#

gain xmult if u have x amount of money

#

and the "currently xmult" thing

burnt apex
#

ah

#

im new but description wise im pretty sure you just need to asign them values in config, not sure how your supposed to update those values tho

#

take a look at the vanilla remade jokers

harsh shoal
#

yeah i was doing that but they dont seem to have description text

#

thats why i asked here

burnt apex
#

ahh

wild escarp
#

Description text for that is all stored in the localization folder.

harsh shoal
#

ohh okay lemme check

#

OH okay i got it tysmmm

burnt apex
#

while chat is active again, anyone know how glass cards breaking trigger before discard?

#

i need to do simliar behavior but for running a flip animation

wild escarp
#

VanillaRemade uses context.cardarea == G.play, maybe that's what you're looking for?

burnt apex
#

that just checks to make sure the card is one of the played ones

#

need to find a way to pause the next event in the event queue

wild escarp
#

Wouldn't that context make everything inside it run during that dedicated time? I don't know exactly how all the contexts work.

burnt apex
#

ok in theory adding blocking = true should allow the event to work but im assuming the discard is labled as unblockable

peak tiger
#

how would I make a card like Medium (but for a different seal)

#

I cannot get consumables to work

burnt apex
peak tiger
#

like where do i find it

pearl jacinth
#
loc_vars = function(self, card, info_queue)
    return {
        vars = {
            card.ability.extra.mult,
            card.ability.extra.mult_mod
        }
    }
end

is there something wrong with this loc_vars

wild escarp
#

I always do (self, info_queue, card), but I don't know if the order matters.

burnt apex
#

ok actually, how do you use the queue argument front

#

the wiki mentions it

#

but theres no example

night juniper
night juniper
burnt apex
night juniper
#

i've never used smods, only modded the game through lovely so im not sure, and i would recommend u just make the edit and see what happens

burnt apex
#

heres current code

#

everthing is correct except the flips happen during discard

#

instead of befroe

night juniper
# burnt apex

i have a suggestion that might be terrible, adding an event during context.before (if that's a thing) then checking inside the event if context.after to trigger the flips and having the event's func return context.after instead of true

burnt apex
night juniper
#

that's assuming the context object stays alive / isn't cloned between scoring stages

#

this ensures you added your event to the queue early but it only executed after score calculation

#

(bypassing the need for the front argument)

burnt apex
#

maybe its because its late but im having trouble translating this out into actual code, would it be

#

oops

#

1 min

night juniper
burnt apex
final goblet
#

hi! am i doing this properly? how does coloring go for these again? @w@

burnt apex
#

but thats for later on

final goblet
#

i got confused lmao

burnt apex
night juniper
burnt apex
#

im disturbed

final goblet
#

i'm installing

#

VSC

#

atm

burnt apex
#

ahh

burnt apex
# night juniper you can paste the joker in chat 👀

SMODS.Atlas {
key = 'calico',
path = 'calico.jpg',
px = 71,
py = 95

}

SMODS.Joker {
key = 'calico',
loc_txt = {
name = 'Calico',
text = {

        'When a {C:attention} King {} or {C:attention} Jack {} is scored',
        'turn it into a {C:attention} Queen',
        '{C:green} 1 in 3000 {} chance to not trigger'
    }
},
rarity = 2,
atlas = 'calico',
pos = { x = 0, y = 0 },
cost = 5,
blueprint_compat = false,
calculate = function(self, card, context)
    if context.after then
        for _, v in ipairs(context.scoring_hand) do
            if v:get_id() == 11 or v:get_id() == 13 then
                G.E_MANAGER:add_event(Event({
                     blocking = true,
                    func = function()
                        v:flip()
                        local _change = 1
                        if v:get_id() == 13 then
                            _change = -1
                        end
                        assert(SMODS.modify_rank(v, _change))
                        v:flip()
                        return true
                    end
                }))
            end
        end
    end
end

}

final goblet
#

but wifis bein a bitch

feral tree
#

Hey

#

beginner coder here

#

im trying to have a joker do a simple 1.5x mult but the code's not working

#

any reason why?

pearl jacinth
#

what is the error caused

sturdy compass
#

Not necessarily the problem, but you can condense your return table to simply be this:

return {
   x_mult = card.ability.extra.Xmult
}```
feral tree
echo aurora
#

can we see the config?

burnt apex
#

also realised for some reason its not showing the back of the card

feral tree
pearl jacinth
#

you're missing a }

echo aurora
burnt apex
pearl jacinth
#

oh and consider changing the rarity to common/uncommon

#

how can it be a legendary when it only gives x1.5 mult

feral tree
#

Planning on having it be summoned by another joker at the start of a blind twice

pearl jacinth
#

you can create a miscellaneous rarity

night juniper
pearl jacinth
#

just like how polterworx did it

feral tree
#

Not sure where the missing } should be placed

#

im getting the same error

unkempt rover
#

I see some mods having xchips, how do I put xchips in my mod?

echo aurora
pearl jacinth
unkempt rover
pearl jacinth
feral tree
feral tree
#

did that, still error

pearl jacinth
#

after {x = 0, y = 0} is missing a comma

feral tree
#

do i need to put a comma after end

pearl jacinth
#

no

#

that's the last item so it doesn't need a comma

feral tree
pearl jacinth
#

before end add a }

#

also i recommend you to add localization variables

#
loc_vars = function(self, info_queue, card)
  return {vars = {card.ability.extra.Xmult}}
end,
loc_txt = {
  name = 'Sheep',
  text = {
    '{X:mult,C:white}X#1#{} Mult'
  },
  unlock = {
    '...' -- add the unlock condition
  }
},
burnt apex
#

anyone know why exactly my cards would be flipping at the same time as they are discarded?

unkempt rover
unkempt rover
pearl jacinth
#

i think so

#

i didn't have to separately implement x chips for my mod

pearl jacinth
#

(delete all comments afterwards if you want)

unkempt rover
wicked leaf
#

tbh i wanna learn proper smods just to give joker mods proper forcetrigger support

sturdy compass
#

That sounds fun actually

unkempt rover
burnt apex
feral tree
#

The error msg doesn't lead me to think i messed it up

pearl jacinth
#

where is line 191

#

also replace the unlock condition with you originally had (or remove it completely if you don't have one)

feral tree
pearl jacinth
#

the if needs an end

feral tree
#

elaborate

night juniper
# burnt apex i think its ignoring the context for some reason, i tried changing it to .fina...

got it working with this

SMODS.Atlas {
  key = "calico",
  path = "calico.jpg",
  px = 71,
  py = 95,
}

SMODS.Joker {
  key = "calico",
  loc_txt = {
    name = "Calico",
    text = {
      "When a {C:attention} King {} or {C:attention} Jack {} is scored",
      "turn it into a {C:attention} Queen",
      "{C:green} 1 in 3000 {} chance to not trigger",
    },
  },
  rarity = 2,
  atlas = "calico",
  pos = { x = 0, y = 0 },
  cost = 5,
  blueprintcompat = false,
  calculate = function(self, card, context)
    if context.cardarea == G.jokers and context.joker_main == true then
      for _, v in ipairs(context.scoring_hand) do
        if v:get_id() == 11 or v:get_id() == 13 then
          G.E_MANAGER:add_event(Event {
            blocking = true,
            func = function()
              v:flip()
              local _change = 1
              if v:get_id() == 13 then _change = -1 end
              assert(SMODS.modify_rank(v, _change))
              v:flip()
              return true
            end,
          })
        end
      end
    end
  end,
}
#

note that i changed the atlas to .png, undo this to avoid a crash

pearl jacinth
# feral tree elaborate

use this for calculate: ```lua
calculate = function(self, card, context)
if context.joker_main then
return {
x_mult = card.ability.extra.Xmult
}
end
end

burnt apex
night juniper
burnt apex
night juniper
#

and probably make the event type after with a delay

burnt apex
night juniper
#

but i'd recommend sth like this, with a larger delay and maybe the game on 1x speed

#

to see if it make any effect

burnt apex
#

so i think it doesnt change anything

#

i think i saw someone with a simliar problem earlier today

#

but i cant remember the contetns of the messge to look it up

pearl jacinth
#

also don't forget the 1 in 3,000 chance to fail

burnt apex
#

oh that did get removed

#

thanks for the remineder

peak tiger
#

how would I apply an enhancment to a card?

#

All the ways I can find do not seem to work

night juniper
# burnt apex No card back showing with a delay of 2

im playing with sth like this

SMODS.Atlas {
  key = "calico",
  path = "calico.jpg",
  px = 71,
  py = 95,
}

SMODS.Joker {
  key = "calico",
  loc_txt = {
    name = "Calico",
    text = {
      "When a {C:attention} King {} or {C:attention} Jack {} is scored",
      "turn it into a {C:attention} Queen",
      "{C:green} 1 in 3000 {} chance to not trigger",
    },
  },
  rarity = 2,
  atlas = "calico",
  pos = { x = 0, y = 0 },
  cost = 5,
  blueprintcompat = false,
  calculate = function(self, card, context)
    if context.cardarea == G.jokers and context.joker_main == true then
      for _, v in ipairs(context.scoring_hand) do
        if v:get_id() == 11 or v:get_id() == 13 then
          G.E_MANAGER:add_event(Event {
            blocking = true,
            blockable = false,
            func = function()
              v:flip()
              local _change = 1
              if v:get_id() == 13 then _change = -1 end
              assert(SMODS.modify_rank(v, _change))

              G.E_MANAGER:add_event(
                Event {
                  blocking = true,
                  trigger = "after",
                  delay = 0.1,
                  func = function()
                    v:flip()
                    return true
                  end,
                },
                nil,
                true
              )
              return true
            end,
          })
        end
      end
    end
  end,
}

but it crashes the game 👍

burnt apex
#

lol

#

currently reimplementing the psuedorandom that got lost in the chain of telephone that it has been to code this joker

#

getting an odd syntax error in vscodium

chrome widget
#

How do you access the full UI tree given a UIBox? I tried using .UIRoot.nodes but that seems to error

burnt apex
#

back to the card back problem

#

@night juniper this person has roughly the same second event as I have, and it worked for them so not sure whats up

night juniper
burnt apex
#

i just had to make the second event unblockable

ember cedar
#

can someone help explain to me how if next(SMODS.find_card('j.egg')) then [...] always seems to return false regardless of if the player has an Egg, but if SMODS.find_card('j_egg') then [...] is always true? trying to get the length of the find_card table and checking against that doesnt seem to work either, as well as checking if the table ~= {} and ~= nil hmm (yes im kinda new with lua sadly)

burnt apex
night juniper
hidden sable
#

completely new to modding, how would i go about adding a joker card to the mod

hidden sable
#

i already know about SMODS.Atlas

night juniper
burnt apex
#

i think a side effect of making the second unblockable is that it triggers early for some reason

#

i might try adding more delay

night juniper
#

if you still have nil, true there omit it

burnt apex
#

no nil, true,

#

not sure why its getting put at the front

#

i just want this to work like it should tvt

peak tiger
#

How do I make a spectral/tarot card apply an enhancement such as steel? I can't find any way to make it work.

night juniper
#

so maybe not fighting the game's design conventions is just better

night juniper
burnt apex
#

ill check it out

burnt apex
#

two seperate events

#

with a target

ember cedar
wintry solar
ember cedar
#

ah heck.

#

its 3a where i am, my eyes cant see the difference and thats the story im sticking with heh

#

ty ty

finite onyx
#

Hello everyone, does anyone know the code for creating consumables like the tarot card “The Empress”?

If you want to find the code in the game engine balatro.exe in .lua, which one is it? Thank you.

ember cedar
#

in the game archive it should be in card.lua iirc

#

steamodded allows for the create_card() call though which is a bit nicer

finite onyx
#

i see

night juniper
# burnt apex

i have a style recommendation for this, instead of nesting your logic inside if statements, use ifs with early return as guards, so sth like
if pseudorandom(..) == G.GAME.probabilities.normal then return end
this will allow you to have all cancel conditions listed clearly at the top of your function and the actually relevant code separated below it with no unnecessary indent levels

burnt apex
ember cedar
peak tiger
#

I'm trying to use card:set_enhancement(card.ability.extra.enhancement) but it too does not want to work

peak tiger