#đŸ’»ăƒ»modding-dev

1 messages · Page 27 of 1

scenic zenith
#

but you can't rn it's called too early as far as i can see

#

change the ref to Card:add_to_deck too and when calling the ref add self, before from_debuff

maiden phoenix
#

Add this at the start of the function if not self.added_to_deck then

scenic zenith
#

yea if i move the load call to the end by doing my own lovely it lets me change sprite peaceline

#

ig this works

#

oh wait i can solve this without this by overwriting the pos value in config

frosty dock
#

if it's not complicated to get there with Lovely, sure...?

scenic zenith
#

yea it's trivial

#

i just changed it to this

#

# move Card:load()
[[patches]]
[patches.pattern]
target = 'card.lua'
pattern = 'self:set_sprites(self.config.center, self.config.card)'
match_indent = true
position = 'after'
payload = '''
local obj = self.config.center
if obj.load and type(obj.load) == 'function' then
    obj:load(self, cardTable, other_card)
end
'''
#

the other one used at instead of after idk if there was a reason for that

#

actually

#

there might be a reason this isn't possible

#

i don't know if you can change the scale if you do it this late

#

that might be the reason it's so early

proud cypress
#

this is what ended up working

mellow sable
#

Wait it's just because of DebugPlus lol

scenic zenith
#

ye you hit the eternal key

#

lmao

scenic zenith
#

so yea i don't think there's any issues with moving it to the end

rough furnace
#

Wait does debug plus let you add eternal to playing cards?

scenic zenith
#

ye

rough furnace
#

Huh

#

I don't remember letting it do that

scenic zenith
#

it's the button A

#

might be part of normal debug

zealous glen
#

add_to_deckref(self, from_debuff)

#

Oh you already realized your error

zealous glen
#

for the colors

#

I know it's a lovely patch

zealous glen
scenic zenith
#

toml for colors

#

we did figure out how to change sprites just the current position of the Card:load() call is before the game actually sets the sprite of the card

#

so it does nothing

#

if you move it to the end of the function it works

night pagoda
#

I wasn't but I wanted to at some point

zealous glen
night pagoda
#

ah, I thought you meant vanilla jokers, my bad

zealous glen
#

How do you do it?

#

IIRC you didn't use a patch

scenic zenith
#
card.children.center:set_sprite_pos(new_pos)
#

you can do it this way

night pagoda
#

self.children.center:set_sprite_pos({coordinate}), where self is card

#

yup

scenic zenith
#

make the current pos a part of ability.extra to save it

zealous glen
#

I don't think Firch did

scenic zenith
#

no you don't need it for setting sprite pos

#

i did a patch so i can set it in card:load() so it is updated immediately when the run is loaded

zealous glen
#

In theory animated Jokers are possible but they seem to be sensitive

wintry solar
#

did somebody say shaders that change based on colour?

zealous glen
wintry solar
#

these are based on the suit selected by the joker

zealous glen
#

I wonder if you could do that with animated Jokers or just by changing the sprite

royal ridge
#

@frosty dock base steamodded crash when using grim, familiar, or incantation

frosty dock
scenic zenith
#

probably i just feel like load makes more sense at the end

proud cypress
#

anyway to add a joker to the pool so that it doesnt get rolled?

#

or not making it be removed from pool when sold

scenic zenith
#

look into how cavandish does it but i think it's called "yes_pool_flag"

proud cypress
#

ok cool

scenic zenith
#

im pretty sure if you set that you can't get the joker unless the flag is set in G.GAME.pool_flags

frosty dock
#

this should do hopefully

frosty dock
mellow sable
#

could've sworn I fixed Cryptid's

frosty dock
#

self.ability.extra should be card.ability.extra

mellow sable
#

I changed that

frosty dock
#

oh maybe I'm just not on latest

mellow sable
#

I fixed Cryptid's after reporting it to you lol

frosty dock
#

i could have sworn I pulled, must have forgot

frosty dock
#

it doesn't crash, but the card doesn't juice up

#

changing copier or self to copier or card fixes

charred needle
#

heres the section

#

what its supposed to do is on each card scored, increment seventally, and once seventally hits 7, it adds 7 chips to the joker and resets seventally

frosty dock
charred needle
#

Okay, now it doesnt crash on hover over, but it doesnt trigger upgrade on the 7th card scored

#

is there a way to output to the console to test and see if its even checking and adding to seventally?

mellow sable
#

print()

edgy reef
#

print() spam my beloved

charred needle
#

print spam my beloved

mellow sable
charred needle
#

so apparently it runs the seventally = (seventally + 1) line 23 times because in the console on scoring a single card it spits out 1 then 2 then 3 up till 23

mellow sable
#

you need to add more checks to context

charred needle
#

I really wish there was documentation for this what new context checks do I need to add?

mellow sable
#

Here's a part of my code for a joker that gives XMult when a card is scored

if context.individual then
            if context.cardarea == G.play then
                return {
                    x_mult = card.ability.extra.x_mult,
                    colour = G.C.RED,
                    card = card
                }
            end
        end
#

and that works fine

#

so you'd need to add these two checks along with not context.repetition

charred needle
#

okay, final question (for now, i hope). Whats the x_mult equivilent for + chips, and whats the context for end of hand scoring before the mult gets multiplied to the chips so I can add the +7 chips to the total chips

#

oh and where do I edit it to show what the current ammount of chips are

proud cypress
#

how do i get get_current_pool?

#

this is giving me a reference exception

charred needle
#

berto, do you know the context so the chips only get added once all cards are scored?

frosty dock
#

G is not the global scope

#

_G is

proud cypress
#

and _G has what information?

#

thanks!

frosty dock
#

you don't need _G

#

you can just do local get_current_poolref = get_current_pool

proud cypress
#

engine stuff?

frosty dock
#

even itself

#

_G._G._G is the same thing as _G

proud cypress
#

so how does this work?

frosty dock
#

this function isn't declared on the global scope, but on the field UIDEF of the global variable G

