#đ»ă»modding-dev
1 messages · Page 27 of 1
change the ref to Card:add_to_deck too and when calling the ref add self, before from_debuff
Add this at the start of the function if not self.added_to_deck then
yea if i move the load call to the end by doing my own lovely it lets me change sprite 
ig this works
oh wait i can solve this without this by overwriting the pos value in config
if it's not complicated to get there with Lovely, sure...?
yea it's trivial
i just changed it to this
# move Card:load()
[[patches]]
[patches.pattern]
target = 'card.lua'
pattern = 'self:set_sprites(self.config.center, self.config.card)'
match_indent = true
position = 'after'
payload = '''
local obj = self.config.center
if obj.load and type(obj.load) == 'function' then
obj:load(self, cardTable, other_card)
end
'''
the other one used at instead of after idk if there was a reason for that
actually
there might be a reason this isn't possible
i don't know if you can change the scale if you do it this late

that might be the reason it's so early
this is what ended up working
Wait it's just because of DebugPlus lol
nvm you can
so yea i don't think there's any issues with moving it to the end
Wait does debug plus let you add eternal to playing cards?
ye
huh what language is this
for the colors
I know it's a lovely patch
@night pagoda was also changing Joker sprites
toml for colors
we did figure out how to change sprites just the current position of the Card:load() call is before the game actually sets the sprite of the card
so it does nothing
if you move it to the end of the function it works
I wasn't but I wanted to at some point
Don't you change the A and B sides?
ah, I thought you meant vanilla jokers, my bad
make the current pos a part of ability.extra to save it
But are you doing a patch?
I don't think Firch did
no you don't need it for setting sprite pos
i did a patch so i can set it in card:load() so it is updated immediately when the run is loaded
In theory animated Jokers are possible but they seem to be sensitive
did somebody say shaders that change based on colour?
based on what
these are based on the suit selected by the joker
hmmm
I wonder if you could do that with animated Jokers or just by changing the sprite
@frosty dock base steamodded crash when using grim, familiar, or incantation
can't you hook set_sprites instead?
probably i just feel like load makes more sense at the end
anyway to add a joker to the pool so that it doesnt get rolled?
or not making it be removed from pool when sold
look into how cavandish does it but i think it's called "yes_pool_flag"
ok cool
im pretty sure if you set that you can't get the joker unless the flag is set in G.GAME.pool_flags
I told you Aure 
i forgor đ
this should do hopefully
base is fixed in 0523c, cryptid's is still broken
could've sworn I fixed Cryptid's
self.ability.extra should be card.ability.extra
I changed that
oh maybe I'm just not on latest
I fixed Cryptid's after reporting it to you lol
i could have sworn I pulled, must have forgot
there's still an issue with yours where used_tarot is the center instead of the card
it doesn't crash, but the card doesn't juice up
changing copier or self to copier or card fixes
uhhh
heres the section
what its supposed to do is on each card scored, increment seventally, and once seventally hits 7, it adds 7 chips to the joker and resets seventally
you put context in your loc_def, where it's out of scope
Okay, now it doesnt crash on hover over, but it doesnt trigger upgrade on the 7th card scored
is there a way to output to the console to test and see if its even checking and adding to seventally?
print()
print() spam my beloved
print spam my beloved
https://thunderstore.io/package/download/JoStro/json5/0.1.1/
Does anyone know a way to load a JSON library with lovely? I've tried this but it isn't being found when running require
so apparently it runs the seventally = (seventally + 1) line 23 times because in the console on scoring a single card it spits out 1 then 2 then 3 up till 23
you need to add more checks to context
I really wish there was documentation for this what new context checks do I need to add?
Here's a part of my code for a joker that gives XMult when a card is scored
if context.individual then
if context.cardarea == G.play then
return {
x_mult = card.ability.extra.x_mult,
colour = G.C.RED,
card = card
}
end
end
and that works fine
so you'd need to add these two checks along with not context.repetition
okay, final question (for now, i hope). Whats the x_mult equivilent for + chips, and whats the context for end of hand scoring before the mult gets multiplied to the chips so I can add the +7 chips to the total chips
oh and where do I edit it to show what the current ammount of chips are
berto, do you know the context so the chips only get added once all cards are scored?
the function is get_current_pool, not G.get_current_pool
G is not the global scope
_G is
engine stuff?
all global variables
even itself
_G._G._G is the same thing as _G
so how does this work?
this function isn't declared on the global scope, but on the field UIDEF of the global variable G
which is an instance of the Game class, and not the global scope _G
ok cool thanks a lot! very helpful stuff
np
you probably want context.joker_main
oh sorry didnt see that, have no idea đ
hmm. still doesnt work. did I put it in the right spot?
outside the context.individual check
these don't occur together
now it plays the little blue square but doesnt add the chips or show the number, just plays the blue square
try chip_mod instead of chips
it's what the game itself uses
like type chips right here
cool, the plus shows, but now it only shows +0
oh thats because 0 is the base chip
im stupid (i think)
let me try something
yep I was dumb
this is killing me
for some reason the get_next_voucher_key fails
ok i just took the whole function body, how bad is that?
you could lovely patch it
but if copy-pasting it works, then it should work without copy-pasting it
just this didnt work
how do i do that?
I think it's because your get_current_pool ends with return t instead of return t1, t2
naturally you need to assign t1 and t2
see the lovely github for an explanation
It's not too hard
ill try that
thanks
did the job đđœ
Could anyone point me too where in the source code the seed is used to calculate shop/tarrot queues?
I want to make a seed searcher as a project
get_current_pool function will be helpful
https://discord.com/channels/1116389027176787968/1209513992519946250
There is also a searcher that already exists as well, if youâre curious
alright ty
Question. What do I call to create planet cards?
I tried copying the high priestess code but it doesnât work, it throws an error
And how do I check if a played hand is a specific thing?
My best guess is in the common_events create_card function
how'd you figure out how to do this? ive been tinkering around for a while and I haven't figured out how to send a working variable to a shader
oh my gosh thank you so much
Anyway to add a different kind of ticket to a shop item? Like buy or buy and use sort of thing
Or where to look for that
oh that's great
lovely just sees text
I think ejwu is implementing an Enhancement API into Steamodded
interesting... thanks!
New to moding the game but is there a guide or tools that allows me to change the sprites/images of the cards?
been looking but I can't seem to spot any
There's an example mod showcasing how to do it https://github.com/Steamopollys/Steamodded/tree/main/example_mods/Mods/NegateTexturePack
I thought I'd fixed that? what steamodded build is this?
most recent commit
I was playing with that joker i made that just spawns as polychrome, and he spawned as a Polychrome naturally and the game did not crash
I wonder if there is a way to spawn and guarantee him to always be polychrome
Even if he is already polychrome
Depending on how you implemented it then itâs always Polychrome
Its in the set_ability like this
card:set_edition({polychrome = true})
Idk when set_ability is called. Usually the game just avoids giving editions to cards with editions
But like, when he spawns, he spawns without polychrome and then he crashes the game
do you want it to have the polychrome effect or just the shader?
I'll send you some code if you just want the shader without the effect
that's really simple
Alright
it'll mean it can get other editions then too
Polychrome shader + negative Edition lol
I've had a look though immolate's code, but i still cant wrap my head around how a seed can turn into a list of jokers
it kinda turns into multiple seeds first
I'm using loops like these to make something for a specific joker. How can I check for blueprints that mimic a certain joker? Is there a variable for copied joker name or something?
something something
for _, v in ipairs(G.jokers.cards) do
if v.ability.name == 'Blueprint' and v.ability.blueprint_effect == 'Xray' then```
I wonder if SMODS.find_card() can be used for this.
It already returns an array with all cards with the specific joker key.
Could we also add a check for if blueprinted cards also count?
also my thing doesn't really makes a lot of sense because of the non-blueprint cards that also mimic jokers (brainstorm for example)
so yeah
How do I add game values to the joker's localization? I can set them in the update of joker but seems like it's not what's intended
loc_vars
wait I think I know what I've done here
is it possible to load the example mods in the steamodded folder?
no no, I mean that loc_vars doesn't get the values that do not exist at the moment
so I need a way to pass them in after joker creation I guess
this is what I did
loc_vars isn't run before you ever display the text for that joker
you can always assign a default within loc_vars if the value doesn't currently exist
yeah I can't just pass a var beforehand
how do I do that?
first of all that does not look like latest steamodded
just check if G.GAME exists
SMODS.Back({
key = 'test_deck',
loc_txt = {
name = 'Test Deck',
text = {
"test"
}
}
})
why won't this load?
what have I missed
seems normal, can you send the mod file in full?
SMODS.Back({
key = 'test_deck',
loc_txt = {
name = 'Test Deck',
text = {
"test"
}
}
})
if SMODS.Back.test_deck then
sendInfoMessage("Test Deck loaded", "Edition Example")
else
sendInfoMessage("Test Deck not loaded", "Edition Example")
end
this is literally the entire file minus the header
SMODS.Back.test_deck won't be a thing
oh do I need my mod prefix
SMODS.Back is the class, it doesn't hold the actual objects
ah yes
backs don't even have their own such table, all centers share one
???
did you misspell UIT?
đ«Ą
I still do not understand where do I put the nil check for localization, because if I put it it creates joker but it makes it always behave like the value doesn't exist
just to be clear you're using a loc_vars function, right?
oooooh now I understand, I need to do that inside the function, yeah?
yeah
huh, the deck will only appear in the collection if I give it a name
I thought names weren't necessary anymore?
wait what
so this updates the count in the collection to 16/16, but it isn't in the selector
this works fine
back collection relies on names, apparently
that's nice to know
should work on latest commit without name
i'm thinking about if a new enhance, that combine every vanilla enhance, and is only obtainable by a new spectral card, is possible
or does it already exist
how tarot cards do that center animation?
that seems like it shouldn't work, at least stone and wild cards don't work together
like, i'm trying to make a joker go to the center of the screen, do the ability and then go back
How do people feel about this for EditionAPI?
Better to keep ALL editions in the 4% chance and scale them accordingly, or leave base editions as the 4% and stack others further on that
Also interacts funny with Hone and Glow Up vouchers, should they just affect base editions or affect all custom ones too?
i searched card.lua for a example of a card going to the center of the screen and i can't find it ;(
very fair deck has to store it somewhere
working on run logging
is that plasma
no, but the code displaying messages is based on it
working :(((
by which i mean pretending to care about this stupid job and instead brainstorming balatro mod ideas
(unsuccessfully)
what d oyou need ideas for?
uhhhh just generally stuff i wanna do
also kinda thinkin about like broad-strokes implementation for stuff
if i cant work on stuff my brain still likes to feel productive on my projects in some way
so rn that's just brainfishing
for whatever dumb ideas i can find
it doesnt help that this job is boring as sin
Im working on a joker pool mod, any joker you buy is out of the pool, and now Im trying to add an option to buy them back into the pool
any thoughts?
Iâm not sure I understand the difference here
I think the closest youâll find are tarots and drawn hands moving to the center of the screen, but I have done that myself
iirc thats done by moving the cards to the G.play cardarea
Perhaps, but you can move cards freely by changing their coordinates
However you need an event if you want it to be smooth
And thereâs some quirks I havenât figured out exactly
Not sure what coordinate system the game uses for rotations
i believe the same is done for vouchers, the G.play thing
best to just stay consistent
I donât think that works for me because then you have things mixing with cards while theyâre being played
Although maybe I should use the play area as a position reference
I did want to perhaps make the animation start only after cards finish being played, but that was partially to avoid fixing a bug
Did you see the Tumor, Autumn?
that effect with the deck moving up is cool ill admit
i wouldnt be opposed to using something similar for Offering tbh
man the tumor feels like old news at this point HS-wise haha
To be fair, I was thinking about making the entire deck move up at once (face-down) and dissolve
I kept it like that so I could see it move and understand what my code was doing
I do like the extra pizazz but itâs a bit slow
yeah but funny
Although I know how to manually make the animations faster (without relying on the acceleration code). I also know how to make acceleration apply
(im on pg7500 smth now btw)
Wow! Nice
I had a list of things to show another reader while they were reading as they reached appropriate points
i still have like a thousandish pages left right
A lot of it was just recalling some of their comments if they were prescient (sometimes when they talked about completely different subjects)
Yeah, but most of what I have is for page 6046 and earlier
Since a lot of it is references to what they commented, I think Iâd only have a handful of links to show you at best
guys is there an existing example of attaching an infobox to other (vanilla and modded) jokers' tooltips?
the first one that i remember is autumn's planet cards
those predate smods tooltips though i think
no theyre implemented with the smods way
the trick is jokers are special
and smods 1.0 changed everything also
aight nvm. also can i color the text in the desc with customized HEX color or sum?
The base game edition rate is 4%. So thereâs two choices for how custom editions are added on; either we preserve the 4% chance of an edition and the base game ones are less likely because youâve now got more in that 4%, or we preserve the base game edition chance and then add further editions past that, so you might end up with 20% chance for an edition with no modifiers just by having a lot of editions
I mean, you could also not add custom Editions to the pool and allow modders to choose how they want their Editions to work
In terms of API, I think it should be weight-based
Maybe with some priority rules
I remember discussing this before for another Steamodded API
Maybe Seals?
@frosty dock do you remember?
Yes but inherently we have to decide how they are added to the pool
and again I think they should be unobtainable unless the mod maker gives it a weight or adds another way to obtain them
They are
But if a weight is given, how is that weight applied? Does it maintain a 4% chance to get any edition, or does it maintain base weights?
Actually indeed I was talking about it with you
That question doesn't make sense to me IMO
Yes this is a problem I discovered last night
The weight is the weght
that's the purpose of the weight
The total probability is the sum of weights
this is how this system is supposed to work
So are we saying the base card weight is 960?
And isnât changed by anything else?
I mean, modders can add weight to it
In fact I think this is what we decided before
If you want you can make a custom function for that
Maybe I have just gone round in a massive circle
4% for any edition
That is what I settled on to avoid issues of make editions more likely than base cards
@wintry solar how is progress on the enhancements going?
Then there was the question of Hone and Glow Up and whether they should also increase the chances of custom editions or just base editions
Currently porting to 1.0
And then evaluating custom effects needs work too
maybe you wanna send me a pre-alpha version so i could test some stuff with it?
I have some thing I wanna try out with X-Chips
I can do when it works đ
probably just base editions, since they dont affect negative iirc? or have it be a flag for the edition
voucher_boost = true or smth
itayyyyyy hows xchips
going pretty nicely
sick
fixed some issues with held x-chips
baller
and now working on xgold and held emult
Hell Yeah
I also made a ton of progress on search bar
sweet
search bar will be handy when we get tons of stuff rollin around
i might!!! actually release a mod this weekend :))
prolly oapi and maybe thac and/or emojiokers
another enhancement api woooo
that's why I wont do it XD
though it wouldn't be hard to do
i can see how I would do it
my main thing with thac is that somehow i dont feel like i have enough content to justify posting it
which i guess is mostly that i have no support jokers for the new suits
what do you think Autumn
an' the Page of X tarot cards dont have real art
should I make an enhancement API?
i think i just want there to be any enhancement api that exists and works
I mean, I do still have my stamp code
and the enhancement API would work in a similar way
I believe @sly forge has submitted enhancement api to be merged
ill check it out
oh they did a ton of work
hey, I'm on! if you have any questions ask away
when is calculate_enhancement called?
i really just gotta sit down and read ur jokerstamps code when i get home
short answer, wherever it would make sense; long answer, it's injected in eval_card, and before calculate_joker during specific contexts: I just did those that would occur while there's a hand
man i am so excited for enhancement api
im also still considering doing omori emotions
like legit that sounds fun
Today Ill do some misc features for Jimbo's Garden
AKA add the seed pack and farmer's tag
woooo jimbarden
I think @sly forge is doing Enhancement API for 1.0
yeah welcome to the conversation đ
Guys I'm not sure but I think ejwu-
stock market in balatro
this art goes hard
pog
just found a code that moves the joker
finnaly
G.play:emplace(self)
this works
lyman the goat
true
polychrome reactor cloning machine
Gah dayum
oh!! i wanted to ask
@mellow crag how viable do you think itd be to adapt the cardarea swap thing for garden to alternate top-row cardareas?
wdym?
like how u have that button to swap to garden from hand and vice versa
would that be possible for jokers/consumables to swap to other cardareas
with like a row of buttons at the top of the screen maybe
đ
expandable cardarea api
unlimited card areas
I already suggested that
Interesting itâs Greek architecture and not farm architecture
Beware of that to avoid shenanigans with Jokers being in areas theyâre not supposed to. If you want, I have code that moves the Joker without changing areas
Though tbf Idk if emplaces changes areas
oh wait this with option cycle is probably the solution to the screen real estate issue, huh?
ooh?
the solution to the screen real estate issue
as outlined above
actually im a bit curious
if you have the garden opened and something attempts to put cards into your hand, what happens?
i cant think of what would do that in vanilla though, since i assume you couldnt cryptid probably?
it will put them in your hand
whats the visual look like though? does it toggle the card area back?
clicked to add an ace from a mega standard pack and got this error, any idea how I should fix it?
Seems like BBBalatro Storm Joker can't find an existing context.full_hand
I agree. I'm not sure I want to edit the artwork without permission tho
First I'm trying to get permission to edit some pixels which I suspect are wrong
Actually, the + and the J are the same character
But the bottom of the J has a darker shading
+OKER
+OKER
just got an idea for a joker
Name: The Chosen Card
Description: The First card in your hand gives +200 Chips and +100 mult in the first round
What do you think?
Actually I think I have one (pair of) wrong pixel(s) myself
Yea left K is missing one, the J feels wider than the other letters
That's not the one I was looking at, let me see
Added one pixel to both Ks. I think the original artist purposefully removed those but idk
That's what the K looks like in every Joker, I think
Nvm
In the Joker Joker, one pixel of the bottom right K is covered by the Joker
Some other Jokers, like Chaos the Clown, also cover it, but others like Juggler don't
is common a placeholder?
also if you're editing it maybe do like akai and reduce contrast + increase brightness
-20 and +15
Yes. It'll probably be uncommon, though right now it seems weak
Also the extra draw gets carried over to the next round and/or pack. Not sure how I feel about that
hmmm⊠teach me your (akai's) secrets
i've been doing the same thing every now and then for recolors when getting the colors right is too much hassle lol
Is there an easy way to do it in Aseprite? Because it seems to be per layer but I tend to use multiple
(besides flattening it)
Also, I like the current colors. I think the cards use the high contrast suit colors, and the black is darker than usual but it matches UNO's
fair
It seems to only apply to one selected layer
I do kinda like an increased contrast and increased brightness version though
works for me
just hold and drag over the layers
Literally doesn't
strange
That said I didn't want to edit the original artwork too much since it's not mine
oh that seems to be a preview issue
i was testing with 2 layers directly on top of each other so i didn't notice
Oh, I see. I think movement preview is also weird like that
Did you make the artwork?
hmm
i edited the colors but someone else expanded the tarot art
recolors my beloved <3
Though it looks more like UNO cards but less like suits
I think if I were to recolor I'd make it match the suit colors more closely instead
But for now I'll keep the original (slightly edited by me)
What is this software you guys are using?
Aseprite
i use this theme for it https://github.com/catppuccin/aseprite
Cute! Thank you brotherman
That reminds me I saw someone who seemingly made a gradient map tool for aseprite but didn't release it
I was already familiar with how consumables worked thanks to Oddities, but I made something simple to test how it works again with SMODS 1.0
Nice!
Did you use the built-in consumeable API?
is there a way i can add colors to choose in the description?
like add new colors
isn't it just like G.C.YOURCOLORHERE = HEX('000000')
let me test
there's another function loc_colour for those
oh i see
aure, if I'm adding UI collection stuff for paginated editions, which file should I be placing the functions in?
if it's a full rewrite of the function, probably api_hooks.lua as to not clutter game_object.lua too much
so, how do i add new colors?
sweet
Add a new color to the global list then add it to the function that localizes color names
Shouldnât that be a folder rather than a single file?
like this.......?
đŹ
Kinda, I donât remember if you need a hook but if you do youâd need to hook it
Also look at globals.lua to see how colors are defined
I suggest adding an entry for you mod and inside that entry adding your colors
But you could add to one of the miscellaneous categories
i was looking at globals.lua
Look at SO_2
now i'm wondering, is there a way to create a color that changes colors like the edition colours?
Yes
What you do is that you hook one of the update functions, I think Game.update, then you define the color depending on the timer
@worldly sapphire I can get the code in like 30 minutes or so when I get back home
alright
The main issue is finding the function you want
How do you want the color to change?
Yes but how do the colors change
from color to color. you mean?
Thatâs one possibility
Imagine trying to animate a rock moving. It can teleport from A to B. It can move in a straight line. It can move in an arc. It can move in a straight line, but start fast, slow down, then speed up again.
Some of these are more realistic than others
any examples on how to save new data into the run?
What do you mean
I got a list of jokers I wanna be run dependent, meaning every run they need to load and save
like the run save data
Iâm not sure I follow. Maybe you could use the seed?
alright I'll take a look there
I'm trying to follow the 'Play hand' functionality
thanks
@zealous glen so.... about the color changing colours?
Depending on what you want to do itâs easier
The game saves information automatically
But I donât know what you want to do so I canât provide better advice
This interpolates between four colors in a list in order
this is the mod I'm working on, basically removing jokers you already bought from the pool until you buy them back
Specifically the four suit colors, whether standard or high-contrast
so I got some copy of G.P_CENTER_POOLS.Joker that keeps track of what was discovered
I don't understand what the mod does
after you buy a joker it would not appear in the shop anymore, even if you sell it
and you can buy it back into the shop pool
I believe you don't need to save anything externally
just set yes_pool_flag or no_pool_flag as appropriate
Specifically, make a lovely patch to not set it back on after selling a Joker
Maybe you need to change how Showman works since I believe it overrides the flags, though presumably not Cavendish, so Idk the exact logic
I mean I already got all the other functionality working, but I am just missing savingg the state of what jokers were found
Maybe a hook would be enough
do i just copy this to my code?
and where do i find it?
I mean, presumably you want different colors
so understand what the code does and modify it according to what you want it to do
find what
idk where it is :/
and again you shouldn't need to do anything extra. The game remembers which Jokers are allowed and which aren't AFAIK, otherwise you could return to main menu and go back to get multiple of the same Joker
where what is
the code. i dont know in what file he is, i just want to see it better
I mean, the code I sent you is in my computer
It's my code, inspired by akai's
alright, guess I just did a long way around that đ
thanks again
If you want to see how the game does DARK_EDITION, just look that up
It's in Game.update
Game.update is called every frame AFAIK
this?
Yes
What's really important here is that each of the three color channels are set to some number
and those number depend on the current time
Here, I interpolate between two colors to get a smooth (linear) transition
so do i just copy and use it as base?
Again, understand it and modify it as it fits what you want
G.C.ADVANCEDTECH[1] = 0.7+0.2*(1+math.sin(G.TIMERS.REAL*1.5 + 0))
G.C.ADVANCEDTECH[3] = 0.7+0.2*(1+math.sin(G.TIMERS.REAL*1.5 + 3))
G.C.ADVANCEDTECH[2] = 0.7+0.2*(1+math.sin(G.TIMERS.REAL*1.5 + 6))```
this is how my code is, idk what to do next :/
i tried changing some values
but the color changed just a bit
and the color doesn't change to another
do you know what sin is?
nope
I changed it from a linear change to an exponential one. But it feels a bit too fast.
Only Balatro fan whoâs a math hater smh
But really, sin cycles between 1 and -1, and the RGB values go from 0 to 1. Since you have 0.7 + 0.2 (1 + sin(âŠ)) it alternates between 0.5 and 1.1, but anything above 1 is capped to 1
i changed numbers, and changed numbers, still, the color doesn't change and idk what i need to do đ
Again, the numbers need to be between 0 and 1
I think it's easier if you interpolate between two colors
that's what i'm trying to do
just 2 colors
how do i do with 2 colors? do i delete the 3rd line?
Try making it a linear gradient between two colors, similar to what I did in my code. Use this to visualize it https://www.desmos.com/calculator/avpl6qgtrj
You can change the red, green, and blue values of colors 1 and 2 to match the ones you want to see it
If you just press play on p, you'll see it change linearly
just saw it
i got the first color
but how do i do the second one?
i'm still puzzled
Again look at my code
i'm trying to make a joker get +5 mult and +10 chips every hand played
is this hard?
No
Can this be used to remove the object from the pools?
not sure what this description here even means
oh wait fr? that's in the game?
it's a bit of a placeholder tbh
it's for get_current_pool
So things like enhancement_gate but without adding a bunch of different flags
any examples of how to use this? (if it works at this moment)
add_to_pool = function(self)
return { add = true, allow_repeats = true }
end
something like this if I recall correctly. allow_repeats will also allow the card to appear if one already exists
I should rethink how I name my vars
SDM_0_removed
đ«„
Is it possible to add custom localization pieces with translations, similarly to joker's localization in 1.0?
I have a localization file that stores all jokers, but I want to add other non-joker things the same way in the same file, but not sure what to use to "unpack" tables into something useable
Oh nooooo
Mainly need that for the things like eval messages
I mean worst-case you can manually add to the table, no?
function SMODS.current_mod.process_loc_text()
SMODS.process_loc_text(G.localization.whatever, ...)
end
awesome, thanks!
np
Hello modding Devs,
I have a question, which file should i look inside if I want to identify the current equipped jokers/ bought vouchers?
I need a live identification, my humble guess is the save file but i'm not sure if the game saves the list live or only when an overwrite is done.
Thank youu
You can just iterate over the Joker card area to see what Jokers the player has
Thereâs a function if you want to find a Joker by name
Let me explain more so you can understrand what i'm trying to do.
I need an external tool to check the Joker card area and display ( somewhere else ) the current Jokers LIVE with the full description.
I just want to know where to start
is this for a stream overlay?
in order to find
- where the list is updated at all times
- the library of joker to display it somewhere else ( this sounds easier to do )
yes and possibily a twitch extension
not sure if a stream overlay has been done but I know the twitch extension doesn't exist
you can probably make a mod send a http request every second or so
(probably definitely a bad idea)
G.jokers.cards has the jokers
so if i keep reading it I will be able to retrive the full list of joker the player have ?
Ah context : I'm still learning !
i forget where voucher stuff is
It's G.GAME.used_vouchers
based reverie dev
Amazing â„ïž
Thank you ! I'll be back with more questions !
is that a threat
Indeed it is
aight bet
never
thabk you for your answer
Sorry for ping, I am 100% doing this wrong and not sure what to do
SMODS.process_loc_text(localization.dictionary, 'copied')
(results in empty message)
bleh
is it fine to just say you can't put single mod files at top level, or do I need to come up with a different system
I do not understand completely what I need to do with this
I donât know exactly but if you look at the existing localization dictionary, itâs divided into different categories
seems fine to me, it will cause some confusion for people that were already going to be confused but they don't matter
MoreSpeed moment
While youâre at it donât allow mods 1 level deeper (because they load but their lovely patches donât)
real
what if your entry point is like Mods/my_mod/core/my_mod.lua
wtf, why is love.event.quit('restart') not working
nvm i just didn't kill the threads
it's still being jank and just crashing on load tho
looks like lovely also isn't re-evaluating ignore files when restarted this way
uhhhhh
yeah, it depends on how you're restarting things.
lovely requires the process to be completely killed OR modules to be unloaded and reloaded.
love.event.quit("restart") shuts down the main lua state instance, but not the process
hmm yeah, that's unfortunate
the main source of the crashing seems to be that the lovely module isn't found
i guess launching the game through steam is an option, except not on Mac (steam://rungameid/2379780)
I'm looking to investigate a performance issue, suggestions on how to look into that?
that's a little vague, don't you think?
this works on windows, I'm not sure I have something better rn..
what does the events system do ? is there a modding guide 101
not a complete one, to say the least
no i want one for the internal workings of blaatro
it's most useful to know you can just extract the game executable with 7-zip to inspect the game's code
I won't judge, but giving a complete summary of the inner workings of Balatro does not only go beyond the time I have available to me, it would also include a questionable amount of redistributed code
if you have a more specific question, I can probably give a reasonable answer though
i am working on the state system and the E_MANAGER.add_event thing, what does the E_MANAGER do ?
engine/event.lua has less than 200 lines of code
it basically queues things like animations
just go read it
for example when the game calculates a score, it queues all of the events right when you play a hand, and then the event manager plays out all of the animations
ill try to talk about what i have been trying to figure out, so function with dt as arguments such as update hand played are functions that got called every frame ?
and then they trigger change in the global state, and a loop is watching the change in state to fire off some other function ?
is that true ?
then why do we need events ?
or maybe i am way off and i need to know where to start reading ?
an important use in-game is timing events correctly depending on the game speed and acceleration
so delaying certain things asynchronously
add_event must be placed inside if not G.STATE_COMPLETE or else it is gonna get queue every frame
Event managers exist outside of Balatro
events are usually queued outside of update functions
You can probably get an idea of how they work elsewhere
Events can react to game rules, per-frame updates mostly keep the game running
what do we do when we have enough consumables that it goes off screen
Press esc to exit the page most likely
feder has a thing in the works that separates modded consumables to their own page
cool
But yeah, getting stuff ready for Ortalab
hence the 3 consumables
Just me adding colors, 3 consumable tabs, and 3 pages of jokers, that's at 1100 lines of code
and mind you that's EXCLUDING:
Effect Text
the actual effects
about 7/10th of the actual cards left
someone give me a joker to make a stamp of im bored
banana
Wee
aight bet
not sure for hiker but im thinkin s&b would be red seal for jokers (once joker retrigger api finalizes), and banana would give some Mult but the stamp has a chance to be lost at end of round :) just like a real banana
hiker could be +chips that scales when the joker triggers
scaling stamp would be strange
i actually had the thought that it would give permabonus chips to a card held in hand at end of round
Madness
why would i put a picture of you in my mod
true
baseball
could make the effect prevent you from making one slip too late so it wouldn't ever be three strikes for you /j
okay but srsly you could make a baseball stamp some bonus for jokers of the same rarity as the joker with the stamp
would be cool if you ever make more of them
yknow I've always been the one you could count on for these mods
15/20 Pages (+1)
i see that game.update has been changed to take 2 argument in main.lua by steamodded ? why ? and if i wantto add something should i use Game.update(dt) or Game.updae(arg298_0, arg 298_1)
Multiple stamps
(I do want to make Stickers which can stack, mostly as a visual cue for Hiker-like effects so players donât need to individually check cards)
I wonder how does S&B stamp looks like with 2x2 eyes
hmmm
I love this
Autumn stays winning
That would be a melty and wild wax stamp, definitely
Hmmm⊠Hikerâs Stamp might increase the amount things scale by each time they scale
Like square goes from +4 each time to +5, +6, +7âŠ
That wouldnât work with modded Jokers I believe
that is a very hardcode-y effect
Well, with the Hiker API it could work with those effects
But base game Jokers donât work with those effects
Unless Hiker API changed vanilla Jokers to work with them đ€
this is from when the game's code was obfuscated. The signature has always been Game.update(self, dt) which is equivalent to Game:update(dt)
ok thanks
is there a way to get launch parameters ?
using steamodded not lovely
don't expect it to be complete
docs are unfinished by all means
please do ask here if questions come up
it's great to have some mods around that are up to date with 1.0, but I think it's not something everyone should do just yet - I'm definitely not fully done with breaking changes
nah it's fine if you play around with it and report stuff back to me, just don't go around updating everyone's mods, as things are sure to break
I'm not planning on super huge breaking changes anymore, but at least the arguments on some API functions will be adjusted for consistency
mostly I just wanna reserve the right to change anything as to not establish something that will be a footgun long term
yeah, I've done most of the work on the 1.0 rewrite
is G.UIDEF.view_deck unchanged now?
no, it is fully changed
or does it not show in the lovely dump- ah
regex patches were too expensive, so I fully overwrote it
Expensive?
Header
okay found it
computationally
How so?
Ah did you change that?
I had an idea to make the version field mandatory but decided against it
regex is hella inefficient
I never implemented the other method, I just talked about it here lmao
I didnât use 1.0 but I saw versioning was working correctly so I assumed thatâs how you did
I had also checked 1.0 mods and I saw some of the optional entries
apart from completely overriding it, were there any more changes?
not sure what the use for that would be tbh
some minor bug fixes iirc
Editorâs note: âsomeone elseâ can include âpast selfâ
weh
âminor big fixesâ
A small fix the size of a big fix
i have to manually compare my view_graveyard function now guh
you have the old wiki
yugioh is absolutely not the only card game with a graveyard gimmick
the wiki pages that aren't numbered are unchanged and for 0.9.8
the numbered ones are for 1.0
I haven't removed those because 0.9.8 is still latest stable
Thereâs only two games, Yu-Gi-Oh! and Minecraft. Pong? Minecraft. Chess? Yu-Gi-Oh!. Tetris? Yu-Gi-Oh!.
yes, but I reserve the right to
- delay them to a future update or
- reject them
okay cool
read the wiki pages for 1.0, specifically 03 and 05
In general it looks like SMODS.Atlas { key = 'key', ... }
There's a few examples that uses SMODS.Atlas in the example_mods of the Steamodded repo too
I'm still trying to figure out how to link everything together and what information goes where haha
I'll probably end up linking to or referencing the example mods
no
average dev experience
Decks are Backs, as they are internally
consistency and whatnot
I put that in the migration guide, didn't I?
wait actually SMODS.Backs doesn't exist
all centers share a common table
quit is not reload anymore... i feel scammed
SMODS.Centers
I moved it to the mods menu's back button
only triggers when you disable or enable a non-lovely mod
restarts the game fully when you disable or enable a lovely mod because duh
yeah yeah yeah
0.9.8 and 1.0 aren't alike in a lot of ways
I suggest reading the code for things I haven't documented yet
okay, what replaced end_calculate_context
In this case SMODS.Card is moved to SMODS.Suit and SMODS.Rank, with the suit list being located at SMODS.Suit.obj_buffer
repeat after me
joker
_
main
joker_main
i'm going to explode this does not work
unless another thing is changed which i will absolutely cry
I'll need more context to evaluate that
i have figured it out
hm?
i will still explode
spare me
did not notice everything is now self, card, ...
SMODS.Suits[xy]...
suit list just holds the keys
suits holds the actual objects
there's some trickery with thunk's inconsistencies where the suit list sometimes needs to be reversed to not change vanilla behavior
but that's a me problem
yeah, in fact that's the only one that's kept in sorted order instead of in order of registration
that was all due to an extremely jank implementation of the view deck logic
which was rewritten, so this is redundant and was removed
hh i hate this
why not singular
if you don't care about order, yeah. you can however just index ranks by the value in the list, as it strictly refers to the key and nothing else, where if referred to the shorthand in the deck preview before
i took a break from modding for like a week and now i feel like a beginner
can't use ipairs on SMODS.Ranks, that will silently do nothing
ipairs only does sequential numeric indices
pairs
instead of ipairs
the day i see this is the same day i happen to be listening to a weezer music remix
ooh wee ooh i look just like jimbo joker
If you reload with r in the crash handler, it should reload mods
But something is funky with lovely
yep it's scuffed
Is there any easy way to add a badge to a playing card ? There is a 'create_badge' func but I don't know where to call it for it to work
I'm trying to add the rarity badge on playing cards for my Joker Deck mod
G.UIDEF.card_h_popup is the function you need
I tried to hooked it but I'm struggling to make it work . . . At least i'm on the right path, ty !
after SMODS.Joker:take_ownership('joker', { what do i need to do ?
Finally, stone cards actually works
wtf python balatro
Yeah
also, i can do it with the 0.9.8 steamodded ?
i posted it a few days ago
yeah but with the 1.0 i need to change all of the script
this works too, i had a few errors with the boss blinds
yesss python balatro
wanna try?
i just finished wild and stone enhancements, and a few editions too
yeah sure
localthunk speech bubble
|| also, if you see an error tell me pls ||
umm...
yup i know where is that error
also i need to clean a lot lmao
Hmm
Why wouldn't you
okay done
Ok, where is the mod for this? It has caught my interest immediately with what an 'Ore of a Kind' is and what Seed cards are
Ore of a Kind is a joke mod i made
the tag is for Jimbo's Garden, the balatro farming mod
Ah, ok
Then, if anything, that makes me even more curious about it, since I really want to try out that Garden mod (and even the Ore of a Kind ioke mod, if it does get made), due to how unique they seem
@scarlet merlin i implemented the "scoring hand" using your score hand chips function as reference to get the editions correctly, because if there was a pair but 5 cards in hand played the program was counting all the 5 foil cards
are we being too graceful with this one? should I kill off the loading of any lone top-level files?
i like crosscode.... (working video this time)
tecnology, ah yes
lol
Nice! How did you do the Balance effect?
probably just replicating plasma deck's behavior?
âAre we being too graceful?â
Changelog: Warning message now calls the user a âstoopid doo doo headâ
I mean I have a Joker that does the same, and I used a lovely patch to do it
That way both the deck and the Joker work in the same moment
And they donât stack
i mean that warn message will drown in 60 million lines of registration logs
Call the user a âstoopid doo doo doo doo doo [âŠ60 million lines skippedâŠ] doo doo headâ
cryptid's take on it activates when scored, there's some fun strats with double balancing
nah, it's warn and get ignored, or refuse to load the mod
I intentionally wanted it to not stack. Also that meant I didnât have to copy-paste the code that changed UI colors and whatnot
that's alright imo
What is?
doing it when the deck effect would trigger
sync catalyst explicitly says when this joker is triggered
it also just doesn't do the UI colors because you're likely playing cryptid without animations anyway
My Joker becomes active after using three different Planets
And becomes inactive at the end of the round
i didn't do that all by myself, i got some help
i don't even know how to use lovely
lol
I did mine with a lovely patch
anyway, which one
Itâs not too hard
What are the issues if the user ignores it?
here is the art of the joker btw
they may have installed a mod the wrong way, and otherwise the disabled state of all such mods is forced to be identical
you disable one, they're all gone
i can't be bothered dealing with a settings file and i need an ignorefile anyways
I just chose not to do it because it's weird in the middle of a hand
also that
i think of it as a "no one would care, so why do it" sort of thing
You could revert the UI colors if you think itâs an issue
Or donât
I think itâd be weirder to not have an animation
also conventionsâąïž
thoughts on just banning it?
I also did it with a lovely patch for Rookie, although it sounds like you did yours slightly differently to mine
I think either way newbie users could be confused
I'd adjust the example mods and explain accordingly in docs, of course


