IgorZ

[1.7+] KSPDev: LogConsole (v1.1) | Utils (v1.2) | ReleaseTools (v1.1) | LocalizationTool (v1.8)

Recommended Posts

If you don't develop, test or translate the KSP mods, then you may stop reading now. These mods have no value for a regular KSP player.

For those who do develop or translate the mods, some of these mods may have some value:

  1. KSPDev LogConsole. A mod that intercepts stock game logging output and presents it a bit more friendly. It also can persist it to disk so what you don't loose logs from the previous runs. Also, logs are persisted into three files: INFO, WARNING, and ERROR (configurable via settings file). This allows quick navigation between key events in the game. See more information here. Some screenshots are here. Also, read the Log Console Wiki.
  2. KSPDev Utils. An assembly with a bunch of useful methods that may make your life easier (or harder, you never know). Basically, it's a constantly extending library of the best practices and common task implementations. It's distributed under the Public Domain license, so you don't need to bring the whole binary into your project: you may just copy/paste the code you need right into your code base. See more information here. Also, see the API documentationIf you want to use this library, then you really need to read the documentation!
  3. KSPDev ReleaseTools. A bulk of handy Python scripts that helps building and releasing a mod. The scripts can build, automatically update MinIAVC version files basing on the data from AssemblyInfo.cs, and actually uploading the archives to the major KSP mods hosting platforms (GitHub, Curseforge, Spacedock)!. The release project can be configured either via a JSON settings file or directly from the Python code. See Release Builder Wiki for more information.
  4. KSPDev_LocalizationTool . A mod that can help you managing the mod localization. It's useful for both: the authors, and for the translators. The best resource on learning the mod abilities, is reading the Localization Tool Wiki. I did my best to describe the most useful use cases, but feel free to ask here, in the thread.

