Sun and Moon

Suggestions Should Be Posted in Their Respective Categories

Moderators: Moderator, Quality Control, Developer, DM

Post Reply
User avatar
Lockonnow
Posts: 3105
Joined: Fri Oct 15, 2010 12:10 pm

Sun and Moon

Unread post by Lockonnow »

Could it be cool if the forum could show the sun or the moon on the forum which is up on each server? i mean what is past night or day light.
User avatar
Aspect of Sorrow
Custom Content
Posts: 2634
Joined: Fri Mar 28, 2014 7:11 pm
Location: Reliquary

Re: Sun and Moon

Unread post by Aspect of Sorrow »

Dawn at 6, sets at hour 18, if the default 48 minute per day is kept a little math on the uptimes based on the counter update of server uptime is then easily available, so at the time of this response the IG for S1 is just past noon. A simple little browser extension could read the text in the status box and recolor the text yellow or light blue to accommodate if it's not done serverside.
User avatar
Endelyon
Posts: 3606
Joined: Sun Jul 06, 2014 4:24 am

Re: Sun and Moon

Unread post by Endelyon »

Aspect of Sorrow wrote: Mon Apr 10, 2023 2:47 pm Dawn at 6, sets at hour 18, if the default 48 minute per day is kept a little math on the uptimes based on the counter update of server uptime is then easily available, so at the time of this response the IG for S1 is just past noon. A simple little browser extension could read the text in the status box and recolor the text yellow or light blue to accommodate if it's not done serverside.
When the server boots it gets set to whatever time the real time is. Even if you accounted for that in your math it will get thrown off at some point based on crashes or early/late resets.
User avatar
gedweyignasia
Custom Content
Posts: 1353
Joined: Sat Nov 23, 2013 11:27 pm
Location: EST/UTC-4
Contact:

Re: Sun and Moon

Unread post by gedweyignasia »

Endelyon wrote: Mon Apr 10, 2023 11:05 pm
Aspect of Sorrow wrote: Mon Apr 10, 2023 2:47 pm Dawn at 6, sets at hour 18, if the default 48 minute per day is kept a little math on the uptimes based on the counter update of server uptime is then easily available, so at the time of this response the IG for S1 is just past noon. A simple little browser extension could read the text in the status box and recolor the text yellow or light blue to accommodate if it's not done serverside.
When the server boots it gets set to whatever time the real time is. Even if you accounted for that in your math it will get thrown off at some point based on crashes or early/late resets.
This is incorrect; there's a 4-1 ratio of server time to real time, and the server always fast-forwards its clock to the appropriate time on a reset. Night and day should be consistent across resets unless a DM has moved the clock since the last reset. Dae refactored some on module load code which accidentally disabled this in June, but I believe Dalo has since fixed it. It should be possible to give both the night/day indicator and the actual ingame time.
User avatar
Aspect of Sorrow
Custom Content
Posts: 2634
Joined: Fri Mar 28, 2014 7:11 pm
Location: Reliquary

Re: Sun and Moon

Unread post by Aspect of Sorrow »

Yes, hence the if, I wasn't sure what the ratio was without looking it up, and forgot completely about the on reset time adjustment.
User avatar
Zanniej
Posts: 2454
Joined: Sat Jan 11, 2014 11:28 am
Location: The dark parts of the forum

Re: Sun and Moon

Unread post by Zanniej »

You could probably calculate that based on the uptime in the counter then, right?
I can probably make that, if people find value in it.

I mean, the uptime at time of writing on Baldurs Gate North is 7:26:36. That means it started around 6:47 GMT. If the server set that time at that moment, and the ratio is 1:4, that would mean that at the time of writing (14:14 GMT) it's ~11:30 in server.

If someone can verify for me that that is correct, then I can create a script to add the in game time.

EDIT: Or a sun/moon icon, if that's more fun, of course.
Off to greener pastures
User avatar
DaloLorn
Posts: 2467
Joined: Tue Mar 26, 2019 2:44 am
Location: Discord (@dalolorn)

Re: Sun and Moon

Unread post by DaloLorn »

At the time of posting, it is Tarsakh 11, 8 AM game time, with 1 hour and 9 minutes until the reset.
European player, UTC+1 (+2 during DST). Ex-fixer of random bits. Active in Discord.
Active characters:
  • Zeila Linepret
  • Ilhara Evrine
  • Linathyl Selmiyeritar
  • Belinda Ravenblood
  • Virin Swifteye
  • Gurzhuk
User avatar
Zanniej
Posts: 2454
Joined: Sat Jan 11, 2014 11:28 am
Location: The dark parts of the forum

Re: Sun and Moon

Unread post by Zanniej »

Then I'm about 4 in game hours off, which is one RL hour.
Could be a calculation error, or a timezone error.

Thanks Dalo!

If someone can give me the time and date just after reset, I'd appreciate it! :)
Off to greener pastures
User avatar
Aspect of Sorrow
Custom Content
Posts: 2634
Joined: Fri Mar 28, 2014 7:11 pm
Location: Reliquary

Re: Sun and Moon

Unread post by Aspect of Sorrow »

The IG time is changed on launch which won't reflect the uptime, previously it wasn't working which leant to it, so you would have to probably write a cron or scheduled task to read the server logs until you find the last hour announcement and base it on that.
Post Reply

Return to “Suggestions and Discussion”