#💻・modding-dev

1 messages · Page 300 of 1

stark geode
#

how should i reset it at the start of a round?

sturdy monolith
spare furnace
#

lsdfkghksdf my mod is jazzy, and your mod is azzy so your jokers are j_azzy. this is mildly funny

runic pecan
#

I'm once again asking for the method to destroy unscoring cards.
I recall there's a smods optional feature but I forgot what's its name.

graceful magnet
#

there we go

terse marsh
#

im doing something wrong here could i get some help

#

isnt upgrading the card or adding the chips

graceful magnet
#

replace all self with card inside the calculate (so don't replace the function(self one)

terse marsh
#

wonderful thank you

spare furnace
#

Figured it out, modeled it after what the Lobotomy Corporation mod does for the pebble enhancement. i put this in my main.lua (EDIT: this runs on EVERY hand draw, not just inital hand draw, i need to tweak this)

terse marsh
#

is it maybe cuz im checking the suit wrong or is that fine

#

it doesnt run the upgrade or anything and doesnt even add to the card

#

just inactive

next timber
#

is there a way to hard set the sell price of a joker? i want a joker to cost money to sell but by default it floors at 1
i know patching is an option but if theres an easier way that would be neat

bold sleet
#

ty

spare furnace
#

That's why i posted my solution, i wanted to make sure other people could learn

#

😉

dapper sun
#

how do i make a joker never appear in the shop?

zealous glen
dapper sun
#

i tried that but it still appeared

glad osprey
#

why are there jokers

runic pecan
#

What is the return key for adding retriggers when context.repetition?
I thought it was retriggers but it doesn't work now.
And I don't remember why I thought it was retriggers, either.

zealous glen
zealous glen
dapper sun
#

idk my gf was streaming their gameplay of my wip mod and got a joker that wasn't supposed to appear in shop

zinc forum
#

Weird question, vanilla Balatro doesn't have anything for calculating Poker Hands when you play 8 cards at once right?

zealous glen
#

Not how it was obtained

dapper sun
#

in_pool = function(self, args) return false end

runic pecan
spare furnace
zealous glen
dapper sun
#

i'll do some more testing :p

limber blaze
dapper sun
#

okay i checked and

#

she was playing on balanced sleeve

#

that maaay have been it 😭

limber blaze
#

yeah doe/balanced sleeve doesnt check for inpool

#

you can do no_doe = true on the cards center though

daring fern
limber blaze
runic pecan
opal holly
#

My anatomy is adios

next timber
#

if my mod isnt known for anything else it WILL be known for cool soul sprite custom animations

#

i have 2 now

#

i plan on continuing the trend

#

its choppy but its better than nothing

worldly thicket
long sun
#

hi, quick question — what's the syntax for getting the key of a consumable card?

#

would it be card.ability.key?

limber blaze
#

card.config.center.key works

next timber
long sun
#

awesome, thanks :D

worldly thicket
next timber
#

custom joker

worldly thicket
#

What does it do?

runic pecan
#

Under if context.repetition and context.cardarea == G.hand then, is it possible that context.poker_hands is nil?
Asking this because I was under impression that context.poker_hands is always there during eval_play.

next timber
#

Bad EGG is the one on the right in the video, right now im not 100% sure on the specifics but its basically a near useless joker that costs money to get rid of

worldly thicket
#

That must've been a pain to code, but that might just be because I'm new to modding so seeing that one joker does all of that is interesting

edgy mountain
#

im trying to have an enhancement add permamult and chips to other scored cards

#

how can i make sure it happens before theyre scored?

unkempt thicket
#

Try changing trigger to before

next timber
#

thatll probably reduce the lines of code if anything

stiff locust
#

what are the base weights of common/uncommon/rare jokers

edgy mountain
edgy mountain
unkempt thicket
#

Try context.main_scoring instead of context.before

edgy mountain
#

ill check

edgy mountain
#

isnt before the earliest context thats applicable here?

zealous glen
next timber
#

how would i make a joker transform into a different joker? i need missingno to become Bad EGG if its chance fails

worldly thicket
#

from what I've seen, couldn't you remove the missingno and just create a Bad EGG? (Idk the specific code sorry)

runic pecan
zealous glen
next timber
#

isnt there like 1 non-legendary that breaks that rule or smth

zealous glen
#

No

worldly thicket
#

I've been meaning to make a mod, but idk what I'd add, any ideas?

limber blaze
next timber
# zealous glen `set_ability`

ok this works but it transforms instantly, how would i have it do the flip animation that death does? im looking at the code for death and i cant see what does it

long sun
#

in the line:
if context.destroy_card and context.cardarea == G.hand and context.destroying_card.ability.name == 'Wild Card' and pseudorandom('badhairday') < G.GAME.probabilities.normal / card.ability.extra.odds then

next timber
long sun
#

ideas? :P

frosty dock
rapid stag
#

is there a context that is called when the joker is added to the joker area?

frosty dock
#

context.destroying_card only exists some of the time [when the card checked is a card that was played and scored] due to being used by vanilla

long sun
#

ahhhh icicic

formal parrot
#

Aura

long sun
#

should i change that everywhere, then?

zealous glen
frosty dock
#

you can use context.destroying_card where only destroying played and scored cards, but context.destroy_card always works

long sun
#

great. thanks! :D

frosty dock
zealous glen
formal parrot
#

Now you see

#

🔥

long sun
#

perfecto, it worked! thanks ^^

primal robin
formal parrot
worldly thicket
#

Is there a way to make consumables:

A. Give money
B. Destroy cards in the deck

opal holly
formal parrot
zealous glen
#

he needs to have it surgically removed

pseudo cape
#

does anyone know the best way to do a texture replacement on the newest version of steamodded? Been trying to replace the 8BitDeck texture for awhile now, but it keep crashing when I try the outdated method, and Maverick (texture loader) doesn't have support for the front designs it seems

worldly thicket
rapid stag
frosty dock
#

what is your smods version

rapid stag
#

1.0.0 beta 0323b

#

current release

frosty dock
#

I should make a new release, shouldn't I

#

but card_added should be in that version

chilly tendon
#

Utility joker idea
Mr. Mrs.: Kings and Queens count as the same rank

rapid stag
pseudo cape
#

I figured it out, m just using SMODS.Atlas and replacing the default texture

zealous glen
#

I don't recommend doing that

narrow iron
#

why's this not working?

dreamy thunder
#

change it with card = card

narrow iron
#

ohhh

dreamy thunder
#

also self.config.extra

runic pecan
#

What is the optional feature named if I want to use context.cardarea == 'unscored'?

red flower
#

i think its not optional anymore

dapper sun
#

how do i create a joker from a custom pool instead of from all jokers?

red flower
dapper sun
#

ok

runic pecan
#

This doesn't remove unscored cards. Please help.

red flower
dapper sun
#

the game crashes when i play a hand

runic pecan
dapper sun
#

no

#

i use elle-j-residents as the key in both the objecttype and the add_card

red flower
dapper sun
#

oh ok

#

ty

#

yeah the area thing may be a slight problem lmao

#

thanks for pointing that out

cursive sentinel
#

im not sure to understand the difference between the contexts cards_destroyed and remove_playing_cards even with the doc

#

i see the glass and caino jokers have their code in both context but i dont quite get why and what does it change

red flower
dapper sun
#

it's just making jimbos

red flower
#

yeah i was going to say, i think the cards field on objecttype doesnt work with modded jokers

#

you need to inject them after

cursive sentinel
#

cards destroyed*

#

swapped the words

dapper sun
#

wdym inject

red flower
#

sorry i was trying to see if i could fine some nicer code than mine lol

dapper sun
#

ok lol

limber blaze
#

heres an okay example

dapper sun
#

ty

#

game's crashing on startup,,

SMODS.ObjectType {
    key = "Residents_Base",
    cards = {},
    inject = function(self)
        local jokers = { "elle_chloe", "elle_sophie" }
        SMODS.ObjectType.inject(self)
        for i, v in pairs(jokers) do
            self:inject_card(G.P_CENTERS[v])
        end
    end
}
SMODS.ObjectTypes.Residents_Base:inject()```
#

wait i think i see the problem

#

i think it needs to be in the same indexing formatting as before

red flower
#

it needs to be j_modprefix_key

cursive sentinel
#

i have a crash on card destruction (wether played or not) about "juice_up" and got no clue what it is

red flower
#

whats the code?

cursive sentinel
dapper sun
cursive sentinel
#

(i ended up using only remove_playing_cards as i didn't find further info on the context.destroyed_cards)

dapper sun
#

wait that isn't the prefix

faint yacht
#

😶‍🌫️ How safe is using such...

dapper sun
#

i'm still confused 😭

#

and still crashing

red flower
# cursive sentinel

try this

return {
    message = localize('k_plus_spectral'),
    colour = G.C.SECONDARY_SET.Spectral,
    func = function()
        G.E_MANAGER:add_event(Event({
            trigger = 'before',
            delay = 0.0,
            func = (function()
                SMODS.add_card({
                    set = "Spectral"
                })
                G.GAME.consumeable_buffer = 0
                return true
            end)
        }))
    end
}
red flower
dapper sun
next timber
#

how do i get a list of all legendaries? i thought i could use SMODS.Consumable.legendaries but its an empty table

zealous glen
#

@red flower hello N' how are you

red flower
zealous glen
#

I just spent ~1h making a Joker compatible with perhaps the objectively worse effects in the game, Magic Trick and Illusion

red flower
red flower
zealous glen
#

also there are bug reports about Illusion going back almost a whole year

#

which I found out about while reading the code then testing it

dapper sun
zealous glen
red flower
zealous glen
#

thunk somehow had an idea worse than skipping v_v

red flower
#

maybe inject doesnt work either lol

dapper sun
red flower
#

i dont use this anymore but i did it like this

dapper sun
#

?

red flower
#

obviously mine is more complicated but the idea is that you hook SMODS.injectItems

#

and then you do SMODS.ObjectTypes["modprefix_key"]:inject_card

dapper sun
#

can you give a simpler code example pls,, 😭

limber blaze
red flower
# dapper sun can you give a simpler code example pls,, 😭
local SMODS_injectItems_ref = SMODS.injectItems
function SMODS.injectItems()
    SMODS_injectItems_ref()
    for i, v in ipairs(G.P_CENTER_POOLS.Joker) do
        if v.key == "j_elle_chloe" then
            SMODS.ObjectTypes["elle_Residents_Base"]:inject_card(v)
        end
    end
end
dapper sun
#

ty

red flower
#

its actually simpler to look in P_CENTERS directly but im stupid and didnt write that 🙂

limber blaze
#

i forgot that i have mine setup in injectitems tbh

dapper sun
#

do i need to add a SMODS.injectItems() later in the code?

limber blaze
#

the way i have it listed here works perfectly

#

dont worry about LoadCompatibilities and Entropy.ReverseFlipsideInversions though they are irrelevant

dapper sun
#

ok

#

this is making me feel rly dumb ngl

#

pls can i see your Entropy.FlipsideInversions table

edgy reef
#

What are you even doing?

dapper sun
#

scroll up

#

we've been trying to figure this out for a while

edgy reef
#

Why do you need to hook SMODS.injectItems?

dapper sun
#

because apparently i can't use modded jokers in cards

edgy reef
#

huh?

dapper sun
#

gimme a moment i wanna try smtn

edgy reef
#

I thought the issue with cards was that it would work with only modded cards, and then I fixed that.

#

And the code to handle this has been the same for the past 6 months.

dapper sun
#

oh ok

#

ok i fixed it

#

that was much simpler than all that inject stuff

#

i feel less dumb looking at this simple code

rapid stag
#

bump.

runic pecan
#

The SMODS wiki says "saved - used during context.end_of_round to prevent game over", but the message is hardcoded for Mr. Bone . Can we customize the saved message with smods instead?

zealous glen
#

I think the message is already automated for modded Jokers

reef belfry
#

I just thought of a joker that does 25 different things based on what its current ability is but i dont think i have the mental capacity to do that

dapper sun
#

chloe joker isn't appearing at all,, marie joker (legendary) appeared once (out of 25 tries) tho

runic pecan
zealous glen
runic pecan
rapid stag
#

the localisation var for it is stored at G.localization.descriptions.misc.dictionary.ph_mr_bones - there are multiple routes you can take to change it such as with SMODS.process_loc_text(), or the generally better and more compatible way, with a localisation file

rapid stag
# zealous glen I meant that I think SMODs uses the Joker's name

from my dump of functions\common_events.lua, on the current release version of SMODS

to make this dynamically use whatever name mr bones would be changed to, you could replace localize('ph_mr_bones') with "Saved by "..G.localization.descriptions.Joker.j_mr_bones.name

...to handle additional jokers that return saved = true, would probably have to rewrite this to get the name of whatever joker that returned saved, which i believe is possible in this event chain

dapper sun
#

it works fine if i just add showman lol

zealous glen
#

But maybe that was before new calc

#

and it didn't get ported

#

or they didn't make a PR

#

I think if people want this feature they should request it

dapper sun
tall apex
#

hey is there a way to move card's position on screen?

glass scaffold
dapper sun
#

yes

#

i pulled the legendary one 12/30 times

glass scaffold
#

Are you playing on the Equilibrium Deck or using the Equilibrium Sleeve?

dapper sun
#

no

#

red deck, no sleeve

stark geode
glass scaffold
#

That MIGHT explain why.

dapper sun
#

yea?

glass scaffold
dapper sun
#

how so?

glass scaffold
#

Because you defined the Joker as a Base Resident in its ObjectType, which means regardless of it being a Legendary, it'll still be a possibility via Resident Spectral.

dapper sun
#

ok

#

i thought using objecttype meant it'd account for card rarity

#

how do i use the rarity in the objecttype?

glass scaffold
#

I can suggest making Base Resident a Rarity instead of ObjectType.

dapper sun
#

i'd rather not make it a rarity

glass scaffold
tired skiff
#

chat what did i messup

dapper sun
#

your joker needs a key

#

it says it there

tired skiff
#

i have a key though

dapper sun
#

it needs to be in quotes

tired skiff
#

thats weird cause i have another joker with its key not in quotes

#

ok it lauches now

#

smh

dapper sun
tired skiff
#

oh wait it was the name that was not in quotes

#

my bad chat im a idiot

dapper sun
#

that should also be in quotes

tired skiff
#

yeah idk why it works then

dapper sun
#

prob bc that name isn't doing anything

#

the name needs to be in loc_txt

tired skiff
#

anyway

#

how do i make a joker
uhh how do i make this pg uhh sodoku itself

#

destroy itself

dapper sun
#

pg?

#

oh lmao

#

u don't have to say it like that this isn't youtube

tired skiff
tired skiff
tired skiff
# tired skiff

basicly want this joker to start at like 3$ and then if u have less that 3$ it goes to 4 but if u have more than 3 it destroys itself

reef belfry
#

Wholelottalatro

dapper sun
#

how do i get a rarity's rate?

thin anchor
#

trying to add a deck to jens almanac
is this right?

proud moon
#

does anyone have an example of a modded joker that functions like blueprint or brainstorm? im trying to add another version of blueprint called redprint to my mod, but im way out of my league with jokers that take on abilities of other jokers

#

just an example i could look through and learn from would be great

paper zealot
# tired skiff

I am once again begging you to format your code indentation (Shift+Alt+F), for your own sanity and ours.
The common wisdom is that code is read 10 times more often than code is written, so making it as readable as possible is really important.

We are constantly reading old code as part of the effort to write new code. ...making [code] easy to read makes it easier to write.
This also means it's 10 times more important to develop your ability to read code than your ability to write it. Read through other people's mods to get a sense of how things are written, and you'll find you'll get a lot better at writing code in the process.
This style guide also offers some good tips on good and bad practice, though many people will disagree on the exact details. Consistency is the most important thing.
While you're learning, it's good to not develop bad habits early that are hard to shake off later on

tired skiff
#

:<

faint yacht
#

...can I actually hide normal poker hands and let them become unlockable?

#

Huh, yes.

#

-# The order gets kinda fucked up, though... or it might be just the idea of it actually throwing me off.

proud moon
#

thats actually a really cool idea

graceful magnet
#

this makes something always able to appear even when you have it right? am I just getting astronomically unlucky with my mass Rare Tag spawning?

dapper sun
#

no

#

i don't think so

#

maybe look at how showman works?

tall apex
#

hey does anyone know what defines where a card can and cant be?

rapid stag
# proud moon just an example i could look through and learn from would be great

i don't have anything, but i know that if you have a either a lovely dump of the card.lua or the game's original card.lua to check through

just from thumbing through those to see how blueprint & brainstorm work nomally, i know that to do the compatibility check, you'll need to use a main_end which is something you return as part of your loc_vars table, which involves UI code, so have fun with that girldmDead

and in card.lua's Card:calculate_joker(context) function, blueprint and brainstorm are right at the top, at the start of the function. basically what blueprint does there is it sets up a holder var for the other joker, then iterates through all of the present jokers in G.jokers.cards until it finds itself, then identifies the next one in sequence as the joker to its right (the joker to the left being the previous one in sequence). it then checks to make sure the thing it's trying to work with exists (since if blueprint is at the far right of the jokers area for some reason, the next joker in sequence is always going to be invalid). imo one minor nitpick about the vanilla blueprint is that it doesn't break the loop after other_joker = G.jokers.cards[i+1], which means that loop will just continue to iterate even after its achieved its purpose, which probably doesn't really mean much in terms of inefficiency and performance, but is probably a good habit in this kind of "iterate through the whole list to get one thing" kind of method of doing things, to do.

#

i don't fully understand what's happening from that point onwards other than:

  • it creates and populates the blueprint child in context, which is vital to ensure that what it does next works properly and as intended - this is probably something you should mimic exactly to ensure maximum compatibility with both vanilla jokers and jokers from other mods, for things like context.blueprint == nil to keep blueprint from blueprinting that part of a joker's function if it's designed that way
  • it calls the calculate function of the other joker and puts the returned table into a var. this is what blueprint itself returns.
  • it removes the blueprint child in context that it created afterward (but not before putting the reference to itself into a var for later) - this is just as important as creating the context, because there will always be more jokers in sequence on from blueprint that have yet to calculate, but since the context it's editing is the context that was passed into function in the first place, if this isn't done, the blueprint child will persist into the next calculate() call, making that next calculate() think it's being called by blueprint.

a different way to do this could be to instead copy_table(context) into a variable, then create the blueprint child in that, but this is probably more memory efficient since doing it that way declares a new variable.

  • it then sets the card child of the table that returned from the other joker's calculate() to itself, overriding any value that was there - which is mostly just determining where the message appear. it also forces the colour child to G.C.BLUE, mostly just an aesthetic choice for blueprint specifically. then it returns that table.
tall apex
#

my question hath been launched into the stratosphere

rapid stag
#

i'm sorry girldmDead i'd been writing that for like 10 minutes girldmSad

tall apex
#

ASDGDSAKLGASDGASDG LMAO

#

you're good X3

faint yacht
#

What do you even imply by "can and cant be" on cards... and what cards, even... suit, rank, rarity?

tall apex
rapid stag
#

i think they mean the kind of cardareas where jokers, consumables and cards can be

graceful magnet
rapid stag
#

oh you want to make changes to the existing ones - i was under the impression you wanted to make new ones cirDerp

tall wharf
#

is there not like

#

a setting you can set to make it show more than once

graceful magnet
#

but the docs never use anything in a sentence so I'm not sure how to write it

tall apex
#

behold my WIP joker that will take me months to code hopefully not

#

... one second my games opening

graceful magnet
tall wharf
tall apex
#

here :3

graceful magnet
tall apex
#

this is what im trying to code X3

tall wharf
#

return true, {allow_duplicates = true}

#

that's all you need to do i believe

#

inside the in pool function

tall wharf
tall apex
tall wharf
#

no

rapid stag
tall apex
#

oh

tall wharf
#

just virtual insanity

tall apex
tall apex
tall wharf
#

iirc x5 mult but does the amber acorn thing

tall apex
#

idek how to begin so im not gonna implement it rn, but i did the art :3

#

the background isnt done yet tho

faint yacht
#

-# Now I need to alter the text of the Psychic boss blind...

tall wharf
#

just got an idea for new boss blind

#

which is honestly very diabolical

#

should just be ultima blinds

proud moon
# rapid stag i don't have anything, but i know that if you have a either a lovely dump of the...

Thank you, i had little clue where to start and was hoping there was already a structure in place in modding, but this is still a large step in the right direction, ill might be able to work out the rest from here. i should also mention, this is my first modded joker lol. I already do know how to make regular jokers thanks to the smods docs and i was making compatibility between modded jokers and JokerDisplay, but i only started 2 days ago so any help is greatly appreciated.

graceful magnet
tall wharf
#

how about

#

do not draw cards after hand played

rapid stag
#

what's the default cost of a rare joker cirDerp

tall apex
#

i think 10?

tall wharf
#

i think blueprint and brainstorm are both 10

tall apex
#

ohhh

#

yeah just bloopy and brainstomp are 10

tall wharf
#

the dumbass rares are 8

proud moon
#

i think most are 8, uncommon are 6, and common are 4

#

and then credit card is a special guy and is 1

tall apex
#

oh nope, could you tell me a bit about card areas and how they're implemented :3

rapid stag
#

i don't know anything about those, sorry cirSlain

#

there are a lot of modders that work with cardareas though

tall apex
#

All good!

#

My search continues >:3

tall apex
tall apex
tall wharf
#

hey n

red flower
# tall apex ^

all cardareas take all kinds of cards so rather than looking at how cardareas work you need to check which functions emplace cards in them, like this part in buy_from_shop

red flower
tall wharf
#

also i actually did the solitaire part using cardareas

paper zealot
tall apex
red flower
rapid stag
tall apex
#

..,, aiko could I see that code?

gentle rain
#

what on earth is causing this? i checked over all my atlases and couldn't find anything wrong.

tall apex
rapid stag
gentle rain
rapid stag
dapper sun
#

how do i add a joker unlock?

tall apex
#

I showed you my atlas pls respond

tall wharf
#

do people just put each joker in different atlases?????

gentle rain
tall wharf
#

that's like the whole point of having an atlas

faint yacht
rapid stag
tall wharf
#

what they said

#

also placeholder?

gentle rain
#

or, that specific atlas.

#

hehe.

tall wharf
#

i hope people didn't miss the whole point of having an atlas

red flower
gentle rain
tall wharf
tall wharf
gentle rain
#

ah, right.

gentle rain
#

i'll cross that bridge when i get to it. for now, it's much easier to throw everything in a spritesheet.

#

i also need to add localization, too.

tall wharf
#

weeps

old bane
#

kinda wish you could make jokers have animated textures

rapid stag
rapid stag
gentle rain
faint yacht
#

Aura or manually update the current "frame".

faint yacht
#

This is a bit faster in-game, quite an in-dev GIF.

old bane
tall wharf
paper zealot
red flower
old bane
rapid stag
gentle rain
# tall wharf

do you have a blank 10x10 template of cards on hand?

shrewd cobalt
#

I'm trying to grab the value of G.GAME.tags's key string, but when I do print(G.GAME.tags.key) it comes up nil,
Am I selecting the right table?

tall wharf
#

no

gentle rain
#

ah.

tall apex
#

ight immna go doodle more clowns

#

bcos im def not getting this done tonight

tall wharf
#

development resumes tomorrow

gentle rain
tall apex
tall wharf
#

someone help me with my solitaire thank you

paper zealot
red flower
#

i want to do 29 jokers tomorrow

#

i did 19 today

tall apex
gentle rain
gentle rain
tall wharf
gentle rain
#

oh you have double clicking? awesome

wind steppe
#

do yall know how to scale a joker's values (like red card or green joker)

tall wharf
#

i want it

#

but it breaks right now

gentle rain
#

may i ask if solitaire is gonna have any impact on balatro runs or if its just a for fun thing

red flower
gentle rain
#

lol

#

awesome

rapid stag
tall wharf
#

seriously

#

how do people do double click

red flower
#

carefully

rapid stag
#

i want to know how you get that hold click thing to select cards

#

what does that

faint yacht
#

...hm...

SMODS.Blind:take_ownership('psychic',
    { debuff_hand = function(self, cards, hand, handname, check)
        return #cards ~= G.hand.config.highlighted_limit
    end},
    true
)
#

...that's a hardcoded string, even worse!

tall wharf
#

handydydyshdhd

manic rune
#

hi aiko

tall wharf
#

I'm tired bepis

#

please help me

modern kindle
#

Hi bepis

paper zealot
# tall wharf how do people do double click

Store double_click_position and click_time and check them on click and click release

  • On click:
    • If double_click_position has been set previously, and is equal to the current position, and (current_time - click_time < double_click_time_threshold), it's a double click!
    • Else if double_click_position nil, store double_click_position and click_time.
  • On click release:
    • If cursor position is changed, reset double_click_position and click_time
      Ideally you'd also invalidate if it the cursor had moved in the meantime, but that's probably hard to do within the Balatro controller and might be excessive
tall wharf
#

i mean i got the double click part but i don't have the stacking part

paper zealot
#

how do people do double click
You can probably forgive me for misinterpreting your question

modern kindle
#

I'm very tired and that got a cackle out of me

tall wharf
#

i have card double_click working

#

but i just dont have stack moving on double click working

#

it's insane

tepid rock
#
    loc_vars = function(self, info_queue, card)
        info_queue[#info_queue + 1] = G.P_CENTERS.e_negative
    end,
    calculate = function(self, card, context)
        local my_pos = nil
        for i = 1, #G.jokers.cards do
            if G.jokers.cards[i] == card then my_pos = i; break end
        end
        if context.setting_blind and not card.getting_sliced then
            if my_pos and G.jokers.cards[my_pos+1] and not card.getting_sliced and not G.jokers.cards[my_pos+1].ability.eternal and not G.jokers.cards[my_pos+1].getting_sliced then 
                local sliced_card = G.jokers.cards[my_pos+1]
                    sliced_card.getting_sliced = true
                    G.GAME.joker_buffer = G.GAME.joker_buffer - 1
                    G.E_MANAGER:add_event(Event({func = function()
                        G.GAME.joker_buffer = 0
                        G.jokers.cards[my_pos-1]:set_ability(G.P_CENTERS.e_negative, nil, true)
                        card:juice_up(0.8, 0.8)
                        sliced_card:start_dissolve({HEX("57ecab")}, nil, 1.6)
                        play_sound('slice1', 0.96+math.random()*0.08)
                    return true end }))
                end
            end
    end
    
}

having some issues. Card kills the card on the right but when it goes to convert the left to a negative, it crashes

tall wharf
#

i wish

red flower
scarlet spire
#

how

tall wharf
scarlet spire
#

you can't keep getting away with this

tepid rock
red flower
#

sad

scarlet spire
#

oh that's fun actually

wind steppe
#

does anyone know why the joker isn't scoring? (also how would I make both the total chips and the chips it gains changeable with one line)

SMODS.Joker{
    key = 'Blue Card',
    loc_txt = {
        name = 'Blue Card',
        text = {
            'This Joker gains {C:blue}+30{} Chips when any',
            '{C:attention}Booster Pack{} is opened.',
            '{C:inactive}(Currently {}{C:blue}#1#{} {C:inactive}Chips){}'
        }
    },
    atlas = 'Jokers',
    pos = {x = 0, y = 0},
    config = { extra = {
        chips = 0
    }
    },
    rarity = 1,
    blueprint_compat = true,
    loc_vars = function(self,info_queue,card)
        return {vars = {card.ability.extra.chips}}
    end,
    calculate = function(self,card,context)
        if context.open_booster and not context.blueprint then
            card.ability.extra.chips = card.ability.extra.chips + 30
        elseif context.joker_main then
            chip_mod = card.ability.extra.chips
        end
    end
}
tall apex
red flower
tepid rock
red flower
#

I'm still pretty sure it's set_edition

tepid rock
#

*set_edition

#

forgot to put the new code in my bad

paper zealot
tepid rock
#

G.jokers.cards[my_pos-1]:set_edition(G.P_CENTERS.e_negative, nil, true)

red flower
#

i might be wrong on one of those

tepid rock
#

took out centre and it gave me the same resuklt

coral flume
#

Anyone got a clue why blueprint says incompatible even though its working?

glass scaffold
#

add that in your joker's code

worldly thicket
#

Is there a way to make new suits?

glass scaffold
tepid rock
worldly thicket
worldly thicket
#

What if I wanted to make one?

glass scaffold
worldly thicket
#

Alright then, thanks

red flower
formal parrot
tepid rock
# red flower set_edition({negative = true}) set_edition("e_negative") should work too

        if context.setting_blind and not card.getting_sliced then
            if my_pos and G.jokers.cards[my_pos+1] and not card.getting_sliced and not G.jokers.cards[my_pos+1].ability.eternal and not G.jokers.cards[my_pos+1].getting_sliced then 
                local sliced_card = G.jokers.cards[my_pos+1]
                local left_card = G.jokers.cards[my_pos-1]
                    sliced_card.getting_sliced = true
                    G.GAME.joker_buffer = G.GAME.joker_buffer - 1
                    G.E_MANAGER:add_event(Event({func = function()
                        G.GAME.joker_buffer = 0
                        left_card:set_edition(e_negative, true)
                        card:juice_up(0.8, 0.8)
                        sliced_card:start_dissolve({HEX("57ecab")}, true, 1.6)
                        play_sound('slice1', 0.96+math.random()*0.08)
                    return true end }))
                end
            end
    end
    
}

doesnt crash now but doesnt apply negative

faint yacht
#

'e_negative'

tall apex
#

gimme joker idea

#

:3

tall wharf
tepid rock
gentle rain
#

like. howdo you do that

faint yacht
#

-# UI wizardry.

gentle rain
#

made solitaire made scrabble in balatro shit is nuts

#

made bad apple

tall apex
#

Aiko could probably code my new joker in 5 minutes XP

coral flume
tall wharf
#

im a genius

rapid stag
#

bump

faint yacht
#

Something like this?

unborn bay
faint yacht
#

...actually, is that a retexture of the vanilla Wild Card enhancement, even?

unborn bay
# unborn bay

feel like this is probably too powerful as an uncommon joker

faint yacht
#

-# A solid Rare imo. Though, what do I know about appropriate rarity assignment.

lucid owl
#

how could i manipulate blinds for a deck? i'd like to make sure every boss is a showdown boss but can't seem to figure out how

faint yacht
#

Probably hooking or Lovely patching of get_new_boss() for your deck.

#

See common_events.lua at line 2338.

#

Or you could slap your own gathering of the Showdown blinds and letting pseudorandom_element choose the boss for you in calculate of the deck, after which you assign it to G.GAME.round_resets.blind_choices.Boss.

lucid owl
#

thanks for these ideas on how to do it!

#

i might just patch

#

but adding a little thing in the calculate function may be easy enough too

tall wharf
#

aaa

faint yacht
#

Well, for what I needed

while G.GAME.round_resets.blind_choices.Boss == 'bl_psychic' do
    G.GAME.round_resets.blind_choices.Boss = get_new_boss()
end

was enough.

late basin
#

How would you detect how many of a specific card are in your deck (like the way Steel Joker and Cloud 9 do it)? The Steammodded documentation is my best friend but I'm having a hard time finding this one

tall wharf
unborn bay
winged pulsar
#

can someone help me fix this, my lovely keeps telling me theres an unknown key and wont load my mods

tall wharf
scarlet thorn
tall wharf
#

i love

faint yacht
#

💀 Now imagine all those conditions compressed into one return...

winged pulsar
tall wharf
#

i keep adding random people by accident

#

😭

winged pulsar
tall wharf
scarlet thorn
winged pulsar
#

then when it boots it looks like this

scarlet thorn
coral flume
#

Trying to check if a played hand contains a scoring King and Jack. Tried setting to values to be true and then returning the effect if bothe those values are true but its not working and theres probably a better way to do it

#

if you know a way please ping me, many thanks

dense adder
#

whenever a joker is checking for an enhancement from the modpack do i just need to give the key of that enhancement or does smods require the mods key the enhancement is from

#
      if context.cardarea == G.play and context.individual and context.scoring_hand then 
          if SMODS.has_enhancement(context.other_card, 'm_rose') then```
daring fern
dense adder
#

thank you

tall wharf
#

chat how balanced is this

lucid owl
lucid owl
faint yacht
#

...why the returns?

lucid owl
faint yacht
#

You could limit when that goes of by putting it under a context of sorts, be it .leaving_shop or something.

tall wharf
#

calculate return should be a table not a boolean?

rapid stag
lucid owl
#

only problem is that the boss background seems to be incorrect but i think i've seen that be an issue for people before

rapid stag
scarlet thorn
#

Showing the current code where you use card_added would also help

rapid stag
scarlet thorn
rapid stag
sharp blade
#

loc_vars is run whenever you hover over the card, but if you want code to be run at the very end of scoring, you could use context.final_scoring_step in the calculate function

high sinew
scarlet thorn
#

Though, with what you're doing with the imports and SMODS confuses me. I havent seen anyone do that yet, is it truly necessary?

rapid stag
#

bump

scarlet thorn
#

you can just edit io_queue in the loc_vars function

rapid stag
high sinew
scarlet thorn
high sinew
#

ill try uncapping

rapid stag
scarlet thorn
#

If you've already modified generate_card_ui(), just replace it with loc_vars

#

however you're doing that

rapid stag
#

...wait, loc_vars in vanilla items is just a table cirLost is it safe to be making those functions instead

scarlet thorn
rapid stag
#

does balatro not have a way of determining if a played hand contains other hands

small moon
#

I'm really confused as to how to move the Ace on the main menu; We've tried replacing the title_top definition to change the x position and that doesn't change anything, and we've tried replacing the replace_card definition to append the x position and that doesn't change its position either

daring fern
coral flume
#

Struggling to get this to work

daring fern
rapid stag
#

after following the wiki on something and struggling to work out why a if context.before and context.cardarea == G.play then wasn't being entered when i played a hand, i print(tprint(context))ed when context.before. why does context.cardarea not exist?

wintry solar
#

That’s a card table, not a context

#

You probably have your function defined wrong

rapid stag
#

oh whoops, the print(tprint(context)) was print(tprint(context.cardarea)) cirDerp

small moon
rapid stag
#

is it possible to make it polychrome cirThink

wintry solar
wintry solar
#

Because for modifiers it can be

daring fern
rapid stag
rapid stag
#

i just noticed something about the way blueprint & brainstorm work.
is there a way i could make blueprint and brainstorm not overwrite the return table's .card and .colour if .card is a playing card? cirThink

#

i mean, i guess i'd have to SMODS.take_ownership() of them, but i'd still need to know how i'd identify .card as a playing card

coral flume
#

Fixed the crash but now its just not doing anything

faint plank
#

im so close to having 2 pages of jokers

unborn bay
cursive sentinel
#

im trying to have a chance to create a spectral card on each card destroyed while holding the joker, although it only procs once even when two cards are destroyed by the hanged man, or more by the glass shattering, any clue?

#
            local destruction = 0
            
            for k, val in ipairs(context.removed) do
                destruction = destruction + 1
            end

            while destruction > 0 do
                if (pseudorandom('goon') < G.GAME.probabilities.normal/card.ability.extra.odds) then
                    G.GAME.consumeable_buffer = G.GAME.consumeable_buffer + 1
                    return {
                        message = localize('k_plus_spectral'),
                        colour = G.C.SECONDARY_SET.Spectral,
                        func = function()
                            G.E_MANAGER:add_event(Event({
                                trigger = 'before',
                                delay = 0.0,
                                func = (function()
                                    SMODS.add_card({
                                        set = "Spectral"
                                    })
                                    G.GAME.consumeable_buffer = 0
                                    return true
                                end)
                            }))
                        end
                    }
                end
                destruction = destruction - 1
            end
        end```
#

also i don't quite understand the difference between context.remove_playing_cards and context.cards_destroyed, aside from maybe cards destroyed would affect all cards type? i dont find info on it so i dont know how important it would be to do both just as caino and glass jokers

tall wharf
runic pecan
#

What is the best context timing to check if the score is on fire?

tall wharf
high sinew
#

how can i impliement a sound correctly?

#

its crashing my game rn like this

daring fern
high sinew
#

ok thx man

#

this happened when sound tried playing

daring fern
high sinew
#

same thing happened when removed from the path

#

heres the code from when it activates from joker

daring fern
#

Remove the prefix when defining the sound.

high sinew
#

oh really?

#

i thought u need

tall wharf
#

it's automatically added

#

i think

high sinew
#

ok bet

#

another error 😦

daring fern
high sinew
#

heres the lua files

#

in my sounds folder

daring fern
high sinew
#

ohhhh

#

lol

#

thanks bro

#

does it need to be in folder called resources?

#

crashed again

frosty dock
#

you need the prefix when calling play_sound

#

just not when defining the SMODS.Sound

high sinew
#

where?

frosty dock
#

this should have the prefix

#

but you removed it

wintry solar
cursive sentinel
#

okok

#

so the move was indeed to your remove_playing_cards

#

although i have no clue why it only procs once for me whereas the same call makes it multiple times for caino and shattered glass

#

i'd guess it's for the context.individual, but adding it stops the joker from having any effect

cursive sentinel
#

should i vanish the return then? i'm really a newbie

runic pecan
#

How to make sure a card.ability.extra[some_key] value is always an integer?

daring fern
runic pecan
#

Sorry, I forgot math.floor was a thing.

elder inlet
#

Does anyone have any idea why a combo of mods would cause all hands to be lvl0 at the start of a round and be unable to score at all?
I have a modpack built, I was wondering if anyone had knowledge that could save me the task of testing each mod.

zealous glen
#

You can test half of all mods at a time

tall wharf
#

We're not magic beings

#

we don't know what your setup looks like

elder inlet
#

I mean I was just asking why it might be possible within the code... Not to magically cure my issue

#

What possible code logic might have caused that. So I might have an idea of where to look. No one was asking for a magic bullet

tall wharf
#

sorry i am wrong

#

the original values are in Game:init_game_object()

hushed field
tall wharf
#

does smods have card getting destroyed context yet

dapper sun
#

yes

#

context.remove_playing_cards

#

with the destroyed cards listed in context.removed

tall wharf
#

is there one for jokers

dapper sun
#

nope

#

i wish there was tho,,

tall wharf
manic rune
unborn bay
#

what does anshy even mean

manic rune
#

dunno

#

oh yeah, one of my friend's name :3

#

thought it would be funny if i decided to just call my friends names of my other friends

heavy hare
#

would anyone know why the FileHandler running would cause a crash?

game.lua:2798: bad argument #1 to 'push' (boolean, number, string, love type, or table expected)

this is the part of the code where it's breaking:

if G.FILE_HANDLER.run then
    print("FILE HANDLER RUN")
    
    G.SAVE_MANAGER.channel:push({
        type = 'save_run',
        save_table = G.ARGS.save_run,
        profile_num = G.SETTINGS.profile})
    G.SAVED_GAME = nil
end
#

only changes i've made to G are adding a new UI object to reference and updating the G.orbital_choices

red flower
heavy hare
#

ooo interesting, i'll check that. thank you

tall wharf
#

hi n

#

wtf happened to my game

unborn bay
#

you can now use the game as your desktop backgrounr

tall wharf
#

fuck it i made custom context for when jokers get removed

zealous glen
#

I mean there’s probably more than 3

tall wharf
zealous glen
#

At least

#

Oops

#

Not Bunco

#

Betmma’s

#

Why haven’t they PR’d SMODS IDK

unborn bay
#

lovely patch bros ,,,,,

tall wharf
#

no lovely patches

zealous glen
#

Lovely Patch Bros.: The Movie

tall wharf
unborn bay
#

i actually had to lovely patch the mechanics for multiplier and i still need to figure out how to properly change the messages

#

i tried hooking into localize

#

but message comes first

#

so the very first mention of + Mult or + Chips isn't modified

#
return {
    message = localize('a_mult'),
    mult_mod = 5,
}
-- Message is created first here, currently the global toggle for this is off as it gets toggled when marketplier activates
-- mult_mod triggers the toggle change
-- Subsequent mult changes have X Mult as the message, but not this one
tall wharf
#

these codes are written while I'm half asleep please do not mind the bugs and glitches that will occur

unborn bay
#

i need to predict the future

last sentinel
#

What would be a good way to have an enhancement store a value for each individual card with the enhancement, and not just across the board (e.g. a stone joker that loses a chip from it's bonus each time it's played. Changing the config value changes the bonus across all cards with the enhancement)

#

I could use perma bonuses i suppose but then i'd have to handle removing the bonus if the enhancement is removed and keeping track of that... just wondering if im missing something obvious before hiking down that path

tall wharf
#

card.ability...

manic rune
#

am i cooking

tall wharf
manic rune
#

background

#

idk

#

:3

tall wharf
#

look at all these placeholder

primal robin
#

My morning starts from fixing a bug with multiplayer mod water

hushed field
manic rune
#

gonna kms

last sentinel
tall wharf
#

😔

unborn bay
#

i NEED to make better art

primal robin
tall wharf
#

i think card.ability is unique per card

manic rune
manic rune
#

it is finished

unborn bay
#

me doing ten 10s was enough of a motivation

manic rune
frosty dock
manic rune
#

shenanigans...

unborn bay
#

vanilla jokers use message together with mult_mod or whatever

tall wharf
#

with Steamodded you don't need to do that

primal robin
# manic rune what did they do

From 3 out of 11 options, chat should decide what we gonna do, and some jokers consumables will be given accoring to choice

last sentinel
tall wharf
#

chat is this real

#

chat

frosty dock
#

Am I missing context or how does that matter

manic rune
#

chat is this true

unborn bay
#

im trying to replace the message from +mult to xmult lmao

#

this is for a joker

hushed field
#

card.ability should just work for that. .ability is unique per card object

primal robin
#

For example

frosty dock
#

you should be able to do that with post_trigger

#

it lets you modify the return value of the reiggered joker

hushed field
unborn bay
last sentinel
#

yeahhh ill poke around. I had assumed as much when i started using it but came here when i couldnt isolate the issue further, I'll shake it out

unborn bay
#

im basically hooking into calculate_individual_effect to change mult to x mult and chips to x chips

#

via a lovely patch

hushed field
unborn bay
# unborn bay via a lovely patch
# Multiplier effects
[[patches]]
[patches.pattern]
target = '''=[SMODS _ "src/utils.lua"]'''
pattern = "mult = mod_mult(mult + amount)"
position = "after"
payload = '''
local old_mult = mod_mult(mult - amount)
local prob = G.GAME and G.GAME.probabilities.normal or 1
if G and G.GAME and ((G.GAME.markiplier_prob_xmult_chance and G.GAME.markiplier_prob_xmult_odds and G.GAME.markiplier_prob_xmult_chance > 0 and G.GAME.markiplier_prob_xmult_odds > 0
    and pseudorandom("payasaka_multiplier_xmult") < G.GAME.markiplier_prob_xmult_odds*prob / G.GAME.markiplier_prob_xmult_chance) or G.GAME.markiplier_prob_rigged) then
    mult = mod_mult(old_mult * amount)
    --G.GAME.payasaka_markiplier_multiplied = true
    if next(SMODS.find_card("j_payasaka_markiplier_punch_gif")) then
        card_eval_status_text(pseudorandom_element(SMODS.find_card("j_payasaka_markiplier_punch_gif"), pseudoseed('payasaka_multiplier')), 'extra', nil, nil, nil,
            { message = "Multiplied!", colour = G.C.DARK_EDITION, extrafunc = function() play_sound("payasaka_markiplier_ngahh", 1.0, 0.5) end })
    end
end
'''
match_indent = true
times = 1
#

it's shitty i know

primal robin
#

Imagine move all this code to function and just include a function in patch

unborn bay
#

i probably should

#

but it gets the job done for now

primal robin
#

That's how Balatro game code was made

#

Initialize cards for shop in UI function? Maybe I shouldn't, but it gets the job done for now

last sentinel
#

Appreciate the help y'all

tall wharf
#

😭😭😭😭😭

unborn bay
#

anyway i still need to figure out how exactly to patch the message field

#

unless i could just make the calculate_effects function prioritize mult_mod and chips_mod first before doing that

#

which would probably solve the problem

hushed field
#

do I have the Taken joker interact with the abduction mechanic, even though it's explicitely themed after alien abduction 🤔

frosty dock
red flower
#

<@&1133519078540185692>

grand violet
hushed field
#

Going to set up quests to be simpler because I've written a spider-web that's going to catch way too many bugs otherwise

hushed field
#

I've opted to make Taken a simple mult joker that turns John Taken's distrust of women's ability to do literally anything into a fun mechanic of giving 5 mult if you draw a queen, and losing 5 mult if you play one.

stark geode
stark geode
#

Bro is not beating the misogyny allegations

tall apex
#

Who the hell starts a dev chat like this I just woke up

crisp coral
daring fern
limber blaze
thin anchor
#

got damn!!!!

cursive sentinel
#

is it possible to set a sell value indedently from the cost?

#

like to make a joker's sell value to absolute zero and not changeable

thin anchor
#

well that would be one cold joker if its absolute zero!

#

ha... ha...

runic pecan
#

How to know the hand type of the last played hand of round under context.end_of_round and context.repetition?

cursive sentinel
#
            self.ability.extra_value = 0
            self:set_cost()
            ease_dollars(-G.GAME.dollars, true)
        end```

it tried this but it crashes on sell
cursive sentinel
#

what is it?

runic pecan
#

Would the game crash if return {repetitions = 0, ...} under context.repetition?
If not crash, would message still pop up even when repetition is 0?

runic pecan
# cursive sentinel what is it?

A mod that messes with how numbers were stored in game such that big numbers can go even bigger, yet in the meantime introduces a couple of other issues include but not limited to attempts at comparing numbers with tables.

dapper sun
#

how do i make a joker that gives chips and mult give 2 messages?

long urchin
#

how do i get seperate joker files to work on mac?

#

i tried copypasting some code and its experiencing issues so i think i should just rebuild from the ground up

daring fern
unborn bay
#

the extra table ,,,,

runic pecan
#

TIL that under if context.repetition ... if your return table doesn't have card = ... the game will crash.

wintry solar
#

This sounds unintended

long urchin
#

does anyone know how to set up files for separate jokers?

cursive sentinel
faint yacht
#

self > card?

cursive sentinel
#

yes

#

used the context of cola and invis

daring fern
cursive sentinel
#

okok

#

doesnt crash anymore but the sell value isn't bothered anymore

daring fern
cursive sentinel
#

doesnt change either when i replace extra value by cost

wintry solar
#

It’s something like sell_cost iirc

long urchin
#

It's in my code hold on I gotta boot my computer up

cursive sentinel
#

sell_cost doesnt work either

#

perhaps the issue would be me putting it into context.selling_self?

daring fern
modern kindle
#

sell_cost is definitely correct,

cursive sentinel
#

ahhh left the ability

modern kindle
#

oop, yea he got it

cursive sentinel
#

ok it works now, had to take off the self:set_cost ()

#

the animation is a bit wacky but it does work

long urchin
#

@cursive sentinel this i know works its a copy of my code
card.ability.extra_value = card.ability.extra_value + 5 card:set_cost()

#

you change the value and then update it with set_cost()

daring fern
#

Not add extra cost.

cursive sentinel
#

x)

