nablabla

[Tool] PartFinder

Recommended Posts

[WIP] PartFinder v0.2

WHO: This tool is for modders, or those who want to have control over their modded installs parts. (Windows)

WHY: I wanted to have a tool, wich can scan the GameData folder and lists all parts from any mod, by name and in-game title so I can find them easily. And then I wanted a mechanism to create prune files automated.

WHAT:

- Lists all parts and of the GameData Folder with Name and path (right-click and click on "Path: ..." to open the file)

- Easy creation of prune files

- Applicaiton of prune files or lists of prune files

- Automatic creation of prune files (remove non-RP0/ repair texture/model resources -> no black parts)

HOW:

  1. File > Select Install > select the Folder of KSP (not GameData)
  2. File > Select Prune List > select/create any (empty) text file
  3. Press Update
  4. Select files you want to remove then double-click or press ">Prune>". The app will create a prune list (the files are not touched yet). The program can only remove the whole files, so be careful with it!
  5. If you want to apply the changes: Apply>Open Apply Window. In this window you have the following Options
    1. "Add" (left)/(right): Add a list. All files in that list will be pruned/unpruned (renamed to cfg.pruned/.cfg). Add the same file here and add files for the AutoPruner (AutoPruner)
    2. "Remove" (left)/(right) remove files again
    3. Check the files
    4. Press "Aplly All". It will first prune all files from any list on the left, then unprune any file from any list on the right.

ALSO:  Right-click on a part to get more Information. And click on the "Path: .." entry to open the respective .cfg-file

OPTIONS:

You can use these search parts using the search bar (use Return or press "search") with the following Options:

  • no mods: if checkedit will not show part/.cfg-files created with @PART (recommended: checked)

  • parts only: it will only present you content of files where a PART tag was found  (recommended: checked)

  • no copies, it will not Show parts created with +PART (recommended: unchecked)

  • no deleted: it will not Show parts wich are deleted using the !PART thing

 

 

DOWNLOAD/LINK: https://github.com/nablabla/PartFinder/releases

Screenshots:

http://i.imgur.com/pMa1tav.png

http://i.imgur.com/URLxsw9.png

http://i.imgur.com/iorl5vL.png

TODO:

  • list all parts which are in the same file
  • more testing
  • do some Performance measurements
  • provide Information about parts and the inheritance of parts in a nice window
  • splitt .cfg files to make it possible to only prune a part, not touching the others (?)

Please be nice to me, I do this the first time.

I am very open for any suggestions/contributions

Edited by nablabla
added todo list /formatting of it

Share this post


Link to post
Share on other sites

How to create the rp0 list:

1) install ksp with rp0 and all mods you like
2) launch ksp (unpruned) at least once (so there is a module manager cache file)
3) launch partfinder.exe
  - specify location of ksp (not game data)
  - specify a prune list (any (empty) text file) say "default.prnl"
  - press Create list>Create nonRP0
4) [optional] go to the folder of your prune list file, there
   are three new files "default.rp0_nocost.prnl", "default.non_rp0.prnl" and "default.non_ro.prnl"
   rename them (or they will be overwritten by partfinder if you do it again later)  
5) Apply: Open apply window and add these lists (on the left) and Press "Aplly all" (or "Prune")

To create the non-rp0/...etc prune lists again you need to unprune (everything) and start from (2)

---------------------------------------------------------------------------

To repair the textures/resources:

 (which is caused by some prune lists from the autopruner, because if you prune all folders with tanks, there might be some

textures used by other parts from other mods)

1) launch partfinder.exe
  - specify location of ksp (not game data)
  - specify a prune list (any (empty) text file) say "default.prnl"
  - press Create list>Create resource repair
2) [optional] go to the folder of your prune list file, there
   are three new files "default.res.prune.prnl", and "default.res.unprune.prnl"
   rename them (or they will be overwritten by partfinder if you do it again later)  

3) Apply: Open apply window and

  • unprune default.res.unprune.prnl (add it to the right)
  • [optional] prune custom.res.prune.prnl  (to the left)
  • Press "Apply all"

 

Important: Leave all prune files you want to have pruned checked or the effects will be undone.

The workflow is: unpruen everything, prune files on the left, unprune file on the right

Edited by nablabla

Share this post


Link to post
Share on other sites
On ‎16‎.‎04‎.‎2016 at 3:10 PM, Warp11 said:

This is awesome, thank you so much.

so any suggestions?

I want to add some kind of info window (instead of the actual right-click window)

and focus more on providing info besides of all the pruning stuff.

And did it work for your install?

Edited by nablabla
correction

Share this post


Link to post
Share on other sites

Yeah, it worked great. I'll have to have a look at the texture repair, haven't got round to that yet, some of my textures went black. What do you mean by providing info?

Share this post


Link to post
Share on other sites

The texture repair has to functions:

1) Removes all Content files (textures and models). And puts it into the ...res.prune.prnl file. this is optional and if it leads to Problems, do not use it. And of cause it only makes  sense in combination with (2).

2) (Re-)add/unprune all used content files. To determine which textures and models are used, it scans all (non-pruned) .cfg files and also all referenced model files (because there can be references to textures as well)

and puts it into the ...res.unprune.prnl. If you apply it you should not have any black textures any more.

 

