#đŸ’»ăƒ»modding-dev

1 messages · Page 25 of 1

frosty dock
#

but sure, it's pretty workable

#

^

gilded narwhal
#

OH I see what you meant by this now

#

This i mean

#

Different crash this time 👍

#

Although now I know steamodded is on 1.0 now

mellow sable
#

delete your settings.jkr file?

#

wait nvm

#

I know what this is

#

verify game integrity

undone ingot
#

bro

#

whats with all the elif loops 😭

frosty dock
#

did you find calculate_joker hell?

gilded narwhal
frosty dock
#

should be good

gilded narwhal
#

Because I got the same crash after I did so 😭

frosty dock
#

just to confirm you closed out of the game completely and didn't just press R?

gilded narwhal
#

Yup

#

I'll try again just for redundancy

#

Yup same thing

undone ingot
#

wait is it faster to loop elif over all jokers or to create an array and reference it

frosty dock
gilded narwhal
#

Steamodded

frosty dock
gilded narwhal
frosty dock
#

doing what steamodded does and just reference a function on the center object is faster though

undone ingot
#

got it, tyty

frosty dock
#

Delete Balatro.exe and verify game files again

gilded narwhal
#

Just .exe?

frosty dock
#

yeah

gilded narwhal
#

Different crash

#

Although I think I've seen this before

frosty dock
#

that's progress

#

see if it loads without cryptid

gilded narwhal
#

Yup

#

It does

frosty dock
#

then just get the latest commit for cryptid as well

gilded narwhal
#

Still crashes

frosty dock
#

@mellow sable a

gilded narwhal
#

I figured it out

#

I needed talisman

worldly sapphire
#

Alien Cat - Makes Mult Cards act like Steel Cards, But they give additional 10 mult.

#

its possible to make this work lol?

mellow sable
zealous glen
#

@worldly sapphire

leaden belfry
#

so, what's the prefix of random planet cards? by my understand of the source it's like Planetpri1 when from that tarot and in ante 1, and should be bugged with the seed that bug all prefix 10, but it seems normal.

worldly sapphire
#

fascinating đŸ€©

mellow sable
zealous glen
mellow sable
#

if you don't have Flush Five unlocked you won't even notice the bug because it'll always resample

leaden belfry
#

hmm, so it then moves to Planetpri1_resample* after bugged then bahaves like normal

#

that explains

#

yes

worldly sapphire
#

looks really cool in game ngl

zealous glen
worldly sapphire
#

like a joker that does this

#

i mean

#

i found that baron and shoot the moon

#

does this with kings and queens

zealous glen
leaden belfry
#

this is so stupid

mellow sable
#

soul RNG is funny

leaden belfry
#

here we come the most stupid bugged seed (maybe)

gilded narwhal
#

Yo I'm assuming that the fact that I just beat gold stake for the first time during modded means that modding disables achievements

leaden belfry
#

intentional otherwise you can get them easily by unbalanced mods

gilded narwhal
#

Yeah

#

It's a shame tho because I didn't use mods to get it

#

This was the run

#

Ended up getting hologram to like 11x

wintry solar
#
for k,v in pairs(G.P_CENTERS[_c.key].config) do
                sendDebugMessage(k..": "..tostring(v))
                table.insert(loc_vars, v)
            end```
Trying to get dynamic descriptions working in editions, and this config table is not in the same order as how I define it, any ideas?
frosty dock
wintry solar
#

if I define {chips, mult, x_mult} to use for iteration here will that maintain order?

frosty dock
#

yeah, or you just manually use them in that order

zealous glen
#

So running ipairs on {chips, chips = 1, mult, mult = 1} gives you 1, chips, then 2, mult, and then you can use the value as the key to the table

leaden belfry
#

the wheel of nope

#

(never means never unless enough oops 6)

worldly sapphire
#

i tried using shoot the moon as base but the game crashes

SMODS.Jokers.j_aliencat.calculate = function(self, context)
            if self.ability.name == 'Alien Cat' and
                        context.other_card:get_id() == G.P_CENTERS.m_mult then
                        if context.other_card.debuff then
                            return {
                                message = localize('k_debuffed'),
                                colour = G.C.RED,
                                card = self,
                            }
                        else
                            return {
                                h_mult = 13,
                                card = self
                            }
                        end
                    end
            end```
gilded narwhal
#

Yo what should the joker unlocks for black and blue stakes be

leaden belfry
worldly sapphire
#

I will test this tomorrow

#

I'm not feeling good

random sleet
wintry solar
#

how do jokers like Ceremonial Dagger remember their mult value between saves?

leaden belfry
#

the value is stored in the joker's config

wooden nexus
#

New edition or something?

tawny perch
wooden nexus
#

oh

#

Dang, thought It was editions

random sleet
#

yeah no it's just custom center sprites

#

same with the minor arcana

#

it supports bonus, mult, and wild cards (the rest of the enhancements change the card's material enough that i'm not worried about it)

worthy depot
#

The yellowed playing cards high key look nice. I really like them. Autumn your suits also remind me of playing cards from something called "Heckadeck" for some reason.

wooden nexus
#

oh okay

random sleet
#

the yellowed playing cards are minor arcana, the ones with the spirograph watermark are homestuck's aspects

#

so the minor arcana are based on tarot cards' visuals

mellow crag
#

morning!

random sleet
#

mornings!!!

mellow crag
#

what have you been doing while i was sleping

random sleet
#

less busy day

mellow crag
#

oh nice

#

i like that

#

wait is that balatrostuck suits?

random sleet
#

balatrostruck :)

#

they'll be integrated into thac as balatrostuck support

#

for the time being probably disabled by default until i can actually code their flush effects, yk

#

a look under the hood so-to-speak: the custom centers

mellow crag
#

i like how you made the center change

random sleet
#

thank you balatroheart

edgy reef
#

Huh, that wasn't too difficult to set up.

random sleet
#

CURSES LETS GOOOO

#

man i need to work faster yall are takin all the cool ideas

edgy reef
#

Steamodded 1.0 is so peak (this is half of the backend, not much else than this).

mellow crag
edgy reef
#

Idk yet xdd

mellow crag
#

that's what I also did for the stamps for Autumn

edgy reef
#

Just randomly decided "let's make a mod to test out custom objects extending GameObject"

mellow crag
#

XD makes sense

#

i might try again to make something realy cool that I always wanted

edgy reef
mellow crag
random sleet
#

that would be cool as a boss blind. sorta anti-bell

random sleet
#

my brain hurts

#

doing a lot of different things was really cool until everything changed

edgy reef
#

Consumables have been nope 'd!

#