#

which is an instance of the Game class, and not the global scope _G

proud cypress
#

ok cool thanks a lot! very helpful stuff

frosty dock
#

np

frosty dock
proud cypress
charred needle
frosty dock
#

these don't occur together

charred needle
#

now it plays the little blue square but doesnt add the chips or show the number, just plays the blue square

frosty dock
#

try chip_mod instead of chips

#

it's what the game itself uses

#

like type chips right here

charred needle
#

cool, the plus shows, but now it only shows +0

#

oh thats because 0 is the base chip

#

im stupid (i think)

#

let me try something

#

yep I was dumb

proud cypress
#

this is killing me

#

for some reason the get_next_voucher_key fails

#

ok i just took the whole function body, how bad is that?

zealous glen
#

but if copy-pasting it works, then it should work without copy-pasting it

proud cypress
proud cypress
zealous glen
# proud cypress

I think it's because your get_current_pool ends with return t instead of return t1, t2

#

naturally you need to assign t1 and t2

zealous glen
#

It's not too hard

proud cypress
#

thanks

#

did the job đŸ‘ŒđŸœ

rustic grove
#

Could anyone point me too where in the source code the seed is used to calculate shop/tarrot queues?

#

I want to make a seed searcher as a project

mellow sable
#

get_current_pool function will be helpful

rustic grove
#

alright ty

charred needle
#

Question. What do I call to create planet cards?

#

I tried copying the high priestess code but it doesn’t work, it throws an error

#

And how do I check if a played hand is a specific thing?

proud cypress
#

My best guess is in the common_events create_card function

versed violet
#

how'd you figure out how to do this? ive been tinkering around for a while and I haven't figured out how to send a working variable to a shader

silent sinew
versed violet
#

oh my gosh thank you so much

proud cypress
#

Anyway to add a different kind of ticket to a shop item? Like buy or buy and use sort of thing

#

Or where to look for that

mellow crag
#

I wonder

#

can you do lovely injections over lua comments?

crisp coral
#

yes

#

steamodded does that for some lines

mellow crag
#

oh that's great

random sleet
#

lovely just sees text

mellow crag
#

is Enhancement API stable for 1.0?

#

I might add a "copper" enhancement for xchips

zealous glen
#

I think ejwu is implementing an Enhancement API into Steamodded

mellow crag
wary hinge
#

New to moding the game but is there a guide or tools that allows me to change the sprites/images of the cards?

been looking but I can't seem to spot any

royal ridge
#

@frosty dock i suppose (sorry)

maiden phoenix
frosty dock
royal ridge
#

most recent commit

frosty dock
#

I must have missed something then

#

sorry

royal ridge
worldly sapphire
#

I was playing with that joker i made that just spawns as polychrome, and he spawned as a Polychrome naturally and the game did not crash

#

I wonder if there is a way to spawn and guarantee him to always be polychrome

#

Even if he is already polychrome

zealous glen
#

Depending on how you implemented it then it’s always Polychrome

worldly sapphire
#

Its in the set_ability like this

card:set_edition({polychrome = true})

zealous glen
#

Idk when set_ability is called. Usually the game just avoids giving editions to cards with editions

worldly sapphire
#

But like, when he spawns, he spawns without polychrome and then he crashes the game

wintry solar
#

do you want it to have the polychrome effect or just the shader?

worldly sapphire
#

I think the shader is better

#

I will try to do that when i get home lol

wintry solar
#

I'll send you some code if you just want the shader without the effect

#

that's really simple

worldly sapphire
#

Alright

wintry solar
#

it'll mean it can get other editions then too

worldly sapphire
#

Polychrome shader + negative Edition lol

rustic grove
mellow sable
#

it kinda turns into multiple seeds first

night pagoda
#

I'm using loops like these to make something for a specific joker. How can I check for blueprints that mimic a certain joker? Is there a variable for copied joker name or something?

#

something something

