#💻・modding-dev

1 messages · Page 477 of 1

thorn furnace
#

Makes me think I should add boss blinds to my mod once I figure out the health mechanic (rahhh i hate ui)

shell timber
#

that seems like a balanced nonshowdown crimson heart, yeah

shell timber
#

maybe change it to "must submit" instead of just "submit"

thorn furnace
#

aside from UI this should be the last thing I need to get the mechanic working tho

chrome widget
#

Technically you can also sell all your jokers and it'll let you play, since it can't gate you if you have no jokers to submit

bitter portal
#

When do i put my config vars in extra?

scarlet imp
bitter portal
#

what is console yapping about

#

is there something wrong with my enhancement

daring fern
daring fern
bitter portal
bitter portal
#

or do you mean for the return

daring fern
azure valley
#

Essentially, you're returning an empty table, which is not nil

bitter portal
#

i see

#

that makes sense

#

so it should look like this?

azure valley
#

that works

#

well, ok, so you might take the second if tho

bitter portal
#

ooh right

azure valley
#

because context.repetition is added to the context

#

you might want to add and not context.repetition

hybrid shadow
#

tomorrow i will check if add_to_deck functions work for consumables

bitter portal
#

also realised i would end up skipping the second if with my change, hopefully this will work?

azure valley
#

honestly, I'd probably get rid of the ret variable altogether, there's no reason why both if statements need to share it.

bitter portal
#

true

azure valley
#
if context.final_scoring_step and context.cardarea == G.play then
  card.ability yada yada
  return { message = "Upgrade!", colour = HEX("A681FF") }
end
bitter portal
#

now i need to figure out why it's upgrading when being played (its only supposed to do that in hand)

#

unless these changes fixed it

azure valley
#

you have context.cardarea == G.play ?

#

change to G.hand

bitter portal
#

ah whoops 😭

#

my brain did not brain

#

good catch, thank you

azure valley
#

yw

pale holly
#

poker hands with enhancements can be amusing to code

bitter portal
#

oh

#

i see why

chrome widget
#

wh

#

why does the low contrast card art have a suight gradient to it

daring fern
#

flat mist
#

I have some cool combo and we'll balanced ideas for jokers and spectral cards. If some Wana add them to there mod then I can share these ideas (don't need any credits or something). Just let me play these ideas once they finished.

chrome widget
vague crest
#

usually dont post too much about the art of my mod here bc im in more of an art focused community than a coding one so it goes there instead but EEEEEEEE im really happy with how this deck turned out it was really intimidating

flat mist
#

I have some cool combo and we'll balanced ideas for jokers and spectral cards. If some Wana add them to there mod then I can share these ideas (don't need any credits or something). Just let me play these ideas once they finished.

pearl jacinth
#

how do i return a drawn card to the deck

#

if it's even possible

pastel kernel
#

@vast bough very few options to modify game variables like “joker slots”

bitter portal
#

oh does {T:classprefix_modprefix_key} not work with seals?

unborn bay
#

iirc it works with centers placed in P_CENTERS

#

which is not the case for seals

runic pecan
#

Does context.full_hand include debuffed card?
Do I need if ... and not v.debuffed then under for _,v in ipairs(context.full_hand) do?

red flower
#

yes

hidden sable
pale holly
#

fair tbh

merry frost
#

Does anybody know how to get Vouchers to show up properly in loc_vars' info_queue?

#

Here's my current code. Note that add_loc_vars is a method I wrote that adds onto loc_vars, injecting the table it returns into { vars = ... }

#

I have been able to get Tarots to work properly like so: table.insert(info_queue, G.P_CENTERS['c_star']), I just don't know what to do for Vouchers.

hearty crane
red flower
merry frost
#

Oh wow. That actually worked. I seriously wasn't anticipating that, because I thought vouchers were a wholly separate class

#

What about blinds though? There's a nasty one: THE WHEEL, which crashes because it doesn't have access to vars.

#

Oh.

#

It also works the same.

#

Wow.

#

G.P_CENTERS saved my ass.

floral narwhal
#

When i assert it game crashes and says:assertion failed!

floral narwhal
daring fern
floral narwhal
daring fern
floral narwhal
#

lemme try it

royal ridge
#

that would be G.GAME.round_resets.ante

floral narwhal
foggy quiver
#

hello gng, this is my first time coding game files and making mods, how do I make a file for my mod that I can share with other people

foggy quiver
#

Aright thx

bitter portal
#

uhh how can i make the description text update live to the current mult

red flower
#

you need a main_end with a text node using ref_table and ref_value

#

i just realized i wrote that in the most obtuse way

#

but im on my phone so its the best i can do to explain :3

merry frost
unborn bay
#

blinds are not supported because blinds are not located in P_CENTERS

#

they're in their own block

merry frost
#

Ok, so either I have to brute force make infoboxes for blinds or avoid The Wheel at all costs?

red flower
#

does P_BLINDS not work?

#

also i think wheel is hardcoded to 1 in 7

#

so you can just put that in

merry frost
#

P_BLINDS definitely does not work. It returns empty infoboxes that say ERROR

thorn furnace
#

bump

limber blaze
#

current score as in chips earned this blind so far excluding what the current hand will earn?

thorn furnace
#

chips earned this blind so far

limber blaze
#

iirc G.GAME.chips

#

let me check

thorn furnace
#

okii

limber blaze
#

yes G.GAME.chips

thorn furnace
#

thanks dance

#

now all I have left is UI stuff (pain)

keen tiger
#

whats the llm policy for balatro code?

#

i want to convert the translation code to rust for my project and was thinking of speeding it up by just letting an llm do the conversion (its pretty good for doing quickndirty language conversions). is that okay? i can also just run an open-source llm locally to do this so the code isn't sent anywhere

red flower
#

I don't think there's one stated but I would keep it local if you're sending it game code

thorn furnace
#

don't think I've come across this error before

red flower
#

the : in the first line is wrong

#

also if you have : you shouldnt have self

thorn furnace
#

o

red flower
thorn furnace
#

Do I just use . instead of : for both

red flower
#

Game:start_run = function might not work with the :
it would need to be function Game:start_run i think

thorn furnace
#

o

red flower
#

you can also have . and add self back

thorn furnace
#

okii

craggy heron
#

hey all, i'm looking to make a mod that makes cards like Rebate, Ancient, Castle ect have a legendary-style overlay to show what is currenlty being buffed, I have had little success so far with my limited knowledge of programming in general and mostly using chatgpt to help me out. So far I have had success in adding the soul overlay to a joker but am not able to get it to update at all, any suggestions for where to go from here?

thorn furnace
#

Suddenly everything that was working just fine before is now breaking SALADWENTBAD

red flower
#

GAME doesnt exist on loading files

#

and hud might not exist wherever youre calling the function

thorn furnace
#

tho now it just crashes whenever i try to set that value

lofty sand
#

does anyone know a way to add a copied card directly into the scoring hand? for instance, if DNA copied a card during the before scoring step, instead of being added to the players held hand, it would be added directly into the scoring hand?

craggy heron
#

i've been able to get the soul_pos overlay working, it just doesnt ever update to match the rebate buffed rank

red flower
craggy heron
#

i might be wrong but my understanding is that the soul_pos overlay is a shader and so should be able to be updated dynamically

red flower
#

it's not, it's a sprite

craggy heron
#

i see, would what i'm trying to achieve be easier with shaders? is that even possible?