(Yes this includes when they're in packs)

remote coral
#

So how do you remove it

hallow forge
#

"That's the neat part..."

remote coral
#

Or what if there was a way to remove them by removing all enhancements (and buffs like Hiker Chips) on a card

Forcing you to reset that card essentially

mellow crag
#

Okay I think I can show this

#

but it's very very VERY WIP

hallow forge
#

i think u need another "very"

remote coral
mellow crag
#

It kinda works

remote coral
mellow crag
#

I still need to fix the pages thing

#

the other pages just appear blank for now

#

but other than that, it works perfectly

remote coral
#

Yeah that’s got you in a pinch

queen scroll
hallow forge
#

I think they were talking about the "enhancement"

queen scroll
queen scroll
hallow forge
#

fair

random sleet
#

this is so fun to mess with

mellow crag
#

I love the cards though

random sleet
#

true but i also kindof dont care

#

though i do at least a little bit wonder if it'd wind up possible to have the "watermark" be its own sprite and have the game apply it, but i'm using a nonstandard blend mode in GIMP to get the results i like so idk

#

("linear burn", if that means anything to anyone)

#

this is certainly more a "cool novelty that is more than ok to be lost in crossmod interaction" feature though

#

it's implemented in such a way that nothing should break if an enhancement it doesn't recognize is used

remote coral
random sleet
#

yep! the minor arcana are blue (cups), red (swords), green (wands), and yellow (coins) so i made their wild card sprite match

#

it still counts as all suits though, not just those among that set, but it's just a little visual touch

remote coral
#

And that’s only if you wild an arcana suit

#

That you get that visual

random sleet
#

yeah, those top ones are used for minor arcana

#

the missing spots are just because it wouldn't make sense for the minor arcana centers to override the "material" enhancements

#

so they look the same as any other

#

(lucky would be nice to have look different but that is beyond my art capacities lol)

mellow crag
random sleet
#

minor arcana
homestuck's aspects
undecided; was the original design for the aspects before realizing spirograph made more sense- preserved because it still looks cool

royal ether
#

maybe you can make a new layer (front center back) but that sounds like way too much effort

#

also hi chat

random sleet
#

actually i think i know how i could do it in terms of rendering a new thing on the card i just dont know how to do the blending the way i want it

#

and i dont know if i care enough to do the legwork involved also

#

so actually i guess im agreeing with you nvm sorry

#

also hi balamodbalatro

royal ether
#

i would say im gonna do something similar but i have so much on my plate with super auto balatro, and im planning on doing another project unrelated to balatro when i get back too

#

hi autumnmood

#

i might end up making it anyways for super auto balstro though...

random sleet
#

hell yeah

#

funny poker game as the smash bros of roguelikes

#

thanks modders

royal ether
#

and homestuck

random sleet
#

homestuck is a roguelike

royal ether
#

susge

random sleet
#

i mean its eaten enough of my time to count as one LOL im on like pg4489 now

royal ether
#

4489... wtf...

#

how long is a page

random sleet
#

depends

#

sometimes its a whole mini-rpg sometimes its just a single image

royal ether
#

o interesting

random sleet
#

multimedia to the max! or something like that that actually makes sense

#

but this isn't very moddevvy so i'll attempt to narratively abandon this narrative here

royal ether
#

yea multimedia if thats what its called is really cool to me

#

tru

#

unless... ?

#

me when my joker procs so i have to do a puzzle to get mult

shell timber
#

Complicated Joker

#

X5 mult if played hand fulfills the requirements outlined in attached PDF

royal ether
#

password game but you have to do it with your hand

random sleet
#

i mean i guess it is tangentially related to what i've been working on today which was adding 12 more suits based on the Aspects of homestuck to thac (which were previously in balatrostruck but im putting all my eggs in one basket now) (they'll probably be a cool compat feature for balatrostuck and make it so when you play a flush of an aspect you get aligned with that aspect or something) (and maybe the tarot that converts cards to aspect suits is dependant on your current aspect)

royal ether
#

very epic

random sleet
#

but since i dont have balatrostuck in front of me to program any of that i do not yet have anything of the sort implemented

zealous glen
zealous glen
worthy depot
#

Well, boons with random curses specifically.

maiden phoenix
#

Everyone's cursing balatro

worthy depot
#

Hey Jimbo, fu-

zealous glen
#

My initial idea was to just introduce curses that make the game harder with no explicit benefit (you’re forced to be cursed)

#

Although some curses are double-edged

worthy depot
zealous glen
#

You keep getting curse packs

#

After beating a boss blind

worthy depot
#

Hmmm. It'll be quite fun for a challenge mode and I don't imagine it'll be very hard it implement

zealous glen
#

I did start implementing it, but I paused because EnhanceAPI seemed a bit unstable still

#

I think Steamodded 1.0 will have built-in support for a lot of features I want to implement so that’ll make it easier

worthy depot
#

How's that going along? (I don't know who's primarily working on 1.0)

zealous glen
#

I think Enhancement support just started, but otherwise other things seem to be going well

#

But I’ve not been paying attention too closely

#

Seeing some recent updates by aure, I’m a bit inclined to start porting my mod myself

frosty dock
#

I've started writing up docs, enhancements and editions are currently in the works too

#

other than that I still have something planned with the sound API, and then we might be good for a first release

#

if a lovely stable release takes a bit longer, booster packs might also be added to 1.0, but I could see it as a feature in 1.1 too

zealous glen
tawny perch
random sleet
#

house rules is myst's mod

zealous glen
#

No I think she has a mod called house rules

tawny perch
#

well

zealous glen
#

But AFAIK it works differently

tawny perch
#

didnt know that

#

:P

#

ill check that mod out then

crisp coral
#

from what you've described it feels the same

random sleet
#

house rule that enables a random house rule after every boss blind

zealous glen
crisp coral
#

yes

zealous glen
#

So it’s different

#

I explained how it works currently just below that message

crisp coral
#

damb

zealous glen
#

Well, how it would work

crisp coral
#

oh after beating a blind

#

so limbus mirror dungeon

zealous glen
#

More like the level 6 in Dicey Dungeons

#

Or whatever it was called

#

It doesn’t make sense for it to be a House Rule when an effect is like “add n Stone Cards to your deck”

#

or “turn n cards in your deck into Blank Cards”

#

But in any case I think disenchantments are more interesting by themselves and Curses are just an easy way to add them to runs.

#

Something more like Slay the Spire’s “gain something but get bad cards in your deck” or Blinds that hand out Disenhancements are more interesting to me

surreal marsh
lunar patio
#

what is this sorcery 👀

royal ether
#

protip you can crop obs output to a source by rightclicking it and selecting crop to source

frosty dock
#

is this loc_txt explanation alright?

random sleet
#

back on my weird centers thing

zealous glen
#

It can’t stop winning

random sleet
#

hell if i know what i might use this for but it looks pretty slick for being something hodgepodged from vanilla assets

#

a variety pack

#

i guess if i get fancy ideas for more suits these could be neat

#

actually Stars and Moons would probably be pretty ballin on that top spacey one whatever the deck is called is it nebula i forget