for _, v in ipairs(G.jokers.cards) do
if v.ability.name == 'Blueprint' and v.ability.blueprint_effect == 'Xray' then```
edgy reef
#

I wonder if SMODS.find_card() can be used for this.

#

It already returns an array with all cards with the specific joker key.

#

Could we also add a check for if blueprinted cards also count?

night pagoda
#

also my thing doesn't really makes a lot of sense because of the non-blueprint cards that also mimic jokers (brainstorm for example)

#

so yeah

wintry solar
#

do I need to change my header?

frosty dock
#

does it show your mod in the list?

night pagoda
#

How do I add game values to the joker's localization? I can set them in the update of joker but seems like it's not what's intended

frosty dock
#

loc_vars

wintry solar
#

wait I think I know what I've done here

#

is it possible to load the example mods in the steamodded folder?

night pagoda
#

so I need a way to pass them in after joker creation I guess

#

this is what I did

frosty dock
#

you can always assign a default within loc_vars if the value doesn't currently exist

night pagoda
#

yeah I can't just pass a var beforehand

frosty dock
#

first of all that does not look like latest steamodded

frosty dock
night pagoda
#

will update in a moment

#

okay, will try, ty!

wintry solar
#
SMODS.Back({
    key = 'test_deck',
    loc_txt = {
        name = 'Test Deck',
        text = {
            "test"
        }
    }
})
#

why won't this load?

#

what have I missed

frosty dock
#

seems normal, can you send the mod file in full?

wintry solar
#
SMODS.Back({
    key = 'test_deck',
    loc_txt = {
        name = 'Test Deck',
        text = {
            "test"
        }
    }
})

if SMODS.Back.test_deck then
    sendInfoMessage("Test Deck loaded", "Edition Example")
else
    sendInfoMessage("Test Deck not loaded", "Edition Example")
end
#

this is literally the entire file minus the header

frosty dock
#

SMODS.Back.test_deck won't be a thing

wintry solar
#

oh do I need my mod prefix

frosty dock
#

SMODS.Back is the class, it doesn't hold the actual objects

wintry solar
#

ah yes

frosty dock
#

backs don't even have their own such table, all centers share one

night pagoda
frosty dock
#

did you misspell UIT?

night pagoda
#

no? this didn't cause any errors before

#

I just updated steamodded

frosty dock
#

oh

#

it's probably this then

#

i changed some arguments to make it more consistent

night pagoda
#

đŸ«Ą

#

I still do not understand where do I put the nil check for localization, because if I put it it creates joker but it makes it always behave like the value doesn't exist

frosty dock
night pagoda
#

oooooh now I understand, I need to do that inside the function, yeah?

frosty dock
#

yeah

wintry solar
#

huh, the deck will only appear in the collection if I give it a name

#

I thought names weren't necessary anymore?

frosty dock
#

wait what

wintry solar
#

so this updates the count in the collection to 16/16, but it isn't in the selector

#

this works fine

frosty dock
#

back collection relies on names, apparently

wintry solar
#

that's nice to know

frosty dock
#

should work on latest commit without name

leaden belfry
#

i'm thinking about if a new enhance, that combine every vanilla enhance, and is only obtainable by a new spectral card, is possible

#

or does it already exist

worldly sapphire
#

how tarot cards do that center animation?

frosty dock
worldly sapphire
wintry solar
#

How do people feel about this for EditionAPI?

#

Better to keep ALL editions in the 4% chance and scale them accordingly, or leave base editions as the 4% and stack others further on that

#

Also interacts funny with Hone and Glow Up vouchers, should they just affect base editions or affect all custom ones too?

worldly sapphire
#

i searched card.lua for a example of a card going to the center of the screen and i can't find it ;(

shut loom
#

what code gets run when a planet is used

#

that should be where to look

mellow sable
#

how did that voucher get there? golden_joker

wild gyro
mellow sable
ionic isle
#

is that plasma

mellow sable
mellow crag
#

Hellooooooooo

#

what are you guys ding?

random sleet
#

working :(((

#

by which i mean pretending to care about this stupid job and instead brainstorming balatro mod ideas

#

(unsuccessfully)

random sleet
#

uhhhh just generally stuff i wanna do
also kinda thinkin about like broad-strokes implementation for stuff

#

if i cant work on stuff my brain still likes to feel productive on my projects in some way

#

so rn that's just brainfishing

#

for whatever dumb ideas i can find

#

it doesnt help that this job is boring as sin

proud cypress
#

Im working on a joker pool mod, any joker you buy is out of the pool, and now Im trying to add an option to buy them back into the pool

zealous glen
zealous glen
random sleet
#

iirc thats done by moving the cards to the G.play cardarea

zealous glen
#

Perhaps, but you can move cards freely by changing their coordinates

#

However you need an event if you want it to be smooth

#

And there’s some quirks I haven’t figured out exactly

#

Not sure what coordinate system the game uses for rotations

random sleet
#

i believe the same is done for vouchers, the G.play thing

#

best to just stay consistent

zealous glen
#

I don’t think that works for me because then you have things mixing with cards while they’re being played

#

Although maybe I should use the play area as a position reference

#

I did want to perhaps make the animation start only after cards finish being played, but that was partially to avoid fixing a bug

zealous glen
random sleet
#

that effect with the deck moving up is cool ill admit

#

i wouldnt be opposed to using something similar for Offering tbh

#

man the tumor feels like old news at this point HS-wise haha

zealous glen
#

To be fair, I was thinking about making the entire deck move up at once (face-down) and dissolve

#

I kept it like that so I could see it move and understand what my code was doing

random sleet
#

i like seeing the cards

#

thats the main thing i dont like abt offering

zealous glen
#

I do like the extra pizazz but it’s a bit slow

random sleet
#

yeah but funny

zealous glen
#

Although I know how to manually make the animations faster (without relying on the acceleration code). I also know how to make acceleration apply

random sleet
zealous glen
random sleet
#

^^"

#

i suppose

zealous glen
#

I had a list of things to show another reader while they were reading as they reached appropriate points

random sleet
#

i still have like a thousandish pages left right

zealous glen
#

A lot of it was just recalling some of their comments if they were prescient (sometimes when they talked about completely different subjects)

zealous glen
#

Since a lot of it is references to what they commented, I think I’d only have a handful of links to show you at best

random sleet
#

hit me up in dms ig

#

not rlly the place to talk at length abt hs

oblique gust
#

guys is there an existing example of attaching an infobox to other (vanilla and modded) jokers' tooltips?

royal ether
#

the first one that i remember is autumn's planet cards

#

those predate smods tooltips though i think

random sleet
#

no theyre implemented with the smods way

#

the trick is jokers are special

#

and smods 1.0 changed everything also

oblique gust
#

aight nvm. also can i color the text in the desc with customized HEX color or sum?

wintry solar
# zealous glen I’m not sure I understand the difference here

The base game edition rate is 4%. So there’s two choices for how custom editions are added on; either we preserve the 4% chance of an edition and the base game ones are less likely because you’ve now got more in that 4%, or we preserve the base game edition chance and then add further editions past that, so you might end up with 20% chance for an edition with no modifiers just by having a lot of editions

zealous glen
#

In terms of API, I think it should be weight-based

#

Maybe with some priority rules

#

I remember discussing this before for another Steamodded API

#

Maybe Seals?

#

@frosty dock do you remember?

wintry solar
#

Yes but inherently we have to decide how they are added to the pool

zealous glen
#

and again I think they should be unobtainable unless the mod maker gives it a weight or adds another way to obtain them

wintry solar
#

They are

#

But if a weight is given, how is that weight applied? Does it maintain a 4% chance to get any edition, or does it maintain base weights?

zealous glen
#

Actually indeed I was talking about it with you

zealous glen
wintry solar
#

Yes this is a problem I discovered last night

zealous glen
#

The weight is the weght

#

that's the purpose of the weight

#

The total probability is the sum of weights

#

this is how this system is supposed to work

wintry solar
#

So are we saying the base card weight is 960?

#

And isn’t changed by anything else?

zealous glen
#

I mean, modders can add weight to it

wintry solar
#

In fact I think this is what we decided before

zealous glen
#

If you want you can make a custom function for that

wintry solar
#

Maybe I have just gone round in a massive circle

random sleet
#

4% for any edition

wintry solar
#

That is what I settled on to avoid issues of make editions more likely than base cards

mellow crag
#

@wintry solar how is progress on the enhancements going?

wintry solar
#

Then there was the question of Hone and Glow Up and whether they should also increase the chances of custom editions or just base editions

wintry solar
#

And then evaluating custom effects needs work too

mellow crag
#

I have some thing I wanna try out with X-Chips

wintry solar
#

I can do when it works 😅

random sleet
#

voucher_boost = true or smth

#

itayyyyyy hows xchips

mellow crag
random sleet
#

sick

mellow crag
#

fixed some issues with held x-chips

random sleet
#

baller

mellow crag
#

and now working on xgold and held emult

random sleet
#

Hell Yeah

mellow crag
#

I also made a ton of progress on search bar

random sleet
#

sweet

#

search bar will be handy when we get tons of stuff rollin around

#

i might!!! actually release a mod this weekend :))

mellow crag
#

which?

random sleet
#

prolly oapi and maybe thac and/or emojiokers

mellow crag
#

ooh that would be fun

#

i kinda want to throw my hat into the ring with enhancements

random sleet
#

another enhancement api woooo

mellow crag
#

that's why I wont do it XD

#

though it wouldn't be hard to do

#

i can see how I would do it

random sleet
#

my main thing with thac is that somehow i dont feel like i have enough content to justify posting it

#

which i guess is mostly that i have no support jokers for the new suits

mellow crag
#

what do you think Autumn

random sleet
#

an' the Page of X tarot cards dont have real art

mellow crag
#

should I make an enhancement API?

random sleet
#

i think i just want there to be any enhancement api that exists and works

mellow crag
#

I mean, I do still have my stamp code

#

and the enhancement API would work in a similar way

random sleet
#

i also have your stamp code :)

#

shit i also need to integrate stamps gdi

wintry solar
#

I believe @sly forge has submitted enhancement api to be merged

mellow crag
#

ill check it out

random sleet
#

stupid jokerstamps

#

:( makin my life hard

mellow crag
#

oh they did a ton of work

sly forge
#

hey, I'm on! if you have any questions ask away

mellow crag
random sleet
#

i really just gotta sit down and read ur jokerstamps code when i get home

sly forge
#

short answer, wherever it would make sense; long answer, it's injected in eval_card, and before calculate_joker during specific contexts: I just did those that would occur while there's a hand

random sleet
#

man i am so excited for enhancement api

#

im also still considering doing omori emotions
like legit that sounds fun

mellow crag
#

Today Ill do some misc features for Jimbo's Garden

#

AKA add the seed pack and farmer's tag

random sleet
#

woooo jimbarden

zealous glen
random sleet
#

yeah welcome to the conversation 👋

maiden phoenix
#

Guys I'm not sure but I think ejwu-

mellow crag
#

XD

queen scroll
#

stock market in balatro

random sleet
mellow crag
#

Progress goes along nicely

frosty dock
#

pog

worldly sapphire
#

just found a code that moves the joker

#

finnaly

#

G.play:emplace(self)

#

this works

random sleet
#

itay are you doing the art for jimbos garbedn

#

it looks gooooood

mellow crag
#

No

#

it's Lyman

random sleet
#

lyman the goat

mellow crag
#

true

worldly sapphire
remote coral
random sleet
#

oh!! i wanted to ask
@mellow crag how viable do you think itd be to adapt the cardarea swap thing for garden to alternate top-row cardareas?

random sleet
#

like how u have that button to swap to garden from hand and vice versa

#

would that be possible for jokers/consumables to swap to other cardareas

#

with like a row of buttons at the top of the screen maybe

#

👀

#

expandable cardarea api

#

unlimited card areas

zealous glen
zealous glen
# mellow crag

Interesting it’s Greek architecture and not farm architecture

zealous glen
#

Though tbf Idk if emplaces changes areas

royal ether
random sleet
#

yes

#

thats why ive been suggesting it

#

i am experiencing an idea!!!!

mellow crag
random sleet
#

the solution to the screen real estate issue

#

as outlined above

#

actually im a bit curious
if you have the garden opened and something attempts to put cards into your hand, what happens?

#

i cant think of what would do that in vanilla though, since i assume you couldnt cryptid probably?

random sleet
#

whats the visual look like though? does it toggle the card area back?

native osprey
#

clicked to add an ace from a mega standard pack and got this error, any idea how I should fix it?

maiden phoenix
zealous glen
#

Got permission to use the artwork and concept!

#

Wild Draw Four!

maiden phoenix
#

Kinda sad the +4 hides the J

#

sick art tho

zealous glen
#

First I'm trying to get permission to edit some pixels which I suspect are wrong

zealous glen
#

But the bottom of the J has a darker shading

frosty dock
#

+OKER

maiden phoenix
#

+OKER

frosty dock
#

__+__OKER

#

±OKER

worldly sapphire
#

just got an idea for a joker

Name: The Chosen Card
Description: The First card in your hand gives +200 Chips and +100 mult in the first round

zealous glen
#

Actually I think I have one (pair of) wrong pixel(s) myself

maiden phoenix
#

Yea left K is missing one, the J feels wider than the other letters

zealous glen
zealous glen
maiden phoenix
#

Meant this pixel

#

Overall looks more readable than the previous version 👍

zealous glen
maiden phoenix
#

Nvm

zealous glen
#

In the Joker Joker, one pixel of the bottom right K is covered by the Joker

#

Some other Jokers, like Chaos the Clown, also cover it, but others like Juggler don't

odd dock
#

also if you're editing it maybe do like akai and reduce contrast + increase brightness

#

-20 and +15

zealous glen
#

Also the extra draw gets carried over to the next round and/or pack. Not sure how I feel about that

zealous glen
odd dock
#

i've been doing the same thing every now and then for recolors when getting the colors right is too much hassle lol

zealous glen
#

(besides flattening it)

odd dock
#

not sure, let me see

#

i'm guessing you can select multiple layers though

zealous glen
odd dock
#

fair

zealous glen
#

I do kinda like an increased contrast and increased brightness version though

odd dock
#

just hold and drag over the layers

zealous glen
odd dock
#

strange

zealous glen
odd dock
#

oh that seems to be a preview issue

#

i was testing with 2 layers directly on top of each other so i didn't notice

zealous glen
zealous glen
odd dock
#

cryptid decks balatrojoker

#

i didn't even read what they did

zealous glen
#

Did you make the artwork?

odd dock
#

recolors my beloved <3

zealous glen
#

Though it looks more like UNO cards but less like suits

#

I think if I were to recolor I'd make it match the suit colors more closely instead

#

But for now I'll keep the original (slightly edited by me)

cosmic kernel
zealous glen
odd dock
cosmic kernel
#

Cute! Thank you brotherman

zealous glen
maiden phoenix
#

I was already familiar with how consumables worked thanks to Oddities, but I made something simple to test how it works again with SMODS 1.0

zealous glen
#

Did you use the built-in consumeable API?

maiden phoenix
#

Yes

#

If you mean SMODS.Consumable

worldly sapphire
#

is there a way i can add colors to choose in the description?

#

like add new colors

odd dock
#

isn't it just like G.C.YOURCOLORHERE = HEX('000000')

worldly sapphire
#

let me test

frosty dock
#

there's another function loc_colour for those

odd dock
#

oh i see

wintry solar
#

aure, if I'm adding UI collection stuff for paginated editions, which file should I be placing the functions in?

frosty dock
#

if it's a full rewrite of the function, probably api_hooks.lua as to not clutter game_object.lua too much

worldly sapphire
#

so, how do i add new colors?

wintry solar
#

sweet

zealous glen
zealous glen
zealous glen
#

Kinda, I don’t remember if you need a hook but if you do you’d need to hook it

zealous glen
#

I suggest adding an entry for you mod and inside that entry adding your colors

#

But you could add to one of the miscellaneous categories

worldly sapphire
zealous glen
#

Look at SO_2

worldly sapphire
#

yes

#

i'm here

#

i just needed to see how other mods did

worldly sapphire
#

now i'm wondering, is there a way to create a color that changes colors like the edition colours?

zealous glen
#

What you do is that you hook one of the update functions, I think Game.update, then you define the color depending on the timer

#

@worldly sapphire I can get the code in like 30 minutes or so when I get back home

worldly sapphire
#

alright

zealous glen
#

How do you want the color to change?

worldly sapphire
#

like the edition one

#

smooth

zealous glen
worldly sapphire
#

from color to color. you mean?

zealous glen
#

Imagine trying to animate a rock moving. It can teleport from A to B. It can move in a straight line. It can move in an arc. It can move in a straight line, but start fast, slow down, then speed up again.

#

Some of these are more realistic than others

proud cypress
#

any examples on how to save new data into the run?

zealous glen
proud cypress
#

I got a list of jokers I wanna be run dependent, meaning every run they need to load and save

#

like the run save data

zealous glen
proud cypress
#

alright I'll take a look there

#

I'm trying to follow the 'Play hand' functionality

#

thanks

worldly sapphire
#

@zealous glen so.... about the color changing colours?

zealous glen
#

The game saves information automatically

#

But I don’t know what you want to do so I can’t provide better advice

zealous glen
proud cypress
zealous glen
#

Specifically the four suit colors, whether standard or high-contrast

proud cypress
#

so I got some copy of G.P_CENTER_POOLS.Joker that keeps track of what was discovered

zealous glen
proud cypress
#

after you buy a joker it would not appear in the shop anymore, even if you sell it

#

and you can buy it back into the shop pool

zealous glen
#

I believe you don't need to save anything externally

#

just set yes_pool_flag or no_pool_flag as appropriate

#

Specifically, make a lovely patch to not set it back on after selling a Joker

#

Maybe you need to change how Showman works since I believe it overrides the flags, though presumably not Cavendish, so Idk the exact logic

proud cypress
#

I mean I already got all the other functionality working, but I am just missing savingg the state of what jokers were found

zealous glen
worldly sapphire
#

and where do i find it?

zealous glen
#

so understand what the code does and modify it according to what you want it to do

zealous glen
worldly sapphire
#

idk where it is :/

zealous glen
zealous glen
worldly sapphire
#

the code. i dont know in what file he is, i just want to see it better

zealous glen
#

It's my code, inspired by akai's

proud cypress
worldly sapphire
#

mb

zealous glen
#

It's in Game.update

#

Game.update is called every frame AFAIK

worldly sapphire
zealous glen
#

What's really important here is that each of the three color channels are set to some number

#

and those number depend on the current time

zealous glen
worldly sapphire
#

so do i just copy and use it as base?

zealous glen
worldly sapphire
#
G.C.ADVANCEDTECH[1] = 0.7+0.2*(1+math.sin(G.TIMERS.REAL*1.5 + 0))
G.C.ADVANCEDTECH[3] = 0.7+0.2*(1+math.sin(G.TIMERS.REAL*1.5 + 3))
G.C.ADVANCEDTECH[2] = 0.7+0.2*(1+math.sin(G.TIMERS.REAL*1.5 + 6))```
#

