Jump to content

ModEASY - [1.04] 0.1.0.1 - Log Viewer - Part Editor - Filter Generator


Fengist

Recommended Posts

Warning: This is a first release and therefore a very early beta.

If you don't have a backup of your KSP data, don't blame me when it gets chewed up.

I'm using this but that's no guarantee it'll work for you.

MEDownload.png

If clicking the button doesn't work, try right clicking and open in a new tab.

Version 0.1.0.1

Downloads to date:

MEDL.png


Source - In Delphi (Pascal)

ModEASY was written in Delphi XE5.

In order to compile this source you'll also need to have the following publicly available packages installed:

JCL, JVCL, EmbeddedWB, Orpheus


Introduction:

ModEASY is the result of frustration. For those of you who don't know me, I became a modder in June of this year and now have a part pack out with well over 20,000 downloads. Click the link in my signature if you're curious about that. Prior to creating mods, I've only had experience in programming in Delphi and PHP, neither of which are of much use in creating mods. My frustration started with having to create and edit .cfg files. It seems Squad has decided to make their own markup language for those (I'm jokingly referring to them as SquadSON... after JSON... files). Up until now, I've been using Notepad to edit them. I'm sure you can see the rage building. The frustration really reached a peak when I started trying to learn C# to create plugins. Naturally, being a noob to C#, the Unity API and the KSP API all at once, I've been plagued by NullRefs in the logs. Again, attempting to take the path of least resistance, I've been using a text file viewer and hitting CTL-F and F3 repeatedly to find those null refs and then re-searching to find where I put my own Debug.Log() entries in the log file. I finally got fed up, took a break from modding (for about 5 days) and went back to Delphi. The result is ModEASY. Your comments, bug reports, suggestions and well worded complaints... are most welcome.

Main Features:

  • KSP Log Viewer - While there are several log file viewers out there, I did mine a bit differently. While it does include the expected search feature, it also includes the ability to pre-program searches. You create a list of things to search for and when the log file is loaded, a list of locations is created. By clicking on the list of found items, the log is automatically scrolled to that position. This is handy when searching the log for errors or warnings or, if you're a plugin creator who, like me, prefaces their log entries with the name of their mod, it'll quickly locate all those entries.
  • Part File Editor - After selecting a KSP install directory, ModEASY locates all of the part files in that directory and all subdirectories and loads them into a sorted and group capable list. By clicking on any of the part files in the list, it's automatically loaded into two editors. One editor is a standard text editor with the expected features of copy, paste, find, replace, etc. The other editor is a key/value editor with expandable nodes. If you need to make quick or frequent changes to a part's .cfg file, it doesn't get much easier than this.
  • Filter Builder - If you're not familiar with VAB & SPH filters, you should be. Filters allow KSP users to group parts into selectable categories. The filter builder is designed primarily for the part modder. By selecting a directory, the filter builder will scan that directory and all sub directories for part files. It will then build a filter (PartCategories.cfg) which categorizes the parts found into standard part categories (Pods, Fuel Tanks, Engines, etc.). This filter file can then be distributed with part collections. It's recognized by KSP and loaded automatically so that the end user can quickly and easily select the filter and see only the parts in the filter. Below is an example of a filter I built for my Maritime Pack showing only the structural parts in the pack.
    Filterex.jpg

Additional Features

  • Skins - Choose from over 20 different styles and colors.
  • Installer with Uninstall - Comes pre-packaged inside an installer with an uninstall feature. No .zip files to play with.
  • Built in Help Files - Includes and embedded web browser with online help files. No need to download a new version simply because the help files get updated (Note: This also means that this program does transfer data to a server on the internet. That data is essentially the same data that any web browser transfers to this forum.)
  • Optional Comment Stripping - Strips comments from part files.
  • Automatic part file formatting - Properly indents PartModule nodes and child nodes with and adjustable indentation size.
  • Collapsable/Expandable PartModule Nodes - Expand or Collapes all or just one PartModule node to make viewing of the part file clean and easy.
  • One click editing of part file values. Simply click on the value, edit, save, done.
  • Add, Delete & Edit PartModule Nodes - Right click for a popup menu to edit every aspect of the part file.
  • Free BSD License - Available for viewing in both the installer and the online help files.

System Requirements

  • Windows Vista or later (will probably work with earlier versions but not guaranteed)
  • Internet Explorer 6.0 or later - ModEASY embeds a copy of IE in order to display the online help files.