frosty dock
random sleet
#

aure when/if you get around to portin' and releasin' sixsuits would you be chill if i added a thing that puts them onto that spacey bg

frosty dock
#

sounds good

random sleet
#

i think it'd look pretty sweet lemme actually do a mockup rn

#

about what they'd look like

#

man mult cards just look Rough huh

frosty dock
#

huh

#

not bad

zealous glen
#

I think it’s a bit too faint

night pagoda
#

I feel stupid: how do I do the path of the atlas declaration in the 1.0 steamodded?

random sleet
#

ingame filters do some of the heavy lifting there

night pagoda
#

if I do it the old way, it is weird af

random sleet
#

i believe that screencap is with the center at this contrast level

maiden phoenix
night pagoda
#

got it, ty!

wintry solar
random sleet
#

oh huh. maybe i did mess with the contrast too much

#

then again it's not supposed to be that striking

#

it doesn't relay gameplay information after all

#

however this is absoluting ballin' and i will take no counterpoints

zealous glen
#

Maybe if you tweak the levels of the nebula itself so the lighter parts are lighter and darker parts darker it would look better?

random sleet
#

ok but first stone card watermark

mellow crag
#

Aaaaa I’m not going to be home a lot today so I can’t work ):

zealous glen
#

Looks good but again a little bit more contrast would make it more noticeable I think

#

Also I hope I’m not being too nitpicky; I think these are awesome

random sleet
night pagoda
#

Are there any changes in the new steamodded regarding the localization values of jokers? kinda don't want to do the generate_UIBox_ability_tableref injection thing again if there's possibility

random sleet
#

why the hell were you doing that in the first place

frosty dock
#

you didn't need to do that even in 0.9.8

night pagoda
#

idk how to do it any other way?

frosty dock
#

previously there was a loc_def function

night pagoda
#

I was told to do that when I started modding lmao

frosty dock
#

modifying the function via hooks is super jank because you end up missing weird edge cases and everything winds up incompatible

#

so lovely is the only clean way

random sleet
#

and here's new nebula watermark

frosty dock
#

loc_vars works slightly differently than loc_def did before, basically you return a table that looks like

{
  vars = { var1, var2, var3 },
}
#

arguments are self, info_queue, card where self is the center and card is the card

night pagoda
#

awesome, thanks!

frosty dock
#

how does this look

maiden phoenix
#

Wait you don't need a custom atlas to load your joker sprites? Or it's just a default value?

frosty dock
#

this one's a default

maiden phoenix
#

Oh ok phew

frosty dock
#

but there's no harm in calling your custom atlas Joker, since it gets prepended with your prefix

maiden phoenix
#

I gave my jokers custom atlas and I was wondering if it was redundant, guess it wasn't

frosty dock
#

this is valid and does not override the vanilla sprites

#

but the vanilla atlas will still be used as a default

maiden phoenix
#

Ah crap it might actually be, I'll need to do some test later

frosty dock
#

this, on the other hand, would overwrite the vanilla Joker atlas

maiden phoenix
#

If I give my atlas the key "Joker" I don't need to set an atlas value for my modded jokers right?

#

Wait no you said the prefix was prepended

frosty dock
#

the default is always the vanilla atlas

#

if you give it atlas = 'Joker', it will use prefix_Joker

maiden phoenix
#

My brain is melting from my sheer stupidity

frosty dock
#

if you let it use the default, it uses Joker

#

if you give it Joker and set raw_atlas_key = true, it will also use the vanilla atlas

maiden phoenix
#

I'll just keep it how it is rn, it doesn't hurt and works fine

random sleet
#

i have gone veritably mad with power
i'll probably stop this madness soon one way or another

maiden phoenix
#

The jest is watching

frosty dock
#

oh no

#

the actual jest

night pagoda
#

do I understand correctly that I need to do function SMODS.Joker.j_my_joker.loc_vars(self, info_queue, card) with return { vars = { }, } in it to make variables for the localization?

maiden phoenix
#

The loc_vars is done inside the SMODS.Joker

zealous glen
frosty dock
zealous glen
#

I don’t want to bypass the original

#

I want to make it animate like Misprint

frosty dock
zealous glen
#

I have three different but similar consumables so I load the tooltip from one but change the value every 3 seconds

frosty dock
#
SMODS.Joker {
  -- other stuff
  loc_vars = function(self, info_queue, card)
    return { main_start = {} }
  end,
}
#

this is supported

zealous glen
#

I also have hooks to add a custom Credit tooltip (with a darker background), to add subtitles to Jokers, and to make text smaller than the game was letting me make (though in hindsight that might’ve been a skill issue)

zealous glen
frosty dock
#

uh I took this as wanting to use main_start for an animation like misprint

night pagoda
#

I'm making a custom joker creation function because I'm sick of manually typing some things with minor changes over and over again

#

like the name and key where the only difference is absence of spaces and uppercase letters

zealous glen
night pagoda
#

ughh

frosty dock
#

just do modifications on joker and pass it directly

#

SMODS.Joker(joker)

zealous glen
night pagoda
#

???

zealous glen
#

for joker in jokers do

night pagoda
#

I don't think I'll ever need to specify key that is different to the name

#

I don't want to deal with coordinates

frosty dock
#

yeah that's fine

#

I'm saying you don't need a new table

random sleet
frosty dock
#

you can do joker.name = joker.key and still pass in joker after that

zealous glen
#

I do something similar

random sleet
#

this is part of a table containing functions to handle all kinds of game object registry, separated per-type

#

for example this mess

#

not catching me typing "colour"

night pagoda
frosty dock
#

with your setup, you can't pass it to the constructor because you're making a new object that only has select fields from the object passed in

random sleet
#

actually, this doesn't input any functions. you'll wind up having to do way more hoop-jumping

frosty dock
#

if you simply modify joker before passing it to SMODS.Joker, you have no issues doing that

livid veldt
#

hey everyone, is there a guide on how to create jokers and stuff ?

worldly sapphire
#

Everytime i test it the game crashes.

