Author Topic: PUBLIC BETA: Modpack Cleaner v0.6  (Read 28392 times)

0 Members and 1 Guest are viewing this topic.

PUBLIC BETA: Modpack Cleaner v0.6
With modpacks becoming increasingly large both in filesize and filecount, it gets hard to keep track of which files you actually need and which are just wasting space. So I made a tool that does it for you! It's still in beta, but should be pretty stable by now. All instructions can be found in the readme that comes with the download.

Disclaimer: This program has limited scope (multimod and VPs are not supported), so a file in the "unused" list may still be in use. This is merely a tool that lists the files you should take another look at, see why they were originally put in, and if this reason is still valid.

Hope it will be of good use!

Download Windows EXE (1.26MB from MediaFire)

or check out the source code from http://freespace-open-modpack-cleaner.googlecode.com/svn/trunk/
« Last Edit: March 01, 2012, 03:21:04 am by FreeSpaceFreak »

 

Offline Rga_Noris

  • 29
  • What?
Re: PUBLIC BETA: Modpack Cleaner
WAY cool!
I think I'll call REAL Mahjong 'Chinese Dominoes', just to make people think I'm an ignorant asshat.

 

Offline headdie

  • i don't use punctuation lol
  • 212
  • Lawful Neutral with a Chaotic outook
    • Minecraft
    • Skype
    • Twitter
    • Headdie on Deviant Art
Re: PUBLIC BETA: Modpack Cleaner
Defiantly taking a look at this
Minister of Interstellar Affairs Sol Union - Retired
quote General Battuta - "FRED is canon!"
Contact me at [email protected]
My Release Thread, Old Release Thread, Celestial Objects Thread, My rubbish attempts at art

 

Offline Nyctaeus

  • The Slavic Engineer
  • 212
  • My "FS Ships" folder is 582gb.
    • Minecraft
    • Exile
Re: PUBLIC BETA: Modpack Cleaner
It's awesome! Very useful thing. The easiest way to check what we don't need.
Exile | Shadow Genesis | Inferno | Series Resurrecta  | DA Profile | P3D Profile

Proud owner of NyctiShipyards. Remember - Nyx will fix it!

All of my assets including models, textures, skyboxes, effects may be used under standard CC BY-NC 4.0 license.

 

Offline headdie

  • i don't use punctuation lol
  • 212
  • Lawful Neutral with a Chaotic outook
    • Minecraft
    • Skype
    • Twitter
    • Headdie on Deviant Art
Re: PUBLIC BETA: Modpack Cleaner
ran a quick test on one of my mods in progress i know has junk in there and seems to work nice enough
Minister of Interstellar Affairs Sol Union - Retired
quote General Battuta - "FRED is canon!"
Contact me at [email protected]
My Release Thread, Old Release Thread, Celestial Objects Thread, My rubbish attempts at art

 

Offline Droid803

  • Trusted poster of legit stuff
  • 213
  • /人 ◕ ‿‿ ◕ 人\ Do you want to be a Magical Girl?
    • Skype
    • Steam
Re: PUBLIC BETA: Modpack Cleaner
Just tried it out, coming up with a few false 'positives".

