#💻・modding-dev

1 messages · Page 382 of 1

placid star
#

well there you go

#

so check v.config.center.original_mod

red flower
slow brook
#

it doesn't let me set it to false

red flower
#

it's v.original_mod

#

what's mod_id

hard mica
red flower
#

and are you sure that doesn't work?

red flower
hard mica
#

nope it doesnt give me a random jonkler

red flower
#

print(valid_pool) after the loop

#

when you're coding you never look at the end result and say oh well nothing works lol

slow brook
red flower
#

idk what you want to do

#

i recommend learning some lua basics

hard mica
slow brook
# red flower idk what you want to do

i want my joker to give +100 chips at scoring, but after using a specific consumable on it it gives +500 chips at scoring instead for the whole round, then going back to normal

red flower
sleek cliff
#

So they coexist now, but selling does nothing

hard mica
red flower
red flower
#

do it in the apply function

red flower
sleek cliff
#

ah

red flower
# hard mica wdym?

G.P_CENTER_POOLS doesn't have any mod jokers until smods loads them in a function and that part of your mod loads before smods loads your jokers

hard mica
#

oooh

#

how do i register them then?

red flower
#

just do it inside apply

hard mica
#

yeah but how do i do it

red flower
#

ctrl+x ctrl+v

slow brook
glad osprey
#

why are the cards with specifically a custom rank AND a custom suit not using the correct atlas

hard mica
sleek cliff
red flower
#

yes, your logic is fine

#

but you want to do context.card.config.center.key == "key"

sleek cliff
#

should I put that in the if then?

red flower
#

yes

sleek cliff
#

ok, it KINDA works, its saying its upgrading, but its not ACTUALLY upgrading

hard mica
#

why arent the tags going away after i got the cards lmao

dull sage
#

So I have managed to create my own booster with my modded consumable, but it's showing "ERROR" instead of the Pack Name, how do I fix that?

open forum
#

🧐 How'd I make it such that the game opens wordle or do something adjacent

willow plinth
#

for stuff like that you are probably better off researching love2d and lua directly

open forum
#

Ic

slow brook
#

is there a way to discard every card in hand?

glad osprey
#

how do i enable joker retriggers

placid star
glad osprey
#

ty for answering the question instead of just reacting to the message

gaunt thistle
#

bwahaha idk either

placid star
#

@modern kindle your code for splash, can you send it again? im just thinking and i think it might be slightly inefficient (if u care at all)

spiral crown
#

does anyone know why I am getting this crash/ how to fix it? Happens when I hover over my new booster pack in the collection

teal yoke
#

Any tips to get this working? I have a joker that triggers on non face cards, currently triggering correctly. I'm trying to add the number value of chips(essentially a retrigger, but there will be more steps once this works). other_card works in the context line, but doesn't work when trying to add the chips in the return block.