SMODS.Jokers.j_aliencat.calculate = function(self, context)
            if self.ability.name == 'Alien Cat' and
            context.other_card.config.center.name=="Mult" then
                        if context.other_card.debuff then
                            return {
                                message = localize('k_debuffed'),
                                colour = G.C.RED,
                                card = self,
                            }
                        else
                            return {
                                h_mult = 13,
                                card = self
                            }
                        end
                    end
            end```
frosty dock
#

docs for 1.0 are WIP

livid veldt
#

thank you !!

frosty dock
#

I'd assume this is meant to be for context.individual on playing cards?

zealous glen
random sleet
#

he is already here

frosty dock
worldly sapphire
#

it really worked

#

but, is there a way i can also trigger the mult card that is in hand?

zealous glen
frosty dock
#

also I feel like I've said this before, but you don't need to check the joker's name

zealous glen
#

Or what you suggested

frosty dock
worldly sapphire
#

i mean't the mult card effect itself

zealous glen
#

I mean you could but adding the extra Mult to the Joker is almost equivalent

worldly sapphire
#

so, should i make the mult cards in hand give 14?

#

its probably better

night pagoda
#

What am I doing wrong? Shows ERROR in the desc

frosty dock
#

like I said, { vars = { ... } }

night pagoda
#

oops

maiden phoenix
#

Firch if you need a base to help modding I already updated my mod to the current SMODS alpha

night pagoda
#

+A mult

maiden phoenix
#

A

night pagoda
#

huhhh

#

it shows +A even if the both values are described as #1# in the localization

frosty dock
#

chat

oblique gust
frosty dock
#

for a custom get_current_pool check, how should it interact with showman?

#

as in, should it be possible for it to allow duplicates even if showman isn't present, and how?

#

i don't think it's a good idea to let each instance of such a function check for showman

random sleet
#

how is a good question but it definitely should be supported

#

i believe feder's crops would specifically want something to this effect

night pagoda
#

💀

random sleet
#

that's certainly a way to do that

frosty dock
#

i can't read

random sleet
#

yeah me neither bro its cool

frosty dock
#

i certainly can't read

#

it's dope

night pagoda
#

they're both #1# yet different

#

why??

random sleet
#

i wonder if you could just have like... "allow_duplicates" to be its own thing

frosty dock
#

could have a return value like { add = true, allow_duplicates = true }

#

if it's just a field on the center object, it's unconditional

random sleet
#

that could work. leaves open the possibility of more advanced functionality as well.

#

stuff like perhaps including stuff like enhancement_gate for the cases of suits, ranks, editions, seals, etc...
(such that each item in the pool doesn't have to iterate the deck for them)

#

although perhaps that is also a silly idea. ah well.

frosty dock
#

sure these could be added, but it's not really expandable

#

you could always set a flag when the item you're gating behind is obtained

#

this can probably do

night pagoda
#

does table.insert sorts the table in some way or something? The values are added through the loop I sent earlier but they're in a wrong order

#

..or maybe it's a pairs() thing?

lunar patio
#

if the keys are numeric and 1 indexed, as every lua array is, use ipairs

night pagoda
#

uhmmm

#

I don't get how can I get the key in the ipairs loop instead of key's value or index

frosty dock
#

ipairs is only for numeric keys

frosty dock
#

hm, I'm not sure I like the tally being there

night pagoda
#

this is the exact reason I unregister the suits in bunco

frosty dock
#

this is meant for per-deck suits

#

I'm not sure I wanna mess with RNG over this (so cards could still appear in standard packs and whatnot this way), but this looks off

#

i mean i probably could disable the suit and not display tallies for disabled suits

worldly sapphire
#

One thing i noticed about one of my jokers, it gets upgraded, but if i have a blueprint or brainstorm it will upgrade twice. Instead of copying the upgrade, the brainstorm or blueprint need to copy only the X Mult

zealous glen
#

I think Autumn realized that and I copied from it

#

So you can do

for k, v in ipairs(tab) do
    f(tab[v])
end
zealous glen
zealous glen
#

if not context.blueprint then can isolate a block that shouldn’t work with Blueprint (use any combination of ands, ors, and nesting that you want)

night pagoda
#

yeah, the loop simply doesn't even start with ipairs

#

the thing I'm trying to do basically is to add 'card.ability.extra' to every key's name in the table

oblique gust
#

just went into some issues with two different mods having jokers of the same name. im not talking about the displayed name but the ability.name

this is absolutely dangerous to give ur jokers a slug and an internal name without a more unique prefix or sum as a namespace. like make the slug j_MODID_jokername and make the name this way too since its not displayed.
its not originally mod authors' problem. its bc the vanilla game unintentionally made a bad example at this.
i can kinda see how this gon be the root cause of more reported crashes in the near future

crisp coral
#

already done in 1.0.0

oblique gust
#

oh we'll have a forced namespace?

#

or stuff like that

crisp coral
#

you can provide a prefix (or the mod will take the first 4 letters of the mod id)

frosty dock
#

prefix uniqueness is also forced

oblique gust
#

THIS is great

frosty dock
#

(I don't handle collisions for you, mods with duplicate prefixes simply won't load)

#

name isn't actually used by steamodded at all

#

I probably should remove the requirement for it to be provided, I don't think the game would complain about it being nil anywhere

#

it's just a stupid duplicate

oblique gust
#

anyway it made me hope the release day of 1.0 even worse

frosty dock
frosty dock
zealous glen
#

I literally have that in my code

night pagoda
#

didn't work for me lol

oblique gust
#

yea i know theres a preview. imma just enjoy my modpack a few days more then i'll go to 1.0

zealous glen
night pagoda
#

maybe I messed something up but I'm really close to giving up

frosty dock
#

fair

zealous glen
night pagoda
#

the loop simply didn't even start

zealous glen
night pagoda
zealous glen
#

If your keys aren't integers you have to use pairs

night pagoda
#

pairs messes up my order...

zealous glen
#

ipairs starts from 1 and goes until it can't find n+1 AFAIK

night pagoda
#

how it looks like with pairs

zealous glen
#

Those are the two options unless you manually make your own iterator

night pagoda
#

works well but in the wrong order

zealous glen
night pagoda
zealous glen
night pagoda
#

both are ipairs

#

well yeah!

#

pairs are unordered, again

zealous glen
#

And again

#

If you want to be ordered use ipairs

night pagoda
#

but I can't because ipairs doesn't work on my table again!

zealous glen
#

Change your table!

#

Again!

night pagoda
#

oh no

zealous glen
#

Or better, do it as I explained here

zealous glen
#

You can have both types of keys and ipairs ignores non-integer ones

#
vars = {'chips', chips = 45, 'mult', mult = 6, 'side', side = 'A'}
night pagoda
#

if I do both types of keys then it makes the table more difficult which is opposite of what I'm trying to do; reduce the duplicates and manual inputs for the joker initialization

#

yeah that won't do, sorry

zealous glen
#

Then learn how to make your own iterator

night pagoda
#

will try, ty

zealous glen
#

The two default options I know of in Lua are ipairs and pairs

crisp coral
#

@frosty dock can you make objects' process_loc_text load first, since The Ancestor's vars = {localize('ph_ancestor')}, is returning ERROR but works on hot reload

crisp coral
#

it can't be attached to the object itself?

frosty dock
#

no

crisp coral
#

cringe

frosty dock
#

you have do it in loc_vars

#

else it won't work with localization

#

which for 1.0 means it doesn't work at all

crisp coral
#

vars instead of loc_vars is normal for blinds

#

unless i'm misunderstanding

#

well i also have this which isn't doing shit either

#

i think the one in collections tab pulls from the vars in the center config and not loc_vars idk

frosty dock
#

hm, in that case if you want it localized, you can put it in process_loc_text or inject

crisp coral
#

putting it in SMODS.current_mod.process_loc_text() does not localize it properly either

#

hardcode time

frosty dock
#

I mean in the object's process_loc_text

crisp coral
#

that's... what i had...

frosty dock
#

like

process_loc_text = function(self)
  self.super.process_loc_text(self)
 self.vars = ...
end
crisp coral
#

hm

frosty dock
#

it doesnt work at load because it can change on language change, it's not fully static

crisp coral
#

cool, the super worked

frosty dock
#

hm deck preview is like 10 regex patches... i feel like that's too inefficent

#

I'm just gonna swap back to overwriting these fully

#

9 patches for view deck

#

like, UI_definitions.lua is a massive file

wooden nexus
#

More art development but yeah

crisp coral
#

whatever you do to view_deck will be copied back to graveyard lmao

wooden nexus
#

I'm waiting for suit additions and removal for specific decks

frosty dock
#

it doesn't even save space, it's like 200 lines for patches on 250 lines of code

#

if the vanilla function changes I'm fucked either way, so what's the point

#

in other news game_object.lua is now 2.5k lines

#

should i move hooks like that to a separate file?

zealous glen
#

What else is in the file?

frosty dock
#

API definitions

#

SMODS.Centers = {}
SMODS.Center = {
blah blah blah

zealous glen
#

I keep hooks in individual files name after the file that contains the function I’m hooking

frosty dock
#

I have lovely patch files grouped after APIs with commented function names

#

mostly I just think it's getting annoying to find the actual APIs because there's so much other code in between

#

besides, the code doesn't need to be deferred to loadAPIs

golden lake
#

whats this vars i hear of

mellow crag
frosty dock
#

uh i don't know, and I don't feel like digging into UI code to find out

mellow crag
#

makes sense XD

#

i will try to scrape something together from the handAPI

frosty dock
austere schooner
#

that is a nice looking tarot

hoary sand
#

is there anyway to mimic the effects of stone cards without like. replacing all the "m_stone"s with a custom function

maiden phoenix
frosty dock
#

i have this working two ways

#

one is should_register, it disables the suit/rank completely, removing the values from G.P_CARDS. In this case, they can't be used at all unless populated again, but will be hidden from all UI elements (this should be more graceful than complete deletion)

#

then there's also should_add_to_deck, which just removes cards from the starting deck, but they still exist, i.e. they're not hidden from the UI, can appear in standard packs, etc.

mellow crag
#

I like it

night pagoda
night pagoda
#

small joker initialization, finally

random sleet
#

especially since thac has 16 extra suits now, a way to make the UI not go bonkers would be pretty slick

wintry solar
night pagoda
#

Oooh, would be great!

#

I gave up on this exact part and started doing different things already

zealous glen
zealous glen
night pagoda
night pagoda
#

How does the Joker calculate function work in 1.0?

frosty dock
#

nothing special iirc, args are card, context

night pagoda
#

I'm getting a error regarding Jokers being nil

zealous glen
wintry solar
#
local editionMods = {'chip','mult','x_mult','card_limit'}
local editionConfig = G.P_CENTERS[_c.key].config
for k,v in ipairs(editionMods) do
    if editionConfig[v] then
        table.insert(loc_vars, editionConfig[v])
    end
end

this is what I did to get around the table being reordered

zealous glen
#

Like, if you do {card.extra.chips, card.extra.mult} they would be in the correct order

frosty dock
zealous glen
#

or whatever the 1.0 equivalent is

frosty dock
zealous glen
#

but they shouldn't be out of order if they followed the same logic as 0.9.8

night pagoda
#

yeah I do different thing that isn't something I did in 0.9.8

#

I'm trying to get rid of repeats in code

zealous glen
#

I mean, the variables are only computed during runtime, so it should be doable by just calling it inside the loc_vars equivalent

night pagoda
#

so config and loc_vars are the same most of the time and I don't see myself why I shouldn't do them at the same time

#

aside from ordering weirdness

zealous glen
#

Ah, I understand, you're procedurally generating then

night pagoda
#

yup

zealous glen
#

Then you can get the key table and order it as strings

wintry solar
night pagoda
wintry solar
#

it doesn't

zealous glen
night pagoda
#

isn't editionMods a repeat?

zealous glen
night pagoda
#

yeah I'd really love to use ipairs but I just can't see myself repeating that again like I did in 0.9.8

wintry solar
#

editionMods is just a list of all the different options I can pass in the edition config

zealous glen
night pagoda
zealous glen
#

Even if a single Joker is predictable, across all Jokers the content is arbitrary

wintry solar
#

how many different config options do you have?

zealous glen
#

So you need to encode the extra information there somewhere if you want it to behave in a particular way

night pagoda
zealous glen
#

A built-in ordered list/tuple/dictionary is doing that but it'd be hidden by the object

zealous glen
#

The keys are already strings AFAIK

#

hence table["key"] is equivalent to table.key whenever the latter is well-defined

night pagoda
#

loosely speaking I can't make this

zealous glen
#

That's stays as is

#

You order them when building loc_vars

#

Or you make an ordered list/tuple/dictionary out of Lua tables

night pagoda
#

in theory I could order those alphabetically

wintry solar
#

would vars = {{ chips = 45 }, { mult = 6 }, { size = 'A' }} work?

night pagoda
#

in loc_vars

wintry solar
#

and then use ipairs on that?

zealous glen
night pagoda
#

yeah I'm just trying to process

zealous glen
worldly sapphire
#

i'm trying to make a joker that gives both mult and chips and im not getting the trigger for both

worldly sapphire
zealous glen
wintry solar
#

yeah but that is a super jank way of defining your config

#

imo

zealous glen
zealous glen
night pagoda
zealous glen
night pagoda
#

my brains rot

#

"brains"...

worldly sapphire
frosty dock
#

brians

wintry solar
#

{{'chips', 'mult', 'side'}, chips = 45, mult = 6, side= "A"} you could double for loop this too I think

zealous glen
zealous glen
wintry solar
#

it's close

#

I think the way I've used for editions is cleaner

zealous glen
#

I disagree

#

because the nesting is unecessary

wintry solar
#

in that the table of the correct order is already defined

zealous glen
#

I grouped the integer-indexed and string-indexed entries side by side, but {'chips', 'mult', 'size', chips = 45, mult = 6, size = 'A'} works

wintry solar
#

1 nested for loop vs duplicating keys every definition

zealous glen
#

Do you really need that bracket? Do you want to iterate on card.extra[1]?

wintry solar
#

it's a matter of preference though

frosty dock
#

what is this, trying to overgeneralize?

zealous glen
#

ipairs(extra) is easier to read than ipairs(extra[1])

zealous glen
#

I think Firch is trying to generalize something that can exhibit arbitrary contents*

frosty dock
#

just define an ordered list of recognized extra subkeys, and add them to vars in order if they exist

zealous glen
#

*Granted it would be easier to generalize with ordered lists/tuples/dicts

#

But Lua doesn't have them built-in

frosty dock
#

So if there's mult and chips and side, and they show up in that list in that order, they'll be 1, 2, and 3 respectively

#

doesn't seem too complicated

zealous glen
#

I'm also not sure if Lua's syntax would allow ordered tables to be described with the same syntax

zealous glen
#

That way it's slightly easier because there's no list or recognized keys

#

but you need to remember your variable names

frosty dock
#

isn't that what you get with pairs?

zealous glen
#

I think pairs is just random

frosty dock
#

wait no it's just undefined behavior

#

well than make a list of keys and sort that

#

I don't see the issue

wintry solar
#
local editionConfig = G.P_CENTERS[_c.key].config
                for k,v in ipairs(editionConfig["order"]) do
                    if editionConfig[v] then
                        table.insert(loc_vars, editionConfig[v])
                    end
                end

is this preferable then? and you pass the order each time you define the edition?

wintry solar
#
config = { labels = {'chip','mult','x_mult'}, values = {200, 10, 2} },
for k,v in ipairs(editionConfig.values) do
    table.insert(loc_vars, v)
end

this also works

frosty dock
#

@mellow sable i think i unscuffed the applied stakes text, it's just that it requires some more dictionary items

#

(ignore the fact that the null case doesn't work for non-english)

#

hm actually this has an issue with applying stakes above itself

zealous glen
night pagoda
#

oooooh

mellow sable
frosty dock
#

yeah i already replaced that

mellow sable
#

👍

frosty dock
#

though being able to apply a stake registered after with proper display is an arbitrary restriction

night pagoda
#

this one is really the cleanest so far

sly forge
#

no love for the {{ chips , 45 }, { mult , 6 }, { size , 'A' }} method?

night pagoda
#

oh wait did I miss this one

sly forge
#

ok, edited to use mini-arrays

sly forge
#

where table is the input

#

hm, {{ chips = 45 }, { mult = 6 }, { size = 'A' }} looks cleaner

#

anyway all of these solutions are fine

night pagoda
#

feel a little bit braindead so need some time to figure out how to iterate

worldly sapphire
#

I tried everything and I GET THIS ERROR

here is the code

SMODS.Jokers.j_oofjoker.calculate = function(self, context)
        if context.joker_main and next(context.poker_hands['Full House']) then
            if context.scoring_name == ("Full House") then
            return {
            message = localize{type='variable',key='a_chips',vars={self.ability.extra.chip_mod}},
            chips = self.ability.extra.chip_mod,
        }
      end
   end
end```
#

