#💻・modding-dev

1 messages · Page 33 of 1

frosty dock
#

all fixed!

zealous glen
#

See Aura which is using the ugly (?) way to animate sprites but it works for now

fast badge
#

here's my idea

#

make a sprite for each joker as usual (no numbers)

#

make transparent sprites with only the numbers

#

draw them ontop using soul sprites or even just a shader

zealous glen
fast badge
#

Auri

#

Auru

#

Auro

zealous glen
#

You just made them up

#

Which means you can buy the domain names from me

fast badge
#

The will be real v ery soon

fast badge
zealous glen
fast badge
#

why you 🤨

zealous glen
fast badge
#

nuh uh

zealous glen
fallen tendon
#

im trying to update the enhancement collection ui to have multiple pages and im traumatized

#

since the enhancement api is terrible

#

i have to lovely inject everything

#

unfrotunately it seems like they are not going to show up in the enhancement collection page because i value my sanity

gaunt thistle
#

UI patching is seriously an awful time

#

props that you're attempting this in the first place

fallen tendon
#

For the sake of still having a desk

night pagoda
#

I remember people were talking something about hiker-like mult support for cards in 1.0, does it exist?

wintry solar
#

I think our PR that we’ve been working on for editions and enhancements has working UI

#

I think

#

At least it definitely works for editions

#

So I would assume ejwu replicated it for enhancements

frosty dock
wintry solar
#

I think all the base functionality works apart from extra scoring contexts

#

I can’t speak for enhancements as I haven’t tested those out, but editions can be created and have chips, mult and xmult modifiers

frosty dock
#

alright I just don't wanna be untimely with merging again

wintry solar
#

@sly forge could tell you more about enhancements, I think he’s done so 0.9.8 compat too

#

But I’m happy with where editions are at for now

#

We’re trying to think of the best way to add the advanced calculation, the current calculation stack is super jank

#

And I shall write docs for the stuff I have done over the next few days

frosty dock
#

great

#

I'm quite a bit behind on docs myself, ig I should get that sorted too

night pagoda
wintry solar
#

to use what?

night pagoda
#

ui for mult/chips

#

unless I misunderstood

wintry solar
#

I think you have misunderstood

#

I was meaning the collections pages

night pagoda
#

oh, I thought you was answering my question lol

#

sorry!

zealous glen
#

Someone else isn’t around currently

#

I have code that does it for Jokers and I’d need to update it for more situations

night pagoda
#

ohhh, yeah I know about that, but it's fine

zealous glen
#

They had already done it but they aren’t around so v_v

night pagoda
#

well, thank you!

wintry solar
mellow sable
#

Good to see it working smoothly with Aura

wintry solar
#

yes, it's a shame the shader on that effect isn't very visible on lusty

wintry solar
barren urchin
zealous glen
#

Make it +20 instead

royal ether
#

does smods have sound api

#

nvm i figured it out i think

slow ocean
#

wait

#

is it happening

royal ether
#

no i was just looking for some direction for sounds

royal ether
#

why the fuck cant my balatro read files

#

nvm im an idiot

royal ether
#

anyone know how to get the current audio settings

#

o i found it nvm

unkempt thicket
#

how do you add cards to a deck in Back.apply_to_run?

royal ether
#

damn i get why yall want plug n play mods in smods now, starting this game up with smods takes kinda long

#

its like right in the sweet spot of not really that long, but long enough to be annoying

edgy reef
#

I apologize to anyone who has long load times due to the sheet amount of objects needing to be loaded for D6 Jokers.

royal ether
#

nah the only mod i had was my own which shouldnt (?) take long to load

#

also i wonder how bad a huge modlist actually affects load time

edgy reef
#

For me it depends on what's currently open, but it's usually 5-6 seconds to load.

#

With this as the modlist

crisp coral
#

yeah it takes quite a while each load

gaunt thistle
#

lovely should prob do some caching too, should help startup perf

maiden phoenix
edgy reef
#

There’s still bugs to fix and address but for now the test branch is definitely compatible with Steamodded 1.0 0608a.

#

Probably also current as iirc there are no breaking changes.

#

Surely no secret crash I’m not aware of (clueless)

crisp coral
#

0908a??

#

you mean 0608

edgy reef
#

xdd

fast badge
spice scroll
#

is there a context for buying a joker

hallow forge
#

Probably

hallow forge
#

Cuz Drunkard

fast badge
spice scroll
#

this will be helpful

#

ty

fast badge
#

np

#

Very useful insights on calculation & contexts

spice scroll
#

for what its worth i just want to calculate something upon picking up the joker

royal ether
#

also add_to_deck

#

add_to_deck is what you want if you want your joker to do something when you buy it

spice scroll
#

will add_to_deck be better?

#

would that trigger upon getting it off like a judgement or smth

royal ether
#

yea

spice scroll
#

this is my jokers effect and what i wrote for it btw

royal ether
#

there MIGHT be a buying_self context? lemme check

fast badge
#

buying_card

royal ether
#

yea its buying_card

#

you can probably just use buying_card then check if the card bought is that specific joker

frosty dock
#

no buying_self, but selling_self does exist

royal ether
#

yea i think i combined buying_card and selling_self in my head

fast badge
#

buying_selling

#

balling

#

balling_self

spice scroll
fast badge
#

its a context

spice scroll
#

if context.buying_card and card == self then?

royal ether
#

i'd check if card.config.center_key == whatever your jokers id is

#

instead of card == self

spice scroll
#

is that 1.0 or 0.9.8

royal ether
#

both

spice scroll
#

gotcha

royal ether
#

i'd imagine comparing tables is more expensive

spice scroll
#

actually

#

that would break if you buy another with showman wouldnt it

fast badge
#

Depends on what you want it to do

royal ether
#

you could check unique_val or whatever its called instead then

crisp coral
#

isn't buying_card only a thing for vouchers

fast badge
#

no

#

why would it

royal ether
#

i checked, its for everything

spice scroll
#

