#đŸ’»ăƒ»modding-dev

1 messages · Page 156 of 1

sturdy compass
#

If it is I may be stupid, however this was the first result when I searched for it online lol

normal crest
#

the built in method has a #

#

--#region name

sturdy compass
#

I seeeee

native cargo
#

Yeah that's how I'm using it.

crisp coral
#

holy shit huge?

verbal surge
#

vscode users discovering region folding

#

cant wait for vscode users to discover ctrl shit l

gaunt thistle
#

ctrl shit l

#

I use notepad to write code 😎

wild patrol
#

What Ctrl shit l do

gaunt thistle
#

stool softener

wild patrol
#

Finally

#

Something for my shit bucket

gaunt thistle
#

wehtn ehf bukcet shit hits fan the

silk dock
#

how can i make a custom suit appear below the default ones instead of above

edgy reef
#

Actually I wonder if regions even work with nvim

silk dock
#

and also not appear in the starting decks

wild patrol
#

I got bored decompiled the APK for balatro

#

Wonder if it's possible to mod balatro on Android to

gaunt thistle
#

you can't decompile the apk unfortunately

#

not possible

#

and you can't talk about modding non-pc platforms ;-)

wild patrol
#

I got it to decompile just can't get it to recompile with APK tool

gaunt thistle
#

hint hint

wild patrol
#

The code nearly the same as PC version

#

How come it's restricted to PC version?

gaunt thistle
#

those are the rules unfortunately

#

it would be a pretty bad look if breaking apple's and google's TOS was allowed here

wild patrol
#

Google's probably only did that because of the modded YouTube app lol

#

Apple just apple

#

But I guess business is business

#

Dude gotta make money so

#

Understandable

gaunt thistle
silk dock
#

im adding a new rank and a new suit but i dont want them to appear in the decks at the start, how can i disable that?

#

and how can i move the suit below the other suits so it's not the first one

#

(no texture for the new rank its just a 2)

random sleet
#

you have to specifically remove them from the deck yourself

silk dock
#

oh i just noticed in_pool exists

#

for the ranks and suits

faint yacht
#

...where's the soul_pos under card.children to target for :set_sprite_pos?

woeful tundra
#

I have made 2 seperate mods, and wnt to give myself a joker from another mod, evertime i load that deck it crashes, but works fine when I dont try to give myself the other joker

#

tried using add_joker() with the key for the joker I made, the joker appears in the collection correctly as well

silk dock
slender island
#

renaming every joker to joper (jopa - ass in russian) is pretty tiring work but it worth wasted time

frosty dock
#

might be floating_sprite

faint yacht
#

Yeah, found a bit earlier with enough digging. Got some stuff to do with that later.

woeful tundra
#

How do I go adding a joker to a deck that I created, I created the deck and it works fine, but when I go to add the new joker to the deck at start of the game it crashes, I can add other jokers fine, and the new joker does show up in the collection screen correctly

