#💻・modding-dev

1 messages · Page 558 of 1

silent root
#

Thank you

charred widget
#

ok all it's doing is putting a red seal on the joker

pseudo radish
#

how to unlock one challenge if another specific challenge was unlocked?

thorn basin
#

well, it works now but why the dirt card sprite is still applied after the cards are flipped?
do I have to manually set the other enhancement sprite?

silent root
#

I don't even know how to code lol, I hope I'll get it

daring fern
thorn basin
daring fern
thorn basin
#

alright, thx!

lament agate
#

whats the fix of mods not showing up in mod menu again

red flower
#

make your json well?

long urchin
red flower
obtuse silo
#

can you make a boss_colour a gradient?

silent root
#

So I follow the instructions but the open workspace settings doesn't show up in vscode

slim ferry
#

you can also just create/open a settings.json file in the .vscode folder of your mod

silent root
#

I want to make my own mod but I don't even understand you rmessage :<

#

in the .vscode folder of your mod

this part in fact

slim ferry
#

you can make it if it doesnt exist yet, vscode automatically creates it for workspaces to store workspace-specific settings

#

the .vscode folder

silent root
#

just a folder named .vscode ?

slim ferry
#

yeah

silent root
#

Alright thank you

hollow horizon
#

Does anyone know why my custom poker hand doesn't work? I wanted to make a hand that consits of 5 custom suits, just like a flush, but the game sees it as a generic flush

slim ferry
#

where does it appear on the hands list?

hollow horizon
#

Above flush

chrome widget
#

Huh, is the slow mode still here as a precaution?

slim ferry
#

when did it even get added

#

and also why

frosty dock
#

a mod pinged everyone, that's what happened

silent root
#

the classic

frosty dock
#

not sure why it spilled to modding chats

slim ferry
#

idk why the slowmode would even be needed outside the channel with the ping since thats where the people will be

chrome widget
#

I think it's just that in general we've Alerted The Horde so now there's a hundred thousand people all of a sudden with eyes on a server likely to message at once, many of whom may have forgotten they were even in here at all

#

Upside is that every time an everyone ping happens in a bit server, like hundreds of people who hadn't been active in months realize they're still here and leave the server

slim ferry
#

fair point

obtuse silo
#

my blinds don't show up in the collection

chrome widget
#

Do they have localization entries in a localization file?

obtuse silo
chrome widget
#

Also if you're declaring "boss", you need to also redeclare the min and max ante

#

Since they optional ones are entirely cleared if you replace the default

#

....I think

slim ferry
#

min and max are optional for showdowns

chrome widget
#

Oh then yeah ignore me

slim ferry
#

showdown blinds are a little funny and just ignore min for some reason

obtuse silo
#

no wait
i forgot that i haven't asserted the file with these

chrome widget
#

Oop! That's it then

thorn basin
#

How can I make the joker create a booster pack at the end of the round?
(right after the game gives you money and before entering the shop.

obtuse silo
red flower
#

blinds need an animation atlas

obtuse silo
#

i see

thorn basin
#

like... it creates the booster pack and shows the results at the same time making it a mess

silent root
#

For someone who doesn't know any code, how hard do you peeps think it would be to code a mod to keep things such as special cards and jokers from oen run to the other

wispy falcon
#

Is there a way to detect what sprite pos the card uses right now?

wintry solar
#

card.children.center.pos iirc

wispy falcon
plain ember
#

what's the .center property?

slim ferry
#

as in, card.config.center or?

plain ember
#

card.center i think

#

i've seen it a lot in the wiki, but not good references of what is it

slim ferry
#

as far as i know card.center isnt a thing

wispy falcon
plain ember
#

I mean, its something related to that

#

like the card.config.center

slim ferry
#

card.config.center contains all the information related to the center in G.P_CENTERS such as rarity, key, and like probably a bunch of other stuff that i dont know because i never needed them

plain ember
#

or this: card.children.center.pos

slim ferry
#

card.children is related to like rendering and stuff afaik

plain ember
#

That's why i'm confused lmao

daring fern
wispy falcon
daring fern
wispy falcon
#

I want to change the sprite of my joker when it's effect is starting and stop when it's back on the x = 0, y = 0 of the spritesheet. Normally I'd use math.floor(G.TIMERS.REAL * 10) % 7 but that doesn't stop

daring fern
unkempt thicket
#

How do you make an object appear more often in pool?

thorn basin
#

I just created a boss blind with all the requirements and the game crashes for some reason:
how can I fix this?

wintry solar
#

Alternatively wait for official support

unkempt thicket
#

Ill do that for now, thanks

long urchin
#

whats the command to add a floaty thingy like the legendaries or hologram to a card

#

i forgort....

thorn basin
long urchin
#

ty

frosty rampart
#

as per #1406740128231194644, i'd like to be able to create a single Sprite object that i can re-adjust its atlas.image property during a DrawStep (if i create the sprite within the DrawStep, the game shits itself and fps drops a ton). however, creating a sprite object just in a file that's loaded at boot crashes the game on startup, because the dummy atlas i'm passing to it doesn't actually exist (fully?) yet. how can i. do this

long urchin
#

whats the context for defeating a boss blind? would it be end_of_round and whatever the boss blind context is or something else?

frosty rampart
#

if context.end_of_round and G.GAME.blind.boss then
it's not a context, G.GAME.blind.boss is just true during a boss blind

daring fern
long urchin
#

ah thanks

frosty rampart
#

i sure do wish it was documented

long urchin
#

i felt like it had to be one since like

#

hit the road and campfire exist

red flower
#

no its an smods one

long urchin
#

oh lol

frosty rampart
#

fuck

dreamy lodge
#

How do I make a joker have an effect right before scoring? what is the context for it?

rotund sable
#

you can see most of the context in the wiki

dreamy lodge
#

thx

candid prism
#

what causes this usually (i took out talisman and this still happened)

red flower
#

pls post whole log

candid prism
#

kk hold on

red flower
#

something is passing a string instead of a table for a joker description

long urchin
#

what are the parameters of the copy_card function?

candid prism
#

my code fucky as always

daring fern
long urchin
# long urchin what are the parameters of the copy_card function?

im trying to make a card that creates 2 negative copies of a card and so im looking at the code for ankh. the way it does this is by selecting a card from the joker area as the variable 'chosen_joker' then doing local card = copy_card(params) and card:add_to_deck().

#

is this how i go about doing that :?

daring fern
long urchin
#

well but id just replace that with nil and add card:set_edition({negative = true}, true) before card:add_to_deck()

#

im mainly asking if this is the current up to date way to do this since i know smods does streamline some methods

#

tis the problem with referencing code from the base game

#

whats the code for a joker? like, if i wanted to exclude a specific joker from a for k, v in pairs function what would that be?

#

card.key = 'j_joker'?

red flower
#

card.config.center_key

long urchin
#

ty

jolly pivot
#

if i wanted to use a joker to retrigger other jokers (not copy) how would i do that

#

like if a joker from the list activates, retrigger it

frosty rampart
#

first, you need to enable the optional feature to allow for retriggering jokers. then you can retrigger a joker by returning repetitions = [number of retriggers] during context.retrigger_joker_check

slim ferry
jolly pivot
#

icic

#

thank you

long urchin
#

why does my mod cause this error when the base game doesnt? (second image is the code for ankh i referenced, third is my code)

brave blade
#

What is the best way to create an exact copy of a card?

long urchin
brave blade
#

It's a playing card that needs to go into the deck actually

red flower
#

actually the condition is wrong

ocean sinew
red flower
#

card.config.center.key ~= "j_kj_kaito"

long urchin
red flower
gilded goblet
#

What is a "center" in Balatro? Been meaning to ask

ocean sinew
gilded goblet
frosty dock
# gilded goblet What is a "center" in Balatro? Been meaning to ask

to give a more precise answer, prototypes for properties of cards - defining the properties of jokers, consumables, enhancements, editions etc. It's not quite consistent what is or isn't a center, some prototypes (like for blinds) are defined in the same way but are not considered centers by the game

obtuse silo
#

would this check if a selected card is debuffed?

long urchin
frosty dock
#

being the main ability is the closest consistent answer you can get, but it's not quite correct either

long urchin
#

I haven't read a thing, just got other people to do stuff for me!

frosty dock
#

enhancements and editions are centers, while seals aren't

red flower
slim ferry
#

also editions are a bit wierd

#

because they can actually be applied to cards without replacing the existing center, unlike enhancements

long urchin
#

Editions and enhancements change the card at the core while seals add things on top

red flower
#

what about backs

slim ferry
#

editions also just add something on top

frosty dock
#

there's no deeper reasoning behind that, all there is to that is that there was only one seal in the beginning - so thunk didn't need to prototype them to start

wispy falcon
#

Is it possible to make it, so that I don't always have to make this 'window' when I do this but rather switch the person depending on the card it is shown next to?

                name = "Idea:",
                text = {
                    "{C:purple}Person"
                },
            },