lofty sand
#

thanks :)

red flower
craggy heron
red flower
#

im pretty sure card.children.soul_sprite doesnt exist tho i dont remember what the name was exactly

lofty sand
red flower
#

also make sure you're adding it immediately and not in an event

#

or it will just add it visually

lofty sand
#

wb the copy_card:start_materialize() event?

red flower
#

that ones fine probably

bold gyro
#

is there a context/way to check if cards are drawn specifically after a hand has been played?

red flower
#

you might need to add G.GAME.current_round.hands_played ~= 0

craggy heron
#

all of a sudden my lovely window is just showing INFO - [G] nil nil endlessly, have i accidentally enabled something?

bold gyro
craggy heron
#

yeah i added a couple of debug prints to try and figure out if the joker is updating at all

red flower
#

probably a flag on context.pre_discard might work

craggy heron
#

yeah it was that debug print that was doing it after all, how silly

thorn furnace
red flower
#

yes, the hud is made when the function returns

thorn furnace
#

oh

#

how would I go about that then

red flower
#

you can run it after GAME:Start_run instead of before?

#

or patch it there

flat mist
#

I have some cool combo and we'll balanced ideas for jokers and spectral cards. If some Wana add them to there mod then I can share these ideas (don't need any credits or something). Just let me play these ideas once they finished.

thorn furnace
#

I don't remember what I was doing before everything just started not working for no reason despite not touching it

neon mist
#

Do you guys know how to make the joker wiggle when it gets trigger?

red flower
#

thats UI

red flower
bold sleet
#

help. balatro is for some reason not loading SMODS.Language

craggy heron
#

is mail in rebate referred to as j_mail or mail_card? how would i find this out for sure?

neon mist
red flower
neon mist
#

okie dokie

#

thxalot

bold sleet
#

still not worky

red flower
#

dunno then

bold sleet
#

It gets fixed temporarely when I change the key

#

help

#

nope, it's not working

neon mist
#

what about juicing up for cards like walkie talkie?

#

the one that wiggle every time a certain card is played

red flower
#

if you use calculate correctly it should do it for you

long sun
#

is there a context for when any Joker's add_to_deck or remove_from_deck is called?

primal robin
#

No way salty ghost pfp updates comes more often that I do my mods updates

red flower
long sun
#

hehe, i'm getting attacked a lot this year ^u^

red flower
faint yacht
long sun
#

oh wait it's not updating for me ;u; lemme fix that

#

grand, thanks ^U^

long sun
red flower
#

In the next SMODS release, context.joker_type_destroyed iirc

long sun
#

also, is there a way of detecting if a Joker gains an edition?

#

rightright

#

mm, this is. too open-ended for my liking ;u; i'll omit it and come back to it

#

(deck ability: +1 Joker Slot per Holographic or Polychrome Joker)

red flower
long sun
#

gotchagotcha

red flower
#

yeah anything that requires modifying any slots or values dynamically at all times is a pain

craggy heron
#

i got the blueprint mod and it makes blueprint and brainstorm dynamically change sprite based on which joker they're copying, how is it achieving that so smoothly? I cannot for the life of me figure out what i'm doing wrong

thorn furnace
#

Managed to get pretty much everything working except this and some of the weird UI stuff Im not sure how to word
would this not be how it would work

#

