#💻・modding-dev
1 messages · Page 209 of 1
for k, v in (context.scoring_hand) do
oh yeah
should i call for ipair
it's ipairs
okay, ill try that
it doesnt change after scoring but instead its doing it before
yeah, you want to use the eventmanager to solve that
aw shit, something new i gotta learn
the animations and the calculations are separate concepts, so even if you change the suits in after, they will visually change before, even though they get scored afterwards
ten bucks if you do it for me /j
If you can't find a mod that does it better, you can check Kino's code for the Benjamin Button joker, which changes ranks after cards are played, but it's a finnicky thing to make look really smooth. Though most people that play mods play on speeds so high they'd barely notice anyway 😛
do you think i could just move my code into an event and it would work
mostly, yeah
I can't say I fully understand the timing of events, so I wouldn't trust my words too much, haha
ill do it later, i need a little nap bc i did so good today :3
but really it's just a tool to help with timing
Is it in smods?
on an entirely different note, has someone messed around a lot with tags? I'm implementing variations for confections, which currently function by creating tags, so I'm wondering if SMODS already has systems to take care of passing information on to tags or if that's something I'd have to whip up
You can check here. Not sire if everything will be there
new modder here, I don't know what I'm doing
yeah, no, I've checked that out already, haha
right, sorry
I meant like in the file explorer haha
[mod folder] \ assets \ 1x
also in 2x?
Ive gotten this heads up, the files "can" be suspicious
yes
oh that was more meant as a general warning? I thought it was more of an accusation haha
alright can you just go to assets, start a command line and do dir /s /b?
Yeah, no accusations.
yeah that makes more sense then haha
should reply with something like
...\assets>dir /s /b
...\assets\1x
...\assets\2x
...\assets\1x\icon.png
...\assets\1x\sleeves.png
...\assets\2x\icon.png
...\assets\2x\sleeves.png
...\assets> dir /s /b
dir : Cannot find path 'C:\s' because it does not exist.
At line:1 char:1
- dir /s /b
-
+ CategoryInfo : ObjectNotFound: (C:\s:String) [Get-ChildItem], ItemNotFoundException + FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.GetChildItemCommand
how do I do command prompt?
I hit right click > open in terminal and it gave me powershell
if you go to your assets folder in windows explorer, go to the url bar and type cmd, then press enter
yeah it was gonna be something like that
I love when people send me error logs and I'm unable to reproduce the issue
I've gotten into the habit of asking people to please reproduce it themselves
since sometimes I just get error logs with 40+ mods
Hey man the game crashes whenever I alt+f4
LMAO
lmfao
I would at least get a good laugh out of that
I feel like my main player base is people playing in Dimserene and just DMing me a crash that is caused by 50 mods fighting for dominance over a hook
yeah that's always fun
Dimserene's pack is a cool idea but it's so hard to make a modpack work if you're not gonna edit the hook/patch code to play nice with eachother
the answer to this is probably incompatibility with other mods they have installed
i personally have like (1) experience with Lua and 0 clue wtf im doing but im gonna make... something work
trust me
Do you have experience with other languages?
very minimal LOL
Anything helps honestly
I do wanna find a suite of mods to make Kino really compatible with at some point, but I honestly wonder what the experience is for people playing Dimserene and finding Kino jokers. I guess most of them are just jokers with pixelated art, and then some are so tied to kino mechanics that they're just useless haha
most ive got experience with is roblox's version of Lua and then http/css/python/js shenanigans
but in reality im Trash at all of the above
Ah I see
but dw... im here to cook.
python is like decently close to lua
Lua is pretty easy to pick up regardless
lua is like python but even more words
It actually works surprisingly well tbh
which might help cuz words do what it says it do
Huh. Fascinating
my adventure using Lua on roblox ended when i got to metatables because wtf... im not built for turning Lua into an OOP language
lmao
and now I return to: figuring out how to destroy a card as a blind effect
...Lua is an OOP language?
roblox's version is very commonly used as such, but on its own no
with metatables you can pretend it is
yeah
Interesting'
You can definitely make it crash if you really try to, but if you just try to play a normal run you'll probably not crash haha
i keep forgetting its LuaU so i just say roblox's Lua 😭
iirc Dimserene was looking at adding Maximus and with the amount of patches I do with that mod I'm scared of how it interacts with other mods
Okay, so I'm trying to mess around with my Confection consumeable so they can be enhanced. Those consumeables are really just tag spawners, so I'm passing on info to a Tag:set_ability(), but it keeps reading the integer I pass into it as a table. Or rather, I'm passing a table somewhere but I'm not smart enough to see where
is there a SMODS table that stores all consumable cards like SMODS.Stickers is? i feel like it should be SMODS.Consumables but it seems to return nil for me
like this feels like a lot 😭
anyways, is there documentation handy anywhere for starting with delving into balat modding
Absolutely
I was poking around your code earlier today and yeah, you do a lot of cool stuff with lovely
https://github.com/Steamodded/smods/wiki there u go
thank you kind cat(s)
not on my screen u didnt
wtf lmao 😭
Yeah lol

