#šŸ’»ćƒ»modding-dev

1 messages Ā· Page 142 of 1

zealous glen
#

How so

faint yacht
#

...do I need to add that too for the one Joker I have that retriggers other Jokers?

random sleet
#

because when someone else enables the context for the deck and someone's code doesn't expect it (they never tested it with the deck context enabled after all, they might not even know it exists), it'll wrongly calculate there

zealous glen
random sleet
#

yes but people are stubborn

zealous glen
#

Skill issue

#

/j

random sleet
#

also i still think joker individual checks are clunky and weird

zealous glen
#

I think this is better because it incurs less overhead when not needed

random sleet
#

nonono like the context.individual

#

cuz you still have to specify not context.repetition right

zealous glen
#

Idk

#

But I meant just

random sleet
#

and also not context.end_of_round

zealous glen
#

Iterating for retriggers and the deck and discards

random sleet
#

the crux of the issue is still the same, people will dev on slightly different versions of steamodded and things will break anyway when players actually put things together

zealous glen
#

I think that’s the developers’ fault šŸ¤”

random sleet
#

it doesn't actually solve the problem it's trying to solve

#

like just outright

zealous glen
#

The problem it’s trying to solve is overhead

violet void
#

TheAutumnCircus is your mod ID right?

zealous glen
#

So if a mod doesn’t use the feature it does have less overhead

violet void
#

I added that to my main with my id and it crashes, nice

random sleet
#

i guess? but maybe there should be some more obvious "hey if you're developing you might want to know about this thing"

zealous glen
#

That’s true about a lot of things Steamodded

random sleet
zealous glen
random sleet
zealous glen
#

Maybe it’s a function

random sleet
#

so that you know if your code fundamentally breaks if those options are enabled?

wild patrol
#

@frosty dock so I wanna see if I can make a custom card if I do a SMODS.Suit does that mean I can use this to make a custom deck card?

random sleet
#

and so that you can actually use the features that exist, like how nobody's joker retriggers work anymore all of a sudden

zealous glen
#

I mean, I think either the dev can fix it afterwards or make it incompatible

#

The problem of discovery already existed and will continue to exist

violet void
storm kraken
#

is this worthy of legendary

zealous glen
#

It’s worth of being in Cryptid probably

storm kraken
#

😭

random sleet
#

sorry ill just go back to making my voucher

violet void
zealous glen
#

I’m just unconvinced

#

But that doesn’t mean either of us is right or wrong

zealous glen
#

Steamodded isn’t released for a reason

#

If people want to dev for a stable version they can go back to 0.9.8 ;P

violet void
zealous glen
#

It’s probably also in a commit

#

If it stopped working for you it’s because you updated :<

violet void
#

Yes I did update, but for something like this a Pin would've been appropriate

violet void
#

pinning a message of the change in the thread

zealous glen
#

Steamodded devs can’t do that

#

Only mods can

#

And mods have better things to do usually

violet void
#

Sad

zealous glen
#

You can request them pin messages to mod threads

#

But it’s only a request

zealous glen
# crisp coral """""stable"""""

I’m not sure at what else to say for people who complain about breaking changes in an unreleased, alpha, in-development, crowdsourced API

upper fern
#

If a mod is ready for others to play what's the best way to advertise it?

violet void
#

A forum thread I suppose

wintry solar
#

The main reason for toggling them off by default is they add a lot of overhead in calculation times if they aren’t being used

faint yacht
#

So, if I have a custom deck and/or I use discard-related contexts, I should "re-enable" them back?

wintry solar
#

If you need to run calculations on cards in your deck or cards you have already discarded

faint yacht
#

That'd affect context.remove_playing_cards too?

zealous glen
zealous glen
#

Right now I only need one context so I might stick to my homemade solution

violet void
#

I have only 1 joker that retriggers Jokers and no custom deck/discard related jokers

Do I keep it on all the time or is the optimal thing to do enable it when the joker is equipped or something

faint yacht
#

...as I have a Spectral card that destroys cards in the deck and a Joker that reads from any destroyed card on top of a retriggering Joker...

return {
    cardareas.deck = true,
    retrigger_joker = true
  }

?

violet void
#

huh what is cardarea.deck optional too

faint yacht
#

G.deck and G.discard...

zealous glen
#

Due to patching

#

But idk

random sleet
#

idk why the tooltips are getting nil but

frosty dock
#

you can only set it on load through the mod field, but you could technically set or unset it later on SMODS.optional_features directly

zealous glen
#

Also I’m not sure you should manipulate it

#

If another mod also sets it to true, then what?

frosty dock
#

setting is fine but unsetting can break other mods

zealous glen
#

What if two mods are trying to be quirky and turn it on and off?

violet void
#

I'll keep it to true

wintry solar
#

You can do it the quirky way if you store what it was previously

random sleet
#

you could just toggle it on when it becomes relevant, then just leave it on after that; at least it's not on before it's needed, though after remains

zealous glen
random sleet
#

or just like leave it on

zealous glen
#

But they change it in ABAB

#

so when A changes back B expects it to be in a different state?

wintry solar
#

Oh true

zealous glen
#

At best you could have a counter

#

As in, Steamodded could

#

Of how many mods want it

#

But that’s basically a listener system

#

Which I suspect is a more efficient form of handling calculation

violet void
faint yacht
#

...wait, what's the full thing again? Is it just SMODS.optional_features or do I need to do it from SMODS.current_mod?

random sleet
#

idk but here's cirno because i decided to try to make a pokermon addon

#

(unrelated to the wheel of wheel of fortune)

violet void
#
    return {
        retrigger_joker = true,
    }
end```
random sleet
#

(touhoumon art is by HemoglobinA1C (fan use permitted))

zealous glen
#

Clearly you stoled forked it

faint yacht
#

I've been using togabalatro = SMODS.current_mod for a while, so, I guess it becomes

togabalatro.optional_features = function()
    return {
        cardareas = { deck = true },
        retrigger_joker = true
    }
end
random sleet
#

oh whoops advent cirno has the wrong text

zealous glen
#

Is that a Mega Man reference

random sleet
#

should be "Played 9s become Steel Cards and give +9 Mult per ..." without the retrigger thing from Technical

random sleet
#

which part

zealous glen
#

Advent

random sleet
#

no there's a touhou fan comic series thing called Advent Cirno or something to that effect where it's basically the plot of Final Fantasy VII retold with Touhou characters

crisp coral
#

Advent? is that a Library of Ruina reference??

random sleet
#

touhoumon has the versions of the characters from that comic as special evolutions

zealous glen
#

Icy

random sleet
#

yes i know way too much niche trivia about this thing hi

zealous glen
#

-# get it. ā€œI see.ā€ Haha.

random sleet
#

i dont could you please explain

zealous glen
crisp coral
#

hi autumn ur amazing

random sleet
proven tide
#

New to this, just want to replace a few sounds and have no idea how to go about it.šŸ‘€

SMODS.Sound({
    key = 'ambientFire1',
    path = 'ambientFire1.ogg'
})
SMODS.Sound({
    key = 'ambientFire2',
    path = 'ambientFire2.ogg'
})
SMODS.Sound({
    key = 'ambientFire3',
    path = 'ambientFire3.ogg'
})
local keys = {
    'ambientFire1',
    'ambientFire2',
    'ambientFire3',
}```
I already added the metadata.šŸ‘
zealous glen
#