oops wrong one

wintry solar
gilded narwhal
bold osprey
#

Something messing with the Save game function o.o

gilded narwhal
#

I think what happened is I loaded cryptid, had one of the new stakes, and then uninstalled cryptid

#

So that messed with it

#

How do I remove the save from the files

mellow sable
#

%AppData%/Balatro/Mods/(1, 2, or 3)

gilded narwhal
#

Thank uuuu

#

Womp womp

wintry solar
#

excuse me lua wtf are you doing

frosty dock
#

ease_dollars, not easeDollars

wintry solar
#

oh right

#

sendDebugMessage defaulting me back into camel case T_T

#

gah I even searched my project files for ease_dollars

frosty dock
#

i should make an alias send_debug_message tbh

wintry solar
#

I'd still get it wrong

#

camelCase = bestCase

frosty dock
#

i do agree snake case is worse

wintry solar
frosty dock
#

but conventions, yk

wintry solar
#

we have $ edition compat 😄

zealous glen
# wintry solar

I had an idea for an Edition that granted dollars at the end of round, but making a metallic shader seems difficult

wintry solar
#

should be possible

#

though glsl is đŸ€ą

night pagoda
#

are there any mods that are ported to 1.0 already? really want to see how to do joker calculation

frosty dock
mellow sable
#