ugh this is going to be annoying to test though

crisp coral
#

hm

spice scroll
#

im gonna have to reroll the shop until i get it lmao

crisp coral
#

why don't you just add_to_deck instead

#

and have the wording be "when picked up" or something

royal ether
#

i think they dont want it to be procced on stuff like judgement?

spice scroll
#

honestly thinking about it

crisp coral
#

it would be so fucking funny

spice scroll
#

rolling it on judgement and losing all your money

#

would be very funny

#

yes

royal ether
#

yea xdd

#

anyways chat, if you dont use any apis, turns out making mods compatible w/ balamod & smods is really easy

#

i think i can make super auto balatro compatible with both with a little effort too

spice scroll
#

ah

#

abt to code a makes rerolls free joker just to test this lmfao

royal ether
#

shout out balamod console for having a luarun command so you can just forcibly add stuff to shop

spice scroll
#

so, context.add_to_deck?

royal ether
#

add_to_deck is different from context

#

idk how smods does it but its basically a different calculate_joker

spice scroll
#

ohhhhh i see

crisp coral
#

are you still on 0.9.8

spice scroll
#

yea

crisp coral
#

okay you still need to hook to add_to_deck sadly

spice scroll
#

i think i understand what hooking means now but not how i do so

#

something likke this?

#

grrr and i dont even see add_to_deck in the balatro code anywhere i swear ive checked everywhere

#

wait no its there im dumb

frosty dock
#

me when I'm in debt and this becomes negative XMult

spice scroll
#

good point adds if > 0 statement

zealous glen
#

The game takes care of that by default

#

although other mods could disable it

fast badge
#

Is there a context similar to remove_playing_cards that triggers when a joker is destroyed? (not sold)

frosty dock
#

idts

#

the game doesn't use that

crisp coral
#

iterate through the jokers yourself in remove from deck

fast badge
#

Will the joker be in the removed table?

night pagoda
#

uhhh, can I use function for Joker's loc_txt?

wintry solar
#

What does the function do?

night pagoda
#

it returns different localization depending on condition

wintry solar
#

That sounds like it should work, can you show code?

night pagoda
#

yep, one sec

#

maybe loc_txt is being created at the start and isn't generated later at all, idk

fast badge
#

loc_txt is called every time you hover

night pagoda
#

cool, then I don't see what I did wrong

frosty dock
#

in 1.0, you can use loc_vars

fast badge
#

wait no

#

Yeah that

frosty dock
#

loc_txt is a table

night pagoda
#

no I already use it

#

I need that for different purpose

fast badge
#

Yeah loc_txt is name + description

#

thats why next() is failing

frosty dock
#

loc_vars allows you to return a key field and it will use that loc entry

night pagoda
#

and the purpose is I want to change the amount of lines in the description based on context

frosty dock
#

yeah loc_vars works for that

night pagoda
frosty dock
#

yeah

night pagoda
#

does it overwrite loc_txt?

#

or I still require it

frosty dock
#
SMODS.Consumable {
    loc_txt = {
        name = 'Dummy',
        text = { 'Does nothing...?', '{C:inactive}(#1# remaining)' }
    },
    process_loc_text = function(self)
        SMODS.Consumable.process_loc_text(self)
        SMODS.process_loc_text(G.localization.descriptions.Spectral, self.key .. '2', {
            name = "You're the Fool",
            text = {
                '?????'
            }
        })
    end,
    config = { extra = 10 },
    loc_vars = function(self, info_queue, card)
        local extra = card and card.ability.extra or self.config.extra
        if extra > 1 then
            return { vars = { extra } }
        else
            return { key = self.key .. '2' }
        end
    end,
}
#

example with irrelevant code cut

#

loc_txt isn't used directly anyways, it's just put into G.localization

crisp coral
night pagoda
#

alright, will try, thanks!

fast badge
#

So gotta come up with a way to just, figure out joker destruction myself ig

fast badge
frosty dock
#

hm

#

idk off the top of my head

fast badge
#

Okeydokey

brisk pond
#

is there a way I can put some helper functions in an other file and use them in the main one? Steamodded 1.0.0

brisk pond
#

how?

fast badge
#

1s im booting up my ide

brisk pond
#

sry

fast badge
#

np

night pagoda
frosty dock
night pagoda
#

idk, trying to follow the thing 💀💀💀

frosty dock
#

what function is that in, and how are you using it?

#

i literally can't tell from that

#

dunno why you'd process_loc_text at runtime though

night pagoda
#

It's just for return (this one is loc_vars)

#

Do I need to make process_loc_text function as an argument?

frosty dock
#

process_loc_text only needs to be called during injection

#

it's already present in G.localization after that

night pagoda
#

😵‍💫

frosty dock
#

iirc you would need to call init_localization again otherwise

brisk pond
fast badge
#

path is PT-functions not PT_util

#

the require is the path

brisk pond
#

okok

fast badge
#

not the name of the table ^^

zealous glen
# fast badge

I have that same function. I’m wondering if I sent you this lol

fast badge
#

(i stole it)

night pagoda
brisk pond
#

hope I helped

fast badge
#

🤝

frosty dock
#

fun fact: that probably happens when running this line of code:

table[index] = nil
#

i hope that was helpful

fast badge
#

hope this helps!

brisk pond
#

try making this

table[index] != nil
zealous glen
frosty dock
#

it also happens with this

#
table[nil] = index
#

but not with this

table.__index = nil
brisk pond
night pagoda
frosty dock
night pagoda
#

(I'm not sure what's the first arg supposed to be in process_loc_text)

zealous glen
#

it also happens with

index[table] = nil
frosty dock
#

that one's "Attempt to index a nil value"

zealous glen
crisp coral
frosty dock
#

you can't easily pass it through if it's in Other

night pagoda
#

do I need to use .Joker or something?

zealous glen
#

By the way @frosty dock what if each Joker has its own atlas but it’s an animated Joker so the atlas has multiple sprites?

night pagoda
#

