#💻・modding-dev

1 messages · Page 91 of 1

elder vapor
#

uhh

#

you can assign it to a local variable?

weary jungle
#

OK I DEFINATLY DID SOMETHING

#

its moving around the screen at rapid rate

stiff locust
#

it didn't work

weary jungle
#

i dont think it worked

elder vapor
#

oh

#

the moveable engine class

#

is extended by literally everything in the game

weary jungle
#

i cant record, buttt everything is moving everywhere

#

oopsies

elder vapor
#

ok got it to work, just needed to check if context.other_joker was the card the gem is attached to

hardy viper
#
local str = "Splish Splash"
local tstr = ""
for i, v in string.gmatch(str, "*") do
 tstr = tstr.."{C:goldcolor"..tostring(i%5+1)..v.."{}"
end
#

something like this

elder vapor
#

this is balanced

hardy viper
wintry solar
stiff locust
hardy viper
wintry solar
#

Though I’ve never tried throw in a variable in loc txt, I don’t think it’d work

stiff locust
#

can't i just put this in the loc_vars and do it with that system

weary jungle
#

i dont think thats good

wintry solar
#

No, loc vars doesn’t parse colours

stiff locust
#

oh

#

this is

#

really difficult

zealous glen
#

Wasn’t there one loc_vars for color

#

It was a very specific one though

#

Castle?

elder vapor
#

return { colours = {} }

hardy viper
#

on skib

weary jungle
#

ok its bouncy, but fast

hardy viper
weary jungle
#

ok

elder vapor
#

erm i think i should ignore being upgraded by blueprint

weary jungle
#

how do i slow down the movement

cold peak
#

Sorry to bring this back, I'm looking through the Aura code and it looks like the animation needs to be the size of a card (142x190) is that true? is there anyway to make the animation larger than that? The animation I have is ~160x180

hardy viper
#

you could always just increase game speed and decrease dt by the inverse of that increase

#

oh wait

#

that would do nothing

weary jungle
#

i think only moving every other frame

#

but then it wouldnt be smooth

#

its also spazing out

#

(funny)

placid oasis
#

where do i download cryptid

weary jungle
#

let me experiment in like an hour

placid oasis
#

i need help please

weary jungle
weary jungle
placid oasis
#

ok nice

wooden nexus
#

Odd question: How do I omit a deck from being loaded using SMODS.Back?

hardy viper
#

idk, I think smods objects are only loaded after every mod has loaded so you can just remove it if your mod has a higher priority

wooden nexus
#

I'm not using the default one and it's not a texture pack

hardy viper
#

uh

#

reword the question ?

#

i have no idea what you're trying to do

wooden nexus
#

I'm adding a deck that I'm gonna use for challenges. I don't want it to appear as a selectable deck

#

how do i do it?

#

b_challenge= {name = "Challenge Deck", stake = 1, unlocked = true,order = 16, pos = {x=0,y=4}, set = "Back", config = {}, omit = true},

I saw this code and tried to import it into the the smods with no luck (the omit = true part)

#

and the smods.back doesn't say anything about it

wooden nexus
hardy viper
#

it helps i just don't know the solution

wooden nexus
#

oh

tepid crow
#

I don't think steamodded has any support for that no

humble hound
wooden nexus
tepid crow
#

they want a specific deck art for challenges

wooden nexus
#

mhm

tepid crow
#

but there's no way to specify a deck art without having an actual corresponding deck

#

(as far as I can tell)

cold peak
#

Is there a list of things you can take over with SMODS:take_ownership somewhere that I'm missing? I'm trying to change and animate Soul's floating bit but all I keep getting is replacing the card back, I currently use: SMODS.Consumable:take_ownership('c_soul', {atlas = 'c_soul', soul_pos = { x = 0, y = 0}, prefix_config = { key = false } }, true)

wooden nexus
#

it crashes if you tried to load it

#

It has a thing saying "omit = true" in the code

#

If you try it in your smods the it's no dice

tepid crow
#

yeah steamodded just has no support for omit

tepid crow
autumn coral
#

i think an isaac d4/missingno joker that changes all of your jokers randomly each hand would be interesting (minus the joker itself obv)

#

i might pursue it who knows

weary jungle
# weary jungle

Now that im on my main pc, i can show what this actually looked like

cold peak
weary jungle
#

oh obs.....

tepid crow
rough furnace
weary jungle
cold peak
#

The mod badge shows up in the mod menu and is enabled

rough furnace
weary jungle
cold peak
rough furnace
#

the collection would be fine too

cold peak
#

oh no then, isn't that what the silent part of the takeOwnership call is though?

rough furnace
#

maybe

#

I was just wonderig if the issue was it's not taking ownership or not

cold peak
#

its a good debugging step, let me make that not silent

rough furnace
cold peak
#

Still no badge, no other mods installed

#

well installed but not enabled

rough furnace
#

actually if you change the key to soul does that work?

cold peak
#

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

#

Maybe its not in SMODS.Consumable? The default location of the soul floaty thingy is in the Enhancement image

rough furnace
#

I don't think so

#

hmm that error is odd

cold peak
#
SMODS.Consumable:take_ownership('soul', {atlas = 'c_soul', soul_pos = { x = 0, y = 0}, prefix_config = { key = false } }, false)
``` Just to make sure this is what you meant, I changed the first argument from `c_soul` to `soul`
rough furnace
#

yeah that's what I meant

#

I just tested myself and with ```lua
SMODS.Consumable:take_ownership('soul', { }, false)

cold peak
#

Ok I removed the prefix_config, now I get a launch

rough furnace
#

yeah me too

#

but my soul dissapeared

#

the base sprite did change

cold peak
#

Yeah I get this still

rough furnace
#

I think the background missing is expected cause it's using a pos your sprite sheet doesn't have

cold peak
#

oh maybe?

#

I'll try copying the default soul background

rough furnace
#

oh wait we've been lua'ed

#

indexes start at 1

cold peak
#

so should the x and y be 1?

rough furnace
#

yeah try that

#

although actually I set it to a smaller sprite and it seems to still be rendering the soul under mine

cold peak
#

1s for x and y didn't work

rough furnace
#

what does your sprite sheet look like?

cold peak
rough furnace
#

ok yeah soul_pos = {x = 1, y = 1}, pos = {x = 1, y = 2} should work I think

cold peak
#

and I'm trying this:

SMODS.Consumable:take_ownership('soul', {atlas = 'soul', pos = { x = 0, y = 1}, soul_pos = { x = 0, y = 0} }, false)
#

ok that worked, kinda, one sec

rough furnace
#

yeah the original soul underneath it?

cold peak
#

Yeah I can still see the original soul under it animating around

rough furnace
#

yeah I saw that

#

not sure what's going on

#

@frosty dock would probably know better

cold peak
#

Soul must have some other key that it uses?

#

Is there just a list of the keys somewhere or can I get it via debug statement somehow?

rough furnace
#

I suspect it's probaly hard coded somewhere

#

the soul card doesn't even define a soul_pos

frosty dock
#

I've been summoned?

#

pft the soul behaves weirdly

cold peak
#

I'm trying to change the soul thing on the soul card, I'm able to get it to change to a new sprite, but the original one is still there beneath

#

Yeah

frosty dock
#

it's G.shared_soul or something

rough furnace
#

can SMODS disable rendering it when overwritten?

cold peak
#

so the key would be