I guess not ā€œhomophonicā€

#

Just close

random sleet
#

why is icy homophobic

zealous glen
#

Might depend on pronunciation

random sleet
zealous glen
#

I agree with her

#

You’re amazing, Autumn!

zealous glen
faint yacht
wild patrol
#

well I found out what happens when u combine tarot and jokers cards into a pack

#

u can't use the tarot card lol

#

unless i'm missing something

#
    key = 'PotGreed', --joker key
    set = 'Tarot',
    loc_txt = { -- local text
        name = 'Pot Of Greed',
        text = {
            'Draw 2 cards from your Deck.'    
        },
    },
    atlas = 'Jokers', --atlas' key
    cost = 10, --cost
    unlocked = true, --where it is unlocked or not: if true, 
    discovered = true, --whether or not it starts discovered
    pools = { TCG_Yugioh = true },
    pos = {x = 0, y = 0}, --position in atlas, starts at 0, scales by the atlas' card size (px and py): {x = 1, y = 0} would mean the sprite is 71 pixels to the right
    config = { 
      extra = {
        card_limit = 3 --configurable value
      } 
    },
    use = function(self, card, area, copier)
        G.FUNCS.draw_from_deck_to_hand(2)
    end,
})```
proven tide
#

Tried this, but made the game crash.

SMODS.Sound({
    key = 'ambientFire1',
    path = 'ambientFire1.ogg'
    replace = 'ambientFire1'
})
SMODS.Sound({
    key = 'ambientFire2',
    path = 'ambientFire2.ogg'
    replace = 'ambientFire2'
})
SMODS.Sound({
    key = 'ambientFire3',
    path = 'ambientFire3.ogg'
    replace = 'ambientFire3'
})
local keys = {
    'ambientFire1',
    'ambientFire2',
    'ambientFire3',
}

Idk how "key" works, or if there might be a list.

wild patrol
#

key is basically a identifier I think?

wild patrol
#

can't use it or add it to the tarot slot

proven tide
#

Fixed the crash (forgot to add commas), but it still plays the vanilla sound effects.

wild patrol
#

Also how do I stop the custom booster pack from making copies of multi 4 joker.cards

#

They can't even be selected

violet void
#

Thats a fallback Joker, it means your pack doesnt have a pool of jokers afaik

wild patrol
#

Hmm

#

Is there any way to stop it

random sleet
#

make more jokers

zealous glen
#

They’re spreading

wild patrol
#

Well trying to make a combination pack

#

That has custom jokers and tarots

#

Not sure if it's even possible

zealous glen
#

You need to create a custom pool IIRC

wild patrol
#

Isn't that what SMOD.Booster is?

zealous glen
#

Not that I’m aware of

vagrant cedar
#

I officially have 15 working albums, probably leaving it at this

#

Genuine question

wild patrol
#

So how does one go about making a custom pool

vagrant cedar
#

Am I able to release this Joker or will I get banned

wild patrol
vagrant cedar
#

That one took me forever and I still don't know what I'm doing with it

autumn geode
#

is there a way to make it so a joker starts debuffed even in the shop and only works when you get a different joker in your jokers?

wild patrol
#

I just need one that can combine jokers and tarots

#

so I can have yugioh cards that can focus as effects similar to jokers and tarots that are like a quick 1 time effect

zealous glen
#

Now sure if anything else is required

random sleet
wild patrol
#

I don't know what any of this means

#

all I know code go brrr

zealous glen
#

{}

violet void
wild patrol
#

I already tried that

zealous glen
#

No

#

I’m talking a table of options

#

Then having it pull from that table

random sleet
#

oh true i should have it say again

wild patrol
#

What's like the part of the wiki that explains that

zealous glen
#

I don’t think it exists

mystic river
#

a whole lot of the wiki isn't filled out yet, yeah

zealous glen
#

There’s not even anything to fill if it’s not natively supported

#

Although it could be helpful

proven tide
#

Lol, okay, it works (replaced "crumple1" as a test), but it treats "ambientFire" 1, 2, and 3 as a special case???

vagrant cedar
random sleet
storm kraken
#
SMODS.Joker {
  key = 'kubebows',
  rarity = 1,
  cost = 4,
  atlas = "kubebow",
  pos = { x = 0 , y = 0},
  config = {  extra = { mult_gain = 7, mult = 0, sevens = 0 } },
  loc_vars = function(self, info_queue, card)
    return { vars = {
        card.ability.extra.mult, card.ability.extra.sevens, card.ability.extra.mult_gain
    } }
  end,
  loc_txt = {
  name = 'Kubebow',
  text = {
  'Gains {C:mult}+#3#{} mult',
  'every {C:attention}seven{} scored.',
  '{S:0.7}Currently {C:mult}+#1#{} mult.'
  },
  },
  calculate = function (self, card, context)
    if context.scoring_hand and context.cardarea == G.play and context.other_card:get_id() == 7 then
      card.ability.extra.sevens = card.ability.extra.sevens + 1
      card.ability.extra.mult = card.ability.extra.mult_gain * card.ability.extra.sevens
      end
      return {
        mult_mod = card.ability.extra.mult,
        message = "+#1#",
        colour = G.C.MULT
      }
  end
}

why is the game screaming at me i did nothing wrong

candid epoch
merry raven
#
  ...set_ability code around here

I'm trying to make it so that after the scoring has ended, the current hand will gain Enhancements before the next cards are drawn, but rn the Enhancements only gets assigned if I have played a hand after

#

Any insights?

wintry solar
#

you probably want context.after right?

merry raven
#

if card.ability.extra.state == "ready" and context.after and context.cardarea == G.hand then

I tried this instead, but still no dice, doesn't work even if I don't include context.cardarea

storm kraken
random sleet
merry raven
#

The Wheel of Theseus

random sleet
#

oh yeah and this is wheel of wheel

storm kraken
storm kraken
random sleet
#

the wheel of wheel of fortune

storm kraken
#

cant you just make a wheel of wheel that has a 1 in 2 chance to make a wheel

random sleet
#

it is 1 in 4 i just have two oops all sixes

storm kraken
#

i know

random sleet
#

the wheel spins for thee

storm kraken
#

why doWTF

#

reading time

#

also why do you have so many wheels

random sleet
#

they're wheely cool

merry raven
#

Car of Fortune

storm kraken
#

true,,,

frosty dock
#

nil in nil? 🄓

random sleet
#

yeah whats up with that

#

oh i think i know actually lol

frosty dock
random sleet
#

no please dont judge me

#

😭

frosty dock
#

I don't judge

random sleet
#

yes you do ive seen it

sick sparrow
#

balatro pegi 18 card and grac 19 card?

frosty dock
random sleet
#

its been a while ok i forget how this stuff works

frosty dock
#

either you show me or I can't help, that's all jimbo_spin

random sleet
#

nah its fine i realized what it was

sick sparrow
autumn geode
#

is it possible to spawn a joker debuffed and then a different joker rebuffs that original joker when its owned?

#

i was thinking of something like in the load = function set it to debuffed

candid epoch
merry raven
#

Negatives don't need extra room to spawn because they create the extra room

sick sparrow
#

balatro pegi 18 card and grac 19 card?

#

ā™ ļø

candid epoch
#

yeah but its kinda weird to see (Must have a room: negatives dont)

random sleet
#

because the case of needing room is conditional on the wheel being negative or not

#

it reflects the actual code implementation as best as possible with english words

#

also it's not supposed to go to black text after negatives there lol oops

zealous glen
#

"May need room"

random sleet
#

lol

lucid owl
#

bumping this though i'm not at my pc right now, see my messages afterwards for what i tried šŸ™

random sleet
#

better?

wild patrol
#

I ain't reading all that

#

Card go brrrrrr

sturdy compass
#

Oh my goodness

small igloo
#

Hey Guys! I'm new to modding Balatro and have a question about an effect I'm trying to implement:
I want to add a joker that will have the game act as if cards with rank 4 are rank 9. I noticed that this would be similar to the smeared effect which I saw is pretty much hard coded in the game's source code. So would I have to basically do the same here and rewrite the game's functions that return a card's rank or is there a better way? Did anyone else implement a replacement effect like this?

sturdy compass
#

I’ve implemented something similar and unfortunately hardcoding seems to be the way to go

nocturne garnet
small igloo
random sleet
#

thats wheely good

frosty dock
#

it's possible to make multiple ranks on the same card work similarly to suits, but it requires modifying quite a bit of vanilla code and probably break a lot of mods as well. Even then we haven't come up with an efficient way to find straights in quantum-ranked hands

small igloo
worthy stirrup
#

Just to be sure, is this how its set up?

frosty dock
worthy stirrup
#

yea, i just am using my code from yesterday, i havent gotten to that yet

#

thanks for reminding me tho

candid epoch
#

i have no clue what to do with these

dreamy thunder
#

how do i make joker change sell values like the egg joker?

ionic verge
#

@frosty dock i need some advice on this and the above video message
trying to get the message, sound, and chips/mult counters update at the same time and as of now i can only get two of those at once, despite the code seemingly being set up right according to digitaldetective

frosty dock
#

wait this is just a single sound now?

ionic verge
#

yeah

frosty dock
#

you can put single sounds that go with a message into the return table as sound

ionic verge
#

might add a little more but for now just this

#

mmm

#

before i go and do that im wondering if thered be a way to -
nah probably not the case

#

(combine sounds in the code without making a new sound file alltogether)

ionic verge
#

oh wait wrong place

sonic vortex
#

I was looking through the source of other mods to reverse engineer how they work, what is this G object I keep seeing?

ionic verge
#

was gonna post this in me mod post
but this works tbh to show that its working

ionic verge
#

or Game

frosty dock
#

Game

ionic verge
#

im guessing

sonic vortex
#

is there anywhere I can see the properties of it?

frosty dock
#

not to be confused with _G, which is the global scope

frosty dock
sonic vortex
frosty dock
#

anything defined on Game or on self within a function on Game will be present on G

frosty dock
#

there are also modified versions of those files present in Mods/lovely/dump for whichever files have been patched into

#

which should be most of them if you use steamodded

sonic vortex
#

oh ok I'll look through that, thanks!

worthy stirrup
#

How can i make a jokers ablity activate once a hand is played but isnt related to the scoring

long sun
#

context:before iirc? checking

worthy stirrup
#

im not good at making jokers, so im trying to make more so i get better, lol

long sun
#

okay ya it's:
context.cardarea = G.jokers and context.before

worthy stirrup
#

thank you

long sun
#

np!

sonic vortex
#

there is a state for SELECTING_HAND but there doesn't seem to be a similar one for jokers?

#

unless I'm misunderstanding what these states mean

worthy stirrup
#

just to be sure, im running

  calculate = function(self, card, context)
    if context.cardarea == G.jokers and context.before then
      return {
        -- TO DO, Add chance to subtract and add from joker worth.
      }
    end
  end
}
long sun
#

mhm

worthy stirrup
#

okay, sweet, time to find out how to add chances

dreamy thunder
worthy stirrup
#

oh, i have something, give me a second

#

i found this code

frosty dock
worthy stirrup
#
if self.ability.name == 'Egg' then
                    self.ability.extra_value = self.ability.extra_value + self.ability.extra
                    self:set_cost()
                    return {
                        message = localize('k_val_up'),
                        colour = G.C.MONEY
                    }
dreamy thunder
#

i couldnt get anything to work

frosty dock
#
card.ability.extra_value = card.ability.extra_value + whatever
card:set_cost()
sonic vortex
#

is there any way to print to console?

worthy stirrup
#

im probably not, but am i doing this right?

if pseudorandom() < G.GAME.probabilities.normal/2 then
        return {
          -- TO DO, ADD VALUE
        }
      else
        return {
          -- TO DO, SUBTRACT VALUE
      }
#

i want a 50/50 chance regardless if the player has the dice card

frosty dock
zealous glen
random sleet
worthy stirrup
#
  calculate = function(self, card, context)
    if context.cardarea == G.jokers and context.before then
      if pseudorandom() < 1/2 then
        return {
          sendInfoMessage("CashAdded", "Crypto")
        }
      else
        return {
          sendInfoMessage("CashSubtracted", "Crypto")
      }
    end
    end
  end
}
frosty dock
#

you need to give pseudorandom a seed

#

e.g. pseudorandom('crypto')

worthy stirrup
#

oh, will it be diffrent every game?

frosty dock
#

it will be the same if you use the same seed

worthy stirrup
#

how do i make the seed random?

#

if thats how that works

frosty dock
#

no you just give it a string, the game makes it random for each seed by itself

worthy stirrup
#

ohhh, thank you

frosty dock
#

pseudorandom calls with the same seed identifier get the same queue of values for the same seed, so you should use different identifiers for unrelated randomness

autumn geode
#

what is the context for jokers that you own?

frosty dock
#

what

autumn geode
#

basically trying to iterate through my owned jokers to see if i have a certain joker in there

worthy stirrup
#

im praying this works lol

  calculate = function(self, card, context)
    if context.cardarea == G.jokers and context.before then
      if pseudorandom("crypto") < 1/2 then
        card.ability.extra_value = card.ability.extra_value + 1
        return {
          card:set_cost()
        }
      else
        card.ability.extra_value = card.ability.extra_value - 1
        return {
          card:set_cost()
      }
    end
    end
  end
}
frosty dock
#

also shouldn't you have a message?

worthy stirrup
#

im still learning

frosty dock
autumn geode
#

sorry wrong wording from me

worthy stirrup
worthy stirrup
#

i should probably add that message

#

Okay, I think this is better

      if pseudorandom("crypto") < 1/2 then
        card.ability.extra_value = card.ability.extra_value + 1
        return {
          message = "+1",
          colour = G.C.MONEY
        }
      else
        card.ability.extra_value = card.ability.extra_value - 1
        return {
          message = "-1",
          colour = G.C.MONEY
      }
    end
    end
    card:set_cost()
  end
}
vagrant cedar
#

Am I allowed to post this mod in the mod section for others to download or is it against the rules?

hidden timber
#

@mellow sable @frosty dock I'll include version handling for both of y'all's mods (Talisman & Steamodded), because apparently they are very necessary for a lot of mods

worthy stirrup
#

no way, it can make me pay to sell, thats cool

long sun
#

have a Conspiracy Theorist! (should i make the head a bit taller?)

nocturne garnet
long sun
#

mhm!

#

and all the other conspiracies

nocturne garnet
vagrant cedar
#

It started at 1X

long sun
ionic verge
#

how would i sort for highest ranking card in hand?

#

(not played hand, normal hand, if that matters)

long sun
#

okay this is much better :D

autumn geode
sonic vortex
#

What is the function call to sell a joker?

long sun
#

might be too strong, no idea

glossy kestrel
#

i didnt ask any questions but the questions previously asked and answered here helped me make my first modded joker work thank you all

long sun
#

:D

#

awesomeee!!!! can i see it?

mellow sable
#

might also be good for Cryptid, but I'll add Cryptid to the mod index when the developmental version gets more stable

glossy kestrel
hidden timber
mellow sable
long sun
#

awesome!!!

mellow sable
#

for that one, what you need to know is:
Cryptid / Steamodded / Talisman
main / old calc / latest release
refactor / main / main

violet void
glossy kestrel
#

o

#

how does that display

violet void
glossy kestrel
#

that might be better, ty

ionic verge
#

how would i get the rank of a card?

#

(from G.hand.cards if it matters)

violet void
#

Card:get_id()

lucid owl
#

i'm trying to make a card that discards a random card from your hand after every round, and upgrades by 0.01 * the rank of that card. however, whenever i try to perform math the multiplication on my saved variable for the card's rank (num), the game crashes saying it's a nil value and i'm unsure why. all of the discarding code was basically copied verbatim from the hook boss blind

worthy stirrup
#

is pos = { x = 1, y = 0 }, mesured by pixels or by px defined in Atlas

ionic verge
#

basically locating which tile of the grid youve made in assets its calling for

worthy stirrup
#

okay, thanks

ionic verge
#

does anyone know how to get these guys to destroy different cards?
(feline is supposed to destroy the highest ranked card in hand)

#

preferably id also like for it to destroy after everything has visibly scored

worthy stirrup
#

god, what was that cards name when you sell it, it gives the double tag

ionic verge
#

or cola

zealous glen
#

Don’t destroy them directly

ionic verge
worthy stirrup
#

okay, i couldnt remember it, thanks

zealous glen
#

Oh wait

#

In hand not in play

#

Then maybe put the loop inside an Event

#

That could be a bit buggy too

#

Hmm

lucid owl
#

what's the difference between mult and mult_mod?

zealous glen
#

I added a patch to avoid bugs when destroying cards

worthy stirrup
#

to be sure, this is how you check if the joker is sold?

  calculate = function(self, card, context)
    if context.selling_self() then
      
    end
  end
}
zealous glen
#

No ()

#

The context sounds right but I don’t remember

ionic verge
#

i remember coding one that worked off of that

#

but yeah no ()

zealous glen
#

Actually does shatter and dissolve create events?

ionic verge
#

iunno

zealous glen
#

If not it might be easier

#

just if card and not card.removed

#

Where card is probably v

ionic verge
#

yeah its v

#

i,v in ipairs my beloved

zealous glen
#

the inferior alternative to k,v

ionic verge
zealous glen
#

That’s something you could try

#

Seems easier than the other suggestions

ionic verge
#

didnt work

#

still just erased one

#

a funny idea is trying to count how many felines there are

#

and set it to second/third etc depending on which feline it is

#

but that feels like a really bad way to do it

zealous glen
worthy stirrup
#

is this a 1/3 chance for each?

  calculate = function(self, card, context)
    if context.selling_self then
      if pseudorandom("crypto") > 1/3 then
        print("Sold 1")

    elseif pseudorandom("crypto") < 2/3 then
      print("Sold 3")

    else
      print("Sold 2")

      end
    end
  end
}
ionic verge
#

shouldnt need the elseif, just else

#

or

#

wait nvm

#

misread

#

flip the first sign tho

worthy stirrup
#

okay let me try selling 5 and see what happens

#

sweet, it works

zealous glen
#

Also missing the O!A6s scaling

#

Also it depends on what you mean by the chance of the second one

ionic verge
worthy stirrup
ionic verge
#

i think
just maybe
that was a few too many cards erased

zealous glen
worthy stirrup
#

each one has a %33.3 chance of being chosen

zealous glen
#

Because the three options aren’t evenly distributed

#

Not currently

worthy stirrup
#

should the middle one also be 1/3?

zealous glen
#

I think right now it’s 1/3, 1/9, and 5/9

#

If you want even chances without doing math I suggest using the function that selects from a table

wintry solar
#

Just do the pseudorandom call once at the top

ionic verge
#

no as long as they fixed the sign being backwards that should be 1/3 1/3 1/3

#

oh wait

#

yeah thats an issue

zealous glen
#

Currently it’s conditional

worthy stirrup
#

so something like this?

  calculate = function(self, card, context)
    if context.selling_self then
      local random_value = pseudorandom("crypto") -- Generate the random value once
      if random_value < 1/3 then
        add_tag(Tag('tag_investment'))
      elseif random_value < 2/3 then
        add_tag(Tag('tag_economy'))
      else
        add_tag(Tag('tag_coupon'))
      end
    end
  end
}
zealous glen
#

Just selecting one element from a table at first is equivalent and requires no further math

#

That looks like it works

worthy stirrup
#

i guess its time to make the next joker :3

wintry solar
#

Yeah that’ll be equal probabilities

ionic verge
zealous glen
ionic verge
#

what am i missing then

zealous glen
#

probably not context.individual or something

#

Idk

#

maybe repetition

wintry solar
#

Why aren’t you using the destroying context?

zealous glen
#

These are for the hand

wintry solar
#

There’s a check for hand cards

zealous glen
#

Deck? Discard?

wintry solar
#

Play and hand

#

I’m not sure if aure added deck and discard or not

zealous glen
#

One more reason to stick with my patch

ionic verge
#

so what context do i need to set up?

frosty dock
zealous glen
#

Look the context list and see what to test for

zealous glen
#

End of round?

frosty dock
#

after regular destroying_card

ionic verge
#

i know theres also a later section on it but like
couldnt this say the basics of it like the others in this list?

frosty dock
#

end of round, individual and repetition as well

zealous glen
#

Hmmm

#

So how I’d use it for the end of round

#

if context.end_of_round and context.destroying_card and context.other_card == card then?

#

Maybe throw in something to make it only execute once

ionic verge
#

what context do i need to destroy an in hand card per played hand?

frosty dock
#

destroying card isn't end of round though? it's after hand played

ionic verge
zealous glen
long sun
#

the Eye of Providence :D

frosty dock
#

I didn't introduce new timings for it

frosty dock
ionic verge
#

mmm

#

mb

frosty dock
#

if context.destroy_card and context.cardarea == G.hand then I think

ionic verge
#

for the moment got rid of the add_event, and set up the contexts like john smods said, now its not deleting cards

wintry solar
#

needs to return { remove = true }

lucid owl
#

a random card is discarded every round (like the hook) and 0.01 * its rank is supposed to be added to the multiplier of the joker. however, it only adds 0.01 to the mult and nothing else, and i can't discern why

ionic verge
#

wait

#

hm

#

might be fixed now

cedar stream
#

other than cryptid has any mod implemented double sided cards?

ionic verge
zealous glen
#

Bunco has a double-sided tape

cedar stream
#

but playing cards

tepid crow
#

betmma I think?

#

oh wait those arent double sided

#

just flipped

#

nevermind

cedar stream
#

well still i can use the flipped mechanic

lucid owl
cedar stream
#
ionic verge
#

wait does blueprint_compat default to false?

cedar stream
#

im not sure, i dont use that function, and blueprint works with it

lucid owl
cedar stream
foggy carbon
#

can an eternal joker self-destruct?

lucid owl
cedar stream
foggy carbon
#

cool

cedar stream
lucid owl
hardy viper
sweet halo
#

anyone know what this means/how to fix?

frosty dock
frosty dock
sweet halo
#

cheersšŸ‘

frosty dock
#

okay so voucher calculation

#

idk how much information about redeemed vouchers we need to store

#

maybe it just needs to be a cardarea

#

at least if i want to support any kind of mutable values, i don't think there's a way around it

winter thorn
ionic verge
#

yep :]

#

not my skins someone else made them

worthy stirrup
#

is there context for when a card is burnt/destroyed?

frosty dock
#

what kind of card

worthy stirrup
#

like when the knife deletes a joker, or when a bannana goes extinct

zealous glen
#

Not Jokers IIRC

#

I think Paperback had a non-jank solution

#

-# and betmma had a jank solution

worthy stirrup
#

wait, how do i even destroy a joker

zealous glen
#

Probably manually unless it’s been added as a context

#

Which I don’t think it was

violet void
#

Can I use this function to change the sprite of my Joker during a run? Like it flips, changes sprite and flips back

#

Or is this the way to go for that

frosty dock
#

yeah use set_sprite_pos for that

zealous glen
#

Is that saved when you reload?

frosty dock
#

uhh

#

good question

worthy stirrup
#

okay, im getting the Shcreenshotted to pop up but its not deleting

  calculate = function(self, card, context)
    if context.cardarea == G.jokers and context.before then
        if pseudorandom("crypto") < 1/4 then
          G.E_MANAGER:add_event(Event({
            func = function()
                play_sound('tarot1')
                G.E_MANAGER:add_event(Event({trigger = 'after', delay = 0.3, blockable = false,
                    func = function()
                            G.jokers:remove_card(self)
                        return true; end})) 
                return true
            end
        })) 
        return {
          message = localize('screenshotted'),
          colour = G.C.CHIPS
      }
        end
    end
  end
}
#

I dont know why its not leaving

#

never did i think, causing a joker to delete itself would cause so much trouble

violet void
#

I'll add it in set_sprites too

zealous glen
#

Or see what Bunco does for the tape

violet void
#

Is this too ugly?

worthy stirrup
#

its beautiful compared to the stuff im writing

dreamy thunder
# worthy stirrup okay, im getting the Shcreenshotted to pop up but its not deleting ```lua calc...
        -- This part plays the animation.
        G.E_MANAGER:add_event(Event({
          func = function()
            play_sound('tarot1')
            card.T.r = -0.2
            card:juice_up(0.3, 0.4)
            card.states.drag.is = true
            card.children.center.pinch.x = true
            -- This part destroys the card.
            G.E_MANAGER:add_event(Event({
              trigger = 'after',
              delay = 0.3,
              blockable = false,
              func = function()
                G.jokers:remove_card(card)
                card:remove()
                card = nil
                return true;
              end
            }))
            return true
          end
        }))
        -- Sets the pool flag to true, meaning Gros Michel 2 doesn't spawn, and Cavendish 2 does.
        G.GAME.pool_flags.gros_michel_extinct2 = true
        return {
          message = 'Extinct!'
        }
      else
        return {
          message = 'Safe!'
        }
      end
    end
  end
}```

here. this is from the example mods of steammodded
worthy stirrup
#

omg, i had to switch to card

foggy carbon
#

my game crashed from a memory alocation because it's out of memory. How do I reset that? I've done it before but forgot

worthy stirrup
violet void
#

I think that's emplace missing

worthy stirrup
#

i think its because i set card to nil outside the part it destroys it

vital rapids
#

What would constitute as using someone elses code?

violet void
# zealous glen Or see what Bunco does for the tape
    name = 'Taped', custom_atlas = 'bunco_jokers_taped', position = 1,
    rarity = 'Rare', cost = 6,
    blueprint = false, eternal = true,
    unlocked = true,
    calculate = function(self, card, context)
        if context.before
        and context.full_hand
        and not context.other_card
        and G.GAME.current_round.hands_played == 0
        and G.GAME.blind.boss
        and not context.blueprint then
            event({func = function()

                local cards = {}

                for i = 1, #context.full_hand do
                    if not context.full_hand[i].ability.group then
                        table.insert(cards, context.full_hand[i])
                    end
                end

                if #cards > 1 then
                    link_cards(cards, self.key)
                    big_juice(card)

                    for i = 1, #cards do
                        big_juice(cards[i])
                    end
                end

            return true end})
        end
    end,
    set_ability = function(self, card, initial, delay_sprites)
        if self.discovered or card.bypass_discovery_center then
            card.T.w = G.CARD_W * 1.788732394366197
            card.T.h = G.CARD_H * 1.189473684210526
        end
    end,
    set_sprites = function(self, card, front)
        if self.discovered or card.bypass_discovery_center then
            card.children.center.scale = {x = 127, y = 113}
            card.children.center:reset()
        end
    end,
    load = function(self, card, card_table, other_card)
        return self.set_ability(self, card)
    end
})```