real confused

frosty dock
night pagoda
#

it tells that ref_value is nil

frosty dock
#

ref_value is the key

night pagoda
#

do I need to fill it with something beforehand?

zealous glen
frosty dock
#

that's fine, I just don't want it to be the default

#

it's still possible though

frosty dock
night pagoda
#

oohh key as in joker's key

frosty dock
#

the text will be in descriptions.Joker[ref_value]

night pagoda
#

then how do I get the localization value itself?

#

oho

#

I think I finally got it

#

can I divide it even deeper in the descriptions.joker table?

#

so G.localization.descriptions.Joker.something[ref_value]

frosty dock
#

I think that breaks things?

night pagoda
#

uhmm

frosty dock
#

if you can put descriptions.Joker.something in ref_table, it will do that

#

given it exists

#

but I think it will break

brisk pond
#

did I get it right? I'm inside SMODS.Joker{ }

frosty dock
#

looks good for 1.0

night pagoda
#

yaay the description is empty but it doesn't generate that floating text anymore

crisp coral
#

you don't even need to elseif hell

frosty dock
#

saves the use of end though

crisp coral
#

it's cleaner though

night pagoda
#

do I understand correctly that this will create a new entry in G.localization.descriptions.Joker under the name of crop_circles with localization value/processed table of loc.crop_circles_exotic?

fast badge
#

also prevents unnecessary double checks

crisp coral
#

not if you're smart with your checks

frosty dock
#

end newline if is literally the same amount of characters as elseif

brisk pond
#

makes sense?

zealous glen
fast badge
zealous glen
crisp coral
#

am i the only one who uses separate ifs?????

fast badge
#

your font gives me an aneurysm

zealous glen
zealous glen
crisp coral
night pagoda
#

returning any key in loc_vars makes my description empty

zealous glen
brisk pond
night pagoda
#

(second screenshot)

night pagoda
#

it's the process_loc_text function that screws it over

#

do I even need to return anything in there

#

bingo

#

something appeared

brisk pond
#

i'm trying to set up Global Variables in the helper file "PT_RobinHood.lua", and I need to reset them every time I start a new run.
The code for resetting Global Variables in the main file is

local BackApply_to_run_ref = Back.apply_to_run
function Back.apply_to_run(self)
    BackApply_to_run_ref(self)
    G.mymod.var = 0
    return true
end

so I reset var to 0, but only when var is in G.mymod in the main mod file

night pagoda
#

use G.GAME.your_variable for run-specific global variables

#

G.GAME.your_variable will reset to nil every time you will start a new run

night pagoda
#

or maybe it has mod specific prefix

fast badge
night pagoda
crisp coral
#

what's custom_vars, i haven't heard of it

night pagoda
#

it's just loc_vars

crisp coral
#

i fucking did it again 😭

fast badge
#

eh-?

night pagoda
#

I just have them automated, so there's custom_vars for manual ones

brisk pond
crisp coral
#

well why isn't custom_vars(self, info_queue, card)

night pagoda
#

because I don't use the info_queue and card args in this situation

crisp coral
#

hm

night pagoda
#

reworded*

#

wtf is actually happening

crisp coral
#

no clue

night pagoda
#

I used self.key as the second argument in process_loc_text and it showed me the second description instead of fisrt

#

I was like, maybe it generates some kind of prefix on both things then?

#

and I added postfix to both of them and they do not work again

#

what

#

am I stupid?

#

OH GOD

#

key doesn't even need the localization.description part

#

it gets it by itself

#

it works now!!!

#

@frosty dock tytytyty so much! I now understand what this goddamn function does

crisp coral
#

yippee

night pagoda
#

I can now make another wrapper for my dictionary using this

brisk pond
#

what am I doing wrong?

#

it crashes with error at line 70

crisp coral
#

consumeable is a card

#

all instances of self should be card

brisk pond
#

so consumeable == 'Justice' is wrong

crisp coral
#

completely

brisk pond
#

perfect

#

how do I do it right?

crisp coral
#

context.consumeable.ability.name == "Justice"

brisk pond
#
if context.using_consumeable then
-- When Justice Tarot is used, rank up (max Rank is 10)
 if context.consumeable.ability.name == 'Justice' and self.ability.extra.Rank < 10 then
  self.ability.extra.Rank += 1
  sendTraceMessage("RobinHood rank is " .. self.ability.extra.Rank,"RobinHood")
 end
end
brisk pond
#
if context.using_consumeable then
-- When Justice Tarot is used, rank up (max Rank is 10)
 if context.consumeable.ability.name == 'Justice' and card.ability.extra.Rank < 10 then
  card.ability.extra.Rank += 1
  sendTraceMessage("RobinHood rank is " .. card.ability.extra.Rank,"RobinHood")
 end
end
#

still error

#

at the card.ability.extra.Rank += 1 line

crisp coral
#

+= 1 is not valid lua syntax

#

card.ability.extra.Rank = card.ability.extra.Rank + 1

brisk pond
#

i tried the basic a = a+1 and it runs

night pagoda
#

day 3 or 4 or so of being angry and confused at lua for not having += and -=

brisk pond
#

now the hard part

brisk pond
#

the concept is right?

crisp coral
#

the 10 trigger will never proc

brisk pond
#

right, I have to put it in Loki calc

frosty dock
#

can't you use set_ability with the new card instead of destroying the old one?

brisk pond
#

how does it work?

frosty dock
#

like I have this weird card here

#

you need to use it 10 times before it transforms into The Soul

brisk pond
#

if I want to make a custom ability I have to use G.P_CENTERS[...] or another table?

frosty dock
#

you can use G.P_CENTERS

brisk pond
#

the main idea is this

#

but there are other Jokers I plan to add which change abilities depending on the rank, instead of destroying and creating others

#

so your advice was indeed pretty useful

#

to get the string 'RobinHood', which is the key of the Joker, I have to use card.key?

frosty dock
#

self.key, it's on the center

#

