Author Topic: The Acme MOptimizer  (Read 837 times)

Legacy_Rolo Kipp

  • Hero Member
  • *****
  • Posts: 4349
  • Karma: +0/-0
The Acme MOptimizer
« on: September 10, 2011, 09:45:58 pm »


                <spilling his...>

I'm picturing a utility...
It's a handy utility...
It does something we all do by hand (or are too lazy to do)...What it does is look at all the resources a mod uses and *smooshes* them together (technical term) into one hak with all the fat cut out.

Naturally, this would be something you do only for final release of a mod :-/

To do that, it would need to:
 - get a complete list of resources used by the mod - drop any default resource not overridden by a hak
 - parse all scripts for calls to create objects from blueprints (I believe FunkySwerve was looking at that)
 - merge 2da's intelligently. If there are conflicting rows, present list of conflicts w/choice of action
   - Override: this row is ignored 
   - Use: This row is used at this location 
   - Bump: This row is added onto end of working 2da. *dependent 2da's are adjusted to point to new row!*
 - Entries that are not used at all in this mod are emptied. Rows are culled and references re-mapped.
 - Tiles sets that are not used are not included. *Tiles* that are not used are excerpted and the tile set adjusted to
    a (much) smaller and simpler set.
 - models that are used and *not* default are included. Textures used by models are included and (optional)
   converted to DDS, if needed.
 - textures & models not used are culled.
 - any resources used are added to a "contributor_readme" stored with the hak (not finding the author for neat stuff
   bugs me :-P)
 - When it has trimmed the resource list, it extracts needed resources to a temp folder and rolls a custom hak.
 - It then alters a copy of the mod to only require "mod name".hak and "mod name"_patch.hak

In practice it should work like so: 

I have a mod using CEP2, multiple tilesets, multiple creature/placeable/CCC haks & a custom hak of my own.  
When I'm ready to upload V1.0 to the vault I open up the handy dandy MOptimizer to clean up that junkpile of ... Yip.
I open the .mod file and tell it to go.  It churns for a good while, weeding out every tileset, tile, model, texture, etc. I *didn't* use.
Then it gives me a report about how large my .mod + .hak + _patch.hak is and rolls it all up in the archive format of choice, ready for upload.

Second example: TSL wants to put out an annual compilation of the CCC.  She imports the 12 demo areas from the last year, adding all 12 haks to the mod. She MOptimizes it and Presto! No slaving over a hot computer for days. Now, wouldn't that be sweet?

Benefit to module builder - an external optimization and check on resource conflicts.
Benefit to player - If you are interested in DL'ing an epic saga, you don't need to worry about 13 different files to grab from the Vault just to get the mod working. And the hak shouldn't be too big to fit on a CD-ROM :-)

There are a bunch of utilities that do some of the above.
Is there something I've missed that does most of it?

Anyone else interested in building a MOptimizer? Using one?

<...schemes all over the forum>
               
               

               


                     Modifié par Rolo Kipp, 10 septembre 2011 - 08:49 .