I've checked it, but I don't understand how it changes the sprite
#

or if its changing it at all

placid frigate
#

Is there a way to make custom challenges yet? If so, where can one find tutorials on it?

olive nexus
#

i dont know anything about coding, but i would love if there was a mod to add a different main song when getting to endless mode

foggy carbon
worthy stirrup
#

im so confused, its not taking in the blueprint photo, but instead is using Jimbo

SMODS.Joker {
  -- How the code refers to the joker.
  key = 'Scammer',
  -- loc_text is the actual name and description that show in-game for the card.
  loc_txt = {
    name = 'Blueprint ',
    text={
      "Copies ability of",
      "{C:attention}Joker{} to the right",
  },
  config = { extra = { worth = 2 } },
  loc_vars = function(self, info_queue, card)
    return { vars = { card.ability.extra.extra_value } }
  end,
  rarity = 3,
  atlas = 'JokerSheet',
  pos = { x = 4, y = 0 },
  -- Cost of card in shop.
  cost = 10,
  calculate = function(self, card, context)
    return {
      message = "Scammed!"
    }
  end
}
}
#

its so fucking good it just changes its face too

zealous glen
#

Must've been patched in

frosty dock
violet void
# zealous glen Must've been patched in

I remembered Cardsauce has a similar joker (Im so happy/Im so sad)