#
        Local variables:
         joker = string: "LeapfrogDeck_overunderjoker"
         edition = nil
         silent = boolean: true
         eternal = boolean: false
         (*temporary) = nil
         (*temporary) = table: 0x2bd38020  {x:4.7573170731707, w:10.039024390244, y:0, h:2.6136585365854, scale:1, r:0 (more...)}
         (*temporary) = table: 0x2bb1b9e0  {click_offset:table: 0x2ba78e08, children:table: 0x2ba42870, ambient_tilt:0.2 (more...)}
         (*temporary) = nil
         (*temporary) = table: 0x2b7831c8  {click_offset:table: 0x2b947ad0, children:table: 0x2ba40088, shuffle_amt:0 (more...)}
         (*temporary) = table: 0x2bb1b9e0  {click_offset:table: 0x2ba78e08, children:table: 0x2ba42870, ambient_tilt:0.2 (more...)}
         (*temporary) = nil
         (*temporary) = nil
         (*temporary) = table: 0x2bc7a258  {click_offset:table: 0x2b84a9f8, children:table: 0x2b81ef80, shuffle_amt:0 (more...)}
         (*temporary) = number: 3.47432e-99
         (*temporary) = table: 0x2be572b8  {type:modify_jokers}
         (*temporary) = string: "attempt to index a nil value"```
native cargo
#

Am I able to access the Global GAME? or can I only do it through specific functions?

tall wharf
#

G

native cargo
#

I'll do some more testing, I'm attempting to get comfortable with Lovely patches since I want to make another "Currency" of sorts to micromanage. Basically I'm adding in globals and just making sure they're put in the game. I'll see if that works

opal spade
#

if youre making a smods mod you can define globals w/o the need of a lovely patch

#

since its a run global you'd just need to hook the function that sets the run globals

native cargo
#

Okie dokie, thank you

modern kindle
#

im trying to create a similar joker in the way of working to misprint, is there a way i can make the text work like that card? ive tried using the dynatext but i cant seem to make it apply

native cargo
#

How would I go along editing the hud? I want to set the money box's width to the same size as the hands/discards and add another for my "Currency".

wild patrol
#

And modify it from there

#

It's usually what I do when a card I got does something similar to a vanilla game card

naive sun
#

Hello everyone, I'm trying to create my first mod with Steamodded.
The goal is to create a joker that scales every time the money increases during a round.
Looking at the way money is managed I have the impression that the only entry point is G.GAME.dollar_buffer but I have no idea how to manipulate that. Does anyone have any ideas? Thanks!

maiden phoenix
#

Something like Bootstraps?

naive sun
#

It's more like Campfire but is also sensitive to obtaining currency when cards are played (Gold seal, Golden Ticket, Rough Gem etc...)

maiden phoenix
wintry solar
#

You just hook ease dollars

bold sleet
#

Alright, first question from me of the day: How the heck do I make these checkboxes? (how to make them appear, how to make them actually do something)

modern kindle
#

It might be because I'm exhausted so forgive my stupid questions today

In regards to the chariot, is there a straightforward way I can make it so on use it applies steel to another card at random in the deck?

sudden meadow
#

its in UI_definitions.lua

bold sleet
#

ah

#

thanks

sudden meadow
#

np

bold sleet
#

and where do I place it inside my menu?

#

jancky af but idk

#

I don't know how else one makes vertically stacked text.

maiden phoenix
#

Insides your nodes
Here's an example:

...
{n = G.UIT.R, config = {align = "cl", padding = 0}, nodes = {
            {n = G.UIT.C, config = { align = "cl", padding = 0.05 }, nodes = {
                create_toggle{ col = true, label = "", scale = 1, w = 0, shadow = true, ref_table = SDM_0s_Stuff_Config, ref_value = "limit_moon_base" },
            }},
            {n = G.UIT.C, config = { align = "c", padding = 0 }, nodes = {
                { n = G.UIT.T, config = { text = "Limit Moon Base", scale = 0.45, colour = G.C.UI.TEXT_LIGHT }},
            }},
        }},
...
bold sleet
#

thanks

wicked hornet
#

hey im working on a joker mod with a couple of my friends and i cant figure out how rng works

random sleet
#

pseudorandom returns a number between 0 and 1 based on the runs seed and the key you give it

wicked hornet
#

yeah ive figured that out by looking at the example code but i cant figure out how i compare that to a whole number

#

(ss taken from joker example)

random sleet
#

you dont compare it to a whole number

wicked hornet
#

?

random sleet
#

G.GAME.probabilities.normal is your "luck" factor

#

its normally 1 but gets doubled by oops all sixeses

wicked hornet
#

im not really used to lua lol sorry, its all a little confusing

naive sun
# maiden phoenix A bad idea I have is to save the current money you have in your joker and with a...

If I decide to monitor the variable G.GAME.dollars, the calculation of the mult is done before the actual update of the money so the mult cannot be taken into account for the current hand.
If I decide to use the variable G.GAME.dollar_buffer I do not get all the occurrences of change (ex: Gold Seal + Gold Card with Golden Ticker = +7 dollars and not +3 and +4).
So I do not know if it is possible to realize my Joker...

random sleet
wicked hornet
#

got it

random sleet
#

since extra.odds is 6

wicked hornet
#

makes a lot more sense now

#

ty

random sleet
#

you check if the pseudorandom is less than 1/6th etc

wicked hornet
#

theoretically if i set the odds to 1 in 1000 this would still work right

random sleet
#

yep

wicked hornet
#

got it

#

tysm

random sleet
#

you could set the odds to 1000 in 1 too, its just usually pointless to do so

naive sun
#

Try what Eremel said

random sleet
#

legendary thread name

wicked hornet
#

one more question

#

my textures arent working correctly

#

and im not sure why

#

im pretty sure my atlas is set up correctly

wooden badge
#

Anyone know the easiest way to check if a particular instance of a joker is NOT in the overlay menu?

#

I'm sure there is an array somewhere that includes all the generations of the colleciton jokers I just can't find it, smh

wintry solar
wicked hornet
#

do i need to add both to the atlas because i have 1x and 2x versions of the file

wintry solar
#

The 2x needs to be twice the size

wicked hornet
#

it is twice the size

tall wharf
#

bocchi

spring lantern
#

make sure they're named properly maybe

wintry solar
#

It’s not twice the size if you’re getting that issue

wicked hornet
#

yeah mb i misremembered or smthn

wooden nexus
#

Morning to all of you who was asleep when i was working on something cursed

spring lantern
#

cookin a lil sum

wooden nexus
#

You are cooking indeed

spring lantern
#

why does it look so blurry fucks sake

wooden nexus
#

Meanwhile I’m making cursed content

royal ridge
#

how would you handle should_draw_shadow with enhancements?

#

seems like ignore_shadow is exclusive to edition stuff

wintry solar
#

Should be able to set the property on the card in set ability iirc

tall wharf
nocturne garnet
tall wharf
#

after years of Baron trauma he finally decided to get real

wicked hornet
tall wharf
#

ah

#

btw if the double size sprite looks wrong

#

there's a script that helps make it look better iirc

sudden meadow
#

Hi, i am having an error when I'm making a new deck

#
SMODS.Back {
    key = 'poker',
    loc_txt = {
        name = "Poker Deck",
        text = {
            "No modifiers"
        }
    },
    atlas = 'CardBacks',
    pos = {
        x = 0,
        y = 0
    }
}
#

this is the deck^

wintry solar
#

That’s a lovely deck

sudden meadow
#
return {
    descriptions = {
        Back = {
            b_poker = {
                name = "Poker Deck",
                text = {
                    "No modifiers"
                }
            }
        },
        Blind = {},
        Edition = {},
        Enhanced = {},
        Joker = {},
        Other = {},
        Planet = {},
        Spectral = {},
        Stake = {},
        Tag = {},
        Tarot = {},
        Voucher = {},
    },
    misc = {
        achievement_descriptions = {},
        achievement_names = {},
        blind_states = {},
        challenge_names = {},
        collabs = {},
        dictionary = {
            b_joker_spaces = "Joker Spaces"
        },
        high_scores = {},
        labels = {},
        poker_hand_descriptions = {},
        poker_hands = {},
        quips = {},
        ranks = {},
        suits_plural = {},
        suits_singular = {},
        tutorial = {},
        v_dictionary = {},
        v_text = {},
    },
}
#

this is my en-us file

sudden meadow
#

but it errors when i put localize('b_poker")

tall wharf
#

you didn't add mod prefix to the en-us.lua

wintry solar
#

You also don’t need the loc_txt if you’re using a file

tall wharf
#

true yeah

sudden meadow
tall wharf
#

yea

#

make sure the key is b_<YOURMODPREFIX>_poker instead of b_poker

sudden meadow
#

oh

#

lol

#

that makes sense

tall wharf
#

now how do i make custom music for a booster pack

sudden meadow
#

that sounds cool i have no idea

#

are you going to match the chord progression

#

so that in blends in

#

bc thatd be sick

tall wharf
#

i tried

tall wharf
#

yay

#

🎉"

sudden meadow
#

in misc_functinos.lua there is some functions like play_sound and modulate_sound as well

#

i shorted the file to just what you probably care about

sudden meadow
#

i kinda like it

wooden nexus
#

You got the normal version. I got the cursed version

sudden meadow
#

is that full res lmao

wooden nexus
#

It’s the same size as any 2x texture

sudden meadow
#

to make mine i just messed around in aseprite for like 30 minutes

sudden meadow
#

im trying to make a multiplayer game mode

#

poker rules

wooden nexus
#

Oh so not balatro multiplayer, just straight up poker

tall wharf
#

😭

wooden nexus
sudden meadow
tall wharf
sudden meadow
#

all players will share the deck and the levels of each hand

#

and to win a hand you have to beat score of the other players' hands

sudden meadow
wooden nexus
#

Interesting

#

I’m just making the most cursed content

sudden meadow
#

wtf

wooden nexus
#

This is HARDLY done

nocturne garnet
wooden nexus
#

Idk if i wanna add spectrum or not again

#

Only reason i did the stars and moons from 6-suit is because i originally did the sprites

#

And a lot of concepts

tall wharf
#

i mean

#

i am gonna make wordle in balatro so

#

like

#

idk

wooden nexus
sudden meadow
tall wharf
wooden nexus
#

Maybe i should recreate this

tall wharf
#

proxima centauri b my beloved

sudden meadow
#

i only know alpha centauri

#

and kepler 22b

turbid kite
#

heya, apologies if this has already been asked however many times before, but i just now joined this Discord since i was interested in making a small non-serious mod for personal use. i saw somewhere that there are maybe 3 or so different modding frameworks/APIs/injectors available for use with Balatro but i wanted to ask if there was any sort of (at least unofficial) standard among those that everyone gravitates towards and would be best to start with or stick to overall. if i wanted to make a mod, then, which one of those should i be using above any others?

sudden meadow
#

I'm using Steamodded with lovely and i think thats pretty good

turbid kite
#

i ask this from the perspective of someone who already develops and maintains a bunch of publicly-available mods for another game (Minecraft) where there is more or less an agreed-upon standard as such for what loaders/APIs to use (really only a choice between NeoForge and Fabric at the moment)

random sleet
#

steamodded + lovely + reading comprehension

turbid kite
#

cool, so Steamodded is basically the go-to then?

sudden meadow
#

yea pretty much

random sleet
#

balamod is pretty barren

#

and uhhhh whats the third one

#

i guess just lovely on its own but you need to use lovely to use steamodded anyway

turbid kite
#

i think i might be thinking of Lovely already as the "third" option even though that seems to be a requirement anyway to inject Steamodded

#

at least some GitHub repo i found for cursory info listed it as such, seems odd for them to have done so

random sleet
#

it wasnt always required

tall wharf
wintry solar
#

Maybe the third is that weird one that cropped up last week

random sleet
#

no

turbid kite
#

hm?

sudden meadow
tall wharf
#

not tarot

slender island
solar eagle
#

attempting to add info_queue to some cards, they show the name properly but not the text. this is the setup of my localization file, it matches both the base game and cryptid localization files.

#

something im missing?

tight thistle
#

that badge...

#

i kneel

solar eagle
#

:3

atomic edge
#

do i need to lovely patch the game if i want to do something everytime you enter shop or is there an easier way?

tall wharf
solar eagle
#

Q is for Quagsire

tall wharf
#

wait

atomic edge
#

how do i check which round it is

lavish folio
#

Hey, very nooby question but is there a guide for setting up the dev environment for modding? couldnt find anything in google/pins. I've never modded a game before so i really dont know where to start 😅

solar eagle
#

install steamodded

lavish folio
#

cool! will do this when i get home after work 👍

sonic cedar
#

where can i find the info for the boss blind effect triggers? like the G.GAME.blind.triggered thing

solar eagle
#

like when a boss blind's effect triggers?

#

look into how matador handles it

sonic cedar
#

see im there now but where do i find the contexts they use? like for example, matador looks for the debuffed hand context. where can i find the other contexts the blinds use?

solar eagle
sonic cedar
#

ill look here, dk why i didnt think of that

#

thanks

hardy viper
sonic cedar
#

ill look here too
thanks to you as well

hardy viper
#

nvm blinds don't have a calculate

sonic cedar
#

oh ok

solar eagle
#

yea blinds are wacky

sonic cedar
#

would it help if i explained what im trying to do?

solar eagle
#

yea

sonic cedar
#

so basically im trying to have this gain chips each time a boss blind is triggered, and once you beat a boss blind without triggering it's effect the chips reset

atomic edge
#

guys how do i set something to happen at the end of the round?

maiden phoenix
#

Why context.destroying_hand was made to only work on scored cards? This is so sad 😔

solar eagle
maiden phoenix
#

I mean just check for the scored ones đŸ€·

solar eagle
#

thats how it was accomplished

hardy viper
#

and the other one

sonic cedar
solar eagle
hardy viper
#

it's different in vanilla isn't it

solar eagle
#

not sure

atomic edge
solar eagle
#

base game isnt exactly the same to modded

atomic edge
#

can i put it in the calculate function of a consumable?

solar eagle
#

tarot cards dont have a calculate iirc? or maybe ive set mine up wrong

#

but that only applies when the consumable is used i think

hardy viper
#

they have both

#

calculate is optional

solar eagle
#

makes sense

atomic edge
#

isnt use the one that gets applied when used?

solar eagle
#

yea

hardy viper
#

ye

solar eagle
#

calculate is used on planets i bet

#

for observatory

atomic edge
#

so when is calculate used?

#

oh

hardy viper
#

iirc

solar eagle
#

idk then

#

Maybe its for if you wanna give mult for holding the consumable

maiden phoenix
#

Thanks to smods calculate work on consumables now

solar eagle
#

Ive never seen it used

shrewd cargo
#

how would I apply any changes that I made to the game files after unzipping the .exe?

solar eagle
#

lovely patches

hardy viper
#

calculate is called for all consumeables and all jokers and all vouchers (that implement it) whenever any calculation necessary occurance happens

solar eagle
#

you dont want to edit the game source directly

atomic edge
#

so i want to make a potion that gives luck until the end of the round and i cant seem to find how i could do that

solar eagle
#

example patch:

[patches.pattern]
target = "game.lua"
pattern = "STOP_USE = 0,"
position = "after"
payload = 'select_more = 0,'
match_indent = true```
adds a new property to G.GAME
atomic edge
#
        if context.end_of_round then
            card.ability.givesLuck = false 
            sendDebugMessage("End of round","MyDebugLogger")
        end
    end,```
hardy viper
atomic edge
#

this should be working right?

hardy viper
#

you shouldn't use thunderstore anyways but meh

shrewd cargo
#

ty!

solar eagle
#

its just got the user guide

hardy viper
solar eagle
#

yea

hardy viper
#

just more outdated

solar eagle
#

i prefer reading it on thunderstore

#

thats it

storm kraken
atomic edge
#

can someone please help me

#

calculate function on consumable is not getting called

#

or i dont understand how it works

#
        if context.end_of_round then
            card.ability.givesLuck = false 
            sendDebugMessage("End of round","MyDebugLogger")
        end
    end,```