(ignore ALLOY.health on line 53 it's supposed to be G.GAME.health i grabbed the wrong screenshot)

red flower
#

i mean if it doesnt work then probably not lol

#

i never tried returning anything in a calculate_context hook you might need a dummy object

thorn furnace
#

In the definition it seems to return a table of something
Somewhere I guess

#

You mean a dummy object like I do like

local obj = calculate_context(self, context, return_table)
return obj

Or smth?

red flower
#

no i mean making a hidden joker

red flower
thorn furnace
#

I thought this was gonna be a pretty simple mechanic when I started trying to make it CoroboThinking

In my mind it's just
You start with 100 HP
If you lose a blind, subtract the percentage of difference between your blind score and the required score from your health
If your health reaches 0 or below, you lose

#

Tho i guess it does involve basically rewriting the entirety of the lose mechanic so it's not really that simple

red flower
#

i will be adding hp to my mod someday too :3

thorn furnace
neon mist
#

am i doing calculate wrong? why my jokers aint juicing up

#

even if i put it in it only does once

red flower
red flower
wooden nexus
#

So I don't know why this is happening but my badge color is blue

#

I didn't even define a color yet (because idk where that would even be)

neon mist
#

ty so much

#

finally

thorn furnace
chrome widget
#

Hmmmmmmmm I'm trying to decide what to do art-wise for an equivalent blind that prevents cards from scoring their base chips without debuffing them. Because unlike the no-suit blind, I can't just obscure the number or all indication of the number of the rank, since that's used for hand type detection

hushed field
thorn furnace
#

o

#

Does CardArea have any documentation
I barely got by making one

hushed field
#

the handler joker itself is literally just a joker. I've just made sure it's not retriggerable or blueprintable, just to be sure, and that it's not in_pool and not in the collection

thorn furnace
#

hmm

hushed field
#

my code for the cardarea is this. I don't do anything besides setting this up in a hook of Game:start_run

thorn furnace
#

Oh
That actually doesn't seem too bad

#

How would one make the joker be not in the collection

hushed field
thorn furnace
#

no_doe?

hushed field
#

that's to make sure cryptid doesn't mess this up

#

no clue why they don't just use no_collection for that, but that might be due to age, or something

thorn furnace
#

fair enough

#

thank uuu :3

wooden nexus
#

does SMODS Center:extend have a badge color function?

chrome widget
#

It doesn't specifically do badge color, but it has a function for setting the badge of the card type

#

And then there's a further set_badges function to add additional badges

wooden nexus
#

i dunno what part of the code did this but i just want it off this blinding blue

gusty iron
#

OH MY GOD MY JOKER DOES SOMETHING UNINTENDED BUT ITS SO FUNNY SO IM KEEPING IT IN

#

IF YOU HAVE 2 OF IT, IT JUST CLOSES YOUR GAME

#

IT DOESNT EVEN CRASH

#

IT JUST FUCKING CLOSES 😭

thorn furnace
#

sounds like a stack overflow

gusty iron
#

i'm keeping it in

#

its so funny

gusty iron
#

added a warning 🔥

serene granite
#

The first version of my mod is complete, any information on how to get it on the balatro mod manager?

wooden nexus
#

I disabled the modbadge

chrome widget
#

Then what it is?

wooden nexus
#

It's a badge similar to a consumable's

chrome widget
#

A rarity?

wooden nexus
#

no

chrome widget
#

Oh so it's a type badge

wooden nexus
#

yes

#

it should be, Mathguy let me use their contracts mod as a baseline to make this but idk what he did to get it looking like that (and when I asked, they have no idea either)

chrome widget
#

You set the color of consumable types when you declare them using SMODS.ConsumableType

#

They have a primary_colour and secondary_colour property and I believe those are used for the badges

thorn furnace
# hushed field

Just confirming but it's supposed to look like this right? It doesn't seem to trigger the joker for some reason (tho the joker works fine if I summon it in like G.jokers or smth)
(Sorry for pinging and pestering u i dont kno who else to ask :<)

wooden nexus
#

Since it's not a consumable

chrome widget
#

Oh then I can't help you. You'd probably be better suited asking the original author to help you look

wooden nexus
#

Mathguy won't help

brittle tide
#

how do I make it so a joker only retriggers these 4 specific jokers

tawdry oriole
#

how do you see what the current ante is?

modern kindle
#

G.GAME.round_resets.ante iirc

maiden phoenix
# wooden nexus

You want to remove the badge entierly? Also what kind of object is it

tepid coral
#

Is there a way to make add_caed only give cards which have been unlocked? Because I am trying to make a deck that gives you a random legendary joker out of the ones you have discovered

red flower
#

i dont think so, you would need to filter them yourself

tepid coral
modern kindle
#

Hi N

red flower
#

hewwo

modern kindle
#

How are you my friend

red flower
#

i am at the office so BAD

#

wbu

modern kindle
#

Eh
I haven't been sleeping well lately :(

red flower
#

damn..

modern kindle
#

Its okay though...I will find a way to explode soon and then I will sleepy weepy

red flower
#

lets find it together

modern kindle
#

Thats so romantic

humble matrix
#

is there a way to make a joker modify the size of a blind directly? like not just multiply it like add a specific value to the blind size

red flower
#

yes

#

(gimme a sec to get the syntax)

humble matrix
#

🤑

red flower
#
G.GAME.blind.chips = G.GAME.blind.chips + value
G.GAME.blind.chip_text = number_format(G.GAME.blind.chips)
pure salmon
#

can i set a custom message for context.debuff_hand for when you have a hand selected

#

for a joker, not a blind

errant arrow
#
local possible_jokers = {"j_rose_placeholderrose", "j_rose_placeholderrose2"} -- add more keys as needed
local random_key = possible_jokers[math.random(#possible_jokers)]
SMODS.add_card({key = random_key})

this code is supposed to create a random joker from the list, but it only makes the j_rose_placeholderrose

thorn furnace
red flower
#

you need to patch it into the smods calculation

thorn furnace
errant arrow
red flower
errant arrow
#

that worked, thank you

tawdry oriole
#

is there a way to change the sell value of a card?

red flower
#

change card.sell_cost BUT if :set_cost is called on the card it will reset

#

if you dont want that either use card.ability.extra_value or hook :set_cost

tawdry oriole
#

alrighty thanks

thorn furnace
#

I don't suppose it would work to have there be a child node of a text node

red flower
#

is this about the text centering thing?

thorn furnace
#

well for this
Essentially two things
The first is that the "20" should be in the center
and the second is that the width of the red thing should scale with the HP to fill the bar

red flower
#

you could try adding offset = { x = number, y = number } to the text but idk if thats the best solution

thorn furnace
thorn furnace
normal dune
#

how can i put a random edition on the last card triggered

thorn furnace
tawdry oriole
#

what i'm gonna ask might be way too much but is there a way to implement a new font?

red flower
#

yes!

#

using aiko's SMODS.Font

tawdry oriole
#

oh hell yeah

red flower
#

(documentation pending)

tawdry oriole
#

that's really cool

#

the invention of SMODS might be the third most important thing in the universe after fire and balatro

red flower
rotund sable
tawdry oriole
#

yes they do

#

alright thanks a lot 🙏

humble matrix
#

...tried to add a new rarity and
it no work :(, game crashes when i hover over the joker i gave the rarity to

red flower
#

whats the crash

#

localization might need the prefix too

humble matrix
red flower
#

what if you add

pools = {
    ["Joker"] = true
}
humble matrix
unborn bay
#

colors shouldn't be strings

red flower
#

oh what if you remove the badge colour

#

yeah

unborn bay
#

if you wanna use a hex code wrap it around HEX()

humble matrix
#

thats prob it

#

yeah it works

sonic cedar
#

do you guys think this will work

red flower
#

yes because i believe in you

#

(i havent read it)

sonic cedar
#

ill take it here we fuckign go

#

wait
push first in case something goes wrong

#

ok now

#

why are you there stop that

#

buffoon didnt crash

#

standard im begging you

#

ShinjiHustle WHAT MORE

sturdy compass
#

😭

sonic cedar
#

something about pools??

#

i dont even have the guy that fucks with them how

#

also hi astra

sturdy compass
#

Hi toma

#

I PR’d my timing handler for probability results to smods yesterday teehee

sonic cedar
#

you wanna throw my cornflakes into oncoming traffic while youre at it

sturdy compass
#

Fish food for the cars

sonic cedar
#

that's fish flakes

#

this is corn food

sturdy compass
#

They are close enough

sonic cedar
#

true

sturdy compass
#

Cars would eat oversized fish flakes (aka corn flakes)

#

I said that with purpose goddammit

sonic cedar
#

goodness

#

alright fair

#

as for a modding question
astra have you

added a button to a card before

sturdy compass
#

Kind of but also not really

sonic cedar
#

how kind of is kind of

sturdy compass
#

For Horoscope cards I changed their pack buttons to Select instead of Use, but now there’s API for doing that and I forgort how I did it in the first place tr

sonic cedar
#

i see

red flower
#

just delete everything and copy how i did it :3

sonic cedar
#

n i dont

#

know how you did it

red flower
#

do u mean u dont read the joyousspring code every day

sonic cedar
#

im busy reading the hyperfixation code every minute

red flower
#

but i just replace the entire thing

#

theres the code for boosters there too

sonic cedar
#

oh wow

#

does it
add your mod badge to them

red flower
#

no

sonic cedar
#

do you have any idea why it does that at all

red flower
#

i dont know how your method would tbh

#

that sounds like a different problem

sonic cedar
#

oh god

tawdry oriole
#

is there a way to change the loc_txt of a joker in the add_to_deck function?

red flower
red flower
sonic cedar
red flower
tawdry oriole
sonic cedar
chrome widget
red flower
sonic cedar
#

also hi

sonic cedar
#

i did that with the other ones too am i just stupid

red flower
#

no youre very intelligent

sonic cedar
#

oh right it was 4 am

#

youre right

chrome widget
sonic cedar
chrome widget
#

Hmm okay yeah use_and_sell_buttons has an early return for pack cards

sonic cedar
#

currently setting up the n method which works because it's n

chrome widget
#

though honestly I think you should just change the card.area.config.type == 'joker' to card.area == G.jokers because the G.pack_cards area can be 'joker' type but G.jokers is the only area you really want it to be valid in

red flower
#

i would just try the other one if you were already doing it

#

i would love a button API

sonic cedar
#

couldve sworn there was a conversation about just that

red flower
#

i cant figure that out

#

or anything to do with playing with a controller

sonic cedar
#

are we fucking serious

primal robin
#

Controller thing kinda complicated

#

tl:dr you can't have option cycles in a row at all, because in this case they're basically unusable on controller

red flower
#

my mod is not playable with a controller because the summoning overlay just doesn't work

#

and cards that have multiple buttons dont work either

sonic cedar
#

good thing it’s a laptop and not a pc because if something happened to my code lovee

primal robin
gaunt thistle
sonic cedar
#

oh power's back lovely

chrome widget
#

no lovely's the code injector

sonic cedar
#

oh right

red flower
primal robin
#

Even now on latest steamodded present an issue with deck spawning on top part of screen first

thorn furnace
#

Getting a strange error ever since implementing that new cardarea

#

happens when I hit new game like 50% of the time

red flower
#

do you have what that smods line is

thorn furnace
red flower
#

is this the lovely dump

thorn furnace
#

oh lemme grab the lovely dump rq

#

oh

hidden sable
#

giggle

thorn furnace
#

two lines up

#

mb

#

the for _, _card in ipairs(area.cards) do line

red flower
#

yeah i think it does something weird when starting/ending a run with extra cardareas

gaunt thistle
#

I've been looking around and haven't seen much

gaunt thistle
#

also do you guys have any serious wants for this lovely debugger thing I'm working on?

#

eg. things that really suck about working with patches that could be improved by tooling

red flower
#

i read about it on the lovely discord but im stupid so idk what it would be for :3

gaunt thistle
#

basically a debug ui. it would hook up to lovely running in the game and allow you to step through patch application with a before / after diff

#

and some other general dev tools

thorn furnace
#

thank uuu :3

thorn furnace
#

I'm starting to grow less bothered by the off-center text for the health thing
But changing the width is a must

#

is there a good way to change the width of a UI node dynamically
nothing I've tried has done much

#

(tho I think once that's done I'll release the mod and then do anything else after)

red flower
#

you can ask him

thorn furnace
#

👀

red flower
#

it's a PR on smods too

thorn furnace
#

i ask for thine wisdom 🙏

red flower
thorn furnace
#

oh it's a function and everything

#

thank u :3

red flower
#

honestly if this gets merged some day i might do a mechanic with it in my mod

thorn furnace
#

Yea

sonic cedar
#

alright everything’s still up after this long it should be safe for me to do stuff again

brittle yacht
#

js asking, would anybody be able to teach me how to mod balatro sometime? js to add some simple jokers and editions and stuff

wintry solar
#

Oh snap I didn’t realise the progress bar was a smods pr

#

I have completely missed that 🥲

red flower
#

poor bepis

thorn furnace
#

i think i messed something up lemme recheck my code

#

ah i forgot to divide by 100

#

:3

snow vale
#

i LOVE typos

thorn furnace
#

abiliy

thorn furnace
#

that's a new one

#

Actually in hindsight i wonder if I literally just needed to activate that one boolean

#

Instead of writing 60 lines of code

snow vale
#

why is it still scoring after the cards were destroyed?

#

what would i need to do to avoid that?

#

also wth

daring fern
snow vale
#

right

sonic cedar
chrome widget
#

What does the crash log point to?

sonic cedar
#

sorry i was handling a matter uhhhhhhh

sonic cedar
chrome widget
#

Yeah that crash points to a vanilla file

sonic cedar
#

oh ik i just wanted to make sure you meaent the line

#

ill grab

#

(ive seen this crash before unfortunately)

chrome widget
#

Well Rarities are pools so it probably has smth to do with that

#

Nothing in this code speaks out to what casued the error. Further down in the crash log might tell you what's doing it

brave blade
#

What values am I supposed to return for context.check_enhancement?

daring fern
brave blade
#

And if it's a vanilla enhancement, would it just be something like {m_gold = true}?

sonic cedar
brave blade
#

Alright, then something else must be the problem

daring fern
brave blade
#

It's not doing anything

daring fern
brave blade
chrome widget
#

Does it crash when you hit the button?

#

Or does it crash before that?

sonic cedar
#

wait i have ram now i can just show you

chrome widget
#

I have reason to believe you've misspelled the rarity or forgot to put your mod prefix ahead of it

brave blade
# daring fern Code?
calculate = function(self, card, context)
    if context.check_enhancement then
        if context.other_card.config.center.key == "m_gold" then
            return {
                m_steel = true
            }
        elseif context.other_card.config.center.key == "m_steel" then
            return {
                m_gold = true
            }
        end
    end
end
daring fern
brave blade
daring fern
chrome widget
# sonic cedar

Im still missing context. Did you want to change stuff about playing cards?

sonic cedar
#

it shouldnt even be messing with the boosters

chrome widget
#

and you're absolutely certain this is related to what you just did rather than a problem that could've existed for some time before?

sonic cedar
chrome widget
#

'Standard' is not a valid set/pool key for playing cards

#

It's 'Base' or just 'Playing Card' to randomly choose between base or enhanced

sonic cedar
#

if stickers were enabled

#

curse you 4 am code

chrome widget
#

also I would recommend making the append key for the default behavior 'sta' because that's the vanilla key and it would prevent compatibility breaks

sonic cedar
#

got it

#

does that apply for every pack or

#

like is spectral spe

red flower
#

each is different yeah

sonic cedar
#

went off the vremade voucher cause it used the 1 2 thing

did not put together that vremade is vremade

chrome widget
#

Typically if there's some kind of alternate behavior vanilla keys them differently except for Telescope celestial packs which uses 'pl1' just like the regular behavior

modern kindle
#

👋

chrome widget
#

Hi dilly

modern kindle
#

i see smart people in chat

sonic cedar
#

hi dilly

modern kindle
#

how is everyone

chrome widget
#

drawing cards

sonic cedar
#

coding buttons

modern kindle
modern kindle
#

also hi smt i hope you are well

sonic cedar
#

id rather die and it is not your fault

modern kindle
#

D:

sonic cedar
#

where can i even see the vanilla append keys

chrome widget
#

either in the SMODS game_object.lua file since all packs have been taken ownership of, or in vanilla Card:open()

sonic cedar
#

oh youve gotta be kidding me

foggy ginkgo
#

I want to replace the " self.ability.set == "Enhanced" " part to a certain suit, how do I do that

foggy ginkgo
#

To have spades not be debuffed

faint yacht
#

self.base.suit?

#

self:is_suit('Spades')

foggy ginkgo
#

It worked

#

Thanks mate

chrome widget
#

@modern kindle check out my no suits atlas

foggy ginkgo
#

I don't know code lmao

foggy ginkgo
daring fern
modern kindle
#

(looks awesome)

foggy ginkgo
#

I was looking at other mods codes (Extra Credit) and saw how they made certain cards not debuffed

daring fern
foggy ginkgo
#

Welp

daring fern
#

In your case it would be something like: ```lua
SMODS.current_mod.set_debuff = function(card)
if next(SMODS.find_card("j_modprefix_key")) and card.playing_card and card:is_suit("Spades") then
return "prevent_debuff"
end
end

foggy ginkgo
#

Wellpppppp

sonic cedar
foggy ginkgo
#

Got it working with Lovely.toml so oh well-

#

Thank you tho

daring fern
chrome widget
#

Standard packs select their set before returning the card table yeah

red flower
#

I would recommend if you're taking ownership to use the same code just in case

sonic cedar
#

i didnt know i wasnt until now

red flower
#

I do not recommend using vanillaremade as a basis for take ownership

#

it changes a lot of stuff to make it simpler and also i make mistakes :3

unborn bay
#

n would never make mistakes

sonic cedar
#

setting the created card's append to ar3 instead of ar2 in case of omen globe

maiden phoenix
foggy ginkgo
#

Thanks my goat

#

Idk where to find these functions so

red flower
daring fern
maiden phoenix
foggy ginkgo
#

I should actually read things

brave blade
#

How do I make my Joker's description have an info card like this?

maiden phoenix
brave blade
#

Aha, thanks!

foggy ginkgo
#

My very duct taped wrapped joker

maiden phoenix
#

I wonder if it would look better with multiboxes

foggy ginkgo
#

True

wintry solar
#

In my very biased opinion it absolutely would

maiden phoenix
foggy ginkgo
#

Here's the code cause yes ```lua
SMODS.current_mod.set_debuff = function(card)
if next(SMODS.find_card("j_inc_incognito_joker")) and card.playing_card and card:is_suit("Spades") then
return "prevent_debuff"
end
end

SMODS.Joker{ -- Incognito
name = "Incognito",
key = "incognito_joker",
blueprint_compat = true,
eternal_compat = true,
unlocked = true,
discovered = true,
atlas = 'incognitojokers',
rarity = 4,
cost = 20,
pos = {x = 0, y = 0},
soul_pos = {x = 1, y = 0},
config = { extra = { xmult = 1, odds = 7 } },

loc_vars = function(self, info_queue, card)
    return { vars = { card.ability.extra.xmult, (G.GAME and G.GAME.probabilities.normal or 1), card.ability.extra.odds } }
end,

calculate = function(self, card, context)
    if context.destroy_card and context.destroy_card.should_destroy and not context.blueprint then
        return { remove = true }
    end
    if context.individual and context.cardarea == G.hand and not context.end_of_round and not context.blueprint and
        pseudorandom('j_inc_incognito_joker') < G.GAME.probabilities.normal / card.ability.extra.odds then
        if not (context.other_card:is_suit("Spades")) then
            context.other_card.should_destroy = true
            card.ability.extra.xmult = (card.ability.extra.xmult) + 0.5
            return { message = "YUM MULT!", colour = G.C.BLACK }
        end
    end
    if context.individual and context.cardarea == G.hand and not context.end_of_round then
        if context.other_card:is_suit("Spades") then
            card_eval_status_text(context.blueprint_card or card, 'extra', nil, nil, nil, {message = "71!", colour = G.C.BLACK})
            return { xmult = card.ability.extra.xmult }
        end
    end
end

}

#

Very duct taped

foggy ginkgo
#

I assume it's a localization thing cause I did that

daring fern
maiden phoenix
#

(You can ofc multiline in each box)

sonic cedar
#

oh my god i have to do that three more times

maiden phoenix
#

Why not use a lovely patch?

sonic cedar
#

i'm stubborn

#

unrelated note why does this keep going yellow

#

well i know WHY cause it tells you (redundant parameter)

#

but i cant find WHERE and every time i think ive solved it i come back later to it yellow again

normal crest
#

can't you patch the SMODS.four_fingers function for that

#

not patch, hook

sonic cedar
maiden phoenix
normal crest
sonic cedar
#

are we fr

maiden phoenix
#

Say it with me people

#

I love undocumented stuff

normal crest
#

there is one for showman, four fingers, shortcut and "wrap_around_straight"

#

which is always false apparently

sonic cedar
#

hhhhhhhhhhhhhhhh

maiden phoenix
sonic cedar
#

thank you srock tired_smile

normal crest
#

np tomatose

sonic cedar
#

i update these credits daily at this point curse you 4 am coding

sonic cedar
#

example

normal crest
#

no, you'll be overriding it completely like that

#

removing the functionality of the four fingers joker for example

#

if that's what you want sure

sonic cedar
#

local variable thing it is

sonic cedar
#

unless i need a param? i dont see one

wintry solar
#

Replace the 5 with the bcofcthereis call

sonic cedar
#

hi eremel
do i not need 5 returned at all then

wintry solar
#

Well the original function will return the 5 (or 4 if you have four fingers)

#

If you don’t return that result you’re ignoring four fingers

sonic cedar
#

oh true i guess it does do that already

#

so when were these added are they new

wintry solar
#

They’re not bleeding edge new

#

But they’re also pretty niche

sonic cedar
#

i seee

wintry solar
#

I have no idea where they’d fit on the wiki though

sonic cedar
#

wait how the heck would the others format

#

cause showman and shortcut returning numbers doesnt sound right

#

normally I’d just look but I didn’t even know they existed until a few minutes ago

plus they don’t seem return a search result in the dump? Function formatting wise at least, cause I see the showman one get used a few times

sonic cedar
#

though I don’t know if there’s enough to warrant their own tab

modern kindle
#

i feel like if theres something that doesnt warrant its own tab it can just go in an 'other' tab with other things that are in a similar vein

sonic cedar
#

I mean yeah thats obvious enough
I guess mine would be if they want their own tab on the wiki rather than a conglomerate of stuff that doesn’t fit

#

….which in turn would also have a fit in the wiki

#

I guess it just comes down to quantity

wintry solar
#

They might end up in calculation maybe

sonic cedar
#

Junk Drawer tab /j

normal crest
#

to answer your question, the others return booleans, four fingers is the only one that returns a number

sonic cedar
#

ohhh ok

#

Thanks

red flower
wooden nexus
#

Hey, so how do I add a sell button>?

craggy heron
#

does anyone know of an existing mod that dynamically updates a joker's sprite based on some value changing during the game? can't figure out how to get my mod to change anything mid-game

vague crest
vague crest
#

i have a weird issue with this joker, where if you sell it it works as intended (sort of? the next cards in the shop appear a bit closer together but aside from that it functionally works fine and it fixes itself on leaving the shop) but if you reroll it keeps the extra shop slots for one extra reroll. does anyone have any experience with working on changing the shop dynamically like this?

sonic cedar
#

does anyone know why my game crashes on startup?

sonic cedar
#

👂

daring fern
daring fern
# sonic cedar

Remove the first callings of the functions and move the () to the functions in the returns.

sonic cedar
#

ok got it

#

fixed! thanks

quick scarab
#

my joker seems to be crashing when it activates

#
SMODS.Joker {
    key = "s_puppet",
    atlas = 'Joker',
    pos = { x = 4, y = 3 },
    blueprint_compat = false,
    rarity = 3,
    cost = 6,
    config = { extra = { seal = 'fnaf_guard' } },
    loc_vars = function(self, info_queue, card)
        info_queue[#info_queue + 1] = G.P_SEALS[card.ability.extra.seal]
        info_queue[#info_queue + 1] = G.P_CENTERS.m_fnaf_kid
    end,
    calculate = function(self, card, context)
        if context.individual and context.cardarea == G.hand and context.end_of_round then
            if SMODS.has_enhancement("m_fnaf_kid") then
                if context.other_card.debuff then
                    return {
                        message = localize('k_debuffed'),
                        colour = G.C.RED
                    }
                else
                    conv_card:set_seal(card.ability.extra.seal, nil, true)
                    return true                    
                end
            end
        end
    end,
}```
daring fern
flat mist
#

I have some cool combo and we'll balanced ideas for jokers and spectral cards. If some Wana add them to there mod then I can share these ideas (don't need any credits or something). Just let me play these ideas once they finished.

quick scarab
quick scarab
daring fern
#

Also it would be SMODS.has_enhancement(context.other_card, "m_fnaf_kid")

urban wasp
#

why are non-jolly/m jokers not debuffed in this boss blind?

...
    recalc_debuff = function(self, card, from_blind)
        if (card.area == G.jokers) and not G.GAME.blind.disabled and (card:is_jolly() or (Cryptid.safe_get(card.config.center, "pools", "M"))) then -- since this is a cryptid addon we'll use cryptids function for this
            return false
        end
        if (card.area == G.jokers) and not card.key == "j_chicot" and not card.key == "j_crp_jean_antoine" then
            return true
        end
        return false
    end,
...
broken tulip
#

im doing stuff with deckskins right now, if im using pos_style with a table how can i get it to work with numbered ranks? it works fine if i use ranks which are words but not numbers. like Jack = { atlas = skin_lc, pos = {x = 10, y = 0} } works but 2 = { atlas = skin_lc, pos = {x = 10, y = 0} } doesnt

daring fern
urban wasp
#

so just like

...
    recalc_debuff = function(self, card, from_blind)
        if ((card.area == G.jokers)
        and not G.GAME.blind.disabled
        and (card:is_jolly() or (Cryptid.safe_get(card.config.center, "pools", "M"))))
        and (card.config.center.key ~= "j_chicot" and card.config.center.key ~= "j_crp_jean_antoine") then -- since this is a cryptid addon we'll use cryptids function for this
            return false
        end
        return false
    end,
...
urban wasp
#

this is the full code

SMODS.Blind {
    key = "monochrome_m",
    name = "Monochrome M",
    pos = { x = 0, y = 8 },
    boss = { min = 2, max = 10, showdown = true },
    atlas = "blind",
    mult = 0.13,
    recalc_debuff = function(self, card, from_blind)
        if ((card.area == G.jokers)
        and not G.GAME.blind.disabled
        and (card:is_jolly() or (Cryptid.safe_get(card.config.center, "pools", "M"))))
        and (card.config.center.key ~= "j_chicot" and card.config.center.key ~= "j_crp_jean_antoine") then -- since this is a cryptid addon we'll use cryptids function for this
            return false
        end
        return false
    end,
    debuff_hand = function(self, cards, hand, handname, check)
        if not (handname == "Pair") and not G.GAME.blind.disabled then
            G.GAME.blind.triggered = true
            return true
        end
        return false
    end,
    get_loc_debuff_text = function(self) -- we do a little cryptid stealing
        return localize("bl_crp_debuff_monochrome_m")
    end,
    boss_colour = HEX("4f6367"), -- balatro black (*monochrome* m)
    crp_credits = {
        idea = { "Unknown" },
        code = { "ScarredOut" }
    }
}
daring fern
feral tree
#

is there a way to make boss blinds not appear naturally?

urban wasp
feral tree
subtle merlin
# feral tree how?

I'd assume something to do with the function in_pool(self)
-# and a "red x" react in 3... 2... 1...

daring fern
chrome widget
#

oh yeah I've got a challenge that replaces regular blinds with boss blinds and boss blinds with final boss blinds

#

I'll have to figure that one out

merry frost
#

Speaking of which, I have a very similar problem! My mod has the ability to replace small and big blinds with boss blinds, but when I beat a boss blind that has replaced a small or big one, the Ante increases, when it very well shouldn't.

#

Here is my lovely.toml:

# Prevent Boss Blind from increasing Ante if it is not the last round of an Ante
# TODO: None of the patches in this section work, Ante still increases
[[patches]]
[patches.pattern]
target = 'functions/state_events.lua'
pattern = "G.GAME.blind:get_type() == 'Boss'" # Multi-line from line 111
position = 'at'
match_indent = true
payload = "BlindStation.FUNCS.get_current_blind_type() == 'Boss' and false"

[[patches]]
[patches.pattern]
target = 'functions/state_events.lua'
pattern = 'G.GAME.round_resets.blind == G.P_BLINDS.bl_small' # Multi-line from line 258
position = 'at'
match_indent = true
payload = "BlindStation.FUNCS.get_current_blind_type() == 'Small'"

[[patches]]
[patches.pattern]
target = 'functions/state_events.lua'
pattern = 'G.GAME.round_resets.blind == G.P_BLINDS.bl_big' # Multi-line from line 260
position = 'at'
match_indent = true
payload = "BlindStation.FUNCS.get_current_blind_type() == 'Big'"

and BlindStation.FUNCS.get_current_blind_type():

---Returns the current Blind type.
---@return string str The current Blind type, either 'Small', 'Big' or 'Boss'.
BlindStation.FUNCS.get_current_blind_type = function()
    return G.GAME.blind_on_deck or 'Small'
end
chrome widget
#

oh these patches aren't working because you're using pattern patches and you're not looking for full lines

merry frost
#

Though in this case I do actually want to use pattern patches, because the patterns appear 2 times each

chrome widget
#

Regex patches can match for sections within a line of code, but pattern patches won't

merry frost
#

Ah, alright.

chrome widget
#

So if you actually want to do that replacement with single patches, you'll need to either make a regex search for it or just use separate pattern patches (which is a little clunkier but might be faster performance wise, for as much as that matters)

merry frost
#

How is this an escape sequence?

#

And when I escape the dots it's even worse?

daring fern
merry frost
#

Nope, I had to double escape (\\)

#

It all works now!

#

Well, kind of. The ante doesn't increase but the blind UI still resets. More troubleshooting to do!

unborn bay
merry frost
#

I am aware of those, but am only using them for multi-line strings

static dagger
#

How can I get the mod prefix of an object? I am trying to use SMODS.create_mod_badges, which passes in a SMODS.GameObject that I want to determine the mod prefix of.

orchid dawn
#

how to get the poker hand the player used the most ?

#

have a method or function for this ?

#

wow 12:00

static dagger
#

G.GAME.current_round.most_played_poker_hand

orchid dawn
#

ohhh really, vanillaremade

lament agate
#

whenever i click my custom joker in the title screen

#

it crashes

static dagger
#

you got a crash report or any code?

lament agate
#

here

static dagger
#

You need to account for if get_card_areas is null

#

actually that would be if the deck is null, not get_card_areas

daring fern
orchid dawn
#

how to i get the level of specific poker hand ?

lament agate
# daring fern Code?
--Thank you PERKOLATED and HPR
function Card:resize(mod, force_save)
    self:hard_set_T(self.T.x, self.T.y, self.T.w * mod, self.T.h * mod)
    remove_all(self.children)
    self.children = {}
    self.children.shadow = Moveable(0, 0, 0, 0)
    self:set_sprites(self.config.center, self.base.id and self.config.card)
end

local mainmenuref2 = Game.main_menu
Game.main_menu = function(change_context)

    local ret = mainmenuref2(change_context)

    local newcard = SMODS.create_card({key='j_tngt_wherethefuck',area = G.title_top})
    G.title_top.T.w = G.title_top.T.w * 1.7675
    G.title_top.T.x = G.title_top.T.x - 0.8
    G.title_top:emplace(newcard)    
    newcard:start_materialize()
    newcard:resize(1.1 * 1.2)
    newcard.no_ui = true
    return ret
end
daring fern
orchid dawn
daring fern
lament agate
daring fern
orchid dawn
orchid dawn
#

?

lament agate
daring fern
# orchid dawn how
local tempplayed = 0
local hand
for k, v in pairs(G.GAME.hands) do
    if v.played > tempplayed and v.visible then
        tempplayed = v.played
        hand = k
    end
end
local level = G.GAME.hands[hand].level
daring fern
lament agate
lament agate
orchid dawn
#

and v.visible

daring fern
daring fern
lament agate
daring fern
lament agate
#

hold

daring fern
lament agate
# daring fern Code?
function Card:resize(mod, force_save)
    self:hard_set_T(self.T.x, self.T.y, self.T.w * mod, self.T.h * mod)
    remove_all(self.children)
    self.children = {}
    self.children.shadow = Moveable(0, 0, 0, 0)
    self:set_sprites(self.config.center, self.base.id and self.config.card)
end

local mainmenuref2 = Game.main_menu
Game.main_menu = function(change_context)

    local ret = mainmenuref2(change_context)

    local newcard = Card({key='j_tngt_wherethefuck',area = G.title_top})
    G.title_top.T.w = G.title_top.T.w * 1.7675
    G.title_top.T.x = G.title_top.T.x - 0.8
    G.title_top:emplace(newcard)    
    newcard:start_materialize()
    newcard:resize(1.1 * 1.2)
    newcard.no_ui = true
    return ret
end
daring fern
daring fern
lament agate
#

alrigh

lament agate
daring fern
scarlet imp
#

Does SMODS have documentation on Card Packs?

daring fern
scarlet imp
#

yeah sorry

daring fern
lament agate
scarlet imp
daring fern
#

But you would use take_ownership_by_kind

thorn furnace
#

Where is Game:start_run ran?
Trying to do a UI thing but the UI hasn't loaded inside the start_run function so i wanted to place it after

orchid dawn
thorn furnace
#

thanks dance

#

hmm
Still too early I guess CoroboThinking

errant fulcrum
#

Is it possible to destroy a card that's not drawn yet?

scarlet imp
#

what are the px and py for Booster Packs

#

I'm making an Atlas for them

daring fern
scarlet imp
#

71x95?

daring fern
faint urchin
#

I have the following code in one of my files:
local video = love.graphics.newVideo(mod.path .. "assets/video/video.ogv")
This successfully loads the video for me but crashes the game for my friend. I am on Mac and he is on Windows so we suspect that may be the issue but does anyone know why it isn't working/how to fix?

surreal knot
#

hi is there any way to hide custom deckskins in settings?

the idea is to apply to run custom deckskins playing certain deck

thorn furnace
#

(also idk why it brings up the error calling recalculate it literally doesn't work and resize it if it's not in the code)

thorn furnace
#

I am going to assume with the benefit of the doubt that the reason I am experiencing so much frequent trouble with UI is just due to my inexperience
But I would not be surprised if it wasn't

#

(The funny thing is that the text doesn't move but that would actually be a good thing if the health bar actually worked properly)

sonic cedar
#

don't think you thought that one through very well buddy

scarlet imp
sonic cedar
#

"man i love the number 4--"
BANG BANG BANG

scarlet imp
#

what does the modded one do? (I'm assuming one of them you added)

shell timber
#

showman(?)

wispy sparrow
#

came back to developing balatro mods after helping out someone else adding more content and i want to add more, starting with a deck. even though i tried following the lua already provided by both vanilla remade and the mod i'm apart of, the game crashes as it expects a '}' to close a '{' at the term 'unlocked' which is really dumb. here's the code i have for this deck right now for some more context:

        key = "OyasumiDeck",
        loc_txt = {
                name = "Oyasumi Deck",
                text = {
                        "Start with {C:attention}MARIs Picnic{}",
                        "and only have Spades in the deck",
                },
        },

        order = 1
        unlocked = true,
        
        apply = function(self)
            G.E_MANAGER:add_event(Event({
                    func = function()
                        if G.jokers then
                            local card = SMODS.create_card({
                                    set = "Joker",
                                    key = "j_tinsdumb_marispicnic",
                                    area = G.jokers,
                                })
                                card:add_to_dec()
                                G.jokers:emplace(card)
                        end
                            for k, v in pairs(G.playing_cards) do
                            if v.base.suit == 'Clubs' then
                            v:change_suit('Spades')
                        end
                            if v.base.suit == 'Diamonds' then
                            v:change_suit('Spades')
                        end
                            if v.base.suit == 'Hearts' then
                            v:change_suit('Spades')
                        end
                    end
                return true
            end
    end
         }))
})```
#

even after adding the check_for_unlock part of the deck code which i forgot to add here it still crashes regardless by the way

daring fern
wispy sparrow
daring fern
wispy sparrow
scarlet imp
wispy sparrow
scarlet imp
#

its free, and the Lua extrension could help with exactly your problem

#

It'll put error lines everywhere if your syntax is off

wispy sparrow
#

but i want to at least make sure that my deck works as it should before i put it in the repository though

scarlet imp
#

why would working in VSC stop you from doing that

#

I meant you don't HAVE to switch, but it is very useful

thorn furnace
scarlet imp
#

I'm not hating on Notepad++, I use it all the time, just not for writing code

#

usually for HTML, CSS, XML, stuff like that

thorn furnace
#

I mean n++ has syntax highlighting and whatnot

scarlet imp
#

Well it appears this gentleman has a syntax error that isn't being caught

scarlet imp
thorn furnace
scarlet imp
#

I can't code without an IDE anymore lol, too used to them

#

I was devastated when I figured out JetBrains doesn't have anythin for Lua

thorn furnace
#

You can configure n++ to work like an IDE

#

It's like Vi except it has UI and is slightly worse

scarlet imp
#

yeah I suppose
no hate towards it, I just recommend VSC since its what I use and its free

glass scaffold
#

Is there a way to use the value in the SMODS.current_mod.config_tab to toggle the SMODS.Music?

wispy sparrow
#

okay i'm getting somewhere

daring fern
wispy sparrow
#

now it's saying that '}' is expected at line 360 near end at line 336

#

here's the code right now

#

aaand i just noticed i misspelt deck

#

yippee!

daring fern
scarlet imp
#

yeah bc if its a Spade already the change is redundant, but doesn't do any harm

daring fern
glass scaffold
wispy sparrow
#

just asking before i restart balatro to apply the changes

scarlet imp
daring fern
glass scaffold
scarlet imp
wispy sparrow
#

okay, i think it's ready for this deck to go into the mod i'm a part of now, thanks for the help!

#

although the last thing i need to do is creating a design for the deck

#

i'll probably do the lightbulb that's present in white space considering the deck is an omori reference

thorn furnace
#

I feel bad for asking for help so often
I feel like I should have gotten the hang of this by now

sonic cedar
#

yeah no im going to bed and figuring this out tomorrow nice try

orchid dawn
#

is there a way to make something run in a deck only starting at ante 2? like using if ante >= 2 then

orchid dawn
#

wich*

#

wich way

#

how

#

sorry i dont speak english very well :(
sorry for mistakes

daring fern
orchid dawn
#

ty

#

its not working, do you know why? @daring fern

#

my code here, wait 1s

#
 apply = function(self)
        if G.GAME.round_resets.ante >= 2 then
            G.GAME.modifiers.boss_rush = true
        else
            G.GAME.modifiers.boss_rush = false
        end
    end

this is a deck

daring fern
orchid dawn
#

lol

orchid dawn
orchid dawn
#

idk sorry

orchid dawn
daring fern
orchid dawn
#

ok

#

ty very much

#

youre incrible bro

#

hey bro, sorry for brothering, but i need your help

#

if I lower the ante and go back to 1, it doesn't return to normal

#

you can help ? @daring fern

daring fern
orchid dawn
#
calculate = function(self, back, context)
        if G.GAME.round_resets.ante >= 2 then
            G.GAME.modifiers.boss_rush = true
        else
            G.GAME.modifiers.boss_rush = false
        end
    end
daring fern
orchid dawn
orchid dawn
#

sad

#

but ok
ty :d

daring fern
daring fern
orchid dawn
#

could there be some kind of hack or workaround to make that happen?

orchid dawn
#

but, ty very much

spark remnant
#

How can I get the value of a sold joker during context.selling_card?

daring fern
spark remnant
flat mist
#

I have some cool combo and we'll balanced ideas for jokers and spectral cards. If some Wana add them to there mod then I can share these ideas (don't need any credits or something). Just let me play these ideas once they finished.

orchid dawn
orchid dawn
#

currently we hve 6 pages of new jokers

orchid dawn
orchid dawn
median veldt
#

how exactly does one implement ^mult

orchid dawn
#

can someone help me with a blind that selects a random (visible) hand, debuffs it, and does this every time you play your hand?

#

sorry for brothering you again, but can you help me? @daring fern

daring fern
orchid dawn
#

this is my code actually

    config = { extra = {
        visibleHand = {},
        randomIndex = nil,
        chosenHand = nil
    }},

    set_blind = function(self)
        self.config.extra.visibleHand = {}
        for k, v in pairs(G.GAME.hands) do
            if v.visible then
                table.insert(self.config.extra.visibleHand, k)
            end
        end

        self.config.extra.randomIndex = math.random(#self.config.extra.visibleHand)
        self.config.extra.chosenHand = self.config.extra.visibleHand[self.config.extra.randomIndex]


        G.GAME.blind_message = {
            message = localize(self.config.extra.chosenHand, 'poker_hands'),
            colour = G.C.RED
        }
    end,

    drawn_to_hand = function(self)
        self.config.extra.visibleHand = {}
        for k, v in pairs(G.GAME.hands) do
            if v.visible then
                table.insert(self.config.extra.visibleHand, k)
            end
        end

        self.config.extra.randomIndex = math.random(#self.config.extra.visibleHand)
        self.config.extra.chosenHand = self.config.extra.visibleHand[self.config.extra.randomIndex]
    end,

    debuff_hand = function(self, cards, hand, handname, check)
        return handname == self.config.extra.chosenHand
    end,
daring fern
median veldt
#

return { mult = (mult ^ card.ability.extra.emult) - mult }

#

works fine

daring fern
median veldt
#

I can return a custom sound

daring fern
#

And show a mult message.

median veldt
#

remove_default_message

#

However with a custom message I can't figure out how to have a custom value

#

with localization

#

I tried message = localize("a_emult") and a_emult = "^#1# Mult" in the localization file

#

it just. directly prints out ^#1# Mult

median veldt
#

why does it have to be in the v one?

daring fern
median veldt
#

i did not know that

#

Ah

vague crest
#

whats that thing that jokers do where they like, shake briefly when something happens

#

im struggling to remember jokers that do it but i remember its just like a Thing you can make them do and thatd come in handy here

rotund sable
#

juice_up?

#

Or something like that

median veldt
vague crest
#

you are my favorite and ill never forget you

orchid dawn
vague crest
#

whats the process for doing it remotely again?

#

basically trying to do it before it gets destroyed by a deck ability

daring fern
# median veldt Ah

Also, it would be localize({type = "variable", key = "a_emult", vars = {card.ability.extra.emult}})

median veldt
#

thanky ou

vague crest
#

ohhhh wait its that thing ok

daring fern
merry frost
#

I'm still hung up on the blinds refreshing when I beat a Boss before I'm supposed to. Here are my patches, the top one is the one that's not working:

# Prevent Boss Blind from increasing Ante if it is not the last round of an Ante
# TODO: Fux Blinds refreshing when a Boss Blind is beaten before it usually is, the below doesn't work
[[patches]]
[patches.pattern] # Double escape
target = 'functions/state_events.lua'
pattern = 'G.RESET_BLIND_STATES = true' # Line 94
position = 'at'
match_indent = true
times = 1
payload = """if BlindStation.FUNCS.get_current_blind_type() == 'Boss' then
    G.RESET_BLIND_STATES = true
end"""

[[patches]]
[patches.regex] # Mid-line match, double escape
target = 'functions/state_events.lua'
pattern = "G\\.GAME\\.blind:get_type\\(\\) == 'Boss'" # Multi-line from line 111
position = 'at'
match_indent = true
payload = "BlindStation.FUNCS.get_current_blind_type() == 'Boss' and false"

[[patches]]
[patches.regex] # Mid-line match, double escape
target = 'functions/state_events.lua'
pattern = 'G\\.GAME\\.round_resets\\.blind == G.P_BLINDS\\.bl_small' # Multi-line from line 258
position = 'at'
match_indent = true
payload = "BlindStation.FUNCS.get_current_blind_type() == 'Small'"

[[patches]]
[patches.regex] # Mid-line match, double escape
target = 'functions/state_events.lua'
pattern = 'G\\.GAME\\.round_resets\\.blind == G.P_BLINDS\\.bl_big' # Multi-line from line 260
position = 'at'
match_indent = true
payload = "BlindStation.FUNCS.get_current_blind_type() == 'Big'"

The function is the following:

---Returns the current Blind type.
---@return string str The current Blind type, either 'Small', 'Big' or 'Boss'.
BlindStation.FUNCS.get_current_blind_type = function()
    return G.GAME.blind_on_deck or 'Small'
end
orchid dawn
daring fern
bold gyro
#

hey y'all, is there a card.children.center:set_sprite_pos equivelant for changing soul_pos? (i found it it's card.children.floating_sprite:set_sprite_pos)

orchid dawn
median veldt
#

What

orchid dawn
daring fern
orchid dawn
#

how do i make it so every time it selected a hand for debuffing, it shows on the screen which hand its debuffed ?

vague crest
#

ok one last weird question, if i wanted to have the joker being destroyed show an exclamation mark message below it, what would i put here? i assumed card = joker_to_destroy would be enough but it's not showing any message anywhere

daring fern
vague crest
#

ohhhh ok

#

oh theres so many places i can add that

#

not here specifically but i wanna have better indication of whats going on yk

#

with my other jokers

vague crest
#

or maybe the joker being destroyed stops it from giving a message?

orchid dawn
#
set_blind = function(self)
        local hands = {}
        for k, v in pairs(G.GAME.hands) do
            if v.visible then
                table.insert(hands, k)
            end
        end
        self.hand = pseudorandom_element(hands, "seed")
    end,

    calculate = function(self, blind, context)
        if context.after and not blind.disabled then
            local hands = {}
            for k, v in pairs(G.GAME.hands) do
                if v.visible then
                    table.insert(hands, k)
                end
            end
            blind.hand = pseudorandom_element(hands, "seed")
        end
        if context.debuff_hand and blind.hand and not blind.disabled then
            return {debuff = true, debuff_text = localize(blind.hand, 'poker_hands'), debuff_source = self.key}
        end
    end,

this is my code, when I enter the blind nothing happens, but when i play a hand, it shows the last hand I played (or maybe just a coincidence) for any kind of hand I select and it debuffs every single hand i play

median veldt
#

also it looks like you didn't actually destroy the joker

orchid dawn
vague crest
median veldt
#

why exactly is this not upgrading
it's SUPPOSED to upgrade whenever your least played joker hand is played

vague crest
median veldt
molten relic
#

do you put the amount of retriggers a joker does in the config = { extra = { ?

merry frost
molten relic
#

so just retriggers = 1?

daring fern
molten relic
#

Yes.

#

oke

#

SMODS.Joker{ --TheInnerEye name = "The Inner Eye" key = "innereye" config = { extra = { retriggers = 1 } },

#

oke

wintry solar
bitter portal
#

guhh how do i custom sounds

daring fern
bitter portal