More Images:

These are the images used in the help files to point out various features of ModEASY.

NOTICE:

Because ModEASY embeds a copy of Internet Explorer, it does transfer data to my server. This data is a pure url with some added command line switches to identify the style colors being used and the version of ModEASY being used. No personal data whatsoever is transferred. If you're concerned, feel free to block it with a firewall. It'll still run but it'll mean the help files are unavailable.

Being an executable I understand concerns regarding privacy and security. I've been a shareware author for many years and so far, no doods in expensive suits and dark sunglasses have come banging on my door. While I doubt that'll alleviate all your fears, my best advice is, if you're the paranoid type, don't bother to download it. You'll feel better in the end.


Just an interesting statistic:

Number of times the help files have been accessed

MEHelp.png

Edited by Fengist
Link to comment
Share on other sites

Neat!

Any plans for integration with Module Manager for the part editor? Ideally you'd read in the configs and show the resulting nodes, but probably easier (and more useful) is just to be able to save part changes as a MM config. The benefit is that then you could have a separate file you maintain which won't be overwritten by upgrades.

Link to comment
Share on other sites

Neat!

Any plans for integration with Module Manager for the part editor? Ideally you'd read in the configs and show the resulting nodes, but probably easier (and more useful) is just to be able to save part changes as a MM config. The benefit is that then you could have a separate file you maintain which won't be overwritten by upgrades.

I can't say for certain yes or no. At the moment my parts pack doesn't include any MM config and I've yet to dig into how complicated it is to add MM. But rest assured, if it's a pain in the nozzle to edit and maintain, I'll come up with something.

The only change I have planned atm is to fix the fact that you can't read the log while KSP is running. For now, it's unable to as the file is locked by KSP. I'm pretty sure that's just a matter of me loading it up as a stream rather than a plain text file.

Link to comment
Share on other sites

It looks like the thing i always intended to write but never did.

Installed, ran and a "List index out of bounds(0)" message appeared

After shutdown a "An unexpected memory leak has occurred. The unexpected small block leaks are:

85-92 bytes: TstringList x 1" message appeared.

Reload list in the CFG editor also gives the "List index out of bounds(0)" message

The Splash screen doesn't unload. It's displaying "Loading: L:\KSP_win\Gamedat....\FuelSwitchConfig.cfg"

In the CFG editor only the cfg's of the last loaded directory can be accessed.

The display of the CFG is awesome!

If you change a value, is it immediately updated in the cfg file?

The filter builder is working but only if you strictly adhere to the correct sequence.

Edited by TheCardinal
Link to comment
Share on other sites

It looks like the thing i always intended to write but never did.

Installed, ran and a "List index out of bounds(0)" message appeared

After shutdown a "An unexpected memory leak has occurred. The unexpected small block leaks are:

85-92 bytes: TstringList x 1" message appeared.

Reload list in the CFG editor also gives the "List index out of bounds(0)" message

With a list index out of bounds, the memory leak error is expected. Delphi has a 'report memory leaks on shutdown' feature that is active in ModEasy while it's being tested. So the second error is no surprise. Basically, the list gets created. The code tries to find something in the list and hits a problem, skips over the rest of the code in that section and doesn't 'destroy' the list when it's done. The 0 indicates it's trying to manipulate a list that has 0 items in it.

For some reason, it's trying to go through your GameData directory tree, looking for .cfg files that begin with the word 'PART' and it's finding something that doesn't quite work right or it's not finding any .cfg files at all. Either it's in a .cfg file, the lack of .cfg files with 'PART' in them, or the directory structure itself.

The Splash screen doesn't unload. It's displaying "Loading: L:\KSP_win\Gamedat....\FuelSwitchConfig.cfg"

With the list index out of bounds, it's crashing during startup I'm guessing. That would cause the program to skip over parts of the code and not close out the splash screen. One small error will often lead to a cascade of other errors.

In the CFG editor only the cfg's of the last loaded directory can be accessed.

The display of the CFG is awesome!

If you change a value, is it immediately updated in the cfg file?

Again, with that one crash, a whole host of things could end up having problems. Since they're all in the file list, that doesn't surprise me. No, the values only change when you save. I'm the type that makes mistakes when changing things around and hate when those changes become permanent without me making them permanent.

The filter builder is working but only if you strictly adhere to the correct sequence.