#

shouldnt this send a debug message at the end of the round?

wintry solar
#

Only if you’re holding it

atomic edge
#

yes i am

#

but it just isnt doing that

wintry solar
#

What smods version are you on?

atomic edge
#

how do i check that?

wintry solar
#

It’ll tell you in the top right of the main menu

atomic edge
#

1.0.0~ALPHA-1303a-STEAMODDED

#

is this it?

wintry solar
#

That’s old calc

#

This won’t work in old calc

atomic edge
#

oh

hardy viper
#

you need cool epic new and improved awesome calc.....

atomic edge
#

should i update?

hardy viper
#

yes

atomic edge
#

i can just download the new one and replace it and thats all right?

hardy viper
#

ye

atomic edge
#

or do i need to change my code a bit?

sonic cedar
atomic edge
#

ok great

cedar stream
#

so in my code if i am searching for a mod is it just find_mod?

hardy viper
atomic edge
wintry solar
#

Yes

#

It’ll trigger loads though

atomic edge
#

i mean for some reason its not triggering

#

do i need to have the consumable selected or something?

wintry solar
#

No it should just work

frosty dock
atomic edge
#

are there any other mods that do something at the end of the round i could check out and try to fix my problem?

wintry solar
#

Can you screenshot the full consumable code for me?

atomic edge
wintry solar
#

What on earth is this loading system you’re using

atomic edge
#

its a custom consumable

atomic edge
#

is that maybe it?

#

i just saw it on another mod that had custom consumables

#

and tried to replicate it

cedar stream
#

and i use SMODS.find_mod in an if statment?

atomic edge
#

it works for the other consumables

#

not the calc function but everything else is good