cryptid is a good example

#

my registering system is unconventional though, I'll warn you

night pagoda
#

ty!

zealous glen
wintry solar
#

got a link?

zealous glen
mellow sable
# night pagoda are there any mods that are ported to 1.0 already? really want to see how to do ...
local iterum = {
    object_type = "Joker",
    name = "cry-Iterum",
    key = "iterum",
    config = {extra = {x_mult = 1.5, repetitions = 1}},
    pos = {x = 0, y = 0},
    loc_txt = {
        name = 'Iterum',
        text = {
        "Retrigger all cards played {C:attention}#2#{} time(s),",
        "each played card gives",
        "{X:mult,C:white} X#1# {} Mult when scored"}
    },
    rarity = "cry_exotic",
    cost = 50,
    discovered = true,
    blueprint_compat = true,
    atlas = 'iterum',
    soul_pos = {x = 1, y = 0, extra = {x = 2, y = 0}},
    loc_vars = function(self, info_queue, center)
        return {vars = {center.ability.extra.x_mult,center.ability.extra.repetitions}}
    end,
    calculate = function(self, context)
        if context.repetition then
            if context.cardarea == G.play then
                return {
                    message = localize('k_again_ex'),
                    repetitions = self.ability.extra.repetitions,
                    card = self
                }
            end
        elseif context.individual then
            if context.cardarea == G.play then
                return {
                    x_mult = self.ability.extra.x_mult,
                    colour = G.C.RED,
                    card = self
                }
            end
        end
    end
}

Iterum is a pretty simple example of how to do calculations (object_type and soul_pos.extra are custom things I implemented)

night pagoda
#

oooh the calculation is inside the initialization now?

wintry solar
frosty dock
night pagoda
#

the future is now...

#