if not context.other_card:is_face() then
    return {
         chips = self.ability.extra.chips * other_card.base.nominal,```
wintry solar
#

oh I actually have useful docs regarding retriggers and post triggers now

#

coming soonTM

placid star
wintry solar
#

no

#

you can't do that

placid star
spiral crown
placid star
spiral crown
misty shoal
placid star
misty shoal
#

grim is about to be more goated

#

also 2s to aces which might be kinda good but eh

placid star
#

omg u just gave me an idea for a consum

#

1/4 chance to turn entire hand into kings, else destroy all cards

#

lmao

modern kindle
misty shoal
#

I asked a question and am being asked to pay money to make your card balatrojoker

modern kindle
#

my practice is based on if it works over if its most efficient

placid star
misty shoal
daring fern
misty shoal
#

I think so

#

wait does that top section need a return true as well

daring fern
misty shoal
#

hmmm, I guess the vanilla remade strength is jsut missing it then lol

#

ok yeah that was it

#

funny enough this works, so reverse strength is jsut strength's code with (1) extra character

#

I thought 2->ace might not work but it's fine

wheat jewel
#

if i wanna play a sound effect when a joker gives money, is this the best way to go about it?

glass scaffold
#

Tried to update someone to 0.7.1, got this. Help.

daring fern
wheat jewel
#

in the return statement?

daring fern
wheat jewel
#

like this?

#

add a comma after the sound statement?

daring fern
wheat jewel
#

but those are checks for how much money to earn from discards and hands left

daring fern
#

Wait this is in calc_dollar_bonus?

wheat jewel
#

yeah

#

can econ jokers play sounds on the win screen when giving money?

daring fern
daring fern
wheat jewel
#

what value is number going to be?

#

or wait

daring fern
wheat jewel
#

number would be a check for if discards and hands are 0

#

if they aren't

glad osprey
#

bump

wheat jewel
#

they would play the sound and then return the number of money in prportion to hands and discards unused

wheat jewel
#

this joker i'm making gives 1 dollar per discard or hand that you don't use

#

would this work properly for that purpose?

#

and should i add a comma after the sound statement to not cause errors?

daring fern
#

This is a function not a table.

wheat jewel
#

Oh ok

#

let me test it now

red flower
wheat jewel
#

It works!!!

glad osprey
red flower
#

you would need to modify the pools too i think

slow brook
#

can i add a joker that’s only there to be turned into from an another joker and cant actually be found in shop?

red flower
#

yes

#

just return false in in_pool

quick kraken
#

Ok so I'm trying to make a joker that copies and force-uses consumables

#

What in the world did I do wrong?

#

Cause it doesn't work

daring fern
quick kraken
#

Nothing works but I think part of the issue might be that I forgot card.ability. behind state

slow brook
#

do animated jokers cycle through each frame automatically in a loop or can i control when the frame changes

quick kraken
#

Well it still doesn't work so I'll repost the code

#
        if context.using_consumeable and context.consumeable.ability.set == "planet" and card.ability.state == 0 then
                card.ability.state = 1
                G.E_MANAGER:add_event(Event({
                    func = function()
                        card_eval_status_text(context_blueprint_card or self, 'extra', nil, nil, nil, {message = "Copied!", colour = G.C.CHIPS})
                        local p_card = copy_card(context.consumeable)
                        G.FUNCS.use_card({ config = { ref_table = p_card } })
                        return true
                    end
                }))
                card.ability.state = 0
        end
    end```
neat leaf
#

Is the source code behind Brainstorm's Immolate.dll available anywhere? It's not in the git repos as far as I can tell. I'd like to fork it and add a bunch of extra features, including a way to script against it.

daring fern
quick kraken
#

Also, would it be possible to instead retrigger planets?

daring fern
neat leaf
#

Thank you.

daring fern
quick kraken
slow brook
#

stackable like madness for example, eating a joker and gaining mult each time it does

daring fern
#

But yes.

slow brook
daring fern
quick kraken
#

So I can also do it to Wheel of Fortune and other chance-based consumables

#

As such, what's wrong with my code?

chrome widget
#

How do you determine that something is a modded suit or rank?

#

I could at base just make a reference table of the vanilla keys, but is it actually already stored somewhere?

quick kraken
#

And it's only for hand level ups

minor magnet
#

chat i need some help

#

can someone who understand smods' straight calculation help me rq

raven forge
#

is this about jump cards

#

I think you can go ahead and post your code, whatever you've got

#

@minor magnet

minor magnet
#

i can't get them to work right

prime stone
#

Does anybody have this issue where if you shuffle the deck, discards will draw cards using the same order before you shuffle but playing a card will update it to use the new order?

minor magnet
# raven forge I think you can go ahead and post your code, whatever you've got

PATCHES

# Jump Cards
[[patches]]
[patches.pattern]
target = '=[SMODS _ "src/overrides.lua"]'
pattern = '''local id = card:get_id()'''
position = "at"
payload = '''
local id = SMODS.has_enhancement(card, 'm_garb_jump') and 0 or card:get_id()
'''
match_indent = true
overwrite = true

[[patches]]
[patches.pattern]
target = '=[SMODS _ "src/overrides.lua"]'
pattern = '''if skip and (wrap or not SMODS.Ranks[v].straight_edge) then'''
position = "at"
payload = '''
if total_jumps and total_jumps > 0 or skip and (wrap or not SMODS.Ranks[v].straight_edge) then
'''
match_indent = true
overwrite = true

[[patches]]
[patches.pattern]
target = '=[SMODS _ "src/overrides.lua"]'
pattern = '''for _,w in ipairs(SMODS.Ranks[v].next) do'''
position = "after"
payload = '''
total_jumps = total_jumps and (total_jumps - 1) or 0
'''
match_indent = true


[[patches]]
[patches.pattern]
target = '=[SMODS _ "src/overrides.lua"]'
pattern = '''table.sort(ret, function(a,b) return #a > #b end)'''
position = "at"
payload = '''
if #jumps < 4 then
    table.sort(ret, function(a,b) return #a > #b end)
    if ret[1] then for k,v in ipairs(jumps) do table.insert(ret[1], v) end end
else
    ret = {hand}
end
'''
match_indent = true
overwrite = true
raven forge
minor magnet
#

FUNCTION

local getstraighter = get_straight
function get_straight(hand, min_length, skip, wrap)
    total_jumps = 0
    min_length = min_length or 5
    jumps =  {}
    for i = 1, #hand do
      if SMODS.has_enhancement(hand[i], 'm_garb_jump') then 
        jumps[#jumps+1] = hand[i] 
        total_jumps = total_jumps + 1
      end
    end
    if #hand >= min_length then jumps = jumps else jumps = {} end
    return getstraighter(hand, min_length-#jumps, skip, wrap)
end
prime stone
raven forge
#

lots of normal-looking functions have events buried inside them

raven forge
minor magnet
#

take the place of any card in a straight

#

as of right now they work in the first, second, and last positions

#

if you play them as the third or fourth card they will not work

raven forge
#

that's tough with only very few patches. it's not like shortcut where you can have exactly one gap each time

#

I'll have to read over those patches; I am currently thinking you might want help with the algorithm instead of trying to find where the current code is wrong

minor magnet
#

genuinely understanding exactly how the get_straight code works might help me more

raven forge
#

first part of the function collects all cards into buckets by rank into ranks table; then, looks like a collection of tuples (partial straights?) is created. (I'm reading through right now, I think the get_straight code changed)

#

ok, looks like it basically keeps extending each straight in parallel?

minor magnet
#

huh??

#

genuinely i struggle to understand that code so much

raven forge
#

basically all the partial straights are in tuples. simplifying a lot, in one iteration, every partial straight is extended by one card if possible, possibly making a lot more partial straights, which are collected back into tuples

prime stone
raven forge
#

next_ranks() is a helper function saying "which cards can be added onto this partial straight"

wild escarp
#

Is there some way to track the amount of jokers bought throughout the run? Like fortune teller, but with jokers.

gusty iron
#

Would there be anyway to change base game boss blinds?

(Ex: Making tooth give 1 dollar instead of losing one dollar?)

raven forge
minor magnet
gusty iron
raven forge
#

I wouldn't take ownership as you'd have to recreate the original effect

gusty iron
#

Yeah its for a deck im making

#

It essentially reverses the effects of each boss blind

#

(Violet Vessel is 0.25x base, for those asking :) )

raven forge
#

yeah, you'll have to just change every boss blind. the easier way will probably be using lovely patches; you can go to Lovely's github page, or check other mods to see how. (lovely/dump contains the post-patch files so you can see what's happening)

gusty iron
#

Could i get a few mod examples which use patching?

minor magnet
raven forge
#

pretty much all of them these days. I was just working on Lucky Rabbit

gusty iron
#

Is toml still written in lua

turbid maple
#

no its written in toml

raven forge
turbid maple
#

lovely readme has an example

gusty iron
#

Okay

turbid maple
gusty iron
#

This isnt gonna be fun :agony:

raven forge
turbid maple
#

example mod that uses lovely patches

minor magnet
turbid maple
gusty iron
#

Ohh

wild escarp
#

Is there any context I can check for buying a joker?

gusty iron
#

So it is basically lua yeah

turbid maple
#

well

#

you write the lua code in a string

#

the toml file contains the lua code

#

you'll see if you look at some examples

gusty iron
#

Okay yeah thats what i meant

#

I didnt want to have to learn a new language

turbid maple
#

context.buying_card

context.card is the card that was bought

#

also note that the card being bought will also receive this context so you might want to check for that if you don't want to have it trigger off of itself being purchased

wheat jewel
#

how do you make the probability in a joker desc change with oops all 6s

gusty iron
#

Check smods github page with moddedvanilla

#

It should have a gros Michel clone

turbid maple
#

but the normal thing keeps track of probabilities being changed

gusty iron
#

Yeah

wild escarp
turbid maple
#

I always forget how to do that

quick kraken
#

hey so 2 questions

#

first, where is current ante stored?

#

Secondly, how do I check if a number is an integer in Lua?

turbid maple
#

everything is included in various things called config cenfer or whatever I forget where things are

gusty iron
wheat jewel
quick kraken
#

I need a way to check if current ante is multiple of 8

gusty iron
placid star
#

is there a default timer function that ticks when a time interval passes?

quick kraken
#

Fucking Modulo

wheat jewel
gusty iron
#

% is modulo

quick kraken
#

How did I forget about Modulo

wheat jewel
#

how do i make the probability display in the joker description

quick kraken
#

Also where is Ante stored

gusty iron
# wheat jewel

:agony:

You need to put it in the config, then return a loc_vars function

placid star
turbid maple
wheat jewel
#

ok lemme try that

gusty iron
turbid maple
#

people tend to forget loc_vars is a function and you can do whatever you want in them!

daring fern
turbid maple
#

ante is stored in the balls

gusty iron
turbid maple
#

true

placid star
red flower
gusty iron
#

The humble modulo:

turbid maple
#

hey mr n how do you check if a card is a joker again

quick kraken
#

Is there such a thing as G.GAME.ante then?

daring fern
red flower
#

card.ability.set == "Joker"

placid star
quick kraken
#

Cause finisher blind can show up on ante 7 too if you used Hieroglyph

turbid maple
#

I can never remember this

quick kraken
#

And if I understand the intention behind who supplied me with the joker idea, then it has to be exactly a multiple of 8 ante

gusty iron
#

So to check if its a multiple of 8 just do like

if G.GAME.round_resets.ante % 8 == 0 then

quick kraken
#

Yeah ok thanks

gusty iron
#

Oh yeah, friendly reminder that you can put negative on playing cards!

Do what you want with this information.

turbid maple
#

friendly reminder that this is illegal and you have been reported to your local authorities

quick kraken
#

I thought it was a cryptid thing?

red flower
#

it's an smods thing

turbid maple
#

no negative on playing cards just work

quick kraken
#

Oh it's smods

gusty iron
#

They act effectively like +1 Hand size

#

I think its pretty niche :)

placid star
red flower
#

JoyousSpring(tm) has some

gusty iron
#

I even made a tarot to let you do it

#

My friend named it "The Negator-inator"

placid star
#

i had a seal like that but realised it was too op lol

gusty iron
#

EVIL SEAL
X-2 MULT

red flower
gusty iron
#

but if you trigger it an even amount of times it becomes good seal

#

Because - X - = +

gusty iron
wheat jewel
#

when i hover over the joker in the collection menu, it keeps crashin and telling me line 220 causes an error

turbid maple
#

no one has made a joker that kills seals and called it polar bear or something like that yet as far as I can tell and this is greatly disappointing

gusty iron
#

Also would it be possible to replace every blind with a boss blind, triple the ante requirement, and then reduce scaling to not make it go crazy?

daring fern
red flower
gusty iron
#

Cause i know a mod that replaces the blinds, but idk about changing the win requirement from 8 to 24

gusty iron
#

The poor seals

#

🦭

placid star
gusty iron
#

Its gonna be the final stake in my mod

placid star
#

wild, gold stake and that? i RARELY ever do anything but white in modded to begin with

prime stone
gusty iron
#

But ill also offer it as a deck version for people who like white stake

placid star
gusty iron
placid star
#

so its what mariokart players think darksouls is like as a balatro stake? peak

gusty iron
#

Aqua isnt that bad, just buy clearance for 13 if you can, and then its basically just normal again

Unpleasant is a different story.

#

But if you think about it, youll be gettint alot of money from the boss blinds, so unpleasant shouldnt be an issue if you manage econ well

placid star
#

still deck fixing and econ would require an insane amount of precision

#

you should add a feature where you can only get common jokers

gusty iron
#

[Applies unpleasant stake]

gusty iron
placid star
#

so rare chance = 2, uncommon = 12, seems too much

misty shoal
gusty iron
#

True

misty shoal
#

1 and 6

gusty iron
#

Also im thinking of making showdown blinds into decks

placid star
#

better yet, get rid of rare, change uncommon to be weight of rare

gusty iron
#

Violet Vessel Deck - Very Large Deck (104 Cards, 26 of each suit)

#

Verdant Leaf Deck - 2X Sell Value for ALL Jokers

placid star
gusty iron
#

What would the other 3 be tho...

placid star
#

crimson would act like the blind does

#

or -1 joker slot

misty shoal
#

does anyone know how hard it would be to make all held consumables negative?

gusty iron
#

No i mean the decks not the stakes

placid star
gusty iron
gusty iron
#

lets move this discussion to my mod forum

placid star
#

yeah ping me there

shut crater
shut crater
#

yeah that's not bad

placid star
#

again, very easy

misty shoal
#

yeah im jsut not too well versed in refering to the held consumables

shut crater
#

use a for loop to iterate over G.consumables and set the edition of each card to negative

#

might be spelled consumeables because thunk can't spell sometimes

placid star
#
      v:set_edition('e_negative')
end```
placid star
#

wait no, smods and him differ

gusty iron
wild escarp
#

Does someone have an example of a joker that counts all previous joker purchases?

shut crater
#

I know someone has been working on something along those lines but I don't remember who

#

what's your goal?

wild escarp
#

Just a joker that gives plus 3 mult for each unique joker owned within the run.

shut crater
#

I think unfortunately that is actually pretty difficult to do

#

or at least it requires a hook

#

afaik there is no in-game tracker for unique joker purchases

wild escarp
#

Would just joker purchases be more doable? Not tracking unique jokers.

shut crater
#

I think it would be approximately the same amount of work

#

to be clear they're both totally doable you just need to hook whatever function is responsible for purchasing a joker, but I have never done anything with the shop so I can't give you a good starting point

wild escarp
#

I haven't done any hooking whatsoever.

shut crater
#

how ready are you to learn

red flower
#

my go to for things that have a context is hooking SMODS.calculate_context

shut crater
#

it's not too bad

red flower
#
local SMODS_calculate_context_ref = SMODS.calculate_context
function SMODS.calculate_context(context, return_table)
   if context.buying_card and context.card.ability.set == "Joker" then
         G.GAME.prefix_jokers_bought = (G.GAME.prefix_jokers_bought or 0) + 1
  end
    return SMODS_calculate_context_ref(context, return_table)
end
#

sorry if the formatting is bad

turbid maple
#

he wants to keep track of jokers purchased in a run so context wouldnt work

#

oh

#

okay sure that works

wheat jewel
#

how to i make this return both 1 dollar for every hand and discard unusued, for me it only does 3 dollars when i have 3 hands and 3 discards

turbid maple
#

and does not add things

wheat jewel
#

when it should be $6

turbid maple
#

you want to add numbers

glass scaffold
wheat jewel
red flower
faint yacht
#

-# ...2.2.0-dev, a bit older, huh.

glass scaffold
red flower
#

idk i dont play mods

#

but jokerdisplay is outdated so im guessing the others are too

placid star
red flower
#

why

placid star
#

or did i dream that context...

placid star
red flower
#

card_added i think

red flower
uncut cloud
#

first time modding balatro
i have genuinely no idea of whats going on anymore
completely lost the plot

red flower
#

:set_seat with a colon

uncut cloud
#

ah

#

makes sense

#

lemme try that

#

okay that was

#

better

#

saw the seals for a second there, crashed again

#

i see the issue tho i can fix that myself

#

thanks by the way

red flower
#

yw

glass scaffold
wild escarp
shut crater
#

almost exactly as written, replacing prefix with your mod's prefix

#

then any time you need to access the number of jokers that have been bought you can use G.GAME.prefix_jokers_bought

wild escarp
#

Thank you both!

misty shoal
#

small side effect of how I coded oracles conditions (if you have any consumables), if you are holding just oracle you can use it and it does nothing

#

I will be leaving it as such and do not want any recommendations on fixing it I just wanted to share

red flower
#

you can fix it by setting your microwave to 5 minutes on high

tight notch
#

If i wanted to multiply the rate of foil cards appearing(like hone and glow up but just for foil cards) in a joker, how would I do that?

tight notch
rapid stag
#

if i wanted to feed G.localizations.descriptions.Other.Edition.e_negative_playing_card into an info_queue, what's the best way to do that cirDerp

rapid stag
#

oh, i'm familiar with adding via a key, set table. the problem here is that this is in a set, in a set. ...so like, how do i set up the table? because { key = 'e_negative_playing_card', set = 'Other' } sure isn't gonna work, but neither is { key = 'e_negative_playing_card', set = 'Edition' }?

shut crater
#

crazy thought but would set = "Other.Edition" work?

faint yacht
#

...why specifically under Other?

shut crater
#

also ^

rapid stag
#

that's how they structured it

tight notch
#

so uh bump

shut crater
#

I have no idea how it decides whether to apply an edition

#

actually

shut crater
#

looks like G.GAME.edition_rate

tight notch
#

i'll go over it again

shut crater
#

ohhh I missed that you wanted specifically foil

#

then my guess is that you would probably need to modify the weight of e_foil in G.P_CENTERS

#

or...hook its get_weight?

#

I'm not at my computer so I'm not looking at the code

tight notch
#

i have an idea which is take ownership of the foil edition and multiply the weight like wormhole deck

shut crater
#

that is a much more straightforward solution

#

you could probably just replace its get_weight function then

#

using take_ownership

tight notch
#

that's what i'm doing

#

also does add to deck effects stay if the card goes away

shut crater
#

yes, so if you want to reverse the effect you'll need to do something in remove_from_deck

tight notch
#

alright

tight notch
shut crater
#

that...is a good question

tight notch
#

for example:

    add_to_deck = function(self, card, from_debuff)
        SMODS.Edition.take_ownership("foil", {
            get_weight = function(self)
                return self.weight * center.ability.extra.foilrate
            end,
        }, true)
    end,
shut crater
#

I would be hesitant of overriding config using take_ownership

tight notch
#

ignore the formatting

shut crater
#

because you're replacing the config of the original

tight notch
#

ah

wheat jewel
#

trying to make a joker like oops all 6s but instead it sets probabilities to zero, but when i spawn the joker then sell it, the probabilities are still set to 0, how do i fix this

shut crater
#

also that's not how take_ownership is used

tight notch
#

ah ok

#

im new to modding and lua in general

faint yacht
hasty mist
#

how do i detect if a player is idle? like, if they havent clicked in over a minute (i can use context.cry_click, but i wanna know how to check time)

shut crater
tight notch
#

this would be easier although i want the foil multiplier to change if another joker changes it

shut crater
#

and then your joker modifies that special variable

shut crater
tight notch
faint yacht
#

Could always update it to reflect the changes... but just don't let it become 0. ¯_(ツ)_/¯

shut crater
tight notch
#

brb

shut crater
#

so in the wiki example they take ownership of a Joker using SMODS.Joker, looking for the joker with the key 'joker', and replacing its cost and calculate functions

tall jewel
#

nyehehe

primal robin
glad osprey
#

how save stuff

shut crater
#

G.GAME

glad osprey
#

no like to the profile

lofty sand
#

yo what's the sound that occurs when a joker "activates"? not really sure how to describe it

#

the sound that should go along with card:juice_up()

#

like the card flick sound, I guess lol

faint yacht
#

generic1?

#

That's the "default" one unless chips, mult and what not are involved.

lofty sand
#

cool, I'll give it a shot

lofty sand
digital niche
#

can someone send me a screenshot of line 2240-2269 of game.lua inside lovely folder?

short girder
#

how do i stop this guy from returning 10$ for every card held in hand

red flower
#

and remove the repetition part, that takes care of it

short girder
#

many thankses

tight notch
wind steppe
#

How would I put a modded sticker on a card with SMODS.create_card?

#

right now I have ```lua
SMODS.create_card({set = "Food", area = G.pack_cards, skip_materialize = true, key_append = "does rng seeding matter that much?", stickers = {'para_negativesticker'}, edition = 'e_negative'})

tight notch
wind steppe
#

also check when your joker is removed so you can reset the values

rapid stag
tight notch
red flower
lofty sand
#

does anyone know if/how I could make a joker modify the price of booster packs specifically instead of just using G.GAME.discount_percent?

red flower
#

i hook set_cost for it

wind steppe
red flower
rapid stag
wind steppe
#

How would I put a modded sticker on a card with SMODS.create_card?

tight notch
wind steppe
red flower
rapid stag
#

i see

wind steppe
#

i would assume you could loop through the jokers and check but idk how to access it

#

(it being the jokers)

red flower
tight notch
wind steppe
#

oh thats a lot faster

lofty sand
red flower
lofty sand
#

sick, thanks :)

wind steppe
#

does anyone know why this doesn't spawn my sticker on the card?

SMODS.create_card({set = "Food", area = G.pack_cards, skip_materialize = true, key_append = "does rng seeding matter that much?", stickers = {'para_negativesticker'}, edition = 'e_negative'})
tight notch
#

Another question, I'm making a deck and in game it just says ERROR and crashes the game when you try to play it.

#

here's the code

#

the only thing that displays right is the sprite

lament sparrow
#

I'm assuming lovely has a debug function

lofty sand
red flower
# tight notch here's the code
  1. use SMODS.add_card to create jokers
  2. you need to use an event in apply or it will crash because the joker area doesn't exist yet

the error thing idk it's probably something wrong with how the loc_txt is formatted

wind steppe
red flower
lofty sand
#

I'm finding IDs for specific booster packs but not booster packs generally

red flower
#

card.ability.set == "Booster" iirc

wind steppe
#

for comparison i have this that spawns two jokers (ignore the names)

    apply = function()
        sendDebugMessage('Deck selected')
        G.E_MANAGER:add_event(Event({
            func = function()
                local card = SMODS.create_card({
                    set = 'Joker',
                    area = G.jokers,
                    key = 'j_markiplier_plusmarkiplier',
                    
                })
                card:add_to_deck()
                G.jokers:emplace(card)
                return true
                end
              }))
        G.E_MANAGER:add_event(Event({
            func = function()
                local card = SMODS.create_card({
                    set = 'Joker',
                    area = G.jokers,
                    key = 'j_markiplier_timesmarkiplier',
                })
                card:add_to_deck()
                G.jokers:emplace(card)
                return true
                end
              }))
    end
})
lofty sand
compact girder
tight notch
compact girder
#