i guess there's also card.config.center_key, but eh

brisk pond
#

because I put pt_util.evolve(card,'Loki') in the main and

function PT_UTIL.evolve(start,end)
 sendTraceMessage("Evolving to "..end,start.key)
end
#

but it doesn't show start's key

frosty dock
frosty dock
#

it's a reserved keyword

night pagoda
#

yeess finally I did it and it works and I even tested it on french language and it works again!!!!!

crisp coral
#

victory

brisk pond
night pagoda
frosty dock
night pagoda
#

oh yeah, will do that, ty

frosty dock
#

again there's no key on card

#

you would need card.config.center_key in that case

brisk pond
#

yeah it works but with the prefix

frosty dock
#

yeah

#

you don't want to not have the prefix

#

it is always used

brisk pond
#

i can see why

#

now I have to add the other 3 functions

#

it would be good to see where the card table is defined in the base game

#

so that I can see which functions hold the editions of the jokers

frosty dock
#

again I think set_ability should get you around that

brisk pond
#

I think I messed up

crisp coral
#

incredible

night pagoda
#

well shit, what do I do now

#

I can't press play

#

had to reset profile

#

oof

brisk pond
#

the DEST card spawns but it has no edition

crisp coral
#

because you're not giving it an edition to set to

frosty dock
#

also these should not be globals

crisp coral
night pagoda
#

TIL

brisk pond
#

if I evolve n Jokers with different editions, it creates n Jokers with the edition of the last one

frosty dock
brisk pond
#

ok, how do I make them not globals?

frosty dock
#

above if start.edition then, add local Edition, Negative

brisk pond
#

just that?

#

in the first lines?

frosty dock
#

yeah

brisk pond
#

doesn't work

#

now all Jokers are without edition

#

current function is this

frosty dock
#

you didn't do as I said

#

now these variables are local to that if block

#

you need to declare them outside of it

brisk pond
#

ok I misread

#

but now I know what local is

#

only negative works

#

all the Jokers had different editions

#

before and after

frosty dock
#

you only do anything to the edition if the original card was negative

#

if Edition and Negative then

brisk pond
#

so just changing to if Edition then should solve

frosty dock
#

mhm

brisk pond
#

perfect

#

thanks

wintry solar
#

That is the jankiest edition code I have seen

#

But I don’t remember how base game set_edition is written

brisk pond
night pagoda
#

hey chat any ideas on how can I efficiently count the most played rank?

frosty dock
#

I want to know how you would go about doing it inefficiently ...

unkempt thicket
night pagoda
#

idk using joker function as counter lmao

#

but what should I really use?...

#

context.scoring_hand???

stiff locust
#

you can remove the save.jkr file to erase the saved game

#

just open balatro before you delete it, steam cloud resyncs files when you open a game

#

most crashes on pressing play are fixed by this

fallen tendon
#

I keep thinking the .jkr files stand for .joker

frosty dock
#

they do

fallen tendon
#

Wait really?

#

Thats sick

quasi kettle
#

does anyone know why this isn't shrinking the hand size?

frosty dock
quasi kettle
#

thanks

zealous glen
#

Does anyone have an example of a mod adding a Joker in Steamodded 1.0? Cryptid does it in a loop in a way that seems a bit obscure

#

Actually I found one

zealous glen
frosty dock
#

not in any of my code, I don't think

zealous glen
#

Do I have to call it twice for chips and mult?

frosty dock
#

if you want two separate messages, yes

zealous glen
#

I guess it's slightly more economical than manually calling card_eval_status_text

frosty dock
#

it's just a wrapper for that, so I wouldn't expect much more

zealous glen
#

anyways, when do I use self and when do I use card in calculate?

frosty dock
#

self is the center object more or less as you define it

#

technically it's only there for consistency, as you could also access it via card

#

in other words you can be fine always using card

#

but static information like key might be easier to access using self

#

(self.key vs. card.config.center_key)

zealous glen
#

that should go straight to the documentation 🤓

edgy reef
#

Some custom API also might have the check between card vs. config longer.

#

D6 Jokers stores all the D6 side info outside of the joker config because the game hates it when you add an object into their ability config.

#

So it becomes self.key vs. SMODS.D6_Sides[card.ability.extra.local_d6_sides[card.ability.extra.selected_d6_face]].key

#

xdd

zealous glen
#

Do you think this would work?

frosty dock
#

== true

wintry solar
#

does context.adding_card_to_deck exist?

frosty dock
wintry solar
#

is it supposed to choose either chips or mult when you purchase it?

frosty dock
#

there's context.playing_card_added as per hologram

zealous glen
wintry solar
#

so what is it supposed to do

zealous glen
#

pseudorandom(pseudoseed('lucky'))

#

where's the question

#

this is historical revisionism

quasi kettle
#

oh I deleted it because changing it to pseudorandom('luckys') fixed it so I assumed I was just dumb

#

thanks lmao

zealous glen
frosty dock
zealous glen
#

== true

frosty dock
#

== true 😭

zealous glen
#

new programming type where Booleans can have feelings

#

that's a sad but true

wintry solar
#

context.buying_card and context.card.ability.set == 'Joker'?

zealous glen
#

nope

#

Riff-Raff

frosty dock
#

brb adding boolean values for maybe and maybe_not

wintry solar
#

I don't think a context exists for when a joker is added to your area

zealous glen
#

There is adding_card_to_deck

wintry solar
#

are you sure?

zealous glen
wintry solar
#

is it something you've defined yourself?

zealous glen
#

yes

#

Does SMODS.current_mod use a forward slash between the Mods folder and the mod's folder?

frosty dock
zealous glen
frosty dock
#

I need more context @_@

zealous glen
#

I had / instead of \\ when I got that error message

frosty dock
#

okay how about you don't use require

zealous glen
#

what else would I use

frosty dock
#

load

zealous glen
frosty dock
#

it's how steamodded loads files

#

you get the file content with NFS.read(path), then feed that file content into assert(load(content))()