please tell me that I can do lovely injection also inside this code (I haven't looked into it yet)

frosty dock
#

lovely injection goes in lovely patch files

#

steamodded can't really have a wrapper for it, given it happens before the game itself loads

wintry solar
night pagoda
#

dreams of clean code shattered

frosty dock
#

well lovely patch files are literally not lua code

#

though meth said he wanted to support in-code patches iirc?

wintry solar
#

what happens with lovely if two patches try to inject at the same place?

frosty dock
#

something something priority? idk

zealous glen
#

Since it's my Edition idea lol

zealous glen
#

one file for each UTF-8 character? đŸ€”

night pagoda
#

true but when you have code for one joker in two separate files it's kinda meh

wintry solar
#

what edition effects do you think should be built into the api?

zealous glen
#

Although I do find the lack of connection between lovely-requiring Jokers and the lovely file a bit disturbing

night pagoda
#

I also plan to do editions for bunco like the fluorescent that is planned since the beginning and I still can't get to it, oof

zealous glen
#

Sometimes when I wake up at night it's there

zealous glen
wintry solar
#

Well base game only supports chip, mult and Xmult modifiers

#

I feel like baking some other things in will be useful

zealous glen
wintry solar
#

oh true that makes sense

zealous glen
#

That's almost everything you need

#

Maybe the particular idea I had had for an Edition that grants $ is different because thunk hardcoded which Jokers grant $ instead of calling calculate_joker

#

But even then maybe 1.0 changed that?

wintry solar
#

Every edition is hardcoded

zealous glen
#

I'm talking about Jokers

#

and specifically how defining a calculate function locally is most of the time the way to allow for general, arbitrary effects

wintry solar
#

and then I just want to patch this out?

zealous glen
#

Since the game already calculates the objects anyways, I don't think the overheard of adding calculate_edition is that much bigger

zealous glen
wintry solar
#

the code is buried in evaluate_play though, would that be a problem?

#

nvm I've followed the trace

night pagoda
#

I'm not sure if it's 1.0's issue but I got crash on hc toggle

frosty dock
#

lemme see

worldly sapphire
#

one thing that is strange in when i make one of my jokers a different edition it will not show the info of the edition the joker is on

frosty dock
#

hc toggle works fine for me

#

might be an issue on your end

night pagoda
#

uhmmm

#

I have nothing besides one joker and a bunch of atlases

#

am I registering these correctly?

edgy reef
#

It's erroring here it seems

frosty dock
frosty dock
frosty dock
#

should be fine then, prefixing with bunco_ is unnecessary at best

night pagoda
#

the only joker I made does load the sprite just fine

worldly sapphire
#

the others show the editions normally

frosty dock
#

which steamodded ver?

worldly sapphire
#

0.9.8

frosty dock
#

yeah that sounds like an issue 0.9.8 would have

#

the fact it hooks generate_card_ui in a way where the original is sometimes used tends to having weird edge cases where something is missed

#

lovely allows it to be much cleaner and avoids these issues completely, which is what I did for 1.0

short surge
#

@frosty dock sorry for ping aure, but i wonder if steamodded can patch a bug of the OG game just so that people don't have to do it individually

zealous glen
#

Rule 3 would suggest not

frosty dock
#

that's not what rule 3 states

short surge
zealous glen
short surge
#

basically if one attempts to unset editions they could run into errors, all you have to do is to check if .edition exist before you check each individual edition attributes

frosty dock
short surge
#

but i think this can only be done via lovely, and i really don't think having everyone do that is a good idea

#

also this report was left in the wind so i doubt it's gonna be patched offically any time soon

frosty dock
#

to me that seems reasonable if and only if steamodded has an edition API that supports unsetting editions in some way

#

it'd be weird to just have that as a patch that's unrelated to anything steamodded does

zealous glen
#

@wintry solar

short surge
#

i believe there were attempts that do so, the bronze edition

wintry solar
#

what file is it in?

short surge
#

but it was edition, not unsetting edition

short surge
#

it's Card.set_edition

wintry solar
#

let me see what happens when I try to set back to base

short surge
#

it's this, because this is an event, it would trigger after you potentially put edition to nil

#

so you need this, but OG game does the second conditions right away

#

there's a if self.edition on top, but that's not timed, so the condition triggers first, and then if the action was to set edition to nil, the event would be queued, but edition is gone

zealous glen
#

By the way, I was patching the code for editions and I ran into a bug

#

Of my own creation most likely

#

Where making a card not-Negative doesn't decrease the CardArea's size

wintry solar
#

I think that's because the game doesn't handle removing editions very well

zealous glen
#

But I don't think that's a bug while using Debug mode

#

which allows you to cycle through them

short surge
frosty dock
#

yeah the game just doesn't account for it

wintry solar
#

huh I haven't actually accounted for sounds at all

short surge
#

but it was a big flaw for me mostly because default joker creation would run into a random edition assignment process, and i always unset edition to make sure cards generated are not randomly enhanced

#

so i'd really recommend we handle this with lovely in 1.0 officially

#

just so that in case anyone ever step upon edition api officially or unoffcially this is no longer a flaw

wintry solar
#

my rewrite of set_edition seems to be fine regardless

#

in fact

#

the base version should be fine too

#

you just call Card.set_edition() and it just deletes the edition and then returns

short surge
#

hmmm

wintry solar
#

how have you been unsetting?

short surge
#

card:set_edition(nil) i think

wintry solar
#

huh

#

this should just unset it and return

short surge
#

i unset the edition immediately after creating the card

zealous glen
zealous glen
#

Like Riff-Raff

short surge
#

i think the problem was how stuff are queued

wintry solar
zealous glen
wintry solar
short surge
#

i think if a card randomly gains edition through creation, it will queue the problematic line

zealous glen
#

Oh, as I said, I think the issue is created by my mod

#

But I guess it could be someone else's mod

wintry solar
#

No I mean I think it's a problem with the base game

short surge
#

and unsetting it would actually make it nil even though an event that looks at the edition is already queued

zealous glen
#

You can change a Joker to negative and back and you don't gain a Joker slot permanently, right?

#

Was that always the case and I never noticed it?

short surge
#

hence causing a problem that crashes the game (reading self.edition.something even though it is nil first level)

wintry solar
#

Well if that conditional will solve the problem I’ll just drop it in

worldly sapphire
#

i was wondering, its possible to make animated jokers that change sprite?

edgy reef
wintry solar
edgy reef
#

There we go

zealous glen
zealous glen
#

I mean, below

#

In the empty space below highlighted cards

hallow forge
zealous glen
#

I don't know what's currently implemented, but I'd code it so that the effect stops it from self-selecting when there are 5 cards with Me First! already selected

edgy reef
#

It only selects one of the cards automatically.

#

Also where tf does the game handle offset sprites

zealous glen
zealous glen
#

(if not SMD_0 then whoever had a Damocles Joker)

edgy reef
#

Oh nvm, just setting it as a separate atlas worked.

zealous glen
#

Since it’s inspired by Revolutionary Girl Utena

edgy reef
zealous glen
wild gyro
worldly sapphire
#

is there a way i can make a joker that activates after i play a certain amount of hands, then it resets after the effect is played

wild gyro
#

look at loyalty card

worldly sapphire
#

i mean, if i play 3 hands, then the effect activates

#

then if i play another one the effect is used

#

then it resets

royal ether
#

isnt that exactly loyalty card

worldly sapphire
#

but instead of xmult i want it to give chips

royal ether
#

yea just look at what loyalty card does

worldly sapphire
#

changed some things in the loyalty card code to give chips and now i get this

#
self.ability.loyalty_remaining = (self.ability.extra.every-1-(G.GAME.hands_played - self.ability.hands_played_at_create))%(self.ability.extra.every+1)```
#

the line

#

i did a thing, its not giving or computing chips

SMODS.Jokers.j_cheesecake.calculate = function(self, context)
                if context.loyalty_remaining then
                    if context.every then
                        if context.hands_played_at_create then
                if self.ability.name == 'Cheesecake Bomb' then
                    self.ability.loyalty_remaining = (self.ability.extra.every-1-(G.GAME.hands_played - self.ability.hands_played_at_create))%(self.ability.extra.every+1)
                    if context.blueprint then
                        if self.ability.loyalty_remaining == self.ability.extra.every then
                            return {
                                message = localize{type='variable',key='a_chips',vars={self.ability.extra.chip_mod}},
                                chip_mod = self.ability.extra.chip_mod
                            }
                        end
                    else
                        if self.ability.loyalty_remaining == 0 then
                            local eval = function(card) return (card.ability.loyalty_remaining == 0) end
                            juice_card_until(self, eval, true)
                        elseif self.ability.loyalty_remaining == self.ability.extra.every then
                            return {
                                message = localize{type='variable',key='a_chips',vars={self.ability.extra.chip_mod}},
                                chip_mod = self.ability.extra.chip_mod
                            }
                    end
                end
            end
        end
                end
            end
            end```
royal ether
#

do you have loyalty_remaining in config.extra

#

and chip_mod in config.extra

worldly sapphire
royal ether
#

you need loyalty_remaining

#

looking at ur code

worldly sapphire
#

loyalty_remaining instead of remaining?

royal ether
#

probably a different param? whatre you using remaining for rn

worldly sapphire
#

idk, i just copied from loyalty card

royal ether
#

add a loyalty_remaining = 3

#

also when you copy code, dont just copy it, read it and understand it

#

oh wait loyalty_remaining might be a loyalty card hardcoded var

worldly sapphire
#

invisible joker uses it

royal ether
#

you might need to change self.ability.loyalty_remaining to self.abilitt.extra.loyalty_remaining

#

yea but its probably also hardcoded for invis joker

#

personally put every single var i want on my joker in extra because of the way set_ability works

worldly sapphire
#

i did put extra between all the loyalty_remaining

#

right now

#

i could probably use seltzer as base?

#

because it decreases hands

#

i can just add the loyalty_remainings in there

#

if its possible?

royal ether
#

maybe

#

just experiment with it

#

fastest way you'll get an answer

oblique gust
#

guys in which source file did they define the formatting {} stuff like {C:} s: E: etc.?

royal ether
#

globals.lua

oblique gust
plush lodge
#

hey ive been thinking about creating a mod but i dont understand lua or have much time to learn it, if anyone wants me to give the concept for a mod to them while i help provide ideas please dm me

#

i can probably work on some art but im not that good at it

random sleet
#

ah the "idea guy" gambit. bold move, lets see if it works out

plush lodge
#

yeah i just dont know how to code

#

well i mean i know the fundamental stuff just not the language

random sleet
#

lua aint hard

narrow pollen
#

it's not hard, just... different

plush lodge
#

it would be a relatively simple mod idea but i dont really care much if nobody accepts the offer

#

just an idea i had

royal ether
#

ur best bet is to just post it in modding and hope someone picks it up

rough furnace
#

Thoughts on crash logs improvments

#

(it adds more useful info on the first line error, and the stack trace is a bit different for mods)

#

The stack trace mods did lose their name's and just show id's now

#

I might be able to get the name back, but it would take some work

#

is this fine?

#

anything else you may want?

frosty dock
#

looks good

oblique gust
zealous glen
oblique gust
#

want to see if i can slow it down by descreasing a number or sum

zealous glen
oblique gust
#

ok

#

alright found it

#

thanks!

night pagoda
#

How do I properly determine which pattern to use when injecting with lovely?

#

like if I want to put something here do I use this whole thing as a pattern and put position = 'after'? Not sure how to use multiline things as a pattern

frosty dock
#

oh that's a tricky spot

#

you definitely need a regex pattern there

#

i usually just play around with different captures using vscode search until i find something that's unique

night pagoda
#

so most of the time I simply should search for a spot where it is easy to inject?

zealous glen
night pagoda
#

yeah I really need an example

zealous glen
#

It depends what the whole block of code is like

night pagoda
#

I stole this pattern from the steamodded itself and it's working just fine

#

not sure if I put something here that's not required

#

I have no idea what match_indent does

zealous glen
#

Me neither

frosty dock
#

steamodded has a card:update hook you can use already lmao

#

match_indent basically takes the indentation of the matched line (so any leading whitespace) and prepends it onto each non-empty line of the payload

zealous glen
#

Can you see the output anywhere?

night pagoda
#

alien language

frosty dock
#

I assume you copied from this patch? you can just use that hook

night pagoda
#

yeah

#

wdym by use it?

#

default injection?

frosty dock
#

what this patch does

night pagoda
#

sorry if sounds stupid, I just have no idea where to check all that stuff

frosty dock
#

is that is allows you to define a function on the object you're creating

#

that will execute in Card:update

#
SMODS.Joker {
  key = 'cassette',
  -- blah blah blah
  update = function(self, dt)
    if self.VT.w <= then
      -- ...
    end
  end
}
night pagoda
#

ohhh, awesome!

frosty dock
#

btw your code has an issue where you're changing the center itself and not the Sprite's pos, which means it will affect copies of the same joker as well

#

i.e. you cant' have one cassette on A and the other on B, visually with this approach

#

btw is this confusing?

queen scroll
#

maybe mention a few of the keys that can go directly into config rather than config.extra

night pagoda
frosty dock
#

you can set the pos with self.children.center:set_sprite_pos(pos)

frosty dock
#

extra is fine to always use

zealous glen
#

I think you should mention it

#

Especially for backend like this

queen scroll
#

maybe just include some examples from the base game

night pagoda
#

hell yeah

random sleet
#

based

maiden phoenix
frosty dock
#

yeah

zealous glen
#

Huh? Wasn’t there one in 0.9.8?

frosty dock
#

I'll compile a list of all such available functions in docs, it's kind of all over the place without that

frosty dock
maiden phoenix
remote coral
zealous glen
night pagoda
frosty dock
#

restarting is broken, huh

native osprey
#

having trouble with the morespeeds mod, I want to have x5 instead of x3 and x6 instead of x4 but when I make changes and select the speeds in the game, back out of the main menu then back into settings the speed has been reset to 1x, I only changed the x3 to x5 and x4 to x6 values in the mod itself, what am I doing wrong?

frosty dock
#

you probably missed changing a value

#

mind sending the modified file so I can have a look?

native osprey
frosty dock
#

change G.SETTINGS.GAMESPEED == 3 and 5 or to G.SETTINGS.GAMESPEED == 5 and 5 or

#

same thing for the next line

#

G.SETTINGS.GAMESPEED == 4 and 6 or should be ``G.SETTINGS.GAMESPEED == 6 and 6 or`

native osprey
#

thanks

#

curious as to what the logic is, I thought it was that option accepts 4 OR 6