crap mkv

#

one sec

tight notch
#

and how do i use events

wind steppe
#

i will never understand why obs doesn't just save directly as mp4

wild escarp
#

Would it be possible to check what poker hands have been played in an ante?

wind steppe
# tight notch and how do i use events
        G.E_MANAGER:add_event(Event({
            func = function()
                local card = SMODS.create_card({
                    set = 'Joker',
                    area = G.jokers,
                    key = 'j_markiplier_plusmarkiplier',
                    
                })
                card:add_to_deck()
                G.jokers:emplace(card)
                return true
                end
              }))

i think if you just change the name of the joker and put this in apply ur good

compact girder
# compact girder

SMODS.Joker{
key = 'jokerkaite',
loc_txt = {
name = 'Kaite',
text = {
'Gains {C:red}+2 {C:black}Mult every time {C:gold}High Card {C:black}is played.',
'{C:green}1 in 4 {C:black}chance to upgrade {C:gold}High Card {C:black}when played.',
'{C:inactive}(Currently {C:red}+#1# {C:inactive}Mult)'
}
},
atlas = 'Jokers3',
pos = {x = 0, y = 0},
config = {
extra = {
base_mult = 0,
growth = 2,
level = 1,
highcard_growth = 1,
}
},
rarity = 3,
cost = 8,
loc_vars = function(self, info_queue, center)
return {vars = {center.ability.extra.base_mult}}
end,
calculate = function(self, card, context)
if context.before and context.main_eval and context.scoring_name == 'High Card' then
-- initialize values if not already set
card.ability.extra.base_mult = card.ability.extra.base_mult or 1
card.ability.extra.growth = card.ability.extra.growth or 1
card.ability.extra.level = card.ability.extra.level or 1

-- apply growth
card.ability.extra.base_mult = card.ability.extra.base_mult + card.ability.extra.growth
SMODS.calculate_effect({message = "+2"}, card)

-- chance to level up
if math.random() < 0.25 then
  card.ability.extra.level = card.ability.extra.level + 1
  card.ability.extra.highcard_growth = card.ability.extra.highcard_growth + 1
  SMODS.calculate_effect({message = "Level Up!"}, card)
end

-- return effect
return {
  mult = card.ability.extra.base_mult
}

end
end
}