this is how my code is, idk what to do next :/

#

i tried changing some values

#

but the color changed just a bit

#

and the color doesn't change to another

zealous glen
worldly sapphire
#

nope

zealous glen
#

I changed it from a linear change to an exponential one. But it feels a bit too fast.

zealous glen
#

actually the English article is better

worldly sapphire
#

oh man

#

math 😬

zealous glen
zealous glen
worldly sapphire
#

i changed numbers, and changed numbers, still, the color doesn't change and idk what i need to do 😔

zealous glen
#

I think it's easier if you interpolate between two colors

worldly sapphire
#

that's what i'm trying to do

#

just 2 colors

#

how do i do with 2 colors? do i delete the 3rd line?

zealous glen
#

You can change the red, green, and blue values of colors 1 and 2 to match the ones you want to see it

#

If you just press play on p, you'll see it change linearly

worldly sapphire
#

just saw it

#

i got the first color

#

but how do i do the second one?

#

i'm still puzzled

zealous glen
worldly sapphire
#

i'm trying to make a joker get +5 mult and +10 chips every hand played

#

is this hard?

zealous glen
#

No

night pagoda
#

Can this be used to remove the object from the pools?

#

not sure what this description here even means

random sleet
#

oh wait fr? that's in the game?

frosty dock
#

