#💻・modding-dev

1 messages · Page 261 of 1

open aspen
#

so im just wondering what stuff shouldnt be in the draw function

#

like tbh the only thing i can think of that can be moved out is the self.sprite = sprite() line

minor furnace
#

state machines are fun 🙃

open aspen
#

but atm moving that to the sticker itself crashes because (i assume here) that it tries to get the custom atlas before it exists

frosty dock
thin anchor
#

would i add it like this?

frosty dock
#

card.ability.extra instead of self.ability.extra

open aspen
daring fern
frosty dock
open aspen
#

why does it limit it to :sub(7) 💀

frosty dock
#

uh wrong link

#

one sec

open aspen
#

no problem

frosty dock
#

that one is stake stickers

#

which don't include the stake_ prefix

#

this is the right one

open aspen
#

omg

#

wait so card.sticker_sprite gives the sprite?

frosty dock
#

self.sticker_sprite

#

not card

keen orbit
#

Hey I'm just getting started with modding this game and I was wondering if there are any resources that have the SMODS documentation as well as what needs to be defined to have a joker work and not crash

open aspen
minor furnace
#

what's up with this function lmao

open aspen
#

so i got it working and i would have thought it was card.sticker_sprite

#

because i thought i wrote that 💀

#

anyways it works

#

and that fixed all the lag

#

60 fps

minor furnace
frosty dock
maiden river
#

does anyone know if you can #include other shaders in the shaders for balatro?

thin anchor
#

err... what?

maiden river
thin anchor
#

oop

maiden river
#

you gotta read the error 😭

#

that's still not correct (in this specific instance. you should be using card.ability.extra instead of self... in general)
what's your config table look like?

thin anchor
#

i dont believe ive ever made one

maiden river
#

well, that's a good start 😭

#

what are you trying to make anyway

thin anchor
#

joker that clones scoring cards for the blind

maiden river
#

I see

#