#

and theres code

wind steppe
#

the joker looks to be triggering before scoring instead of during joker_main

#

including the scoring

#

also put code like this:
```lua
-- Your code here!
```

#

idk why triggering then would do that though

rapid stag
manic rune
#

you should use SMODS.add_card instead

#

it does the same thing but more compact :p

tight notch
#

what would I change to use that

turbid maple
#

just had the same issue

#

kind of a confusing name but that's how smods redefines vanilla stickers /shrug

manic rune
#

i recommend reading this

#

it explains events pretty clearly

tight notch
#

as in like add card instead of create

manic rune
#

SMODS.add_card({key = "key"})

tight notch
#

and does that remove the need for the other things?

manic rune
#

yes

tight notch
#

alr

lofty sand
wind steppe
#

okay now i need to get my sticker to do something

#

how tf does apply actually work

manic rune
#

not sure if it runs when removed

lofty sand
# red flower elaborate?

I'm not sure what function I should be hooking for modifying the cost and sell_cost, is what I mean

rapid stag
red flower
turbid maple
#

apply is just a function gets called when the sticker gets added

wind steppe
#

but not removed?

turbid maple
#

no

turbid maple
#

for something to happen when its removed you'd have to do it in its calculate function

rapid stag
red flower
turbid maple
# wind steppe how tf does apply actually work
    apply = function(self, card, val)
        if not card.ability.eternal then
            card.ability.supper_contracted = true
            card.ability.supper_contracted_tally = G.GAME.supper_contracted_rounds
        end
    end,