SMODS.Consumable:take_ownership('shared_soul', {atlas = 'soul', pos = { x = 0, y = 1} }, false)
``` or something like that?
frosty dock
#

no

rough furnace
#

yeah I found G.shared_soul

frosty dock
#

you just have to change or reassign to G.shared_soul

rough furnace
#

Probably an if check here would work from SMODS side

frosty dock
#

steamodded should maybe normalize that to behave like other soul sprites

rough furnace
#

but yeah SMODS should normalize it

#

also the soul_pos souls behave different than the shared_soul

cold peak
#

Where are you finding that source code?

rough furnace
#

you can unzip the exe

cold peak
#

Oh duh

rough furnace
#

also partial modified sources are availble in Mods/lovely/dump (just files edited by lovely, and their edited source)

frosty dock
#

there's also lovely dumps which show the code after patches

cold peak
#

Ok so what would I overwrite the G.shared_soul with? Would I do

G.shared_soul = SMODS.Atlas { ... }
``` Like how would I create the object to overwrite
rough furnace
#

uhhhhhh

#

maybe try G.shared_soul = Sprite(0, 0, self.CARD_W, self.CARD_H, self.ASSET_ATLAS["yourprefix_soul"], {x = 1, y = 1})

cold peak
#

That gives me an "attempt to index field 'atlas' (a nil value)" error

rough furnace
#

probably the atlas key is wrong

weak brook
#

hey folks

#

trying to implement unlocking mechanics and achievements properly so i'm learning how that stuff works

#

Cardsauce has two legendary jokers and I wanna implement the same vanilla logic for their locked_loc_vars where the description says ???? if you havent discovered the soul card yet but i cant figure out how to implement that

#

you guys know how to do that?

cold peak
#

probably the atlas key is wrong

tepid crow
# weak brook you guys know how to do that?

you need to have unlocked = false as property of the joker, and the way the base game does it is by having a localization entry with unlock = { "text" } (you can see this implemented in the base game localization files)

#

not sure if there's a better method

weak brook
#

the description only shows if you have discovered the Soul card

#

and if you dont it says "????"

tepid crow
#

oh neat, I didn't even know it did that

weak brook
#

yeah its cool and I wanna keep that

#

but when I searched for instances of '?' in the code notepad++ couldnt find anything

tepid crow
#

you're probably gonna have to dig into the base game code for that 😅

weak brook
#

i dug a bit

#

couldnt find it

#

all i found was where the code sets it to the left description if its locked

#

and if its unlocked then it does the else statement to give it its normal effect description

#

didnt see any other check

tepid crow
#

try searching for joker_locked_legendary

weak brook
#

i did that

#

oh wait

#

effect = "Unlocker" is in c_soul

#

seems like a solid lead

#

nope dead end

#

that probably is just there so it can unlock the legendaries anyway

rough furnace
#

probably this

weak brook
#

yeah thats the

#

wait

#

i thought the else statment was for generating the normal effect description but im not so sure now

split creek
#

Hey, i've been having trouble getting a modded effect that's essentially canio (+30 chips whenever a card is destroyed, starts at +30), but it hasn't been working quite right. A lot of the code is taken from vanilla canio

            local cards = 1
            for k, v in ipairs(context.glass_shattered) do
                cards = cards + 1
            end
                if cards > 0 then
                    G.E_MANAGER:add_event(Event({
                        func = function()
                    G.E_MANAGER:add_event(Event({
                        func = function()
                            card.ability.extra.current_chips = card.ability.extra.current_chips + cards * card.ability.extra.chips_per_destroy
                          return true
                        end
                      }))
                    card_eval_status_text(card, 'extra', nil, nil, nil, {message = localize{type = 'variable', key = 'a_chips', vars = {card.ability.extra.current_chips + cards*card.ability.extra.chips_per_destroy}}})
                    return true
                end
              }))
                end
        ```
#
            local cards = 1
            for k, v in ipairs(context.removed) do
                cards = cards + 1
            end
            if cards > 0 then
                G.E_MANAGER:add_event(Event({
                    func = function()
                G.E_MANAGER:add_event(Event({
                    func = function()
                        card.ability.extra.current_chips = card.ability.extra.current_chips + cards * card.ability.extra.chips_per_destroy
                      return true
                    end
                  }))
                card_eval_status_text(card, 'extra', nil, nil, nil, {message = localize{type = 'variable', key = 'a_chips', vars = {card.ability.extra.current_chips + cards*card.ability.extra.chips_per_destroy}}})
                return true
            end
          }))
            end
        ```
#
            return {
                    message = localize{type='variable',key='a_chips',vars={card.ability.extra.current_chips}},
                    chip_mod = card.ability.extra.current_chips
                }
      end
    end```
rough furnace
#

Yeah here are the question marks

weak brook
#

what the

#

how did notepad++ not find those

#

stupid app

rough furnace
#

possibly was treating it as regex

weak brook
#

hm ok

rough furnace
#

or just a wildcard syntax

weak brook
#

is there any examples of modded jokers that use the generate_ui for dynamic descriptions like this so I can reference how they do this

#

i've tried messing with it before and got some jank results

rough furnace
#

uhhhhhhh idk

rough furnace
split creek
#

For example, when two cards are destroyed with hanged man, it gets the buff 3 times

mellow sable
#

that's a lot of code

weak brook
#

ok im not exactly sure now if the proper description is every actually shown in the collection menu at all, it doesnt show when you discover The Soul

#

i think that might just be there for the unlock pop up

cold peak
#

Oh MathIsFun, I'm still trying to get the animated jokers working but I'm getting a crash talking about a nil atlas value when I try to add my joker. I've given up on Soul cause its so weird, but I just wanted to get the animation to work as a proof of concept now. Trying to get the hologram to use this spritesheet (I've separated the backing but its easier to send one file) named j_hologram.png and j_hologram_extra.png, in the aura.lua file I changed:

j_hologram = { frames_per_row = 1, frames = 1, start_frame = 0, extra = { frames_per_row = 8, frames = 8, fps = 10, start_frame = 0 } },
``` but get this error:

engine/sprite.lua:11: attempt to index field 'atlas' (a nil value)

autumn coral
#

how would you go about adding a custom card with custom texture scaling? i'm looking through cryptid and it looks great but it also seems optimized for a LOT of cards, and i just need one

#

:p

zealous glen
mellow sable
autumn coral
#

oh nvm

#

no nvm i got it

#

i was misreading it lol

#

ok sorry for asking probably stupid questions, how do i actually register the new card to like. exist and have a description with smods

#

or is it something i have to callback to the original game for

#

nevermind

#

ok but how does ordering work? is it important

#

do i need to place things at a specific position

crisp coral
#

it's ordered the same as the order you declared them in

autumn coral
#

gotcha

#

i'm just gonna set it to 1 and hope for the best

#

is there any debug way to just. make it appear in my hand

teal estuary
#

debug mode/debug plus

#

i'd recommend plus, but debug mode works

autumn coral
#

okii

#

should custom jokers be in collection...

#

i feel like really stupid rn, lua is sorta new to me? it isn't that new, i've done isaac modding before and i have been doing python/js/c#/c++ for like 10 yrs, i just like. augh

#

okokok, it probably does NOT help that i have not attached like. any code

#
local jokers = {
    "j_gros_michel",
    "j_egg",
    "j_ice_cream",
    "j_cavendish",
    "j_turtle_bean",
    "j_diet_cola",
    "j_popcorn",
    "j_ramen",
    "j_selzer",
}

SMODS.Atlas({
    key = "atlasone",
    path = "atlasone.png",
    px = 71,
    py = 95,
}):register()

local missingjoker = {
    object_type = "Joker",
    key = "missing_no",
    pos = { x = 0, y = 0 },
    rarity = 2,
    cost = 5,
    atlas = "atlasone",
    order = 1,
    blueprint_compat = false,
    eternal_compat = true,
    perishable_compat = false
}