long urchin
#

its still the same principle

#

you can just do = 0

modern kindle
#

then they can just set thre value to 0 instead of doing the addition, yea

cursive sentinel
long urchin
#

card.ability.extra_value = 0 should work

cursive sentinel
#

with self it crash

#

with card the sell value didn't change

long urchin
#

can we see the crash?

cursive sentinel
#

with the self? sure

modern kindle
#

i do this with one of my cards

card.sell_cost = to_big(0)

you can igore the to_big because thats for talisman

cursive sentinel
long urchin
cursive sentinel
#

card with extra value had no effect

long urchin
#

can i see line 402? like can you screenshot your main.lua with the line numbers

cursive sentinel
#

sell cost had though, it does work

#

it just seems to update the dollars an additional time before getting to zero

wintry solar
#

Extra value as 0 won’t change the sell cost

cursive sentinel
long urchin
#

ok sanity check: replace the context with if context.before and context.cardarea == G.jokers then

wintry solar
#

You could set it to -card.sell_cost though I think

long urchin
# wintry solar Extra value as 0 won’t change the sell cost

it does tho? this is the calculate code for my joker and it works fully as intended

    calculate = function(self,card,context)
        if context.end_of_round and context.game_over == false and context.main_eval then
            card.ability.extra.money = card.ability.extra.money - 5
            card.ability.extra_value = card.ability.extra_value + 5
            card:set_cost()
            ease_dollars(-5)
            if card.ability.extra.money <= 0 then
            
            end
        end
    end```
cursive sentinel
long urchin
#

but double check

#

see if its the code inside the context or the context itself by changing the context to one that we know works

#

because it seems everything should work, and yet it doesnt, so its something we're missing

wintry solar
#

You aren’t setting the extra value to 0 there…

#

So of course yours works

long urchin
#

ohhhh is it like scale where it doesnt like to be set as a base number and instead a change in number?

daring fern
wintry solar
#

Extr value is just added into the base cost

#

That’s why it’s extra

long urchin
#

yeah but its still changing the sell value

cursive sentinel
#

card.sell_cost = 0

#

this works

long urchin
cursive sentinel
#

but the dollars bar seems to go up and then down

#

it's a bit weird but it ends up at zero

long urchin
cursive sentinel
#

with the context i previously had

long urchin
#

ok

cursive sentinel
#

context.selling_self

long urchin
#

or do you have another way to record?

cursive sentinel
#

i can, 2sec

thin anchor
#

how would i destroy cards?

wintry solar
#

What’s the actual intended effect?

thin anchor
#

for it to destroy all played cards

daring fern
thin anchor
#

cheers

wintry solar
#

It will destroy every card you have otherwise

thin anchor
#

even better!

cursive sentinel
#

i suspect the additional effect is due to the sell cost modified which must have its own sounds

thin anchor
#

lol /j

tall apex
#

is there a context for the current atlas of a card?

#

or should i make an atlas with two sprites if i want them to swap

long urchin
# cursive sentinel

i didnt know you were changing the dollar number i thought it was just the sell value

#

or is that unintentional

cursive sentinel
#

it comes after

#

if context.selling_self then

        card.sell_cost = 0

        if G.GAME.dollars ~= 0 then
            ease_dollars(-G.GAME.dollars, true)
        end
    end
cursive sentinel
#

basically a sell joker with same counterparts as wraith spectral

tall apex
long urchin
daring fern
tall apex
cursive sentinel
#

it can make it up to 0

#

if you're in negative

modern kindle
#

just having an extra sprite isnt that bad, its a pretty easy swap

zealous glen
cursive sentinel
long urchin
cursive sentinel
#

will try

tall apex
long urchin
#

ideally the ui says its 0

zealous glen
#

It’s not magic

modern kindle
#

hi vic :D

zealous glen
#

Hello dilly

daring fern
modern kindle
#

i hope you are well this fine thursday

zealous glen
#

Could be better

tall apex
#

OH SO I MAKE IT NOT IN THE RETURN

cursive sentinel
wintry solar
thin anchor
cursive sentinel
#

it's not too bad,,, thank you all for your help!! very kind!

wintry solar
thin anchor
#

yes

tall apex
#

damn i thought i had it

wintry solar
#

Just do if context.destroying_card then

thin anchor
#

k

tall apex
#

ill try this another day ig

long urchin
modern kindle
# tall apex

it would just be easier to add another sprite to the same atlas and change it that way, idk why youre doin all this

thin anchor
#

so like this?

long urchin
#

cuz it does the sell which does the sound, and then activates everything under context.selling_self which eases dollars and that makes a sound

tall apex
#

would i change it using pos?

daring fern
red flower
thin anchor
#

eep

long urchin
#

still worth a try tho

thin anchor
#

i am so ignorant

red flower
#

i hate extra_value, i just made a lovely patch to set_cost so i could set it directly

cursive sentinel
#

and im not sure of it working that much on negative dollar values

long urchin
#

hm

analog spoke
#

how do you add hyperoperational mult? I've got talisman in here

long urchin
#

i dont know then thats really strange

modern kindle
# tall apex would i change it using pos?
 local desiredx, desiredy = 1, 1 -- sets new points of atlas for new texture on neglection.
            if card.children and card.children.center then
                card.children.center:set_sprite_pos({ x = desiredx, y = desiredy })
            else
                print("Error: Unable to update Tamagotchi sprite.")
            end

i do this for mine,m uses the sme atlas and uses desired x/y for the new pos

i did just realize however the atlas doesnt save if you leave and re-enter the run so ill need to do a check for that eventually

i just threw this in where i set my card to be debuffed

cursive sentinel
#

ill keep what i have for now and move on the next i planned,,, thank you a lot

thin anchor
daring fern
daring fern
wintry solar
wintry solar
#

Just the if statement I gave you

#

Nothing else

long urchin
#

thats complex

tall apex
modern kindle
#

then set the context and put that in there

analog spoke