it's a bit of a placeholder tbh

#

it's for get_current_pool

#

So things like enhancement_gate but without adding a bunch of different flags

night pagoda
#

any examples of how to use this? (if it works at this moment)

frosty dock
#
add_to_pool = function(self)
  return { add = true, allow_repeats = true }
end

something like this if I recall correctly. allow_repeats will also allow the card to appear if one already exists

maiden phoenix
#

I should rethink how I name my vars

zealous glen
random sleet
#

đŸ«„

night pagoda
#

Is it possible to add custom localization pieces with translations, similarly to joker's localization in 1.0?

#

I have a localization file that stores all jokers, but I want to add other non-joker things the same way in the same file, but not sure what to use to "unpack" tables into something useable

mellow crag
night pagoda
#

Mainly need that for the things like eval messages

zealous glen
#

I mean worst-case you can manually add to the table, no?

frosty dock
#
function SMODS.current_mod.process_loc_text()
 SMODS.process_loc_text(G.localization.whatever, ...)
end
night pagoda
#

awesome, thanks!

frosty dock
#

np

cosmic kernel
#

Hello modding Devs,
I have a question, which file should i look inside if I want to identify the current equipped jokers/ bought vouchers?
I need a live identification, my humble guess is the save file but i'm not sure if the game saves the list live or only when an overwrite is done.
Thank youu