But its like

It uses update (first is cardsauce, second is mine updated)

How wrong is this from 0 to 10? lol

#

I tried it and it works but its probably a stretch (It also saves when resuming)

zealous glen
#

Updae is called every frame

#

you don't need that

#

set_ability and set_sprite_pos should be sufficient

violet void
foggy carbon
#

can anyone figure out why the code I've written doesn't actually produce a text window?

violet void
#

But idk how to use the two options you provided

zealous glen
violet void
zealous glen
#

I think that should work

foggy carbon
#

thank you lol

#

it wasn't broken, it just wasn't doing anything. I assumed it had to be a stupid typo like that

sand oasis
#

trying to make a tarot card with unique functions depending on whether it's used inside or outside of a blind. any pointers?

#

I am not entirely certain of how the use method can be applied and of the contexts themselves

frosty dock
#

there's no context in using consumables

#

your indicator is G.GAME.blind.in_blind

violet void
zealous glen
weak brook
#

has anyone put a cardarea inside a description of a card? is that too crazy of an idea?

#

trying to figure out how I might do that for this card that shows the top few cards in the deck

zealous glen
#

There's a few Jokers like that

#

One has CardAreas atop the deck

violet void
zealous glen
#

another just listed them written down

#

High Card had one show the entire deck, but in a menu