How to install

  • KSPDev LogConsole.
    • From CKAN (highly recommended):
      • Install and run CKAN.
      • Search for "LogConsole" or "KSPDev", then install the mod.
      • Occasionally run CKAN client to update LogConsole to the latest version.
    • Manually (discouraged):
      • Download the release ZIP from:
      • Ensure all existing files are deleted. Do not just copy over!
      • Unzip the contents.
    • By default console is activated via ` (back quote) key. It's configurable via KSPDev.settings file (sorry, I didn't put comments there).
  • KSPDev Utils.
    • If you like reusing code via copy/paste then:
      • Read the docs, find the module, copy the code, have fun, and add a Like to this post.
    • If you prefer using pre-built assemblies then:
      • Get latest DLL and docs XML from Github (note that releases are usually a bit behind the trunk).
      • Add the assembly into your project as a reference. If you use a modern IDE then IntelliSense and help topics should become available.
      • Always put the DLL into the same folder as your mod, this way you'll never get hit by a versions hell.
  • KSPDev ReleaseBuilder.
    • Download latest release archive from Github.
    • Copy the Python script into your repository and setup the project settings.
    • See Wiki for the help and examples.
  • KSPDev LocalizationTool.
    • Read the installation instructions in Wiki.

Mods that use KSPDev Utils:

License

All code and binaries are distributed under Public Domain license. You're absolutely not restricted!

Source code location

LogConsole and Utils Github repository.

ReleaseBuilder Github repository.

LocalizationTool Github repository.

Edited by IgorZ

Share this post


Link to post
Share on other sites

Just wanted to say you are not the only one using this mod:D

I would highly recommend it, for the debug console alone. I used it for months when I was running Linux, and generating tons of log reports, and this mod really helped me cut through the rubbish and see the important stuff going on behind the scenes. That being said, it definitely is not for those who are new to reading logs!

I made a feature request to you privately a while back, which you might have added to the issue tracker, but it's easy to quickly amass a large collection of logs, that can chew up some disk space. Any way to have a setting to limit it to a predefined number?

Now that I'm back to using Windows (begrudgingly), I'm not sure I need this as much, as the logs seem more readable, but the persistence and the console are both features I missed.

This little gem has long deserved it's own thread - glad to see it get one.

Cheers.

Share this post


Link to post
Share on other sites
2 hours ago, Deimos Rast said:

I made a feature request to you privately a while back, which you might have added to the issue tracker, but it's easy to quickly amass a large collection of logs, that can chew up some disk space. Any way to have a setting to limit it to a predefined number?

Looks like this one slipped thru the cracks. Created an issue to not forget it. Also, added some other ideas that I had in my mind but never found time to implement.

Share this post


Link to post
Share on other sites

New version of KSPDev_Utils released.

0.17.0 (Nov 19, 2016):

  • [Fix] Improved code samples and fixed some docs.
  • [Enhancement] MessageBoolValue class to format boolean values.
  • [Enhancement] MessageEnumValue class to format values of enum.
  • [Enhancement] IsPhysicalObject interface.
  • [Enhancement] DbgFormatter class for making common debug strings.
  • [Deprecation] Move Logger.C2S into DbgFormatter.
  • [Deprecation] Drop Logger class.

Updated help on the Utils API is here.

Edited by IgorZ

Share this post


Link to post
Share on other sites

New version of KSPDev_Utils released.

0.18.0 (December 13th, 2016):

Edited by IgorZ

Share this post


Link to post
Share on other sites

New version of KSPDev_Utils released.

0.19.0 (December 14th, 2016):

Note that for easier version support utils DLL now have version in the name (staring from 0.18.0).

Edited by IgorZ

Share this post


Link to post
Share on other sites

FYI. If you develop mods for KSP you may find useful the following project I've published just recently. I decided not to start another topic for it.

KerbalReleaseBuilder. It allows building KSP mod releases with just couple of changes in the files and one click. You will never forget to update ".version" file or misspell the archive name.

Edited by IgorZ

Share this post


Link to post
Share on other sites

KerbalReleaseBuilder v1.2

  • Allow setting up any builder field from JSON. Whitelisted fields are set via JSON_VALUES.
  • Handle macros in more paths.
  • Allow nested macros. E.g. when A = {SRC} and B = {A}/filename it gets correctly resolved to a source path.

Share this post


Link to post
Share on other sites
On 12/17/2016 at 2:04 AM, IgorZ said:

FYI. If you develop mods for KSP you may find useful the following project I've published just recently. I decided not to start another topic for it.

KerbalReleaseBuilder. It allows building KSP mod releases with just couple of changes in the files and one click. You will never forget to update ".version" file or misspell the archive name.

Quick read seems to indicate this is Linux or OSX only.

Share this post


Link to post
Share on other sites
3 minutes ago, linuxgurugamer said:

Quick read seems to indicate this is Linux or OSX only.

The build script is written in Python, so you can run it on any platform you managed to install Python onto. In fact, my primary development platform is Windows, and if you satisfy all the prerequisites you'll be able to use the script with no changes.

Share this post


Link to post
Share on other sites
10 hours ago, IgorZ said:

The build script is written in Python, so you can run it on any platform you managed to install Python onto. In fact, my primary development platform is Windows, and if you satisfy all the prerequisites you'll be able to use the script with no changes.

ok.

I already pretty much have a process in place using scripts and batch files together with VS.  Can't say I'm a fan of JSON, but I'll try it out.

Share this post


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

ok.

I already pretty much have a process in place using scripts and batch files together with VS.  Can't say I'm a fan of JSON, but I'll try it out.

If you don't like JSON you can setup your project in old school way: via the code (make_release.py / method SetupBuildVariables) :)

Share this post


Link to post
Share on other sites

@IgorZ

I'm not knocking what you did, it looks pretty neat.  Thanks for pointing out all the different ways to use it.

Share this post


Link to post
Share on other sites

FYI. I've just released  KerbalReleaseBuilder v1.2.1 because 1.2 didn't capture all the changes intended for it (some were waiting on my local drive). Ops!

Share this post


Link to post
Share on other sites

@IgorZ

Would you consider putting the Log Console in CKAN?  I've been looking for it, forgot the name until just now, CKAN would have made it easier.

If you'd like, I could do it for you, just let me know

Share this post


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

@IgorZ

Would you consider putting the Log Console in CKAN?  I've been looking for it, forgot the name until just now, CKAN would have made it easier.

If you'd like, I could do it for you, just let me know

No problem. I'll do it. Till now I wasn't sure if there are enough interested people :)

Share this post


Link to post
Share on other sites

Great!

If I may be so bold as to make a couple of suggestions:

I see that the session.settings file contains the values from the main log screen.

There doesn't seem to be  a UI for the KSPDev.settings file, having one would be useful

The ExactMatchFilter I see has several control characters in it, i see the following:

  • ^H^D
  • ^W^E
  • ^X^E
  • ^Y^E

Are these intentional, or a mistake?  Either way, I've tried to find documentation on the file (KSPDev.settings) and failed.

 

And some questions:

How are the various sections used:

  • Logfilter
    • ExactMatchFilter
    • PrefixMatchFilter
  • LogInterceptor
    • ExactMatchOverride
    • PrefixMatchOverride

Anyway, thanks for a great tool, I've made it one of my Must-have for development

 

Share this post


Link to post
Share on other sites
On 1/3/2017 at 4:59 PM, linuxgurugamer said:

If I may be so bold as to make a couple of suggestions:

You're actually encouraged to do suggestions! It doesn't mean they'll be implemented, though :)

On 1/3/2017 at 4:59 PM, linuxgurugamer said:

I see that the session.settings file contains the values from the main log screen.

There doesn't seem to be  a UI for the KSPDev.settings file, having one would be useful

In fact, duplicating UI settings in both cfg files would complicate the code and the understanding. Let's say one file says INFO logs should be shown and the other one says the opposite, then what? Not a good idea to have same setting defined in two different files. Though, the whole concept of having two different configs is obsolete. When I was designing it I assumed it would be a good idea to not overwrite main settings file in every scene. Though, I've changed my mind since then.

On 1/3/2017 at 4:59 PM, linuxgurugamer said:

The ExactMatchFilter I see has several control characters in it, i see the following:

These values were captured in pre KSP 1.2 version. Those control characters were actual characters in the methods names, and I have no idea why. In KSP 1.2 things could have changed.

On 1/3/2017 at 4:59 PM, linuxgurugamer said:

Either way, I've tried to find documentation on the file (KSPDev.settings) and failed.

There are no such docs so far :(

On 1/3/2017 at 4:59 PM, linuxgurugamer said:

How are the various sections used:

  • `LogInterceptor` is the first module that gets the log record. `ExactMatchFilter` and `PrefixMatchFilter` are used to skip non-useful sources. E.g. standard Unity logging is done via `UnityEngine.Debug` class, any log that is written this way will have this class at the top of the call stack. To workaround it the interceptor skips blacklisted sources (either by full or prefix match), and goes down in the stack to find the relevant source.
  • `LogFilter` is a module that implements silences. Many stock and third-party modules produce a lot of spam. By silencing some of the sources you may get you log more clear. E.g. pre-1.2 version was spamming INFO logs with records from "PartLoader+.MoveNext" (here we have control characters) which I considered totally useless and silenced by default. You can add more silences via UI from the console. Though, in order to delete a silence you need to edit config file. It's a functionality that stuck forever in the "todo" list.
On 1/3/2017 at 4:59 PM, linuxgurugamer said:

Anyway, thanks for a great tool, I've made it one of my Must-have for development

You're welcome. Main reason why I made this mod was poor logging ability of stock KSP. And in mod development logging is the only way to debug things :)

Edited by IgorZ

Share this post


Link to post
Share on other sites
1 minute ago, IgorZ said:

@linuxgurugamer the LogConsole mod is on CKAN now.

I know, already make it part of my standard install

thanks

Share this post


Link to post
Share on other sites

0.20.0 (January 8th, 2017):

Share this post


Link to post
Share on other sites

KPSPDev_LogConsole v0.13.0 (January 8th, 2017):

  • [Change] Rename .settings files into .cfg, and move them into PluginData.
  • [Change] Refine overrides and filters for KSP 1.2.
  • [Change] Use KSPDev_Utils v0.20.0.

There are significant changes in the release. Path of the binaries and settings are changed. The settings config is changed as well.

Edited by IgorZ

Share this post


Link to post
Share on other sites

ReleaseBuilder is now part of KSPDev. It's not compatible with JSON settings from the old repository. Read Wiki if you consider migration.

KSPDev_ReleaseBuilder v2.0.0

@ihsoft ihsoft released this 13 minutes ago

KPSPDev: ReleaseBuilder v2.0.0 (January 21st, 2017):

  • [Change] All settings are simplified and renamed to give better context. JSON settings created for builder older than 1.2 won't work!
  • [Change] Introduced JSON field JSON_SCHEMA_VERSION to help managing changes in JSON semantics in the future versions.
  • [Change] Deprecated POST_BUILD_COPY setting. Such actions should be done via project's post-build events.
  • [Change] Merge excutable and the builder class into one file for simplicity.
  • [Enhancement] Do safety checks on the constructed paths: read paths must not be above project's root; write paths must not be above release folder path.
  • [Enhancement] Major improvement of errors handling and reporting.
  • [Enhancement] Added auto-detection of GitHub repository for PROJECT_ROOT.
  • [Enhancement] Using Python built-in ZIP archiving capability. No need in external archiver anymore.
  • [Enhancement] Implemented -j option that allows specifying arbitrary JSON settings file. When used in this mode working directory is assumed to be directory of the JSON file. Script doesn't need to be located in the building repository anymore.
  • [Enhancement] Added support of macros in all paths.
  • [Enhancement] Add more program arguments to better control builder behavior. Running wihtout any argument now shows help screen.

 

Edited by IgorZ

Share this post


Link to post
Share on other sites

KSPDev_LogConsole v0.13.1

@ihsoft ihsoft released this 4 minutes ago

KPSPDev_LogConsole v0.13.1 (February 6th, 2017):

  • [Enhancement #6] Introduce a setting for logs retention.
  • [Change] Stop storing log records in LogInterceptor. Aggregators do it when needed.

I also spent some time creating Wiki. I hope you'll like it :)

 

Share this post


Link to post
Share on other sites

For some reason CKAN doesn't recognize the new version :(  You may load it from here. I'll figure out what's wrong with CKAN.

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