zealous glen
#

There’s a function if you want to find a Joker by name

cosmic kernel
#

Let me explain more so you can understrand what i'm trying to do.
I need an external tool to check the Joker card area and display ( somewhere else ) the current Jokers LIVE with the full description.

#

I just want to know where to start

shell timber
#

is this for a stream overlay?

cosmic kernel
#

in order to find

  1. where the list is updated at all times
  2. the library of joker to display it somewhere else ( this sounds easier to do )
cosmic kernel
#

not sure if a stream overlay has been done but I know the twitch extension doesn't exist

shell timber
#

you can probably make a mod send a http request every second or so

#

(probably definitely a bad idea)

random sleet
#

G.jokers.cards has the jokers

cosmic kernel
#

so if i keep reading it I will be able to retrive the full list of joker the player have ?

random sleet
#

yah

#

its just ... where they are

#

idk whats so mysterious

cosmic kernel
#

Ah context : I'm still learning !

random sleet
#

i forget where voucher stuff is

quasi jetty
#

It's G.GAME.used_vouchers

random sleet
#

based reverie dev

cosmic kernel
#

Amazing ♄
Thank you ! I'll be back with more questions !

random sleet
#

is that a threat

cosmic kernel
#

Indeed it is

random sleet
#

aight bet

crisp coral
#

balatro of isaac when

#

important question

random sleet
#

never

crisp coral
#

thabk you for your answer

night pagoda
#

(results in empty message)

frosty dock
#

that's not the arguments it takes

#

it needs to know where to put it

frosty dock
#

is it fine to just say you can't put single mod files at top level, or do I need to come up with a different system

night pagoda
zealous glen
night pagoda
#

yeah, what's about that?

#

I have divisions too

odd dock
mellow sable
odd dock
#

real

frosty dock
#

what if your entry point is like Mods/my_mod/core/my_mod.lua

#

wtf, why is love.event.quit('restart') not working

#

nvm i just didn't kill the threads

#

it's still being jank and just crashing on load tho

#

looks like lovely also isn't re-evaluating ignore files when restarted this way

gaunt thistle
#

uhhhhh

#

yeah, it depends on how you're restarting things.

#

lovely requires the process to be completely killed OR modules to be unloaded and reloaded.

frosty dock
#

love.event.quit("restart") shuts down the main lua state instance, but not the process

gaunt thistle
#

hmm yeah, that's unfortunate

frosty dock
#

the main source of the crashing seems to be that the lovely module isn't found

lament fjord
#

I'm looking to investigate a performance issue, suggestions on how to look into that?

frosty dock
#

that's a little vague, don't you think?

frosty dock
hidden cargo
#

what does the events system do ? is there a modding guide 101

frosty dock
#

not a complete one, to say the least

hidden cargo
#

no i want one for the internal workings of blaatro

frosty dock
#

it's most useful to know you can just extract the game executable with 7-zip to inspect the game's code

hidden cargo
#

yea i know but i am not smart enough to read and them....

#

or maybe i am just lazy

frosty dock
#

I won't judge, but giving a complete summary of the inner workings of Balatro does not only go beyond the time I have available to me, it would also include a questionable amount of redistributed code

#

if you have a more specific question, I can probably give a reasonable answer though

hidden cargo
#

i am working on the state system and the E_MANAGER.add_event thing, what does the E_MANAGER do ?

frosty dock
#

engine/event.lua has less than 200 lines of code

mellow sable
#

it basically queues things like animations

frosty dock
#

just go read it

mellow sable
#

for example when the game calculates a score, it queues all of the events right when you play a hand, and then the event manager plays out all of the animations

hidden cargo
#

ill try to talk about what i have been trying to figure out, so function with dt as arguments such as update hand played are functions that got called every frame ?

and then they trigger change in the global state, and a loop is watching the change in state to fire off some other function ?

is that true ?

#

then why do we need events ?

