#💻・modding-dev

1 messages · Page 109 of 1

nocturne garnet
#

what the fuck is big_juice

night pagoda
#

it's just juice_up with specific reoccuring values

nocturne garnet
#

ohhh

#

okay so the hindered effect just does not work for me 😭

night pagoda
#

oof

nocturne garnet
#

it just gets destroyed anyways

#

might just be an old version

night pagoda
#

conflicting patches?

storm oar
#

asked this earlier but never got an answer, but is it possible to do something where upon restarting a run, i can show a voucher popping up and dissolving, and the joker corresponding to that voucher appearing and being added?

nocturne garnet
#

(no idea how lovely patches work)

wintry solar
#

I don’t think youd find hindered in cryptids stake toml file

nocturne garnet
#

i just forgot to remove that search thing

night pagoda
#

???

wintry solar
#

You want to search across your entire workspace

nocturne garnet
#

bunco's hindered sticker is incompatible with cryptid

#

because of fuckin swag points

nocturne garnet
#

thas why im searching in the cryptid stakes toml file

storm oar
#

where's the save located so i can copy a save to test the reincarnation ability easier?

crisp coral
#

this is why we don't use at patches

crisp coral
nocturne garnet
#

the most useless synergy ever 🔥

wintry solar
night pagoda
tall wharf
#

🔥

nocturne garnet
#

too op...

#

might have to nerf

#

hindered tag's overpowered

storm oar
#

is there a way I can run a function directly after a run is started?

crisp coral
wintry solar
#

I suppose it is destructive but it’s be unlikely to cause issues

storm oar
#

and also what would the best way to replace a card in a deck?

wicked leaf
#

how do you make floating sprites?

#

workin on... smth.

crisp coral
#

same size as the joker

tall wharf
zealous glen
final marsh
#

