#💻・modding-dev
1 messages · Page 23 of 1
i think if the top ones looked more '3d' it would look way better, but it already looks really nice as is
like if the pattern changes when it goes from front face to inside face
btw here's how it looks like with transparency (not final)
lmao not doing that
oh true
main color of homestuck is green
i was thinking "damn red & blue just like balatro no way"
Idk what you use but wouldn't it be better if this bit was behind the R?
layering issues
it was that before
I thought it was an intentional change lol
Uhm do you code in 0.9.8 or 1.0.0? If you code in 0.9.8 I'd recommend seeing how Codex Arcanum
0.9.8
oooh
Yea then check the mod then
I had checked uhhh Autumn Circus
But for some reason when I wrote it it didn’t work
But require worked so
I think I have an old version of it that’s just a single file lol
Maybe you had the wrong path or something
fixed layering
Looks neato, I feel the ace is sticking out a bit too far and personally would push it in a bit more but I can understand if it’s where the O should be
chat am i just. making a website at this point
yes
SMODS.Sprite({key = "j_ccc_jokers", path = "j_ccc_jokers.png", px = 71, py = 95, atlas = "asset_atlas"}):register()
am i stupid or does this just not work anymore in recent smod 1.0.0 commits
(path is fine for sure, and i'm using j_ccc_jokers as key)
tysm
how do i make a boss blind
actually i think i can just poke around in existing blind mods
i have no idea whats going on
i havent even seen a tutorial for even starting to make a mod
wtf this is epic
Im making my own card game, and its kinda spooky how u included zodiacs into this mod, cus im also using astrology in my game lol. Can you tell me more about your mod?
its a homestuck mod lmao
Oh i just googled what that is. Okay haha.
why won't this inject? 😭
try with double quotes instead of multiline ones for the pattern
otherwise check you're giving it all of the line
nope, still doesn't work
I just get Applied 0 patches to card.lua in the console
huh, if I change it to the next line and before it works
i don't think the pattern is correct, i searched for it and it looks different
0.5.0 beta 2
"if self.edition or self.seal" should be enough
oh maybe the files I've copied out to reference have changed in the patch
there's only 1 occurance of this found
can I use just the start of a line to get it to inject on the next line?
oh good point
also I did have outdated reference files -_-
idk actually
you can
the pattern patch operates on entire lines
at least iirc I may be dumb
i'm gonna check then gimme a sec
idk I can ask the guy who made it if you want
I'll just test it
well removing half the string stopped it injecting so I'm guessing not
can I match just the end?
with no whitespace either before or after
or does it parse by entire lines?
nope, has to be the entire line
cool cool
before with insert your payload before the matched line, after will insert after, at will replace the line
can you pattern match an entire block?
nope, you need to use the regex patch for that
is there a way i can create a check to see if i sold a joker?
Hi tired, I’m Clay
how do create a check for a joker to make it knows when i sell another joker?
the game will let every joker know by call joker:calculate({selling_card=true,card=card}), you just need react on it
you can search campfire in card.lua for an example
is there a way for me to change what hex code the game calls for when running stuff like C:red and C:attention
there's a function loc_colour that defines the values you can use this way, when and if you want to add new ones. For existing ones, you just need to change the corresponding colors in G.C
So for {C:red}, you would want to change G.C.RED
would G.C.RED be in globals.lua?
you should just be able to access it in your mod's code
thanks, i'll try and figure it out
i made the joker react when i sell
just need a way to make it activate when i play a hand
hmmmmmm
if context.cardarea == G.jokers then
you can search this in source for example of what to do.
if context.selling_card and (context.card.ability.set and context.card.ability.set == 'Joker') and (context.card ~= self) then
I made a spreadsheet to keep track of ideas for a mod
Yo victin can’t send code cuz im at work but do you have any idea why id be getting this error @zealous glen
Been looking over it and I just can’t figure it out
i played a card after i upgraded the joker and i got this
Some table is empty. Could be a typo or syntax error
Syntax error
if context.selling_card and (context.card.ability.set and context.card.ability.set == 'Joker') and (context.card ~= self) then
card_eval_status_text(self, 'extra', nil, nil, nil, {message = localize('k_upgrade_ex')});
self.ability.mult = self.ability.mult + self.ability.extra
end
return {
message = localize('k_mult_ex'),
colour = G.C.RED,
card = self,
mult_mod = self.ability.mult
}
end```
this is how the code is
try changing the ; to nothing actually
are you sure you want the return outside the if?
; does nothing iirc
(as in, delete the ;)
I think I've seen it used to write multiple statements in a single line
What would I even do about a syntax error
it's only useful for putting multiple statements in one line
by thunk even
but no "practical" use
fix it?
(I don't consider minifying practical)
i tried putting the return inside the if and i got a infinite loop of upgrade
I don't know why it would loop but looking at it again I actually think you can remove the return since you don't need it for what you have, I think
like, i want the joker to get upgraded by selling jokers, then when i play a card it applies the mult to the counter
You don't need the return for that
You'll probably need a return to make it apply the mult, but not for that
let me send the code
This is the code I posted yesterday I changed local_def to loc_Testcard and fixed the sprite issue I had at least I think I did but then it brought up the main.Lua error
SMODS.Jokers.j_sharpener.calculate = function(self, context)
if context.selling_card and (context.card.ability.set and context.card.ability.set == 'Joker') and (context.card ~= self) then
card_eval_status_text(self, 'extra', nil, nil, nil, {message = localize('k_upgrade_ex')})
self.ability.mult = self.ability.mult + self.ability.extra
end
return {
message = localize('k_mult_ex'),
colour = G.C.RED,
card = self,
mult_mod = self.ability.mult
}
end```
this is the version with the code you replied to me
And again you don't need the return for this part
do i just delete the {} part?
Wym
Delete the return {…}
You'll want to check for the context when you want it to give Mult and then give Mult
probably another if?
do i add the context in here?
or do i create a if before or after?
can you no longer directly add the the game localization tables in staemodded 1.0.0?
there was always an issue with that where changing languages would overwrite your additions
you can define a function SMODS.current_mod.process_loc_text() and have your logic for adding localization not bound to a specific object in there, and it will get re-injected when necessary
i see, Thanks!
np^
now to deal with the next issue, jimbo infection
jimbofection
ah yes
if I can be of any help, individual files for each sprite is discouraged, so these are no longer recognized by the API
if you want your own atlas, you have to specify it
is there no easy way to keep them separate?
you can still create each atlas and pass its key all the same
and i can't progress further
I wonder if that would solve my issues with localization
though I'm still in 0.9.8
idk what to do
You mean this? Cuz if so I'm concerned too
yeah you just shove that in SMODS.current_mod.process_loc_text
Ok 👍
anything you change in G.localization needs to be in a process_loc_text somewhere
it's quite simply needed to have any chance of supporting localization at all
either on a game object or the whole mod
The game calls the function calculate_joker at specific moments. You don't know when the function is called a priori, so you need to find out while the function is executing and program accordingly. For example, think of the Jokers you've already coded and think of every time their calculate function is called and they have nothing to do.
just to clarify, the reason why it doesn't work at all in 1.0 versus only after a language change is that with the current timing of mod loading, the reference that G.localization holds at load time falls out of use during injection, since set_language needs an additional call to be able to load modded languages right away
Do I need to call the function for each line?
terms are being mixed up here
there's two things
SMODS.process_loc_text is a helper function that handles registering the loc text for the currently selected language if supported
I'm looking at the function itself and I'm a bit confused 😅
you don't need to use this function if you don't plan to support more than one language
function poll_edition(_key, _mod, _no_neg, _guaranteed, _options)
_mod = _mod or 1
local edition_poll = pseudorandom(pseudoseed(_key or 'edition_generic'))
if _guaranteed then
if edition_poll > 1 - 0.003*25 and not _no_neg then -- > 0.925
return {negative = true}
elseif edition_poll > 1 - 0.006*25 then -- > 0.85
return {polychrome = true}
elseif edition_poll > 1 - 0.02*25 then -- > 0.5
return {holo = true}
elseif edition_poll > 1 - 0.04*25 then -- > 0
return {foil = true}
end
else
if edition_poll > 1 - 0.003*_mod and not _no_neg then
return {negative = true}
elseif edition_poll > 1 - 0.006*G.GAME.edition_rate*_mod then
return {polychrome = true}
elseif edition_poll > 1 - 0.02*G.GAME.edition_rate*_mod then
return {holo = true}
elseif edition_poll > 1 - 0.04*G.GAME.edition_rate*_mod then
return {foil = true}
end
end
return nil
end
how is best to let people define their own weights for random edition chance?
then, there's a process_loc_text function you can define on your mod object
this function will get called on each injection
just let people input a float to the edition creation?
I think it would need an order value and a probability
Or you can convert from this method to weights
seems reasonable, I would just be concerned with making sure it doesn't screw with vanilla RNG if nothing else is loaded
But preserving vanilla RNG seems tough if you convert it to weights? maybe?
I guess only if you mess with the order
yeah I plan on coding it so it'll iterate through in order of probability
But what if the text isn't tied to a mod object?
I'm not talking about a modded object
I don't think that's ideal
I'm talking about the object that holds information on your mod
You might want a rare effect but for it not to override Negative
Oh does that mean I have to make the mod have its own dictionnary for those kind of messages?
Using weights makes the order irrelevant, I think I'm partial to that implementation
you can use the exact code you already have, you just need to wrap it in
function SMODS.current_mod.process_loc_text()
end
Man why am I overcomplicating things...
sorry if I made that sound more complicated
no it's tough when there are no docs, I really need to get on them
does process_loc_text get passed anything? might be convenient if it is passed the language the game is using currently
It's my own decision to start updating my mod to v1.0.0 without ressources so I can only blame myself 😅
that information is globally accessible
oh is it? 😅
SMODS.process_loc_text parses language information, using that should be enough in most cases
so current weights would be 1:2:6.6:13.3 (negative:poly:holo:foil)?
it's just G.SETTINGS.language, yeah
while on the topic, why not drop an explanation of this here...
- we first need to find the target loc text. If provided a table, check if an index for the current language exists, else use
defaultoren-uskeys if present. If provided a string or the previous check didn't succeed, use the loc_txt directly - optionally, if loc_txt is still a table and a key is supplied, index by that key. this exists to allow languages to be top-level keys and not have to be repeated for each entry
- at this point, if we end up with an empty table or something that is neither a string or a table, do nothing. else copy the target to the ref table
wait no, it'd be 3:3:14:20:960 (N:P:H:F:Base)
but then poly is 6 is it cant be negative
right?
If you use the ranges [math.huge, 1 - 0.003), [1 - 0.003, 1 - 0.006), [1 - 0.006, 1 - 0.02), and [1 - 0.02, 1 - 0.04) that's equivalent to vanilla, and in terms of weights that's 3, 3, 14, 20, and 960 (for no edition)
I was wondering Aure, since calculate and friends are all inside the SMODS.Joker table, is it valid to use self as the first parameter instead of card as a good writing convention?
If your function weight -> ranges results in this mapping for vanilla, then it should be equivalent
Which should be approximately equivalent to testing if the sampled value x is such that x > 1 - (w1 + … + wi) / (total_weight)
minus rounding errors
Sorry, let me fix that to make it equal to vanilla
There
That might be a bit tricky to check since IIRC different operating systems round differently
should I code in base card weight as 960?
The only alternative I can think of is using a multiple of 960 and multiplying the base weights of editions by the same factor
I'm just thinking of making it so you can choose which editions are included in the random selection, but would that screw up the weights?
so if I selected base, foil and holo, they'd be out of 996
although I guess the ratio of 20/996 and 960/996 is the same as 20/1000 and 960/1000
The game sort of already does this by forcing editions
I think an useful feature would be have replacing and non-replacing weights, in case a mod wants to make no edition cards less likely but keep the vanilla editions just as likely
yeah I can make it so you can adjust the base edition weights
local available_editions = _options or {'negative', 'polychrome', 'holo', 'foil'}
local total_weight = 0
for _,v in ipairs(available_editions) do
total_weight = total_weight + edition_weights[v]
end
```
this should get the total weight from the selected editions I think
maybe math.max{edition_weights[v], 0} or whatever the correct syntax is
Also maybe have the total weight start at 960 but allow it to be customizeable?
but, i tested putting the if below and after the sell check and i got nothing
i really don't know what to do
Suppose the no edition weight is 1, that edition_weights['negative'] = -1, and there are no other editions
You probably didn't write the condition correctly
Or the return correctly
but why would you have a negative weight?
Multiple mods can reduce the weight
SMODS.Jokers.j_sharpener.calculate = function(self, context)
if context.selling_card and (context.card.ability.set and context.card.ability.set == 'Joker') and (context.card ~= self) then
card_eval_status_text(self, 'extra', nil, nil, nil, {message = localize('k_upgrade_ex')})
self.ability.mult = self.ability.mult + self.ability.extra
end
end```
this is how it is
i don't know what to do
wouldn't they just adjust the _mod value though?
which is multiplicative rather than additive
Well, you card does what you programmed it to do, which is to increase its own self.ability.mult when you sell a Joker
They might want to change the vanilla weights in all contexts
Then write code to do that
do i just need to put a return?
I guess, they still shouldn't be negative though
No
Again you need to check if the context is appropriate to execute what you want it to do, which is to grant a mult bonus
so if i do: if context.ability.mult then
I don't think that context exists, so it would never be true. It'd probably just crash because context.ability doesn't exist
context.mult?
No
I think the context would be the same as Stuntman, so maybe try that
Or failing that, Supernova
@fathom raven This is for 0.9.8, which is the latest release, but 1.0 is in alpha
i think i need context.other_card (I'm actually lost, i'm not joking)
and i'm sorry if im making too many questions and being annoying
Thank you!
Probably not, unless you want the effect to depend on a specific card existing
Supernova is also just out-of-frame; after Stuntman there's Matador then Supernova
If you want to do something at the end of a played hand (like all the examples above) you can also use SMODS.end_calculate_context(context) as a cond
(in smods 1.0, it patches vanilla jokers to use that same function also)
By the way, if I didn't mention it, it's missing the assets, so you'll need to add some to make sure it works
YourModFolder/assets/1x and YourModFolder/assets/2x for normal and double size art
@zealous glen does this look like it matches base functionality to you?
function poll_edition(_key, _mod, _no_neg, _guaranteed, _options)
local _modifier = 1
local edition_rate = 1
local edition_poll = pseudorandom(pseudoseed(_key or 'edition_generic'))
local available_editions = {}
if _options then
available_editions = _options
elseif _no_neg then
available_editions = base_editions_no_neg
else
available_editions = base_editions
end
local total_weight = 0
for _,v in ipairs(available_editions) do
total_weight = total_weight + edition_weights[v]
end
if not _guaranteed then
edition_rate = G.GAME.edition_rate
_modifier = _mod or 1
total_weight = total_weight*edition_rate*_modifier + edition_weights["base"]
end
local weight_i = 0
for _,v in ipairs(available_editions) do
weight_i = weight_i + edition_weights[v]*edition_rate*_modifier
if edition_poll > 1 - (weight_i)/total_weight*edition_rate*_modifier then
return {[v] = true}
end
end
return nil
end
the best way to test is to compare a seed with The Soul tbh
I think it looks pretty good
The Soul won't access this function
but good shout, I can use Aura instead
seems to match
https://discord.com/channels/1116389027176787968/1232562163273433088 i believe this is what they meant
I mean both ways work
Well finally ported all of SDM_0's Stuff to SMODS 1.0.0, tomorrow I'm gonna try almost everything too see if everything works properly
Looks good except for rounding errors maybe
The final anaglyph effect looks quite good. How did you do it in the end?
I ended up lowering the alpha value where it's over the top of darker parts of the card so it wasn't jsut drawing all over the top
it still looks cursed on certain jokers but it'll do for now
I need to work out how to get the mod badge on the cards and then I think I'll work on automatically adding tags to spawn jokers in the shop
I don’t think that’s necessary but it could be an example for the Tag API
I'll take a look at Tag API tomorrow and see what I think
is it in 0.9.8 or just 1.0?
i think just 1.0
It wasn't added until 1.0 yea
Nice figured out the modicon too, maybe I won't make it look like a tag if I'm not lazy
how does atlases work i think im doing it wrong(with 1.0 steamodded)
Pretty sure individual sprite doesn't work on 1.0 now
That or maybe you should try using SMODS.Sprite? I don't recognize the syntax you use
I'm looking to make a mod and I need the input to be put into a hex value. How would I go about this? This is what I have atm
left image is the value I am trying to edit
Is there an easy way to make multiple consumables with a similar effect?
I'm trying to make an array of 8 consumables that each apply a different enhancement, and I'd like to have the enhancement as a string inside the consumable and be able to just use that instead of having to copy-paste the entire effect code only to change a single value.
i think theres a way to do it, called like mod_conv or something. try looking at what the vanilla enhancement consumables do
like tower, magician, etc
specifically, look at their config parameter in game.lua
I see how they do it that way, I just don't know how to get it to work in Steammodded
The way I've been doing it is assigning a function SMODS.Tarots.c_disc_mult.use(card, area, copier) for each of my consumables, replacing c_disc_mult with whaever the new consumable is, and I'm wondering if there's a way to make that one function apply to eight different consumables
save the function to a variable var, then set SMODS.Tarots.<card>.use = var
although yeah you can just use mod_conv in config to have vanilla functionality take place
Aha, that looks like it's working! Thank you!
how are sprites set up in 1.0?
i did the thing
Trying to make my joker sprites look better. Any feedback? (Name: Tungsten Joker, Effect: -1 hand size, in 3 rounds, this breaks and creates The Soul)
A rare joker and $10 -> 3 rounds down a joker slot and a hand size -> gets Chicot. I think its fine but im willing to hear otherwise
i'd bump it up to 12 because here's the thing right
if it goes into your consumables slots
the soul i mean
then uh
perkeo could dupe it
over and over
I mean perkeo already breaks everything in half by existing
i'd say just have it pop into a legendary joker, bypassing the soul entirely for that reason
rare joker, 12 big ones, -1 hand size, 3 rounds
that should be an appropriate cost for a legend
Hmm, i thought about the perkeo synergy but never really considered the wider implications
i restart my runs until i get atleast 17 perkeos, anything else is a dead run tbh
if you dont have 26 triboulets are you even playing balatro
30 chicots -> The Manacle -> 29 permanent hand size -> naneinf
456 Jimbos -> Lose ante 10
74 vampires -> only scale one for the entire run -> die
I feel we've veered off topic here
ok welp im back on it
``function SMODS.INIT.Alizatest()
local loc_Testcard = {
Testcard = {
name = 'Testcard',
text = {'test'}
}
}
local Testcard = SMODS.Joker:new(
"Testcard",
"Testcard",
{extra = {x_mult = 10}},
{x = 0, y = 0},
loc_Testcard,
2,
1,
true,
true,
false,
true,
nil
)
Testcard:register()
local sprite = SMODS.Sprite:new("j_Testcard", SMODS.findModByID("ALIZATEST").path, "Alizatest.png", 71, 95, "asset_atli"):register()
-----ok im gonna calcuate this now and pray it dosent break ok cool go
SMODS.Jokers.j_Testcard.calculate = function(self, context)
if SMODS.end_calculate_context(context) then
if (context.scoring_name == 'Full House') then
return {
message = localize {type='variable',key='a_xmult',vars={self.ability.extra.x_mult}},
Xmult_mod = self.ability.extra.x_mult
}
end
end
end``
trying to find out what is wrong
same eror r
ive done lots of tweaking still cant figure out
is anything like painfully obviously messed up
error im still getting is main.lua:1351: bad argument #1 to ipairs [table expected, got nil]
goooood morning
mornin
what is everyone up to?
stone card (rank 50)
how is it not?
i don't know. i genuinely don't know.
ah, it's probably because T: only works for decks for
some reason
BTW @frosty dock how do I check if a card is in the collection or not?
that's a common? it seems pretty strong
or is that just for testing purposes
does anyone have like a step by step tutorial on how to make a mod, even a template or dummy mod would do
i wonder why you don't add a tooltip
testing purposes
i'm trying to
(pretty sure i remembered to click "OFF" that time)
i mean it sounds fun to build into
yeah, and all it does for score is allow you to make better hands with stones
like, that's good, don't get me wrong
getting easy-ish access to 5oaks sounds nice
standard packs always feel like they're drowning in stone to me, too
ah yeah, i forget standard packs can give that
i mean its not clear how it plays out to me, exactly
it's a really good stone support joker
both tower and death let you create stone cards which means you are filling up your deck for 5oak a bit less than 2x as fast
but only really good if you have a way to get stones
death is already the kind of 5oak
yeah but i felt like it was worth mentioning
you're not reliant on pulling just one tarot
yeah, it's not hard to get stones
ofc you start with 0 stone
but it's also not always possible to get stones
i think another thing that makes it a bit less appealing is that stones already give you a ton of chips which is often the primary motivation in using high scoring hands
i got it working!
does anyone know if it's possible to change the texture of one joker without changing the texture of another joker of the same kind?
make sure you set enhancement_gate 
set what now?
you can modify card.children.center
on the joker, enhancement_gate is how e.g. Lucky Cat and Glass Joker only appear when you have the matching card enhancements
i think you can set card.children.center.pos directly but dont quote me on thay
and card.children.floating_sprite for soul_pos cards, if that's your goal
oh great autumn
could you help me with something?
collection is tied directly to G.P_CENTER_POOLS
i meant like, if a certain card is in the collection UI right now
cause i want to change its loc_txt accordingly
(also, there's an issue with the loc_txt method in consumables, you cannot access the data inside card.ability with it)
so you can't really make it dynamic
card.area == G.your_collection probably
I actually pass the card as another argument
self, info_queue, card
can't just be card, info_queue because the card might not exist
ohhhhhhhhhhhhhhhhhhhhhhh
maybe
that explains a lot
what is it
I did only add that recently though when implementing nonconsumables
i love nonconsumables
all I wanted was a card that shatters after using 5 times, and I needed the card to display state
it is interesting that that was not standard functionality but ig i understand why
nothing uses it
aure would you be mad at me if i made like three coremods needed for thac to have full functionality lmao
it's not something I approve of, but don't expect me to be mad over any kind of mods you put out there
i jest
tbf one would be oddityapi which like, has a justifiable reason for being separate
nevermind.
same with another one but that ones a seeeeeecret ;)
xd
and then like one to add mechanics and frameworky stuff to use between my mods bc im cringe
btw seal jank should be gone, but I haven't tested anything with putting them on jokers
hm... I did still wanna add some way to make stickers mutually exclusive 
stuff like non-chips permaboosts, xchips, couple other ideas
bites

i mean ill make the mod and if someone smarter than me wants to merge shit from it into smods then go ahead lul
i just know how to make the funny joker poker do funny things idk what this github sorcery is
you have to iterate thru G.your_collection to check if a card is in collection
G.your_collection is a list of collection card areas
yeah i ahve it
now i have one more issue...
the use button is at the bottom of my consumable
and i have no idea why
it might be a cardarea issue
but i dont think so
wtf
did u try the thing i said tho
also I noticed that if you use the "gain 2 <something> card" you always get 2 different cards
is it possible to change it so it could give you the same two cards?
like, it's probgably a pseudorandom_element thing
something something get_current_pool
is there perhaps something in the consumable type that i can change to fix that?
you can probably look for where it says next(find_joker("j_showman")) or whatever right
the pool is chosen correctly
youll need to inject something in that function so it doesnt omit cards you already own i think
the get_current_pool doesnt do that
uhhhhh it doesnt? if it checks showman it definitely does, cuz thats what showman Does
okay i was wrong
Can't you create a card and use copy_card or is it a shop behaviour?
ok i might actually start porting morefluff to 1.0 now
yessssssssssssssssss
okay found a patch for it
looks like a scarab
Things are progressing smoothly
Oh neat
oddities.....
yeah i play with it on XD
me when i pollute my pack pool
XD
actually... do you have some items to come with the pack pool?
uhhhh
XD jk jk
like for starters im at work and secondly thac is a MESS rn
TOCK BY TICK
I still need to think of some crops for the other "card groups"
oh peas is a good one
Sunflower for Fibonacci?
cherries for twos is an obvious one
true
Hearts - Beetroot
Clubs - Cauliflower
Diamonds - ?
Spades - ?
Face - Pumpkin
Numbered - Grape
Even - Cherry
Odd - Pea
Ace - ?
Stone - ?
carrots could work for spades because they're kinda pointy
and potatoes for spades? (spuds)
hm
Iirc Apple was suggested for Ace?
What about spades being a literal spade that counts down to breaking?
it was, i am thinking about it
im a spade that counts down to breaking down
hm, i feel roses / strawberries fit more for hearts
more than beetroot?
hm
flowers arent what hes going for i feel like
fair enough
im more going for generic crops
though... if someone wants to add a crop that works with color cards...
adding a tulip can be fun
tbh I still need to add this to Steamodded, as a setting or something
maybe I'll figure out mod settings first
will steamodded 1.0 have a pack api?
Like you’re using the spade rather than growing a plant
Although I might be misremembering the initial idea of crops
you grow the crops, and when they are fully grown, they give a passive chip buff to a card group
Yes then a spade wouldn’t work
will the cards have multiple sprites as they grow?
they do!
nice
Perhaps there could be a tool that enhances the bonuses for X rounds
i was thinking about adding a "gardening tools" consumable type
sunflower for fibonnaci would be fun
with stuff like a watering can to make them grow faster
That would be neat
coffee bean gives all cards a 1 in 4 chance to retrigger (or so)
I was imagining it as for example fertiliser giving double chip values for 3 turns or something like that
that can also be fun
a chilli could upgrade all hands maybe
although that's kinda different to the other cards
I'm planning on adding one, I'm just not sure when
if lovely 0.5 gets a stable release soon, I could see it as a 1.1 feature
It’s cool for api’s to use lovely injection right?
I try to use lovely injection as much as possible, yeah
I don't bother if the function is more being replaced than modified
Good, that’s how I’ve been working for editions
and this is in their own cardarea?
i feel having fewer card slots could encourage committing to specific crops instead of just taking all of them that you find
federrrrrrr how do crops work again
What is this wizardry
i forgor
what's pumpkin's current effect?
they take a few rounds to grow. when they grow they passively buff a group of cards
when you play a face card, it scores another 10 chips
they last indefinitely once growed up?
yes
cookie clicker garden minigame
have to hold it X rounds then its good
not that far off lmaoooo
And they stack too?
yes
will they always act as if showman exists
yes
i sure do like playing +110 chip kings
banger mod certified 💯 hot 🔥 🔥 mod of the year +10000000 social credit points
SMODS.Jokers.j_sharpener.calculate = function(self, context)
if context.selling_card and (context.card.ability.set and context.card.ability.set == 'Joker') and (context.card ~= self) then
card_eval_status_text(self, 'extra', nil, nil, nil, {message = localize('k_upgrade_ex')})
self.ability.mult = self.ability.mult + self.ability.extra
end
end
SMODS.end_calculate_context(context)
if context.before then
if context.other_card then
if self.ability.name == 'Sharpener' then
return {
message = localize{type='variable',key='a_mult',vars={self.ability.extra.mult}},
mult_mod = self.ability.extra.mult
}
end
end
end```
i'm actually starting to become a joker myself
i can't stop laughing because of my low intelligent brain
wahey, we have a prof.jkr parser
I probably need to dig into the source to work out what the following fields are:
- planetariumUsed, tarotReadingUsed - I imagine these are cracking the relevant packs? but then there's not an equivalent field for cracking joker packs...
SMODS.end_calculate_context(context) returns a boolean so you need a "if SMODS.end_calculate_context(context) then"
SMODS.Jokers.j_sharpener.calculate = function(self, context)
if context.selling_card and (context.card.ability.set and context.card.ability.set == 'Joker') and (context.card ~= self) then
card_eval_status_text(self, 'extra', nil, nil, nil, {message = localize('k_upgrade_ex')})
self.ability.mult = self.ability.mult + self.ability.extra
end
if SMODS.end_calculate_context(context) then
return {
message = localize{type='variable',key='a_mult',vars={self.ability.mult}},
mult_mod = self.ability.mult,
}
end
end```
this is working
but when i play a card with 0 mult
it says 0 mult
lol
its activating the mult even if it is like 0
i can probably make it recognize the upgrade context?
You can add an and and a check for strictly positive mult
requisite from old demos I'd assume. there was only planetarium and tarot reading, which were similar to what's now celestial and arcana packs
aha, thank you!
it's well possible they're just obsolete, or used for some sort of stat tracking
I think you're correct in the old demo thing
an and after the (context) box?
does posting stuff i made to show off go here or #⚙・modding-general
either really
@shell timber what do you think about having a tulip that decreases the round count it takes for color cards to recharge?
I figured here was for technical stuff and chat was for general stuff
but that's further in scope
is there an example of that?
Actually in hindsight you probably shouldn’t need one. I think the return array has one key too many
is there a template for a simple mod that adds a joker/consumable lying around or do i just have to start from scratch
what steamodded version?
I have one
It’s just missing the assets
this is how this code is working
SMODS.Jokers.j_sharpener.calculate = function(self, context)
if context.selling_card and (context.card.ability.set and context.card.ability.set == 'Joker') and (context.card ~= self) then
card_eval_status_text(self, 'extra', nil, nil, nil, {message = localize('k_upgrade_ex')})
self.ability.mult = self.ability.mult + self.ability.extra
end
if SMODS.end_calculate_context(context) then
if context.scoring_hand then
return {
message = localize{type='variable',key='a_mult',vars={self.ability.mult}},
mult_mod = self.ability.mult,
card = self,
}
end
end
end```
i just want a way to make this guy recognize he has a mult
bro be like +0 Mult 
put the return into if self.ability.mult > 0
That’s what I initially suggested but it shouldn’t be needed, since I don’t think any of the Jokers that trigger similarly do that
The output should evaluate the Mult is nonzero by itself
So I think the return has a key too many
i think it only checks if it exists not if its nonsero
I can’t check it right now, but from this screenshot I’m guessing the vars key is superfluous
Since Stuntman returns chip_mod
Isn't that still better than the dagger?
depends but usually yes
yeah because you can dump more money into it faster
dagger is only one per round, whereas with this you can buy-sell like for campfire
and its permanent
man dagger should be buffed ngl
I made a Joker that gains +10 Chips or +1 Mult be Joker you get
the once per round really does hinder the dagger so much
Not exactly the same trigger but it seems close enough
@frosty dock viewing the deck during The Plant crashes the game
yes it is an smods issue
at least i'm 90% sure it is
weird one, I'll have a look
is there a way to put that Gold card message in one of my jokers?
Yes, check out the Steamodded wiki
I should add those too cuz I never thought of doing so 🤔
the sharpener now have a nice color
how do you set these colors?
oh pog, I didn't think that worked on names as well
I mostly wanted to know if it's something I should support on the Steamodded side of things
it's neat that it just works™️
Has anyone figured out dynamic sprite loading in SMODS 1.0.0? trying to create an atlas for each sprite is proving to be quit a bit more complicated than i expected.
Just use a spritesheet
i am heavly against a spritesheet as it makes git integration harder, and requires needless hardcoding of pos values.
hardcoding of pos values doesn't seem any worse than hard coding atlas names
i'm not
my intention is to automatically set atlas names by image name and center name, so they just have to be named the same thing.
I recognize this as bad practice, which is why this is no longer officially supported from 1.0 onward. With automatic mod prefix integration, it would then be required to reference a mod prefix on each sprite registration
Why is it bad practice though?
it introduces a bunch of overhead
and hardcoding mod prefixes isn't something I want
break_infinity progress update
pog
huh I didn't know that worked
yeah it works fine
I did make a custom tooltip for Credits, but I don't necessarily think it should be supported by Steamodded
crosscode mentioned
btw i don't have any ideas for the ability right now
🤔
other languages support?
1.0 is meant to have localization in mind
so uh, I don't think I can have the mods UI be english only
one question about 1.0. its gonna have a way to disable mods without having to remove it from the folder?
I'm on it
It's a bit difficult to do, but if aure says they're on it 👀
yeah, i will update to 1.0 when it gets out of the alpha
it's gonna require reloading the game for pretty much anything that has side effects that aren't easily reversible
the bottleneck here is mostly preventing lovely from injecting disabled mods
i'm already familiar with reloading the game. (especially with crosscode)
yeah it probably shouldn't be this annoying
i like the options called ERROR, ERROR and ERROR
at the same time though it gets the point across
for context, I used an empty default so mods that add languages can include these dictionary items in their loc files
maybe that's not the best idea
also are you getting regex debug prints in the console?
unchanged
one question. its possible to make the X:mult appear in names?
like the background
red background with the white letters
I didn't even know you could change name colors lol
fixed
if it doesn't work outright you might need to hook or inject to make it work
i already tested btw
@frosty dock have you seen this btw? https://github.com/anton-kl/lua-hot-reload
it just doesn't show nothing. it just appears the regular name
and if it has spaces, the X:mult will remove it
i haven't, that does sound interesting
Idk where this is stored in the game's files
uh that looks about right...
i pretty much tried to reload a bunch of files and then call G:start_up() again
the game sort of launched itself, but still keeping a bunch of stuff from the original
not sure why it'd be in triplicate, but here I am
still getting the same error, but the mod dupes are gone
It's actually a function that processes it, but I think if you wanted to add this effect to Joker names you'd have to manually edit them object representing it
peak mod NOT installed
true
epic
is there a way to change the colour variables in the shaders folder? for example, turning the foil edition red.
I've kept trying to get this to work but have had no luck so far, is there anyone who might have some pointers?
oh yeah that reminds me of something I wanted to test
😭
:l
I have no idea why this has happened
without the tooltip the text is fine
but with it, it vanishes
0.9.8 jank
try with a loc_def function on the spectral that just returns {}
1.0 with lovely swiftly avoids such problems
this has solved the problem though
for bugs like this one? yeah, it might well be
depends on if you wanna deal with the absence of documentation and potentially some more breaking changes
hmmm
I'm not sure what else to add right now outside of alternate effects which I think would be smoother with lovely
should I add taking ownership of base editions?
either you already register them to begin with and use your API as the only system (this is what I do for suits and ranks), or your API exists alongside other code for vanilla objects, then taking ownership requires more work
right yeah that makes sense
I think preregistering them will work better in this case
and just to check, when I do SMODS.Editions[self.slug] = self in register, it adds the meta table that's set up in new?
just asking again. is it possible to change it through my mod and not editing the source files? i can figure out what changes the colours, i'd just like to know if/how i can
the text is just overexposed /j
Yo what's good Edward Elric? (Y'know... Alchemy)
I’m good
I guess it's morning now (since it's midnight)
Designing base Vegeta's Base Joker art
omg feder hiiii
Hiiii
is the harvest looking good this day
Yes it does!
thats nice
It's night for me but good
i finished all my exams :0
don't get the results till July🫠
oh XD
hi feder
hiiii
finished all but 1 exam
last is mandarin :P
oh you learn mandarin
that's really cool
yea, its an option between that, korean and arabic
though both the batch above and below me got french and japanese which i kinda wanted
oh cool
lets gooooo 🎉
accidentally made several copies of cards that i can just drag around and do nothing else with
vibe
thats what happens when you dont :remove() things and just let em idle around forever
but also aesthetic✨
same thing happens with text (not the draggable part)
Next April fools mod should have this happen to any base game effect that creates cards.
xdd
graveyard eating good tonight
next april fools mod should turn the game into spider solitaire
true
Solitaire
yeah that was my first thought too lol
mod where your deck does the solitaire thing when you win a run (real)
i just had a wacky idea for a new hand
Solitaire Straight - a straight, but each card is of a different color than the two cards before and after it
so
H9, C8, D7, C6, H5 is a solitaire straight
Does …Cn, Sn… work?
n is just whatever number
Or does it recognise as red and black suits
it does recognize suit colors
like how in solitaire you have to have different suit colors on each other
So spectrum, but able to be done with 4 colours and with no strict requirement of having all the suits
Different colours than the two before just so checkered deck gets shafted
nah checkered deck is best with solitaire straight
caues you can do it with just 2 suits
one black and one red
Oh wait I misread
I thought it’s looked at {H9, C8} [D7] {C6, H5}
the existence of solitare straight implies stuff like solitare house and solitare five
the reason solitaire straight is the only one is since this is a valid solitaire play technically
you cant have 5 cards of the same rank one after another when playing solitaire
then why specify it as a straight?
i should just call it solitaire?
i am not sure whether i will give it a new poker hand, or a new joker for my (planned, not sure if i will make it) "card games joker collection" mod
https://gyazo.com/f0eeacc1f21190276784c55fcbbf782b.mp4
you can now place crops using the debug menu (also new crop alert!)
i am not sure about that yet, but since the grape is a counterpart to the pumpkin, they give the same chip count
do it
shit i still need to peek how aure does spectrums in 1.0 actually
ohh no i dont need to plus i have my hands full updating
XD
i actually feel so stupid not knowing how to make cards score in 1.0 hand api
like genuinely i cant crack it
i can make the hand be playable but cards wont scote
the main issue is that modded suits have no concept of color
and given that thac actually will be adding suits soon...
wait it will?
yeah lol
which?
i showed Minor Arcana a while ago rember
oh that was for thac?
thac is my content mod
fusion jam when btw
if its not a whole project based on something else it goes in thac
like Emojiokers and Balatro of Isaac are separate
shhh....
me when i have to add jokers to thac: 
(for the suits!!!)
yeah thac on my end has like 8 modules now its nuts
moreconsumables, basicoddities, jokerstamps, suits, blinds, tags, enhancements (still pending updates from enhanceapi orz), pokerhands
oh and decks
hey, I see lots of modders are active. How are people doing with Steamodded 1.0? What's good, what's bad, anything particularly painful or confusing?
steamodded 1.0 is so much more convenient to use imo
setting stuff up is a breeze now that i can just put it all in a table initilizating it
- its generally a lot cleaner to use too
sounds great!
it also includes some very popular apis and implementations that you had to do by hand beforehand
which helps a ton
ok, I'm actually asking for API Design best practices! yeah I specialize in that, maybe
really hope Steamodded 1.0 releases soon. I'm so impatient, I'm contributing to it myself
it is pretty cool other than all the parts that didnt work that i had to wait for fixes and now have to wait to try out i hate capitalism
(work work work x.x)
tablecalls are based tho
i actually was the one to suggest it, as memory serve
i do find the new poker hand api confusing
to the point where im just kinda in waiting mode til i can get a working example
speaking of documentation... there is none for the new seal API
there is none for like anything lul
yeah, that should just be like the straight equivalent of "royal flush"
Anybody here know if there's any documentation about making my own jokers, or reskining jokers that are already in game?
#1228599493914656788 message this is joker api documentation for steamodded, might become outdated soon with 1.0.0 but still worth to mess around with anyway
reskinning jokers? you'd probably have to overwrite resources/textures/Jokers.png via a mod. i'm not exactly sure how you'd do that though
ah, did some digging and found something from- yeah! Sorry I had to ask that. just didn't know if someone had made a guide saying how to do it.
yeah dw about it 👍
okay, just gonna give you a quick tutorial on how to edit existing Jokers for steamodded 1.0, because it's something i already know:
1.) Initialize a variable for the existing Joker to this: -> SMODS.Joker:take_ownership("j_[key]",{set = "Joker",name = [name], key= "j_[key]", loc_txt = [loc_text]})
j_[key]is the joker's key that always starts withj_in the vanilla game ("j_sly", "j_jolly", etc)nameis a string detailing the joker's display name.loc_txtis a table of strings, detailing the joker's description.
2.) Use this line to simulataneously initialize and register a sprite: ->SMODS.Sprite{key = "j_[key]", path = "j_[key].png", px = 71, py = 95, atlas = "ASSET_ATLAS"}:register()
3.) Use the following format, replacingjwith the name you used for the variable you initialized in Step 1.
j.lc_atlas = j.key
j.hc_atlas = j.key
j:register()
you dont have to put in like name and key in the table part
<@&1133519078540185692>
🤯
🪝🐟
you only have to put in what you change
itll default to what the joker has normally
🔫
i mean, fair?
To quick for me
And me!
don't you have to get rid of :register() in newer versions of 1.0.0?
they will last at most 5 minutes before being permanently debuffed
i typically change the loc_text for every joker i edit, soooooooooooo
this is more relevant when you get multiple mods taking ownership of the same joker
we might be eternal?
wait, do you?
for example in emojiokers i take ownership of a lot of jokers to add yes_pool_flags to them
Only local and the playstack crew have Eternal
that doesn't feel right, given that sometimes you're going to want to do things with your jokers before you register them
you know, initialize their variables based on a table
just put it in the table then?
but yeah :register() is called as part of the constructor now
if you really need to modify them after that for whatever reason you can still use SMODS.Jokers
but i cant think of a single thing that you'd want to do in between having a joker object and registering it anyway
bear in mind that you can literally put any values you want into the table that you pass to the constructor
(or to take_ownership, functionally the same)
...alright so.
-
where do I find a list for the "J_[key]" for vanilla jokers? Just so I don't have to go out and find them.
-
uh, what part of step one sets the variable? for when I get to step three, I would assume the [name]?
you can use 7zip to open Balatro.exe
i... can? huh
game.lua has a function Game:init_game_objects with a mammoth of a list of everything in the game with most of its information
Maybe en_us.lua is easier since you can search by Joker name or text too
it is moderately annoying to use but it is functional enough
And it's formatted as slug = {name, text}
and for the second part: local whatever = is the name definition.
yeah, either or works
but sometimes the names are different in the internals
mostly ones with extended characters, like Séance
tried a bunch of stuff but this doesn't seem to be working...? is there any way to see what the edition is requesting for its label
oh, apparently
you're not allowed to edit that outside of a process_loc_text function
That's 1.0, no?
o
yeah in 1.0 you need process_loc_text
You should be able to edit the localization dictionary directly in 0.9.8
otherwise smods doesnt mess with localization stuff so you can just do that
I say should because I have issues with it sometimes
In 0.9.8, this is the whole code of Fish mod
--- STEAMODDED HEADER
--- MOD_NAME: Fish
--- MOD_ID: Fish
--- MOD_AUTHOR: [Victin]
--- MOD_DESCRIPTION: Changes Flush Fives into Fish (Five of a Flush)
----------------------------------------------
------------MOD CODE -------------------------
function SMODS.INIT.Fish()
G.localization.misc.poker_hands['Flush Five'] = "Fish"
sendDebugMessage("Loaded Fish")
end
----------------------------------------------
------------MOD CODE END----------------------
alright, I got the card I want to do, now time to parse what all of this means heh
mod name: fish
mod id: fish
mod author: fish
mod description: fish
I'm not fish but pretty much
Now, is this close to correct? Or did I miss something?
i do that with most of my mods tbh except that author is "AutumnMood (it/she/they)"
writing a description is for nerds
oh, ignore that last bit after the code end, I was just copy and pasting the card I was wnating to do
tysm probably saved me another couple hours of headache
kinda close
sorry to keep using this channel as a stupidity dump
that is what it is normally
If you want to DM me to keep it cleaner, I don't mind
become fish
Best I can do is become Aradia
1.) 1.0 doesn't have any init coding. so replace function with local FatLuckyCat =
Done
2.) remove the loc_txt = [loc_text] bit entirely, that's only if you're going to change the description
I can just evolve into a mammal again
other than that, i think that will run fine
thats not even being a fish tho right... shes not even a sea dweller...?
did you even establish if he's using 1.0
So this should work here? and yes, I have an assets file set up, with both 1x and 2x in there, [though 1x doesn't have an image yet]
Does it matter if the image is one card or not?
didn't seem to work
oh, the name part can also be removed
and set has to be "Joker"
if that doesn't work, then i have a backup plan
Testing this code now
Still nothing
But yeah, all I'm wanting to do with this is just replace the Lucky cat with a different png, as I'm sure your seeing me try.
balatrostruck suits in thac
@narrow pollen [if you didn't see the fail, sorry for the ping if you have seen it]
--- MOD_NAME: Fat Lucky Cat Reskin
--- MOD_ID: FLCR
--- MOD_AUTHOR: Flint-Code
--- MOD_DESCRIPTION: Reskin of the Lucky Cat
----------------------------------------------
------------MOD CODE -------------------------
SMODS.Sprite{key = "j_FatLuckyCat", path = "j_FatLuckyCat.png", px = 71, py = 95, atlas = "ASSET_ATLAS"}:register();
SMODS.Joker:take_ownership("j_lucky_cat",{set = "Joker", key= "j_FatLuckyCat", hc_atlas= "j_FatLuckyCat", lc_atlas= "j_FatLuckyCat"})
----------------------------------------------
------------MOD CODE END----------------------```
maybe try this?
all this is showing is that i'm going to need to rewrite my own joker initialization code
also, does the image have to be a set size?
.......oh uh
btw you should just use atlas if you don't have hc/lc versions
yeah, that's fair
give me a sec, shrinking the image then. lol
Exactly
i didn't know whether lc/hc was necessary
1x should be 71 x 95
2x should be double that
142 x 190
THat may have been in issue, yeah one sec let me fix this then do that code up top
it's only needed for playing cards
that's fair!
--- MOD_NAME: Fat Lucky Cat Reskin
--- MOD_ID: FLCR
--- MOD_AUTHOR: Flint-Code
--- MOD_DESCRIPTION: Reskin of the Lucky Cat
----------------------------------------------
------------MOD CODE -------------------------
SMODS.Sprite{key = "j_FatLuckyCat", path = "j_FatLuckyCat.png", px = 71, py = 95, atlas = "ASSET_ATLAS"}:register();
SMODS.Joker:take_ownership("j_lucky_cat",{set = "Joker", key= "j_FatLuckyCat", atlas= "j_FatLuckyCat"})
----------------------------------------------
------------MOD CODE END----------------------```
then that should work, @night meteor
oh thanks! sorry, was solving a new issue that gimp was Inverting the colors of the card for some reason ...but I've soved it now
Resized, added the code in, lets see if this works
STill nothing.
and I have the correct sizes under each of the assets 1x and 2x folders now.
Also the mod is not showing up in the mods list, if it would show up there
and also as you can see up top, i am on .9.8
oh, did I... faceplant
save that code, though
HAH. thanks, yeah I have it saved
you could literally download the alpha from the github rn if you wanted
and use that
...the alpha?
btw author needs to be in brackets like --- MOD_AUTHOR: [Author], your code would get ignored over it lmao
ah
that's the only reason it doesn't error
where's the alpha on the github for steamodded?
also I guess this is what happens when you run aplha code on .9.8?
[all I changed was putting my name in brackets
[er, Author name]
alright, got the zip and... ah, I see it's just the git up set of stuff.
reading up on the Lovely injector
Still this error, failing to get the field sprite it seems
probably!! theyll be balatrostuck support~
...ok so I don't know how to install the Ahpla.
the .9.8 inject method works, but
https://github.com/ethangreen-dev/lovely-injector?tab=readme-ov-file#manual-installation
Following this gives me nothing [just the normal 1.0 vanilla game
[and yes, I did verifiy before launching wiht the version.dll in there]
do you have:
- the version.dll file in the folder with Balatro.exe
- steamodded's files all in their own folder in your Mods directory
i do not see Steamodded
banger
We in boys

