Jump to content

[1.12.x] Kerbin Date Calendar Recalculated


linuxgurugamer

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
Link to comment
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
Link to comment
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.  

Link to comment
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

Link to comment
Share on other sites

  • 4 weeks later...

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
Link to comment
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

Link to comment
Share on other sites

  • 9 months later...
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!
Link to comment
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

Link to comment
Share on other sites

  • 4 weeks later...
  • 2 months later...

@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)

 

Link to comment
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?

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

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.

×
×
  • Create New...