It shouldn't be a 'strict' sequence, but you should have all three things, the icon, the name and the directory chosen before the build button lights up.

If you have a 'stock' install of KSP, try it on that and see if you're still getting the error. If not, try zipping up individual mod directories so that ModEasy does'nt see them and see if you can find the problem through a process of elimination.

Link to comment
Share on other sites

With a list index out of bounds, the memory leak error is expected. Delphi has a 'report memory leaks on shutdown' feature that is active in ModEasy while it's being tested. So the second error is no surprise. Basically, the list gets created. The code tries to find something in the list and hits a problem, skips over the rest of the code in that section and doesn't 'destroy' the list when it's done. The 0 indicates it's trying to manipulate a list that has 0 items in it.

For some reason, it's trying to go through your GameData directory tree, looking for .cfg files that begin with the word 'PART' and it's finding something that doesn't quite work right or it's not finding any .cfg files at all. Either it's in a .cfg file, the lack of .cfg files with 'PART' in them, or the directory structure itself.

With the list index out of bounds, it's crashing during startup I'm guessing. That would cause the program to skip over parts of the code and not close out the splash screen. One small error will often lead to a cascade of other errors.

Again, with that one crash, a whole host of things could end up having problems. Since they're all in the file list, that doesn't surprise me. No, the values only change when you save. I'm the type that makes mistakes when changing things around and hate when those changes become permanent without me making them permanent.

It shouldn't be a 'strict' sequence, but you should have all three things, the icon, the name and the directory chosen before the build button lights up.

If you have a 'stock' install of KSP, try it on that and see if you're still getting the error. If not, try zipping up individual mod directories so that ModEasy does'nt see them and see if you can find the problem through a process of elimination.

Will do!

Link to comment
Share on other sites

Nice!...I'm not even a modder, but can relate to everything you've run into...I've always wondered if there was an easier way to work with the error logs, AND the .cfg customizations, AND with parts files (making it easier to prune parts out of the game)...

So I'm thinking "Great!...I gotta try this!...."

Then I got to the part where you say this requires IE... :confused:

Unfortunately, that right there is a deal breaker for me, as removing IE is one of the very first things I do on every new Windows OS fresh install I do...I REFUSE to have IE on my comp...Plus, now I'm using Linux a lot more...so yeah...

So anyway support for Firefox could be added?...Pleeze!... :)

Link to comment
Share on other sites

I made a new, stock environment. and there were no problems with the startup.

I noticed that not all the parts were loaded, so i pressed reload list. Sometimes it result in a completely blank list and sometimes the list appeared with more parts.

I noticed this because i was searching for the oms engine.

You mentioned that changed cfg's needed to be saved in order to make those changes permanent, but i still haven't figured out how to do just that.

I also noticed that modeasy appeares twice in the list programs you get with the windows start button.

Edited by TheCardinal
Link to comment
Share on other sites

Nice!...I'm not even a modder, but can relate to everything you've run into...I've always wondered if there was an easier way to work with the error logs, AND the .cfg customizations, AND with parts files (making it easier to prune parts out of the game)...

So I'm thinking "Great!...I gotta try this!...."

Then I got to the part where you say this requires IE... :confused:

Unfortunately, that right there is a deal breaker for me, as removing IE is one of the very first things I do on every new Windows OS fresh install I do...I REFUSE to have IE on my comp...Plus, now I'm using Linux a lot more...so yeah...

So anyway support for Firefox could be added?...Pleeze!... :)

Sorry, the only drop-in component for Delphi that adds a browser is one for IE. I know there's one for Chrome and I've looked at it but my god, it's a nightmare to work with. Sorry, but for years now I've been putting help files on the web and dropping in a browser to directly access them. I'm not going back to the ancient .html help or .pdf files.

It may run without IE installed. I can't say for certain. It's likely to crash though and just not startup. If it does, you may just not have access to the help files. Plus, you may have uninstalled the browser but I doubt you actually uninstalled the core of IE. Windows uses it a LOT in the OS.

- - - Updated - - -

I made a new, stock environment. and there were no problems with the startup.

I noticed that not all the parts were loaded, so i pressed reload list. Sometimes it result in a completely blank list and sometimes the list appeared with more parts.

I noticed this because i was searching for the oms engine.

You mentioned that changed cfg's needed to be saved in order to make those changes permanent, but i still haven't figured out how to do just that.

I also noticed that modeasy appeares twice in the list programs you get with the windows start button.