as an example mine simply sets a counter when sticker is added

thorn flame
#

anyone know how to change the font of a message?

wild escarp
#

How would I check for unplayed poker hands in an ante?

thorn flame
turbid maple
#

whatever context removes your sticker man

#
    calculate = function(self, card, context)
        if context.end_of_round and context.cardarea == G.jokers then
            if card.ability.supper_contracted_tally == 1 then
                card.ability.supper_contracted_tally = 0
                card.ability.supper_contracted = false
                card:juice_up()
            else
                card.ability.supper_contracted_tally = card.ability.supper_contracted_tally - 1
                return {
                    message = localize({
                        type = "variable",
                        key = "a_remaining",
                        vars = { card.ability.supper_contracted_tally },
                    }),
                    colour = G.C.FILTER,
                    delay = 0.45,
                }
            end
        end
    end,

Mine simply gets removed after some rounds so I do this

#

if you somehow have a thing that removes stickers off of cards and want it to trigger something based on that then you're on your own idk

wind steppe
#

on destruction mainly

turbid maple
#

when card is destroyed?

wind steppe
#

its for food jokers

turbid maple
#

so like triggering something when a joker with a sticker is destroyed

wind steppe
#

or on sell

#

its a passive effect

thorn flame
turbid maple
#

uhh

#

you'd prob have to hook or patch something

#

there's Card:sell_card you can hook into

#

idk what a useful function you'd hook into for destroying things would be

manic rune
#

theres a lot

turbid maple
#

yeah thats the problem

#

idk which one to use lol

manic rune
#

i guess you could try hooking to all the delete functions currently available 😭

wind steppe
#

wait actually how does negative do it

manic rune
#

is my pc cooked

#

🥀

turbid maple
#

oh

#

you could hook Card:remove_from_deck

#

that might work

wind steppe
#

how do i hook things? can't seem to find anything on it in steamodded

red flower
wild escarp
#

Is there something I can use to check for unplayed hands?

sullen fern
tall jewel
#

extra hime hehehe

lament sparrow
#

