#~~SystemClock old thread~~
1 messages · Page 1 of 1 (latest)
finally, I can know that it's 7 AM in the morning before closing the game
keeping track of time? in my Balatro?
peak
12 hour time typically doesn't include a leading 0 on the hour
ex. 4:29 PM, not 04:29 PM
That's true, I'll implement another set of formats. That's the only way that os.date actually formats hours, but it's pretty trivial to strip leading 0s
Let me know about any issues on all platforms, especially on OSX as it is currently untested on Mac hardware.
works fine on Mac
also may I put viet loc here
just a random interest of mine
Awesome, thanks very much for testing and the translation too, I'll include it in the next update
I hate typo
let me resend that
💀
anyway, about the dragging
it shows in my log that the game is unable to write on config.lua to load the same clock config on next launch, is that normal
Aha, no, that's likely an OSX-related bug. I trigger the config saving manually when the clock is dropped at a new position. The X and Y sliders in the config menu should still work though.
Would you mind sending the full log?
it's a bit weird tho
I tried to drag the clock 3 times and it sent 3 warnings about inability to write
and that was it
probably OSX-related
only workaround is that I change the clock to my liking in game then edit config.lua manually
Do you mean it worked fine after the 3rd time? Does it maintain the same position if you close and reopen the game?
Yep, okay. Do the X and Y sliders in the mod config menu work?
they do work
only dragging logs the warning
the slider works but it doesn't log
and config.lua doesn't change either way
config.lua just holds the defaults. Your user settings should be located in SystemClock.jkr, which is located within the config folder outside of the Mods folder on windows, but i'm unsure about OSX
💀
I'll read up a bit more about steammodded on OSX and try to include more diagnostics in the error message to see if I can narrow down why it can't write
How are you triggering the saving of the config?
function SystemClock.save_mod_config()
local status, err = pcall(SMODS.save_mod_config(mod_instance))
if status == false then
sendErrorMessage("Failed to perform a manual mod config save.", 'SystemClock')
end
end```
`mod_instance` is assigned to `SMODS.current_mod` at the very start of `SystemClock.lua`
I meant to append err on that message and totally forgot
Hmm that should be correct
Would you mind trying the latest version I just posted? ~~https://github.com/Breezebuilder/SystemClock/releases/download/v1.1.0/SystemClock-v1.1.0.zip~~
Should show the full error for the failed config save
Ahh finally I can not go "OH FUCK, IT'S 7 AM I HAVE GOT TO GO TO BED"
soon™️
I'm working on my Viet mod's lovely patch
Thanks!
hmm that isn't how you use pcall with additional arguments. You're effectively pcalling the result of the function call
it'd be pcall(SMODS.save_mod_config, mod_instance)
That makes sense, thanks
can't wait to ingrain seeing "am" constantly in my mind (its currently 1 am as im typing this)
in case you still need it
Next update will auto-close the game as soon as time exceeds 11:59PM to fix this problem
ill never get to play 😭

That's the result of my incorrect pcall. I'll put up a quick fix right away
noice
Meaning the problem will still occur, but the error report won't be broken...
I mean there might not be a problem to begin with
I play Balatro in windowed mode so OS clock is still visible to me
having it in-game means we can easily share our timezones

save_mod_config doesn't return a function so the old pcall always fails
the funny part is that you can imply you're having a 3am Balatro session
for no reason
Did i avoid realising this by checking status == false rather than just status?
I remember thinking "Wow, pcall must be some black magic to wrap the function like this" as I was writing it, but didn't think any further on it
Probably
Also I'd go with not status normally instead of status == false unless you have a reason to treat nil and false differently
Yep, have changed it to not okay for readability's sake. not status didn't sit right in my mind originally, hence false. Does pcall ever return a non-boolean?
it doesn't, but you wouldn't be able to bother me to check if it did
other functions with similarly shaped return values usually return nil (and the error) if something fails (for example loading a file), so it's the easier thing to just always account for both
Coming from the distant lands of C++, nullable booleans are an exotic and uncomfortable concept
yep dynamic typing can be weird like that
While you're here, any guesses as to what might cause SMODS.save_mod_config to fail on OSX?
have we confirmed it does?
Unconfirmed, no additional data, sample size = 1
Just asking in case it was a known issue
I'm not aware of such an issue, so it's probably just the pcall
Odd if so, considering it worked without error on my Windows system and the Ubuntu VM i tried
I would expect it to always succeed but claim it failed
Turns out you're right, of course. The way i was filtering for error messages meant they were hidden in my log file.
me when high school taught me Python but uni taught me C++
One more update for today, fixing and improving the remaining quirks.
~~https://github.com/Breezebuilder/SystemClock/releases/tag/v1.2.0~~
i have experienced the same error on windows
on v1.0
there is no error, the log is lying
mhm
Yep, fixed in v1.1.1, please download latest release
New features and compatibilities and such!
~~https://github.com/Breezebuilder/SystemClock/releases/tag/v1.3.0~~
Added more localizations. Please let me know of all the badly translated words and debatable colour names.
~~https://github.com/Breezebuilder/SystemClock/releases/tag/v1.4.0/~~
uh
I ran SystemClock on smods-old-calc at the same time as Cryptid
it should work there too
use refactor
That's just a note on what I developed it on, SystemClock should support everything back to Lovely 0.4 and Steamodded 1200 at least
The dependencies are defined as "Steamodded (>=1.0.0~ALPHA-1220a)", "Lovely (>=0.6)" but i can adjust if necessary
I should probably remove the Lovely dependency entirely actually, I don't have any patches
"developed on" sounds better than "developed for"
you got me confused there
I interpret it as "minimum version to run the mod on"
rather lovely 0.6.0, as that's what steamodded versions around that time use
Would anyone like to share their setups? I'm implementing presets and want to see if there are any common layouts that people have settled on
I have opted to put the clock in the bottom right, above the deck
I can grab a screenshot
@dusky summit
Thanks! Go to bed!
true gamers stay up all night
(And yes, I prefer 24 Hour)
I'm very glad that it's an option
That is the correct preference, as is YYYY-MM-DD date formatting
I will fight anyone with the wrong preference
well then that's a problem. I use MM/DD/YYYY
Like time, I can simply convert, but I'm sorry, I'm just too used to the date format
YYYY/MM/DD > DD/MM/YYYY (the one i use) >>>>>>> MM/DD/YYYY
Mate I said I'd fight anyone with the wrong preference. Pistols at dawn on 11/2/2025
That's at 30:5:00, if i've understood your date format right
No, hang on, it's 30:00:5
Meeting at the right time might prove tricky
Where can I get the baba is deck?
Wait this is unironically really useful
this is actually pretty useful, thank you
i lose track easily and this made my life easier
it looks neat
Can you make user manually set their time zone?
I mean allow us set local time zone
It should use whatever the local time of the system is. Did you want it to show a different time?
Yes
That seems like a very unusual case, why's that?
A simple UTC±N is useful for me
Well tl;dr my device is not able to set local time and it always return UTC time
Now i'm even more intrigued. Is this a school or business provided computer that you can't configure?
No, it's just windows emulator
It's some edge cases and I understand if you don't want to mess with it, I just thought if you can then it'll be nice
Ah, okay. I'll look into adding a custom time offset value in the config for you in 1.5.0. I won't add it to the config UI because of the niche nature of the setting, and I'd prefer to keep it fairly simple
Fair enough 👌
The option should be available now if you download the latest pre-release 1.5.0~d on GitHub (Code -> Download ZIP). To change it, open %AppData%/Roaming/Balatro/config/SystemClock.jkr in a text editor and change ['hourOffset'] = 0, to whatever you like. Accepts decimals and strings, so ['hourOffset'] = 5.5, and ['hourOffset'] = '+5.5', are both valid
Might be the result of update starting before my init has completed. I'll add some safety checks
Are you getting this crash every launch, or just occasionally?
everytime going into a new run
i think, let me check
hmm I cannot reproduce now
Either a race condition or another one of your mods calling update before start_run, but easy to fix and protect against
New release with presets, more juice, some questionable fixes, and definitely more bugs
~~https://github.com/Breezebuilder/SystemClock/releases/tag/v1.5.0/~~
This should be fixed in 1.5.0 full release now
Just realised SMODS checks types of config values and invalidates them if they don't match, so hourOffset being set to a string value like ['hourOffset'] = '+5.5' wouldn't work if it weren't also set in config.lua.
For the sake of simplicity and speed i'm going to drop support for string values (since it was broken anyway). ['hourOffset'] = 5.5 will still work as always, just make sure there's no + before the number
Plus before might still work
Doesn't appear to. I don't think Lua interprets it as a valid number
I feel like it should but Lua is funny so I never know
Almost every other language handles it explicitly, but Lua just throws an unexpected symbol error
Of course it does
I wish it did, there are times when aligning a set of numbers would look nicer as
+4.284,
-2.182
and a space just doesn't taste as nice
New release! Minor bugfixes and major optimisations, if you define major as 0.12 milliseconds.
~~https://github.com/Breezebuilder/SystemClock/releases/tag/v1.5.1/~~
In speedrun time, that's major
It's a whole frame saved...if you're running at 833FPS
Sub tick optimization
more like 8333
a millisecond is 1/1000 of a second
it's not rocket science
New release! SystemClock no longer requires Steamodded, and right-clicking opens straight to the config menu, which is juicier and user-friendlier than ever.
~~https://github.com/Breezebuilder/SystemClock/releases/tag/v1.6.0~~
New patch release. Fixed a sneaky bug that would cause the Collections page to be temporarily empty if a very specific sequence of actions happened with Steamodded installed.
~~https://github.com/Breezebuilder/SystemClock/releases/tag/v1.6.1~~
New patch release. Fixed incompatibility with HandPreview and Ankh caused by conflicting use of the same global MoveableContainer library. HandPreview and Ankh are still incompatible with each other though, so don't go using both!
~~https://github.com/Breezebuilder/SystemClock/releases/tag/v1.6.2~~
New patch release. Fixed a bad function hook that was preventing other mods' hooks of Game.main_menu from being run (!). Apologies to Malverk users especially, this was causing Malverk to not initialise its texture replacements until the Texture menu was opened.
https://github.com/Breezebuilder/SystemClock/releases/tag/v1.6.3
With thanks to DeSynkro on GitHub for alerting me to this - I would have remained blissfully ignorant of this for a long time otherwise.