jokers[#jokers + 1] = "j_missingno_missing_no"
#

this is like the whole thing rn, i just based it off of what i saw in cryptid

crisp coral
#

if you add jokers via steamodded's SMODS.Joker then it will be in the collections

autumn coral
#

wait what

crisp coral
#

oh hm

autumn coral
#

how do i do that 😭

mellow sable
#

SMODS.Joker({
…..
})

crisp coral
#

there's an example_mods folder in steamodded's files, go in it and find the vanilla recode mod

#

idr what it's called

autumn coral
#

i literally keep forgetting about that

mellow sable
#

Cryptid uses object_type to determine what to call it with later, because it has an advanced loading system

#

Yeah those examples are much better than Cryptid for starting out imo

autumn coral
#

iunno, this joker is gonna be pretty complicated

#

i literally am going to have it change every joker but itself in hand on each round

crisp coral
#

that doesn't sound too complicated

#

ngl

autumn coral
#

ok i got the example code

crisp coral
#

is it spindown dice by any chance

autumn coral
#

no but that's a REALLY good idea

#

i should do that next

#

it's missing no

#

i was stuck between the actual missing no texture from pokemon, or the one from isaac, or making my own

#

i landed on making my own

#

i found something that corrupts jpg files in interesting ways and edited together a lot of the glitches that i thought were interesting onto the base joker

#

i think it ended up looking cool

#

supposedly the code will work now

#

oh hey it worked

#

wow that was shockingly easy

rough furnace
#

missprint be like

crisp coral
#

misprinting the misprint

autumn coral
#

ah yeah that DOES look like misprint a bit

#

hmmm

rough furnace
#

missprint is designed to be a glicted aestetic, but moreso a card that was printed wrong instead of a sprite that was corrupted

autumn coral
#

yeah

#

i thought about making it work like actual missing no and take random parts of every joker sprite every time it triggers

#

worth mentioning i have 0 clue how to make it callback to something every time a round happens

#

also @crisp coral since you're into the isaac stuff i'm doing, i'll let you decide, should it be every hand, round, or ante

#

i guess ante would make more sense if we're making it true to isaac like how it is every floor

#

i'm thinking about making it eternal too to make the consequences similar to isaac as well

#

i should make a tmtrainer

#

that'd be really interesting i think

crisp coral
#

round balatrojoker

autumn coral
#

oki

crisp coral
#

nah, ante

autumn coral
#

yeah that's what i was thinking honestly

#

it feels more appropriate

#

should i override the existing ante code and just make it check if missingno is there and then trigger missingno?

#

that feels like the simplest way to do this

#

unless if i can embed it into the joker definition

young dew
#

i'm trying to make a card that destroy 2 cards and enhance 2 others, but it crashes when i use it
it tells me something is nil, but i don't know what
here's the code for the card:

use = function(self)
  local destroyed_cards = {}
  destroyed_cards[#destroyed_cards+1] = pseudorandom_element(G.hand.highlighted, pseudoseed('random_destroy'))
  for i=1, #G.hand.highlighted do
    local percent = 1.15 - (i-0.999)/(#G.hand.highlighted-0.998)*0.3
    event({trigger = 'after', delay = 0.15, func = function()
      G.hand.highlighted[i]:flip(); play_sound('card1', percent); G.hand.highlighted[i]:juice_up(0.3, 0.3);
    return true end })
  end
  delay(0.2)

  
  for i=self.config.toDestroy, 1, -1 do
    event({trigger = 'after', delay = 0.1, func = function()
      destroyed_cards[i]:start_dissolve(nil, i ~= self.config.toDestroy);  -- this is the line where it crashes
    return true end })
  end


  local cen_pool = getEnhancements()
  for i=1, #G.hand.highlighted do
    event({trigger = 'after', delay = 0.1, func = function()
      G.hand.highlighted[i]:set_ability(pseudorandom_element(cen_pool, pseudoseed('spe_card')), true);
    return true end })
  end
  for i=1, #G.hand.highlighted do
    local percent = 0.85 + ( i - 0.999 ) / ( #G.hand.highlighted - 0.998 ) * 0.3
    event({trigger = 'after', delay = 0.15, func = function()
      G.hand.highlighted[i]:flip(); play_sound('tarot2', percent, 0.6); G.hand.highlighted[i]:juice_up(0.3, 0.3);
    return true end })
  end
  event({trigger = 'after', delay = 0.2, func = function()
    G.hand:unhighlight_all();
  return true end })
  delay(0.5)
end
autumn coral
#
if context.blind.boss and context.end_of_round then
  (code)
end
``` would this work for what i'm trying to do, do you think?
#

i'm reading through the original game code and i got most of the stuff set up, i'm just trying to figure out how to make it trigger at the end of the round

#

oh wait

#

i can check golden joker maybe?

#

hmmm

#

yeah this seems like the best way...?

#

ohhhhh

#

wait it's just in the. calculate\

#

i'm so stupid

#

ok ok ok

#

this is 100% the easy part, the hard part will be when i have to figure out how to make it um. randomize all of the jokers

#

the callback definitely works

#

i'm getting a weird error that says "for limit must be a number" tho

cold peak
#

sounds like you have a for loop whos loop constraint isn't an integer

autumn coral
#

i didn't have a for loop

#

i think i figured it out

#

huh

#

maybe i need to actually. activate something

#

?

#
calculate = function(self, card, context)
        if context.end_of_round then -- and context.blind.boss <- set after i make sure that this works for what i want it to
            -- this should randomize the jokers!
            play_sound("missingno_static", 1, 1)
            return {
                message = 'Change!',
                colour = G.C.CHIPS,
                card = card
            }
        end
    end
``` this is the calculate code rn
#

i'm not sure why this doesn't work

#

i'm not having it do anything to any cards, so i'm not sure if that's probably the issue...?

tepid crow
autumn coral
#

huh

#

ok now it does nothing

#

lol

#

i need to fix it again

#

sigh

#

yeah iunno now it just doesn't do anything

tepid crow
#

iunno man I'm also just guessing

split creek
#

How would one create a joker of a specific key?

tepid crow
autumn coral
#

the code doesn't actually do anything yet other than play a sound, which is what i'm assuming the issue mighht be

autumn coral
#

there are a few for that in there i thnk

split creek
#

I keep forgetting that smods has utility functions

#

I always check the base game first lol

autumn coral
#

imma go check out gros michel, it seems to do what i am trying

#

i'm thinking it might be the play_sound for whatever reason

#

in any case, this should hypothetically work now

#

that's really funny

#

a negative version of missingno just spawned in a shop lol

#

oh huh it actually worked

#

oh cool ok iunno what i did but it works now

split creek
#

So I'm trying to use smods create_card, but I get told that the t is null
SMODS.create_card(G.P_CENTERS["j_hel_grunch"])

#

Am I getting the joker correctly?

#

I've checked and they key matches up correctly

tepid crow
split creek
#

Ah I see, thanks!

autumn coral
#

this is a very fun challenge ngl

#

i haven't had this much programming in a hot sec

#

ok now i just need to get an array of every single joker in the game currently

#

should be easy, surely

#

i like how i have to kinda think outside the box here because there was no code in the original game to just straight-up change the current joker entirely to something else that i know of

#

interesting, my code actually worked

#

what the hell haha

#

how would you go about just straight up changing every single joker to, let's just say, egg

#

i have it removing the jokers in my hand that aren't missing no and then replacing them with j_egg but there has to be a more optimized way to just like. actually replace them

#

actually, there may be a joker that replaces itself later on, i can't think of anything though...

#

yeah no i'm stumped here

#

i think i got something maybe

#

yea it kinda works

#

hmm

#

i'm so goddamn stupid

#

me when i forget about judgement

alpine steeple
autumn coral
#

can judgement spawn rare jokers (?)

orchid thunder
#

anyoe know a good example of SMODS.RARITIES

tepid crow
autumn coral
#

kk

#

do i need to add the create_card to an event queue? i think it spawns it like. several times

tepid crow
#

sounds more like a context issue

autumn coral
#

ion think so, it's in a loop

#

the context worked fine

#
if context.end_of_round and not context.repetition and not context.game_over and not context.blueprint then -- and context.blind.boss <- set after i make sure that this works for what i want it to
            -- this should randomize the jokers!

            play_sound("missingno_static", 1, 0.25)

            OriginalJoker = card;
            local jokers = {}
            for i=1, #G.jokers.cards do 
              if G.jokers.cards[i] ~= card then
                  jokers[#jokers+1] = G.jokers.cards[i]
              end
            end

            local joker_count = #jokers
            -- is this what's making the weird sound...?
            --G.GAME.joker_buffer = G.GAME.joker_buffer + joker_count

            if joker_count > 0 then 
              for i=1, joker_count do
                jokers[i]:remove()
                -- i'm thinking the 1 is the quality and we're just picking randomly, since I couldn't figure out where else we'd randomly get it from :p
                -- 1/4 chance for the false to be true and for jud to be soul?
                is_soul = love.math.random(0,4) == 4
                local c = create_card('Joker', G.jokers, is_soul, nil, nil, nil, nil, is_soul and 'sou' or 'jud')
                c:add_to_deck()
                G.jokers:emplace(c)
                c:start_materialize()
                --G.GAME.joker_buffer = 0
              end
              return {
                message = "Changed " .. #jokers .. " jokers!"
              }
            end
            return {
              message = "Nothing To Change!"
            }
        end
``` this is the code rn
#

it works, surprisingly

#

i'm going to change the soul chances to be much lower though lol

#

iunno, i just hear multiple sounds when it does this and the event queue jumps by like 20-30

#

i only hear multiple sounds when it's a special edition though

#

adding the event thing was worse sobs

#

it just MIGHT be broken alright

#

MAYBE

#

no clue why this is running it twice i'm ngl

#

maybe it's because it's getting removed from the table?

#

i was looking it up and apparently lua is just weird about that

#

seeing if setting a variable for the card instead of calling the table directly helps

#

um. no it just gave me one of every joker in the game

#

i just thought of probably a much easier way to do this

wintry swallow
#

How is extra not existing in the last line? I feel like I've done this before

 config = { extra = { has_triggered = false} },
  rarity = 2,
  atlas = 'a_circus',
  pos = { x = 1, y = 1 },
  cost = 5,
  loc_vars = function(self, info_queue, card)
    return { vars = { card.ability.extra.has_triggered } }
  end,
  calculate = function(self, card, context)
    if context.joker_main and #context.scoring_hand == 5 then
      if not card.ability.extra.has_triggered then
weary jungle
#

is it self.ability?

elder vapor
#

its not self.ability

autumn coral
#

help 😭

elder vapor
#

card is undefined in loc_vars so it would error

autumn coral
#

the weirdest part is that these cards don't even exist technically

#

if i reload the game they disappear and the right cards stay

#

is there some method i need to call to clear all inactive cards?

#

i have an idea

#

i'm just. using a counter

split creek
#

How do you make a joker not show up in the shop?

autumn coral
#

hopefully this works

autumn coral
#

ok i have determined it is calling this WAY too many times

#

oh yep no i fucked the code up lol

#

functional counter:

#

damn this language is buttcheeks istg

#

it's just. not breaking out of the loop

#

lol

#

ok ok ok, why IS it running like 8 extra times

#

it breaks out of the for loop and then just like. keeps going for some reason?

fluid lagoon
#

is it easy or not to add a new spectral card?

elder vapor
#

very easy

#

SMODS.Consumable and the set as Spectral

autumn coral
#

if context.end_of_round and not context.repetition and not context.game_over and not context.blueprint then this runs 8 extra times for some reason

#

anyone have any thoughts on um. why that might happen and how i could fix it

#

i've narrowed it down to like. this specific line being the issue btw

#

do i need to replace return with eval_status or something

#

huh

#

no clue why this is happening

autumn coral
#

i made this work with the dumbest fucking solution i could think of

wintry swallow
#

If I add a joker, can I see if it was actually bought full-price?

cold peak
#

Does anyone know where/how to directly access the Atlas? I'm still trying to modify the G.shared_soul property and want to set its Atlas to something I added to SMOD's Atlas:

SMODS.Atlas {
  key = "soul",
  path = "soul.png",
  px = 71,
  py = 95
}

G.shared_soul = Sprite(0, 0, G.CARD_W, G.CARD_H, [ATLAS_GO_HERE], {x = 0, y = 0})
``` I've tried `G.ASSET_ATLAS["soul"]` but that gives me an error about indexing atlas (a nil value)
elder vapor
#

atlas = "soul", pos = { x = 0, y = 0 }

cold peak
#

That would work if I was using the SMOD command, but I'm using Balatro's Sprite function

cold peak
# frosty dock pft the soul behaves weirdly

SMOD/Balatro handle the Soul card differently than other cards. You can modify the consumable soul and give it a soul_pos but the defaul soul animation will still be there and playing underneath whatever you give it, we had a discussion about it earlier today

fluid lagoon
#

when making a sheet for jokers, should I start by making them one buy one and then putting onto a bigger sheet or make the sheet and put them on there

cold peak
elder vapor
#

ignore the nils

autumn coral
#

OHHHH MY GOD IT WORKS

elder vapor
#

what works

autumn coral
#

my thing

#

... sorta

#

i need to keep messing with it

#

i made working isaac missingno in balatro pretty much

#

i just need to um. fully get rid of the original jokers i'm replacing

#

which is a fun challenge

cold peak
autumn coral
#

ok since this isn't exactly working for me, how can i insert a new card at a specific index in my jokers

#

it sorta works but i can't sell them

#

i can't sell these for whatevber reason\

#

also they're drawn over everything else which prevents me from selling my joker

cold peak
#

I think to get any further I'm gonna need someone who knows SteamModded better and knows where it actually stores the sprites, I can't understand what I'm reading in the github and my playing around in the dark with the Debug statements is getting me nowhere

autumn coral
#

ITS ALIVE

#

GRTJKHSJKLDFHSDJKL

#

example hand 1 (first image)
example hand 2, after blind completed (second image)

cold peak
#

Nice!

autumn coral
#

this could be the most complicated thing i've ever added to a game

#

i don't think boss blinds are as much fun as i thought they would for changing it up, i think it's gonna have to be every ante

split creek
#

Does anyone know how to make an enhancement not show up naturally (the weight value doesn't actually impact packs, or anything, it's never used by smods)

rough furnace
#

not sure for enhacements but I know other things can do an in_pool function and just return false

cerulean rose
#

is it possible to ban editions in challenges

ocean nimbus
#

any advise on how to modify a save file to remove a joker that is crashing the game?

split creek
ocean nimbus
#

I can navigate the tool I think but I don't really understand how to remove a specific joker from

#

an onggoing save

rough furnace
#

you'll have to do it manually from the JSON

elder vapor
#

aaaaaaaaaaa

rough furnace
#

you probably want some kind of tool to help with handling the JSON but you should be able to find it in cardAreas > Jokers > cards iirc

elder vapor
#

i've had this issue since the start of my mod.. the stickers i have don't want to have a label

ocean nimbus
#

you are seriously overestimating me haha not sure how to open the save

fluid lagoon
#

is there a good way to make a joker card base?

autumn coral
#

check the steammodded example mods

#

they have a lot of good joker examples

ocean nimbus
autumn coral
zenith drum
#

how do I use create_card for jokers of my custom rarity? using it for a booster pack

ocean nimbus
#

might be in the wrong chat

#

not mine

autumn coral
#

probably wrong chat

#

this is for developers

fluid lagoon
#

like the idea of the things in the steammodded folder, but my problem is what to do for making the joker graphic

elder vapor
autumn coral
#

like showing the joker graphic or designing a joker

#

either way

#

the joker in here is very straight-forward

#

just kinda copy how i made my joker graphic and u should be good

cold peak
#

If you want a base to design other Jokers on top of the Joker joker has a very simple art to remove, make this selection and press delete and you basically have a clean slate

autumn coral
#

this too ^^

#

but if you need help with spritesheets n stuff, my mod has a pretty simple one for you to slap this one on top of

fluid lagoon
#

I feel dumb, I didn't think about doing that, and yeah this is going to be the first major mod project ever, my last thing was just to make custom face cards before we had DeckSkins

stiff locust
#

still don't understand how to make a custom moving color

#

i've tried a bunch of stuff but it's always either the same color as the joker UI, or white

#

that makes me think i'm defining the color wrong

#

i can't figure out what cryptid does to make its colors move

#

ooh they hook a color function for it

#

okay hold on

#

holy shit I managed to change the color

#

i had to hook loc_colours to actually define the color

#

that's why it wasn't working

fluid lagoon
#

on a sprite sheet, how far apart do the jokers need to be?

autumn coral
#

how can i make my joker eternal by default

#

i've seen it pretty recently

autumn coral
#

alternatively tho

stiff locust
autumn coral
#

here's the entire balatro spritesheet

fluid lagoon
#

thanks

autumn coral
#

yee!

autumn coral
stiff locust
#

i think you'd do it in set_ability? idk

#

set_ability runs once when the joker is first created, includes when it's in the shop and in packs

#

look at cryptid's cube, it's always eternal

elder vapor
#

been trying to make this sticker work for Jokers for the past hour with no luck 😭 am i doing something wrong

#

using talisman for the x chips

cerulean rose
#

how would i add a ui element to a card like what the fool has?
i'm sure i could do it using lovely patches but is there a way to with SMODS alone?

crisp coral
#

you'll need to override and use your own card ui with card.generate_ui(self, info_queue, card, desc_nodes, specific_vars, full_UI_table)
append the ui nodes to desc_nodes

frosty dock
#

actually it's also supported by loc_vars through returning a UI element as main_end field (though using generate_ui gives full control)

nocturne garnet
#

why can you unlock cards but not lock them wtf.....

elder vapor
#

unlocked = false?

nocturne garnet
#

it does NOT work

stiff locust
#

the jokers you've unlocked are stored in your profile (you could probably manually edit the save to re-lock something (i don't know why you need to do that though))

gritty valley
stiff locust
#

i don't know why you're stopping at the scale of balatro

gritty valley
#

Ofc ofc. Let’s enter mugen levels of modding fuckery

nocturne garnet
#

1 JOKER TO MIDNIGHT.

shell timber
#

evil sob

stiff locust
nocturne garnet
#

No.

#

NEVER.

stiff locust
nocturne garnet
#

would be too overpowered with oopsall6s

stiff locust
#

what

#

no it'd be worse with all 6s

wintry solar
#

No it wouldn’t

nocturne garnet
stiff locust
#

oh

#

wait

#

that makes sense

autumn coral
#

Thinking about today’s isaac item/boss/mechanic i want to recreate

cinder briar
#

One of the setup steps I was sent to start modding included "extracting Balatro [Lua] files", is there a specific tool to do that? I've got all the DLLs from the game folder open in Windows Explorer atm

rough furnace
#

you can run 7zip on the exe

#

mayvbe just changing the extension to .zip might work

#

it's not nessicary but handy

cinder briar
#

It worked off the bat, tysm!

autumn coral
#

I already was planning on specialist at some point

#

Maybe a specialist item that makes legendary cards show up in shops that had the isaac specialist dance in it

#

That actually would be crazy

zealous glen
#

Woohoo

nocturne garnet
gritty valley
nocturne garnet
#

yes

gritty valley
rough furnace
#

find a seed with an early soul and this joker, farm legendaries

gritty valley
nocturne garnet
#

oo

#

yeah ill try

nocturne garnet
#

nvm it crashes already

gritty valley
nocturne garnet
#

obviously

gritty valley
#

From thunk or you

nocturne garnet
#

me

gritty valley
#

Skill issue tbh

gritty valley
fluid lagoon
#

what is the colors used on the different joker text boxes for the stuff like chips and tarrots?

gritty valley
#

Like the colored text?

fluid lagoon
#

yeah

gritty valley
#

You can check the localization folders for the color codes. tarot is like this {C:tarot}Tarot{} card and chips is like this {C:chips}+50{} Chips

#

The codes just go into a string like this

fluid lagoon
#

do you need the attention part?

gritty valley
fluid lagoon
gritty valley
#

It's the orangish-yellow color

gritty valley
#

Why is this happening :(

#

Oh wait nvm

rough furnace
#

hmm actually that should work

#

@frosty dock

wintry solar
#

do you even need the galdur dependency?

gritty valley
rough furnace
#

oh

#

right ID not name

gritty valley
hardy viper
#

especially not with the current dependency system

rough furnace
#

I mean it's easier for development to only do one way and then once finished then make it work with both

wintry solar
#

yeah but if they're just adding decks you dont require galdur

hardy viper
#

^

rough furnace
#

oh

wintry solar
#

sure, it's nice, but it's not what the dependency system is for

rough furnace
#

I see

#

Yeah probably just recommend galdur for users

gritty valley
#

Fair, I'll probably end up only adding it as a dependency if the UI changes are too much of a hassle to keep up with both versions.

wintry solar
#

what UI stuff are you adding?

gritty valley
#

I wanna add b-side decks, and I wanna do an animation for the switching of decks. I haven't fully worked it out in my head yet so I'll definitely first have to see how hard it is to do first.

torpid dagger
#

If I wanted to keep specific tags from appearing until Ante 4 what would I need to do? I'm not sure where to even start trying to do that.

gritty valley
#

I would start by looking at the source code for where tags are randomly chosen

tepid crow
#

there's a min_ante for tags iirc

#

(or something like that)

fluid lagoon
#

am tying to figure out how to tell the game to add chips when an enhanced card is played

torpid dagger
gritty valley
#

It's in commen_events.lua under the func get_next_tag_key

#

Yeah there is

hardy viper
torpid dagger
gritty valley
# gritty valley

Kind of weird that tags use .requires. Are any tags even locked behind a discovery?

tepid crow
#

some yes

#

I don't even think the collection shows it though

#

Five tags also have a hidden unlock requirement: for the Rare tag you need to have discovered Blueprint, and for the Negative, Foil, Holographic and Polychrome Tags you need to have discovered their respective editions.

gritty valley
weak depot
#

can y'all help me out here? i've been trying for a while now but i'm having trouble figuring this out, it's throwing an error here. any thoughts?

SMODS.Joker {
    name = 'Black Friday',
    key = 'j_bla',
    atlas = 'blajokeratl',
    rarity = 3,
    cost = 8,
    unlocked = true,
    discovered = true,
    blueprint_compat = true,
    config = {extra = 25},
    loc_txt = {
        name = 'Black Friday',
        text = {
          "{C:attention}+2{} card slots available in shop",
          "when you have less than {C:money}$25{}"}
    },

    calculate = function(self, card, context)
        if G.GAME.DOLLARS < self.ability.extra then
            if context.end_of_round then
                G.E_MANAGER:add_event(Event({
                    func = function ()
                        change_shop_size(2)
                        return true end
                }))
            end
        end
    end
}
rough furnace
#

what is the error?

weak depot
#

again i'm trying to have it add 2 card slots to the shop, but only when you have 25$

rough furnace
#

self doesn't have an ability. Probably want card.ability.extra

weak depot
#

oopsie!

#

okay, i'll try that :>

#

okay, now it's not throwing out an error per se, but it's definitely not... doing the intended thing

#

cardsplosion

wintry swallow
#

It's G.GAME.dollars

weak depot
#

yeah, fixed

#

still doesn't really work though

#

is there like a thing to get it to trigger once that i'm not doing properly?

cinder briar
gritty valley
#

Yeah that's the only thing I would think of

cinder briar
#

(I assume you can add new flags in the globals object) (Is Lua even object-oriented I'm used to C/C++?)

rough furnace
#

this might be a lovely patch thing

#

cause though that would work you could jsut sell the joker before selecting the blind and then your +2 doesn't go away

#

hmm this effect is kidna weird as a conditional joker

#

this feel like credit card or oops where it modifes a value outside it's thing

#

and if it was just that you could use the add to deck and rermove from deck effects to modify it

#

but it doesn't really work when conditional

#

I guess you could just store something in your ability for is active and then when remove_from_deck or the blind selected calcualte are called then reset it

weak depot
#

i might just scrap the idea tbh 😭

autumn coral
#

i was thinking while playing isaac

#

i think an r key joker would actually be crazy

#

sell it to return to ante 1 with all of your jokers and hand

#

my goal is kinda gonna be to make one new isaac mod thing a day

rough furnace
#

you're never going to beliove this

autumn coral
#

so i guess this is today's idea

#

NOOOO

#

ARE YOU KIDDIN GME

autumn coral
rough furnace
#

I mean you can still just mkae one

#

theres a few mdos that have the same jokers

autumn coral
#

isaac_repensive it's not the same

#

i did do missing no though which was so technical i almost got a migraine from it

#

table shifting in lua is no fucking joke

#

i still don't like how unoptimized + unbalanced it is

#

btw, while you're here, how can i make it immediately eternal when it shows up in-hand

#

or like. explicitly show up in shops as eternal even in non-eternal stakes

#

that's my idea of how to balance something this ridiculously op

rough furnace
#

uhhhhh you might need a lovely patch

autumn coral
#

fug

rough furnace
#

I know cryptid does it with cube

autumn coral
#

i've made other patches without lovely stuff that has worked fine

#

incheresting tho

rough furnace
#

lovely is generally more powerful

autumn coral
#

how can i make it eternal though

rough furnace
#

also since SMODS depends on it you can rely on it being there

autumn coral
#

i tried card:make_eternal() but it threw an error

rough furnace
#

I swear theres a method for it but in my code I just do _card.ability.eternal = true

#

actually

autumn coral
#

yeah wait how would u implement it

#

because i don't need it to spawn eternal as long as it becomes eternal on the first hand

#

i'd put it right here

rough furnace
#

you could add it to add_to_deck

autumn coral
#

whuh

rough furnace
#

oh wait

#

I found smth

autumn coral
#

oh?

rough furnace
#

stick eternal = true into config

autumn coral
#

SMODS.Joker { config={} } or something else

rough furnace
autumn coral
#

i don't have a config on this joker since it doesn't add any mult

rough furnace
autumn coral
#

ahhhh

rough furnace
#

I belive config is what ability is set to by default

autumn coral
#

ok i tried that

rough furnace
#

you might still want to do it in add to deck in case something decides to remove it

autumn coral
#

i'll report back if it works

#

it did spawn as eternal

rough furnace
autumn coral
#

i need to check the shop tho

rough furnace
#

it should be fine

#

it was eternal in the collection for me even

autumn coral
#

it worked!

#

this mod is so interesting honestly

#

i'm considering whether i should lock in the changed jokers as well?

#

what do you think

#

do you think that missingno penalty should be no-sell for all jokers after it rerolls them

#

because as you said, i can set that in add_to_deck :p

rough furnace
#

idk what missingno does

autumn coral
#

oh!

gritty valley
#

Where is the code for flipping a card object and changing it's base. I wanna do something similar but with the back of the card instead.

autumn coral
#

o

#

i'd throw a video in here

#

actually

#

give me like

#

3 minutes

#

ignore the fact that all of them are negative i made a mod that does that lol

#

actually it probably helps to show it without

gritty valley
#

There a mod that let's you resart the game by ctrl+r?

autumn coral
#

just hold down r for 5 seconds

gritty valley
#

I mean like the whole game

autumn coral
#

wdym

gritty valley
#

Like how you can restart the game from the error screen

autumn coral
#

OH

#

good question actually

rough furnace
#

I think hold m

autumn coral
#

this shit is annoying to constantly relaunch from steam 😅

rough furnace
#

SMODS adds a keybind

mellow sable
autumn coral
#

so the moral of the story is that smods should get better documentation, right?

#

😭

rough furnace
#

no thats balatro itself

gritty valley
#

Fuck yes

#

Well tbf balatro should get better documentation smile

autumn coral
#

yeah it's thunk's fault for my pain

#

#blamethunk

#

#thunkisoverparty

#

i guess this joke is less funny because twitter is deader than the strippers in my garage but i'm making it anyway

rough furnace
#

truely a thunk moment

#

I suspect this isn't even intended behaviour but jsut a silly side effect of balatro's design

autumn coral
#

to be fair, the way that missingno works was 100% not implemented into balatro and was a pain in the ass to figure out how to functionally pull off

#

which did abuse some of the stuff that existed to make itself work

rough furnace
#

wait I think my SMODS keybind patch isn't matching

#

ok I was right hold m was it, but since my patch failed it didn't work

#

it's a cryptid patch

#

why are cryptid patches breaking everything

mellow sable
#

Didn’t you know? Late November is when it was prophesied that Cryptid’s patches would start failing

#

nah I’m just joking, lmk if there’s anything on my end to make the patches less incompatible

autumn coral
#

as written in the scrolls

rough furnace
#

probably if anything big mods like SMODS and cryptid should get better at watching for patchs failing and making sure they aren't breaking patches

#

SMODS should also maube move it's priority a little earlier just so it's more likely to inject and people arent relying on patching with or withut smods depending on how lovely feels that day

mellow sable
rough furnace
#

yeah

mellow sable
#

It’s been WIP for like a month lol

rough furnace
#

I wonder how many 0.6.0 patch issues would be solved if SMODS just changed it's priority

#

I wonder how many new issues it would cause too

#

maybe I should go through all my patch issues rn and make some pr's

edgy reef
#

We should also think about re-organizing the patch files, 38 files for lovely patches feels a bit too many.

#

Especially for the few that share names

rough furnace
#

idk if it's to many

#

naviagting a massive patch file isn't nice

#

I've been thinking about splitting DebugPlus's patches and I only have 21

#

Cryptid has 251 patches

#

SMODS has 488

#

Right now I have 21 patches that fail to load

#

oh 23 misscounted

elder vapor
#

how do you have 23 failed patches 😭

mellow sable
#

I think combined from all those mods

rough furnace
#

23/809 is only like 3% of my patches

#

oh actually math I broke the keybinds, you just broke the hold m keybind

elder vapor
#

is it me or does debugplus's config not save

rough furnace
#

it saves but it doesn't load

#

well it didn't I fixed it today

#

but you'll have to remake it cause the config format was changed

mellow sable
rough furnace
#

you know if we had wildcard targets in lovely talisman could just patch every number to use to_big

#

I found a cryptid patch that might've never matched

#
[[patches]]
[patches.pattern]
target = "functions/UI_definitions.lua"
pattern = "{card_limit = _size, type = 'consumeable', highlight_limit = 1}"
position = "at"
payload = "{card_limit = math.max(1,_size), type = 'consumeable', highlight_limit = 1}"
match_indent = true``` seems every instance of your thing ends with a )
#

I guess possible thunk changed it

cold peak
#

So to create a new sprite for G.shared_soul I need an Atlas, the game itself does that via self.ASSET_ATLAS, but when I try to access that in my lua file G.ASSET_ATLAS is nil (sendDebugMessage(tostring(G.ASSET_ATLAS)) returns and prints nil) How would I access this properly?

rough furnace
#

when is your code running?

#

Also I'm thinking you might just be able to store your atlas from when you create it and then set it

cold peak
#

Uhh I'm not sure I guess, its just in a folder at %appdata%\Balatro\Mods\MyMod

rough furnace
#

Ok so when SMODS loads

#

unless it's a lovely patch

cold peak
#

Uhh those are .toml files right? No this is a .lua file

rough furnace
#

yeah

#

is it G.GAME.ASSET_ATLAS?

cold peak
#

This is the line from game.lua:

self.shared_soul = Sprite(0, 0, self.CARD_W, self.CARD_H, self.ASSET_ATLAS["centers"], self.P_CENTERS.soul.pos)
#

Doing this no longer crashes but I still am not modifying the shared_soul

local soulAtlas = SMODS.Atlas {
    key = "soul",
    path = "c_soul_extra.png",
    px = 71,
    py = 95
}

G.shared_soul = Sprite(0, 0, G.CARD_W, G.CARD_H, soulAtlas, { x = 0, y = 0 } )
rough furnace
#

that should modify the soul

cold peak
#

Yeah, it should be red if it worked, but still the default

rough furnace
#

also I think x= 0, y = 0 won';t work

#

just checked and G.ASSET_ATLAS does exist, at least at the title screen

#

actually

#

I wonder if the shared soul is being loaded after your mod

cold peak
#

Thats my only thought at this point, is there a way to make it load later?

rough furnace
#

you could hook or patch some function that is only called later

cold peak
#

Would that look like this (taken from Aura)

local upd = Game.update

function Game:update(dt)
  upd(self, dt)
  -- their code
end
humble gale
#

so quick question, this code below executes several times at the end of round and i dont know why.

if context.end_of_round and not context.game_over and not context.repetition and G.GAME.blind.boss and not context.blueprint then
   G.E_MANAGER:add_event(Event({
       trigger = 'after',
       delay = 0.2,
       func = function()
             G.GAME.interest_cap = G.GAME.interest_cap + card.ability.extra.interInc
             card_eval_status_text(context.blueprint_card or card, 'extra', nil, nil, nil, {message = "Upgrade!"})
       return true end}))
end

like, i see upgrade message pop up several times and the interest cap goes up several times while i only want it to execute once

rough furnace
#

hmmm

#

someone else was also having some weird behvaiour with end of round effects too earlier

#

wonder if there is some kind of bug

humble gale
#

yeah, one some of my other jokers i just used a bool to stop it

#

but i wanted to know if i was doing something wrong

#

and thats why it was happening

rough furnace
#

I'm not too familar with why that's happening

cold peak
#

Wilson think I could do this

local start = Game.start_up
function Game.start_up
  start(self)
  local soulAtlas = --my code here
end
gritty valley
#

What's the dif between P_CENTER_POOLS and P_CENTERS?

rough furnace
#

Ok went through my patch conflicts. Ignored the talisman ones cause I didn't want to read talisman patches and figure out who was touching random numbers

cold peak
rough furnace
#

I just deleted 250mb worth of lovely logs

elder vapor
cold peak
#

Thats a lot of logs

cold peak
#

Hmm, now I'm getting startup yelling about a self being nil...

rough furnace
#

Its not getting its args properly

cold peak
#

Fixed the nil self (it was because I had () on the local variable) However, its still not working, but I know why! its not running my startup function, or at least my debug statement isn't getting printed

local start = Game.start_up

function Game.start_up(self)
    start(self)

    local soulAtlas = SMODS.Atlas {
        key = "soul",
        path = "c_soul_extra.png",
        px = 71,
        py = 95
    }

    G.shared_soul = Sprite(0, 0, G.CARD_W, G.CARD_H, soulAtlas, { x = 0, y = 0 } )

    sendDebugMessage("In startup")

end

sendDebugMessage("Not in startup")
``` Not sure why its not running my startup function
weary jungle
#

ok im gonna FOCUS now.

#

sidabling cryptid.. its getting serios

#

oh this is all fps based....

humble gale
#

anyone know how to get the name of a highlighted joker?

weary jungle
rough furnace
cold peak
#

Whats the keybind to restart with SMODS?

rough furnace
#

hold m

cold peak
#

Ah, I tried ctrl + r, holding ctrl r, and the same for just R

weary jungle
#

ok, things are bouncy, but something is wrong with anything besides the menus, but only specific menus

cold peak
#

Its working!!!

rough furnace
rough furnace
#

oh wait I messed up edited

#

G.localization.descriptions[card.config.center.set][card.config.center_key].name also works for more types of cards

cerulean rose
#

trying to hook the consumable usage from the fool and its not working

[[patches]]
[patches.pattern]
target = "functions/misc_functions.lua"
pattern = '''
if card.config.center.set == 'Tarot' or card.config.center.set == 'Planet' then 
  G.E_MANAGER:add_event(Event({
    trigger = 'immediate',
    func = function()
      G.E_MANAGER:add_event(Event({
        trigger = 'immediate',
        func = function()
          G.GAME.last_tarot_planet = card.config.center_key
            return true
        end
      }))
        return true
    end
  }))
'''
position = "after"
payload = '''
else
  G.E_MANAGER:add_event(Event({
    trigger = 'immediate',
    func = function()
      G.E_MANAGER:add_event(Event({
        trigger = 'immediate',
        func = function()
          G.GAME.yart_last_other = card.config.center_key
            return true
        end
      }))
        return true
    end
  }))
'''
match_indent = true
rough furnace
#

pattern matches don't work with mutiple lines in the pattern

cerulean rose
#

checking the dump indicates that the patch applied successfully

rough furnace
#

really?

cerulean rose
#

yup

weary jungle
#

lovely patches are so awesome!

cerulean rose
#

hallucination but bigger

elder vapor
weary jungle
#

bouncy

#

its not working well

rough furnace
#

also pro tip shift + /

weary jungle
#

yea but it feels like im a steriotypicle hacke

cold peak
#

Is shift + / supposed to do something?

weary jungle
cold peak
#

Very followable gameplay!

weary jungle
#

add this to the next cryptid patch

rough furnace
cold peak
#

ah

weary jungle
#

i should figure out what the hell this function does before i do wierd things with it

rough furnace
weary jungle
#

what is dt

cold peak
#

delta time?

#

change in time

weary jungle
#

oh

humble gale
weary jungle
#

that makes sense

#

i thought it was derivitive of t or something 😭

cold peak
#

if its an update method its almost certainly delta time, but it could be context specific

#

you could be doing integrals in balatro who knows

weary jungle
#

its definitly delta time

#

i also thought it was distance time

cold peak
#

technically? not wrong

elder vapor
#

dt is always short for deltatime imo

weary jungle
#

now i have to figure out why my code works on some things but not others

elder vapor
#

basically the time in-between frames

weary jungle
#

ik

elder vapor
weary jungle
#

yay!!!! patches!!!!

#

(self.role.wh_bond == 'Strong' and (self.velocity.x * 8)) or (self.velocity.x * 2) am i dumb?

#

isnt that how that works??

fluid lagoon
#

am trying to figure out how to make this joker check to see if a enhanced card is played and then ad chips if one is played

faint yacht
#

Check for card.ability.name ~= "Default Base".

fluid lagoon
#

so that is the check for enhanced? but after how do I make it add the chips?

faint yacht
#

You return chips = card.ability.extra.chips.

fluid lagoon
#

and I need to give my joker the ability to give the extra chips?

faint yacht
#

Define such under the config part, yeah.

fluid lagoon
#

would it be chips = 50 for adding 50 chips

faint yacht
#

Yeah.

fluid lagoon
#

awesome

fluid lagoon
cerulean rose
#

~

fluid lagoon
#

thanks

cerulean rose
#

incantation overrides the same function

#

also for whatever reason listing the mod conflict in the header doesn't do anything

fluid lagoon
#

am getting a weird error saying there is an unexpected symbol near my ending }, but all there is if the 'end' for my function and the comment of the code end

cerulean rose
#

can you show the whole context?

fluid lagoon
#

like the section of the code?

cerulean rose
#

yeah

fluid lagoon
#

``SMODS.Joker{
key = 'bendWill',
loc_txt = {
name = 'Bend Will',
text = {
'{C:chips}+50{} if a enhanced',
'card is played'
}
},
atlas = 'Jokers',
pos = {x = 0, y = 0},
cost = 2,
blueprint_compat = true,
config = {
extra = {
chips = 50
}
},
calculate = function(self,card,context)
if card.ability.name ~= "Default Base" then
return {
card = card,
chips = card.ability.extra.chips,
message = '+' .. card.ability.extra.chips,
colour = G.C.CHIPS
}
end
}

------------MOD CODE END----------------------``

tepid crow
#

count your brackets, ,s, and ends carefully, you're probably missing one

cerulean rose
#

missing an end in calculate

fluid lagoon
#

where should it be going?

cerulean rose
#

after the return

fluid lagoon
#

thank you

#

and I just tried using it, it was giving chips on discard and when I went to play a hind it crashed with the info of main.lua:1794: functions/state_events.lua:1099: 'for' limit must be a number

cerulean rose
#

you also need to check for the correct context

fluid lagoon
#

???

fluid lagoon
#

the calculate and context parts are confusing me

cerulean rose
#

this differentiates cards which trigger in different contexts (onyx agate, which triggers during card scoring; vs sly joker, which triggers during joker scoring; vs hallucination, which triggers when a booster pack is opened)

cerulean rose
gritty valley
#

What table does SMOD put custom deck keys in? I've tried pulling from G.P_CENTERS but it's key isn't there.

cerulean rose
# rough furnace it should disable your mod

heres the mod header btw

--- STEAMODDED HEADER
--- MOD_NAME: Yet Another Reversed Tarot mod
--- MOD_ID: YART
--- MOD_AUTHOR: [DigitalDetective47]
--- MOD_DESCRIPTION: A Balatro mod that adds reversed tarot cards to the game
--- CONFLICTS: [incantation]
--- DISPLAY_NAME: YART
--- BADGE_COLOR: A782D1
--- PREFIX: yart
rough furnace
#

I think you migjht need to spcify a version

#

=0 should work I htink

tepid crow
#

that seems weird

#

you shouldn't have to 🤔

rough furnace
#

hmm the example doesn't have a version

tepid crow
#

yeah exactly

cerulean rose
fluid lagoon
cerulean rose
#

reference code for other mods

fluid lagoon
#

was trying but it I am struggling to understand how I need to do the calculate and context parts for my joker

tepid crow
#

oh the id pattern match is (.-)[<>] (match any character zero or more times, followed by either < or >)

#

wait that's been broken for 6 months

#

???

hardy viper
#

mfw I launch balatro and bsod

#

some system driver crashed for some reason

tepid crow
#

windows bsod?

#

🤣

#

nice

hardy viper
#

pc restarted too fast to see which one and I honestly can't be bothered finding the crash log

tepid crow
#

I've only ever seen the Löve bsod

#

never had my balatro crash my entire windows before 🙃

fluid lagoon
tepid crow
#

Removing that does actually crash btw. Has to do something with other mods creating objects. I dunno, didn't look much further into it

tepid crow
fluid lagoon
#

so for the case of what I am trying to do, the context would be checking if the card is enhanced?

tepid crow
#

no, that's not a context

#

that's not a when

#

the context you're looking for is probably "on card scored"?

fluid lagoon
#

so with the context of on card scored, I then check to see if it was enhanced and it it was then give chips

tepid crow
#

yeah!

#

I suggest you look at the walkie talkie example, it should have similar context

tepid crow
fluid lagoon
#

trying to do it to when it scores

#

but what is the context.individual

tepid crow
#

so for every enhanced card right?

fluid lagoon
#

yeah that is played, also have been editing what the text is going to say for the joker

tepid crow
#

sure

fluid lagoon
#

this page is a bit confusing

tepid crow
#

I know 😩

fluid lagoon
#

but what I am guessing is that the context.individual tells to check the stuff of a chard played

mystic river
#

you have to remove the other mod entirely

tepid crow
mystic river
#

i feel like a behavior like that has to have been intentional
... but i have no idea what the benefit is lol. i consider it a bug

fluid lagoon
#

so far for the effect of the joker I have gotten
calculate = function(self,card,context) if context.individual and context.cardarea == G.play then if context.other_card: end

tepid crow
fluid lagoon
#

so with what I have for the calculate part so far, what do I need to do to check for any edition

faint yacht
fluid lagoon
faint yacht
#
if card.ability.name ~= "Default Base" then
  ...
end
fluid lagoon
#

thank you

#

this is what I ended up with but an getting an error saying ' '}' expected [to close '{' at line 17 (the line where I started for making this joker)] near calculate

    key = 'bendWill',
    loc_txt = {
        name = 'Bend Will',
        text = {
            '{C:chips}+#50#{} when a enhanced',
            'card scores'
        }
    },
    rarity = 1,
    atlas = 'Jokers',
    pos = {x = 0, y = 0},
    cost = 3,
    blueprint_compat = true,
    config = {
        extra = {
            chips = 50
        }
    },
    
    loc_vars = function(self, info_queue, card)
        return {
            vars = {card.ability.extra.chips}
        }
    end
    
    calculate = function(self,card,context)
        if context.individual and context.cardarea == G.play then
            if card.ability.name ~= "Default Base" then
                return{
                chips = card.ability.extra.chips,
                card = context.other_card
                }
            end
        end
    end
}```
nocturne garnet
#

more sprites :3

crystal willow
#

so Im attempting to get into modding and to test my jokers out Id like to make a custom challenge and put them in there

#

How do I add a custom challenge to my mod?

fluid lagoon
#

well there is a debug mod that allows you to give yourself the joker to test

crystal willow
#

hm

#

I do want to check that out but Im also planning on making custom challenges in the future

fluid lagoon
#

ok

crystal willow
#

Do you know how to implement custom challenges?

fluid lagoon
#

I personlly don't, but there are some awesome peeps in here that will be able to help

faint yacht
stiff locust
#

trying to make a gradient color the way cryptid does it, but it's crashing here and i can't understand why
the error log says it's crashing because "Tsunami" is a nil value
the red underline and error warning are also there in cryptid's code for this, but it doesn't crash for cryptid and it makes no sense to me

#

i would've posted in their server abt this but i didn't know where to put it

faint yacht
#

...Cryptid is a global that's set by MODID, no?

stiff locust
#

oh god is it case sensitive

#

no the ID on mine is capitalised

crisp coral
#

Cryptid initializes its global with Cryptid = {} beforehand

stiff locust
#

oh is it that easy

#

i did try searching for the word cryptid in the files and then i realised

#

that's gonna be really slow to look through

#

oh my god it was that easy

#

well it's not crashing? but the color isn't working

#

progress i suppose

#

i'm guessing i did another thing wrong but i don't know what

#

the update loop is working it's just not updating the colors?

#

well i don't really know what it's doing to the color it's just making it look like that

#

tsun is my mod prefix

#

holy shit wait hang on

#

it's doing something

#

it's
the wrong color but I figured it out

#

it's just going through all the colors

#

the colors I put in at the start don't matter

hybrid iris
#

yippee

teal estuary
#

purdy

elfin nova
#

Hello, I try to learn modding on Balatro. How you test cards, an easy way exist for spawn joker, taro, playing card... like a console ? What is our workflow for test ?

faint yacht
crisp coral
faint yacht
#

¯_(ツ)_/¯

wintry solar
#

also looks like this one only works for jokers and consumables, you cant do anything with any other object you're working on