good news is I can already see you can remove some of those patches lol
Like what?
bonus_mult is now implement in steamodded itself, see https://github.com/Steamodded/smods/pull/490
I already phased that out lol
holy shit really
that's so nice
anyway when are they adding calc_dollar_bonus to decks
oh I wasn't looking at the dev version haha
When someone who wants it makes a pr
I'm so sorry Lars it was customary 😭
ugh working on it
getting 98%'d for no reason I can't believe it
Dealing with homework rn
my game keeps crashing at end of round when i have talisman enabled...
Oh hey I have the exact same patch as you do lmao
Which one?
https://github.com/the-Astra/Maximus/blob/dev/lovely/highlight_limit.toml#L16 and https://github.com/larswijn/CardSleeves/blob/main/lovely/expected_to_fail.toml#L18
aka
[[patches]]
[patches.pattern]
target = "functions/button_callbacks.lua"
pattern = "if #G.hand.highlighted <= 0 or G.GAME.blind.block_play or #G.hand.highlighted > 5 then "
position = "at"
payload = "if #G.hand.highlighted <= 0 or G.GAME.blind.block_play or #G.hand.highlighted > G.hand.config.highlighted_limit then "
match_indent = true
times = 1
yeah... honestly that wouldn't be bad to just include in smods itself
help me... modded balatro sages...
It'd help a lotta people
the fact that the 5 is completely hardcoded sucks lol
I am trying to make a joker produce DNA joker when playing a hand with a scoring set of specific ranks
and yet it crashed every t time! ahh! how do i make it work please
@wintry solar seems reasonable to include in smods?
The even more funny part imo is that even if you get the highlight limit stuff going, Psychic doesn't activate if you play a hand larger than 5 cuz it checks for >= 5
I’d rather it refer to a different variable rather than the highlight limit
Allows you to decrease it more cleanly too
are the cards I've already used or discarded in this round stored in some table?
Whilst not limiting discard size
can_discard doesn't even have a limit for some reason 😭
struggling with doing proper talisman compatibility for my mods over here whys it gotta be so complicated 🥲
felt
I was wondering why it worked out-of-box on my Six Finger deck. I never remembered patching that LOL
It doesn’t, but if you wanted to limit played hand size to say 4, this patch would conflict with being able to discard 5 cards
i'm sorry to big number enjoyers but i ain't doing talisman compat that'd kill me ❤️
I might take a look at making them easy to modify this week at some point
I mean, not any more difficult than it currently is haha
heh
should start with an eternal squareman
I think that's different from what eremel meant?
It is
I think I see what you mean now?
In theory you could have a blind that only allows you to play X cards at once
That shouldn’t change how many you can highlight
It just shouldn’t let you hit play if you have more highlighted
it'd be #G.hand.highlighted > G.hand.config.play_limit (or similar) instead then right
is there a way to check for the target hand of a planet card? I'm trying to make something that has a chance to level up the Planet hand a second time after one is used
So, the set_ability() does receive a 'chocolate_bonus', but somehow it's the tag itself that gets passed through. I'm not sure how that happens, and digging through the code's not really making that any clearer for me
I have a similar effect planned, but my plan was to try and run the Planet's use code twice
I think you can check the card.ability.hand_type
Because in principle Planet cards could do anything
I think it’d be G.GAME.modifiers.play_limit and discard_limit
so uh what's that lovely dump thing kids are doing these days and where can i get it
mods/lovely/dump
ah schweet
I am attempting to make my humble jokester my humble jester to make the dna AID ME when possible please :3
how do i remove a sticker >_<
it took me a single patch...
bro talisman really out here breaking the game over function 😭
what the fuck
this is where the crash happens only if talisman is running
like 2569
turns out it's a lot easier to solve problems when you aren't burnt out from coding for a week and a half straight
Let’s normalise not using talisman
Ugh but it'd break any complicated patches currently targeting that line*
honestly yeah
So would any changes to that line
why do we hate talisman?
mostly just tryna fix some issues because a couple ppl tried my mod with cryptid soooo
Yeah that's what I mean
It’s too aggressive with how it works/how much it modifies imo and relies on other people to stop it from crashing
We love breaking changes 🥳
I'd prefer to keep making individual mod makers to just patch that single line then
wish it handled stuff itself instead of forcing you to wrap everything in to_big()
big sigh
Lua unfortunately doesn't allow for that 😬
luajit2 supremacy
im tired of calling a func over and over that doesnt even have proper grammar 🥲
While this works alright, eventually compatibility with mods not using the same variable name will probably catch up
it does have proper grammar
which sucks but what are ya gonna do
rename it to too_big just to make it worse
hold on i think i'm the stupid one here
The amount of people who are trying to target it suggests it should probably have a proper implementation
big refernces bignum and saying to big is converting the number to bignum
but then they added omeganum because bignum wasn't enough for cryptid
yeah
ok but what about to_bigger
im jus gonna go crawl into a corner