i'm surprised there's not an SMODS.copy_card (unless there is and it's undocumented, which would be unsurprising)

thin anchor
#

yeah

frosty dock
thin anchor
#

well now is a good time to!
i would like SMODS.copy_card

maiden river
maiden river
maiden phoenix
#

Need a SMODS.just_take_the_ideas_from_my_head_and_put_them_into_the_code

maiden river
#

you just have to pay john smods $2000000 USD

next timber
#

am i crazy or do these look squashed

maiden river
#

they do 😭

maiden phoenix
#

How about $2 and half of a milkshake

next timber
#

ok why are my cards squashed

maiden river
#

what size is the atlas

maiden phoenix
next timber
#

sprites and atlas are both 63x93

maiden river
#

well those aren't the standard card dimensions 😭

thin anchor
#

use jimbo for reference

next timber
#

ah

maiden river
#

it's 71x95

next timber
#

am i going to have to redo like. 9 cards

maiden river
#

probably

next timber
#

funsies

#

if i just make it 2 pixels taller and leave the width the same will that be fine?

#

or does width have to be specific too

maiden river
#

it's specifically 71x95

#

well, it could also be 69x93

#

but that's without the extra transparent space

next timber
#

ok so 71x95, with one pixel of transparent space around the edge?

maiden river
#

yeah

maiden phoenix
#

Not exactly

#

The size is 71x95, but the sprite inside is smaller than a joker card

maiden river
#

huh 😭

maiden phoenix
next timber
#

i was gonna say, this feels wayy too wide for a consumable

maiden river
#

oh for a consumable?

#

I didn't know that 😭

next timber
#

wel yea

#

hence the custom locked sprite

#

is it different for consumabes.

maiden river
#

no, everything fits within the 71x95 space

#

the actual size of the image in that space is different

next timber
#

ok so the only thing i actually have to resize is the canvas? resizing the canvas to 71x95 does leave the 1px vertical and 4px horizontal borders

maiden river
#

ex. vouchers have a lot of whitespace on the sides

next timber
#

oh thank god

maiden river
next timber
#

so for the px and py arguments in the atlas do i put 71x95 or do i put the size of the actual sprite within the 71x95 canvas

maiden river
#

you put the 71x95

next timber
#

ok

#

thanks

maiden river
#

did you also make a 2x version

next timber
#

think so yea

maiden river
#

you'll have to resize those too, if you haven't already (but I assume you did)

next timber
#

yep

maiden river
#

big

next timber
#

much better

wary skiff
#

Hi everyone, I've gotten into challenge making, is it possible to make one behave like a regular stake (ex. Black Stake w/ faster scaling and eternal jokers)?

maiden river
#

I'm not sure if that's in base smods

#

I know aiko did it

#

@tall wharf mentioning for whenever you show up

open aspen
#

alr im pulling my hair out. how can i get this sticker draw function to draw at the same position on my card regardless of size

minor furnace
#

I solved the transition disabling the UI by simply setting the dummy blind in a different location

open aspen
#

example of the behaviour when in hand vs when in deck view

chrome widget
#

Is there a provided way to visibly space lines of text in a joker description?

#

I'm having this issue where we have cards that have different "clauses", but I don't really like the way that it looks where the next clause starts with a capital but there's no grammatical separation otherwise

#

This one is less egregious because the top clause's justification inherently doesn't match the bottom one

#

This is the one I'm most mixed on

open aspen
#

does an empty line not work?

#

or even like a line with a space

chrome widget
#

I've had issues with feeding empty lines into text boxes before, so let me try

open aspen
#

even if not empty try putting a space or something

chrome widget
#

A single space does work

open aspen
# open aspen example of the behaviour when in hand vs when in deck view

alright so i think if u imagine a grid where 0, 0 is the top left of the card, and 1,1 is the bottom right (in this case i know that 0,0 is actually the top left no matter what your looking at, im just using 1,1 as an example tho).

That works fine in the hand, but I think whats happening is that in the deck view the units of this imaginary grid dont scale down to match the smaller card size. So the tag is now displaying way lower than where it should be

#

so now uh idk how to fix that

minor furnace
#

Currently sitting here praying that G.GAME.discard currently holds the cards that have either been played or discarded over the course of a round

#

anybody know if that's what that cardarea does?

open aspen
#

like i assume i can mathematically figure out what 1,1 should be in this new grid

#

but im a dumb idiot whos forgotten linear algebra

#

i do know that the scale_mag variable of the card changes between hand and deck view

#

but weirdly, it increases in deck view (e.g higher values make it render smaller i guess)

primal shoal
#

some joker ideas that came to me

maiden river
#

It's an offscreen cardarea

minor furnace
#

awesome

#

because I want to shuffle them back into the deck

#

I think I know how to do this now

primal shoal
thin anchor
maiden river
primal shoal
thin anchor
#

lol

minor furnace
#

I assume I can add them to the deck cardarea, pseudoshuffle, and empty the discard cards

maiden river
#

Oh I misread deck as hand whoops

zealous glen
#

note the

#

otherwise the line gets automatically removed

chrome widget
#

That works!

zealous glen
#

the {s:0.3} makes the line smaller

primal shoal
#

oh thats sick i might write that a lot

zealous glen
chrome widget
#

How so?

zealous glen
#

It can be on the card itself of course

#

this example just uses an infobox

next timber
#

Why does this give me the error engine/sprite.lua:11: attempt to index 'atlas' (a nil value)?

#

wait my 2x spritesheet isnt resized

#

i thought i did that

zealous glen
#

Something is missing

#

No one bothered to figure out how in a scalable way

#

Autumn had made a working POC that crashed when "anything touched the card" IIRC

frosty dock
#

i mean this one just crashes because it doesn't know to look for an animation atlas

zealous glen
#

MathIsFun reimplemented animated sprites manually for Cryptid and later Aura

next timber
#

so if i want an animated consumable im going to suffer

zealous glen
#

On the bright side, if you make it work you can PR to SMODS for all of us

next timber
#

i hate patching i hate patching i hate patching i hate patching i hate patching i h

thin anchor
#

how would i give every played card the gold edition?

zealous glen
#

Midas Mask + Pareidolia

frosty dock
#

i should see if i can't make this kind of thing work in steamodded relatively painlessly

#

by that i mean I'll give up if it's much work

next timber
#

midas mask + pareidolia + vampire is literally my favourite joker combo

#

its so good

thin anchor
zealous glen
thin anchor
zealous glen
minor furnace
chrome widget
#

I have to figure out how to rephrase this to be one line shorter, and it might just involve making the description wider. I try not to make descriptions too wide unless they absolutely need to be, but unfortunately the collection is being annoying

#

Maybe I could just get away with putting her on the bottom row?

next timber
#

+69 chips if played hand contains multiple cards of the same rank?

#

oh but no fiveo f a kind

chrome widget
#

Not correct, because it's not an "includes" yeah, it's those specific hands

minor furnace
#

slight issue lmao the cards are permanently debuffed

zealous glen
#

so you could try to tweak that

zealous glen
# thin anchor seriously though

check out Spinagogue Champion from Cosmos but also Eremel mentioned porting a similar patch from Ortalab to SMODS to help do this

chrome widget
#

I'll try the simpler solutions first, I've got two spots on the bottom row and I think I can justify putting her in the leftmost one

zealous glen
#

Good

frosty dock
next timber
#

small blind card

open aspen
#

what is that

frosty dock
#

seems i just have to make the API support it

next timber
#

On scored, immediately be sent to do a small blind. it will not affect your current ante

frosty dock
#

I replaced the card's children.front with an animated sprite

open aspen
#

ooo

frosty dock
#

(and called set_role on it so it actually draws on the card)

open aspen
#

aw man

#

i was hoping i had a solution to the sticker problem

young dew
#

i've made a tag that is supposed to create a card in shop under certain conditions but for some reason it's considered as triggered when the shop cards are created

local encore = {
    type = 'Switch',
    order = 24,
    key = "encore",
    pos = coordinate(28, 8),
    config = { type = "store_joker_create" },
    min_ante = 1,
    apply = function(self, tag, context)
        print(context.type)
        if context.type == "store_joker_create" and G.GAME.encore_card then -- why is triggered on true????? it didn't even triggered????????
            local card = SMODS.create_card({
                set = G.GAME.encore_card.set,
                area = context.area,
                key = G.GAME.encore_card.key,
                enhancement = G.GAME.encore_card.enhancement,
                seal = G.GAME.encore_card.seal,
                edition = G.GAME.encore_card.edition,
                stickers = G.GAME.encore_card.stickers
            })
            create_shop_card_ui(card, G.GAME.encore_card.set, context.area)
            card.states.visible = false
            G.GAME.encore_card = nil
            tag:yep('+', G.C.BLUE,function()
                card:start_materialize()
                return true
            end)
            tag.triggered = true
            return card
        end
    end
}
next timber
#

does this mean we may be getting animated card api soon?

zealous glen
faint yacht
frosty dock
modern kindle
#

does it duplicate nicely

frosty dock
#

not yet, but that's because i haven't actually made any code changes yet

modern kindle
#

ah gotcha gotcha

haughty cargo
#

would making a CLI/TUI for balatro be interesting? I want a project that I can do, I would probably try writing the CLI part in rust, but I think I would need a way to send the commands to the game (also never coded lua before so would need help with that)

turbid maple
#

well itd surely let me play balatro at work so id appreciate it

haughty cargo
#

is there a way to run the game without rendering it in the window? it would probably be a fairly important part of making it work well (I think)

gaunt thistle
#

rust chad

primal shoal
#

bit more effort on this one

#

does it look weird?

gentle rain
#

how exactly does idol logic exclude stone cards

haughty cargo
keen tiger
haughty cargo
#

what are you wanting to do?

forest ivy
keen tiger
primal shoal
gentle rain
#

is there any way i could make the idol logic not consider face cards? eg. it would only choose 2-10 and aces

gaunt thistle
haughty cargo
gentle rain
gentle rain
#

yeah i am!

#

cant find it in card.lua or game.lua

open aspen
#

well it fails u sometimes

#

ill look

gentle rain
#

.>

open aspen
#

G.GAME.current_round.idol_card.rank is what idol rank is

gentle rain
#

oh where is that?

open aspen
#

common_events.lua

gentle rain
#

aaah ty

open aspen
#

ctrl f across all files

gentle rain
#

oh how do you do that

broken wren
#

i have a question. does anyone here know how to modify a baltro game save? i got the plant on a run i was just dicking around in and frankly i would rather just figure out how to add a luchador to my joker slots or like figure out a way to change the boss blind instead of playing it all over again. if not ill cut my losses lol

maiden river
#

Gimme a sec

gentle rain
open aspen
maiden river
#

Oh alright

open aspen
#

so i looked for idol, i saw that variable G.GAME.current_round.idol_card.rank

#

then i did ctrl shift f again and searched for G.GAME.current_round.idol_card.rank

#

its ctrl shift f in vscode at least

gentle rain
#

mmm

#

so you just have every .lua open?

open aspen
#

i just open the folder in vscode

#

dont tell me you just go open file explorer and check each file

gentle rain
#

...

#

i mean most everything i need is in card.lua

open aspen
#

open folder in vscode > the balatro folder

open aspen
broken wren
#

yeah i have no idea how to do this

open aspen
#

debugplus mod?

broken wren
#

let me try that

frosty dock
next timber
#

exciting

broken wren
#

ok wow thanks

#

that worked

frosty dock
#

I'm not exactly sure how to handle front sprites with this tbh, the code with deck skins is a bit of a mess

unkempt thicket
frosty dock
#

fr

bold canopy
#

So I'm trying to modify Campfire to ditch its reset function on boss blind. Any reason it keeps resetting despite the function not existing here? I've even tried adding context.end_of_round to do nothing and it will still reset. My novice coding skills are likely to blame. Any help is appreciated.

frosty dock
frosty dock
edgy reef
frosty dock
#

you just need to return something in the context, else it will fall back into vanilla functionality

minor furnace
#

for some reason, this did not un-debuff my cards 🤔

        self.disabled = true
        for k, v in ipairs(G.playing_cards) do
            v:set_debuff(false)
        end
        for k, v in ipairs(G.jokers.cards) do
            v:set_debuff(false)
        end
    end,```
maiden river
# maiden river I can send some code
// -- the filter function, defined somewhere else in your code
// -- because it's not in lua by default
function filter(tbl, func)
  local newtable = {}
  for i = 1, #tbl do
      if func(tbl[i]) then
          newtable[#newtable+1] = tbl[i]
      end
  end
  return newtable
end
// -- in your calculate function
if context.end_of_round and not context.game_over then
  local deck_cards = filter(G.deck.cards, function (_card)
      return not SMODS.has_no_rank(_card) // check for no-rank cards (i.e. stone)
  end)
  deck_cards = filter(deck_cards, function (_card)
      return not _card:is_face() // check for non_face cards
  end)
  local card = pseudorandom_element(deck_cards, pseudoseed("idol"))
  -- store the card somewhere here
end

my insane concept
I'm not too strong on lua 😭

bold canopy
frosty dock
wintry solar
#

Fixing animated sprites!?

long sun
#

hihi, another question — is there a way of getting a Joker to send a message during context.destroy_card, while a bunch of cards are being destroyed?

#

aha wait lemme try something with config

#

yep, got it :D

primal shoal
#

ooh i joker idea
Bit crushed
all sounds releted to the joker are bit crushed
copys the one left to it left
and is animated so it looks like it changing bits every so often

long sun
#

is there a way to get a list of all active Planet cards?

keen tiger
long sun
#

i'd like my Joker to only select Planet X if Five of a Kind has been played, for example

zealous glen
#

Or rather iterate over all Planets, and if they have an associated hand see if it has been played

#

I’ve done something similar for Moody

#

in my mod

long sun
#

not what i mean

#

i mean like, the page in Run Info listing all the hand levels — i need my Joker to get a list of their corresponding planets

#

so that's Pluto - Neptune at the start of a run, and Eris / Planet X / Ceres if their hands have been unlocked

#

and the reason i'm not hardcoding them is to allow for modded planets to show up

#

(here's the ability)
Creates a copy of Pluto at the end of the round, Planet card changes every discard (Must have room)

#

sorry i've been using this channel so much, but i'm horrible at reading other people's code, and that goes for Balatro's source code 😭

small moon
#

G.P_CENTERS has a list of all the planet cards denoted by the object having set = "Planet". They each have a config with a hand_type and an optional softlock key
If the softlock is present the Planet card won't be available until that hand type has been played, and if it's not present it is available. To check if a hand type has been played you can check G.GAME.hands["HAND TYPE"].played > 0

long sun
#

ah that's very useful! thanks :D

#

oh one more thing, is the ability too weak, in your opinions?

#

just wondering

small moon
#

Unsure :P
Seems fine

long sun
#

goodgood ^^

zealous glen
#

Iterate over Planets and check if their hand has been played

long sun
#

ya i've done that already -w-

zealous glen
#

I’m just clarifying that’s what I had suggested when you said “not what I mean”

zealous glen
long sun
zealous glen
long sun
zealous glen
#

It’s better than uncontrollable random but still random

#

And it “costs” discards

long sun
#

mhmhm

#

i suppose everything in Balatro is sorta random though ^^ /nsrs

#

will give it a test run, anywho

weak brook
#

is there a mod currently that has implementation of SMODS.DrawStep? Im trying to learn how to use that api

#

seeing code of it in use helps a lot

next timber
#

how do i make a consumable apply a given edition to a random joker?

maiden phoenix
#

Look up Hex/Ectoplasm's code

velvet pulsar
#

Is there a way to extract balatro's exe/macos equivalent using archiver software other than 7zip? Was hoping to create my own custom texture packs but ran into a roadblock because I'm using a mac, not windows. Apologies if someone's already asked how

azure pilot
#

What do people tend to use Steamodded for? Like, do most use its APIs for game logic, or is it merely used for its debugging/mod-handling capabilities, or other things? Sorry if the question doesn't make sense, still learning

next timber
#

its api stuff

open aspen
#

yall is there any scenario where this will be an invalid index (other than 0 cards in hand which is accounted for)

open aspen
#

i dont exactly remember how i did it, but u can do it on mac (im on mac) and i remember seeing it on the getting started page i think

indigo mesa
#

this code crashes: attempted to index local 'card' [a nil value], can someone tell me what im doing wrong plz?
calculate = function(self, card, context) if context.cardarea == G.play and not context.repetition then for i = 1, #context.scoring_hand do if SMODS.has_enhancement(v, "m_stone") then return { remove = true } end end end end

velvet pulsar
sonic cedar
#

how would i check if a scoring hand contains a card with a certain enhancement? (and then change said enhancement)

long sun
#

sorry one more question — how do i get the name of a Planet in v.config?

#

and its planet id? (eg. c_pluto)

next timber
#

oh wow negative Power Cards look awesome

brazen tusk
#

woah those are cool

main chasm
next timber
#

come to the dark side. don't listen to the 'Balatro Black' truthers. use #000000. youll get cool negativessss

main chasm
#

does anyone know how to check if a card is debuffed?

gentle rain
#

how come its indexing a nil value with this table?

humble girder
brazen tusk
main chasm
next timber
brazen tusk
#

ty!

next timber
#

how are you guys so good at these background textures

humble girder
#

looks like a 3d distorted voronoi tbh

gentle rain
quartz ravine
#

Hey doods, does SMODs have an easy way to add my own take on a stone card?

gentle rain
humble girder
quartz ravine
#

It's like a weird custom ability. Ohhhh, it is basically an enhancement

quartz ravine
next timber
minor furnace
#

is there not a set_sprites() option for Blinds?

quartz ravine
next timber
#

just check vanilla code?

gentle rain
humble girder
open aspen
#

i almost accidentally deleted my entire mod

zealous glen
#

Use GitHub at least

open aspen
#

i deleted the folder through mod manager by hitting verify files. Thank god my IDE was open and held the changes

next timber
#

thats why we have github

quartz ravine
#

ok, it is an enhancement

open aspen
#

terrible idea

next timber
quartz ravine
#

It somehow seemed so special, and minerally to me. I guess I am not sure what I expected either lol

open aspen
quartz ravine
next timber
#

tbf i only ever push to github when i've entirely completed a feature

#

so im not the smartest with it either

humble girder
#

i definitely don't commit often enough

open aspen
#

like my localization file is dead

#

gone

quartz ravine
#

Yeah, what if someone looks at my old code, I don't know who has that much time but I don't want to share it until I am proud

open aspen
#

thank god i only added one thing so far

#

i can just go look at the screenie and copy it again

quartz ravine
#

Oh this is neat, I didn't know this existed

h_x_chips, -- Chips multiplier when held in hand during scoring, nil (not defined), 0 or 1 is treated as 1.

next timber
#

i couldn't possibly let someone stumblr upon the github and play an unfinished, possibly broken version of the mod

#

so instead i risk losing everything

#

clearly

humble girder
#

i wrote that comment 🙂

prisma juniper
#

hi everyone, i need some help for this piece of code:

            if not context.blueprint then
                
                local repeater = nil
                for i = 1, #G.jokers.cards do
                    if G.jokers.cards[i] == card then
                        repeater = i
                        break
                    end
                end
                
                if context.retrigger_joker_check and not context.retrigger_joker and context.other_card ~= self then
                    if context.other_card == G.jokers.cards[repeater-1] then
                        
                        return {
                            message = localize("k_again_ex"),
                            repetitions = card.ability.extra.repetition,
                            card = card,
                        }
                    else
                        return nil, true
                    end
                end
            end            
        end,```

i want the joker on the left and right of this one to retrigger, how can I make it work?
brazen tusk
#

If i want to give double the sell value of a joker when its sold, would i have to store it as a seperate value?
currently i think its deleting the data before it can give the money

humble girder
open aspen
next timber
#

ayy

open aspen
#

Never making that mistake again

quartz ravine
#

Hey guys, I am looking for a context window I could use to see if a hand was played but my card was held in hand

brazen tusk
toxic rain
#

working on the same joker as yesterday, i'm getting attept to index field 'card' (a nil value) error on this code

SMODS.Joker {
    key = 'TOGO', --joker key
    loc_txt = { -- local text
        name = 'To Go menu',
        text = {
            "Food Jokes each give {C:mult}+5{} Mult",
            "{C:inactive}(Ramen, Popcorn, Egg,",
            "{C:inactive}Turtle Bean, Diet Cola, Seltzer,",
            "{C:inactive}Gros Michel, Cavandish and Ice Cream",
            "{C:inactive}are food jokers)",
        }
    },
    config = { extra = {mult = 5}},
    loc_vars = function(self, info_queue, card)
        return { vars = { card.ability.extra.mult } }
    end,
    rarity = 2, --rarity: 1 = Common, 2 = Uncommon, 3 = Rare, 4 = Legendary
    atlas = 'MMM_Jokers', --atlas' key
    pos = { x = 0, y = 0 },
    cost = 5,
    unlocked = true, --where it is unlocked or not: if true, 
    discovered = true, --whether or not it starts discovered
    blueprint_compat = true, --can it be blueprinted/brainstormed/other
    eternal_compat = true, --can it be eternal
    perishable_compat = true, --can it be perishable
    pos = {x = 0, y = 0}, --position in atlas, starts at 0, scales by the atlas' card size (px and py): {x = 1, y = 0} would mean the sprite is 71 pixels to the right
    
    calculate = function(self, card, context)
        
        if context.other_joker and context.card.ability.name == "Sly Joker" then
            if  card ~= context.other_joker then
                G.E_MANAGER:add_event(Event({
                    func = function()
                        context.other_joker:juice_up(0.5, 0.5)
                        return true
                    end
                })) 
                return {
                    message = localize({ type = "variable", key = "a_mult", vars = { card.ability.extra.mult }}),
                    mult = card.ability.extra.mult
                }
            end
        end
end
}```
humble girder
toxic rain
toxic rain
brazen tusk
humble girder
#
calculate = function(self, card, context)
    if context.selling_self then
        return {
            dollars = card.ability.extra_value
        }
    end
end
#

self is the center

#

not the card

#

the values in self are basically the template for all jokers that appear with that center for the entire runtime of the game, not even reset between runs

#

i also don't know if you can return dollars in selling_self 🤔

azure pilot
#

Wtf is a center anyway, whats the name supposed to mean

indigo mesa
#

why does this crash? 745:'{' expected [to close '}' at line 744] near '='

        if context.cardarea == G.play and not context.repetition then
            for _, v in ipairs(context.scoring_hand) do
                if SMODS.has_enhancement(v, "m_stone") then
                    return {
                        card.ability.extra.chips = card.ability.extra.chips + card.ability.extra.chip_gain
                        remove = true
                    }
                end
            end
        end
        if context.joker_main then
            return {
                chips = card.ability.extra.chips
            }
            end
        end
    end```
humble girder
#

looks like effects on selling_self eval are triggered so it should be giving correct amounts of dollars

humble girder
#

but wait

#

also

#

wtf

#

is that line in a table

brazen tusk
#

put it outside the return i think?

humble girder
#

card.ability.extra.chips = card.ability.extra.chips + card.ability.extra.chip_gain why is this in your table

brazen tusk
indigo mesa
humble girder
#
if SMODS.has_enhancement(v, "m_stone") then
    card.ability.extra.chips = card.ability.extra.chips + card.ability.extra.chip_gain
    return {
        remove = true
    }
end```
humble girder
#

self.ability is not supposed to exist

#

self.ability.extra_value is supposed to crash

indigo mesa
humble girder
#

not yours

indigo mesa
#

ohh ty

#

i went thru

#

3 completely different calculates

#

im going insane

sonic cedar
#

How would I unenhance a card?

next timber
#

im pretty sure literally the last thing left to do before i can release the first version of my mod is add booster packs

humble girder
sonic cedar
#

thanks ^^

humble girder
#

(vampire joker code for reference)

long sun
#

printing #G.P_CENTERS is yielding 0, is there a reason why?

brazen tusk
long sun
#

is it because it's a table?

humble girder
sonic cedar
humble girder
#

#x is just the highest consecutive numeric index starting to 1 that is available in the table

long sun
#

ah icicic

#

so i need to use ipairs then

#

gotcha

#

thanks :D

#

i'm starting to pick this whole Lua thing up ^^

humble girder
sonic cedar
#

i seeeee thanks

#

muhahaha

humble girder
#

why does calculate(self, context) even work

#

what is your steamodded version 🤨

brazen tusk
#

i downloaded it like 2 days ago

#

ive got up to date mods running and stuff

toxic rain
#

hey uhhh quick question how do you check the name of a diffrent joker?

chrome widget
#

So the docs page for SMODS.Sticker is not super obvious to me, is there anything that should actually be minded in terms of what stickers can and cannot overlap each other (assuming modded content from other creators). With vanilla, I absolutely know that Perishable and Eternal cannot coexist, but Rental can coexist with either, but does anything specify that in SMODS? The vanilla game seems to allow you to put both Perishable and Eternal on a joker via debug, but they visually squash each other and you're not supposed to do that

humble girder
#

i wonder if we just happened upon a lua oddity

#

i'll just stick to what i know you should be doing

toxic rain
long sun
#

hmm, nothing was logged with this code, so i'm guessing G.P_CENTERS is nil or empty:

for k, v in ipairs(G.P_CENTERS) do
        print(v)
      end```
chrome widget
#

it's card.config.center.name btw

humble girder
# brazen tusk i looked at another mod to get an idea of how things worked, this is a whole jok...
calculate = function(self, card, context)
    if context.individual and context.cardarea == G.play and context.other_card:get_id() == 3 then
        if pseudorandom('stability') < G.GAME.probabilities.normal / card.ability.extra.odds then
            return {
                x_mult = card.ability.extra.x_mult,
                card = card,
            }
        end
    end
end,

loc_vars = function(self, info_queue, card)
    return {vars = {
        card.ability.extra.x_mult,
        card.ability.extra.odds,
        G.GAME and G.GAME.probabilities.normal or 1,
    }}
end
toxic rain
chrome widget
#

card being whatever your card reference is. Could be context.card or context.other_card depending on the situation

toxic rain
#

thanks

brazen tusk
toxic rain
humble girder
#

i'd assume whatever mod you looked at for examples is horribly outdated btw

zealous glen
chrome widget
#

Hmm...

#

Troubling

#

I'll just implement the vanilla-mindful one for now

sonic cedar
#

went to go test my joker out. tried cycling through editions on a playing card with debug plus and my game crashed?

humble girder
gentle rain
#

can someone explain to me how the pair() function works when looking through the deck (G.playing_cards)

#

idont understand the function at all

humble girder
#

thunk placed eternal and perishable in the same position in the literal atlas assuming correctly that the two can't happen at the same time in vanilla

long sun
chrome widget
#

pairs() is an iterator function in lua that returns key/value pairs in a given table

humble girder
sonic cedar
#

ipairs is a-- yeah

gentle rain
#

i have the lua reference manual pulled up i just

#

need it in leymans terms i think

toxic rain
# toxic rain well the joker is still not working but idk if that's the issue or something els...

for context this is what the code looks like ```calculate = function(self, card, context)

    if context.other_joker  then
        if  card ~= context.other_joker and card.config.center.name == "Sly Joker" then
            G.E_MANAGER:add_event(Event({
                func = function()
                    context.other_joker:juice_up(0.5, 0.5)
                    return true
                end
            })) 
            return {
                message = localize({ type = "variable", key = "a_mult", vars = { card.ability.extra.mult }}),
                mult = card.ability.extra.mult
            }
        end
    end

end
}```
not sure what part is messing it up

humble girder
#

if #table == 0 then ipairs() will not iterate any element

long sun
#

ahhh right gotcha

#

pairs, then? ^^"

humble girder
#

iterate with pairs() if you want to go through every key

long sun
#

awesome, thanks :D

chrome widget
#

It's used in a for loop

    -- do something
    -- k is the key
    -- v is the value
end```

Similarly, `ipairs` is for integer indexed array tables, so you use it when you expect array tables
```for i, v in ipairs(table) do
    -- i is the index (1, 2, 3, 4...)
    -- v is the value
end```
humble girder
#

integer indexed is incomplete

zealous glen
#

Keep in mind if the array table is missing an index your behaviour won’t be as intended

gentle rain
#

riiight

sonic cedar
gentle rain
#

is anything wrong with this then

long sun
#

AHAHAAAAAAAAA IT WORKS :DDDDDD

#

TYSM ^^

#

very happy with this :D

humble girder
#

it will only go from 1 through N where N is the last consecutive index in your array:

local _t = {[1] = 'one', [2] = 'two', [4] = 'four'}
for i, v in ipairs(_t) do
   print(''.. i .. ' = ' .. v)
   -- 1 = one
   -- 2 = two
end
toxic flicker
#

yo guys can someone tell me all the quality of life mods for making a mod and all the useful stuff like that? cuz i have debug plus and thats about it and idk how to do things like auto unlock cards and give myself certain cards and stuff

long sun
humble girder
#

all you need is debugplus

quartz ravine
quartz ravine
toxic flicker
pale venture
#

I truly wonder what compelled me into spending two hours to learn how cryptid does extra soul layers to make this.

toxic flicker
#

ight thanks yall 👍

limber warren
#

hi there, im relatively new to modding balatro and it's been fun so far!
im having an issue with trying to implement removing the stone card effect and giving the played card an edition. it looks funky.

sonic cedar
quartz ravine
#

I am trying to make a stone lke care that becomes more powerful if you hold it and play other cards.

It shoudl be increasing when not played, but I am not hitting the context window, anyone see the issue here?

calculate = function(self, card, context, ret)
      if context.cardarea == G.hand and context.individual then
          sendInfoMessage("I am being held")
          card.ability.extra.h_x_chips =  card.ability.extra.h_x_chips + card.ability.extra.chipsRate
              return {
                  h_x_chips = card.ability.extra.h_x_chips
              }
          end
    if context.cardarea == G.play and context.main_scoring then
        sendInfoMessage("I am being played")

                        return {
                chips = card.ability.extra.h_x_chips
            }            
        end
limber warren
#
-- Remove stone and apply edition
        if context.cardarea == G.jokers then
            if context.before then
                if context.scoring_hand[1].ability.name == 'Stone Card' then

                    
                    G.E_MANAGER:add_event(Event({
                        func = function()
                           
                            local card = context.scoring_hand[1]
                            card:set_ability(G.P_CENTERS.c_base, nil, true)
                            card:juice_up()

                            delay(0.3)
                            return true
                        end
                    }))

                    G.E_MANAGER:add_event(Event({
                        func = function()
                            local card = context.scoring_hand[1]
                            local geode_transform = poll_edition('aura', nil, true, true)
                            card:set_edition(geode_transform, 0.5)

                            delay(0.3)
                            return true
                        end
                    }))
                end
            end
        end

im trying to use events to make it play one at a time but i cant get it working

#

does anyone know how to delay removing the stone and applying an edition?

quartz ravine
limber warren
#

huh, didnt know about flips. ill try that out, thank you!

quartz ravine
#

It's what tarots and everything else do when changing a card

#

So I am definitely hitting my 'I am being played', but I am not hitting the 'I am being held' for my enhancement

limber warren
#

i kind of wanted the effect to be like vampire where it shakes and just instantly removes the effect

limber warren
#

theres a list of contexts that ive been using thats helpful

tall wharf
sonic cedar
# humble girder ```lua for _, card in ipairs(G.playing_cards) do card:set_ability(G.P_CENTER...
if context.hand_drawn then
            for _, card in ipairs(G.playing_cards) do
                card:set_ability(G.P_CENTERS.m_base)
            end
            G.E_MANAGER:add_event(Event({
                trigger = "after",
                delay = 0.15,
                func = function()
                    card:flip()
                    return true
                end,
            }))
            G.E_MANAGER:add_event(Event({
                trigger = "after",
                delay = 0.15,
                func = function()
                    card:set_ability(G.P_CENTERS["j_hpfx_ijiraq"])
                    play_sound("card1")
                    card:juice_up(0.3, 0.3)
                    return true
                end,
            }))
            G.E_MANAGER:add_event(Event({
                trigger = "after",
                delay = 0.15,
                func = function()
                    card:flip()
                    return true
                end,
            }))
        end```
how do i fix it crashing every time it tries to trigger?
humble girder
#

crash log?

sonic cedar
humble girder
#

oh lmao

#

G.P_CENTERS.m_base

#

it's c_base

#

not m_base

sonic cedar
#

oh lmao

quartz ravine
#

That guide on context was amazing

sonic cedar
long sun
#

sorryyyyyy one more question

quartz ravine
#

I wrote 30+ jokers and five editions without knowing that context page existed

long sun
#

context.discard triggers on every discarded card, but is there a context (which there probably is, there's loads) for just using a discard?

humble girder
#

try context.pre_discard

sonic cedar
#

can i debug a stone card into my deck before a blind

humble girder
#

well, debug it in the small blind and then go into the big blind

sonic cedar
#

oh true lmfao

humble girder
#

(debugging from the view deck page doesn't work as those are actually just copies of cards in your deck, not the real thing)

sonic cedar
#

(i know unfortunately)

brazen tusk
#

These are displaying nil, not sure what i'm doing wrong here?

#

probably smth more i have to put in after fixing it to card.ability

frosty dock
#

and whatever comes after it too

tall wharf
brazen tusk
#

theres probably so much i have wrong 💀

#

i did have it all working but was advised to change it bc it was outdated

tall wharf
#

wait wtf

brazen tusk
#

its in my main lua

umbral zodiac
#

is there a guide anywhere on how i could add gui/text elements (specifically trying to add text below the blind req on boss blinds only, somewhere like shown in the ss)

fervent thicket
#

Is there a way to change the requirement for a blind after it is selected?

tall wharf
#

G.GAME.blind.chips

tall wharf
#

and also G.GAME.blind.chip_text

sonic cedar
fervent thicket
tall wharf
fervent thicket
#
if(context.setting_blind) then
      G.E_MANAGER:add_event(Event({
        trigger = 'immediate',
        func = function ()
          G.GAME.blind.chips = G.GAME.blind.chips * card.ability.extra.xchips
          return true
        end
      }))
    end

This is what I currently have.

tall wharf
brazen tusk
#

what im hearing is i need to remake this from the ground up 💀
imma go look at some different mods for reference

feral jay
#

how would i make a deck that gives you a joker/consumable when you start

#

wait nvm i have it already i just made a mistake

tall wharf
#

💀💀💀

feral jay
frosty dock
#

you can just put jokers and consumeables in the deck's config, each as a table of keys (including prefixes)

feral jay
#

oh cool

#

wait like create_card(... key = 'j_ses_sanctuary') or just 'j_ses_sanctuary'

frosty dock
#

Just the key

feral jay
#

okok ty

next timber
#

im kinda confused, how do you make booster packs give cards of a custom consumable type? anything i try to do gives me the error attempt to index local 'center' (a string value)??

frosty dock
#

what do you have so far

next timber
gleaming zealot
frosty dock
#

but also to tell the booster pack what cards to spawn, you need to give it a create_card function

next timber
#

and what am i sposed to put in that function

frosty dock
#

have you read the docs on boosters?

warped marsh
#

The real question is aure can we see more of your kitty cat

next timber
#

im reading it and maybe its just bc its late but i dont really understand what exactly im meant to put in the function

#

do i need to create the card myself? then whats the card argument for

frosty dock
#

you can either return a card or something to be passed into SMODS.create_card

wary skiff
frosty dock
#

so returning something like { set = 'YourType', key_append = 'some_random_seed' } is perfectly valid

#

where YourType is the key of your consumable type and key_append is just some randomness value used to make the queue of cards unique and not impact other RNG

next timber
#

i see i see

#

ok no error thats good

#

ok going to the collection and trying to debug unlock the booster gave an error

turbid maple
next timber
#

i think i didnt give enough loc_txt

turbid maple
# umbral zodiac alright

for now you can check out functions/UI_definitions.lua and look for something about boss blinds and HUDs though

#

you can hook/patch that and add your UI nodes to it I forget the exact name of the function

umbral zodiac
#

mm alright

#

ty

next timber
#

wrong image

#

ayy

#

now to see if it actually works

#

the particles are going crazy

#

and also the error text

lethal ridge
#

Hello

#

Can anyone teach me how to use drawstep to make extra soul pos layer

#

I tried all night

#

Looking at documentation and source code

#

But it doesn't tell me anything

narrow iron
#

card.ability is just the cards config value right?

gentle rain
#

hoooow would i implement it so that when a rank that is one of the variables listed in this table of values, it removes the first variable sharing a rank within the table?

hushed field
hushed field
#

oh wait, discared. Same thing, different context, haha

gentle rain
#

aaa i forgot about iterating over the table ty

feral jay
#

how would i change the edition of a created tarot via joker calculate()? i tried just context.card.edition but that's not a thing apparently

chrome widget
#

Does anyone know the most effective way to reset a joker's scale/position values to its default?

manic rune
#

edition of a tarot?

feral jay
native zinc
#

assumedly like negative

#

yeah

manic rune
#

oh

#

look at how perkeo does it for the planet cards, i suppose

#

theres an example for that in example mods

feral jay
#

perkeo creates the planets itself though, i'm trying to modify a created one from a separate source

manic rune
chrome widget
#

I'm having a Spectral that replaces a joker with one of a similar rarity, so for example if a Wee Joker becomes a different joker, I'm having trouble making sure it resets from being small

#

Thus I have small boney

manic rune
feral jay
#

oh yeah you're right

#

i guess just card:set_edition then?

#

yeah that worked cool

next timber
# next timber ????

does anyone know whats up with the particles? also the error text lol but im very very confused by the unending swarm of particles

manic rune
next timber
#

you have the floor

manic rune
#

crap, the lightning fucked up the wifi

#

uh

next timber
#

lol

umbral zodiac
#

does anyone know how you use dynatext i feel like this might be useful to me

manic rune
#

do u have skip_materialize?

next timber
#

i do not

manic rune
#

yeah, add that

#

i think that solved the issue for me

next timber
#

and do you know how to fix the ERROR text by any chance?

manic rune
#

smt in here

#

i took a ss of the solution

next timber
#

this looks like stuff for localisation files which i. do not use because i cant be bothered

#

lol

manic rune
#

oh, oof

#

i dunno then 💔

minor magnet
narrow iron
#

are there any examples for recreating the wheels "nope!" effect?

next timber
#

if you're in a context just return {"message" = "Nope!"}

gentle rain
hushed field
#

break

gentle rain
#

oki

maiden river
# next timber ????

you have to add skip_materialize = true to create_card (or your return table, whichever you're using)

next timber
#

yeah ive figured that out now

#

still dunno how to fix the error text tho

maiden river
#

it's in the docs

next timber
#

i have a group_name though

maiden river
#

what does your code look like

next timber
#

tried as both a string and a table

maiden river
#

interesting

#

I use group_key instead (because I'm a localization file fiend) but it should be working

hushed field
#

I think there is a specific localization entry you wanna do for that pop up text, but I don't know how to set that up when you define loc_txt in file, instead of using a localization file

maiden river
#

(you should use localization files anyway they're better)

gentle rain
#

how would i write a trigger that activates when a card's id is equal to an id in a given table? currently trying if context.discard and not context.blueprint and context.other_card:get_id() == table.concat(card.ability.extra.ranks, ' or ', 1, #card.ability.extra.ranks) then but nothings happening

next timber
#

i cant be bothered to use a loc file, besides my mod is literally so small it doesnt have any jokers

maiden river
hushed field
#

I think the text that pops up when opening packs are misc.dictionary entries. No clue how you'd set that up this way though

maiden river
#

is ranks a table?

hushed field
#

Also, localization files are barely any effort, haha

maiden river
#

kid named dump_loc

next timber
#

what is dump_loc

gentle rain
#

i tried that same thing earlier in a pairs function and it did not properly work

maiden river
next timber
#

handy

maiden river
gentle rain
#

oh it is yeah

maiden river
gentle rain
maiden river
#

on 21 jokers, 43 consumables, and an assload of decks and other misc text

maiden river
# gentle rain oh it is yeah

in that case, you can just use if context.discard and not context.blueprint and inside of that, loop through each rank in the table and check the card's id against that

next timber
#

ok i will figure out localisation files tomorrow after i have sleped

maiden river
#

I do recommend using dump_loc, since it gets everything

gentle rain
maiden river
#

no that should be fine

#

what does the ranks table look like?

gentle rain
#

hm

#

actually i should check how ranks is defined

maiden river
#

because realistically, instead of storing anything complex you can just store a number

gentle rain
#

oh yeah im misunderstanding my own code hard lmao ranks is how many values are left in the table

maiden river
#

that's all the ranks are (in the base game, anyway)

maiden river
minor furnace
#

for my multi-stage boss blind, do I bother trying to make Mr. Bones only carry you to the next wave instead of clearing the whole thing?

thin anchor
#

how would i give an edition to all scored cards?

raw geyser
#

I'm trying to get the floating sprite and the base sprite of a joker to line up for an effect, but they're offset slightly. Anyone know why?

narrow iron
#

shouldnt this apply negative to the first highlighted card?

G.hand.highlighted[1]:set_edition(e_negative, true, false)
pulsar flower
#

i think you want 'e_negative' as a string

#

or {negative = true}

narrow iron
#

yep it needed to be a string

manic rune
#

sushang :3

thin anchor
gentle rain
thin anchor
#

ah

turbid maple
gentle rain
#

for some reason, the presence of a return function here is considered bad syntax

umbral zodiac
gentle rain
#

always works perfectly fine wo it

umbral zodiac
#

i was going to try dynatext but got sidetracked

thin anchor
#

r

gentle rain
#

?

turbid maple
# umbral zodiac i would like the example i didnt get much progress
local _create_UIBox_HUD_blind = create_UIBox_HUD_blind
function create_UIBox_HUD_blind()
    local ret = _create_UIBox_HUD_blind()

    local node = ret.nodes[2]
    node.nodes[#node.nodes + 1] = {
        n = G.UIT.R,
        config = { align = "cm", minh = 0.7, r = 0.1, emboss = 0.05, colour = G.C.DYN_UI.MAIN },
        nodes = {
            {
                n = G.UIT.C,
                config = { align = "cm", minw = 3 },
                nodes = {
                    {
                        n = G.UIT.O,
                        config = {
                            object = DynaText({
                                string = { { ref_table = G.GAME.blind, ref_value = "loc_debuff_text" } },
                                colours = { G.C.UI.TEXT_LIGHT },
                                shadow = true,
                                float = true,
                                scale = 1.2 * 0.7,
                                y_offset = -4,
                            }),
                            id = "blueatro_HUD_timer",
                        },
                    },
                },
            },
        },
    }
    return ret
end

Here's an example that uses dynatext

umbral zodiac
#

oh im so silly in the brain

brazen tusk
umbral zodiac
#

i was looking for things that had blind and then hud not hud and then blind

turbid maple
#

this does this which obviously needs to be tweaked but you get the point

gentle rain
umbral zodiac
#

ty

thin anchor
brazen tusk
#

put it under the break thats under it and see what/if error it gives

turbid maple
gentle rain
limber warren
#

im running into an issue where the stone layer seems to want to stay despite the fact that set_ability is making it a different enhancement. like it has the number / symbol sprite but the stone is above everything else

thin anchor
limber warren
#

what?

#

my ears dont work the way they used to

brazen tusk
gentle rain
narrow iron
#

i made a custom consumable type and im trying to get the descriptions working, i know the layout is

    [CARD TYPE] = {
    [LETTER]_[PREFIX]_[CARD KEY] = {}
    }
}```
#

what is the card type actually supposed to be?

#

and what does the letter mean?

#

nvm i figured it out

umbral zodiac
gentle rain
#

what's with the nil, nil, nil, nil, nil, whenever a card is created

sonic cedar
#

how does steamodded do xmult again?

#

is it Xmult or XMult

minor furnace
#

x_mult

sonic cedar
#

oh neither got it

brazen tusk
#

im trying to load my jokers into my main lua from a seperate file (using KCVanilla as a reference) but it keeps saying these are returning as nil values

sonic cedar
#

thaaaaaaaaaaank you

minor furnace
umbral zodiac
narrow iron
#

my custom consumables are showing "ERROR" as their card type when in a run but show up just fine when in the collection. whats going on?

thin anchor
#

ta dah!!!

gentle rain
#

i really cant figure out the syntax error here for the life of me auuuugh

open aspen
#

from a balance perspective

#

i like the idea of it

midnight coyote
#

hey so i got a really cryptic error

#

im trying to make a joker

#

let me pull it up

midnight coyote
#

bad argument #1 to 'ipairs' (table expected, got string)

thin anchor
open aspen
#

send ur joker

midnight coyote
#

alright

#

one second

#

its gonna be a screenshot because my copy and paste is fucked rn

#

well hold up

open aspen
midnight coyote
#




SMODS.Joker {
    key = "crazy8",
    loc_txt = {
        name = "Crazy 8",
        text = "For every {C: attention}8{} Played, grants {X: mult, C: white}#1#{} Mult."
        
    },
    config = { extra = {mult = 4}},
    rarity = 4,
    atlas = 'joker_atlas',
    pos = {x= 0, y= 0},
    cost = 8,
    loc_vars = function(self, info_queue, card)
        return {vars = {card.ability.extra.mult}}
    end, 
    calculate = function(self, card, context)
        if context.individual and context.card_area == G.play then
            
            if context.other_card:get_id() == 8 then
                return {
                    message = localize { type = 'variable', key = 'x_mult', vars = {card.ability.extra.mult}},
                    xmult = card.ability.extra.mult,
                    card = context.other_card
                }
            end
        end
    end


} ```
#

there

#

i need to adjust some text

#

but thats not the important art

#

part**

open aspen
#

message = localize blah

#

why do all that

old bane
#

does anyone know why the chips, mult, and xmult don't work for editions, but card_limit does? i saw someone else had the same issue so it wasn't just me

midnight coyote
#

i thought it was neccessary?

#

or rather the example

open aspen
#

im almost pretty sure u dont need it if ur returning xmult

#

also

#

i return my message like this

midnight coyote
#

im sure theres some glaring issue im forgetting

#

oh hm

open aspen
#

i dont know if localize is valid for message, it probably is tho so thats fine

#

like i assume it is

midnight coyote
#

alright

#

should i try it without and just put some placeholder text there?

open aspen
#

but like anyways one thing i notice is u dont need that

midnight coyote
#

like just comment out the localize

midnight coyote
#

alright

open aspen
#

just remove message

#

entirely

#

comment the whole line

midnight coyote
#

yeah

open aspen
#

it will say x10 mult by default

midnight coyote
#

just did that let me try the game out

open aspen
#

if u return xMult

midnight coyote
#

is there any way to make it launch faster btw

#

any optimizations, etc

open aspen
midnight coyote
#

yeah that didnt fix anything

open aspen
midnight coyote
#

alr

open aspen
midnight coyote
#

eh, worth a shot

#

my atlas is all in check

open aspen
#

does it

umbral zodiac
# umbral zodiac

ok im silly in the brain but i got it to show this, any idea how i can get the 600 as a normal value so i can square it?

open aspen
#

crash when u open the game

midnight coyote
#

it crashes while it's injecting i think

open aspen
#

i notice

#

it says file not found main.lua

midnight coyote
#

it gets 99% through with the loading bar then it burns

open aspen
#

at the bottom

midnight coyote
#

that doesnt make sense

#

let me try to disable some other mod

#

one sec

open aspen
#

check ur main.lua name and what u have in metadata.json too just to be safe

midnight coyote
#

in lovely?

#

or where

#

sorry for so many questions im just unfamiliar to the whole thing

open aspen
#

you should have a json file and a main file for ur lua code

midnight coyote
#

yeah

open aspen
#

mine is like this

#

main_file is defined as main.lua for me

midnight coyote
#

yeah

open aspen
#

as u can see

#

check and make sure that its the same

#

like i assume

#

it has to be

midnight coyote
#

my main file isnt main.lua but the file name matches up

#

so its successfully loading the mod filkke

#

file**

open aspen
#

ur mainfile is what then???

#

oh

#

i get u

#

nvm

#

like its some other name

midnight coyote
#

i just named it something else

#

yeah

open aspen
#

ok then at least u know it isnt that

#

hmm

#

well its still saying main.lua not found

#

weird

midnight coyote
#

yeah

#

could it be main.lua as in the game's file? would it be worth it to validate my game?

#

and just reinstall lovely?

open aspen
#

to be honest im not sure

#

ive never seen such an error

#

someone else may know

midnight coyote
#

im gonna try thast

#

just take shots ijn the dark

#

unless someone else has a better idea

sonic cedar
#

so why does this crash my game? does steamodded do it different? do i change self to card maybe?

#

wait i should get the crash log

gentle rain
#

bump

#

im bloody lost

sonic cedar
#

line 927 is the local eval part

midnight coyote
#

hmm

#

let me comment out all that joker code and see if its a 'my code' problem

midnight coyote
#

or a something else problem

manic rune
#

never used juice_card_until before so idk :3

sonic cedar
midnight coyote
#

@open aspen there's for sure something fucked about that joker code

#

just commented it out and the game works

gentle rain
# gentle rain

is there like a limit as to how much code can be under smods.joker or some shit

#

im so lost

manic rune
#

whats the crash log?

gentle rain
#

which is the last line

gaunt thistle
#

oh hey that's the exact error I've been fighting

gentle rain
#

oh no shit

gaunt thistle
#

but in lovely within the gamepass binary haha

gentle rain
#

blegh do u have a solve

gaunt thistle
#

my solution was to make sure I wasn't thrashing byte buffers when working with luajit state

sonic cedar
gaunt thistle
gentle rain
#

solution is to "stop thrashing"....... you cant take away my metal liberals!!!!!!!!!!!! cool skeleton flipping off camera png

warped marsh
gentle rain
gaunt thistle
manic rune
#

cats :3

gaunt thistle
gaunt thistle
#

I have no idea why you're having that problem

gentle rain
warped marsh
#

Wanna see my cat?

gaunt thistle
manic rune
#

never send that again.

gentle rain
#

BLAAUUAGAAH

warped marsh
#

BOOM

gentle rain
#

FUCK!!! I HATE IT!!!!!

manic rune
#

oh wow

#

it looks so fluffy :3

sonic cedar
#

why did my game super crash on opening

manic rune
#

i want to hug that carr

gaunt thistle
#

what's a cat

manic rune
#

wet carr

warped marsh
open aspen
sonic cedar
warped marsh
sonic cedar
sonic cedar
warped marsh
#

Hi Toma

gaunt thistle
warped marsh
gaunt thistle
warped marsh
sonic cedar
#

car

gaunt thistle
warped marsh
#

Two cars….

midnight coyote
manic rune
#

carrs

sonic cedar
#

it’s giving the xmult AFTER SCORING 😭

limber warren
#

would anyone be willing to help me out with an error im running into?

midnight coyote
limber warren
#

its a different one this time lol

gentle rain
#

Cool

manic rune
sonic cedar
midnight coyote
gaunt thistle
#

makes sense

midnight coyote
#

otieuaf'MnoetuijbfDBHe

#

aThbtbh iotghbjh

#

i just wanna make a silly

limber warren
# manic rune post it here and i will see what i can do :3
-- Geologist updating
local cardupdateref = Card.update
function Card.update(self, dt)
    if G.STAGE == G.STAGE.RUN then
        if self.config.center.key == "geologist" then
            self.ability.stone_tally = 0
            for k, v in pairs(G.playing_cards) do
                if v.ability.name == 'Stone Card' then self.ability.stone_tally = self.ability.stone_tally+1 end
            end
            return true
        end
    end
    cardupdateref(self, dt)
end

im trying to mimic cloud 9 but with stone cards. i was reading around here abt G.STAGE == G.STAGE.RUN but its throwing errors

gentle rain
gaunt thistle
gentle rain
#

this too has been felt

gaunt thistle
#

hell yeah

feral jay
#

how would i make a custom calculate trigger? i.e. use some consumable, that consumable has a chance to do something which triggers the calculate

limber warren
#

im reading thru previous issues with this and i think i need to run this inside the joker file

#

for some reason there was a msg that said it shouldnt

#

let me test this

toxic flicker
#

so yall how do i get the amount of money the player has

sonic cedar
#

ok pal

#

oh it's

#

it's stuck like this i cant get in

#

(i fixed it and got the joker working thanks for the help)

humble dagger
#

what would i have to add to my smod code to enable me to have 2 seals on top of each other like this?
like how can i remove the 1 seal per card limit?

sonic cedar
#

is a bad allocation crash concerning?

hardy viper
sonic cedar
hardy viper
#

prolly just out of memor y

sonic cedar
#

im restarting this damn computer atp 😭

#

im sorry girl ive been working you too hard

hardy viper
#

if its been on awhile ur memory might just be super fragmented

sonic cedar
#

teach me the tech wise one

hardy viper
#

which seems likely considering it was an error in the graphics library which (unless i fundamentally misunderstand dynamic libraries) has been reusing the same memory space for the dawn of whenever you turned on the pc

sonic cedar
#

funny enough

#

dawn

#

it’s been like 13 hours good lord 😭

tall wharf
sonic cedar
#

me too

#

if only ol girl wasn’t an i3,,,,

feral jay
#

i just went digging and now realize i have no idea how calculate function is actually called, how would i just trigger a specific event

feral jay
#

mmm ok and would that accept a custom event

hardy viper
#

ya pretty sure you can do whatever context you want

#

you just provide the context table iirc

feral jay
#

ok cool that's handy

vocal cedar
#

any good mods with example tarot cards or spectral cards?

open aspen
#

could you simulate seal behaviour with a sticker

humble dagger
open aspen
#

i think u can

humble dagger
#

but how do you even code a sticker

open aspen
#

it isnt too too different from something like an enhancement

rugged pier
open aspen
#

my code is made significantly more complex because i went through the effort of doing custom draw function

rugged pier
#

hey guys, i just created my first joker and was wondering if i could start a run with that joker to see how it functions and test it, is there like a sandbox environment or something i could use?

open aspen
rugged pier
humble dagger
rugged pier
#

but their wiki doesnt have anything related to what im talking about (or maybe im just dumb and cant find it)

open aspen
#

theres a keybind to spawn card here