Ok, that sounds really odd. The code where it searches the directory tree for .cfg files is pretty standard Delphi code and should even find hidden files. One thing it does do is look specifically for the 'GameData' directory and then begins the search below that folder. And it does have an error check. If it finds 0 .cfg files then it'll let you know. Just out of curiosity, go into the settings and turn the group view off and see if that has an effect. The list is actually a Windows component and... well I dunno but he the grouping of the parts may be having an effect. You may be pulling up some manufacturer's name that's causing the group view fits. Without it, you'll just get an alphabetical list of parts.

To save the .cfg, right above the editor you'll see 'file' click on it.

And if it's in your startup twice???? Again, that's odd. I'd try to uninstall both copies and then reinstall. I doesn't write anything to the registry, it only uses a .ini file in it's own directory.

Link to comment
Share on other sites

Thats OK... And yes, you are correct: there is absolutely NO way to completely remove IE and all its tentacles out of the OS...I "turn off" the main component, then found a bunch of files & folders that actually lets you delete them without the OS complaining too badly.

I'll download this and try it out, and see how it goes... Too bad its not Linux compat, as a few months ago I installed Linux as tri-boot on my computer to play KSP on, but have slowly been migrating over to using it as my main OS instead of Win7/8.1.

In any case, I'm always glad to see tools like this come along for KSP. Thanx! :)

Link to comment
Share on other sites

Thats OK... And yes, you are correct: there is absolutely NO way to completely remove IE and all its tentacles out of the OS...I "turn off" the main component, then found a bunch of files & folders that actually lets you delete them without the OS complaining too badly.

I'll download this and try it out, and see how it goes... Too bad its not Linux compat, as a few months ago I installed Linux as tri-boot on my computer to play KSP on, but have slowly been migrating over to using it as my main OS instead of Win7/8.1.

In any case, I'm always glad to see tools like this come along for KSP. Thanx! :)

There is a 'flavor' of Pascal that's based on a very old version of Delphi called Lazarus. It's basically a compiler called Free Pascal with an old Delphi IDE on top of it. It DOES compile for Linux and Windows. But, a LOT of the features I use in ModEasy, like the skins, the embedded IE, the list view, the key/value editor... are all based around Windows API code. It would take, pretty much, a complete rewrite to make it compatible for Linux.

And thanks for the comments.

Link to comment
Share on other sites

Went to re-download (accidentally deleted it).

The download link in the OP seems to just point to a download counter rather than the zip file?

The source download works, but I don't have a Delphi compiler any more (been about 15 years since I used Delphi). :)

Link to comment
Share on other sites

Went to re-download (accidentally deleted it).

The download link in the OP seems to just point to a download counter rather than the zip file?

The source download works, but I don't have a Delphi compiler any more (been about 15 years since I used Delphi). :)

I've been having all kinds of strange issues with the forums and my links lately. I got it to work once. The one way that worked consistently... right click, open in a new tab. It may just be lag between the forums and my server. I'll keep check on it. Thanks

Link to comment
Share on other sites

I've been having all kinds of strange issues with the forums and my links lately. I got it to work once. The one way that worked consistently... right click, open in a new tab. It may just be lag between the forums and my server. I'll keep check on it. Thanks

The Download Icon (big gray button) in your OP points to: http://www.kerbaltopia.com/ModEASY/DLcount.php

Right click open in new tab etc still tries to open this link which fails...???

Link to comment
Share on other sites

The Download Icon (big gray button) in your OP points to: http://www.kerbaltopia.com/ModEASY/DLcount.php

Right click open in new tab etc still tries to open this link which fails...???

Yes, that's the correct file. That file tracks the number of downloads then passes the name of the file to download. It should open to a blank window and the download start.

I've tried it in both Chrome and Edge and the right click always works. What browser are you using?

Link to comment
Share on other sites

Yes, that's the correct file. That file tracks the number of downloads then passes the name of the file to download. It should open to a blank window and the download start.

I've tried it in both Chrome and Edge and the right click always works. What browser are you using?

Wouldn't work for me using chrome or IE on my Windoze partition. But it worked fine using Safari under OS-X.

Link to comment
Share on other sites

Wouldn't work for me using chrome or IE on my Windoze partition. But it worked fine using Safari under OS-X.

No idea. Only thing that comes to mind might be some ad blocker or some such that's preventing you from running .php files linked outside the current domain.

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