wintry solar
#

Can I see where you actual define them as consumables?

atomic edge
tall wharf
#

look at these amazing artwork i made

atomic edge
#

gdog?

tall wharf
atomic edge
#

i know im joking hahaha

#

good job

atomic edge
#

and what d othe letters do?

silk dock
#

can't figure out how to patch the game, trying to make a test patch and it doesnt do anything (attempting to make all decks remove face cards)

silk dock
tall wharf
atomic edge
#

i mean what does that do

normal crest
austere tree
silk dock
#

lmao fair

atomic edge
#

oh my god

normal crest
#

That's amazing

atomic edge
#

how fucking smart is this

atomic edge
#

i thought it was going to be some meme thing

#

this is so nice good job

tall wharf
#

the scale was smaller

#

until i decided to add +1 hand selection joker

silk dock
#

thats incredible lol

tall wharf
#

this is still my proudest joker rn

normal crest
silk dock
#

copied and pasted from the lua, dont know why it wouldnt match

wintry solar
normal crest
#

Copied and pasted from the dump right

silk dock
#

yeah

#

do i need to call the patch from the main file or something?

atomic edge
normal crest
wintry solar
#

That’s why then

silk dock
#

its in Balatro\Mods\MillionStars\lovely\game.toml is that correct

wintry solar
#

You’ll have to add your new area to the calculation loop

wooden nexus
#

Welp. You know you’re making cursed content if Jimbo tells you your stuff is cursed.

atomic edge
normal crest
wintry solar
#

In smods utils.lua

silk dock
#

hm

atomic edge
#

so in order to do that i will have to lovely patch smods?

wintry solar
#

You shouldn’t need to patch iirc

atomic edge
#

oh okay thanks

#

you mean i can just change the code and thats it?

#

or no

#

wait

wintry solar
#

You should be able to hook the necessary stuff or add to certain tables, I’ve not looked at it since aure made some changes

atomic edge
#

oh okay thanks

normal crest
wintry solar
#

Oh actually it’s super easy with a lovely patch

silk dock
wintry solar
#

You want to target line 1525 and add your area to the table

atomic edge
#

oh ill do that then great

silk dock
#

so yeah not that either 😔

wintry solar
#

That should make it work fully

normal crest
silk dock
solar eagle
spring lantern
#

anyone remember how retriggering jokers work

#

as in what was the values i had to return

silk dock
solar eagle
#

No

normal crest
# silk dock

Is that the only occurrence of that line of code

solar eagle
#

at least i dont think so, i dont exactly know the context of ur code and the patch

silk dock
#

anyway i did "at" and it still has no effect

hardy viper
#

does it appear in the dump

silk dock
#

nope

solar eagle
#

what's ur patch file named

#

and where is it located in mod folder

silk dock
#

Balatro\Mods\MillionStars\lovely\game.toml

hardy viper
#

try increasing priority to 15

#

some smods lovely patches are prio 10

#

and yours is 0

#

so

wintry solar
#

Smods is -10

silk dock
#

oh that worked!!!

#

thank you :D

#

thats really dumb though

hardy viper
#

idk eremel might have to double check that one

hardy viper
normal crest
silk dock
#

all other mods are disabled it's just this one mod i'm making

normal crest
#

I guess that specific smods patch has thw wrong priority then

#

They're all supposed to be -10

atomic edge
#

do i have to put my mod prefix somewhere

#

or is this just it?

hardy viper
#

i assume what happened here was a priority 0 patch getting applied before an SMODS priority 0 patch

frosty dock
#

what smods patches are prio 0?

hardy viper
#

imo it should be -1 not 0 so default priority is always after steamodded but w/e

hardy viper
frosty dock
#

joker size was missed in review, oops

spring lantern
#

speaking of joker retriggers how do i do that stuff đŸ„Č

hardy viper
#

magic

spring lantern
#

thanks

normal crest
#

When in doubt check the wiki

spring lantern
#

i am checking it as we speak and am finding zero help

#

i must be stupid or smn

wintry solar
#

Joker retriggers should be moved back to -10 too

#

@atomic edge You target the target comment line and use a before patch

cedar stream
#

how would one fetch a table of all jokers sold in your current run

atomic edge
wintry solar
#

The target comment is the pattern

#

That’s what they’re there for

atomic edge
#

oh

#

okay

solar eagle
cedar stream
solar eagle
#

ok

wintry solar
#