Sure. If we actually properly notify any mods that target this line beforehand, I'm more than down haha
turns you into a glass card
definitely doing the check wrong
shatters immediately
I have to constantly change my Hammer and Chisel patch because stone card rendering keeps getting changed and I'm fine with that. Just let people figure it out tbh
ive never had to change either of my two patches
I truly can't believe that tbh lol
splash logic rewrite/cleanup was not enough to stop me
Stone cards rendering breaking or not is very different from making users' balatro crash on startup every time lol
the other one is for custom text on the "saved by mr bones" thing
that would be convenient to have as an inbuilt thing but i doubt it's highly requested
That is very true I'll give you that
It would be very impressive to crash on start up with this change tbh
just a quick example of some breaking smods changes :)
if start_up then
crash(404)
end
the really funny crashes are the ones that completely close out the game without giving you an error log
anyway i'm still getting that end of round crash with talisman do i just give up
Very quick list of mods that seem to patch this line with the exact change I proposed (aka would no longer need to patch):
- Aikoyoris' Shenanigans
- CardSleeves
- Grim
- JamMod
- Maximus
and a second very quick list of mods that seem to patch this line, with a different patch than I proposed (aka would need to be updated with a new patch):
- Bunco
- Cryptid
- NoFantasy (seems unmaintained)
Neither of these lists are exhaustive; I didn't look that long.
i do wanna figure it out cos i still wanna play cryptid from time to time 😭
Do they all do the same patch?
how would I get this effect to work? (orange is the stuff I hadn't changed yet, first time making a joker in forever btw, also I'm in pre-calc I think, tho I'm not entirely sure what that means)
No, I just searched for #G.hand.highlighted > 5 in any toml file, on github and in Dim's modpack
Have you checked the line in main.lua that's producing the crash?
Sounds like a compat nightmare already 🤣
Not really
if G.GAME.chips - G.GAME.blind.chips >= 0 then
We announce we'll patch it in ~1 week (or longer?)
wait is this a patch for like
being able to play hands with more than 5 cards
What exactly is "value"
I mean how do all those mods already work together if they all try and patch it differently
they dont lol
lmfao
Yes
I'll look at that in a sec haha
so, it's the kind of thing that cryptid does, like with the gemini joker or glowing deck
this is the line that crashes
I think, may have worded it wrong
What are you patching?
They can change their patch target to a regex that's if #G.hand.highlighted <= 0 or G.GAME.blind.block_play or #G.hand.highlighted > (5|G.hand.config.play_limit) then (or whatever we decide to do), and there shouldn't be any issues
just checked with talisman off and it's fine
asking if smods could have this patch #💻・modding-dev message included
chat the 'for' limit thing is going to be my downfall if someone could please aid, should it not be an issue
I'd say maybe add a variable that mods can alter in addition to the highlight selection limit
I'm planning on making a mod based off of the game Noita, and this is the first joker of that mod, and honestly my first real joker ever, my only other attempt was basically just an upgrade of the standard joker
Hi
does anyone know of any resources outside of the smodded wiki where you can learn how the SMODS.calculate function works? I'm having a lot of trouble with it
What are you struggling with in regards to the wiki?
I want to make some idea
I need to increase the chances of Negative Edition by 2 times and make the same chance of Tarot and Spectral Cards with Negative Edition appearing in the store for it
as far as I can tell your hook wouldn't be impacted by the lovely patch
I wonder how many would even need the patch after it’s changed
i should probably still remove the hook after the patch is implemented though?
just like how to use the calculate funciton, how everything works and how to use the functions without major issues
not really because of your j_tsun_holy_water, but probably simplified, yes
Can anyone help? I just don't know lua, much less the mod API, but I want to make it and play
Yeah eremel actually said the same thing haha
it might just come from me mostly not being used to the way lua is formatted, but it's just a bunch of garbled code to me
does that mean i get to go on the list
Why do you want to be on the list so badly 😭
all publicity is good publicity
How do I check that a card has any enhancement?
A couple mods will be able to remove their patch, a couple won't 🤷♂️
yea dont worry mine targets it too lmfao
Hopefully I will because the less patches in my gargantuan collection the better 😭
SMODS.has_enhancement, check the wiki for the docs
pro tip fellas if we target literally everything then nobody has to worry if something is patched, because the answer is always 'yes'
I'm looking at the docs, which is why I asked
has_enhancement asks for a specified enhancement
oh any
vampire
I thought you were asking "how to check if a card has a given enhancement", my bad
get_enhancements gives you a table, but also calls the context to add quantum enhancements, which is unnecessary overhead
check vampire code
Vampire checks if config.center does not equal base, and I wasn't entirely certain that holds true in SMODS code
When coding a Joker, you'll generally want to break down its effect in chunks comprised of a timing and an effect. Inside the calculate function, you'll have to:
- Check if the context is correct, to match the correct timing;
- Apply the effect itself.
Naturally, you also check for extra conditions.
Some basic effects are built into the larger processes of the game or SMODS, like Jokers granting a simple +Chips bonus, so they can be handled by returning a table with certain keys. More complex effects will need to be coded manually.
Sometimes, even if an effect sounds like it would comprise a single timing, it's easier to break it down into multiple ones.
You can do card.ability.set ~= “Enhanced”
thank you! this is actually like surprisingly useful
been like, looking at other code examples like from the smods examples and some other mods and all, and they're all yknow, fairly well written with everything condensed, I'm gonna try writing it out in more simple functions just to learn though
Some effects also won't use calculate at all, but they tend to fall into specific categories.
Conversely, some effects need both calculate and something else
Guys what softwares yall use ?
I use vscode and notepad++ depending on what for because I'm basic
VSCode, Git Bash, and the pure sludge within my skull
for art i know my buddies use aseprite, otherwise for writing im using vscode
vscode, aseprite, openrct2, miktex,
Based openrct2 
I also use sublime text sometimes
Thanks a lot
oh man sublime, i remember using that
I actually prefer krita to aseprite, makes more sense to me
also I'm just not used to it I guess
i think i was a notepad++ representer when i was doing stuff for gmod like 14 years ago
but then i went to sublime, and from sublime to visual studio, to vscode
one more thing, do you know where in balatro's code the actual calculations for the jokers take place, I've been trying to find it in the extracted exe but can't find it
does someone know how i could put this bubble above the achievement text? (ignore the comment lol)
function Showdown.versatility_description(temp_achievement) -- HOLY SHIT this puts the bubble under the achievement text HOW DO I PUT IT ABOVE
temp_achievement.config.speech_bubble_align = {align='bm', offset = {x=0,y=0},parent = temp_achievement}
temp_achievement.children.speech_bubble = UIBox{
definition = Showdown.speech_bubble('ach_showdown_versatility', { ach = true }, { 'belbelebelb' }),
config = temp_achievement.config.speech_bubble_align
}
temp_achievement.children.speech_bubble:set_role{
role_type = 'Major',
xy_bond = 'Strong',
r_bond = 'Strong',
major = temp_achievement,
}
end
I think it's common events but at this point you probably should look at either SMODs or the lovely dump because it's been severely manipulated
is this too crazy of an effect?
lovely dump?
ooh
I didn't even know this was a thing
When it gains X0.75, does the value increase or decrease
well when things like cryptid and shit exist 'crazy' has a fairly higher bar id wager
if its always giving a bonus and not chance based id definitely not make it common
this is assuming its always gaining and 0.75 isnt a reduction
decrease, the idea is that it can decrease the power or increase randomly
so it'd be a 25% increase or 25% decrease
when you say "value" what do you mean
will it restore the cards to 100% values after each round?
if not, in the very long run it'll make all cards weaker since 100 * 1.25 * 0.75 = something below 100
so, with cryptid, there's a deck called the glowing deck, as well as gemini card, it's essentially the numbers on the card or the Extra stats
ideally thatd encourage decision making to gamble to a higher value, then sell off the card no?
not everything has to make it to the end of the run, just enough to help you along the way
I think you need a different alignment than bm
maybe cl or something? not sure
if you want top I think it's tm??
that's part of the idea! Polymorphine from noita can absolutely destroy a run, which is why it needs to be handled very carefully ingame
tho with it's balancing it may still need some number changes
The card will probs end up as uncommon, so that's what I'd need to balance it around
very fair, balance is something ive had to struggle a bit with myself as well
figuring out whats worth a specific tier or not or if something is busted, its only making it to x ante or only works with specific builds
im sure my shit is far from perfectly balanced but, theres effort lmao
So, that kind of effect is prone to breaking things, and naturally hacky. Try seeing how Cryptid did it
I'll try checking it, I tried once, but was a tad confused
you could try asking MathIsFun
{
"id": "",
"name": "",
"display_name": "",
"author": [""],
"description": "",
"prefix": "",
"main_file": "",
"priority": 0,
"badge_colour": "",
"badge_text_colour": "",
"version": "",
"dependencies": [],
}
i just copy this into that yea?
is that... a folder named Metadata.json?
what theç
what the cedilla
Hi, this is my first time doing this but I wanted to know what is the updated code so that every time a Tarot card is used, a sound is played
ur wifi good? haha
DUMB AHHHHHH
No.
Lagging the FUCK OUTTTT
Anyways
Wait
I’m supposed to put it in assets
I think
Im using a Update Function within a consumable to get some previews what Joker youll probably get.
But I currently have an issue, if you look at the Consumable within the Collection, it just crashes since Jokers are always nil.
Any suggestion to check if im within a run / collection view?
what would you guys say is the best resource to learn how to program a mod?
I may need to start with something simpler lol
since my last joker made I actually learned a bit of coding (gdscript) and I think my main problem may just be not understanding the code system itself completely
I think it'd help a lot if I had a tool that let me see what a certain part of a line meant like gdscript has, lol
I'm assuming you're using VSC?
i found weight for the edition but idk how to change it 
Balatro source code, SMODS docs, and studying the code of other mods
yeag, before I was using notepad++ but I have VSC now
it should load haha
Gotcha, I ask because there is a Lua extension that would be very helpful to you in understanding the code a bit better
assuming you populated the json file yes
How
as in you filled in the empty stuff in the json file
so instead of "author": [""], you have "author": ["PEAK"],
oooo
Nvm
etc etc
How can i change the weight of edition?
SMODS
oh, I already have it apparently, but what's going on with that warning?
When you open a folder it typically asks you to trust it, and it seems like you have not done that for whatever reason
oh 😭 I think I missed it
maybe autopilot clicked away from it lol
let me reopen them and try doing it then?
cash
GOT IT, the problem was that I was opening individual files instead of folders... I think... anyway I think that fixed it!
Sweet
Yeah definitely be working out of folders instead of individual files. Makes workflow sooooo much easier
Oh god you opened the entire mods folder? 😭
what's the function in the code that is run when you win a blind and the game is about to fold all the cards into the deck? before the cashout screen appears
But yeah basically they're just being caused because VSC doesn't realize a lot of things are globally accessible since they're not in the same project
ahh
or the entire source code
IntelliJ my beloved
so quick question, if i want to trigger a joker effect after all cards have been scored individually but before the main joker stage triggers, how should i go about it?
Oh that's an odd one
this is what i just whipped up (completely untested)
a few but you could try if G.jokers
doesn't work. not surprised
I feel so stupid for overthinking it too much.
Thanks
because it is 
json doesn't allow for trailing commas
for reasons that are beyond my human comprehension
oh
so i have this joker
the timer value decreases but when hovering the ui only updates once until i hover again
how should i patch this
(the json parser SMODS uses does work with them, but this violates the spec)
so like how i fix this
delete the trailing comma
Don’t I need a comma for the code?
then write the name
So no comma and we should be fine?
no comma on the last element
Joker on left: Michelle
Create a random Legendary Joker when blind is selected (must have room) (intentionally unbalanced) (probably works better if you enable other mods)
(make it a common)
'Create a random Legendary Joker when blind is selected'
holy cow
make it mythical
💔
exotic
Joker on right: Hyehehe
Wild cards count as all ranks (be careful around five of a kinds and flush fives)
do they not count as all suits already
oops mistyped
peak
steel card's count as a steel card
ohh
Sorry for the miscommunication
i hope they both exotic
hack my buskin actually viable with this joker
jimbus company!!!!!
should probably remove those template dependencies
youre not supposed to actually have those deps
Hyehehe would probably be rare
just keep steamodded
ok
i mean this with zero snark but it will help if you try to understand what youre copying and pasting
include lovely i mean
Making Michelle exotic would require me to add the exotic rarity and also gateway so
The reason it says “be careful around five of a kinds and flush fives” is because if you play a five of a kind or flush five with wild cards using this joker, it will destroy the wild cards
to put into fake code terms, so I know what I need to figure out how to do in Lua in order for this joker to work #💻・modding-dev message
Context.blindSelected
For each 1 in jokers_affected
Select 1 random joker without immutable from joker slots, = CurrentSelectedJoker
Random Roll 1 or 2
If Roll = 1, CurrentSelectedJoker.config.extra =* good_value
If Roll = 2, CurrentSelectedJoker.config.extra =* bad_value
Now I just need to learn how to mod Balatro
hope you do better than me😭
Oh yeah and make some more jokers for the mod
the pain begins once again... my shit dont work
this is the same mf that had me stumped for over a week only for me to realise that i had to update smods 🥲
It also doesn't allow for comments either. When I say that people tell me to use yaml instead but I don't like space delimeted languages
That’s not even valid eval this though
this look fine or no
yeah i misremembered how calc_effect works
Is there someplace I can look for a crash-course intro to creating a balatro mod? I'm already an experienced developer in general
you misspelt dependencies. on that note, i would recommend setting a steamodded dependency of at least the version you developed the mod on, else there's no point in having it at all
so like SMODS.dependcies?
no, i mean setting the steamodded dependency not as (>=1.*) but as the version you are using when making the mod
e.g. (>=1.0.0~BETA-0303a)
thats the current one?
yeah
thank you👍
order's all borked and it doesn't even copy half the effects properly what have i done
does anyone have a joker file for, like, the base 4 mult joker? I think it may be easier for me to work off of a simpler joker
Have you seen the SMODS wiki?
There's some introductions and links to example mods that implement various things
Nope - I only just started thinking about this last night and had work today. I'll check that out.
nvm actually, I think I have a mod which adds a 50 chips joker which could work fine I think
love the cat image that gets embedded always
Thank you I'll check it out.
I don’t like how cryptid requires me to downgrade steammodded
Do note documentation is far from complete and often you'll be digging through source codes
They’ll get rid of that requirement eventually of course
I anticipate doing that, yes.
what is loc_vars for? without context I'd assume it'd do what config does, but config exists and loc_vars has a tad more to it than just a list of variables it appears
the latest dev version of cryptid (main branch on github) very much does work on latest steamodded, you just have to use that version
config just provides config values. loc_vars passes the correct values to the description and can also customize the description in other ways like adding info boxes and UI elements
the config table by itself doesn't come with any order, and sometimes you pass things as variables that are not just config values
Both values show up in both spots instead of one and the other and I don't know how to fix it
SMODS.Joker {
key = 'swords',
loc_txt = {
name= "Swords",
text = {
"Spades held in hand add {X:mult,C:white}x#2#{} mult",
"Resets at the end of the round",
"{C:inactive}(Currently {X:mult,C:white}x#1#{C:inactive} mult)"
}
},
atlas = "WombatsObscure",
pos = {x = 0, y = 0},
soul_pos = {x = 1, y = 0},
rarity = 4,
cost = 20,
config = { extra = {Xmult = 1, Xmult_gain = 0.75}},
loc_vars?
loc_vars = function(self,info_queue,center)
return {vars = {center.ability.extra.Xmult, center.ability.extra.Xmult}}
well there u go u used Xmult twice instead of Xmult_gain
well you have both defined as center.ability.extra.Xmult
one of them should be center.ability.extra.Xmult_gain
thanks guys
no worries it just happens
does smods override the cards_destroyed context and if so what should i use instead?
i have a joker that's similar to caino but it won't trigger no matter what
context.destroying_card?
Hmm, I'm trying to implement a card behavior that "retriggers all scored enhancement effects". However, I'm not sure how possible this is to future proof it for mod compatibility
In vanilla, scoring enhanements are Glass, Lucky, Stone, Bonus, and Mult, so I could easily program those in by name
But that would be restrictive
that one just destroys the played cards i believe
and i just tried it and that's what ended up happening
well its what caino actually uses, so it should be able to check for the card being destroyed somehow
caino actually uses cards_destroyed, i just triple checked
that's why i asked if smods somehow overrides that
I believe it does
oooh wait your right im actually just illiterate mb
dw there's so many card destroying contexts i wouldn't blame you
im not sure if it exists but you could at least find out by adding something benign like a print() in context.cards_destroyed right
also maybe try context.remove_playing_cards
i just solved it myself by looking in smods source code, there's context.removed which is a table that holds destroyed cards
so i ended up just checking if context.removed which is honestly probably not the intended use case but works nonetheless i suppose
neat if it works it works
Is it possible to ban enhancements? like in a challenge deck ban glass cards appearing from standard packs or from incantation aside from just banning justice
anybody know what to do next or to fix anything?
oh thank you i will dig into it im learning
My lag
Is selling
I sent the img and msg two whole minutes ago
FINALLY
anything to uhh change or fix?
because the mod is still not appearing in the game
lol
¯\_(ツ)_/¯
whats the folder structure and do you see any error messages in the console
i take it this is in your Balatro\Mods\jimborjulez
you can load other mods fine?
yea
the id has to match the mod name yea?
wait
i might be a dumbass
i think it has to match the id
oh thats odd
youre sure theres no typos or anything
check logs
as long as the id in the folder name and the id in the json are the same it should work
just to be sure too, you have a steammodded version that supports the json metadata system, yes?
which one is that
theres a bunch of ways it can fail to load metadatas
when it fails it logs
show logs
this image seems to me like your file structure is still wrong
the folder that has your main.lua and json file should have the same name as your mod's id
the name doesn't need to match
oh does it not
no
nvm me then
no\
oh
they should be in Mods > lovely > log or printed when running the game in the temrinal
ah
you shouldn't have a header and json file
i dont see a header in main.lua
did you save the file?
which?
all of them
double check main.lua that it doesnt have a header, then save it and reload the game
k
the game isn't able to grab my joker's atlas for some reason (didn't finish the effect yet, just wanted to see if the joker appeared correctly ingame)
anything wrong here that you can notice?
the atlas would have your mods prefix on it
you can also save the result of calling SMODS.Atlas to a variable then go atlas.key
oh wait
still doesnt appear in my mods
nvm I'm wrong
check logs now
this is what it says in game
actually what version of SMODS do you have?
give the number
what it looks like after updating it to have my mod prefix (if i understood currectly lol)
good news is its loading the mod, congrats
now its just fixing your code a bit
its SMODS.Atlas
it happens, dw about it
also i think key, path, px, and py shouldnt be capitalized
oh
are you sure you saved it
yea
because its still reading ATLAS apparently which is odd if you replaced it
also nice mod id
alr now its saved
who?
you
uh thanks?
I was being sarcastic
only just remembered that you can copy the crash to clipboard lol
hello I was wondering if theres code anywhere for blueprint/brainstorm effects?
I think we both have the same problem now 😭
convergent evolution of errors
confirm that path is the directory of your spritesheet starting at assets?
so if its assets/Jokers.png your path should be path = 'Jokers.png'
me? kind of, I tried before, and ended up making a single simple joker which I think gave mult whenever you scored a spades card but then I stopped lol 😭
I believe in you/us
oh yes like that
and both should be called Jokers.png
yes
hmm
2x at 2x scale
it does
My joker that triggers on reroll isn't triggering
SMODS.Joker {
key = 'limbo',
loc_txt = {
name= "Limbo",
text = {
"Each joker gives +{C:chips}#1#{} chips",
"Creates a {C:attention}negative tag{}",
"after 4 shop rerolls",
"{C:inactive}(Currently {C:attention}#2#/4{})"
}
},
atlas = "WombatsObscure",
pos = {x = 4, y = 0},
rarity = 1,
cost = 2,
config = { extra = {chips = 30, cooldown = 0}},
loc_vars = function(self,info_queue,center)
return {vars = {center.ability.extra.chips, center.ability.extra.cooldown}}
end,
calculate = function(self,card,context)
if context.other_joker then
return {
chip_mod = card.ability.extra.chips,
message = '+' .. card.ability.extra.chips,
colour = G.C.CHIPS
}
end
if context.shop_reroll then
card.ability.extra.cooldown = card.ability.extra.cooldown + 1
if card.ability.extra.cooldown < 4 then
return {
message = 'Close The World!'
}
else if card.ability.extra.cooldown == 4 then
card.ability.extra.cooldown = 0
add_tag(Tag('tag_negative'))
return {
message = 'Open The Next!'
}
end
end
end
end
}
holy moly
this is what mine looks like
uhh
its context.reroll_shop
and atlas
Anyone mind reviewing one of my new jokers?
It is working to add new cards but it has two issues
A. The card gets added to the deck, not my hand, and the real issue
B. The animation is super weird.
The second the hand goes to be scored, I can see the count of cards in my deck increase. It doesn't go along with the joker saying 'COPIED'
my potion and her 14 mr bones
there's a couple ways I've seen it, but this is the most common
huh
either way works techincally but its way easier to have each sprite share an image file like how vanilla does it
ok
one I saw had a giant string of just 1 column of jokers
but how would the game know to go to another picture for another joker?
PEAK - you use pos x,y to say which picture to use.
oh
here's my card with the weird appearing logic problem if anyone ways to be a saint
here, so 0, 0 is the potion
you have a sheet of sprites, the atlas px and pytell how long and wide each individual sprite is, pos when defining jokers tells it which sprite to use
i think in theory you dont have to (it should still load just without a sprite) but you can try that
k
atlas = '<your atlas key>
pos = {x = <x position>, y = <y position>}
in your SMODS.Joker{}
thanks
mine from the atlas to the pos
I'm playing a test run of that joker I posted earlier and I've been rerolling to my heart's content but now I have four copies
so whats the problem with me and railgun ;lol
yea
seems like we're having the same thing LOL
imma try and read the files and see whats going wrong at line 363 one sec
k
Does anyone see what I am doing wrong here? The copied card ends up in my deck, not in my hand like DNA does
if context.cardarea == G.play and context.other_card and context.other_card.ability
and context.other_card.ability.name == 'Gold Card' and not context.repetition then
--card is golden, roll to see if we copy it
if pseudorandom('goldretriever') < G.GAME.probabilities.normal / card.ability.odds then
--we are copying it
sendInfoMessage("LuckY! Copying this card", "goldenRepeater")
--old logic, restored
G.playing_card = (G.playing_card and G.playing_card + 1) or 1
local _card = copy_card(context.other_card, nil, nil, G.playing_card)
_card:add_to_deck()
G.deck.config.card_limit = G.deck.config.card_limit + 1
G.deck:emplace(_card)
table.insert(G.playing_cards, _card)
playing_card_joker_effects({ true })
card_eval_status_text(context.blueprint_card or card, 'extra', nil, nil, nil,
{ message = localize('k_copied_ex'), colour = G.C.FILTER })
about my "bug" where I kept getting duplicate jokers... I forgot I had showman
i cant get it to work
ok so somewhere your atlas image isnt right
make absolutely sure that in Mods/<your mod>/assets/1x there is a file called Jokers.png
whatever this means
path wants the whole filepath including the extension (.png, .txt, whatever)
idk if you have it so that it shows those in your file explorer
?
for the .png.png thing
ooh
no that looks good to me i think
my mac lets me have the choice to turn the thing into a png
so i dont think its with that
This was the fix! thanks
also, the thing I noticed was the atlas for the joker being set to 'noit_atlas' instead of 'noitro_atlas' but changing it didn't fix it
the only thing I can think of that links us here might have to do with our steammodded version? as I recall PEAK saying that they had to lower their's to play cryptid and I play jens almanac
I am still having a weird issue with the copied card appearing as soon as scoring starts, it does not wait until the individual card is being scored
OH I wasn't in context.individual
yeah maybe both of you try just reinstalling steammodded and see if it does anything
make sure its the right one and not the deprecated version from releases of course
maybe having both new and old smods messed it up or something? i honestly have no clue
only thing on mind is, if that's the problem, why weren't the other mods doing it as well and only our own?
hmm
well peak doesnt seem to have any other mods enabled atm but idk about you
cant hurt to try though
i went looking for this error in the server and apparently its fixed itself on at least one occasion so it cant hurt to try basically whatever
usually its because an image path or name was wrong though
but i dont see that here though
I honestly have thought of making the mod on a newer version first, tho I'd have to at least go to a version that still has cryptid and talisman, cuz they have certain features I'd like to be able to use
isnt cryptid updated to newer smod versions now
or so ive heard
I'm struggling to find resources on coding custom jokers / syntax for this game. Does anyone know where I can find something?
i dont think so>
i dont remeber
😭
mhm
Wow, thats exactly what I've been looking for
uhh, ok so, I'll try moving to a new version and see if that works, then update y'all I guess?
tho it took so long to update the first time :<
it does?
idk, maybe just a me problem lol
my 2 antiviruses fighting like animals over the peice of steak that is new versions of this mod loader lmao
hopefully its just the once more
lol
welp, I'm off to check what the most recent cryptid uses
@analog spoke if you still are having issues can you try adding the following to your mod before the atlas and then showing what it prints:
print(NFS.newFileData(SMODS.current_mod.path .. "assets/2x/noitro_atlas.png"))
it still comes packaged with cyptid
okey! I shall try this first
I shall install in background incase lol
sorry, where in the mod should I put this?
also @distant grove
in your mod code above the SMODS.Atlas call
ok, it's in! where do I check for the print? I'm looking in the crash log but can't see it there
the lovely console or log files (Mods > lovely > log)
(doesn't have any crash but I wanted to fit in)
are there context for gaining and losing jokers?
...and my axe
no afaik, there's a context for buying one
Now I have to redesign a joker I guess
I mean you can make your own
are you able to update DebugPlus (it has a bug in the current version preventing me from seeing the log I need)
disabling it wouldwork too
I think I can disable it
i put debug plus in mods yea?
not what was meant, you dont need it
theres just a bug in it rn
😭 it's not wanting to upload it this time, it just says processing
dang
did this work?
yeah but it's not that helpful
ensure the path is C:\Users\colem\AppData\Roaming\Balatro\Mods/noita_cards/assets/2x/noitro_atlas.png
other than the reversed dash halfway through, yes
can you click properties on the file?
what I'm I doing/checking for inside?
send screenshot
not sure how much having it will help, but thought I'd send it in
💀
the minorest of spelling mistakes ruining 5 hours of my life moment
but my things are all 2x
so UHHH
one crash down one to go
it was literally minor spelling mistake lmao
where do i put this?
that should be the full path of your atlas's png
but your running mac it seems so im not sure what itd be exactly
but it should be Balatro/Mods/<your mod name>/assets/1x or 2x/Jokers.png
you dont put that anywhere its just where it goes
honestly yea
Is it possible to ban enhancements? like in a challenge deck ban glass cards appearing from standard packs or from incantation, familiar or grim aside from just banning justice
i got helped on the balatro discord with G.GAME.banned_keys but that doesnt seem to work
non-crash related lol
something's off about this sprite right? something with the outline? can't put my finger on what exactly
show assets folder
also that atlas in the jokers is invalid
im a
and inside?
atlas = 'Jokers' (atlas key)
pos = {x = 0, y = 0} (position of joker on image)
and show the folder with assets in it
like the contents of it
Wilson's patience is beyond any I've ever seen 😭
fr though
it's ok, I also made them wait for hours : )
its okay, maybe one day you'll be the one doing this for hours
yea
omg, that's my dream, can't wait till I'm at the "helping someone for hours" level of coding knowledge
sounds awful
WHAGSHDAGWHAAHGA
its strangely cathartic when it comes together though
theres something nice about helping someone out with something they want to do
after this im finishing my hw
than going to bed
and finishing the other dumb jokers and blinds and consummables i wanna add
because i love lor
oh boy i hope i dont have the slightest spelling mistake
we'll be seeing you again soon then i presume lol
tip here though, try and take inspiration and knowledge from other mods and the vanilla code when you can, it can help you learn a lot
as a sanity check can you open the terminal and run find "/Users/icecreamking12e3/Library/Application Support/Balatro/Mods"
send me the entire thing
like the output of the command
eh?
2x.png
.
2x.png...?
file it should be a folder right?
im not sure how exactly 2x is a png
Anyone know off the top of their head of any mods with good config menus that I can reference? I think I just need a simple list of buttons/checkboxes for mine
hello, trying to make diamond suit count as all suits but its not being functional in game, any advice?
JokerDisplay but its a bit fancy
was about to say
maybe Talisman
DebugPlus sounds more your style but I have a system to avoid writing config stuff
"is_suit" is a check not a change
talsiman is probably a good one
oh ok, so should I use is_suit for the if line? what would I use for the change? also thank you for the reply!
maybe the folder is just named "2x .png"? if that's the case it may be fixable by just renaming it to "2x"
oh, huh... that's... bizarre
through some will of god it manifested into a png
assert(SMODS.change_base(card, "Diamonds", nil) )
works for me
what does the folder/file look like?
I bet finder is doing some weird shit
I think I'm not entering it in the right spot correctly, could you give an example? thank you again
oh your using it for the calulate
oh!! ok I'll give it a try
try SMODS.change_base(card, "Diamonds", nil)
and if that doesn't work try look though I can't help you futher
you may have to somehow change vanilla's Card:is_suit() function to do it
like smeared joker does
theres certainly a way to do that but idk how
messing with enhancements
why is it error,,
messed up the localization probably
is there any event that is called when my joker changes position in the jokers list?
oh yup
should be smth like
Enhanced = {
m_<prefix>_<enhancement key> = {}
etc```
I feel like I'm just messing things up more 😭
forgot the loc_txt={}
in your localization file
i should probably make a separate localization file
100% do recommend
if it doesnt work then do that
honestly at this point
find another mod, delete all the files in it, and just replace them with your files but keep the file structure
your folders are just haunted
oh my god.
I WILL ACTUALLY GO INSANE