Is there like, any way to change playing card base chip values only when they're played, I'm making a joker that reduces all numbered card values to 1 (that's not all it does but that's the part I'm struggling on)

storm oar
merry raven
#

Holy fuck that's amazing

storm oar
#

may need to lower the chance for it though

merry raven
#

I may come to you to copy your code if I ever do UI shenanigans

storm oar
#

i just looked at how it was done for taikomochi since it messes with the game over ui as well

#

but yeah now i need to add the visual effect for the cards that were carried over as well as the jokers to go with that

crisp coral
#

who wants to play "count nodes for shop ui" FaustBuffer

storm oar
#

oh no

merry raven
#

Making more progress

violet void
storm oar
#

if i had to figure out the ui stuff myself i would have just given up on the idea entirely

merry raven
#

Thanks! Not much of an artist myself so I'm just bullshitting

#

I wonder if it's possible to cram two Enhancements into one playing card

storm oar
#

not really, but you can just add a new thing to it

wicked leaf
merry raven
#

It's inspired by Destiny 2

storm oar
#

not sure how to draw it, but possibly could do something where it uses a different variable that's a table of enhancements for the cards

tepid crow
#

Steamodded has been working on multi-enhancements

nocturne garnet
tepid crow
#

Not sure if it's been merged yet though

storm oar
nocturne garnet
storm oar
#

planning on the vouchers to be shown as generic ones until you experience said afterlife then the next time you encounter the voucher it will actually tell you which one it is

wintry solar
#

qunatum enhacnements is merged

nocturne garnet
#

this will truly be peak

wintry solar
#

I don't know how they work though

#

ask math

night saddle
#

Hey I'm stuck on a part. I want to get the current money I have in game. I cant seem to find that in steammoddeds documentation. Does anyone know how?

#

Im trying to make a mult increment for every 6 bucks

supple folio
#

Hey, is there somewhere I can find a list or something of all of the colors I can use for messages and text?

merry raven
#

Is there a context for checking if a card is debuffed? I'm making an enhancement that it is immune to debuffs

night saddle
#

do II have to floor it or does lua automatically do that?

hardy viper
#

or do those point to the same table

merry raven
crisp coral
# hardy viper isn't this incomplete? aren't the colours searched for in G.C
function loc_colour(_c, _default)
  G.ARGS.LOC_COLOURS = G.ARGS.LOC_COLOURS or {
    red = G.C.RED,
    mult = G.C.MULT,
    blue = G.C.BLUE,
    chips = G.C.CHIPS,
    green = G.C.GREEN,
    money = G.C.MONEY,
    gold = G.C.GOLD,
    attention = G.C.FILTER,
    purple = G.C.PURPLE,
    white = G.C.WHITE,
    inactive = G.C.UI.TEXT_INACTIVE,
    spades = G.C.SUITS.Spades,
    hearts = G.C.SUITS.Hearts,
    clubs = G.C.SUITS.Clubs,
    diamonds = G.C.SUITS.Diamonds,
    tarot = G.C.SECONDARY_SET.Tarot,
    planet = G.C.SECONDARY_SET.Planet,
    spectral = G.C.SECONDARY_SET.Spectral,
    edition = G.C.EDITION,
    dark_edition = G.C.DARK_EDITION,
    legendary = G.C.RARITY[4],
    enhanced = G.C.SECONDARY_SET.Enhanced
  }
  return G.ARGS.LOC_COLOURS[_c] or _default or G.C.UI.TEXT_DARK
end
#

lmao

hardy viper
#

lol

hardy viper
crisp coral
merry raven
#

I'm guessing that it is since there's only one instance of prevent_debuff

#

Oh wait I checked through the chat history and apparently it's a Steamodded thing?

tall wharf
#

how does this high contrast card look

hardy viper
#

🔥

tall wharf
#

non high contrast

merry raven
#

What's the most practical way of making a played card with a special enhancement return to your hand after playing it
Is there an already existing context for it? Or do I have to somewhat fake it by returning the card to the deck and then automatically draw it like the DNA

supple folio
#

What is context.individual? I keep seeing it referenced in the example mod without any definition.

royal ridge
#

set to true when referencing individual playing cards

#

i believe greedy joker goes if context.individual then so it triggers individually for each diamond card (and not itself), and end of round effects like popcorn go if not context.individual then as otherwise it would trigger once for each card held in hand

#

not necessary all the time, but some contexts require that differentiation

supple folio
#

Ah, I see. Thank you!

wicked leaf
#

hmm today imma make a modding page

thorny adder
tall wharf
supple folio
#

Could someone explain what's going on here to me? This is from to code for Strength.
local rank_suffix = card.base.id == 14 and 2 or math.min(card.base.id+1, 14)
Apparently this returns the rank of the selected card plus one? I don't understand how though.

frosty dock
#

that's the jank way that the base game does things

#

needless to say it's not compatible with modded ranks whatsoever

supple folio
#

Right

#

Is there a better way to get a rank?

frosty dock
#

in vanilla, ranks don't actually have any associated data they're consistently stored

#

you can look at smods' override of strength

#

basically we gave ranks a table for their data and included a next option that specifies which rank is next / which ranks are next

supple folio
#

Oh awesome

#

Is there a way to do the opposite, finding the previous rank?

frosty dock
#

it's not stored explicitly, you'd have to iterate through all the ranks and see which one has the current rank included in next

supple folio
#

Alright

frosty dock
#

something along the lines of this (just grabbing the first is fine for vanilla ranks, but custom ranks can branch)

local prev_ranks = {}
for k, v in pairs(SMODS.Ranks) do
  for _, vv in ipairs(v.next) do
    if vv == card.base.value then prev_ranks[#prev_ranks+1] = vv end
  end
end
wintry solar
#

Are there any mods that actually have custom ranks?

frosty dock
#

seen something along the lines of higher numbered cards too but i can't find them

#

oh right that was autumn

shell tangle
frosty dock
#

CrimCard is also planning on ranks iirc

violet void
#

How do I wait for the G.hand.cards to be populated before doing this code?

frosty dock
#

use an event

night pagoda
#

where is the achievements tab in balatro???

violet void
#

I've seen them around but idk how they work, time to learn about them ig

night pagoda
#

(I enabled them in the config)

frosty dock
night pagoda
#

oh, I thought there was like a tab or something

#

with trophies?

frosty dock
#

oh, for modded achievements? that's independent of the setting

night pagoda
#

I haven't played vanilla balatro since the 0.9.8 and I don't remember

frosty dock
#

it's in the mods menu

night pagoda
#

nope, vanilla achievements

frosty dock
#

there's no tab for vanilla that I can recall

night pagoda
#

okay, ty

frosty dock
#

smods doesn't add one, only for modded

#

if we make an achievements collection or something, we can maybe do that

supple folio
#

I don't think I'm doing this right. Is this correct?

            for i = 1, #context.scoring_hand do
                local _card = context.scoring_hand[i]
                local new_rank
                if _card:is_suit("Hearts") then
                    card.ability.extra.mult = card.ability.extra.mult + _card.base.value
                    for k, v in pairs(SMODS.Ranks) do
                        for a, b in ipairs(v.next) do
                            if b == _card.base.value then new_rank = b end
                        end
                    end
                SMODS.change_base(_card, "Hearts", new_rank)
                end
            return {
                message = "Bitten!",
                colour = G.C.red,
                card = _card, card
            }
            end
        end```
I'm trying to make every scored heart add its rank to the joker and downgrade.
bitter sand
#

guys i have a quick question, i'm making a mod since quite a long time now and i want to rename it (i already changed it's name in the .lua) but i wanted to know how (and if) i can also change it's name on the github repo ?

storm oar
#

yeah in the github repo settings

obsidian fjord
bitter sand
#

i can also change the lua file name and just push it it will be okay ?

storm oar
#

renaming the file will basically delete the old one and push the new one

#

but yeah

bitter sand
#

oh okay

#

thx

storm oar
#

do i need to do anything crazy to draw an overlay on cards based on a custom value instead of an enhancement?

sturdy compass
#

Question, is there a context state that happens right after cards are played but before joker_main?

obsidian fjord
#

There's context.scoring_hand if that's what you want?

#

It runs before joker_main

sturdy compass
#

That's probably what I'm looking for. Thank you! Also what is that ss from? I feel like I could get use out of that

obsidian fjord
#

The wiki page on the github repo

sturdy compass
#

But which page lol

wintry solar
#

That’s not what you’re looking for

#

Scoring hand is in every calculation context

#

What’s the effect of your joker?

sturdy compass
wintry solar
#

Use either context.before or context.after depending on whether you want it to happen before or after the scoring

obsidian fjord
#

Oh after reading that, before makes more sense

sturdy compass
#

so context.before.scoring_hand?

obsidian fjord
#

No it would just be context.before

sturdy compass
#

oh lol

#

either way, thank you

fallen tendon
#

uhhhhh

#

for some reason my stickers are triggering 3 times

#

(they are on playing cards)

#

a i missing some sort of context?

nocturne garnet
#

i LOVE ui code

#

❤️

fallen tendon
#

OK WTH IS HAPPENING

#

i have no idea why on earth every single sticker is getting evaluated 3 times

frosty dock
#

try printing the context

fallen tendon
#

oh good idea

storm oar
#

okay so now i have it so that the discovery of stuff is working and it changes the sprite, but it doesn't change the text for some reason

fallen tendon
#

ok it somewhat works

#

the only problem is that the sticker effects trigger before the chips

#

but its not that bad

sturdy compass
#

Getting an error "function arguments expected near 'return'" from this block and I'm not entirely sure why

      if card.ability.extra.chance < 1 then
          card:remove
          return {
              message = 'Crumbled'
              colour = G.C.SET.Tarot
          }
      end
  end```
obsidian fjord
#

I'm having a weird crash error I can't really figure out, on round end (when my joker gets calculated), it crashes with functions/state_events.lua:211: 'for' limit must be a number. This is my joker's calculate:

obsidian fjord
sturdy compass
#

oh my goodness facepalm

#

I'm new to lua so of course it's the small things like that

obsidian fjord
#

Oh same this language has some oddities I'm not quite used to yet

sturdy compass
#

As much as I hate semicolons I miss them here 😭

obsidian fjord
sturdy compass
#

Hmmm, it's the same error even after adding the comma

obsidian fjord
#

Oh, card:remove()

#

You just have card:remove

sturdy compass
#

bruh lol

#

that one I don't have an excuse for lmfao

obsidian fjord
#

We all have those moments

sturdy compass
#

very true

#

still no? man

wintry solar
#

What’s the crash?

wintry solar
#

Have you saved the changes you’ve made?

sturdy compass
#

Plenty of times yes

wintry solar
#

Send new code and SS of crash pls

sturdy compass
#

sure thing, gimme a sec

#

Oh bruh it works now

#

I loooove code

#

Anyways now that the game launches, how would I go about displaying this chance value in the info text (in place of 'Joker' in the first line)

elder vapor
#

#X#

#

so {C:green}#X# in 10{} chance and so on

sturdy compass
#

I assume X is meant to stand for "extra"

#

Cuz if so that makes sense. Thank you

fallen tendon
#

no

obsidian fjord
#

X is the number of the position of the variable in loc_vars

fallen tendon
#

^^^^^

sturdy compass
#

Oooooh I see

fallen tendon
#

you have to put a reference the value in the loc vars

#

in your case it would be G.GAME.PROBABILITIEs

#

i think

obsidian fjord
#

Kinda like this

#

So #1# references G.GAME.probabilities.normal and #2# references card.ability.extra.chance and so on for adding more variables

elder vapor
#

yeah

#

^^^^

obsidian fjord
#

If you wanted to make it guaranteed for testing purposes, change the chance variable in config to 1

#

At least that's what I did

sturdy compass
#

what does the probabilities global var do for me here? The high end I have baked into the card (at 10) and "chance" is the value that changes and is rolled against with a math.random

obsidian fjord
#

Well, someone correct me if I'm wrong but we use G.GAME.probabilities and pseudorandom so that the run's seed takes effect

sturdy compass
#

Oooooooooooh I see

tidal ice
#

hey I realized that my Jokers are incompatible with Cryptid's Hooked sticker and I'm curious if theres anything I can change about my mod to fix that

teal estuary
#

you still gotta make it no work with blueprint, in code

obsidian fjord
#

Also what about my crash issue? Still haven't figured that out

teal estuary
obsidian fjord
#

Damn.

#

My issue is that I'm not sure what's causing it so I don't know what to change to fix it

teal estuary
#

its related to randomness, im pretty sure, but no what causes it

obsidian fjord
#

Interesting

wintry solar
obsidian fjord
#

Yeah thought so

#

Oh what the hell?? My crash was caused by oops all 6s

#

I had oops all 6s and when the random event actually triggered it caused that crash, but once I got rid of 6s, it didn't crash

wintry solar
#

If you read back in the crash report a bit more you’ll see which line in your code is causing it

obsidian fjord
#

Every file referenced in the stack trace is either game files or steamodded files

#

Unless I can't read which is honestly possible

sturdy compass
#

Is it possible to do inline math in a joker info text? I think it would be funny for this card to work with Oops so I'd have to multiply normal probability by the custom chance value for it to display properly

obsidian fjord
#

G.GAME.probabilities.normal does that for you

obsidian fjord
# obsidian fjord

Okay interestingly I might've just been making the mistake I was making when I first started this project, not refreshing the run... because now it doesn't crash

sturdy compass
#

Even for a variable chance value? The one I’m defining in the card is not static

wintry solar
#

Yes just multiply your value by the global

sturdy compass
#

My question is if I can do that inline within the description text

obsidian fjord
#

I think you'd have to do that in loc_vars

sturdy compass
#

Gotcha ok

tidal ice
#

cuz I would like for my mod to be compatible with Cryptid

faint yacht
tidal ice
#

it displays [Joker] for Stardust (Cryptid) aswell, but I would assume it has smth to do with the calculation yes

spring anvil
#

I have a music replacement mod that has:

SMODS.Sound({
  vol = 0.6,
  pitch = 0.7,
  key = "music1",
  path = "music1.ogg",
  replace = "music1",
  sync = {
    soiree_music1 = true,
    soiree_music2 = true,
    soiree_music3 = true,
    soiree_music4 = true,
    soiree_music5 = true
  }
})
-- continued with the other respective files

whenever I switch profiles, a second audio track starts and overlaps with the currently-playing one. how do I prevent it from doing this?

#

also sorry to interrupt your issue donut :(

tidal ice
#

its fine, happens all the time

faint yacht
tidal ice
#

wait what

#

fuck

#

ok that should be fine then I bet

#

multiple jokers say card = self instead of card = card why

oblique wigeon
#

does anybody know how to edit the visuals of the game like background and shaders n stuff?

faint yacht
#

If vanilla... that's just vanilla things.

oblique wigeon
#

not sprites

tidal ice
mellow sable
spring anvil
#

interesting

#

I'll open up a github issue then

faint yacht
spring anvil
wintry solar
tidal ice
#

yup I get that now

frosty dock
violet void
#

how can I briefly disable both "play" and "discard" while a joker is playing an event in their calculate function

spring anvil
#

I'm also investigating but I'm also unfamiliar with balatro's stuff

#

honestly I really wanted to make a music loader library but it seemed to be too hard to figure out

frosty dock
#

the current iteration of the sound api is mostly my work so I'm sure I'll figure out what's causing this

spring anvil
#

ah got it

#

does anyone know of a good syntax highlighter for vscode btw?

#

for love2d's lua stuff, I mean

frosty dock
#

the stock lua extension works fairly well from my experience

spring anvil
#

yea but I mean for the globals and stuff

#

like love

violet void
#

i could use that for the .toml

frosty dock
#

that has nothing to do with love smh

#

I don't use a specific love ext personally

spring anvil
#

got it

#

also yea the toml is different but I know what you mean

#

syntax highlighting for the patches

sturdy compass
#

Not having much luck trying to track down this crash. It seems to be happening when it's trying to create a card so here's the associated code block

if context.before then
      local chance_roll = pseudorandom('f_cookie', card.ability.extra.chance * G.GAME.probabilities.normal, 10)
      card.ability.extra.chance = card.ability.extra.chance - 1;
            
      if (chance_roll >= 10) then
          play_sound('tarot1')
          card:juice_up(0.3, 0.4)

          local new_card = create_card('Tarot', G.consumable, nil,nil,nil,nil,'fco')
          new_card:add_to_deck()
          G.consumables:emplace(new_card)

          return {
              message = 'GET!',
              colour = G.C.SECONDARY_SET.Tarot
          }
      else
          play_sound('tarot2')
          return {
              message = 'NOPE!',
              colour = G.C.SET.Tarot
          }
      end
  end
wintry solar
#

G.consumeables:emplace(new_card)

sturdy compass
#

bruh

#

I simply love making tiny typos

frosty dock
spring anvil
#

I (or anyone) can write an extension that syntax highlights the value for payload keys for files that match lovely.toml (or match lovely/*.toml)

#

I'd have to look at how to do that with textmate

wintry solar
#

You can always just write your payloads in a lua file and paste them in when you’re done if you need the highlighting

spring anvil
#

this is true

violet void
carmine burrow
carmine burrow
#

what is 'fco'?

sturdy compass
#

Yep I figured it out, ty tho lol

sturdy compass
frosty dock
#

me when I don't use SMODS.create_card

sturdy compass
#

forced_key I mean, sorry

frosty dock
#

fco is certainly not a valid key for any center

carmine burrow
frosty dock
#

there's an inherent issue with base create_card being that you need to constantly keep track of what the args mean

wintry solar
#

Mostly they take tables instead of nil nil nil

frosty dock
#

the smods version takes a table instead

carmine burrow
#

ah

frosty dock
carmine burrow
#

thanks

sturdy compass
#

Looking into SMODS create card, are all of the inputs required?

frosty dock
#

no

versed swan
#

Does anyone know where I can find a guide/list/cheatsheet for the text formatting system? Like the one that goes {C:attention} or whatever it is

faint yacht
#

If you unpack the Balatro executable and do a search for G.C.ATTENTION, you can find other ones for formatting not too far behind.

supple folio
#

How do I play a custom sound?

faint yacht
#

play_sound(sfx), where sfx is the key to your registered sound via SMODS.Sound.

#

With the mod prefix being part of the string, too. toga_example.

sturdy compass
#

I'm trying to have this Joker get destroyed at the end of a round once a value hits zero but I'm getting this crash

if context.end_of_round then
      if card.ability.extra.chance < 1 then
          card:juice_up(0.3, 0.4)
          G.jokers:remove_card(card)
          card:remove()
          card = nil
          return {
              message = 'Crumbled',
              colour = G.C.SET.Tarot
          }
      end
  end
faint yacht
#

Omit card = nil?

frosty dock
#

context.end_of_round by itself happens multiple times

sturdy compass
#

It was doing this crash before that. Added that after the fact while looking at the code for cavendish/gros michel and it was doing that

frosty dock
#

see joker calc guide for the correct check

wintry solar
#

Do you think it’s worth throwing the old context guide back on the wiki?

frosty dock
#

maybe

wintry solar
#

I’ve seen a number of people confused by the new one, I guess it makes more sense when you already understand the calculation system

sturdy compass
#

I'd appreciate that cause I'm looking through Joker Calc and the closest thing I can find is this but it's still no good

frosty dock
#

we should add some property to the main end of round context so the check is more straightforward maybe?

sturdy compass
scenic sphinx
#

im losing my shit lol like why does having all my jokers give me extra mult crash everything like AHH

hot drift
#

trying to code a joker that gives X3 mult only after a card is destroyed, failing miserably so I'm reaching out for help

frosty dock
#

checks inside checks inside checks

#

you need to turn your local var into a config field and denest your code

#

Also please indent your code properly

nocturne garnet
#

infact both of those checks dont have an end

scenic sphinx
teal estuary
#

but its essenitally saying your calling extra, when nothing is "defining" it

scenic sphinx
#
--- MOD_NAME: Mythos
--- MOD_ID: Mythos
--- MOD_AUTHOR: Salems_Bane
--- MOD_DESCRIPTION: An example mod on how to create Jokers.
--- PREFIX: xmpl
----------------------------------------------
------------MOD CODE -------------------------

SMODS.Atlas{
  key = 'Mythos', 
  path = 'dyonisus.png', 
  px = 71, 
  py = 95 
}

SMODS.Joker{
  key = 'Mythos',
  loc_txt = {
      name = 'Dyonisus',
      text = {
          "{C:mult}+#1#{} mult",
      }
  },
  rarity = 1,
  atlas = 'Mythos',
  pos = { x = 0, y = 0 },
  config = {
    extra = {
      mult = 1,
      consumeable_mult = 7,
      random_mult = 2,
      random_chance = 5
    
    }
  },
  cost = 4,
  eternal_compat = true,
  blueprint_compat = true,
  brainstorm_compat = true,
 
  
  calculate = function(self, card, context)
    if context.using_consumeable then
        if pseudorandom('dyonisus') < G.GAME.probabilities.normal / self.ability.extra.random_chance and not context.repetition and not context.repetition_only then
          card.ability.extra.mult = card.ability.extra.mult * self.ability.extra.random_mult
        else
          card.ability.extra.mult = card.ability.extra.mult + self.ability.extra.consumeable_mult
        end
      end

      if context.joker_main then
          return {
              message = localize { type = 'variable', key = 'a_mult', vars = { card.ability.extra.mult } },
              colour = G.C.mult,
              consumeable = card,
              mult = card.ability.extra.mult
          }
      end
  end

}```
scenic sphinx
teal estuary
#

hrm

#

its complaining about your message specifically, line 54

sturdy compass
#

Looking at gros michel/cavendish, what does this do exactly?

scenic sphinx
#

that

teal estuary
#

copy this over your existing message, and see if it still complains:

localize{type = "variable", key = "a_mult", vars = {card.ability.extra.mult}}
scenic sphinx
#

just the whole thing right?

teal estuary
#

yeah, select over your message (from localize) and paste over with that

scenic sphinx
#

alright

#

lets see if it complains

#

nope still same issue

teal estuary
#

exact same error?

scenic sphinx
#

yeah exact same error

teal estuary
#

would you mind taking a screenshot of the joker in VSC? im curious about something, but discord makes code blocks fucking unreadable 😭

scenic sphinx
#

here you go

teal estuary
sour aspen
#

My newest dumb joker idea: Darkroom Joker, boosts negative jokers in some way

teal estuary
#

message = localize{the code i sent} 😭

sour aspen
#

Probably already exists in some mod

teal estuary
#

sorry if i wasnt clear on it

sour aspen
#

But I’m gonna make it

scenic sphinx
teal estuary
#

so with perkeo? insane

sour aspen
#

Makes negatives that don’t do anything for your build still give you slots to use on non-negatives

#

An incentive to take useless negatives

scenic sphinx
teal estuary
teal estuary
scenic sphinx
#

where to like i dont see it

teal estuary
#

another joker concept i want to explore is rewarding for overshooting, i just dont know how to code it 😭

sour aspen
#

I was thinking more a play on Photograph in some way

#

Cuz Darkroom

teal estuary
#

makes sense

teal estuary
#

wait

scenic sphinx
teal estuary
#

why are you doing self.ability.x.x

sour aspen
#

Cryptid kinda has its own stuff going on

#

Hard to extrapolate that into a regular Steamodded thing.

teal estuary
scenic sphinx
#

the error is still the same

teal estuary
#

-# also a couple things, it should be colour = G.C.MULT and mult_mod = card.ability.extra.mult in the return function, im not sure why its complaining about a missing bracket when its not highlighting it though

wintry solar
#

There’s a comma missing at the end of the message line

scenic sphinx
#

yeah idk why it complains either

teal estuary
#

OOOH

scenic sphinx
teal estuary
#

i didnt notice that, good spot

scenic sphinx
#

now the question where tf do i put them cuz i got no idea how this works

teal estuary
scenic sphinx
#

the commas everywhere

teal estuary
#

commas go at the end of lines, if you have more then one thing in a table - they do not go at the end of anything like then/end/else

#

essentially used to denote a new line

wintry solar
#

Just inside tables

#

To separate your key value pairs

teal estuary
#

but right now, just put one at the end of the message

#

and it should be fine

faint yacht
#

If I want to add something before a specific bit of code via Lovely patching, position = "before"?

wintry solar
#

Yes

scenic sphinx
teal estuary
#

..is the comma here:
message = localize{type = "variable", key = "a_mult", vars = {card.ability.extra.mult}}, <-

weary estuary
#

would this be were I go for eorrs with mods?

weary estuary
#

only mod installed is cryptid. checked the engine file and there is an end for the funtion

wintry solar
weary estuary
#

ah

tidal steppe
#

Hello all, Im wanting to get into modding Balatro. I am a software dev with decent experience (have modded slay the spire) but have not yet touched lua or love2D. any suggestions on how to get started with modding Balatro, any online tutorials or templates to get me started? im bursting at the seams with ideas!

faint yacht
# tidal steppe Hello all, Im wanting to get into modding Balatro. I am a software dev with dece...
GitHub

A Balatro ModLoader. Contribute to Steamopollys/Steamodded development by creating an account on GitHub.

GitHub

A Balatro ModLoader. Contribute to Steamopollys/Steamodded development by creating an account on GitHub.

tidal steppe
#

Thanks 🙂

faint yacht
# wintry solar Yes
[[patches]]
[patches.pattern]
target = "functions/common_events.lua"
pattern = "extra.edition and 'foil2' or extra.mult_mod and 'multhit1' or extra.Xmult_mod and 'multhit2'"
position = "before"
payload = "extra.customsfx or "
match_indent = true

doesn't end up in the dumped files. Just want to add an extra key to allow custom sounds to be defined too without overwriting Talisman's own patch to the field to sound = extra.edition and 'foil2' or extra.mult_mod and 'multhit1' or extra.Xmult_mod and 'multhit2' or 'generic1'

wintry solar
#

You have to match the full line or use regex

#

How does talisman change the line?

faint yacht
#
[[patches]]
[patches.pattern]
target = "functions/common_events.lua"
pattern = "sound = extra.edition and 'foil2' or extra.mult_mod and 'multhit1' or extra.Xmult_mod and 'multhit2' or 'generic1'"
position = "at"
payload = '''sound = extra.edition and 'foil2' or extra.mult_mod and 'multhit1' or extra.Xmult_mod and 'multhit2' or extra.Xchip_mod and 'talisman_xchip' or extra.Echip_mod and 'talisman_echip' or extra.Emult_mod and 'talisman_emult' or extra.EEchip_mod and 'talisman_eechip' or extra.EEmult_mod and 'talisman_eemult' or (extra.EEEchip_mod or extra.hyperchip_mod) and 'talisman_eeechip' or (extra.EEEmult_mod or extra.hypermult_mod) and 'talisman_eeemult' or 'generic1'
'''
match_indent = true
wintry solar
#

Ewwww

#

Just patch after it

#

sound = extra.sound or sound

#

Might be better to target the line below it if that’s unique

faint yacht
#
elseif eval_type == 'extra' or eval_type == 'jokers' then 
        sound = extra.edition and 'foil2' or extra.mult_mod and 'multhit1' or extra.Xmult_mod and 'multhit2' or extra.Xchip_mod and 'talisman_xchip' or extra.Echip_mod and 'talisman_echip' or extra.Emult_mod and 'talisman_emult' or extra.EEchip_mod and 'talisman_eechip' or extra.EEmult_mod and 'talisman_eemult' or (extra.EEEchip_mod or extra.hyperchip_mod) and 'talisman_eeechip' or (extra.EEEmult_mod or extra.hypermult_mod) and 'talisman_eeemult' or 'generic1'
        if extra.edition then 
            colour = G.C.DARK_EDITION
        end
        ...

The dump shows such, what do I do for pattern then?

wintry solar
#

if extra.edition

faint yacht
#

No changes noticed either... did I set up the .toml file wrong entirely?

[manifest]
version = "1.0.0"
dump_lua = true
priority = 0

[[patches]]
[patches.pattern]
target = "functions/common_events.lua"
pattern = "if extra.edition"
position = "before"
payload = "sound = extra.sound or sound"

Also, Pattern 'if extra.edition' on target 'functions/common_events.lua' resulted in no matches

wintry solar
#

Oh sorry I missed the then

faint yacht
#

The priority value for such patches is similiar to how Steamodded treats mod priority?

wintry solar
#

Yes, but targeting the line below it means your priority doesn’t matter

faint yacht
#

Fair enough.

zealous glen
#

not sure why there's a second card in-between the seams

wintry solar
#

It’s the base card

#

You need to add the property that turns it off

zealous glen
#

Is it an Edition property?

#

I only remember the one that turns off the face

wintry solar
#

replace_base_card iirc

zealous glen
#

But I wanted to make this an Enhancement

#

with a custom shader

wintry solar
#

I think it’s a property on the card itself you can set

zealous glen
#

this is the proof-of-concept texture for it

#

although while trying to find out how to tile with a shader, I did find a cool space shader

#

it would be funny if I used the space shader instead lol

sturdy compass
#

How would I go about checking what the enhancements of the cards in cards_destroyed were?

zealous glen
#

Maybe look how one of the Legendary Jokers does it

#

it checks for faces right

sturdy compass
#

Oh true Canio would do that wouldn't it

stiff locust
#

how does talisman's xchips actually work

#

i've tried replacing mult with chips and using the same methods as xmult only for it to simply
not trigger

#

neither x_chips or xchip_mod did anything and I know I have talisman installed

nocturne garnet
stiff locust
#

i did that but it didn't do anything

wintry solar
#

Did you have the capital x?

stiff locust
#

is it fucking case sensitive

wintry solar
#

Yes

stiff locust
#

Oh my god

#

it didn't work

wintry solar
#

Check what it should be in state events

stiff locust
#

okay

wintry solar
#

I imagine talisman copies thunks godawful decision to change what the expected keys are depending on the contexts

faint yacht
#
...
if effects.Emult_mod then mult = mod_mult(mult^effects.Emult_mod);extras.mult = true end
if effects.EEmult_mod then mult = mod_mult(mult:arrow(2, effects.EEmult_mod));extras.mult = true end
if effects.EEEmult_mod then mult = mod_mult(mult:arrow(3, effects.EEEmult_mod));extras.mult = true end
if effects.hypermult_mod and type(effects.hypermult_mod) == 'table' then mult = mod_mult(mult:arrow(effects.hypermult_mod[1], effects.hypermult_mod[2]));extras.mult = true end
if effects.Xchip_mod then hand_chips = mod_chips(hand_chips*effects.Xchip_mod);extras.hand_chips = true end
if effects.Echip_mod then hand_chips = mod_chips(hand_chips^effects.Echip_mod);extras.hand_chips = true end
if effects.EEchip_mod then hand_chips = mod_chips(hand_chips:arrow(2, effects.EEchip_mod));extras.hand_chips = true end
if effects.EEEchip_mod then hand_chips = mod_chips(hand_chips:arrow(3, effects.EEEchip_mod));extras.hand_chips = true end
if effects.hyperchip_mod and type(effects.hyperchip_mod) == 'table' then hand_chips = mod_chips(hand_chips:arrow(effects.hyperchip_mod[1], effect.hyperchip_mod[2]));extras.hand_chips = true end
...
stiff locust
#

okay yeah i have no idea

#

I did Xchip_mod and it did nothing

faint yacht
#

Is this on Jokers or playing cards?

stiff locust
#

playing card

wintry solar
#

An enhancement?

stiff locust
#

a seal

faint yacht
#

Unfortunately, the extra operations don't appear to be added for playing cards.

stiff locust
#

what do you mean

#

but

#

mosaic works on playing cards

wintry solar
#

Mosaic is an edition

#

Editions are different

stiff locust
#

why

wintry solar
#

They currently have their own calculation pathway

#

Remnant of apis being built at different times and thunk being thunk

stiff locust
#

that's

#

extremely frustrating

#

however

#

I can do it the manual way!

wintry solar
#

You can just do chips = hand_chips

stiff locust
#

i can take the current chips amount

and multiply it myself

#

yes

wintry solar
#

Though I don’t remember if that supports a custom message right now

#

-# (It will do soon)

stiff locust
#

can I at least still display the xchips message

#

i don't really need a custom message i just need the xchips message

wintry solar
#

That’s what I mean

stiff locust
#

oh

wintry solar
#

Because that’s not the normal chips message

stiff locust
#

it's the same but it plays the holographic sound

#

at least it is for the mosaic edition

faint yacht
#

Editions play the same sound iirc.

wintry solar
#

Like I said, editions are different

stiff locust
#

oh right

faint yacht
sturdy compass
#

Is there any way for me to check if the scored hand contained cards with a certain enchancement? (glass for example)

frosty dock
#

i just realized something, I forgot about the docs for SMODS.Keybind

faint yacht
wintry solar
#

Don’t do that

#

Check the key instead

stiff locust
#

i did it with v.config.center == G.P_CENTERS.m_steel where v is the referenced card

#

(for a steel card)

wintry solar
#

card.config.center_key == ‘m_glass’

stiff locust
#

should I switch to key check

wintry solar
#

That method should also be fine

sturdy compass
#

perfect, thanks. I appreciate the help y'all are offering cuz I'm finding the wiki a lil tough to navigate

stiff locust
#

oh i have barely touched the wiki

#

if you wanna figure out how to do something go find something that has a similar function

#

mult n chips from sdm0's checks for enhancements, so i'd look there

teal estuary
#

or marble joker

stiff locust
#

okay but i don't like marble joker

teal estuary
#

stone cards can be checked through their ID, its what i did

stiff locust
#

oh god

autumn coral
#

my info_queue isn't showing the actual text i defined, just the label?

teal estuary
#

i wouldnt recommend it, but its what i did

faint yacht
#

In that case, what's the check for any enhancement on a card?

stiff locust
autumn coral
#

this is the definition, it shows "angel pool" but not the text

stiff locust
#

?

#

or check if the center is not equal to empty/default

#

i'd assume

#

vampire has this

autumn coral
#
  • loc_vars
 loc_vars = function(self, info_queue, center)
        info_queue[#info_queue + 1] = { set = "JokerPools", key = "wrenbind_angelpool" }
        return {vars = {}}
    end,
stiff locust
#

go look at vampire

wintry solar
#

card.ability.set == 'Enhanced' checks for any enhancement

teal estuary
wintry solar
#

there might be a new smods util though

frosty dock
stiff locust
teal estuary
#

mimimiimm

teal estuary
autumn coral
#

i'm looking through, genuinely no idea what's wrong with it

#

did something change...?

wintry solar
#

what is JokerPools

autumn coral
#

it's the key

stiff locust
frosty dock
autumn coral
#

whar?

#

wdym

#

no?

#

one of cryptid's localizations, for reference

stiff locust
#

my localizations have sqaure brackets though

autumn coral
#

keep in mind, the label DOES actually show up

autumn coral
#

i doubt though

stiff locust
#

and I got info queue to work with it

autumn coral
#

the thing is

#

it DOES have the information

#

it just doesn't have the um

#

text

#

lmfao

#

i'll add square brackets but i highly doubt that's what it is if it got the angel pool text

stiff locust
#

sometimes it is just something stupid like that idk

wintry solar
#

does it need specific_vars?

autumn coral
#

whar vars?

stiff locust
#

the ones I used in my info queue don't need them

#

and they work fine

autumn coral
#

i literally copied this 1:1 from cryptid btw, i was basing this off of the food_jokers thing

stiff locust
#

that might be the issue

autumn coral
#

why?

stiff locust
#

your implementation could exclude something that was included in cryptid that you don't have

#

i had that issue too when
borrowing
code from cryptid

autumn coral
#

iunno

wintry solar
#

where's your JokerPools bit?

autumn coral
#

it's in descriptions

#

i'm literally looking at the base game right now

#

it's the same thing

#

i could try Other like cryptid i guess?

stiff locust
#

is it in a localization file

autumn coral
#

yes

stiff locust
#

and is it set to the right language

autumn coral
#

guys i'm not stupid

#

yes

stiff locust
#

okay

frosty dock
# wintry solar there might be a new smods util though

speaking of util, I was looking at the enhancement calc PR, and I think with quantum enhancements we need to take that into account for Card:calculate_enhancement? might need more logic for handling multiple effects

autumn coral
#

i changed it to be "other"

stiff locust
#

that's how coding works

autumn coral
#

it did not like whatever i just did

#

i'll keep fucking with it

stiff locust
#

that's the spirit

#

eventually it will work

#

and then you will do something else and it will stop working

#

and then you won't be able to get it working again

wintry solar
stiff locust
#

hold on what

wintry solar
#

I dunno though, I don't have any quantum enhancement stuff set up to test with

autumn coral
#

it was the square brackets that crashed it lol

stiff locust
#

the fuck is a quantum enhancement

autumn coral
#

that's actually so fucking dumb

#

i guess i did need to use the "other" key

edgy reef
#

On top of their actual one

stiff locust
#

wait that's actually so cool

#

i wanna do that now

frosty dock
stiff locust
#

how do I do it

proper relic
#

Is this a normal thing for invisible joker? Copied the right card and works as intended but the sprite is obviously wrong

stiff locust
#

uh

#

that looks like

frosty dock
#

oh

stiff locust
#

a 2x sprite placed in 1x sprite sheet

frosty dock
#

i missed a patch smh

stiff locust
#

what the fuck am I looking at

#

what is it

frosty dock
#

did I?

autumn coral
#

incredible

proper relic
wintry solar
#

I think 1 is whatever the card is, and 2 is the quantum enhancements, no?

frosty dock
#

i'm just confused

stiff locust
#

it's just the top corner of the sprite yeah uh

proper relic
#

Yeah

stiff locust
#

that doesn't look right.

edgy reef
# stiff locust how do I do it

Have a joker check for check_enhancement context and return the keys to the enhancements (such as return { 'm_steel' = true }) (I think)

frosty dock
stiff locust
#

but how do I make it only do it to a certain enhancement

frosty dock
#

if it works idc

wintry solar
#

quantum enhancements seem really jank to me

stiff locust
#

that makes sense

wintry solar
#

hang on, maybe they don't work

#

oh yeah I see

frosty dock
wintry solar
#

that's in state_events

frosty dock
#

nvm my dumps are dirty

#

mkay that's fine then

wintry solar
#

just need to change one thing

#

there we go, quantum enhancements should work now

frosty dock
#

nice

proper relic
#

I'm probably being stupid but how do I localize text like this? I'm trying to have the description change based on whether the joker is activated or not.

    if card.ability.extra.active then
      return { vars = { localize{key='balscr1_activated_desc',vars={card.ability.extra.b_cost}}, '' } }
    else
      return { vars = { localize{key='balscr1_unactivated_desc_1',vars={card.ability.extra.b_cost}}, localize{key='balscr1_unactivated_desc_2',vars={card.ability.extra.max_cost}} } }
    end
  end```
#

This is just causing the description to show up with "nil"s

mellow sable
#

there is a bug with quantum enhancements btw that I’m going to fix today

#

My code that prevents editions and seals from scoring multiple times doesn’t work and I think I know why

#

I move the edition and seal scoring to the end correctly but I don’t prevent those effects from applying again when the quantum stuff happens

autumn coral
#

how do you make your custom info_queue variables appear on the right side of the card instead of the left?

frosty dock
autumn coral
#

this is hella clunky

wintry solar
#

I don't think the game supports splitting them up anyway

autumn coral
#

ok but how do i make it um

#

not be to the left of those then

#

lol

wintry solar
#

put them at the start of the table instead of the end

autumn coral
#

ohhh

#

ur so smart

#

thanks

#

weird tho, if i changed if i defined it as like a tag or something would it show up on the right?

#

oh lmfao that didn't work

#

sigh

#

the first thing, i mean

#

it just moved them to the back anwyay lmfao

#

oh i see

#

it's literally based on where it is

#

that's funny lol

wintry solar
#

@frosty dock oh I added the keep_on_use in boosters packs in that PR too

frosty dock
#

yeah i've seen

wintry solar
#

it could maybe do with a space check though

nocturne garnet
#

why not just make it the description

autumn coral
#

it's alr

#

i caved and went with that anyway lol

sturdy compass
#

ugh I'm so close. This happens when playing a hand

autumn coral
#

i should make a balatro markdown editor online lmfao

#

oh my god wait

#

no yeah]

sturdy compass
wintry solar
#

context.glass_shattered isn't a thing

sturdy compass
#

According to Canio code it is Emoti_Shrug

wintry solar
#

wtf

sturdy compass
#

lmao

wintry solar
#

that code doesn't do anything thunk

sturdy compass
#

bruh lmao

wintry solar
#

the canio calc code is in context.remove_playing_cards

teal estuary
#

god i love how insane the source code is

#

you can trell is a personal project, and i love it for it

wintry solar
#

I'm assuming it used to calculate glass cards and normal cards seperately

sturdy compass
#

wild

wintry solar
#

it's sort of like the calculation guide without all the fancy explanations

sturdy compass
#

legend

frosty dock
#

what do we think of having a formatter set up as a workflow?

#

or should we just provide config and tell people to use it

wintry solar
#

will it make UI code look like absolute shit?

edgy reef
#

Probably but I can at least test

frosty dock
#

haven't tried, but we could exclude it (bad)

wintry solar
#

personally though, I don't see the need

frosty dock
#

we have some inconsistency with indentation

wintry solar
#

eh who cares

#

as long as it's indented in some way

frosty dock
#

I'd prefer it being consistent but maybe we don't need a full style guide

wintry solar
#

now we have docs completed too most people shouldn't need to look under the hood

frosty dock
#

fair

#

I'll still make indents consistent at least with the current files

wintry solar
#

yeah thats fair

edgy reef
#

My big worry is that it'll make working on UI a hellscape.

#

Especially since there's still more UI work to do

wintry solar
#

would it also mess with things like SMODS.create_card that take tables as args?

#

I guess it depends on the formatter, right?

edgy reef
#

Like it'll make finding depth errors faster but I can barely even see the entire return if I save this file with StyLua enabled.

edgy reef
wintry solar
frosty dock
#

yeah that looks bad

edgy reef
#

I haven't touched the actual settings so I can prob configure a fix but I don't even have it enabled lmfao

frosty dock
#

don't mind me bumping up my lines count

edgy reef
#

Oh yeah the line counts get MASSIVE

frosty dock
#

imagine if I changed everything to tabs golden_joker

#

game_object.lua alone is >3k lines

nocturne garnet
#

why are lobcorps' jokers split into different files 😭

wintry solar
#

guess all my initial edition api work really cranked my line count

crisp coral
frosty dock
#

I've somehow removed more lines than I've added (i swear i don't just shuffle things around)

muted timber
#

guys how would i have brainstorm search for a specific joker (v1.1.0 not latest)

nocturne garnet
#

atleast group them a little bit

crisp coral
#

nay

wintry solar
#

individual files is remarkably easier to navigate

nocturne garnet
#

dang

crisp coral
gaunt thistle
#

no

crisp coral
#

like i have a boss blind and a joker that are the same name, and a few universally used functions that uses one of them

frosty dock
gaunt thistle
#

each file needs to have at most 40 lines of code

frosty dock
gaunt thistle
#

any more than that is bloat

#

isn't it always your fault?

edgy reef
#

So true

hardy viper
#

not ours

frosty dock
#

you're right

#

everything is my fault balatroheart

edgy reef
crisp coral
#

the fault lies with you, aure....

edgy reef
#

lmao

gaunt thistle
#

it's your fault that people can make mods 🤗

#

I think it's much more trendy to blame floweey

wintry solar
#

why bother reading docs when I can just ask aure directly

hardy viper
#

download this balatro binary and replace your current one to play cryptid

gaunt thistle
#

nexusmaxxed

frosty dock
#

Steamodded has been my fault since like 0.7.2

teal estuary
#

why bother learning when i can just bother people for help

gaunt thistle
#

PLEASE

teal estuary
#

no

#

suffer

#

i cant read, yknow, im part of the 3%

wintry solar
#

I'll help you meth /leavechannel

gaunt thistle
#

user has left your channel

crisp coral
#

here in the 98% civilization, you can either do a 1 block jump for the installation guide or a 1 block vertical jump for an api documentation

gaunt thistle
frosty dock
teal estuary
teal estuary
hardy viper
#

can we string.lower that

gaunt thistle
#

well guess what that doesn't effect me at all

#

I don't make mods so you can't get me like that

crisp coral
#

damn

#

the -0.01%

hardy viper
#

uhh

teal estuary
#

i'll take your thunderstore

hardy viper
#

hang on whats a rust thing

#

no more

#

unsafe keyword

wintry solar
#

I wonder if it's worth breaking almost every mod to standardise calulation returns to chips mult xmult etc. instead of chip_mod h_mult Xmultmodetc.

gaunt thistle
wintry solar
#

oh and every vanilla item too I guess

nocturne garnet
#

I love him

gaunt thistle
#

99% of lovely is unsafe

#

so you've destroyed me

crisp coral
#

h_[item] is still useful since in hand

#

but uh prolly

teal estuary
teal estuary
wintry solar
#

but you'd just use context.cardarea == G.hand and return mult

teal estuary
#

also, what the fuck is p_

gaunt thistle
#

especially while smods is in alpha

hardy viper
wintry solar
#

I guess we can add them without removing the old ones

#

then it wouldn't break everything

hardy viper
#

let me go check what unsafe even does

gaunt thistle
#

unsafe lets you do funky pointer ops

crisp coral
#

smods stable beta when

edgy reef
#

Idk what rust users smoke to make any jokes about their code

gaunt thistle
#

meth

#

or copium

wintry solar
#

I think that's one of the big misunderstandings people have with calculations along with contexts

teal estuary
#

hopium

frosty dock
crisp coral
#

thank you john meth

edgy reef
gaunt thistle
#

np mystie

#

**bestie

frosty dock
#

I'm not as sure about that invasive of a change to vanilla code

wintry solar
#

I mean if we just add the missing ones in to the evaluation we don't need to touch vanilla jokers

gaunt thistle
#

smods beta will come out and I'll release a lovely build that reverses priority order

frosty dock
#

it's not a breaking change then :sad:

crisp coral
#

oh god the last time someone called me mystie is autumn

gaunt thistle
#

you are now tagged as mystie

#

grats

wintry solar
#

how about we check if it's a vanilla item and only hit those original ones for those 🙃

edgy reef
#

Damn no force death for 0.9.8 mods

frosty dock
wintry solar
#

then it is a breaking change

teal estuary
#

what if smods switched around chips and mult, i see no issues from this

frosty dock
hardy viper
frosty dock
#

I'm fine with adding it non-breakingly

hardy viper
#

so if you wanted to say use memory that you havent manually set when you allocate it, youd need to use unsafe?

gaunt thistle
# hardy viper makes sense

yeah, we mainly use it because we need to call native lua runtime functions and it's easier to just cast pointers around

#

yeah

wintry solar
#

oh that reminds me, can the silent part of take ownership not apply obj.mod to the obj?

hardy viper
teal estuary
gaunt thistle
edgy reef
gaunt thistle
#

yeah

edgy reef
#

AKA tells compiler to shush

hardy viper
#

theres no way to do that without unsafe?

gaunt thistle
#

there are lots of ways that you can obtain temporary ownership over external pointers

#

but you can also cowboy it and just use unsafe

hardy viper
#

so the reason is that you cant guarantee that the pointers wont be asynchronously changed

#

is that

#

correct

gaunt thistle
gaunt thistle
#

there's nothing stopping the lua runtime from invalidating one of the pointers its given lovely, and if so lovely won't know that it's been deallocated

#

unsafe makes the annoying things like casting a *const i32 to a function pointer more simple

#

but also incredibly unsafe at the same time

hardy viper
#

but can you not just print that and format it as an integer anyways

gaunt thistle
hardy viper
#

oh ya

gaunt thistle
#

basically this

#

that code is hilariously bad tbh

#

std::mem::transmute is extremely unsafe as it lets you cast between any type as long as the alignment is the same

#

(and that the type is the same size)

frosty dock
#

the sound manager gets reset sound data for modded sounds on injection

#

i can't exactly sync the new to the old because it wasn't playing before

#

i guess there's no real need to re-inject except for per-language options

#

i can "fix" the issue by stopping the pre-existing sound, but to keep it running and not start a new one is the expected behavior

frosty dock
sturdy compass
#

I almost have this joker working but this keeps getting tripped. I've tried checking if context.removed is nil but it just stops working altogether when I do

-- Check for shattered glass
local shattered = false
for k, val in ipairs(context.removed) do
   if val.shattered then 
      card.ability.extra.Xmult = 0 
      shattered = true
   end
   if shattered then
      G.E_MANAGER:add_event(Event({
         trigger = 'after',
            func = function()
               play_sound('tarot2')
               card:juice_up(0.3, 0.4)
            return true; end
         }))
         return {
            message = 'Errrrmmm...',
            colour = G.C.RED
         }
    end
end
frosty dock
#

turns out this is because there is one frame where the state is specifically -1

fallen tendon
#

joker art go brrrrrrr

#

any notes?

#

based on this

frosty dock
#

neat

thorny adder
#

Builderman when

wintry solar
sturdy compass
#

those cards are literally sick lol

merry raven
#

Man yall got some sick ass pixel art while I'm here struggling like hell

tidal ice
#

ok so I realized that some of my refreshments are also incompatible with Cryptid, causing a crash similar to one before
this requires a lovely patch made by a friend of mine and that may be related idk, but its worth noting that I indeed have card = card

#

actually maybe I should text if having card = card before any if statements work

#

btw, the card is not in use during the crash

gilded narwhal
#

Thoughts on this for T. blue?

Unused hands/discards are carried over into the next round.

The amount that a given round overscores is added to every subsequent blind.

The base score for each blind doubles per multiple of 5 hands, starting at 10. (If I have 15 hands, then the
score for every blind is 4x larger, without the overshoot bonus.

autumn coral
#

i beat cryptid to having my own website for my mod lmfao

mellow sable
#

m

autumn coral
#

m

elder vapor
#

m

autumn coral
#

m

muted timber
#

guys

#

how to do switch devices for immolate

#

if i cant even do list devices to check

#

im sure my gpu can do opengl but it still complains about doubles

sturdy compass
#

I just came across card.getting_sliced in source and I am so confused as to what that's even for lmao

crisp coral
#

Sacrificial Dagger

sturdy compass
#

Ah

#

makes sense

rough furnace
rough furnace
#

wait is tags having a nope a known thing?

#

they also have a method to just remove them fron the game?

#

oh nvm it's just remove them from the savre

mystic river
#

iirc in early builds tags only had a 1 in X chance of activating
but everyone disliked that, so thunk removed it

rough furnace
#

that sounds annoying

cunning barn
#

oh, so the "nope" on the gambler's tag in cryptid is an existing in-game feature? that's pretty interesting

#

i thought they had to add that

crisp coral
#

oh yeah because the rarity tags were "1 in x chance to..."

#

(worthless)

sturdy compass
#

How would you guys go about checking the edition of a card? I've been trying with this and I'm getting this error

rough furnace
#

that table will be empty if the joker doesn't have an edition. You can check that it exists with somehting like

G.jokers.cards[i].edition and G.jokers.cards[i].edition.negative
sturdy compass
#

Ah I see

rough furnace
#

with steamodded presenet you can also use joker.edition.key

#

this is nessicary for modded edittions irrc

sturdy compass
#

That did it. Thank you so much. I was struggling hard with that lol

#

Now if only I could get the messages to pop up reliably. thank goodness that's not a game-breaking thing

rough furnace
#

doesn't resepond to anything but esc

#

Mod list (probably will crash without cryptid) ```
Additional Context:
Balatro Version: 1.0.1m-FULL
Modded Version: 1.0.0~ALPHA-1222a-STEAMODDED
LÖVE Version: 11.5.0
Lovely Version: 0.6.0
Steamodded Mods:
1: Card Sleeves by LarsWijn [ID: CardSleeves, Priority: -1, Version: 1.4.5, Uses Lovely]
2: Galdur by Eremel_ [ID: galdur, Priority: -10000, Version: 1.1.4, Uses Lovely]
3: Talisman by MathIsFun_, Mathguy24, jenwalter666, cg-223 [ID: Talisman, Version: 2.0.1, Uses Lovely]
Break Infinity: omeganum
4: the peak mod by Mysthaps [ID: THE_MOD_THAT_SWITCHES_THE_PLAY_AND_THE_QUIT_BUTTONS_IN_THE_MAIN_MENU_SO_THAT_EVERYONE_WILL_PRESS_THE_QUIT_BUTTON_ON_ACCIDENT]
5: JokerDisplay by nh6574 [ID: JokerDisplay, Priority: -100000, Version: 1.7.1.1]
6: Crashing by WilsontheWolf [ID: Crashing, Version: 2.0]
version: 2.0
Note: User pressed [
7: JamMod by WilsontheWolf [ID: JamMod, Uses Lovely]
8: Faces of Sin by TiltedHat, Victin [ID: fos, Version: 1.0.0]
9: Metal Pipe Crashing Noise by WilsontheWolf [ID: PipeCrash, Version: 1.0, Uses Lovely]
10: Too Many Jokers by cg [ID: toomanyjokers, Priority: 1000000]
11: Cryptid by MathIsFun_, Cryptid and Balatro Discords [ID: Cryptid, Priority: 1e+299, Version: 0.5.2~1115a, Uses Lovely]
12: gamblecore by arachnei [ID: arachnei_gamblecore]
13: DebugPlus by WilsontheWolf [ID: DebugPlus, Version: 1.2.0~dev, Uses Lovely]
Lovely Mods:
1: yosbr-balatro
2: crashhandler
3: SteamTesting
4: ScoreImprovements

hardy viper
#

where exactly does one obtain "Crashing" and the mod that switches the play and the quit buttons in the main menu so that everyone will press the quit button on accident

rough furnace
sturdy compass
rough furnace
#

it seems to have some kind of lock.0

faint yacht
#

Can Lovely patches have blocks of additional code to inject instead of one line?

rough furnace
#

you can use multi lines

#

if you do ''' stuff here ''' it lets you do multi line

faint yacht
#

Perfect.

rough furnace
#

well tecnically it's just '''stuff here''' but it looks better with nelines

rough furnace
#

oh yeah it is with the jolly tag

#

let me see if it was fixed

mellow sable
#

:jimball:

rough furnace
#

it was

#

also wtf natrual negative in the first shop

#

8HECVB77

sturdy compass
#

Cookie

storm oar
#

does it reduce all the way to 0 or just to 1/10?

faint yacht
#

Assuming the idea for it is to become debuffed or get automatically removed when giving last tarot card at 1/10 chance.

sturdy compass
#

Yeah once it hits zero it self destructs

#

I made it extra evil to where it wastes a chance if your consumables are full

rough furnace
#

Is there a reiable way to detect when a card is properly copied (and not some other weird effect going on)

#

rn I'm using add_to_deck and checking for from_debuff

#

but I'm worried about other more elaberat things behaving weirdly with that

#

well i tested double sided from cryptid and it works fine

#

idk if anything will break it

sturdy compass
# sturdy compass Cookie

Oh I almost forgot to mention, it works with Oops lol (older screenshot with placeholder and inaccurate description)

rough furnace
#

It would probably make sense to reduce by the probability amount too

sturdy compass
#

the 20/10 is intentional because funny

#

Good synergy for 5 guaranteed Tarots a hand joeshrug

#

The reduction does go down by 2 instead of 1 with Oops btw, that's what I meant by inaccurate description. I've since changed it so it displays right

nocturne garnet
#

guh....

night pagoda
#

v_bunc_disguise
v_bunc_disguise

nocturne garnet
crisp coral
#

nice ui

#

don't you just love t.nodes[1].nodes[1].nodes[1].nodes[1].nodes[1].nodes[1].nodes

nocturne garnet
#

best ui maker

#

totally ethical

crisp coral
#

😭

#

holy shit

#

table.insert(t.nodes[1].nodes[1].nodes[1].nodes[1].nodes[1].nodes[1].nodes, {} PLEASE

#

i FUCKING BEG

crisp coral
#

explode

#

(PLEASE turn off pings)

nocturne garnet
faint yacht
#

context.other_card.card_effects isn't it... how do I check for card effects that trigger in hand?

crisp coral
#

god i want to finish this but i have to do ui

#

ughhhhhhhhhhhh

#

okay nope its getting shelved back to lobcorp dev LMAO

frosty dock
#

average balatro mod dev experience

faint yacht
#

Do I need to manually check for if a card held in hand has an effect before attempting to retrigger it like Mime?

young dew
#

how can i put color in the loc text when i edit it with loc_vars?

#
if G.GAME and G.GAME.last_blind and G.GAME.last_blind.boss then
  return { vars = { "Currently {C:money}"..card.ability.extra.money.."${C:inactive}" } }
end
return { vars = { "Inactive" } }
frosty dock
#

don't use vars like that

#

use different loc entries if you need different text

young dew
#

how can i do that?

frosty dock
#

create the entry in your localization file and pass the key as key field in loc_vars

zealous glen
#

@wintry solar was it you who had this kind of issue before?

wicked leaf
zealous glen
#

This is a shader that copies the original image

wicked leaf
#

jus tickin off the possibility

#

hm

#

no idea then

zealous glen
night pagoda
#

Is it possible to check what's currently in the event queue?

zealous glen
#

Maybe? Why do you think that's relevant?

night pagoda
#

oh, sorry, no, it wasn't related to your question

wicked leaf
#

maybe we need a separate help forum

night pagoda
#

that'd be great actually

zealous glen
#

I thought this was the help forum

night pagoda
#

this is just a channel/chat, not a forum