Jump to content

[Script] AutoPruner v1.1 - Prune those parts that suck up your RAM! (2015/018)


Felger

Recommended Posts

This mod doesn't seem to recognize specifications made for a single file (up to the file extension), and only folders now. Specifying **something**.cfg makes the program recognize it as 0 entities to prune.

I'm trying to create a new, and fix the existing prune lists to be up to date with the 1.0 folder structures but this is preventing me from specifying certain things located in the same folder with other things I don't want to prune.

Link to comment
Share on other sites

  Felger said:
Hmm, it should work. I'll take a look at how I'm matching stuff and see if there's an easy fix.

The Perl packager that I used before to make the last release is super finicky, and I haven't been able to get it to work on my windows machine since my hard drive went belly up.

In any case, I'm actually hoping to get some kind of combined functionality with night's ckan part manager. That'd be the most fitting solution imo

I came across a problem where I had pruned some files, then went ahead and updated (via CKAN) the mod, then did an unprune operation.

It just went ahead and overwrite the newer files.

So I went ahead and modified the pruner.pl file with the following code :

Around line 97, where it says:


rename($file, $+{base});

replace that line with the following:


if ( -e $+{base} )
{
say "$+{base} exists"
# Uncomment the following line if you want the .pruned file deleted
# unlink $+{base};
}
else
{
say "Unpruning $file...";
rename($file, $+{base});
}

I deliberately did not add a check when doing the prune function, but it really should be there, if nothing else than to remove the old .pruned file before renaming the current file to .pruned.

LGG

Link to comment
Share on other sites

  Felger said:
Hmm, it should work. I'll take a look at how I'm matching stuff and see if there's an easy fix.

The Perl packager that I used before to make the last release is super finicky, and I haven't been able to get it to work on my windows machine since my hard drive went belly up.

In any case, I'm actually hoping to get some kind of combined functionality with night's ckan part manager. That'd be the most fitting solution imo

Just an FYI, I have Cygwin installed, and installed PAR-Packer, and was then able to easily make a windows executable out of the pruner.pl file.

Free also.

LGG

Link to comment
Share on other sites

  • 3 weeks later...
  • 2 weeks later...
  Lazy8 said:
Are there any current prnl lists available anywhere?

I've gone to create a new updated prune list pack here.

Please check it out.

I've just messaged Felger about this, so I hope he doesn't mind me doing this or else I'd be taking it down.

- - - Updated - - -

I had a reply from Felger to my thread, and he seems happy about it :D

So I guess that is a go!

Link to comment
Share on other sites

  • 2 months later...

Hello

I got a problem. After runing pruner.exe I've got a message it is a wrong type of file for my system. I should check if the program is x86 or x64. I'm working on widnows 7 32bit with 4gb mod to kernel. Any ideas? Pls dont tell me its linux application :)

Link to comment
Share on other sites

  bartof said:
Hello

I got a problem. After runing pruner.exe I've got a message it is a wrong type of file for my system. I should check if the program is x86 or x64. I'm working on widnows 7 32bit with 4gb mod to kernel. Any ideas? Pls dont tell me its linux application :)

It's just a compiled perl script. If you are having trouble with the EXE you can download perl, then from the command line run perl pruner.pl.

Link to comment
Share on other sites

  • 2 weeks later...
  • 3 weeks later...
[quote name='FirroSeranel']Is there any way to get this to prune just normal, boring cylindrical tanks? I don't want to prune things like the Mk3 tanks, adapter tanks, oblong tanks from Firespitter, toroidal tanks, etc (basically any tank that can't be replicated by Procedural Parts)[/QUOTE]

There is, but it involves the creation of a file with the items you want removing. While it's worth doing for mass consumption, for your individual needs (unless you plan on pruning multiple installs of the same stuff) you could take a look at part manager for ckan. You would need the "unofficial" plugin / fix.

After writing all that out on mobile I just realised I don't think you can use part manager for stock parts. Will leave it at that - someone else may have better advice but gives you something to ponder.

Or DELETE ALL THE CONFIGS!!!
Link to comment
Share on other sites

  • 3 weeks later...
  On 11/20/2015 at 3:53 PM, FirroSeranel said:

Is there any way to get this to prune just normal, boring cylindrical tanks? I don't want to prune things like the Mk3 tanks, adapter tanks, oblong tanks from Firespitter, toroidal tanks, etc (basically any tank that can't be replicated by Procedural Parts)

Expand  

Easeist way vould be to just edit the prnl files in the mod folder (eg notepad). Just remove the lines containing whatever you want to keep. Then prune.

Link to comment
Share on other sites

THIS IS A REPOST from my post in the rp-0 thread, but useful enough to post here i hope

 