#

or maybe i am way off and i need to know where to start reading ?

frosty dock
#

an important use in-game is timing events correctly depending on the game speed and acceleration

#

so delaying certain things asynchronously

hidden cargo
#

add_event must be placed inside if not G.STATE_COMPLETE or else it is gonna get queue every frame

zealous glen
frosty dock
#

events are usually queued outside of update functions

zealous glen
#

You can probably get an idea of how they work elsewhere

zealous glen
wooden nexus
random sleet
austere schooner
#

what do we do when we have enough consumables that it goes off screen

random sleet
#

stamps page btw

#

shoutouts to feder for being based

wooden nexus
random sleet
#

feder has a thing in the works that separates modded consumables to their own page

wooden nexus
#

cool

#

But yeah, getting stuff ready for Ortalab

#

hence the 3 consumables

#

Just me adding colors, 3 consumable tabs, and 3 pages of jokers, that's at 1100 lines of code

#

and mind you that's EXCLUDING:

Effect Text
the actual effects
about 7/10th of the actual cards left

random sleet
#

someone give me a joker to make a stamp of im bored

edgy reef
#

banana

rough furnace
#

Wee

random sleet
#

aight bet

#

not sure for hiker but im thinkin s&b would be red seal for jokers (once joker retrigger api finalizes), and banana would give some Mult but the stamp has a chance to be lost at end of round :) just like a real banana

near ivy
random sleet
#

scaling stamp would be strange

#

i actually had the thought that it would give permabonus chips to a card held in hand at end of round

random sleet
#

why would i put a picture of you in my mod

mellow sable
#

true

near ivy
#

could make the effect prevent you from making one slip too late so it wouldn't ever be three strikes for you /j

random sleet
#

i was only looking for one

#

sorry

#

wanted to have 10 total

near ivy
#

okay but srsly you could make a baseball stamp some bonus for jokers of the same rarity as the joker with the stamp

#

would be cool if you ever make more of them

crisp coral
wooden nexus
#

15/20 Pages (+1)

hidden cargo
#

i see that game.update has been changed to take 2 argument in main.lua by steamodded ? why ? and if i wantto add something should i use Game.update(dt) or Game.updae(arg298_0, arg 298_1)

zealous glen
#

(I do want to make Stickers which can stack, mostly as a visual cue for Hiker-like effects so players don’t need to individually check cards)

#

I wonder how does S&B stamp looks like with 2x2 eyes

random sleet
zealous glen
#

hmmm

mellow crag
#

I love this

zealous glen
#

Autumn stays winning

remote coral
#

Hell yeah

remote coral
remote coral
zealous glen
#

That wouldn’t work with modded Jokers I believe

crisp coral
#

that is a very hardcode-y effect

zealous glen
#

Well, with the Hiker API it could work with those effects

#

But base game Jokers don’t work with those effects

#

Unless Hiker API changed vanilla Jokers to work with them đŸ€”

frosty dock
hidden cargo
#

is there a way to get launch parameters ?

#

using steamodded not lovely

frosty dock
#

don't expect it to be complete

#

docs are unfinished by all means

#

please do ask here if questions come up

#

it's great to have some mods around that are up to date with 1.0, but I think it's not something everyone should do just yet - I'm definitely not fully done with breaking changes

#

nah it's fine if you play around with it and report stuff back to me, just don't go around updating everyone's mods, as things are sure to break

#

I'm not planning on super huge breaking changes anymore, but at least the arguments on some API functions will be adjusted for consistency

#

mostly I just wanna reserve the right to change anything as to not establish something that will be a footgun long term

#

yeah, I've done most of the work on the 1.0 rewrite

crisp coral
#

is G.UIDEF.view_deck unchanged now?

frosty dock
crisp coral
#

or does it not show in the lovely dump- ah

frosty dock
#

regex patches were too expensive, so I fully overwrote it

zealous glen
#

Header

crisp coral
#

okay found it

frosty dock
zealous glen
#

Implicitly

#

Compare different version headers

zealous glen
frosty dock
#

it's a pretty simple mechanism

#

it just looks for SMODS.INIT in the file contents

zealous glen
#

Ah did you change that?

frosty dock
#

I had an idea to make the version field mandatory but decided against it

zealous glen
#

I see

#

That’s alpha for you

frosty dock
frosty dock
zealous glen
#

I didn’t use 1.0 but I saw versioning was working correctly so I assumed that’s how you did

#

I had also checked 1.0 mods and I saw some of the optional entries

crisp coral
#

apart from completely overriding it, were there any more changes?

zealous glen
#

But I thought they were mandatory

#

Like required version

frosty dock
#

not sure what the use for that would be tbh

frosty dock
zealous glen
#

Editor’s note: “someone else” can include “past self”

crisp coral
#

weh

zealous glen
#

A small fix the size of a big fix

crisp coral
#

i have to manually compare my view_graveyard function now guh

frosty dock
#

you have the old wiki

crisp coral
#

yugioh is absolutely not the only card game with a graveyard gimmick

frosty dock
#

the wiki pages that aren't numbered are unchanged and for 0.9.8

#

the numbered ones are for 1.0

#

I haven't removed those because 0.9.8 is still latest stable

crisp coral
#

hm

#

aure are you still taking feature suggestions

zealous glen
frosty dock
crisp coral
#

okay cool

frosty dock
#

read the wiki pages for 1.0, specifically 03 and 05

#

In general it looks like SMODS.Atlas { key = 'key', ... }

maiden phoenix
#

There's a few examples that uses SMODS.Atlas in the example_mods of the Steamodded repo too

frosty dock
#

I'm still trying to figure out how to link everything together and what information goes where haha

#

I'll probably end up linking to or referencing the example mods

#

no

#

average dev experience

#

Decks are Backs, as they are internally

#

consistency and whatnot

#

I put that in the migration guide, didn't I?

#

wait actually SMODS.Backs doesn't exist

#

all centers share a common table

crisp coral
#

quit is not reload anymore... i feel scammed

