Jump to content

[1.12.x] KSPLogger released


linuxgurugamer

Recommended Posts

This mod is created to expose some internal data for external use.
The specific use case is for streamers who would like to display some values on screen in some manner; for example, using OBS to display the values in a template

Installation:

Copy KSPLogger directory into the GameData directory

Configuration:

There is a config file called PluginData/KSPLogger_default.cfg, which contains all the value which can be set.  Copy that file to:  PluginData/KSPLogger.cfg and change that; the default will be overwritten when new versions come out, but your config will remain safe,

There are three sections in the config file:

KSPLogger values - Contains values which control the behaviour of the mod. Each line in the config file is documented

FlightGlobals values - Contains true/false settings for many of the available values in the internal FlightGlobals class.  Set a setting to true if you want KSPLogger to save that value to a file

FlightGlobals.ActiveVessel values - Contains true/false settings for many of the available values in the FlightGlobals.ActiveVessel class. Set a setting to true if you want KSPLogger to save that value to a file

 

KSPLogger is only active when in the Flight scene. When leaving the flight scene, if the config value singleLine is set true, then the data files are deleted; if it is set false, then the files are left alone

KSPLogger now checks the config file every 5 seconds to see if it was changed, and reloads if it is.  This makes it easier to make changes without having to reload the game.

Availability

Patreon.png

https://www.patreon.com/linuxgurugamer

Edited by linuxgurugamer
Link to comment
Share on other sites

For now, look in the config to see what's supported.

Go to this:  http://docuwiki-kspapi.rhcloud.com/#/classes

and type in the search box FlightGlobals

It's the best documentation around.  If you find something which you'd like and isn't supported by KSPLogger, let me know and I'll update it.

 

Link to comment
Share on other sites

  • 2 months later...

Enjoying this so far - seems like it could have a lot of potential.

A few feature requests:

  • the option to dump info to log
  • toggle/collapse the tittle headers (on the right hand screen) so you don't have to scroll through everything
  • And maybe a bit trickier: a filter for the left hand window for what all is displayed - I only care about parts, not game UI objects
  • And maybe an option to control which scenes it's in.
Edited by Deimos Rast
Link to comment
Share on other sites

  • 1 month later...

New release: 0.4.2

  • Added deleteOnExit, which defaults to false
On 11/5/2016 at 9:38 PM, Deimos Rast said:

Enjoying this so far - seems like it could have a lot of potential.

A few feature requests:

  • the option to dump info to log
  • toggle/collapse the tittle headers (on the right hand screen) so you don't have to scroll through everything
  • And maybe a bit trickier: a filter for the left hand window for what all is displayed - I only care about parts, not game UI objects
  • And maybe an option to control which scenes it's in.

Are you sure you posted this in the right thread?  KSPLogger does not do any display on it's own, it's only exporting data for other programs like OBS to use

Link to comment
Share on other sites

  • 1 month later...
  • 2 months later...
  • 4 months later...
  • 8 months later...
  • 8 months later...
  • 2 weeks later...

New release, 0.5.0

  • Moved all writing of data into a real thread
  • Added coroutine to write data to static values for thread
  • Added synchronization between coroutine and thread

Note that due to overhead outside the mod (ie:  OS, etc), an actual refresh rate with about 5 variables being written to files is about 1/second

Link to comment
Share on other sites

  • 3 months later...

New release, 0.5.1

    Updated Assemblyfile.tt
    Added new data fields:
            fixed_ship_obtSpeed = false
            fixed_ship_obtSpeed_divisor = 1000
            fixed_ship_obtSpeedUnits = km/sec
        
            fixed_ship_srfSpeed = false
            fixed_ship_srfSpeed_divisor = 1000
            fixed_ship_srfSpeedUnits = km/sec
        
            fixed_ship_verticalSpeed = false
            fixed_ship_verticalSpeed_divisor = 1000
            fixed_ship_verticalSpeedUnits = km/sec

            fixed_altitude = false
            fixed_altitude_divisor = 1000
            fixed_altitudeUnits = km

            fixed_terrainAltitude = false
            fixed_terrainAltitude_divisor = 1000
            fixed_terrainAltitudeUnits = km

Link to comment
Share on other sites

  • 1 month later...

New release, 0.5.2

  • Added new data fields:
    • inclination
    • biome
  • Renamed distributed file to KSPLogger_Default.cfg
  • Moved config file into PluginData (so ModuleManager wont' reload every restart)
  • Checks the config file every 5 seconds to see if it was changed, and reloads if it is
  • Added InstallChecker

Please note:  You will need to manually move your file from the main mod directory into the PluginData directory.  This is to help modulemanager not have to reload every time you restart the game.  Also, the file will NOT be overwritten when it's in the PluginData directory when new versions come out

Link to comment
Share on other sites

Hi @linuxgurugamer - did a quick check of the functionality for a project (looks promising by the way :rep::rep::rep::rep::rep:) and found that when the config option 'onePerFile = false' , the mod doesn't follow the 'singleLine = true' option. It'll keep appending the updated full string of all values to the end of the single file. Is that as expected or an exception?

Works as advertised when onePerFile = true and singleLine = true with the value (per file) being constantly overwritten each update.

Edited by wile1411
Link to comment
Share on other sites

2 hours ago, wile1411 said:

Hi @linuxgurugamer - did a quick check of the functionality for a project (looks promising by the way :rep::rep::rep::rep::rep:) and found that when the config option 'onePerFile = false' , the mod doesn't follow the 'singleLine = true' option. It'll keep appending the updated full string of all values to the end of the single file. Is that as expected or an exception?

Works as advertised when onePerFile = false and singleLine = true with the value (per file) being constantly overwritten each update.

I'm sorry, I don't understand what you are saying.  You are first saying that in this case:

onePerFile = false, singleLine = true

and then you say:

Works as advertised when 

onePerFile = false and singleLine = true

with the value (per file) being constantly overwritten each update

Link to comment
Share on other sites

3 minutes ago, linuxgurugamer said:

I'm sorry, I don't understand what you are saying.  You are first saying that in this case:

onePerFile = false, singleLine = true

and then you say:

Works as advertised when 

onePerFile = false and singleLine = true

with the value (per file) being constantly overwritten each update

Sorry - very confusing typo there:

Works as advertised when onePerFile = true and singleLine = true with the value (per file) being constantly overwritten each update. Updated original post

 

 

Link to comment
Share on other sites

1 hour ago, wile1411 said:

Sorry - very confusing typo there:

Works as advertised when onePerFile = true and singleLine = true with the value (per file) being constantly overwritten each update. Updated original post

Ok.  So, when you want all the values printed to a single file, that  is what doesn't work, right?

Shouldn't be too difficult to fix, but I'll need a day or so to get to it.

 

Link to comment
Share on other sites

Just now, linuxgurugamer said:

Ok.  So, when you want all the values printed to a single file, that  is what doesn't work, right?

Shouldn't be too difficult to fix, but I'll need a day or so to get to it.

 

The issue was that in wanting a "single file" with only a "single line", the mod would 'append' rather than 'overwrite'.

Link to comment
Share on other sites

  • 2 months later...
  • 1 month later...
  • 2 months later...

Before anyone posts that either KSP-AVC or CKAN is reporting a wrong KSP Logger version, or that an update is available, yes, the .version file in the v6.0.0.1 release did not get updated for some reason, and incorectly reports v6.0.0.1 as being v6.0.0.0.

I've already posted an Issue on the Github repo about it. ;)

Link to comment
Share on other sites

  • 1 year later...
  • 1 year 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.

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