I have created a "rp_zero master" prune file for auto pruner there may be some duplicate lines (i hope not) or i may have pruned parts that maybe needed, if someone that really knows the needed parts can go over this quickly and let me know i will submit this as a true "rp_zero.prnl" file for everyone to use, warning its LONG: (did i miss anything or take away needed stuff?)

  Reveal hidden contents

thanks everyone that looks at this... did i miss anything or take away needed stuff?

edit: i know i missed the x1 rocket plane part duplicates (the cockpit with no hatch and the "naked" x1 rocket engine plus the tanks...where are they??), some of the "unneeded" us/ussr probes (duplicates should be removed, but i guess others should be kept for real life analog builds), a HUGE amount of raidernick soviet probes/rockets parts like tanks and fairings ect, some FASA tanks/fairings/decouplers.... i suspect maybe about 500mb of ram worth of unneeded parts could still be trimmed from the required/supported list alone.

sorry for the ramble on of parts "missed" mostly i cant find them all or dont know what i really should remove more, thanks  

Edited by Guest
repost msg
Link to comment
Share on other sites

  On 12/19/2015 at 4:28 AM, ThaZeus said:

I NEED this in my life. rp,rss, and ro, are the reason I came here!

 

P.S. Your next challlenge: B9

Expand  

current list i am using now after abit of testing... please help add to it, biggest issues >> raidernick us probes and soviet probes and rockets (kinda a messy file structure that mod list)

  Reveal hidden contents

cleaning up the last bits would so help

Link to comment
Share on other sites

  • 2 months later...
  • 3 weeks later...
  On 3/20/2016 at 2:27 PM, Warp11 said:

Would it be possible to do a prunelist for nonRP0 parts? Cause they are whats really killing my ram needlessly right now.
Thanks

Expand  

Hi, I thought if there is no part in a cfg file referencing the model/texture then they are not loaded as well as the part itself

I use this .cfg to get rid of the non-rp0/nocost

 

@PART[*]:HAS[#RP0conf[true],#TechRequired[ORPHANS]]:FINAL
{
	!RP0conf = DEL
}
@PART[*]:HAS[#RP0conf[false],#TechRequired[ORPHANS]]:FINAL
{
	!RP0conf = DEL
}

//////////////////////////////////////
// Hide parts
!PART[*]:HAS[~RP0conf[],#RSSROConfig[true]]:FINAL { }
!PART[*]:HAS[~RP0conf[],#RSSROConfig[True]]:FINAL { }
!PART[*]:HAS[~RP0conf[],~RSSROConfig[]]:FINAL { }
!PART[*]:HAS[~RP0conf[],#RSSROConfig[false]]:FINAL { }
!PART[*]:HAS[~RP0conf[],#RSSROConfig[False]]:FINAL { }
!PART[*]:HAS[#RP0conf[false],#RSSROConfig[true]]:FINAL { }
!PART[*]:HAS[#RP0conf[false],#RSSROConfig[True]]:FINAL { }
!PART[*]:HAS[#RP0conf[false],#RSSROConfig[false]]:FINAL { }
!PART[*]:HAS[#RP0conf[false],#RSSROConfig[False]]:FINAL { }
!PART[*]:HAS[#RP0conf[false],~RSSROConfig[]]:FINAL { }
!PART[*]:HAS[#RP0conf[true],~RSSROConfig[]]:FINAL { }

 

What brings me here is the following:

I am working on a tool to create prune lists more comfortably.

It scans the whole gameDatafolder and parses the parts/Name/tiles of what it can find in any .cfg/.cfg.pruned file

then it shows a list of all parts with their Name, any title used in any part-mod with the same Name and file path where the cfg file is located.

also it Shows a list with all parts that are pruned.

then you can doubleclick on the parts to move them to pruned or move them back. While doing so it create a prune list which Location you can also specify.

and it has a search filter

I did this because i want to: 1.) start a sandbox game 2.) uncheck any parts i dont want to use

to "apply the changes" you must use the pruner and the prune file (maybe i will add that functionality later)

 

if anyone has any suggestions how i shall proceed? or any improvements, it is still quite not-so-good-overview, because there are so many parts

and parts are reused and copied with +PART, I am not shure if I am doing that right

I think I will make it possible of specify subfolders of gamedata (now it assumes ksp-root)

 

best regards

and here is the tool: (only win64): http://www.megafileupload.com/j2nO/PartFinder.exe (I hope this file uploader works)

feel free to try it out, it does not destroy any of your files (as Long as you do not specify an existing prune list file)

Edited by nablabla
Link to comment
Share on other sites

oh man, i just had an idea (after creating a prune list with my tool going through EVERYthing marked no-rp0 damn >_<)
I will build and upload a tool tomorrow which reads the modulemanager.configcache and creates a prune list for every part with rp-0 nocost/non rp-0 in its title

best regards

 

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