Where do I find G.deck.cards[#G.deck.cards]?

wind steppe
wind steppe
#

oh it's lovely isn't it

vale glen
thorn flame
#

not the name and description

manic rune
#

a

thorn flame
#

the trigger message

manic rune
#

card:stop_hover() runs before card:click()

#

shouldve expected that

wind steppe
#

wait how tf does lovely actually work

#

this is confusing

red flower
lament sparrow
red flower
#

i think the deck is defined in game.lua? search for self.deck

#

idk how much that will help

vale glen
#

Not sure when or how font styling is applied, or if that can be called on any arbitrary string, in any spot.

wild escarp
#

What's the context for defeating a boss blind?

faint yacht
#

I just use if context.end_of_round and not context.repetition and not context.individual and G.GAME.blind.boss.

red flower
wind steppe
#

if i have a Card how would i check if it has a specific sticker?

shut crater
#

it's a boolean

wind steppe
#

so for a modded sticker it would be card.ability.prefix_key?

shut crater
#

I believe so

rapid stag
tall jewel
#

How do you do the info_queue like that? as in, the "card art by" one

wind steppe
#

this is a create card function for a booster pack. why does it not spawn the jokers with the correct sticker?

    create_card = function(self, card)
        return SMODS.create_card({set = "Food", area = G.pack_cards, skip_materialize = true, key_append = "does rng seeding matter that much?", stickers = {'para_negativesticker'}, edition = 'e_negative'})
    end,
lofty sand
#

does anyone know how I could import custom sound effects and refer to them in my code?

tall jewel
sullen fern
hard mica
#

Does anyone know why the tags don't dissolve after it granted me the effect?

lucid owl
#

how would you check that context.other_card is equal to the card currently calculating? i'm doing an enhancement that creates consumables based on chance, but using context.main_scoring is just giving them right away when played rather than adding them after scoring

wheat jewel
#

how do i check if a full hand contains suit of hearts?

timid star
turbid maple
#

gahh can anyone tell me if theres a way to render a joker on top of my joker

carmine burrow
wheat jewel
#

trying to have a check for each card for if they are a heart, and keeping a local variable as true until a non heart suit iss hit

carmine burrow
#

you have to remove the all_hearts = true part

sleek cliff
wheat jewel
#

i'm referncing the code for lusty joker to do checks

carmine burrow
lofty sand
#

hey does anyone know how I can register my own sound effects folder in my code, so that the game will pull from that folder instead of the default resources folder?

wheat jewel
#

what do i do in place of it

carmine burrow
#

also, it won't work anyways

#

all_hearts is a local variable that goes away as soon as calculate is finished

#

and comes back as true when calculate is called again

wheat jewel
#

ok i see

carmine burrow
#

so instead you'll need to check the whole hand in joker_main

wheat jewel
#

i tried to look at any documentation for checking the whole hand but couldn't find anything

#

no jokers in base balatro check for a whole hand of a suit iirc so i didn't have anything proper to go off of

carmine burrow
#

if this is wrong, check blackboard

wheat jewel
#

Ok so it's using a for loop to loop through scored cards

#

gotcha

wheat jewel
#

i changed it from regular to plural

carmine burrow
#

idk enough about localize for that lmao

wheat jewel
#

that's ok

high sinew
#

For vards I would set it up like you did the first variable in localize give me a sec

#

Set loc vars like this

#

And but the vars in config

#

For ur localization file it should look sum like this I’ll show same joker localization

#

j_mills_jimbo_gump = {
name = "Jimbo Gump",
text = {
"This Joker gains {X:mult,C:white}X#1#{} Mult for every scoring enhanced card",
"Total: {X:mult,C:white}X#2#{} Mult"
}
},

#

That’s how localized looks

wheat jewel
#

i have everything set up but now it crashes and says the error occurs at line 575

high sinew
#

Idk really how to use that localized I wouldn’t

hard mica
high sinew
#

Use context intred it’s a lot more effiecent

#

What does this card do?

faint yacht
high sinew
#

Toga clutch like always?

wheat jewel
#

trying to check for a flush of hearts but when the round finishes, the game crashes at line 575 somehow

#

does anyone know what could be causing this issue

wheat jewel
#

Oh did the whole screenshot not show

#

damn gimme a second

wheat jewel
faint yacht
#

card.ability.extra.mult, not center.ability.extra.mult.

sleek cliff
wheat jewel
#

sorryy

hybrid shadow
daring fern
wheat jewel
#

Alright got it

sleek cliff
hybrid shadow
sleek cliff
#

I've tried the and not context.selling_card but doesn't work

wheat jewel
daring fern
hybrid shadow
# sleek cliff

why not just change the context to end of round or joker_main?

#

the mechanoid's already triggering every time so it's not like there's any reason to not have the context for the destroy function be the same time context

sleek cliff
lofty sand
#

does anyone know how to proplerly set up an SMODS.Sound class?

daring fern
lofty sand
#

I read through that already, I still can't seem to get it working

daring fern
faint yacht
#
GitHub

A personal timewaster project that is a mod for Balatro. - TheOneGoofAli/TOGAPackBalatro

GitHub

A personal timewaster project that is a mod for Balatro. - TheOneGoofAli/TOGAPackBalatro

lofty sand
faint yacht
#

For sounds too, gotta add mod prefix as part of string.

#

So, the defined win95start would be called by toga_win95start, where toga is my prefix.

lofty sand
faint yacht
#

Path relative to assets/sounds folder.

#

So if you have assets/sounds/otherfolder/fart.ogg, path is otherfolder/fart.ogg.

lofty sand
#

so this should work?

faint yacht
#

Should, yes. Whenever you're calling your sound, be it in return { sound = '...' } or in play_sound('...'), don't forget your mod prefix.

lofty sand
#

wait mod prefix? I suppose I missed that part

#

is that just the mod id?

daring fern
lofty sand
#

how can I make/find that then?

daring fern
lofty sand
#

header

daring fern
lofty sand
#

never made a prefix ig lol ¯_(ツ)_/¯

faint yacht
#

It will default to the first 4 letters of your mod ID, lowercase, if not defined.

lofty sand
#

cool, I just defined a prefix in my header so I'll see if that works

shut crater
#

There is a good chance adding the prefix at this point will break many things

#

Good luck soldier

lofty sand
#

let's hope that isn't the case lmao

faint yacht
#

What's your mod ID currently?

lofty sand
#

just droljokers, so I'd assume it would default to drol

faint yacht
#

drol, yes.

shut crater
#

Convenient

lofty sand
#

yeah, if the prefix breaks things it wouldn't be that big of an issue

faint yacht
#

You'd just have to readjust things from drol to whatever you put there.

#

And drol_damn & drol_newports would be the strings to use for calling your sounds.

lofty sand
#

yep, and I don't think I used my mod ID anywhere yet lol

#

the mod's pretty simple honestly

#

so far, doesn't seem to have broken anything

#

yep, prefix solved everything lol

#

thanks guys :)

faint yacht
#

👍

sleek cliff
#

I forgot I made the Master's Tardis a spectral

bleak crane
#
SMODS.Joker {
    key = 'source',
    loc_txt = {
        name = 'Source Error',
        text = {
            "Destroy a {C:attention}random scored card{}",
            "add its {C:blue}Chips{} to this jokers",
            "Mult",
            "{C:inactive}(Currently {C:mult}+#1#{C:inactive} Mult)"
        }
    },
    config = {extra = {mult = 0}},
    rarity = 3,
    atlas = 'kamisjokers',
    pos = { x = 6, y = 1 },
    cost = 6,
    loc_vars = function(self, info_queue, card)
        return {vars = {card.ability.extra.mult}}
    end,

    calculate = function(self, card, context)
        local _card = pseudorandom_element(G.play.cards, pseudoseed('source'))
        if context.joker_main and context.cardarea == G.jokers then
        card.ability.extra.mult = card.ability.extra.mult + _card.base.nominal
            return {
                message = 'Upgraded!',
                colour = G.C.CHIPS,
                card = card,
                mult = card.ability.extra.mult,
                _card:start_dissolve()
            }
        end
        
        if context.joker_main then
            return {
                mult = card.ability.extra.mult
            }
        end
    end
}

i have a few issues with this:

  • destroys the card before scoring it, which looks ugly
  • i only want it to activate the first hand played, then never again that round
  • (attached image) ghost cards??? the cards actually exist but they also just... dont. its like the dissolved cards arent actually removed from the deck
faint yacht
#

You'd probably want to "mark" the randomly chosen card first, then use context.destroy_card to check if said card is marked and then return { remove = true } with said context.

bleak crane
faint yacht
#