zealous glen
#

require appends the file as if it were written there

#

I can also put a return at the end to recover specific local values if I want

frosty dock
#

it turns it into a function

zealous glen
#

The former is useful to hook, overwrite, or have globally accessible definitions. The latter is useful to iterate over data

frosty dock
#

iirc you can also return from it and retrieve those values

zealous glen
#

Cryptid uses it but I don't understand

#

@mellow sable can you explain how a minimal working example of using NFS to load a Joker can work?

mellow sable
#

so basically

#

you need to return the table in a separate lua file (not wrapped inside a function yet)

zealous glen
#

That's what I do with require

mellow sable
#

I use NFS.load to load the file

#

NFS.load(filename)()

#

then you can register a joker with the table that is returned

zealous glen
#

you just said it's not wrapped =_=

mellow sable
#
NFS.load(mod_path.."Items/"..file)

this is how I load a file

#

I then check if it's enabled in a config file

zealous glen
#

you do this

#

I don't understand the assignment here

mellow sable
#

the file is basically loaded as a function

#

when it runs it executes the code in that function

#

It's the same as doing NFS.load(mod_path.."Items/"..file)() but in two steps

zealous glen
mellow sable
#

pretty much

zealous glen
#

why doesn't it like line 33 specifically

#

everywhere else card.config.extra works fine

wintry solar
#

is it not self.config.extra?

zealous glen
#

@frosty dock this is neither displaying the animation nor affecting the score 🤔

zealous glen
#

changing everything to card.config.extra made gaining chips and mult work but it doesn't actually contribute to the score

edgy reef
#

card.config shouldn't have "extra" as the only values the game sets for it should be card and center.

night pagoda
#

what does ?= mean?

edgy reef
#

card being something (idk) and center being it's info in G.P_CENTERS.

edgy reef
#

Yea

zealous glen
# edgy reef Yea

It kinda works but it doesn't juice up the Joker and it's setting the mult to 2 instead of 3 when it should be 1 + 2 🤔

wintry solar
#

your config starts as mult = 0

zealous glen
wintry solar
#

oh right

zealous glen
#

when it increases to 4 it still changes the score's mult to 2

wintry solar
#

do you need card.ability.extra.chips/mult in the return?

zealous glen
#

wait

#

I see the issue

#

alright it works but it still has no juice

#

@frosty dock disregard the previous ping. Do I need to manually juice up my Jokers when calling eval_this?

night pagoda
#

how to put vars into the blinds?

#

tried multiple methods

#

nvm I borked something

#

nvm no I didn't lol

carmine yacht
#

i recall there being weirdness with blind locvars

#

i had to use a lovely patch

night pagoda
#

oof

#

that kinda sucks

carmine yacht
#

well i used a patch that calls the blinds locvars so i only needed to do it once for the whole mod

night pagoda
#

yeah I'm checking it already lol

#

that doesn't feel right

#

I would rather wait for fix

carmine yacht
#

reasonable

#

i definitely dont think its a Good way to do this but it worked so im just keeping it until fix

night pagoda
#

thanks anyways!

carmine yacht
#

np

royal ether
#

iirc myst also had an issue w/ blind locvars

#

i think its just a blind locvars thing

night pagoda
#

I'm patient

#

will do the functionality for now

night pagoda
#

am I stupid?

#

doesn't do anything

#

card:get_id() returns nil sometimes

#

very confused

#

oof I fixed it, I was comparing number to string

stray warren
#

So I'm trying to create a new flag in the pool_flags to check if diet_cola has been sold. Is this the correct way to initialize something like that?

-- Creates the flag
local BackApply_to_run_ref = Back.apply_to_run
function Back.apply_to_run(arg_56_0)
    BackApply_to_run_ref(arg_56_0)
    G.GAME.pool_flags.diet_cola_sold = false
    G.P_CENTERS['j_diet_cola']['yes_pool_flag'] = 'diet_cola_sold'
    G.P_CENTERS['j_ghost_cola']['no_pool_flag'] = 'diet_cola_sold'
end

-- Modifies the `diet_cola_sold` flag
local calculate_joker_ref = Card.calculate_joker
function Card:calculate_joker(context)
    local ret = calculate_joker_ref

    if self.ability.set == "Joker" and not self.debuff then
        if context.selling_self then
            if self.ability.name == 'Diet Cola' then
                G.GAME.pool_flags.diet_cola_sold = true
            end
        end
    end

    return ret
end
--------------------------------------------------
#

I'm on ver. 1.0.0 of Steamodded, and it's saying j_ghost_cola (a custom joker) is a nil value.

wintry solar
#

you might need your mod prefix in there too

quasi kettle
#

does anyone know how to get this to only work if high card is played instead of containing?

queen scroll
#

i think

#

with things like this you can always check the source code

quasi kettle
#

thanks, I was trying to find a joker in the source code like it but all of them were containing. Where should I be looking?

quasi kettle
#

im so blind, thank you

queen scroll
quasi kettle
#

supernova also does

queen scroll
#

yeah

brisk pond
#

guys is there a context for the first operation?

stray warren
brisk pond
#

but this activates every time you hover with the mouse so it isn't a great solution

edgy reef
wintry solar
edgy reef
#

It would be an “add_to_deck” function.

stray warren
brisk pond
#

how do I change this text?
Right now it is showing the Joker's text

#

but I have to put a message with what to do to unlock it

stray warren
#

Ok, so I printed out G.P_CENTERS and my custom joker isn't even there. Would it be in a different place? Like under SMODS?

stray warren
#

sendDebugMessage(tprint(table))

brisk pond
#

can I create a thread in this channel for asking for help on a function?

#

i need help for various functions and I don't want to fill the chat

stray warren
stray warren
#

How would I know if it worked or not? Do I just have to play for a while and hope that me not seeing it means it worked, or is there a way to view the current shop pool somehow?

crisp coral
crisp coral
stray warren
#

I don't even know how to start making a challenge lol

crisp coral
#

f

