Staxel
Sundial: Custom Day Length
 This topic has been pinned, so it's probably important
wowi  [developer] 19 Aug, 2022 @ 12:37pm
Modifying the Mod Detection Process
If you've ever experienced an issue where you can't join a Sundial-enabled world, it's likely due to the game freezing while loading in. If you've ever noticed a stutter or freeze in the loading screen animation, that's where the problem lies.

But why? How does a freeze mess with the mod detection process?
The answer to that is simple: Moonbow 0.4--and as a result, Sundial 0.1--had a three second timeout on the process. That meant that any client joining the server had to respond to a mod requirement check within three seconds. If it failed to respond, it assumed that Moonbow was not installed, and therefore, Sundial cannot be functioning. Usually, the client responds in a fraction of a second, but when it freezes, it misses its opportunity to, and is promptly disconnected to avoid confusing synchronization issues.

Can something be done about the freezing?
Not really. Vanilla, unmodded Staxel suffers from these freezes, too, though you never really notice them. The only reason it's apparent now is due to Sundial needing a strict time-frame for client responses.

Can something be done about the strict time-frame?
Absolutely! Starting with Sundial 0.2, powered by Moonbow 0.4.1 (2022-08-19), you can modify the mod detection process using the Sundial config file. You can increase the timeout length, or simply disable the mod check, in the first place!

To get started, simply join your world and use the SetDayLength command. It'll automatically replace your old config file with the new one.

If you'd rather copy-and-paste, though, then here are its contents, complete with descriptions!

{ "__version__": 2, // Internal config file format version. Do NOT change. "Sundial": { "enabled": true, // Whether or not Sundial should be enabled. "secondsPerDay": 1320 // How long in-game days are, in seconds. Use the SetDayLength command for this. }, "ModCheck": { "enabled": true, // Whether or not Sundial installation should be enforced. "timeout": 3000 // How long to wait for verification of Sundial installation, in milliseconds. } }

If you run into issues or need help modifying your config file, do post below! I'll try to help you as quickly as possible.

Stay safe, stay positive, and keep on being awesome!
Last edited by wowi; 19 Aug, 2022 @ 12:38pm
< >
Showing 1-3 of 3 comments
NaptimePlays 29 Jan, 2023 @ 2:54pm 
I found the sundial file in the staxel mod folder, but there is nothing in there to configure or change. It's simply and empty file.
wowi  [developer] 29 Jan, 2023 @ 8:12pm 
That.. is a problem. I'll have to take a look at the method for storing the config.
In the meantime, do replace the contents of the empty file with the config example above.
syl  [developer] 21 May, 2023 @ 8:19pm 
hey
for those who are on version 1 still and haven't updated, the previous file only has this inside of it, so if for some reason you aren't updated, you can change the worldtime with the config file's text below (1320 is the default)

{
"secondsPerDay": 1320.0
}
< >
Showing 1-3 of 3 comments
Per page: 1530 50