For one, it's saying things which are used as glowpoint textures a re unused (in maps, should they be in effects?), and that muzzle flash effects aren't used (in effects), as well as an effect used by afterburner thruster particles (in effects).
(´・ω・`)
=============================================================

 
Re: PUBLIC BETA: Modpack Cleaner
Ah, good to hear people using it :)

Droid - Yeah, glowpoints go in effects - the maps folder is expected to only contain ship textures. Muzzleflashes - it checks the weapons tables for those, not the muzzleflash table. Are you sure there's a weapon using the muzzleflash listed? Afterburner particles - those aren't in, you're right. What's the syntax for that? It's apparently not in the Wiki (which I based the table-readers on).

 

Offline T-LoW

  • 28
  • Planet Earth is blue and theres nothing left to do
    • German Freespace-Galaxy
Re: PUBLIC BETA: Modpack Cleaner
For the love of god finally something that tells me what to delete! Thank you!
The german Freespace-Galaxy

"There was a time before we were born. If someone asks this is where I'll be."

 

Offline Fury

  • The Curmudgeon
  • 213
Re: PUBLIC BETA: Modpack Cleaner
Muzzleflashes - it checks the weapons tables for those, not the muzzleflash table.
In weapons.tbl you define name of the muzzleflash for the weapon, this name is then parsed from mflash.tbl which lists actual effects used for the muzzleflash. You HAVE to parse both mflash.tbl and -mfl.tbm to get accurate results for muzzleflashes. I also noticed that this program skips weapon_expl.tbl and -wxp.tbm, which means the program lists effects listed in these tables as unused as well.

Hopefully support for hud, interface, sound, music and voice files will be added at later date. Definitely an excellent start for such an useful program! :)

Have to add that support for mod.ini would be nice, in a way that the program notifies if a file is unused in the original mod but used by another mod. For example, you have mods A and B. B depends on A and references to an effects file called fancy.dds. Fancy.dds is found in mod A, but mod A does not use this file. It'd be better if this file is moved to mod B if possible.
« Last Edit: February 15, 2012, 05:23:49 am by Fury »

 

Offline Goober5000

  • HLP Loremaster
  • 214
    • Goober5000 Productions
Re: PUBLIC BETA: Modpack Cleaner
Defiantly taking a look at this

That's the spirit.  Stick it to the man!

 

Offline headdie

  • i don't use punctuation lol
  • 212
  • Lawful Neutral with a Chaotic outook
    • Minecraft
    • Skype
    • Twitter
    • Headdie on Deviant Art
Re: PUBLIC BETA: Modpack Cleaner v0.5
Defiantly taking a look at this

That's the spirit.  Stick it to the man!

doh spellcheck fail
Minister of Interstellar Affairs Sol Union - Retired
quote General Battuta - "FRED is canon!"
Contact me at [email protected]
My Release Thread, Old Release Thread, Celestial Objects Thread, My rubbish attempts at art

 

Offline Rga_Noris

  • 29
  • What?
Re: PUBLIC BETA: Modpack Cleaner v0.5
Just curious...

What are your plans for this? What goals do you have?
I think I'll call REAL Mahjong 'Chinese Dominoes', just to make people think I'm an ignorant asshat.

 

Offline mjn.mixael

  • Cutscene Master
  • 212
  • Chopped liver
    • Steam
    • Twitter
Re: PUBLIC BETA: Modpack Cleaner v0.5
Give me multi-mod or give me death. (Also VP support!) No problem, right? :p
Cutscene Upgrade Project - Mainhall Remakes - Between the Ashes
Youtube Channel - P3D Model Box
Between the Ashes is looking for committed testers, PM me for details.
Freespace Upgrade Project See what's happening.

 
Re: PUBLIC BETA: Modpack Cleaner
In weapons.tbl you define name of the muzzleflash for the weapon, this name is then parsed from mflash.tbl which lists actual effects used for the muzzleflash. You HAVE to parse both mflash.tbl and -mfl.tbm to get accurate results for muzzleflashes. I also noticed that this program skips weapon_expl.tbl and -wxp.tbm, which means the program lists effects listed in these tables as unused as well.

You're right! I always thought the tabled muzzleflash name and filename had to be the same... Which is the case for weapon_expl.tbl (according to the Wiki), so at least that should be alright.

Where to go with this... I started doing this mainly as an exercise in C++ and wxWidgets. I might add multimod, since people are asking for it; VP support will be a challenge, so that's probably gonna happen too. Cleaning other folders, I dunno. Maps and effects are the usual memory hogs, and AFAIK there's no real challenge in the other folders (it's all used in the same way as maps and effects) so at that point it just becomes cumbersome and repetitive, not much of an exercise anymore.

 

Offline Droid803

  • Trusted poster of legit stuff
  • 213
  • /人 ◕ ‿‿ ◕ 人\ Do you want to be a Magical Girl?
    • Skype
    • Steam
Re: PUBLIC BETA: Modpack Cleaner v0.5
Afterburner particles - those aren't in, you're right. What's the syntax for that? It's apparently not in the Wiki (which I based the table-readers on).

Code: [Select]
$Thruster Particles:
$Thruster Particle Bitmap: GN_Particle_Red.ani
$Min Radius: 0.25
$Max Radius: 0.75
$Min Created: 8
$Max Created: 15
$Variance: 0.25
$Thruster Particles:
$Afterburner Particle Bitmap: Vapula_Particle.ani
$Min Radius: 0.25
$Max Radius: 0.75
$Min Created: 15
$Max Created: 30
$Variance: 0.25

A (working) example of thruster particles.
(´・ω・`)
=============================================================

 