frosty dock
narrow pollen
#

huh.

#

i kind of expected steamodded to be out of alpha by now; not to say that i think aure is slacking, just that i felt like i took that long of a break to where i fully expected to have missed the full 1.0 release.

frosty dock
night pagoda
#

oh

#

makes sense now

#

couldn't get any vars to work

#

is that something that needs to be fixed?

frosty dock
#

but also there's been some new features in the workings that aren't quite ready yet

narrow pollen
#

yeah; again, i wasn't meaning that negatively! i guess i was just overestimating how long my break was

frosty dock
crisp coral
#

is it the not updating in blind select problem

brisk pond
crisp coral
zealous glen
frosty dock
crisp coral
#

is it patched now?

frosty dock
#

using loc_vars is equivalent to your patch, at least

frosty dock
#

you might have to use loc_vars function and pass it through localize

crisp coral
nocturne garnet
#

it works

frosty dock
#

also my dump looks like this

#

unless I'm dumb and that's somewhere else

crisp coral
#

you're dumb and that's somewhere else

frosty dock
#

oh i see

crisp coral
#

loc_vars is used in blind.lua, this is create_UIBox_blind_choice in UI_definitions.lua

frosty dock
#

it's not in blind.lua so I didn't find it when doing this initially

#

i found it

crisp coral
#

i talked about this like three times already...

frosty dock
#

i don't recall being made aware I literally missed that function

#

I thought it was about something being wrong with a patcht that was already there

#

oh also I see why the end of round eval blind sprite is wrong 💀

crisp coral
#

💀

frosty dock
#

I put function/common_events.lua

crisp coral
#

incredible

frosty dock
#

alright all fixed

night pagoda
#

when I put a string there, the blind shows it without issue, but when I put processed, it gives error

frosty dock
#

try on latest commit

night pagoda
#

brb

#

no luck

#

still ERROR

#

maybe it's the same problem I had with crop circles, where text wasn't processed at this moment

zealous glen
night pagoda
#

cool!

frosty dock
night pagoda
zealous glen
night pagoda
crisp coral
# night pagoda

oh yeah i also had this issue, look at my The Ancestor's code for how i did it

night pagoda
#

it's the same in the blind menu and in the run

crisp coral
#

haven't updated it to the latest commit though

night pagoda
crisp coral
#

for ingame use loc_vars

night pagoda
#

it's as intended

#

yup, thanks!

#

THIS is wrong

crisp coral
#

yea loc_vars

night pagoda
#

ty myst!

#

love when everything works

#

satisfying

#

it looks wrong

#

should it be "all 2s"?

maiden phoenix
#

Yea

frosty dock
#

there's no plural rank loc

night pagoda
#

also this is wrong because it shows literal id as in number instead of the name of the rank

#

is it possible to convert id to name?

crisp coral
#

check how stuff like Mail-In Rebate does it?

#

i'm outside rn

wintry solar
#

Each X is debuffed

#

solves the plural problem

night pagoda
frosty dock
#

you need the base.value though, not the ID

#
  • it's singular
night pagoda
#

oh yeah

#

G.GAME.current_round.mail_card.rank is a string, I store my ranks as a number

#

which is probably wrong

frosty dock
#

yep

night pagoda
#

but get_id returns number

#

so I convert my strings to numbers

frosty dock
#

card.base.value

#

will give you strings like '2' or 'Jack'

night pagoda
#

will try

#

wait

#

I probably need stone check if I use that

#