context.other_card.marked = true... then check context.destroy_card.marked.

bleak crane
faint yacht
#

_card:start_dissolve() does not belong in the return anyway.

#

But do not forget-

if context.destroy_card and context.destroy_card.marked then
  return { remove = true }
end
daring fern
bleak crane
#

wha

bleak crane
daring fern
bleak crane
daring fern
bleak crane
# daring fern ```lua if context.before then local c = pseudorandom_element(context.scoring...
    calculate = function(self, card, context)
        local _card = pseudorandom_element(G.play.cards, pseudoseed('source'))
        if context.joker_main and context.cardarea == G.jokers then
        card.ability.extra.mult = card.ability.extra.mult + _card.base.nominal
        _card:start_dissolve()
            return {
                message = 'Upgraded!',
                colour = G.C.CHIPS,
                card = card,
                mult = card.ability.extra.mult,
            }
        end
        
        if context.joker_main then
            return {
                mult = card.ability.extra.mult
            }
        end

        if context.before then
            local c = pseudorandom_element(context.scoring_hand, pseudoseed('source'))
            if c then
                c.marked = true
            end
        end
        if context.destroy_card and context.destroy_card.marked and G.GAME.current_round.hands_played == 0 then
            card.ability.extra.mult = card.ability.extra.mult + context.destroy_card:get_chip_bonus()
            return {remove = true}
        end
    end

like this?

#

wait

daring fern
bleak crane
# daring fern No, remove everything except `joker_main` and place it in above.

like this,,?

    calculate = function(self, card, context)
        
        if context.before then
            local c = pseudorandom_element(context.scoring_hand, pseudoseed('source'))
            if c then
                c.marked = true
            end
        end
        
        if context.destroy_card and context.destroy_card.marked and G.GAME.current_round.hands_played == 0 then
            card.ability.extra.mult = card.ability.extra.mult + context.destroy_card:get_chip_bonus()
            return {remove = true}
        end

        if context.joker_main and context.cardarea == G.jokers then
            return {
                message = 'Upgraded!',
                colour = G.C.CHIPS,
                card = card,
                mult = card.ability.extra.mult,
            }
        end
        
        if context.joker_main then
            return {
                mult = card.ability.extra.mult
            }
        end

    end
daring fern
bleak crane
#

hhh

#
    calculate = function(self, card, context)
        
        if context.before then
            local c = pseudorandom_element(context.scoring_hand, pseudoseed('source'))
            if c then
                c.marked = true
            end
        end

        if context.destroy_card and context.destroy_card.marked and G.GAME.current_round.hands_played == 0 then
            card.ability.extra.mult = card.ability.extra.mult + context.destroy_card:get_chip_bonus()
            return {remove = true}
        end

        if context.joker_main and context.cardarea == G.jokers then
            return {
                message = 'Upgraded!',
                colour = G.C.CHIPS,
                card = card,
                mult = card.ability.extra.mult,
            }
        end

    end

ok so like this

daring fern
bleak crane
#

oh

#

sorry

bleak crane
daring fern
bleak crane
#

ah ok

bleak crane
bleak crane
daring fern
bleak crane
# daring fern ```lua local eval = function() return G.GAME.current_round.hands_played == 0 end...
    calculate = function(self, card, context)
        local eval = function() return G.GAME.current_round.hands_played == 0 end
        juice_card_until(self, eval, true)
        if context.before then
            local c = pseudorandom_element(context.scoring_hand, pseudoseed('source'))
            if c then
                c.marked = true
            end
        end
        
        if context.destroy_card and context.destroy_card.marked and G.GAME.current_round.hands_played == 0 then
            card.ability.extra.mult = card.ability.extra.mult + context.destroy_card:get_chip_bonus()
            return {
                remove = true,
                message = localize('k_upgrade_ex'),
            }
        end
        
        if context.joker_main then
            return {
                mult = card.ability.extra.mult
            }
        end

    end

like this?

#

this seems to crash the game

daring fern
bleak crane
#

augh,

bleak crane
# daring fern No, ```lua if context.first_hand_drawn and not context.blueprint then local ...

sry if im being annoying ><

    calculate = function(self, card, context)
        if context.first_hand_drawn and not context.blueprint then
            local eval = function() return G.GAME.current_round.hands_played == 0 end
            juice_card_until(card, eval, true)
        end
        if context.before then
            local c = pseudorandom_element(context.scoring_hand, pseudoseed('source'))
            if c then
                c.marked = true
            end
        end
        
        if context.destroy_card and context.destroy_card.marked and G.GAME.current_round.hands_played == 0 then
            card.ability.extra.mult = card.ability.extra.mult + context.destroy_card:get_chip_bonus()
            return {
                remove = true,
                message = localize('k_upgrade_ex'),
            }
        end
        
        if context.joker_main then
            return {
                mult = card.ability.extra.mult
            }
        end

    end

so like this?

#

this seems to just do nothing,

#

oh nvm it works now

#

@daring fern new weird issue
if i have 2 or more of this card in hand, they both upgrade when i destroy only 1 card when id rather only upgrade the card if it destroys 1 per

hard mica
#

Do I have to call tag:yep() so my modded tag disappears after it does the effect I made it do

#

Cause rn once I skipped the blind with my modded tag it stays in the right corner

#

And doesn't go away lmao

#

They are watching me

faint yacht
#

Tags do have to be :yep()-ed or :nope()-ed, yes.

vast night
#

hi quick question: for some reason I cant find documentation on how to see if the played hand is specifically only high card. does any1 know a solution?

daring fern
hard mica
faint yacht
stiff locust
#

where's the key of the deck you are using stored

#

i can't figure it out

faint yacht
#

G.GAME.selected_back.effect.center.key

stiff locust
#

attempt to index field "effect" (a nil value)

faint yacht
daring fern
stiff locust
#

i'm not even trying to run this function right now

#

it's just running anyway and crashing right now

#
function get_current_deck_fallback()
    if Galdur and Galdur.config.use and Galdur.run_setup.choices.deck then
        return Galdur.run_setup.choices.deck.effect.center.key
    elseif G.GAME.viewed_back and G.GAME.viewed_back.effect then
        return G.GAME.viewed_back.effect.center.key
    elseif G.GAME.selected_back and G.GAME.selected_back.effect then
        return G.GAME.selected_back.effect.center.key
    end
    return "b_red"
end
faint yacht
unborn bay
#

.... why not just use selected back here

#

why all this

stiff locust
#

i based it on the cardsleeves function for getting it

#

also it needs to support galdur apparently

#

I figured it'd be a good idea to make it support galdur

#

otherwise all of my deck related things break

#

it just crashes anyway

#

and i am very confused

faint yacht
#

Is it crashing on the G.GAME.viewed_back elseif?

stiff locust
#

it's crashing on return G.GAME.viewed_back.effect.center.key

primal robin
#

Is there any other way to inrease game speed except of G.SPEEDFACTOR?

#

Because value > 8 crashed when opening boosters

stiff locust
#