Offline Fury

  • The Curmudgeon
  • 213
Re: PUBLIC BETA: Modpack Cleaner v0.5
What's the point with adding support to vp's? If you use this app, it means you're developing a mod or at least messing with the modpack, which again means you've already extracted contents of vp-files. Even if you run this app against vp-files, you're not going to be able to do any cleaning unless you extract said vp-files. It seems a lot of work for no gain whatsoever to add support for vp's.

Which is the case for weapon_expl.tbl (according to the Wiki), so at least that should be alright.
Well, if may want to consider adding a notification that weapon_expl.tbl references to unused effect and it could be removed from tbl as well as the effect itself.

Cleaning other folders, I dunno. Maps and effects are the usual memory hogs, and AFAIK there's no real challenge in the other folders (it's all used in the same way as maps and effects) so at that point it just becomes cumbersome and repetitive, not much of an exercise anymore.
Memory hogs yes, but I think this tool has real potential to become a true modpack cleaner and it'd be real benefit to everybody to not bundle useless files in their modpacks. A lot of mods these days have a ton of files in their interface folder for example, which makes noticing unused files hard.

How about setting up svn repository for this, it'd be a lot more convenient for people to contribute? That way you don't have to add features that have no interest to you, but others may want to. And everyone benefits from it.

 

Offline mjn.mixael

  • Cutscene Master
  • 212
  • Chopped liver
    • Steam
    • Twitter
Re: PUBLIC BETA: Modpack Cleaner v0.5
What's the point with adding support to vp's? If you use this app, it means you're developing a mod or at least messing with the modpack, which again means you've already extracted contents of vp-files. Even if you run this app against vp-files, you're not going to be able to do any cleaning unless you extract said vp-files. It seems a lot of work for no gain whatsoever to add support for vp's.

Let's say you are developing a mod against the MediaVPs. How does this program check (assuming multi-mod support) that certain files exist if it can't read into the MediaVPs VPs?
Cutscene Upgrade Project - Mainhall Remakes - Between the Ashes
Youtube Channel - P3D Model Box
Between the Ashes is looking for committed testers, PM me for details.
Freespace Upgrade Project See what's happening.

 

Offline Fury

  • The Curmudgeon
  • 213
Re: PUBLIC BETA: Modpack Cleaner v0.5
The tool does not check for missing effects or maps as it is. The tool would first need to be able to check and notify of missing files.

 
Re: PUBLIC BETA: Modpack Cleaner v0.5
*snip*

Great, thanks :)

VP support - it could be useful if you're overriding an MVP file. Let's say you want the Orion in different colours, so you override the MVP textures with identically-named ones in your own modpack. Anyway, I'll probably add it just because it's interesting to do.

SVN repo - that'd be cool, though I wouldn't know how to go about it. Either way, the source code is provided (I can upload the VC10 project file if anyone wants it), contributions are welcome (as is criticism on my newb coding BTW).

 

Offline Iss Mneur

  • Moderator
  • 210
  • TODO:
Re: PUBLIC BETA: Modpack Cleaner v0.5
VP support - it could be useful if you're overriding an MVP file. Let's say you want the Orion in different colours, so you override the MVP textures with identically-named ones in your own modpack. Anyway, I'll probably add it just because it's interesting to do.
If you do implement VP support. I have a working wxBase implementation that will read .vps.  It should be fairly straight forward to port to STL C++ like what you are using. It was originally done up in anticipation of a wxLauncher feature(s) that I haven't gotten to yet, but as far as I recall the implemenation works as advertised for reading of vps.  You can find it on the wxLauncher googlecode page: http://code.google.com/p/wxlauncher/source/checkout?repo=libvp

SVN repo - that'd be cool, though I wouldn't know how to go about it. Either way, the source code is provided (I can upload the VC10 project file if anyone wants it), contributions are welcome (as is criticism on my newb coding BTW).
I would suggest just hosting it on a place like googlecode.com and be done with it.  They cover everything needed to setup.  If you are having problems with SVN itself (ie. how to use it) I would suggest the "SVN Book" that is available online for free or on paper.
"I love deadlines. I like the whooshing sound they make as they fly by." -Douglas Adams
wxLauncher 0.9.4 public beta (now with no config file editing for FRED) | wxLauncher 2.0 Request for Comments