#đ»ă»modding-dev
1 messages · Page 25 of 1
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
delete your settings.jkr file?
wait nvm
I know what this is
verify game integrity
did you find calculate_joker hell?
anything else?
should be good
Because I got the same crash after I did so đ
just to confirm you closed out of the game completely and didn't just press R?
wait is it faster to loop elif over all jokers or to create an array and reference it
can I see once more what Mods/Steamodded contains?
Steamodded
an array would be asymptotically the same
Mods
doing what steamodded does and just reference a function on the center object is faster though
got it, tyty
that looks like there's still an 0.x installation interfering
Delete Balatro.exe and verify game files again
Just .exe?
yeah
then just get the latest commit for cryptid as well
Still crashes
@mellow sable a
Alien Cat - Makes Mult Cards act like Steel Cards, But they give additional 10 mult.
its possible to make this work lol?
m
@worldly sapphire
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.
the "bugged" planet is Eris, that may be why
Thank you
if you don't have Flush Five unlocked you won't even notice the bug because it'll always resample
hmm, so it then moves to Planetpri1_resample* after bugged then bahaves like normal
that explains
yes
is there an example of this?
looks really cool in game ngl
What do you mean?
like a joker that does this
i mean
i found that baron and shoot the moon
does this with kings and queens
Yeah I think that's basically it
this is so stupid
soul RNG is funny
here we come the most stupid bugged seed (maybe)
Yo I'm assuming that the fact that I just beat gold stake for the first time during modded means that modding disables achievements
intentional otherwise you can get them easily by unbalanced mods
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
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?
lua tables are unordered unless you make them arrays, that's just how they work
if I define {chips, mult, x_mult} to use for iteration here will that maintain order?
yeah, or you just manually use them in that order
I think you can have a table with both numbered and arbitrary keys, and ipairs will only iterate over numbered keys
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
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```
Yo what should the joker unlocks for black and blue stakes be
I think the second condition should be context.other_card.config.center.name=="Mult"?
how do jokers like Ceremonial Dagger remember their mult value between saves?
the value is stored in the joker's config
New edition or something?
pretty sure its just a custom bg for the homestuck suits
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)
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.
oh okay
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
morning!
mornings!!!
what have you been doing while i was sleping
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
i like how you made the center change
thank you 
Huh, that wasn't too difficult to set up.
Steamodded 1.0 is so peak (this is half of the backend, not much else than this).
oh? what do they do?
Idk yet xdd
Yeah i have the same thing for my crops its so goood
that's what I also did for the stamps for Autumn
Just randomly decided "let's make a mod to test out custom objects extending GameObject"
mwahahaha
you are evil
that would be cool as a boss blind. sorta anti-bell

my brain hurts
doing a lot of different things was really cool until everything changed
So how do you remove it
"That's the neat part..."
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
i think u need another "very"
Or dozen
https://gyazo.com/653ee37e65dd714dada458057aef2895.mp4
Trying to add a search bar to the jokers tab
It kinda works
With the ludicrous amount of Jokers that having several mods will add, yeah thank goodness
I still need to fix the pages thing
the other pages just appear blank for now
but other than that, it works perfectly
Yeah thatâs got you in a pinch
trading card :)
I think they were talking about the "enhancement"
lol this reminds me of what i did for stone cards for the april fools mod
hmmmm
vampire :)
fair
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
Quad colour wilds, nice
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
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)
Wait what are the bottom two for?
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
huge
maybe you can make a new layer (front center back) but that sounds like way too much effort
also hi chat
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
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...
and homestuck
homestuck is a roguelike
susge
i mean its eaten enough of my time to count as one LOL im on like pg4489 now
o interesting
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
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
Complicated Joker
X5 mult if played hand fulfills the requirements outlined in attached PDF
password game but you have to do it with your hand
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
s 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)
very epic
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
Someone else making curses?
I wasnât sure if I should make âbad enhancementsâ its own thing or if I should make them work of âenhancementsâ. I do like both that Enhancements could override bad enhancements and that it could be natively interacted with by other mods that care about Enhancements
Feder is also making a form of curses.
Well, boons with random curses specifically.
Everyone's cursing balatro
Hey Jimbo, fu-
From what I saw their implementation was a bit different from what I had in mind, although I do want to make boons and curses that come together at some point
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
Kinda like random stakes then?
Yes, but you can choose how youâre cursed
You keep getting curse packs
After beating a boss blind
Hmmm. It'll be quite fun for a challenge mode and I don't imagine it'll be very hard it implement
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
How's that going along? (I don't know who's primarily working on 1.0)
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
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
house rules
Whatâs that supposed to mean
shes just sayin it should prolly be called house rules
house rules is myst's mod
No I think she has a mod called house rules
But AFAIK it works differently
from what you've described it feels the same
house rule that enables a random house rule after every boss blind
Do you select the house rules before the run, from among all available rules?
yes
damb
Well, how it would work
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
what is this sorcery đ
protip you can crop obs output to a source by rightclicking it and selecting crop to source
is this loc_txt explanation alright?
back on my weird centers thing
It canât stop winning
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
hm
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
sounds good
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
I think itâs a bit too faint
I feel stupid: how do I do the path of the atlas declaration in the 1.0 steamodded?
ingame filters do some of the heavy lifting there
if I do it the old way, it is weird af
i believe that screencap is with the center at this contrast level
You just need to put the file name in the path
got it, ty!
Would using variables in descriptions need to be in here?
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
I think this one looks better at this level of contrast than the Nebula one
Maybe if you tweak the levels of the nebula itself so the lighter parts are lighter and darker parts darker it would look better?
ok but first stone card watermark
Aaaaa Iâm not going to be home a lot today so I canât work ):
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
Ooh I love these
:?
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
why the hell were you doing that in the first place
you didn't need to do that even in 0.9.8
idk how to do it any other way?
previously there was a loc_def function
I was told to do that when I started modding lmao
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
and here's new nebula watermark
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
awesome, thanks!
how does this look
Wait you don't need a custom atlas to load your joker sprites? Or it's just a default value?
this one's a default
Oh ok phew
but there's no harm in calling your custom atlas Joker, since it gets prepended with your prefix
I gave my jokers custom atlas and I was wondering if it was redundant, guess it wasn't
this is valid and does not override the vanilla sprites
but the vanilla atlas will still be used as a default
Ah crap it might actually be, I'll need to do some test later
this, on the other hand, would overwrite the vanilla Joker atlas
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
the default is always the vanilla atlas
if you give it atlas = 'Joker', it will use prefix_Joker
My brain is melting from my sheer stupidity
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
I'll just keep it how it is rn, it doesn't hurt and works fine
i have gone veritably mad with power
i'll probably stop this madness soon one way or another
The jest is watching
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?
The loc_vars is done inside the SMODS.Joker
What if you wanted to change the objects that already existed đ€
same deal, loc_vars bypasses the original
it just goes inside the constructor, like
SMODS.Joker {
-- other stuff
loc_vars = function(self, info_queue, card) ... end,
}
I have three different but similar consumables so I load the tooltip from one but change the value every 3 seconds
SMODS.Joker {
-- other stuff
loc_vars = function(self, info_queue, card)
return { main_start = {} }
end,
}
this is supported
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)
If that was in response to me, I was just changing one value in the middle of a line
uh I took this as wanting to use main_start for an animation like misprint
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
Hereâs how it looked when I first did it. #âă»modding-general message
ughh
creating a new object to pass to SMODS.Joker just limits the possibilities of that function
just do modifications on joker and pass it directly
SMODS.Joker(joker)
Canât you create Jokers on a loop?
???
for joker in jokers do
that's the exact reason I do this thing, because I don't want to deal with SMODS.Joker(joker)
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
you can do joker.name = joker.key and still pass in joker after that
I do something similar
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"
I do not understand đ
say you want one of your jokers to have another function, say add_to_deck
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
actually, this doesn't input any functions. you'll wind up having to do way more hoop-jumping
if you simply modify joker before passing it to SMODS.Joker, you have no issues doing that
hey everyone, is there a guide on how to create jokers and stuff ?
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```
https://github.com/Steamopollys/Steamodded/wiki/Creating-new-game-objects for steamodded 0.9.8
docs for 1.0 are WIP
thank you !!
this runs for every context, you need to check you're in the right context first
I'd assume this is meant to be for context.individual on playing cards?
I mean, they could set a field to an arbitrary function that does anything specific theyâd want, but most of the time doesnât do anything
he is already here
your arbitrary field doesn't get passed into the constructor
wow
it really worked
but, is there a way i can also trigger the mult card that is in hand?
I think I misunderstood what they were doing then
also I feel like I've said this before, but you don't need to check the joker's name
Or what you suggested
look at how shoot the moon does it
i mean't the mult card effect itself
I mean you could but adding the extra Mult to the Joker is almost equivalent
What am I doing wrong? Shows ERROR in the desc
like I said, { vars = { ... } }
oops
Firch if you need a base to help modding I already updated my mod to the current SMODS alpha
I need to get used to all this stuff a bit first
huh
+A mult
A

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

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
how is a good question but it definitely should be supported
i believe feder's crops would specifically want something to this effect
đ
that's certainly a way to do that
i can't read
yeah me neither bro its cool
i wonder if you could just have like... "allow_duplicates" to be its own thing
could have a return value like { add = true, allow_duplicates = true }
if it's just a field on the center object, it's unconditional
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.
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
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?
pairs do not respect any ordering even if the keys are numeric
if the keys are numeric and 1 indexed, as every lua array is, use ipairs
uhmmm
I don't get how can I get the key in the ipairs loop instead of key's value or index
ipairs is only for numeric keys
hm, I'm not sure I like the tally being there
this is the exact reason I unregister the suits in bunco
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
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
You can have both types of keys in a single table, and ipairs ignores non-numeric keys
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
Maybe keep a list of secret and non-secret suits (like hands)
You need to use context.blueprint to distinguish between cases
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)
wouldn't that not work if it ignores non-numeric keys?
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
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
already done in 1.0.0
you can provide a prefix (or the mod will take the first 4 letters of the mod id)
prefix uniqueness is also forced
THIS is great
(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
anyway it made me hope the release day of 1.0 even worse
I'm gonna go for a G.GAME.disabled_suits sort of table to keep disabled suits across reload
you can preview it right now, the current progress is on the main branch on github
It works for me
I literally have that in my code
didn't work for me lol
yea i know theres a preview. imma just enjoy my modpack a few days more then i'll go to 1.0
maybe I messed something up but I'm really close to giving up
fair
the loop simply didn't even start
What is your code like?
Yeah because your keys aren't integers
If your keys aren't integers you have to use pairs
pairs messes up my order...
ipairs starts from 1 and goes until it can't find n+1 AFAIK
how it looks like with pairs
Those are the two options unless you manually make your own iterator
works well but in the wrong order
do it like this
what's the difference between this and this?
@night pagoda
but I can't because ipairs doesn't work on my table again!
oh no
Or better, do it as I explained here
âïž
You can have both types of keys and ipairs ignores non-integer ones
vars = {'chips', chips = 45, 'mult', mult = 6, 'side', side = 'A'}
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
Then learn how to make your own iterator
will try, ty
The two default options I know of in Lua are ipairs and pairs
@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
do you set that on load?
it can't be attached to the object itself?
no
cringe
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
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
hm, in that case if you want it localized, you can put it in process_loc_text or inject
putting it in SMODS.current_mod.process_loc_text() does not localize it properly either
hardcode time
I mean in the object's process_loc_text
that's... what i had...
like
process_loc_text = function(self)
self.super.process_loc_text(self)
self.vars = ...
end
hm
it doesnt work at load because it can change on language change, it's not fully static
cool, the super worked
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
More art development but yeah
whatever you do to view_deck will be copied back to graveyard lmao
I'm waiting for suit additions and removal for specific decks
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?
What else is in the file?
I keep hooks in individual files name after the file that contains the function Iâm hooking
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
whats this vars i hear of
@frosty dock I was wondering...
https://gyazo.com/653ee37e65dd714dada458057aef2895.mp4
I want to change the amount of pages possible, and that would require me to enter the UI's data dynamically.
Perhaps you know how to do that?
uh i don't know, and I don't feel like digging into UI code to find out
that is a nice looking tarot
is there anyway to mimic the effects of stone cards without like. replacing all the "m_stone"s with a custom function
Oh that's really cool
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.
buncoâąïž reference
maybe in 1.0
small joker initialization, finally
based!!!!
especially since thac has 16 extra suits now, a way to make the UI not go bonkers would be pretty slick
I found a way around this yesterday that I found quite elegant, can dm you when Iâm back on my pc
Oooh, would be great!
I gave up on this exact part and started doing different things already
Iâm curious why you wanted the variables to be in a specific order
Iâm curious to see it too
because of this - if they're unordered I have to put seemingly random numbers in the localization
How does the Joker calculate function work in 1.0?
nothing special iirc, args are card, context
I'm getting a error regarding Jokers being nil
But don't you return the loc_vars by getting the parameters from the card
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
Like, if you do {card.extra.chips, card.extra.mult} they would be in the correct order
you just put the function in the constructor as with everything
or whatever the 1.0 equivalent is
isn't this possible in 1.0?
nothing about that is specific to 1.0?
I'm asking because Firch seem to be having issues with the localization variables in 1.0
but they shouldn't be out of order if they followed the same logic as 0.9.8
no, I declare them earlier but I modify them to include card.ability.extra.-
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
I mean, the variables are only computed during runtime, so it should be doable by just calling it inside the loc_vars equivalent
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
Ah, I understand, you're procedurally generating then
yup
Then you can get the key table and order it as strings
you can also only do this if you hard code each joker, I think Firch is trying to automate that process right?
that won't work in my case unfortunately for the reason that it still needs manual input
it doesn't
They also don't want to type variable names one extra time
isn't editionMods a repeat?
Because ipairs works with this
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
editionMods is just a list of all the different options I can pass in the edition config
@night pagoda I think this is the best you can do to automate them since both the extra variables and the Joker description are arbitrary objects
yeah but now imagine all the possible options from 30+ cards lol
Even if a single Joker is predictable, across all Jokers the content is arbitrary
how many different config options do you have?
So you need to encode the extra information there somewhere if you want it to behave in a particular way
Not sure if I understand that
so if I'd order them as strings how would I assign values to them?
A built-in ordered list/tuple/dictionary is doing that but it'd be hidden by the object
I don't understand your question
The keys are already strings AFAIK
hence table["key"] is equivalent to table.key whenever the latter is well-defined
loosely speaking I can't make this
That's stays as is
You order them when building loc_vars
Or you make an ordered list/tuple/dictionary out of Lua tables
in theory I could order those alphabetically
would vars = {{ chips = 45 }, { mult = 6 }, { size = 'A' }} work?
in loc_vars
and then use ipairs on that?
That's what I said
yeah I'm just trying to process
again, just {'chips', chips = 45, 'mult', mult = 6, 'size', size = 'A'} works with ipairs
i'm trying to make a joker that gives both mult and chips and im not getting the trigger for both
SMODS.Jokers.j_oofjoker.calculate = function(self, context)
if self.ability.name == 'Wild Cardback' and context.joker_main and (next(context.poker_hands['Full House']) or next(context.poker_hands['Flush House'])) then
if context.scoring_name == ("Full House") then
return {
chips = self.ability.extra.chips,
mult = self.ability.extra.mult,
card = self
}
end
end
end```
you just need to call the "correct" key inside the loop
You need to manually display the VFX
It's not the prettiest but it works
yeah that's why all this thing I'm trying to do is happening
@night pagoda https://stackoverflow.com/a/19266578
how tho?
brians
{{'chips', 'mult', 'side'}, chips = 45, mult = 6, side= "A"} you could double for loop this too I think
look up card_eval_status_text
I think that's an uglier version of what I suggested
in that the table of the correct order is already defined
I grouped the integer-indexed and string-indexed entries side by side, but {'chips', 'mult', 'size', chips = 45, mult = 6, size = 'A'} works
1 nested for loop vs duplicating keys every definition
Do you really need that bracket? Do you want to iterate on card.extra[1]?
it's a matter of preference though
what is this, trying to overgeneralize?
ipairs(extra) is easier to read than ipairs(extra[1])
I think so
I think Firch is trying to generalize something that can exhibit arbitrary contents*
just define an ordered list of recognized extra subkeys, and add them to vars in order if they exist
*Granted it would be easier to generalize with ordered lists/tuples/dicts
But Lua doesn't have them built-in
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
I'm also not sure if Lua's syntax would allow ordered tables to be described with the same syntax
why not alphabetically
That way it's slightly easier because there's no list or recognized keys
but you need to remember your variable names
isn't that what you get with pairs?
I think pairs is just random
wait no it's just undefined behavior
well than make a list of keys and sort that
I don't see the issue
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?
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
@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
actually, I like this solution. You can insert on the extra table @night pagoda
oooooh
also "Applie" won't work in other languages
yeah i already replaced that
đ
though being able to apply a stake registered after with proper display is an arbitrary restriction
how would I go for generating config values for this?
this one is really the cleanest so far
no love for the {{ chips , 45 }, { mult , 6 }, { size , 'A' }} method?
oh wait did I miss this one
ok, edited to use mini-arrays
uh, to answer this: you'd iterate across both arrays in parallel, setting config[table[labels[i]]] = table[values[i]]
where table is the input
hm, {{ chips = 45 }, { mult = 6 }, { size = 'A' }} looks cleaner
anyway all of these solutions are fine
feel a little bit braindead so need some time to figure out how to iterate
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
how do you mean?
:(
Something messing with the Save game function o.o
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
delete save.jkr in your profile folder
%AppData%/Balatro/Mods/(1, 2, or 3)
excuse me lua wtf are you doing
camel_case
ease_dollars, not easeDollars
oh right
sendDebugMessage defaulting me back into camel case T_T
gah I even searched my project files for ease_dollars
i should make an alias send_debug_message tbh
i do agree snake case is worse
but conventions, yk
we have $ edition compat đ
I had an idea for an Edition that granted dollars at the end of round, but making a metallic shader seems difficult
are there any mods that are ported to 1.0 already? really want to see how to do joker calculation
#1219749193204371456 was first
cryptid is a good example
my registering system is unconventional though, I'll warn you
ty!
Actually I just found a tutorial that makes what seems to be a passable metallic shader
got a link?
Learn OpenGL . com provides good and clear modern 3.3+ OpenGL tutorials with clear examples. A great resource to learn modern OpenGL aimed at beginners.
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)
oooh the calculation is inside the initialization now?
cheers, will have a look through it later on
everything is
the future is now...
please tell me that I can do lovely injection also inside this code (I haven't looked into it yet)
lovely injection goes in lovely patch files
steamodded can't really have a wrapper for it, given it happens before the game itself loads
h_dollars next?
sooo am I forced to separate everything into two files?
dreams of clean code shattered
well lovely patch files are literally not lua code
though meth said he wanted to support in-code patches iirc?
what happens with lovely if two patches try to inject at the same place?
something something priority? idk
I mean, if you do try to implement it I can try to offer help, although I haven't use GSLS
Since it's my Edition idea lol
More files = cleaner code đ€
one file for each UTF-8 character? đ€
true but when you have code for one joker in two separate files it's kinda meh
what edition effects do you think should be built into the api?
Personally I prefer to group hooks together, so the Joker's file requires the specific hook files it needs
Although I do find the lack of connection between lovely-requiring Jokers and the lovely file a bit disturbing
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
Sometimes when I wake up at night it's there
I think the API itself should at most have examples
yup
Well base game only supports chip, mult and Xmult modifiers
I feel like baking some other things in will be useful
calculate_edition
oh true that makes sense
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?
Every edition is hardcoded
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
and then I just want to patch this out?
Since the game already calculates the objects anyways, I don't think the overheard of adding calculate_edition is that much bigger
Pretty much; you could check if the edition is one of the vanilla ones and run the appropriate code, otherwise call calculate_edition
the code is buried in evaluate_play though, would that be a problem?
nvm I've followed the trace
lemme see
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
uhmmm
I have nothing besides one joker and a bunch of atlases
am I registering these correctly?
It's erroring here it seems
that is correct if the file you're drawing from is at assets/2x/Jokers/Jokers.png
huh
I do
should be fine then, prefixing with bunco_ is unnecessary at best
the only joker I made does load the sprite just fine
only the joker that has a custom info_queue
the others show the editions normally
which steamodded ver?
0.9.8
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
@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
Rule 3 would suggest not
that's not what rule 3 states
what's the bug?
i posted it a couple month ago here in bug report: https://discord.com/channels/1116389027176787968/1229179817212121220
then what does it do
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
as per my understanding, that you shouldn't attach a debugger to the game
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
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
@wintry solar
i believe there were attempts that do so, the bronze edition
what file is it in?
but it was edition, not unsetting edition
let me see what happens when I try to set back to base
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
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
I think that's because the game doesn't handle removing editions very well
But I don't think that's a bug while using Debug mode
which allows you to cycle through them
yeah i think currently no cards would remove edition
yeah the game just doesn't account for it
huh I haven't actually accounted for sounds at all
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
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
but i was running into errors when i do that
hmmm
how have you been unsetting?
card:set_edition(nil) i think
i unset the edition immediately after creating the card
Except in debug mode
I think you can use a key to prevent it from having an edition
Like Riff-Raff
have you tried this just using debug mode?
What do you mean?
no other mods
i think if a card randomly gains edition through creation, it will queue the problematic line
Oh, as I said, I think the issue is created by my mod
But I guess it could be someone else's mod
No I mean I think it's a problem with the base game
and unsetting it would actually make it nil even though an event that looks at the edition is already queued
I don't think it is
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?
hence causing a problem that crashes the game (reading self.edition.something even though it is nil first level)
Well if that conditional will solve the problem Iâll just drop it in
i was wondering, its possible to make animated jokers that change sprite?
I think the actual sprite is behind it on the card which is mid but hey, it works.
just tested with only debug mode on that touches editions and you still gain slots permanently fyi
There we go
Perhaps, but it's still not easy
I think you should be able to offset the hand until it's outside the sprite
I mean, below
In the empty space below highlighted cards
What if 6 cards are âMe First!â
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
It only selects one of the cards automatically.
Also where tf does the game handle offset sprites
I can change that later ;P
The position of soul sprites is hardcoded, maybe you can look at how Hologram does it. Otherwise, I think balatrotale gaming or SMD_0 might know how to do it
(if not SMD_0 then whoever had a Damocles Joker)
Oh nvm, just setting it as a separate atlas worked.
Can I have a video to show it off to some friends? I had shown them the sprite when I made it
Since itâs inspired by Revolutionary Girl Utena
Something like this?
That works! Thanks!
what if you have 6
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
look at loyalty card
i mean, if i play 3 hands, then the effect activates
then if i play another one the effect is used
then it resets
isnt that exactly loyalty card
but instead of xmult i want it to give chips
yea just look at what loyalty card does
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```
loyalty_remaining instead of remaining?
probably a different param? whatre you using remaining for rn
idk, i just copied from loyalty card
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
invisible joker uses it
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
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?
guys in which source file did they define the formatting {} stuff like {C:} s: E: etc.?
cuz i want to change smth related to https://discord.com/channels/1116389027176787968/1240614180592156742 myself
globals.lua
ok got it â
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
ah the "idea guy" gambit. bold move, lets see if it works out
yeah i just dont know how to code
well i mean i know the fundamental stuff just not the language
lua aint hard
it's not hard, just... different
it would be a relatively simple mod idea but i dont really care much if nobody accepts the offer
just an idea i had
ur best bet is to just post it in modding and hope someone picks it up
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?
looks good
well i just checked that but i cant really find the part where the {E:(number)} got defined but only the colors
What are you looking for exactly?
like the slide-in effect of jokers' names
want to see if i can slow it down by descreasing a number or sum
Try looking for control.E
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
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
so most of the time I simply should search for a spot where it is easy to inject?
I think you can get around it by patching in an elseif
yeah I really need an example
It depends what the whole block of code is like
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
Me neither
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
Can you see the output anywhere?
alien language
Mods/lovely/dump
I assume you copied from this patch? you can just use that hook
what this patch does
sorry if sounds stupid, I just have no idea where to check all that stuff
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
}
ohhh, awesome!
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?
maybe mention a few of the keys that can go directly into config rather than config.extra
how can I reference the sprite of individual card?
self.children.center
you can set the pos with self.children.center:set_sprite_pos(pos)
eh, i feel like that's just more confusing
extra is fine to always use
maybe just include some examples from the base game
hell yeah
based
Oh thats so cool! Btw is there something for set_ability too?
yeah
Huh? Wasnât there one in 0.9.8?
I'll compile a list of all such available functions in docs, it's kind of all over the place without that
hm, not sure on that one, but idts
But like is it inside the SMODS.Joker or its still the ol' way?
Can the mixtapes be on different sides in practice or is that just to show off the two sides
Iâm pretty sure itâs on the 0.9.8 wiki
in theory yeah, it flips on discard, and if you get something like showman you can buy non-flipped one while the other one is flipped
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?
you probably missed changing a value
mind sending the modified file so I can have a look?
'd!