frosty dock
#

SMODS.Centers

frosty dock
#

only triggers when you disable or enable a non-lovely mod

#

restarts the game fully when you disable or enable a lovely mod because duh

#

yeah yeah yeah

#

0.9.8 and 1.0 aren't alike in a lot of ways

#

I suggest reading the code for things I haven't documented yet

crisp coral
#

okay, what replaced end_calculate_context

frosty dock
#

In this case SMODS.Card is moved to SMODS.Suit and SMODS.Rank, with the suit list being located at SMODS.Suit.obj_buffer

frosty dock
#

joker

#

_

#

main

#

joker_main

crisp coral
#

i'm going to explode this does not work

#

unless another thing is changed which i will absolutely cry

frosty dock
#

I'll need more context to evaluate that

crisp coral
#

i have figured it out

frosty dock
#

hm?

crisp coral
#

i will still explode

frosty dock
#

spare me

crisp coral
#

did not notice everything is now self, card, ...

frosty dock
#

SMODS.Suits[xy]...

#

suit list just holds the keys

#

suits holds the actual objects

#

there's some trickery with thunk's inconsistencies where the suit list sometimes needs to be reversed to not change vanilla behavior

#

but that's a me problem

#

yeah, in fact that's the only one that's kept in sorted order instead of in order of registration

#

that was all due to an extremely jank implementation of the view deck logic

#

which was rewritten, so this is redundant and was removed

crisp coral
#

hh i hate this

frosty dock
#

if you don't care about order, yeah. you can however just index ranks by the value in the list, as it strictly refers to the key and nothing else, where if referred to the shorthand in the deck preview before

crisp coral
#

i took a break from modding for like a week and now i feel like a beginner

frosty dock
#

can't use ipairs on SMODS.Ranks, that will silently do nothing

#

ipairs only does sequential numeric indices

#

pairs

#

instead of ipairs

long gust
crisp coral
#

thumbs

#

postmortal has zero art so far so all you'll be seeing is weezer

long gust
#

ooh wee ooh i look just like jimbo joker

frosty dock
#

disabling/enabling mods in the mods menu will

rough furnace
#

If you reload with r in the crash handler, it should reload mods

#

But something is funky with lovely

frosty dock
#

yep it's scuffed

regal shoal
#

Is there any easy way to add a badge to a playing card ? There is a 'create_badge' func but I don't know where to call it for it to work

#

I'm trying to add the rarity badge on playing cards for my Joker Deck mod

frosty dock
#

G.UIDEF.card_h_popup is the function you need

regal shoal
#

I tried to hooked it but I'm struggling to make it work . . . At least i'm on the right path, ty !

long ruin
#

after SMODS.Joker:take_ownership('joker', { what do i need to do ?

spare orchid
#

Finally, stone cards actually works

crisp coral
#

wtf python balatro

spare orchid
long ruin
#

also, i can do it with the 0.9.8 steamodded ?

spare orchid
#

i posted it a few days ago

crisp coral
#

yeah you can take_ownership in 0.9.8

#

but never used it so shrug

long ruin
#

yeah but with the 1.0 i need to change all of the script

spare orchid
#

this works too, i had a few errors with the boss blinds

mellow crag
spare orchid
#

i just finished wild and stone enhancements, and a few editions too

mellow crag
spare orchid
#

road to 1k of lines baby

#

and probably 2k

crisp coral
#

localthunk speech bubble

spare orchid
#

|| also, if you see an error tell me pls ||

spare orchid
#

yup i know where is that error

#

also i need to clean a lot lmao

mellow crag
#

Should I actually port Ore of a Kind to steamodded 1.0?

quasi jetty
mellow crag
#

I like it

slow ocean
mellow crag
unreal nacelle
# mellow crag

Ok, where is the mod for this? It has caught my interest immediately with what an 'Ore of a Kind' is and what Seed cards are

mellow crag
#

the tag is for Jimbo's Garden, the balatro farming mod

unreal nacelle
#

Ah, ok

#

Then, if anything, that makes me even more curious about it, since I really want to try out that Garden mod (and even the Ore of a Kind ioke mod, if it does get made), due to how unique they seem

spare orchid
#

@scarlet merlin i implemented the "scoring hand" using your score hand chips function as reference to get the editions correctly, because if there was a pair but 5 cards in hand played the program was counting all the 5 foil cards

frosty dock
#

are we being too graceful with this one? should I kill off the loading of any lone top-level files?

worldly sapphire
frosty dock
#

tecnology, ah yes

worldly sapphire
#

native language got me

#

i wrote tec instead of tech

#

lmao

#

funny

frosty dock
#

lol

worldly sapphire
#

i will leave it like this

#

it looks unique

zealous glen
frosty dock
#

probably just replicating plasma deck's behavior?

zealous glen
zealous glen
#

That way both the deck and the Joker work in the same moment

#

And they don’t stack

frosty dock
zealous glen
frosty dock
frosty dock
zealous glen
frosty dock
#

that's alright imo

zealous glen
#

What is?

frosty dock
#

doing it when the deck effect would trigger

#

sync catalyst explicitly says when this joker is triggered

#

it also just doesn't do the UI colors because you're likely playing cryptid without animations anyway

zealous glen
#

My Joker becomes active after using three different Planets

#

And becomes inactive at the end of the round

worldly sapphire
#

i don't even know how to use lovely

#

lol

zealous glen
#

I did mine with a lovely patch

frosty dock
zealous glen
zealous glen
worldly sapphire
#

here is the art of the joker btw

frosty dock
#

you disable one, they're all gone

#

i can't be bothered dealing with a settings file and i need an ignorefile anyways

mellow sable
frosty dock
#

i think of it as a "no one would care, so why do it" sort of thing

zealous glen
#

Or don’t

#

I think it’d be weirder to not have an animation

frosty dock
#

thoughts on just banning it?

wintry solar
zealous glen
frosty dock
#

I'd adjust the example mods and explain accordingly in docs, of course