starting to think this isn't the fault of my function

faint yacht
#

...wack.

stiff locust
#

it seems to update only after you beat a blind

#

i beat a blind and it started working??

primal robin
stiff locust
#

this all happens after exiting and re entering a run

vast night
#

hi again: does any 1 know howto cdheck the origin of a consumable?

stiff locust
#

except it's not happening anymore

#

seemed to be a one time thing for that run?

#

i'm very confused

#

yeah it just

#

fixed itself

#

cool i guess

stiff locust
#

or where you got it from

vast night
#

oh bruh

#

lmao

stiff locust
#

oh THAT'S WHAT KEY APPEND IS FOR

faint yacht
#

Alternatively, check for .config.center.mod.id or .config.center.original_mod.id of any given card.

vast night
coral flume
#

Yo, this is currently broken with blueprint as they're both ramping the number of repitions. Can someone gimme a hand with that


      if context.repetition and context.cardarea == G.play then
      card.ability.extra.repititionsa = card.ability.extra.repititionsa + 1
        return {
                    message = 'Again!',
                    repetitions = card.ability.extra.repititionsa,
                    card = context.other_card
                }
      end

      if context.after then
        card.ability.extra.repititionsa = 0
      end

    end
    -- Currently Broken With Blueprint, I Assume It's Because each repetition stacks
onyx ridge
#

guys, anyone know how to add the card spin when adding enhancement?

vast night
#

like

#

in a function

daring fern
coral flume
vast night
daring fern
vast night
#

nvm

#

wtf did i say

#

where do i set the money

#

lemme look in the source

daring fern
vast night
#

i wanna set it to 0

#

but i forgot :lmfao:

daring fern
vast night
#

yea also just found out

coral flume
# daring fern What is the goal?

She retriggers cards once per each card scored before it, right now shes retriggering cards a number of times equal to there position

vast night
daring fern
daring fern
vast night
#

how do i do that then 😭

coral flume
# daring fern So it's retriggering 1 too many times?

Yeah. Blueprint is doing it correctly with this code


      if context.repetition and context.cardarea == G.play then
        if not context.blueprint then
          card.ability.extra.repititionsa = card.ability.extra.repititionsa + 1
        end
      
        return {
                    message = 'Again!',
                    repetitions = card.ability.extra.repititionsa,
                    card = context.other_card
                }
        
      end
      if context.after then
        card.ability.extra.repititionsa = 0
      end
    end```
vast night
#

sorry if i sound dumb, but what I'm doing is to win the blind when the joker is sold.

daring fern
vast night
#

oooooooooooh

#

bruh

#

aha

#

lol

#

sorry

slow brook
#

is it possible to force a certain card to be drawn at the first hand of the round?

vast night
# daring fern Yes.

hey I'm so sorry to gother again, but how do I get the amount of jokers to the right of the triggered joker?

misty shoal
#

any ideas why the joker is invisible in game?

#

to clarify it doesn't show up it is not 'invisible joker'

vast night
#

like

#

did you see it in your collection

#

or isn't it there

misty shoal
vast night
#

with texture?

misty shoal
#

no

#

thats the issue

vast night
#

like you have an empty collection tab

#

go onto the mods tab, click your mod and go to "additions"

#

is it there

misty shoal
#

it's there I can tell

#

just invisble

vast night
#

ok

#

can you show a picture of your file structure

misty shoal
daring fern
vast night
#

exactly

#

that was what i was abt to say lol

misty shoal
vast night
vast night
#

like double size

misty shoal
#

yeah

vast night
#

are you sure that the joker size is corrext

#

like

#

px and py

misty shoal
vast night
#

huh

#

tf

#

can you try sending me the mod and ill look?

daring fern
misty shoal
vast night
daring fern
hard needle
#

can someone explain how invisible joker adds a line to its desc if theres a negative joker

hard needle
vast night
misty shoal
#

How

hard needle
vast night
misty shoal
#

Yeah I see that but like

vast night
misty shoal
#

How on earth did I fuck up typing 0 twice I swear

daring fern
misty shoal
hard needle
# daring fern

interesting.. can you only add something to main end with localize?

red flower
hard needle
red flower
#

but tbh the easiest way with steamodded is to do 2 separate descriptions in your localization file and switching between them

hard needle
#

how would i do that though

red flower
#

return key = "j_modprefix_otherkey"

#

in loc_vars

#

all of this is in the docs btw

vast night
#

hey @red flower. How do I get all jokers? #G.jokers.cards crashes

red flower
#

you need the amount of jokers?

vast night
#

i need the amount of jokers to the right of a specific jokers

#

joker*

red flower
#

loop through G.jokers.cards to increase a counter until you find your joker

vast night
red flower
#

no

vast night
#

oh

red flower
#
for i=1, #G.jokers.cards do
     if G.jokers.cards[i] == card then
          return (#G.jokers.cards - i) * mm -- idk what mm is
    end
end
vast night
#

mm is just xmult and i called it multmult

#

sorry

#

thanks

vast night
#

ok

#

hey do you know how i know if the current game state is the collection or in a game

#

like

#

G.jokers only exists while in the game

#

so it crashes in the main menu

red flower
#

if G.jokers then

vast night
#

k thanks lol

red flower
#

oh also the code is wrong lol

#

i just read that you wanted the jokers to the right let me fix

vast night
#

thanks :)

#

how many ppl do you help per day lol

primal robin
#

yes

red flower
#

do you know how much bread you have eaten in your life

vast night
#

what do i need to change to fix the code

red flower
#

edited the message

cyan lagoon
#

why this no workie?

faint yacht
#

self > card

cyan lagoon
#

i hate how half the time it's only obvious when i see the solution

slate widget
#

hey guys, im brand new to this. what base balatro file contains the jokers? im trying to make a joker that adds a negative perkeo every time a blind is selected or a card is played. not sure where to find it, or add negative to it for that matter! this is what i have so far for doing that

red flower
#

SMODS.add_card{key="j_perkeo", edition='e_negative'}

#

card.lua has the cards

slate widget
#

thank you sm!!! would i have that in create_card()?

red flower
#

no, remove that line and replace it with what i wrote

slate widget
#

thank you so much fr!! 🐐
this look okay?

if context.setting_blind then -- Triggers upon selecting a blind
            SMODS.add_card{key="j_perkeo", edition='e_negative'}
        end
#

idk why the end did that in the preview but lol

red flower
#

yeah

slate widget
#

how would i make an effect trigger every time a card is played? trying to piggyback off the hiker card but im unsure what i should actually be copying from that

red flower
slate widget
#

you're so goated thank you

knotty compass
#

heya, question anyone could tell me how to detect consumable being destroyed, and what that consumable was?

red flower
#

there's no context for it and the game doesn't distinguish (directly) between used/sold/destroyed
you can make hooks for it tho but it's not as straightforward as it might seem

knotty compass
red flower
#

i would hook Card:remove_from_deck and check if the card is a consumable

knotty compass
#

i see! thanks!