linuxgurugamer

[1.4.1+] 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.

It is available on *: http://spacedock.info/mod/54/TotalTime

Source code is on github: https://github.com/linuxgurugamer/TotalTime

The new version for KSP 1.4.1 has new dependencies

New Dependencies

CKAN has been updated to install the dependencies, if needed.

It is also available on CKAN

License is: MIT

Donations gratefully accepted

Patreon.png

https://www.patreon.com/linuxgurugamer

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:

TT_display.png

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":

TotalTime-38.png

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.

TT_config.png

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
  • Like 6

Share this post


Link to post
Share on other sites

this looks fantastic -- only wish it had been around 3 years ago!

better late than never, i suppose!

Share this post


Link to post
Share on other sites

Yay ! Now I will finally be able to brag about how many hundreds of hours I spent in the game, along with Steam users :D

Share this post


Link to post
Share on other sites

Now this sounds like an interesting little plugin. Definitely going to check it out soon.

Share this post


Link to post
Share on other sites

Nice idea! I think I'll try it too. I stopped using Steam (I run KSP directly) to save some RAM...

Share this post


Link to post
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!

Share this post


Link to post
Share on other sites

Must say I agree with rabidninjawombat - not sure I want to know. Downloaded anyway. :D

Share this post


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

Share this post


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

or

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.

LGG

Share this post


Link to post
Share on other sites

I just released 0.3.0, which fixes the bug mentioned in the previous posting

Share this post


Link to post
Share on other sites
No, it can't. KSP doesn't keep any count of real time, which is what this mod does.

LGG

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.

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites
I feel torn. On the one hand I want this mod, for curiosity sake.

On the other hand, it may force me to admit I have a problem, and I'll be spending my KSP time at Kerbalaholics Anonymous.
  • Like 1

Share this post


Link to post
Share on other sites
Worst idea EVER !

:wink:

Share this post


Link to post
Share on other sites

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!

Share this post


Link to post
Share on other sites

Glad you like it.  Be sure that if you want to keep track of time in all games, you set the options correctly.

Share this post


Link to post
Share on other sites

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! :)

Share this post


Link to post
Share on other sites

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?

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites

@linuxgurugamer Did you upload a wrong zip file onto SpaceDock because the zip includes the folder `SmartParts` and a zip file `TotalTime`

Share this post


Link to post
Share on other sites
33 minutes ago, Olympic1 said:

@linuxgurugamer Did you upload a wrong zip file onto SpaceDock because the zip includes the folder `SmartParts` and a zip file `TotalTime`

:-(

I'll fix it, that happened back when I was madly updating all my  mods.  I thought I already did.

Thanks

Share this post


Link to post
Share on other sites

Installed this the other day, and it doesn't appear to be properly saving current save time - it's always equal to current session time.  I have the latest version.  Ideas of how to troubleshoot?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now