Then your payload will just be like t[#t+1] = G.drink_area

normal crest
cedar stream
wintry solar
#

Retriggers are on the calculate functions page

normal crest
#

And apparently retriggering jokers is an optional feature now?

wintry solar
#

Yes

solar eagle
# cedar stream this

yeah i think you would have to track every single sold joker to make this possible

atomic edge
#

i did it

#

but i think my target is wrong (the path)

normal crest
spring lantern
atomic edge
#

because in the loader it doesnt show that it applied a patch

#

to utils.lua

wintry solar
#

Oh maybe it is missing đŸ€”

solar eagle
#

what's the base game equivalent to loc_vars? i cant figure out where the game returns stuff like max_highlighted to the localization systems

spring lantern
#

time to see if i got this to work

#

at least it looks kinda cool

maiden phoenix
#

The art is sick

normal crest
#

In one of the function files

solar eagle
#

lemme look

wintry solar
#

Yeah retriggers checks are missing, I’ll add them to docs later tonight

normal crest
#

Thank youuu

spring lantern
#

thanks!!

cunning creek
#

I've never touch Lua and want to start modding, any tips on what to learn to start?

wintry solar
#

This is the context though, and you just return repetitions = X
{retrigger_joker_check = true, other_card = card, other_context = context, other_ret = _ret}

normal crest
tall wharf
#

i love programming

cunning creek
spring lantern
#

oops!

#

absolutely hilarious that it also retriggers the destroy check on the banana

silk dock
#

how can i make my new suit display below the default suits instead of above

normal crest
normal crest
#

All you'll need is to get used to lua syntax if you know java

cunning creek
#

Will probably just search up some tutorials or smth

rough furnace
edgy mountain
#

im also trying to get started

#

trying to make it so first hand scored turns to aces

#

im not sure im selecting card right?

frosty dock
#

the argument for rank passed into change base should be the rank key, not any sort of suffix (which would also be incorrect in terms of what you have)

#

so just "Ace"

atomic edge
#

how could i change the chances of getting rare jokers / soul

frosty dock
#

also context.first_hand isn't a thing here

solar eagle
#

do lovely patches work on only segments of lines, or do you have to give them the full line?

#

i have this patch:

[patches.pattern]
target = 'functions/common_events.lua'
pattern = '{_c.config.max_highlighted,'
position = 'at'
payload = '{_c.config.max_highlighted + G.GAME.select_more,'
#death cannot be allowed to select 3 cards.
match_indent = true```
set up but it does not work
#

the targeted lines are pretty much these

frosty dock
#

pattern patches match any amount of full lines

solar eagle
#

full lines got it

frosty dock
#

you need a regex patch to partially match a line

solar eagle
#

ill just do a big block then

#

thank you!

frosty dock
#

a big block?

solar eagle
#

get the full list of all tarot cards

frosty dock
#

nah

solar eagle
#

and patch each line individually

frosty dock
#
[[patches]]
[patches.regex]
target = 'functions/common_events.lua'
pattern = '\{_c\.config\.max_highlighted,'
position = 'at'
payload = '{_c.config.max_highlighted + G.GAME.select_more,'
#

just use a regex

edgy mountain
#

had typed the wrong context

#

still doesnt work

#

probably missing something

frosty dock
#

these are separate contexts

#

they don't occur at the same time

edgy mountain
#

oh ok

#

so just first hand would work?

frosty dock
#

... no?

#

context.before uniquely identifies the context

#

if this is the first hand is additional information that's not passed into context

#

you can check if this is the first hand with G.GAME.current_round.hands_played == 0

edgy mountain
#

yup, im just slow

cedar stream
#

is there a way to keep track of sold jokers in a similar way as to how stuff checks for used consumables or specific consumables

solar eagle
# frosty dock just use a regex

Regex '\{_c\.config\.max_highlighted,' on target 'functions/common_events.lua' for regex patch from problematic/lovely.toml resulted in no matches

#

hold up

#

lemme make sure im looking at the right game src version

frosty dock
#

sounds like something smods might be patching into

#

indeed it does

cedar stream
#

you talking to me?

frosty dock
#
[[patches]]
[patches.regex]
target = 'functions/common_events.lua'
pattern = '\{cfg\.max_highlighted,'
position = 'at'
payload = '{cfg.max_highlighted + G.GAME.select_more,'
#

this should do on neutral prio

frosty dock
cedar stream
#

oh ok

frosty dock
solar eagle
cedar stream
#
[patches.pattern]
target = "card.lua"
pattern = 'self:calculate_joker{selling_self = true}'
position = "before"
payload = '''
if self.config.center.set == 'Joker' then
    if G.GAME.jokers_sold then
        local contained = false
        for i = 1, #G.GAME.jokers_sold do
            if self.config.center.key == G.GAME.jokers_sold[i] then contained = true end
        end
        if not contained then table.insert(G.GAME.jokers_sold, self.config.center.key) end
    else
        G.GAME.jokers_sold = {self.config.center.key}
    end
end
'''
match_indent = true``` so this should work then right?
solar eagle
#

only thing left then is info_queue not working for some reason

frosty dock
#

if you take this line

solar eagle
#

localization file is set up like so and im applying it to my tarot card like this
info_queue[#info_queue + 1] = { set = "Forget", key = "m_TWT_tower" }

#

but it just does this

cedar stream
#

is it defined in the localization files

solar eagle
#

Yes

frosty dock
solar eagle
#

see first screenshot which is en-us.lua

#

yea i dont intend for this to work with other mods

#

too much variability

frosty dock
solar eagle
#

i copied my structure from cryptid

frosty dock
#

you just put the center

#

info_queue[#info_queue+1] = G.P_CENTERS.m_TWT_tower

solar eagle
#

how would i do it for custom ones then

cedar stream
#

thats how MTJ does it

solar eagle
#

or is that not possible

frosty dock
cedar stream
#

info_queue[#info_queue + 1] = { key = "r_mtg_reanimate", set = "Other", config = {extra = 1}} thats the info_queue

cedar stream
#
  object_type = "Consumable",
set = "Magic",
name = "mtg-reanimate",
  key = "reanimate",
  pos = {
      x = 7,
      y = 4
  },
  atlas = 'mtg_atlas',
cost = 3,
order = 8,
  config = { },
  loc_vars = function(self, info_queue, card)
    info_queue[#info_queue + 1] = { key = "r_mtg_reanimate", set = "Other", config = {extra = 1}}
    return { vars = {} }
  end,
can_use = function(self, card)
    return (G.GAME.jokers_sold and #G.GAME.jokers_sold) and (#G.jokers.cards < G.jokers.config.card_limit or self.area == G.jokers)
end,
use = function(self, card, area, copier)
  local used_tarot = copier or card
            G.E_MANAGER:add_event(Event({trigger = 'after', delay = 0.4, func = function()
              play_sound('timpani')
              reanimate()
              used_tarot:juice_up(0.3, 0.5)
              return true end }))
              card_eval_status_text(card, 'extra', nil, nil, nil, {message = localize("mtg_reanimate_ex"), colour = G.C.BLACK})
end,
}```
normal crest
frosty dock
cedar stream
solar eagle
#

sure

#

why not

normal crest
#

To put custom text rather than a specific object

frosty dock
#

that's not what I'm saying, with Other set this is fine if there's not an object the description is tied to

#

but passing the prototype is the encouraged way for every vanilla set, even seals

normal crest
#

Ah I see, I didn't notice they were trying to put an object

solar eagle
#

makes sense

#

thank you!

frosty dock
#

you're just throwing code at me at telling me something isn't working

cedar stream
#

sorry my bad ```function reanimate()
if #G.jokers.cards >= G.jokers.config.card_limit then
--Maybe tell the user there was no space?
else
local created_card = create_card('Joker', G.jokers, nil, nil, nil, nil, pseudorandom_element(G.GAME.jokers_sold, pseudoseed("mtg-reanimate")))
--Previously, it also made the joker negative, but I think this is too strong
--created_card:set_edition({negative = true}, true)
created_card:add_to_deck()
G.jokers:emplace(created_card)
created_card:start_materialize()
end

end```

#

thats the function that does not seem to be working

frosty dock
#

i still don't know what about it isn't working

cedar stream
#

it is not creating any jokers even sold ones, as thats what the function is doing

normal crest
#

where are you calling the function

cedar stream
#

assuming i am understanding your question right

frosty dock
#

does it reach the else block?

cedar stream
#

it was working before even in new calc, and now it doesnt

frosty dock
#

that doesn't answer my question

#

anyhow what changed since it worked?

cedar stream
#

i have not ever touched it

frosty dock
#

are you sure?

#

can i see it not working?

wintry solar
rough furnace
#

Not sure if anything in the vanilla game does but DebugPlus's money command doesn't use it, and some mod might want to manually ease it for a nicer effect

wintry solar
#

Eh, I wouldn’t expect debug commands to trigger joker scaling

rough furnace
#

some of them I went out of my way to do

#

like the remove command

wintry solar
#

I guess that’s true, though a slightly different use case

rough furnace
#

but at quick glance I don't belive anything in the vanilla game, debug or not sets the dollars manually

#

but I would worry more about mods doing stuff incorrectly

wintry solar
#

I wonder if there are any mods that don’t use ease dollars right now

rough furnace
#

other than me

wintry solar
#

Yeah

#

I can’t really think of a reason not to use it

rough furnace
#

looking through a quick github search seems like noone is setting the value manually other than a couple of people patching ease_dollars

wintry solar
#

Hooking would probably be the ideal way then rather than clogging up update with a constant check

rough furnace
#

actually looks like betmma does it in a voucher

#

although it's a weird case

#

oh looks like one of our example mods uses it for a cheat

wintry solar
#

That’s an interesting effect

#

I think we need to have a clean up of the example mods at some point tbh

rough furnace
#

yeah

#

some probably should be removed and all should be migrated to json metadata

#

in a couple of the consumeables

wintry solar
#

I don’t think other mod even works xD

rough furnace
#

but yeah that seems to be the entirety of uses of G.GAME.dollars across github

#

so yeah hooking ease_dollars is probably a good method

wintry solar
#

I think all those ways could be rewritten to use ease dollars too if necessary

rough furnace
#

yeah

wintry solar
#

Apart from the betmma one which should probably just lovely patch the interest calculation

rough furnace
#

iirc there was a few weird behavious with ease_dollars I didn't want with DebugPlus

#

ease dollars has an instant option for betmma's use case

chilly karma
#

hey, I'm wondering if there's a way to give myself a joker in a run for testing purposes

wintry solar
#

Maybe the high score parts?

rough furnace
chilly karma
#

okay thanks!

small moon
#

Anyone know why this is running twice?

calculate = function(self, card, context)
    if not context.game_over and context.end_of_round and context.cardarea == G.jokers then
        if pseudorandom("boingular_roulette") < 1 / (G.GAME.probabilities.normal * card.ability.extra.odds) then
            ease_dollars(-G.GAME.dollars, true)
            extinct(card, "Blam!", nil)
        else
            return {
                message = localize('$')..card.ability.extra.reward,
                dollars = card.ability.extra.reward,
                colour = G.C.MONEY
            }
        end
    end
end
wintry solar
#

Add context.main_eval

#

Instead of the area check

#

Area checks are only really useful on playing card effects

small moon
#

Got it, what's weird is it only applies once now but it still shows the message twice

maiden phoenix
wintry solar
wintry solar
#

So it’s kind of a redundant check unless you’re moving them around to new places

tight thistle
#

hello! i dont mean to interrupt, but i still have a problem with my joker's text boxes
i managed to create an event that blocks the event queue which is what i needed to do in order for the text boxes not to be interrupted, however even though the text boxes are in a different queue, they still dont show up. heres a video to show what the issue is

#

its so close to working, i just keep having this same strange issue

rough furnace
#

show code

tight thistle
#

aye aye

maiden phoenix
rough furnace
#

what does jcbb_add_speech_bubble and jcbb_say_stuff look like?

wooden badge
#

does context.after support context.open_booster or is there another way to do something AFTER a booster is opened?

tight thistle
#

apologies for the hastebins, i dont have nitro so i cant fit the code in one message

sonic cedar
wooden badge
#

I ask because context.after added support for seals recently

#

wondered if it extended to other events

sonic cedar
gaunt thistle
#

hastebin is goated

rough furnace
#

Say stuff is making an event in the base queue so it's being blocked

wooden badge
#

I'll have a read of the events manager api

tight thistle
#

oh shit is that it?

sonic cedar
#

does anyone free know how i would set a variable to true ONLY after a boss blind's effect is triggered? like it stays false if it wasnt

wooden badge
#

It has a special context

sonic cedar
#

i was there already but i dont know where i'd change the variable's state

wooden badge
#

i think it's context.debuffed_hand

sonic cedar
#

no ik i have it already like

calculate = function (self, card, context)
        if context.joker_main then
            SMODS.eval_this(context.blueprint_card or card, {
                chip_mod = card.ability.extra.chips,
                message = localize{
                    type = 'variable',
                    key = 'a_chips',
                    vars = {card.ability.extra.chips}
                },
            card = card
            })
        end
        if context.debuffed_hand then
            if G.GAME.blind.triggered then
                card.ability.extra.chips = card.ability.extra.chips + card.ability.extra.chip_gain
                return {
                    message = 'Silver!',
                    colour = G.C.CHIPS,
                    card = card
                },
                
            end
        end
    end
cedar stream
#

how does SMODS.find_mod work and for example lets use a mod prefix of abcd

wooden badge
#

in the debuffed_hand branch just set your variable to true

#

have it default to false no?

sonic cedar
wooden badge
#

ah so you have to trigger the boss blind's effect every hand otherwise the chip gain goes back to nought

sonic cedar
#

yes

#

well not every HAND

#

but like at least once

atomic edge
#

you

wooden badge
#

maybe have an else underneath that

#

what do you mean by 'can' - randomly or through some other effect?

#

it either will reset or it won't based on what you design

#

rn it's just adding chips everytime you trigger a boss Matador style

#

so under what circumstances do you want it to reset?

atomic edge
#

when you trigger a boss blind set one of its abilities to true eg. card.ability.triggeredBlind, and then make another context.end_of_round and check if card.ability.triggeredBlind then give chips else reset

#

imo

wooden badge
#

oh sorry I might have misread, you want a boss to have been triggered at least once

atomic edge
#

i think so

#

i mean i understood it that way

wooden badge
#

remember to set the bool at the end to false again

atomic edge
#

yea fact

wintry solar
wooden badge
#

bc loc_vars don't reset to defaults on repeated calculate calls

#

i suppose you could just make it local

hardy viper
#

lcoalthunk reference

#

lua is so weird why are globals the default

sonic cedar
#
if context.debuffed_hand then
            local iscareset = false
            if G.GAME.blind.triggered then
                card.ability.extra.chips = card.ability.extra.chips + card.ability.extra.chip_gain
                return {
                    message = 'Silver!',
                    colour = G.C.CHIPS,
                    card = card
                },
            else
                iscareset = true
            end
        end

this is what i have so far, something like this?

hardy viper
#

like
defining a variable = global by default
writing to a variable = local by default
accessing a variable = local by default
defining a variable in a for loop = local by default ????
make it make sense

sonic cedar
#

it is weird

wintry solar
sonic cedar
#

but at the same time i get it?

atomic edge
#

i want to have celestial packs always contain the planet of your most used hand if a global variable is true, i applied a patch to the place in card.lua where it creates the planets and checks for telescope and added it but it doesnt seem to work, can anyone tell me why pls?

sonic cedar
wooden badge
#

doesn't context.debuffed_hand trigger on every boss blind effect regardless of actual debuffs, like if you play 4 cards agaisnt the psychic that triggers it

#

the 'debuffed' nomenclature is a bit confusing

wintry solar
#

Triggers when a boss disallows a hand yeah

#

Nothing to do with debuffs in the sense of debuffed cards

sonic cedar
#

it was originally gonna be for whenever one is triggered at all but i dont think thats possible
at least with how this is setup idk

wintry solar
#

There isn’t a ‘boss triggered’ state so you’d have to hard code it manually like matador does

sonic cedar
#

but matador only does it for played hands?

wooden badge
#

you'd probably want the local outside the if context.debuffed_hand branch and then just set true inside if it is entered and then you'll need an extra bit after that actaully does the resetting of the chips

sonic cedar
#

i see

wooden badge
#

if you declare the variable and don't define it it will return nil which is falsy

#

so the check later on will skip it

wintry solar
#

So you want it to scale if you play a hand that’s not allowed by the boss, and reset if you don’t?

sonic cedar
#

yes

wintry solar
#

You’ll have to set two flags within your extra table then, one for whether it’s a valid boss and one for if you’ve triggered it

sonic cedar
#

but not like an immediate reset like play at least one hand that triggered it (so youre not just screwed)

sonic cedar
wintry solar
#

You’d want the valid boss flag to be false unless you’re playing a boss you can trigger in this way, so you can set that in context.setting_blind, use context.debuffed_hand to set the triggered flag, and then context.end_of_round to check that if the valid boss flag is true that you’ve triggered or not to reset

wooden badge
#

`local triggeredBlind
if context.debuffed_hand then
if G.GAME.blind.triggered then
card.ability.extra.chips = card.ability.extra.chips + card.ability.extra.chip_gain
return {
message = 'Silver!',
colour = G.C.CHIPS,
card = card
},

        end
      triggeredBlind = true
    end

if context.end_of_round and triggeredBlind then
card.ability.extra.chips = 0
end
`

#

shouldn't this just work

wintry solar
#

You could maybe drop the valid boss flag if you just do the check in end of round

wooden badge
#

sorry should have the last check be end of round as well

atomic edge
wintry solar
wooden badge
#

i might have missed an end

wintry solar
#

I know

wooden badge
#

but you get the idea

wintry solar
#

It’ll never be entered because you’re checking a local value that starts as false

wooden badge
#

oh shit

#

probably best to have it not local then

wintry solar
#

I also don’t think you can ever get it set to true like that

#

Debuffed hand should only ever be called when the blind is triggered

#

iirc

sonic cedar
wooden badge
#

@sonic cedar you get the idea though, the valid boss check is important aswell bc otherwise bosses that can't access context.debuffed_hand just unfairly reset you

tall wharf
wintry solar
cedar stream
#

is SMODS.find_mod formated like if SMODS.find_mod("mods id") then ?

sonic cedar
atomic edge
#

can global variables declared in my mod code be seen by functions of the games code, or do i need to add a prefix or something

sonic cedar
rough furnace
cedar stream
normal crest
atomic edge
#

thanks

tall wharf
normal crest
sonic cedar
tall wharf
cedar stream
#

i dont think new calc does mess with this stuff, but there have been stuff where things were messed with and i didnt think it would

frosty dock
#

yeah new calc doesn't mess with that

#

it's if next(SMODS.find_mod('id')) then as it's always been since that util was added

cedar stream
#

ok

sonic cedar
#

i see i see
my mistake i apologize

atomic edge
#

i even put debug messages above the ingame code to see and it seems like it doesnt even come there

sonic cedar
#

if only i knew anything about patches

tall wharf
sonic cedar
atomic edge
#

i have no idea why it wont work

#

i did the simplest thing in the world

#

just add another bool to an if

sonic cedar
# tall wharf

you spell “tilt” and it skews the screen slightly

atomic edge
#

not like i coded anything

atomic edge
#

yes

sonic cedar
#

what if it said forced_luck = true it’s something

atomic edge
#

i could try that

#

but i also checked the forced_luck variable

#

and it is true

wintry solar
atomic edge
#

but for some reason its like the game isnt even going through the code i changed

sonic cedar
sonic cedar
atomic edge
#

yes

#

but even with the voucher

#

it doesnt send the debug message i put after the if

#

so i think some other mod is changing the behaviour here or idk

wintry solar
#

Are you looking at the lovely dumps to make sure your patch applied?

hushed briar
#

does info_queue not work on decks...? im getting a crash when i try to use it

    name = "Filmmaker's Deck",
    key = "film_deck",
    pos = {x = 0, y = 0},
    atlas = "atlas_decks",
    config = {
        voucher = "v_directors_cut"
    },
    loc_txt = {
        name = "Filmmaker's Deck",
        text ={
            "Start with {C:red}Director's Cut{}.",
            "{C:attention}Boss Blind{} reroll cost is",
            "reduced to {C:money}$5{}.",
            "Any {C:attention}Boss Blind{} can appear",
            "on any {C:attention}Ante{}."
        },
    },
    loc_vars = function(self, info_queue, card)
        info_queue[#info_queue+1] = G.P_CENTERS.v_directors_cut
        
        return {}
    end,
    apply = function()
        
        G.E_MANAGER:add_event(Event({
            func = function()
                
                return true
            end
        }))
    end
}```
wintry solar
atomic edge
#

if you see here i have two debug messages one in and one out

#

and even if i buy the voucher

#

the effect of it applies

#

but the debugs dont trigger

#

why is that

#

and btw this is the lovely dump one

wintry solar
#

What do you mean by the effect applies?

atomic edge
#

i mean the voucher works

#

in game

#

i thought if i buy the telescope voucher and open a celestial pack it would have to send me a debug message beccause it does all the things under that

#

idk if thats imporant but the console does spam "etperpoll1"

wintry solar
#

Oh right the voucher

#

Your messages will probably be lost within that spam then

atomic edge
#

i mean not spamming

#

like

#

every time i open something

#

i would see the messages

wintry solar
#

Oh smods takes ownership of packs so it’ll never reach that stage

#

You need to patch into game_object.lua

atomic edge
#

oh my god

#

thank you so much

#

the wizard of coding haha

#

wait how do i lovely patch into code that isnt in balatro archive?

#

do i set the target for the full path on my pc?

slow ocean
# tall wharf

i dont check this discord much anymore, but when i accidentally clicked, i saw this, im actively sobbing? weeping, crying. im grovelling. a true scribblenaut

frosty dock
#

target = '=[SMODS _ "src/game_object.lua"]' in this case

atomic edge
#

thanks bro

frosty dock
#

_ is for steamodded itself, for other mods it'd be the respective mod id

tight thistle
#

very strange

#

had to read that message over again, woops

chilly karma
#

how to check the information about the consumeable here like tarot or spectral?

frosty dock
#

so for example context.consumeable.ability.set will give you what kind of consumable was used

chilly karma
#

ah thank you!

tight thistle
#

without that event, it remains false, thus the speech bubbles do not become visible

rough furnace
#

just try puttin them in a different queue

tight thistle
#

put what in a different queue?

#

the speech bubbles? because they are

rough furnace
#

so what is the issue?

tight thistle
#

i think i might have a solution though

rough furnace
#

so put it in a different queue

tight thistle
#

already tried that, doesnt work

rough furnace
#

which queue did you put it in?

tight thistle
#

"other"

rough furnace
#

well that queue is currently being blocked as well by your other events

tight thistle
#

ohh, i didnt think of that

rough furnace
#

either make your other events not blocking (they don't seem to need to block anything) or use another queue

#

for testing the tutorial queue should be fine

#

you should be able to make your own queue if you need it

tight thistle
#

lemme see if this works, i also thought of something that seemed to work as well so this is very promising

#

i might finally get over this problem thats taken me a full week to find a solution to

#

oh my fucking gooooooooooooood it WOOOOOOORKS

spring lantern
spring lantern
#

WHT5A

#

makin me look like a fool over here

young dew
spring lantern
#

balscrabble

tall wharf
#

how do i

#

set_ability

#

with string

tall wharf
frosty dock
tall wharf
#

do i need a prefix

rough furnace
#

G.P_CENTERS.string

tall wharf
#

or do i need prefix either way

#

or more or less set it from name

#

let's see if this works

#

i mesed u lmao

frosty dock
#

yeah string.split isn't real

spring lantern
#

hello smart people of balatro is this correct blueprint code because the last few times i tested it it retriggered the joker once as if it were a normal retrigger then retriggered it again but correctly doing the blueprint animation

tall wharf
frosty dock
#

i think you can use string.match with lua patterns

#

or

#

i've found this somewhere

function string:split(pPattern)
    local Table = {}  -- NOTE: use {n = 0} in Lua-5.0
    local fpat = "(.-)" .. pPattern
    local last_end = 1
    local s, e, cap = self:find(fpat, 1)
    while s do
       if s ~= 1 or cap ~= "" then
      table.insert(Table,cap)
       end
       last_end = e+1
       s, e, cap = self:find(fpat, last_end)
    end
    if last_end <= #self then
       cap = self:sub(last_end)
       table.insert(Table, cap)
    end
    return Table
 end
tall wharf
#

pretend the functions are real

frosty dock
#

if it's not real, just pretend it is

rough furnace
#

speaking of string methods I have a string.trim method in DebugPlus's util

tall wharf
hardy viper
rough furnace
maiden phoenix
spring lantern
tight thistle
#

i need to know something else real quick!
i saw someone post how to scale delay with game speed but i cant find it again, so does anyone know how to do it? i think it involves multiplying the delay by the game speed but im not sure how its done

hardy viper
maiden phoenix
#

Something like this? delay = G.SETTINGS.GAMESPEED*0.05

hardy viper
#

if it's not by default

sonic cedar
maiden phoenix
#

They asked for a delay with game speed đŸ€·

tight thistle
maiden phoenix
#

Well here you go

hardy viper
#

hang on

#

timer - string: The name of the timer to use. Default is "REAL" of created while paused (or with force_pause) otherwise "TOTAL". Can take any of the keys in G.TIMERS.

sonic cedar
hardy viper
#

so use timer = "REAL" in your event

rough furnace
#

(you can also use force_pause)

hardy viper
#

also i thought eremel wrote that one

maiden phoenix
rough furnace
dreamy olive
#

weird question: as someone who took a beginner java class 5 years ago and retained almost no knowledge of programming, where can I get started if I want to make a Balatro Mod?

wintry solar
sonic cedar
#

ohhhh okay
im pretty sure cardarea pertains to which cards to focus on
but what about the other 2?

rough furnace
#

(I should link the lua manual in this wiki page)

wintry solar
#

So in that one, cardarea is the area in which the evaluated card is, setting_blind is always true (and is how you identify this specific context) and then blind will contain a reference to the blind

tall wharf
rough furnace
#

can't wait to spell negative

wooden nexus
#

Totally not making real playing cards in balatro

tall wharf
#

apparently holo is not a real word

rough furnace
#

it's slang

spring lantern
#

why7 is everyone just flexing on my ass bro 😭

wooden nexus
#

how am I flexing? lol

#

I just wanted to be included

tall wharf
rough furnace
#

I might've missed it

tight thistle
hardy viper
#

np

spring lantern
rough furnace
#

lua my beloved

gaunt thistle
#

lua will do that to ya

sonic cedar
wooden nexus
spring lantern
gaunt thistle
#

is that not correct behavior? it looks like it's triggering ok

sonic cedar
tall wharf
maiden phoenix
#

Crap just launched a game, will try after in a bit

spring lantern
#

the problem is that it's retriggering the guy on the left 2 times and the one on the right 0 times

sonic cedar
#

ohhhh

tall wharf
spring lantern
#

this is the whole thing i think im gonna go take a break before my brain melts and drips off my left ear

wintry solar
spring lantern
#

basically it should switch after all cards are scored and then again at the end of the main joker stage

#

except i think i simplified it to just switch when it itself is triggered during the main stage

#

and forgot to change the desc

#

and forgot i did that entirely because my brain is dying

wintry solar
#

so it retriggers the joker to the left during card individual scoring and the joker to the right in joker scoring?

spring lantern
#

in theory

#

am i like overcomplicating the shit out of this now that i think of it

wintry solar
#

you'd have to patch the sprite switching into the scoring play loop

spring lantern
#

oh god

wintry solar
#

otherwise the timing would be incorrect

spring lantern
#

patching is so scary i have never done any kind of significant patch

wintry solar
#

the actual calculation though is pretty simple I think,

tall wharf
#

me who patches every time i see the game code i can't hook:

gaunt thistle
#

it's not that scary

#

well the regex patches are scary but you probably don't need those

torn onyx
#

from what i understand, G.GAME.round_resets.ante is just a number with the current ante, right?

random sleet
#

patching is so easy i patch way too much

spring lantern
#

my only balatro modding experience is making a few mediocre jokers with occasional and very messy use of the event system

tall wharf
#

i did one of those

sonic cedar
gaunt thistle
viral stream
#

bumping this

torn onyx
#

personally id find the code for the red seal and do a lil bit of ctrl c ctrl v

frosty dock
random sleet
#

smods isnt nice to balatro

#

but smods mods are

#

relatively

gaunt thistle
#

The facade pattern (also spelled façade) is a software design pattern commonly used in object-oriented programming. Analogous to a façade in architecture, it is an object that serves as a front-facing interface masking more complex underlying or structural code. A facade can:

improve the readability and usability of a software library by maskin...

tall wharf
gaunt thistle
#

I say give smods a taste of its own medicine

rough furnace
#

tbh lovely only is super tempting for some stuff

#

sometime I just want to say screw all other mods I will modify balatro how I liike

wintry solar
# sonic cedar is there an explanation of this that doesn't hurt my head trying to wrap my 3 br...

Okay so, calculation happens at lots of different times, and your calculate function is called everytime the game tries to calculate something. For the game to differentiate between the different timings, it uses the context table. This table is made up of 2 types of things generally, flags to help identify the timing of the calculation, and objects that are relevant to that calculation. The docs you're referencing cover all the contexts that are called in the game, set out as a condition you can copy to identify that context, and then the structure of the context table in that timing.

frosty dock
rough furnace
#

I wonder what the second most widely used lovely-only mod is

gaunt thistle
#

does lovely's metadata injection count?

#

require('lovely').version

rough furnace
#

no

frosty dock
#

do mods that have some amount of support for smods but work without it count?

rough furnace