long urchin
slim ferry
#

as in #1#, etc

frosty dock
frosty rampart
#

editions are shaders applied directly to both card.children.center and card.children.front

long urchin
#

yeah but we're thinking in literal terms :b

#

balatro cards are also not printed

frosty rampart
gilded goblet
red flower
#

seals

gilded goblet
#

Fair enough

slim ferry
#

i mean regardless theres no deeper meaning behind whats a center and isnt

wispy falcon
frosty dock
slim ferry
#

garbshit for example does (left image) in the localization, and enters the variables for the description in the loc_vars (right image)

frosty dock
#

Being a center is defined by being stored in a table called G.P_CENTERS

#

seals have their own table G.P_SEALS

jolly pivot
#

huh i sure wonder why my code isnt working

slim ferry
#

"guys why isnt my code working"

looks inside
like 10x10 pixel screenshot at most

jolly pivot
#

dude

#

💔

#

read the screenshot

slim ferry
#

oh

#

lmfao

#

calcute 🔥

wispy falcon
gilded goblet
#

I hate when that happens

versed swan
slim ferry
#

lua language servers when there is no possible way a given value is nil: need check nil 😡

long urchin
# red flower `card.config.center.key ~= "j_kj_kaito"`

ok so i did that and now when i get to the context this crash happens :?

        if context.beat_boss and context.game_over == false then
            local dupeable_jokers = {}
            for k, v in pairs(G.jokers.cards) do
                if card.config.center.key ~= "j_kj_kaito" then dupeable_jokers[#dupeable_jokers + 1] = v end
            end
            local card = copy_card(pseudorandom_element(dupeable_jokers, pseudoseed('kaito_choice')), nil)
            card:set_edition({negative = true}, true)
            card:start_materialize()
            card:add_to_deck()
            G.jokers:emplace(card)
            card:add_to_deck()
            G.jokers:emplace(card)
        end```
red flower
#

its better if you post the logs in full

slim ferry
#

why are you doing emplace and add_to_deck twice

long urchin
#

cuz theres 2 cards :V

slim ferry
#

oh

red flower
#

youre only copying one

long urchin
#

ik

#

it makes two copies of the same card

red flower
#

no it doesnt

long urchin
#

?

red flower
#

thats what we're saying

slim ferry
#

you need to create two cards

long urchin
#

ohhh

slim ferry
#

you cant just do emplace and add_to_deck twice on one card

#

also dont call it card, since that already exists in the function's arguments

#

could do wierd shit

unborn smelt
#

does anyone here know if you have to submit your mod somewhere to add it to bmm?

red flower
#

it should be v.config.center.key ~= "j_kj_kaito"

long urchin
#

i thought thats what im supposed to do, im just mainly copying code from the ankh card

red flower
slim ferry
#

i mean

#

i dont think ankh uses the regular card parameter anywhere

#

though generally overriding function arguments isnt needed anyway

fair osprey
#

Is this is a good way to select two random cards from the scoring hand? It seems like the destruction table always is nil

slim ferry
#

you should use a local variable to store the cards to destroy, game does not like storing objects in card ability tables

#

also use context.destroy_cards if you want to destroy played cards

red flower
#

also dont shuffle the scoring hand or you might mess up other effects

#

try pseudorandom_element to pick a random card

fair osprey
#

pretty new to this

long urchin
# slim ferry i dont think ankh uses the regular card parameter anywhere
    if self.ability.name == 'Ankh' then 
        --Need to check for edgecases - if there are max Jokers and all are eternal OR there is a max of 1 joker this isn't possible already
        --If there are max Jokers and exactly 1 is not eternal, that joker cannot be the one selected
        --otherwise, the selected joker can be totally random and all other non-eternal jokers can be removed
        local deletable_jokers = {}
        for k, v in pairs(G.jokers.cards) do
            if not v.ability.eternal then deletable_jokers[#deletable_jokers + 1] = v end
        end
        local chosen_joker = pseudorandom_element(G.jokers.cards, pseudoseed('ankh_choice'))
        local _first_dissolve = nil
        G.E_MANAGER:add_event(Event({trigger = 'before', delay = 0.75, func = function()
            for k, v in pairs(deletable_jokers) do
                if v ~= chosen_joker then 
                    v:start_dissolve(nil, _first_dissolve)
                    _first_dissolve = true
                end
            end
            return true end }))
        G.E_MANAGER:add_event(Event({trigger = 'before', delay = 0.4, func = function()
            local card = copy_card(chosen_joker, nil, nil, nil, chosen_joker.edition and chosen_joker.edition.negative)
            card:start_materialize()
            card:add_to_deck()
            if card.edition and card.edition.negative then
                card:set_edition(nil, true)
            end
            G.jokers:emplace(card)
            return true end }))
    end```
slim ferry
#

oh this is vanilla code

#

you should generally always use vanillaremade for reference over vanilla code since vanilla code is a little funky sometimesx

long urchin
#

where would i aquire such vanillaremade code

brave blade
red flower
#

thats me

slim ferry
#

thanks N for making vanillaremade

red flower
#

❤️

dreamy thunder
#

N is so goated

red flower
#

the spectrals are astra tho

long urchin
#

alr coolio ill just rewrite it using vanillaremade as a base

red flower
#

<@&1133519078540185692>

long urchin
#

gayyyy

#

fake and gay

slim ferry
#

alive but gay

#

anyone got that thumbnail

obtuse silo
#

are the cards in you played hand considered "highlighted"?

obtuse silo
#

i wanna create a boss blind that destroys the cards left in hand when you play a hand

slim ferry
#

the played cards are in an entirely different area

red flower
#

that but in context.press_play, which is where you should probably do this, they are in G.hand.highlighted

obtuse silo
#

alr
so
if i pass an additional check that determines if the card is part of the hand then that should work?

red flower
#

depends on what the check looks like lol

obtuse silo
#

okay
so
my idea is to check the card against the highlighted hand
if the card is found in the highlighted hand, it shouldn't get cut

sonic cedar
#

i return with another puzzle
card.ability.extra.repetitions is set to 2, yet by the end of a single round that function is called as if it is equal to 0, when it should actually be set to 1
why is this?

slim ferry
#

add a context.main_eval check to the end of round check

sonic cedar
#

wsa just about to ask that lmao

#

ty eris

long urchin
#

how would i add a special variable to a copied card so that i can keep track of it for something else?

sonic cedar
#

-# omg maxx hiiiii

obtuse silo
long urchin
#

the negatives im copying are supposed to be temporary, so my thought process is to create them with a specific variable, then when the timers up i check for the variable and delete all cards with that variable

long urchin
slim ferry
#

you can set perishable rounds to any value

long urchin
#

oh what

sonic cedar
#

oh wow really

#

sick

long urchin
#

hm. can i make something perishable without having the perishable sticker? i kinda dont like the visual itd have

slim ferry
#

i dont think you could

long urchin
#

beh

slim ferry
#

you could make like an invisible sticker with a similar effect

obtuse silo
slim ferry
#

also stickers can have configs now so that makes it even easier

long urchin
#

that could work but seems like over-making a solution. couldnt i just like give the card a variable and then do a check in a context and destroy the cards with the variable

slim ferry
#

you could definitely do that

sonic cedar
#

i literally do that (granted it's not for destruction but i have to do it in cases)

long urchin
#

yea

slim ferry
#

though you should check for that in a global mod calculate so it still works if the associated card doesnt exist

long urchin
#

thats a good point

#

how do i do those

slim ferry
#

SMODS.current_mod.calculate = function(self, context)

#

and then its just the same as any other calculate

long urchin
#

gotcha

#

ok so how do i append custom variables onto cards

red flower
#

card.ability.custom_variable

long urchin
#

bet thanx

#

im a little slow how do i implement that

slim ferry
#

card.ability.custom_variable = some value

#

well its card2/card1 in this case

long urchin
#

gotcha

rotund sable
#

With the set_edition

long urchin
#

ik i was just in the process of doing it when i took the screenshot

rotund sable
#

Just making sure

urban yew
#

off topic: I've started "modding" a couple of days ago by tweaking the game.lua file. assuming I make a mod I want to share, what's SOP for modding? I'm guessing directly modifying game.lua isn't the way

red flower
#

yeah you should make a lovely or smods mod

urban yew
#

cool thanks!

long urchin
#

how do you destroy a card?

slim ferry
#

theres quite a few ways:
returning remove = true in context.discard/destroy_cards (playing card only)
SMODS.destroy_cards (generally cant go wrong with this one)
Card:start_dissolve (generic dissolve anim)

#

and theres Card:remove ig but that is just no animations it just vanishes

dreamy lodge
#

how does one change handsize 🗿

errant arrow
#

I feel like I've asked this before, but I forgot and can't access my other jokers at the moment...

What was the context for the end of a round?

#

was it just context.end_of_round

slim ferry
slim ferry
long urchin
#

am i just stupid or like

errant arrow
#

kk, thanks

slim ferry
long urchin
#

yeah i am lol

dreamy lodge
dreamy thunder
#

I cant type fast in mobile

#

Dang it

red flower
#

the bottom part works to add a copy of a card to the hand before scoring
does anyone know how to make it add it to the last position instead of the front of the area?

chrome widget
#

Uhhh how can I double sprite resolution within the same dimensions?

dreamy lodge
slim ferry
#

can i see the entire code

chrome widget
#

Oh right this is what display_size is for methonks

dreamy lodge
slim ferry
#

where in the joker

dreamy lodge
#

just in it

slim ferry
#

yeah but

#

?

#

just show the code vro

#

this doesnt really help

#

like yeah i get that its in the joker

dreamy lodge
#

I just put it in the joker

#

thats it

slim ferry
#

can i see

#

more than 1 line

#

please

dreamy lodge
#

none of the surronding code is related to it though

slim ferry
#

just

cursive gazelle
#

Wdym 😭

slim ferry
#

why cant you just screenshot the whole joker man

#

this is like absolute peak of shitty screenshots in modding-dev

cursive gazelle
slim ferry
#

okay actually the one thing i can make out from this is the comma after tha function

#

which like idk what that implies but i dont think its good

#

also why didnt you like

#

look at vanillaremade stuntman or smth before any of this

dreamy lodge
dreamy lodge
dreamy lodge
slim ferry
#

well i could BARELY tell

dreamy lodge
#

I literally just put that line in the joker by itself mr_bones

slim ferry
#

only the comma let me see the issue

slim ferry
#

because that tells me you just... put it as a parameter in the joker

cursive gazelle
#

You should add it to add_to_deck

#

Placing it randomly in the code does nothing and will ultimately crash your game because it’s not a know parameter

dreamy lodge
#

shouldnt it be remove_from_deck since I want to lower hand size?

dreamy lodge
cursive gazelle
#

No

#

You want it to be add_to_deck

#

To lower handsize

#

And add handsize back in remove

#

Just like how stuntman works

dreamy lodge
#

interesting

#

Thanks for the help even though I'm el stupido

dreamy lodge
rotund sable
#

The best kind of feeling Is when you figure something out without asking in modding dev 🔥

red flower
#

i just asked something and then figured it out immediately does it count

timid zinc
#

wrong chat

chrome widget
#

My body is a machine that turns sprite art into shader effect (I already did this joke sorry)

chrome widget
#

my body, or.......?

cursive gazelle
#

What

#

No

#

The shader code

#

😭

chrome widget
#

Which one

cursive gazelle
#

The flame one

#

Is this with love graphics ?

chrome widget
#

Ye

cursive gazelle
#

The display

chrome widget
#

Can't really give it to you, not because I can't show the code to you, but because it's fairly specific so I doubt it would be an easily portable solution to use elsewhere

cursive gazelle
#

Can i see how you draw it behind the joker at least?

#

Oh thanks

chrome widget
#

These are the textures used for it

cursive gazelle
#

Oh i see

versed swan
#

you can import textures into shaders?

cursive gazelle
#

What about the love.graphics implementation?

#

Are you hooking this to the hover ?

rapid stag
#

2

rotund sable
#

worst thing about ui code in balatro is maintenance

chrome widget
#

Basically, I have this whole DrawStep that handles the auras, which are "queued" to play for a certain amount of time. In the collection, there's a centralized hover value that queues an aura on an item that's given 0 duration, which means it doesn't cancel itself until it's manually removed

---------------------------
--------------------------- For stand auras in the collection
---------------------------

local ref_card_hover = Card.hover
function Card:hover(...)
    if ArrowAPI.col_stand_hover and ArrowAPI.col_stand_hover ~= self then
        ArrowAPI.col_stand_hover.ability.aura_flare_queued = nil
        ArrowAPI.col_stand_hover.ability.stand_activated = nil
        ArrowAPI.col_stand_hover = nil
    end

    if self.ability.aura_hover or (self.area and (self.area.config.collection or self.area == G.pack_cards) and self.ability.set == 'Stand') then
        ArrowAPI.col_stand_hover = self
        self.ability.aura_flare_queued = true
    end

    local ret = ref_card_hover(self, ...)
    if self.facing == 'back' and self.area and self.area == G.deck and (not self.states.drag.is or G.CONTROLLER.HID.touch)
    and not self.no_ui and not G.debug_tooltip_toggle and G.GAME.selected_back.effect.center.artist then
        self.config.h_popup = G.UIDEF.deck_artist_popup(G.GAME.selected_back.effect.center)
        self.config.h_popup_config = {align = 'cl', offset = {x=-0.1, y=0}, parent = self}
        Node.hover(self)
    end

    return ret
end

local ref_card_stop_hover = Card.stop_hover
function Card:stop_hover()
    if self.ability.aura_hover or (self.area and (self.area.config.collection or self.area == G.pack_cards) and self.ability.set == 'Stand') then
        self.ability.aura_flare_queued = nil
        self.ability.stand_activated = nil
    end

    return ref_card_stop_hover(self)
end

function love.focus(f)
    if not f then return end

    if ArrowAPI.col_stand_hover then
        ArrowAPI.col_stand_hover.ability.aura_flare_queued = nil
        ArrowAPI.col_stand_hover.ability.stand_activated = nil
        ArrowAPI.col_stand_hover = nil
    end
end
#

Sorry for big code block

cursive gazelle
#

No worries

#

Than you so much

chrome widget
#

Like yeah the code's all here, it's not a trade secret or anything, I would just struggle in your position to modify it........ especially since I didn't comment it much

wintry solar
#

winter is a shader wizard

rotund sable
robust marsh
cursive gazelle
#

I love doing minigames in a game like it’s a game engine

rotund sable
#

i have 3 atm 👀

modern kindle
chrome widget
# chrome widget These are the textures used for it

I think this is the implementation I built mine off, it's based on a really old technique that can be done in older graphics hardware. Basically, it goes like this:

  • using the texture coords, look up the r value on the noise texture (amount of black, essentially)
  • you "scroll" the noise texture vertically by adding a time value to tex_coords.y
  • aftewrwards, determine an alpha values for the edges of the flame effect by subtracting the alpha of neighboring pixels
  • "step" along the gradient's r values using the random noise value. This is what creates your flame effect
  • you can step multiple times to give multiple distinct sections of flame color (like yellow -> orange -> red), though I only use two colors for mine
#

There was some other resource I used for the "spread" thing that kind of pulls it into a ball but I can't find it

rotund sable
modern kindle
#

few days ago

rotund sable
#

yay i was first

modern kindle
#

recorded and implemented are 2 different things

rotund sable
#

-# hopefully

#

shit

#

no ideas are unique

modern kindle
rotund sable
wintry solar
modern kindle
#

hi eremel!

#

the ai beats my ass in battleship but its fun

wintry solar
#

hi dilly!

vernal path
#

How does create_card() work? Is the second to last argument expecting a key? or a name? Or does it like, ignore that if you give it a set

chrome widget
#

I've used a lot of Godot shader references

wintry solar
#

did you program the ai or borrow it from somewhere

modern kindle
#

i did the ai

i was initially going to try and use this fuckin lua battleship thing i found but i couldnt really figure out their shit so i did my own

wintry solar
#

nice

modern kindle
#

it also places its own ships depending on strategy it chooses and hunts for ships based on size

#

so itll only make shots if for instance the cruiser can be there (meaning 4 squares)

#

and then goes down depending on whats left

wintry solar
#

I am guessing it takes it's shots somewhat randomly until it finds a ship rahter than on a sequential pattern?

long sun
#

how can I check if a hand has any unscoring cards?

wintry solar
modern kindle
long sun
#

can i do something similar in Blind:debuff_hand?

wintry solar
long sun
#

gotcha :D thanks

vernal path
#

I feel dumb
how do you get the key of context.consumeable in context.using_consumeable?

#

like, context.consumeable.key is nil and also context.consumeable.ability.key is also nil?

modern kindle
wintry solar
#

context.consumeable.config.center_key

rotund sable
bold sleet
rotund sable
#

idk what opponent would be in snake

vernal path
#

yeah lol that was snake

modern kindle
modern kindle
rotund sable
#

i mean it kinda looked like battleships (with the boxes)

modern kindle
#

yea thats what i thought you had lmfao

#

but nah your snake prob looks better than mine admittedly

#

i think my battleship looks great though

bold sleet
#

(and very cool)

vernal path
modern kindle
#

dont worry im ass at it myself

#

i didnt want any of the filters and stuff because i felt it messed with readability

bold sleet
#

I can feel that raw love.graphics

vernal path
#

make it kinda look like a text-mode game for cp/m computers of the '80s

modern kindle
#

thats why i settled for a black background witht he grid over it

vernal path
final zealot
#

im working on a menu where you can choose a joker but i dont know how to make the jokers clickeble and how would i put it in my joker slots?

function joker_menu()
return {
n = G.UIT.ROOT,
config = {r = 0.1, minw = 8, minh = 6, align = "tm", padding = 0.2, colour = G.C.BLACK},
nodes = {
{n = G.UIT.C, config = {minw=4, minh=1, colour = G.C.MONEY, padding = 0.15}, nodes = {
{n = G.UIT.R, config = {minw=4, minh=4, colour = G.C.MONEY, padding = 0.15}, nodes = {
{n = G.UIT.T, config={text = "Choose a joker", colour = G.C.UI.TEXT_LIGHT, scale = 0.7}},
}},
{n = G.UIT.R, config = {minw=4, minh=4, colour = G.C.MONEY, padding = 0.15}, nodes = {
-- card
{n = G.UIT.O, config = {object = create_card("Joker", G.jokers, nil, 1, nil, nil)}},
-- card
{n = G.UIT.O, config = {object = create_card("Joker", G.jokers, nil, 1, nil, nil)}},
-- card
{n = G.UIT.O, config = {object = create_card("Joker", G.jokers, nil, 1, nil, nil)}},
}},
{n = G.UIT.R, config={button="my_button_click", padding=0.05}, nodes={
{n = G.UIT.T, config={text="Click Me!", colour=G.C.UI.TEXT_LIGHT, scale=0.5}},
}},
}},
}
}
end

bold sleet
#

You probably want to hook Card.click

#

I think that's the function name.

#

or something similar

bold sleet
long sun
#

so my Boss is mostly working, but when selecting a hand, it always says it won't score, even if it does

#

i assume i need to determine if the hand will contain an unscoring card before playing it, but how?

bold sleet
#

How is this boss of yours meant to work?

#

-# litol ghost™

long sun
#

hands containing unscoring cards don't score :3

bold sleet
#

mmm

long sun
#

i know there's a boss in Ortalab that does the same thing, but i didn't intend for that :3 tis parallel thinking

rotund sable
#

there

bold sleet
#

Maybe the issue is it checking even before you play the hand, idk

#

Maybe more context conditionals can do the trick..?

#

I don't really know.

jolly shadow
#

like, the function

#

i feel like that'd fix the whole visual side of things, personally i woulda only went for calculate when debuffing a hand using a joker or the like

wintry solar
#

calculate is fine it just won't have the scoring hand stuff available iirc

#

just look at the ortalab one and rip the condition out

jolly shadow
#

thats why im saying it might be better to use debuff_hand

wintry solar
#

the condition is absolutely the issue

jolly shadow
wintry solar
#

the calculate does the same thing

jolly shadow
#

am i missing something here? like ive reread their message several times
unless theres a misunderstanding there

wintry solar
#

the condition is wrong

jolly shadow
#

they do the same thing

#

checks scoring cards count vs total cards count

plain ember
#

Does somebody know how can i add a "Take" Button below the use?

jolly shadow
plain ember
#

I tried, i havent found anything yet

jolly shadow
#

ill help look then

slim ferry
jolly shadow
#

oh thats a thing?

#

oops ^^

wintry solar
#

if you want use and take you'll have to patch in your own button

slim ferry
#

select_card = "consumeables" would pull them consumables i think

plain ember
modern kindle
ocean sinew
#

Very cool though btw

modern kindle
long sun
modern kindle
#

i am doing neither of these things

jolly shadow
ocean sinew
#

Oh I thought you were cuz it said "play battleship against (prohibited word)"

long sun
jolly shadow
#

nor does the ortalab solution

modern kindle
#

but @exotic hedge can i get some clarification if this context is okay?
the context is the battleship gamemode i have implemented for a blind has its own 'ai' which plays against you
it does not train through balatro mods or balatro itself, it just is a form of intelligence that is facing you

long sun
#

i'd do what ortalab does, with the debuff_hand function and all, but i don't trust it, with the always-scoring check and all that

#

i'd rather directly check the hand itself

#

which i suppose it does too but whatev

jolly shadow
iron steeple
#

wouldnt be surprised if the rule applied specifically to gen ai or ai that uses models to train in general, where a basic battleship ai with heuristics doesnt really apply

long sun
ocean sinew
jolly shadow
modern kindle
long sun
#

ya i looked through the vanilla game

#

couldn't find it

wintry solar
#

oh I know what it is

#

your calculate function has too m any arguments

ocean sinew
bold sleet
wintry solar
#

blidns are just calculate = function(self, context) iirc

long sun
#

oh :D! will try

bold sleet
#

Issues arise only when the context starts going into that direction.

wintry solar
#

dilly you are fine dont worry

jolly shadow
long sun
#

ah okie

ocean sinew
long sun
#

i didn't look in that file

wintry solar
long sun
#

👍

#

i haven't changed it since then

modern kindle
long sun
modern kindle
#

smh you didnt tell me if that looked better to you mr jogla

long sun
#

i can fix dw

wintry solar
#

wait maybe I am wrong

jolly shadow
# long sun

(self, blind, context) probably correct then if this only happened after the fact

wintry solar
#

I am sleepy T_T

bold sleet
#

It looks nicer.

#

A lot nicer.

modern kindle
#

awesome

ocean sinew
#

That blind is hell

long sun
#

right

ocean sinew
#

Idk how to play battleship

modern kindle
#

and shocker, i lose alot here too lmao

bold sleet
#

You would probably beat me lol

wintry solar
#

I am just bad at reading today lol

#

GhostSalt, what's exactly the issue?

ocean sinew
long sun
#

the blind works, except before the hand is played

#

it evaluates every hand as not-going-to-score

#

even though they sometimes do score

jolly shadow
# long sun the blind works, except before the hand is played

id say it wouldnt hurt to try this in your blind, substitute calculate for this and see if it works as intended

debuff_hand = function(self, cards, hand, handname, check)
    local _, _, _, scoring_hand, _ = G.FUNCS.get_poker_hand_info(cards)

    local always_scores_count = 0;
    for _, card in pairs(cards) do
        if card.config.center.always_scores then always_scores_count = always_scores_count + 1 end
    end

    if #scoring_hand + always_scores_count ~= #cards then return true end
end
long sun
#

ya i have no doubt that works

#

that's Ortalab's code

jolly shadow
#

yea

clear acorn
#

Balancing question, for common joker that gains chips after you beat a boss blind, how many chips would make it a useful joker without straying into uncommon joker levels of strong?

#

I was thinking +50 chips per boss beaten

long sun
#

i wanna avoid the always_scores thing though

#

bah nevermind, i can't be arsed 😭

vernal path
# modern kindle while not perfect, does this look better to you?

tbh i think that my main criticism is that it's too small. Like, 14x14? I feel like 10x10 is much more common a board size, and making the board smaller means you can increase the scale of the board. This would improve the readability a lot, and so you might be able to add better "graphics" (I still think a "text mode" esque graphical simulation would look great, and would go great with balatro's sort of "video poker" styling well)

wintry solar
#

hmmm

frosty dock
#

i had a bit of a look at the quantum ranks PR

#

and uh

wintry solar
#

there is an issue here in that the scoring hand isn't being passed through

vernal path
frosty dock
#

im not quite sure yet what's going on with straights

jolly shadow
#

is there a way to get the full scoring hand (accounting for splash) without a context?

ocean sinew
frosty dock
#

and I also have some API design complaints

frosty dock
#

but it's quite the thing

modern kindle
frosty dock
# red flower sad

meaning I haven't taken the time to try to understand what exactly they did with straights

vernal path
wintry solar
#

can we say quantum anything is cursed and delete quantum enhancements too? 🤞

modern kindle
#

window wise it doesnt feel small either imo

final zealot
modern kindle
#

one cell here fits like 10 or so of your cursors

wintry solar
#

oh I see the issue 😭

frosty dock
vernal path
jolly shadow
jolly shadow
frosty dock
#

i love breaking changes

modern kindle
vernal path
wintry solar
wispy falcon
modern kindle
#

so im unsure, cause theyve liked how its scaled thus far

modern kindle
wispy falcon
rotund sable
#

and i wanted to do something unique-ish

wispy falcon
vernal path
#

I mean, I think a lot of people who are willing to test unfinished things are also people to use gui scale 1 in minecraft
its just too small for a lot of people

wispy falcon
frosty dock
ocean sinew
#

Can someone do balatro in balatro

modern kindle
vernal path
#

Also, you tend to sit way closer to a laptop than to a computer monitor, so it's kinda not ideal

ocean sinew
frosty dock
#

me when os lib

modern kindle
#

it being an unfinished mod doesnt apply to testers being okay with it when i ask 'does the scaling feel fine for a release' and the answer being yes

wispy falcon
#

Quick question since I've seen it multiple times by now: What is next(Something) for and what does it do?

red flower
vernal path
#

Well you said that the CRT effect and bloom makes it harder to read, which is why it's a good idea to make it way more readable than it reasonably has to be. To make it accessible to those who need to have the CRT effect off in normal balatro. Most people could have it on, and it be fine. But if having it on for your situation makes it unreadable, then you should consider improving it.

wispy falcon
modern kindle
#

i didnt say it did, i just said i felt putting effects over text does by default impact readability
so leaving something by default without it wont end anyones run or ruin their moods

vernal path
modern kindle
#

all settings effects apply for the normal balatro, this is just a black box OVER the normal blind thing

wispy falcon
red flower
wispy falcon
red flower
vernal path
red flower
#

I would recommend brushing up on some lua tho

wintry solar
#

it would look exactly the same as with it off

#

dilly said it's drawn over the top of everything else

modern kindle
#

yes

#

im not overlayting the crt effect onto the grid because i think that would impact readability to some margin

#

and having it this way does not impact anyones runs, moods, or otherwise

#

drawing everything on top just makes the most sense

vernal path
#

Well that's what I'm saying! You said that it would affect readability, so you just completely disabled it. But then also, normal balatro is perfectly fine with the CRT but you can turn it off to make it more accessible!

#

Which means there is a problem

modern kindle
#

but its not disabled techncially, the effect exists underneath the drawing of the black box

#

its just not rendered onto the grid

vernal path
#

thats

#

thats not

#

please read the words i am saying

#

Drawing something on top instead of beneath effects is disabling it

wispy falcon
vernal path
#

There's no difference between "ignoring an effect" and "disabling it"

wispy falcon
#

How do I get the chips from one of my jokers?

twilit tundra
#

okay ive got a mega cursed joker idea where do i begin with this one

want a joker that on being sold, will “insert” another ante between this ante and the next one

say you sell it on ante 6
it’d make it so after beating the ante, you then go to ante -1 instead of 7, and then after beating ante -1 you actually go to ante 7
how the hell do i store the “next ante” for this?

the joker would already be gone as its been sold

red flower
#

you can store in a global and use the new mod object calculate for this

#

and maybe the new ante contexts

#

the global would be like G.GAME.modprefix_extra_antes = 1 or something

twilit tundra
wintry solar
#

they're a bit dodgy if mods are hooking ease ante for now

wispy falcon
rotund sable
#

What do you exactly mean by that?

#

Like how many it scored ?

wispy falcon
#

No, how many it currently is holding. I want a different joker be able to use that for something

frosty rampart
#

if you know that it's going to be that specific joker, you can literally just do [whatever card it is].ability.extra.[whatever the name of the chips parameter is]

rotund sable
#

You have to get the joker tho

#

For example using SMODS.find_card

wispy falcon
frosty rampart
#

you can access the variables in the ability table from anywhere, just like you do from within the joker itself

rotund sable
wispy falcon
#

Oh, okay

frosty rampart
#

this isn't java, there's no private/public to deal with. everything is public

wispy falcon
#

I don't know any java, I'm used to C# xD

frosty rampart
#

same deal i think (i've never touched C#, java is just the language i go to when i want to make fun of programming)

willow scroll
#

iirc C# is just microsoft flavored java

rotund sable
#

Hi MaxBoi o/

willow scroll
rotund sable
#

:clueless:

wispy falcon
modern kindle
rotund sable
red flower
#

hi dilly

rotund sable
#

Smh

modern kindle
#

hi N

willow scroll
red flower
#

im making my new mod

modern kindle
#

peasants the lot of u

modern kindle
red flower
#

no 💔

modern kindle
#

sad.....

#

whats the new mod

red flower
modern kindle
#

people out here have released multiple mods and i havent released one yet

#

hate to see it

red flower
#

i just add jokers

modern kindle
#

N slop....

red flower
#

one has a musical number

modern kindle
#

you already were music to my eyes

#

idk how it works but it does

willow scroll
#

anyhow anybody here familiar with how smods edits card:open? and its related things
im currently making a dumb silly function to open anything like its a booster pack
everything is working fine
except the shop doesnt rise back up after skipping/using a card 💀

red flower
#

you should get that checked

modern kindle
#

surely its alright

red flower
#

these ones have short descriptions

modern kindle
#

i need to multibox at some point

red flower
#

multibox is nice

sonic cedar
#

-# @daring fern when you get a chance, can you help me out with your safe_set_ability? the one you set me up with cant reach things like burglar's hand extra or chaos' reroll thing. basically theres stuff i still gotta reimplement myself and i wanna make sure thats intentional and not something being missed by the code?

red flower
#

multiline name is cool too :3

sonic cedar
modern kindle
#

you shoudl get around to eating some soup

willow scroll
red flower
#

i should get around to eating actually

#

maybe i should order something

thorn pumice
#

get mcdonalds

#

mmmmmmm i love mcdonalds

modern kindle
#

family size

red flower
modern kindle
#

my jewel osco was having buy 2 get 3 free

#

so naturally i splurged

thorn pumice
#

how what the heck

#

where do u find a deal like that

jolly shadow
#

interesting combination i will say but like 🤯

red flower
thorn pumice
#

its cool tho

red flower
#

it also switches sprites when the mult is 0

jolly shadow
#

thats cool

#

i jus hate loyalty card lmfaooo

willow scroll
red flower
#

he punching

modern kindle
#

so i need to use it much more often

willow scroll
# willow scroll like what the fuck 😭
function Card:pseudo_open()
    self.config.center = SMODS.Centers['p_arcana_normal_1']
    draw_card(self.area, G.play, 1, 'up', true, self, nil, true)
    self.config.pseudo_open = true
    self.ability.extra = 4
    self.config.center.config = {
        choose = 1
    }
    
    self:open()
    
    G.CONTROLLER.locks.use = false
    G.TAROT_INTERRUPT = nil
end

like what am i missing 😭

willow scroll
wispy falcon
#

Is there something in the wiki for joker.ability.extra.val?

red flower
#

no thats custom for each card

wispy falcon
willow scroll
#

can someone tell me what the default G.shop.alignment.offset.y is :clueless: (as in visible on screen)

#

im gonna do more jank

red flower
#

i wish my keyboard worked

#

maybe i need to clen it

#

clen

#

clean

willow scroll
#

i have an idea :clueless:

wispy falcon
red flower
#

If your joker has config = { extra = { chips = 10 } } then it would be in card.ability.extra.chips

wispy falcon
#

That much I know, I just don't know how to use joker.ability.extra.val to get that. Do I type joker.ability.extra.val(card.ability.extra.chips) for it?

red flower
#

ok, joker.ability.extra.val is not a thing per se

#

you replace val for the key you want

#

and joker for the variable that stores the joker

#

in this case joker is card and val is chips

rotund sable
#

I love when people take a random example as something super specific and needed to be copied word for word

#

Maybe I should stop giving random examples

wispy falcon
willow scroll
rotund sable
#

Clueless overuse !

wispy falcon
willow scroll
red flower
#

whatever you named it, it could be joker or x or my_cool_value

wispy falcon
#

Oh, okay. I think I get it now

thorn pumice
#

dude i am literally killking myself over making a sticker

#

it feels like it's supposed to be so simple

cursive gazelle
willow scroll
#

oh dont worry stickers are slightly evil

thorn pumice
#

using this to check for jokers / make it incompatible with something but checking using card.ability.rental just is not working even though it works here in bunco bro

#

but then checking if something is a joker with card.ability.set == "Joker" works perfectly fine

#

i'm going crazy

wispy falcon
#

Why does this just crash my game without an error?

            local _, shnack = next(SMODS.find_card("j_cstorm_shnack"))
            print(shnack.ability.extra.chips)
            SMODS.destroy_cards(shnack)
            card.ability.extra.activated = true
        end```
thorn pumice
#

infinite loop probably

willow scroll
#

unless im crazy

rotund sable
#

Mods/lovely/logs

left breach
#

how do I make an ehancement apply ^mult after exporting it without ^mult in jokerforge

red flower
left breach
#

cause I want ^mult but I'm making my mod in jokerforge

red flower
#

why am i typing the answer when i have a wiki

rotund sable
#

You need to have talisman tho

red flower
left breach
#

I export the files with no ^mult

#

then I edit n the ^mult

#

right?

rotund sable
#

Should work like that

willow scroll
#

you right

left breach
#

how do I prevent jf from overwriting my modified file

wispy falcon
rotund sable
#

Anything at all?

willow scroll
left breach
#

so I replace x_mult wth emult

#

right?

wispy falcon
rotund sable
left breach
#

huh

rotund sable
#

Calculate

left breach
#

so replace all mention of xmult here with emult?

willow scroll
wispy falcon
# rotund sable Anything at all?

The last things are literally

INFO - [G] 2025-09-04 00:57:44 :: INFO  :: TIMER :: [0021] Injected Draw Step in 0.265 ms 
INFO - [G] 2025-09-04 00:57:44 :: INFO  :: TIMER :: [0000] Injected [INTERNAL] in 1.613 ms 
INFO - [G] [DebugPlus] Press [-] to toggle console and press [shift] + [-] to toggle new log previews 
left breach
#

chat

rotund sable
rotund sable
left breach
#

alr

willow scroll
left breach
#

like this?

frosty rampart
#

well yes, but now you should also go back to the initial spot you were at and replace x_mult to emult too
card.ability.extra.[something] refers to the variables you set in the config table

left breach
#

so just replacing x_mult with emult everywhere in the file

#

like this?

rotund sable
#

Where did you take that _ from

#

Up there

left breach
#

o

#

right

willow scroll
left breach
#

thx for pointing dat out :33

frosty rampart
willow scroll
#

🤦‍♂️

left breach
#

so this is better?

willow scroll
#

my genior strikes again

exotic hedge
#

sorry for the late response

willow scroll
#

as long as your battleship ai is not powered by a LLM it is aok

left breach
#

????????

bold sleet
#

Hello. Is there a way to tell SMODS to open this UI through whatever button/function?

willow scroll
red flower
bold sleet
#

Or any tab from a given mod.

left breach
#

did not realiise that would be an issue

#

alr will do :33

wispy falcon
left breach
#

it says theres no update available tho

red flower
#

mod manager is kinda bad at this

bold sleet
#

Get it from the github repository.

left breach
red flower
left breach
#

:DDDDD

willow scroll
#

me evil function works now

bold sleet
#

Or where it is defined?

red flower
#

let me check what the menu button does

#

it's all in smods/src/ui.lua

fallow urchin
#

does anyone know the keys for seltzer and showman? they're not j_showman/j_seltzer apparently

bold sleet
# left breach :DDDDD

Nickpick and shit, but usually exponentia mult is purple and fuck I know exponentia chips. Also separate the text and the number.

fallow urchin
#

praise

willow scroll
#

they putting in crazy work over at jokerforge

#

all of them????

willow scroll
#

god bless

left breach
#

like there's a space in jokerforge

#

it just doesn't work for some reason

timid zinc
#

For some reason when seltzer self-destroys itself, it's "getting sliced"

red flower
#

yeah i think thats a new change

#

does it conflict with something

bold sleet
#

Found anythin', N'?

red flower
#

im on it

bold sleet
#

alright

#

thanks you, btw

wispy falcon
red flower
# bold sleet thanks you, btw
G.SETTINGS.paused = true
_, G.ACTIVE_MOD_UI = next(SMODS.find_mod("modid"))
SMODS.LAST_SELECTED_MOD_TAB = "config"
G.FUNCS.overlay_menu({
    definition = create_UIBox_mods(e)
})
bold sleet
#

oh!

fallow urchin
#

is there a way to set a challenge to gold stake?

bold sleet
#

What do I do with the e?

#

Put the UI I want?

red flower
#

oh you can remoe that

bold sleet
#

oh

#

ok

willow scroll
#

thats not supposed to happen

#

i can now pretend that anything is a booster pack 🔥

bold sleet
#

yum

rotund sable
wispy falcon
rotund sable
#

Would it return the cards to deck from the discard pile?

willow scroll
#

different

willow scroll
#

actually wait imm stuipid

#

one moment

#

ignore what i said for now

#

they are not in my discard pile no

warm umbra
#

im trying to make a joker that gives 2x multi on every card but decreases game speed by 0.05, but it crashes whenever it activates, can anyone help

willow scroll
#

this is the first time ive seen someone actually use freeform screenshot (if its windows)

rotund sable
#

Interesting shape for a screenshot I must say

willow scroll
#

no

warm umbra
fallow urchin
#

anyone got any ideas on how to only remove jokers from the shop but still allow them to be made by judgement/riff-raff/ etc. ? this would be for a challenge

willow scroll
#

no because the error talks about juice up for some reason

#

but lemme check whats at that smods line

fallow urchin
warm umbra
#

wait let me see if its something else other than the game speed changing

willow scroll
warm umbra
#

oh i fixed it

#

but the gamespeed is incorrect

#

huh

#

well thanks for the help

wispy falcon
rotund sable
#

If you remove the context and add a print statement I wouldn't be surprised if the log was spammed

wispy falcon
#

It is spammed by the print... But why is it an infinite loop?

dreamy thunder
#

Doesnt end of round trigger multiple times without main_eval

#

But there is a check so idk

#

Im probably wrong/

rotund sable
#

They said it closes without an error if they ommit the context.end_of_round

#

So that suggests infinite loop

#

Of some sorts

willow scroll
dreamy thunder
#

Maybe a little

willow scroll
#

do i need to use gamespeed in my delay() ?

#

or is just a number fine

wispy falcon
# rotund sable So that suggests infinite loop

But why is it infinite? I mean, I'm checking if card.ability.extra.activated == false and set it to true in that if statement, as you can see

                local _, shnack = next(SMODS.find_card("j_cstorm_shnack"))
                print("Spam?")
                card.ability.extra.mult = shnack.ability.extra.chips * card.ability.extra.multiplier
                SMODS.destroy_cards(shnack)
                card.ability.extra.activated = true
            end```
rotund sable
rotund sable
willow scroll
rotund sable
#

Did they hook delay 🥺

willow scroll
#

idk i just mod here

rotund sable
#

Same 💖

shut monolith
#

I'm trying to put a bunch of joker atlases to a separate file from my main file, then use require, but lovely can't find the file?

warm umbra
#

how do i put this color inside the description of a joker

#

ive tried different things but cant get it to work

shut monolith
#

yes

red flower
#

then you dont need require

#

atlases in assets/1x and assets/2x load automatically

versed swan
wispy falcon
timid zinc
warm umbra
#

how do i make a joker not appear in the shop at all

red flower
frank ridge
#

how can i read/display what the "value" is that Oil Lamp is modifying?

warm umbra
#

how do i make it so that you can only hold one of a certain joker at a time, even with showman

#

or like how do i add custom flags

willow scroll
#

oh wait no i forgot to pass on loc vars :clueless:

#

i think thats the problem?

#

no i need this thing to have a name 🤯

#

ok wow another stupid obscure bug

idle ivy
#

Can I show you the effects of my jokers and you tell me if it's balanced?

twilit tundra
#

post it

wispy falcon
#

What does rate do? (SMODS.Rarity)

        ["Joker"] = true,
        ["Joker"] = { rate = 0.7 },
    },```
jolly shadow
#

its rate in the pool

willow scroll
#

anybody know what in the game would cause everything to work fine except block you from playing hands and selling jokers?

jolly shadow
wispy falcon
jolly shadow
#

yea

willow scroll
pastel osprey
#

im trying to make my deck make negatives not cost more money

#

but its crashing

#

i tried a few things for this

#

here's the code

#
local card_set_cost_ref = Card:set_cost()

SMODS.Card:take_ownership('card', {
    set_cost = function()
        card_set_cost_ref()
        if self.edition then
            local cost_sub = self.edition.negative and G.GAME.modifiers.rad_extra_cost_negative or 0
            self.extra_cost = self.extra_cost - cost_sub
            self.cost = self.cost - cost_sub
        end
    end
})
#

i may be doing this horribly wrong

red flower
#

SMODS.Card:take_ownership('card' is not a thing

pastel osprey
#

i thought so

#

the last thing didnt work either though

#

so i thought it was worth a shot

#
local card_set_cost_ref = Card:set_cost()
function Card:set_cost()
    card_set_cost_ref()

    if self.edition then
        local cost_sub = self.edition.negative and G.GAME.modifiers.rad_extra_cost_negative or 0
        self.extra_cost = self.extra_cost - cost_sub
        self.cost = self.cost - cost_sub
    end
end
#

here was the other thing

ocean sinew
#

why didnt that work

#

also why are you not returning the ref function

pastel osprey
#

gimme a sec

ocean sinew
#

and not passing the self parameter to it

pastel osprey
#

oh shit yeah you right

red flower
pastel osprey
#

sorry im terrible at lua

pastel osprey
ocean sinew
#

Everyone makes mistakes

pastel osprey
ocean sinew
#

you get better with time though

pastel osprey
#

of course

ocean sinew
pastel osprey
#

you should have seen me when i started rust lol

#

that took me 2 years to learn

ocean sinew
#

bc even if it returns nil

pastel osprey
#

but thats rust so

ocean sinew
#

maybe theres a mod that hooks it to return something else

#

and needs that specific stuff

ocean sinew
#

I was not very good

#
  • arrogant
#

and too confident

pastel osprey
#

still crash