By info I meant Information about the parts in files, like title/mass/cost/folder/path/the file which it is editing or deleting to get modders a very quick overview.

Share this post


Link to post
Share on other sites

Looks neat, I'll check it out; my only suggestion so far, having not used it yet is to mention the operating system somewhere in the first post or title.

Cheers.

Share this post


Link to post
Share on other sites

Why so few words of thanks ? A wonderful program , buddy ! Many thanks. Over time, it will take pride of place in the Must Have list of all modders along with Ckan. I hope google translate not made a mess of my words ) Great job !

Share this post


Link to post
Share on other sites

I think a possibility of sorting parts by title (name in game) would be a MASSIVE improvement. 

Edited by vgamble

Share this post


Link to post
Share on other sites

it is searching for the in-game titles

29 minutes ago, vgamble said:

I think a possibility of sorting parts by title (name in game) would be a MASSIVE improvement. 

 

Share this post


Link to post
Share on other sites

sorting! ok, that will be an option of course, I think I will use a table instead of this list I am using now.

 

Share this post


Link to post
Share on other sites

This is a fantastic program! Thank you for bringing it to the community.

I have ran it according to your post, but I haven't checked to see how textures are going to be in-game. I will let you know when I get a chance to check! :D

Edit: Okay, looks like only problem I've had is with Universal Storage and SXT. US had some pruned files, which I think the outer casing for it's compartments got their models and textures from, because in game, the only thing visible was the experiments/components normally inside the containers. SXT on the other hand had the expected problem, black textures. I think I can fix US easy, but SXT is gonna take a bit, because I didn't note the specific parts that are having the issue.
 

Also, I tried unpruning in the program, but after looking at the folder of the parts I was unpruning, nothing seemed to happen. This program as really made my load times much more bearable though, I thank you for that!

Edited by SuccessPastaTime
Update on situation

Share this post


Link to post
Share on other sites

Sorting would be a great addition, but even now its a massive improvement compared with the early days where you'd had to guess the .cfg location by knowing only the part name and category.

Did my first run and pruned 60+ unwanted objects in a fraction of the time I would normally spend on this :-)

 

Great job mate and many thanks!

Share this post


Link to post
Share on other sites

Easy way to mark parts for pruning right in game. Create custom category in vab/sph, and just add there all junky parts. After that go to gamedata/squad/partlist and open PartCategories.cfg, there will be listed all parts you added to your custom category, you can just ctrl-c ctrl-v part name in search field in Partfinder, 100% accuracy. Hope it will help some one )

 

Also sometimes, if name  contains dots (.) and partfinder can't find it, you need to replace (.) with (_) and search that in partfinder. example: "rn.junoii.sgt.11" - will find nothing, "rn_junoii_sgt_11" will find part you looking for. My english pretty bad, hope I explained clearly

Edited by vgamble
important information

Share this post


Link to post
Share on other sites

I cant seem to get the tool to launch at all on Windows 10. Downloaded the EXE and it just does nothing at all, no processes generated or anything. Has anyone else had this problem?

Share this post


Link to post
Share on other sites

Hi,

I have no win10 device in my range. Did you try to download it again? Maybe the file is broken or something. No error at all ist weired. As far as I know does win 10 contains a .NET version and if not, there should be a message. Hard to tell, maybe win10 tries to initialize some service which does not manage to run. Or maybe you try restarting your windows.

I'll test it on a win10 device as soon as I find one. But I do not use ANYTHING except the standard functionallity, no libraries, no dependencies, only file-I/O.

best regards

Share this post


Link to post
Share on other sites

what do you do when you update a mod with CKAN? When I try to run partfinder I get an exception about trying to create files that already exist. I was hoping to just run it on the same main prunelist I had run before and just have it re-prune the files installed by CKAN in the update.

edit: ok so quick update, even with the exception it looks like it still runs on the whole prunelist and prunes all of the files. I just had to clean up the mod's directory, which was not fully deleted by CKAN, and had the pruned files left there.

Edited by drhay53

Share this post


Link to post
Share on other sites

Who is complaining ckan or partfinder?

As I remember it: First unprune everything, then update via ckan, than prune again.  The problem occourse when a mod no longer needs a folder, ckan tries to delete it, but then it finds the renamed part lists and gets nervous.

I will look into it this evening (europe time)

best regards

 

Share this post


Link to post
Share on other sites

@nablabla

this doesn't seem to work on linux, and I believe the reason is due to file pathing issues.

Your prune list keeps defaulting to ....\AutoPruner\PRNLs\Custom.prnl which would work for windows, but on linux it should probably be ..... /AutoPruner/PRNLs/Custom.prnl

I tried correcting it in the pathinfo.dat, but it had no effect.

Cheers.

Share this post


Link to post
Share on other sites

I had no Idea that it even runs on linux at all.

 

no correcting it does not help, i have the / and \ confused everywhere. I will make it possible that it uses / everywhere

Share this post


Link to post
Share on other sites
On 7/20/2016 at 9:14 AM, nablabla said:

I had no Idea that it even runs on linux at all.

 

no correcting it does not help, i have the / and \ confused everywhere. I will make it possible that it uses / everywhere

well don't break it's current functionality in the process obviously - not sure many use Linux much any more anyway.:(

Share this post


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