Jump to content

[1.12.x] TotalTime - A mod to keep track of all the time you spend in the game


Recommended Posts

I've often seen people talking about how much time they've played the game. Steam provides a method to keep track of time-in-game, but I don't use Steam. And, I wanted something better.

So I'm proud to announce the release of my new mod TotalTime.



Alternate Download for older versions of KSP



Donations gratefully accepted



This mod will keep track of the following times:

  1. Amount of gametime in the current save game
  2. Amount of gametime in the current install (all saves combined)
  3. The total amount of time played in the game, across all installs
  4. The amount of gametime in the current session (since KSP was started)

The data is displayed either on the game screen or in a window (or both). See this image for an example:


Times are not kept for the amount of time when in the initial Main Menu screen.

The toolbar button is only available in the Space Center. The toolbar button is fairly obvious, it says "Total Time":


Left-clicking on the toolbar button will bring up a small window which shows the times being recorded.

Right-clicking on the toolbar button will bring up a configuration window.


The configuration options are:

  • Save total time for individual saves
  • Save total time for this KSP install
  • Save total time for all KSP games in external file
  • Directory for global count file
  • Update interval
  • Display on screen
  • Display game time
  • Display install time
  • Display total time
  • Display session time

The initial setting do not have the total time for all KSP games enabled, and the directory for the file is blank. If you have multiple installs and wish to keep track of all the times, then enable the option and fill in the directory. There is a button at the bottom which will set your home directory as the storage location for the file

The option "Display on screen" controls whether the selected times are displayed on the game screen. If it is false, then you can display the times by left-clicking the toolbar button.

You MUST click the Save button to save the options; if you dismiss the window with the toolbar button, any changes will be discarded.

The three buttons at the bottom will reset one of the three counters (save, install or global). Session time cannot be reset other than by exiting the game and restarting.

Finally, the F2 key is honored, so when you press F2 to hide the UI, all the TotalTime windows and displays are hidden as well. Pressing F2 does not dismiss the configuration window if it is open, it simply hides it.

Edited by linuxgurugamer
updated availability on ckan
Link to comment
Share on other sites

As soon as 1.1 is out, I'll instal it.

I already played way too much time a totally reasonably amount of time by all standards on my current save soit wouldn't give me the satisfaction of knowing it(I won't be able to stop thinking that is isn't the actual time I passed because of that).

However, when 1.1 is out, I will know it's the real amount!

Link to comment
Share on other sites

Question. I have old install of KSP.90 and KSP1.0.2 as well as the current KSP1.0.4.

Can this mod go look in the older KSP version folders and pull out playing time from those saves?

No, it can't. KSP doesn't keep any count of real time, which is what this mod does.


Note: I've come across a minor bug which is mainly an annoyance. If you have the following options set:

Include time while paused: disabled

Enable Escape key in the Editors and SpaceCenter scenes: enabled

then when you revert a launch back to the editor, it will get in the editor in a paused mode.

Workaround is one of the following:

1. Just hit the escape key to resume the game


2. Disable the option to enable the escape key in the editor & spacecenter

I have a partial fix, but it's not ready for release. I expect to get the update out towards the end of the week, since I'm going out of town in about 10 minutes.


Link to comment
Share on other sites

No, it can't. KSP doesn't keep any count of real time, which is what this mod does.


Ahh, I thought it looked at info from the save games to determine game playing time.... I guess the Mod only logs playing time since the mod was installed.

Link to comment
Share on other sites

  • 1 month later...

It seems that the display is not only toggled by F2 but also Mod+F2 (which is RShift+F2 on Linux) and also in the KSC view. So, toggling the debug console also toggles TotalTime (It was a bit funny how I discovered that: The TotalTime button wasn't doing anything, so I opened the debug console to check for exceptions, which made the TotalTime window appear due to F2 being pressed as part of Mod+F2.). I think TotalTime should only react to F2 without any modifier keys and only in the "flight scene".

Other than that a great mod for us non-Steam users to find out where all that time has vanished ;)

Edit: And I just noticed, that it does not properly detect absolute path for the global state file: I configured "/home/lw/ksp" as the directory, but it seems to look for "/usr/local/games/KSP-1.0.5/︃/home/lw/ksp/totaltime.dat" (i.e. it's just appending the absolute path to my KSP installation directory as if it was a relative path).

IsolatedStorageException: Could not find a part of the path "/usr/local/games/KSP-1.0.5/︃/home/lw/ksp/totaltime.dat".
at System.IO.FileStream..ctor (System.String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, Boolean anonymous, FileOptions options) [0x00000] in <filename unknown>:0
at System.IO.FileStream..ctor (System.String path, FileMode mode, FileAccess access, FileShare share) [0x00000] in <filename unknown>:0
at System.IO.File.Open (System.String path, FileMode mode) [0x00000] in <filename unknown>:0
at ConfigNode.Save (System.String fileFullName, System.String header) [0x00000] in <filename unknown>:0
at ConfigNode.Save (System.String fileFullName) [0x00000] in <filename unknown>:0
at TotalTime.FileOperations.saveData (dataLevel type) [0x00000] in <filename unknown>:0
at TotalTime.TotalTime+<TimeIncrement>d__0.MoveNext () [0x00000] in <filename unknown>:0

Edit2: I don't think it's relevant, but there seems to be a Unicode FE03 (VARIATION SELECTOR-4) between the two slashes in the log (but it's not in TotalTime.cfg).

Edited by SpaceNomad
Link to comment
Share on other sites

  • 2 months later...

THANK YOU, sincerely!

I was disappointed to see "no exceptions" on the transfer to steam rule (it only being for those who purchased before it was on steam) as I wanted exactly this feature and I'm so glad I decided to google and see if there was a mod, this will be awesome but as previously said probably force me to admit I have an addiction to KSP xD

Again, thank you, awesome!

Link to comment
Share on other sites

  • 1 month later...

Is there a way to move the on-screen display? As it is, it sits on top of the part selector in the VAB/SPH, making it hard to see the part underneath it. :(

Otherwise, I love it. Steam is great for keeping track of time played, but that only works for the Steam install, which I would like to keep pristine and use a copy for modded instances, of which Steam won't keep track. Thanks for providing a solution to that! :)

Link to comment
Share on other sites

  • 2 months later...
17 hours ago, StrandedonEarth said:

Just installed this. Too bad I didn't find it sooner. But I realize this mod didn't exist when I started playing almost three years ago (that long already? wow!).

Does the timer still run while the game is paused?

I don't think so, but it's been a while since I wrote it, so I'd have to check.

Easiest way to check is to set it up, pause the game for a minute and then check the time

Link to comment
Share on other sites

  • 4 months later...
  • 2 months later...
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.

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...