#

I think you can try to do something similar to Blinds

#

And display an object inside the tooltip UI element

weak brook
#

yeah thats what im trying to figure out rn

zealous glen
#

I think Blinds just show the Sprite

weak brook
#

codes not working well though

violet void
#

there was one person who put some joker cards inside a joker description

weak brook
#
    if card.config.center.discovered then
        -- If statement makes it so that this function doesnt activate in the "Joker Unlocked" UI and cause 'Not Discovered' to be stuck in the corner
        full_UI_table.name = localize{type = 'name', key = self.key, set = self.set, name_nodes = {}, vars = specific_vars or {}}
    end
    localize{type = 'descriptions', key = self.key, set = self.set, nodes = desc_nodes, vars = {}}
    if G.deck and not card.area.config.collection then
        local tohth = CardArea(
                0,0,
                5.5*G.CARD_W,
                0.42*G.CARD_H,
                {card_limit = card.ability.preview, type = 'title_2', highlight_limit = 0, card_w = G.CARD_W*0.5})
        for i = 1, card.ability.preview do
            if G.deck.cards[i] then
                tohth:emplace(G.deck.cards[i])
            end
        end
        main_end = {n=G.UIT.C, config={align = "bm", padding = 0.02}, nodes={
            {n=G.UIT.O, config={object = tohth}}
        }}
        if main_end then
            desc_nodes[#desc_nodes+1] = main_end
        end
    end
end```
zealous glen
#

I can send the code I have for Blinds in tooltips

zealous glen
weak brook
zealous glen
#

There was a mod with dice inside Joker descriptions

zealous glen
weak brook
#

forgot to reply ping

zealous glen
#

Well, I also wrap it with the rest of the UI

#

so you need a little bit more code

#

I pass an auxiliary key to info_queue

weak brook
#

not exactly what i'm looking for there cause i wanna keep any edition, enhancement, or seal the card has and display it properly in the preview

#

if its just the sprite its not accounting for that

zealous glen
#

It is though

#

You take the Enhancement as the Sprite

#

Then draw the face and seal on top

#

you also pass the correct edition as the shader

weak brook
#

still that feels like a roundabout solution, feel like it would be much easier to just figure out how to put a cardarea in the ui and them emplace those cards in it

#

less extra work

zealous glen
#

That sounds like "it would be much easier to do [HARDER THING]"

weak brook
#

it might not be harder? just trying to see if theres examples

#

seems like there is according to what rolo said

violet void
#

I think

#

Like this?

weak brook
#

perfect yes exactly like that

#

thanks a bunch

plucky wolf
#

I've been trying to hook into a method for a deck I'm working on, but (despite a lack of warnings in the console) nothing seems to be happening ingame. I believe it's the hook itself messing up (because if I add another line that should trigger a noticeable effect, it still does nothing) but I really don't know how. Does anyone by chance know the reason?

zealous glen
#

Idk if there's an updated version

weak brook
#

yeah i found it

proven tide
#

Can anyone help me understand how ambientFire sounds work?

SMODS.Sound({
  key = "ambientFire2",
  path = "ambientFire2.ogg",
  replace = "ambientFire2"
})
SMODS.Sound({
  key = "ambientFire1",
  path = "ambientFire1.ogg",
  replace = "ambientFire1"
})
SMODS.Sound({
  key = "ambientFire3",
  path = "ambientFire3.ogg",
  replace = "ambientFire3"
})

This does work, but not for these for some reason.

minor magnet
#

is this balanced for a legendary?

#

i dont think it is

#

but im not sure how to balance something like this

frosty dock
#

according to thunk, legendaries need not be balanced

minor magnet
#

fuck yeah

vocal verge
#

Perkeo definitely isn't

frosty dock
#

but this seems a bit weak

minor magnet
frosty dock
#

i correct, it's niche

minor magnet
#

how would you change it?

#

i still want to have something to do with probabilities

frosty dock
#

it's an interesting legendary for sure

minor magnet
#

it kills cavendish lol

vocal verge
minor magnet
#

thats the funniest interaction it has

#

mmm ya i know, still better than canio tho

vocal verge
#

eh

minor magnet
#

the money is really what makes this joker

vocal verge
#

better than Chicot for sure

#

not canio tho

zealous glen
#

but on the last hand

minor magnet
#

checks out

vocal verge
#

last hand definitely sounds better

#

cause it synergizes with dusk and stuff

frosty dock
#

it might fit rare better tbh, it's useful if you have the right conditions for it

zealous glen
#

I think in general last hand is a nerf

frosty dock
#

but it can also hurt you or just do nothing

minor magnet
frosty dock
#

first hand is definitely stronger than last though

zealous glen
#

My personal goal in designing Legendaries is changing how you play the game

minor magnet
#

this is a buff from its previous effect of "gives x4 mult every time a lucky card successfully triggers"

#

which was

#

really weak

#

making a legendary based on lucky cards is hard

vocal verge
#

ok to be fair

vocal verge
#

would go hard

minor magnet
#

very much so

#

but no joker with 2 effects

#

do i split them?

vocal verge
#

yeah

#

2 separate ones

#

guaranteed probability works on it's own

minor magnet
#

so maybe the legendary has the x4 mult and the rare has guaranteed probabilities

zealous glen
#

4 effects

#

16 effects

minor magnet
zealous glen
#

well

minor magnet
zealous glen
#

neither seems appropriate for a Legendary for me

minor magnet
#

but im not really sure how to make a legendary have something to do with luck

vocal verge
#

RNG truly is a bitch

zealous glen
#

confirmation bias

minor magnet
#

my other legendaries are very much more fun, this one is proving quite difficult

outer dew
#

Is there a list or documentation anywhere of stuff that jokers can check for? I'm getting tired of checking a bunch of other code to find what I'm looking for lol

zealous glen
#

even if in practice it's not very practical

minor magnet
zealous glen
#

The other concept seems like Lucky Cat 2

minor magnet
#

more like a weaker triboulet for lucky cards

#

would making more lucky card based jokers help make this one more useful?

#

or more probability jokers

zealous glen
#

Yes

minor magnet
#

alright i'll get to work

#

lucky cards ain't a viable playstyle? The answer, use a joker, and if that don't work... Use more joker.

lethal mural
#

why does this crash?

frosty dock
lethal mural
frosty dock
#

then you're not giving enough information

#

you're using a variable you didn't define

lethal mural
#

i'm trying to figure out how create_playing_card works and want to add jacks

frosty dock
#

this isn't a moment of "you're not using create_playing_card correctly"

#

it's a moment of "your code has problems"

#

i.e. you're using a variable _suit that doesn't exist

lethal mural
#

oh i thought thats how you specified the suit whoops

frosty dock
#

no it is, but you didn't define _suit

lethal mural
#

so how would i define it?

frosty dock
#

how am I supposed to know what you want your suit to be

lethal mural
#

ohh wait i think i figured it out

#

i was aiming to add a jack

#

but i think i figured it out

#

now assertion fail

#

but i think i have an idea why

#

i forgot to add e_
edit: yep that was the problem

foggy carbon
#

is there a way to define the size of a joker's sprite? I have my atlas set to a smaller pixel size, but all that does is take the correct portion of the spritesheet and then stretch it to regular joker size. I want my jokers to be Wee Joker size

lethal mural
#

ok so it added the card but it wasnt a jack hmm

rare bobcat
#

How would you make fool include spectral cards?

lethal mural
#

i cant actually figure out how to make create_playing_card give a specific suit

#

i managed to get the editions and seals part to work but the suit i'm stuck on

frosty dock
#

'H_J' would be a jack of hearts for example

lethal mural
#

wait

#

not suit

#

rank sorry

#

oh wait

#

DUH NO WONDER IT DIDNT WORK

#

hopefully changing it to rank fixes it

#

nope

#

huh

#

yeah i wanted it to be a jack of any suit

frosty dock
rare bobcat
#

Does ā€˜Tarot_Planet_Spectral’ (changed from ā€˜Tarot_Planet’) work like I think it will?

frosty dock
#

No

rare bobcat
#

Ah

frosty dock
#

Tarot_Planet is hardcoded

rare bobcat
#

So how would I do what I’m trying to?

frosty dock
lethal mural
frosty dock
frosty dock
rare bobcat
#

The fool

#

The special fool

lethal mural
frosty dock
lethal mural
#

oh so it should be _suit?

frosty dock
#

you can call it however you like

#

you just need to define it

rare bobcat
#

So how would I make it choose between tarot_planet and spectral?

#

Wait

#

Wrong wording

lethal mural
#

i want it to be a jack of any suit how would i do that

frosty dock
#

what's any suit

#

a random one?

lethal mural
#

yes

rare bobcat
#

How do I make it include spectral?

#

And also tarot_planet

frosty dock
# lethal mural yes
local eligible_suits = {}
for _,k in ipairs(SMODS.Suit.obj_buffer) do
  if not SMODS.Suits[k].in_pool or SMODS.Suits[k]:in_pool({ rank = 'Jack' }) then eligible_suits[#eligible_suits+1] = SMODS.Suits[k].card_key end
end
local _suit = pseudorandom_element(eligible_suits, pseudoseed('a_seed_of_your_choice'))
#

something like this should do

lethal mural
#

o i see

rare bobcat
#

And why does fool say disable blind effect everywhere

#

Was that what it was supposed to do?

frosty dock
#

it did that in n old demo

frosty dock
#

you change this check to include tarots, planets and spectrals

surreal marsh
lethal mural
#

IT WORKED

frosty dock
lethal mural
#

now i just have to make it add 3 of them and destroy itself lo

rare bobcat
lethal mural
#

yeah

#

pot of jacks

rare bobcat
#

I feel like jacks in the box would be a better pun

lethal mural
#

after it gets used up itll turn into a regular pot

frosty dock
#

as for the Tarot_Planet being the first argument of create_card, that actually doesn't matter at all

rare bobcat
#

How do I add multiple arguments?

#

Comma?

zealous glen
rare bobcat
#

Can i just ('Tarot_Planet', 'Spectral'...)

zealous glen
#

IIRC I also considered doing something with a variable set on the card but I think I didn't code it very well when I tried. I might've tried the other way around

rare bobcat
#

Or is it more than that

#

It looks like it is more than that

frosty dock
#

if you're referring to the create_card argument, it doesn't matter at all. you could put anything you wanted there

zealous glen
#

tl;dr: it can discern whether the card is being sold or not via a Controller variable

#

I'm not sure how non-jank that is, but it seems non-jank

surreal marsh
#

G.CONTROLLER.locks.selling_card

#

seems good

zealous glen
#

I had thought it wasn't real time dependent but I'm not sure

frosty dock
proper stratus
#

if i try to simply add a } it doesnt like it, i dont know why it thinks the thing is just left open?

frosty dock
#

maybe indenting your code properly would help

#

you have an extra end

proper stratus
#

wuh oh where did i mess up

#

ah

#

wait where?

frosty dock
#

at the bottom

proper stratus
#

oh do i not need to indent calculate

frosty dock
#

one closes the if statement, the next closes calculate

#

what's the third one doing

frosty dock
proper stratus
#

right that doesnt need to be there

#

yep, that was the issue

#

sorry for bothering you death

frosty dock
#

new lovely just dropped

viscid bough
#

im getting an error with my custom rarity stuff and idk why. Is this wrong?

SMODS.Rarity {
    key = "secret",
    loc_txt = {
        name = "Secret"
    },
    badge_colour = HEX("0f1a1b"),
    default_weight = 0.02
}
tender gale
#

When testing a mod, how do I spawn in a Joker to test?

proper stratus
#

debugPlus, hover over it in the collection and press 3

tender gale
#

ok thanks

#

can it spawn a modded or undiscovered joker

proper stratus
#

yea

tender gale
#

ok

proper stratus
#

hold tab to see all the things you can do with DebugPlus

viscid bough
rare bobcat
frosty dock
rare bobcat
#

I’m confused

#

Let me get back to where I’m coding rq

random sleet
rare bobcat
#

I’m at my desk

#

How the freak do I make fool better?

tender gale
#

how would I code a Joker that gives 6 money at the end of round and then decreases the amount of money you get from it by 1?

plain apex
#

when the conditions are met on this joker it does a random one of these and bunch of other random stuff not listed here is there a way i can make the sound play when the text is actually displayed rather than the moment the hand is played?

                if outcome < 0.0667  then
                    -- x0 multiplier logic
                    card.ability.extra.mult = 0
                    G.GAME.pool_flags.crac_flag = true  -- Set Crac's unique flag
                    play_sound("fn_fuck")
                    return {
                        message = "FUCK"
                    }
                elseif outcome < 0.1334 then
                    -- x10 multiplier logic
                    card.ability.extra.mult = card.ability.extra.mult * 10
                    G.GAME.pool_flags.crac_flag = true  -- Set Crac's unique flag
                    play_sound("fn_lesgo")
                    return {
                        message = "les goo!"
                    }
                elseif outcome < 0.2001 then
                    -- -50 multiplier logic
                    card.ability.extra.mult = card.ability.extra.mult - 50
                    G.GAME.pool_flags.crac_flag = true  -- Set Crac's unique flag
                    play_sound("fn_wtf")
                    return {
                        message = "Man wtf...."
                    }
tender gale
frosty dock
rare bobcat
tender gale
#

Where can I find its code

rare bobcat
#

Card.Lua I believe

frosty dock
#

in case you don't know, balatro is source accessible, you can extract the executable with 7-zip

tender gale
#

Card.lua is 5000 lines long, any tips on where to look?

frosty dock
#

if you're using any reasonable code editor, you have a search feature

plain apex
rare bobcat
#

Ctrl + f

frosty dock
wintry brook
#

does anyone know what i have to do to force the play and discard ui to go away + make the hand drop down, like what happens when you use a consumable

rare bobcat
#

I still do now know how to modify the fool’s code to make it compatible with spectral cards

tender gale
#

Thanks for the help but I still can't understand what its saying

ionic verge
#

so this card trys to destroy the highest ranked card every hand played, but currently does nothing, does anyone have any input?

rare bobcat
#

Please Santa let somebody help me with this

tender gale
#

Here's the current code for gaining money, what code should I add so that it reduces the money and disappears when 0

rare bobcat
plain apex
frosty dock
#

what i said is specific to new calc

plain apex
#

well i didn't even make that change yet lol

frosty dock
#

anyhow

#

can i see your mods folder?

rare bobcat
#

I still have zero clue how do do what I need to do

tender gale
rare bobcat
#

I have made a couple other qol changes

plain apex
rare bobcat
# tender gale Idk how to do that

I forgot the EXACT syntax but it should be x.y.money = x.y.money - x.y.money_decrease where x and y are various pathings that help find the variable

#

Let me find an example rq

frosty dock
#

hell nah i'm not debugging that mod list

#

figure out which mods are causing problems

#

you can remove half at a time

rare bobcat
#

So don’t use me as an example

#

Also does fool reject any spectrals as answers or does it simply not check spectrals

#

If I know this I can probably fix my issue

plain apex
rare bobcat
plain apex
#

lol

tender gale
#

alr, thanks though

wintry brook
rare bobcat
#

I’m modifying the source code for some simple qol stuff

plain apex
#

is there a way to play the sound at the correct time without updating smods lol

rare bobcat
#

If balatro were to update, would it overwrite any modifications in the source code?

foggy carbon
#

depends on if lovely also updates

#

IMO

frosty dock
#

yes, this is why you don't modify the source code directly and use lovely instead

rare bobcat
#

I just say fuck it we ball to this

frosty dock
#

if you're using lovely patched, the gamee updating doesn't change anything unless your patch target got changed

rare bobcat
#

Is it a bad idea? Yes. Do I care? No.

frosty dock
rare bobcat
#

And this is purely for modifying things in the base game

#

For new content then lovely is used

wintry brook
#

can you even release a mod thats just the base game with modified code like that

frosty dock
#

no lovely is literally used for modifying things in the base game

frosty dock
wintry brook
#

unless its for yourself, i think releasing that would breach TOS

rare bobcat
#

I’m sumply doing this for myself

wintry brook
#

since its just the games original source code

rare bobcat
#

No releasing this

wintry brook
#

might as well carry on then, but lovely patches are really simple imo

zealous glen
frosty dock
#

i strongly recommend you convert your changes to lovely patches still, you'll have a hard time recreating it when the game updates anyway

zealous glen
frosty dock
zealous glen
#

I reckon it's still not allowed

rare bobcat
#

You goons are not getting your hands on observatory tarot deck without doing it yourself (goons as in non derogatory)

frosty dock
#

wait actually someone's tried that too

wintry brook
#

its against the law i thought, redistributing source code

#

even if its modified

tender gale
#

What's wrong with my code? The name and description are showing up blank

rare bobcat
#

So this is worse for me because I don’t know how to simply modify the things

frosty dock
zealous glen
#

Instead of modifying the game code, hope the Ghosts of Christmas convince thunk to add automatically calculated card destruction to vanilla

rare bobcat
#

I can add a new joker with some work

#

But modifying the fool’s code to include spectral cards?

#

Or the other small things I did?

#

Nah

wintry brook
#

lovely patch, yeah

#

lovely patches are literally what you're doing, you type in the code you want to add and a target of where that code should be placed

#

its borderline no different

rare bobcat
#

The thing is, I have no clue how to do that and I heavily doubt there’s a YouTube tutorial

zealous glen
#

Isn't there an explanation in the lovely github

#

it's also not too hard

wintry brook
#
[[patches]]
[patches.pattern]
target = "functions/state_events.lua"
pattern = '''
-- TARGET: card destroyed when played
'''
position = "after"
payload = '''
if SMODS.has_enhancement(scoring_hand[i], 'm_imaginary_werewolfCard') and not scoring_hand[i].debuff and scoring_hand[i].config.cardsToDestroy and #scoring_hand[i].config.cardsToDestroy > 0 then
    for j=1, #scoring_hand[i].config.cardsToDestroy do
        if SMODS.shatters(scoring_hand[i].config.cardsToDestroy[j]) then
            scoring_hand[i].config.cardsToDestroy[j].shattered = true
        else 
            scoring_hand[i].config.cardsToDestroy[j].destroyed = true
        end 
        cards_destroyed[#cards_destroyed+1] = scoring_hand[i].config.cardsToDestroy[j]
    end
end
'''

it doesnt get more complicated than this tbh, minus some quirks

rare bobcat
#

I just remembered I can ask for help more directly than that

zealous glen
#

you just have to find a line to add code before, after, or at

wintry brook
#

i just say what file to target, what code is the spot to add my code & before/after/at, then my code

rare bobcat
#

I lowkey forgot that a majority of people will help if they’re able to, am I cooked?

zealous glen
wintry brook
#

as long as you can remember everything you added, converting to lovely patch wont take too long

foggy carbon
#

^ (this is the big reason I avoided updating my Pokemon Essentials project for so long. Could not remember all my changes)

rare bobcat
#

I increased temperance and hermit caps, added observatory voucher to tarot deck, and that was about it

#

The fool thing is something I haven’t done yet

tender gale
#

Why not just make a new tarot card that creates the last used spectral

rare bobcat
tender gale
#

yeah but if that's not possible then try something else

rare bobcat
#

I know for 100% sure it’s possible, I just don’t know how

#

If I rebuilt balatro from the ground up, I could make that change

tender gale
frosty dock
wintry brook
rare bobcat
#

Is payload what’s printed or is print what’s printed?

rare bobcat
#

If print is what’s printed, what’s payload

#

And vice versa

frosty dock
#

there's no print

ionic verge
rare bobcat
#

So I’m looking at the wrong thing

#

I am

frosty dock
#

there's pattern, which is the line in the file you're matching against, and payload is the code you're inserting

rare bobcat
#

I copied the wrong thing

rare bobcat
#

so something like target = "back.lua" pattern = "({localize{type = 'name_text', key = 'v_tarot_merchant', set = 'Voucher'}, localize{type = 'name_text', key = 'v_planet_merchant', set = 'Voucher'}," position = 'at' payload = "{localize{type = 'name_text', key = 'v_tarot_merchant', set = 'Voucher'}, localize{type = 'name_text', key = 'v_planet_merchant', set = 'Voucher'}, localize{type = 'name_text', key = 'v_overstock_norm', set = 'Voucher'}}"

frosty dock
#

which tries to re-run itself if you don't return true

ionic verge
#

can i return both that and the remove = true?

#

or should i just unwrap it

frosty dock
#

you can't return that from the event out of the original function

#

because it gets run later

#

in this case you just shouldn't use an event

ionic verge
#

ok

#

i remember earlier someone saying i should try that

#

is all

rare bobcat
ionic verge
#

all i did was remove the event

frosty dock
#

oh i just saw, remove_playing_cards calculates when playing cards are removed

ionic verge
#

oh so its literally playing cards

#

not playing cards like what those all are called

frosty dock
#

no, playing cards as in what those are called

ionic verge
#

oh ok nevermind

frosty dock
#

but it's not the context that calculates if you should remove a card

#

it gets called when cards are being removed

ionic verge
#

ooooh

#

ok so
preferably id like for this to happen after scoring, so replace it with context.after?

frosty dock
#
if context.cardarea == G.hand and context.destroy_card then
  local highest = nil
  for _,v in ipairs(G.hand.cards) do
    if not highest or v:get_id() > highest:get_id() then highest = v end
  end
  if context.destroy_card == highest then return { remove = true } end
end
#

if I'm not crazy because it's 3am, this should work

ionic verge
#

so real

#

whats with the _ in that for loop

frosty dock
#

that's just the index

#

which I'm calling _ because I'm not using it

#

could have just as well called it i or j or k or context

tender gale