but seems to be working nicely (I'll fix the description)

night pagoda
#

while I'm still here, is this stupid?

#

I'm almost certain this is

crisp coral
#

for _, v in g.p_centers do if v.set == enhancement then enhancement_pool[#...] = b end

#

or something like that

#

basically this does not work on custom enhancements

wintry solar
#

can't you look in G.P_CENTER_POOLS.Enhanced instead?

frosty dock
#

^^

crisp coral
#

?

#

i couldn't be bothered to format it so apologies 😭

night pagoda
night pagoda
crisp coral
#

should be pairs(g.p_centers), set should be enhanced, keep it as v and not g.p_centers[v]

wintry solar
#

G.P_CENTER_POOLS.Enhanced but this is already a pool of all the enhancements

crisp coral
#

i thinkkkkk

wintry solar
#

why do you need to make another one

crisp coral
#

or. that

#

i forgot p_center_pools existed

night pagoda
#

can't find it

#

I tried it and I think it works

#

so yeah, thanks!

wintry solar
#

I don't know what you're doing with your enhancement pool, but do you even need to bring it local? the G.P_CENTER_POOLS.Enhanced just contains all the P_CENTERS of the enhancements

night pagoda
#

easier to type than G.P_CENTER_POOLS.Enhanced

#

does it change dynamically?

crisp coral
#

it would

night pagoda
#

yeah I'll use it instead of my local then

night pagoda
#

hey, blinds also probably should have mod badges

#

at least in the blind collection menu

regal shoal
gilded blaze
#

I can't unsee Jimbo's eyes

#

that looks so cursed

regal shoal
night pagoda
#

do blinds have add_to_pool?

night pagoda
#

how to hide hidden planets?

frosty dock
night pagoda
#

yeah...

#

I need to disable my blind when it's next to the finisher ante

crisp coral
#

currently you can only modify the blind pool by hooking to get_new_boss

crisp coral
night pagoda
#

it's not something I critically need so I won't do injection just for that

brisk pond
#

Locked Joker's text

solemn coral
#

I'm trying to make an ability that pays out 300 chips every twelve times you play a 2, 3, 4, or 5, and I'm having a bit of difficulty with it.

config = {extra = {chips = 300, played = 0}}
calculate = function(self, card, context)
    if context.individual
    and context.other_card:get_id() <= 5
    and context.other_card:get_id() >= 2 then
        if card.ability.extra.played >= 12 then
            card.ability.extra.played = 0
            return {
                chips = card.ability.extra.chips,
                card = card
            }
        else
            card.ability.extra.played = card.ability.extra.played + 1
        end
    end
end
#

It's correctly incrementing the played value whenever I play a 2, 3, 4, or 5, but it also seems to be incrementing that value for the joker itself. I'm not sure why - I thought that get_id would mean that it only triggers on playing cards, not joker cards.

crisp coral
#

you want to also check for context.cardarea == G.play

#

this will make the joker only affect playing cards

solemn coral
#

Aha, that should do it. Thank you!

zealous glen
crisp coral
#

what does end_of_round have to do

zealous glen
#

wait with G.play you won't need to I think

crisp coral
#

💀

zealous glen
crisp coral
#

hm fair

solemn coral
#

Looks like just adding G.play fixed my issue

zealous glen
#

Yeah, two of the calls use G.hand but the third uses G.play

brisk pond
zealous glen
zealous glen
crisp coral
zealous glen
#
sendTraceMessage("Adding "..tarot.ability.name.." to the table","PTutil")
G.GAME.Util_UsedTarot[tarot.ability.name] = G.GAME.Util_UsedTarot[tarot.ability.name] + 1
sendTraceMessage(tarot.ability.name.." has been used "..G.GAME.Util_UsedTarot[tarot.ability.name].." times","PTutil")
zealous glen
brisk pond
brisk pond
#

it starts at nil I think

zealous glen
#

so you don't need to initialize it

brisk pond
#

ok I understood

#

thanks ❤️

zealous glen
#

the manual indexing won't work, but it's compatible with new tarots that have different names

#

you could use the key instead of the name to avoid issues when two tarots have the same name

brisk pond
#

by putting tarot.config.center_key it now has other mods support, thanks

#

so the function

function PT_UTIL.tarotUsed(tarot)
    sendTraceMessage("Adding "..tarot.config.center_key.." to the table","PTutil")
    G.GAME.Util_UsedTarot[tarot.config.center_key] = (G.GAME.Util_UsedTarot[tarot.config.center_key] or 0) + 1
    sendTraceMessage(tarot.config.center_key.." has been used "..G.GAME.Util_UsedTarot[tarot.config.center_key].." times","PTutil")
end

works, but how can I create

function PT_UTIL.createMostUsedTarot()
#

like, how can I iterate inside the table if I don't know the indexes of the table beforehand?

crisp coral
#

for k, v in pairs(table) do

zealous glen
#

you could also keep track of the most used when you update the table

brisk pond
#

when you write for k, v in pairs(table) do i never understand what K and V represent

wintry solar
#

Key and value

zealous glen
brisk pond
wintry solar
#

You could also order the table by uses and grab the first one whenever you need it

brisk pond
#

now that's a bit complicated for me

brisk pond
#

is there a function that runs whenever a new Joker is acquired?

solemn coral
#

Another question about my ability - how do I make it display a message whenever it increments how many 2/3/4/5s you've played?

calculate = function(self, card, context)
    if context.individual
    and context.other_card:get_id() <= 5
    and context.other_card:get_id() >= 2
    and context.cardarea == G.play then
        if card.ability.extra.played >= card.ability.extra.req-1 then
            card.ability.extra.played = 0
            return {
                chips = card.ability.extra.chips,
                card = card
            }
        else
            card.ability.extra.played = card.ability.extra.played + 1
            return {
                message = card.ability.extra.played.."/"..card.ability.extra.req,
                colour = G.C.FILTER
            }
        end
    end
end

This is how jokers like the Invisible Joker do it, but it's not working here. Does the message thing only work in certain contexts?

crisp coral
#

you didn't return a message in the top return

#

bottom hm

#

yeah bottom is correct

brisk pond
wintry solar
#

whats the linked tarot table for?

brisk pond
#

a Joker has the ability "Creates a useful Tarot card at the end of the round" (useful tarots are ones which are linked to owned modded Jokers)

#

EXAMPLE:
Joker01 is linked to Magician, so Magician is useful
Joker02 (linked to Hermit) has the ability to create a random useful tarot every round, so it creates Hermit or Magician

wintry solar
#

I'd code those links into your joker definitions and then on the end of round calculation look through all your jokers and if they have the link, add them to a pool then

brisk pond
#

so add the function addToUseful(myTarot) inside context.joker_main?

wintry solar
#

no

#

I'll DM you

glacial thicket
#

Anyone want to test a Balatro coop randomizer??

crisp coral
#

archipelago?

#

sorry when i hear randomizer all i know is archipelago

glacial thicket
#

Yee

#

First release for Balatro

crisp coral
#

WHAT

#

YOOOOOO SIGN ME UP

#

YOU DON'T KNOW HOW FUCKING EXICTED I AM RIGHT NOW

glacial thicket
#

Lmao

#

Sure let’s do it

crisp coral
#

yeah hold on let me clear my mod files rq

glacial thicket
#

If anyone else wants to join, shoot a dm

zealous glen
#

Just pass it to the Steamodded Joker constructor

shell timber
#

oh??

#

how does it work

zealous glen
#

Just like it did in 0.9.8

#

But in hindsight that activates when the card is created in the shop

#

So it’s really hooking add_to_deck

shell timber
#

i was asking about archipelago

zealous glen
solemn coral
#

Serious answer on Archipelago - it links games together by having items from one game appear in the other game

#

So, for example, say you were playing Balatro and someone else was playing The Legend of Zelda

shell timber
#

yeah i know how ap works

#

what are the checks

solemn coral
#

Aaah okay. That I don't know

glacial thicket
#

boss blinds

crisp coral
#

it's a broken mess rn lmao

maiden phoenix
glacial thicket
#

I’ll take video footage once it’s not a broken mess

crisp coral
#

lmao

frosty dock
mellow sable
#

Might also be able to test later tonight

night pagoda
#

hell yeah I love 1.0

#

can 1.0 have mod badges for the blinds?

frosty dock
#

it does not, currently

#

but it could? sure

mellow sable
arctic veldt
#

Bunco I think

crisp coral
#

bunco blinds!!

night pagoda
crisp coral
#

too bad cruel blinds are 0.9.8

frosty dock
#

oh damn I literally can't access the part of archipelago discord that balatro is in 💀

#

gotta blame pegi

crisp coral
#

can you not get into ad?

frosty dock
#

I am 11 weeks short of being 18

#

so technically I can't

crisp coral
#

LMAO

#

just fake it you'll be fineeeeee

frosty dock
#

in case you haven't noticed, my date of birth is literally in my bio

crisp coral
#

mobile bad i cant see your bio

frosty dock
#

damn

#

anyways I don't feel like getting banned over it with no option to appeal

zealous glen
#

It says you’ve been alive for 18 years

frosty dock
#

discord rounds these

zealous glen
#

Oh clicking it does show that

#

On mobile I mean

#

Myst has a skill issue balatrojoker

mellow sable
#

You know what I haven’t seen many mods add?

#

Tags

#

Might add those next to Cryptid to be the first balatrojoker

zealous glen
#

I think I’ve seen a mod add Tags

azure wraith
#

ik reverie does

#

codex arcanum and the color mod also do i think

broken vine
#

if it's, like, new types of tags, don't think that's been done

#

but yeah you can already get busted amounts of tags with existing mods

edgy reef
#

aintnoway

#

(well technically I'm younger by several months but still HUH)

frosty dock
#

lol what'd you think

edgy reef
#

I got the impression mostly everyone was an adult due to high knowledge of programming.

#

Anyways I gotta go and add 2D6 and D12 support for D6 Jokers

frosty dock
#

lmao

mellow sable
#

running into a weird issue with taking ownership of jokers

frosty dock
#

for which ver?

mellow sable
#

1.0

frosty dock
#

ok what's the issue?

mellow sable
#

so in cryptid I basically fully override green joker

#

to work with double scale

#

In Aura I override it and do nothing

#

when I play with Cryptid and Aura the loc vars are error

frosty dock
#

all of them?

mellow sable
#

Green Joker is the only joker I modify like this

frosty dock
#

oh I totally see the issue

#

hm that's a bit trickier than I thought

mellow sable
#

let me test if the effect works

#

yeah the effect works fine

#

just localization that's screwed up

zealous glen
frosty dock
#

lmk if it works

mellow sable
#

@frosty dock

solemn coral
#

Why is this not working?

calculate = function(self, card, context)
    if context.cardarea == G.jokers and next(context.poker_hands['Three of a Kind']) then 
        return {
            chips = card.ability.extra.chips,
            card = self
        }
    end
end
#

I'm just trying to make a simple joker that gives chips when a 3 of a kind is scored, and this should be more or less copy-pasted from the source code with the required changes

#

But every time I try to run it, it says that it can't find context.poker_hands

#

The confounding part is, I just finished a much more complicated Joker that, before a hand is scored, converts all cards into Bonus Cards if you played a 3 of a kind, and since that joker triggers if context.before, it isn't having any issues at all.

wintry solar
#

You need context.joker_main

#

Otherwise it’s going to try and trigger on any evaluation of the jokers area

solemn coral
#

Thank you!

frosty dock
#

wrong commit

#

the one I pushed should be 0615b

royal ether
#

aure is 5 years younger than me... aware...

frosty dock
#

damn

#

it's been public information all this time 💀

mellow sable
#

works in 0615b

#

false alarm

frosty dock
#

💀

sly forge
#

ok, it's about time for some HYPE. been working on a PR that includes 0.9.8 compat as part of it- you'll be able to load 0.9.8 mods seamlessly in 1.0! (except Reverie)

frosty dock
#

NOTE: this should not be taken as an incentive not to update your mods to 1.0

wintry solar
#

it's pretty smooth from my limited testing of it

mellow sable
frosty dock
#

well without lovely mods

#

I'll have another look around the PR in a bit, I'm hoping this is separate enough to not become baked into the main project

hallow forge
frosty dock
#

I'm aware docs are still incomplete, that's on me

#

but docs for 0.9.8 were never complete either

pure shore
#

pro tip: just code everything with lovely injections so you'll never have to worry about compatibility

night pagoda
#

I think it's still possible to create something incompatible even with lovely injections

#

not even that hard in theory

mellow sable
#

lovely injection that prevents game from booting

#

👍

#

imo lovely is good when you're not touching steamodded api

#

that's why I use it alone for some mods (Trance, Ankh) but not others (Aura, Cryptid)

night pagoda
#

(I'm already touching steamodded api with lovely lmao)

#

well not a lot and a very minor thing

#

so still counts

wintry solar
#

lovely should be okay if it's non-destructive

night pagoda
#

I think I ported all bunco base blinds from 0.9.8

mellow sable
#

nice

#

time to start playing with it

#

in my modpack

#

lots of modded blinds in 1.0

#

out of the four mods I have that add blinds, all of them except Cryptid have this idea

night pagoda
#

bruh

hallow forge
#

So how do I install lovely on mac, it seems like I need it for 1.0.0

frosty dock
#

bruh

hallow forge
#

yeah i tried that, im trying again in case i did something wrong the first time

frosty dock
#

keep in mind you need to run run_lovely.sh to play modded, playing through steam won't work

hallow forge
#

i went though all the steps and it just errored

quasi kettle
#

does anyone know why this isn't changing the hand size?

zealous glen
quasi kettle
#

its the one troubadour uses

spice scroll
hallow forge
#

k i think i got it working

frosty dock
#

that is syntactically not correct

spice scroll
#

can you point me in the right direction

frosty dock
#
local add_to_deck_ref = Card.add_to_deck
function Card:add_to_deck(from_debuff)
  -- your code here
  add_to_deck_ref(self, from_debuff)
  -- or here
end
#

you also can't return from add_to_deck for an eval message, you have to use card_eval_status_text or whatever it's called

spice scroll
#

thank u based aure

night pagoda
#

new blind

spice scroll
#

oooh cool idea