linuxgurugamer

[1.8.x] Kerbin Date Calendar Recalculated

Recommended Posts

Nice little mod by @nuclearping, he has left the scene and just gave me permission (ie:  I asked, even though the license didn't require it) to adopt this.  Original thread is here: https://forum.kerbalspaceprogram.com/index.php?/topic/61996-11x-kerbin-date-calendar-redux-version-15/

Description:

Adds a small calendar window to keep track of the date and time at home on Kerbin KSC and displays it in a proper format.

 

Preview (the settings have been moved into the stock settings pages):

56ecec9de2d34478619a9192b00b7a09.png

Availability

ChangeLog

  •     Updated for 1.5
  •     Added Toolbarcontroller & ClickThroughBlocker
  •     Moved settings into KSP settings page
  •     Added option to choose between toolbars
  •     Added fontsize adjustment
  •     Added bold font
  •     Optimized a bit to only initialize  GUIStyles one time instead of every OnGUI
  •     Changed config saves from an XML file to a cfg file

Additional changes

  • Added back in the settings window, accessible via right-click of button
  • Added check to settings window for the initial date not matching the display format
  • Added a help screen which shows the valid date formatting items (click the questionmark)
  • Removed log spam
  • Fixed bug where  it couldn't load saved datetime formats
  • Fixed date/time values to be correct for Kerbin's year
    • Added code from TriggerAu, the FrameworkExt.  MIT Copyright in top of each file
  • Removed option for 6/24 hour days, now uses game setting
  • Changed the initial date to only use the year.  

Note that Kerbin months are 6.4 days long, so you will see both 6 day and 7 day months

Donations gratefully accepted

 Patreon.png

  https://www.patreon.com/linuxgurugamer

 

Edited by linuxgurugamer

Share this post


Link to post
Share on other sites

Is there a place to set the Initial date? (ie I want to start the year at 1947 (Roswell) or 2001, another year? (currently looks like its set to 1980)

Is there a place to set the date format, (ie. mm/dd/yyyy or yyyy mm dd or dd MMM yy, etc.)

I didn't see anything in setting.

Game had not created the .cfg file yet, until after I exited the game.

Edited by BlackHat

Share this post


Link to post
Share on other sites
3 hours ago, BlackHat said:

Is there a place to set the Initial date? (ie I want to start the year at 1947 (Roswell) or 2001, another year? (currently looks like its set to 1980)

Is there a place to set the date format, (ie. mm/dd/yyyy or yyyy mm dd or dd MMM yy, etc.)

I didn't see anything in setting.

Game had not created the .cfg file yet, until after I exited the game.

I know, but fixing that is more work than I had time for right now.  

Share this post


Link to post
Share on other sites

There is a bug related to the date format, I'm working on it now

Share this post


Link to post
Share on other sites

New release, 1.6.1

  • Added back in the settings window, accessible via right-click of button
  • Added check to settings window for the initial date not matching the display format
  • Added a help screen which shows the valid date formatting items
  • Removed log spam
     

This is done for now, unless any bugs show up

Share this post


Link to post
Share on other sites

New release, 1.6.2

  • Fixed bug where  it couldn't load saved datetime formats
  • Fixed date/time values to be correct for Kerbin's year
    • Added code from TriggerAu, the FrameworkExt.  MIT Copyright in top of each file
  • Removed option for 6/24 hour days, now uses game setting
  • Changed the initial date to only use the year

Share this post


Link to post
Share on other sites

New release, 1.6.3

  • Really fixed date display (now shows Kerbin month & day of month correctly)
  • Updated icons to allow background to be transparent

Share this post


Link to post
Share on other sites

New release, 1.6.3.1

  • Fixed initial year time to not need to be decremented by 1
  • Changed back to 426 days/year, not the 426.08
  • Fixed calculation of the offset for the initial year
  • Removed some more debugging statements

Note that Kerbin months are 6.4 days long, so you will see both 6 day and 7 day months

Share this post


Link to post
Share on other sites
On 11/8/2019 at 3:17 AM, grungar3x7 said:

Could this mod be recalculated to use Minmus' orbit?

Please explain

Share this post


Link to post
Share on other sites
17 hours ago, linuxgurugamer said:

Please explain

Specifically, to use Minmus' orbital period (ie a "new Minmus") as the start of a new month (or minth in this case) and going by the calendar in that way, as some folks have come to mark time in the writings on the Fan Works board? Say, 56 kerbin days?

Edited by grungar3x7
Doing math to get the Synodic period, which would be more useful for a calendar!

Share this post


Link to post
Share on other sites
3 hours ago, grungar3x7 said:

Specifically, to use Minmus' orbital period (ie a "new Minmus") as the start of a new month (or minth in this case) and going by the calendar in that way, as some folks have come to mark time in the writings on the Fan Works board? Say, 56 kerbin days?

Well, to start off, here is some information from the wiki:

Celestial Body Parent Hours Kerbin Earth Revolutions
per Hour
Revolutions per Kerbin Revolutions per Earth
Days Months Years Days Months Years Day Month Year Day Month Year
                               
Kerbin Kerbol 2556.50 426.08 66.23 1.00 106.52 3.50 0.29 0.00 0.00 0.02 1.00 0.01 0.29 3.43
Mun Kerbin 38.60 6.43 1.00 0.02 1.61 0.05 0.00 0.03 0.16 1.00 66.23 0.62 18.91 226.94
Minmus Kerbin 299.50 49.92 7.76 0.12 12.48 0.41 0.03 0.00 0.02 0.13 8.54 0.08 2.44 29.25

 

Using either Mun or Minmus, it's not going to be an even number.  So then there would need to be leap years, since Minmus goes around Kerbin 8.53525641025641times in one Kerbin year.  Since I already have it doing Mun months, I'm not really keen on having another set of calcuations to deal with at this time.  Maybe later, when I'm done with all my updates

Share this post


Link to post
Share on other sites

Those calculations are all based on sidereal periods, but for a monthly observance, like a new mün or new minmus, one should use the synodic period instead, if my reading is correct.

Share this post


Link to post
Share on other sites
4 hours ago, Cruesoe said:

Would this work with a resized solar system like JNSQ?

Maybe, try it out and let us know

Share this post


Link to post
Share on other sites

@linuxgurugamer Tried running latest version on ksp 1.9.0 everything works as intended, except when going back to main menu the log is spammed by "Nullref's" thought i might mention it here before you do a recompile for 1.9.0

Spoiler

[EXC 20:29:05.814] NullReferenceException: Object reference not set to an instance of an object
    KSPCalendar.Calendar.LateUpdate () (at <459f6a41240e45209b4ef4a41538db92>:0)
    UnityEngine.DebugLogHandler:LogException(Exception, Object)
    ModuleManager.UnityLogHandle.InterceptLogHandler:LogException(Exception, Object)
    UnityEngine.Debug:CallOverridenDebugHandler(Exception, Object)

 

Share this post


Link to post
Share on other sites
Just now, dtoxic said:

@linuxgurugamer Tried running latest version on ksp 1.9.0 everything works as intended, except when going back to main menu the log is spammed by "Nullref's" thought i might mention it here before you do a recompile for 1.9.0

  Hide contents

[EXC 20:29:05.814] NullReferenceException: Object reference not set to an instance of an object
    KSPCalendar.Calendar.LateUpdate () (at <459f6a41240e45209b4ef4a41538db92>:0)
    UnityEngine.DebugLogHandler:LogException(Exception, Object)
    ModuleManager.UnityLogHandle.InterceptLogHandler:LogException(Exception, Object)
    UnityEngine.Debug:CallOverridenDebugHandler(Exception, Object)

 

Could you test it in 1.8 as well, and let me know?

Share this post


Link to post
Share on other sites
Just now, linuxgurugamer said:

Could you test it in 1.8 as well, and let me know?

will do give me a couple of minutes,have to download 1.8.1 havent played ksp since 1.31 :D

Share this post


Link to post
Share on other sites
35 minutes ago, dtoxic said:

@linuxgurugamer yeap same error in 1.8.1 just tried it only had 3 mods [clicktrough blocker,toolbar,toolbarcontrol and modulemanager]

Ok,thank you.  I'll look at it this evening

Share this post


Link to post
Share on other sites

New release, 1.7.0.1

  • Fixed null ref which spammed the log after going back to the main menu
     

Share this post


Link to post
Share on other sites
1 hour ago, linuxgurugamer said:

New release, 1.7.0.1

  • Fixed null ref which spammed the log after going back to the main menu
     

Thx!

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.